-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
gh-76007: Deprecate __version__
attribute
#138675
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
base: main
Are you sure you want to change the base?
Conversation
Reviewed the SBOM changes. |
|
||
.. Add deprecations above alphabetically, not here at the end. | ||
.. include:: ../deprecations/pending-removal-in-3.16.rst | ||
|
||
.. include:: ../deprecations/pending-removal-in-3.17.rst |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this will show the same list twice in this page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's how we're already doing it for other ones (I'm not sure if we should, but that's another discussion).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with the logging-related changes, thank you.
if name == "__version__": | ||
from warnings import _deprecated | ||
|
||
_deprecated("__version__", remove=(3, 17)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP 387 says:
It is preferred, though, to wait 5 years before removal (e.g., warn starting in Python 3.10, removal in 3.15; this happens to coincide with the current lifetime of a minor release of Python).
_deprecated("__version__", remove=(3, 17)) | |
_deprecated("__version__", remove=(3, 20)) |
Or is there a reason to rush this?
📚 Documentation preview 📚: https://cpython-previews--138675.org.readthedocs.build/