summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-06-18 11:17:46 (GMT)
committerGitHub <noreply@github.com>2024-06-18 11:17:46 (GMT)
commit9cefcc0ee781a1bef9e0685c2271237005fb488b (patch)
tree7c02067f4e021d90ec4fd850d9a06315b8fc39ab /Lib/importlib
parent73dc1c678eb720c2ced94d2f435a908bb6d18566 (diff)
downloadcpython-9cefcc0ee781a1bef9e0685c2271237005fb488b.zip
cpython-9cefcc0ee781a1bef9e0685c2271237005fb488b.tar.gz
cpython-9cefcc0ee781a1bef9e0685c2271237005fb488b.tar.bz2
GH-120507: Lower the `BEFORE_WITH` and `BEFORE_ASYNC_WITH` instructions. (#120640)
* Remove BEFORE_WITH and BEFORE_ASYNC_WITH instructions. * Add LOAD_SPECIAL instruction * Reimplement `with` and `async with` statements using LOAD_SPECIAL
Diffstat (limited to 'Lib/importlib')
-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 30c9180..bf14d57 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -474,8 +474,9 @@ _code_type = type(_write_atomic.__code__)
# Python 3.13a6 3570 (Add __firstlineno__ class attribute)
# Python 3.14a1 3600 (Add LOAD_COMMON_CONSTANT)
# Python 3.14a1 3601 (Fix miscompilation of private names in generic classes)
+# Python 3.14a1 3602 (Add LOAD_SPECIAL. Remove BEFORE_WITH and BEFORE_ASYNC_WITH)
-# Python 3.15 will start with 3700
+# Python 3.15 will start with 3650
# Please don't copy-paste the same pre-release tag for new entries above!!!
# You should always use the *upcoming* tag. For example, if 3.12a6 came out
@@ -490,7 +491,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 = (3601).to_bytes(2, 'little') + b'\r\n'
+MAGIC_NUMBER = (3602).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c