Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate ambiguous units #5793

Closed
mhvk opened this issue Feb 10, 2017 · 2 comments
Closed

Deprecate ambiguous units #5793

mhvk opened this issue Feb 10, 2017 · 2 comments

Comments

@mhvk
Copy link
Contributor

mhvk commented Feb 10, 2017

E.g. emu #4918, possibly there are others; prefixed solar, earth, and jupiter mass in #5661.

This issue is for discussion about ways to deprecate (prefixed) units. A first possible implementation (#5787), which emitted warnings on importing units was deemed too drastic, since the whole point is that most of those units are rarely if ever used.

A suggestion by @pllim was to move deprecated units to a separate module (say, units.deprecated. This has the advantage that if code still really needs it, one can imagine being able to do with u.decprecated.enable() just like one can do with u.imperial.enable(). It might also be possible to not just remove a unit altogether from the astropy.units namespace, but first replace it with something that will emit a warning when used but otherwise behaves like the unit. (Perhaps easier would be just to raise an exception, telling what to do to solve it).

@mhvk mhvk created this issue from a note in 2.0 Feature Planning (High priority) Feb 10, 2017
@bsipocz bsipocz added the units label Feb 10, 2017
@bsipocz bsipocz added this to the v2.0.0 milestone Feb 10, 2017
@eteq
Copy link
Member

eteq commented Jun 16, 2017

@mhvk - #5661 amd #5906 are in, so I think this can be closed, right?

@mhvk
Copy link
Contributor Author

mhvk commented Jun 16, 2017

Yes, I think this is done -- we now have a nice system in place!

@mhvk mhvk closed this as completed Jun 16, 2017
@bsipocz bsipocz moved this from High priority to Done in 2.0 Feature Planning Jun 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

3 participants