Skip to content

Commit c310d7c

Browse files
Drop nlocals from marshaled code objects.
1 parent 7e3a247 commit c310d7c

File tree

7 files changed

+4375
-4440
lines changed

7 files changed

+4375
-4440
lines changed

Lib/importlib/_bootstrap_external.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ def _write_atomic(path, data, mode=0o666):
354354
# Python 3.10b1 3439 (Add ROT_N)
355355
# Python 3.11a1 3450 Use exception table for unwinding ("zero cost" exception handling)
356356
# Python 3.11a1 3451 (Add CALL_METHOD_KW)
357+
# Python 3.11a1 3452 (drop nlocals from marshaled code objects)
357358

358359
#
359360
# MAGIC must change whenever the bytecode emitted by the compiler may no
@@ -363,7 +364,7 @@ def _write_atomic(path, data, mode=0o666):
363364
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
364365
# in PC/launcher.c must also be updated.
365366

366-
MAGIC_NUMBER = (3451).to_bytes(2, 'little') + b'\r\n'
367+
MAGIC_NUMBER = (3452).to_bytes(2, 'little') + b'\r\n'
367368
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
368369

369370
_PYCACHE = '__pycache__'

Programs/test_frozenmain.h

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/frozen_hello.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/* Auto-generated by Programs/_freeze_importlib.c */
22
const unsigned char _Py_M__hello[] = {
3-
99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
4-
0,2,0,0,0,64,0,0,0,115,16,0,0,0,100,0,
5-
90,0,101,1,100,1,131,1,1,0,100,2,83,0,41,3,
6-
84,122,12,72,101,108,108,111,32,119,111,114,108,100,33,78,
7-
41,2,90,11,105,110,105,116,105,97,108,105,122,101,100,218,
8-
5,112,114,105,110,116,169,0,114,1,0,0,0,114,1,0,
9-
0,0,122,14,60,102,114,111,122,101,110,32,104,101,108,108,
10-
111,62,218,8,60,109,111,100,117,108,101,62,1,0,0,0,
11-
115,4,0,0,0,4,0,12,1,243,0,0,0,0,
3+
99,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,
4+
0,64,0,0,0,115,16,0,0,0,100,0,90,0,101,1,
5+
100,1,131,1,1,0,100,2,83,0,41,3,84,122,12,72,
6+
101,108,108,111,32,119,111,114,108,100,33,78,41,2,90,11,
7+
105,110,105,116,105,97,108,105,122,101,100,218,5,112,114,105,
8+
110,116,169,0,114,1,0,0,0,114,1,0,0,0,122,14,
9+
60,102,114,111,122,101,110,32,104,101,108,108,111,62,218,8,
10+
60,109,111,100,117,108,101,62,1,0,0,0,115,4,0,0,
11+
0,4,0,12,1,243,0,0,0,0,
1212
};

0 commit comments

Comments
 (0)