Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-76007: Deprecate __version__ attribute in decimal#140302
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
StanFromIreland commented Oct 18, 2025 • edited by github-actions bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by github-actions bot
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
vstinner commented Oct 18, 2025
Co-authored-by: Victor Stinner <vstinner@python.org>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
merwok commented Oct 19, 2025
(Please edit the commit message when merging so that we’re not tagged forever by pushes in clones! thanks 🙂) |
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
StanFromIreland commented Oct 19, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Éric, all of my commits up to that point had the commit message "Commit"? I tagged you in the PR description, I don't think that should be a burden for longer than this PR is open? There is an "unsubscribe" button in the right sidebar. |
Uh oh!
There was an error while loading. Please reload this page.
skirpichev left a comment
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.
Looks good, modulo one nitpick about decimal.rst.
I'm not sure also about naming for the constant. But lets see what other people think.
Doc/library/decimal.rst Outdated
| .. versionadded:: 3.8.3 | ||
| .. data:: SPEC_VERSION |
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.
Hmm, I think that this should be moved up before "The constants in this section are only relevant for the C module." sentence of the first paragraph. Which should be also rephrased, i.e. "Following constants in <...>". Clearly, spec version is relevant for both modules.
BTW, I'm not sure about naming. Maybe more verbose "DECIMAL_SPEC_VERSION"?
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.
BTW, I'm not sure about naming. Maybe more verbose "DECIMAL_SPEC_VERSION"?
I have a similar sentiment, I simply used this since it was in the discussion.
skirpichev commented Oct 19, 2025
It seems core devs sometimes use PR descriptions for commit messages. So, it's rather a reminder for one, who will merge this pr. |
hugovk left a comment
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 not sure also about naming for the constant. But lets see what other people think.
decimal.SPEC_VERSION is fine by me. Skip also suggested it at #76007 (comment).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
00026d1 into python:mainUh oh!
There was an error while loading. Please reload this page.
vstinner commented Oct 26, 2025
Merged, thank you. |
vstinner commented Oct 28, 2025
Oh, importing $ ./python-Werror-c"import decimal"Traceback (mostrecentcalllast): File"<string>", line1, in<module>importdecimalFile"/home/vstinner/python/main/Lib/decimal.py", line103, in<module>from_decimalimport__version__# noqa: F401^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^DeprecationWarning: '__version__'isdeprecatedandslatedforremovalinPython3.20 |
vstinner commented Oct 28, 2025 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Oh, ignore my previous comment, I forgot to run |
…n#140302) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Per discussion in the issue, provide a
SPEC_VERSIONconstant instead. CC @merwok@smontanaro📚 Documentation preview 📚: https://cpython-previews--140302.org.readthedocs.build/