.. bpo: 35746
.. date: 2019-01-15-18-16-05
.. nonce: nMSd0j
.. release date: 2019-02-03
.. section: Security

[CVE-2019-5010] Fix a NULL pointer deref in ssl module. The cert parser did
not handle CRL distribution points with empty DP or URI correctly. A
malicious or buggy certificate can result into segfault. Vulnerability
(TALOS-2018-0758) reported by Colin Read and Nicolas Edet of Cisco.

..

.. bpo: 34812
.. date: 2018-11-23-15-00-23
.. nonce: 84VQnb
.. section: Security

The :option:`-I` command line option (run Python in isolated mode) is now
also copied by the :mod:`multiprocessing` and :mod:`distutils` modules when
spawning child processes. Previously, only :option:`-E` and :option:`-s`
options (enabled by :option:`-I`) were copied.

..

.. bpo: 34791
.. date: 2018-09-24-18-49-25
.. nonce: 78GmIG
.. section: Security

The xml.sax and xml.dom.domreg no longer use environment variables to
override parser implementations when sys.flags.ignore_environment is set by
-E or -I arguments.

..

.. bpo: 17239
.. date: 2018-09-11-18-30-55
.. nonce: kOpwK2
.. section: Security

The xml.sax and xml.dom.minidom parsers no longer processes external
entities by default. External DTD and ENTITY declarations no longer load
files or create network connections.

..

.. bpo: 34623
.. date: 2018-09-10-16-05-39
.. nonce: Ua9jMv
.. section: Security

CVE-2018-14647: The C accelerated _elementtree module now initializes hash
randomization salt from _Py_HashSecret instead of libexpat's default CSPRNG.

..

.. bpo: 34405
.. date: 2018-08-15-12-12-47
.. nonce: qbHTH_
.. section: Security

Updated to OpenSSL 1.1.0i for Windows builds.

..

.. bpo: 33871
.. date: 2018-06-26-19-35-33
.. nonce: S4HR9n
.. section: Security

Fixed sending the part of the file in :func:`os.sendfile` on macOS.  Using
the *trailers* argument could cause sending more bytes from the input file
than was specified.

..

.. bpo: 32533
.. date: 2018-05-28-08-55-30
.. nonce: IzwkBI
.. section: Security

Fixed thread-safety of error handling in _ssl.

..

.. bpo: 33136
.. date: 2018-03-25-12-05-43
.. nonce: TzSN4x
.. section: Security

Harden ssl module against LibreSSL CVE-2018-8970.
X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new test
ensures that NULL bytes are not allowed.

..

.. bpo: 33001
.. date: 2018-03-05-10-09-51
.. nonce: elj4Aa
.. section: Security

Minimal fix to prevent buffer overrun in os.symlink on Windows

..

.. bpo: 32981
.. date: 2018-03-02-10-24-52
.. nonce: O_qDyj
.. section: Security

Regexes in difflib and poplib were vulnerable to catastrophic backtracking.
These regexes formed potential DOS vectors (REDOS). They have been
refactored. This resolves CVE-2018-1060 and CVE-2018-1061. Patch by Jamie
Davis.

..

.. bpo: 28414
.. date: 2017-08-06-14-43-45
.. nonce: mzZ6vD
.. section: Security

The ssl module now allows users to perform their own IDN en/decoding when
using SNI.

..

.. bpo: 35877
.. date: 2019-02-01-22-38-11
.. nonce: Jrse8f
.. section: Core and Builtins

Make parenthesis optional for named expressions in while statement. Patch by
Karthikeyan Singaravelan.

..

.. bpo: 35814
.. date: 2019-01-24-13-25-21
.. nonce: r_MjA6
.. section: Core and Builtins

Allow same right hand side expressions in annotated assignments as in normal
ones. In particular, ``x: Tuple[int, int] = 1, 2`` (without parentheses on
the right) is now allowed.

..

.. bpo: 35766
.. date: 2019-01-22-19-17-27
.. nonce: gh1tHZ
.. section: Core and Builtins

