Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Bump magic number.
  • Loading branch information
markshannon committed Nov 12, 2020
commit f3adbbe8f97037a534243d8e819e4bc953d18024
3 changes: 2 additions & 1 deletion Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def _write_atomic(path, data, mode=0o666):
# Python 3.9a2 3424 (simplify bytecodes for *value unpacking)
# Python 3.9a2 3425 (simplify bytecodes for **value unpacking)
# Python 3.10a1 3430 (Make 'annotations' future by default)
# Python 3.10a1 3431 (New line number table format -- PEP 626)

#
# MAGIC must change whenever the bytecode emitted by the compiler may no
Expand All @@ -287,7 +288,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 = (3430).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3431).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c

_PYCACHE = '__pycache__'
Expand Down
1 change: 1 addition & 0 deletions PC/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,7 @@ static PYC_MAGIC magic_values[] = {
{ 3390, 3399, L"3.7" },
{ 3400, 3419, L"3.8" },
{ 3420, 3429, L"3.9" },
{ 3430, 3439, L"3.10" },
{ 0 }
};

Expand Down
Loading