From b2f7171a436e3e4e7c6efc9ab033bc698312cf37 Mon Sep 17 00:00:00 2001 From: sweeneyde Date: Sat, 3 Apr 2021 20:27:26 -0400 Subject: [PATCH 1/2] Update magic numbers and bootstrapping for GH-25069 --- Lib/importlib/_bootstrap_external.py | 2 +- Python/importlib_external.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py index 358c650916b0bb..77bd0e092bd2a8 100644 --- a/Lib/importlib/_bootstrap_external.py +++ b/Lib/importlib/_bootstrap_external.py @@ -324,7 +324,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 = (3434).to_bytes(2, 'little') + b'\r\n' +MAGIC_NUMBER = (3435).to_bytes(2, 'little') + b'\r\n' _RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c _PYCACHE = '__pycache__' diff --git a/Python/importlib_external.h b/Python/importlib_external.h index 465ec0cd6dd0e9..89f4d6fc254a60 100644 --- a/Python/importlib_external.h +++ b/Python/importlib_external.h @@ -315,7 +315,7 @@ const unsigned char _Py_M__importlib_bootstrap_external[] = { 0,115,38,0,0,0,16,5,6,1,22,1,4,255,2,2, 14,3,24,1,16,128,18,1,12,1,2,1,12,1,2,3, 12,254,2,1,2,1,2,254,2,253,255,128,114,84,0,0, - 0,105,106,13,0,0,114,45,0,0,0,114,33,0,0,0, + 0,105,107,13,0,0,114,45,0,0,0,114,33,0,0,0, 115,2,0,0,0,13,10,90,11,95,95,112,121,99,97,99, 104,101,95,95,122,4,111,112,116,45,122,3,46,112,121,122, 4,46,112,121,119,122,4,46,112,121,99,41,1,218,12,111, From 965bae5e8f6ab1297bbbe1e30a295ade72d2564c Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sat, 3 Apr 2021 22:05:15 -0400 Subject: [PATCH 2/2] add blurb --- .../Core and Builtins/2021-04-03-22-04-46.bpo-27129.u_ehHb.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-04-03-22-04-46.bpo-27129.u_ehHb.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-04-03-22-04-46.bpo-27129.u_ehHb.rst b/Misc/NEWS.d/next/Core and Builtins/2021-04-03-22-04-46.bpo-27129.u_ehHb.rst new file mode 100644 index 00000000000000..dc47bd08039cf5 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-04-03-22-04-46.bpo-27129.u_ehHb.rst @@ -0,0 +1 @@ +Update CPython bytecode magic number.