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-84436: Add codemod for _PyVarObject_HEAD_IMMORTAL_INIT by eduardo-elizondo · Pull Request #103308 · python/cpython Conversation
| ||||||||||||||||||||
|
I assume someone is going to review each of these to determine whether they're in the right places? (e.g. the public docs should not be using an internal macro) If we really do want to update every single use, well, that's why we have the original macro. We should just change it. My understanding of immortal objects is that we'd carefully opt-in certain types, and not do a global find/replace like this. But possibly the design has changed in a way I haven't kept up with. At the very least, if it belongs in public docs, make it a public macro. And if it applies literally everywhere, just modify the existing macro. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -0,0 +1,3 @@ | |||
| Replace all internal uses of PyVarObject_HEAD_INIT fo | |||
| _PyVarObject_HEAD_IMMORTAL_INIT to be able to initialize them as immortal | |||
| objects since they live thorughout the entire execution | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Typo
| objects since they live thorughout the entire execution | |
| objects since they live throughout the entire execution |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Like Steve, I do wonder, why not change the macro instead of 150+ files?
If the macro needs to remain different, could we define the macro different when Py_BUILD_CORE is set?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@zooba We are opting in all static objects as they live throughout the entire execution of the runtime! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
@zooba @gvanrossum the main goal was to not change the expectations of the public C-API of All that said, the solution of using |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
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.