We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 508a81e commit b685515Copy full SHA for b685515
Misc/NEWS
@@ -14,6 +14,8 @@ Core and Builtins
14
Library
15
-------
16
17
+- Issue #25060: Correctly compute stack usage of the BUILD_MAP opcode.
18
+
19
- Issue #24857: Comparing call_args to a long sequence now correctly returns a
20
boolean result instead of raising an exception. Patch by A Kaptur.
21
Python/compile.c
@@ -985,7 +985,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
985
case BUILD_MAP_UNPACK_WITH_CALL:
986
return 1 - (oparg & 0xFF);
987
case BUILD_MAP:
988
- return 1;
+ return 1 - 2*oparg;
989
case LOAD_ATTR:
990
return 0;
991
case COMPARE_OP:
Python/importlib_external.h
@@ -1395,7 +1395,7 @@ const unsigned char _Py_M__importlib_external[] = {
1395
32,83,111,117,114,99,101,76,111,97,100,101,114,32,117,115,
1396
105,110,103,32,116,104,101,32,102,105,108,101,32,115,121,115,
1397
116,101,109,46,99,2,0,0,0,0,0,0,0,3,0,0,
1398
- 0,5,0,0,0,67,0,0,0,115,34,0,0,0,116,0,
+ 0,4,0,0,0,67,0,0,0,115,34,0,0,0,116,0,
1399
0,124,1,0,131,1,0,125,2,0,100,1,0,124,2,0,
1400
106,1,0,100,2,0,124,2,0,106,2,0,105,2,0,83,
1401
41,3,122,33,82,101,116,117,114,110,32,116,104,101,32,109,
0 commit comments