Skip to content

Commit 7bb7906

Browse files
miss-islingtonAA-Turnerhugovk
authored andcommitted
[3.14] pythonGH-101100: Resolve reference warnings in whatsnew/3.6.rst (pythonGH-138411) (python#138455)
Co-authored-by: Adam Turner <[email protected]> Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent d19f0b0 commit 7bb7906

File tree

3 files changed

+35
-31
lines changed

3 files changed

+35
-31
lines changed

Doc/reference/simple_stmts.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,9 @@ where the :keyword:`import` statement occurs.
831831

832832
.. index:: single: __all__ (optional module attribute)
833833

834+
.. attribute:: module.__all__
835+
:no-typesetting:
836+
834837
The *public names* defined by a module are determined by checking the module's
835838
namespace for a variable named ``__all__``; if defined, it must be a sequence
836839
of strings which are names defined or imported by that module. The names

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,4 @@ Doc/whatsnew/2.4.rst
6161
Doc/whatsnew/2.5.rst
6262
Doc/whatsnew/2.6.rst
6363
Doc/whatsnew/3.5.rst
64-
Doc/whatsnew/3.6.rst
6564
Doc/whatsnew/3.10.rst

Doc/whatsnew/3.6.rst

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ Some smaller changes made to the core Python language are:
745745

746746
* It is now possible to set a :ref:`special method <specialnames>` to
747747
``None`` to indicate that the corresponding operation is not available.
748-
For example, if a class sets :meth:`__iter__` to ``None``, the class
748+
For example, if a class sets :meth:`~object.__iter__` to ``None``, the class
749749
is not iterable.
750750
(Contributed by Andrew Barnert and Ivan Levkivskyi in :issue:`25958`.)
751751

@@ -871,7 +871,7 @@ Notable changes in the :mod:`asyncio` module since Python 3.5.0
871871
of the last iteration will be discarded.
872872
(Contributed by Guido van Rossum in :issue:`25593`.)
873873

874-
* :meth:`Future.set_exception <asyncio.futures.Future.set_exception>`
874+
* :meth:`Future.set_exception <asyncio.Future.set_exception>`
875875
will now raise :exc:`TypeError` when passed an instance of
876876
the :exc:`StopIteration` exception.
877877
(Contributed by Chris Angelico in :issue:`26221`.)
@@ -925,7 +925,7 @@ added to represent sized iterable container classes.
925925
(Contributed by Ivan Levkivskyi, docs by Neil Girdhar in :issue:`27598`.)
926926

927927
The new :class:`~collections.abc.Reversible` abstract base class represents
928-
iterable classes that also provide the :meth:`__reversed__` method.
928+
iterable classes that also provide the :meth:`~object.__reversed__` method.
929929
(Contributed by Ivan Levkivskyi in :issue:`25987`.)
930930

931931
The new :class:`~collections.abc.AsyncGenerator` abstract base class represents
@@ -971,7 +971,7 @@ datetime
971971
--------
972972

973973
The :class:`~datetime.datetime` and :class:`~datetime.time` classes have
974-
the new :attr:`~time.fold` attribute used to disambiguate local time
974+
the new :attr:`~datetime.time.fold` attribute used to disambiguate local time
975975
when necessary. Many functions in the :mod:`datetime` have been
976976
updated to support local time disambiguation.
977977
See :ref:`Local Time Disambiguation <whatsnew36-pep495>` section for more
@@ -1052,12 +1052,12 @@ enum
10521052
----
10531053

10541054
Two new enumeration base classes have been added to the :mod:`enum` module:
1055-
:class:`~enum.Flag` and :class:`~enum.IntFlags`. Both are used to define
1055+
:class:`~enum.Flag` and :class:`~enum.IntFlag`. Both are used to define
10561056
constants that can be combined using the bitwise operators.
10571057
(Contributed by Ethan Furman in :issue:`23591`.)
10581058

10591059
Many standard library modules have been updated to use the
1060-
:class:`~enum.IntFlags` class for their constants.
1060+
:class:`~enum.IntFlag` class for their constants.
10611061

10621062
The new :class:`enum.auto` value can be used to assign values to enum
10631063
members automatically::
@@ -1275,7 +1275,7 @@ See the summary of :ref:`PEP 519 <whatsnew36-pep519>` for details on how the
12751275

12761276
A new :meth:`~os.scandir.close` method allows explicitly closing a
12771277
:func:`~os.scandir` iterator. The :func:`~os.scandir` iterator now
1278-
supports the :term:`context manager` protocol. If a :func:`scandir`
1278+
supports the :term:`context manager` protocol. If a :func:`!scandir`
12791279
iterator is neither exhausted nor explicitly closed a :exc:`ResourceWarning`
12801280
will be emitted in its destructor.
12811281
(Contributed by Serhiy Storchaka in :issue:`25994`.)
@@ -1434,7 +1434,7 @@ defined in :mod:`http.server`, :mod:`xmlrpc.server` and
14341434
protocol.
14351435
(Contributed by Aviv Palivoda in :issue:`26404`.)
14361436

1437-
The :attr:`~socketserver.StreamRequestHandler.wfile` attribute of
1437+
The :attr:`wfile <socketserver.DatagramRequestHandler.wfile>` attribute of
14381438
:class:`~socketserver.StreamRequestHandler` classes now implements
14391439
the :class:`io.BufferedIOBase` writable interface. In particular,
14401440
calling :meth:`~io.BufferedIOBase.write` is now guaranteed to send the
@@ -1465,7 +1465,7 @@ The new :meth:`~ssl.SSLContext.get_ciphers` method can be used to
14651465
get a list of enabled ciphers in order of cipher priority.
14661466

14671467
All constants and flags have been converted to :class:`~enum.IntEnum` and
1468-
:class:`~enum.IntFlags`.
1468+
:class:`~enum.IntFlag`.
14691469
(Contributed by Christian Heimes in :issue:`28025`.)
14701470

14711471
Server and client-side specific TLS protocols for :class:`~ssl.SSLContext`
@@ -1531,8 +1531,8 @@ Stéphane Wirtel in :issue:`25485`).
15311531
time
15321532
----
15331533

1534-
The :class:`~time.struct_time` attributes :attr:`tm_gmtoff` and
1535-
:attr:`tm_zone` are now available on all platforms.
1534+
The :class:`~time.struct_time` attributes :attr:`!tm_gmtoff` and
1535+
:attr:`!tm_zone` are now available on all platforms.
15361536

15371537

15381538
timeit
@@ -1551,12 +1551,12 @@ between best and worst times.
15511551
tkinter
15521552
-------
15531553

1554-
Added methods :meth:`~tkinter.Variable.trace_add`,
1555-
:meth:`~tkinter.Variable.trace_remove` and :meth:`~tkinter.Variable.trace_info`
1556-
in the :class:`tkinter.Variable` class. They replace old methods
1557-
:meth:`~tkinter.Variable.trace_variable`, :meth:`~tkinter.Variable.trace`,
1558-
:meth:`~tkinter.Variable.trace_vdelete` and
1559-
:meth:`~tkinter.Variable.trace_vinfo` that use obsolete Tcl commands and might
1554+
Added methods :meth:`!Variable.trace_add`,
1555+
:meth:`!Variable.trace_remove` and :meth:`!trace_info`
1556+
in the :class:`!tkinter.Variable` class. They replace old methods
1557+
:meth:`!trace_variable`, :meth:`!trace`,
1558+
:meth:`!trace_vdelete` and
1559+
:meth:`!trace_vinfo` that use obsolete Tcl commands and might
15601560
not work in future versions of Tcl.
15611561
(Contributed by Serhiy Storchaka in :issue:`22115`).
15621562

@@ -1674,8 +1674,8 @@ urllib.request
16741674

16751675
If a HTTP request has a file or iterable body (other than a
16761676
bytes object) but no ``Content-Length`` header, rather than
1677-
throwing an error, :class:`~urllib.request.AbstractHTTPHandler` now
1678-
falls back to use chunked transfer encoding.
1677+
throwing an error, :class:`AbstractHTTPHandler <urllib.request.HTTPHandler>`
1678+
now falls back to use chunked transfer encoding.
16791679
(Contributed by Demian Brecht and Rolf Krahl in :issue:`12319`.)
16801680

16811681