Add the option to parse PEP 484 type comments in the ast module. (Off by
default.) This is merging the key functionality of the third party fork
thereof, [typed_ast](https://github.com/python/typed_ast).

..

.. bpo: 35713
.. date: 2019-01-22-18-50-21
.. nonce: bTeUsa
.. section: Core and Builtins

Reorganize Python initialization to get working exceptions and sys.stderr
earlier.

..

.. bpo: 33416
.. date: 2019-01-19-19-41-53
.. nonce: VDeOU5
.. section: Core and Builtins

Add end line and end column position information to the Python AST nodes.
This is a C-level backwards incompatible change.

..

.. bpo: 35720
.. date: 2019-01-12-23-33-04
.. nonce: LELKQx
.. section: Core and Builtins

Fixed a minor memory leak in pymain_parse_cmdline_impl function in
Modules/main.c

..

.. bpo: 35634
.. date: 2019-01-05-18-39-49
.. nonce: nVP_gs
.. section: Core and Builtins

``func(**kwargs)`` will now raise an error when ``kwargs`` is a mapping
containing multiple entries with the same key. An error was already raised
when other keyword arguments are passed before ``**kwargs`` since Python
3.6.

..

.. bpo: 35623
.. date: 2018-12-31-02-37-20
.. nonce: 24AQhY
.. section: Core and Builtins

Fix a crash when sorting very long lists. Patch by Stephan Hohe.

..

.. bpo: 35214
.. date: 2018-12-30-15-36-23
.. nonce: GWDQcv
.. section: Core and Builtins

clang Memory Sanitizer build instrumentation was added to work around false
positives from posix, socket, time, test_io, and test_faulthandler.

..

.. bpo: 35560
.. date: 2018-12-22-22-19-51
.. nonce: 9vMWSP
.. section: Core and Builtins

Fix an assertion error in :func:`format` in debug build for floating point
formatting with "n" format, zero padding and small width. Release build is
not impacted. Patch by Karthikeyan Singaravelan.

..

.. bpo: 35552
.. date: 2018-12-21-13-29-30
.. nonce: 1DzQQc
.. section: Core and Builtins

Format characters ``%s`` and ``%V`` in :c:func:`PyUnicode_FromFormat` and
``%s`` in :c:func:`PyBytes_FromFormat` no longer read memory past the limit
if *precision* is specified.

..

.. bpo: 35504
.. date: 2018-12-15-14-01-45
.. nonce: JtKczP
.. section: Core and Builtins

Fix segfaults and :exc:`SystemError`\ s when deleting certain attributes.
Patch by Zackery Spytz.

..

.. bpo: 35504
.. date: 2018-12-15-00-47-41
.. nonce: 9gVuen
.. section: Core and Builtins

Fixed a SystemError when delete the characters_written attribute of an
OSError.

..

.. bpo: 35494
.. date: 2018-12-14-18-02-34
.. nonce: IWOPtb
.. section: Core and Builtins

Improved syntax error messages for unbalanced parentheses in f-string.

..

.. bpo: 35444
.. date: 2018-12-09-13-09-39
.. nonce: 9kYn4V
.. section: Core and Builtins

Fixed error handling in pickling methods when fail to look up builtin
"getattr". Sped up pickling iterators.

..

.. bpo: 35436
.. date: 2018-12-07-02-38-01
.. nonce: 0VW7p9
.. section: Core and Builtins

Fix various issues with memory allocation error handling.  Patch by Zackery
Spytz.

..

.. bpo: 35423
.. date: 2018-12-05-16-24-05
.. nonce: UIie_O
.. section: Core and Builtins

Separate the signal handling trigger in the eval loop from the "pending
calls" machinery. There is no semantic change and the difference in
performance is insignificant.

..

.. bpo: 35357
.. date: 2018-12-03-21-20-24
.. nonce: rhhoiC
.. section: Core and Builtins

Internal attributes' names of unittest.mock._Call and
unittest.mock.MagicProxy (name, parent & from_kall) are now prefixed with
_mock_ in order to prevent clashes with widely used object attributes. Fixed
minor typo in test function name.

..

.. bpo: 35372
.. date: 2018-12-01-19-20-53
.. nonce: RwVJjZ
.. section: Core and Builtins

Fixed the code page decoder for input longer than 2 GiB containing
undecodable bytes.

..

.. bpo: 35336
.. date: 2018-11-29-23-59-52
.. nonce: 8LOz4F
.. section: Core and Builtins

Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the C locale if
the LC_CTYPE locale is "C".

..

.. bpo: 31241
.. date: 2018-11-21-14-05-51
.. nonce: Kin10-
.. section: Core and Builtins

The *lineno* and *col_offset* attributes of AST nodes for list
comprehensions, generator expressions and tuples are now point to the
opening parenthesis or square brace. For tuples without parenthesis they
point to the position of the first item.

..

.. bpo: 33954
.. date: 2018-11-20-22-33-38
.. nonce: RzSngM
.. section: Core and Builtins

For :meth:`str.format`, :meth:`float.__format__` and
:meth:`complex.__format__` methods for non-ASCII decimal point when using
the "n" formatter.

..

.. bpo: 35269
.. date: 2018-11-17-10-18-29
.. nonce: gjm1LO
.. section: Core and Builtins

Fix a possible segfault involving a newly-created coroutine.  Patch by
Zackery Spytz.

..

.. bpo: 35224
.. date: 2018-11-13-14-26-54
.. nonce: F0B6UQ
.. section: Core and Builtins

Implement :pep:`572` (assignment expressions). Patch by Emily Morehouse.

..

.. bpo: 32492
.. date: 2018-11-13-01-03-10
.. nonce: voIdcp
.. section: Core and Builtins

Speed up :class:`namedtuple` attribute access by 1.6x using a C fast-path
for the name descriptors. Patch by Pablo Galindo.

..

.. bpo: 35214
.. date: 2018-11-13-00-40-35
.. nonce: OQBjph
.. section: Core and Builtins

Fixed an out of bounds memory access when parsing a truncated unicode escape
sequence at the end of a string such as ``'\N'``.  It would read one byte
beyond the end of the memory allocation.

..

.. bpo: 35214
.. date: 2018-11-12-11-38-06
.. nonce: PCHKbX
.. section: Core and Builtins

The interpreter and extension modules have had annotations added so that
they work properly under clang's Memory Sanitizer.  A new configure flag
--with-memory-sanitizer has been added to make test builds of this nature
easier to perform.

..

.. bpo: 35193
.. date: 2018-11-08-15-00-58
.. nonce: HzPS6R
.. section: Core and Builtins

Fix an off by one error in the bytecode peephole optimizer where it could
read bytes beyond the end of bounds of an array when removing unreachable
code. This bug was present in every release of Python 3.6 and 3.7 until now.

..

.. bpo: 35169
.. date: 2018-11-05-21-19-05
.. nonce: _FyPI2
.. section: Core and Builtins

Improved error messages for forbidden assignments.

..

.. bpo: 34022
.. date: 2018-11-04-18-13-40
.. nonce: U3btVj
.. section: Core and Builtins

Fix handling of hash-based bytecode files in :mod:`zipimport`. Patch by
Elvis Pranskevichus.

..

.. bpo: 28401
.. date: 2018-11-03-10-37-29
.. nonce: RprDIg
.. section: Core and Builtins

Debug builds will no longer to attempt to import extension modules built for
the ABI as they were never compatible to begin with. Patch by Stefano
Rivera.

..

.. bpo: 29341
.. date: 2018-10-25-20-53-32
.. nonce: jH-AMF
.. section: Core and Builtins

Clarify in the docstrings of :mod:`os` methods that path-like objects are
also accepted as input parameters.

..

.. bpo: 35050
.. date: 2018-10-23-15-03-53
.. nonce: 49wraS
.. section: Core and Builtins

:mod:`socket`: Fix off-by-one bug in length check for ``AF_ALG`` name and
type.

..

.. bpo: 29743
.. date: 2018-10-21-17-43-48
.. nonce: aeCcKR
.. section: Core and Builtins

Raise :exc:`ValueError` instead of :exc:`OverflowError` in case of a
negative ``_length_`` in a :class:`ctypes.Array` subclass.  Also raise
:exc:`TypeError` instead of :exc:`AttributeError` for non-integer
``_length_``. Original patch by Oren Milman.

..

.. bpo: 16806
.. date: 2018-10-20-18-05-58
.. nonce: zr3A9N
.. section: Core and Builtins

Fix ``lineno`` and ``col_offset`` for multi-line string tokens.

..

.. bpo: 35029
.. date: 2018-10-20-10-26-15
.. nonce: t4tZcQ
.. section: Core and Builtins

:exc:`SyntaxWarning` raised as an exception at code generation time will be
now replaced with a :exc:`SyntaxError` for better error reporting.

..

.. bpo: 34983
.. date: 2018-10-14-17-26-41
.. nonce: l8XaZd
.. section: Core and Builtins

Expose :meth:`symtable.Symbol.is_nonlocal` in the symtable module. Patch by
Pablo Galindo.

..

.. bpo: 34974
.. date: 2018-10-13-22-24-19
.. nonce: 7LgTc2
.. section: Core and Builtins

:class:`bytes` and :class:`bytearray` constructors no longer convert
unexpected exceptions (e.g. :exc:`MemoryError` and :exc:`KeyboardInterrupt`)
to :exc:`TypeError`.

..

.. bpo: 34939
.. date: 2018-10-13-17-40-15
.. nonce: 0gpxlJ
.. section: Core and Builtins

Allow annotated names in module namespace that are declared global before
the annotation happens. Patch by Pablo Galindo.

..

.. bpo: 34973
.. date: 2018-10-13-16-42-03
.. nonce: B5M-3g
.. section: Core and Builtins

Fixed crash in :func:`bytes` when the :class:`list` argument is mutated
while it is iterated.

..

.. bpo: 34876
.. date: 2018-10-06-14-02-51
.. nonce: oBKBA4
.. section: Core and Builtins

The *lineno* and *col_offset* attributes of the AST for decorated function
and class refer now to the position of the corresponding ``def``, ``async
def`` and ``class`` instead of the position of the first decorator. This
leads to more correct line reporting in tracing. This is the only case when
the position of child AST nodes can precede the position of the parent AST
node.

..

.. bpo: 34879
.. date: 2018-10-02-22-55-11
.. nonce: 7VNH2a
.. section: Core and Builtins

Fix a possible null pointer dereference in bytesobject.c.  Patch by Zackery
Spytz.

..

.. bpo: 34784
.. date: 2018-10-02-09-10-47
.. nonce: 07hdgD
.. section: Core and Builtins

Fix the implementation of PyStructSequence_NewType in order to create heap
allocated StructSequences.

..

.. bpo: 32912
.. date: 2018-10-01-10-41-53
.. nonce: JeIOdM
.. section: Core and Builtins

A :exc:`SyntaxWarning` is now emitted instead of a :exc:`DeprecationWarning`
for invalid escape sequences in string and bytes literals.

..

.. bpo: 34854
.. date: 2018-09-30-19-27-13
.. nonce: 6TKTcB
.. section: Core and Builtins

Fixed a crash in compiling string annotations containing a lambda with a
keyword-only argument that doesn't have a default value.

..

.. bpo: 34850
.. date: 2018-09-30-11-19-55
.. nonce: CbgDwb
.. section: Core and Builtins

The compiler now produces a :exc:`SyntaxWarning` when identity checks
(``is`` and ``is not``) are used with certain types of literals (e.g.
strings, ints).  These can often work by accident in CPython, but are not
guaranteed by the language spec.  The warning advises users to use equality
tests (``==`` and ``!=``) instead.

..

.. bpo: 34824
.. date: 2018-09-27-11-10-02
.. nonce: VLlCaU
.. section: Core and Builtins

Fix a possible null pointer dereference in Modules/_ssl.c. Patch by Zackery
Spytz.

..

.. bpo: 30156
.. date: 2018-09-24-17-51-15
.. nonce: pH0j5j
.. section: Core and Builtins

The C function ``property_descr_get()`` uses a "cached" tuple to optimize
function calls. But this tuple can be discovered in debug mode with
:func:`sys.getobjects()`. Remove the optimization, it's not really worth it
and it causes 3 different crashes last years.

..

.. bpo: 34762
.. date: 2018-09-21-11-06-56
.. nonce: 1nN53m
.. section: Core and Builtins

Fix contextvars C API to use PyObject* pointer types.

..

.. bpo: 34751
.. date: 2018-09-20-15-41-58
.. nonce: Yiv0pV
.. section: Core and Builtins

The hash function for tuples is now based on xxHash which gives better
collision results on (formerly) pathological cases. Additionally, on 64-bit
systems it improves tuple hashes in general. Patch by Jeroen Demeyer with
substantial contributions by Tim Peters.

..

.. bpo: 34735
.. date: 2018-09-19-06-57-34
.. nonce: -3mrSJ
.. section: Core and Builtins

Fix a memory leak in Modules/timemodule.c.  Patch by Zackery Spytz.

..

.. bpo: 34683
.. date: 2018-09-15-19-32-34
.. nonce: msCiQE
.. section: Core and Builtins

Fixed a bug where some SyntaxError error pointed to locations that were
off-by-one.

..

.. bpo: 34651
.. date: 2018-09-13-12-21-08
.. nonce: v-bUeV
.. section: Core and Builtins

Only allow the main interpreter to fork.  The avoids the possibility of
affecting the main interpreter, which is critical to operation of the
runtime.

..

.. bpo: 34653
.. date: 2018-09-13-12-06-09
.. nonce: z8NE-i
.. section: Core and Builtins

Remove unused function PyParser_SimpleParseStringFilename.

..

.. bpo: 32236
.. date: 2018-09-11-23-50-40
.. nonce: 3RupnN
.. section: Core and Builtins

Warn that line buffering is not supported if :func:`open` is called with
binary mode and ``buffering=1``.

..

.. bpo: 34641
.. date: 2018-09-11-23-12-33
.. nonce: gFBCc9
.. section: Core and Builtins

Further restrict the syntax of the left-hand side of keyword arguments in
function calls. In particular, ``f((keyword)=arg)`` is now disallowed.

..

.. bpo: 34637
.. date: 2018-09-11-17-25-44
.. nonce: HSLqY4
.. section: Core and Builtins

Make the *start* argument to *sum()* visible as a keyword argument.

..

.. bpo: 1621
.. date: 2018-09-11-15-19-37
.. nonce: 7o19yG
.. section: Core and Builtins

Do not assume signed integer overflow behavior (C undefined behavior) when
performing set hash table resizing.

..

.. bpo: 34588
.. date: 2018-09-05-22-56-52
.. nonce: UIuPmL
.. section: Core and Builtins

Fix an off-by-one in the recursive call pruning feature of traceback
formatting.

..

.. bpo: 34485
.. date: 2018-08-29-11-04-19
.. nonce: c2AFdp
.. section: Core and Builtins

On Windows, the LC_CTYPE is now set to the user preferred locale at startup.
Previously, the LC_CTYPE locale was "C" at startup, but changed when calling
setlocale(LC_CTYPE, "") or setlocale(LC_ALL, "").

..

.. bpo: 34485
.. date: 2018-08-29-09-27-47
.. nonce: 5aJCmw
.. section: Core and Builtins

Standard streams like sys.stdout now use the "surrogateescape" error
handler, instead of "strict", on the POSIX locale (when the C locale is not
coerced and the UTF-8 Mode is disabled).

..

.. bpo: 34485
.. date: 2018-08-28-23-01-14
.. nonce: dq1Kqk
.. section: Core and Builtins

Fix the error handler of standard streams like sys.stdout:
PYTHONIOENCODING=":" is now ignored instead of setting the error handler to
"strict".

..

.. bpo: 34485
.. date: 2018-08-28-17-48-40
.. nonce: aFwck2
.. section: Core and Builtins

Python now gets the locale encoding with C code to initialize the encoding
of standard streams like sys.stdout. Moreover, the encoding is now
initialized to the Python codec name to get a normalized encoding name and
to ensure that the codec is loaded. The change avoids importing _bootlocale
and _locale modules at startup by default.

..

.. bpo: 34527
.. date: 2018-08-28-11-53-39
.. nonce: aBEX9b
.. section: Core and Builtins

On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also forces the
ASCII encoding if the LC_CTYPE locale is "POSIX", not only if the LC_CTYPE
locale is "C".

..

.. bpo: 34527
.. date: 2018-08-28-11-52-13
.. nonce: sh5MQJ
.. section: Core and Builtins

The UTF-8 Mode is now also enabled by the "POSIX" locale, not only by the
"C" locale.

..

.. bpo: 34403
.. date: 2018-08-28-10-49-55
.. nonce: 4Q3LzP
.. section: Core and Builtins

On HP-UX with C or POSIX locale, sys.getfilesystemencoding() now returns
"ascii" instead of "roman8" (when the UTF-8 Mode is disabled and the C
locale is not coerced).

..

.. bpo: 34523
.. date: 2018-08-28-01-45-01
.. nonce: aUUkc3
.. section: Core and Builtins

The Python filesystem encoding is now read earlier during the Python
initialization.

..

.. bpo: 12458
.. date: 2018-08-15-20-46-49
.. nonce: ApHbx5
.. section: Core and Builtins

Tracebacks show now correct line number for subexpressions in multiline
expressions. Tracebacks show now the line number of the first line for
multiline expressions instead of the line number of the last subexpression.

..

.. bpo: 34408
.. date: 2018-08-14-22-35-19
.. nonce: aomWYW
.. section: Core and Builtins

Prevent a null pointer dereference and resource leakage in
``PyInterpreterState_New()``.

..

.. bpo: 34400
.. date: 2018-08-14-03-52-43
.. nonce: AJD0bz
.. section: Core and Builtins

Fix undefined behavior in parsetok.c.  Patch by Zackery Spytz.

..

.. bpo: 33073
.. date: 2018-08-12-16-03-58
.. nonce: XWu1Jh
.. section: Core and Builtins

Added as_integer_ratio to ints to make them more interoperable with floats.

..

.. bpo: 34377
.. date: 2018-08-10-15-05-00
.. nonce: EJMMY4
.. section: Core and Builtins

Update valgrind suppression list to use
``_PyObject_Free``/``_PyObject_Realloc`` instead of
``PyObject_Free``/``PyObject_Realloc``.

..

.. bpo: 34353
.. date: 2018-08-09-18-42-49
.. nonce: GIOm_8
.. section: Core and Builtins

Added the "socket" option in the `stat.filemode()` Python implementation to
match the C implementation.

..

.. bpo: 34320
.. date: 2018-08-02-22-34-59
.. nonce: hNshAA
.. section: Core and Builtins

Fix ``dict(od)`` didn't copy iteration order of OrderedDict.

..

.. bpo: 34113
.. date: 2018-07-28-10-34-00
.. nonce: eZ5FWV
.. section: Core and Builtins

Fixed crash on debug builds when opcode stack was adjusted with negative
numbers. Patch by Constantin Petrisor.

..

.. bpo: 34100
.. date: 2018-07-27-20-04-52
.. nonce: ypJQX1
.. section: Core and Builtins

Compiler now merges constants in tuples and frozensets recursively. Code
attributes like ``co_names`` are merged too.

..

.. bpo: 34151
.. date: 2018-07-25-20-26-02
.. nonce: Q2pK9Q
.. section: Core and Builtins

Performance of list concatenation, repetition and slicing operations is
slightly improved. Patch by Sergey Fedoseev.

..

.. bpo: 34170
.. date: 2018-07-25-19-23-33
.. nonce: v1h_H2
.. section: Core and Builtins

-X dev: it is now possible to override the memory allocator using
PYTHONMALLOC even if the developer mode is enabled.

..

.. bpo: 33237
.. date: 2018-07-24-12-54-57
.. nonce: O95mps
.. section: Core and Builtins

Improved :exc:`AttributeError` message for partially initialized module.

..

.. bpo: 34149
.. date: 2018-07-23-21-49-05
.. nonce: WSV-_g
.. section: Core and Builtins

Fix min and max functions to get default behavior when key is None.

..

.. bpo: 34125
.. date: 2018-07-23-16-34-03
.. nonce: jCl2Q2
.. section: Core and Builtins

Profiling of unbound built-in methods now works when ``**kwargs`` is given.

..

.. bpo: 34141
.. date: 2018-07-18-08-36-58
.. nonce: Fo7Q5r
.. section: Core and Builtins

Optimized pickling atomic types (None, bool, int, float, bytes, str).

..

.. bpo: 34126
.. date: 2018-07-16-20-55-29
.. nonce: mBVmgc
.. section: Core and Builtins

Fix crashes when profiling certain invalid calls of unbound methods. Patch
by Jeroen Demeyer.

..

.. bpo: 24618
.. date: 2018-07-14-14-01-37
.. nonce: iTKjD_
.. section: Core and Builtins

Fixed reading invalid memory when create the code object with too small
varnames tuple or too large argument counts.

..

.. bpo: 34068
.. date: 2018-07-14-08-58-46
.. nonce: 9xfM55
.. section: Core and Builtins

In :meth:`io.IOBase.close`, ensure that the :attr:`~io.IOBase.closed`
attribute is not set with a live exception.  Patch by Zackery Spytz and
Serhiy Storchaka.

..

.. bpo: 34087
.. date: 2018-07-13-22-09-55
.. nonce: I1Bxfc
.. section: Core and Builtins

Fix buffer overflow while converting unicode to numeric values.

..

.. bpo: 34080
.. date: 2018-07-10-11-24-16
.. nonce: 8t7PtO
.. section: Core and Builtins

Fixed a memory leak in the compiler when it raised some uncommon errors
during tokenizing.

..

.. bpo: 34066
.. date: 2018-07-07-20-15-34
.. nonce: y9vs6s
.. section: Core and Builtins

Disabled interruption by Ctrl-C between calling ``open()`` and entering a
**with** block in ``with open()``.

..

.. bpo: 34042
.. date: 2018-07-05-15-51-29
.. nonce: Gr9XUH
.. section: Core and Builtins

Fix dict.copy() to maintain correct total refcount (as reported by
sys.gettotalrefcount()).

..

.. bpo: 33418
.. date: 2018-07-03-19-00-10
.. nonce: cfGm3n
.. section: Core and Builtins

Fix potential memory leak in function object when it creates reference
cycle.

..

.. bpo: 33985
.. date: 2018-06-27-18-56-41
.. nonce: ILJ3Af
.. section: Core and Builtins

Implement contextvars.ContextVar.name attribute.

..

.. bpo: 33956
.. date: 2018-06-25-20-42-44
.. nonce: 1qoTwD
.. section: Core and Builtins

Update vendored Expat library copy to version 2.2.5.

..

.. bpo: 24596
.. date: 2018-06-25-16-54-05
.. nonce: Rkwova
.. section: Core and Builtins

Decref the module object in :c:func:`PyRun_SimpleFileExFlags` before calling
:c:func:`PyErr_Print()`.  Patch by Zackery Spytz.

..

.. bpo: 33451
.. date: 2018-06-23-15-32-02
.. nonce: sWN-1l
.. section: Core and Builtins

Close directly executed pyc files before calling ``PyEval_EvalCode()``.

..

.. bpo: 1617161
.. date: 2018-06-21-21-42-15
.. nonce: tSo2yM
.. section: Core and Builtins

The hash of :class:`BuiltinMethodType` instances (methods of built-in
classes) now depends on the hash of the identity of *__self__* instead of
its value. The hash and equality of :class:`ModuleType` and
:class:`MethodWrapperType` instances (methods of user-defined classes and
some methods of built-in classes like ``str.__add__``) now depend on the
hash and equality of the identity of *__self__* instead of its value.
:class:`MethodWrapperType` instances no longer support ordering.

..

.. bpo: 33824
.. date: 2018-06-15-19-39-06
.. nonce: DfWHT3
.. section: Core and Builtins

Fix "LC_ALL=C python3.7 -V": reset properly the command line parser when the
encoding changes after reading the Python configuration.

..

.. bpo: 33803
.. date: 2018-06-07-20-18-38
.. nonce: n-Nq6_
.. section: Core and Builtins

Fix a crash in hamt.c caused by enabling GC tracking for an object that
hadn't all of its fields set to NULL.

..

.. bpo: 33738
.. date: 2018-06-07-18-34-19
.. nonce: ODZS7a
.. section: Core and Builtins

Seven macro incompatibilities with the Limited API were fixed, and the
macros :c:func:`PyIter_Check`, :c:func:`PyIndex_Check` and
:c:func:`PyExceptionClass_Name` were added as functions. A script for
automatic macro checks was added.

..

.. bpo: 33786
.. date: 2018-06-06-23-24-40
.. nonce: lBvT8z
.. section: Core and Builtins

Fix asynchronous generators to handle GeneratorExit in athrow() correctly

..

.. bpo: 30167
.. date: 2018-06-05-15-49-02
.. nonce: e956hA
.. section: Core and Builtins

``PyRun_SimpleFileExFlags`` removes ``__cached__`` from module in addition
to ``__file__``.

..

.. bpo: 33706
.. date: 2018-05-31-14-50-04
.. nonce: ztlH04
.. section: Core and Builtins

Fix a crash in Python initialization when parsing the command line options.
Thanks Christoph Gohlke for the bug report and the fix!

..

.. bpo: 33597
.. date: 2018-05-28-21-17-31
.. nonce: r0ToM4
.. section: Core and Builtins

Reduce ``PyGC_Head`` size from 3 words to 2 words.

..

.. bpo: 30654
.. date: 2018-05-28-12-28-53
.. nonce: 9fDJye
.. section: Core and Builtins

Fixed reset of the SIGINT handler to SIG_DFL on interpreter shutdown even
when there was a custom handler set previously. Patch by Philipp Kerling.

..

.. bpo: 33622
.. date: 2018-05-23-20-46-14
.. nonce: xPucO9
.. section: Core and Builtins

Fixed a leak when the garbage collector fails to add an object with the
``__del__`` method or referenced by it into the :data:`gc.garbage` list.
:c:func:`PyGC_Collect` can now be called when an exception is set and
preserves it.

..

.. bpo: 33462
.. date: 2018-05-23-17-18-02
.. nonce: gurbpbrhe
.. section: Core and Builtins

Make dict and dict views reversible. Patch by Rémi Lapeyre.

..

.. bpo: 23722
.. date: 2018-05-17-13-06-36
.. nonce: xisqZk
.. section: Core and Builtins

A :exc:`RuntimeError` is now raised when the custom metaclass doesn't
provide the ``__classcell__`` entry in the namespace passed to
``type.__new__``.  A :exc:`DeprecationWarning` was emitted in Python
3.6--3.7.

..

.. bpo: 33499
.. date: 2018-05-15-10-48-47
.. nonce: uBEc06
.. section: Core and Builtins

Add :envvar:`PYTHONPYCACHEPREFIX` environment variable and :option:`-X`
``pycache_prefix`` command-line option to set an alternate root directory
for writing module bytecode cache files.

..

.. bpo: 25711
.. date: 2018-05-14-18-54-03
.. nonce: 9xfq-v
.. section: Core and Builtins

The :mod:`zipimport` module has been rewritten in pure Python.

..

.. bpo: 33509
.. date: 2018-05-14-17-31-02
.. nonce: pIUfTd
.. section: Core and Builtins

Fix module_globals parameter of warnings.warn_explicit(): don't crash if
module_globals is not a dict.

..

.. bpo: 31849
.. date: 2018-05-14-11-00-00
.. nonce: EmHaH4
.. section: Core and Builtins

Fix signed/unsigned comparison warning in pyhash.c.

..

.. bpo: 33475
.. date: 2018-05-13-01-26-18
.. nonce: rI0y1U
.. section: Core and Builtins

Fixed miscellaneous bugs in converting annotations to strings and optimized
parentheses in the string representation.

..

.. bpo: 20104
.. date: 2018-05-05-23-26-58
.. nonce: tDBciE
.. section: Core and Builtins

Added support for the `setpgroup`, `resetids`, `setsigmask`, `setsigdef` and
`scheduler` parameters of `posix_spawn`. Patch by Pablo Galindo.

..

.. bpo: 33391
.. date: 2018-05-02-08-36-03
.. nonce: z4a7rb
.. section: Core and Builtins

Fix a leak in set_symmetric_difference().

..

.. bpo: 33363
.. date: 2018-04-26-22-48-28
.. nonce: 8RCnN2
.. section: Core and Builtins

Raise a SyntaxError for ``async with`` and ``async for`` statements outside
of async functions.

..

.. bpo: 28055
.. date: 2018-04-25-20-44-42
.. nonce: f49kfC
.. section: Core and Builtins

Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer.

..

.. bpo: 33128
.. date: 2018-04-24-22-31-04
.. nonce: g2yLuf
.. section: Core and Builtins

Fix a bug that causes PathFinder to appear twice on sys.meta_path. Patch by
Pablo Galindo Salgado.

..

.. bpo: 33331
.. date: 2018-04-22-13-41-59
.. nonce: s_DxdL
.. section: Core and Builtins

Modules imported last are now cleared first at interpreter shutdown.

..

.. bpo: 33312
.. date: 2018-04-19-08-30-07
.. nonce: mDe2iL
.. section: Core and Builtins

Fixed clang ubsan (undefined behavior sanitizer) warnings in dictobject.c by
adjusting how the internal struct _dictkeysobject shared keys structure is
declared.

..

.. bpo: 33305
.. date: 2018-04-18-14-17-44
.. nonce: 9z3dDH
.. section: Core and Builtins

Improved syntax error messages for invalid numerical literals.

..

.. bpo: 33306
.. date: 2018-04-18-12-23-30
.. nonce: tSM3cp
.. section: Core and Builtins

Improved syntax error messages for unbalanced parentheses.

..

.. bpo: 33234
.. date: 2018-04-17-01-24-51
.. nonce: l9IDtp
.. section: Core and Builtins

The list constructor will pre-size and not over-allocate when the input
length is known.

..

.. bpo: 33270
.. date: 2018-04-14-13-12-50
.. nonce: UmVV6i
.. section: Core and Builtins

Intern the names for all anonymous code objects.  Patch by Zackery Spytz.

..

.. bpo: 30455
.. date: 2018-04-14-11-02-57
.. nonce: ANRwjo
.. section: Core and Builtins

The C and Python code and the documentation related to tokens are now
generated from a single source file :file:`Grammar/Tokens`.

..

.. bpo: 33176
.. date: 2018-04-13-22-31-09
.. nonce: PB9com
.. section: Core and Builtins

Add a ``toreadonly()`` method to memoryviews.

..

.. bpo: 33231
.. date: 2018-04-05-22-20-44
.. nonce: 3Jmo0q
.. section: Core and Builtins

Fix potential memory leak in ``normalizestring()``.

..

.. bpo: 33205
.. date: 2018-04-03-00-58-41
.. nonce: lk2F3r
.. section: Core and Builtins

Change dict growth function from
``round_up_to_power_2(used*2+hashtable_size/2)`` to
``round_up_to_power_2(used*3)``.  Previously, dict is shrinked only when
``used == 0``. Now dict has more chance to be shrinked.

..

.. bpo: 29922
.. date: 2018-04-03-00-30-25
.. nonce: CdLuMl
.. section: Core and Builtins

Improved error messages in 'async with' when ``__aenter__()`` or
``__aexit__()`` return non-awaitable object.

..

.. bpo: 33199
.. date: 2018-04-02-09-32-40
.. nonce: TPnxQu
.. section: Core and Builtins

Fix ``ma_version_tag`` in dict implementation is uninitialized when copying
from key-sharing dict.

..

.. bpo: 33053
.. date: 2018-03-25-19-49-06
.. nonce: V3xlsH
.. section: Core and Builtins

When using the -m switch, sys.path[0] is now explicitly expanded as the
*starting* working directory, rather than being left as the empty path
(which allows imports from the current working directory at the time of the
import)

..

.. bpo: 33138
.. date: 2018-03-25-19-25-14
.. nonce: aSqudH
.. section: Core and Builtins

Changed standard error message for non-pickleable and non-copyable types. It
now says "cannot pickle" instead of "can't pickle" or "cannot serialize".

..

.. bpo: 33018
.. date: 2018-03-22-23-09-06
.. nonce: 0ncEJV
.. section: Core and Builtins

Improve consistency of errors raised by ``issubclass()`` when called with a
non-class and an abstract base class as the first and second arguments,
respectively. Patch by Josh Bronson.

..

.. bpo: 33083
.. date: 2018-03-19-00-59-20
.. nonce: Htztjl
.. section: Core and Builtins

``math.factorial`` no longer accepts arguments that are not int-like. Patch
by Pablo Galindo.

..

.. bpo: 33041
.. date: 2018-03-18-13-56-14
.. nonce: XwPhI2
.. section: Core and Builtins

Added new opcode :opcode:`END_ASYNC_FOR` and fixes the following issues:

* Setting global :exc:`StopAsyncIteration` no longer breaks ``async for``
  loops.
* Jumping into an ``async for`` loop is now disabled.
* Jumping out of an ``async for`` loop no longer corrupts the stack.

..

.. bpo: 25750
.. date: 2018-03-14-21-42-17
.. nonce: lxgkQz
.. section: Core and Builtins

Fix rare Python crash due to bad refcounting in ``type_getattro()`` if a
descriptor deletes itself from the class. Patch by Jeroen Demeyer.

..

.. bpo: 33041
.. date: 2018-03-10-15-16-40
.. nonce: -ak5Fk
.. section: Core and Builtins

Fixed bytecode generation for "async for" with a complex target. A
StopAsyncIteration raised on assigning or unpacking will be now propagated
instead of stopping the iteration.

..

.. bpo: 33026
.. date: 2018-03-08-09-48-38
.. nonce: QZA3Ba
.. section: Core and Builtins

Fixed jumping out of "with" block by setting f_lineno.

..

.. bpo: 33005
.. date: 2018-03-06-12-19-19
.. nonce: LP-V2U
.. section: Core and Builtins

Fix a crash on fork when using a custom memory allocator (ex: using
PYTHONMALLOC env var). _PyGILState_Reinit() and _PyInterpreterState_Enable()
now use the default RAW memory allocator to allocate a new interpreters
mutex on fork.

..

.. bpo: 32911
.. date: 2018-02-27-20-57-00
.. nonce: cmKfco
.. section: Core and Builtins

Due to unexpected compatibility issues discovered during downstream beta
testing, reverted :issue:`29463`. ``docstring`` field is removed from
Module, ClassDef, FunctionDef, and AsyncFunctionDef ast nodes which was
added in 3.7a1.  Docstring expression is restored as a first statement in
their body. Based on patch by Inada Naoki.

..

.. bpo: 17288
.. date: 2018-02-27-13-36-21
.. nonce: Gdj24S
.. section: Core and Builtins

Prevent jumps from 'return' and 'exception' trace events.

..

.. bpo: 32946
.. date: 2018-02-25-10-52-40
.. nonce: Lo09rG
.. section: Core and Builtins

Importing names from already imported module with "from ... import ..." is
now 30% faster if the module is not a package.

..

.. bpo: 32932
.. date: 2018-02-24-21-51-42
.. nonce: 2cz31L
.. section: Core and Builtins

Make error message more revealing when there are non-str objects in
``__all__``.

..

.. bpo: 32925
.. date: 2018-02-24-00-07-05
.. nonce: e-7Ufh
.. section: Core and Builtins

Optimized iterating and containing test for literal lists consisting of
non-constants: ``x in [a, b]`` and ``for x in [a, b]``. The case of all
constant elements already was optimized.

..

.. bpo: 32889
.. date: 2018-02-20-21-53-48
.. nonce: J6eWy5
.. section: Core and Builtins

Update Valgrind suppression list to account for the rename of
``Py_ADDRESS_IN_RANG`` to ``address_in_range``.

..

.. bpo: 32836
.. date: 2018-02-14-12-35-47
.. nonce: bThJnx
.. section: Core and Builtins

Don't use temporary variables in cases of list/dict/set comprehensions

..

.. bpo: 31356
.. date: 2018-02-02-08-50-46
.. nonce: MNwUOQ
.. section: Core and Builtins

Remove the new API added in bpo-31356 (gc.ensure_disabled() context
manager).

..

.. bpo: 32305
.. date: 2018-02-01-10-56-41
.. nonce: dkU9Qa
.. section: Core and Builtins

For namespace packages, ensure that both ``__file__`` and
``__spec__.origin`` are set to None.

..

.. bpo: 32303
.. date: 2018-02-01-10-16-28
.. nonce: VsvhSl
.. section: Core and Builtins

Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.

..

.. bpo: 32711
.. date: 2018-01-29-14-36-37
.. nonce: 8hQFJP
.. section: Core and Builtins

Fix the warning messages for Python/ast_unparse.c. Patch by Stéphane Wirtel

..

.. bpo: 32583
.. date: 2018-01-26-21-20-21
.. nonce: Fh3fau
.. section: Core and Builtins

Fix possible crashing in builtin Unicode decoders caused by write
out-of-bound errors when using customized decode error handlers.

..

.. bpo: 32489
.. date: 2018-01-03-23-12-43
.. nonce: SDEPHB
.. section: Core and Builtins

A :keyword:`continue` statement is now allowed in the :keyword:`finally`
clause.

..

.. bpo: 17611
.. date: 2017-12-24-19-48-59
.. nonce: P85kWL
.. section: Core and Builtins

Simplified the interpreter loop by moving the logic of unrolling the stack
of blocks into the compiler. The compiler emits now explicit instructions
for adjusting the stack of values and calling the cleaning up code for
:keyword:`break`, :keyword:`continue` and :keyword:`return`.

Removed opcodes :opcode:`BREAK_LOOP`, :opcode:`CONTINUE_LOOP`,
:opcode:`SETUP_LOOP` and :opcode:`SETUP_EXCEPT`. Added new opcodes
:opcode:`ROT_FOUR`, :opcode:`BEGIN_FINALLY` and :opcode:`CALL_FINALLY` and
:opcode:`POP_FINALLY`. Changed the behavior of :opcode:`END_FINALLY` and
:opcode:`WITH_CLEANUP_START`.

..

.. bpo: 32285
.. date: 2017-12-12-13-43-13
.. nonce: LzKSwz
.. section: Core and Builtins

New function unicodedata.is_normalized, which can check whether a string is
in a specific normal form.

..

.. bpo: 10544
.. date: 2017-11-26-00-59-22
.. nonce: fHOM3V
.. section: Core and Builtins

Yield expressions are now disallowed in comprehensions and generator
expressions except the expression for the outermost iterable.

..

.. bpo: 32117
.. date: 2017-11-22-15-43-14
.. nonce: -vloh8
.. section: Core and Builtins

Iterable unpacking is now allowed without parentheses in yield and return
statements, e.g. ``yield 1, 2, 3, *rest``. Thanks to David Cuthbert for the
change and Jordan Chapman for added tests.

..

.. bpo: 31902
.. date: 2017-10-30-12-44-50
.. nonce: a07fa57
.. section: Core and Builtins

Fix the ``col_offset`` attribute for ast nodes ``ast.AsyncFor``,
``ast.AsyncFunctionDef``, and ``ast.AsyncWith``. Previously, ``col_offset``
pointed to the keyword after ``async``.

..

.. bpo: 25862
.. date: 2017-10-07-10-13-15
.. nonce: FPYBA5
.. section: Core and Builtins

Fix assertion failures in the ``tell()`` method of ``io.TextIOWrapper``.
Patch by Zackery Spytz.

..

.. bpo: 21983
.. date: 2017-10-02-21-02-14
.. nonce: UoC319
.. section: Core and Builtins

Fix a crash in `ctypes.cast()` in case the type argument is a ctypes
structured data type. Patch by Eryk Sun and Oren Milman.

..

.. bpo: 31577
.. date: 2017-09-25-20-36-24
.. nonce: jgYsSA
.. section: Core and Builtins

Fix a crash in `os.utime()` in case of a bad ns argument. Patch by Oren
Milman.

..

.. bpo: 29832
.. date: 2017-09-12-08-11-01
.. nonce: Kuf2M7
.. section: Core and Builtins

Remove references to 'getsockaddrarg' from various socket error messages.
Patch by Oren Milman.

..

.. bpo: 35845
.. date: 2019-02-02-00-04-01
.. nonce: 1jx2wk
.. section: Library

Add 'order' parameter to memoryview.tobytes().

..

.. bpo: 35864
.. date: 2019-01-30-20-22-36
.. nonce: ig9KnG
.. section: Library

The _asdict() method for collections.namedtuple now returns a regular dict
instead of an OrderedDict.

..

.. bpo: 35537
.. date: 2019-01-29-17-24-52
.. nonce: Q0ktFC
.. section: Library

An ExitStack is now used internally within subprocess.POpen to clean up pipe
file handles. No behavior change in normal operation. But if closing one
handle were ever to cause an exception, the others will now be closed
instead of leaked.  (patch by Giampaolo Rodola)

..

.. bpo: 35847
.. date: 2019-01-29-09-11-09
.. nonce: eiSi4t
.. section: Library

RISC-V needed the CTYPES_PASS_BY_REF_HACK.  Fixes ctypes Structure
test_pass_by_value.

..

.. bpo: 35813
.. date: 2019-01-23-22-44-37
.. nonce: Yobj-Y
.. section: Library

Shared memory submodule added to multiprocessing to avoid need for
serialization between processes

..

.. bpo: 35780
.. date: 2019-01-19-17-01-43
.. nonce: CLf7fT
.. section: Library

Fix lru_cache() errors arising in recursive, reentrant, or multi-threaded
code. These errors could result in orphan links and in the cache being
trapped in a state with fewer than the specified maximum number of links.
Fix handling of negative maxsize which should have been treated as zero. Fix
errors in toggling the "full" status flag. Fix misordering of links when
errors are encountered.  Sync-up the C code and pure Python code for the
space saving path in functions with a single positional argument. In this
common case, the space overhead of an lru cache entry is reduced by almost
half.  Fix counting of cache misses. In error cases, the miss count was out
of sync with the actual number of times the underlying user function was
called.

..

.. bpo: 35537
.. date: 2019-01-18-13-44-13
.. nonce: R1lbTl
.. section: Library

:func:`os.posix_spawn` and :func:`os.posix_spawnp` now have a *setsid*
parameter.

..

.. bpo: 23846
.. date: 2019-01-15-13-31-30
.. nonce: LT_qL8
.. section: Library

:class:`asyncio.ProactorEventLoop` now catches and logs send errors when the
self-pipe is full.

..

.. bpo: 34323
.. date: 2019-01-14-17-34-36
.. nonce: CRErrt
.. section: Library

:mod:`asyncio`: Enhance ``IocpProactor.close()`` log: wait 1 second before
the first log, then log every second. Log also the number of seconds since
``close()`` was called.

..

.. bpo: 35674
.. date: 2019-01-14-14-13-08
.. nonce: kamWqz
.. section: Library

Add a new :func:`os.posix_spawnp` function. Patch by Joannah Nanjekye.

..

.. bpo: 35733
.. date: 2019-01-13-18-42-41
.. nonce: eFfLiv
.. section: Library

``ast.Constant(boolean)`` no longer an instance of :class:`ast.Num`.  Patch
by Anthony Sottile.

..

.. bpo: 35726
.. date: 2019-01-13-01-33-00
.. nonce: dasdas
.. section: Library

QueueHandler.prepare() now makes a copy of the record before modifying and
enqueueing it, to avoid affecting other handlers in the chain.

..

.. bpo: 35719
.. date: 2019-01-11-20-21-59
.. nonce: qyRcpE
.. section: Library

Sped up multi-argument :mod:`math` functions atan2(), copysign(),
remainder() and hypot() by 1.3--2.5 times.

..

.. bpo: 35717
.. date: 2019-01-11-17-56-15
.. nonce: 6TDTB_
.. section: Library

Fix KeyError exception raised when using enums and compile. Patch
contributed by Rémi Lapeyre.

..

.. bpo: 35699
.. date: 2019-01-11-07-09-25
.. nonce: VDiENF
.. section: Library

Fixed detection of Visual Studio Build Tools 2017 in distutils

..

.. bpo: 32710
.. date: 2019-01-10-15-55-10
.. nonce: KwECPu
.. section: Library

Fix memory leaks in asyncio ProactorEventLoop on overlapped operation
failure.

..

.. bpo: 35702
.. date: 2019-01-10-14-03-12
.. nonce: _ct_0H
.. section: Library

The :data:`time.CLOCK_UPTIME_RAW` constant is now available for macOS 10.12.

..

.. bpo: 32710
.. date: 2019-01-08-14-00-52
.. nonce: Sn5Ujj
.. section: Library

Fix a memory leak in asyncio in the ProactorEventLoop when ``ReadFile()`` or
``WSASend()`` overlapped operation fail immediately: release the internal
buffer.

..

.. bpo: 35682
.. date: 2019-01-08-01-54-02
.. nonce: KDM9lk
.. section: Library

Fix ``asyncio.ProactorEventLoop.sendfile()``: don't attempt to set the
result of an internal future if it's already done.

..

.. bpo: 35283
.. date: 2019-01-07-17-17-16
.. nonce: WClosC
.. section: Library

Add a deprecated warning for the :meth:`threading.Thread.isAlive` method.
Patch by Dong-hee Na.

..

.. bpo: 35664
.. date: 2019-01-04-22-18-25
.. nonce: Z-Gyyj
.. section: Library

Improve operator.itemgetter() performance by 33% with optimized argument
handling and with adding a fast path for the common case of a single
non-negative integer index into a tuple (which is the typical use case in
the standard library).

..

.. bpo: 35643
.. date: 2019-01-02-20-04-49
.. nonce: DaMiaV
.. section: Library

Fixed a SyntaxWarning: invalid escape sequence in Modules/_sha3/cleanup.py.
Patch by Mickaël Schoentgen.

..

.. bpo: 35619
.. date: 2018-12-30-19-50-36
.. nonce: ZRXdhy
.. section: Library

Improved support of custom data descriptors in :func:`help` and
:mod:`pydoc`.

..

.. bpo: 28503
.. date: 2018-12-30-14-56-33
.. nonce: V4kNN3
.. section: Library

The `crypt` module now internally uses the `crypt_r()` library function
instead of `crypt()` when available.

..

.. bpo: 35614
.. date: 2018-12-30-01-10-50
.. nonce: cnkM4f
.. section: Library

Fixed help() on metaclasses. Patch by Sanyam Khurana.

..

.. bpo: 35568
.. date: 2018-12-27-19-23-00
.. nonce: PutiOC
.. section: Library

Expose ``raise(signum)`` as `raise_signal`

..

.. bpo: 35588
.. date: 2018-12-26-10-55-59
.. nonce: PSR6Ez
.. section: Library

The floor division and modulo operations and the :func:`divmod` function on
:class:`fractions.Fraction` types are 2--4x faster. Patch by Stefan Behnel.

..

.. bpo: 35585
.. date: 2018-12-26-02-28-00
.. nonce: Lkzd3Z
.. section: Library

Speed-up building enums by value, e.g. http.HTTPStatus(200).

..

.. bpo: 30561
.. date: 2018-12-23-22-27-59
.. nonce: PSRQ2w
.. section: Library

random.gammavariate(1.0, beta) now computes the same result as
random.expovariate(1.0 / beta).  This synchronizes the two algorithms and
eliminates some idiosyncrasies in the old implementation.  It does however
produce a difference stream of random variables than it used to.

..

.. bpo: 35537
.. date: 2018-12-20-16-24-51
.. nonce: z4E7aA
.. section: Library

The :mod:`subprocess` module can now use the :func:`os.posix_spawn` function
in some cases for better performance.

..

.. bpo: 35526
.. date: 2018-12-18-21-12-25
.. nonce: fYvo6H
.. section: Library

Delaying the 'joke' of barry_as_FLUFL.mandatory to Python version 4.0

..

.. bpo: 35523
.. date: 2018-12-18-13-52-13
.. nonce: SkoMno
.. section: Library

Remove :mod:`ctypes` callback workaround: no longer create a callback at
startup. Avoid SELinux alert on ``import ctypes`` and ``import uuid``.

..

.. bpo: 31784
.. date: 2018-12-17-11-43-11
.. nonce: W0gDjC
.. section: Library

:func:`uuid.uuid1` now calls :func:`time.time_ns` rather than
``int(time.time() * 1e9)``.

..

.. bpo: 35513
.. date: 2018-12-16-23-28-49
.. nonce: pn-Zh3
.. section: Library

:class:`~unittest.runner.TextTestRunner` of :mod:`unittest.runner` now uses
:func:`time.perf_counter` rather than :func:`time.time` to measure the
execution time of a test: :func:`time.time` can go backwards, whereas
:func:`time.perf_counter` is monotonic.

..

.. bpo: 35502
.. date: 2018-12-14-23-56-48
.. nonce: gLHuFS
.. section: Library

Fixed reference leaks in :class:`xml.etree.ElementTree.TreeBuilder` in case
of unfinished building of the tree (in particular when an error was raised
during parsing XML).

..

.. bpo: 35348
.. date: 2018-12-14-13-27-45
.. nonce: u3Y2an
.. section: Library

Make :func:`platform.architecture` parsing of ``file`` command output more
reliable: add the ``-b`` option to the ``file`` command to omit the
filename, force the usage of the C locale, and search also the "shared
object" pattern.

..

.. bpo: 35491
.. date: 2018-12-14-12-12-15
.. nonce: jHsNOU
.. section: Library

:mod:`multiprocessing`: Add ``Pool.__repr__()`` and enhance
``BaseProcess.__repr__()`` (add pid and parent pid) to ease debugging. Pool
state constant values are now strings instead of integers, for example
``RUN`` value becomes ``'RUN'`` instead of ``0``.

..

.. bpo: 35477
.. date: 2018-12-13-00-10-51
.. nonce: hHyy06
.. section: Library

:meth:`multiprocessing.Pool.__enter__` now fails if the pool is not running:
``with pool:`` fails if used more than once.

..

.. bpo: 31446
.. date: 2018-12-12-22-52-34
.. nonce: l--Fjz
.. section: Library

Copy command line that was passed to CreateProcessW since this function can
change the content of the input buffer.

..

.. bpo: 35471
.. date: 2018-12-12-16-25-21
.. nonce: SK8jFC
.. section: Library

Python 2.4 dropped MacOS 9 support. The macpath module was deprecated in
Python 3.7. The module is now removed.

..

.. bpo: 23057
.. date: 2018-12-12-16-24-55
.. nonce: OB4Z1Y
.. section: Library

Unblock Proactor event loop when keyboard interrupt is received on Windows

..

.. bpo: 35052
.. date: 2018-12-10-09-48-27
.. nonce: xE1ymg
.. section: Library

Fix xml.dom.minidom cloneNode() on a document with an entity: pass the
correct arguments to the user data handler of an entity.

..

.. bpo: 20239
.. date: 2018-12-09-21-35-49
.. nonce: V4mWBL
.. section: Library

Allow repeated assignment deletion of :class:`unittest.mock.Mock`
attributes. Patch by Pablo Galindo.

..

.. bpo: 17185
.. date: 2018-12-09-17-04-15
.. nonce: SfSCJF
.. section: Library

Set ``__signature__`` on mock for :mod:`inspect` to get signature. Patch by
Karthikeyan Singaravelan.

..

.. bpo: 35445
.. date: 2018-12-09-14-35-49
.. nonce: LjvtsC
.. section: Library

Memory errors during creating posix.environ no longer ignored.

..

.. bpo: 35415
.. date: 2018-12-06-14-44-21
.. nonce: -HoK3d
.. section: Library

Validate fileno= argument to socket.socket().

..

.. bpo: 35424
.. date: 2018-12-06-02-02-28
.. nonce: gXxOJU
.. section: Library

:class:`multiprocessing.Pool` destructor now emits :exc:`ResourceWarning` if
the pool is still running.

..

.. bpo: 35330
.. date: 2018-12-06-00-43-13
.. nonce: abB4BN
.. section: Library

When a :class:`Mock` instance was used to wrap an object, if `side_effect`
is used in one of the mocks of it methods, don't call the original
implementation and return the result of using the side effect the same way
that it is done with return_value.

..

.. bpo: 35346
.. date: 2018-12-05-22-52-21
.. nonce: Okm9-S
.. section: Library

Drop Mac OS 9 and Rhapsody support from the :mod:`platform` module. Rhapsody
last release was in 2000. Mac OS 9 last release was in 2001.

..

.. bpo: 10496
.. date: 2018-12-05-17-42-49
.. nonce: laV_IE
.. section: Library

:func:`~distutils.utils.check_environ` of :mod:`distutils.utils` now catches
:exc:`KeyError` on calling :func:`pwd.getpwuid`: don't create the ``HOME``
environment variable in this case.

..

.. bpo: 10496
.. date: 2018-12-05-13-37-39
.. nonce: VH-1Lp
.. section: Library

:func:`posixpath.expanduser` now returns the input *path* unchanged if the
``HOME`` environment variable is not set and the current user has no home
directory (if the current user identifier doesn't exist in the password
database). This change fix the :mod:`site` module if the current user
doesn't exist in the password database (if the user has no home directory).

..

.. bpo: 35389
.. date: 2018-12-04-12-46-05
.. nonce: CTZ9iA
.. section: Library

:func:`platform.libc_ver` now uses ``os.confstr('CS_GNU_LIBC_VERSION')`` if
available and the *executable* parameter is not set.

..

.. bpo: 35394
.. date: 2018-12-04-12-17-08
.. nonce: fuTVDk
.. section: Library

Add empty slots to asyncio abstract protocols.

..

.. bpo: 35310
.. date: 2018-12-03-19-45-00
.. nonce: 9k28gR
.. section: Library

Fix a bug in :func:`select.select` where, in some cases, the file descriptor
sequences were returned unmodified after a signal interruption, even though
the file descriptors might not be ready yet.  :func:`select.select` will now
always return empty lists if a timeout has occurred.  Patch by Oran Avraham.

..

.. bpo: 35380
.. date: 2018-12-03-14-41-11
.. nonce: SdRF9l
.. section: Library

Enable TCP_NODELAY on Windows for proactor asyncio event loop.

..

.. bpo: 35341
.. date: 2018-12-02-13-50-52
.. nonce: 32E8T_
.. section: Library

Add generic version of ``collections.OrderedDict`` to the ``typing`` module.
Patch by Ismo Toijala.

..

.. bpo: 35371
.. date: 2018-12-01-13-44-12
.. nonce: fTAwlX
.. section: Library

Fixed possible crash in ``os.utime()`` on Windows when pass incorrect
arguments.

..

.. bpo: 35346
.. date: 2018-11-29-12-42-13
.. nonce: OmTY5c
.. section: Library

:func:`platform.uname` now redirects ``stderr`` to :data:`os.devnull` when
running external programs like ``cmd /c ver``.

..

.. bpo: 35066
.. date: 2018-11-29-09-38-40
.. nonce: Nwej2s
.. section: Library

Previously, calling the strftime() method on a datetime object with a
trailing '%' in the format string would result in an exception. However,
this only occurred when the datetime C module was being used; the python
implementation did not match this behavior. Datetime is now PEP-399
compliant, and will not throw an exception on a trailing '%'.

..

.. bpo: 35345
.. date: 2018-11-29-00-55-33
.. nonce: vepCSJ
.. section: Library

The function `platform.popen` has been removed, it was deprecated since
Python 3.3: use :func:`os.popen` instead.

..

.. bpo: 35344
.. date: 2018-11-29-00-23-25
.. nonce: 4QOPJQ
.. section: Library

On macOS, :func:`platform.platform` now uses :func:`platform.mac_ver`, if it
returns a non-empty release string, to get the macOS version rather than the
darwin version.

..

.. bpo: 35312
.. date: 2018-11-25-20-05-33
.. nonce: wbw0zO
.. section: Library

Make ``lib2to3.pgen2.parse.ParseError`` round-trip pickle-able.  Patch by
Anthony Sottile.

..

.. bpo: 35308
.. date: 2018-11-24-10-33-42
.. nonce: 9--2iy
.. section: Library

Fix regression in ``webbrowser`` where default browsers may be preferred
over browsers in the ``BROWSER`` environment variable.

..

.. bpo: 24746
.. date: 2018-11-22-15-22-56
.. nonce: eSLKBE
.. section: Library

Avoid stripping trailing whitespace in doctest fancy diff. Original patch by
R. David Murray & Jairo Trad. Enhanced by Sanyam Khurana.

..

.. bpo: 28604
.. date: 2018-11-20-13-34-01
.. nonce: iiih5h
.. section: Library

:func:`locale.localeconv` now sets temporarily the ``LC_CTYPE`` locale to
the ``LC_MONETARY`` locale if the two locales are different and monetary
strings are non-ASCII. This temporary change affects other threads.

..

.. bpo: 35277
.. date: 2018-11-19-07-22-04
.. nonce: dsD-2E
.. section: Library

Update ensurepip to install pip 18.1 and setuptools 40.6.2.

..

.. bpo: 24209
.. date: 2018-11-18-18-44-40
.. nonce: p3YWOf
.. section: Library

Adds IPv6 support when invoking http.server directly.

..

.. bpo: 35226
.. date: 2018-11-15-07-14-32
.. nonce: wJPEEe
.. section: Library

Recursively check arguments when testing for equality of
:class:`unittest.mock.call` objects and add note that tracking of parameters
used to create ancestors of mocks in ``mock_calls`` is not possible.

..

.. bpo: 29564
.. date: 2018-11-12-17-40-04
.. nonce: SFNBT5
.. section: Library

The warnings module now suggests to enable tracemalloc if the source is
specified, the tracemalloc module is available, but tracemalloc is not
tracing memory allocations.

..

.. bpo: 35189
.. date: 2018-11-09-13-35-36
.. nonce: gog-sl
.. section: Library

Modify the following fnctl function to retry if interrupted by a signal
(EINTR): flock, lockf, fnctl

..

.. bpo: 30064
.. date: 2018-11-09-01-18-51
.. nonce: IF5mH6
.. section: Library

Use add_done_callback() in sock_* asyncio API to unsubscribe reader/writer
early on calcellation.

..

.. bpo: 35186
.. date: 2018-11-08-14-22-29
.. nonce: 5m22Mj
.. section: Library

Removed the "built with" comment added when ``setup.py upload`` is used with
either ``bdist_rpm`` or ``bdist_dumb``.

..

.. bpo: 35152
.. date: 2018-11-03-10-12-04
.. nonce: xpqskp
.. section: Library

Allow sending more than 2 GB at once on a multiprocessing connection on
non-Windows systems.

..

.. bpo: 35062
.. date: 2018-10-29-23-09-24
.. nonce: dQS1ng
.. section: Library

Fix incorrect parsing of :class:`_io.IncrementalNewlineDecoder`'s
*translate* argument.

..

.. bpo: 35065
.. date: 2018-10-29-10-18-31
.. nonce: CulMN8
.. section: Library

Remove `StreamReaderProtocol._untrack_reader`. The call to `_untrack_reader`
is currently performed too soon, causing the protocol to forget about the
reader before `connection_lost` can run and feed the EOF to the reader.

..

.. bpo: 34160
.. date: 2018-10-27-21-11-42
.. nonce: UzyPZf
.. section: Library

ElementTree and minidom now preserve the attribute order specified by the
user.

..

.. bpo: 35079
.. date: 2018-10-26-22-53-16
.. nonce: Tm5jvF
.. section: Library

Improve difflib.SequenceManager.get_matching_blocks doc by adding
'non-overlapping' and changing '!=' to '<'.

..

.. bpo: 33710
.. date: 2018-10-26-21-12-55
.. nonce: Q5oXc6
.. section: Library

Deprecated ``l*gettext()`` functions and methods in the :mod:`gettext`
module. They return encoded bytes instead of Unicode strings and are
artifacts from Python 2 times. Also deprecated functions and methods related
to setting the charset for ``l*gettext()`` functions and methods.

..

.. bpo: 35017
.. date: 2018-10-26-00-11-21
.. nonce: 6Ez4Cv
.. section: Library

:meth:`socketserver.BaseServer.serve_forever` now exits immediately if it's
:meth:`~socketserver.BaseServer.shutdown` method is called while it is
polling for new events.

..

.. bpo: 35024
.. date: 2018-10-25-15-43-32
.. nonce: ltSrtr
.. section: Library

`importlib` no longer logs `wrote <bytecode path>` redundantly after
`(created|could not create) <bytecode path>` is already logged. Patch by
Quentin Agren.

..

.. bpo: 35047
.. date: 2018-10-25-09-59-00
.. nonce: abbaa
.. section: Library

``unittest.mock`` now includes mock calls in exception messages if
``assert_not_called``, ``assert_called_once``, or
``assert_called_once_with`` fails. Patch by Petter Strandmark.

..

.. bpo: 31047
.. date: 2018-10-25-09-37-03
.. nonce: kBbX8r
.. section: Library

Fix ``ntpath.abspath`` regression where it didn't remove a trailing
separator on Windows. Patch by Tim Graham.

..

.. bpo: 35053
.. date: 2018-10-23-18-58-12
.. nonce: G82qwh
.. section: Library

tracemalloc now tries to update the traceback when an object is reused from
a "free list" (optimization for faster object creation, used by the builtin
list type for example).

..

.. bpo: 31553
.. date: 2018-10-23-14-46-47
.. nonce: JxRkAW
.. section: Library

Add the --json-lines option to json.tool. Patch by hongweipeng.

..

.. bpo: 34794
.. date: 2018-10-21-14-53-19
.. nonce: yt3R4-
.. section: Library

Fixed a leak in Tkinter when pass the Python wrapper around Tcl_Obj back to
Tcl/Tk.

..

.. bpo: 34909
.. date: 2018-10-20-00-29-43
.. nonce: Ew_8DC
.. section: Library

Enum: fix grandchildren subclassing when parent mixed with concrete data
types.

..

.. bpo: 35022
.. date: 2018-10-18-17-57-28
.. nonce: KeEF4T
.. section: Library

:class:`unittest.mock.MagicMock` now supports the ``__fspath__`` method
(from :class:`os.PathLike`).

..

.. bpo: 35008
.. date: 2018-10-17-11-54-04
.. nonce: dotef_
.. section: Library

Fixed references leaks when call the ``__setstate__()`` method of
:class:`xml.etree.ElementTree.Element` in the C implementation for already
initialized element.

..

.. bpo: 23420
.. date: 2018-10-17-11-00-00
.. nonce: Lq74Uu
.. section: Library

Verify the value for the parameter '-s' of the cProfile CLI. Patch by Robert
Kuska

..

.. bpo: 33947
.. date: 2018-10-17-02-15-23
.. nonce: SRuq3T
.. section: Library

dataclasses now handle recursive reprs without raising RecursionError.

..

.. bpo: 34890
.. date: 2018-10-15-23-10-41
.. nonce: 77E770
.. section: Library

Make :func:`inspect.iscoroutinefunction`,
:func:`inspect.isgeneratorfunction` and :func:`inspect.isasyncgenfunction`
work with :func:`functools.partial`. Patch by Pablo Galindo.

..

.. bpo: 34521
.. date: 2018-10-13-19-15-23
.. nonce: YPaiTK
.. section: Library

Use :func:`socket.CMSG_SPACE` to calculate ancillary data size instead of
:func:`socket.CMSG_LEN` in :func:`multiprocessing.reduction.recvfds` as
:rfc:`3542` requires the use of the former for portable applications.

..

.. bpo: 31522
.. date: 2018-10-13-18-16-20
.. nonce: rWBb43
.. section: Library

The `mailbox.mbox.get_string` function *from_* parameter can now
successfully be set to a non-default value.

..

.. bpo: 34970
.. date: 2018-10-13-11-14-13
.. nonce: SrJTY7
.. section: Library

Protect tasks weak set manipulation in ``asyncio.all_tasks()``

..

.. bpo: 34969
.. date: 2018-10-13-07-46-50
.. nonce: Mfnhjb
.. section: Library

gzip: Add --fast, --best on the gzip CLI, these parameters will be used for
the fast compression method (quick) or the best method compress (slower, but
smaller file). Also, change the default compression level to 6 (tradeoff).

..

.. bpo: 16965
.. date: 2018-10-12-20-30-42
.. nonce: xo5LAr
.. section: Library

The :term:`2to3` :2to3fixer:`execfile` fixer now opens the file with mode
``'rb'``.  Patch by Zackery Spytz.

..

.. bpo: 34966
.. date: 2018-10-12-18-57-52
.. nonce: WZeBHO
.. section: Library

:mod:`pydoc` now supports aliases not only to methods defined in the end
class, but also to inherited methods.  The docstring is not duplicated for
aliases.

..

.. bpo: 34926
.. date: 2018-10-10-00-22-57
.. nonce: CA0rqd
.. section: Library

:meth:`mimetypes.MimeTypes.guess_type` now accepts :term:`path-like object`
in addition to url strings. Patch by Mayank Asthana.

..

.. bpo: 23831
.. date: 2018-10-09-15-44-04
.. nonce: 2CL7lL
.. section: Library

Add ``moveto()`` method to the ``tkinter.Canvas`` widget. Patch by Juliette
Monsel.

..

.. bpo: 34941
.. date: 2018-10-09-14-42-16
.. nonce: 1Q5QKv
.. section: Library

Methods ``find()``, ``findtext()`` and ``findall()`` of the ``Element``
class in the :mod:`xml.etree.ElementTree` module are now able to find
children which are instances of ``Element`` subclasses.

..

.. bpo: 32680
.. date: 2018-10-09-14-25-36
.. nonce: z2FbOp
.. section: Library

:class:`smtplib.SMTP` objects now always have a `sock` attribute present

..

.. bpo: 34769
.. date: 2018-10-09-11-01-16
.. nonce: cSkkZt
.. section: Library

Fix for async generators not finalizing when event loop is in debug mode and
garbage collector runs in another thread.

..

.. bpo: 34936
.. date: 2018-10-08-21-05-11
.. nonce: 3tRqdq
.. section: Library

Fix ``TclError`` in ``tkinter.Spinbox.selection_element()``. Patch by
Juliette Monsel.

..

.. bpo: 34829
.. date: 2018-10-08-16-04-36
.. nonce: B7v7D0
.. section: Library

Add methods ``selection_from``, ``selection_range``, ``selection_present``
and ``selection_to`` to the ``tkinter.Spinbox`` for consistency with the
``tkinter.Entry`` widget. Patch by Juliette Monsel.

..

.. bpo: 34911
.. date: 2018-10-08-15-22-02
.. nonce: hCy0Fv
.. section: Library

Added *secure_protocols* argument to *http.cookiejar.DefaultCookiePolicy* to
allow for tweaking of protocols and also to add support by default for
*wss*, the secure websocket protocol.

..

.. bpo: 34922
.. date: 2018-10-07-21-18-52
.. nonce: 37IdsA
.. section: Library

Fixed integer overflow in the :meth:`~hashlib.shake.digest()` and
:meth:`~hashlib.shake.hexdigest()` methods for the SHAKE algorithm in the
:mod:`hashlib` module.

..

.. bpo: 34925
.. date: 2018-10-07-20-37-02
.. nonce: KlkZ-Y
.. section: Library

25% speedup in argument parsing for the functions in the bisect module.

..

.. bpo: 34900
.. date: 2018-10-05-05-55-53
.. nonce: 8RNiFu
.. section: Library

Fixed :meth:`unittest.TestCase.debug` when used to call test methods with
subtests.  Patch by Bruno Oliveira.

..

.. bpo: 34844
.. date: 2018-10-04-20-44-45
.. nonce: Hnuxav
.. section: Library

logging.Formatter enhancement - Ensure styles and fmt matches in
logging.Formatter - Added validate method in each format style class:
StrFormatStyle, PercentStyle, StringTemplateStyle. - This method is called
in the constructor of logging.Formatter class - Also re-raise the KeyError
in the format method of each style class, so it would a bit clear that it's
an error with the invalid format fields.

..

.. bpo: 34897
.. date: 2018-10-04-20-25-35
.. nonce: rNE2Cy
.. section: Library

Adjust test.support.missing_compiler_executable check so that a nominal
command name of "" is ignored. Patch by Michael Felt.

..

.. bpo: 34871
.. date: 2018-10-04-18-46-54
.. nonce: t3X-dB
.. section: Library

Fix inspect module polluted ``sys.modules`` when parsing
``__text_signature__`` of callable.

..

.. bpo: 34898
.. date: 2018-10-04-17-23-43
.. nonce: Wo2PoJ
.. section: Library

Add `mtime` argument to `gzip.compress` for reproducible output. Patch by
Guo Ci Teo.

..

.. bpo: 28441
.. date: 2018-10-04-15-53-14
.. nonce: 2sQENe
.. section: Library

On Cygwin and MinGW, ensure that ``sys.executable`` always includes the full
filename in the path, including the ``.exe`` suffix (unless it is a symbolic
link).

..

.. bpo: 34866
.. date: 2018-10-03-11-07-28
.. nonce: ML6KpJ
.. section: Library

Adding ``max_num_fields`` to ``cgi.FieldStorage`` to make DOS attacks harder
by limiting the number of ``MiniFieldStorage`` objects created by
``FieldStorage``.

..

.. bpo: 34711
.. date: 2018-10-03-09-25-02
.. nonce: HeOmKR
.. section: Library

http.server ensures it reports HTTPStatus.NOT_FOUND when the local path ends
with "/" and is not a directory, even if the underlying OS (e.g. AIX)
accepts such paths as a valid file reference. Patch by Michael Felt.

..

.. bpo: 34872
.. date: 2018-10-02-19-36-34
.. nonce: yWZRhI
.. section: Library

Fix self-cancellation in C implementation of asyncio.Task

..

.. bpo: 34849
.. date: 2018-09-30-08-08-14
.. nonce: NXK9Ff
.. section: Library

Don't log waiting for ``selector.select`` in asyncio loop iteration. The
waiting is pretty normal for any asyncio program, logging its time just adds
a noise to logs without any useful information provided.

..

.. bpo: 34022
.. date: 2018-09-27-13-14-15
.. nonce: E2cl0r
.. section: Library

The :envvar:`SOURCE_DATE_EPOCH` environment variable no longer overrides the
value of the *invalidation_mode* argument to :func:`py_compile.compile`, and
determines its default value instead.

..

.. bpo: 34819
.. date: 2018-09-27-09-45-00
.. nonce: 9ZaFyO
.. section: Library

Use a monotonic clock to compute timeouts in :meth:`Executor.map` and
:func:`as_completed`, in order to prevent timeouts from deviating when the
system clock is adjusted.

..

.. bpo: 34758
.. date: 2018-09-26-14-09-34
.. nonce: bRBfAi
.. section: Library

Add .wasm -> application/wasm to list of recognized file types and content
type headers

..

.. bpo: 34789
.. date: 2018-09-25-15-48-50
.. nonce: rPOEj5
.. section: Library

:func:`xml.sax.make_parser` now accepts any iterable as its *parser_list*
argument.  Patch by Andrés Delfino.

..

.. bpo: 34334
.. date: 2018-09-25-08-42-34
.. nonce: rSPBW9
.. section: Library

In :class:`QueueHandler`, clear `exc_text` from :class:`LogRecord` to
prevent traceback from being written twice.

..

.. bpo: 34687
.. date: 2018-09-24-17-14-57
.. nonce: Fku_8S
.. section: Library

On Windows, asyncio now uses ProactorEventLoop, instead of
SelectorEventLoop, by default.

..

.. bpo: 5950
.. date: 2018-09-24-14-21-58
.. nonce: xH0ekQ
.. section: Library

Support reading zip files with archive comments in :mod:`zipimport`.

..

.. bpo: 32892
.. date: 2018-09-20-17-35-05
.. nonce: TOUBdg
.. section: Library

The parser now represents all constants as :class:`ast.Constant` instead of
using specific constant AST types (``Num``, ``Str``, ``Bytes``,
``NameConstant`` and ``Ellipsis``). These classes are considered deprecated
and will be removed in future Python versions.

..

.. bpo: 34728
.. date: 2018-09-20-16-55-43
.. nonce: CUE8LU
.. section: Library

Add deprecation warning when `loop` is used in methods: `asyncio.sleep`,
`asyncio.wait` and `asyncio.wait_for`.

..

.. bpo: 34738
.. date: 2018-09-19-16-51-04
.. nonce: Pr3-iG
.. section: Library

ZIP files created by :mod:`distutils` will now include entries for
directories.

..

.. bpo: 34659
.. date: 2018-09-16-17-04-16
.. nonce: CWemzH
.. section: Library

Add an optional *initial* argument to itertools.accumulate().

..

.. bpo: 29577
.. date: 2018-09-14-20-00-47
.. nonce: RzwKFD
.. section: Library

Support multiple mixin classes when creating Enums.

..

.. bpo: 34670
.. date: 2018-09-14-14-29-45
.. nonce: 17XwGB
.. section: Library

Add SSLContext.post_handshake_auth and
SSLSocket.verify_client_post_handshake for TLS 1.3's post handshake
authentication feature.

..

.. bpo: 32718
.. date: 2018-09-14-12-38-49
.. nonce: ICYQbt
.. section: Library

The Activate.ps1 script from venv works with PowerShell Core 6.1 and is now
available under all operating systems.

..

.. bpo: 31177
.. date: 2018-09-14-10-38-18
.. nonce: Sv91TN
.. section: Library

Fix bug that prevented using :meth:`reset_mock
<unittest.mock.Mock.reset_mock>` on mock instances with deleted attributes

..

.. bpo: 34672
.. date: 2018-09-13-21-04-23
.. nonce: BYuKKS
.. section: Library

Add a workaround, so the ``'Z'`` :func:`time.strftime` specifier on the musl
C library can work in some cases.

..

.. bpo: 34666
.. date: 2018-09-13-11-49-52
.. nonce: 3uLtWv
.. section: Library

Implement ``asyncio.StreamWriter.awrite`` and
``asyncio.StreamWriter.aclose()`` coroutines.  Methods are needed for
providing a consistent stream API with control flow switched on by default.

..

.. bpo: 6721
.. date: 2018-09-13-10-09-19
.. nonce: ZUL_F3
.. section: Library

Acquire the logging module's commonly used internal locks while fork()ing to
avoid deadlocks in the child process.

..

.. bpo: 34658
.. date: 2018-09-13-03-59-43
.. nonce: ykZ-ia
.. section: Library

Fix a rare interpreter unhandled exception state SystemError only seen when
using subprocess with a preexec_fn while an after_parent handler has been
registered with os.register_at_fork and the fork system call fails.

..

.. bpo: 34652
.. date: 2018-09-12-14-46-51
.. nonce: Rt1m1b
.. section: Library

Ensure :func:`os.lchmod` is never defined on Linux.

..

.. bpo: 34638
.. date: 2018-09-12-10-33-44
.. nonce: xaeZX5
.. section: Library

Store a weak reference to stream reader to break strong references loop
between reader and protocol.  It allows to detect and close the socket if
the stream is deleted (garbage collected) without ``close()`` call.

..

.. bpo: 34536
.. date: 2018-09-11-15-49-09
.. nonce: 3IPIH5
.. section: Library

`Enum._missing_`:  raise `ValueError` if None returned and `TypeError` if
non-member is returned.

..

.. bpo: 34636
.. date: 2018-09-11-15-04-05
.. nonce: capCmt
.. section: Library

Speed up re scanning of many non-matching characters for \s \w and \d within
bytes objects. (microoptimization)

..

.. bpo: 24412
.. date: 2018-09-11-10-51-16
.. nonce: i-F_E5
.. section: Library

Add :func:`~unittest.addModuleCleanup()` and
:meth:`~unittest.TestCase.addClassCleanup()` to unittest to support cleanups
for :func:`~unittest.setUpModule()` and
:meth:`~unittest.TestCase.setUpClass()`. Patch by Lisa Roach.

..

.. bpo: 34630
.. date: 2018-09-11-10-00-53
.. nonce: YbqUS6
.. section: Library

Don't log SSL certificate errors in asyncio code (connection error logging
is skipped already).

