◐ Shell
clean mode source ↗

bpo-33346: Allow async comprehensions inside implicit async comprehensions. by serhiy-storchaka · Pull Request #6766 · python/cpython

facebook-github-bot pushed a commit to facebookincubator/cinder that referenced this pull request

Sep 26, 2022
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