Skip to content

Commit bfbe4b7

Browse files
committed
Deprecate for recommended five years
1 parent 7b13a13 commit bfbe4b7

File tree

19 files changed

+56
-34
lines changed

19 files changed

+56
-34
lines changed

Doc/deprecations/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ Deprecations
77

88
.. include:: pending-removal-in-3.17.rst
99

10+
.. include:: pending-removal-in-3.18.rst
11+
1012
.. include:: pending-removal-in-3.19.rst
1113

14+
.. include:: pending-removal-in-3.20.rst
15+
1216
.. include:: pending-removal-in-future.rst
1317

1418
C API deprecations

Doc/deprecations/pending-removal-in-3.17.rst

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,3 @@ Pending removal in Python 3.17
2121
:class:`~collections.abc.Buffer`. For use in type annotations, prefer a union, like
2222
``bytes | bytearray``, or :class:`collections.abc.Buffer`.
2323
(Contributed by Shantanu Jain in :gh:`91896`.)
24-
25-
* The ``__version__`` attribute has been deprecated in these standard library
26-
modules and will be removed in Python 3.17.
27-
Use :py:data:`sys.version_info` instead.
28-
29-
- :mod:`argparse`
30-
- :mod:`csv`
31-
- :mod:`!ctypes.macholib`
32-
- :mod:`ipaddress`
33-
- :mod:`json`
34-
- :mod:`logging` (``__date__`` also deprecated)
35-
- :mod:`optparse`
36-
- :mod:`pickle`
37-
- :mod:`platform`
38-
- :mod:`re`
39-
- :mod:`socketserver`
40-
- :mod:`tabnanny`
41-
- :mod:`tkinter.font`
42-
- :mod:`tkinter.ttk`
43-
44-
(Contributed by Hugo van Kemenade in :gh:`76007`.)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Pending removal in Python 3.20
2+
------------------------------
3+
4+
* The ``__version__`` attribute has been deprecated in these standard library
5+
modules and will be removed in Python 3.20.
6+
Use :py:data:`sys.version_info` instead.
7+
8+
- :mod:`argparse`
9+
- :mod:`csv`
10+
- :mod:`!ctypes.macholib`
11+
- :mod:`ipaddress`
12+
- :mod:`json`
13+
- :mod:`logging` (``__date__`` also deprecated)
14+
- :mod:`optparse`
15+
- :mod:`pickle`
16+
- :mod:`platform`
17+
- :mod:`re`
18+
- :mod:`socketserver`
19+
- :mod:`tabnanny`
20+
- :mod:`tkinter.font`
21+
- :mod:`tkinter.ttk`
22+
23+
(Contributed by Hugo van Kemenade in :gh:`76007`.)

Doc/whatsnew/3.12.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,12 @@ Deprecated
13491349

13501350
.. include:: ../deprecations/pending-removal-in-3.17.rst
13511351

1352+
.. include:: ../deprecations/pending-removal-in-3.18.rst
1353+
1354+
.. include:: ../deprecations/pending-removal-in-3.19.rst
1355+
1356+
.. include:: ../deprecations/pending-removal-in-3.20.rst
1357+
13521358
.. include:: ../deprecations/pending-removal-in-future.rst
13531359

13541360
.. _whatsnew312-removed:

Doc/whatsnew/3.13.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,6 +2026,12 @@ New Deprecations
20262026

20272027
.. include:: ../deprecations/pending-removal-in-3.17.rst
20282028

2029+
.. include:: ../deprecations/pending-removal-in-3.18.rst
2030+
2031+
.. include:: ../deprecations/pending-removal-in-3.19.rst
2032+
2033+
.. include:: ../deprecations/pending-removal-in-3.20.rst
2034+
20292035
.. include:: ../deprecations/pending-removal-in-future.rst
20302036

20312037
CPython Bytecode Changes

Doc/whatsnew/3.14.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2794,6 +2794,8 @@ Deprecated
27942794

27952795
.. include:: ../deprecations/pending-removal-in-3.19.rst
27962796

2797+
.. include:: ../deprecations/pending-removal-in-3.20.rst
2798+
27972799
.. include:: ../deprecations/pending-removal-in-future.rst
27982800

27992801

Doc/whatsnew/3.15.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ __version__
573573
-----------
574574

575575
* The ``__version__`` attribute has been deprecated in these standard library
576-
modules and will be removed in Python 3.17.
576+
modules and will be removed in Python 3.20.
577577
Use :py:data:`sys.version_info` instead.
578578

579579
- :mod:`argparse`
@@ -601,6 +601,8 @@ __version__
601601

602602
.. include:: ../deprecations/pending-removal-in-3.19.rst
603603

604+
.. include:: ../deprecations/pending-removal-in-3.20.rst
605+
604606
.. include:: ../deprecations/pending-removal-in-future.rst
605607

606608
Removed

Lib/argparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2778,6 +2778,6 @@ def __getattr__(name):
27782778
if name == "__version__":
27792779
from warnings import _deprecated
27802780

2781-
_deprecated("__version__", remove=(3, 17))
2781+
_deprecated("__version__", remove=(3, 20))
27822782
return "1.1" # Do not change
27832783
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

Lib/csv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,6 @@ def __getattr__(name):
515515
if name == "__version__":
516516
from warnings import _deprecated
517517

518-
_deprecated("__version__", remove=(3, 17))
518+
_deprecated("__version__", remove=(3, 20))
519519
return "1.0" # Do not change
520520
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

Lib/ipaddress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2422,6 +2422,6 @@ def __getattr__(name):
24222422
if name == "__version__":
24232423
from warnings import _deprecated
24242424

2425-
_deprecated("__version__", remove=(3, 17))
2425+
_deprecated("__version__", remove=(3, 20))
24262426
return "1.0" # Do not change
24272427
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

0 commit comments

Comments
 (0)