..

.. bpo: 32490
.. date: 2018-09-11-01-25-35
.. nonce: ROIDO1
.. section: Library

Prevent filename duplication in :mod:`subprocess` exception messages.  Patch
by Zackery Spytz.

..

.. bpo: 34363
.. date: 2018-09-10-21-09-34
.. nonce: YuSb0T
.. section: Library

dataclasses.asdict() and .astuple() now handle namedtuples correctly.

..

.. bpo: 34625
.. date: 2018-09-10-17-46-51
.. nonce: D2YfDz
.. section: Library

Update vendorized expat library version to 2.2.6.

..

.. bpo: 32270
.. date: 2018-09-10-14-15-53
.. nonce: wSJjuD
.. section: Library

The subprocess module no longer mistakenly closes redirected fds even when
they were in pass_fds when outside of the default {0, 1, 2} set.

..

.. bpo: 34622
.. date: 2018-09-10-13-04-40
.. nonce: tpv_rN
.. section: Library

Create a dedicated ``asyncio.CancelledError``, ``asyncio.InvalidStateError``
and ``asyncio.TimeoutError`` exception classes.  Inherit them from
corresponding exceptions from ``concurrent.futures`` package. Extract
``asyncio`` exceptions into a separate file.

..

.. bpo: 34610
.. date: 2018-09-08-12-57-07
.. nonce: wmoP5j
.. section: Library

Fixed iterator of :class:`multiprocessing.managers.DictProxy`.

..

.. bpo: 34421
.. date: 2018-09-07-10-57-00
.. nonce: AKJISD
.. section: Library

Fix distutils logging for non-ASCII strings.  This caused installation
issues on Windows.

..

.. bpo: 34604
.. date: 2018-09-07-10-16-34
.. nonce: xL7-kG
.. section: Library

Fix possible mojibake in the error message of `pwd.getpwnam` and
`grp.getgrnam` using string representation because of invisible characters
or trailing whitespaces. Patch by William Grzybowski.

..

.. bpo: 30977
.. date: 2018-09-06-10-07-46
.. nonce: bP661V
.. section: Library

Make uuid.UUID use ``__slots__`` to reduce its memory footprint. Based on
original patch by Wouter Bolsterlee.

..

.. bpo: 34574
.. date: 2018-09-04-09-32-54
.. nonce: X4RwYI
.. section: Library

OrderedDict iterators are not exhausted during pickling anymore. Patch by
Sergey Fedoseev.

..

.. bpo: 8110
.. date: 2018-09-03-23-54-35
.. nonce: FExWI_
.. section: Library

Refactored :mod:`subprocess` to check for Windows-specific modules rather
than ``sys.platform == 'win32'``.

..

.. bpo: 34530
.. date: 2018-09-03-23-23-32
.. nonce: h_Xsu7
.. section: Library

``distutils.spawn.find_executable()`` now falls back on :data:`os.defpath`
if the ``PATH`` environment variable is not set.

..

.. bpo: 34563
.. date: 2018-09-01-20-43-10
.. nonce: 7NQK7B
.. section: Library

On Windows, fix multiprocessing.Connection for very large read: fix
_winapi.PeekNamedPipe() and _winapi.ReadFile() for read larger than INT_MAX
(usually 2^31-1).

..

.. bpo: 34558
.. date: 2018-08-31-19-26-55
.. nonce: MHv582
.. section: Library

Correct typo in Lib/ctypes/_aix.py

..

.. bpo: 34282
.. date: 2018-08-31-06-28-03
.. nonce: ztyXH8
.. section: Library

Move ``Enum._convert`` to ``EnumMeta._convert_`` and fix enum members
getting shadowed by parent attributes.

..

.. bpo: 22872
.. date: 2018-08-30-14-44-11
.. nonce: NhIaZ9
.. section: Library

When the queue is closed, :exc:`ValueError` is now raised by
:meth:`multiprocessing.Queue.put` and :meth:`multiprocessing.Queue.get`
instead of :exc:`AssertionError` and :exc:`OSError`, respectively. Patch by
Zackery Spytz.

..

.. bpo: 34515
.. date: 2018-08-27-16-01-22
.. nonce: S0Irst
.. section: Library

Fix parsing non-ASCII identifiers in :mod:`lib2to3.pgen2.tokenize` (PEP
3131).

..

.. bpo: 13312
.. date: 2018-08-24-17-31-27
.. nonce: 6hA5La
.. section: Library

Avoids a possible integer underflow (undefined behavior) in the time
module's year handling code when passed a very low negative year value.

..

.. bpo: 34472
.. date: 2018-08-23-09-25-08
.. nonce: cGyYrO
.. section: Library

Improved compatibility for streamed files in :mod:`zipfile`. Previously an
optional signature was not being written and certain ZIP applications were
not supported. Patch by Silas Sewell.

..

.. bpo: 34454
.. date: 2018-08-22-21-59-08
.. nonce: z7uG4b
.. section: Library

Fix the .fromisoformat() methods of datetime types crashing when given
unicode with non-UTF-8-encodable code points.  Specifically,
datetime.fromisoformat() now accepts surrogate unicode code points used as
the separator. Report and tests by Alexey Izbyshev, patch by Paul Ganssle.

..

.. bpo: 6700
.. date: 2018-08-22-17-43-52
.. nonce: hp7C4B
.. section: Library

Fix inspect.getsourcelines for module level frames/tracebacks. Patch by
Vladimir Matveev.

..

.. bpo: 34171
.. date: 2018-08-21-00-29-01
.. nonce: 6LkWav
.. section: Library

Running the :mod:`trace` module no longer creates the ``trace.cover`` file.

..

.. bpo: 34441
.. date: 2018-08-20-16-48-32
.. nonce: _zx9lU
.. section: Library

Fix crash when an ``ABC``-derived class with invalid ``__subclasses__`` is
passed as the second argument to :func:`issubclass()`. Patch by Alexey
Izbyshev.

..

.. bpo: 34427
.. date: 2018-08-20-13-53-10
.. nonce: tMRQjl
.. section: Library

Fix infinite loop in ``a.extend(a)`` for ``MutableSequence`` subclasses.

..

.. bpo: 34412
.. date: 2018-08-16-19-07-05
.. nonce: NF5Jm2
.. section: Library

Make :func:`signal.strsignal` work on HP-UX. Patch by Michael Osipov.

..

.. bpo: 20849
.. date: 2018-08-16-16-47-15
.. nonce: YWJECC
.. section: Library

shutil.copytree now accepts a new ``dirs_exist_ok`` keyword argument. Patch
by Josh Bronson.

..

.. bpo: 31715
.. date: 2018-08-15-16-22-30
.. nonce: Iw8jS8
.. section: Library

Associate ``.mjs`` file extension with ``application/javascript`` MIME Type.

..

.. bpo: 34384
.. date: 2018-08-12-08-43-21
.. nonce: yjofCv
.. section: Library

:func:`os.readlink` now accepts :term:`path-like <path-like object>` and
:class:`bytes` objects on Windows.

..

.. bpo: 22602
.. date: 2018-08-12-00-14-54
.. nonce: ybG9K8
.. section: Library

The UTF-7 decoder now raises :exc:`UnicodeDecodeError` for ill-formed
sequences starting with "+" (as specified in RFC 2152).  Patch by Zackery
Spytz.

..

.. bpo: 2122
.. date: 2018-08-06-21-47-03
.. nonce: GWdmrm
.. section: Library

The :meth:`mmap.flush() <mmap.mmap.flush>` method now returns ``None`` on
success, raises an exception on error under all platforms.

..

.. bpo: 34341
.. date: 2018-08-06-11-01-18
.. nonce: E0b9p2
.. section: Library

Appending to the ZIP archive with the ZIP64 extension no longer grows the
size of extra fields of existing entries.

..

.. bpo: 34333
.. date: 2018-08-04-00-06-28
.. nonce: 5NHG93
.. section: Library

Fix %-formatting in :meth:`pathlib.PurePath.with_suffix` when formatting an
error message.

..

.. bpo: 18540
.. date: 2018-08-02-21-28-38
.. nonce: AryoYY
.. section: Library

The :class:`imaplib.IMAP4` and :class:`imaplib.IMAP4_SSL` classes now
resolve to the local host IP correctly when the default value of *host*
parameter (``''``) is used.

..

.. bpo: 26502
.. date: 2018-08-02-20-39-32
.. nonce: eGXr_k
.. section: Library

Implement ``traceback.FrameSummary.__len__()`` method to preserve
compatibility with the old tuple API.

..

.. bpo: 34318
.. date: 2018-08-02-14-43-42
.. nonce: GneiXs
.. section: Library

:func:`~unittest.TestCase.assertRaises`,
:func:`~unittest.TestCase.assertRaisesRegex`,
:func:`~unittest.TestCase.assertWarns` and
:func:`~unittest.TestCase.assertWarnsRegex` no longer success if the passed
callable is None. They no longer ignore unknown keyword arguments in the
context manager mode. A DeprecationWarning was raised in these cases since
Python 3.5.

..

.. bpo: 9372
.. date: 2018-08-01-21-26-17
.. nonce: V8Ou3K
.. section: Library

Deprecate :meth:`__getitem__` methods of
:class:`xml.dom.pulldom.DOMEventStream`, :class:`wsgiref.util.FileWrapper`
and :class:`fileinput.FileInput`.

..

.. bpo: 33613
.. date: 2018-07-31-23-33-06
.. nonce: Cdnt0i
.. section: Library

Fix a race condition in ``multiprocessing.semaphore_tracker`` when the
tracker receives SIGINT before it can register signal handlers for ignoring
it.

..

.. bpo: 34248
.. date: 2018-07-31-23-00-09
.. nonce: 5U6wwc
.. section: Library

Report filename in the exception raised when the database file cannot be
opened by :func:`dbm.gnu.open` and :func:`dbm.ndbm.open` due to OS-related
error. Patch by Zsolt Cserna.

..

.. bpo: 33089
.. date: 2018-07-29-21-53-15
.. nonce: hxbp3g
.. section: Library

Add math.dist() to compute the Euclidean distance between two points.

..

.. bpo: 34246
.. date: 2018-07-29-15-25-15
.. nonce: xiKq-Q
.. section: Library

:meth:`smtplib.SMTP.send_message` no longer modifies the content of the
*mail_options* argument. Patch by Pablo S. Blum de Aguiar.

..

.. bpo: 31047
.. date: 2018-07-29-14-12-23
.. nonce: FSarLs
.. section: Library

Fix ``ntpath.abspath`` for invalid paths on windows. Patch by Franz
Woellert.

..

.. bpo: 32321
.. date: 2018-07-29-13-50-32
.. nonce: hDoNKC
.. section: Library

Add pure Python fallback for functools.reduce. Patch by Robert Wright.

..

.. bpo: 34270
.. date: 2018-07-29-11-32-56
.. nonce: aL6P-3
.. section: Library

The default asyncio task class now always has a name which can be get or set
using two new methods (:meth:`~asyncio.Task.get_name()` and
:meth:`~asyncio.Task.set_name`) and is visible in the :func:`repr` output.
An initial name can also be set using the new ``name`` keyword argument to
:func:`asyncio.create_task` or the
:meth:`~asyncio.AbstractEventLoop.create_task` method of the event loop. If
no initial name is set, the default Task implementation generates a name
like ``Task-1`` using a monotonic counter.

..

.. bpo: 34263
.. date: 2018-07-28-17-00-36
.. nonce: zUfRsu
.. section: Library

asyncio's event loop will not pass timeouts longer than one day to
epoll/select etc.

..

.. bpo: 34035
.. date: 2018-07-28-15-00-31
.. nonce: 75nW0H
.. section: Library

Fix several AttributeError in zipfile seek() methods. Patch by Mickaël
Schoentgen.

..

.. bpo: 32215
.. date: 2018-07-28-12-08-53
.. nonce: EU68SY
.. section: Library

Fix performance regression in :mod:`sqlite3` when a DML statement appeared
in a different line than the rest of the SQL query.

..

.. bpo: 34075
.. date: 2018-07-28-11-49-21
.. nonce: 9u1bO-
.. section: Library

Deprecate passing non-ThreadPoolExecutor instances to
:meth:`AbstractEventLoop.set_default_executor`.

..

.. bpo: 34251
.. date: 2018-07-28-11-47-10
.. nonce: q3elQ6
.. section: Library

Restore ``msilib.Win64`` to preserve backwards compatibility since it's
already used by :mod:`distutils`' ``bdist_msi`` command.

..

.. bpo: 19891
.. date: 2018-07-26-08-45-49
.. nonce: Y-3IiB
.. section: Library

Ignore errors caused by missing / non-writable homedir while writing history
during exit of an interactive session.  Patch by Anthony Sottile.

..

.. bpo: 33089
.. date: 2018-07-25-22-38-54
.. nonce: C3CB7e
.. section: Library

Enhanced math.hypot() to support more than two dimensions.

..

.. bpo: 34228
.. date: 2018-07-25-19-02-39
.. nonce: 0Ibztw
.. section: Library

tracemalloc: PYTHONTRACEMALLOC=0 environment variable and -X tracemalloc=0
command line option are now allowed to disable explicitly tracemalloc at
startup.

..

.. bpo: 13041
.. date: 2018-07-25-12-08-48
.. nonce: lNmgDz
.. section: Library

Use :func:`shutil.get_terminal_size` to calculate the terminal width
correctly in the ``argparse.HelpFormatter`` class.  Initial patch by Zbyszek
Jędrzejewski-Szmek.

..

.. bpo: 34213
.. date: 2018-07-25-00-40-14
.. nonce: O15MgP
.. section: Library

Allow frozen dataclasses to have a field named "object". Previously this
conflicted with an internal use of "object".

..

.. bpo: 34052
.. date: 2018-07-24-16-37-40
.. nonce: VbbFAE
.. section: Library

:meth:`sqlite3.Connection.create_aggregate`,
:meth:`sqlite3.Connection.create_function`,
:meth:`sqlite3.Connection.set_authorizer`,
:meth:`sqlite3.Connection.set_progress_handler` methods raises TypeError
when unhashable objects are passed as callable. These methods now don't pass
such objects to SQLite API. Previous behavior could lead to segfaults. Patch
by Sergey Fedoseev.

..

.. bpo: 34197
.. date: 2018-07-23-14-12-28
.. nonce: 7yFSP5
.. section: Library

Attributes *skipinitialspace*, *doublequote* and *strict* of the *dialect*
attribute of the :mod:`csv` reader are now :class:`bool` instances instead
of integers 0 or 1.

..

.. bpo: 32788
.. date: 2018-07-23-12-20-02
.. nonce: R2jSiK
.. section: Library

Errors other than :exc:`TypeError` raised in methods ``__adapt__()`` and
``__conform__()`` in the :mod:`sqlite3` module are now propagated to the
user.

..

.. bpo: 21446
.. date: 2018-07-22-09-05-01
.. nonce: w6g7tn
.. section: Library

The :2to3fixer:`reload` fixer now uses :func:`importlib.reload` instead of
deprecated :func:`imp.reload`.

..

.. bpo: 940286
.. date: 2018-07-22-07-59-32
.. nonce: NZTzyc
.. section: Library

pydoc's ``Helper.showtopic()`` method now prints the cross references of a
topic correctly.

..

.. bpo: 34164
.. date: 2018-07-20-18-06-00
.. nonce: fNfT-q
.. section: Library

:func:`base64.b32decode` could raise UnboundLocalError or OverflowError for
incorrect padding.  Now it always raises :exc:`base64.Error` in these cases.

..

.. bpo: 33729
.. date: 2018-07-20-09-11-05
.. nonce: sO6iTb
.. section: Library

Fixed issues with arguments parsing in :mod:`hashlib`.

..

.. bpo: 34097
.. date: 2018-07-13-13-42-10
.. nonce: F5Dk5o
.. section: Library

ZipFile can zip files older than 1980-01-01 and newer than 2107-12-31 using
a new ``strict_timestamps`` parameter at the cost of setting the timestamp
to the limit.

..

.. bpo: 34108
.. date: 2018-07-13-08-44-52
.. nonce: RjobUC
.. section: Library

Remove extraneous CR in 2to3 refactor.

..

.. bpo: 34070
.. date: 2018-07-11-20-51-20
.. nonce: WpmFAu
.. section: Library

Make sure to only check if the handle is a tty, when opening a file with
``buffering=-1``.

..

.. bpo: 27494
.. date: 2018-07-11-10-03-21
.. nonce: 04OWkW
.. section: Library

Reverted :issue:`27494`. 2to3 rejects now a trailing comma in generator
expressions.

..

.. bpo: 33967
.. date: 2018-07-08-18-49-41
.. nonce: lhaAez
.. section: Library

functools.singledispatch now raises TypeError instead of IndexError when no
positional arguments are passed.

..

.. bpo: 34041
.. date: 2018-07-06-15-06-32
.. nonce: 0zrKLh
.. section: Library

Add the parameter *deterministic* to the
:meth:`sqlite3.Connection.create_function` method. Patch by Sergey Fedoseev.

..

.. bpo: 34056
.. date: 2018-07-05-22-45-46
.. nonce: 86isrU
.. section: Library

Ensure the loader shim created by ``imp.load_module`` always returns bytes
from its ``get_data()`` function. This fixes using ``imp.load_module`` with
:pep:`552` hash-based pycs.

..

.. bpo: 34054
.. date: 2018-07-05-18-37-05
.. nonce: nWRS6M
.. section: Library

The multiprocessing module now uses the monotonic clock
:func:`time.monotonic` instead of the system clock :func:`time.time` to
implement timeout.

..

.. bpo: 34043
.. date: 2018-07-04-21-14-35
.. nonce: 0YJNq9
.. section: Library

Optimize tarfile uncompress performance about 15% when gzip is used.

..

.. bpo: 34044
.. date: 2018-07-04-17-14-26
.. nonce: KWAu4y
.. section: Library

``subprocess.Popen`` now copies the *startupinfo* argument to leave it
unchanged: it will modify the copy, so that the same ``STARTUPINFO`` object
can be used multiple times.

..

.. bpo: 34010
.. date: 2018-07-04-07-36-53
.. nonce: VNDkde
.. section: Library

Fixed a performance regression for reading streams with tarfile. The
buffered read should use a list, instead of appending to a bytes object.

..

.. bpo: 34019
.. date: 2018-07-02-05-59-11
.. nonce: ZXJIife
.. section: Library

webbrowser: Correct the arguments passed to Opera Browser when opening a new
URL using the ``webbrowser`` module. Patch by Bumsik Kim.

..

.. bpo: 34003
.. date: 2018-06-29-13-05-01
.. nonce: Iu831h
.. section: Library

csv.DictReader now creates dicts instead of OrderedDicts. Patch by Michael
Selik.

..

.. bpo: 33978
.. date: 2018-06-29-12-23-34
.. nonce: y4csIw
.. section: Library

Closed existing logging handlers before reconfiguration via fileConfig and
dictConfig. Patch by Karthikeyan Singaravelan.

..

.. bpo: 14117
.. date: 2018-06-29-00-31-36
.. nonce: 3nvDuR
.. section: Library

Make minor tweaks to turtledemo. The 'wikipedia' example is now 'rosette',
describing what it draws.  The 'penrose' print output is reduced. The'1024'
output of 'tree' is eliminated.

..

.. bpo: 33974
.. date: 2018-06-28-14-56-44
.. nonce: SA8nNP
.. section: Library

Fixed passing lists and tuples of strings containing special characters
``"``, ``\``, ``{``, ``}`` and ``\n`` as options to :mod:`~tkinter.ttk`
widgets.

..

.. bpo: 27500
.. date: 2018-06-28-13-00-12
.. nonce: _s1gZ5
.. section: Library

Fix getaddrinfo to resolve IPv6 addresses correctly.

..

.. bpo: 24567
.. date: 2018-06-27-00-31-30
.. nonce: FuePyY
.. section: Library

Improve random.choices() to handle subnormal input weights that could
occasionally trigger an IndexError.

..

.. bpo: 33871
.. date: 2018-06-26-19-03-56
.. nonce: XhlrGU
.. section: Library

Fixed integer overflow in :func:`os.readv`, :func:`os.writev`,
:func:`os.preadv` and :func:`os.pwritev` and in :func:`os.sendfile` with
*headers* or *trailers* arguments (on BSD-based OSes and macOS).

..

.. bpo: 25007
.. date: 2018-06-26-16-55-59
.. nonce: 6LQWOF
.. section: Library

Add :func:`copy.copy` and :func:`copy.deepcopy` support to zlib compressors
and decompressors.  Patch by Zackery Spytz.

..

.. bpo: 33929
.. date: 2018-06-26-02-09-18
.. nonce: OcCLah
.. section: Library

multiprocessing: Fix a race condition in Popen of
multiprocessing.popen_spawn_win32. The child process now duplicates the read
end of pipe instead of "stealing" it. Previously, the read end of pipe was
"stolen" by the child process, but it leaked a handle if the child process
had been terminated before it could steal the handle from the parent
process.

..

.. bpo: 33899
.. date: 2018-06-24-01-57-14
.. nonce: IaOcAr
.. section: Library

Tokenize module now implicitly emits a NEWLINE when provided with input that
does not have a trailing new line.  This behavior now matches what the C
tokenizer does internally.  Contributed by Ammar Askar.

..

.. bpo: 33897
.. date: 2018-06-23-18-09-28
.. nonce: Hu0yvt
.. section: Library

Added a 'force' keyword argument to logging.basicConfig().

..

.. bpo: 33695
.. date: 2018-06-23-12-47-37
.. nonce: seRTxh
.. section: Library

:func:`shutil.copytree` uses :func:`os.scandir` function and all copy
functions depending from it use cached :func:`os.stat` values. The speedup
for copying a directory with 8000 files is around +9% on Linux, +20% on
Windows and + 30% on a Windows SMB share. Also the number of :func:`os.stat`
syscalls is reduced by 38% making :func:`shutil.copytree` especially faster
on network filesystems. (Contributed by Giampaolo Rodola' in
:issue:`33695`.)

..

.. bpo: 33916
.. date: 2018-06-21-11-35-47
.. nonce: cZgPCD
.. section: Library

bz2 and lzma: When Decompressor.__init__() is called twice, free the old
lock to not leak memory.

..

.. bpo: 32568
.. date: 2018-06-21-09-33-02
.. nonce: f_meGY
.. section: Library

Make select.epoll() and its documentation consistent regarding *sizehint*
and *flags*.

..

.. bpo: 33833
.. date: 2018-06-17-11-46-20
.. nonce: RnEqvM
.. section: Library

Fixed bug in asyncio where ProactorSocketTransport logs AssertionError if
force closed during write.

..

.. bpo: 33663
.. date: 2018-06-17-10-48-03
.. nonce: sUuGmq
.. section: Library

Convert content length to string before putting to header.

..

.. bpo: 33721
.. date: 2018-06-14-17-53-30
.. nonce: 8i9_9A
.. section: Library

:mod:`os.path` functions that return a boolean result like
:func:`~os.path.exists`, :func:`~os.path.lexists`, :func:`~os.path.isdir`,
:func:`~os.path.isfile`, :func:`~os.path.islink`, and
:func:`~os.path.ismount`, and :mod:`pathlib.Path` methods that return a
boolean result like :meth:`~pathlib.Path.exists()`,
:meth:`~pathlib.Path.is_dir()`, :meth:`~pathlib.Path.is_file()`,
:meth:`~pathlib.Path.is_mount()`, :meth:`~pathlib.Path.is_symlink()`,
:meth:`~pathlib.Path.is_block_device()`,
:meth:`~pathlib.Path.is_char_device()`, :meth:`~pathlib.Path.is_fifo()`,
:meth:`~pathlib.Path.is_socket()` now return ``False`` instead of raising
:exc:`ValueError` or its subclasses :exc:`UnicodeEncodeError` and
:exc:`UnicodeDecodeError` for paths that contain characters or bytes
unrepresentable at the OS level.

..

.. bpo: 26544
.. date: 2018-06-13-20-33-29
.. nonce: hQ1oMt
.. section: Library

Fixed implementation of :func:`platform.libc_ver`. It almost always returned
version '2.9' for glibc.

..

.. bpo: 33843
.. date: 2018-06-12-18-59-16
.. nonce: qVAK8g
.. section: Library

Remove deprecated ``cgi.escape``, ``cgi.parse_qs`` and ``cgi.parse_qsl``.

..

.. bpo: 33842
.. date: 2018-06-12-18-34-54
.. nonce: RZXSGu
.. section: Library

Remove ``tarfile.filemode`` which is deprecated since Python 3.3.

..

.. bpo: 30167
.. date: 2018-06-10-19-29-17
.. nonce: G5EgC5
.. section: Library

Prevent site.main() exception if PYTHONSTARTUP is set. Patch by Steve Weber.

..

.. bpo: 33805
.. date: 2018-06-10-15-14-17
.. nonce: 5LAz5a
.. section: Library

Improve error message of dataclasses.replace() when an InitVar is not
specified

..

.. bpo: 33687
.. date: 2018-06-10-14-08-52
.. nonce: 1zZdnA
.. section: Library

Fix the call to ``os.chmod()`` for ``uu.decode()`` if a mode is given or
decoded. Patch by Timo Furrer.

..

.. bpo: 33812
.. date: 2018-06-10-13-26-02
.. nonce: frGAOr
.. section: Library

Datetime instance d with non-None tzinfo, but with d.tzinfo.utcoffset(d)
returning None is now treated as naive by the astimezone() method.

..

.. bpo: 32108
.. date: 2018-06-10-12-15-26
.. nonce: iEkvh0
.. section: Library

In configparser, don't clear section when it is assigned to itself.

..

.. bpo: 27397
.. date: 2018-06-10-09-43-54
.. nonce: 0_fFQR
.. section: Library

Make email module properly handle invalid-length base64 strings.

..

.. bpo: 33578
.. date: 2018-06-08-23-55-34
.. nonce: 7oSsjG
.. section: Library

Implement multibyte encoder/decoder state methods

..

.. bpo: 30805
.. date: 2018-06-08-17-34-16
.. nonce: 3qCWa0
.. section: Library

Avoid race condition with debug logging

..

.. bpo: 33476
.. date: 2018-06-08-00-29-40
.. nonce: R0Bhlj
.. section: Library

Fix _header_value_parser.py when address group is missing final ';'.
Contributed by Enrique Perez-Terron

..

.. bpo: 33694
.. date: 2018-06-07-23-51-00
.. nonce: F1zIR1
.. section: Library

asyncio: Fix a race condition causing data loss on
pause_reading()/resume_reading() when using the ProactorEventLoop.

..

.. bpo: 32493
.. date: 2018-06-07-18-55-35
.. nonce: 1Bte62
.. section: Library

Correct test for ``uuid_enc_be`` availability in ``configure.ac``. Patch by
Michael Felt.

..

.. bpo: 33792
.. date: 2018-06-07-12-38-12
.. nonce: 3aKG7u
.. section: Library

Add asyncio.WindowsSelectorEventLoopPolicy and
asyncio.WindowsProactorEventLoopPolicy.

..

.. bpo: 33274
.. date: 2018-06-06-22-01-33
.. nonce: teYqv8
.. section: Library

W3C DOM Level 1 specifies return value of Element.removeAttributeNode() as
"The Attr node that was removed." xml.dom.minidom now complies with this
requirement.

..

.. bpo: 33778
.. date: 2018-06-05-20-22-30
.. nonce: _tSAS6
.. section: Library

Update ``unicodedata``'s database to Unicode version 11.0.0.

