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-121272: compiler no longer modifies the symtable, ste_coroutine always set during symtable construction #121297

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Jul 2, 2024

@@ -5782,7 +5782,7 @@ compiler_comprehension(struct compiler *c, expr_ty e, int type,
co = optimize_and_assemble(c, 1);
compiler_exit_scope(c);
if (is_top_level_await && is_async_generator){
c->u->u_ste->ste_coroutine = 1;
assert(c->u->u_ste->ste_coroutine == 1);
Copy link
Member Author

Choose a reason for hiding this comment

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

I believe this assignment has been obsolete for a while now, see #6766 (comment).

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Agree this is a job for the symtable, not the compiler. This looks to be well tested in test_compile_top_level_await in test_builtin.py.

@iritkatriel iritkatriel merged commit 9315688 into python:main Jul 3, 2024
38 checks passed
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants