Skip to content

PEP 788: New revision based on SC feedback#4875

Merged
ZeroIntensity merged 7 commits intopython:mainfrom
ZeroIntensity:pep-788-revision
Apr 9, 2026
Merged

PEP 788: New revision based on SC feedback#4875
ZeroIntensity merged 7 commits intopython:mainfrom
ZeroIntensity:pep-788-revision

Conversation

@ZeroIntensity
Copy link
Copy Markdown
Member

@ZeroIntensity ZeroIntensity commented Mar 25, 2026

  • Change is either:
    • To a Draft PEP
    • To an Accepted or Final PEP, with Steering Council approval
    • To fix an editorial issue (markup, typo, link, header, etc)
  • PR title prefixed with PEP number (e.g. PEP 123: Summary of changes)

📚 Documentation preview 📚: https://pep-previews--4875.org.readthedocs.build/pep-0788/

@ZeroIntensity ZeroIntensity marked this pull request as ready for review April 9, 2026 13:23
@ZeroIntensity ZeroIntensity requested a review from vstinner as a code owner April 9, 2026 13:23
@ZeroIntensity ZeroIntensity merged commit 03944ad into python:main Apr 9, 2026
5 checks passed
assert(view != NULL);
PyThreadState *tstate = PyThreadState_EnsureFromView(view);
if (tstate == NULL) {
PyInterpreterGuard_Close(guard);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

guard is not defined here.

The caller does not need to hold an attached thread state.


.. c:function:: void PyInterpreterGuard_Close(PyInterpreterGuard guard)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The function prototype is wrong:

Suggested change
.. c:function:: void PyInterpreterGuard_Close(PyInterpreterGuard *guard)


PyThreadState *tstate = PyThreadState_Ensure(guard);
if (tstate == NULL) {
PyInterpreterGuard_Close(tstate);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This call is wrong. I suppose that you mean:

Suggested change
PyInterpreterGuard_Close(tstate);
PyInterpreterGuard_Close(guard);

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants