Skip to content

Commit 5e173f5

Browse files
authored
Bump MAGIC_NUMBER to reflect change in JUMP_ABSOLUTE semantics. (pythonGH-28829)
1 parent 9fa930d commit 5e173f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/importlib/_bootstrap_external.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ def _write_atomic(path, data, mode=0o666):
363363
# Python 3.11a1 3458 (imported objects now don't use LOAD_METHOD/CALL_METHOD)
364364
# Python 3.11a1 3459 (PEP 657: add end line numbers and column offsets for instructions)
365365
# Python 3.11a1 3460 (Add co_qualname field to PyCodeObject bpo-44530)
366+
# Python 3.11a1 3461 (JUMP_ABSOLUTE must jump backwards)
366367

367368
#
368369
# MAGIC must change whenever the bytecode emitted by the compiler may no
@@ -372,7 +373,7 @@ def _write_atomic(path, data, mode=0o666):
372373
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
373374
# in PC/launcher.c must also be updated.
374375

375-
MAGIC_NUMBER = (3460).to_bytes(2, 'little') + b'\r\n'
376+
MAGIC_NUMBER = (3461).to_bytes(2, 'little') + b'\r\n'
376377
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
377378

378379
_PYCACHE = '__pycache__'

0 commit comments

Comments
 (0)