Skip to content

gh-106535: Document PEP 387 Soft Deprecation #106536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2023
Merged
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
15 changes: 15 additions & 0 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,21 @@ Glossary
when several are given, such as in ``variable_name[1:3:5]``. The bracket
(subscript) notation uses :class:`slice` objects internally.

soft deprecated
A soft deprecation can be used when using an API which should no longer
be used to write new code, but it remains safe to continue using it in
existing code. The API remains documented and tested, but will not be
developed further (no enhancement).

The main difference between a "soft" and a (regular) "hard" deprecation
is that the soft deprecation does not imply scheduling the removal of the
deprecated API.

Another difference is that a soft deprecation does not issue a warning.

See `PEP 387: Soft Deprecation
<https://peps.python.org/pep-0387/#soft-deprecation>`_.

special method
.. index:: pair: special; method

Expand Down
5 changes: 3 additions & 2 deletions Doc/library/optparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
**Source code:** :source:`Lib/optparse.py`

.. deprecated:: 3.2
The :mod:`optparse` module is deprecated and will not be developed further;
development will continue with the :mod:`argparse` module.
The :mod:`optparse` module is :term:`soft deprecated` and will not be
developed further; development will continue with the :mod:`argparse`
module.
Comment on lines +14 to +16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This claim remains in blatant contradiction with the conclusion of #53580 that “argparse is very difficult to change without risk of breaking many existing tools that depend on argparse working exactly the way it does now”.

If argparse has become too difficult to change, even to fix known parsing bugs, then either argparse should be soft-deprecated for the same reason as optparse, or optparse should be un-soft-deprecated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the optparse soft deprecation should be reversed because of how argparse is.


--------------

Expand Down