Skip to content

Commit d524b6f

Browse files
authored
gh-106535: Document PEP 387 Soft Deprecation (#106536)
Mark the optparse module as soft deprecated.
1 parent 1fb9bd2 commit d524b6f

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Doc/glossary.rst

+15
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,21 @@ Glossary
11071107
when several are given, such as in ``variable_name[1:3:5]``. The bracket
11081108
(subscript) notation uses :class:`slice` objects internally.
11091109

1110+
soft deprecated
1111+
A soft deprecation can be used when using an API which should no longer
1112+
be used to write new code, but it remains safe to continue using it in
1113+
existing code. The API remains documented and tested, but will not be
1114+
developed further (no enhancement).
1115+
1116+
The main difference between a "soft" and a (regular) "hard" deprecation
1117+
is that the soft deprecation does not imply scheduling the removal of the
1118+
deprecated API.
1119+
1120+
Another difference is that a soft deprecation does not issue a warning.
1121+
1122+
See `PEP 387: Soft Deprecation
1123+
<https://peps.python.org/pep-0387/#soft-deprecation>`_.
1124+
11101125
special method
11111126
.. index:: pair: special; method
11121127

Doc/library/optparse.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
**Source code:** :source:`Lib/optparse.py`
1212

1313
.. deprecated:: 3.2
14-
The :mod:`optparse` module is deprecated and will not be developed further;
15-
development will continue with the :mod:`argparse` module.
14+
The :mod:`optparse` module is :term:`soft deprecated` and will not be
15+
developed further; development will continue with the :mod:`argparse`
16+
module.
1617

1718
--------------
1819

0 commit comments

Comments
 (0)