PEP 594: Apply typofixes & language tweaks (#2334)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
This commit is contained in:
Brian Skinn 2022-02-16 17:22:28 -05:00 committed by GitHub
parent f7bba0160b
commit fc3eb216e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 20 deletions

View File

@ -267,7 +267,7 @@ The `ossaudiodev <https://docs.python.org/3/library/ossaudiodev.html>`_
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
community abandoned OSS in favor of ALSA [1]_. Some operation systems like
community abandoned OSS in favor of ALSA [1]_. Some operating systems like
OpenBSD and NetBSD provide an incomplete [2]_ emulation of OSS.
To best of my knowledge, FreeBSD is the only widespread operating system
@ -278,7 +278,7 @@ for both FreeBSD community and core development, if the module would be
maintained and distributed by people that care for it and use it.
The standard library used to have more audio-related modules. The other
audio device interface (``audiodev``, ``linuxaudiodev``, ``sunaudiodev``)
audio device interfaces (``audiodev``, ``linuxaudiodev``, ``sunaudiodev``)
were removed in 2007 as part of the :pep:`3108` stdlib re-organization.
@ -396,8 +396,8 @@ activity since 2014. This is a good indicator that the public interest in
NNTP support is declining.
The ``nntplib`` tests have been the cause of additional work in the recent
past. Python only contains client side of NNTP. The tests connect to
external news server. The servers are sometimes unavailable, too slow, or do
past. Python only contains the client side of NNTP, so the tests connect to
external news servers. The servers are sometimes unavailable, too slow, or do
not work correctly over IPv6. The situation causes flaky test runs on
buildbots.
@ -418,7 +418,7 @@ crypt
The `crypt <https://docs.python.org/3/library/crypt.html>`_ 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 to use them.
quality and insecure. Users are discouraged from using them.
* The module is not available on Windows. Cross-platform applications need
an alternative implementation anyway.
@ -433,7 +433,7 @@ quality and insecure. Users are discouraged to use them.
* The module was never useful to interact with system user and password
databases. On BSD, macOS, and Linux, all user authentication and
password modification operations must go through PAM (pluggable
authentication module), see `spwd`_ deprecation.
authentication module); see the `spwd`_ deprecation.
nis
@ -441,10 +441,10 @@ nis
The `nis <https://docs.python.org/3/library/nis.html>`_ module provides
NIS/YP support. Network Information Service / Yellow Pages is an old and
deprecated directory service protocol developed by Sun Microsystems. It's
deprecated directory service protocol developed by Sun Microsystems. Its
designed successor NIS+ from 1992 never took off. For a long time, libc's
Name Service Switch, LDAP, and Kerberos/GSSAPI are considered a more powerful
and more secure replacement of NIS.
Name Service Switch, LDAP, and Kerberos/GSSAPI have been considered a more powerful
and more secure replacement for NIS.
spwd
@ -453,13 +453,13 @@ spwd
The `spwd <https://docs.python.org/3/library/spwd.html>`_ 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
In general, it's a bad idea to use ``spwd``. It circumvents system
security policies, does not use the PAM stack, and is only compatible
with local user accounts, because it ignores NSS. The use of the ``spwd``
module for access control must be considered a *security bug*, as it bypasses
PAM's access control.
Further more the ``spwd`` module uses the
Furthermore, the ``spwd`` module uses the
`shadow(3) <http://man7.org/linux/man-pages/man3/shadow.3.html>`_ APIs.
Functions like ``getspnam(3)`` access the ``/etc/shadow`` file directly. This
is dangerous and even forbidden for confined services on systems with a
@ -481,7 +481,7 @@ module is used to facilitate distutils to create MSI installers with the
Windows installer, too.
Microsoft is slowly moving away from MSI in favor of Windows 10 Apps (AppX)
as new deployment model [3]_.
as a new deployment model [3]_.
pipes
@ -490,13 +490,14 @@ pipes
The `pipes <https://docs.python.org/3/library/pipes.html>`_ 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 ``subprocess`` module instead.
Modules to keep
===============
Some modules were originally proposed for deprecation.
Some modules were originally proposed for deprecation but are no longer
listed as such in this PEP.
.. csv-table:: Table 2: Withdrawn deprecations
:header: "Module", "Deprecated in", "Replacement"
@ -530,8 +531,8 @@ fileinput
The `fileinput <https://docs.python.org/3/library/fileinput.html>`_ module
implements helpers to iterate over a list of files from ``sys.argv``. The
module predates the ``optparser`` and ``argparser`` modules. The same functionality
can be implemented with the ``argparser`` module.
module predates the ``optparse`` and ``argparse`` modules. The same functionality
can be implemented with the ``argparse`` module.
Several core developers expressed their interest to keep the module in the
standard library, as it is handy for quick scripts.
@ -580,7 +581,7 @@ Discussions
===========
* Elana Hashman and Nick Coghlan suggested to keep the ``getopt`` module.
* Berker Peksag proposed to deprecate and removed ``msilib``.
* Berker Peksag proposed to deprecate and remove ``msilib``.
* Brett Cannon recommended to delay active deprecation warnings and removal
of modules like ``imp`` until Python 3.10. Version 3.8 will be released
shortly before Python 2 reaches end-of-life. A delay reduced churn for
@ -597,7 +598,7 @@ Discussions
stdlib doesn't have a replacement for the servers, yet.
Rejected Ideas
Rejected ideas
==============
Creating/maintaining a separate repo for the deprecated modules
@ -619,7 +620,7 @@ Update history
Update 1
--------
* Deprecate parser module
* Deprecate ``parser`` module
* Keep `fileinput`_ module
* Elaborate why ``crypt`` and ``spwd`` are dangerous and bad
* Improve sections for `cgitb`_, `colorsys`_, `nntplib`_, and `smtpd`_ modules
@ -637,18 +638,20 @@ Update 2
* Add experts
* Redirect discussions to discuss.python.org
* Deprecate `telnetlib`_
* Deprecate compat32 policy of email package
* Deprecate compat32 policy of ``email`` package
* Add creation year to overview table
* Mention :pep:`206` and :pep:`3108`
* Update sections for ``aifc``, ``audioop``, ``cgi``, and ``wave``.
Update 3
--------
* Keep the legacy email API modules. Internal deprecations will be
handled separately.
Update 4
--------
* Add Brett as a co-author.
* Retarget the PEP for Python 3.11.
* Examples of how to replace the relevant parts of ``cgi``