Skip to content

Commit c393ab6

Browse files
authored
gh-145854: Replace DELETE_NAME with PUSH_NULL; STORE_NAME (GH-146006)
1 parent f1c5363 commit c393ab6

22 files changed

Lines changed: 1019 additions & 1192 deletions

Doc/library/dis.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,12 +1056,6 @@ iterations of the loop.
10561056
The compiler tries to use :opcode:`STORE_FAST` or :opcode:`STORE_GLOBAL` if possible.
10571057

10581058

1059-
.. opcode:: DELETE_NAME (namei)
1060-
1061-
Implements ``del name``, where *namei* is the index into :attr:`~codeobject.co_names`
1062-
attribute of the :ref:`code object <code-objects>`.
1063-
1064-
10651059
.. opcode:: UNPACK_SEQUENCE (count)
10661060

10671061
Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the stack
@@ -1119,7 +1113,7 @@ iterations of the loop.
11191113

11201114
.. opcode:: DELETE_GLOBAL (namei)
11211115

1122-
Works as :opcode:`DELETE_NAME`, but deletes a global name.
1116+
Deletes a global name.
11231117

11241118

11251119
.. opcode:: LOAD_CONST (consti)

Doc/tools/removed-ids.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ c-api/file.html: deprecated-api
66

77
# Removed sections
88
library/asyncio-task.html: terminating-a-task-group
9+
library/dis.html: opcode-DELETE_NAME
910
library/asyncio-llapi-index.html: event-loop-policies
11+
1012
deprecations/index.html: pending-removal-in-python-3-15
1113
deprecations/index.html: pending-removal-in-python-3-16
1214
deprecations/index.html: c-api-pending-removal-in-python-3-15

Include/internal/pycore_ceval.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ PyAPI_FUNC(PyObject *) _PyEval_LoadName(PyThreadState *tstate, _PyInterpreterFra
329329
PyAPI_FUNC(int)
330330
_Py_Check_ArgsIterable(PyThreadState *tstate, PyObject *func, PyObject *args);
331331
PyAPI_FUNC(_PyStackRef) _PyEval_GetIter(_PyStackRef iterable, _PyStackRef *null_or_index, int yield_from);
332+
PyAPI_FUNC(int) _PyEval_StoreName(PyThreadState *tstate, _PyStackRef v, PyObject *name, PyObject* ns);
332333

333334
/*
334335
* Indicate whether a special method of given 'oparg' can use the (improved)

Include/internal/pycore_magic_number.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ Known values:
299299
Python 3.15b1 3666 (Add SEND_VIRTUAL and SEND_ASYNC_GEN specializations)
300300
Python 3.16a0 3700 (Initial version)
301301
Python 3.16a0 3701 (Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT)
302+
Python 3.16a1 3702 (Replace DELETE_NAME with PUSH_NULL; STORE_NAME)
302303
303304
304305
Python 3.17 will start with 3750
@@ -312,7 +313,7 @@ PC/launcher.c must also be updated.
312313
313314
*/
314315

315-
#define PYC_MAGIC_NUMBER 3701
316+
#define PYC_MAGIC_NUMBER 3702
316317
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
317318
(little-endian) and then appending b'\r\n'. */
318319
#define PYC_MAGIC_NUMBER_TOKEN \

Include/internal/pycore_opcode_metadata.h

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

0 commit comments

Comments
 (0)