-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
PEP 788: Address feedback from first discussion round #4400
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@godlygeek I can't add you as a reviewer, but I'd appreciate your opinion on some of the new things I'm proposing here. |
Bump @AA-Turner @vstinner now that the beta is out. There's no rush considering we have a year until the 3.15 freeze, though. |
Return a strong reference to an interpreter from a weak reference. | ||
If the interpreter no longer exists or has already finished waiting for | ||
non-daemon threads, then this function returns ``0``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same remark than PyInterpreterState_AsStrong(), I would prefer an API like: int PyInterpreterWeakRef_AsStrong(PyInterpreterWeakRef *wref, PyInterpreterRef *ref)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably harder to use, though.
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>
… into pep-788-round-1
I'm not comfortable with |
PEP 123: Summary of changes
)The key changes I made here are:
PyInterpreterRef
andPyInterpreterWeakRef *
).PyThreadState_GetDaemon()
and what needs to happen tothreading
for that to work.PyInterpreterState *
for refs).PyThreadState_Ensure
stealing a strong reference.📚 Documentation preview 📚: https://pep-previews--4400.org.readthedocs.build/pep-0788/