Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-108014: Add Py_IsFinalizing() function#108032

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 5 commits intopython:mainfromvstinner:is_finalizing
Aug 18, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedAug 16, 2023
edited by github-actionsbot
Loading

@vstinner
Copy link
MemberAuthor

@ericsnowcurrently: Oh, that's a "feature" PR, so I will need a formal approval to merge it :-)

@vstinner
Copy link
MemberAuthor

I preparedpython/pythoncapi-compat#66 to add the function to the pythoncapi-compat project.

@gvanrossumgvanrossum removed their request for reviewAugust 16, 2023 18:05
Comment on lines 378 to 379
Return non-zero if the Python interpreter is :term:`shutting down
<interpreter shutdown>`, return 0 otherwise.

Choose a reason for 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 useNULL to mean the current one (or main)?

Copy link
MemberAuthor

Choose a reason for 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?

Copy link
MemberAuthor

Choose a reason for 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 themain interpreter.

@kumaraditya303kumaraditya303 removed their request for reviewAugust 17, 2023 06:08
Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.

vstinnerand others added2 commitsAugust 17, 2023 22:01
…3CF.rstCo-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@vstinnervstinner merged commit3ff5ef2 intopython:mainAug 18, 2023
@vstinnervstinner deleted the is_finalizing branchAugust 18, 2023 10:34
@vstinner
Copy link
MemberAuthor

Thanks for the review@ericsnowcurrently and@serhiy-storchaka!

@vstinner
Copy link
MemberAuthor

Follow-up:@wjakob asks to add this new function to the limited C API version 3.13.

erlend-aasland reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ericsnowcurrentlyericsnowcurrentlyericsnowcurrently left review comments

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@willingcwillingcAwaiting requested review from willingcwillingc is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@vstinner@ericsnowcurrently@serhiy-storchaka@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp