summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorKirill Podoprigora <kirill.bast9@mail.ru>2024-08-25 19:24:44 (GMT)
committerGitHub <noreply@github.com>2024-08-25 19:24:44 (GMT)
commit249b083ed8b3cfdff30bf578d7f9d3c5e982a4eb (patch)
tree60922256a991d66cc91d22f79e6d1a53973ed423 /Doc
parent625d0705b9ab348f85853ed73b796763b70154a5 (diff)
downloadcpython-249b083ed8b3cfdff30bf578d7f9d3c5e982a4eb.zip
cpython-249b083ed8b3cfdff30bf578d7f9d3c5e982a4eb.tar.gz
cpython-249b083ed8b3cfdff30bf578d7f9d3c5e982a4eb.tar.bz2
gh-122982: Extend the deprecation period for bool inversion by two years (#123306)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/deprecations/pending-removal-in-3.16.rst3
-rw-r--r--Doc/deprecations/pending-removal-in-future.rst1
-rw-r--r--Doc/library/stdtypes.rst2
-rw-r--r--Doc/whatsnew/3.12.rst2
4 files changed, 5 insertions, 3 deletions
diff --git a/Doc/deprecations/pending-removal-in-3.16.rst b/Doc/deprecations/pending-removal-in-3.16.rst
index de134f8..e50e3fc 100644
--- a/Doc/deprecations/pending-removal-in-3.16.rst
+++ b/Doc/deprecations/pending-removal-in-3.16.rst
@@ -5,6 +5,9 @@ Pending Removal in Python 3.16
:class:`array.array` ``'u'`` type (:c:type:`wchar_t`):
use the ``'w'`` type instead (``Py_UCS4``).
+* :mod:`builtins`:
+ ``~bool``, bitwise inversion on bool.
+
* :mod:`symtable`:
Deprecate :meth:`symtable.Class.get_methods` due to the lack of interest.
(Contributed by Bénédikt Tran in :gh:`119698`.)
diff --git a/Doc/deprecations/pending-removal-in-future.rst b/Doc/deprecations/pending-removal-in-future.rst
index 6942b9d..ae33236 100644
--- a/Doc/deprecations/pending-removal-in-future.rst
+++ b/Doc/deprecations/pending-removal-in-future.rst
@@ -11,7 +11,6 @@ although there is currently no date scheduled for their removal.
* :mod:`builtins`:
- * ``~bool``, bitwise inversion on bool.
* ``bool(NotImplemented)``.
* Generators: ``throw(type, exc, tb)`` and ``athrow(type, exc, tb)``
signature is deprecated: use ``throw(exc)`` and ``athrow(exc)`` instead,
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 01121fe..088735b 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -868,7 +868,7 @@ over ``&``, ``|`` and ``^``.
.. deprecated:: 3.12
The use of the bitwise inversion operator ``~`` is deprecated and will
- raise an error in Python 3.14.
+ raise an error in Python 3.16.
:class:`bool` is a subclass of :class:`int` (see :ref:`typesnumeric`). In
many numeric contexts, ``False`` and ``True`` behave like the integers 0 and 1, respectively.
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 3821ee3..a240c1f 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -1319,7 +1319,7 @@ Deprecated
(Contributed by Brett Cannon in :gh:`65961`.)
* The bitwise inversion operator (``~``) on bool is deprecated. It will throw an
- error in Python 3.14. Use ``not`` for logical negation of bools instead.
+ error in Python 3.16. Use ``not`` for logical negation of bools instead.
In the rare case that you really need the bitwise inversion of the underlying
``int``, convert to int explicitly: ``~int(x)``. (Contributed by Tim Hoffmann
in :gh:`103487`.)