Uh oh!
There was an error while loading. Please reload this page.
gh-108014: Add Py_IsFinalizing() function - #108032
Conversation
vstinner
commented
Aug 16, 2023
@ericsnowcurrently: Oh, that's a "feature" PR, so I will need a formal approval to merge it :-) |
vstinner
commented
Aug 16, 2023
I prepared python/pythoncapi-compat#66 to add the function to the pythoncapi-compat project. |
| Return non-zero if the Python interpreter is :term:`shutting down | ||
| <interpreter shutdown>`, return 0 otherwise. |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
I updated the doc to specify that we are talking about the main interpreter.
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.
Uh oh!
There was an error while loading. Please reload this page.
…3CF.rst Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
vstinner
commented
Aug 18, 2023
Thanks for the review @ericsnowcurrently and @serhiy-storchaka! |
vstinner
commented
Oct 5, 2023
Follow-up: @wjakob asks to add this new function to the limited C API version 3.13. |
📚 Documentation preview 📚: https://cpython-previews--108032.org.readthedocs.build/