From b14f4e77a1ee59b2ac9541737f1b8a718c668512 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Sat, 25 May 2024 16:48:58 +0300 Subject: [PATCH] PEP 594: Re-link removed batteries to last included version (#3778) --- Makefile | 4 +- peps/conf.py | 9 ++++ peps/pep-0594.rst | 120 +++++++++++++++++----------------------------- 3 files changed, 55 insertions(+), 78 deletions(-) diff --git a/Makefile b/Makefile index 6ed81ca8b..9862ebed7 100644 --- a/Makefile +++ b/Makefile @@ -39,8 +39,8 @@ dirhtml: html ## linkcheck to check validity of links within PEP sources .PHONY: linkcheck -check-links: BUILDER = linkcheck -check-links: html +linkcheck: BUILDER = linkcheck +linkcheck: html ## check-links (deprecated: use 'make linkcheck' alias instead) .PHONY: pages diff --git a/peps/conf.py b/peps/conf.py index d8e851a50..26e4d07b8 100644 --- a/peps/conf.py +++ b/peps/conf.py @@ -20,6 +20,7 @@ master_doc = "contents" # Add any Sphinx extension module names here, as strings. extensions = [ "pep_sphinx_extensions", + "sphinx.ext.extlinks", "sphinx.ext.intersphinx", "sphinx.ext.githubpages", ] @@ -59,6 +60,14 @@ intersphinx_mapping = { } intersphinx_disabled_reftypes = [] +# sphinx.ext.extlinks +# This config is a dictionary of external sites, +# mapping unique short aliases to a base URL and a prefix. +# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html +extlinks = { + "pypi": ("https://pypi.org/project/%s/", "%s"), +} + # -- Options for HTML output ------------------------------------------------- _PSE_PATH = _ROOT / "pep_sphinx_extensions" diff --git a/peps/pep-0594.rst b/peps/pep-0594.rst index 78de4cca0..fa334c456 100644 --- a/peps/pep-0594.rst +++ b/peps/pep-0594.rst @@ -5,7 +5,6 @@ Author: Christian Heimes , Discussions-To: https://discuss.python.org/t/13508 Status: Final Type: Standards Track -Content-Type: text/x-rst Created: 20-May-2019 Python-Version: 3.11 Post-History: 21-May-2019, 04-Feb-2022 @@ -137,47 +136,28 @@ audio processing. :widths: 2, 1, 1, 1, 1, 2 aifc,3.11 (3.0\*),3.13,1993,**yes (inactive)**,\- - asynchat,**3.6** (3.0\*),3.12,1999,**yes**,asyncio_ - asyncore,**3.6** (3.0\*),3.12,1999,**yes**,asyncio_ + asynchat,**3.6** (3.0\*),3.12,1999,**yes**,:mod:`asyncio` + asyncore,**3.6** (3.0\*),3.12,1999,**yes**,:mod:`asyncio` audioop,3.11 (3.0\*),3.13,1992,**yes**,\- cgi,3.11 (2.0\*\*),3.13,1995,no,\- cgitb,3.11 (2.0\*\*),3.13,1995,no,\- chunk,3.11,3.13,1999,no,\- - crypt,3.11,3.13,1994,**yes (inactive)**,"legacycrypt_, bcrypt_, argon2-cffi_, hashlib_, passlib_" - imghdr,3.11,3.13,1992,no,"filetype_, puremagic_, python-magic_" + crypt,3.11,3.13,1994,**yes (inactive)**,":pypi:`legacycrypt`, :pypi:`bcrypt`, :pypi:`argon2-cffi`, :mod:`hashlib`, :pypi:`passlib`" + imghdr,3.11,3.13,1992,no,":pypi:`filetype`, :pypi:`puremagic`, :pypi:`python-magic`" mailcap,3.11,3.13,1995,no,\- msilib,3.11,3.13,2006,no,\- nntplib,3.11,3.13,1992,no,\- nis,3.11 (3.0\*),3.13,1992,no,\- ossaudiodev,3.11,3.13,2002,no,\- - pipes,3.11,3.13,1992,no,"subprocess_" - smtpd,"**3.4.7**, **3.5.4**",3.12,2001,**yes**,"aiosmtpd_" - sndhdr,3.11,3.13,1994,no,"filetype_, puremagic_, python-magic_" - spwd,3.11,3.13,2005,no,"python-pam_" + pipes,3.11,3.13,1992,no,:mod:`subprocess` + smtpd,"**3.4.7**, **3.5.4**",3.12,2001,**yes**,:pypi:`aiosmtpd` + sndhdr,3.11,3.13,1994,no,":pypi:`filetype`, :pypi:`puremagic`, :pypi:`python-magic`" + spwd,3.11,3.13,2005,no,:pypi:`python-pam` sunau,3.11 (3.0\*),3.13,1993,no,\- - telnetlib,3.11 (3.0\*),3.13,1997,no,"telnetlib3_, Exscript_" + telnetlib,3.11 (3.0\*),3.13,1997,no,":pypi:`telnetlib3`, :pypi:`Exscript`" uu,3.11,3.13,1994,no,\- xdrlib,3.11,3.13,1992/1996,no,\- -.. _aiosmtpd: https://pypi.org/project/aiosmtpd/ -.. _argon2-cffi: https://pypi.org/project/argon2-cffi/ -.. _ast: https://docs.python.org/3/library/ast.html -.. _astroid: https://pypi.org/project/astroid/ -.. _asyncio: https://docs.python.org/3/library/asyncio.html -.. _bcrypt: https://pypi.org/project/bcrypt/ -.. _Exscript: https://pypi.org/project/Exscript/ -.. _filetype: https://pypi.org/project/filetype/ -.. _hashlib: https://docs.python.org/3/library/hashlib.html -.. _importlib: https://docs.python.org/3/library/importlib.html -.. _legacycrypt: https://pypi.org/project/legacycrypt/ -.. _passlib: https://pypi.org/project/passlib/ -.. _puremagic: https://pypi.org/project/puremagic/ -.. _python-magic: https://pypi.org/project/python-magic/ -.. _python-pam: https://pypi.org/project/python-pam/ -.. _simplepam: https://pypi.org/project/simplepam/ -.. _subprocess: https://docs.python.org/3/library/subprocess.html -.. _telnetlib3: https://pypi.org/project/telnetlib3/ - Some module deprecations proposed by :pep:`3108` for 3.0 and :pep:`206` for 2.0. The *added in* column illustrates, when a module was originally designed and added to the standard library. The *has maintainer* column refers to the @@ -192,7 +172,7 @@ Data encoding modules uu and the uu encoding ~~~~~~~~~~~~~~~~~~~~~~ -The `uu `_ module provides +The :external+py3.12:mod:`uu` module provides uuencode format, an old binary encoding format for email from 1980. The uu format has been replaced by MIME. The uu codec is provided by the ``binascii`` module. There's also ``encodings/uu_codec.py`` which is a codec for the @@ -202,7 +182,7 @@ same encoding; it should also be deprecated. xdrlib ~~~~~~ -The `xdrlib `_ module supports +The :external+py3.12:mod:`xdrlib` module supports the Sun External Data Representation Standard. XDR is an old binary serialization format from 1987. These days it's rarely used outside specialized domains like NFS. @@ -214,7 +194,7 @@ Multimedia modules aifc ~~~~ -The `aifc `_ module provides +The :external+py3.12:mod:`aifc` module provides support for reading and writing AIFF and AIFF-C files. The Audio Interchange File Format is an old audio format from 1988 based on Amiga IFF. It was most commonly used on the Apple Macintosh. These days only few specialized @@ -231,7 +211,7 @@ maintenance. The strategic benefits for Python may outmatch the burden. audioop ~~~~~~~ -The `audioop `_ module +The :external+py3.12:mod:`audioop` module contains helper functions to manipulate raw audio data and adaptive differential pulse-code modulated audio data. The module is implemented in C without any additional dependencies. The `aifc`_, `sunau`_, and `wave`_ @@ -247,7 +227,7 @@ e.g. ``_audioop`` with ``byteswap``, ``alaw2lin``, ``ulaw2lin``, ``lin2alaw``, chunk ~~~~~ -The `chunk `_ module provides +The :external+py3.12:mod:`chunk` module provides support for reading and writing Electronic Arts' Interchange File Format. IFF is an old audio file format originally introduced for Commodore and Amiga. The format is no longer relevant. @@ -256,7 +236,7 @@ Amiga. The format is no longer relevant. imghdr ~~~~~~ -The `imghdr `_ module is a +The :external+py3.12:mod:`imghdr` module is a simple tool to guess the image file format from the first 32 bytes of a file or buffer. It supports only a limited number of formats and neither returns resolution nor color depth. @@ -265,7 +245,7 @@ neither returns resolution nor color depth. ossaudiodev ~~~~~~~~~~~ -The `ossaudiodev `_ +The :external+py3.12:mod:`ossaudiodev` module provides support for Open Sound System, an interface to sound playback and capture devices. OSS was initially free software, but later support for newer sound devices and improvements were proprietary. Linux @@ -287,7 +267,7 @@ were removed in 2007 as part of the :pep:`3108` stdlib re-organization. sndhdr ~~~~~~ -The `sndhdr `_ module is +The :external+py3.12:mod:`sndhdr` module is similar to the `imghdr`_ module but for audio formats. It guesses file format, channels, frame rate, and sample widths from the first 512 bytes of a file or buffer. The module only supports AU, AIFF, HCOM, VOC, WAV, and @@ -297,7 +277,7 @@ other ancient formats. sunau ~~~~~ -The `sunau `_ module provides +The :external+py3.12:mod:`sunau` module provides support for Sun AU sound format. It's yet another old, obsolete file format. @@ -307,14 +287,14 @@ Networking modules asynchat ~~~~~~~~ -The `asynchat `_ module -is built on top of `asyncore`_ and has been deprecated since Python 3.6. +The :external+py3.11:mod:`asynchat` module is built on top of +:external+py3.11:mod:`asyncore` and has been deprecated since Python 3.6. asyncore ~~~~~~~~ -The `asyncore `_ module was +The :external+py3.11:mod:`asyncore` module was the first module for asynchronous socket service clients and servers. It has been replaced by asyncio and is deprecated since Python 3.6. @@ -327,7 +307,7 @@ threading. cgi ~~~ -The `cgi `_ module is a support +The :external+py3.12:mod:`cgi` module is a support module for Common Gateway Interface (CGI) scripts. CGI is deemed as inefficient because every incoming request is handled in a new process. :pep:`206` considers the module as: @@ -341,8 +321,7 @@ related to executing code are: - ``parse_header`` with ``email.message.Message`` (see example below) - ``parse_multipart`` with ``email.message.Message`` (same MIME RFCs) - ``FieldStorage``/``MiniFieldStorage`` has no direct replacement, but can - typically be replaced by using `multipart - `_ (for ``POST`` and ``PUT`` + typically be replaced by using :pypi:`multipart` (for ``POST`` and ``PUT`` requests) or ``urllib.parse.parse_qsl`` (for ``GET`` and ``HEAD`` requests) - ``valid_boundary`` (undocumented) with ``re.compile("^[ -~]{0,200}[!-~]$")`` @@ -367,7 +346,7 @@ As an explicit example of how close ``parse_header`` and cgitb ~~~~~ -The `cgitb `_ module is a +The :external+py3.12:mod:`cgitb` module is a helper for the ``cgi`` module for configurable tracebacks. The ``cgitb`` module is not used by any major Python web framework (Django, @@ -378,7 +357,7 @@ optional debugging middleware. smtpd ~~~~~ -The `smtpd `_ module provides +The :external+py3.11:mod:`smtpd` module provides a simple implementation of a SMTP mail server. The module documentation marks the module as deprecated and recommends ``aiosmtpd`` instead. The deprecation message was added in releases 3.4.7, 3.5.4, and 3.6.1. @@ -387,12 +366,12 @@ deprecation message was added in releases 3.4.7, 3.5.4, and 3.6.1. nntplib ~~~~~~~ -The `nntplib `_ module +The :external+py3.12:mod:`nntplib` module implements the client side of the Network News Transfer Protocol (nntp). News groups used to be a dominant platform for online discussions. Over the last two decades, news has been slowly but steadily replaced with mailing lists and web-based discussion platforms. Twisted is also -`planning `_ to deprecate NNTP +`planning `_ to deprecate NNTP support and `pynntp `_ hasn't seen any activity since 2014. This is a good indicator that the public interest in NNTP support is declining. @@ -407,7 +386,7 @@ buildbots. telnetlib ~~~~~~~~~ -The `telnetlib `_ module +The :external+py3.12:mod:`telnetlib` module provides a Telnet class that implements the Telnet protocol. @@ -417,7 +396,7 @@ Operating system interface crypt ~~~~~ -The `crypt `_ module implements +The :external+py3.12:mod:`crypt` module implements password hashing based on the ``crypt(3)`` function from ``libcrypt`` or ``libxcrypt`` on Unix-like platforms. The algorithms are mostly old, of poor quality and insecure. Users are discouraged from using them. @@ -441,7 +420,7 @@ quality and insecure. Users are discouraged from using them. nis ~~~ -The `nis `_ module provides +The :external+py3.12:mod:`nis` module provides NIS/YP support. Network Information Service / Yellow Pages is an old and deprecated directory service protocol developed by Sun Microsystems. Its designed successor NIS+ from 1992 never took off. For a long time, libc's @@ -452,7 +431,7 @@ and more secure replacement for NIS. spwd ~~~~ -The `spwd `_ module provides +The :external+py3.12:mod:`spwd` module provides direct access to Unix shadow password database using non-standard APIs. In general, it's a bad idea to use ``spwd``. It circumvents system @@ -462,7 +441,7 @@ module for access control must be considered a *security bug*, as it bypasses PAM's access control. Furthermore, the ``spwd`` module uses the -`shadow(3) `_ APIs. +`shadow(3) `_ APIs. Functions like ``getspnam(3)`` access the ``/etc/shadow`` file directly. This is dangerous and even forbidden for confined services on systems with a security engine like SELinux or AppArmor. @@ -474,7 +453,7 @@ Misc modules mailcap ~~~~~~~ -The `mailcap `__ package +The :external+py3.12:mod:`mailcap` package reads *mail capability* files to assist in handling a file attachment in an email. In most modern operating systems the email client itself handles reacting to file attachments. Operating systems also have their own way to register @@ -486,7 +465,7 @@ against it while having no maintainer to help fix it. msilib ~~~~~~ -The `msilib `_ package is a +The :external+py3.12:mod:`msilib` package is a Windows-only package. It supports the creation of Microsoft Installers (MSI). The package also exposes additional APIs to create cabinet files (CAB). The module is used to facilitate distutils to create MSI installers with the @@ -500,10 +479,10 @@ as a new deployment model [3]_. pipes ~~~~~ -The `pipes `_ module provides +The :external+py3.12:mod:`pipes` module provides helpers to pipe the input of one command into the output of another command. The module is built on top of ``os.popen``. Users are encouraged to use -the ``subprocess`` module instead. +the :mod:`subprocess` module instead. Modules to keep @@ -525,7 +504,7 @@ listed as such in this PEP. colorsys -------- -The `colorsys `_ module +The :external+py3.12:mod:`colorsys` module defines color conversion functions between RGB, YIQ, HSL, and HSV coordinate systems. @@ -542,7 +521,7 @@ between color systems. fileinput --------- -The `fileinput `_ module +The :external+py3.12:mod:`fileinput` module implements helpers to iterate over a list of files from ``sys.argv``. The module predates the ``optparse`` and ``argparse`` modules. The same functionality can be implemented with the ``argparse`` module. @@ -554,7 +533,7 @@ standard library, as it is handy for quick scripts. getopt ------ -The `getopt `_ module mimics +The :external+py3.12:mod:`getopt` module mimics C's ``getopt()`` option parser. Although users are encouraged to use ``argparse`` instead, the ``getopt`` module is @@ -565,7 +544,7 @@ to write simple Python scripts. optparse -------- -The `optparse `_ module is +The :external+py3.12:mod:`optparse` module is the predecessor of the ``argparse`` module. Although it has been deprecated for many years, it's still too widely used @@ -575,7 +554,7 @@ to remove it. wave ---- -The `wave `_ module provides +The :external+py3.12:mod:`wave` module provides support for the WAV sound format. The module is not deprecated, because the WAV format is still relevant these @@ -674,11 +653,11 @@ Update 4 References ========== -.. [1] https://en.wikipedia.org/wiki/Open_Sound_System#Free,_proprietary,_free +.. [1] https://en.wikipedia.org/wiki/Open_Sound_System#History .. [2] https://man.openbsd.org/ossaudio -.. [3] https://blogs.msmvps.com/installsite/blog/2015/05/03/the-future-of-windows-installer-msi-in-the-light-of-windows-10-and-the-universal-windows-platform/ +.. [3] https://web.archive.org/web/20221206204209/https://blogs.msmvps.com/installsite/blog/2015/05/03/the-future-of-windows-installer-msi-in-the-light-of-windows-10-and-the-universal-windows-platform/ .. [4] https://twitter.com/ChristianHeimes/status/1130257799475335169 -.. [5] https://twitter.com/dabeaz/status/1130278844479545351 +.. [5] https://web.archive.org/web/20220420154535/https://twitter.com/dabeaz/status/1130278844479545351 .. [6] https://mail.python.org/pipermail/python-dev/2019-May/157634.html @@ -687,14 +666,3 @@ Copyright This document is placed in the public domain or under the CC0-1.0-Universal license, whichever is more permissive. - - - -.. - Local Variables: - mode: indented-text - indent-tabs-mode: nil - sentence-end-double-space: t - fill-column: 70 - coding: utf-8 - End: