-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-124442: make __static_attributes__
deterministic by sorting
#124492
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
Conversation
e496c43
to
9265b78
Compare
Make :func:`compile` builtin function deterministic by sorting | ||
``__static_attributes__`` before dumping to the bytecode #.. section: | ||
Library #.. section: Documentation #.. section: Tests #.. section: Build #.. | ||
section: Windows #.. section: macOS #.. section: IDLE #.. section: | ||
Tools/Demos #.. section: C API | ||
|
||
# Write your Misc/NEWS.d entry below. It should be a simple ReST paragraph. | ||
# Don't start with "- Issue #<n>: " or "- gh-issue-<n>: " or that sort of | ||
stuff. | ||
########################################################################### |
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.
Make :func:`compile` builtin function deterministic by sorting | |
``__static_attributes__`` before dumping to the bytecode #.. section: | |
Library #.. section: Documentation #.. section: Tests #.. section: Build #.. | |
section: Windows #.. section: macOS #.. section: IDLE #.. section: | |
Tools/Demos #.. section: C API | |
# Write your Misc/NEWS.d entry below. It should be a simple ReST paragraph. | |
# Don't start with "- Issue #<n>: " or "- gh-issue-<n>: " or that sort of | |
stuff. | |
########################################################################### | |
Make the :func:`compile` builtin function deterministic by sorting | |
:attr:`~class.__static_attributes__` before writing to bytecode. |
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
…y sorting Signed-off-by: kp2pml30 <[email protected]>
9265b78
to
e097874
Compare
I have made the requested changes; please review again |
Thanks for making the requested changes! @AA-Turner: please review the changes made to this pull request. |
@kp2pml30 please avoid force-pushing, it makes reviews harder. The Developer's Guide asks that we avoid force-pushing. I'd also suggest adding a test in A |
fb4e259
to
676ddad
Compare
Signed-off-by: kp2pml30 <[email protected]>
Misc/NEWS.d/next/Core_and_Builtins/2024-09-25-11-53-22.gh-issue-124442.EXC1Ve.rst
Outdated
Show resolved
Hide resolved
Signed-off-by: kp2pml30 <[email protected]>
I'm going to push some changes here as I'd like to get this fixed in 3.13.0. |
Co-authored-by: Adam Turner <[email protected]>
Thanks @kp2pml30 for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, @kp2pml30 and @JelleZijlstra, I could not cleanly backport this to
|
GH-124738 is a backport of this pull request to the 3.13 branch. |
… sorting (pythonGH-124492) (cherry picked from commit 04c837d) Co-authored-by: Kira <[email protected]> Signed-off-by: kp2pml30 <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Adam Turner <[email protected]>
…ng (GH-124492) (#124738) * [3.13] gh-124442: make `__static_attributes__` deterministic by sorting (GH-124492) (cherry picked from commit 04c837d) Co-authored-by: Kira <[email protected]> Signed-off-by: kp2pml30 <[email protected]> Co-authored-by: Jelle Zijlstra <[email protected]> Co-authored-by: Adam Turner <[email protected]>
See #124442 for discussion
__static_attributes__
is not deterministic #124442