..

.. bpo: 33165
.. date: 2018-06-05-12-43-25
.. nonce: 9TIsVf
.. section: Library

Added a stacklevel parameter to logging calls to allow use of wrapper/helper
functions for logging APIs.

..

.. bpo: 33770
.. date: 2018-06-05-11-29-26
.. nonce: oBhxxw
.. section: Library

improve base64 exception message for encoded inputs of invalid length

..

.. bpo: 33769
.. date: 2018-06-04-13-46-39
.. nonce: D_pxYz
.. section: Library

asyncio/start_tls: Fix error message; cancel callbacks in case of an
unhandled error; mark SSLTransport as closed if it is aborted.

..

.. bpo: 33767
.. date: 2018-06-03-22-41-59
.. nonce: 2e82g3
.. section: Library

The concatenation (``+``) and repetition (``*``) sequence operations now
raise :exc:`TypeError` instead of :exc:`SystemError` when performed on
:class:`mmap.mmap` objects.  Patch by Zackery Spytz.

..

.. bpo: 33734
.. date: 2018-06-01-10-55-48
.. nonce: x1W9x0
.. section: Library

asyncio/ssl: Fix AttributeError, increase default handshake timeout

..

.. bpo: 31014
.. date: 2018-05-31-06-48-55
.. nonce: SNY681
.. section: Library

Fixed creating a controller for :mod:`webbrowser` when a user specifies a
path to an entry in the BROWSER environment variable.  Based on patch by
John Still.

..

.. bpo: 2504
.. date: 2018-05-30-16-00-06
.. nonce: BynUvU
.. section: Library

Add gettext.pgettext() and variants.

..

.. bpo: 33197
.. date: 2018-05-30-00-26-05
.. nonce: XkE2kL
.. section: Library

Add description property for _ParameterKind

..

.. bpo: 32751
.. date: 2018-05-29-15-32-18
.. nonce: oBTqr7
.. section: Library

When cancelling the task due to a timeout, :meth:`asyncio.wait_for` will now
wait until the cancellation is complete.

..

.. bpo: 32684
.. date: 2018-05-29-12-51-18
.. nonce: ZEIism
.. section: Library

Fix gather to propagate cancellation of itself even with return_exceptions.

..

.. bpo: 33654
.. date: 2018-05-29-01-13-39
.. nonce: sa81Si
.. section: Library

Support protocol type switching in SSLTransport.set_protocol().

..

.. bpo: 33674
.. date: 2018-05-29-00-37-56
.. nonce: 2IkGhL
.. section: Library

Pause the transport as early as possible to further reduce the risk of
data_received() being called before connection_made().

..

.. bpo: 33671
.. date: 2018-05-28-23-25-17
.. nonce: GIdKKi
.. section: Library

:func:`shutil.copyfile`, :func:`shutil.copy`, :func:`shutil.copy2`,
:func:`shutil.copytree` and :func:`shutil.move` use platform-specific
fast-copy syscalls on Linux and macOS in order to copy the file
more efficiently. On Windows :func:`shutil.copyfile` uses a bigger default
buffer size (1 MiB instead of 16 KiB) and a :func:`memoryview`-based variant
of :func:`shutil.copyfileobj` is used. The speedup for copying a 512MiB file
is about +26% on Linux, +50% on macOS and +40% on Windows. Also, much less
CPU cycles are consumed. (Contributed by Giampaolo Rodola' in
:issue:`25427`.)

..

.. bpo: 33674
.. date: 2018-05-28-22-49-59
.. nonce: 6LFFj7
.. section: Library

Fix a race condition in SSLProtocol.connection_made() of asyncio.sslproto:
start immediately the handshake instead of using call_soon(). Previously,
data_received() could be called before the handshake started, causing the
handshake to hang or fail.

..

.. bpo: 31647
.. date: 2018-05-28-18-40-26
.. nonce: s4Fad3
.. section: Library

Fixed bug where calling write_eof() on a _SelectorSocketTransport after it's
already closed raises AttributeError.

..

.. bpo: 32610
.. date: 2018-05-28-16-40-32
.. nonce: KvUAsL
.. section: Library

Make asyncio.all_tasks() return only pending tasks.

..

.. bpo: 32410
.. date: 2018-05-28-16-19-35
.. nonce: Z1DZaF
.. section: Library

Avoid blocking on file IO in sendfile fallback code

..

.. bpo: 33469
.. date: 2018-05-28-15-55-12
.. nonce: hmXBpY
.. section: Library

Fix RuntimeError after closing loop that used run_in_executor

..

.. bpo: 33672
.. date: 2018-05-28-12-29-54
.. nonce: GM_Xm_
.. section: Library

Fix Task.__repr__ crash with Cython's bogus coroutines

..

.. bpo: 33654
.. date: 2018-05-26-13-09-34
.. nonce: IbYWxA
.. section: Library

Fix transport.set_protocol() to support switching between asyncio.Protocol
and asyncio.BufferedProtocol.  Fix loop.start_tls() to work with
asyncio.BufferedProtocols.

..

.. bpo: 33652
.. date: 2018-05-26-10-13-59
.. nonce: humFJ1
.. section: Library

Pickles of type variables and subscripted generics are now future-proof and
compatible with older Python versions.

..

.. bpo: 32493
.. date: 2018-05-24-17-41-36
.. nonce: 5tAoAu
.. section: Library

Fixed :func:`uuid.uuid1` on FreeBSD.

..

.. bpo: 33238
.. date: 2018-05-24-09-15-52
.. nonce: ooDfoo
.. section: Library

Add ``InvalidStateError`` to :mod:`concurrent.futures`.
``Future.set_result`` and ``Future.set_exception`` now raise
``InvalidStateError`` if the futures are not pending or running. Patch by
Jason Haydaman.

..

.. bpo: 33618
.. date: 2018-05-23-20-14-34
.. nonce: xU39lr
.. section: Library

Finalize and document preliminary and experimental TLS 1.3 support with
OpenSSL 1.1.1

..

.. bpo: 33625
.. date: 2018-05-23-17-07-54
.. nonce: nzQgD8
.. section: Library

Release GIL on `grp.getgrnam`, `grp.getgrgid`, `pwd.getpwnam` and
`pwd.getpwuid` if reentrant variants of these functions are available. Patch
by William Grzybowski.

..

.. bpo: 33623
.. date: 2018-05-23-14-58-05
.. nonce: wAw1cF
.. section: Library

Fix possible SIGSGV when asyncio.Future is created in __del__

..

.. bpo: 11874
.. date: 2018-05-23-00-26-27
.. nonce: glK5iP
.. section: Library

Use a better regex when breaking usage into wrappable parts. Avoids bogus
assertion errors from custom metavar strings.

..

.. bpo: 30877
.. date: 2018-05-22-13-05-12
.. nonce: JZEGjI
.. section: Library

Fixed a bug in the Python implementation of the JSON decoder that prevented
the cache of parsed strings from clearing after finishing the decoding.
Based on patch by c-fos.

..

.. bpo: 33604
.. date: 2018-05-22-11-55-33
.. nonce: 6V4JcO
.. section: Library

Remove HMAC default to md5 marked for removal in 3.8 (removal originally
planned in 3.6, bump to 3.8 in gh-7062).

..

.. bpo: 33582
.. date: 2018-05-19-15-58-14
.. nonce: qBZPmF
.. section: Library

Emit a deprecation warning for inspect.formatargspec

..

.. bpo: 21145
.. date: 2018-05-18-22-52-34
.. nonce: AiQMDx
.. section: Library

Add ``functools.cached_property`` decorator, for computed properties cached
for the life of the instance.

..

.. bpo: 33570
.. date: 2018-05-18-21-50-47
.. nonce: 7CZy4t
.. section: Library

Change TLS 1.3 cipher suite settings for compatibility with OpenSSL
1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 ciphers enabled by
default.

..

.. bpo: 28556
.. date: 2018-05-17-22-53-08
.. nonce: C6Hnd1
.. section: Library

Do not simplify arguments to `typing.Union`. Now `Union[Manager, Employee]`
is not simplified to `Employee` at runtime. Such simplification previously
caused several bugs and limited possibilities for introspection.

..

.. bpo: 12486
.. date: 2018-05-17-22-14-58
.. nonce: HBeh62
.. section: Library

:func:`tokenize.generate_tokens` is now documented as a public API to
tokenize unicode strings. It was previously present but undocumented.

..

.. bpo: 33540
.. date: 2018-05-16-18-10-38
.. nonce: wy9LRV
.. section: Library

Add a new ``block_on_close`` class attribute to ``ForkingMixIn`` and
``ThreadingMixIn`` classes of :mod:`socketserver`.

..

.. bpo: 33548
.. date: 2018-05-16-17-05-48
.. nonce: xWslmx
.. section: Library

tempfile._candidate_tempdir_list should consider common TEMP locations

..

.. bpo: 33109
.. date: 2018-05-16-14-57-58
.. nonce: nPLL_S
.. section: Library

argparse subparsers are once again not required by default, reverting the
change in behavior introduced by bpo-26510 in 3.7.0a2.

..

.. bpo: 33541
.. date: 2018-05-16-12-32-48
.. nonce: kQORPE
.. section: Library

Remove unused private method ``_strptime.LocaleTime.__pad`` (a.k.a.
``_LocaleTime__pad``).

..

.. bpo: 33536
.. date: 2018-05-16-10-07-40
.. nonce: _s0TE8
.. section: Library

dataclasses.make_dataclass now checks for invalid field names and duplicate
fields. Also, added a check for invalid field specifications.

..

.. bpo: 33542
.. date: 2018-05-16-09-30-27
.. nonce: idNAcs
.. section: Library

Prevent ``uuid.get_node`` from using a DUID instead of a MAC on Windows.
Patch by Zvi Effron

..

.. bpo: 26819
.. date: 2018-05-16-05-24-43
.. nonce: taxbVT
.. section: Library

Fix race condition with `ReadTransport.resume_reading` in Windows proactor
event loop.

..

.. bpo: 0
.. date: 2018-05-15-18-02-03
.. nonce: pj2Mbb
.. section: Library

Fix failure in `typing.get_type_hints()` when ClassVar was provided as a
string forward reference.

..

.. bpo: 33516
.. date: 2018-05-15-17-06-42
.. nonce: ZzARe4
.. section: Library

:class:`unittest.mock.MagicMock` now supports the ``__round__`` magic
method.

..

.. bpo: 28612
.. date: 2018-05-15-15-03-48
.. nonce: E9dz39
.. section: Library

Added support for Site Maps to urllib's ``RobotFileParser`` as
:meth:`RobotFileParser.site_maps()
<urllib.robotparser.RobotFileParser.site_maps>`. Patch by Lady Red, based on
patch by Peter Wirtz.

..

.. bpo: 28167
.. date: 2018-05-15-13-49-13
.. nonce: p4RdQt
.. section: Library

Remove platform.linux_distribution, which was deprecated since 3.5.

..

.. bpo: 33504
.. date: 2018-05-15-12-11-13
.. nonce: czsHFg
.. section: Library

Switch the default dictionary implementation for :mod:`configparser` from
:class:`collections.OrderedDict` to the standard :class:`dict` type.

..

.. bpo: 33505
.. date: 2018-05-14-18-05-35
.. nonce: L8pAyt
.. section: Library

Optimize asyncio.ensure_future() by reordering if checks: 1.17x faster.

..

.. bpo: 33497
.. date: 2018-05-14-17-49-34
.. nonce: wWT6XM
.. section: Library

Add errors param to cgi.parse_multipart and make an encoding in FieldStorage
use the given errors (needed for Twisted).  Patch by Amber Brown.

..

.. bpo: 29235
.. date: 2018-05-14-15-01-55
.. nonce: 47Fzwt
.. section: Library

The :class:`cProfile.Profile` class can now be used as a context manager.
Patch by Scott Sanderson.

..

.. bpo: 33495
.. date: 2018-05-14-10-29-03
.. nonce: TeGTQJ
.. section: Library

Change dataclasses.Fields repr to use the repr of each of its members,
instead of str.  This makes it more clear what each field actually
represents.  This is especially true for the 'type' member.

..

.. bpo: 26103
.. date: 2018-05-14-09-07-14
.. nonce: _zU8E2
.. section: Library

Correct ``inspect.isdatadescriptor`` to look for ``__set__`` or
``__delete__``.  Patch by Aaron Hall.

..

.. bpo: 29209
.. date: 2018-05-12-13-06-41
.. nonce: h5RxYy
.. section: Library

Removed the ``doctype()`` method and the *html* parameter of the constructor
of :class:`~xml.etree.ElementTree.XMLParser`.  The ``doctype()`` method
defined in a subclass will no longer be called.  Deprecated methods
``getchildren()`` and ``getiterator()`` in the :mod:`~xml.etree.ElementTree`
module emit now a :exc:`DeprecationWarning` instead of
:exc:`PendingDeprecationWarning`.

..

.. bpo: 33453
.. date: 2018-05-12-06-01-02
.. nonce: Fj-jMD
.. section: Library

Fix dataclasses to work if using literal string type annotations or if using
PEP 563 "Postponed Evaluation of Annotations".  Only specific string
prefixes are detected for both ClassVar ("ClassVar" and "typing.ClassVar")
and InitVar ("InitVar" and "dataclasses.InitVar").

..

.. bpo: 28556
.. date: 2018-05-08-16-43-42
.. nonce: _xr5mp
.. section: Library

Minor fixes in typing module: add annotations to ``NamedTuple.__new__``,
pass ``*args`` and ``**kwds`` in ``Generic.__new__``.  Original PRs by
Paulius Šarka and Chad Dombrova.

..

.. bpo: 33365
.. date: 2018-05-08-15-01-10
.. nonce: SicsAd
.. section: Library

Print the header values besides the header keys instead just the header keys
if *debuglevel* is set to >0 in :mod:`http.client`. Patch by Marco Strigl.

..

.. bpo: 20087
.. date: 2018-05-05-18-02-24
.. nonce: lJrvXL
.. section: Library

Updated alias mapping with glibc 2.27 supported locales.

..

.. bpo: 33422
.. date: 2018-05-05-09-53-05
.. nonce: 4FtQ0q
.. section: Library

Fix trailing quotation marks getting deleted when looking up byte/string
literals on pydoc. Patch by Andrés Delfino.

..

.. bpo: 28167
.. date: 2018-05-02-07-26-29
.. nonce: 7FwDfN
.. section: Library

The function ``platform.linux_distribution`` and ``platform.dist`` now
trigger a ``DeprecationWarning`` and have been marked for removal in Python
3.8

..

.. bpo: 33281
.. date: 2018-05-01-22-35-50
.. nonce: d4jOt4
.. section: Library

Fix ctypes.util.find_library regression on macOS.

..

.. bpo: 33311
.. date: 2018-05-01-22-33-14
.. nonce: 8YPB-k
.. section: Library

Text and html output generated by cgitb does not display parentheses if the
current call is done directly in the module. Patch by Stéphane Blondon.

..

.. bpo: 27300
.. date: 2018-05-01-02-24-44
.. nonce: LdIXvK
.. section: Library

The file classes in *tempfile* now accept an *errors* parameter that
complements the already existing *encoding*.  Patch by Stephan Hohe.

..

.. bpo: 32933
.. date: 2018-04-30-22-43-31
.. nonce: M3iI_y
.. section: Library

:func:`unittest.mock.mock_open` now supports iteration over the file
contents. Patch by Tony Flury.

..

.. bpo: 33217
.. date: 2018-04-30-13-29-47
.. nonce: TENDzd
.. section: Library

Raise :exc:`TypeError` when looking up non-Enum objects in Enum classes and
Enum members.

..

.. bpo: 33197
.. date: 2018-04-29-23-56-20
.. nonce: dgRLqr
.. section: Library

Update error message when constructing invalid inspect.Parameters Patch by
Dong-hee Na.

..

.. bpo: 33383
.. date: 2018-04-29-11-15-38
.. nonce: g32YWn
.. section: Library

Fixed crash in the get() method of the :mod:`dbm.ndbm` database object when
it is called with a single argument.

..

.. bpo: 33375
.. date: 2018-04-28-08-11-35
.. nonce: Dbq1fz
.. section: Library

The warnings module now finds the Python file associated with a warning from
the code object, rather than the frame's global namespace. This is
consistent with how tracebacks and pdb find filenames, and should work
better for dynamically executed code.

..

.. bpo: 33336
.. date: 2018-04-27-22-18-38
.. nonce: T8rxn0
.. section: Library

``imaplib`` now allows ``MOVE`` command in ``IMAP4.uid()`` (RFC 6851: IMAP
MOVE Extension) and potentially as a name of supported method of ``IMAP4``
object.

..

.. bpo: 32455
.. date: 2018-04-26-13-31-10
.. nonce: KPWg3K
.. section: Library

Added *jump* parameter to :func:`dis.stack_effect`.

..

.. bpo: 27485
.. date: 2018-04-25-14-05-21
.. nonce: nclVSU
.. section: Library

Rename and deprecate undocumented functions in :func:`urllib.parse`.

..

.. bpo: 33332
.. date: 2018-04-23-21-41-30
.. nonce: Y6OZ8Z
.. section: Library

Add ``signal.valid_signals()`` to expose the POSIX sigfillset()
functionality.

..

.. bpo: 33251
.. date: 2018-04-23-18-25-36
.. nonce: C_K-J9
.. section: Library

`ConfigParser.items()` was fixed so that key-value pairs passed in via
`vars` are not included in the resulting output.

..

.. bpo: 33329
.. date: 2018-04-23-13-21-39
.. nonce: lQ-Eod
.. section: Library

Fix multiprocessing regression on newer glibcs

..

.. bpo: 33334
.. date: 2018-04-22-20-13-21
.. nonce: 19UMOC
.. section: Library

:func:`dis.stack_effect` now supports all defined opcodes including NOP and
EXTENDED_ARG.

..

.. bpo: 991266
.. date: 2018-04-21-00-24-08
.. nonce: h93TP_
.. section: Library

Fix quoting of the ``Comment`` attribute of
:class:`http.cookies.SimpleCookie`.

..

.. bpo: 33131
.. date: 2018-04-20-10-43-17
.. nonce: L2E977
.. section: Library

Upgrade bundled version of pip to 10.0.1.

..

.. bpo: 33308
.. date: 2018-04-18-19-12-25
.. nonce: fW75xi
.. section: Library

Fixed a crash in the :mod:`parser` module when converting an ST object to a
tree of tuples or lists with ``line_info=False`` and ``col_info=True``.

..

.. bpo: 23403
.. date: 2018-04-16-16-21-09
.. nonce: rxR1Q_
.. section: Library

lib2to3 now uses pickle protocol 4 for pre-computed grammars.

..

.. bpo: 33266
.. date: 2018-04-16-15-59-21
.. nonce: w2PAm-
.. section: Library

lib2to3 now recognizes ``rf'...'`` strings.

..

.. bpo: 11594
.. date: 2018-04-16-08-42-03
.. nonce: QLo4vv
.. section: Library

Ensure line-endings are respected when using lib2to3.

..

.. bpo: 33254
.. date: 2018-04-13-15-14-47
.. nonce: DS4KFK
.. section: Library

Have :func:`importlib.resources.contents` and
:meth:`importlib.abc.ResourceReader.contents` return an :term:`iterable`
instead of an :term:`iterator`.

..

.. bpo: 33265
.. date: 2018-04-13-08-12-50
.. nonce: KPQRk0
.. section: Library

``contextlib.ExitStack`` and ``contextlib.AsyncExitStack`` now use a method
instead of a wrapper function for exit callbacks.

..

.. bpo: 33263
.. date: 2018-04-11-20-29-19
.. nonce: B56Hc1
.. section: Library

Fix FD leak in `_SelectorSocketTransport`  Patch by Vlad Starostin.

..

.. bpo: 33256
.. date: 2018-04-10-20-57-14
.. nonce: ndHkqu
.. section: Library

Fix display of ``<module>`` call in the html produced by ``cgitb.html()``.
Patch by Stéphane Blondon.

..

.. bpo: 33144
.. date: 2018-04-10-14-50-30
.. nonce: iZr4et
.. section: Library

``random.Random()`` and its subclassing mechanism got optimized to check
only once at class/subclass instantiation time whether its ``getrandbits()``
method can be relied on by other methods, including ``randrange()``, for the
generation of arbitrarily large random integers.  Patch by Wolfgang Maier.

..

.. bpo: 33185
.. date: 2018-04-08-22-54-07
.. nonce: Id-Ba9
.. section: Library

Fixed regression when running pydoc with the :option:`-m` switch. (The
regression was introduced in 3.7.0b3 by the resolution of :issue:`33053`)

This fix also changed pydoc to add ``os.getcwd()`` to :data:`sys.path` when
necessary, rather than adding ``"."``.

..

.. bpo: 29613
.. date: 2018-04-07-13-49-39
.. nonce: r6FDnB
.. section: Library

Added support for the ``SameSite`` cookie flag to the ``http.cookies``
module.

..

.. bpo: 33169
.. date: 2018-04-06-14-56-26
.. nonce: ByhDqb
.. section: Library

Delete entries of ``None`` in :data:`sys.path_importer_cache` when
:meth:`importlib.machinery.invalidate_caches` is called.

..

.. bpo: 33203
.. date: 2018-04-05-11-09-45
.. nonce: Hje9Py
.. section: Library

``random.Random.choice()`` now raises ``IndexError`` for empty sequences
consistently even when called from subclasses without a ``getrandbits()``
implementation.

..

.. bpo: 33224
.. date: 2018-04-04-23-41-30
.. nonce: pyR0jB
.. section: Library

Update difflib.mdiff() for :pep:`479`.  Convert an uncaught StopIteration in
a generator into a return-statement.

..

.. bpo: 33209
.. date: 2018-04-03-10-37-13
.. nonce: 9sGWE_
.. section: Library

End framing at the end of C implementation of :func:`pickle.Pickler.dump`.

..

.. bpo: 32861
.. date: 2018-04-02-20-44-54
.. nonce: HeBjzN
.. section: Library

The urllib.robotparser's ``__str__`` representation now includes wildcard
entries and the "Crawl-delay" and "Request-rate" fields. Also removes extra
newlines that were being appended to the end of the string. Patch by Michael
Lazar.

..

.. bpo: 23403
.. date: 2018-04-02-16-10-12
.. nonce: KG7ADV
.. section: Library

``DEFAULT_PROTOCOL`` in :mod:`pickle` was bumped to 4. Protocol 4 is
described in :pep:`3154` and available since Python 3.4. It offers better
performance and smaller size compared to protocol 3 introduced in Python
3.0.

..

.. bpo: 20104
.. date: 2018-04-01-19-21-04
.. nonce: -AKcGa
.. section: Library

Improved error handling and fixed a reference leak in
:func:`os.posix_spawn()`.

..

.. bpo: 33106
.. date: 2018-03-30-01-20-35
.. nonce: zncfvW
.. section: Library

Deleting a key from a read-only dbm database raises module specific error
instead of KeyError.

..

.. bpo: 33175
.. date: 2018-03-29-04-32-25
.. nonce: _zs1yM
.. section: Library

In dataclasses, Field.__set_name__ now looks up the __set_name__ special
method on the class, not the instance, of the default value.

..

.. bpo: 32380
.. date: 2018-03-29-03-09-22
.. nonce: NhuGig
.. section: Library

Create functools.singledispatchmethod to support generic single dispatch on
descriptors and methods.

..

.. bpo: 33141
.. date: 2018-03-26-12-33-13
.. nonce: 23wlxf
.. section: Library

Have Field objects pass through __set_name__ to their default values, if
they have their own __set_name__.

..

.. bpo: 33096
.. date: 2018-03-25-13-18-16
.. nonce: ofdbe7
.. section: Library

Allow ttk.Treeview.insert to insert iid that has a false boolean value. Note
iid=0 and iid=False would be same. Patch by Garvit Khatri.

..

.. bpo: 32873
.. date: 2018-03-24-19-54-48
.. nonce: cHyoAm
.. section: Library

Treat type variables and special typing forms as immutable by copy and
pickle.  This fixes several minor issues and inconsistencies, and improves
backwards compatibility with Python 3.6.

..

.. bpo: 33134
.. date: 2018-03-24-19-34-26
.. nonce: hbVeIX
.. section: Library

When computing dataclass's __hash__, use the lookup table to contain the
function which returns the __hash__ value.  This is an improvement over
looking up a string, and then testing that string to see what to do.

..

.. bpo: 33127
.. date: 2018-03-24-15-08-24
.. nonce: olJmHv
.. section: Library

The ssl module now compiles with LibreSSL 2.7.1.

..

.. bpo: 32505
.. date: 2018-03-22-16-05-56
.. nonce: YK1N8v
.. section: Library

Raise TypeError if a member variable of a dataclass is of type Field, but
doesn't have a type annotation.

..

.. bpo: 33078
.. date: 2018-03-21-17-59-39
.. nonce: PQOniT
.. section: Library

Fix the failure on OSX caused by the tests relying on sem_getvalue

..

.. bpo: 33116
.. date: 2018-03-21-16-52-26
.. nonce: Tvzerj
.. section: Library

Add 'Field' to dataclasses.__all__.

..

.. bpo: 32896
.. date: 2018-03-20-20-53-21
.. nonce: ewW3Ln
.. section: Library

Fix an error where subclassing a dataclass with a field that uses a
default_factory would generate an incorrect class.

..

.. bpo: 33100
.. date: 2018-03-19-20-47-00
.. nonce: chyIO4
.. section: Library

Dataclasses: If a field has a default value that's a MemberDescriptorType,
then it's from that field being in __slots__, not an actual default value.

..

.. bpo: 32953
.. date: 2018-03-18-17-38-48
.. nonce: t8WAWN
.. section: Library

If a non-dataclass inherits from a frozen dataclass, allow attributes to be
added to the derived class.  Only attributes from the frozen dataclass
cannot be assigned to.  Require all dataclasses in a hierarchy to be either
all frozen or all non-frozen.

..

.. bpo: 33097
.. date: 2018-03-18-16-48-23
.. nonce: Yl4gI2
.. section: Library

Raise RuntimeError when ``executor.submit`` is called during interpreter
shutdown.

..

.. bpo: 32968
.. date: 2018-03-18-15-57-32
.. nonce: E4G7BO
.. section: Library

Modulo and floor division involving Fraction and float should return float.

..

.. bpo: 33061
.. date: 2018-03-16-16-07-33
.. nonce: TRTTek
.. section: Library

Add missing ``NoReturn`` to ``__all__`` in typing.py

..

.. bpo: 33078
.. date: 2018-03-15-07-38-00
.. nonce: RmjUF5
.. section: Library

Fix the size handling in multiprocessing.Queue when a pickling error occurs.

..

.. bpo: 33064
.. date: 2018-03-12-19-58-25
.. nonce: LO2KIY
.. section: Library

