GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — gh-85858: Remove PyUnicode_InternImmortal() function by vstinner · Pull Request #92579 · python/cpython Conversation
Member
Remove the PyUnicode_InternImmortal() function and the The PyUnicode_InternImmortal() function is still exported in the PyASCIIObject.state.interned size is now a single bit, rather than 2 Keep SSTATE_NOT_INTERNED and SSTATE_INTERNED_MORTAL macros for
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would keep it 2-bit for a time.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PyASCIIObject is not part of the stable ABI. Why do you care about keeping 2 bits for interned?
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is not 2 versions too short period for removing from the public C API? I think we should be more conservative in such cases and prolong the deprecation to at least 4 years. I would keep it as an alias of
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are no use from top4000 packages. We can remove it in early alpha and resurrect it if some packages are broken by this.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I followed PEP 387 process.
Why do you care of this function in specific? Are you aware of projects using it?
Same when I looked in December 2021: History of this function: #85858 (comment)
Sure. I did that multiple times and I'm fine with reverting if it causes too many issues. Removing the function early in 3.12 dev cycle gives more time to users to detect if their project is affected, to give them more time to decide how to update their code, or to ask to revert the change.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
methane
approved these changes
Remove the PyUnicode_InternImmortal() function and the SSTATE_INTERNED_IMMORTAL macro. The PyUnicode_InternImmortal() function is still exported in the stable ABI. The function is removed from the API. PyASCIIObject.state.interned size is now a single bit, rather than 2 bits. Keep SSTATE_NOT_INTERNED and SSTATE_INTERNED_MORTAL macros for backward compatibility, but no longer use them internally since the interned member is now a single bit and so can only have two values (interned or not interned). Update stats of _PyUnicode_ClearInterned().
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Do I understand correctly that this changeset alters the alignment of I'm not at all familiar with the m68k issue that caused the addition of the padding field (nor what the implications might be on target platforms), but thought that I would ask for confirmation if the adjustment to the width of Edit: pondering it some more, I may have asked a very silly question here, since the difference of one bit isn't going to make a difference in terms of bytes, there will "just" be this odd bit not formally accounted for. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@SnoopJeDi Nice catch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This padding was not updated when pythonGH-92579 reduced intern flag bits.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.