@@ -1701,7 +1701,7 @@ warnings
17011701
A new optional *source* parameter has been added to the
17021702
:func:`warnings.warn_explicit` function: the destroyed object which emitted a
17031703
:exc:`ResourceWarning`. A *source* attribute has also been added to
1704-
:class:`warnings.WarningMessage` (contributed by Victor Stinner in
1704+
:class:`!warnings.WarningMessage` (contributed by Victor Stinner in
17051705
:issue:`26568` and :issue:`26567`).
17061706

17071707
When a :exc:`ResourceWarning` warning is logged, the :mod:`tracemalloc` module is now
@@ -1942,7 +1942,7 @@ Raising the :exc:`StopIteration` exception inside a generator will now
19421942
generate a :exc:`DeprecationWarning`, and will trigger a :exc:`RuntimeError`
19431943
in Python 3.7. See :ref:`whatsnew-pep-479` for details.
19441944

1945-
The :meth:`__aiter__` method is now expected to return an asynchronous
1945+
The :meth:`~object.__aiter__` method is now expected to return an asynchronous
19461946
iterator directly instead of returning an awaitable as previously.
19471947
Doing the former will trigger a :exc:`DeprecationWarning`. Backward
19481948
compatibility will be removed in Python 3.7.
@@ -2189,16 +2189,16 @@ Changes in the Python API
21892189
booleans being a subclass of integers, this should only be an issue if you
21902190
were doing identity checks for ``1`` or ``0``. See :issue:`25768`.
21912191

2192-
* Reading the :attr:`~urllib.parse.SplitResult.port` attribute of
2192+
* Reading the :attr:`!port` attribute of
21932193
:func:`urllib.parse.urlsplit` and :func:`~urllib.parse.urlparse` results
21942194
now raises :exc:`ValueError` for out-of-range values, rather than
21952195
returning :const:`None`. See :issue:`20059`.
21962196

21972197
* The :mod:`!imp` module now raises a :exc:`DeprecationWarning` instead of
21982198
:exc:`PendingDeprecationWarning`.
21992199

2200-
* The following modules have had missing APIs added to their :attr:`__all__`
2201-
attributes to match the documented APIs:
2200+
* The following modules have had missing APIs added to their
2201+
:attr:`~module.__all__` attributes to match the documented APIs:
22022202
:mod:`calendar`, :mod:`!cgi`, :mod:`csv`,
22032203
:mod:`~xml.etree.ElementTree`, :mod:`enum`,
22042204
:mod:`fileinput`, :mod:`ftplib`, :mod:`logging`, :mod:`mailbox`,
@@ -2253,11 +2253,13 @@ Changes in the Python API
22532253
* As part of :pep:`487`, the handling of keyword arguments passed to
22542254
:class:`type` (other than the metaclass hint, ``metaclass``) is now
22552255
consistently delegated to :meth:`object.__init_subclass__`. This means that
2256-
:meth:`type.__new__` and :meth:`type.__init__` both now accept arbitrary
2257-
keyword arguments, but :meth:`object.__init_subclass__` (which is called from
2258-
:meth:`type.__new__`) will reject them by default. Custom metaclasses
2259-
accepting additional keyword arguments will need to adjust their calls to
2260-
:meth:`type.__new__` (whether direct or via :class:`super`) accordingly.
2256+
:meth:`type.__new__ <object.__new__>` and :meth:`type.__init__
2257+
<object.__init__>` both now accept arbitrary keyword arguments,
2258+
but :meth:`object.__init_subclass__` (which is called from
2259+
:meth:`type.__new__ <object.__new__>`) will reject them by default.
2260+
Custom metaclasses accepting additional keyword arguments will need to adjust
2261+
their calls to :meth:`type.__new__ <object.__new__>`
2262+
(whether direct or via :class:`super`) accordingly.
22612263

22622264
* In ``distutils.command.sdist.sdist``, the ``default_format``
22632265
attribute has been removed and is no longer honored. Instead, the
@@ -2305,7 +2307,7 @@ Changes in the Python API
23052307
real-world compatibility.
23062308
(Contributed by Lita Cho in :issue:`21815`.)
23072309

2308-
* The :func:`mmap.write() <mmap.write>` function now returns the number
2310+
* The :func:`mmap.mmap.write` function now returns the number
23092311
of bytes written like other write methods.
23102312
(Contributed by Jakub Stasiak in :issue:`26335`.)
23112313

0 commit comments

Comments
 (0)