From 2f1d0a6d4134e2198f3d890edd5e11dce6cea5bb Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Tue, 12 Sep 2023 16:45:35 +0100 Subject: [PATCH] gh-109319: deprecate dis.HAVE_ARGUMENT (#109320) --- Doc/library/dis.rst | 2 ++ Doc/whatsnew/3.13.rst | 5 +++++ .../Library/2023-09-12-13-01-55.gh-issue-109319.YaCMtW.rst | 1 + 3 files changed, 8 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2023-09-12-13-01-55.gh-issue-109319.YaCMtW.rst diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index d929242ede743d4..72e55cd81d42f6c 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1623,6 +1623,8 @@ iterations of the loop. it is not true that comparison with ``HAVE_ARGUMENT`` indicates whether they use their arg. + .. deprecated:: 3.13 + Use :data:`hasarg` instead. .. opcode:: CALL_INTRINSIC_1 diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 8c6467562aeb622..c18e15e0448f050 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -301,6 +301,11 @@ Deprecated (Contributed by Erlend E. Aasland in :gh:`107948` and :gh:`108278`.) +* The ``dis.HAVE_ARGUMENT`` separator is deprecated. Check membership + in :data:`~dis.hasarg` instead. + (Contributed by Irit Katriel in :gh:`109319`.) + + Pending Removal in Python 3.14 ------------------------------ diff --git a/Misc/NEWS.d/next/Library/2023-09-12-13-01-55.gh-issue-109319.YaCMtW.rst b/Misc/NEWS.d/next/Library/2023-09-12-13-01-55.gh-issue-109319.YaCMtW.rst new file mode 100644 index 000000000000000..d3cd86b040821a5 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-09-12-13-01-55.gh-issue-109319.YaCMtW.rst @@ -0,0 +1 @@ +Deprecate the ``dis.HAVE_ARGUMENT`` field in favour of ``dis.hasarg``.