Skip to content

Commit c640915

Browse files
authored
Bump magic number. (GH-23245)
1 parent fd4ed57 commit c640915

File tree

3 files changed

+114
-112
lines changed

3 files changed

+114
-112
lines changed

Lib/importlib/_bootstrap_external.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ def _write_atomic(path, data, mode=0o666):
278278
# Python 3.9a2 3424 (simplify bytecodes for *value unpacking)
279279
# Python 3.9a2 3425 (simplify bytecodes for **value unpacking)
280280
# Python 3.10a1 3430 (Make 'annotations' future by default)
281+
# Python 3.10a1 3431 (New line number table format -- PEP 626)
281282

282283
#
283284
# MAGIC must change whenever the bytecode emitted by the compiler may no
@@ -287,7 +288,7 @@ def _write_atomic(path, data, mode=0o666):
287288
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
288289
# in PC/launcher.c must also be updated.
289290

290-
MAGIC_NUMBER = (3430).to_bytes(2, 'little') + b'\r\n'
291+
MAGIC_NUMBER = (3431).to_bytes(2, 'little') + b'\r\n'
291292
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
292293

293294
_PYCACHE = '__pycache__'

PC/launcher.c

+1
Original file line numberDiff line numberDiff line change
@@ -1248,6 +1248,7 @@ static PYC_MAGIC magic_values[] = {
12481248
{ 3390, 3399, L"3.7" },
12491249
{ 3400, 3419, L"3.8" },
12501250
{ 3420, 3429, L"3.9" },
1251+
{ 3430, 3439, L"3.10" },
12511252
{ 0 }
12521253
};
12531254

0 commit comments

Comments
 (0)