-
Notifications
You must be signed in to change notification settings - Fork 490
Closed
Description
Hi!
With pint 0.24, the internal workings of register_unit_format have changed and the registry argument of the wrapped function can now be "None". I do not see in the doc the meaning of that new possible value. Wouldn't a Unit object always be related to a registry, even if it's the default one ?
This is causing issues in cf-xarray (and downstream) for example (xarray-contrib/cf-xarray#507) where we used registry to convert the UnitContainer back to a Unit (see https://github.com/xarray-contrib/cf-xarray/blob/24dd81b2748db59c3ede68735a200b63b8a3d2d2/cf_xarray/units.py#L17-L38)
EDIT: Also, the way register_unit_format is written, wouldn't registry always be None ?
Metadata
Metadata
Assignees
Labels
No labels