Skip to content

Commit 8bee2a3

Browse files
authored
gh-145855: Remove the DELETE_ATTR bytecode (GH-146216)
1 parent db3a477 commit 8bee2a3

19 files changed

Lines changed: 990 additions & 1125 deletions

Doc/library/dis.rst

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,17 +1095,6 @@ iterations of the loop.
10951095
where *namei* is the index of name in :attr:`~codeobject.co_names` of the
10961096
:ref:`code object <code-objects>`.
10971097

1098-
.. opcode:: DELETE_ATTR (namei)
1099-
1100-
Implements::
1101-
1102-
obj = STACK.pop()
1103-
del obj.name
1104-
1105-
where *namei* is the index of name into :attr:`~codeobject.co_names` of the
1106-
:ref:`code object <code-objects>`.
1107-
1108-
11091098
.. opcode:: STORE_GLOBAL (namei)
11101099

11111100
Works as :opcode:`STORE_NAME`, but stores the name as a global.

Doc/tools/removed-ids.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ 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_ATTR
910
library/dis.html: opcode-DELETE_GLOBAL
1011
library/dis.html: opcode-DELETE_NAME
1112
library/asyncio-llapi-index.html: event-loop-policies

Include/internal/pycore_magic_number.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ Known values:
301301
Python 3.16a0 3701 (Add CONSTANT_EMPTY_TUPLE to LOAD_COMMON_CONSTANT)
302302
Python 3.16a1 3702 (Replace DELETE_NAME with PUSH_NULL; STORE_NAME)
303303
Python 3.16a1 3703 (Replace DELETE_GLOBAL with PUSH_NULL; STORE_GLOBAL)
304+
Python 3.16a1 3704 (Replace DELETE_ATTR with PUSH_NULL; STORE_ATTR)
304305
305306
306307
Python 3.17 will start with 3750
@@ -314,7 +315,7 @@ PC/launcher.c must also be updated.
314315
315316
*/
316317

317-
#define PYC_MAGIC_NUMBER 3703
318+
#define PYC_MAGIC_NUMBER 3704
318319
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
319320
(little-endian) and then appending b'\r\n'. */
320321
#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)