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-108014: Add Py_IsFinalizing() function by vstinner · Pull Request #108032 · python/cpython Conversation
|
|
@ericsnowcurrently: Oh, that's a "feature" PR, so I will need a formal approval to merge it :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I prepared python/pythoncapi-compat#66 to add the function to the pythoncapi-compat project. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Return non-zero if the Python interpreter is :term:`shutting down | ||
| <interpreter shutdown>`, return 0 otherwise. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Is this referring to the runtime (AKA main interpreter) or to the current interpreter? I'd expect it to be the current interpreter.
Would it make sense to explicitly pass an interpreter and use NULL to mean the current one (or main)?
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.
I copied the documentation of the sys.is_finalizing() function. If you want a different feature (pass an interpreter), I would prefer to have a different function.
It's set by Py_Finalize() which finalizes the main interpreter: other sub-interpreters should be deleted before explicitly, no?
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.
I updated the doc to specify that we are talking about the main interpreter.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
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.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…3CF.rst Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]>
|
Thanks for the review @ericsnowcurrently and @serhiy-storchaka! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Follow-up: @wjakob asks to add this new function to the limited C API version 3.13. |
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.