summaryrefslogtreecommitdiffstats
path: root/Lib/importlib/_bootstrap_external.py
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2022-07-05 14:01:24 (GMT)
committerGitHub <noreply@github.com>2022-07-05 14:01:24 (GMT)
commit1bfe83a114da3939c00746fc44dc5da7f56f525f (patch)
tree8ac7429e794740f0748de56a1541df3f5357d70b /Lib/importlib/_bootstrap_external.py
parent0615e7f9bbc0ba07f48582df7857122d3f4c82b0 (diff)
downloadcpython-1bfe83a114da3939c00746fc44dc5da7f56f525f.zip
cpython-1bfe83a114da3939c00746fc44dc5da7f56f525f.tar.gz
cpython-1bfe83a114da3939c00746fc44dc5da7f56f525f.tar.bz2
[3.11] gh-94485: Set line number of module's RESUME instruction to 0 as specified by PEP 626 (GH-94552) (GH-94562)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Mark Shannon <mark@hotpy.org> (cherry picked from commit 324d01944d16868b07df9e8eef6987766a31a36d)
Diffstat (limited to 'Lib/importlib/_bootstrap_external.py')
-rw-r--r--Lib/importlib/_bootstrap_external.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 0061ad0..446d798 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -402,7 +402,8 @@ _code_type = type(_write_atomic.__code__)
# add JUMP_BACKWARD_NO_INTERRUPT, make JUMP_NO_INTERRUPT virtual)
# Python 3.11a7 3492 (make POP_JUMP_IF_NONE/NOT_NONE/TRUE/FALSE relative)
# Python 3.11a7 3493 (Make JUMP_IF_TRUE_OR_POP/JUMP_IF_FALSE_OR_POP relative)
-# Python 3.11a7 3494 (New location info table)
+# Python 3.11a7 3494 (New location info table)
+# Python 3.11b4 3495 (Set line number of module's RESUME instr to 0 per PEP 626)
# Python 3.12 will start with magic number 3500
@@ -416,7 +417,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 = (3494).to_bytes(2, 'little') + b'\r\n'
+MAGIC_NUMBER = (3495).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c