lib2to3 now properly supports trailing commas after ``*args`` and
``**kwargs`` in function signatures.

..

.. bpo: 33056
.. date: 2018-03-12-16-40-00
.. nonce: lNN9Eh
.. section: Library

FIX properly close leaking fds in concurrent.futures.ProcessPoolExecutor.

..

.. bpo: 33021
.. date: 2018-03-12-00-27-56
.. nonce: m19B9T
.. section: Library

Release the GIL during fstat() calls, avoiding hang of all threads when
calling mmap.mmap(), os.urandom(), and random.seed().  Patch by Nir Soffer.

..

.. bpo: 31804
.. date: 2018-03-11-19-03-52
.. nonce: i8KUMp
.. section: Library

Avoid failing in multiprocessing.Process if the standard streams are closed
or None at exit.

..

.. bpo: 33034
.. date: 2018-03-11-08-44-12
.. nonce: bpb23d
.. section: Library

Providing an explicit error message when casting the port property to
anything that is not an integer value using ``urlparse()`` and
``urlsplit()``. Patch by Matt Eaton.

..

.. bpo: 30249
.. date: 2018-03-11-00-20-26
.. nonce: KSkgLB
.. section: Library

Improve struct.unpack_from() exception messages for problems with the buffer
size and offset.

..

.. bpo: 33037
.. date: 2018-03-09-23-07-07
.. nonce: nAJ3at
.. section: Library

Skip sending/receiving data after SSL transport closing.

..

.. bpo: 27683
.. date: 2018-03-07-22-28-17
.. nonce: 572Rv4
.. section: Library

Fix a regression in :mod:`ipaddress` that result of :meth:`hosts` is empty
when the network is constructed by a tuple containing an integer mask and
only 1 bit left for addresses.

..

.. bpo: 22674
.. date: 2018-03-07-19-37-00
.. nonce: 2sIMmM
.. section: Library

Add the strsignal() function in the signal module that returns the system
description of the given signal, as returned by strsignal(3).

..

.. bpo: 32999
.. date: 2018-03-06-20-30-20
.. nonce: lgFXWl
.. section: Library

Fix C implementation of ``ABC.__subclasscheck__(cls, subclass)`` crashed
when ``subclass`` is not a type object.

..

.. bpo: 33009
.. date: 2018-03-06-11-54-59
.. nonce: -Ekysb
.. section: Library

Fix inspect.signature() for single-parameter partialmethods.

..

.. bpo: 32969
.. date: 2018-03-06-00-19-41
.. nonce: rGTKa0
.. section: Library

Expose several missing constants in zlib and fix corresponding
documentation.

..

.. bpo: 32056
.. date: 2018-03-01-17-49-56
.. nonce: IlpfgE
.. section: Library

Improved exceptions raised for invalid number of channels and sample width
when read an audio file in modules :mod:`aifc`, :mod:`wave` and
:mod:`sunau`.

..

.. bpo: 32970
.. date: 2018-02-28-18-39-48
.. nonce: IPWtbS
.. section: Library

Improved disassembly of the MAKE_FUNCTION instruction.

..

.. bpo: 32844
.. date: 2018-02-28-13-08-00
.. nonce: u8tnAe
.. section: Library

Fix wrong redirection of a low descriptor (0 or 1) to stderr in subprocess
if another low descriptor is closed.

..

.. bpo: 32960
.. date: 2018-02-26-20-04-40
.. nonce: 48r0Ml
.. section: Library

For dataclasses, disallow inheriting frozen from non-frozen classes, and
also disallow inheriting non-frozen from frozen classes. This restriction
will be relaxed at a future date.

..

.. bpo: 32713
.. date: 2018-02-26-13-16-36
.. nonce: 55yegW
.. section: Library

Fixed tarfile.itn handling of out-of-bounds float values. Patch by Joffrey
Fuhrer.

..

.. bpo: 32257
.. date: 2018-02-26-09-08-07
.. nonce: 6ElnUt
.. section: Library

The ssl module now contains OP_NO_RENEGOTIATION constant, available with
OpenSSL 1.1.0h or 1.1.1.

..

.. bpo: 32951
.. date: 2018-02-25-18-22-01
.. nonce: gHrCXq
.. section: Library

Direct instantiation of SSLSocket and SSLObject objects is now prohibited.
The constructors were never documented, tested, or designed as public
constructors. Users were suppose to use ssl.wrap_socket() or SSLContext.

..

.. bpo: 32929
.. date: 2018-02-25-13-47-48
.. nonce: X2gTDH
.. section: Library

Remove the tri-state parameter "hash", and add the boolean "unsafe_hash". If
unsafe_hash is True, add a __hash__ function, but if a __hash__ exists,
raise TypeError.  If unsafe_hash is False, add a __hash__ based on the
values of eq= and frozen=.  The unsafe_hash=False behavior is the same as
the old hash=None behavior.  unsafe_hash=False is the default, just as
hash=None used to be.

..

.. bpo: 32947
.. date: 2018-02-25-13-06-21
.. nonce: mqStVW
.. section: Library

Add OP_ENABLE_MIDDLEBOX_COMPAT and test workaround for TLSv1.3 for future
compatibility with OpenSSL 1.1.1.

..

.. bpo: 32146
.. date: 2018-02-25-10-17-23
.. nonce: xOzUFW
.. section: Library

Document the interaction between frozen executables and the spawn and
forkserver start methods in multiprocessing.

..

.. bpo: 30622
.. date: 2018-02-24-21-40-42
.. nonce: dQjxSe
.. section: Library

The ssl module now detects missing NPN support in LibreSSL.

..

.. bpo: 32922
.. date: 2018-02-23-19-12-04
.. nonce: u-xe0B
.. section: Library

dbm.open() now encodes filename with the filesystem encoding rather than
default encoding.

..

.. bpo: 32759
.. date: 2018-02-23-12-21-41
.. nonce: M-y9GA
.. section: Library

Free unused arenas in multiprocessing.heap.

..

.. bpo: 32859
.. date: 2018-02-19-17-46-31
.. nonce: kAT-Xp
.. section: Library

In ``os.dup2``, don't check every call whether the ``dup3`` syscall exists
or not.

..

.. bpo: 32556
.. date: 2018-02-19-14-27-51
.. nonce: CsRsgr
.. section: Library

nt._getfinalpathname, nt._getvolumepathname and nt._getdiskusage now
correctly convert from bytes.

..

.. bpo: 21060
.. date: 2018-02-17-19-20-19
.. nonce: S1Z-x6
.. section: Library

Rewrite confusing message from setup.py upload from "No dist file created in
earlier command" to the more helpful "Must create and upload files in one
command".

..

.. bpo: 32857
.. date: 2018-02-16-14-37-14
.. nonce: -XljAx
.. section: Library

In :mod:`tkinter`, ``after_cancel(None)`` now raises a :exc:`ValueError`
instead of canceling the first scheduled function.  Patch by Cheryl Sabella.

..

.. bpo: 32852
.. date: 2018-02-15-12-04-29
.. nonce: HDqIxM
.. section: Library

Make sure sys.argv remains as a list when running trace.

..

.. bpo: 31333
.. date: 2018-02-15-08-18-52
.. nonce: 4fF-gM
.. section: Library

``_abc`` module is added.  It is a speedup module with C implementations for
various functions and methods in ``abc``.  Creating an ABC subclass and
calling ``isinstance`` or ``issubclass`` with an ABC subclass are up to 1.5x
faster. In addition, this makes Python start-up up to 10% faster.

Note that the new implementation hides internal registry and caches,
previously accessible via private attributes ``_abc_registry``,
``_abc_cache``, and ``_abc_negative_cache``.  There are three debugging
helper methods that can be used instead ``_dump_registry``,
``_abc_registry_clear``, and ``_abc_caches_clear``.

..

.. bpo: 32841
.. date: 2018-02-14-00-21-24
.. nonce: bvHDOc
.. section: Library

Fixed `asyncio.Condition` issue which silently ignored cancellation after
notifying and cancelling a conditional lock. Patch by Bar Harel.

..

.. bpo: 32819
.. date: 2018-02-11-15-54-41
.. nonce: ZTRX2Q
.. section: Library

ssl.match_hostname() has been simplified and no longer depends on re and
ipaddress module for wildcard and IP addresses. Error reporting for invalid
wildcards has been improved.

..

.. bpo: 19675
.. date: 2018-02-10-23-41-05
.. nonce: -dj35-
.. section: Library

``multiprocessing.Pool`` no longer leaks processes if its initialization
fails.

..

.. bpo: 32394
.. date: 2018-02-10-13-51-56
.. nonce: dFM9SI
.. section: Library

socket: Remove TCP_FASTOPEN,TCP_KEEPCNT,TCP_KEEPIDLE,TCP_KEEPINTVL flags on
older version Windows during run-time.

..

.. bpo: 31787
.. date: 2018-02-09-21-41-56
.. nonce: owSZ2t
.. section: Library

Fixed refleaks of ``__init__()`` methods in various modules. (Contributed by
Oren Milman)

..

.. bpo: 30157
.. date: 2018-02-09-14-44-43
.. nonce: lEiiAK
.. section: Library

Fixed guessing quote and delimiter in csv.Sniffer.sniff() when only the last
field is quoted.  Patch by Jake Davis.

..

.. bpo: 30688
.. date: 2018-02-08-18-59-11
.. nonce: zBh4TH
.. section: Library

Added support of ``\N{name}`` escapes in regular expressions.  Based on
patch by Jonathan Eunice.

..

.. bpo: 32792
.. date: 2018-02-08-00-47-07
.. nonce: NtyDb4
.. section: Library

collections.ChainMap() preserves the order of the underlying mappings.

..

.. bpo: 32775
.. date: 2018-02-07-19-12-10
.. nonce: -T77_c
.. section: Library

:func:`fnmatch.translate()` no longer produces patterns which contain set
operations. Sets starting with '[' or containing '--', '&&', '~~' or '||'
will be interpreted differently in regular expressions in future versions.
Currently they emit warnings. fnmatch.translate() now avoids producing
patterns containing such sets by accident.

..

.. bpo: 32622
.. date: 2018-02-06-17-58-15
.. nonce: AE0Jz7
.. section: Library

Implement native fast sendfile for Windows proactor event loop.

..

.. bpo: 32777
.. date: 2018-02-05-21-28-28
.. nonce: C-wIXF
.. section: Library

Fix a rare but potential pre-exec child process deadlock in subprocess on
POSIX systems when marking file descriptors inheritable on exec in the child
process.  This bug appears to have been introduced in 3.4.

..

.. bpo: 32647
.. date: 2018-02-05-13-31-42
.. nonce: ktmfR_
.. section: Library

The ctypes module used to depend on indirect linking for dlopen. The shared
extension is now explicitly linked against libdl on platforms with dl.

..

.. bpo: 32749
.. date: 2018-02-02-17-21-24
.. nonce: u5scIn
.. section: Library

A :mod:`dbm.dumb` database opened with flags 'r' is now read-only.
:func:`dbm.dumb.open` with flags 'r' and 'w' no longer creates a database if
it does not exist.

..

.. bpo: 32741
.. date: 2018-02-01-17-54-08
.. nonce: KUvOPL
.. section: Library

Implement ``asyncio.TimerHandle.when()`` method.

..

.. bpo: 32691
.. date: 2018-02-01-15-53-35
.. nonce: VLWVTq
.. section: Library

Use mod_spec.parent when running modules with pdb

..

.. bpo: 32734
.. date: 2018-02-01-01-34-47
.. nonce: gCV9AD
.. section: Library

Fixed ``asyncio.Lock()`` safety issue which allowed acquiring and locking
the same lock multiple times, without it being free. Patch by Bar Harel.

..

.. bpo: 32727
.. date: 2018-01-30-17-46-18
.. nonce: aHVsRC
.. section: Library

Do not include name field in SMTP envelope from address. Patch by Stéphane
Wirtel

..

.. bpo: 31453
.. date: 2018-01-21-15-01-50
.. nonce: cZiZBe
.. section: Library

Add TLSVersion constants and SSLContext.maximum_version / minimum_version
attributes. The new API wraps OpenSSL 1.1
https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
feature.

..

.. bpo: 24334
.. date: 2018-01-20-23-17-25
.. nonce: GZuQLv
.. section: Library

Internal implementation details of ssl module were cleaned up. The SSLSocket
has one less layer of indirection. Owner and session information are now
handled by the SSLSocket and SSLObject constructor. Channel binding
implementation has been simplified.

..

.. bpo: 31848
.. date: 2018-01-18-23-34-17
.. nonce: M2cldy
.. section: Library

Fix the error handling in Aifc_read.initfp() when the SSND chunk is not
found. Patch by Zackery Spytz.

..

.. bpo: 32585
.. date: 2018-01-18-13-09-00
.. nonce: qpeijr
.. section: Library

Add Ttk spinbox widget to :mod:`tkinter.ttk`.  Patch by Alan D Moore.

..

.. bpo: 32512
.. date: 2018-01-07-17-43-10
.. nonce: flC-dE
.. section: Library

:mod:`profile` CLI accepts `-m module_name` as an alternative to script
path.

..

.. bpo: 8525
.. date: 2018-01-01-00-16-59
.. nonce: Dq8s63
.. section: Library

help() on a type now displays builtin subclasses. This is intended primarily
to help with notification of more specific exception subclasses.

Patch by Sanyam Khurana.

..

.. bpo: 31639
.. date: 2017-12-27-21-55-19
.. nonce: l3avDJ
.. section: Library

http.server now exposes a ThreadingHTTPServer class and uses it when the
module is run with ``-m`` to cope with web browsers pre-opening sockets.

..

.. bpo: 29877
.. date: 2017-12-16-11-40-52
.. nonce: SfWhmz
.. section: Library

compileall: import ProcessPoolExecutor only when needed, preventing hangs on
low resource platforms

..

.. bpo: 32221
.. date: 2017-12-06-10-10-10
.. nonce: ideco_
.. section: Library

Various functions returning tuple containing IPv6 addresses now omit
``%scope`` part since the same information is already encoded in *scopeid*
tuple item. Especially this speeds up :func:`socket.recvfrom` when it
receives multicast packet since useless resolving of network interface name
is omitted.

..

.. bpo: 32147
.. date: 2017-11-28-10-23-13
.. nonce: PI2k1Y
.. section: Library

:func:`binascii.unhexlify` is now up to 2 times faster. Patch by Sergey
Fedoseev.

..

.. bpo: 30693
.. date: 2017-11-27-15-09-49
.. nonce: yC4mJ8
.. section: Library

The TarFile class now recurses directories in a reproducible way.

..

.. bpo: 30693
.. date: 2017-11-27-15-09-49
.. nonce: yC4mJ7
.. section: Library

The ZipFile class now recurses directories in a reproducible way.

..

.. bpo: 31680
.. date: 2017-11-01-15-44-48
.. nonce: yO6oSC
.. section: Library

Added :data:`curses.ncurses_version`.

..

.. bpo: 31908
.. date: 2017-10-31
.. nonce: g4xh8x
.. section: Library

Fix output of cover files for ``trace`` module command-line tool. Previously
emitted cover files only when ``--missing`` option was used. Patch by
Michael Selik.

..

.. bpo: 31608
.. date: 2017-10-29-10-37-55
.. nonce: wkp8Nw
.. section: Library

Raise a ``TypeError`` instead of crashing if a ``collections.deque``
subclass returns a non-deque from ``__new__``. Patch by Oren Milman.

..

.. bpo: 31425
.. date: 2017-10-24-10-18-35
.. nonce: 1lgw47
.. section: Library

Add support for sockets of the AF_QIPCRTR address family, supported by the
Linux kernel. This is used to communicate with services, such as GPS or
radio, running on Qualcomm devices. Patch by Bjorn Andersson.

..

.. bpo: 22005
.. date: 2017-10-12-22-39-55
.. nonce: lGP-sc
.. section: Library

Implemented unpickling instances of :class:`~datetime.datetime`,
:class:`~datetime.date` and :class:`~datetime.time` pickled by Python 2.
``encoding='latin1'`` should be used for successful decoding.

..

.. bpo: 27645
.. date: 2017-10-05-20-41-48
.. nonce: 1Y_Wag
.. section: Library

:class:`sqlite3.Connection` now exposes a
:class:`~sqlite3.Connection.backup` method, if the underlying SQLite library
is at version 3.6.11 or higher.  Patch by Lele Gaifax.

..

.. bpo: 16865
.. date: 2017-09-29-16-40-38
.. nonce: l-f6I_
.. section: Library

Support arrays >=2GiB in :mod:`ctypes`.  Patch by Segev Finer.

..

.. bpo: 31508
.. date: 2017-09-19-12-38-31
.. nonce: pDsFJl
.. section: Library

Removed support of arguments in `tkinter.ttk.Treeview.selection`. It was
deprecated in 3.6.  Use specialized methods like `selection_set` for
changing the selection.

..

.. bpo: 29456
.. date: 2017-08-24-17-55-39
.. nonce: XaB3MP
.. section: Library

Fix bugs in hangul normalization: u1176, u11a7 and u11c3

..

.. bpo: 21257
.. date: 2019-01-15-21-45-27
.. nonce: U9LKkx
.. section: Documentation

Document :func:`http.client.parse_headers`.

..

.. bpo: 34764
.. date: 2018-12-23-23-52-31
.. nonce: DwOGeT
.. section: Documentation

Improve example of iter() with 2nd sentinel argument.

..

.. bpo: 35564
.. date: 2018-12-22-22-52-05
.. nonce: TuEU_D
.. section: Documentation

Explicitly set master_doc variable in conf.py for compliance with Sphinx 2.0

..

.. bpo: 35511
.. date: 2018-12-16-16-14-44
.. nonce: iVcyav
.. section: Documentation

Specified that profile.Profile class doesn't not support enable or disable
methods. Also, elaborated that Profile object as a context manager is only
supported in cProfile module.

..

.. bpo: 10536
.. date: 2018-11-04-22-03-56
.. nonce: a0IsfE
.. section: Documentation

Enhance the gettext docs. Patch by Éric Araujo

..

.. bpo: 35089
.. date: 2018-10-28-16-51-31
.. nonce: _stCpS
.. section: Documentation

Remove mention of ``typing.io`` and ``typing.re``. Their types should be
imported from ``typing`` directly.

..

.. bpo: 35038
.. date: 2018-10-25-17-45-09
.. nonce: 2eVOYS
.. section: Documentation

Fix the documentation about an unexisting `f_restricted` attribute in the
frame object. Patch by Stéphane Wirtel

..

.. bpo: 35042
.. date: 2018-10-22-14-17-57
.. nonce: 1UGv1a
.. section: Documentation

Replace PEP XYZ by the pep role and allow to use the direct links to the
PEPs.

..

.. bpo: 35044
.. date: 2018-10-22-14-09-58
.. nonce: qjvNtI
.. section: Documentation

Fix the documentation with the role ``exc`` for the appropriated exception.
Patch by Stéphane Wirtel

..

.. bpo: 35035
.. date: 2018-10-21-02-20-36
.. nonce: 4zBObK
.. section: Documentation

Rename documentation for :mod:`email.utils` to ``email.utils.rst``.

..

.. bpo: 34967
.. date: 2018-10-13-07-39-57
.. nonce: E40tFP
.. section: Documentation

Use app.add_object_type() instead of the deprecated Sphinx function
app.description_unit()

..

.. bpo: 34913
.. date: 2018-10-10-00-34-08
.. nonce: kVd1Fv
.. section: Documentation

Add documentation about the new command line interface of the gzip module.

..

.. bpo: 32174
.. date: 2018-10-08-19-15-28
.. nonce: YO9CYm
.. section: Documentation

chm document displays non-ASCII charaters properly on some MBCS Windows
systems.

..

.. bpo: 11233
.. date: 2018-10-03-20-39-25
.. nonce: BX6Gen
.. section: Documentation

Create availability directive for documentation.  Original patch by Georg
Brandl.

..

.. bpo: 34790
.. date: 2018-09-24-12-47-08
.. nonce: G2KXIH
.. section: Documentation

Document how passing coroutines to asyncio.wait() can be confusing.

..

.. bpo: 34552
.. date: 2018-09-12-10-18-04
.. nonce: p9PoYv
.. section: Documentation

Make clear that ``==`` operator sometimes is equivalent to `is`. The ``<``,
``<=``, ``>`` and ``>=`` operators are only defined where they make sense.

..

.. bpo: 28617
.. date: 2018-09-06-22-39-47
.. nonce: MjnJLz
.. section: Documentation

Fixed info in the stdtypes docs concerning the types that support membership
tests.

..

.. bpo: 20177
.. date: 2018-07-28-17-17-42
.. nonce: cOZJWp
.. section: Documentation

Migrate datetime.date.fromtimestamp to Argument Clinic. Patch by Tim
Hoffmann.

..

.. bpo: 34065
.. date: 2018-07-07-20-38-41
.. nonce: 1snofM
.. section: Documentation

Fix wrongly written basicConfig documentation markup syntax

..

.. bpo: 33460
.. date: 2018-06-22-08-38-29
.. nonce: kHt4D0
.. section: Documentation

replaced ellipsis with correct error codes in tutorial chapter 3.

..

.. bpo: 33847
.. date: 2018-06-15-14-58-45
.. nonce: IIDp6t
.. section: Documentation

Add '@' operator entry to index.

..

.. bpo: 33409
.. date: 2018-06-08-23-46-01
.. nonce: r4z9MM
.. section: Documentation

Clarified the relationship between :pep:`538`'s PYTHONCOERCECLOCALE and PEP
540's PYTHONUTF8 mode.

..

.. bpo: 33197
.. date: 2018-06-08-23-37-14
.. nonce: OERTKf
.. section: Documentation

Add versionadded tag to the documentation of ParameterKind.description

..

.. bpo: 17045
.. date: 2018-06-07-08-33-45
.. nonce: ZNx6KU
.. section: Documentation

Improve the C-API doc for PyTypeObject.  This includes adding several
quick-reference tables and a lot of missing slot/typedef entries.  The
existing entries were also cleaned up with a slightly more consistent
format.

..

.. bpo: 33736
.. date: 2018-06-01-12-27-40
.. nonce: JVegIu
.. section: Documentation

Improve the documentation of :func:`asyncio.open_connection`,
:func:`asyncio.start_server` and their UNIX socket counterparts.

..

.. bpo: 23859
.. date: 2018-05-29-16-02-31
.. nonce: E5gba1
.. section: Documentation

Document that `asyncio.wait()` does not cancel its futures on timeout.

..

.. bpo: 32436
.. date: 2018-05-23-11-59-51
.. nonce: S1LGPa
.. section: Documentation

Document :pep:`567` changes to asyncio.

..

.. bpo: 33604
.. date: 2018-05-22-11-47-14
.. nonce: 5YHTpz
.. section: Documentation

Update HMAC md5 default to a DeprecationWarning, bump removal to 3.8.

..

.. bpo: 33594
.. date: 2018-05-21-14-36-12
.. nonce: -HRcyX
.. section: Documentation

Document ``getargspec``, ``from_function`` and ``from_builtin`` as
deprecated in their respective docstring, and include version since
deprecation in DeprecationWarning message.

..

.. bpo: 33503
.. date: 2018-05-14-20-08-58
.. nonce: Wvt0qg
.. section: Documentation

Fix broken pypi link

..

.. bpo: 33421
.. date: 2018-05-14-15-15-41
.. nonce: 3GU_QO
.. section: Documentation

Add missing documentation for ``typing.AsyncContextManager``.

..

.. bpo: 33487
.. date: 2018-05-13-14-44-30
.. nonce: iLDzFb
.. section: Documentation

BZ2file now emit a DeprecationWarning when buffering=None is passed, the
deprecation message and documentation also now explicitly state it is
deprecated since 3.0.

..

.. bpo: 33378
.. date: 2018-04-29-04-02-18
.. nonce: -anAHN
.. section: Documentation

Add Korean language switcher for https://docs.python.org/3/

..

.. bpo: 33276
.. date: 2018-04-20-14-09-36
.. nonce: rA1z_3
.. section: Documentation

Clarify that the ``__path__`` attribute on modules cannot be just any value.

..

.. bpo: 33201
.. date: 2018-04-01-21-03-41
.. nonce: aa8Lkl
.. section: Documentation

Modernize documentation for writing C extension types.

..

.. bpo: 33195
.. date: 2018-04-01-14-30-36
.. nonce: dRS-XX
.. section: Documentation

Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document. ``Py_UNICODE``
related APIs are deprecated since Python 3.3, but it is missed in the
document.

..

.. bpo: 33126
.. date: 2018-03-28-17-03-17
.. nonce: 5UGkNv
.. section: Documentation

Document PyBuffer_ToContiguous().

..

.. bpo: 27212
.. date: 2018-03-22-19-23-04
.. nonce: wrE5KR
.. section: Documentation

Modify documentation for the :func:`islice` recipe to consume initial values
up to the start index.

..

.. bpo: 28247
.. date: 2018-03-20-20-11-05
.. nonce: -V-WS-
.. section: Documentation

Update :mod:`zipapp` documentation to describe how to make standalone
applications.

..

.. bpo: 18802
.. date: 2018-03-11-18-53-47
.. nonce: JhAqH3
.. section: Documentation

Documentation changes for ipaddress.  Patch by Jon Foster and Berker Peksag.

..

.. bpo: 27428
.. date: 2018-03-11-00-16-56
.. nonce: B7A8FT
.. section: Documentation

Update documentation to clarify that ``WindowsRegistryFinder`` implements
``MetaPathFinder``. (Patch by Himanshu Lakhara)

..

.. bpo: 28124
.. date: 2018-02-25-16-33-35
.. nonce: _uzkgq
.. section: Documentation

The ssl module function ssl.wrap_socket() has been de-emphasized and
deprecated in favor of the more secure and efficient
SSLContext.wrap_socket() method.

..

.. bpo: 17232
.. date: 2018-02-23-12-48-03
.. nonce: tmuTKL
.. section: Documentation

Clarify docs for -O and -OO.  Patch by Terry Reedy.

..

.. bpo: 32436
.. date: 2018-02-14-11-10-41
.. nonce: TTJ2jb
.. section: Documentation

Add documentation for the contextvars module (PEP 567).

..

.. bpo: 32800
.. date: 2018-02-10-15-16-04
.. nonce: FyrqCk
.. section: Documentation

Update link to w3c doc for xml default namespaces.

..

.. bpo: 11015
.. date: 2018-02-10-12-48-38
.. nonce: -gUf34
.. section: Documentation

Update :mod:`test.support` documentation.

..

.. bpo: 32613
.. date: 2018-02-05-15-05-53
.. nonce: TDjgM1
.. section: Documentation

Update the faq/windows.html to use the py command from PEP 397 instead of
python.

..

.. bpo: 8722
.. date: 2018-02-03-06-11-37
.. nonce: MPyVyj
.. section: Documentation

Document :meth:`__getattr__` behavior when property :meth:`get` method
raises :exc:`AttributeError`.

