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

Add Py_IsFinalizing()#66

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 1 commit intomainfromis_finalizing
Aug 18, 2023
Merged

Add Py_IsFinalizing()#66

vstinner merged 1 commit intomainfromis_finalizing
Aug 18, 2023

Conversation

vstinner
Copy link
Member

No description provided.

@vstinner
Copy link
MemberAuthor

PR waiting untilpython/cpython#108032 is merged in Python upstream.

@albanD
Copy link
Contributor

Hey!

I have a related question but it is not 100% about this PR so feel free to delete if you think this is not the right place to ask.

There have been quite a few discussions related toPy_IsFinalizing andPy_Initialized and how to use them to ensure graceful exit when c++ keeps things alive past python runtime lifetime.
https://github.com/pytorch/pytorch/blob/589072afa1a196270b0298460c1f419e209da6ea/torch/csrc/utils/pybind.h#L178-L185

Is this comment still accurate for the latest version of CPython? Should we update our use of these functions to use the new public API being introduced?

@vstinner
Copy link
MemberAuthor

Is this comment still accurate for the latest version of CPython?

I don't know. This PR is on the pythoncapi-compat project, not the Python project.

albanD reacted with thumbs up emoji

@vstinnervstinner marked this pull request as ready for reviewAugust 18, 2023 10:43
@vstinnervstinner merged commit1bb4e16 intomainAug 18, 2023
@vstinnervstinner deleted the is_finalizing branchAugust 18, 2023 10:47
@vstinner
Copy link
MemberAuthor

I dug into PyPy tarball releases to check which version added Py_IsFinalizing(): it's PyPy 7.3. Sadly, on GitHub Actions we only tests versions newer than PyPy 7.3.0: PyPy 7.2 and older are not tested.

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

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@vstinner@albanD@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp