Skip to content

Commit 45e5ee4

Browse files
miss-islingtonAA-Turnerhugovk
authored
[3.13] GH-101100: Resolve reference warnings in whatsnew/3.8.rst (GH-138409) (#138438)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 005c43a commit 45e5ee4

File tree

3 files changed

+52
-46
lines changed

3 files changed

+52
-46
lines changed

Doc/library/unittest.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,6 +2469,10 @@ instead of as an error.
24692469
setUpModule and tearDownModule
24702470
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24712471

2472+
.. function:: setUpModule
2473+
tearDownModule
2474+
:no-typesetting:
2475+
24722476
These should be implemented as functions::
24732477

24742478
def setUpModule():

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,4 @@ Doc/whatsnew/2.7.rst
6666
Doc/whatsnew/3.4.rst
6767
Doc/whatsnew/3.5.rst
6868
Doc/whatsnew/3.6.rst
69-
Doc/whatsnew/3.8.rst
7069
Doc/whatsnew/3.10.rst

Doc/whatsnew/3.8.rst

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ Other Language Changes
536536
element is a callable with a ``(obj, state)`` signature. This allows the
537537
direct control over the state-updating behavior of a specific object. If
538538
not *None*, this callable will have priority over the object's
539-
:meth:`~__setstate__` method.
539+
:meth:`~object.__setstate__` method.
540540
(Contributed by Pierre Glaser and Olivier Grisel in :issue:`35900`.)
541541

542542
New Modules
@@ -1035,9 +1035,9 @@ symlinks and directory junctions) has been delegated to the operating system.
10351035
Specifically, :func:`os.stat` will now traverse anything supported by the
10361036
operating system, while :func:`os.lstat` will only open reparse points that
10371037
identify as "name surrogates" while others are opened as for :func:`os.stat`.
1038-
In all cases, :attr:`stat_result.st_mode` will only have ``S_IFLNK`` set for
1038+
In all cases, :attr:`os.stat_result.st_mode` will only have ``S_IFLNK`` set for
10391039
symbolic links and not other kinds of reparse points. To identify other kinds
1040-
of reparse point, check the new :attr:`stat_result.st_reparse_tag` attribute.
1040+
of reparse point, check the new :attr:`os.stat_result.st_reparse_tag` attribute.
10411041

10421042
On Windows, :func:`os.readlink` is now able to read directory junctions. Note
10431043
that :func:`~os.path.islink` will return ``False`` for directory junctions,
@@ -1285,20 +1285,20 @@ now matches what the C tokenizer does internally.
12851285
tkinter
12861286
-------
12871287

1288-
Added methods :meth:`~tkinter.Spinbox.selection_from`,
1289-
:meth:`~tkinter.Spinbox.selection_present`,
1290-
:meth:`~tkinter.Spinbox.selection_range` and
1291-
:meth:`~tkinter.Spinbox.selection_to`
1292-
in the :class:`tkinter.Spinbox` class.
1288+
Added methods :meth:`!selection_from`,
1289+
:meth:`!selection_present`,
1290+
:meth:`!selection_range` and
1291+
:meth:`!selection_to`
1292+
in the :class:`!tkinter.Spinbox` class.
12931293
(Contributed by Juliette Monsel in :issue:`34829`.)
12941294

1295-
Added method :meth:`~tkinter.Canvas.moveto`
1296-
in the :class:`tkinter.Canvas` class.
1295+
Added method :meth:`!moveto`
1296+
in the :class:`!tkinter.Canvas` class.
12971297
(Contributed by Juliette Monsel in :issue:`23831`.)
12981298