..

.. bpo: 32614
.. date: 2018-02-02-07-41-57
.. nonce: LSqzGw
.. section: Documentation

Modify RE examples in documentation to use raw strings to prevent
:exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight the
deprecation.

..

.. bpo: 20709
.. date: 2018-02-01-10-57-24
.. nonce: 1flcnc
.. section: Documentation

Remove the paragraph where we explain that os.utime() does not support a
directory as path under Windows. Patch by Jan-Philip Gehrcke

..

.. bpo: 32722
.. date: 2018-01-30-11-28-27
.. nonce: frdp6A
.. section: Documentation

Remove the bad example in the tutorial of the Generator Expression. Patch by
Stéphane Wirtel

..

.. bpo: 31972
.. date: 2018-01-25-14-23-12
.. nonce: w1m_8r
.. section: Documentation

Improve docstrings for `pathlib.PurePath` subclasses.

..

.. bpo: 30607
.. date: 2018-01-25-13-58-49
.. nonce: 4dXxiq
.. section: Documentation

Use the externalized ``python-docs-theme`` package when building the
documentation.

..

.. bpo: 8243
.. date: 2018-01-13-20-30-53
.. nonce: s98r28
.. section: Documentation

Add a note about curses.addch and curses.addstr exception behavior when
writing outside a window, or pad.

..

.. bpo: 32337
.. date: 2017-12-22-17-29-37
.. nonce: eZe-ID
.. section: Documentation

Update documentation related with ``dict`` order.

..

.. bpo: 25041
.. date: 2017-10-23-13-41-12
.. nonce: iAo2gW
.. section: Documentation

Document ``AF_PACKET`` in the :mod:`socket` module.

..

.. bpo: 31432
.. date: 2017-09-13-07-14-59
.. nonce: yAY4Z3
.. section: Documentation

Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED flags for
ssl.SSLContext.verify_mode.

..

.. bpo: 35772
.. date: 2019-01-18-12-19-19
.. nonce: sGBbsn
.. section: Tests

Fix sparse file tests of test_tarfile on ppc64 with the tmpfs filesystem.
Fix the function testing if the filesystem supports sparse files: create a
file which contains data and "holes", instead of creating a file which
contains no data. tmpfs effective block size is a page size (tmpfs lives in
the page cache). RHEL uses 64 KiB pages on aarch64, ppc64, ppc64le, only
s390x and x86_64 use 4 KiB pages, whereas the test punch holes of 4 KiB.

..

.. bpo: 35045
.. date: 2019-01-10-18-35-42
.. nonce: qdd6d9
.. section: Tests

Make ssl tests less strict and also accept TLSv1 as system default. The
changes unbreaks test_min_max_version on Fedora 29.

..

.. bpo: 32710
.. date: 2019-01-07-23-34-41
.. nonce: Hzo1b8
.. section: Tests

``test_asyncio/test_sendfile.py`` now resets the event loop policy using
:func:`tearDownModule` as done in other tests, to prevent a warning when
running tests on Windows.

..

.. bpo: 33717
.. date: 2019-01-07-23-22-44
.. nonce: GhHXv8
.. section: Tests

test.pythoninfo now logs information of all clocks, not only time.time() and
time.perf_counter().

..

.. bpo: 35488
.. date: 2019-01-04-21-34-53
.. nonce: U7JJzP
.. section: Tests

Add a test to pathlib's Path.match() to verify it does not support
glob-style ** recursive pattern matching.

..

.. bpo: 31731
.. date: 2018-12-18-23-20-39
.. nonce: tcv85C
.. section: Tests

Fix a race condition in ``check_interrupted_write()`` of test_io: create
directly the thread with SIGALRM signal blocked, rather than blocking the
signal later from the thread. Previously, it was possible that the thread
gets the signal before the signal is blocked.

..

.. bpo: 35424
.. date: 2018-12-18-22-36-53
.. nonce: 1Pz4IS
.. section: Tests

Fix test_multiprocessing_main_handling: use :class:`multiprocessing.Pool`
with a context manager and then explicitly join the pool.

..

.. bpo: 35519
.. date: 2018-12-17-16-41-45
.. nonce: RR3L_w
.. section: Tests

Rename :mod:`test.bisect` module to :mod:`test.bisect_cmd` to avoid conflict
with :mod:`bisect` module when running directly a test like ``./python
Lib/test/test_xmlrpc.py``.

..

.. bpo: 35513
.. date: 2018-12-16-23-36-47
.. nonce: k4WHlA
.. section: Tests

Replace :func:`time.time` with :func:`time.monotonic` in tests to measure
time delta.

..

.. bpo: 34279
.. date: 2018-12-12-18-20-18
.. nonce: DhKcuP
.. section: Tests

:func:`test.support.run_unittest` no longer raise :exc:`TestDidNotRun` if
the test result contains skipped tests. The exception is now only raised if
no test have been run and no test have been skipped.

..

.. bpo: 35412
.. date: 2018-12-12-18-07-58
.. nonce: kbuJor
.. section: Tests

Add testcase to ``test_future4``: check unicode literal.

..

.. bpo: 26704
.. date: 2018-12-10-13-18-37
.. nonce: DBAN4c
.. section: Tests

Added test demonstrating double-patching of an instance method.  Patch by
Anthony Sottile.

..

.. bpo: 33725
.. date: 2018-12-09-01-27-29
.. nonce: TaGayj
.. section: Tests

test_multiprocessing_fork may crash on recent versions of macOS.  Until the
issue is resolved, skip the test on macOS.

..

.. bpo: 35352
.. date: 2018-11-30-17-18-56
.. nonce: 8bD7GC
.. section: Tests

Modify test_asyncio to use the certificate set from the test directory.

..

.. bpo: 35317
.. date: 2018-11-26-16-54-21
.. nonce: jByGP2
.. section: Tests

Fix ``mktime()`` overflow error in ``test_email``: run
``test_localtime_daylight_true_dst_true()`` and
``test_localtime_daylight_false_dst_true()`` with a specific timezone.

..

.. bpo: 21263
.. date: 2018-11-04-20-17-09
.. nonce: T3qo9r
.. section: Tests

After several reports that test_gdb does not work properly on macOS and
since gdb is not shipped by default anymore, test_gdb is now skipped on
macOS when LLVM Clang has been used to compile Python. Patch by Lysandros
Nikolaou

..

.. bpo: 34279
.. date: 2018-10-27-13-41-55
.. nonce: v0Xqxe
.. section: Tests

regrtest issue a warning when no tests have been executed in a particular
test file. Also, a new final result state is issued if no test have been
executed across all test files. Patch by Pablo Galindo.

..

.. bpo: 34962
.. date: 2018-10-11-22-34-27
.. nonce: 0PLBi8
.. section: Tests

make docstest in Doc now passes., and is enforced in CI

..

.. bpo: 23596
.. date: 2018-10-09-23-51-07
.. nonce: rdnert
.. section: Tests

Use argparse for the command line of the gzip module. Patch by Antony Lee

..

.. bpo: 34537
.. date: 2018-09-21-17-33-41
.. nonce: GImYtZ
.. section: Tests

Fix ``test_gdb.test_strings()`` when ``LC_ALL=C`` and GDB was compiled with
Python 3.6 or earlier.

..

.. bpo: 34587
.. date: 2018-09-13-20-58-07
.. nonce: rCcxp3
.. section: Tests

test_socket: Remove RDSTest.testCongestion(). The test tries to fill the
receiver's socket buffer and expects an error. But the RDS protocol doesn't
require that. Moreover, the Linux implementation of RDS expects that the
producer of the messages reduces its rate, it's not the role of the receiver
to trigger an error. The test fails on Fedora 28 by design, so just remove
it.

..

.. bpo: 34661
.. date: 2018-09-13-09-53-15
.. nonce: bdTamP
.. section: Tests

Fix test_shutil if unzip doesn't support -t.

..

.. bpo: 34200
.. date: 2018-09-12-17-00-34
.. nonce: dfxYQK
.. section: Tests

Fixed non-deterministic flakiness of test_pkg by not using the scary
test.support.module_cleanup() logic to save and restore sys.modules contents
between test cases.

..

.. bpo: 34569
.. date: 2018-09-09-14-36-59
.. nonce: okj1Xh
.. section: Tests

The experimental PEP 554 data channels now correctly pass negative PyLong
objects between subinterpreters on 32-bit systems. Patch by Michael Felt.

..

.. bpo: 34594
.. date: 2018-09-05-23-50-21
.. nonce: tqL-GS
.. section: Tests

Fix usage of hardcoded ``errno`` values in the tests.

..

.. bpo: 34579
.. date: 2018-09-04-15-16-42
.. nonce: bp4HdM
.. section: Tests

Fix test_embed for AIX Patch by Michael Felt

..

.. bpo: 34542
.. date: 2018-08-29-16-30-52
.. nonce: 9stVAW
.. section: Tests

Use 3072 RSA keys and SHA-256 signature for test certs and keys.

..

.. bpo: 11193
.. date: 2018-08-26-13-12-34
.. nonce: H8fCGa
.. section: Tests

Remove special condition for AIX in `test_subprocess.test_undecodable_env`

..

.. bpo: 34347
.. date: 2018-08-25-13-28-18
.. nonce: IsRDPB
.. section: Tests

Fix `test_utf8_mode.test_cmd_line` for AIX

..

.. bpo: 34490
.. date: 2018-08-24-20-23-15
.. nonce: vb2cx4
.. section: Tests

On AIX with AF_UNIX family sockets getsockname() does not provide
'sockname', so skip calls to transport.get_extra_info('sockname')

..

.. bpo: 34391
.. date: 2018-08-16-18-48-47
.. nonce: ouNfxC
.. section: Tests

Fix ftplib test for TLS 1.3 by reading from data socket.

..

.. bpo: 11192
.. date: 2018-08-14-20-50-07
.. nonce: g7TwYm
.. section: Tests

Fix `test_socket` on AIX 6.1 and later IPv6 zone id supports only
supported by inet_pton6_zone() Switch to runtime-based platform.system() to
establish current platform  rather than build-time based sys.platform()

..

.. bpo: 34399
.. date: 2018-08-14-10-47-44
.. nonce: D_jd1G
.. section: Tests

Update all RSA keys and DH params to use at least 2048 bits.

..

.. bpo: 34373
.. date: 2018-08-10-16-17-51
.. nonce: SKdb1k
.. section: Tests

Fix ``test_mktime`` and ``test_pthread_getcpuclickid`` tests for AIX Add
range checking for ``_PyTime_localtime`` for AIX Patch by Michael Felt

..

.. bpo: 11191
.. date: 2018-08-08-22-41-30
.. nonce: eq9tSH
.. section: Tests

Skip the distutils test 'test_search_cpp' when using XLC as compiler patch
by aixtools (Michael Felt)

..

.. bpo: 0
.. date: 2018-07-10-18-53-46
.. nonce: UBQJBc
.. section: Tests

Improved an error message when mock assert_has_calls fails.

..

.. bpo: 33746
.. date: 2018-06-19-17-55-46
.. nonce: Sz7avn
.. section: Tests

Fix test_unittest when run in verbose mode.

..

.. bpo: 33901
.. date: 2018-06-19-14-04-21
.. nonce: OFW1Sr
.. section: Tests

Fix test_dbm_gnu on macOS with gdbm 1.15: add a larger value to make sure
that the file size changes.

..

.. bpo: 33873
.. date: 2018-06-16-01-37-31
.. nonce: d86vab
.. section: Tests

Fix a bug in ``regrtest`` that caused an extra test to run if
--huntrleaks/-R was used. Exit with error in case that invalid parameters
are specified to --huntrleaks/-R (at least one warmup run and one repetition
must be used).

..

.. bpo: 33562
.. date: 2018-06-01-14-25-31
.. nonce: GutEHf
.. section: Tests

Check that a global asyncio event loop policy is not left behind by any
tests.

..

.. bpo: 33655
.. date: 2018-05-26-16-01-40
.. nonce: Frb4LA
.. section: Tests

Ignore test_posix_fallocate failures on BSD platforms that might be due to
running on ZFS.

..

.. bpo: 32962
.. date: 2018-05-10-16-59-15
.. nonce: S-rcIN
.. section: Tests

Fixed test_gdb when Python is compiled with flags -mcet -fcf-protection -O0.

..

.. bpo: 33358
.. date: 2018-04-27-11-46-35
.. nonce: _OcR59
.. section: Tests

Fix ``test_embed.test_pre_initialization_sys_options()`` when the
interpreter is built with ``--enable-shared``.

..

.. bpo: 32872
.. date: 2018-03-28-01-35-02
.. nonce: J5NDUj
.. section: Tests

Avoid regrtest compatibility issue with namespace packages.

..

.. bpo: 32517
.. date: 2018-03-09-07-05-12
.. nonce: ugc1iW
.. section: Tests

Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of
``KqueueSelector`` loop was not being closed.

..

.. bpo: 32663
.. date: 2018-01-25-18-10-47
.. nonce: IKDsqu
.. section: Tests

Making sure the `SMTPUTF8SimTests` class of tests gets run in
test_smtplib.py.

..

.. bpo: 27643
.. date: 2018-01-12-09-05-19
.. nonce: _6z49y
.. section: Tests

Test_C test case needs "signed short" bitfields, but the IBM XLC compiler
(on AIX) does not support this Skip the code and test when AIX and XLC are
used

Applicable to Python2-2.7 and later

..

.. bpo: 19417
.. date: 2018-01-08-13-33-47
.. nonce: 2asoXy
.. section: Tests

Add test_bdb.py.

..

.. bpo: 31809
.. date: 2017-10-18-18-07-45
.. nonce: KlQrkE
.. section: Tests

Add tests to verify connection with secp ECDH curves.

..

.. bpo: 34691
.. date: 2019-02-02-13-34-05
.. nonce: B-Lsj4
.. section: Build

The _contextvars module is now built into the core Python library on
Windows.

..

.. bpo: 35683
.. date: 2019-01-10-11-37-18
.. nonce: pf5Oos
.. section: Build

Improved Azure Pipelines build steps and now verifying layouts correctly

..

.. bpo: 35642
.. date: 2019-01-02-11-23-33
.. nonce: pjkhJe
.. section: Build

Remove asynciomodule.c from pythoncore.vcxproj

..

.. bpo: 35550
.. date: 2018-12-29-10-19-43
.. nonce: BTuu8e
.. section: Build

Fix incorrect Solaris #ifdef checks to look for __sun && __SVR4 instead of
sun when compiling.

..

.. bpo: 35499
.. date: 2018-12-14-19-36-05
.. nonce: 9yAldM
.. section: Build

``make profile-opt`` no longer replaces ``CFLAGS_NODIST`` with ``CFLAGS``.
It now adds profile-guided optimization (PGO) flags to ``CFLAGS_NODIST``:
existing ``CFLAGS_NODIST`` flags are kept.

..

.. bpo: 35257
.. date: 2018-12-05-22-28-40
.. nonce: dmcd_s
.. section: Build

Avoid leaking the linker flags from Link Time Optimizations (LTO) into
distutils when compiling C extensions.

..

.. bpo: 35351
.. date: 2018-12-04-15-33-28
.. nonce: ZhhBfT
.. section: Build

When building Python with clang and LTO, LTO flags are no longer passed into
CFLAGS to build third-party C extensions through distutils.

..

.. bpo: 35139
.. date: 2018-11-01-15-01-23
.. nonce: XZTttb
.. section: Build

Fix a compiler error when statically linking `pyexpat` in `Modules/Setup`.

..

.. bpo: 35059
.. date: 2018-10-26-14-49-19
.. nonce: PKsBxP
.. section: Build

PCbuild: Set InlineFunctionExpansion to OnlyExplicitInline ("/Ob1" option)
in pyproject.props in Debug mode to expand functions marked as inline. This
change should make Python compiled in Debug mode a little bit faster on
Windows.

..

.. bpo: 35011
.. date: 2018-10-17-17-38-57
.. nonce: GgoPIC
.. section: Build

Restores the use of pyexpatns.h to isolate our embedded copy of the expat C
library so that its symbols do not conflict at link or dynamic loading time
with an embedding application or other extension modules with their own
version of libexpat.

..

.. bpo: 28015
.. date: 2018-10-16-12-22-36
.. nonce: ylSgFh
.. section: Build

Have --with-lto works correctly with clang.

..

.. bpo: 34765
.. date: 2018-09-26-17-29-10
.. nonce: AvxdVj
.. section: Build

Update the outdated install-sh file to the latest revision from automake
v1.16.1

..

.. bpo: 34585
.. date: 2018-09-18-16-28-31
.. nonce: CGMu0h
.. section: Build

Check for floating-point byte order in configure.ac using compilation tests
instead of executing code, so that these checks work in cross-compiled
builds.

..

.. bpo: 34710
.. date: 2018-09-17-13-56-12
.. nonce: ARqIAK
.. section: Build

Fixed SSL module build with OpenSSL & pedantic CFLAGS.

..

.. bpo: 34582
.. date: 2018-09-14-09-53-21
.. nonce: j3omgk
.. section: Build

Add JUnit XML output for regression tests and update Azure DevOps builds.

..

.. bpo: 34081
.. date: 2018-09-06-07-15-20
.. nonce: cuSTnH
.. section: Build

Make Sphinx warnings as errors in the Docs Makefile.

..

.. bpo: 34555
.. date: 2018-08-31-19-41-09
.. nonce: dfQcnm
.. section: Build

Fix for case where it was not possible to have both
``HAVE_LINUX_VM_SOCKETS_H`` and ``HAVE_SOCKADDR_ALG`` be undefined.

..

.. bpo: 33015
.. date: 2018-08-24-09-48-25
.. nonce: s21y74
.. section: Build

Fix an undefined behaviour in the pthread implementation of
:c:func:`PyThread_start_new_thread`: add a function wrapper to always return
``NULL``.

..

.. bpo: 34245
.. date: 2018-07-27-09-52-48
.. nonce: bBV0NI
.. section: Build

The Python shared library is now installed with write permission (mode
0755), which is the standard way of installing such libraries.

..

.. bpo: 34121
.. date: 2018-07-15-16-49-06
.. nonce: 74G_lo
.. section: Build

Fix detection of C11 atomic support on clang.

..

.. bpo: 32430
.. date: 2018-07-10-21-33-25
.. nonce: UN3Nk8
.. section: Build

Rename Modules/Setup.dist to Modules/Setup, and remove the necessity to copy
the former manually to the latter when updating the local source tree.

..

.. bpo: 30345
.. date: 2018-06-15-18-18-16
.. nonce: j-xRE1
.. section: Build

Add -g to LDFLAGS when compiling with LTO to get debug symbols.

..

.. bpo: 5755
.. date: 2018-06-04-21-34-34
.. nonce: 65GmCj
.. section: Build

Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from ``OPT``. This
option emitted annoying warnings when building extension modules written in
C++.

..

.. bpo: 33614
.. date: 2018-05-28-11-40-22
.. nonce: 28e0sE
.. section: Build

Ensures module definition files for the stable ABI on Windows are correctly
regenerated.

..

.. bpo: 33648
.. date: 2018-05-25-13-05-51
.. nonce: bJ4JZH
.. section: Build

The --with-c-locale-warning configuration flag has been removed. It has had
no effect for about a year.

..

.. bpo: 33522
.. date: 2018-05-15-12-44-50
.. nonce: mJoNcA
.. section: Build

Enable CI builds on Visual Studio Team Services at
https://python.visualstudio.com/cpython

..

.. bpo: 33512
.. date: 2018-05-15-02-07-49
.. nonce: X4Fy1Q
.. section: Build

configure's check for "long double" has been simplified

..

.. bpo: 33483
.. date: 2018-05-13-17-21-54
.. nonce: WOs-en
.. section: Build

C compiler is now correctly detected from the standard environment
variables. --without-gcc and --with-icc options have been removed.

..

.. bpo: 33394
.. date: 2018-04-30-17-36-46
.. nonce: _Vdi4t
.. section: Build

Enable the verbose build for extension modules, when GNU make is passed
macros on the command line.

..

.. bpo: 33393
.. date: 2018-04-30-17-19-37
.. nonce: HkVCqI
.. section: Build

Update config.guess and config.sub files.

..

.. bpo: 33377
.. date: 2018-04-30-16-53-00
.. nonce: QBh6vP
.. section: Build

Add new triplets for mips r6 and riscv variants (used in extension
suffixes).

..

.. bpo: 32232
.. date: 2018-04-17-00-38-19
.. nonce: o7G_UO
.. section: Build

By default, modules configured in `Modules/Setup` are no longer built with
`-DPy_BUILD_CORE`. Instead, modules that specifically need that preprocessor
definition include it in their individual entries.

..

.. bpo: 33182
.. date: 2018-03-30-14-55-48
.. nonce: CePczb
.. section: Build

The embedding tests can once again be built with clang 6.0

..

.. bpo: 33163
.. date: 2018-03-28-04-15-03
.. nonce: hfpWuU
.. section: Build

Upgrade pip to 9.0.3 and setuptools to v39.0.1.

..

.. bpo: 33012
.. date: 2018-03-08-20-25-29
.. nonce: k9Fe1q
.. section: Build

gcc 8 has added a new warning heuristic to detect invalid function casts and
a stock python build seems to hit that warning quite often.  The most common
is the cast of a METH_NOARGS function (that uses just one argument) to a
PyCFunction. Fix this by adding a dummy argument to all functions that
implement METH_NOARGS.

..

.. bpo: 32898
.. date: 2018-02-21-12-46-00
.. nonce: M15bZh
.. section: Build

Fix the python debug build when using COUNT_ALLOCS.

..

.. bpo: 29442
.. date: 2017-09-26-23-08-27
.. nonce: fD8YTi
.. section: Build

Replace optparse with argparse in setup.py

..

.. bpo: 35890
.. date: 2019-02-02-22-12-23
.. nonce: ccIjHH
.. section: Windows

Fix API calling consistency of GetVersionEx and wcstok.

..

.. bpo: 32560
.. date: 2019-02-02-11-02-44
.. nonce: I5WAGW
.. section: Windows

The ``py`` launcher now forwards its ``STARTUPINFO`` structure to child
processes.

..

.. bpo: 35854
.. date: 2019-01-29-15-44-46
.. nonce: Ww3z19
.. section: Windows

Fix EnvBuilder and --symlinks in venv on Windows

..

.. bpo: 35811
.. date: 2019-01-25-12-46-36
.. nonce: 2hU-mm
.. section: Windows

Avoid propagating venv settings when launching via py.exe

..

.. bpo: 35797
.. date: 2019-01-25-12-29-14
.. nonce: MzyOK9
.. section: Windows

Fix default executable used by the multiprocessing module

..

.. bpo: 35758
.. date: 2019-01-21-05-18-14
.. nonce: 8LsY3l
.. section: Windows

Allow building on ARM with MSVC.

..

.. bpo: 29734
.. date: 2019-01-12-16-52-38
.. nonce: 6_OJwI
.. section: Windows

Fix handle leaks in os.stat on Windows.

..

.. bpo: 35596
.. date: 2019-01-08-13-56-01
.. nonce: oFvhcm
.. section: Windows

Use unchecked PYCs for the embeddable distro to avoid zipimport
restrictions.

..

.. bpo: 35596
.. date: 2018-12-28-07-25-47
.. nonce: P9CEY2
.. section: Windows

Fix vcruntime140.dll being added to embeddable distro multiple times.

..

.. bpo: 35402
.. date: 2018-12-13-13-30-04
.. nonce: n_mXb2
.. section: Windows

Update Windows build to use Tcl and Tk 8.6.9

..

.. bpo: 35401
.. date: 2018-12-10-15-01-13
.. nonce: 9L1onG
.. section: Windows

Updates Windows build to OpenSSL 1.1.0j

..

.. bpo: 34977
.. date: 2018-12-07-10-00-38
.. nonce: agQJbD
.. section: Windows

venv on Windows will now use a python.exe redirector rather than copying the
actual binaries from the base environment.

..

.. bpo: 34977
.. date: 2018-10-30-13-39-17
.. nonce: 0l7_QV
.. section: Windows

Adds support for building a Windows App Store package

..

.. bpo: 35067
.. date: 2018-10-25-11-29-22
.. nonce: RHWi7W
.. section: Windows

Remove _distutils_findvs module and use vswhere.exe instead.

..

.. bpo: 32557
.. date: 2018-09-25-10-39-27
.. nonce: Rs1bf9
.. section: Windows

Allow shutil.disk_usage to take a file path on Windows

..

.. bpo: 34770
.. date: 2018-09-22-11-02-35
.. nonce: 4lEUOd
.. section: Windows

Fix a possible null pointer dereference in pyshellext.cpp.

..

.. bpo: 34603
.. date: 2018-09-13-08-29-04
.. nonce: 2AB7sc
.. section: Windows

Fix returning structs from functions produced by MSVC

..

.. bpo: 34581
.. date: 2018-09-04-23-13-19
.. nonce: lnbC0k
.. section: Windows

Guard MSVC-specific code in socketmodule.c with ``#ifdef _MSC_VER``.

..

.. bpo: 34532
.. date: 2018-09-03-01-23-52
.. nonce: N1HEbE
.. section: Windows

Fixes exit code of list version arguments for py.exe.

..

.. bpo: 34062
.. date: 2018-08-21-19-28-23
.. nonce: 3gxsA3
.. section: Windows

Fixed the '--list' and '--list-paths' arguments for the py.exe launcher

..

.. bpo: 34225
.. date: 2018-07-25-16-13-12
.. nonce: ngemNL
.. section: Windows

Ensure INCLUDE and LIB directories do not end with a backslash.

..

.. bpo: 34011
.. date: 2018-07-11-15-58-06
.. nonce: Ho_d5T
.. section: Windows

A suite of code has been changed which copied across DLLs and init.tcl from
the running Python location into a venv being created. These copies are
needed only when running from a Python source build, and the copying code is
now only run when that is the case, rather than whenever a venv is created.

..

.. bpo: 34006
.. date: 2018-07-02-14-19-32
.. nonce: 7SgBT_
.. section: Windows

Revert line length limit for Windows help docs. The line-length limit is not
needed because the pages appear in a separate app rather than on a browser
tab.  It can also interact badly with the DPI setting.

..

.. bpo: 31546
.. date: 2018-06-27-23-33-54
.. nonce: zJlap-
.. section: Windows

Restore running PyOS_InputHook while waiting for user input at the prompt.
The restores integration of interactive GUI windows (such as Matplotlib
figures) with the prompt on Windows.

..

.. bpo: 30237
.. date: 2018-06-25-09-33-48
.. nonce: EybiZA
.. section: Windows

Output error when ReadConsole is canceled by CancelSynchronousIo instead of
crashing.

..

.. bpo: 33895
.. date: 2018-06-19-11-57-50
.. nonce: zpblTy
.. section: Windows

GIL is released while calling functions that acquire Windows loader lock.

..

.. bpo: 33720
.. date: 2018-06-04-09-20-53
.. nonce: VKDXHK
.. section: Windows

Reduces maximum marshal recursion depth on release builds.

..

.. bpo: 29097
.. date: 2018-05-16-11-31-17
.. nonce: 9mqEuI
.. section: Windows

Fix bug where :meth:`datetime.fromtimestamp` erroneously throws an
:exc:`OSError` on Windows for values between 0 and 86400. Patch by Ammar
Askar.

..

.. bpo: 33316
.. date: 2018-04-20-03-24-07
.. nonce: 9IiJ8J
.. section: Windows

PyThread_release_lock always fails

..

.. bpo: 33184
.. date: 2018-04-13-11-28-55
.. nonce: 7YhqQE
.. section: Windows

Update Windows installer to use OpenSSL 1.1.0h.

..

.. bpo: 32890
.. date: 2018-03-08-20-02-38
.. nonce: 3jzFzY
.. section: Windows

Fix usage of GetLastError() instead of errno in os.execve() and
os.truncate().

..

.. bpo: 33016
.. date: 2018-03-07-01-33-33
.. nonce: Z_Med0
.. section: Windows

Fix potential use of uninitialized memory in nt._getfinalpathname

..

.. bpo: 32903
.. date: 2018-02-28-11-03-24
.. nonce: 1SXY4t
.. section: Windows

Fix a memory leak in os.chdir() on Windows if the current directory is set
to a UNC path.

..

.. bpo: 32901
.. date: 2018-02-23-00-47-13
.. nonce: mGKz5_
.. section: Windows

Update Tcl and Tk versions to 8.6.8

..

.. bpo: 31966
.. date: 2018-02-19-13-54-42
.. nonce: _Q3HPb
.. section: Windows

Fixed WindowsConsoleIO.write() for writing empty data.

..

.. bpo: 32409
.. date: 2018-02-19-10-00-57
.. nonce: nocuDg
.. section: Windows

Ensures activate.bat can handle Unicode contents.

..

.. bpo: 32457
.. date: 2018-02-19-08-54-06
.. nonce: vVP0Iz
.. section: Windows

Improves handling of denormalized executable path when launching Python.

..

.. bpo: 32370
.. date: 2018-02-10-15-38-19
.. nonce: kcKuct
.. section: Windows

Use the correct encoding for ipconfig output in the uuid module. Patch by
Segev Finer.

..

.. bpo: 29248
.. date: 2018-02-07-17-50-48
.. nonce: Xzwj-6
.. section: Windows

Fix :func:`os.readlink` on Windows, which was mistakenly treating the
``PrintNameOffset`` field of the reparse data buffer as a number of
characters instead of bytes. Patch by Craig Holmquist and SSE4.

..

.. bpo: 1104
.. date: 2017-11-24-12-53-54
.. nonce: 1CWSZp
.. section: Windows

Correctly handle string length in ``msilib.SummaryInfo.GetProperty()`` to
prevent it from truncating the last character.

..

.. bpo: 35401
.. date: 2018-12-09-13-56-49
.. nonce: n8B7X1
.. section: macOS

Update macOS installer to use OpenSSL 1.1.0j.

..

.. bpo: 35025
.. date: 2018-10-18-23-54-55
.. nonce: X4LFJg
.. section: macOS

Properly guard the use of the ``CLOCK_GETTIME`` et al. macros in
``timemodule`` on macOS.

..

.. bpo: 24658
.. date: 2018-10-17-14-36-08
.. nonce: Naddgx
.. section: macOS

On macOS, fix reading from and writing into a file with a size larger than 2
GiB.

..

.. bpo: 34405
.. date: 2018-09-11-08-30-55
.. nonce: UzIi0n
.. section: macOS

Update to OpenSSL 1.1.0i for macOS installer builds.

..

.. bpo: 33635
.. date: 2018-07-31-09-51-01
.. nonce: KiscE-
.. section: macOS

In macOS stat on some file descriptors (/dev/fd/3 f.e) will result in bad
file descriptor OSError. Guard against this exception was added in is_dir,
is_file and similar methods. DirEntry.is_dir can also throw this exception
so _RecursiveWildcardSelector._iterate_directories was also extended with
the same error ignoring pattern.

..

.. bpo: 13631
.. date: 2018-05-16-13-25-58
.. nonce: UIjDyY
.. section: macOS

The .editrc file in user's home directory is now processed correctly during
the readline initialization through editline emulation on macOS.

..

.. bpo: 33184
.. date: 2018-04-07-00-51-34
.. nonce: 3j208P
.. section: macOS

Update macOS installer build to use OpenSSL 1.1.0h.

..

.. bpo: 32726
.. date: 2018-03-29-06-56-12
.. nonce: urS9uX
.. section: macOS

Build and link with private copy of Tcl/Tk 8.6 for the macOS 10.6+
installer. The 10.9+ installer variant already does this.  This means that
the Python 3.7 provided by the python.org macOS installers no longer need or
use any external versions of Tcl/Tk, either system-provided or
user-installed, such as ActiveTcl.

..

.. bpo: 32901
.. date: 2018-02-27-17-33-15
.. nonce: hQu0w3
.. section: macOS

Update macOS 10.9+ installer to Tcl/Tk 8.6.8.

..

.. bpo: 31903
.. date: 2017-11-01-16-53-12
.. nonce: K6jCVG
.. section: macOS

In :mod:`_scproxy`, drop the GIL when calling into ``SystemConfiguration``
to avoid deadlocks.

..

.. bpo: 35770
.. date: 2019-01-18-13-04-30
.. nonce: 2LxJGu
.. section: IDLE

IDLE macosx deletes Options => Configure IDLE. It previously deleted Window
=> Zoom Height by mistake. (Zoom Height is now on the Options menu).  On
Mac, the settings dialog is accessed via Preferences on the IDLE menu.

..

.. bpo: 35769
.. date: 2019-01-18-01-24-23
.. nonce: GqsB34
.. section: IDLE

Change IDLE's new file name from 'Untitled' to 'untitled'

..

.. bpo: 35660
.. date: 2019-01-04-19-14-29
.. nonce: hMxI7N
.. section: IDLE

Fix imports in idlelib.window.

..

.. bpo: 35641
.. date: 2019-01-02-22-15-01
.. nonce: QEaANl
.. section: IDLE

Proper format `calltip` when the function has no docstring.

..

.. bpo: 33987
.. date: 2018-12-31-17-04-18
.. nonce: fD92up
.. section: IDLE

Use ttk Frame for ttk widgets.

..

.. bpo: 34055
.. date: 2018-12-28-17-16-33
.. nonce: TmmpzR
.. section: IDLE

Fix erroneous 'smart' indents and newlines in IDLE Shell.

..

.. bpo: 35591
.. date: 2018-12-28-01-19-20
.. nonce: SFpDj2
.. section: IDLE

Find Selection now works when selection not found.

..

.. bpo: 35196
.. date: 2018-12-27-17-46-42
.. nonce: 9E-xUh
.. section: IDLE

Speed up squeezer line counting.

..

.. bpo: 35598
.. date: 2018-12-27-15-29-11
.. nonce: FWOOm8
.. section: IDLE

Update config_key: use PEP 8 names and ttk widgets, make some objects
global, and add tests.

..

.. bpo: 28097
.. date: 2018-12-26-13-53-34
.. nonce: 95I9NT
.. section: IDLE

Add Previous/Next History entries to Shell menu.

..

.. bpo: 35208
.. date: 2018-12-23-17-42-11
.. nonce: J5NOg7
.. section: IDLE

Squeezer now properly counts wrapped lines before newlines.

..

.. bpo: 35555
.. date: 2018-12-21-18-44-30
.. nonce: M58_K3
.. section: IDLE

Gray out Code Context menu entry when it's not applicable.

..

.. bpo: 35521
.. date: 2018-12-20-00-14-15
.. nonce: x32BRn
.. section: IDLE

Document the IDLE editor code context feature. Add some internal references
within the IDLE doc.

..

.. bpo: 22703
.. date: 2018-12-18-13-56-31
.. nonce: UlsjKQ
.. section: IDLE

The Code Context menu label now toggles between Show/Hide Code Context. The
Zoom Height menu now toggles between Zoom/Restore Height. Zoom Height has
moved from the Window menu to the Options menu.

..

.. bpo: 35213
.. date: 2018-11-12-00-20-01
.. nonce: cqNgzT
.. section: IDLE

Where appropriate, use 'macOS' in idlelib.

..

.. bpo: 34864
.. date: 2018-11-11-17-13-50
.. nonce: cw0PvO
.. section: IDLE

On macOS, warn if the system preference "Prefer tabs when opening documents"
is set to "Always".

..

.. bpo: 34864
.. date: 2018-11-10-21-27-25
.. nonce: Ci-G2q
.. section: IDLE

Document two IDLE on MacOS issues. The System Preferences Dock "prefer tabs
always" setting disables some IDLE features.  Menus are a bit different than
as described for Windows and Linux.

..

.. bpo: 35202
.. date: 2018-11-10-09-10-54
.. nonce: TeJJrt
.. section: IDLE

Remove unused imports from lib/idlelib

..

.. bpo: 33000
.. date: 2018-11-06-23-10-54
.. nonce: pQasCt
.. section: IDLE

Document that IDLE's shell has no line limit. A program that runs
indefinitely can overfill memory.

..

.. bpo: 23220
.. date: 2018-11-05-23-23-00
.. nonce: H3SAWE
.. section: IDLE

Explain how IDLE's Shell displays output.

..

.. bpo: 35099
.. date: 2018-11-05-20-43-08
.. nonce: SVOZXC
.. section: IDLE

Improve the doc about IDLE running user code.   The section is renamed from
"IDLE -- console differences" is renamed "Running user code". It mostly
covers the implications of using custom sys.stdxxx objects.

..

.. bpo: 35097
.. date: 2018-10-28-20-17-14
.. nonce: 07tm66
.. section: IDLE

Add IDLE doc subsection explaining editor windows. Topics include opening,
title and status bar, .py* extension, and running.

..

.. bpo: 35093
.. date: 2018-10-28-15-53-51
.. nonce: cH-tli
.. section: IDLE

Document the IDLE document viewer in the IDLE doc. Add a paragraph in "Help
and preferences", "Help sources" subsection.

..

.. bpo: 35088
.. date: 2018-10-28-00-54-32
.. nonce: r1lJZd
.. section: IDLE

Update idlelib.help.copy_string docstring. We now use git and backporting
instead of hg and forward merging.

..

.. bpo: 35087
.. date: 2018-10-28-00-08-42
.. nonce: G7gx2-
.. section: IDLE

Update idlelib help files for the current doc build. The main change is the
elimination of chapter-section numbers.

..

.. bpo: 34548
.. date: 2018-09-22-20-25-07
.. nonce: 7pBzjg
.. section: IDLE

Use configured color theme for read-only text views.

..

.. bpo: 1529353
.. date: 2018-08-13-16-31-24
.. nonce: wXfQJk
.. section: IDLE

Enable "squeezing" of long outputs in the shell, to avoid performance
degradation and to clean up the history without losing it.  Squeezed outputs
may be copied, viewed in a separate window, and "unsqueezed".

..

.. bpo: 34047
.. date: 2018-08-05-15-49-55
.. nonce: LGKsIm
.. section: IDLE

Fixed mousewheel scrolling direction on macOS.

..

.. bpo: 34275
.. date: 2018-08-02-22-16-42
.. nonce: Iu0d7t
.. section: IDLE

Make IDLE calltips always visible on Mac. Some MacOS-tk combinations need
.update_idletasks(). Patch by Kevin Walzer.

..

.. bpo: 34120
.. date: 2018-08-01-23-25-38
.. nonce: HgsIz-
.. section: IDLE

Fix unresponsiveness after closing certain windows and dialogs.

..

.. bpo: 33975
.. date: 2018-06-26-22-53-14
.. nonce: Ow7alv
.. section: IDLE

Avoid small type when running htests. Since part of the purpose of
human-viewed tests is to determine that widgets look right, it is important
that they look the same for testing as when running IDLE.

..

.. bpo: 33905
.. date: 2018-06-21-20-35-33
.. nonce: W2mhiY
.. section: IDLE

Add test for idlelib.stackview.StackBrowser.

..

.. bpo: 33924
.. date: 2018-06-20-22-14-07
.. nonce: 6Rz1wt
.. section: IDLE

Change mainmenu.menudefs key 'windows' to 'window'. Every other menudef key
is lowercase version of main menu entry.

..

.. bpo: 33906
.. date: 2018-06-20-19-16-24
.. nonce: a1lXq0
.. section: IDLE

Rename idlelib.windows as window Match Window on the main menu and remove
last plural module name.

..

.. bpo: 33917
.. date: 2018-06-20-16-27-48
.. nonce: ZXHs8x
.. section: IDLE

Fix and document idlelib/idle_test/template.py. The revised file compiles,
runs, and tests OK.  idle_test/README.txt explains how to use it to create
new IDLE test files.

..

.. bpo: 33904
.. date: 2018-06-20-12-40-54
.. nonce: qm0eCu
.. section: IDLE

IDLE: In rstrip, rename class RstripExtension as Rstrip

..

.. bpo: 33907
.. date: 2018-06-19-22-21-27
.. nonce: z-_B3N
.. section: IDLE

For consistency and clarity, rename an IDLE module and classes. Module
calltips and its class CallTips are now calltip and Calltip. In module
calltip_w, class CallTip is now CalltipWindow.

..

.. bpo: 33856
.. date: 2018-06-16-21-54-45
.. nonce: TH8WHU
.. section: IDLE

Add "help" in the welcome message of IDLE

..

.. bpo: 33839
.. date: 2018-06-14-13-23-55
.. nonce: ZlJzHa
.. section: IDLE

IDLE: refactor ToolTip and CallTip and add documentation and tests

..

.. bpo: 33855
.. date: 2018-06-14-11-35-50
.. nonce: XL230W
.. section: IDLE

Minimally test all IDLE modules. Add missing files, import module,
instantiate classes, and check coverage. Check existing files.

..

.. bpo: 33656
.. date: 2018-06-10-17-59-36
.. nonce: 60ZqJS
.. section: IDLE

On Windows, add API call saying that tk scales for DPI. On Windows 8.1+ or
10, with DPI compatibility properties of the Python binary unchanged, and a
monitor resolution greater than 96 DPI, this should make text and lines
sharper.  It should otherwise have no effect.

..

.. bpo: 33768
.. date: 2018-06-04-19-23-11
.. nonce: I_2qpV
.. section: IDLE

Clicking on a context line moves that line to the top of the editor window.

..

.. bpo: 33763
.. date: 2018-06-03-20-12-57
.. nonce: URiFlE
.. section: IDLE

IDLE: Use read-only text widget for code context instead of label widget.

..

.. bpo: 33664
.. date: 2018-06-03-09-13-28
.. nonce: PZzQyL
.. section: IDLE

Scroll IDLE editor text by lines. Previously, the mouse wheel and scrollbar
slider moved text by a fixed number of pixels, resulting in partial lines at
the top of the editor box.  The change also applies to the shell and grep
output windows, but not to read-only text views.

..

.. bpo: 33679
.. date: 2018-05-29-07-14-37
.. nonce: MgX_Ui
.. section: IDLE

Enable theme-specific color configuration for Code Context. Use the
Highlights tab to see the setting for built-in themes or add settings to
custom themes.

..

.. bpo: 33642
.. date: 2018-05-24-20-42-44
.. nonce: J0VQbS
.. section: IDLE

Display up to maxlines non-blank lines for Code Context. If there is no
current context, show a single blank line.

..

.. bpo: 33628
.. date: 2018-05-23-19-51-07
.. nonce: sLlFLO
.. section: IDLE

IDLE: Cleanup codecontext.py and its test.

..

.. bpo: 33564
.. date: 2018-05-17-19-41-12
.. nonce: XzHZJe
.. section: IDLE

IDLE's code context now recognizes async as a block opener.

..

.. bpo: 21474
.. date: 2018-04-29-16-13-02
.. nonce: bglg-F
.. section: IDLE

Update word/identifier definition from ascii to unicode. In text and entry
boxes, this affects selection by double-click, movement left/right by
control-left/right, and deletion left/right by control-BACKSPACE/DEL.

..

.. bpo: 33204
.. date: 2018-04-02-00-28-13
.. nonce: NBsuIv
.. section: IDLE

IDLE: consistently color invalid string prefixes. A 'u' string prefix cannot
be paired with either 'r' or 'f'. Consistently color as much of the prefix,
starting at the right, as is valid. Revise and extend colorizer test.

..

.. bpo: 32984
.. date: 2018-03-05-01-29-05
.. nonce: NGjgT4
.. section: IDLE

Set ``__file__`` while running a startup file.  Like Python, IDLE optionally
runs one startup file in the Shell window before presenting the first
interactive input prompt.  For IDLE, ``-s`` runs a file named in
environmental variable  :envvar:`IDLESTARTUP` or  :envvar:`PYTHONSTARTUP`;
``-r file`` runs ``file``.  Python sets ``__file__`` to the startup file
name before running the file and unsets it before the first prompt.  IDLE
now does the same when run normally, without the ``-n`` option.

..

.. bpo: 32940
.. date: 2018-02-24-18-20-50
.. nonce: ZaJ1Rf
.. section: IDLE

Simplify and rename StringTranslatePseudoMapping in pyparse.

..

.. bpo: 32916
.. date: 2018-02-23-07-32-36
.. nonce: 4MsQ5F
.. section: IDLE

Change ``str`` to ``code`` in pyparse.

..

.. bpo: 32905
.. date: 2018-02-22-00-09-27
.. nonce: VlXj0x
.. section: IDLE

Remove unused code in pyparse module.

..

.. bpo: 32874
.. date: 2018-02-19-10-56-41
.. nonce: 6pZ9Gv
.. section: IDLE

Add tests for pyparse.

..

.. bpo: 32837
.. date: 2018-02-12-17-22-48
.. nonce: -33QPl
.. section: IDLE

Using the system and place-dependent default encoding for open() is a bad
idea for IDLE's system and location-independent files.

..

.. bpo: 32826
.. date: 2018-02-12-11-05-22
.. nonce: IxNZrk
.. section: IDLE

Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI test
test_file_buttons() only looks at initial ascii-only lines, but failed on
systems where open() defaults to 'ascii' because readline() internally reads
and decodes far enough ahead to encounter a non-ascii character in
CREDITS.txt.

..

.. bpo: 32831
.. date: 2018-02-12-08-08-45
.. nonce: srDRvU
.. section: IDLE

Add docstrings and tests for codecontext.

..

.. bpo: 32765
.. date: 2018-02-04-17-52-54
.. nonce: qm0eCu
.. section: IDLE

Update configdialog General tab docstring to add new widgets to the widget
list.

..

.. bpo: 35884
.. date: 2019-02-01-12-22-37
.. nonce: hJkMRD
.. section: Tools/Demos

Add a benchmark script for timing various ways to access variables:
``Tools/scripts/var_access_benchmark.py``.

..

.. bpo: 34989
.. date: 2018-10-15-13-22-28
.. nonce: hU4fra
.. section: Tools/Demos

python-gdb.py now handles errors on computing the line number of a Python
frame.

..

.. bpo: 20260
.. date: 2018-07-24-00-11-44
.. nonce: klmmqI
.. section: Tools/Demos

Argument Clinic now has non-bitwise unsigned int converters.

..

.. bpo: 32962
.. date: 2018-06-14-16-23-07
.. nonce: Q3Dwns
.. section: Tools/Demos

python-gdb now catches ``UnicodeDecodeError`` exceptions when calling
``string()``.

..

.. bpo: 32962
.. date: 2018-06-14-16-16-53
.. nonce: 2YfdwI
.. section: Tools/Demos

python-gdb now catches ValueError on read_var(): when Python has no debug
symbols for example.

..

.. bpo: 33189
.. date: 2018-04-03-18-10-00
.. nonce: QrXR00
.. section: Tools/Demos

:program:`pygettext.py` now recognizes only literal strings as docstrings
and translatable strings, and rejects bytes literals and f-string
expressions.

..

.. bpo: 31920
.. date: 2018-03-26-18-54-24
.. nonce: u_WKsT
.. section: Tools/Demos

Fixed handling directories as arguments in the ``pygettext`` script. Based
on patch by Oleg Krasnikov.

..

.. bpo: 29673
.. date: 2018-03-16-17-25-05
.. nonce: m8QtaW
.. section: Tools/Demos

Fix pystackv and pystack gdbinit macros.

..

.. bpo: 25427
.. date: 2018-03-02-16-23-31
.. nonce: 1mgMOG
.. section: Tools/Demos

Remove the pyvenv script in favor of ``python3 -m venv`` in order to lower
confusion as to what Python interpreter a virtual environment will be
created for.

..

.. bpo: 32885
.. date: 2018-02-20-12-16-47
.. nonce: dL5x7C
.. section: Tools/Demos

Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable automatic
backup creation (files with ``~`` suffix).

..

.. bpo: 32222
.. date: 2017-12-07-20-51-20
.. nonce: hPBcGT
.. section: Tools/Demos

Fix pygettext not extracting docstrings for functions with type annotated
arguments. Patch by Toby Harradine.

..

.. bpo: 31583
.. date: 2017-09-26-10-11-21
.. nonce: TM90_H
.. section: Tools/Demos

Fix 2to3 for using with --add-suffix option but without --output-dir option
for relative path to files in current directory.

..

.. bpo: 35713
.. date: 2019-01-22-17-04-10
.. nonce: fmehdG
.. section: C API

The :c:func:`PyByteArray_Init` and :c:func:`PyByteArray_Fini` functions have
been removed. They did nothing since Python 2.7.4 and Python 3.2.0, were
excluded from the limited API (stable ABI), and were not documented.

..

.. bpo: 33817
.. date: 2019-01-11-11-16-16
.. nonce: nJ4yIj
.. section: C API

Fixed :c:func:`_PyBytes_Resize` for empty bytes objects.

..

.. bpo: 35322
.. date: 2018-11-28-03-20-36
.. nonce: Qcqsag
.. section: C API

Fix memory leak in :c:func:`PyUnicode_EncodeLocale` and
:c:func:`PyUnicode_EncodeFSDefault` on error handling.

..

.. bpo: 35059
.. date: 2018-11-23-11-52-34
.. nonce: BLSp6y
.. section: C API

The following C macros have been converted to static inline functions:
:c:func:`Py_INCREF`, :c:func:`Py_DECREF`, :c:func:`Py_XINCREF`,
:c:func:`Py_XDECREF`, :c:func:`PyObject_INIT`, :c:func:`PyObject_INIT_VAR`.

..

.. bpo: 35296
.. date: 2018-11-22-18-34-23
.. nonce: nxrIQt
.. section: C API

``make install`` now also installs the internal API:
``Include/internal/*.h`` header files.

..

.. bpo: 35081
.. date: 2018-11-22-18-15-46
.. nonce: FdK9mV
.. section: C API

Internal APIs surrounded by ``#ifdef Py_BUILD_CORE`` have been moved from
``Include/*.h`` headers to new header files ``Include/internal/pycore_*.h``.

..

.. bpo: 35259
.. date: 2018-11-22-13-52-36
.. nonce: p07c61
.. section: C API

Conditionally declare :c:func:`Py_FinalizeEx()` (new in 3.6) based on
Py_LIMITED_API. Patch by Arthur Neufeld.

..

.. bpo: 35081
.. date: 2018-11-13-12-13-04
.. nonce: gFd85N
.. section: C API

The :c:func:`_PyObject_GC_TRACK` and :c:func:`_PyObject_GC_UNTRACK` macros
have been removed from the public C API.

..

.. bpo: 35134
.. date: 2018-11-01-13-58-37
.. nonce: SbZo0o
.. section: C API

Creation of a new ``Include/cpython/`` subdirectory.

..

.. bpo: 34725
.. date: 2018-10-13-16-30-54
.. nonce: j52rIS
.. section: C API

Adds _Py_SetProgramFullPath so embedders may override sys.executable

..

.. bpo: 34910
.. date: 2018-10-05-17-06-49
.. nonce: tSFrls
.. section: C API

Ensure that :c:func:`PyObject_Print` always returns ``-1`` on error.  Patch
by Zackery Spytz.

..

.. bpo: 34523
.. date: 2018-08-29-18-48-47
.. nonce: lLQ8rh
.. section: C API

Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding on
Windows if Py_LegacyWindowsFSEncodingFlag is zero.

..

.. bpo: 34193
.. date: 2018-07-24-11-57-35
.. nonce: M6ch1Q
.. section: C API

Fix pluralization in TypeError messages in getargs.c and typeobject.c: '1
argument' instead of '1 arguments' and '1 element' instead of '1 elements'.

..

.. bpo: 34127
.. date: 2018-07-22-14-58-06
.. nonce: qkfnHO
.. section: C API

Return grammatically correct error message based on argument count. Patch by
Karthikeyan Singaravelan.

..

.. bpo: 23927
.. date: 2018-07-09-11-39-54
.. nonce: pDFkxb
.. section: C API

Fixed :exc:`SystemError` in :c:func:`PyArg_ParseTupleAndKeywords` when the
``w*`` format unit is used for optional parameter.

..

.. bpo: 32455
.. date: 2018-07-08-12-06-18
.. nonce: KVHlkz
.. section: C API

Added :c:func:`PyCompile_OpcodeStackEffectWithJump`.

..

.. bpo: 34008
.. date: 2018-07-02-10-58-11
.. nonce: COewz-
.. section: C API

Py_Main() can again be called after Py_Initialize(), as in Python 3.6.

..

.. bpo: 32500
.. date: 2018-06-21-17-19-31
.. nonce: WGCNad
.. section: C API

Fixed error messages for :c:func:`PySequence_Size`,
:c:func:`PySequence_GetItem`, :c:func:`PySequence_SetItem` and
:c:func:`PySequence_DelItem` called with a mapping and
:c:func:`PyMapping_Size` called with a sequence.

..

.. bpo: 33818
.. date: 2018-06-10-09-42-31
.. nonce: 50nlf3
.. section: C API

:c:func:`PyExceptionClass_Name` will now return ``const char *`` instead of
``char *``.

..

.. bpo: 33042
.. date: 2018-03-20-21-43-09
.. nonce: FPFp64
.. section: C API

Embedding applications may once again call PySys_ResetWarnOptions,
PySys_AddWarnOption, and PySys_AddXOption prior to calling Py_Initialize.

..

.. bpo: 32374
.. date: 2018-01-09-17-03-54
.. nonce: SwwLoz
.. section: C API

Document that m_traverse for multi-phase initialized modules can be called
with m_state=NULL, and add a sanity check

..

.. bpo: 30863
.. date: 2017-10-12-23-24-27
.. nonce: xrED19
.. section: C API

:c:func:`PyUnicode_AsWideChar` and :c:func:`PyUnicode_AsWideCharString` no
longer cache the ``wchar_t*`` representation of string objects.
