diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-08-24 10:11:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-24 10:11:52 (GMT) |
commit | ef61c524ddeeb56da3858b86e349e7288d68178e (patch) | |
tree | e8a9defe85faff05464db6335140eb0990499f15 /Lib/importlib | |
parent | e9c90aa43144b0be1e4e393e8cb549573437a5da (diff) | |
download | cpython-ef61c524ddeeb56da3858b86e349e7288d68178e.zip cpython-ef61c524ddeeb56da3858b86e349e7288d68178e.tar.gz cpython-ef61c524ddeeb56da3858b86e349e7288d68178e.tar.bz2 |
bpo-37830: Fix compilation of break and continue in finally. (GH-15320)
Fix compilation of "break" and "continue" in the
"finally" block when the corresponding "try" block
contains "return" with a non-constant value.
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 badd7a7..67bd1d3 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -270,6 +270,7 @@ _code_type = type(_write_atomic.__code__) # comprehensions #35224) # Python 3.8b2 3412 (Swap the position of positional args and positional # only args in ast.arguments #37593) +# Python 3.8b4 3413 (Fix "break" and "continue" in "finally" #37830) # # MAGIC must change whenever the bytecode emitted by the compiler may no # longer be understood by older implementations of the eval loop (usually @@ -278,7 +279,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 = (3412).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3413).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _PYCACHE = '__pycache__' |