{{ message }}
bpo-43973: Use Py_TPFLAGS_IMMUTABLETYPE to check for class assignments - #25714
Merged
Merged
Conversation
Contributor
Author
Contributor
Author
|
AFAICS, this does not require a news item, but I might be wrong. |
erlend-aasland
marked this pull request as ready for review
April 29, 2021 09:32
Contributor
|
Doesn't this also require a change? Lines 4679 to 4690 in e047239 Suggested :- |
Contributor
Author
AFAICT, no. They adjust the ref. count if heap types are used: If the old class was a heap type, decrement its ref. count. If the new class is a heap type, acquire a strong reference to it (increment the ref. count). |
vstinner
reviewed
Apr 29, 2021
erlend-aasland
force-pushed
the
class_assignments
branch
from
April 30, 2021 09:51
89a5079 to
3023aaf
Compare
Contributor
Author
|
Thanks for reviewing, @vstinner ! |
Member
|
Merged, thanks for the fix. |
Member
|
The comment above the check should have been fixed to reflect the new semantics, no? Also, is the explicit check for |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

See also bpo-43908
https://bugs.python.org/issue43973