Skip to content

Commit 2a4a724

Browse files
miss-islingtonhugovkAlexWaygood
authored
[3.11] gh-101100: Fix Sphinx warnings for 2.6 deprecations and removals (GH-113725) (#113735)
Co-authored-by: Hugo van Kemenade <[email protected]> Co-authored-by: Alex Waygood <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent 99b4f1c commit 2a4a724

File tree

8 files changed

+57
-57
lines changed

8 files changed

+57
-57
lines changed

Doc/library/subprocess.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1463,8 +1463,8 @@ Return code handling translates as follows::
14631463
print("There were some errors")
14641464

14651465

1466-
Replacing functions from the :mod:`popen2` module
1467-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1466+
Replacing functions from the :mod:`!popen2` module
1467+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14681468

14691469
.. note::
14701470

Doc/whatsnew/2.0.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1095,8 +1095,8 @@ module.
10951095
GNU gettext message catalog library. (Integrated by Barry Warsaw, from separate
10961096
contributions by Martin von Löwis, Peter Funk, and James Henstridge.)
10971097

1098-
* :mod:`linuxaudiodev`: Support for the :file:`/dev/audio` device on Linux, a
1099-
twin to the existing :mod:`sunaudiodev` module. (Contributed by Peter Bosch,
1098+
* :mod:`!linuxaudiodev`: Support for the :file:`/dev/audio` device on Linux, a
1099+
twin to the existing :mod:`!sunaudiodev` module. (Contributed by Peter Bosch,
11001100
with fixes by Jeremy Hylton.)
11011101

11021102
* :mod:`mmap`: An interface to memory-mapped files on both Windows and Unix. A
@@ -1139,8 +1139,8 @@ module.
11391139
Unix, not to be confused with :program:`gzip`\ -format files (which are
11401140
supported by the :mod:`gzip` module) (Contributed by James C. Ahlstrom.)
11411141

1142-
* :mod:`imputil`: A module that provides a simpler way for writing customized
1143-
import hooks, in comparison to the existing :mod:`ihooks` module. (Implemented
1142+
* :mod:`!imputil`: A module that provides a simpler way for writing customized
1143+
import hooks, in comparison to the existing :mod:`!ihooks` module. (Implemented
11441144
by Greg Stein, with much discussion on python-dev along the way.)
11451145

11461146
.. ======================================================================

Doc/whatsnew/2.2.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ To make the set of types complete, new type objects such as :func:`dict` and
143143
return fcntl.lockf(self.fileno(), operation,
144144
length, start, whence)
145145

146-
The now-obsolete :mod:`posixfile` module contained a class that emulated all of
147-
a file object's methods and also added a :meth:`lock` method, but this class
146+
The now-obsolete :mod:`!posixfile` module contained a class that emulated all of
147+
a file object's methods and also added a :meth:`!lock` method, but this class
148148
couldn't be passed to internal functions that expected a built-in file,
149149
something which is possible with our new :class:`LockableFile`.
150150

Doc/whatsnew/2.4.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,13 @@ The standard library provides a number of ways to execute a subprocess, offering
387387
different features and different levels of complexity.
388388
``os.system(command)`` is easy to use, but slow (it runs a shell process
389389
which executes the command) and dangerous (you have to be careful about escaping
390-
the shell's metacharacters). The :mod:`popen2` module offers classes that can
390+
the shell's metacharacters). The :mod:`!popen2` module offers classes that can
391391
capture standard output and standard error from the subprocess, but the naming
392392
is confusing. The :mod:`subprocess` module cleans this up, providing a unified
393393
interface that offers all the features you might need.
394394

395-
Instead of :mod:`popen2`'s collection of classes, :mod:`subprocess` contains a
396-
single class called :class:`Popen` whose constructor supports a number of
395+
Instead of :mod:`!popen2`'s collection of classes, :mod:`subprocess` contains a
396+
single class called :class:`subprocess.Popen` whose constructor supports a number of
397397
different keyword arguments. ::
398398

399399
class Popen(args, bufsize=0, executable=None,
@@ -1529,7 +1529,7 @@ code:
15291529
will now always be unequal, and relative comparisons (``<``, ``>``) will raise
15301530
a :exc:`TypeError`.
15311531

1532-
* :func:`dircache.listdir` now passes exceptions to the caller instead of
1532+
* :func:`!dircache.listdir` now passes exceptions to the caller instead of
15331533
returning empty lists.
15341534

15351535
* :func:`LexicalHandler.startDTD` used to receive the public and system IDs in

Doc/whatsnew/2.5.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1680,7 +1680,7 @@ The ctypes package
16801680

16811681
The :mod:`ctypes` package, written by Thomas Heller, has been added to the
16821682
standard library. :mod:`ctypes` lets you call arbitrary functions in shared
1683-
libraries or DLLs. Long-time users may remember the :mod:`dl` module, which
1683+
libraries or DLLs. Long-time users may remember the :mod:`!dl` module, which
16841684
provides functions for loading shared libraries and calling functions in them.
16851685
The :mod:`ctypes` package is much fancier.
16861686

@@ -1877,12 +1877,12 @@ The hashlib package
18771877
-------------------
18781878

18791879
A new :mod:`hashlib` module, written by Gregory P. Smith, has been added to
1880-
replace the :mod:`md5` and :mod:`sha` modules. :mod:`hashlib` adds support for
1880+
replace the :mod:`!md5` and :mod:`!sha` modules. :mod:`hashlib` adds support for
18811881
additional secure hashes (SHA-224, SHA-256, SHA-384, and SHA-512). When
18821882
available, the module uses OpenSSL for fast platform optimized implementations
18831883
of algorithms.
18841884

1885-
The old :mod:`md5` and :mod:`sha` modules still exist as wrappers around hashlib
1885+
The old :mod:`!md5` and :mod:`!sha` modules still exist as wrappers around hashlib
18861886
to preserve backwards compatibility. The new module's interface is very close
18871887
to that of the old modules, but not identical. The most significant difference
18881888
is that the constructor functions for creating new hashing objects are named

Doc/whatsnew/2.6.rst

+35-35
Original file line numberDiff line numberDiff line change
@@ -2916,60 +2916,60 @@ Deprecations and Removals
29162916

29172917
* Changes to the :class:`Exception` interface
29182918
as dictated by :pep:`352` continue to be made. For 2.6,
2919-
the :attr:`message` attribute is being deprecated in favor of the
2920-
:attr:`args` attribute.
2919+
the :attr:`!message` attribute is being deprecated in favor of the
2920+
:attr:`~BaseException.args` attribute.
29212921

29222922
* (3.0-warning mode) Python 3.0 will feature a reorganized standard
29232923
library that will drop many outdated modules and rename others.
29242924
Python 2.6 running in 3.0-warning mode will warn about these modules
29252925
when they are imported.
29262926

29272927
The list of deprecated modules is:
2928-
:mod:`audiodev`,
2929-
:mod:`bgenlocations`,
2930-
:mod:`buildtools`,
2931-
:mod:`bundlebuilder`,
2932-
:mod:`Canvas`,
2933-
:mod:`compiler`,
2934-
:mod:`dircache`,
2935-
:mod:`dl`,
2936-
:mod:`fpformat`,
2937-
:mod:`gensuitemodule`,
2938-
:mod:`ihooks`,
2939-
:mod:`imageop`,
2940-
:mod:`imgfile`,
2941-
:mod:`linuxaudiodev`,
2942-
:mod:`mhlib`,
2943-
:mod:`mimetools`,
2944-
:mod:`multifile`,
2945-
:mod:`new`,
2946-
:mod:`pure`,
2947-
:mod:`statvfs`,
2948-
:mod:`sunaudiodev`,
2949-
:mod:`test.testall`, and
2950-
:mod:`toaiff`.
2951-
2952-
* The :mod:`gopherlib` module has been removed.
2953-
2954-
* The :mod:`MimeWriter` module and :mod:`mimify` module
2928+
:mod:`!audiodev`,
2929+
:mod:`!bgenlocations`,
2930+
:mod:`!buildtools`,
2931+
:mod:`!bundlebuilder`,
2932+
:mod:`!Canvas`,
2933+
:mod:`!compiler`,
2934+
:mod:`!dircache`,
2935+
:mod:`!dl`,
2936+
:mod:`!fpformat`,
2937+
:mod:`!gensuitemodule`,
2938+
:mod:`!ihooks`,
2939+
:mod:`!imageop`,
2940+
:mod:`!imgfile`,
2941+
:mod:`!linuxaudiodev`,
2942+
:mod:`!mhlib`,
2943+
:mod:`!mimetools`,
2944+
:mod:`!multifile`,
2945+
:mod:`!new`,
2946+
:mod:`!pure`,
2947+
:mod:`!statvfs`,
2948+
:mod:`!sunaudiodev`,
2949+
:mod:`!test.testall`, and
2950+
:mod:`!toaiff`.
2951+
2952+
* The :mod:`!gopherlib` module has been removed.
2953+
2954+
* The :mod:`!MimeWriter` module and :mod:`!mimify` module
29552955
have been deprecated; use the :mod:`email`
29562956
package instead.
29572957

2958-
* The :mod:`md5` module has been deprecated; use the :mod:`hashlib` module
2958+
* The :mod:`!md5` module has been deprecated; use the :mod:`hashlib` module
29592959
instead.
29602960

2961-
* The :mod:`posixfile` module has been deprecated; :func:`fcntl.lockf`
2961+
* The :mod:`!posixfile` module has been deprecated; :func:`fcntl.lockf`
29622962
provides better locking.
29632963

2964-
* The :mod:`popen2` module has been deprecated; use the :mod:`subprocess`
2964+
* The :mod:`!popen2` module has been deprecated; use the :mod:`subprocess`
29652965
module.
29662966

2967-
* The :mod:`rgbimg` module has been removed.
2967+
* The :mod:`!rgbimg` module has been removed.
29682968

2969-
* The :mod:`sets` module has been deprecated; it's better to
2969+
* The :mod:`!sets` module has been deprecated; it's better to
29702970
use the built-in :class:`set` and :class:`frozenset` types.
29712971

2972-
* The :mod:`sha` module has been deprecated; use the :mod:`hashlib` module
2972+
* The :mod:`!sha` module has been deprecated; use the :mod:`hashlib` module
29732973
instead.
29742974

29752975

Doc/whatsnew/2.7.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -1315,9 +1315,9 @@ changes, or look through the Subversion logs for all the details.
13151315
giving the source address that will be used for the connection.
13161316
(Contributed by Eldon Ziegler; :issue:`3972`.)
13171317

1318-
* The :mod:`ihooks` module now supports relative imports. Note that
1319-
:mod:`ihooks` is an older module for customizing imports,
1320-
superseded by the :mod:`imputil` module added in Python 2.0.
1318+
* The :mod:`!ihooks` module now supports relative imports. Note that
1319+
:mod:`!ihooks` is an older module for customizing imports,
1320+
superseded by the :mod:`!imputil` module added in Python 2.0.
13211321
(Relative import support added by Neil Schemenauer.)
13221322

13231323
.. revision 75423

Doc/whatsnew/3.0.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,8 @@ very extensive changes to the standard library. :pep:`3108` is the
555555
reference for the major changes to the library. Here's a capsule
556556
review:
557557

558-
* Many old modules were removed. Some, like :mod:`gopherlib` (no
559-
longer used) and :mod:`md5` (replaced by :mod:`hashlib`), were
558+
* Many old modules were removed. Some, like :mod:`!gopherlib` (no
559+
longer used) and :mod:`!md5` (replaced by :mod:`hashlib`), were
560560
already deprecated by :pep:`4`. Others were removed as a result
561561
of the removal of support for various platforms such as Irix, BeOS
562562
and Mac OS 9 (see :pep:`11`). Some modules were also selected for
@@ -626,7 +626,7 @@ review:
626626
Some other changes to standard library modules, not covered by
627627
:pep:`3108`:
628628

629-
* Killed :mod:`sets`. Use the built-in :func:`set` class.
629+
* Killed :mod:`!sets`. Use the built-in :func:`set` class.
630630

631631
* Cleanup of the :mod:`sys` module: removed :func:`sys.exitfunc`,
632632
:func:`sys.exc_clear`, :data:`sys.exc_type`, :data:`sys.exc_value`,
@@ -648,7 +648,7 @@ Some other changes to standard library modules, not covered by
648648

649649
* Cleanup of the :mod:`random` module: removed the :func:`jumpahead` API.
650650

651-
* The :mod:`new` module is gone.
651+
* The :mod:`!new` module is gone.
652652

653653
* The functions :func:`os.tmpnam`, :func:`os.tempnam` and
654654
:func:`os.tmpfile` have been removed in favor of the :mod:`tempfile`

0 commit comments

Comments
 (0)