Skip to content

Commit

Permalink
Update magic number
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Sep 11, 2023
1 parent d74670c commit 41463a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ def _write_atomic(path, data, mode=0o666):
# Python 3.13a1 3558 (Reorder the stack items for CALL)
# Python 3.13a1 3559 (Generate opcode IDs from bytecodes.c)
# Python 3.13a1 3560 (Add RESUME_CHECK instruction)
# Python 3.13a1 3561 (Add cache entry to branch instructions)

# Python 3.14 will start with 3600

Expand All @@ -472,7 +473,7 @@ def _write_atomic(path, data, mode=0o666):
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.

MAGIC_NUMBER = (3560).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3561).to_bytes(2, 'little') + b'\r\n'

_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c

Expand Down

0 comments on commit 41463a5

Please sign in to comment.