Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-43908: Add Py_TPFLAGS_IMMUTABLETYPE flag#25520
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
erlend-aasland commented Apr 22, 2021 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-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.
Uh oh!
There was an error while loading. Please reload this page.
24a99a2 to 8e8129fCompareerlend-aasland commented Apr 26, 2021
Uh oh!
There was an error while loading. Please reload this page.
erlend-aasland commented Apr 27, 2021
@pablogsal are you ok with the PR as it is? |
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.
Misc/NEWS.d/next/Core and Builtins/2021-04-22-10-46-40.bpo-43908.Co3YhZ.rst Outdated Show resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Misc/NEWS.d/next/Core and Builtins/2021-04-22-10-46-40.bpo-43908.Co3YhZ.rst Outdated Show resolvedHide resolved
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.
Co-authored-by: Victor Stinner <[email protected]>
vstinner 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.
LGTM.
IMO it was important to mention "type attributes cannot be set nor deleted" to explain what "immutable" means. I stop nitpicking, let's move on to add this flag to types recently converted to heap types.
erlend-aasland commented Apr 28, 2021
Thanks, @vstinner! I appreciate the doc/comment nitpicking; you're improved the PR considerably. |
vstinner commented Apr 28, 2021
@erlend-aasland: Travis CI failed: |
Uh oh!
There was an error while loading. Please reload this page.
erlend-aasland commented Apr 28, 2021
Oops, I'll fix it. I normally do |
erlend-aasland commented Apr 28, 2021
FYI, unrelated random ssl test failure on the macOS CI, @vstinner. |
vstinner commented Apr 28, 2021
Merged, thanks. |
pablogsal commented Apr 28, 2021 • 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.
Since python/cpython#25520 types are automatically marked as immutable if they are static. While we still have the Py_TPFLAGS_HEAPTYPE hack in place we need to manually mark our types as immutable. It's possible to crash Python by trying to modify mutable static types.
https://bugs.python.org/issue43908