You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reminder: consider removing unused, internal C code #18951
Following #18800, the @deprecated_keywords decorator is currently unused. Since it was always explicitly private, and is implemented in C, I think we should remove it completely before astropy 8.0.0 final, unless, of course, it finds a new use in the mean time.
If it's used again, outside of the cosmology submodule, it should be moved to astropy.utils (but still only be added to a private namespace)
Looks like it was you who added it in #16597 . I guess it is okay to remove if unused and private but @nstarman should confirm since it is in cosmology.
Now, now, let's not go crazy. New code API is anyone's game but please leave the existing stable code API alone unless there is a very good reason (besides style and latest trend).
I would like to keep the discussions here solely about removing this particular C code and nothing else.
The very good reason is "Positional-only parameters give more control to library authors to better express the intended usage of an API and allows the API to evolve in a safe, backward-compatible way." PEP.
We can remove the C code now, but if we're committed to improving API we'll have to bring it back in order to handle deprecations.
Hi, i would like to contribute to this issue!
I was already working on it and have a branch with all the modifications needed to remove the @deprecated_keywords decorator before i saw the last comment.
Have you decided to remove it or make it a new package?
Neither, though I note that the decorator is actually still being used in astropy 8.0.0-dev, so we cannot actually remove the definitions yet, and it'll have to wait for 9.0.0, which isn't planned yet.
Reacted by Nathaniel Starkman and Henrique Carvalho
Activity
pllim commentedon Nov 17, 2025
Looks like it was you who added it in #16597 . I guess it is okay to remove if unused and private but @nstarman should confirm since it is in cosmology.
nstarman commentedon Nov 17, 2025
IMO we should make more variables in astropy positional-only.
pllim commentedon Nov 17, 2025
Now, now, let's not go crazy. New code API is anyone's game but please leave the existing stable code API alone unless there is a very good reason (besides style and latest trend).
I would like to keep the discussions here solely about removing this particular C code and nothing else.
Thank you for your understanding.
nstarman commentedon Nov 17, 2025
The very good reason is "Positional-only parameters give more control to library authors to better express the intended usage of an API and allows the API to evolve in a safe, backward-compatible way." PEP.
We can remove the C code now, but if we're committed to improving API we'll have to bring it back in order to handle deprecations.
neutrinoceros commentedon Nov 17, 2025
(FWIW I'm considering spinning it off as a reusable, self contained package)
Iquecs2005 commentedon Apr 25, 2026
Hi, i would like to contribute to this issue!
I was already working on it and have a branch with all the modifications needed to remove the
@deprecated_keywordsdecorator before i saw the last comment.Have you decided to remove it or make it a new package?
neutrinoceros commentedon Apr 26, 2026
Neither, though I note that the decorator is actually still being used in astropy 8.0.0-dev, so we cannot actually remove the definitions yet, and it'll have to wait for 9.0.0, which isn't planned yet.