Skip to content
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

gh-111058: Change coro.cr_frame/gen.gi_frame to be None for a closed coroutine/generator. #112428

Merged
merged 6 commits into from
Dec 1, 2023

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Nov 26, 2023

@iritkatriel iritkatriel added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes and removed needs backport to 3.11 only security fixes labels Nov 26, 2023
Copy link
Member

@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe we need more general NEWS entry because the issue applies not only to coroutines but also to generators?

@iritkatriel iritkatriel changed the title gh-111058: Change coro.cr_frame to be None for a closed coroutine, and the value of inspect.getcoroutinestate() for closed coroutines. gh-111058: Change coro.cr_frame/gen.gi_frame to be None for a closed coroutine/generator. Dec 1, 2023
Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for fixing this.

@iritkatriel iritkatriel merged commit bfb576e into python:main Dec 1, 2023
32 checks passed
@miss-islington-app
Copy link

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@bedevere-app
Copy link

bedevere-app bot commented Dec 1, 2023

GH-112589 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 1, 2023
…losed coroutine/generator. (pythonGH-112428)

(cherry picked from commit bfb576e)

Co-authored-by: Irit Katriel <[email protected]>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Dec 1, 2023
iritkatriel pushed a commit that referenced this pull request Dec 1, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.12 inspecting a coroutine using getcoroutinestate returns the wrong state.
3 participants