summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2022-03-04 12:41:17 (GMT)
committerGitHub <noreply@github.com>2022-03-04 12:41:17 (GMT)
commit586b24d3be1aec5d2568b070a249b4d75e608782 (patch)
treee5e92e960433634f839118b51039a3fec3429d3e /Lib
parent03c2a36b2bd2d4469160d1607619ee144175d753 (diff)
downloadcpython-586b24d3be1aec5d2568b070a249b4d75e608782.zip
cpython-586b24d3be1aec5d2568b070a249b4d75e608782.tar.gz
cpython-586b24d3be1aec5d2568b070a249b4d75e608782.tar.bz2
bpo-46841: Fix error message hacks in `GET_AWAITABLE` (GH-31664)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/importlib/_bootstrap_external.py3
-rw-r--r--Lib/opcode.py3
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 9d36bc2..529ca5a 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -392,6 +392,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.11a5 3483 (Use inline caching for COMPARE_OP and BINARY_SUBSCR)
# Python 3.11a5 3484 (Use inline caching for LOAD_ATTR, LOAD_METHOD, and
# STORE_ATTR)
+# Python 3.11a5 3485 (Add an oparg to GET_AWAITABLE)
# Python 3.12 will start with magic number 3500
@@ -406,7 +407,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 = (3484).to_bytes(2, 'little') + b'\r\n'
+MAGIC_NUMBER = (3485).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__'
diff --git a/Lib/opcode.py b/Lib/opcode.py
index f6e2dec..3675780 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -92,7 +92,6 @@ def_op('GET_YIELD_FROM_ITER', 69)
def_op('PRINT_EXPR', 70)
def_op('LOAD_BUILD_CLASS', 71)
-def_op('GET_AWAITABLE', 73)
def_op('LOAD_ASSERTION_ERROR', 74)
def_op('RETURN_GENERATOR', 75)
@@ -153,7 +152,7 @@ jabs_op('JUMP_IF_NOT_EG_MATCH', 127)
jabs_op('POP_JUMP_IF_NOT_NONE', 128)
jabs_op('POP_JUMP_IF_NONE', 129)
def_op('RAISE_VARARGS', 130) # Number of raise arguments (1, 2, or 3)
-
+def_op('GET_AWAITABLE', 131)
def_op('MAKE_FUNCTION', 132) # Flags
def_op('BUILD_SLICE', 133) # Number of items
jabs_op('JUMP_NO_INTERRUPT', 134) # Target byte offset from beginning of code