-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-33346: Allow async comprehensions inside implicit async comprehensions. #6766
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
Conversation
9f24c24
to
0b36223
Compare
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.
Don't merge this yet. I think we need more discussion about the desired behavior. And we need docs to match.
0b36223
to
63c911b
Compare
Can we include this in beta1? |
de5d817
to
6039db7
Compare
6039db7
to
f3beb18
Compare
I have updated the PR to match the main branch and I am landing this as the discussion in bpo has been quiet for several years and everyone seems to be on the same page. @serhiy-storchaka, Дякую за чудову роботу! 😃 |
Wow! |
Summary: In cinder 3.8 we unintentionally allowed async comprehensions to nest inside non-async ones, due to comprehension inlining. When we ported comprehension inlining to 3.10, we closed this hole for better fidelity to upstream compiler behavior, but that means we have to fix the places in IGSRV that now break this rule. And this doesn't seem worth it considering the restriction is lifted in Python 3.11 anyway: python/cpython#6766 This diff just restores the 3.8 behavior of comprehension inlining allowing async comprehensions nested inside non-async ones. Reviewed By: itamaro Differential Revision: D39825885 fbshipit-source-id: bd2f27a
I noticed that no tests fail if I comment out this line: Line 5785 in 0898354
and I bisected it to this PR. (1) Does this make sense? |
I think it's fine because this PR added in symtable.c code that propagates the value of |
https://bugs.python.org/issue33346