diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-03-23 12:34:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-23 12:34:35 (GMT) |
commit | 702f8f3611bc49b73772cce2b9b041bd11ff9b35 (patch) | |
tree | f712f53a42dc54831e7daf7e3686bc9c875b37b3 /Lib/importlib | |
parent | c65bf3fe4a2bde424b79e350f36b7aaa3f6476f6 (diff) | |
download | cpython-702f8f3611bc49b73772cce2b9b041bd11ff9b35.zip cpython-702f8f3611bc49b73772cce2b9b041bd11ff9b35.tar.gz cpython-702f8f3611bc49b73772cce2b9b041bd11ff9b35.tar.bz2 |
bpo-33041: Rework compiling an "async for" loop. (#6142)
* Added new opcode END_ASYNC_FOR.
* Setting global StopAsyncIteration no longer breaks "async for" loops.
* Jumping into an "async for" loop is now disabled.
* Jumping out of an "async for" loop no longer corrupts the stack.
* Simplify the compiler.
Diffstat (limited to 'Lib/importlib')
-rw-r--r-- | Lib/importlib/_bootstrap_external.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index 27aaf55..420ecc8 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -247,6 +247,7 @@ _code_type = type(_write_atomic.__code__) # Python 3.7a4 3392 (PEP 552: Deterministic pycs #31650) # Python 3.7b1 3393 (remove STORE_ANNOTATION opcode #32550) # Python 3.8a1 3400 (move frame block handling to compiler #17611) +# Python 3.8a1 3401 (add END_ASYNC_FOR #33041) # # MAGIC must change whenever the bytecode emitted by the compiler may no # longer be understood by older implementations of the eval loop (usually @@ -255,7 +256,7 @@ _code_type = type(_write_atomic.__code__) # Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array # in PC/launcher.c must also be updated. -MAGIC_NUMBER = (3400).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3401).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _PYCACHE = '__pycache__' |