1299-
The :class:`tkinter.PhotoImage` class now has
1300-
:meth:`~tkinter.PhotoImage.transparency_get` and
1301-
:meth:`~tkinter.PhotoImage.transparency_set` methods. (Contributed by
1299+
The :class:`!tkinter.PhotoImage` class now has
1300+
:meth:`!transparency_get` and
1301+
:meth:`!transparency_set` methods. (Contributed by
13021302
Zackery Spytz in :issue:`25451`.)
13031303

13041304

@@ -1432,7 +1432,7 @@ and ``{namespace}*`` which returns all tags in the given namespace.
14321432
(Contributed by Stefan Behnel in :issue:`28238`.)
14331433

14341434
The :mod:`xml.etree.ElementTree` module provides a new function
1435-
:func:`xml.etree.ElementTree.canonicalize` that implements C14N 2.0.
1435+
:func:`~xml.etree.ElementTree.canonicalize` that implements C14N 2.0.
14361436
(Contributed by Stefan Behnel in :issue:`13611`.)
14371437

14381438
The target object of :class:`xml.etree.ElementTree.XMLParser` can
@@ -1573,7 +1573,7 @@ Build and C API Changes
15731573

15741574
* :c:func:`Py_INCREF`, :c:func:`Py_DECREF`
15751575
* :c:func:`Py_XINCREF`, :c:func:`Py_XDECREF`
1576-
* :c:func:`PyObject_INIT`, :c:func:`PyObject_INIT_VAR`
1576+
* :c:macro:`!PyObject_INIT`, :c:macro:`!PyObject_INIT_VAR`
15771577
* Private functions: :c:func:`!_PyObject_GC_TRACK`,
15781578
:c:func:`!_PyObject_GC_UNTRACK`, :c:func:`!_Py_Dealloc`
15791579

@@ -1677,7 +1677,7 @@ Deprecated
16771677
constant nodes.
16781678
(Contributed by Serhiy Storchaka in :issue:`36917`.)
16791679

1680-
* The :func:`asyncio.coroutine` :term:`decorator` is deprecated and will be
1680+
* The :deco:`!asyncio.coroutine` :term:`decorator` is deprecated and will be
16811681
removed in version 3.10. Instead of ``@asyncio.coroutine``, use
16821682
:keyword:`async def` instead.
16831683
(Contributed by Andrew Svetlov in :issue:`36921`.)
@@ -1697,22 +1697,22 @@ Deprecated
16971697
(Contributed by Yury Selivanov in :issue:`34790`.)
16981698

16991699
* The following functions and methods are deprecated in the :mod:`gettext`
1700-
module: :func:`~gettext.lgettext`, :func:`~gettext.ldgettext`,
1701-
:func:`~gettext.lngettext` and :func:`~gettext.ldngettext`.
1700+
module: :func:`!lgettext`, :func:`!ldgettext`,
1701+
:func:`!lngettext` and :func:`!ldngettext`.
17021702
They return encoded bytes, and it's possible that you will get unexpected
17031703
Unicode-related exceptions if there are encoding problems with the
17041704
translated strings. It's much better to use alternatives which return
17051705
Unicode strings in Python 3. These functions have been broken for a long time.
17061706

1707-
Function :func:`~gettext.bind_textdomain_codeset`, methods
1708-
:meth:`~gettext.NullTranslations.output_charset` and
1709-
:meth:`~gettext.NullTranslations.set_output_charset`, and the *codeset*
1707+
Function :func:`!bind_textdomain_codeset`, methods
1708+
:meth:`!NullTranslations.output_charset` and
1709+
:meth:`!NullTranslations.set_output_charset`, and the *codeset*
17101710
parameter of functions :func:`~gettext.translation` and
17111711
:func:`~gettext.install` are also deprecated, since they are only used for
17121712
the ``l*gettext()`` functions.
17131713
(Contributed by Serhiy Storchaka in :issue:`33710`.)
17141714

1715-
* The :meth:`~threading.Thread.isAlive` method of :class:`threading.Thread`
1715+
* The :meth:`!isAlive` method of :class:`threading.Thread`
17161716
has been deprecated.
17171717
(Contributed by Donghee Na in :issue:`35283`.)
17181718

@@ -1727,19 +1727,19 @@ Deprecated
17271727
* Deprecated passing the following arguments as keyword arguments:
17281728

17291729
- *func* in :func:`functools.partialmethod`, :func:`weakref.finalize`,
1730-
:meth:`profile.Profile.runcall`, :meth:`cProfile.Profile.runcall`,
1730+
:meth:`profile.Profile.runcall`, :meth:`!cProfile.Profile.runcall`,
17311731
:meth:`bdb.Bdb.runcall`, :meth:`trace.Trace.runfunc` and
17321732
:func:`curses.wrapper`.
17331733
- *function* in :meth:`unittest.TestCase.addCleanup`.
17341734
- *fn* in the :meth:`~concurrent.futures.Executor.submit` method of
17351735
:class:`concurrent.futures.ThreadPoolExecutor` and
17361736
:class:`concurrent.futures.ProcessPoolExecutor`.
17371737
- *callback* in :meth:`contextlib.ExitStack.callback`,
1738-
:meth:`contextlib.AsyncExitStack.callback` and
1738+
:meth:`!contextlib.AsyncExitStack.callback` and
17391739
:meth:`contextlib.AsyncExitStack.push_async_callback`.
1740-
- *c* and *typeid* in the :meth:`~multiprocessing.managers.Server.create`
1741-
method of :class:`multiprocessing.managers.Server` and
1742-
:class:`multiprocessing.managers.SharedMemoryServer`.
1740+
- *c* and *typeid* in the :meth:`!create`
1741+
method of :class:`!multiprocessing.managers.Server` and
1742+
:class:`!multiprocessing.managers.SharedMemoryServer`.
17431743
- *obj* in :func:`weakref.finalize`.
17441744

17451745
In future releases of Python, they will be :ref:`positional-only
@@ -1757,14 +1757,14 @@ The following features and APIs have been removed from Python 3.8:
17571757
able to import from collections was marked for removal in 3.8, but has been
17581758
delayed to 3.9. (See :gh:`81134`.)
17591759

1760-
* The :mod:`macpath` module, deprecated in Python 3.7, has been removed.
1760+
* The :mod:`!macpath` module, deprecated in Python 3.7, has been removed.
17611761
(Contributed by Victor Stinner in :issue:`35471`.)
17621762

1763-
* The function :func:`platform.popen` has been removed, after having been
1763+
* The function :func:`!platform.popen` has been removed, after having been
17641764
deprecated since Python 3.3: use :func:`os.popen` instead.
17651765
(Contributed by Victor Stinner in :issue:`35345`.)
17661766

1767-
* The function :func:`time.clock` has been removed, after having been
1767+
* The function :func:`!time.clock` has been removed, after having been
17681768
deprecated since Python 3.3: use :func:`time.perf_counter` or
17691769
:func:`time.process_time` instead, depending
17701770
on your requirements, to have well-defined behavior.
@@ -1800,8 +1800,8 @@ The following features and APIs have been removed from Python 3.8:
18001800
:func:`fileinput.FileInput` which was ignored and deprecated since Python 3.6
18011801
has been removed. :issue:`36952` (Contributed by Matthias Bussonnier.)
18021802

1803-
* The functions :func:`sys.set_coroutine_wrapper` and
1804-
:func:`sys.get_coroutine_wrapper` deprecated in Python 3.7 have been removed;
1803+
* The functions :func:`!sys.set_coroutine_wrapper` and
1804+
:func:`!sys.get_coroutine_wrapper` deprecated in Python 3.7 have been removed;
18051805
:issue:`36933` (Contributed by Matthias Bussonnier.)
18061806

18071807

@@ -1864,9 +1864,10 @@ Changes in the Python API
18641864

18651865
* :class:`subprocess.Popen` can now use :func:`os.posix_spawn` in some cases
18661866
for better performance. On Windows Subsystem for Linux and QEMU User
1867-
Emulation, the :class:`Popen` constructor using :func:`os.posix_spawn` no longer raises an
1868-
exception on errors like "missing program". Instead the child process fails with a
1869-
non-zero :attr:`~Popen.returncode`.
1867+
Emulation, the :class:`~subprocess.Popen` constructor using
1868+
:func:`os.posix_spawn` no longer raises an exception on errors like
1869+
"missing program". Instead the child process fails with a
1870+
non-zero :attr:`~subprocess.Popen.returncode`.
18701871
(Contributed by Joannah Nanjekye and Victor Stinner in :issue:`35537`.)
18711872

18721873
* The *preexec_fn* argument of * :class:`subprocess.Popen` is no longer
@@ -1875,11 +1876,11 @@ Changes in the Python API
18751876
(Contributed by Eric Snow in :issue:`34651`, modified by Christian Heimes
18761877
in :issue:`37951`.)
18771878

1878-
* The :meth:`imap.IMAP4.logout` method no longer silently ignores arbitrary
1879+
* The :meth:`imaplib.IMAP4.logout` method no longer silently ignores arbitrary
18791880
exceptions.
18801881
(Contributed by Victor Stinner in :issue:`36348`.)
18811882

1882-
* The function :func:`platform.popen` has been removed, after having been deprecated since
1883+
* The function :func:`!platform.popen` has been removed, after having been deprecated since
18831884
Python 3.3: use :func:`os.popen` instead.
18841885
(Contributed by Victor Stinner in :issue:`35345`.)
18851886

@@ -1894,9 +1895,11 @@ Changes in the Python API
18941895
specialized methods like :meth:`~tkinter.ttk.Treeview.selection_set` for
18951896
changing the selection. (Contributed by Serhiy Storchaka in :issue:`31508`.)
18961897

1897-
* The :meth:`writexml`, :meth:`toxml` and :meth:`toprettyxml` methods of
1898-
:mod:`xml.dom.minidom`, and the :meth:`write` method of :mod:`xml.etree`,
1899-
now preserve the attribute order specified by the user.
1898+
* The :meth:`~xml.dom.minidom.Node.writexml`, :meth:`~xml.dom.minidom.Node.toxml`
1899+
and :meth:`~xml.dom.minidom.Node.toprettyxml` methods of
1900+
:mod:`xml.dom.minidom` and the :meth:`~xml.etree.ElementTree.ElementTree.write`
1901+
method of :mod:`xml.etree.ElementTree` now preserve the attribute order
1902+
specified by the user.
19001903
(Contributed by Diego Rojas and Raymond Hettinger in :issue:`34160`.)
19011904

19021905
* A :mod:`dbm.dumb` database opened with flags ``'r'`` is now read-only.
@@ -1916,8 +1919,8 @@ Changes in the Python API
19161919
``type.__new__``. A :exc:`DeprecationWarning` was emitted in Python
19171920
3.6--3.7. (Contributed by Serhiy Storchaka in :issue:`23722`.)
19181921

1919-
* The :class:`cProfile.Profile` class can now be used as a context
1920-
manager. (Contributed by Scott Sanderson in :issue:`29235`.)
1922+
* The :class:`cProfile.Profile <profile.Profile>` class can now be used as
1923+
a context manager. (Contributed by Scott Sanderson in :issue:`29235`.)
19211924

19221925
* :func:`shutil.copyfile`, :func:`shutil.copy`, :func:`shutil.copy2`,
19231926
:func:`shutil.copytree` and :func:`shutil.move` use platform-specific
@@ -1952,7 +1955,7 @@ Changes in the Python API
19521955
(Contributed by Christian Heimes in :issue:`17239`.)
19531956

19541957
* Deleting a key from a read-only :mod:`dbm` database (:mod:`dbm.dumb`,
1955-
:mod:`dbm.gnu` or :mod:`dbm.ndbm`) raises :attr:`error` (:exc:`dbm.dumb.error`,
1958+
:mod:`dbm.gnu` or :mod:`dbm.ndbm`) raises :attr:`!error` (:exc:`dbm.dumb.error`,
19561959
:exc:`dbm.gnu.error` or :exc:`dbm.ndbm.error`) instead of :exc:`KeyError`.
19571960
(Contributed by Xiang Zhang in :issue:`33106`.)
19581961

@@ -2044,7 +2047,7 @@ Changes in the C API
20442047
:c:func:`PyType_FromSpec`) hold a reference to their type object.
20452048
Increasing the reference count of these type objects has been moved from
20462049
:c:func:`PyType_GenericAlloc` to the more low-level functions,
2047-
:c:func:`PyObject_Init` and :c:func:`PyObject_INIT`.
2050+
:c:func:`PyObject_Init` and :c:macro:`!PyObject_INIT`.
20482051
This makes types created through :c:func:`PyType_FromSpec` behave like
20492052
other classes in managed code.
20502053

@@ -2064,7 +2067,7 @@ Changes in the C API
20642067
This may happen after calling :c:macro:`PyObject_New`,
20652068
:c:macro:`PyObject_NewVar`, :c:func:`PyObject_GC_New`,
20662069
:c:func:`PyObject_GC_NewVar`, or any other custom allocator that uses
2067-
:c:func:`PyObject_Init` or :c:func:`PyObject_INIT`.
2070+
:c:func:`PyObject_Init` or :c:macro:`!PyObject_INIT`.
20682071

20692072
Example:
20702073

0 commit comments

Comments
 (0)