Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1585,17 +1585,6 @@ iterations of the loop.
``i`` is no longer offset by the length of :attr:`~codeobject.co_varnames`.


.. opcode:: DELETE_DEREF (i)

Empties the cell contained in slot ``i`` of the "fast locals" storage.
Used by the :keyword:`del` statement.

.. versionadded:: 3.2

.. versionchanged:: 3.11
``i`` is no longer offset by the length of :attr:`~codeobject.co_varnames`.


.. opcode:: COPY_FREE_VARS (n)

Copies the ``n`` :term:`free (closure) variables <closure variable>` from the closure
Expand Down
1 change: 1 addition & 0 deletions Doc/tools/removed-ids.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ c-api/threads.html: c.PyEval_InitThreads
faq/library.html: none-of-my-threads-seem-to-run-why
library/asyncio-task.html: terminating-a-task-group
library/dis.html: opcode-DELETE_ATTR
library/dis.html: opcode-DELETE_DEREF
Comment thread
StanFromIreland marked this conversation as resolved.
Resolved
library/dis.html: opcode-DELETE_GLOBAL
library/dis.html: opcode-DELETE_NAME
library/dis.html: opcode-GET_YIELD_FROM_ITER
Expand Down
8 changes: 8 additions & 0 deletions Doc/whatsnew/3.16.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,14 @@ uuid
(Contributed by Yury Selivanov in :gh:`139123`.)


CPython bytecode changes
========================

* Removed the :opcode:`!DELETE_DEREF` opcode. Deletion of closure variables
is now compiled as :opcode:`PUSH_NULL`, :opcode:`STORE_DEREF`.
(Contributed by Aleksandr Tseluyko in :gh:`145858`.)


Removed
========

Expand Down
3 changes: 2 additions & 1 deletion Include/internal/pycore_magic_number.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ Known values:
Python 3.16a1 3706 (Add INTRINSIC_MATCH_CLASS_ISINSTANCE)
Python 3.16a1 3707 (GET_AWAITABLE also pushes NULL and None for SEND)
Python 3.16a1 3708 (GET_ANEXT also pushes NULL and None for SEND)
Python 3.16a3 3709 (Remove DELETE_DEREF)

Python 3.17 will start with 3750

Expand All @@ -315,7 +316,7 @@ Known values:

*/

#define PYC_MAGIC_NUMBER 3708
#define PYC_MAGIC_NUMBER 3709
/* This is equivalent to converting PYC_MAGIC_NUMBER to 2 bytes
(little-endian) and then appending b'\r\n'. */
#define PYC_MAGIC_NUMBER_TOKEN \
Expand Down
12 changes: 3 additions & 9 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Include/internal/pycore_uop_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 1 addition & 16 deletions Include/internal/pycore_uop_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 57 additions & 58 deletions Include/opcode_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading