[3.13] gh-126180: Remove getopt and optparse deprecation notices (GH-128191)

* Remove getopt and optparse deprecation notices
* Add new docs sections for command line app helper libraries
* Add guidance on choosing a CLI parsing library to the optparse docs
* Link to the new guidance from the argparse and getopt docs
* Reword intro in docs section for superseded stdlib modules
* Reframe the optparse->argparse guide as a migration guide
  rather than as an upgrade guide

---------
(cherry picked from commit 831b6de6d7)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-12-23 05:40:59 +01:00 committed by GitHub
parent 09d15aa9a8
commit 6f3c2c8d04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 266 additions and 65 deletions

View file

@ -11,6 +11,18 @@
**Source code:** :source:`Lib/argparse.py`
.. note::
While :mod:`argparse` is the default recommended standard library module
for implementing basic command line applications, authors with more
exacting requirements for exactly how their command line applications
behave may find it doesn't provide the necessary level of control.
Refer to :ref:`choosing-an-argument-parser` for alternatives to
consider when ``argparse`` doesn't support behaviors that the application
requires (such as entirely disabling support for interspersed options and
positional arguments, or accepting option parameter values that start
with ``-`` even when they correspond to another defined option).
--------------
.. sidebar:: Tutorial