@@ -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
927927The 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
931931The new :class: `~collections.abc.AsyncGenerator ` abstract base class represents
@@ -971,7 +971,7 @@ datetime
971971--------
972972
973973The :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
975975when necessary. Many functions in the :mod: `datetime ` have been
976976updated to support local time disambiguation.
977977See :ref: `Local Time Disambiguation <whatsnew36-pep495 >` section for more
@@ -1052,12 +1052,12 @@ enum
10521052----
10531053
10541054Two 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
10561056constants that can be combined using the bitwise operators.
10571057(Contributed by Ethan Furman in :issue: `23591 `.)
10581058
10591059Many 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
10621062The new :class: `enum.auto ` value can be used to assign values to enum
10631063members automatically::
@@ -1275,7 +1275,7 @@ See the summary of :ref:`PEP 519 <whatsnew36-pep519>` for details on how the
12751275
12761276A 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 `
12791279iterator is neither exhausted nor explicitly closed a :exc: `ResourceWarning `
12801280will 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
14341434protocol.
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
14391439the :class: `io.BufferedIOBase ` writable interface. In particular,
14401440calling :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
14651465get a list of enabled ciphers in order of cipher priority.
14661466
14671467All 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
14711471Server and client-side specific TLS protocols for :class: `~ssl.SSLContext `
@@ -1531,8 +1531,8 @@ Stéphane Wirtel in :issue:`25485`).
15311531time
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
15381538timeit
@@ -1551,12 +1551,12 @@ between best and worst times.
15511551tkinter
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
15601560not work in future versions of Tcl.
15611561(Contributed by Serhiy Storchaka in :issue: `22115 `).
15621562
@@ -1674,8 +1674,8 @@ urllib.request
16741674
16751675If a HTTP request has a file or iterable body (other than a
16761676bytes 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
17011701A 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
17071707When 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
19421942generate a :exc: `DeprecationWarning `, and will trigger a :exc: `RuntimeError `
19431943in 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
19461946iterator directly instead of returning an awaitable as previously.
19471947Doing the former will trigger a :exc: `DeprecationWarning `. Backward
19481948compatibility 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