diff --git "a/cpython_chunk_18.py" "b/cpython_chunk_18.py" new file mode 100644--- /dev/null +++ "b/cpython_chunk_18.py" @@ -0,0 +1,16837 @@ +# Auto-generated from cpython_chunk_18.txt + +TEXT_DATA = r""" +.. bpo: 26556 +.. date: 9636 +.. nonce: v5j2uL +.. release date: 2016-06-12 +.. original section: Library +.. section: Security +Update expat to 2.1.1, fixes :cve:`2015-1283`. +.. +.. bpo: 0 +.. date: 9635 +.. nonce: E4ochz +.. original section: Library +.. section: Security +Fix TLS stripping vulnerability in smtplib, :cve:`2016-0772`. Reported by Team +Oststrom. +.. +.. bpo: 26839 +.. date: 9629 +.. nonce: yVvy7R +.. original section: Library +.. section: Security +On Linux, :func:`os.urandom` now calls ``getrandom()`` with +``GRND_NONBLOCK`` to fall back on reading ``/dev/urandom`` if the urandom +entropy pool is not initialized yet. Patch written by Colm Buckley. +.. +.. bpo: 26657 +.. date: 9597 +.. nonce: C_-XFg +.. original section: Library +.. section: Security +Fix directory traversal vulnerability with http.server on Windows. This +fixes a regression that was introduced in 3.3.4rc1 and 3.4.0rc1. Based on +patch by Philipp Hagemeister. +.. +.. bpo: 26313 +.. date: 9581 +.. nonce: LjZAjy +.. original section: Library +.. section: Security +ssl.py _load_windows_store_certs fails if windows cert store is empty. Patch +by Baji. +.. +.. bpo: 25939 +.. date: 9561 +.. nonce: X49Fqd +.. original section: Library +.. section: Security +On Windows open the cert store readonly in ssl.enum_certificates. +.. +.. bpo: 27066 +.. date: 9673 +.. nonce: SNExZi +.. section: Core and Builtins +Fixed SystemError if a custom opener (for open()) returns a negative number +without setting an exception. +.. +.. bpo: 20041 +.. date: 9672 +.. nonce: TypyGp +.. section: Core and Builtins +Fixed TypeError when frame.f_trace is set to None. Patch by Xavier de Gaye. +.. +.. bpo: 26168 +.. date: 9671 +.. nonce: -nPBL6 +.. section: Core and Builtins +Fixed possible refleaks in failing Py_BuildValue() with the "N" format unit. +.. +.. bpo: 26991 +.. date: 9670 +.. nonce: yWGNhz +.. section: Core and Builtins +Fix possible refleak when creating a function with annotations. +.. +.. bpo: 27039 +.. date: 9669 +.. nonce: Zj7tV7 +.. section: Core and Builtins +Fixed bytearray.remove() for values greater than 127. Patch by Joe Jevnik. +.. +.. bpo: 23640 +.. date: 9668 +.. nonce: kvNC4c +.. section: Core and Builtins +int.from_bytes() no longer bypasses constructors for subclasses. +.. +.. bpo: 26811 +.. date: 9667 +.. nonce: oNzUWt +.. section: Core and Builtins +gc.get_objects() no longer contains a broken tuple with NULL pointer. +.. +.. bpo: 20120 +.. date: 9666 +.. nonce: c-FZZc +.. section: Core and Builtins +Use RawConfigParser for .pypirc parsing, removing support for interpolation +unintentionally added with move to Python 3. Behavior no longer does any +interpolation in .pypirc files, matching behavior in Python 2.7 and +Setuptools 19.0. +.. +.. bpo: 26659 +.. date: 9665 +.. nonce: 5PRa83 +.. section: Core and Builtins +Make the builtin slice type support cycle collection. +.. +.. bpo: 26718 +.. date: 9664 +.. nonce: K5PQ8j +.. section: Core and Builtins +super.__init__ no longer leaks memory if called multiple times. NOTE: A +direct call of super.__init__ is not endorsed! +.. +.. bpo: 25339 +.. date: 9663 +.. nonce: ZcaC2E +.. section: Core and Builtins +PYTHONIOENCODING now has priority over locale in setting the error handler +for stdin and stdout. +.. +.. bpo: 26494 +.. date: 9662 +.. nonce: G6eXIi +.. section: Core and Builtins +Fixed crash on iterating exhausting iterators. Affected classes are generic +sequence iterators, iterators of str, bytes, bytearray, list, tuple, set, +frozenset, dict, OrderedDict, corresponding views and os.scandir() iterator. +.. +.. bpo: 26581 +.. date: 9661 +.. nonce: yNA7nm +.. section: Core and Builtins +If coding cookie is specified multiple times on a line in Python source code +file, only the first one is taken to account. +.. +.. bpo: 26464 +.. date: 9660 +.. nonce: 7BreGz +.. section: Core and Builtins +Fix str.translate() when string is ASCII and first replacements removes +character, but next replacement uses a non-ASCII character or a string +longer than 1 character. Regression introduced in Python 3.5.0. +.. +.. bpo: 22836 +.. date: 9659 +.. nonce: cimt1y +.. section: Core and Builtins +Ensure exception reports from PyErr_Display() and PyErr_WriteUnraisable() +are sensible even when formatting them produces secondary errors. This +affects the reports produced by sys.__excepthook__() and when __del__() +raises an exception. +.. +.. bpo: 26302 +.. date: 9658 +.. nonce: UD9XQt +.. section: Core and Builtins +Correct behavior to reject comma as a legal character for cookie names. +.. +.. bpo: 4806 +.. date: 9657 +.. nonce: i9m3hj +.. section: Core and Builtins +Avoid masking the original TypeError exception when using star (``*``) +unpacking in function calls. Based on patch by Hagen Fürstenau and Daniel +Urban. +.. +.. bpo: 27138 +.. date: 9656 +.. nonce: ifYEro +.. section: Core and Builtins +Fix the doc comment for FileFinder.find_spec(). +.. +.. bpo: 26154 +.. date: 9655 +.. nonce: MtnRAH +.. section: Core and Builtins +Add a new private _PyThreadState_UncheckedGet() function to get the current +Python thread state, but don't issue a fatal error if it is NULL. This new +function must be used instead of accessing directly the +_PyThreadState_Current variable. The variable is no more exposed since +Python 3.5.1 to hide the exact implementation of atomic C types, to avoid +compiler issues. +.. +.. bpo: 26194 +.. date: 9654 +.. nonce: j9zand +.. section: Core and Builtins +Deque.insert() gave odd results for bounded deques that had reached their +maximum size. Now an IndexError will be raised when attempting to insert +into a full deque. +.. +.. bpo: 25843 +.. date: 9653 +.. nonce: t2kGug +.. section: Core and Builtins +When compiling code, don't merge constants if they are equal but have a +different types. For example, ``f1, f2 = lambda: 1, lambda: 1.0`` is now +correctly compiled to two different functions: ``f1()`` returns ``1`` +(``int``) and ``f2()`` returns ``1.0`` (``int``), even if ``1`` and ``1.0`` +are equal. +.. +.. bpo: 22995 +.. date: 9652 +.. nonce: KYNKvs +.. section: Core and Builtins +[UPDATE] Comment out the one of the pickleability tests in +_PyObject_GetState() due to regressions observed in Cython-based projects. +.. +.. bpo: 25961 +.. date: 9651 +.. nonce: Hdjjw0 +.. section: Core and Builtins +Disallowed null characters in the type name. +.. +.. bpo: 25973 +.. date: 9650 +.. nonce: Ud__ZP +.. section: Core and Builtins +Fix segfault when an invalid nonlocal statement binds a name starting with +two underscores. +.. +.. bpo: 22995 +.. date: 9649 +.. nonce: Wq0E86 +.. section: Core and Builtins +Instances of extension types with a state that aren't subclasses of list or +dict and haven't implemented any pickle-related methods (__reduce__, +__reduce_ex__, __getnewargs__, __getnewargs_ex__, or __getstate__), can no +longer be pickled. Including memoryview. +.. +.. bpo: 20440 +.. date: 9648 +.. nonce: GCwOfH +.. section: Core and Builtins +Massive replacing unsafe attribute setting code with special macro +Py_SETREF. +.. +.. bpo: 25766 +.. date: 9647 +.. nonce: jn93Yu +.. section: Core and Builtins +Special method __bytes__() now works in str subclasses. +.. +.. bpo: 25421 +.. date: 9646 +.. nonce: c47YEL +.. section: Core and Builtins +__sizeof__ methods of builtin types now use dynamic basic size. This allows +sys.getsize() to work correctly with their subclasses with __slots__ +defined. +.. +.. bpo: 25709 +.. date: 9645 +.. nonce: WwGm2k +.. section: Core and Builtins +Fixed problem with in-place string concatenation and utf-8 cache. +.. +.. bpo: 27147 +.. date: 9644 +.. nonce: tCCgmH +.. section: Core and Builtins +Mention :pep:`420` in the importlib docs. +.. +.. bpo: 24097 +.. date: 9643 +.. nonce: Vt4E-i +.. section: Core and Builtins +Fixed crash in object.__reduce__() if slot name is freed inside __getattr__. +.. +.. bpo: 24731 +.. date: 9642 +.. nonce: h9-hnz +.. section: Core and Builtins +Fixed crash on converting objects with special methods __bytes__, __trunc__, +and __float__ returning instances of subclasses of bytes, int, and float to +subclasses of bytes, int, and float correspondingly. +.. +.. bpo: 26478 +.. date: 9641 +.. nonce: n0dB8e +.. section: Core and Builtins +Fix semantic bugs when using binary operators with dictionary views and +tuples. +.. +.. bpo: 26171 +.. date: 9640 +.. nonce: 8SaQEa +.. section: Core and Builtins +Fix possible integer overflow and heap corruption in zipimporter.get_data(). +.. +.. bpo: 25660 +.. date: 9639 +.. nonce: 93DzBo +.. section: Core and Builtins +Fix TAB key behaviour in REPL with readline. +.. +.. bpo: 25887 +.. date: 9638 +.. nonce: PtVIX7 +.. section: Core and Builtins +Raise a RuntimeError when a coroutine object is awaited more than once. +.. +.. bpo: 27243 +.. date: 9637 +.. nonce: U36M4E +.. section: Core and Builtins +Update the __aiter__ protocol: instead of returning an awaitable that +resolves to an asynchronous iterator, the asynchronous iterator should be +returned directly. Doing the former will trigger a +PendingDeprecationWarning. +.. +.. bpo: 21386 +.. date: 9634 +.. nonce: DjV72U +.. section: Library +Implement missing IPv4Address.is_global property. It was documented since +07a5610bae9d. Initial patch by Roger Luethi. +.. +.. bpo: 20900 +.. date: 9633 +.. nonce: H5YQPR +.. section: Library +distutils register command now decodes HTTP responses correctly. Initial +patch by ingrid. +.. +.. bpo: 0 +.. date: 9632 +.. nonce: iYIeng +.. section: Library +A new version of typing.py provides several new classes and features: +@overload outside stubs, Reversible, DefaultDict, Text, ContextManager, +Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some of +the new features are not yet implemented in mypy or other static analyzers). +Also classes for :pep:`492` (Awaitable, AsyncIterable, AsyncIterator) have been +added (in fact they made it into 3.5.1 but were never mentioned). +.. +.. bpo: 25738 +.. date: 9631 +.. nonce: mED9w4 +.. section: Library +Stop http.server.BaseHTTPRequestHandler.send_error() from sending a message +body for 205 Reset Content. Also, don't send Content header fields in +responses that don't have a body. Patch by Susumu Koshiba. +.. +.. bpo: 21313 +.. date: 9630 +.. nonce: W30MBr +.. section: Library +Fix the "platform" module to tolerate when sys.version contains truncated +build information. +.. +.. bpo: 27164 +.. date: 9628 +.. nonce: 6wmjx2 +.. section: Library +In the zlib module, allow decompressing raw Deflate streams with a +predefined zdict. Based on patch by Xiang Zhang. +.. +.. bpo: 24291 +.. date: 9627 +.. nonce: Ac6HvL +.. section: Library +Fix wsgiref.simple_server.WSGIRequestHandler to completely write data to the +client. Previously it could do partial writes and truncate data. Also, +wsgiref.handler.ServerHandler can now handle stdout doing partial writes, +but this is deprecated. +.. +.. bpo: 26809 +.. date: 9626 +.. nonce: ya7JMb +.. section: Library +Add ``__all__`` to :mod:`string`. Patch by Emanuel Barry. +.. +.. bpo: 26373 +.. date: 9625 +.. nonce: P6qz6o +.. section: Library +subprocess.Popen.communicate now correctly ignores BrokenPipeError when the +child process dies before .communicate() is called in more/all +circumstances. +.. +.. bpo: 21776 +.. date: 9624 +.. nonce: 04eQfa +.. section: Library +distutils.upload now correctly handles HTTPError. Initial patch by Claudiu +Popa. +.. +.. bpo: 27114 +.. date: 9623 +.. nonce: bGCuAM +.. section: Library +Fix SSLContext._load_windows_store_certs fails with PermissionError +.. +.. bpo: 18383 +.. date: 9622 +.. nonce: jr-b0l +.. section: Library +Avoid creating duplicate filters when using filterwarnings and simplefilter. +Based on patch by Alex Shkop. +.. +.. bpo: 27057 +.. date: 9621 +.. nonce: YzTA_Q +.. section: Library +Fix os.set_inheritable() on Android, ioctl() is blocked by SELinux and fails +with EACCESS. The function now falls back to fcntl(). Patch written by +Michał Bednarski. +.. +.. bpo: 27014 +.. date: 9620 +.. nonce: ui7Khn +.. section: Library +Fix infinite recursion using typing.py. Thanks to Kalle Tuure! +.. +.. bpo: 14132 +.. date: 9619 +.. nonce: 5wR9MN +.. section: Library +Fix urllib.request redirect handling when the target only has a query +string. Original fix by Ján Janech. +.. +.. bpo: 17214 +.. date: 9618 +.. nonce: lUbZOV +.. section: Library +The "urllib.request" module now percent-encodes non-ASCII bytes found in +redirect target URLs. Some servers send Location header fields with +non-ASCII bytes, but "http.client" requires the request target to be +ASCII-encodable, otherwise a UnicodeEncodeError is raised. Based on patch by +Christian Heimes. +.. +.. bpo: 26892 +.. date: 9617 +.. nonce: XIXb0h +.. section: Library +Honor debuglevel flag in urllib.request.HTTPHandler. Patch contributed by +Chi Hsuan Yen. +.. +.. bpo: 22274 +.. date: 9616 +.. nonce: 0RHDMN +.. section: Library +In the subprocess module, allow stderr to be redirected to stdout even when +stdout is not redirected. Patch by Akira Li. +.. +.. bpo: 26807 +.. date: 9615 +.. nonce: LXSPP6 +.. section: Library +mock_open 'files' no longer error on readline at end of file. Patch from +Yolanda Robla. +.. +.. bpo: 25745 +.. date: 9614 +.. nonce: -n8acU +.. section: Library +Fixed leaking a userptr in curses panel destructor. +.. +.. bpo: 26977 +.. date: 9613 +.. nonce: 5G4HtL +.. section: Library +Removed unnecessary, and ignored, call to sum of squares helper in +statistics.pvariance. +.. +.. bpo: 26881 +.. date: 9612 +.. nonce: mdiq_L +.. section: Library +The modulefinder module now supports extended opcode arguments. +.. +.. bpo: 23815 +.. date: 9611 +.. nonce: _krNe8 +.. section: Library +Fixed crashes related to directly created instances of types in _tkinter and +curses.panel modules. +.. +.. bpo: 17765 +.. date: 9610 +.. nonce: hiSVS1 +.. section: Library +weakref.ref() no longer silently ignores keyword arguments. Patch by Georg +Brandl. +.. +.. bpo: 26873 +.. date: 9609 +.. nonce: cYXRcH +.. section: Library +xmlrpc now raises ResponseError on unsupported type tags instead of silently +return incorrect result. +.. +.. bpo: 26711 +.. date: 9608 +.. nonce: Eu85Qw +.. section: Library +Fixed the comparison of plistlib.Data with other types. +.. +.. bpo: 24114 +.. date: 9607 +.. nonce: RMRMtM +.. section: Library +Fix an uninitialized variable in ``ctypes.util``. +The bug only occurs on SunOS when the ctypes implementation searches for the +``crle`` program. Patch by Xiang Zhang. Tested on SunOS by Kees Bos. +.. +.. bpo: 26864 +.. date: 9606 +.. nonce: 1KgGds +.. section: Library +In urllib.request, change the proxy bypass host checking against no_proxy to +be case-insensitive, and to not match unrelated host names that happen to +have a bypassed hostname as a suffix. Patch by Xiang Zhang. +.. +.. bpo: 26634 +.. date: 9605 +.. nonce: FZvsSb +.. section: Library +recursive_repr() now sets __qualname__ of wrapper. Patch by Xiang Zhang. +.. +.. bpo: 26804 +.. date: 9604 +.. nonce: 9Orp-G +.. section: Library +urllib.request will prefer lower_case proxy environment variables over +UPPER_CASE or Mixed_Case ones. Patch contributed by Hans-Peter Jansen. +.. +.. bpo: 26837 +.. date: 9603 +.. nonce: 2FXGsD +.. section: Library +assertSequenceEqual() now correctly outputs non-stringified differing items +(like bytes in the -b mode). This affects assertListEqual() and +assertTupleEqual(). +.. +.. bpo: 26041 +.. date: 9602 +.. nonce: bVem-p +.. section: Library +Remove "will be removed in Python 3.7" from deprecation messages of +platform.dist() and platform.linux_distribution(). Patch by Kumaripaba +Miyurusara Athukorala. +.. +.. bpo: 26822 +.. date: 9601 +.. nonce: rYSL4W +.. section: Library +itemgetter, attrgetter and methodcaller objects no longer silently ignore +keyword arguments. +.. +.. bpo: 26733 +.. date: 9600 +.. nonce: YxaJmL +.. section: Library +Disassembling a class now disassembles class and static methods. Patch by +Xiang Zhang. +.. +.. bpo: 26801 +.. date: 9599 +.. nonce: TQGY-7 +.. section: Library +Fix error handling in :func:`shutil.get_terminal_size`, catch +:exc:`AttributeError` instead of :exc:`NameError`. Patch written by Emanuel +Barry. +.. +.. bpo: 24838 +.. date: 9598 +.. nonce: 3Pfx8T +.. section: Library +tarfile's ustar and gnu formats now correctly calculate name and link field +limits for multibyte character encodings like utf-8. +.. +.. bpo: 26717 +.. date: 9596 +.. nonce: jngTdu +.. section: Library +Stop encoding Latin-1-ized WSGI paths with UTF-8. Patch by Anthony Sottile. +.. +.. bpo: 26735 +.. date: 9595 +.. nonce: riSl3b +.. section: Library +Fix :func:`os.urandom` on Solaris 11.3 and newer when reading more than +1,024 bytes: call ``getrandom()`` multiple times with a limit of 1024 bytes +per call. +.. +.. bpo: 16329 +.. date: 9594 +.. nonce: nuXD8W +.. section: Library +Add .webm to mimetypes.types_map. Patch by Giampaolo Rodola'. +.. +.. bpo: 13952 +.. date: 9593 +.. nonce: SOoTVE +.. section: Library +Add .csv to mimetypes.types_map. Patch by Geoff Wilson. +.. +.. bpo: 26709 +.. date: 9592 +.. nonce: luOPbP +.. section: Library +Fixed Y2038 problem in loading binary PLists. +.. +.. bpo: 23735 +.. date: 9591 +.. nonce: Y5oQ9r +.. section: Library +Handle terminal resizing with Readline 6.3+ by installing our own SIGWINCH +handler. Patch by Eric Price. +.. +.. bpo: 26586 +.. date: 9590 +.. nonce: V5pZNa +.. section: Library +In http.server, respond with "413 Request header fields too large" if there +are too many header fields to parse, rather than killing the connection and +raising an unhandled exception. Patch by Xiang Zhang. +.. +.. bpo: 22854 +.. date: 9589 +.. nonce: K3rMEH +.. section: Library +Change BufferedReader.writable() and BufferedWriter.readable() to always +return False. +.. +.. bpo: 25195 +.. date: 9588 +.. nonce: EOc4Po +.. section: Library +Fix a regression in mock.MagicMock. _Call is a subclass of tuple (changeset +3603bae63c13 only works for classes) so we need to implement __ne__ +ourselves. Patch by Andrew Plummer. +.. +.. bpo: 26644 +.. date: 9587 +.. nonce: 7tt1tk +.. section: Library +Raise ValueError rather than SystemError when a negative length is passed to +SSLSocket.recv() or read(). +.. +.. bpo: 23804 +.. date: 9586 +.. nonce: PP63Ff +.. section: Library +Fix SSL recv(0) and read(0) methods to return zero bytes instead of up to +1024. +.. +.. bpo: 26616 +.. date: 9585 +.. nonce: v3QwdD +.. section: Library +Fixed a bug in datetime.astimezone() method. +.. +.. bpo: 21925 +.. date: 9584 +.. nonce: _fr69L +.. section: Library +:func:`warnings.formatwarning` now catches exceptions on +``linecache.getline(...)`` to be able to log :exc:`ResourceWarning` emitted +late during the Python shutdown process. +.. +.. bpo: 24266 +.. date: 9583 +.. nonce: YZgVyM +.. section: Library +Ctrl+C during Readline history search now cancels the search mode when +compiled with Readline 7. +.. +.. bpo: 26560 +.. date: 9582 +.. nonce: A4WXNz +.. section: Library +Avoid potential ValueError in BaseHandler.start_response. Initial patch by +Peter Inglesby. +.. +.. bpo: 26569 +.. date: 9580 +.. nonce: EX8vF1 +.. section: Library +Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex` to support +importing packages. +.. +.. bpo: 26499 +.. date: 9579 +.. nonce: NP08PI +.. section: Library +Account for remaining Content-Length in HTTPResponse.readline() and read1(). +Based on patch by Silent Ghost. Also document that HTTPResponse now supports +these methods. +.. +.. bpo: 25320 +.. date: 9578 +.. nonce: V96LIy +.. section: Library +Handle sockets in directories unittest discovery is scanning. Patch from +Victor van den Elzen. +.. +.. bpo: 16181 +.. date: 9577 +.. nonce: P7lLvo +.. section: Library +cookiejar.http2time() now returns None if year is higher than +datetime.MAXYEAR. +.. +.. bpo: 26513 +.. date: 9576 +.. nonce: HoPepy +.. section: Library +Fixes platform module detection of Windows Server +.. +.. bpo: 23718 +.. date: 9575 +.. nonce: AMPC0o +.. section: Library +Fixed parsing time in week 0 before Jan 1. Original patch by Tamás Bence +Gedai. +.. +.. bpo: 20589 +.. date: 9574 +.. nonce: NsQ_I1 +.. section: Library +Invoking Path.owner() and Path.group() on Windows now raise +NotImplementedError instead of ImportError. +.. +.. bpo: 26177 +.. date: 9573 +.. nonce: HlSWer +.. section: Library +Fixed the keys() method for Canvas and Scrollbar widgets. +.. +.. bpo: 15068 +.. date: 9572 +.. nonce: bcHtiw +.. section: Library +Got rid of excessive buffering in the fileinput module. The bufsize +parameter is no longer used. +.. +.. bpo: 2202 +.. date: 9571 +.. nonce: dk9sd0 +.. section: Library +Fix UnboundLocalError in AbstractDigestAuthHandler.get_algorithm_impls. +Initial patch by Mathieu Dupuy. +.. +.. bpo: 25718 +.. date: 9570 +.. nonce: 4EjZyv +.. section: Library +Fixed pickling and copying the accumulate() iterator with total is None. +.. +.. bpo: 26475 +.. date: 9569 +.. nonce: JXVccY +.. section: Library +Fixed debugging output for regular expressions with the (?x) flag. +.. +.. bpo: 26457 +.. date: 9568 +.. nonce: Xe6Clh +.. section: Library +Fixed the subnets() methods in IP network classes for the case when +resulting prefix length is equal to maximal prefix length. Based on patch by +Xiang Zhang. +.. +.. bpo: 26385 +.. date: 9567 +.. nonce: 50bDXm +.. section: Library +Remove the file if the internal open() call in NamedTemporaryFile() fails. +Patch by Silent Ghost. +.. +.. bpo: 26402 +.. date: 9566 +.. nonce: k7DVuU +.. section: Library +Fix XML-RPC client to retry when the server shuts down a persistent +connection. This was a regression related to the new +http.client.RemoteDisconnected exception in 3.5.0a4. +.. +.. bpo: 25913 +.. date: 9565 +.. nonce: 5flb95 +.. section: Library +Leading ``<~`` is optional now in base64.a85decode() with adobe=True. Patch +by Swati Jaiswal. +.. +.. bpo: 26186 +.. date: 9564 +.. nonce: R9rfiL +.. section: Library +Remove an invalid type check in importlib.util.LazyLoader. +.. +.. bpo: 26367 +.. date: 9563 +.. nonce: ckpNeU +.. section: Library +importlib.__import__() raises SystemError like builtins.__import__() when +``level`` is specified but without an accompanying package specified. +.. +.. bpo: 26309 +.. date: 9562 +.. nonce: ubEeiz +.. section: Library +In the "socketserver" module, shut down the request (closing the connected +socket) when verify_request() returns false. Patch by Aviv Palivoda. +.. +.. bpo: 25995 +.. date: 9560 +.. nonce: NfcimP +.. section: Library +os.walk() no longer uses FDs proportional to the tree depth. +.. +.. bpo: 26117 +.. date: 9559 +.. nonce: ne6p11 +.. section: Library +The os.scandir() iterator now closes file descriptor not only when the +iteration is finished, but when it was failed with error. +.. +.. bpo: 25911 +.. date: 9558 +.. nonce: d4Zadh +.. section: Library +Restored support of bytes paths in os.walk() on Windows. +.. +.. bpo: 26045 +.. date: 9557 +.. nonce: WmzUrX +.. section: Library +Add UTF-8 suggestion to error message when posting a non-Latin-1 string with +http.client. +.. +.. bpo: 12923 +.. date: 9556 +.. nonce: HPAu-B +.. section: Library +Reset FancyURLopener's redirect counter even if there is an exception. +Based on patches by Brian Brazil and Daniel Rocco. +.. +.. bpo: 25945 +.. date: 9555 +.. nonce: guNgNM +.. section: Library +Fixed a crash when unpickle the functools.partial object with wrong state. +Fixed a leak in failed functools.partial constructor. "args" and "keywords" +attributes of functools.partial have now always types tuple and dict +correspondingly. +.. +.. bpo: 26202 +.. date: 9554 +.. nonce: LPIXLg +.. section: Library +copy.deepcopy() now correctly copies range() objects with non-atomic +attributes. +.. +.. bpo: 23076 +.. date: 9553 +.. nonce: 8rphoP +.. section: Library +Path.glob() now raises a ValueError if it's called with an invalid pattern. +Patch by Thomas Nyberg. +.. +.. bpo: 19883 +.. date: 9552 +.. nonce: z9TsO6 +.. section: Library +Fixed possible integer overflows in zipimport. +.. +.. bpo: 26227 +.. date: 9551 +.. nonce: Fe6oiB +.. section: Library +On Windows, getnameinfo(), gethostbyaddr() and gethostbyname_ex() functions +of the socket module now decode the hostname from the ANSI code page rather +than UTF-8. +.. +.. bpo: 26147 +.. date: 9550 +.. nonce: i-Jc01 +.. section: Library +xmlrpc now works with strings not encodable with used non-UTF-8 encoding. +.. +.. bpo: 25935 +.. date: 9549 +.. nonce: cyni91 +.. section: Library +Garbage collector now breaks reference loops with OrderedDict. +.. +.. bpo: 16620 +.. date: 9548 +.. nonce: rxpn_Y +.. section: Library +Fixed AttributeError in msilib.Directory.glob(). +.. +.. bpo: 26013 +.. date: 9547 +.. nonce: 93RKNz +.. section: Library +Added compatibility with broken protocol 2 pickles created in old Python 3 +versions (3.4.3 and lower). +.. +.. bpo: 25850 +.. date: 9546 +.. nonce: jwFPxj +.. section: Library +Use cross-compilation by default for 64-bit Windows. +.. +.. bpo: 17633 +.. date: 9545 +.. nonce: 9mpbUO +.. section: Library +Improve zipimport's support for namespace packages. +.. +.. bpo: 24705 +.. date: 9544 +.. nonce: IZYwjR +.. section: Library +Fix sysconfig._parse_makefile not expanding ${} vars appearing before $() +vars. +.. +.. bpo: 22138 +.. date: 9543 +.. nonce: nRNYkc +.. section: Library +Fix mock.patch behavior when patching descriptors. Restore original values +after patching. Patch contributed by Sean McCully. +.. +.. bpo: 25672 +.. date: 9542 +.. nonce: fw9RJP +.. section: Library +In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode option if it is +safe to do so. +.. +.. bpo: 26012 +.. date: 9541 +.. nonce: IFSXNm +.. section: Library +Don't traverse into symlinks for ``**`` pattern in pathlib.Path.[r]glob(). +.. +.. bpo: 24120 +.. date: 9540 +.. nonce: Yiwa0h +.. section: Library +Ignore PermissionError when traversing a tree with pathlib.Path.[r]glob(). +Patch by Ulrich Petri. +.. +.. bpo: 25447 +.. date: 9539 +.. nonce: -4m4xO +.. section: Library +fileinput now uses sys.stdin as-is if it does not have a buffer attribute +(restores backward compatibility). +.. +.. bpo: 25447 +.. date: 9538 +.. nonce: AtHkWA +.. section: Library +Copying the lru_cache() wrapper object now always works, independently from +the type of the wrapped object (by returning the original object unchanged). +.. +.. bpo: 24103 +.. date: 9537 +.. nonce: WufqrQ +.. section: Library +Fixed possible use after free in ElementTree.XMLPullParser. +.. +.. bpo: 25860 +.. date: 9536 +.. nonce: 0hActb +.. section: Library +os.fwalk() no longer skips remaining directories when error occurs. +Original patch by Samson Lee. +.. +.. bpo: 25914 +.. date: 9535 +.. nonce: h0V61F +.. section: Library +Fixed and simplified OrderedDict.__sizeof__. +.. +.. bpo: 25902 +.. date: 9534 +.. nonce: 6t2FmH +.. section: Library +Fixed various refcount issues in ElementTree iteration. +.. +.. bpo: 25717 +.. date: 9533 +.. nonce: 0_xjaK +.. section: Library +Restore the previous behaviour of tolerating most fstat() errors when +opening files. This was a regression in 3.5a1, and stopped anonymous +temporary files from working in special cases. +.. +.. bpo: 24903 +.. date: 9532 +.. nonce: 3LBdzb +.. section: Library +Fix regression in number of arguments compileall accepts when '-d' is +specified. The check on the number of arguments has been dropped completely +as it never worked correctly anyway. +.. +.. bpo: 25764 +.. date: 9531 +.. nonce: 7WWG07 +.. section: Library +In the subprocess module, preserve any exception caused by fork() failure +when preexec_fn is used. +.. +.. bpo: 6478 +.. date: 9530 +.. nonce: -Bi9Hb +.. section: Library +_strptime's regexp cache now is reset after changing timezone with +time.tzset(). +.. +.. bpo: 14285 +.. date: 9529 +.. nonce: UyG8Hj +.. section: Library +When executing a package with the "python -m package" option, and package +initialization fails, a proper traceback is now reported. The "runpy" +module now lets exceptions from package initialization pass back to the +caller, rather than raising ImportError. +.. +.. bpo: 19771 +.. date: 9528 +.. nonce: 5NG-bg +.. section: Library +Also in runpy and the "-m" option, omit the irrelevant message ". . . is a +package and cannot be directly executed" if the package could not even be +initialized (e.g. due to a bad ``*.pyc`` file). +.. +.. bpo: 25177 +.. date: 9527 +.. nonce: aNR4Ha +.. section: Library +Fixed problem with the mean of very small and very large numbers. As a side +effect, statistics.mean and statistics.variance should be significantly +faster. +.. +.. bpo: 25718 +.. date: 9526 +.. nonce: D9mHZF +.. section: Library +Fixed copying object with state with boolean value is false. +.. +.. bpo: 10131 +.. date: 9525 +.. nonce: a7tptz +.. section: Library +Fixed deep copying of minidom documents. Based on patch by Marian Ganisin. +.. +.. bpo: 25725 +.. date: 9524 +.. nonce: XIKv3R +.. section: Library +Fixed a reference leak in pickle.loads() when unpickling invalid data +including tuple instructions. +.. +.. bpo: 25663 +.. date: 9523 +.. nonce: Ofwfqa +.. section: Library +In the Readline completer, avoid listing duplicate global names, and search +the global namespace before searching builtins. +.. +.. bpo: 25688 +.. date: 9522 +.. nonce: 8P1HOv +.. section: Library +Fixed file leak in ElementTree.iterparse() raising an error. +.. +.. bpo: 23914 +.. date: 9521 +.. nonce: 1sEz4J +.. section: Library +Fixed SystemError raised by unpickler on broken pickle data. +.. +.. bpo: 25691 +.. date: 9520 +.. nonce: ZEaapY +.. section: Library +Fixed crash on deleting ElementTree.Element attributes. +.. +.. bpo: 25624 +.. date: 9519 +.. nonce: ed-fM0 +.. section: Library +ZipFile now always writes a ZIP_STORED header for directory entries. Patch +by Dingyuan Wang. +.. +.. bpo: 0 +.. date: 9518 +.. nonce: rtZyid +.. section: Library +Skip getaddrinfo if host is already resolved. Patch by A. Jesse Jiryu Davis. +.. +.. bpo: 26050 +.. date: 9517 +.. nonce: sclyvk +.. section: Library +Add asyncio.StreamReader.readuntil() method. Patch by Марк Коренберг. +.. +.. bpo: 25924 +.. date: 9516 +.. nonce: Uxr2vt +.. section: Library +Avoid unnecessary serialization of getaddrinfo(3) calls on OS X versions +10.5 or higher. Original patch by A. Jesse Jiryu Davis. +.. +.. bpo: 26406 +.. date: 9515 +.. nonce: ihvhF4 +.. section: Library +Avoid unnecessary serialization of getaddrinfo(3) calls on current versions +of OpenBSD and NetBSD. Patch by A. Jesse Jiryu Davis. +.. +.. bpo: 26848 +.. date: 9514 +.. nonce: ChBOpQ +.. section: Library +Fix asyncio/subprocess.communicate() to handle empty input. Patch by Jack +O'Connor. +.. +.. bpo: 27040 +.. date: 9513 +.. nonce: UASyCC +.. section: Library +Add loop.get_exception_handler method +.. +.. bpo: 27041 +.. date: 9512 +.. nonce: p3893U +.. section: Library +asyncio: Add loop.create_future method +.. +.. bpo: 27223 +.. date: 9511 +.. nonce: PRf4I6 +.. section: Library +asyncio: Fix _read_ready and _write_ready to respect _conn_lost. Patch by +Łukasz Langa. +.. +.. bpo: 22970 +.. date: 9510 +.. nonce: WhdhyM +.. section: Library +asyncio: Fix inconsistency cancelling Condition.wait. Patch by David Coles. +.. +.. bpo: 5124 +.. date: 9509 +.. nonce: 4kwBvM +.. section: IDLE +Paste with text selected now replaces the selection on X11. This matches how +paste works on Windows, Mac, most modern Linux apps, and ttk widgets. +Original patch by Serhiy Storchaka. +.. +.. bpo: 24759 +.. date: 9508 +.. nonce: ccmySu +.. section: IDLE +Make clear in idlelib.idle_test.__init__ that the directory is a private +implementation of test.test_idle and tool for maintainers. +.. +.. bpo: 27196 +.. date: 9507 +.. nonce: 3yp8TF +.. section: IDLE +Stop 'ThemeChanged' warnings when running IDLE tests. These persisted after +other warnings were suppressed in #20567. Apply Serhiy Storchaka's +update_idletasks solution to four test files. Record this additional advice +in idle_test/README.txt +.. +.. bpo: 20567 +.. date: 9506 +.. nonce: hhT32b +.. section: IDLE +Revise idle_test/README.txt with advice about avoiding tk warning messages +from tests. Apply advice to several IDLE tests. +.. +.. bpo: 27117 +.. date: 9505 +.. nonce: YrLPf4 +.. section: IDLE +Make colorizer htest and turtledemo work with dark themes. Move code for +configuring text widget colors to a new function. +.. +.. bpo: 26673 +.. date: 9504 +.. nonce: dh0_Ij +.. section: IDLE +When tk reports font size as 0, change to size 10. Such fonts on Linux +prevented the configuration dialog from opening. +.. +.. bpo: 21939 +.. date: 9503 +.. nonce: pWz-OK +.. section: IDLE +Add test for IDLE's percolator. Original patch by Saimadhav Heblikar. +.. +.. bpo: 21676 +.. date: 9502 +.. nonce: hqy6Qh +.. section: IDLE +Add test for IDLE's replace dialog. Original patch by Saimadhav Heblikar. +.. +.. bpo: 18410 +.. date: 9501 +.. nonce: DLSPZo +.. section: IDLE +Add test for IDLE's search dialog. Original patch by Westley Martínez. +.. +.. bpo: 21703 +.. date: 9500 +.. nonce: BAZfDM +.. section: IDLE +Add test for IDLE's undo delegator. Original patch by Saimadhav Heblikar . +.. +.. bpo: 27044 +.. date: 9499 +.. nonce: 4y7tyM +.. section: IDLE +Add ConfigDialog.remove_var_callbacks to stop memory leaks. +.. +.. bpo: 23977 +.. date: 9498 +.. nonce: miDjj8 +.. section: IDLE +Add more asserts to test_delegator. +.. +.. bpo: 20640 +.. date: 9497 +.. nonce: PmI-G8 +.. section: IDLE +Add tests for idlelib.configHelpSourceEdit. Patch by Saimadhav Heblikar. +.. +.. bpo: 0 +.. date: 9496 +.. nonce: _YJfG7 +.. section: IDLE +In the 'IDLE-console differences' section of the IDLE doc, clarify how +running with IDLE affects sys.modules and the standard streams. +.. +.. bpo: 25507 +.. date: 9495 +.. nonce: i8bNpk +.. section: IDLE +fix incorrect change in IOBinding that prevented printing. Augment IOBinding +htest to include all major IOBinding functions. +.. +.. bpo: 25905 +.. date: 9494 +.. nonce: FzNb3B +.. section: IDLE +Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION MARK in +README.txt and open this and NEWS.txt with 'ascii'. Re-encode CREDITS.txt to +utf-8 and open it with 'utf-8'. +.. +.. bpo: 19489 +.. date: 9493 +.. nonce: jvzuO7 +.. section: Documentation +Moved the search box from the sidebar to the header and footer of each page. +Patch by Ammar Askar. +.. +.. bpo: 24136 +.. date: 9492 +.. nonce: MUK0zK +.. section: Documentation +Document the new :pep:`448` unpacking syntax of 3.5. +.. +.. bpo: 26736 +.. date: 9491 +.. nonce: U_Hyqo +.. section: Documentation +Used HTTPS for external links in the documentation if possible. +.. +.. bpo: 6953 +.. date: 9490 +.. nonce: Zk6rno +.. section: Documentation +Rework the Readline module documentation to group related functions +together, and add more details such as what underlying Readline functions +and variables are accessed. +.. +.. bpo: 23606 +.. date: 9489 +.. nonce: 9MhIso +.. section: Documentation +Adds note to ctypes documentation regarding cdll.msvcrt. +.. +.. bpo: 25500 +.. date: 9488 +.. nonce: AV47eF +.. section: Documentation +Fix documentation to not claim that __import__ is searched for in the global +scope. +.. +.. bpo: 26014 +.. date: 9487 +.. nonce: ptdZ_I +.. section: Documentation +Update 3.x packaging documentation: * "See also" links to the new docs are +now provided in the legacy pages * links to setuptools documentation have +been updated +.. +.. bpo: 21916 +.. date: 9486 +.. nonce: muwCyp +.. section: Tests +Added tests for the turtle module. Patch by ingrid, Gregory Loyse and Jelle +Zijlstra. +.. +.. bpo: 26523 +.. date: 9485 +.. nonce: em_Uzt +.. section: Tests +The multiprocessing thread pool (multiprocessing.dummy.Pool) was untested. +.. +.. bpo: 26015 +.. date: 9484 +.. nonce: p3oWK3 +.. section: Tests +Added new tests for pickling iterators of mutable sequences. +.. +.. bpo: 26325 +.. date: 9483 +.. nonce: KOUc82 +.. section: Tests +Added test.support.check_no_resource_warning() to check that no +ResourceWarning is emitted. +.. +.. bpo: 25940 +.. date: 9482 +.. nonce: PgiLVN +.. section: Tests +Changed test_ssl to use self-signed.pythontest.net. This avoids relying on +svn.python.org, which recently changed root certificate. +.. +.. bpo: 25616 +.. date: 9481 +.. nonce: Qr-60p +.. section: Tests +Tests for OrderedDict are extracted from test_collections into separate file +test_ordered_dict. +.. +.. bpo: 26583 +.. date: 9480 +.. nonce: Up7hTl +.. section: Tests +Skip test_timestamp_overflow in test_import if bytecode files cannot be +written. +.. +.. bpo: 26884 +.. date: 9479 +.. nonce: O8-azL +.. section: Build +Fix linking extension modules for cross builds. Patch by Xavier de Gaye. +.. +.. bpo: 22359 +.. date: 9478 +.. nonce: HDjM4s +.. section: Build +Disable the rules for running _freeze_importlib and pgen when +cross-compiling. The output of these programs is normally saved with the +source code anyway, and is still regenerated when doing a native build. +Patch by Xavier de Gaye. +.. +.. bpo: 27229 +.. date: 9477 +.. nonce: C2NDch +.. section: Build +Fix the cross-compiling pgen rule for in-tree builds. Patch by Xavier de +Gaye. +.. +.. bpo: 21668 +.. date: 9476 +.. nonce: 4sMAa1 +.. section: Build +Link audioop, _datetime, _ctypes_test modules to libm, except on Mac OS X. +Patch written by Xavier de Gaye. +.. +.. bpo: 25702 +.. date: 9475 +.. nonce: ipxyJs +.. section: Build +A --with-lto configure option has been added that will enable link time +optimizations at build time during a make profile-opt. Some compilers and +toolchains are known to not produce stable code when using LTO, be sure to +test things thoroughly before relying on it. It can provide a few % speed up +over profile-opt alone. +.. +.. bpo: 26624 +.. date: 9474 +.. nonce: 4fGrTl +.. section: Build +Adds validation of ucrtbase[d].dll version with warning for old versions. +.. +.. bpo: 17603 +.. date: 9473 +.. nonce: 102DA- +.. section: Build +Avoid error about nonexistent fileblocks.o file by using a lower-level check +for st_blocks in struct stat. +.. +.. bpo: 26079 +.. date: 9472 +.. nonce: mEzW0O +.. section: Build +Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern Thiel. +.. +.. bpo: 26465 +.. date: 9471 +.. nonce: _YR608 +.. section: Build +Update Windows builds to use OpenSSL 1.0.2g. +.. +.. bpo: 24421 +.. date: 9470 +.. nonce: 2zY7vM +.. section: Build +Compile Modules/_math.c once, before building extensions. Previously it +could fail to compile properly if the math and cmath builds were concurrent. +.. +.. bpo: 25348 +.. date: 9469 +.. nonce: u6_BaQ +.. section: Build +Added ``--pgo`` and ``--pgo-job`` arguments to ``PCbuild\build.bat`` for +building with Profile-Guided Optimization. The old +``PCbuild\build_pgo.bat`` script is now deprecated, and simply calls +``PCbuild\build.bat --pgo %*``. +.. +.. bpo: 25827 +.. date: 9468 +.. nonce: yg3DMM +.. section: Build +Add support for building with ICC to ``configure``, including a new +``--with-icc`` flag. +.. +.. bpo: 25696 +.. date: 9467 +.. nonce: 2R_wIv +.. section: Build +Fix installation of Python on UNIX with make -j9. +.. +.. bpo: 26930 +.. date: 9466 +.. nonce: Sqz2O3 +.. section: Build +Update OS X 10.5+ 32-bit-only installer to build and link with OpenSSL +1.0.2h. +.. +.. bpo: 26268 +.. date: 9465 +.. nonce: I3-YLh +.. section: Build +Update Windows builds to use OpenSSL 1.0.2f. +.. +.. bpo: 25136 +.. date: 9464 +.. nonce: Vi-fmO +.. section: Build +Support Apple Xcode 7's new textual SDK stub libraries. +.. +.. bpo: 24324 +.. date: 9463 +.. nonce: m6DZMx +.. section: Build +Do not enable unreachable code warnings when using gcc as the option does +not work correctly in older versions of gcc and has been silently removed as +of gcc-4.5. +.. +.. bpo: 27053 +.. date: 9462 +.. nonce: 1IRbae +.. section: Windows +Updates make_zip.py to correctly generate library ZIP file. +.. +.. bpo: 26268 +.. date: 9461 +.. nonce: Z-lJEh +.. section: Windows +Update the prepare_ssl.py script to handle OpenSSL releases that don't +include the contents of the include directory (that is, 1.0.2e and later). +.. +.. bpo: 26071 +.. date: 9460 +.. nonce: wLxL2l +.. section: Windows +bdist_wininst created binaries fail to start and find 32bit Python +.. +.. bpo: 26073 +.. date: 9459 +.. nonce: XwWgHp +.. section: Windows +Update the list of magic numbers in launcher +.. +.. bpo: 26065 +.. date: 9458 +.. nonce: SkVLJp +.. section: Windows +Excludes venv from library when generating embeddable distro. +.. +.. bpo: 17500 +.. date: 9453 +.. nonce: QTZbRV +.. section: Windows +Remove unused and outdated icons. (See also: +https://github.com/python/pythondotorg/issues/945) +.. +.. bpo: 26799 +.. date: 9457 +.. nonce: gK2VXX +.. section: Tools/Demos +Fix python-gdb.py: don't get C types once when the Python code is loaded, +but get C types on demand. The C types can change if python-gdb.py is loaded +before the Python executable. Patch written by Thomas Ilsche. +.. +.. bpo: 26271 +.. date: 9456 +.. nonce: wg-rzr +.. section: Tools/Demos +Fix the Freeze tool to properly use flags passed through configure. Patch by +Daniel Shaulov. +.. +.. bpo: 26489 +.. date: 9455 +.. nonce: rJ_U5S +.. section: Tools/Demos +Add dictionary unpacking support to Tools/parser/unparse.py. Patch by Guo Ci +Teo. +.. +.. bpo: 26316 +.. date: 9454 +.. nonce: QJvVOi +.. section: Tools/Demos +Fix variable name typo in Argument Clinic. + +.. date: 2023-02-17-10-42-48 +.. gh-issue: 99108 +.. nonce: MKA8-f +.. release date: 2023-03-07 +.. section: Security +Replace builtin hashlib implementations of MD5 and SHA1 with verified ones +from the HACL* project. +.. +.. date: 2023-02-08-22-03-04 +.. gh-issue: 101727 +.. nonce: 9P5eZz +.. section: Security +Updated the OpenSSL version used in Windows and macOS binary release builds +to 1.1.1t to address :cve:`2023-0286`, :cve:`2022-4303`, and :cve:`2022-4303` per +`the OpenSSL 2023-02-07 security advisory +`_. +.. +.. date: 2023-02-08-12-57-35 +.. gh-issue: 99108 +.. nonce: 6tnmhA +.. section: Security +Replace the builtin :mod:`hashlib` implementations of SHA2-384 and SHA2-512 +originally from LibTomCrypt with formally verified, side-channel resistant +code from the `HACL* `_ project. +The builtins remain a fallback only used when OpenSSL does not provide them. +.. +.. date: 2023-01-24-16-12-00 +.. gh-issue: 101283 +.. nonce: 9tqu39 +.. section: Security +:class:`subprocess.Popen` now uses a safer approach to find ``cmd.exe`` when +launching with ``shell=True``. Patch by Eryk Sun, based on a patch by Oleg +Iarygin. +.. +.. date: 2023-03-07-16-56-28 +.. gh-issue: 102493 +.. nonce: gTXrcD +.. section: Core and Builtins +Fix regression in semantics of normalisation in ``PyErr_SetObject``. +.. +.. date: 2023-03-06-13-05-33 +.. gh-issue: 102416 +.. nonce: dz6K5f +.. section: Core and Builtins +Do not memoize incorrectly automatically generated loop rules in the parser. +Patch by Pablo Galindo. +.. +.. date: 2023-03-04-20-56-12 +.. gh-issue: 102356 +.. nonce: 07KvUd +.. section: Core and Builtins +Fix a bug that caused a crash when deallocating deeply nested filter +objects. Patch by Marta Gómez Macías. +.. +.. date: 2023-02-28-21-17-03 +.. gh-issue: 102336 +.. nonce: -wL3Tm +.. section: Core and Builtins +Cleanup Windows 7 specific special handling. Patch by Max Bachmann. +.. +.. date: 2023-02-26-23-10-32 +.. gh-issue: 102250 +.. nonce: 7MUKoC +.. section: Core and Builtins +Fixed a segfault occurring when the interpreter calls a ``__bool__`` method +that raises. +.. +.. date: 2023-02-24-17-59-39 +.. gh-issue: 102126 +.. nonce: HTT8Vc +.. section: Core and Builtins +Fix deadlock at shutdown when clearing thread states if any finalizer tries +to acquire the runtime head lock. Patch by Kumar Aditya. +.. +.. date: 2023-02-22-15-15-32 +.. gh-issue: 102027 +.. nonce: Km4G-d +.. section: Core and Builtins +Use ``GetCurrentProcessId`` on Windows when ``getpid`` is unavailable. Patch +by Max Bachmann. +.. +.. date: 2023-02-20-15-18-33 +.. gh-issue: 102056 +.. nonce: uHKuwH +.. section: Core and Builtins +Fix error handling bugs in interpreter's exception printing code, which +could cause a crash on infinite recursion. +.. +.. date: 2023-02-17-10-12-13 +.. gh-issue: 100982 +.. nonce: mJGJQw +.. section: Core and Builtins +Restrict the scope of the :opcode:`FOR_ITER_RANGE` instruction to the scope +of the original :opcode:`FOR_ITER` instruction, to allow instrumentation. +.. +.. date: 2023-02-16-23-19-01 +.. gh-issue: 101967 +.. nonce: Kqr1dz +.. section: Core and Builtins +Fix possible segfault in ``positional_only_passed_as_keyword`` function, +when new list created. +.. +.. date: 2023-02-16-16-57-23 +.. gh-issue: 101952 +.. nonce: Zo1dlq +.. section: Core and Builtins +Fix possible segfault in ``BUILD_SET`` opcode, when new set created. +.. +.. date: 2023-02-13-22-21-58 +.. gh-issue: 74895 +.. nonce: esMNtq +.. section: Core and Builtins +:mod:`socket.getaddrinfo` no longer raises :class:`OverflowError` for +:class:`int` **port** values outside of the C long range. Out of range +values are left up to the underlying string based C library API to report. A +:class:`socket.gaierror` ``SAI_SERVICE`` may occur instead, or no error at +all as not all platform C libraries generate an error. +.. +.. date: 2023-02-13-18-21-14 +.. gh-issue: 101799 +.. nonce: wpHbCn +.. section: Core and Builtins +Add :opcode:`CALL_INTRINSIC_2` and use it instead of +:opcode:`!PREP_RERAISE_STAR`. +.. +.. date: 2023-02-12-22-40-22 +.. gh-issue: 101857 +.. nonce: _bribG +.. section: Core and Builtins +Fix xattr support detection on Linux systems by widening the check to linux, +not just glibc. This fixes support for musl. +.. +.. date: 2023-02-11-23-14-06 +.. gh-issue: 84783 +.. nonce: _P5sMa +.. section: Core and Builtins +Make the slice object hashable. Patch by Will Bradshaw and Furkan Onder. +.. +.. date: 2023-02-10-15-54-57 +.. gh-issue: 87849 +.. nonce: IUVvPz +.. section: Core and Builtins +Change the ``SEND`` instruction to leave the receiver on the stack. This +allows the specialized form of ``SEND`` to skip the chain of C calls and +jump directly to the ``RESUME`` in the generator or coroutine. +.. +.. date: 2023-02-10-07-21-47 +.. gh-issue: 101765 +.. nonce: MO5LlC +.. section: Core and Builtins +Fix SystemError / segmentation fault in iter ``__reduce__`` when internal +access of ``builtins.__dict__`` keys mutates the iter object. +.. +.. date: 2023-02-10-01-15-57 +.. gh-issue: 101430 +.. nonce: T3Gegb +.. section: Core and Builtins +Update :mod:`tracemalloc` to handle presize of object properly. Patch by +Donghee Na. +.. +.. date: 2023-02-08-17-13-31 +.. gh-issue: 101696 +.. nonce: seJhTt +.. section: Core and Builtins +Invalidate type version tag in ``_PyStaticType_Dealloc`` for static types, +avoiding bug where a false cache hit could crash the interpreter. Patch by +Kumar Aditya. +.. +.. date: 2023-02-07-14-56-43 +.. gh-issue: 101632 +.. nonce: Fd1yxk +.. section: Core and Builtins +Adds a new :opcode:`RETURN_CONST` instruction. +.. +.. date: 2023-01-04-12-49-33 +.. gh-issue: 100719 +.. nonce: uRPccL +.. section: Core and Builtins +Remove gi_code field from generator (and coroutine and async generator) +objects as it is redundant. The frame already includes a reference to the +code object. +.. +.. date: 2022-11-02-20-23-47 +.. gh-issue: 98627 +.. nonce: VJkdRM +.. section: Core and Builtins +When an interpreter is configured to check (and only then), importing an +extension module will now fail when the extension does not support multiple +interpreters (i.e. doesn't implement PEP 489 multi-phase init). This does +not apply to the main interpreter, nor to subinterpreters created with +``Py_NewInterpreter()``. +.. +.. date: 2023-03-04-14-46-47 +.. gh-issue: 102302 +.. nonce: -b_s6Z +.. section: Library +Micro-optimise hashing of :class:`inspect.Parameter`, reducing the time it +takes to hash an instance by around 40%. +.. +.. date: 2023-02-28-09-52-25 +.. gh-issue: 101979 +.. nonce: or3hXV +.. section: Library +Fix a bug where parentheses in the ``metavar`` argument to +:meth:`argparse.ArgumentParser.add_argument` were dropped. Patch by Yeojin +Kim. +.. +.. date: 2023-02-26-12-37-17 +.. gh-issue: 91038 +.. nonce: S4rFH_ +.. section: Library +:meth:`platform.platform` now has boolean default arguments. +.. +.. date: 2023-02-23-20-39-52 +.. gh-issue: 81652 +.. nonce: Vxz0Mr +.. section: Library +Add :const:`mmap.MAP_ALIGNED_SUPER` FreeBSD and :const:`mmap.MAP_CONCEAL` +OpenBSD constants to :mod:`mmap`. Patch by Yeojin Kim. +.. +.. date: 2023-02-23-15-06-01 +.. gh-issue: 102179 +.. nonce: P6KQ4c +.. section: Library +Fix :func:`os.dup2` error message for negative fds. +.. +.. date: 2023-02-21-10-05-33 +.. gh-issue: 101961 +.. nonce: 7e56jh +.. section: Library +For the binary mode, :func:`fileinput.hookcompressed` doesn't set the +``encoding`` value even if the value is ``None``. Patch by Gihwan Kim. +.. +.. date: 2023-02-21-07-15-41 +.. gh-issue: 101936 +.. nonce: QVOxHH +.. section: Library +The default value of ``fp`` becomes :class:`io.BytesIO` if +:exc:`~urllib.error.HTTPError` is initialized without a designated ``fp`` +parameter. Patch by Long Vo. +.. +.. date: 2023-02-17-20-24-15 +.. gh-issue: 101566 +.. nonce: FjgWBt +.. section: Library +In zipfile, sync Path with `zipp 3.14 +`_, including +fix for extractall on the underlying zipfile after being wrapped in +``Path``. +.. +.. date: 2023-02-17-19-00-58 +.. gh-issue: 97930 +.. nonce: C_nQjb +.. section: Library +Apply changes from `importlib_resources 5.12 +`_, +including fix for ``MultiplexedPath`` to support directories in multiple +namespaces (python/importlib_resources#265). +.. +.. date: 2023-02-17-18-44-27 +.. gh-issue: 101997 +.. nonce: A6_blD +.. section: Library +Upgrade pip wheel bundled with ensurepip (pip 23.0.1) +.. +.. date: 2023-02-15-01-54-06 +.. gh-issue: 99108 +.. nonce: rjTSic +.. section: Library +The built-in extension modules for :mod:`hashlib` SHA2 algorithms, used when +OpenSSL does not provide them, now live in a single internal ``_sha2`` +module instead of separate ``_sha256`` and ``_sha512`` modules. +.. +.. date: 2023-02-14-09-08-48 +.. gh-issue: 101892 +.. nonce: FMos8l +.. section: Library +Callable iterators no longer raise :class:`SystemError` when the callable +object exhausts the iterator but forgets to either return a sentinel value +or raise :class:`StopIteration`. +.. +.. date: 2023-02-13-12-55-48 +.. gh-issue: 87634 +.. nonce: q-SBhJ +.. section: Library +Remove locking behavior from :func:`functools.cached_property`. +.. +.. date: 2023-02-11-13-23-29 +.. gh-issue: 97786 +.. nonce: QjvQ1B +.. section: Library +Fix potential undefined behaviour in corner cases of floating-point-to-time +conversions. +.. +.. date: 2023-02-10-16-02-29 +.. gh-issue: 101517 +.. nonce: r7S2u8 +.. section: Library +Fixed bug where :mod:`bdb` looks up the source line with :mod:`linecache` +with a ``lineno=None``, which causes it to fail with an unhandled exception. +.. +.. date: 2023-02-10-11-59-13 +.. gh-issue: 101773 +.. nonce: J_kI7y +.. section: Library +Optimize :class:`fractions.Fraction` for small components. The private +argument ``_normalize`` of the :class:`fractions.Fraction` constructor has +been removed. +.. +.. date: 2023-02-08-18-20-58 +.. gh-issue: 101693 +.. nonce: 4_LPXj +.. section: Library +In :meth:`sqlite3.Cursor.execute`, :exc:`DeprecationWarning` is now emitted +when :ref:`named placeholders ` are used together with +parameters supplied as a :term:`sequence` instead of as a :class:`dict`. +Starting from Python 3.14, using named placeholders with parameters supplied +as a sequence will raise a :exc:`~sqlite3.ProgrammingError`. Patch by Erlend +E. Aasland. +.. +.. date: 2023-02-07-22-21-46 +.. gh-issue: 101446 +.. nonce: -c0FdK +.. section: Library +Change repr of :class:`collections.OrderedDict` to use regular dictionary +formatting instead of pairs of keys and values. +.. +.. date: 2023-02-07-22-20-32 +.. gh-issue: 101362 +.. nonce: Jlk6mt +.. section: Library +Speed up :class:`pathlib.PurePath` construction by handling arguments more +uniformly. When a :class:`pathlib.Path` argument is supplied, we use its +string representation rather than joining its parts with +:func:`os.path.join`. +.. +.. date: 2023-02-07-21-16-41 +.. gh-issue: 101362 +.. nonce: KMQllM +.. section: Library +Speed up :class:`pathlib.PurePath` construction by calling +:func:`os.path.join` only when two or more arguments are given. +.. +.. date: 2023-02-07-20-46-08 +.. gh-issue: 101362 +.. nonce: 2ckZ6R +.. section: Library +Speed up :class:`pathlib.Path` construction by running the path flavour +compatibility check only when pathlib is imported. +.. +.. date: 2023-02-05-21-40-15 +.. gh-issue: 85984 +.. nonce: Kfzbb2 +.. section: Library +Refactored the implementation of :func:`pty.fork` to use +:func:`os.login_tty`. +A :exc:`DeprecationWarning` is now raised by ``pty.master_open()`` and +``pty.slave_open()``. They were undocumented and deprecated long long ago in +the docstring in favor of :func:`pty.openpty`. +.. +.. date: 2023-02-04-16-35-46 +.. gh-issue: 101561 +.. nonce: Xo6pIZ +.. section: Library +Add a new decorator :func:`typing.override`. See :pep:`698` for details. +Patch by Steven Troxler. +.. +.. date: 2023-02-01-10-42-16 +.. gh-issue: 63301 +.. nonce: XNxSFh +.. section: Library +Set exit code when :mod:`tabnanny` CLI exits on error. +.. +.. date: 2023-01-27-02-53-50 +.. gh-issue: 101360 +.. nonce: bPB7SL +.. section: Library +Fix anchor matching in :meth:`pathlib.PureWindowsPath.match`. Path and +pattern anchors are now matched with :mod:`fnmatch`, just like other path +parts. This allows patterns such as ``"*:/Users/*"`` to be matched. +.. +.. date: 2023-01-25-00-14-52 +.. gh-issue: 101277 +.. nonce: FceHX7 +.. section: Library +Remove global state from :mod:`itertools` module (:pep:`687`). Patches by +Erlend E. Aasland. +.. +.. date: 2023-01-06-21-14-41 +.. gh-issue: 100809 +.. nonce: I697UT +.. section: Library +Fix handling of drive-relative paths (like 'C:' and 'C:foo') in +:meth:`pathlib.Path.absolute`. This method now uses the OS API to retrieve +the correct current working directory for the drive. +.. +.. date: 2023-01-02-22-41-44 +.. gh-issue: 99138 +.. nonce: 17hp9U +.. section: Library +Apply :pep:`687` to :mod:`zoneinfo`. Patch by Erlend E. Aasland. +.. +.. date: 2022-10-22-09-26-43 +.. gh-issue: 96764 +.. nonce: Dh9Y5L +.. section: Library +:func:`asyncio.wait_for` now uses :func:`asyncio.timeout` as its underlying +implementation. Patch by Kumar Aditya. +.. +.. date: 2022-09-05-12-17-34 +.. gh-issue: 88233 +.. nonce: gff9qJ +.. section: Library +Correctly preserve "extra" fields in ``zipfile`` regardless of their +ordering relative to a zip64 "extra." +.. +.. bpo: 23224 +.. date: 2018-06-20-09-12-21 +.. nonce: zxCQ13 +.. section: Library +Fix segfaults when creating :class:`lzma.LZMADecompressor` and +:class:`bz2.BZ2Decompressor` objects without calling ``__init__()``, and fix +leakage of locks and internal buffers when calling the ``__init__()`` +methods of :class:`lzma.LZMADecompressor`, :class:`lzma.LZMACompressor`, +:class:`bz2.BZ2Compressor`, and :class:`bz2.BZ2Decompressor` objects +multiple times. +.. +.. date: 2023-02-19-10-33-01 +.. gh-issue: 85417 +.. nonce: kYO8u3 +.. section: Documentation +Update :mod:`cmath` documentation to clarify behaviour on branch cuts. +.. +.. date: 2023-02-07-21-43-24 +.. gh-issue: 97725 +.. nonce: cuY7Cd +.. section: Documentation +Fix :meth:`asyncio.Task.print_stack` description for ``file=None``. Patch by +Oleg Iarygin. +.. +.. date: 2023-02-18-10-51-02 +.. gh-issue: 102019 +.. nonce: 0797SJ +.. section: Tests +Fix deadlock on shutdown if ``test_current_{exception,frames}`` fails. Patch +by Jacob Bower. +.. +.. date: 2023-02-11-22-36-10 +.. gh-issue: 85984 +.. nonce: EVXjT9 +.. section: Tests +Utilize new "winsize" functions from termios in pty tests. +.. +.. date: 2023-02-11-20-28-08 +.. gh-issue: 89792 +.. nonce: S-Y5BZ +.. section: Tests +``test_tools`` now copies up to 10x less source data to a temporary +directory during the ``freeze`` test by ignoring git metadata and other +artifacts. It also limits its python build parallelism based on +os.cpu_count instead of hard coding it as 8 cores. +.. +.. date: 2023-01-12-00-49-16 +.. gh-issue: 99942 +.. nonce: DUR8b4 +.. section: Build +On Android, in a static build, python-config in embed mode no longer +incorrectly reports a library to link to. +.. +.. date: 2022-12-20-01-06-17 +.. gh-issue: 99942 +.. nonce: lbmzYj +.. section: Build +On Android, python.pc now correctly reports the library to link to, the same +as python-config.sh. +.. +.. date: 2022-12-18-08-33-28 +.. gh-issue: 100221 +.. nonce: K94Ct3 +.. section: Build +Fix creating install directories in ``make sharedinstall`` if they exist +outside ``DESTDIR`` already. +.. +.. date: 2022-09-14-10-38-15 +.. gh-issue: 96821 +.. nonce: Zk2a9c +.. section: Build +Explicitly mark C extension modules that need defined signed integer +overflow, and add a configure option :option:`--with-strict-overflow`. Patch +by Matthias Görgens and Shantanu Jain. +.. +.. date: 2023-03-01-01-36-39 +.. gh-issue: 102344 +.. nonce: Dgfux4 +.. section: Windows +Implement ``winreg.QueryValue`` using ``QueryValueEx`` and +``winreg.SetValue`` using ``SetValueEx``. Patch by Max Bachmann. +.. +.. date: 2023-02-15-11-08-10 +.. gh-issue: 101881 +.. nonce: fScr3m +.. section: Windows +Handle read and write operations on non-blocking pipes properly on Windows. +.. +.. date: 2023-02-13-18-05-49 +.. gh-issue: 101881 +.. nonce: _TnHzN +.. section: Windows +Add support for the os.get_blocking() and os.set_blocking() functions on +Windows. +.. +.. date: 2023-02-13-16-32-50 +.. gh-issue: 101849 +.. nonce: 7lm_53 +.. section: Windows +Ensures installer will correctly upgrade existing ``py.exe`` launcher +installs. +.. +.. date: 2023-02-10-14-26-05 +.. gh-issue: 101763 +.. nonce: RPaj7r +.. section: Windows +Updates copy of libffi bundled with Windows installs to 3.4.4. +.. +.. date: 2023-02-09-22-09-27 +.. gh-issue: 101759 +.. nonce: zFlqSH +.. section: Windows +Update Windows installer to SQLite 3.40.1. +.. +.. date: 2023-02-07-18-22-54 +.. gh-issue: 101614 +.. nonce: NjVP0n +.. section: Windows +Correctly handle extensions built against debug binaries that reference +``python3_d.dll``. +.. +.. date: 2023-01-25-11-33-54 +.. gh-issue: 101196 +.. nonce: wAX_2g +.. section: Windows +The functions ``os.path.isdir``, ``os.path.isfile``, ``os.path.islink`` and +``os.path.exists`` are now 13% to 28% faster on Windows, by making fewer +Win32 API calls. +.. +.. date: 2023-02-09-22-07-17 +.. gh-issue: 101759 +.. nonce: B0JP2H +.. section: macOS +Update macOS installer to SQLite 3.40.1. +.. +.. date: 2023-02-14-15-53-01 +.. gh-issue: 101907 +.. nonce: HgF1N2 +.. section: C API +Removes use of non-standard C++ extension in public header files. +.. +.. date: 2023-02-09-10-38-20 +.. gh-issue: 99293 +.. nonce: mFqfpp +.. section: C API +Document that the Py_TPFLAGS_VALID_VERSION_TAG is an internal feature, +should not be used, and will be removed. +.. +.. date: 2023-02-06-16-14-30 +.. gh-issue: 101578 +.. nonce: PW5fA9 +.. section: C API +Add :c:func:`PyErr_GetRaisedException` and +:c:func:`PyErr_SetRaisedException` for saving and restoring the current +exception. These functions return and accept a single exception object, +rather than the triple arguments of the now-deprecated :c:func:`PyErr_Fetch` +and :c:func:`PyErr_Restore`. This is less error prone and a bit more +efficient. +Add :c:func:`PyException_GetArgs` and :c:func:`PyException_SetArgs` as +convenience functions for retrieving and modifying the +:attr:`~BaseException.args` passed to the exception's constructor. +.. +.. date: 2022-04-21-17-25-22 +.. gh-issue: 91744 +.. nonce: FgvaMi +.. section: C API +Introduced the *Unstable C API tier*, marking APi that is allowed to change +in minor releases without a deprecation period. See :pep:`689` for details. + +.. bpo: 45716 +.. date: 2021-11-04-20-19-07 +.. nonce: 5C0pA1 +.. release date: 2021-11-05 +.. section: Core and Builtins +Improve the :exc:`SyntaxError` message when using ``True``, ``None`` or +``False`` as keywords in a function call. Patch by Pablo Galindo. +.. +.. bpo: 45688 +.. date: 2021-11-02-09-27-46 +.. nonce: v5Der1 +.. section: Core and Builtins +:data:`sys.stdlib_module_names` now contains the macOS-specific module +:mod:`!_scproxy`. +.. +.. bpo: 45379 +.. date: 2021-10-23-13-49-00 +.. nonce: ZF7G3n +.. section: Core and Builtins +Clarify :exc:`ImportError` message when we try to explicitly import a frozen +module but frozen modules are disabled. +.. +.. bpo: 44525 +.. date: 2021-10-20-11-57-31 +.. nonce: veL4lJ +.. section: Core and Builtins +Specialize simple calls to Python functions (no starargs, keyword dict, or +closure) +.. +.. bpo: 45530 +.. date: 2021-10-20-01-28-26 +.. nonce: 5r7n4m +.. section: Core and Builtins +Cases of sorting using tuples as keys may now be significantly faster in +some cases. Patch by Tim Peters. +The order of the result may differ from earlier releases if the tuple +elements don't define a total ordering (see +:ref:`expressions-value-comparisons` for information on total ordering). +It's generally true that the result of sorting simply isn't well-defined in +the absence of a total ordering on list elements. +.. +.. bpo: 45526 +.. date: 2021-10-19-10-29-47 +.. nonce: WQnvW9 +.. section: Core and Builtins +In obmalloc, set ADDRESS_BITS to not ignore any bits (ignored 16 before). +That is safer in the case that the kernel gives user-space virtual addresses +that span a range greater than 48 bits. +.. +.. bpo: 30570 +.. date: 2021-10-19-01-04-08 +.. nonce: _G30Ms +.. section: Core and Builtins +Fixed a crash in ``issubclass()`` from infinite recursion when searching +pathological ``__bases__`` tuples. +.. +.. bpo: 45521 +.. date: 2021-10-18-22-40-33 +.. nonce: GdMiuW +.. section: Core and Builtins +Fix a bug in the obmalloc radix tree code. On 64-bit machines, the bug +causes the tree to hold 46-bits of virtual addresses, rather than the +intended 48-bits. +.. +.. bpo: 45494 +.. date: 2021-10-16-17-27-48 +.. nonce: vMt1g4 +.. section: Core and Builtins +Fix parser crash when reporting errors involving invalid continuation +characters. Patch by Pablo Galindo. +.. +.. bpo: 45445 +.. date: 2021-10-12-14-41-39 +.. nonce: _F5cMf +.. section: Core and Builtins +Python now fails to initialize if it finds an invalid :option:`-X` option in +the command line. Patch by Pablo Galindo. +.. +.. bpo: 45340 +.. date: 2021-10-08-09-47-38 +.. nonce: ukHgDb +.. section: Core and Builtins +Object attributes are held in an array instead of a dictionary. An object's +dictionary are created lazily, only when needed. Reduces the memory +consumption of a typical Python object by about 30%. Patch by Mark Shannon. +.. +.. bpo: 45408 +.. date: 2021-10-07-21-26-44 +.. nonce: qUqzcd +.. section: Core and Builtins +Fix a crash in the parser when reporting tokenizer errors that occur at the +same time unclosed parentheses are detected. Patch by Pablo Galindo. +.. +.. bpo: 29410 +.. date: 2021-10-07-19-09-12 +.. nonce: bg5SYp +.. section: Core and Builtins +Add SipHash13 for string hash algorithm and use it by default. +.. +.. bpo: 45385 +.. date: 2021-10-06-21-20-11 +.. nonce: CTUT8s +.. section: Core and Builtins +Fix reference leak from descr_check. Patch by Donghee Na. +.. +.. bpo: 45367 +.. date: 2021-10-05-03-49-07 +.. nonce: _astoU +.. section: Core and Builtins +Specialized the ``BINARY_MULTIPLY`` opcode to ``BINARY_MULTIPLY_INT`` and +``BINARY_MULTIPLY_FLOAT`` using the PEP 659 machinery. +.. +.. bpo: 21736 +.. date: 2021-10-01-09-21-02 +.. nonce: RI47BU +.. section: Core and Builtins +Frozen stdlib modules now have ``__file__`` to the .py file they would +otherwise be loaded from, if possible. For packages, ``__path__`` now has +the correct entry instead of being an empty list, which allows unfrozen +submodules to be imported. These are set only if the stdlib directory is +known when the runtime is initialized. Note that the file at ``__file__`` +is not guaranteed to exist. None of this affects non-stdlib frozen modules +nor, for now, frozen modules imported using +``PyImport_ImportFrozenModule()``. Also, at the moment ``co_filename`` is +not updated for the module. +.. +.. bpo: 45020 +.. date: 2021-10-01-09-06-54 +.. nonce: Cj5VQN +.. section: Core and Builtins +For frozen stdlib modules, record the original module name as +``module.__spec__.loader_state.origname``. If the value is different than +``module.__spec__.name`` then the module was defined as an alias in +Tools/scripts/freeze_modules.py. If it is ``None`` then the module comes +from a source file outside the stdlib. +.. +.. bpo: 45324 +.. date: 2021-09-29-12-02-39 +.. nonce: BTQElX +.. section: Core and Builtins +In FrozenImporter.find_spec(), we now preserve the information needed in +exec_module() to load the module. This change mostly impacts internal +details, rather than changing the importer's behavior. +.. +.. bpo: 45292 +.. date: 2021-09-26-18-18-50 +.. nonce: aX5HVr +.. section: Core and Builtins +Implement :pep:`654`. Add :class:`ExceptionGroup` and +:class:`BaseExceptionGroup`. Update traceback display code. +.. +.. bpo: 40116 +.. date: 2021-09-23-14-00-05 +.. nonce: KaoeFs +.. section: Core and Builtins +Change to the implementation of split dictionaries. Classes where the +instances differ either in the exact set of attributes, or in the order in +which those attributes are set, can still share keys. This should have no +observable effect on users of Python or the C-API. Patch by Mark Shannon. +.. +.. bpo: 44050 +.. date: 2021-09-08-00-30-09 +.. nonce: mFI15u +.. section: Core and Builtins +Extensions that indicate they use global state (by setting ``m_size`` to -1) +can again be used in multiple interpreters. This reverts to behavior of +Python 3.8. +.. +.. bpo: 44525 +.. date: 2021-06-28-22-23-59 +.. nonce: sSvUKG +.. section: Core and Builtins +Setup initial specialization infrastructure for the ``CALL_FUNCTION`` +opcode. Implemented initial specializations for C function calls: +* ``CALL_FUNCTION_BUILTIN_O`` for ``METH_O`` flag. +* ``CALL_FUNCTION_BUILTIN_FAST`` for ``METH_FASTCALL`` flag without keywords. +* ``CALL_FUNCTION_LEN`` for ``len(o)``. +* ``CALL_FUNCTION_ISINSTANCE`` for ``isinstance(o, t)``. +.. +.. bpo: 44511 +.. date: 2021-06-26-16-55-08 +.. nonce: k8sMvV +.. section: Core and Builtins +Improve the generated bytecode for class and mapping patterns. +.. +.. bpo: 43706 +.. date: 2021-04-03-02-44-15 +.. nonce: jjsXlT +.. section: Core and Builtins +Speed up calls to ``enumerate()`` by using the :pep:`590` ``vectorcall`` +calling convention. Patch by Donghee Na. +.. +.. bpo: 45679 +.. date: 2021-10-30-21-11-37 +.. nonce: Dq8Cpu +.. section: Library +Fix caching of multi-value :data:`typing.Literal`. ``Literal[True, 2]`` is +no longer equal to ``Literal[1, 2]``. +.. +.. bpo: 42064 +.. date: 2021-10-27-13-28-52 +.. nonce: UK4jgV +.. section: Library +Convert :mod:`sqlite3` to multi-phase initialisation (PEP 489). Patches by +Erlend E. Aasland. +.. +.. bpo: 45438 +.. date: 2021-10-27-10-05-39 +.. nonce: Xz5lGU +.. section: Library +Fix typing.Signature string representation for generic builtin types. +.. +.. bpo: 45613 +.. date: 2021-10-26-14-29-54 +.. nonce: 55Ie3c +.. section: Library +:mod:`sqlite3` now sets :attr:`sqlite3.threadsafety` based on the default +threading mode the underlying SQLite library has been compiled with. Patch +by Erlend E. Aasland. +.. +.. bpo: 45574 +.. date: 2021-10-22-23-06-33 +.. nonce: svqA84 +.. section: Library +Fix warning about ``print_escape`` being unused. +.. +.. bpo: 45581 +.. date: 2021-10-22-21-57-02 +.. nonce: rlH6ay +.. section: Library +:meth:`sqlite3.connect` now correctly raises :exc:`MemoryError` if the +underlying SQLite API signals memory error. Patch by Erlend E. Aasland. +.. +.. bpo: 45557 +.. date: 2021-10-21-16-18-51 +.. nonce: 4MQt4r +.. section: Library +:func:`pprint.pprint` now handles *underscore_numbers* correctly. +Previously it was always setting it to ``False``. +.. +.. bpo: 44019 +.. date: 2021-10-21-10-14-22 +.. nonce: Xk4Ncr +.. section: Library +Add :func:`operator.call` to ``operator.__all__``. Patch by Kreusada. +.. +.. bpo: 42174 +.. date: 2021-10-19-01-30-57 +.. nonce: O2w9bi +.. section: Library +:meth:`shutil.get_terminal_size` now falls back to sane values if the column +or line count are 0. +.. +.. bpo: 35673 +.. date: 2021-10-18-18-12-47 +.. nonce: KOkHWe +.. section: Library +Improve the introspectability of the ``__loader__`` attribute for namespace +packages. :class:`importlib.machinery.NamespaceLoader` is now public, and +implements the :class:`importlib.abc.InspectLoader` interface. +``_NamespaceLoader`` is kept for backward compatibility. +.. +.. bpo: 45515 +.. date: 2021-10-18-14-52-48 +.. nonce: aXdvm_ +.. section: Library +Add references to :mod:`zoneinfo` in the :mod:`datetime` documentation, +mostly replacing outdated references to ``dateutil.tz``. Change by Paul +Ganssle. +.. +.. bpo: 45475 +.. date: 2021-10-18-10-46-47 +.. nonce: sb9KDF +.. section: Library +Reverted optimization of iterating :class:`gzip.GzipFile`, +:class:`bz2.BZ2File`, and :class:`lzma.LZMAFile` (see bpo-43787) because it +caused regression when user iterate them without having reference of them. +Patch by Inada Naoki. +.. +.. bpo: 45489 +.. date: 2021-10-16-23-46-39 +.. nonce: QB0rhG +.. section: Library +Update :class:`~typing.ForwardRef` to support ``|`` operator. Patch by +Donghee Na. +.. +.. bpo: 42222 +.. date: 2021-10-15-11-30-11 +.. nonce: hdHyac +.. section: Library +Removed deprecated support for float arguments in *randrange()*. +.. +.. bpo: 45428 +.. date: 2021-10-14-18-04-17 +.. nonce: mM2War +.. section: Library +Fix a regression in py_compile when reading filenames from standard input. +.. +.. bpo: 45467 +.. date: 2021-10-14-13-31-19 +.. nonce: Q7Ma6A +.. section: Library +Fix incremental decoder and stream reader in the "raw-unicode-escape" codec. +Previously they failed if the escape sequence was split. +.. +.. bpo: 45461 +.. date: 2021-10-14-00-19-02 +.. nonce: 4LB_tJ +.. section: Library +Fix incremental decoder and stream reader in the "unicode-escape" codec. +Previously they failed if the escape sequence was split. +.. +.. bpo: 45239 +.. date: 2021-10-13-17-52-48 +.. nonce: 7li1_0 +.. section: Library +Fixed :func:`email.utils.parsedate_tz` crashing with +:exc:`UnboundLocalError` on certain invalid input instead of returning +``None``. Patch by Ben Hoyt. +.. +.. bpo: 45417 +.. date: 2021-10-12-20-35-06 +.. nonce: gQM-O7 +.. section: Library +Fix quadratic behaviour in the enum module: Creation of enum classes with a +lot of entries was quadratic. +.. +.. bpo: 45249 +.. date: 2021-10-10-16-14-33 +.. nonce: xqLliz +.. section: Library +Fix the behaviour of :func:`traceback.print_exc` when displaying the caret +when the ``end_offset`` in the exception is set to 0. Patch by Pablo Galindo +.. +.. bpo: 45416 +.. date: 2021-10-10-09-42-34 +.. nonce: n35O0_ +.. section: Library +Fix use of :class:`asyncio.Condition` with explicit :class:`asyncio.Lock` +objects, which was a regression due to removal of explicit loop arguments. +Patch by Joongi Kim. +.. +.. bpo: 20028 +.. date: 2021-10-10-00-25-36 +.. nonce: bPx4Z8 +.. section: Library +Empty escapechar/quotechar is not allowed when initializing +:class:`csv.Dialect`. Patch by Vajrasky Kok and Donghee Na. +.. +.. bpo: 44904 +.. date: 2021-10-09-18-42-27 +.. nonce: RlW5h8 +.. section: Library +Fix bug in the :mod:`doctest` module that caused it to fail if a docstring +included an example with a ``classmethod`` ``property``. Patch by Alex +Waygood. +.. +.. bpo: 45406 +.. date: 2021-10-08-19-24-48 +.. nonce: Qh_Mz4 +.. section: Library +Make :func:`inspect.getmodule` catch ``FileNotFoundError`` raised by +:func:`inspect.getabsfile`, and return ``None`` to indicate that the module +could not be determined. +.. +.. bpo: 45411 +.. date: 2021-10-08-11-29-29 +.. nonce: 4jR--U +.. section: Library +Add extensions for files containing subtitles - .srt & .vtt - to the +mimetypes.py module. +.. +.. bpo: 10716 +.. date: 2021-10-08-04-11-55 +.. nonce: QSRVK2 +.. section: Library +Migrated pydoc to HTML5 (without changing the look of it). Side effect is to +update xmlrpc's ``ServerHTMLDoc`` which now uses the CSS too. cgitb now +relies less on pydoc (as it can't use the CSS file). +.. +.. bpo: 27580 +.. date: 2021-10-07-21-11-48 +.. nonce: tGcBTH +.. section: Library +Add support of null characters in :mod:`csv`. +.. +.. bpo: 45262 +.. date: 2021-10-07-14-04-10 +.. nonce: HqF71Z +.. section: Library +Prevent use-after-free in asyncio. Make sure the cached running loop holder +gets cleared on dealloc to prevent use-after-free in get_running_loop +.. +.. bpo: 45386 +.. date: 2021-10-07-00-05-05 +.. nonce: q9ORpA +.. section: Library +Make :mod:`xmlrpc.client` more robust to C runtimes where the underlying C +``strftime`` function results in a ``ValueError`` when testing for year +formatting options. +.. +.. bpo: 20028 +.. date: 2021-10-03-21-14-37 +.. nonce: zBA4RK +.. section: Library +Improve error message of :class:`csv.Dialect` when initializing. Patch by +Vajrasky Kok and Donghee Na. +.. +.. bpo: 45343 +.. date: 2021-10-01-23-07-02 +.. nonce: ixmctD +.. section: Library +Update bundled pip to 21.2.4 and setuptools to 58.1.0 +.. +.. bpo: 45328 +.. date: 2021-09-30-08-22-44 +.. nonce: 8Z-Q0B +.. section: Library +Fixed :class:`http.client.HTTPConnection` to work properly in OSs that don't +support the ``TCP_NODELAY`` socket option. +.. +.. bpo: 45243 +.. date: 2021-09-20-01-25-09 +.. nonce: 0pJf0U +.. section: Library +Add :meth:`~sqlite3.Connection.setlimit` and +:meth:`~sqlite3.Connection.getlimit` to :class:`sqlite3.Connection` for +setting and getting SQLite limits by connection basis. Patch by Erlend E. +Aasland. +.. +.. bpo: 45320 +.. date: 2021-09-15-10-21-10 +.. nonce: 4qaf5x +.. section: Library +Removed from the :mod:`inspect` module: +* the ``getargspec`` function, deprecated since Python 3.0; +use :func:`inspect.signature` or :func:`inspect.getfullargspec` instead. +* the ``formatargspec`` function, deprecated since Python 3.5; +use the :func:`inspect.signature` function and :class:`Signature` object +directly. +* the undocumented ``Signature.from_builtin`` and ``Signature.from_function`` +functions, deprecated since Python 3.5; use the +:meth:`Signature.from_callable() ` method +instead. +Patch by Hugo van Kemenade. +.. +.. bpo: 45192 +.. date: 2021-09-14-15-52-47 +.. nonce: DjA-BI +.. section: Library +Fix the ``tempfile._infer_return_type`` function so that the ``dir`` +argument of the :mod:`tempfile` functions accepts an object implementing the +``os.PathLike`` protocol. +Patch by Kyungmin Lee. +.. +.. bpo: 45160 +.. date: 2021-09-11-14-47-05 +.. nonce: VzMXbW +.. section: Library +When tracing a tkinter variable used by a ttk OptionMenu, callbacks are no +longer made twice. +.. +.. bpo: 25625 +.. date: 2021-09-10-12-53-28 +.. nonce: SzcBCw +.. section: Library +Added non parallel-safe :func:`~contextlib.chdir` context manager to change +the current working directory and then restore it on exit. Simple wrapper +around :func:`~os.chdir`. +.. +.. bpo: 24139 +.. date: 2021-08-30-23-10-48 +.. nonce: e38czf +.. section: Library +Add support for SQLite extended result codes in :exc:`sqlite3.Error`. Patch +by Erlend E. Aasland. +.. +.. bpo: 24444 +.. date: 2021-08-30-00-19-23 +.. nonce: Ki4bgz +.. section: Library +Fixed an error raised in :mod:`argparse` help display when help for an +option is set to 1+ blank spaces or when *choices* arg is an empty +container. +.. +.. bpo: 44547 +.. date: 2021-08-20-10-52-40 +.. nonce: eu0iJq +.. section: Library +Implement ``Fraction.__int__``, so that a :class:`fractions.Fraction` +instance ``f`` passes an ``isinstance(f, typing.SupportsInt)`` check. +.. +.. bpo: 40321 +.. date: 2021-07-22-21-25-56 +.. nonce: gBlFmw +.. section: Library +Adds support for HTTP 308 redirects to :mod:`urllib`. See :rfc:`7538` for +details. Patch by Jochem Schulenklopper. +.. +.. bpo: 41374 +.. date: 2020-07-27-19-21-05 +.. nonce: cd-kFL +.. section: Library +Ensure that ``socket.TCP_*`` constants are exposed on Cygwin 3.1.6 and +greater. +.. +.. bpo: 35970 +.. date: 2019-02-11-19-06-10 +.. nonce: ZRvh51 +.. section: Library +Add help flag to the base64 module's command line interface. Patch +contributed by Robert Kuska. +.. +.. bpo: 45726 +.. date: 2021-11-05-12-15-24 +.. nonce: GwRr7e +.. section: Documentation +Improve documentation for :func:`functools.singledispatch` and +:class:`functools.singledispatchmethod`. +.. +.. bpo: 45680 +.. date: 2021-11-03-14-51-03 +.. nonce: 9_NTFU +.. section: Documentation +Amend the docs on ``GenericAlias`` objects to clarify that non-container +classes can also implement ``__class_getitem__``. Patch contributed by Alex +Waygood. +.. +.. bpo: 45618 +.. date: 2021-10-31-20-35-06 +.. nonce: RTcNXF +.. section: Documentation +Update Sphinx version used to build the documentation to 4.2.0. Patch by +Maciej Olko. +.. +.. bpo: 45655 +.. date: 2021-10-28-19-22-55 +.. nonce: aPYGaS +.. section: Documentation +Add a new "relevant PEPs" section to the top of the documentation for the +``typing`` module. Patch by Alex Waygood. +.. +.. bpo: 45604 +.. date: 2021-10-26-10-00-45 +.. nonce: Dm-YhV +.. section: Documentation +Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs. +.. +.. bpo: 45516 +.. date: 2021-10-22-21-57-42 +.. nonce: 7_RMEX +.. section: Documentation +Add protocol description to the :class:`importlib.abc.TraversableResources` +documentation. +.. +.. bpo: 45464 +.. date: 2021-10-20-16-26-53 +.. nonce: mOISBs +.. section: Documentation +Mention in the documentation of :ref:`Built-in Exceptions +` that inheriting from multiple exception types in a +single subclass is not recommended due to possible memory layout +incompatibility. +.. +.. bpo: 45449 +.. date: 2021-10-19-01-41-40 +.. nonce: fjHZJc +.. section: Documentation +Add note about :pep:`585` in :mod:`collections.abc`. +.. +.. bpo: 45516 +.. date: 2021-10-18-20-12-18 +.. nonce: EJh4K8 +.. section: Documentation +Add protocol description to the :class:`importlib.abc.Traversable` +documentation. +.. +.. bpo: 20692 +.. date: 2021-10-13-00-42-54 +.. nonce: K5rGtP +.. section: Documentation +Add Programming FAQ entry explaining that int literal attribute access +requires either a space after or parentheses around the literal. +.. +.. bpo: 45678 +.. date: 2021-11-04-20-03-32 +.. nonce: 1xNMjN +.. section: Tests +Add tests for scenarios in which :class:`functools.singledispatchmethod` is +stacked on top of a method that has already been wrapped by two other +decorators. Patch by Alex Waygood. +.. +.. bpo: 45578 +.. date: 2021-10-30-19-00-25 +.. nonce: bvu6X2 +.. section: Tests +Add tests for :func:`dis.distb` +.. +.. bpo: 45678 +.. date: 2021-10-30-13-12-20 +.. nonce: bKrYeS +.. section: Tests +Add tests to ensure that ``functools.singledispatchmethod`` correctly wraps +the attributes of the target function. +.. +.. bpo: 45668 +.. date: 2021-10-29-17-18-56 +.. nonce: MfAw4i +.. section: Tests +PGO tests now pass when Python is built without test extension modules. +.. +.. bpo: 45577 +.. date: 2021-10-22-19-44-13 +.. nonce: dSaNvK +.. section: Tests +Add subtests for all ``pickle`` protocols in ``test_zoneinfo``. +.. +.. bpo: 45566 +.. date: 2021-10-22-12-05-21 +.. nonce: 2gQ3ZB +.. section: Tests +Fix ``test_frozen_pickle`` in ``test_dataclasses`` to check all ``pickle`` +versions. +.. +.. bpo: 43592 +.. date: 2021-10-21-17-22-26 +.. nonce: kHRsra +.. section: Tests +:mod:`test.libregrtest` now raises the soft resource limit for the maximum +number of file descriptors when the default is too low for our test suite as +was often the case on macOS. +.. +.. bpo: 39679 +.. date: 2021-10-18-16-18-41 +.. nonce: F18qcE +.. section: Tests +Add more test cases for ``@functools.singledispatchmethod`` when combined with +``@classmethod`` or ``@staticmethod``. +.. +.. bpo: 45410 +.. date: 2021-10-08-14-03-20 +.. nonce: Ex9xe2 +.. section: Tests +When libregrtest spawns a worker process, stderr is now written into stdout +to keep messages order. Use a single pipe for stdout and stderr, rather than +two pipes. Previously, messages were out of order which made analysis of +buildbot logs harder Patch by Victor Stinner. +.. +.. bpo: 45402 +.. date: 2021-10-07-13-43-01 +.. nonce: jlQvep +.. section: Tests +Fix test_tools.test_sundry() when Python is built out of tree: fix how the +freeze_modules.py tool locates the _freeze_module program. Patch by Victor +Stinner. +.. +.. bpo: 45403 +.. date: 2021-10-07-13-27-12 +.. nonce: 7QiDvw +.. section: Tests +Fix test_sys.test_stdlib_dir() when Python is built outside the source tree: +compare normalized paths. Patch by Victor Stinner. +.. +.. bpo: 45400 +.. date: 2021-10-07-13-11-45 +.. nonce: h3iT7V +.. section: Tests +Fix test_name_error_suggestions_do_not_trigger_for_too_many_locals() of +test_exceptions if a directory name contains "a1" (like "Python-3.11.0a1"): +use a stricter regular expression. Patch by Victor Stinner. +.. +.. bpo: 10572 +.. date: 2021-01-07-01-25-38 +.. nonce: gEEZ9z +.. section: Tests +Rename :mod:`sqlite3` tests from ``test_sqlite`` to ``test_sqlite3``, and +relocate them to ``Lib/test/test_sqlite3``. Patch by Erlend E. Aasland. +.. +.. bpo: 43158 +.. date: 2021-11-01-12-51-46 +.. nonce: fghS6w +.. section: Build +``setup.py`` now uses values from configure script to build the ``_uuid`` +extension module. Configure now detects util-linux's ``libuuid``, too. +.. +.. bpo: 45666 +.. date: 2021-10-29-12-54-53 +.. nonce: w2G63u +.. section: Build +Fix warning of ``swprintf`` and ``%s`` usage in ``_testembed.c`` +.. +.. bpo: 45548 +.. date: 2021-10-28-14-47-22 +.. nonce: mdCBxB +.. section: Build +``Modules/Setup`` and ``Modules/makesetup`` have been improved. The +``Setup`` file now contains working rules for all extensions. Outdated +comments have been removed. Rules defined by ``makesetup`` track +dependencies correctly. +.. +.. bpo: 45548 +.. date: 2021-10-24-21-49-49 +.. nonce: UWx0UC +.. section: Build +The :mod:`math` and :mod:`cmath` implementation now require a C99 compatible +``libm`` and no longer ship with workarounds for missing acosh, asinh, +atanh, expm1, and log1p functions. +.. +.. bpo: 45595 +.. date: 2021-10-24-11-02-43 +.. nonce: WI_5YU +.. section: Build +``setup.py`` and ``makesetup`` now track build dependencies on all Python +header files and module specific header files. +.. +.. bpo: 45571 +.. date: 2021-10-22-15-28-29 +.. nonce: yY8NsJ +.. section: Build +``Modules/Setup`` now use ``PY_CFLAGS_NODIST`` instead of ``PY_CFLAGS`` to +compile shared modules. +.. +.. bpo: 45570 +.. date: 2021-10-22-14-45-40 +.. nonce: 61gM2A +.. section: Build +:mod:`pyexpat` and :mod:`!_elementtree` no longer define obsolete macros +``HAVE_EXPAT_CONFIG_H`` and ``USE_PYEXPAT_CAPI``. ``XML_POOR_ENTROPY`` is +now defined in ``expat_config.h``. +.. +.. bpo: 43974 +.. date: 2021-10-22-14-00-44 +.. nonce: HHZtbx +.. section: Build +``setup.py`` no longer defines ``Py_BUILD_CORE_MODULE``. Instead every +module, that uses the internal API, defines the macro. +.. +.. bpo: 45548 +.. date: 2021-10-20-17-02-56 +.. nonce: BoggEf +.. section: Build +Fill in missing entries in Modules/Setup. +.. +.. bpo: 45532 +.. date: 2021-10-20-16-07-39 +.. nonce: kyhvis +.. section: Build +Update :data:`sys.version` to use ``main`` as fallback information. Patch by +Jeong YunWon. +.. +.. bpo: 45536 +.. date: 2021-10-20-12-42-39 +.. nonce: oQNYHB +.. section: Build +The ``configure`` script now checks whether OpenSSL headers and libraries +provide required APIs. Most common APIs are verified. The check detects +outdated or missing OpenSSL. Failures do not stop configure. +.. +.. bpo: 45221 +.. date: 2021-10-18-10-25-56 +.. nonce: rnulhf +.. section: Build +Fixed regression in handling of ``LDFLAGS`` and ``CPPFLAGS`` options where +:meth:`argparse.parse_known_args` could interpret an option as one of the +built-in command line argument, for example ``-h`` for help. +.. +.. bpo: 45440 +.. date: 2021-10-12-02-13-08 +.. nonce: -zYgDb +.. section: Build +Building Python now requires a C99 ```` header file providing the +following functions: ``copysign()``, ``hypot()``, ``isfinite()``, +``isinf()``, ``isnan()``, ``round()``. Patch by Victor Stinner. +.. +.. bpo: 45405 +.. date: 2021-10-11-16-27-38 +.. nonce: iSfdW5 +.. section: Build +Prevent ``internal configure error`` when running ``configure`` with recent +versions of non-Apple clang. Patch by David Bohman. +.. +.. bpo: 45433 +.. date: 2021-10-11-16-08-37 +.. nonce: pVDkMV +.. section: Build +Avoid linking libpython with libcrypt. +.. +.. bpo: 43652 +.. date: 2021-11-04-00-41-50 +.. nonce: RnqV7I +.. section: Windows +Update Tcl/Tk to 8.6.11, actually this time. The previous update incorrectly +included 8.6.10. +.. +.. bpo: 45337 +.. date: 2021-09-30-23-17-27 +.. nonce: qg7U_h +.. section: Windows +venv now warns when the created environment may need to be accessed at a +different path, due to redirections, links or junctions. It also now +correctly installs or upgrades components when the alternate path is +required. +.. +.. bpo: 43851 +.. date: 2021-04-15-01-23-10 +.. nonce: qgU0gy +.. section: Windows +Build SQLite ``SQLITE_OMIT_AUTOINIT`` on Windows. Patch by Erlend E. +Aasland. +.. +.. bpo: 44828 +.. date: 2021-10-25-02-02-21 +.. nonce: XBdXlJ +.. section: macOS +Avoid tkinter file dialog failure on macOS 12 Monterey when using the Tk +8.6.11 provided by python.org macOS installers. Patch by Marc Culler of the +Tk project. +.. +.. bpo: 45495 +.. date: 2021-10-16-17-20-32 +.. nonce: ST8RFt +.. section: IDLE +Add context keywords 'case' and 'match' to completions list. +.. +.. bpo: 29103 +.. date: 2021-10-20-18-41-17 +.. nonce: CMRLyq +.. section: C API +:c:func:`PyType_FromSpec* ` now copies the class +name from the spec to a buffer owned by the class, so the original can be +safely deallocated. Patch by Petr Viktorin. +.. +.. bpo: 45522 +.. date: 2021-10-19-13-07-46 +.. nonce: kGAwmZ +.. section: C API +The internal freelists for frame, float, list, dict, async generators, and +context objects can now be disabled. +.. +.. bpo: 35134 +.. date: 2021-10-19-00-20-40 +.. nonce: Z0Zk_m +.. section: C API +Exclude :c:func:`!PyWeakref_GET_OBJECT` from the limited C API. It never +worked since the :c:type:`!PyWeakReference` structure is opaque in the +limited C API. +.. +.. bpo: 35081 +.. date: 2021-10-15-09-29-59 +.. nonce: 2teFD3 +.. section: C API +Move the ``interpreteridobject.h`` header file from ``Include/`` to +``Include/internal/``. It only provides private functions. Patch by Victor +Stinner. +.. +.. bpo: 35134 +.. date: 2021-10-15-00-11-51 +.. nonce: eX4zqy +.. section: C API +The non-limited API files ``cellobject.h``, ``classobject.h``, +``context.h``, ``funcobject.h``, ``genobject.h`` and ``longintrepr.h`` have +been moved to the ``Include/cpython`` directory. Moreover, the ``eval.h`` +header file was removed. These files must not be included directly, as they +are already included in ``Python.h``: :ref:`Include Files `. +If they have been included directly, consider including ``Python.h`` +instead. Patch by Victor Stinner. +.. +.. bpo: 45474 +.. date: 2021-10-14-22-16-56 +.. nonce: 1OkJQh +.. section: C API +The following items are no longer available when ``Py_LIMITED_API`` is +defined: +* :c:func:`PyMarshal_WriteLongToFile` +* :c:func:`PyMarshal_WriteObjectToFile` +* :c:func:`PyMarshal_ReadObjectFromString` +* :c:func:`PyMarshal_WriteObjectToString` +* the ``Py_MARSHAL_VERSION`` macro +These are not part of the :ref:`limited API `. +Patch by Victor Stinner. +.. +.. bpo: 45434 +.. date: 2021-10-13-14-42-46 +.. nonce: INNEEt +.. section: C API +Remove the ``pystrhex.h`` header file. It only contains private functions. C +extensions should only include the main ```` header file. Patch by +Victor Stinner. +.. +.. bpo: 45440 +.. date: 2021-10-12-02-13-41 +.. nonce: Gf94rE +.. section: C API +Remove the ``Py_FORCE_DOUBLE()`` macro. It was used by the +``Py_IS_INFINITY()`` macro. Patch by Victor Stinner. +.. +.. bpo: 45434 +.. date: 2021-10-11-23-03-49 +.. nonce: tsS8I_ +.. section: C API +```` no longer includes the header files ````, +````, ```` and ```` when the ``Py_LIMITED_API`` +macro is set to ``0x030b0000`` (Python 3.11) or higher. C extensions should +explicitly include the header files after ``#include ``. Patch by +Victor Stinner. +.. +.. bpo: 41123 +.. date: 2021-10-11-22-58-33 +.. nonce: myrlIp +.. section: C API +Remove ``Py_UNICODE_COPY()`` and ``Py_UNICODE_FILL()`` macros, deprecated +since Python 3.3. Use ``PyUnicode_CopyCharacters()`` or ``memcpy()`` +(``wchar_t*`` string), and ``PyUnicode_Fill()`` functions instead. Patch by +Victor Stinner. +.. +.. bpo: 45412 +.. date: 2021-10-08-15-54-07 +.. nonce: KHyJCT +.. section: C API +Remove the following math macros using the ``errno`` variable: +* ``Py_ADJUST_ERANGE1()`` +* ``Py_ADJUST_ERANGE2()`` +* ``Py_OVERFLOWED()`` +* ``Py_SET_ERANGE_IF_OVERFLOW()`` +* ``Py_SET_ERRNO_ON_MATH_ERROR()`` +Patch by Victor Stinner. +.. +.. bpo: 45395 +.. date: 2021-10-06-15-54-40 +.. nonce: yVhdAl +.. section: C API +Custom frozen modules (the array set to ``PyImport_FrozenModules``) are now +treated as additions, rather than replacing all the default frozen modules. +Frozen stdlib modules can still be disabled by setting the "code" field of +the custom array entry to NULL. +.. +.. bpo: 43760 +.. date: 2021-09-24-11-12-21 +.. nonce: Bfxd1- +.. section: C API +Add new :c:func:`PyThreadState_EnterTracing`, and +:c:func:`PyThreadState_LeaveTracing` functions to the limited C API to +suspend and resume tracing and profiling. Patch by Victor Stinner. +.. +.. bpo: 44220 +.. date: 2021-05-24-22-12-40 +.. nonce: H9CUGl +.. section: C API +:c:var:`PyStructSequence_UnnamedField` is added to the Stable ABI. + +.. date: 2023-01-06-02-02-11 +.. gh-issue: 100776 +.. nonce: pP8xux +.. release date: 2023-01-10 +.. section: Core and Builtins +Fix misleading default value in :func:`input`'s ``__text_signature__``. +.. +.. date: 2023-01-05-17-54-29 +.. gh-issue: 99005 +.. nonce: cmGwxv +.. section: Core and Builtins +Remove :opcode:`!UNARY_POSITIVE`, :opcode:`!ASYNC_GEN_WRAP` and +:opcode:`!LIST_TO_TUPLE`, replacing them with intrinsics. +.. +.. date: 2023-01-05-13-54-00 +.. gh-issue: 99005 +.. nonce: D7H6j4 +.. section: Core and Builtins +Add new :opcode:`CALL_INTRINSIC_1` instruction. Remove +:opcode:`IMPORT_STAR`, :opcode:`PRINT_EXPR` and +:opcode:`STOPITERATION_ERROR`, replacing them with the +:opcode:`CALL_INTRINSIC_1` instruction. +.. +.. date: 2023-01-04-16-40-55 +.. gh-issue: 100288 +.. nonce: hRSRaT +.. section: Core and Builtins +Remove the LOAD_ATTR_METHOD_WITH_DICT specialized instruction. Stats show it +is not useful. +.. +.. date: 2023-01-03-16-50-42 +.. gh-issue: 100720 +.. nonce: UhE7P- +.. section: Core and Builtins +Added ``_PyFrame_NumSlotsForCodeObject``, which returns the number of slots +needed in a frame for a given code object. +.. +.. date: 2023-01-03-16-38-18 +.. gh-issue: 100719 +.. nonce: 2C--ko +.. section: Core and Builtins +Removed the co_nplaincellvars field from the code object, as it is +redundant. +.. +.. date: 2023-01-01-15-59-48 +.. gh-issue: 100637 +.. nonce: M2n6Kg +.. section: Core and Builtins +Fix :func:`int.__sizeof__` calculation to include the 1-element ``ob_digit`` +array for ``0`` and ``False``. +.. +.. date: 2022-12-31-23-32-09 +.. gh-issue: 100649 +.. nonce: C0fY4S +.. section: Core and Builtins +Update the native_thread_id field of PyThreadState after fork. +.. +.. date: 2022-12-29-04-39-38 +.. gh-issue: 100126 +.. nonce: pfFJd- +.. section: Core and Builtins +Fix an issue where "incomplete" frames could be briefly visible to C code +while other frames are being torn down, possibly resulting in corruption or +hard crashes of the interpreter while running finalizers. +.. +.. date: 2022-12-28-15-02-53 +.. gh-issue: 87447 +.. nonce: 7-aekA +.. section: Core and Builtins +Fix :exc:`SyntaxError` on comprehension rebind checking with names that are +not actually redefined. +Now reassigning ``b`` in ``[(b := 1) for a, b.prop in some_iter]`` is +allowed. Reassigning ``a`` is still disallowed as per :pep:`572`. +.. +.. date: 2022-12-22-21-56-08 +.. gh-issue: 100268 +.. nonce: xw_phB +.. section: Core and Builtins +Add :meth:`int.is_integer` to improve duck type compatibility between +:class:`int` and :class:`float`. +.. +.. date: 2022-12-21-22-48-41 +.. gh-issue: 100425 +.. nonce: U64yLu +.. section: Core and Builtins +Improve the accuracy of ``sum()`` with compensated summation. +.. +.. date: 2022-12-20-16-14-19 +.. gh-issue: 100374 +.. nonce: YRrVHT +.. section: Library +Fix incorrect result and delay in :func:`socket.getfqdn`. Patch by Dominic +Socular. +.. +.. date: 2022-12-20-09-56-56 +.. gh-issue: 100357 +.. nonce: hPyTwY +.. section: Core and Builtins +Convert ``vars``, ``dir``, ``next``, ``getattr``, and ``iter`` to argument +clinic. +.. +.. date: 2022-12-17-19-44-57 +.. gh-issue: 100117 +.. nonce: yRWQ1y +.. section: Core and Builtins +Improve the output of :meth:`codeobject.co_lines` by emitting only one entry +for each line range. +.. +.. date: 2022-12-15-00-50-25 +.. gh-issue: 90043 +.. nonce: gyoKdx +.. section: Core and Builtins +Handle NaNs when specializing :opcode:`COMPARE_OP` for :class:`float` +values. +.. +.. date: 2022-12-13-16-05-18 +.. gh-issue: 100222 +.. nonce: OVVvYe +.. section: Core and Builtins +Redefine the ``_Py_CODEUNIT`` typedef as a union to describe its layout to +the C compiler, avoiding type punning and improving clarity. +.. +.. date: 2022-12-12-11-27-54 +.. gh-issue: 99955 +.. nonce: Ix5Rrg +.. section: Core and Builtins +Internal compiler functions (in compile.c) now consistently return -1 on +error and 0 on success. +.. +.. date: 2022-12-12-05-30-12 +.. gh-issue: 100188 +.. nonce: sGCSMR +.. section: Core and Builtins +The ``BINARY_SUBSCR_LIST_INT`` and ``BINARY_SUBSCR_TUPLE_INT`` instructions +are no longer used for negative integers because those instructions always +miss when encountering negative integers. +.. +.. date: 2022-12-12-01-05-16 +.. gh-issue: 99110 +.. nonce: 1JqtIg +.. section: Core and Builtins +Initialize frame->previous in frameobject.c to fix a segmentation fault when +accessing frames created by :c:func:`PyFrame_New`. +.. +.. date: 2022-12-12-00-59-11 +.. gh-issue: 94155 +.. nonce: LWE9y_ +.. section: Core and Builtins +Improved the hashing algorithm for code objects, mitigating some hash +collisions. +.. +.. date: 2022-12-10-20-00-13 +.. gh-issue: 99540 +.. nonce: ZZZHeP +.. section: Core and Builtins +``None`` now hashes to a constant value. This is not a requirements change. +.. +.. date: 2022-12-09-14-27-36 +.. gh-issue: 100143 +.. nonce: 5g9rb4 +.. section: Core and Builtins +When built with ``--enable-pystats``, stats collection is now off by +default. To enable it early at startup, pass the ``-Xpystats`` flag. Stats +are now always dumped, even if switched off. +.. +.. date: 2022-12-09-13-18-42 +.. gh-issue: 100146 +.. nonce: xLVKg0 +.. section: Core and Builtins +Improve ``BUILD_LIST`` opcode so that it works similarly to the +``BUILD_TUPLE`` opcode, by stealing references from the stack rather than +repeatedly using stack operations to set list elements. Implementation +details are in a new private API :c:func:`!_PyList_FromArraySteal`. +.. +.. date: 2022-12-08-12-26-34 +.. gh-issue: 100110 +.. nonce: ertac- +.. section: Core and Builtins +Specialize ``FOR_ITER`` for tuples. +.. +.. date: 2022-12-06-22-24-01 +.. gh-issue: 100050 +.. nonce: lcrPqQ +.. section: Core and Builtins +Honor existing errors obtained when searching for mismatching parentheses in +the tokenizer. Patch by Pablo Galindo +.. +.. date: 2022-12-04-00-38-33 +.. gh-issue: 92216 +.. nonce: CJXuWB +.. section: Core and Builtins +Improve the performance of :func:`hasattr` for type objects with a missing +attribute. +.. +.. date: 2022-11-19-01-11-06 +.. gh-issue: 99582 +.. nonce: wvOBVy +.. section: Core and Builtins +Freeze :mod:`zipimport` module into ``_bootstrap_python``. +.. +.. date: 2022-11-16-05-57-24 +.. gh-issue: 99554 +.. nonce: A_Ywd2 +.. section: Core and Builtins +Pack debugging location tables more efficiently during bytecode compilation. +.. +.. date: 2022-10-21-16-10-39 +.. gh-issue: 98522 +.. nonce: s_SixG +.. section: Core and Builtins +Add an internal version number to code objects, to give better versioning of +inner functions and comprehensions, and thus better specialization of those +functions. This change is invisible to both Python and C extensions. +.. +.. date: 2022-07-06-18-44-00 +.. gh-issue: 94603 +.. nonce: Q_03xV +.. section: Core and Builtins +Improve performance of ``list.pop`` for small lists. +.. +.. date: 2022-06-17-08-00-34 +.. gh-issue: 89051 +.. nonce: yP4Na0 +.. section: Library +Add :const:`ssl.OP_LEGACY_SERVER_CONNECT` +.. +.. bpo: 32782 +.. date: 2018-02-06-23-21-13 +.. nonce: EJVSfR +.. section: Core and Builtins +``ctypes`` arrays of length 0 now report a correct itemsize when a +``memoryview`` is constructed from them, rather than always giving a value +of 0. +.. +.. date: 2023-01-08-12-10-17 +.. gh-issue: 100833 +.. nonce: f6cT7E +.. section: Library +Speed up :func:`math.fsum` by removing defensive ``volatile`` qualifiers. +.. +.. date: 2023-01-07-15-13-47 +.. gh-issue: 100805 +.. nonce: 05rBz9 +.. section: Library +Modify :func:`random.choice` implementation to once again work with NumPy +arrays. +.. +.. date: 2023-01-06-22-36-27 +.. gh-issue: 100813 +.. nonce: mHRdQn +.. section: Library +Add :const:`socket.IP_PKTINFO` constant. +.. +.. date: 2023-01-06-14-05-15 +.. gh-issue: 100792 +.. nonce: CEOJth +.. section: Library +Make :meth:`email.message.Message.__contains__` twice as fast. +.. +.. date: 2023-01-05-23-04-15 +.. gh-issue: 91851 +.. nonce: AuCzU5 +.. section: Library +Microoptimizations for :meth:`fractions.Fraction.__round__`, +:meth:`fractions.Fraction.__ceil__` and +:meth:`fractions.Fraction.__floor__`. +.. +.. date: 2023-01-04-22-10-31 +.. gh-issue: 90104 +.. nonce: yZk5EX +.. section: Library +Avoid RecursionError on ``repr`` if a dataclass field definition has a +cyclic reference. +.. +.. date: 2023-01-04-12-58-59 +.. gh-issue: 100689 +.. nonce: Ce0ITG +.. section: Library +Fix crash in :mod:`pyexpat` by statically allocating ``PyExpat_CAPI`` +capsule. +.. +.. date: 2023-01-04-09-53-38 +.. gh-issue: 100740 +.. nonce: -j5UjI +.. section: Library +Fix ``unittest.mock.Mock`` not respecting the spec for attribute names +prefixed with ``assert``. +.. +.. date: 2023-01-03-11-06-28 +.. gh-issue: 91219 +.. nonce: s5IFCw +.. section: Library +Change ``SimpleHTTPRequestHandler`` to support subclassing to provide a +different set of index file names instead of using ``__init__`` parameters. +.. +.. date: 2023-01-02-16-59-49 +.. gh-issue: 100690 +.. nonce: 2EgWPS +.. section: Library +``Mock`` objects which are not unsafe will now raise an ``AttributeError`` +when accessing an attribute that matches the name of an assertion but +without the prefix ``assert_``, e.g. accessing ``called_once`` instead of +``assert_called_once``. This is in addition to this already happening for +accessing attributes with prefixes ``assert``, ``assret``, ``asert``, +``aseert``, and ``assrt``. +.. +.. date: 2023-01-01-23-57-00 +.. gh-issue: 89727 +.. nonce: ojedHN +.. section: Library +Simplify and optimize :func:`os.walk` by using :func:`isinstance` checks to +check the top of the stack. +.. +.. date: 2023-01-01-21-54-46 +.. gh-issue: 100485 +.. nonce: geNrHS +.. section: Library +Add math.sumprod() to compute the sum of products. +.. +.. date: 2022-12-30-07-49-08 +.. gh-issue: 86508 +.. nonce: nGZDzC +.. section: Library +Fix :func:`asyncio.open_connection` to skip binding to local addresses of +different family. Patch by Kumar Aditya. +.. +.. date: 2022-12-29-11-45-22 +.. gh-issue: 97930 +.. nonce: hrtmJe +.. section: Library +``importlib.resources.files`` now accepts a module as an anchor instead of +only accepting packages. If a module is passed, resources are resolved +adjacent to that module (in the same package or at the package root). The +parameter was renamed from ``package`` to ``anchor`` with a compatibility +shim for those passing by keyword. Additionally, the new ``anchor`` +parameter is now optional and will default to the caller's module. +.. +.. date: 2022-12-28-17-38-39 +.. gh-issue: 100585 +.. nonce: BiiTlG +.. section: Library +Fixed a bug where importlib.resources.as_file was leaving file pointers open +.. +.. date: 2022-12-28-00-28-43 +.. gh-issue: 100562 +.. nonce: Hic0Z0 +.. section: Library +Improve performance of :meth:`pathlib.Path.absolute` by nearly 2x. This +comes at the cost of a performance regression in :meth:`pathlib.Path.cwd`, +which is generally used less frequently in user code. +.. +.. date: 2022-12-24-16-39-53 +.. gh-issue: 100519 +.. nonce: G_dZLP +.. section: Library +Small simplification of :func:`http.cookiejar.eff_request_host` that +improves readability and better matches the RFC wording. +.. +.. date: 2022-12-24-08-42-05 +.. gh-issue: 100287 +.. nonce: n0oEuG +.. section: Library +Fix the interaction of :func:`unittest.mock.seal` with +:class:`unittest.mock.AsyncMock`. +.. +.. date: 2022-12-24-04-13-54 +.. gh-issue: 100488 +.. nonce: Ut8HbE +.. section: Library +Add :meth:`Fraction.is_integer` to check whether a +:class:`fractions.Fraction` is an integer. This improves duck type +compatibility with :class:`float` and :class:`int`. +.. +.. date: 2022-12-23-21-02-43 +.. gh-issue: 100474 +.. nonce: gppA4U +.. section: Library +:mod:`http.server` now checks that an index page is actually a regular file +before trying to serve it. This avoids issues with directories named +``index.html``. +.. +.. date: 2022-12-20-11-07-30 +.. gh-issue: 100363 +.. nonce: Wo_Beg +.. section: Library +Speed up :func:`asyncio.get_running_loop` by removing redundant ``getpid`` +checks. Patch by Kumar Aditya. +.. +.. date: 2022-12-19-20-54-04 +.. gh-issue: 78878 +.. nonce: JrkYqJ +.. section: Library +Fix crash when creating an instance of :class:`!_ctypes.CField`. +.. +.. date: 2022-12-19-19-30-06 +.. gh-issue: 100348 +.. nonce: o7IAHh +.. section: Library +Fix ref cycle in :class:`!asyncio._SelectorSocketTransport` by removing +``_read_ready_cb`` in ``close``. +.. +.. date: 2022-12-19-12-18-28 +.. gh-issue: 100344 +.. nonce: lfCqpE +.. section: Library +Provide C implementation for :func:`asyncio.current_task` for a 4x-6x +speedup. +.. +.. date: 2022-12-15-18-28-13 +.. gh-issue: 100272 +.. nonce: D1O9Ey +.. section: Library +Fix JSON serialization of OrderedDict. It now preserves the order of keys. +.. +.. date: 2022-12-14-17-37-01 +.. gh-issue: 83076 +.. nonce: NaYzWT +.. section: Library +Instantiation of ``Mock()`` and ``AsyncMock()`` is now 3.8x faster. +.. +.. date: 2022-12-14-11-45-38 +.. gh-issue: 100234 +.. nonce: kn6yWV +.. section: Library +Set a default value of 1.0 for the ``lambd`` parameter in +random.expovariate(). +.. +.. date: 2022-12-13-17-29-09 +.. gh-issue: 100228 +.. nonce: bgtzMV +.. section: Library +A :exc:`DeprecationWarning` may be raised when :func:`os.fork` or +:func:`os.forkpty` is called from multi-threaded processes. Forking with +threads is unsafe and can cause deadlocks, crashes and subtle problems. Lack +of a warning does not indicate that the fork call was actually safe, as +Python may not be aware of all threads. +.. +.. date: 2022-12-10-20-52-28 +.. gh-issue: 100039 +.. nonce: zDqjT4 +.. section: Library +Improve signatures for enums and flags. +.. +.. date: 2022-12-10-08-36-07 +.. gh-issue: 100133 +.. nonce: g-zQlp +.. section: Library +Fix regression in :mod:`asyncio` where a subprocess would sometimes lose +data received from pipe. +.. +.. bpo: 44592 +.. date: 2022-12-09-10-35-36 +.. nonce: z-P3oe +.. section: Library +Fixes inconsistent handling of case sensitivity of *extrasaction* arg in +:class:`csv.DictWriter`. +.. +.. date: 2022-12-08-06-18-06 +.. gh-issue: 100098 +.. nonce: uBvPlp +.. section: Library +Fix ``tuple`` subclasses being cast to ``tuple`` when used as enum values. +.. +.. date: 2022-12-04-16-12-04 +.. gh-issue: 85432 +.. nonce: l_ehmI +.. section: Library +Rename the *fmt* parameter of the pure-Python implementation of +:meth:`datetime.time.strftime` to *format*. Rename the *t* parameter of +:meth:`datetime.datetime.fromtimestamp` to *timestamp*. These changes mean +the parameter names in the pure-Python implementation now match the +parameter names in the C implementation. Patch by Alex Waygood. +.. +.. date: 2022-12-03-20-06-16 +.. gh-issue: 98778 +.. nonce: t5U9uc +.. section: Library +Update :exc:`~urllib.error.HTTPError` to be initialized properly, even if +the ``fp`` is ``None``. Patch by Donghee Na. +.. +.. date: 2022-12-01-15-44-58 +.. gh-issue: 99925 +.. nonce: x4y6pF +.. section: Library +Unify error messages in JSON serialization between +``json.dumps(float('nan'), allow_nan=False)`` and ``json.dumps(float('nan'), +allow_nan=False, indent=)``. Now both include the representation +of the value that could not be serialized. +.. +.. date: 2022-11-29-20-44-54 +.. gh-issue: 89727 +.. nonce: UJZjkk +.. section: Library +Fix issue with :func:`os.walk` where a :exc:`RecursionError` would occur on +deep directory structures by adjusting the implementation of :func:`os.walk` +to be iterative instead of recursive. +.. +.. date: 2022-11-23-23-58-45 +.. gh-issue: 94943 +.. nonce: Oog0Zo +.. section: Library +Add :ref:`enum-dataclass-support` to the :class:`~enum.Enum` +:meth:`~enum.Enum.__repr__`. When inheriting from a +:class:`~dataclasses.dataclass`, only show the field names in the value +section of the member :func:`repr`, and not the dataclass' class name. +.. +.. date: 2022-11-21-16-24-01 +.. gh-issue: 83035 +.. nonce: qZIujU +.. section: Library +Fix :func:`inspect.getsource` handling of decorator calls with nested +parentheses. +.. +.. date: 2022-11-20-11-59-54 +.. gh-issue: 99576 +.. nonce: ZD7jU6 +.. section: Library +Fix ``.save()`` method for ``LWPCookieJar`` and ``MozillaCookieJar``: saved +file was not truncated on repeated save. +.. +.. date: 2022-11-17-10-02-18 +.. gh-issue: 94912 +.. nonce: G2aa-E +.. section: Library +Add :func:`inspect.markcoroutinefunction` decorator which manually marks a +function as a coroutine for the benefit of :func:`iscoroutinefunction`. +.. +.. date: 2022-11-15-18-45-01 +.. gh-issue: 99509 +.. nonce: FLK0xU +.. section: Library +Add :pep:`585` support for :class:`multiprocessing.queues.Queue`. +.. +.. date: 2022-11-14-19-58-36 +.. gh-issue: 99482 +.. nonce: XmZyUr +.. section: Library +Remove ``Jython`` partial compatibility code from several stdlib modules. +.. +.. date: 2022-11-13-15-32-19 +.. gh-issue: 99433 +.. nonce: Ys6y0A +.. section: Library +Fix :mod:`doctest` failure on :class:`types.MethodWrapperType` in modules. +.. +.. date: 2022-10-28-07-24-34 +.. gh-issue: 85267 +.. nonce: xUy_Wm +.. section: Library +Several improvements to :func:`inspect.signature`'s handling of +``__text_signature``. - Fixes a case where :func:`inspect.signature` dropped +parameters - Fixes a case where :func:`inspect.signature` raised +:exc:`tokenize.TokenError` - Allows :func:`inspect.signature` to understand +defaults involving binary operations of constants - +:func:`inspect.signature` is documented as only raising :exc:`TypeError` or +:exc:`ValueError`, but sometimes raised :exc:`RuntimeError`. These cases now +raise :exc:`ValueError` - Removed a dead code path +.. +.. date: 2022-10-24-07-31-11 +.. gh-issue: 91166 +.. nonce: -IG06R +.. section: Library +:mod:`asyncio` is optimized to avoid excessive copying when writing to +socket and use :meth:`~socket.socket.sendmsg` if the platform supports it. +Patch by Kumar Aditya. +.. +.. date: 2022-10-07-18-16-00 +.. gh-issue: 98030 +.. nonce: 2oQCZy +.. section: Library +Add missing TCP socket options from Linux: ``TCP_MD5SIG``, +``TCP_THIN_LINEAR_TIMEOUTS``, ``TCP_THIN_DUPACK``, ``TCP_REPAIR``, +``TCP_REPAIR_QUEUE``, ``TCP_QUEUE_SEQ``, ``TCP_REPAIR_OPTIONS``, +``TCP_TIMESTAMP``, ``TCP_CC_INFO``, ``TCP_SAVE_SYN``, ``TCP_SAVED_SYN``, +``TCP_REPAIR_WINDOW``, ``TCP_FASTOPEN_CONNECT``, ``TCP_ULP``, +``TCP_MD5SIG_EXT``, ``TCP_FASTOPEN_KEY``, ``TCP_FASTOPEN_NO_COOKIE``, +``TCP_ZEROCOPY_RECEIVE``, ``TCP_INQ``, ``TCP_TX_DELAY``. +.. +.. date: 2022-09-16-08-21-46 +.. gh-issue: 88500 +.. nonce: jQ0pCc +.. section: Library +Reduced the memory usage of :func:`urllib.parse.unquote` and +:func:`urllib.parse.unquote_to_bytes` on large values. +.. +.. date: 2022-08-27-10-35-50 +.. gh-issue: 96127 +.. nonce: 8RdLre +.. section: Library +``inspect.signature`` was raising ``TypeError`` on call with mock objects. +Now it correctly returns ``(*args, **kwargs)`` as inferred signature. +.. +.. date: 2022-08-11-10-02-19 +.. gh-issue: 95882 +.. nonce: FsUr72 +.. section: Library +Fix a 3.11 regression in :func:`~contextlib.asynccontextmanager`, which +caused it to propagate exceptions with incorrect tracebacks and fix a 3.11 +regression in :func:`~contextlib.contextmanager`, which caused it to +propagate exceptions with incorrect tracebacks for :exc:`StopIteration`. +.. +.. date: 2022-07-01-00-01-22 +.. gh-issue: 78707 +.. nonce: fHGSuM +.. section: Library +Deprecate passing more than one positional argument to +:meth:`pathlib.PurePath.relative_to` and +:meth:`~pathlib.PurePath.is_relative_to`. +.. +.. date: 2022-05-06-01-53-34 +.. gh-issue: 92122 +.. nonce: 96Lf2p +.. section: Library +Fix reStructuredText syntax errors in docstrings in the :mod:`enum` module. +.. +.. date: 2022-04-23-08-12-14 +.. gh-issue: 91851 +.. nonce: Jd47V6 +.. section: Library +Optimize the :class:`~fractions.Fraction` arithmetics for small components. +.. +.. bpo: 24132 +.. date: 2022-03-05-02-14-09 +.. nonce: W6iORO +.. section: Library +Make :class:`pathlib.PurePath` and :class:`~pathlib.Path` subclassable +(private to start). Previously, attempting to instantiate a subclass +resulted in an :exc:`AttributeError` being raised. Patch by Barney Gale. +.. +.. bpo: 40447 +.. date: 2020-05-03-12-55-55 +.. nonce: oKR0Lj +.. section: Library +Accept :class:`os.PathLike` (such as :class:`pathlib.Path`) in the +``stripdir`` arguments of :meth:`compileall.compile_file` and +:meth:`compileall.compile_dir`. +.. +.. bpo: 36880 +.. date: 2019-05-13-11-37-30 +.. nonce: ZgBgH0 +.. section: Library +Fix a reference counting issue when a :mod:`ctypes` callback with return +type :class:`~ctypes.py_object` returns ``None``, which could cause crashes. +.. +.. date: 2022-12-30-00-42-23 +.. gh-issue: 100616 +.. nonce: eu80ij +.. section: Documentation +Document existing ``attr`` parameter to :func:`curses.window.vline` function +in :mod:`curses`. +.. +.. date: 2022-12-23-21-42-26 +.. gh-issue: 100472 +.. nonce: NNixfO +.. section: Documentation +Remove claim in documentation that the ``stripdir``, ``prependdir`` and +``limit_sl_dest`` parameters of :func:`compileall.compile_dir` and +:func:`compileall.compile_file` could be :class:`bytes`. +.. +.. bpo: 25377 +.. date: 2020-06-17-14-47-48 +.. nonce: CTxC6o +.. section: Documentation +Clarify use of octal format of mode argument in help(os.chmod) as well as +help(os.fchmod) +.. +.. date: 2022-12-23-13-29-55 +.. gh-issue: 100454 +.. nonce: 3no0cW +.. section: Tests +Start running SSL tests with OpenSSL 3.1.0-beta1. +.. +.. date: 2022-12-08-00-03-37 +.. gh-issue: 100086 +.. nonce: 1zYpto +.. section: Tests +The Python test runner (libregrtest) now logs Python build information like +"debug" vs "release" build, or LTO and PGO optimizations. Patch by Victor +Stinner. +.. +.. date: 2022-06-16-13-26-31 +.. gh-issue: 93018 +.. nonce: wvNx76 +.. section: Tests +Make two tests forgiving towards host system libexpat with backported +security fixes applied. +.. +.. date: 2022-12-26-15-07-48 +.. gh-issue: 100540 +.. nonce: l6ToSY +.. section: Build +Removed the ``--with-system-ffi`` ``configure`` option; ``libffi`` must now +always be supplied by the system on all non-Windows platforms. The option +has had no effect on non-Darwin platforms for several releases, and in 3.11 +only had the non-obvious effect of invoking ``pkg-config`` to find +``libffi`` and never setting ``-DUSING_APPLE_OS_LIBFFI``. Now on Darwin +platforms ``configure`` will first check for the OS ``libffi`` and then fall +back to the same processing as other platforms if it is not found. +.. +.. date: 2022-12-08-14-00-04 +.. gh-issue: 88267 +.. nonce: MqtRbm +.. section: Build +Avoid exporting Python symbols in linked Windows applications when the core +is built as static. +.. +.. bpo: 41916 +.. date: 2022-03-04-10-47-23 +.. nonce: 1d2GLU +.. section: Build +Allow override of ac_cv_cxx_thread so that cross compiled python can set +-pthread for CXX. +.. +.. date: 2023-01-09-23-03-57 +.. gh-issue: 100180 +.. nonce: b5phrg +.. section: Windows +Update Windows installer to OpenSSL 1.1.1s +.. +.. date: 2022-12-20-18-36-17 +.. gh-issue: 99191 +.. nonce: 0cfRja +.. section: Windows +Use ``_MSVC_LANG >= 202002L`` instead of less-precise ``_MSC_VER >=1929`` to +more accurately test for C++20 support in :file:`PC/_wmimodule.cpp`. +.. +.. date: 2022-12-09-22-47-42 +.. gh-issue: 79218 +.. nonce: Yiot2e +.. section: Windows +Define ``MS_WIN64`` for Mingw-w64 64bit, fix cython compilation failure. +.. +.. date: 2022-12-06-11-16-46 +.. gh-issue: 99941 +.. nonce: GmUQ6o +.. section: Windows +Ensure that :func:`asyncio.Protocol.data_received` receives an immutable +:class:`bytes` object (as documented), instead of :class:`bytearray`. +.. +.. bpo: 43984 +.. date: 2021-05-02-15-29-33 +.. nonce: U92jiv +.. section: Windows +:meth:`winreg.SetValueEx` now leaves the target value untouched in the case +of conversion errors. Previously, ``-1`` would be written in case of such +errors. +.. +.. bpo: 34816 +.. date: 2021-04-08-00-36-37 +.. nonce: 4Xe0id +.. section: Windows +``hasattr(ctypes.windll, 'nonexistant')`` now returns ``False`` instead of +raising :exc:`OSError`. +.. +.. date: 2023-01-09-22-04-21 +.. gh-issue: 100180 +.. nonce: WVhCny +.. section: macOS +Update macOS installer to OpenSSL 1.1.1s +.. +.. date: 2022-12-26-14-52-37 +.. gh-issue: 100540 +.. nonce: kYZLtX +.. section: macOS +Removed obsolete ``dlfcn.h`` shim from the ``_ctypes`` extension module, +which has not been necessary since Mac OS X 10.2. +.. +.. bpo: 45256 +.. date: 2022-12-29-19-22-11 +.. nonce: a0ee_H +.. section: Tools/Demos +Fix a bug that caused an :exc:`AttributeError` to be raised in +``python-gdb.py`` when ``py-locals`` is used without a frame. +.. +.. date: 2022-12-19-10-08-53 +.. gh-issue: 100342 +.. nonce: qDFlQG +.. section: Tools/Demos +Add missing ``NULL`` check for possible allocation failure in ``*args`` +parsing in Argument Clinic. +.. +.. date: 2022-12-02-09-31-19 +.. gh-issue: 99947 +.. nonce: Ski7OC +.. section: C API +Raising SystemError on import will now have its cause be set to the original +unexpected exception. +.. +.. date: 2022-11-30-16-39-22 +.. gh-issue: 99240 +.. nonce: 67nAX- +.. section: C API +In argument parsing, after deallocating newly allocated memory, reset its +pointer to NULL. +.. +.. date: 2022-11-04-16-13-35 +.. gh-issue: 98724 +.. nonce: p0urWO +.. section: C API +The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF` +macros now only evaluate their arguments once. If an argument has side +effects, these side effects are no longer duplicated. Patch by Victor +Stinner. + +.. bpo: 32176 +.. date: 2017-12-02-21-37-22 +.. nonce: Wt25-N +.. release date: 2017-12-05 +.. section: Core and Builtins +co_flags.CO_NOFREE is now always set correctly by the code object +constructor based on freevars and cellvars, rather than needing to be set +correctly by the caller. This ensures it will be cleared automatically when +additional cell references are injected into a modified code object and +function. +.. +.. bpo: 10544 +.. date: 2017-11-27-08-37-34 +.. nonce: 07nioT +.. section: Core and Builtins +Yield expressions are now deprecated in comprehensions and generator +expressions. They are still permitted in the definition of the outermost +iterable, as that is evaluated directly in the enclosing scope. +.. +.. bpo: 32137 +.. date: 2017-11-26-14-36-30 +.. nonce: Stj5nL +.. section: Core and Builtins +The repr of deeply nested dict now raises a RecursionError instead of +crashing due to a stack overflow. +.. +.. bpo: 32096 +.. date: 2017-11-24-01-13-58 +.. nonce: CQTHXJ +.. section: Core and Builtins +Revert memory allocator changes in the C API: move structures back from +_PyRuntime to Objects/obmalloc.c. The memory allocators are once again +initialized statically, and so PyMem_RawMalloc() and Py_DecodeLocale() can +be called before _PyRuntime_Initialize(). +.. +.. bpo: 32043 +.. date: 2017-11-16-03-44-08 +.. nonce: AAzwpZ +.. section: Core and Builtins +Add a new "developer mode": new "-X dev" command line option to enable debug +checks at runtime. +.. +.. bpo: 32023 +.. date: 2017-11-15-10-49-35 +.. nonce: XnCGT5 +.. section: Core and Builtins +SyntaxError is now correctly raised when a generator expression without +parenthesis is used instead of an inheritance list in a class definition. +The duplication of the parentheses can be omitted only on calls. +.. +.. bpo: 32012 +.. date: 2017-11-13-00-37-11 +.. nonce: Kprjqe +.. section: Core and Builtins +SyntaxError is now correctly raised when a generator expression without +parenthesis is passed as an argument, but followed by a trailing comma. A +generator expression always needs to be directly inside a set of parentheses +and cannot have a comma on either side. +.. +.. bpo: 28180 +.. date: 2017-11-12-11-44-22 +.. nonce: HQX000 +.. section: Core and Builtins +A new internal ``_Py_SetLocaleFromEnv(category)`` helper function has been +added in order to improve the consistency of behaviour across different +``libc`` implementations (e.g. Android doesn't support setting the locale +from the environment by default). +.. +.. bpo: 31949 +.. date: 2017-11-05-16-11-07 +.. nonce: 2yNC_z +.. section: Core and Builtins +Fixed several issues in printing tracebacks (PyTraceBack_Print()). +Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks. +Setting sys.tracebacklimit to None now causes using the default limit. +Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using +the limit LONG_MAX rather than the default limit. +Fixed integer overflows in the case of more than ``2**31`` traceback items on +Windows. +Fixed output errors handling. +.. +.. bpo: 30696 +.. date: 2017-10-28-22-06-03 +.. nonce: lhC3HE +.. section: Core and Builtins +Fix the interactive interpreter looping endlessly when no memory. +.. +.. bpo: 20047 +.. date: 2017-10-28-19-11-05 +.. nonce: GuNAto +.. section: Core and Builtins +Bytearray methods partition() and rpartition() now accept only bytes-like +objects as separator, as documented. In particular they now raise TypeError +rather of returning a bogus result when an integer is passed as a separator. +.. +.. bpo: 21720 +.. date: 2017-10-25-15-51-37 +.. nonce: BwIKLP +.. section: Core and Builtins +BytesWarning no longer emitted when the *fromlist* argument of +``__import__()`` or the ``__all__`` attribute of the module contain bytes +instances. +.. +.. bpo: 31845 +.. date: 2017-10-24-21-27-32 +.. nonce: 8OS-k3 +.. section: Core and Builtins +Environment variables are once more read correctly at interpreter startup. +.. +.. bpo: 28936 +.. date: 2017-10-23-23-39-26 +.. nonce: C288Jh +.. section: Core and Builtins +Ensure that lexically first syntax error involving a parameter and +``global`` or ``nonlocal`` is detected first at a given scope. Patch by Ivan +Levkivskyi. +.. +.. bpo: 31825 +.. date: 2017-10-20-14-07-46 +.. nonce: gJvmGW +.. section: Core and Builtins +Fixed OverflowError in the 'unicode-escape' codec and in +codecs.escape_decode() when decode an escaped non-ascii byte. +.. +.. bpo: 31618 +.. date: 2017-10-18-19-41-12 +.. nonce: liLDiS +.. section: Core and Builtins +The per-frame tracing logic added in 3.7a1 has been altered so that +``frame->f_lineno`` is updated before either ``"line"`` or ``"opcode"`` +events are emitted. Previously, opcode events were emitted first, and +therefore would occasionally see stale line numbers on the frame. The +behavior of this feature has changed slightly as a result: when both +``f_trace_lines`` and ``f_trace_opcodes`` are enabled, line events now occur +first. +.. +.. bpo: 28603 +.. date: 2017-10-17-13-29-19 +.. nonce: _-oia3 +.. section: Core and Builtins +Print the full context/cause chain of exceptions on interpreter exit, even +if an exception in the chain is unhashable or compares equal to later ones. +Patch by Zane Bitter. +.. +.. bpo: 31786 +.. date: 2017-10-15-23-44-57 +.. nonce: XwdEP4 +.. section: Core and Builtins +Fix timeout rounding in the select module to round correctly negative +timeouts between -1.0 and 0.0. The functions now block waiting for events as +expected. Previously, the call was incorrectly non-blocking. Patch by Pablo +Galindo. +.. +.. bpo: 31781 +.. date: 2017-10-13-20-01-47 +.. nonce: cXE9SM +.. section: Core and Builtins +Prevent crashes when calling methods of an uninitialized +``zipimport.zipimporter`` object. Patch by Oren Milman. +.. +.. bpo: 30399 +.. date: 2017-10-12-22-21-01 +.. nonce: 45f1gv +.. section: Core and Builtins +Standard repr() of BaseException with a single argument no longer contains +redundant trailing comma. +.. +.. bpo: 31626 +.. date: 2017-10-01-15-48-03 +.. nonce: reLPxY +.. section: Core and Builtins +Fixed a bug in debug memory allocator. There was a write to freed memory +after shrinking a memory block. +.. +.. bpo: 30817 +.. date: 2017-07-01-15-11-13 +.. nonce: j7ZvN_ +.. section: Core and Builtins +``PyErr_PrintEx()`` clears now the ignored exception that may be raised by +``_PySys_SetObjectId()``, for example when no memory. +.. +.. bpo: 28556 +.. date: 2017-12-05-02-03-07 +.. nonce: 9Z_PsJ +.. section: Library +Two minor fixes for ``typing`` module: allow shallow copying instances of +generic classes, improve interaction of ``__init_subclass__`` with generics. +Original PRs by Ivan Levkivskyi. +.. +.. bpo: 32214 +.. date: 2017-12-04-15-51-57 +.. nonce: uozdNj +.. section: Library +PEP 557, Data Classes. Provides a decorator which adds boilerplate methods +to classes which use type annotations so specify fields. +.. +.. bpo: 27240 +.. date: 2017-12-02-16-06-00 +.. nonce: Kji34M +.. section: Library +The header folding algorithm for the new email policies has been rewritten, +which also fixes bpo-30788, bpo-31831, and bpo-32182. In particular, +RFC2231 folding is now done correctly. +.. +.. bpo: 32186 +.. date: 2017-11-30-20-38-16 +.. nonce: O42bVe +.. section: Library +io.FileIO.readall() and io.FileIO.read() now release the GIL when getting +the file size. Fixed hang of all threads with inaccessible NFS server. Patch +by Nir Soffer. +.. +.. bpo: 32101 +.. date: 2017-11-29-00-42-47 +.. nonce: -axD5l +.. section: Library +Add :attr:`sys.flags.dev_mode` flag +.. +.. bpo: 32154 +.. date: 2017-11-28-15-27-10 +.. nonce: kDox7L +.. section: Library +The ``asyncio.windows_utils.socketpair()`` function has been removed: use +directly :func:`socket.socketpair` which is available on all platforms since +Python 3.5 (before, it wasn't available on Windows). +``asyncio.windows_utils.socketpair()`` was just an alias to +``socket.socketpair`` on Python 3.5 and newer. +.. +.. bpo: 32089 +.. date: 2017-11-27-11-29-34 +.. nonce: 6ydDYv +.. section: Library +warnings: In development (-X dev) and debug mode (pydebug build), use the +"default" action for ResourceWarning, rather than the "always" action, in +the default warnings filters. +.. +.. bpo: 32107 +.. date: 2017-11-26-18-48-17 +.. nonce: h2ph2K +.. section: Library +``uuid.getnode()`` now preferentially returns universally administered MAC +addresses if available, over locally administered MAC addresses. This makes +a better guarantee for global uniqueness of UUIDs returned from +``uuid.uuid1()``. If only locally administered MAC addresses are available, +the first such one found is returned. +.. +.. bpo: 23033 +.. date: 2017-11-26-17-00-52 +.. nonce: YGXRWT +.. section: Library +Wildcard is now supported in hostname when it is one and only character in +the left most segment of hostname in second argument of +:meth:`ssl.match_hostname`. Patch by Mandeep Singh. +.. +.. bpo: 12239 +.. date: 2017-11-24-14-07-55 +.. nonce: Nj3A0x +.. section: Library +Make :meth:`!msilib.SummaryInformation.GetProperty` return ``None`` when the +value of property is ``VT_EMPTY``. Initial patch by Mark Mc Mahon. +.. +.. bpo: 28334 +.. date: 2017-11-24-11-50-41 +.. nonce: 3gGGlt +.. section: Library +Use :func:`os.path.expanduser` to find the ``~/.netrc`` file in +:class:`netrc.netrc`. If it does not exist, :exc:`FileNotFoundError` is +raised. Patch by Dimitri Merejkowsky. +.. +.. bpo: 32121 +.. date: 2017-11-24-00-59-12 +.. nonce: ePbmwC +.. section: Library +Made ``tracemalloc.Traceback`` behave more like the traceback module, +sorting the frames from oldest to most recent. ``Traceback.format()`` now +accepts negative *limit*, truncating the result to the ``abs(limit)`` oldest +frames. To get the old behaviour, one can use the new *most_recent_first* +argument to ``Traceback.format()``. (Patch by Jesse Bakker.) +.. +.. bpo: 31325 +.. date: 2017-11-23-22-12-11 +.. nonce: 8jAUxN +.. section: Library +Fix wrong usage of :func:`collections.namedtuple` in the +:meth:`RobotFileParser.parse() ` +method. +Initial patch by Robin Wellner. +.. +.. bpo: 12382 +.. date: 2017-11-23-21-47-36 +.. nonce: xWT9k0 +.. section: Library +:func:`!msilib.OpenDatabase` now raises a better exception message when it +couldn't open or create an MSI file. Initial patch by William Tisäter. +.. +.. bpo: 19610 +.. date: 2017-11-23-16-15-55 +.. nonce: Dlca2P +.. section: Library +``setup()`` now warns about invalid types for some fields. +The ``distutils.dist.Distribution`` class now warns when ``classifiers``, +``keywords`` and ``platforms`` fields are not specified as a list or a +string. +.. +.. bpo: 32071 +.. date: 2017-11-22-19-52-17 +.. nonce: 4WNhUH +.. section: Library +Added the ``-k`` command-line option to ``python -m unittest`` to run only +tests that match the given pattern(s). +.. +.. bpo: 10049 +.. date: 2017-11-22-17-21-01 +.. nonce: ttsBqb +.. section: Library +Added *nullcontext* no-op context manager to contextlib. This provides a +simpler and faster alternative to ExitStack() when handling optional context +managers. +.. +.. bpo: 28684 +.. date: 2017-11-22-12-54-46 +.. nonce: NLiDKZ +.. section: Library +The new test.support.skip_unless_bind_unix_socket() decorator is used here +to skip asyncio tests that fail because the platform lacks a functional +bind() function for unix domain sockets (as it is the case for non root +users on the recent Android versions that run now SELinux in enforcing +mode). +.. +.. bpo: 32110 +.. date: 2017-11-22-09-44-15 +.. nonce: VJa9bo +.. section: Library +``codecs.StreamReader.read(n)`` now returns not more than *n* +characters/bytes for non-negative *n*. This makes it compatible with +``read()`` methods of other file-like objects. +.. +.. bpo: 27535 +.. date: 2017-11-21-16-05-35 +.. nonce: JLhcNz +.. section: Library +The warnings module doesn't leak memory anymore in the hidden warnings +registry for the "ignore" action of warnings filters. warn_explicit() +function doesn't add the warning key to the registry anymore for the +"ignore" action. +.. +.. bpo: 32088 +.. date: 2017-11-20-15-28-31 +.. nonce: mV-4Nu +.. section: Library +warnings: When Python is build is debug mode (``Py_DEBUG``), +:exc:`DeprecationWarning`, :exc:`PendingDeprecationWarning` and +:exc:`ImportWarning` warnings are now displayed by default. +.. +.. bpo: 1647489 +.. date: 2017-11-20-01-29-46 +.. nonce: -ZNNkh +.. section: Library +Fixed searching regular expression patterns that could match an empty +string. Non-empty string can now be correctly found after matching an empty +string. +.. +.. bpo: 25054 +.. date: 2017-11-20-01-01-01 +.. nonce: rOlRV6 +.. section: Library +Added support of splitting on a pattern that could match an empty string. +.. +.. bpo: 32072 +.. date: 2017-11-18-21-13-52 +.. nonce: nwDV8L +.. section: Library +Fixed issues with binary plists: +Fixed saving bytearrays. +Identical objects will be saved only once. +Equal references will be load as identical objects. +Added support for saving and loading recursive data structures. +.. +.. bpo: 32069 +.. date: 2017-11-18-17-09-01 +.. nonce: S0wyy4 +.. section: Library +Drop legacy SSL transport from asyncio, ssl.MemoryBIO is always used anyway. +.. +.. bpo: 32066 +.. date: 2017-11-17-18-28-53 +.. nonce: OMQFLH +.. section: Library +asyncio: Support pathlib.Path in create_unix_connection; sock arg should be +optional +.. +.. bpo: 32046 +.. date: 2017-11-16-20-09-45 +.. nonce: 9sGDtw +.. section: Library +Updates 2to3 to convert from operator.isCallable(obj) to callable(obj). +Patch by Donghee Na. +.. +.. bpo: 32018 +.. date: 2017-11-16-02-32-41 +.. nonce: YMQ7Q2 +.. section: Library +inspect.signature should follow :pep:`8`, if the parameter has an annotation +and a default value. Patch by Donghee Na. +.. +.. bpo: 32025 +.. date: 2017-11-15-20-03-45 +.. nonce: lnIKYT +.. section: Library +Add time.thread_time() and time.thread_time_ns() +.. +.. bpo: 32037 +.. date: 2017-11-15-19-04-22 +.. nonce: r8-5Nk +.. section: Library +Integers that fit in a signed 32-bit integer will be now pickled with +protocol 0 using the INT opcode. This will decrease the size of a pickle, +speed up pickling and unpickling, and make these integers be unpickled as +int instances in Python 2. +.. +.. bpo: 32034 +.. date: 2017-11-15-13-44-28 +.. nonce: uHAOmu +.. section: Library +Make asyncio.IncompleteReadError and LimitOverrunError pickleable. +.. +.. bpo: 32015 +.. date: 2017-11-13-17-48-33 +.. nonce: 4nqRTD +.. section: Library +Fixed the looping of asyncio in the case of reconnection the socket during +waiting async read/write from/to the socket. +.. +.. bpo: 32011 +.. date: 2017-11-12-20-47-59 +.. nonce: NzVDdZ +.. section: Library +Restored support of loading marshal files with the TYPE_INT64 code. These +files can be produced in Python 2.7. +.. +.. bpo: 28369 +.. date: 2017-11-10-16-27-26 +.. nonce: IS74nd +.. section: Library +Enhance add_reader/writer check that socket is not used by some transport. +Before, only cases when add_reader/writer were called with an int FD were +supported. Now the check is implemented correctly for all file-like +objects. +.. +.. bpo: 31976 +.. date: 2017-11-09-21-36-32 +.. nonce: EOA7qY +.. section: Library +Fix race condition when flushing a file is slow, which can cause a segfault +if closing the file from another thread. +.. +.. bpo: 31985 +.. date: 2017-11-08-16-51-52 +.. nonce: dE_fOB +.. section: Library +Formally deprecated aifc.openfp, sunau.openfp, and wave.openfp. Since change +7bc817d5ba917528e8bd07ec461c635291e7b06a in 1993, openfp in each of the +three modules had been pointing to that module's open function as a matter +of backwards compatibility, though it had been both untested and +undocumented. +.. +.. bpo: 21862 +.. date: 2017-11-07-15-19-52 +.. nonce: RwietE +.. section: Library +cProfile command line now accepts ``-m module_name`` as an alternative to +script path. Patch by Sanyam Khurana. +.. +.. bpo: 31970 +.. date: 2017-11-07-14-20-09 +.. nonce: x4EN_9 +.. section: Library +Reduce performance overhead of asyncio debug mode. +.. +.. bpo: 31843 +.. date: 2017-11-07-00-37-50 +.. nonce: lM2gkR +.. section: Library +*database* argument of sqlite3.connect() now accepts a :term:`path-like +object`, instead of just a string. +.. +.. bpo: 31945 +.. date: 2017-11-05-01-17-12 +.. nonce: TLPBtS +.. section: Library +Add Configurable *blocksize* to ``HTTPConnection`` and ``HTTPSConnection`` +for improved upload throughput. Patch by Nir Soffer. +.. +.. bpo: 31943 +.. date: 2017-11-04-19-28-08 +.. nonce: bxw5gM +.. section: Library +Add a ``cancelled()`` method to :class:`asyncio.Handle`. Patch by Marat +Sharafutdinov. +.. +.. bpo: 9678 +.. date: 2017-11-03-22-05-47 +.. nonce: oD51q6 +.. section: Library +Fixed determining the MAC address in the uuid module: +Using ifconfig on NetBSD and OpenBSD. +Using arp on Linux, FreeBSD, NetBSD and OpenBSD. +Based on patch by Takayuki Shimizukawa. +.. +.. bpo: 30057 +.. date: 2017-11-03-19-11-43 +.. nonce: NCaijI +.. section: Library +Fix potential missed signal in signal.signal(). +.. +.. bpo: 31933 +.. date: 2017-11-03-08-36-03 +.. nonce: UrtoMP +.. section: Library +Fix Blake2 params leaf_size and node_offset on big endian platforms. Patch +by Jack O'Connor. +.. +.. bpo: 21423 +.. date: 2017-11-02-22-26-16 +.. nonce: hw5mEh +.. section: Library +Add an initializer argument to {Process,Thread}PoolExecutor +.. +.. bpo: 31927 +.. date: 2017-11-02-18-26-40 +.. nonce: 40K6kp +.. section: Library +Fixed compilation of the socket module on NetBSD 8. Fixed assertion failure +or reading arbitrary data when parse a AF_BLUETOOTH address on NetBSD and +DragonFly BSD. +.. +.. bpo: 27666 +.. date: 2017-11-01-18-13-42 +.. nonce: j2zRnF +.. section: Library +Fixed stack corruption in curses.box() and curses.ungetmouse() when the size +of types chtype or mmask_t is less than the size of C long. curses.box() +now accepts characters as arguments. Based on patch by Steve Fink. +.. +.. bpo: 31917 +.. date: 2017-11-01-03-28-24 +.. nonce: DYQL0g +.. section: Library +Add 3 new clock identifiers: :const:`time.CLOCK_BOOTTIME`, +:const:`time.CLOCK_PROF` and :const:`time.CLOCK_UPTIME`. +.. +.. bpo: 31897 +.. date: 2017-10-30-11-04-56 +.. nonce: yjwdEb +.. section: Library +plistlib now catches more errors when read binary plists and raises +InvalidFileException instead of unexpected exceptions. +.. +.. bpo: 25720 +.. date: 2017-10-29-17-52-40 +.. nonce: vSvb5h +.. section: Library +Fix the method for checking pad state of curses WINDOW. Patch by Masayuki +Yamamoto. +.. +.. bpo: 31893 +.. date: 2017-10-29-13-51-01 +.. nonce: 8LZKEz +.. section: Library +Fixed the layout of the kqueue_event structure on OpenBSD and NetBSD. Fixed +the comparison of the kqueue_event objects. +.. +.. bpo: 31891 +.. date: 2017-10-29-11-23-24 +.. nonce: 9kAPha +.. section: Library +Fixed building the curses module on NetBSD. +.. +.. bpo: 31884 +.. date: 2017-10-27 +.. nonce: bjhre9 +.. section: Library +added required constants to subprocess module for setting priority on +windows +.. +.. bpo: 28281 +.. date: 2017-10-26-14-54-38 +.. nonce: 7ZN5FG +.. section: Library +Remove year (1-9999) limits on the Calendar.weekday() function. +Patch by Mark Gollahon. +.. +.. bpo: 31702 +.. date: 2017-10-24-21-10-44 +.. nonce: SfwJDI +.. section: Library +crypt.mksalt() now allows to specify the number of rounds for SHA-256 and +SHA-512 hashing. +.. +.. bpo: 30639 +.. date: 2017-10-24-12-24-56 +.. nonce: ptNM9a +.. section: Library +:func:`inspect.getfile` no longer computes the repr of unknown objects to +display in an error message, to protect against badly behaved custom reprs. +.. +.. bpo: 30768 +.. date: 2017-10-24-12-00-16 +.. nonce: Om8Yj_ +.. section: Library +Fix the pthread+semaphore implementation of PyThread_acquire_lock_timed() +when called with timeout > 0 and intr_flag=0: recompute the timeout if +sem_timedwait() is interrupted by a signal (EINTR). See also the :pep:`475`. +.. +.. bpo: 31854 +.. date: 2017-10-23 +.. nonce: fh8334f +.. section: Library +Add ``mmap.ACCESS_DEFAULT`` constant. +.. +.. bpo: 31834 +.. date: 2017-10-23-23-27-52 +.. nonce: InwC6O +.. section: Library +Use optimized code for BLAKE2 only with SSSE3+. The pure SSE2 implementation +is slower than the pure C reference implementation. +.. +.. bpo: 28292 +.. date: 2017-10-23-20-03-36 +.. nonce: 1Gkim2 +.. section: Library +Calendar.itermonthdates() will now consistently raise an exception when a +date falls outside of the 0001-01-01 through 9999-12-31 range. To support +applications that cannot tolerate such exceptions, the new methods +itermonthdays3() and itermonthdays4() are added. The new methods return +tuples and are not restricted by the range supported by datetime.date. +.. +.. bpo: 28564 +.. date: 2017-10-23-16-22-54 +.. nonce: Tx-l-I +.. section: Library +The shutil.rmtree() function has been sped up to 20--40%. This was done +using the os.scandir() function. +.. +.. bpo: 28416 +.. date: 2017-10-23-12-05-33 +.. nonce: Ldnw8X +.. section: Library +Instances of pickle.Pickler subclass with the persistent_id() method and +pickle.Unpickler subclass with the persistent_load() method no longer create +reference cycles. +.. +.. bpo: 31653 +.. date: 2017-10-22-12-43-03 +.. nonce: ttfGvq +.. section: Library +Don't release the GIL if we can acquire a multiprocessing semaphore +immediately. +.. +.. bpo: 28326 +.. date: 2017-10-22-11-06-02 +.. nonce: rxh7L4 +.. section: Library +Fix multiprocessing.Process when stdout and/or stderr is closed or None. +.. +.. bpo: 20825 +.. date: 2017-10-21-09-13-16 +.. nonce: -1MBEy +.. section: Library +Add ``subnet_of`` and ``superset_of`` containment tests to +:class:`ipaddress.IPv6Network` and :class:`ipaddress.IPv4Network`. Patch by +Michel Albert and Cheryl Sabella. +.. +.. bpo: 31827 +.. date: 2017-10-20-16-12-01 +.. nonce: 7R8s8s +.. section: Library +Remove the os.stat_float_times() function. It was introduced in Python 2.3 +for backward compatibility with Python 2.2, and was deprecated since Python +3.1. +.. +.. bpo: 31756 +.. date: 2017-10-20-12-57-52 +.. nonce: IxCvGB +.. section: Library +Add a ``subprocess.Popen(text=False)`` keyword argument to ``subprocess`` +functions to be more explicit about when the library should attempt to +decode outputs into text. Patch by Andrew Clegg. +.. +.. bpo: 31819 +.. date: 2017-10-19-20-03-13 +.. nonce: mw2wF9 +.. section: Library +Add AbstractEventLoop.sock_recv_into(). +.. +.. bpo: 31457 +.. date: 2017-10-18-19-05-17 +.. nonce: KlE6r8 +.. section: Library +If nested log adapters are used, the inner ``process()`` methods are no +longer omitted. +.. +.. bpo: 31457 +.. date: 2017-10-18-16-48-09 +.. nonce: _ovmzp +.. section: Library +The ``manager`` property on LoggerAdapter objects is now properly settable. +.. +.. bpo: 31806 +.. date: 2017-10-17-23-27-03 +.. nonce: TzphdL +.. section: Library +Fix timeout rounding in time.sleep(), threading.Lock.acquire() and +socket.socket.settimeout() to round correctly negative timeouts between -1.0 +and 0.0. The functions now block waiting for events as expected. Previously, +the call was incorrectly non-blocking. Patch by Pablo Galindo. +.. +.. bpo: 31803 +.. date: 2017-10-17-22-55-13 +.. nonce: YLL1gJ +.. section: Library +time.clock() and time.get_clock_info('clock') now emit a DeprecationWarning +warning. +.. +.. bpo: 31800 +.. date: 2017-10-17-20-08-19 +.. nonce: foOSCi +.. section: Library +Extended support for parsing UTC offsets. strptime '%z' can now parse the +output generated by datetime.isoformat, including seconds and microseconds. +.. +.. bpo: 28603 +.. date: 2017-10-17-12-29-18 +.. nonce: tGuX2C +.. section: Library +traceback: Fix a TypeError that occurred during printing of exception +tracebacks when either the current exception or an exception in its +context/cause chain is unhashable. Patch by Zane Bitter. +.. +.. bpo: 30541 +.. date: 2017-10-17-12-04-37 +.. nonce: q3BM6C +.. section: Library +Add new function to seal a mock and prevent the automatically creation of +child mocks. Patch by Mario Corchero. +.. +.. bpo: 31784 +.. date: 2017-10-13-23-35-47 +.. nonce: 6e57bd +.. section: Library +Implement the :pep:`564`, add new 6 new functions with nanosecond resolution +to the :mod:`time` module: :func:`~time.clock_gettime_ns`, +:func:`~time.clock_settime_ns`, :func:`~time.monotonic_ns`, +:func:`~time.perf_counter_ns`, :func:`~time.process_time_ns`, +:func:`~time.time_ns`. +.. +.. bpo: 30143 +.. date: 2017-10-12-19-05-54 +.. nonce: 25_hU1 +.. section: Library +2to3 now generates a code that uses abstract collection classes from +collections.abc rather than collections. +.. +.. bpo: 31770 +.. date: 2017-10-12-18-45-38 +.. nonce: GV3MPx +.. section: Library +Prevent a crash when calling the ``__init__()`` method of a +``sqlite3.Cursor`` object more than once. Patch by Oren Milman. +.. +.. bpo: 31764 +.. date: 2017-10-11-22-18-04 +.. nonce: EMyIkK +.. section: Library +Prevent a crash in ``sqlite3.Cursor.close()`` in case the ``Cursor`` object +is uninitialized. Patch by Oren Milman. +.. +.. bpo: 31752 +.. date: 2017-10-11-00-45-01 +.. nonce: DhWevN +.. section: Library +Fix possible crash in timedelta constructor called with custom integers. +.. +.. bpo: 31620 +.. date: 2017-10-06-04-35-31 +.. nonce: gksLA1 +.. section: Library +an empty asyncio.Queue now doesn't leak memory when queue.get pollers +timeout +.. +.. bpo: 31690 +.. date: 2017-10-05-15-14-46 +.. nonce: f0XteV +.. section: Library +Allow the flags re.ASCII, re.LOCALE, and re.UNICODE to be used as group +flags for regular expressions. +.. +.. bpo: 30349 +.. date: 2017-10-05-12-45-29 +.. nonce: 6zKJsF +.. section: Library +FutureWarning is now emitted if a regular expression contains character set +constructs that will change semantically in the future (nested sets and set +operations). +.. +.. bpo: 31664 +.. date: 2017-10-04-20-36-28 +.. nonce: 4VDUzo +.. section: Library +Added support for the Blowfish hashing in the crypt module. +.. +.. bpo: 31632 +.. date: 2017-10-04-11-37-14 +.. nonce: LiOC3C +.. section: Library +Fix method set_protocol() of class _SSLProtocolTransport in asyncio module. +This method was previously modifying a wrong reference to the protocol. +.. +.. bpo: 15037 +.. date: 2017-09-29-19-19-36 +.. nonce: ykimLK +.. section: Library +Added a workaround for getkey() in curses for ncurses 5.7 and earlier. +.. +.. bpo: 31307 +.. date: 2017-09-07-12-50-28 +.. nonce: AVBiNY +.. section: Library +Allow use of bytes objects for arguments to +:meth:`configparser.ConfigParser.read`. Patch by Vincent Michel. +.. +.. bpo: 31334 +.. date: 2017-09-04-00-22-31 +.. nonce: 9WYRfi +.. section: Library +Fix ``poll.poll([timeout])`` in the ``select`` module for arbitrary negative +timeouts on all OSes where it can only be a non-negative integer or -1. +Patch by Riccardo Coccioli. +.. +.. bpo: 31310 +.. date: 2017-08-30-18-23-54 +.. nonce: 7D1UNt +.. section: Library +multiprocessing's semaphore tracker should be launched again if crashed. +.. +.. bpo: 31308 +.. date: 2017-08-30-17-59-36 +.. nonce: KbexyC +.. section: Library +Make multiprocessing's forkserver process immune to Ctrl-C and other user +interruptions. If it crashes, restart it when necessary. +.. +.. bpo: 31245 +.. date: 2017-08-22-11-05-35 +.. nonce: AniZuz +.. section: Library +Added support for AF_UNIX socket in asyncio ``create_datagram_endpoint``. +.. +.. bpo: 30553 +.. date: 2017-07-05-14-48-26 +.. nonce: Oupsxo +.. section: Library +Add HTTP/2 status code 421 (Misdirected Request) to +:class:`http.HTTPStatus`. Patch by Vitor Pereira. +.. +.. bpo: 32105 +.. date: 2017-11-21-10-54-16 +.. nonce: 91mhWm +.. section: Documentation +Added asyncio.BaseEventLoop.connect_accepted_socket versionadded marker. +.. +.. bpo: 31380 +.. date: 2017-12-04-23-19-16 +.. nonce: VlMmHW +.. section: Tests +Skip test_httpservers test_undecodable_file on macOS: fails on APFS. +.. +.. bpo: 31705 +.. date: 2017-11-30-12-27-10 +.. nonce: yULW7O +.. section: Tests +Skip test_socket.test_sha256() on Linux kernel older than 4.5. The test +fails with ENOKEY on kernel 3.10 (on ppc64le). A fix was merged into the +kernel 4.5. +.. +.. bpo: 32138 +.. date: 2017-11-27-16-18-58 +.. nonce: QsTvf- +.. section: Tests +Skip on Android test_faulthandler tests that raise SIGSEGV and remove the +test.support.requires_android_level decorator. +.. +.. bpo: 32136 +.. date: 2017-11-26-17-11-27 +.. nonce: Y11luJ +.. section: Tests +The runtime embedding tests have been split out from +``Lib/test/test_capi.py`` into a new ``Lib/test/test_embed.py`` file. +.. +.. bpo: 28668 +.. date: 2017-11-25-14-53-29 +.. nonce: Y1G6pA +.. section: Tests +test.support.requires_multiprocessing_queue is removed. Skip tests with +test.support.import_module('multiprocessing.synchronize') instead when the +semaphore implementation is broken or missing. +.. +.. bpo: 32126 +.. date: 2017-11-24-18-15-12 +.. nonce: PLmNLn +.. section: Tests +Skip test_get_event_loop_new_process in test.test_asyncio.test_events when +sem_open() is not functional. +.. +.. bpo: 31174 +.. date: 2017-10-24-11-36-10 +.. nonce: xCvXcr +.. section: Tests +Fix test_tools.test_unparse: DirectoryTestCase now stores the names sample +to always test the same files. It prevents false alarms when hunting +reference leaks. +.. +.. bpo: 28538 +.. date: 2017-11-21-17-27-59 +.. nonce: DsNBS7 +.. section: Build +Revert the previous changes, the if_nameindex structure is defined by +Unified Headers. +.. +.. bpo: 28762 +.. date: 2017-11-21-17-12-24 +.. nonce: R6uu8w +.. section: Build +Revert the last commit, the F_LOCK macro is defined by Android Unified +Headers. +.. +.. bpo: 29040 +.. date: 2017-11-21-16-56-24 +.. nonce: 14lCSr +.. section: Build +Support building Android with Unified Headers. The first NDK release to +support Unified Headers is android-ndk-r14. +.. +.. bpo: 32059 +.. date: 2017-11-18-11-19-28 +.. nonce: a0Hxgp +.. section: Build +``detect_modules()`` in ``setup.py`` now also searches the sysroot paths +when cross-compiling. +.. +.. bpo: 31957 +.. date: 2017-11-06-11-53-39 +.. nonce: S_1jFK +.. section: Build +Fixes Windows SDK version detection when building for Windows. +.. +.. bpo: 31609 +.. date: 2017-11-04-15-35-08 +.. nonce: k7_nBR +.. section: Build +Fixes quotes in PCbuild/clean.bat +.. +.. bpo: 31934 +.. date: 2017-11-03-15-17-50 +.. nonce: 8bUlpv +.. section: Build +Abort the build when building out of a not clean source tree. +.. +.. bpo: 31926 +.. date: 2017-11-03-10-07-14 +.. nonce: 57wE98 +.. section: Build +Fixed Argument Clinic sometimes causing compilation errors when there was +more than one function and/or method in a .c file with the same name. +.. +.. bpo: 28791 +.. date: 2017-11-02-20-30-57 +.. nonce: VaE3o8 +.. section: Build +Update Windows builds to use SQLite 3.21.0. +.. +.. bpo: 28791 +.. date: 2017-11-02-20-13-46 +.. nonce: STt3jL +.. section: Build +Update OS X installer to use SQLite 3.21.0. +.. +.. bpo: 28643 +.. date: 2017-11-01-14-16-27 +.. nonce: 9iPKJy +.. section: Build +Record profile-opt build progress with stamp files. +.. +.. bpo: 31866 +.. date: 2017-10-24-23-21-13 +.. nonce: MkNO66 +.. section: Build +Finish removing support for AtheOS. +.. +.. bpo: 1102 +.. date: 2017-11-19-09-46-27 +.. nonce: NY-g1F +.. section: Windows +Return ``None`` when ``View.Fetch()`` returns ``ERROR_NO_MORE_ITEMS`` +instead of raising ``MSIError``. +Initial patch by Anthony Tuininga. +.. +.. bpo: 31944 +.. date: 2017-11-04-15-29-47 +.. nonce: 0Bx8tZ +.. section: Windows +Fixes Modify button in Apps and Features dialog. +.. +.. bpo: 20486 +.. date: 2017-10-26-23-02-57 +.. nonce: 3IdsZ1 +.. section: Windows +Implement the ``Database.Close()`` method to help closing MSI database +objects. +.. +.. bpo: 31857 +.. date: 2017-10-23-18-35-50 +.. nonce: YwhEvc +.. section: Windows +Make the behavior of USE_STACKCHECK deterministic in a multi-threaded +environment. +.. +.. bpo: 31392 +.. date: 2017-12-04-21-57-43 +.. nonce: f8huBC +.. section: macOS +Update macOS installer to use OpenSSL 1.0.2m +.. +.. bpo: 32207 +.. date: 2017-12-04-15-04-43 +.. nonce: IzyAJo +.. section: IDLE +Improve tk event exception tracebacks in IDLE. When tk event handling is +driven by IDLE's run loop, a confusing and distracting queue.EMPTY traceback +context is no longer added to tk event exception tracebacks. The traceback +is now the same as when event handling is driven by user code. Patch based +on a suggestion by Serhiy Storchaka. +.. +.. bpo: 32164 +.. date: 2017-11-28-21-47-15 +.. nonce: 2T2Na8 +.. section: IDLE +Delete unused file idlelib/tabbedpages.py. Use of TabbedPageSet in +configdialog was replaced by ttk.Notebook. +.. +.. bpo: 32100 +.. date: 2017-11-21-08-26-08 +.. nonce: P43qx2 +.. section: IDLE +IDLE: Fix old and new bugs in pathbrowser; improve tests. Patch mostly by +Cheryl Sabella. +.. +.. bpo: 31858 +.. date: 2017-10-26-20-20-19 +.. nonce: VuSA_e +.. section: IDLE +IDLE -- Restrict shell prompt manipulation to the shell. Editor and output +windows only see an empty last prompt line. This simplifies the code and +fixes a minor bug when newline is inserted. Sys.ps1, if present, is read on +Shell start-up, but is not set or changed. +.. +.. bpo: 31860 +.. date: 2017-10-24-16-21-50 +.. nonce: gECuWx +.. section: IDLE +The font sample in the IDLE configuration dialog is now editable. Changes +persist while IDLE remains open +.. +.. bpo: 31836 +.. date: 2017-10-21-15-41-53 +.. nonce: fheLME +.. section: IDLE +Test_code_module now passes if run after test_idle, which sets ps1. +The code module uses sys.ps1 if present or sets it to '>>> ' if not. +Test_code_module now properly tests both behaviors. Ditto for ps2. +.. +.. bpo: 28603 +.. date: 2017-10-17-13-26-13 +.. nonce: TMEQfp +.. section: IDLE +Fix a TypeError that caused a shell restart when printing a traceback that +includes an exception that is unhashable. Patch by Zane Bitter. +.. +.. bpo: 13802 +.. date: 2017-10-12-00-51-29 +.. nonce: VwjZRD +.. section: IDLE +Use non-Latin characters in the IDLE's Font settings sample. Even if one +selects a font that defines a limited subset of the unicode Basic +Multilingual Plane, tcl/tk will use other fonts that define a character. The +expanded example give users of non-Latin characters a better idea of what +they might see in IDLE's shell and editors. +To make room for the expanded sample, frames on the Font tab are +re-arranged. The Font/Tabs help explains a bit about the additions. +.. +.. bpo: 32159 +.. date: 2017-11-28-21-24-41 +.. nonce: RSl4QK +.. section: Tools/Demos +Remove CVS and Subversion tools: remove svneol.py and treesync.py scripts. +CPython migrated from CVS to Subversion, to Mercurial, and then to Git. CVS +and Subversion are no longer used to develop CPython. +.. +.. bpo: 30722 +.. date: 2017-10-23-19-45-52 +.. nonce: ioRlAu +.. section: Tools/Demos +Make redemo work with Python 3.6 and newer versions. +Also, remove the ``LOCALE`` option since it doesn't work with string +patterns in Python 3. +Patch by Christoph Sarnowski. +.. +.. bpo: 20891 +.. date: 2017-11-30-18-13-45 +.. nonce: wBnMdF +.. section: C API +Fix PyGILState_Ensure(). When PyGILState_Ensure() is called in a non-Python +thread before PyEval_InitThreads(), only call PyEval_InitThreads() after +calling PyThreadState_New() to fix a crash. +.. +.. bpo: 32125 +.. date: 2017-11-24-21-25-43 +.. nonce: K8zWgn +.. section: C API +The ``Py_UseClassExceptionsFlag`` flag has been removed. It was deprecated +and wasn't used anymore since Python 2.0. +.. +.. bpo: 25612 +.. date: 2017-10-22-13-12-28 +.. nonce: 1jnWKT +.. section: C API +Move the current exception state from the frame object to the co-routine. +This simplifies the interpreter and fixes a couple of obscure bugs caused by +having swap exception state when entering or exiting a generator. +.. +.. bpo: 23699 +.. date: 2017-10-19-15-27-04 +.. nonce: -noVVc +.. section: C API +Add Py_RETURN_RICHCOMPARE macro to reduce boilerplate code in rich +comparison functions. +.. +.. bpo: 30697 +.. date: 2017-06-30-11-58-01 +.. nonce: Q3T_8n +.. section: C API +The ``PyExc_RecursionErrorInst`` singleton is removed and +``PyErr_NormalizeException()`` does not use it anymore. This singleton is +persistent and its members being never cleared may cause a segfault during +finalization of the interpreter. See also issue #22898. + +.. bpo: 43434 +.. date: 2021-05-02-17-50-23 +.. nonce: cy7xz6 +.. release date: 2021-05-03 +.. section: Security +Creating :class:`sqlite3.Connection` objects now also produces +``sqlite3.connect`` and ``sqlite3.connect/handle`` :ref:`auditing events +`. Previously these events were only produced by +:func:`sqlite3.connect` calls. Patch by Erlend E. Aasland. +.. +.. bpo: 43998 +.. date: 2021-05-01-13-13-40 +.. nonce: xhmWD7 +.. section: Security +The :mod:`ssl` module sets more secure cipher suites defaults. Ciphers +without forward secrecy and with SHA-1 MAC are disabled by default. Security +level 2 prohibits weak RSA, DH, and ECC keys with less than 112 bits of +security. :class:`~ssl.SSLContext` defaults to minimum protocol version TLS +1.2. Settings are based on Hynek Schlawack's research. +.. +.. bpo: 43882 +.. date: 2021-04-25-07-46-37 +.. nonce: Jpwx85 +.. section: Security +The presence of newline or tab characters in parts of a URL could allow some +forms of attacks. +Following the controlling specification for URLs defined by WHATWG +:func:`urllib.parse` now removes ASCII newlines and tabs from URLs, +preventing such attacks. +.. +.. bpo: 43472 +.. date: 2021-04-21-22-53-31 +.. nonce: gjLBTb +.. section: Security +Ensures interpreter-level audit hooks receive the +``cpython.PyInterpreterState_New`` event when called through the +``_xxsubinterpreters`` module. +.. +.. bpo: 43362 +.. date: 2021-04-18-00-56-44 +.. nonce: __5aiP +.. section: Security +Fix invalid free in _sha3 module. The issue was introduced in 3.10.0a1. +Python 3.9 and earlier are not affected. +.. +.. bpo: 43762 +.. date: 2021-04-07-12-57-41 +.. nonce: 7lMtpT +.. section: Security +Add audit events for :func:`sqlite3.connect/handle`, +:meth:`sqlite3.Connection.enable_load_extension`, and +:meth:`sqlite3.Connection.load_extension`. Patch by Erlend E. Aasland. +.. +.. bpo: 43756 +.. date: 2021-04-06-18-07-48 +.. nonce: DLBNqQ +.. section: Security +Add new audit event ``glob.glob/2`` to incorporate the new *root_dir* and +*dir_fd* arguments added to :func:`glob.glob` and :func:`glob.iglob`. +.. +.. bpo: 36384 +.. date: 2021-03-30-16-29-51 +.. nonce: sCAmLs +.. section: Security +:mod:`ipaddress` module no longer accepts any leading zeros in IPv4 address +strings. Leading zeros are ambiguous and interpreted as octal notation by +some libraries. For example the legacy function :func:`socket.inet_aton` +treats leading zeros as octal notation. glibc implementation of modern +:func:`~socket.inet_pton` does not accept any leading zeros. For a while the +:mod:`ipaddress` module used to accept ambiguous leading zeros. +.. +.. bpo: 43075 +.. date: 2021-01-31-05-28-14 +.. nonce: DoAXqO +.. section: Security +Fix Regular Expression Denial of Service (ReDoS) vulnerability in +:class:`urllib.request.AbstractBasicAuthHandler`. The ReDoS-vulnerable +regex has quadratic worst-case complexity and it allows cause a denial of +service when identifying crafted invalid RFCs. This ReDoS issue is on the +client side and needs remote attackers to control the HTTP server. +.. +.. bpo: 42800 +.. date: 2021-01-09-17-07-36 +.. nonce: _dtZvW +.. section: Security +Audit hooks are now fired for frame.f_code, traceback.tb_frame, and +generator code/frame attribute access. +.. +.. bpo: 37363 +.. date: 2020-07-04-22-14-46 +.. nonce: NDjHNw +.. section: Security +Add audit events to the :mod:`http.client` module. +.. +.. bpo: 43977 +.. date: 2021-05-02-11-59-00 +.. nonce: R0hSDo +.. section: Core and Builtins +Prevent classes being both a sequence and a mapping when pattern matching. +.. +.. bpo: 43977 +.. date: 2021-04-29-17-40-25 +.. nonce: FrQhge +.. section: Core and Builtins +Use :c:member:`~PyTypeObject.tp_flags` on the class object to determine if +the subject is a sequence or mapping when pattern matching. Avoids the need +to import :mod:`collections.abc` when pattern matching. +.. +.. bpo: 43892 +.. date: 2021-04-29-16-00-28 +.. nonce: WXIehI +.. section: Core and Builtins +Restore proper validation of complex literal value patterns when parsing +:keyword:`!match` blocks. +.. +.. bpo: 43933 +.. date: 2021-04-29-13-49-57 +.. nonce: TueFdQ +.. section: Core and Builtins +Set frame.f_lineno to the line number of the 'with' kweyword when executing +the call to ``__exit__``. +.. +.. bpo: 43933 +.. date: 2021-04-29-13-11-44 +.. nonce: mvoV6O +.. section: Core and Builtins +If the current position in a frame has no line number then set the f_lineno +attribute to None, instead of -1, to conform to PEP 626. This should not +normally be possible, but might occur in some unusual circumstances. +.. +.. bpo: 43963 +.. date: 2021-04-28-01-23-38 +.. nonce: u5Y6bS +.. section: Core and Builtins +Importing the :mod:`!_signal` module in a subinterpreter has no longer side +effects. +.. +.. bpo: 42739 +.. date: 2021-04-27-10-59-10 +.. nonce: PrVkKM +.. section: Core and Builtins +The internal representation of line number tables is changed to not use +sentinels, and an explicit length parameter is added to the out of process +API function ``PyLineTable_InitAddressRange``. This makes the handling of +line number tables more robust in some circumstances. +.. +.. bpo: 43908 +.. date: 2021-04-26-21-20-41 +.. nonce: 2L51nO +.. section: Library +Make :mod:`re` types immutable. Patch by Erlend E. Aasland. +.. +.. bpo: 43908 +.. date: 2021-04-26-20-59-17 +.. nonce: -COW4- +.. section: Library +Make the :class:`array.array` type immutable. Patch by Erlend E. Aasland. +.. +.. bpo: 43901 +.. date: 2021-04-25-22-50-47 +.. nonce: oKjG5E +.. section: Core and Builtins +Change class and module objects to lazy-create empty annotations dicts on +demand. The annotations dicts are stored in the object's __dict__ for +backwards compatibility. +.. +.. bpo: 43892 +.. date: 2021-04-25-08-35-11 +.. nonce: hr5Ke2 +.. section: Core and Builtins +Match patterns now use new dedicated AST nodes (``MatchValue``, +``MatchSingleton``, ``MatchSequence``, ``MatchStar``, ``MatchMapping``, +``MatchClass``) rather than reusing expression AST nodes. ``MatchAs`` and +``MatchOr`` are now defined as pattern nodes rather than as expression +nodes. Patch by Nick Coghlan. +.. +.. bpo: 42725 +.. date: 2021-04-25-05-40-51 +.. nonce: WGloYm +.. section: Core and Builtins +Usage of ``await``/``yield``/``yield from`` and named expressions within an +annotation is now forbidden when PEP 563 is activated. +.. +.. bpo: 43754 +.. date: 2021-04-24-16-40-23 +.. nonce: 9SzHWG +.. section: Core and Builtins +When performing structural pattern matching (:pep:`634`), captured names are +now left unbound until the *entire* pattern has matched successfully. +.. +.. bpo: 42737 +.. date: 2021-04-22-22-48-30 +.. nonce: lsJ7pD +.. section: Core and Builtins +Annotations for complex targets (everything beside simple names) no longer +cause any runtime effects with ``from __future__ import annotations``. +.. +.. bpo: 43914 +.. date: 2021-04-22-19-09-58 +.. nonce: 0Ik1AM +.. section: Core and Builtins +:exc:`SyntaxError` exceptions raised by the interpreter will highlight the +full error range of the expression that constitutes the syntax error itself, +instead of just where the problem is detected. Patch by Pablo Galindo. +.. +.. bpo: 38605 +.. date: 2021-04-20-22-17-47 +.. nonce: 9eeCNZ +.. section: Core and Builtins +Revert making ``from __future__ import annotations`` the default. This +follows the Steering Council decision to postpone PEP 563 changes to at +least Python 3.11. See the original email for more information regarding the +decision: +https://mail.python.org/archives/list/python-dev@python.org/thread/CLVXXPQ2T2LQ5MP2Y53VVQFCXYWQJHKZ/. +Patch by Pablo Galindo. +.. +.. bpo: 43475 +.. date: 2021-04-20-20-10-46 +.. nonce: oV8Mbs +.. section: Core and Builtins +Hashes of NaN values now depend on object identity. Formerly, they always +hashed to 0 even though NaN values are not equal to one another. Having the +same hash for unequal values caused pile-ups in hash tables. +.. +.. bpo: 43859 +.. date: 2021-04-16-01-26-57 +.. nonce: QfqjFL +.. section: Core and Builtins +Improve the error message for :exc:`IndentationError` exceptions. Patch by +Pablo Galindo +.. +.. bpo: 41323 +.. date: 2021-04-15-10-19-59 +.. nonce: nsvpSg +.. section: Core and Builtins +Constant tuple folding in bytecode optimizer now reuses tuple in constant +table. +.. +.. bpo: 43846 +.. date: 2021-04-14-13-53-08 +.. nonce: 2jO97c +.. section: Core and Builtins +Data stack usage is much reduced for large literal and call expressions. +.. +.. bpo: 38530 +.. date: 2021-04-14-03-53-06 +.. nonce: rNI_G1 +.. section: Core and Builtins +When printing :exc:`NameError` raised by the interpreter, +:c:func:`PyErr_Display` will offer suggestions of similar variable names in +the function that the exception was raised from. Patch by Pablo Galindo +.. +.. bpo: 43823 +.. date: 2021-04-13-03-06-09 +.. nonce: xpuHBi +.. section: Core and Builtins +Improve syntax errors for invalid dictionary literals. Patch by Pablo +Galindo. +.. +.. bpo: 43822 +.. date: 2021-04-13-02-32-18 +.. nonce: lej0OO +.. section: Core and Builtins +Improve syntax errors in the parser for missing commas between expressions. +Patch by Pablo Galindo. +.. +.. bpo: 43798 +.. date: 2021-04-10-00-01-43 +.. nonce: p_nJFM +.. section: Core and Builtins +:class:`ast.alias` nodes now include source location metadata attributes +e.g. lineno, col_offset. +.. +.. bpo: 43797 +.. date: 2021-04-09-19-12-48 +.. nonce: HfRqNP +.. section: Core and Builtins +Improve ``SyntaxError`` error messages for invalid comparisons. Patch by +Pablo Galindo. +.. +.. bpo: 43760 +.. date: 2021-04-08-12-20-29 +.. nonce: tBIsD8 +.. section: Core and Builtins +Move the flag for checking whether tracing is enabled to the C stack, from +the heap. Should speed up dispatch in the interpreter. +.. +.. bpo: 43682 +.. date: 2021-04-08-01-06-22 +.. nonce: eUn4p5 +.. section: Core and Builtins +Static methods (:deco:`staticmethod`) and class methods +(:deco:`classmethod`) now inherit the method attributes +(``__module__``, ``__name__``, ``__qualname__``, ``__doc__``, +``__annotations__``) and have a new ``__wrapped__`` attribute. Patch by +Victor Stinner. +.. +.. bpo: 43751 +.. date: 2021-04-07-18-00-05 +.. nonce: 8fHsqQ +.. section: Core and Builtins +Fixed a bug where ``anext(ait, default)`` would erroneously return None. +.. +.. bpo: 42128 +.. date: 2021-04-05-17-38-08 +.. nonce: 1uVeGK +.. section: Core and Builtins +:data:`~object.__match_args__` is no longer allowed to be a list. +.. +.. bpo: 43683 +.. date: 2021-04-01-12-30-30 +.. nonce: AjxOx2 +.. section: Core and Builtins +Add GEN_START opcode. Marks start of generator, including async, or +coroutine and handles sending values to a newly created generator or +coroutine. +.. +.. bpo: 43105 +.. date: 2021-03-31-20-35-11 +.. nonce: PBVmHm +.. section: Library +Importlib now resolves relative paths when creating module spec objects from +file locations. +.. +.. bpo: 43682 +.. date: 2021-03-31-16-32-57 +.. nonce: VSF3vg +.. section: Core and Builtins +Static methods (:deco:`staticmethod`) are now callable as +regular functions. Patch by Victor Stinner. +.. +.. bpo: 42609 +.. date: 2020-12-12-14-28-31 +.. nonce: Qcd54b +.. section: Core and Builtins +Prevented crashes in the AST validator and optimizer when compiling some +absurdly long expressions like ``"+0"*1000000``. :exc:`RecursionError` is +now raised instead. +.. +.. bpo: 38530 +.. date: 2019-10-27-20-20-07 +.. nonce: ZyoDNn +.. section: Core and Builtins +When printing :exc:`AttributeError`, :c:func:`PyErr_Display` will offer +suggestions of similar attribute names in the object that the exception was +raised from. Patch by Pablo Galindo +.. +.. bpo: 44015 +.. date: 2021-05-03-03-03-49 +.. nonce: V5936k +.. section: Library +In @dataclass(), raise a TypeError if KW_ONLY is specified more than once. +.. +.. bpo: 25478 +.. date: 2021-05-02-19-17-20 +.. nonce: AwlwdA +.. section: Library +Added a *total()* method to collections.Counter() to compute the sum of the +counts. +.. +.. bpo: 43733 +.. date: 2021-05-01-22-59-20 +.. nonce: gJWwEQ +.. section: Library +Change :class:`netrc.netrc` to use UTF-8 encoding before using locale +encoding. +.. +.. bpo: 43979 +.. date: 2021-05-01-01-36-51 +.. nonce: 43oJ9L +.. section: Library +Removed an unnecessary list comprehension before looping from +:func:`urllib.parse.parse_qsl`. Patch by Christoph Zwerschke and Donghee +Na. +.. +.. bpo: 43993 +.. date: 2021-04-30-19-23-45 +.. nonce: T7_yoq +.. section: Library +Update bundled pip to 21.1.1. +.. +.. bpo: 43957 +.. date: 2021-04-27-12-13-51 +.. nonce: 6EaPD- +.. section: Library +[Enum] Deprecate ``TypeError`` when non-member is used in a containment +check; In 3.12 ``True`` or ``False`` will be returned instead, and +containment will return ``True`` if the value is either a member of that +enum or one of its members' value. +.. +.. bpo: 42904 +.. date: 2021-04-26-23-39-47 +.. nonce: ejjsyR +.. section: Library +For backwards compatibility with previous minor versions of Python, if +:func:`typing.get_type_hints` receives no namespace dictionary arguments, +:func:`typing.get_type_hints` will search through the global then local +namespaces during evaluation of stringized type annotations (string forward +references) inside a class. +.. +.. bpo: 43945 +.. date: 2021-04-26-20-52-16 +.. nonce: NgERXO +.. section: Library +[Enum] Deprecate non-standard mixin format() behavior: in 3.12 the enum +member, not the member's value, will be used for format() calls. +.. +.. bpo: 41139 +.. date: 2021-04-26-17-47-48 +.. nonce: ROhn1k +.. section: Library +Deprecate undocumented ``cgi.log()`` API. +.. +.. bpo: 43937 +.. date: 2021-04-25-13-34-13 +.. nonce: isx95l +.. section: Library +Fixed the :mod:`turtle` module working with non-default root window. +.. +.. bpo: 43930 +.. date: 2021-04-24-14-23-07 +.. nonce: R7ah0m +.. section: Library +Update bundled pip to 21.1 and setuptools to 56.0.0 +.. +.. bpo: 43907 +.. date: 2021-04-23-20-57-20 +.. nonce: 3RJEjv +.. section: Library +Fix a bug in the pure-Python pickle implementation when using protocol 5, +where bytearray instances that occur several time in the pickled object +graph would incorrectly unpickle into repeated copies of the bytearray +object. +.. +.. bpo: 43926 +.. date: 2021-04-23-17-48-55 +.. nonce: HMUlGU +.. section: Library +In ``importlib.metadata``, provide a uniform interface to ``Description``, +allow for any field to be encoded with multiline values, remove continuation +lines from multiline values, and add a ``.json`` property for easy access to +the PEP 566 JSON-compatible form. Sync with ``importlib_metadata 4.0``. +.. +.. bpo: 43920 +.. date: 2021-04-23-11-54-38 +.. nonce: cJMQ2D +.. section: Library +OpenSSL 3.0.0: :meth:`~ssl.SSLContext.load_verify_locations` now returns a +consistent error message when cadata contains no valid certificate. +.. +.. bpo: 43607 +.. date: 2021-04-22-22-39-58 +.. nonce: 7IYDkG +.. section: Library +:mod:`urllib` can now convert Windows paths with ``\\?\`` prefixes into URL +paths. +.. +.. bpo: 43817 +.. date: 2021-04-22-04-12-13 +.. nonce: FQ-XlH +.. section: Library +Add :func:`inspect.get_annotations`, which safely computes the annotations +defined on an object. It works around the quirks of accessing the +annotations from various types of objects, and makes very few assumptions +about the object passed in. :func:`inspect.get_annotations` can also +correctly un-stringize stringized annotations. +:func:`inspect.signature`, :func:`inspect.from_callable`, and +:func:`inspect.from_function` now call :func:`inspect.get_annotations` to +retrieve annotations. This means :func:`inspect.signature` and +:func:`inspect.from_callable` can now un-stringize stringized annotations, +too. +.. +.. bpo: 43284 +.. date: 2021-04-21-14-50-57 +.. nonce: 2QZn2T +.. section: Library +platform.win32_ver derives the windows version from +sys.getwindowsversion().platform_version which in turn derives the version +from kernel32.dll (which can be of a different version than Windows itself). +Therefore change the platform.win32_ver to determine the version using the +platform module's _syscmd_ver private function to return an accurate +version. +.. +.. bpo: 42854 +.. date: 2021-04-19-03-54-29 +.. nonce: Y4M7Tv +.. section: Library +The :mod:`ssl` module now uses ``SSL_read_ex`` and ``SSL_write_ex`` +internally. The functions support reading and writing of data larger than 2 +GB. Writing zero-length data no longer fails with a protocol violation +error. +.. +.. bpo: 42333 +.. date: 2021-04-17-19-31-17 +.. nonce: cgbtZO +.. section: Library +Port ``_ssl`` extension module to multiphase initialization. +.. +.. bpo: 43880 +.. date: 2021-04-17-13-53-33 +.. nonce: -fC2JD +.. section: Library +:mod:`ssl` now raises DeprecationWarning for OP_NO_SSL/TLS* options, old TLS +versions, old protocols, and other features that have been deprecated since +Python 3.6, 3.7, or OpenSSL 1.1.0. +.. +.. bpo: 41559 +.. date: 2021-04-17-10-49-57 +.. nonce: caIwt9 +.. section: Library +:pep:`612` is now implemented purely in Python; builtin +``types.GenericAlias`` objects no longer include ``typing.ParamSpec`` in +``__parameters__`` (with the exception of ``collections.abc.Callable``\ 's +``GenericAlias``). This means previously invalid uses of ``ParamSpec`` (such +as ``list[P]``) which worked in earlier versions of Python 3.10 alpha, will +now raise ``TypeError`` during substitution. +.. +.. bpo: 43867 +.. date: 2021-04-16-16-46-44 +.. nonce: xT9QjF +.. section: Library +The :mod:`multiprocessing` ``Server`` class now explicitly catches +:exc:`SystemExit` and closes the client connection in this case. It happens +when the ``Server.serve_client()`` method reaches the end of file (EOF). +.. +.. bpo: 40443 +.. date: 2021-04-16-02-03-00 +.. nonce: Io6FHL +.. section: Library +Remove unused imports: pyclbr no longer uses copy, and typing no longer uses +ast. Patch by Victor Stinner. +.. +.. bpo: 43820 +.. date: 2021-04-12-18-01-10 +.. nonce: YkqYW4 +.. section: Library +Remove an unneeded copy of the namespace passed to +dataclasses.make_dataclass(). +.. +.. bpo: 43787 +.. date: 2021-04-12-15-15-50 +.. nonce: wCy_Wd +.. section: Library +Add ``__iter__()`` method to :class:`bz2.BZ2File`, :class:`gzip.GzipFile`, +and :class:`lzma.LZMAFile`. It makes iterating them about 2x faster. Patch +by Inada Naoki. +.. +.. bpo: 43680 +.. date: 2021-04-12-11-20-34 +.. nonce: SR0Epv +.. section: Library +Deprecate io.OpenWrapper and _pyio.OpenWrapper: use io.open and _pyio.open +instead. Until Python 3.9, _pyio.open was not a static method and +builtins.open was set to OpenWrapper to not become a bound method when set +to a class variable. _io.open is a built-in function whereas _pyio.open is a +Python function. In Python 3.10, _pyio.open() is now a static method, and +builtins.open() is now io.open(). +.. +.. bpo: 43680 +.. date: 2021-04-12-09-57-37 +.. nonce: o1zEk_ +.. section: Library +The Python :func:`!_pyio.open` function becomes a static method to behave as +:func:`io.open` built-in function: don't become a bound method when stored +as a class variable. It becomes possible since static methods are now +callable in Python 3.10. Moreover, :func:`!_pyio.OpenWrapper` becomes a +simple alias to :func:`!_pyio.open`. Patch by Victor Stinner. +.. +.. bpo: 41515 +.. date: 2021-04-12-06-01-10 +.. nonce: YaVReb +.. section: Library +Fix :exc:`KeyError` raised in :func:`typing.get_type_hints` due to synthetic +modules that don't appear in ``sys.modules``. +.. +.. bpo: 43776 +.. date: 2021-04-12-00-00-00 +.. nonce: p14y7a +.. section: Library +When :class:`subprocess.Popen` args are provided as a string or as +:class:`pathlib.Path`, the Popen instance repr now shows the right thing. +.. +.. bpo: 42248 +.. date: 2021-04-11-21-10-57 +.. nonce: pedB1E +.. section: Library +[Enum] ensure exceptions raised in ``_missing__`` are released +.. +.. bpo: 43744 +.. date: 2021-04-11-20-52-32 +.. nonce: uf0E68 +.. section: Library +fix issue with enum member name matching the start of a private variable +name +.. +.. bpo: 43772 +.. date: 2021-04-10-19-14-49 +.. nonce: Bxq0zQ +.. section: Library +Fixed the return value of ``TypeVar.__ror__``. Patch by Jelle Zijlstra. +.. +.. bpo: 43764 +.. date: 2021-04-10-18-23-09 +.. nonce: Le5KJp +.. section: Library +Add match_args parameter to @dataclass decorator to allow suppression of +__match_args__ generation. +.. +.. bpo: 43799 +.. date: 2021-04-10-11-35-50 +.. nonce: 1iV4pX +.. section: Library +OpenSSL 3.0.0: define ``OPENSSL_API_COMPAT`` 1.1.1 to suppress deprecation +warnings. Python requires OpenSSL 1.1.1 APIs. +.. +.. bpo: 43478 +.. date: 2021-04-10-03-30-36 +.. nonce: iZcBTq +.. section: Library +Mocks can no longer be used as the specs for other Mocks. As a result, an +already-mocked object cannot have an attribute mocked using +``autospec=True`` or be the subject of a ``create_autospec(...)`` call. This +can uncover bugs in tests since these Mock-derived Mocks will always pass +certain tests (e.g. :func:`isinstance`) and builtin assert functions (e.g. +assert_called_once_with) will unconditionally pass. +.. +.. bpo: 43794 +.. date: 2021-04-09-16-14-22 +.. nonce: -1XPDH +.. section: Library +Add :const:`ssl.OP_IGNORE_UNEXPECTED_EOF` constants (OpenSSL 3.0.0) +.. +.. bpo: 43785 +.. date: 2021-04-09-14-51-58 +.. nonce: 1mM5xE +.. section: Library +Improve ``bz2.BZ2File`` performance by removing the RLock from BZ2File. This +makes BZ2File thread unsafe in the face of multiple simultaneous readers or +writers, just like its equivalent classes in :mod:`gzip` and :mod:`lzma` +have always been. Patch by Inada Naoki. +.. +.. bpo: 43789 +.. date: 2021-04-09-14-08-03 +.. nonce: eaHlAm +.. section: Library +OpenSSL 3.0.0: Don't call the password callback function a second time when +first call has signaled an error condition. +.. +.. bpo: 43788 +.. date: 2021-04-09-12-08-01 +.. nonce: YsvInM +.. section: Library +The header files for :mod:`ssl` error codes are now OpenSSL +version-specific. Exceptions will now show correct reason and library codes. +The ``make_ssl_data.py`` script has been rewritten to use OpenSSL's text +file with error codes. +.. +.. bpo: 43766 +.. date: 2021-04-09-00-16-22 +.. nonce: nYNQP0 +.. section: Library +Implement :pep:`647` in the :mod:`typing` module by adding +:data:`TypeGuard`. +.. +.. bpo: 25264 +.. date: 2021-04-08-22-11-27 +.. nonce: b33fa0 +.. section: Library +:func:`os.path.realpath` now accepts a *strict* keyword-only argument. When +set to ``True``, :exc:`OSError` is raised if a path doesn't exist or a +symlink loop is encountered. +.. +.. bpo: 43780 +.. date: 2021-04-08-20-04-46 +.. nonce: hUOgCh +.. section: Library +In ``importlib.metadata``, incorporate changes from importlib_metadata 3.10: +Add mtime-based caching during distribution discovery. Flagged use of dict +result from ``entry_points()`` as deprecated. +.. +.. gh-issue: 47383 +.. date: 2021-04-08-19-32-26 +.. nonce: YI1hdL +.. section: Library +The ``P.args`` and ``P.kwargs`` attributes of :class:`typing.ParamSpec` are +now instances of the new classes :class:`typing.ParamSpecArgs` and +:class:`typing.ParamSpecKwargs`, which enables a more useful ``repr()``. +Patch by Jelle Zijlstra. +.. +.. bpo: 43731 +.. date: 2021-04-08-15-19-20 +.. nonce: nnVd3h +.. section: Library +Add an ``encoding`` parameter :func:`logging.fileConfig`. +.. +.. bpo: 43712 +.. date: 2021-04-08-12-25-08 +.. nonce: f8WXCX +.. section: Library +Add ``encoding`` and ``errors`` parameters to :func:`fileinput.input` and +:class:`fileinput.FileInput`. +.. +.. bpo: 38659 +.. date: 2021-04-08-11-47-31 +.. nonce: r_HFnU +.. section: Library +A ``simple_enum`` decorator is added to the ``enum`` module to convert a +normal class into an Enum. ``test_simple_enum`` added to test simple enums +against a corresponding normal Enum. Standard library modules updated to +use ``simple_enum``. +.. +.. bpo: 43764 +.. date: 2021-04-08-09-59-20 +.. nonce: tHjO60 +.. section: Library +Fix an issue where :data:`~object.__match_args__` generation could fail for +some :mod:`dataclasses`. +.. +.. bpo: 43752 +.. date: 2021-04-06-21-18-29 +.. nonce: K7qmAF +.. section: Library +Fix :mod:`sqlite3` regression for zero-sized blobs with converters, where +``b""`` was returned instead of ``None``. The regression was introduced by +PR 24723. Patch by Erlend E. Aasland. +.. +.. bpo: 43655 +.. date: 2021-04-04-20-51-19 +.. nonce: LwGy8R +.. section: Library +:mod:`tkinter` dialog windows are now recognized as dialogs by window +managers on macOS and X Window. +.. +.. bpo: 43723 +.. date: 2021-04-03-18-03-44 +.. nonce: uBhBZS +.. section: Library +The following ``threading`` methods are now deprecated and should be +replaced: +- ``currentThread`` => :func:`threading.current_thread` +- ``activeCount`` => :func:`threading.active_count` +- ``Condition.notifyAll`` => :meth:`threading.Condition.notify_all` +- ``Event.isSet`` => :meth:`threading.Event.is_set` +- ``Thread.setName`` => :attr:`threading.Thread.name` +- ``thread.getName`` => :attr:`threading.Thread.name` +- ``Thread.isDaemon`` => :attr:`threading.Thread.daemon` +- ``Thread.setDaemon`` => :attr:`threading.Thread.daemon` +Patch by Jelle Zijlstra. +.. +.. bpo: 2135 +.. date: 2021-04-03-15-24-59 +.. nonce: xmDAYJ +.. section: Library +Deprecate find_module() and find_loader() implementations in importlib and +zipimport. +.. +.. bpo: 43534 +.. date: 2021-03-18-15-46-08 +.. nonce: vPE9Us +.. section: Library +:func:`turtle.textinput` and :func:`turtle.numinput` create now a transient +window working on behalf of the canvas window. +.. +.. bpo: 43532 +.. date: 2021-03-17-19-06-45 +.. nonce: W2Ntnm +.. section: Library +Add the ability to specify keyword-only fields to dataclasses. These fields +will become keyword-only arguments to the generated __init__. +.. +.. bpo: 43522 +.. date: 2021-03-16-22-37-32 +.. nonce: dhNwOu +.. section: Library +Fix problem with :attr:`~ssl.SSLContext.hostname_checks_common_name`. +OpenSSL does not copy hostflags from *struct SSL_CTX* to *struct SSL*. +.. +.. bpo: 8978 +.. date: 2021-03-13-14-02-07 +.. nonce: CRxG-O +.. section: Library +Improve error message for :func:`tarfile.open` when :mod:`lzma` / :mod:`bz2` +are unavailable. Patch by Anthony Sottile. +.. +.. bpo: 42967 +.. date: 2021-03-11-00-31-41 +.. nonce: 2PeQRw +.. section: Library +Allow :class:`bytes` ``separator`` argument in ``urllib.parse.parse_qs`` and +``urllib.parse.parse_qsl`` when parsing :class:`str` query strings. +Previously, this raised a ``TypeError``. +.. +.. bpo: 43296 +.. date: 2021-03-01-13-01-33 +.. nonce: p_gU6T +.. section: Library +Improve :mod:`sqlite3` error handling: ``sqlite3_value_blob()`` errors that +set ``SQLITE_NOMEM`` now raise :exc:`MemoryError`. Patch by Erlend E. +Aasland. +.. +.. bpo: 43312 +.. date: 2021-02-25-14-43-59 +.. nonce: 6dg9_2 +.. section: Library +New functions :func:`sysconfig.get_preferred_scheme` and +:func:`sysconfig.get_default_scheme` are added to query a platform for its +preferred "user", "home", and "prefix" (default) scheme names. +.. +.. bpo: 43265 +.. date: 2021-02-19-22-24-33 +.. nonce: MyAzCH +.. section: Library +Improve :meth:`sqlite3.Connection.backup` error handling. The error message +for non-existent target database names is now ``unknown database `` instead of ``SQL logic error``. Patch by Erlend E. Aasland. +.. +.. bpo: 41282 +.. date: 2021-02-16-13-18-38 +.. nonce: GK9a0l +.. section: Library +Install schemes in ``distutils.command.install`` are now loaded from +:mod:`sysconfig`. +.. +.. bpo: 41282 +.. date: 2021-02-15-12-52-23 +.. nonce: SenEje +.. section: Library +``distutils.sysconfig`` has been merged to :mod:`sysconfig`. +.. +.. bpo: 43176 +.. date: 2021-02-09-07-24-29 +.. nonce: bocNQn +.. section: Library +Fixed processing of a dataclass that inherits from a frozen dataclass with +no fields. It is now correctly detected as an error. +.. +.. bpo: 43080 +.. date: 2021-01-31-00-23-13 +.. nonce: -fDg4Q +.. section: Library +:mod:`pprint` now has support for :class:`dataclasses.dataclass`. Patch by +Lewis Gaul. +.. +.. bpo: 39950 +.. date: 2021-01-22-00-15-37 +.. nonce: NzLVaR +.. section: Library +Add ``pathlib.Path.hardlink_to()`` method that supersedes ``link_to()``. The new +method has the same argument order as ``symlink_to()``. +.. +.. bpo: 42904 +.. date: 2021-01-12-23-17-02 +.. nonce: -4qkTD +.. section: Library +:func:`typing.get_type_hints` now checks the local namespace of a class when +evaluating :pep:`563` annotations inside said class. +.. +.. bpo: 42269 +.. date: 2021-01-08-22-32-13 +.. nonce: W5v8z4 +.. section: Library +Add ``slots`` parameter to ``dataclasses.dataclass`` decorator to +automatically generate ``__slots__`` for class. Patch provided by Yurii +Karabas. +.. +.. bpo: 39529 +.. date: 2020-12-06-20-21-16 +.. nonce: 9Zrg43 +.. section: Library +Deprecated use of :func:`asyncio.get_event_loop` without running event loop. +Emit deprecation warning for :mod:`asyncio` functions which implicitly +create a :class:`~asyncio.Future` or :class:`~asyncio.Task` objects if there +is no running event loop and no explicit *loop* argument is passed: +:func:`~asyncio.ensure_future`, :func:`~asyncio.wrap_future`, +:func:`~asyncio.gather`, :func:`~asyncio.shield`, +:func:`~asyncio.as_completed` and constructors of :class:`~asyncio.Future`, +:class:`~asyncio.Task`, :class:`~asyncio.StreamReader`, +:class:`~asyncio.StreamReaderProtocol`. +.. +.. bpo: 18369 +.. date: 2020-11-19-09-52-24 +.. nonce: qzvYH2 +.. section: Library +Certificate and PrivateKey classes were added to the ssl module. +Certificates and keys can now be loaded from memory buffer, too. +.. +.. bpo: 41486 +.. date: 2020-10-16-15-34-30 +.. nonce: Mu9Iit +.. section: Library +Use a new output buffer management code for :mod:`bz2` / :mod:`lzma` / +:mod:`zlib` modules, and add ``.readall()`` function to +``_compression.DecompressReader`` class. These bring some performance +improvements. Patch by Ma Lin. +.. +.. bpo: 31870 +.. date: 2020-09-15-23-44-07 +.. nonce: nVwd38 +.. section: Library +The :func:`ssl.get_server_certificate` function now has a *timeout* +parameter. +.. +.. bpo: 41735 +.. date: 2020-09-07-11-15-15 +.. nonce: NKqGKy +.. section: Library +Fix thread locks in zlib module may go wrong in rare case. Patch by Ma Lin. +.. +.. bpo: 36470 +.. date: 2020-06-13-23-33-32 +.. nonce: oi6Kdb +.. section: Library +Fix dataclasses with ``InitVar``\s and :func:`~dataclasses.replace`. Patch +by Claudiu Popa. +.. +.. bpo: 40849 +.. date: 2020-06-02-21-32-33 +.. nonce: zpeKx3 +.. section: Library +Expose X509_V_FLAG_PARTIAL_CHAIN ssl flag +.. +.. bpo: 35114 +.. date: 2020-05-17-14-10-24 +.. nonce: uLIHfn +.. section: Library +:func:`ssl.RAND_status` now returns a boolean value (as documented) instead +of ``1`` or ``0``. +.. +.. bpo: 39906 +.. date: 2020-03-30-00-13-27 +.. nonce: eaR3fN +.. section: Library +:meth:`pathlib.Path.stat` and :meth:`~pathlib.Path.chmod` now accept a +*follow_symlinks* keyword-only argument for consistency with corresponding +functions in the :mod:`os` module. +.. +.. bpo: 39899 +.. date: 2020-03-09-20-36-07 +.. nonce: 9adF3E +.. section: Library +:func:`os.path.expanduser` now refuses to guess Windows home directories +if the basename of current user's home directory does not match their +username. +:meth:`pathlib.Path.expanduser` and :meth:`~pathlib.Path.home` now +consistently raise :exc:`RuntimeError` exception when a home directory +cannot be resolved. Previously a :exc:`KeyError` exception could be raised +on Windows when the ``"USERNAME"`` environment variable was unset. +.. +.. bpo: 36076 +.. date: 2019-10-16-17-21-53 +.. nonce: FGeQQT +.. section: Library +Added SNI support to :func:`ssl.get_server_certificate`. +.. +.. bpo: 38490 +.. date: 2019-10-16-08-08-14 +.. nonce: QbDXEF +.. section: Library +Covariance, Pearson's correlation, and simple linear regression +functionality was added to statistics module. Patch by Tymoteusz Wołodźko. +.. +.. bpo: 33731 +.. date: 2019-08-14-13-19-50 +.. nonce: 9esS0d +.. section: Library +Provide a locale.localize() function, which converts a normalized number +string into a locale format. +.. +.. bpo: 32745 +.. date: 2018-08-09-23-47-10 +.. nonce: iQi9hI +.. section: Library +Fix a regression in the handling of ctypes' :data:`ctypes.c_wchar_p` type: +embedded null characters would cause a :exc:`ValueError` to be raised. Patch +by Zackery Spytz. +.. +.. bpo: 43987 +.. date: 2021-04-30-04-27-02 +.. nonce: 1DftVa +.. section: Documentation +Add "Annotations Best Practices" document as a new HOWTO. +.. +.. bpo: 43977 +.. date: 2021-04-29-15-06-03 +.. nonce: K5aSl1 +.. section: Documentation +Document the new :c:macro:`Py_TPFLAGS_MAPPING` and +:c:macro:`Py_TPFLAGS_SEQUENCE` type flags. +.. +.. bpo: 43959 +.. date: 2021-04-27-22-22-22 +.. nonce: n2261q +.. section: Documentation +The documentation on the PyContextVar C-API was clarified. +.. +.. bpo: 43938 +.. date: 2021-04-25-22-44-27 +.. nonce: nC660q +.. section: Documentation +Update dataclasses documentation to express that FrozenInstanceError is +derived from AttributeError. +.. +.. bpo: 43778 +.. date: 2021-04-08-22-42-02 +.. nonce: MszRnY +.. section: Documentation +Fix the Sphinx glossary_search extension: create the _static/ sub-directory +if it doesn't exist. +.. +.. bpo: 43755 +.. date: 2021-04-06-14-55-45 +.. nonce: 1m0fGq +.. section: Documentation +Update documentation to reflect that unparenthesized lambda expressions can +no longer be the expression part in an ``if`` clause in comprehensions and +generator expressions since Python 3.9. +.. +.. bpo: 43739 +.. date: 2021-04-06-07-05-49 +.. nonce: L4HjiX +.. section: Documentation +Fixing the example code in Doc/extending/extending.rst to declare and +initialize the pmodule variable to be of the right type. +.. +.. bpo: 43961 +.. date: 2021-04-28-13-21-52 +.. nonce: gNchls +.. section: Tests +Fix test_logging.test_namer_rotator_inheritance() on Windows: use +:func:`os.replace` rather than :func:`os.rename`. Patch by Victor Stinner. +.. +.. bpo: 43842 +.. date: 2021-04-16-14-07-40 +.. nonce: w60GAH +.. section: Tests +Fix a race condition in the SMTP test of test_logging. Don't close a file +descriptor (socket) from a different thread while asyncore.loop() is polling +the file descriptor. Patch by Victor Stinner. +.. +.. bpo: 43843 +.. date: 2021-04-14-13-22-44 +.. nonce: ruIQKD +.. section: Tests +:mod:`test.libregrtest` now marks a test as ENV_CHANGED (altered the +execution environment) if a thread raises an exception but does not catch +it. It sets a hook on :func:`threading.excepthook`. Use +``--fail-env-changed`` option to mark the test as failed. Patch by Victor +Stinner. +.. +.. bpo: 43811 +.. date: 2021-04-12-11-14-28 +.. nonce: vGNbnD +.. section: Tests +Tests multiple OpenSSL versions on GitHub Actions. Use ccache to speed up +testing. +.. +.. bpo: 43791 +.. date: 2021-04-09-15-10-38 +.. nonce: 4KxiXK +.. section: Tests +OpenSSL 3.0.0: Disable testing of legacy protocols TLS 1.0 and 1.1. Tests +are failing with TLSV1_ALERT_INTERNAL_ERROR. +.. +.. bpo: 43567 +.. date: 2021-03-31-19-50-01 +.. nonce: vd0a-p +.. section: Build +Improved generated code refresh (AST/tokens/opcodes/keywords) on Windows. +.. +.. bpo: 43669 +.. date: 2021-03-30-14-19-39 +.. nonce: lWMUYx +.. section: Build +Implement :pep:`644`. Python now requires OpenSSL 1.1.1 or newer. +.. +.. bpo: 35306 +.. date: 2021-04-22-21-37-41 +.. nonce: 10kSR- +.. section: Windows +Adds additional arguments to :func:`os.startfile` function. +.. +.. bpo: 43538 +.. date: 2021-04-22-20-39-49 +.. nonce: F0Cg6X +.. section: Windows +Avoid raising errors from :meth:`pathlib.Path.exists` when passed an +invalid filename. +.. +.. bpo: 38822 +.. date: 2021-04-22-19-49-20 +.. nonce: jgdPmq +.. section: Windows +Fixed :func:`os.stat` failing on inaccessible directories with a trailing +slash, rather than falling back to the parent directory's metadata. This +implicitly affected :func:`os.path.exists` and :func:`os.path.isdir`. +.. +.. bpo: 26227 +.. date: 2021-04-21-23-37-34 +.. nonce: QMY_eA +.. section: Windows +Fixed decoding of host names in :func:`socket.gethostbyaddr` and +:func:`socket.gethostbyname_ex`. +.. +.. bpo: 40432 +.. date: 2021-04-20-23-07-22 +.. nonce: 9OFpoq +.. section: Windows +Updated pegen regeneration script on Windows to find and use Python 3.8 or +higher. Prior to this, pegen regeneration already required 3.8 or higher, +but the script may have used lower versions of Python. +.. +.. bpo: 43745 +.. date: 2021-04-06-12-27-33 +.. nonce: rdKNda +.. section: Windows +Actually updates Windows release to OpenSSL 1.1.1k. Earlier releases were +mislabelled and actually included 1.1.1i again. +.. +.. bpo: 43652 +.. date: 2021-04-03-18-54-31 +.. nonce: gNmfVN +.. section: Windows +Update Tcl and Tk to 8.6.11 in Windows installer. +.. +.. bpo: 43492 +.. date: 2021-03-15-11-34-33 +.. nonce: AsYnVX +.. section: Windows +Upgrade Windows installer to use SQLite 3.35.5. +.. +.. bpo: 30555 +.. date: 2017-12-16-12-23-51 +.. nonce: 3ybjly +.. section: Windows +Fix ``WindowsConsoleIO`` errors in the presence of fd redirection. Patch by +Segev Finer. +.. +.. bpo: 42119 +.. date: 2021-05-02-21-03-27 +.. nonce: Y7BSX_ +.. section: macOS +Fix check for macOS SDK paths when building Python. Narrow search to match +contents of SDKs, namely only files in ``/System/Library``, +``/System/IOSSupport``, and ``/usr`` other than ``/usr/local``. Previously, +anything under ``/System`` was assumed to be in an SDK which causes problems +with the new file system layout in 10.15+ where user file systems may appear +to be mounted under ``/System``. Paths in ``/Library`` were also +incorrectly treated as SDK locations. +.. +.. bpo: 43568 +.. date: 2021-05-02-19-50-52 +.. nonce: AeLNBd +.. section: macOS +Drop support for MACOSX_DEPLOYMENT_TARGET < 10.3 +.. +.. bpo: 44009 +.. date: 2021-05-02-03-45-30 +.. nonce: uvhmlh +.. section: macOS +Provide "python3.x-intel64" executable to allow reliably forcing macOS +universal2 framework builds to run under Rosetta 2 Intel-64 emulation on +Apple Silicon Macs. This can be useful for testing or when universal2 +wheels are not yet available. +.. +.. bpo: 43851 +.. date: 2021-04-15-01-20-45 +.. nonce: sDI60Y +.. section: macOS +Build SQLite with ``SQLITE_OMIT_AUTOINIT`` on macOS. Patch by Erlend E. +Aasland. +.. +.. bpo: 43492 +.. date: 2021-03-15-11-32-23 +.. nonce: 1ZRcV9 +.. section: macOS +Update macOS installer to use SQLite 3.35.4. +.. +.. bpo: 42235 +.. date: 2020-11-01-17-37-16 +.. nonce: A97_BN +.. section: macOS +``Mac/BuildScript/build-installer.py`` will now use "--enable-optimizations" +and ``--with-lto`` when building on macOS 10.15 or later. +.. +.. bpo: 37903 +.. date: 2021-05-02-20-25-53 +.. nonce: VQ6VTU +.. section: IDLE +Add mouse actions to the shell sidebar. Left click and optional drag +selects one or more lines, as with the editor line number sidebar. Right +click after selecting raises a context menu with 'copy with prompts'. This +zips together prompts from the sidebar with lines from the selected text. +.. +.. bpo: 43981 +.. date: 2021-04-30-17-59-56 +.. nonce: 3EFl1H +.. section: IDLE +Fix reference leak in test_sidebar and test_squeezer. +Patches by Terry Jan Reedy and Pablo Galindo +.. +.. bpo: 37892 +.. date: 2021-04-29-02-40-41 +.. nonce: bgW2fk +.. section: IDLE +Indent IDLE Shell input with spaces instead of tabs +.. +.. bpo: 43655 +.. date: 2021-04-04-20-52-07 +.. nonce: HSyaKH +.. section: IDLE +IDLE dialog windows are now recognized as dialogs by window managers on +macOS and X Window. +.. +.. bpo: 37903 +.. date: 2019-08-24-23-49-36 +.. nonce: 4xjast +.. section: IDLE +IDLE's shell now shows prompts in a separate side-bar. +.. +.. bpo: 43916 +.. date: 2021-04-29-17-35-48 +.. nonce: wvWt23 +.. section: C API +Add a new :c:macro:`Py_TPFLAGS_DISALLOW_INSTANTIATION` type flag to disallow +creating type instances. Patch by Victor Stinner. +.. +.. bpo: 43774 +.. date: 2021-04-29-10-17-21 +.. nonce: 5MGfgN +.. section: C API +Remove the now unused ``PYMALLOC_DEBUG`` macro. Debug hooks on memory +allocators are now installed by default if Python is built in debug mode (if +``Py_DEBUG`` macro is defined). Moreover, they can now be used on Python +build in release mode (ex: using ``PYTHONMALLOC=debug`` environment +variable). +.. +.. bpo: 43962 +.. date: 2021-04-28-13-13-07 +.. nonce: 9Jzs5X +.. section: C API +_PyInterpreterState_IDIncref() now calls _PyInterpreterState_IDInitref() and +always increments id_refcount. Previously, calling +_xxsubinterpreters.get_current() could create an id_refcount inconsistency +when a _xxsubinterpreters.InterpreterID object was deallocated. Patch by +Victor Stinner. +.. +.. bpo: 28254 +.. date: 2021-04-28-12-33-44 +.. nonce: a2561e +.. section: C API +Add new C-API functions to control the state of the garbage collector: +:c:func:`PyGC_Enable()`, :c:func:`PyGC_Disable()`, +:c:func:`PyGC_IsEnabled()`, corresponding to the functions in the :mod:`gc` +module. +.. +.. bpo: 43908 +.. date: 2021-04-22-10-46-40 +.. nonce: Co3YhZ +.. section: C API +Introduce :c:macro:`Py_TPFLAGS_IMMUTABLETYPE` flag for immutable type objects, +and modify :c:func:`PyType_Ready` to set it for static types. Patch by +Erlend E. Aasland. +.. +.. bpo: 43795 +.. date: 2021-04-20-15-06-29 +.. nonce: y0IP4c +.. section: C API +:c:func:`PyMem_Calloc` is now available in the limited C API +(``Py_LIMITED_API``). +.. +.. bpo: 43868 +.. date: 2021-04-16-18-15-56 +.. nonce: twQ7KH +.. section: C API +:c:func:`PyOS_ReadlineFunctionPointer` is no longer exported by limited C +API headers and by ``python3.dll`` on Windows. Like any function that takes +``FILE*``, it is not part of the stable ABI. +.. +.. bpo: 43795 +.. date: 2021-04-09-18-19-07 +.. nonce: l0yobT +.. section: C API +Stable ABI and limited API definitions are generated from a central manifest +(:pep:`652`). +.. +.. bpo: 43753 +.. date: 2021-04-06-20-52-44 +.. nonce: xUsHp1 +.. section: C API +Add the :c:func:`Py_Is(x, y) ` function to test if the *x* object is +the *y* object, the same as ``x is y`` in Python. Add also the +:c:func:`Py_IsNone`, :c:func:`Py_IsTrue`, :c:func:`Py_IsFalse` functions to +test if an object is, respectively, the ``None`` singleton, the ``True`` +singleton or the ``False`` singleton. Patch by Victor Stinner. + +.. bpo: 38722 +.. date: 2019-11-18-16-17-56 +.. nonce: x3mECW +.. release date: 2019-11-19 +.. section: Security +:mod:`runpy` now uses :meth:`io.open_code` to open code files. Patch by +Jason Killen. +.. +.. bpo: 38622 +.. date: 2019-11-14-16-13-23 +.. nonce: 3DYkfb +.. section: Security +Add additional audit events for the :mod:`ctypes` module. +.. +.. bpo: 38418 +.. date: 2019-10-08-19-29-55 +.. nonce: QL7s0- +.. section: Security +Fixes audit event for :func:`os.system` to be named ``os.system``. +.. +.. bpo: 38243 +.. date: 2019-09-25-13-21-09 +.. nonce: 1pfz24 +.. section: Security +Escape the server title of :class:`xmlrpc.server.DocXMLRPCServer` when +rendering the document page as HTML. (Contributed by Donghee Na in +:issue:`38243`.) +.. +.. bpo: 38174 +.. date: 2019-09-23-21-02-46 +.. nonce: MeWuJd +.. section: Security +Update vendorized expat library version to 2.2.8, which resolves +:cve:`2019-15903`. +.. +.. bpo: 37764 +.. date: 2019-08-27-01-13-05 +.. nonce: qv67PQ +.. section: Security +Fixes email._header_value_parser.get_unstructured going into an infinite +loop for a specific case in which the email header does not have trailing +whitespace, and the case in which it contains an invalid encoded word. Patch +by Ashwin Ramaswami. +.. +.. bpo: 37461 +.. date: 2019-07-16-08-11-00 +.. nonce: 1Ahz7O +.. section: Security +Fix an infinite loop when parsing specially crafted email headers. Patch by +Abhilash Raj. +.. +.. bpo: 37363 +.. date: 2019-07-01-10-31-14 +.. nonce: fSjatj +.. section: Security +Adds audit events for the range of supported run commands (see +:ref:`using-on-general`). +.. +.. bpo: 37463 +.. date: 2019-07-01-08-46-14 +.. nonce: 1CHwjE +.. section: Security +ssl.match_hostname() no longer accepts IPv4 addresses with additional text +after the address and only quad-dotted notation without trailing +whitespaces. Some inet_aton() implementations ignore whitespace and all data +after whitespace, e.g. '127.0.0.1 whatever'. +.. +.. bpo: 37363 +.. date: 2019-06-21-15-58-59 +.. nonce: diouyl +.. section: Security +Adds audit events for :mod:`ensurepip`, :mod:`ftplib`, :mod:`glob`, +:mod:`imaplib`, :mod:`!nntplib`, :mod:`pdb`, :mod:`poplib`, :mod:`shutil`, +:mod:`smtplib`, :mod:`sqlite3`, :mod:`subprocess`, :mod:`!telnetlib`, +:mod:`tempfile` and :mod:`webbrowser`, as well as :func:`os.listdir`, +:func:`os.scandir` and :func:`breakpoint`. +.. +.. bpo: 37364 +.. date: 2019-06-21-14-42-53 +.. nonce: IIRc2s +.. section: Security +:func:`io.open_code` is now used when reading :file:`.pth` files. +.. +.. bpo: 34631 +.. date: 2019-06-17-09-34-25 +.. nonce: DBfM4j +.. section: Security +Updated OpenSSL to 1.1.1c in Windows installer +.. +.. bpo: 34155 +.. date: 2019-05-04-13-33-37 +.. nonce: MJll68 +.. section: Security +Fix parsing of invalid email addresses with more than one ``@`` (e.g. +a@b@c.com.) to not return the part before 2nd ``@`` as valid email address. +Patch by maxking & jpic. +.. +.. bpo: 38631 +.. date: 2019-11-18-17-10-20 +.. nonce: tRHaAk +.. section: Core and Builtins +Replace ``Py_FatalError()`` call with a regular :exc:`RuntimeError` +exception in :meth:`float.__getformat__`. +.. +.. bpo: 38639 +.. date: 2019-10-30-11-31-47 +.. nonce: 9-vKtO +.. section: Core and Builtins +Optimized :func:`math.floor`, :func:`math.ceil` and :func:`math.trunc` +for floats. +.. +.. bpo: 38640 +.. date: 2019-10-30-11-25-25 +.. nonce: 4sAFh5 +.. section: Core and Builtins +Fixed a bug in the compiler that was causing to raise in the presence of +break statements and continue statements inside always false while loops. +Patch by Pablo Galindo. +.. +.. bpo: 38613 +.. date: 2019-10-29-15-44-24 +.. nonce: V_R3NC +.. section: Core and Builtins +Optimized some set operations (e.g. ``|``, ``^``, and ``-``) of +``dict_keys``. ``d.keys() | other`` was slower than ``set(d) | other`` but +they are almost same performance for now. +.. +.. bpo: 28029 +.. date: 2019-10-29-09-38-54 +.. nonce: AmRMEF +.. section: Core and Builtins +``"".replace("", s, n)`` now returns ``s`` instead of an empty string for +all non-zero ``n``. There are similar changes for :class:`bytes` and +:class:`bytearray` objects. +.. +.. bpo: 38535 +.. date: 2019-10-20-12-43-48 +.. nonce: ESMkVN +.. section: Core and Builtins +Fixed line numbers and column offsets for AST nodes for calls without +arguments in decorators. +.. +.. bpo: 38525 +.. date: 2019-10-20-00-36-18 +.. nonce: Vty1cA +.. section: Core and Builtins +Fix a segmentation fault when using reverse iterators of empty ``dict`` +objects. Patch by Donghee Na and Inada Naoki. +.. +.. bpo: 38465 +.. date: 2019-10-19-12-44-13 +.. nonce: V1L8c4 +.. section: Core and Builtins +:class:`bytearray`, :class:`~array.array` and :class:`~mmap.mmap` objects +allow now to export more than ``2**31`` buffers at a time. +.. +.. bpo: 38469 +.. date: 2019-10-13-23-41-38 +.. nonce: 9kmuQj +.. section: Core and Builtins +Fixed a bug where the scope of named expressions was not being resolved +correctly in the presence of the *global* keyword. Patch by Pablo Galindo. +.. +.. bpo: 38437 +.. date: 2019-10-10-20-42-09 +.. nonce: z_0mZp +.. section: Core and Builtins +Activate the ``GC_DEBUG`` macro for debug builds of the interpreter (when +``Py_DEBUG`` is set). Patch by Pablo Galindo. +.. +.. bpo: 38379 +.. date: 2019-10-10-01-41-02 +.. nonce: _q4dhn +.. section: Core and Builtins +When the garbage collector makes a collection in which some objects +resurrect (they are reachable from outside the isolated cycles after the +finalizers have been executed), do not block the collection of all objects +that are still unreachable. Patch by Pablo Galindo and Tim Peters. +.. +.. bpo: 38379 +.. date: 2019-10-09-16-50-52 +.. nonce: oz5qZx +.. section: Core and Builtins +When cyclic garbage collection (gc) runs finalizers that resurrect +unreachable objects, the current gc run ends, without collecting any cyclic +trash. However, the statistics reported by ``collect()`` and +``get_stats()`` claimed that all cyclic trash found was collected, and that +the resurrected objects were collected. Changed the stats to report that +none were collected. +.. +.. bpo: 38392 +.. date: 2019-10-07-22-51-39 +.. nonce: KaXXps +.. section: Core and Builtins +In debug mode, :c:func:`PyObject_GC_Track` now calls ``tp_traverse()`` of +the object type to ensure that the object is valid: test that objects +visited by ``tp_traverse()`` are valid. +.. +.. bpo: 38210 +.. date: 2019-10-06-15-01-57 +.. nonce: Xgc6F_ +.. section: Core and Builtins +Remove unnecessary intersection and update set operation in dictview with +empty set. (Contributed by Donghee Na in :issue:`38210`.) +.. +.. bpo: 38402 +.. date: 2019-10-05-19-36-16 +.. nonce: EZuzgK +.. section: Core and Builtins +Check the error from the system's underlying ``crypt`` or ``crypt_r``. +.. +.. bpo: 37474 +.. date: 2019-10-01-12-46-30 +.. nonce: cB3se1 +.. section: Core and Builtins +On FreeBSD, Python no longer calls ``fedisableexcept()`` at startup to +control the floating-point control mode. The call became useless since +FreeBSD 6: it became the default mode. +.. +.. bpo: 38006 +.. date: 2019-09-30-09-33-21 +.. nonce: UYlJum +.. section: Core and Builtins +Fix a bug due to the interaction of weakrefs and the cyclic garbage +collector. We must clear any weakrefs in garbage in order to prevent their +callbacks from executing and causing a crash. +.. +.. bpo: 38317 +.. date: 2019-09-30-00-56-21 +.. nonce: pmqlIQ +.. section: Core and Builtins +Fix warnings options priority: ``PyConfig.warnoptions`` has the highest +priority, as stated in the :pep:`587`. +.. +.. bpo: 38310 +.. date: 2019-09-28-22-54-25 +.. nonce: YDTbEo +.. section: Core and Builtins +Predict ``BUILD_MAP_UNPACK_WITH_CALL`` -> ``CALL_FUNCTION_EX`` opcode pairs +in the main interpreter loop. Patch by Brandt Bucher. +.. +.. bpo: 36871 +.. date: 2019-09-24-18-45-46 +.. nonce: p47knk +.. section: Core and Builtins +Improve error handling for the assert_has_calls and assert_has_awaits +methods of mocks. Fixed a bug where any errors encountered while binding the +expected calls to the mock's spec were silently swallowed, leading to +misleading error output. +.. +.. bpo: 11410 +.. date: 2019-09-24-05-32-27 +.. nonce: vS182p +.. section: Core and Builtins +Better control over symbol visibility is provided through use of the +visibility attributes available in gcc >= 4.0, provided in a uniform way +across POSIX and Windows. The POSIX build files have been updated to compile +with -fvisibility=hidden, minimising exported symbols. +.. +.. bpo: 38219 +.. date: 2019-09-22-13-56-18 +.. nonce: rFl7JD +.. section: Core and Builtins +Optimized the :class:`dict` constructor and the :meth:`~dict.update` method +for the case when the argument is a dict. +.. +.. bpo: 38236 +.. date: 2019-09-20-19-06-23 +.. nonce: eQ0Tmj +.. section: Core and Builtins +Python now dumps path configuration if it fails to import the Python codecs +of the filesystem and stdio encodings. +.. +.. bpo: 38013 +.. date: 2019-09-12-19-50-01 +.. nonce: I7btD0 +.. section: Core and Builtins +Allow to call ``async_generator_athrow().throw(...)`` even for non-started +async generator helper. It fixes annoying warning at the end of +:func:`asyncio.run` call. +.. +.. bpo: 38124 +.. date: 2019-09-12-00-14-01 +.. nonce: n6E0H7 +.. section: Core and Builtins +Fix an off-by-one error in PyState_AddModule that could cause out-of-bounds +memory access. +.. +.. bpo: 38116 +.. date: 2019-09-11-14-49-42 +.. nonce: KDwmwt +.. section: Core and Builtins +The select module is now PEP-384 compliant and no longer has static state +.. +.. bpo: 38113 +.. date: 2019-09-11-14-10-02 +.. nonce: yZXC3P +.. section: Core and Builtins +ast module updated to PEP-384 and all statics removed +.. +.. bpo: 38076 +.. date: 2019-09-09-16-36-37 +.. nonce: C5dVBl +.. section: Core and Builtins +The struct module is now PEP-384 compatible +.. +.. bpo: 38075 +.. date: 2019-09-09-15-59-50 +.. nonce: N8OZKF +.. section: Core and Builtins +The random module is now PEP-384 compatible +.. +.. bpo: 38074 +.. date: 2019-09-09-15-40-57 +.. nonce: MsVbeI +.. section: Core and Builtins +zlib module made PEP-384 compatible +.. +.. bpo: 38073 +.. date: 2019-09-09-15-17-58 +.. nonce: ZoKYOU +.. section: Core and Builtins +Make pwd extension module PEP-384 compatible +.. +.. bpo: 38072 +.. date: 2019-09-09-15-00-42 +.. nonce: Y1xpDO +.. section: Core and Builtins +grp module made PEP-384 compatible +.. +.. bpo: 38069 +.. date: 2019-09-09-14-46-05 +.. nonce: cn8XLv +.. section: Core and Builtins +Make _posixsubprocess PEP-384 compatible +.. +.. bpo: 38071 +.. date: 2019-09-09-14-44-17 +.. nonce: bLwkBJ +.. section: Core and Builtins +Make termios extension module PEP-384 compatible +.. +.. bpo: 38005 +.. date: 2019-09-02-20-00-31 +.. nonce: e7VsTA +.. section: Core and Builtins +Fixed comparing and creating of InterpreterID and ChannelID. +.. +.. bpo: 36946 +.. date: 2019-09-02-16-17-42 +.. nonce: _lAuSR +.. section: Core and Builtins +Fix possible signed integer overflow when handling slices. Patch by +hongweipeng. +.. +.. bpo: 37994 +.. date: 2019-08-31-11-13-25 +.. nonce: Rj6S4j +.. section: Core and Builtins +Fixed silencing arbitrary errors if an attribute lookup fails in several +sites. Only AttributeError should be silenced. +.. +.. bpo: 8425 +.. date: 2019-08-29-01-55-38 +.. nonce: FTq4A8 +.. section: Core and Builtins +Optimize set difference_update for the case when the other set is much +larger than the base set. (Suggested by Evgeny Kapun with code contributed +by Michele Orrù). +.. +.. bpo: 37966 +.. date: 2019-08-27-21-21-36 +.. nonce: 5OBLez +.. section: Core and Builtins +The implementation of :func:`~unicodedata.is_normalized` has been greatly +sped up on strings that aren't normalized, by implementing the full +normalization-quick-check algorithm from the Unicode standard. +.. +.. bpo: 37947 +.. date: 2019-08-26-04-09-57 +.. nonce: mzAQtB +.. section: Core and Builtins +Adjust correctly the recursion level in the symtable generation for named +expressions. Patch by Pablo Galindo. +.. +.. bpo: 37812 +.. date: 2019-08-23-22-46-25 +.. nonce: vsWZwS +.. section: Core and Builtins +The ``CHECK_SMALL_INT`` macro used inside :file:`Object/longobject.c` has +been replaced with an explicit ``return`` at each call site. +.. +.. bpo: 37751 +.. date: 2019-08-20-04-36-37 +.. nonce: CSFzUd +.. section: Core and Builtins +Fix :func:`codecs.lookup` to normalize the encoding name the same way than +:func:`encodings.normalize_encoding`, except that :func:`codecs.lookup` also +converts the name to lower case. +.. +.. bpo: 37830 +.. date: 2019-08-17-18-41-59 +.. nonce: fNfMbz +.. section: Core and Builtins +Fixed compilation of :keyword:`break` and :keyword:`continue` in the +:keyword:`finally` block when the corresponding :keyword:`try` block +contains :keyword:`return` with a non-constant value. +.. +.. bpo: 20490 +.. date: 2019-08-15-12-48-36 +.. nonce: -hXeEn +.. section: Core and Builtins +Improve import error message for partially initialized module on circular +``from`` imports - by Anthony Sottile. +.. +.. bpo: 37840 +.. date: 2019-08-13-18-05-20 +.. nonce: elLCci +.. section: Core and Builtins +Fix handling of negative indices in :c:member:`~PySequenceMethods.sq_item` +of :class:`bytearray`. Patch by Sergey Fedoseev. +.. +.. bpo: 37802 +.. date: 2019-08-09-18-28-57 +.. nonce: pKxcAW +.. section: Core and Builtins +Slightly improve performance of :c:func:`PyLong_FromUnsignedLong`, +:c:func:`PyLong_FromUnsignedLongLong` and :c:func:`PyLong_FromSize_t`. Patch +by Sergey Fedoseev. +.. +.. bpo: 37409 +.. date: 2019-08-06-23-39-05 +.. nonce: 1qwzn2 +.. section: Core and Builtins +Ensure explicit relative imports from interactive sessions and scripts +(having no parent package) always raise ImportError, rather than treating +the current module as the package. Patch by Ben Lewis. +.. +.. bpo: 32912 +.. date: 2019-08-06-14-03-59 +.. nonce: UDwSMJ +.. section: Core and Builtins +Reverted :issue:`32912`: emitting :exc:`SyntaxWarning` instead of +:exc:`DeprecationWarning` for invalid escape sequences in string and bytes +literals. +.. +.. bpo: 37757 +.. date: 2019-08-05-14-22-59 +.. nonce: lRv5HX +.. section: Core and Builtins +:pep:`572`: As described in the PEP, assignment expressions now raise +:exc:`SyntaxError` when their interaction with comprehension scoping results +in an ambiguous target scope. +The ``TargetScopeError`` subclass originally proposed by the PEP has been +removed in favour of just raising regular syntax errors for the disallowed +cases. +.. +.. bpo: 36279 +.. date: 2019-08-04-12-24-18 +.. nonce: 8Zy7jZ +.. section: Core and Builtins +Fix potential use of uninitialized memory in :func:`os.wait3`. +.. +.. bpo: 36311 +.. date: 2019-08-02-15-01-33 +.. nonce: uY5vt- +.. section: Core and Builtins +Decoding bytes objects larger than 2GiB is faster and no longer fails when a +multibyte characters spans a chunk boundary. +.. +.. bpo: 34880 +.. date: 2019-08-01-10-45-51 +.. nonce: u_x_CG +.. section: Core and Builtins +The :keyword:`assert` statement now works properly if the +:exc:`AssertionError` exception is being shadowed. Patch by Zackery Spytz. +.. +.. bpo: 37340 +.. date: 2019-07-25-11-06-57 +.. nonce: 5ktLEg +.. section: Core and Builtins +Removed object cache (``free_list``) for bound method objects. Temporary +bound method objects are less used than before thanks to the ``LOAD_METHOD`` +opcode and the ``_PyObject_VectorcallMethod`` C API. +.. +.. bpo: 37648 +.. date: 2019-07-22-11-05-05 +.. nonce: 6TY2L- +.. section: Core and Builtins +Fixed minor inconsistency in :meth:`list.__contains__`, +:meth:`tuple.__contains__` and a few other places. The collection's item is +now always at the left and the needle is on the right of ``==``. +.. +.. bpo: 37444 +.. date: 2019-07-20-22-34-42 +.. nonce: UOd3Xs +.. section: Core and Builtins +Update differing exception between :meth:`builtins.__import__` and +:meth:`importlib.__import__`. +.. +.. bpo: 37619 +.. date: 2019-07-18-11-50-49 +.. nonce: X6Lulo +.. section: Core and Builtins +When adding a wrapper descriptor from one class to a different class (for +example, setting ``__add__ = str.__add__`` on an ``int`` subclass), an +exception is correctly raised when the operator is called. +.. +.. bpo: 37593 +.. date: 2019-07-14-23-57-27 +.. nonce: yHSTwH +.. section: Core and Builtins +Swap the positions of the *posonlyargs* and *args* parameters in the +constructor of :class:`ast.parameters` nodes. +.. +.. bpo: 37543 +.. date: 2019-07-10-20-33-53 +.. nonce: EvI19D +.. section: Core and Builtins +Optimized pymalloc for non PGO build. +.. +.. bpo: 37537 +.. date: 2019-07-10-09-56-47 +.. nonce: OkB0wd +.. section: Core and Builtins +Compute allocated pymalloc blocks inside _Py_GetAllocatedBlocks(). This +slows down _Py_GetAllocatedBlocks() but gives a small speedup to +_PyObject_Malloc() and _PyObject_Free(). +.. +.. bpo: 37467 +.. date: 2019-07-01-12-22-44 +.. nonce: u-XyEu +.. section: Core and Builtins +Fix :func:`sys.excepthook` and :c:func:`PyErr_Display` if a filename is a +bytes string. For example, for a SyntaxError exception where the filename +attribute is a bytes string. +.. +.. bpo: 37433 +.. date: 2019-06-27-15-01-14 +.. nonce: amNGqr +.. section: Core and Builtins +Fix ``SyntaxError`` indicator printing too many spaces for multi-line +strings - by Anthony Sottile. +.. +.. bpo: 37417 +.. date: 2019-06-26-18-41-00 +.. nonce: VsZeHL +.. section: Core and Builtins +:meth:`bytearray.extend` now correctly handles errors that arise during +iteration. Patch by Brandt Bucher. +.. +.. bpo: 37414 +.. date: 2019-06-26-17-27-26 +.. nonce: o6Lnbc +.. section: Core and Builtins +The undocumented ``sys.callstats()`` function has been removed. Since Python +3.7, it was deprecated and always returned ``None``. It required a special +build option ``CALL_PROFILE`` which was already removed in Python 3.7. +.. +.. bpo: 37392 +.. date: 2019-06-25-01-45-06 +.. nonce: J3JhIx +.. section: Core and Builtins +Remove ``sys.getcheckinterval()`` and ``sys.setcheckinterval()`` functions. +They were deprecated since Python 3.2. Use :func:`sys.getswitchinterval` and +:func:`sys.setswitchinterval` instead. Remove also ``check_interval`` field +of the ``PyInterpreterState`` structure. +.. +.. bpo: 37388 +.. date: 2019-06-24-21-53-52 +.. nonce: 0XTZmW +.. section: Core and Builtins +In development mode and in debug build, *encoding* and *errors* arguments +are now checked on string encoding and decoding operations. Examples: +:func:`open`, :meth:`str.encode` and :meth:`bytes.decode`. +By default, for best performances, the *errors* argument is only checked at +the first encoding/decoding error, and the *encoding* argument is sometimes +ignored for empty strings. +.. +.. bpo: 37348 +.. date: 2019-06-23-00-26-30 +.. nonce: pp8P-x +.. section: Core and Builtins +Optimized decoding short ASCII string with UTF-8 and ascii codecs. +``b"foo".decode()`` is about 15% faster. Patch by Inada Naoki. +.. +.. bpo: 24214 +.. date: 2019-06-22-12-45-20 +.. nonce: hIiHeD +.. section: Core and Builtins +Improved support of the surrogatepass error handler in the UTF-8 and UTF-16 +incremental decoders. +.. +.. bpo: 37330 +.. date: 2019-06-18-17-53-06 +.. nonce: wAvHmz +.. section: Core and Builtins +:func:`open`, :func:`io.open`, :func:`codecs.open` and +:class:`fileinput.FileInput` no longer accept ``'U'`` ("universal newline") +in the file mode. This flag was deprecated since Python 3.3. +.. +.. bpo: 35224 +.. date: 2019-06-17-06-03-55 +.. nonce: FHWPGv +.. section: Core and Builtins +Reverse evaluation order of key: value in dict comprehensions as proposed in +PEP 572. I.e. in ``{k: v for ...}``, ``k`` will be evaluated before ``v``. +.. +.. bpo: 37316 +.. date: 2019-06-17-03-53-16 +.. nonce: LytDX_ +.. section: Core and Builtins +Fix the :c:func:`PySys_Audit` call in :class:`mmap.mmap`. +.. +.. bpo: 37300 +.. date: 2019-06-16-02-38-25 +.. nonce: WJkgKV +.. section: Core and Builtins +Remove an unnecessary Py_XINCREF in classobject.c. +.. +.. bpo: 37269 +.. date: 2019-06-14-06-32-33 +.. nonce: SjVVAe +.. section: Core and Builtins +Fix a bug in the peephole optimizer that was not treating correctly constant +conditions with binary operators. Patch by Pablo Galindo. +.. +.. bpo: 20443 +.. date: 2019-06-13-12-55-38 +.. nonce: bQWAxg +.. section: Core and Builtins +Python now gets the absolute path of the script filename specified on the +command line (ex: "python3 script.py"): the __file__ attribute of the +__main__ module and sys.path[0] become an absolute path, rather than a +relative path. +.. +.. bpo: 37257 +.. date: 2019-06-13-02-27-12 +.. nonce: IMxDvT +.. section: Core and Builtins +Python's small object allocator (``obmalloc.c``) now allows (no more than) +one empty arena to remain available for immediate reuse, without returning +it to the OS. This prevents thrashing in simple loops where an arena could +be created and destroyed anew on each iteration. +.. +.. bpo: 37231 +.. date: 2019-06-12-14-39-16 +.. nonce: LF41Es +.. section: Core and Builtins +The dispatching of type slots to special methods (for example calling +``__mul__`` when doing ``x * y``) has been made faster. +.. +.. bpo: 36974 +.. date: 2019-06-11-12-59-38 +.. nonce: bVYmSA +.. section: Core and Builtins +Implemented separate vectorcall functions for every calling convention of +builtin functions and methods. This improves performance for calls. +.. +.. bpo: 37213 +.. date: 2019-06-11-11-15-19 +.. nonce: UPii5K +.. section: Core and Builtins +Handle correctly negative line offsets in the peephole optimizer. Patch by +Pablo Galindo. +.. +.. bpo: 37219 +.. date: 2019-06-10-23-18-31 +.. nonce: jPSufq +.. section: Core and Builtins +Remove erroneous optimization for empty set differences. +.. +.. bpo: 15913 +.. date: 2019-06-06-20-52-38 +.. nonce: 5Sg5cv +.. section: Core and Builtins +Implement :c:func:`PyBuffer_SizeFromFormat()` function (previously +documented but not implemented): call :func:`struct.calcsize`. Patch by +Joannah Nanjekye. +.. +.. bpo: 36922 +.. date: 2019-06-06-13-59-52 +.. nonce: EMZ3TF +.. section: Core and Builtins +Slot functions optimize any callable with ``Py_TPFLAGS_METHOD_DESCRIPTOR`` +instead of only instances of ``function``. +.. +.. bpo: 36974 +.. date: 2019-06-06-11-00-55 +.. nonce: wdzzym +.. section: Core and Builtins +The slot ``tp_vectorcall_offset`` is inherited unconditionally to support +``super().__call__()`` when the base class uses vectorcall. +.. +.. bpo: 37160 +.. date: 2019-06-05-09-24-17 +.. nonce: O3IAY3 +.. section: Core and Builtins +:func:`threading.get_native_id` now also supports NetBSD. +.. +.. bpo: 37077 +.. date: 2019-05-28-11-47-44 +.. nonce: S1h0Fc +.. section: Core and Builtins +Add :func:`threading.get_native_id` support for AIX. Patch by M. Felt +.. +.. bpo: 36781 +.. date: 2019-05-06-09-59-31 +.. nonce: uocWt6 +.. section: Core and Builtins +:func:`sum` has been optimized for boolean values. +.. +.. bpo: 34556 +.. date: 2019-05-05-18-09-40 +.. nonce: o9kfpu +.. section: Core and Builtins +Add ``--upgrade-deps`` to venv module. Patch by Cooper Ry Lees +.. +.. bpo: 20523 +.. date: 2019-02-15-20-42-36 +.. nonce: rRLrvr +.. section: Core and Builtins +``pdb.Pdb`` supports ~/.pdbrc in Windows 7. Patch by Tim Hopper and Dan +Lidral-Porter. +.. +.. bpo: 35551 +.. date: 2019-01-18-16-16-27 +.. nonce: oF5pbO +.. section: Core and Builtins +Updated encodings: - Removed the "tis260" encoding, which was an alias for +the nonexistent "tactis" codec. - Added "mac_centeuro" as an alias for the +mac_latin2 encoding. +.. +.. bpo: 19072 +.. date: 2018-07-23-13-09-54 +.. nonce: Gc59GS +.. section: Core and Builtins +The :class:`classmethod` decorator can now wrap other descriptors such as +property objects. Adapted from a patch written by Graham Dumpleton. +.. +.. bpo: 27575 +.. date: 2018-06-14-13-55-45 +.. nonce: mMYgzv +.. section: Core and Builtins +Improve speed of dictview intersection by directly using set intersection +logic. Patch by David Su. +.. +.. bpo: 30773 +.. date: 2018-06-07-01-01-20 +.. nonce: C31rVE +.. section: Core and Builtins +Prohibit parallel running of aclose() / asend() / athrow(). Fix ag_running +to reflect the actual running status of the AG. +.. +.. bpo: 36589 +.. date: 2019-11-16-22-56-51 +.. nonce: 0Io76D +.. section: Library +The :func:`curses.update_lines_cols` function now returns ``None`` instead +of ``1`` on success. +.. +.. bpo: 38807 +.. date: 2019-11-15-09-30-29 +.. nonce: PsmRog +.. section: Library +Update :exc:`TypeError` messages for :meth:`os.path.join` to include +:class:`os.PathLike` objects as acceptable input types. +.. +.. bpo: 38724 +.. date: 2019-11-14-14-13-29 +.. nonce: T5ySfR +.. section: Library +Add a repr for ``subprocess.Popen`` objects. Patch by Andrey Doroschenko. +.. +.. bpo: 38786 +.. date: 2019-11-13-16-49-03 +.. nonce: gNOwKh +.. section: Library +pydoc now recognizes and parses HTTPS URLs. Patch by python273. +.. +.. bpo: 38785 +.. date: 2019-11-13-16-17-43 +.. nonce: NEOEfk +.. section: Library +Prevent asyncio from crashing if parent ``__init__`` is not called from a +constructor of object derived from ``asyncio.Future``. +.. +.. bpo: 38723 +.. date: 2019-11-12-15-46-28 +.. nonce: gcdMFn +.. section: Library +:mod:`pdb` now uses :meth:`io.open_code` to trigger auditing events. +.. +.. bpo: 27805 +.. date: 2019-11-11-21-43-06 +.. nonce: D3zl1_ +.. section: Library +Allow opening pipes and other non-seekable files in append mode with +:func:`open`. +.. +.. bpo: 38438 +.. date: 2019-11-11-06-14-25 +.. nonce: vSVeHN +.. section: Library +Simplify the :mod:`argparse` usage message for ``nargs="*"``. +.. +.. bpo: 38761 +.. date: 2019-11-10-13-40-33 +.. nonce: P1UUIZ +.. section: Library +WeakSet is now registered as a collections.abc.MutableSet. +.. +.. bpo: 38716 +.. date: 2019-11-06-15-58-07 +.. nonce: R3uMLT +.. section: Library +logging: change RotatingHandler namer and rotator to class-level attributes. +This stops __init__ from setting them to None in the case where a subclass +defines them with eponymous methods. +.. +.. bpo: 38713 +.. date: 2019-11-05-21-22-22 +.. nonce: bmhquU +.. section: Library +Add :const:`os.P_PIDFD` constant, which may be passed to :func:`os.waitid` to +wait on a Linux process file descriptor. +.. +.. bpo: 38692 +.. date: 2019-11-05-19-15-57 +.. nonce: 2DCDA- +.. section: Library +Add :class:`asyncio.PidfdChildWatcher`, a Linux-specific child watcher +implementation that polls process file descriptors. +.. +.. bpo: 38692 +.. date: 2019-11-05-07-18-24 +.. nonce: UpatA7 +.. section: Library +Expose the Linux ``pidfd_open`` syscall as :func:`os.pidfd_open`. +.. +.. bpo: 38602 +.. date: 2019-10-27-22-29-45 +.. nonce: 7jvYFA +.. section: Library +Added constants :const:`~fcntl.F_OFD_GETLK`, :const:`~fcntl.F_OFD_SETLK` and +:const:`~fcntl.F_OFD_SETLKW` to the :mod:`fcntl` module. Patch by Donghee +Na. +.. +.. bpo: 38334 +.. date: 2019-10-27-00-08-49 +.. nonce: pfLLmc +.. section: Library +Fixed seeking backward on an encrypted :class:`zipfile.ZipExtFile`. +.. +.. bpo: 38312 +.. date: 2019-10-26-14-42-20 +.. nonce: e_FVWh +.. section: Library +Add :func:`curses.get_escdelay`, :func:`curses.set_escdelay`, +:func:`curses.get_tabsize`, and :func:`curses.set_tabsize` functions - by +Anthony Sottile. +.. +.. bpo: 38586 +.. date: 2019-10-24-17-26-39 +.. nonce: cyq5nr +.. section: Library +Now :func:`~logging.config.fileConfig` correctly sets the .name of handlers +loaded. +.. +.. bpo: 38565 +.. date: 2019-10-24-08-10-30 +.. nonce: SWSUst +.. section: Library +Add new cache_parameters() method for functools.lru_cache() to better +support pickling. +.. +.. bpo: 34679 +.. date: 2019-10-23-16-25-12 +.. nonce: Bnw8o3 +.. section: Library +asynci.ProactorEventLoop.close() now only calls signal.set_wakeup_fd() in +the main thread. +.. +.. bpo: 31202 +.. date: 2019-10-20-12-04-48 +.. nonce: NfdIus +.. section: Library +The case the result of :func:`pathlib.WindowsPath.glob` matches now the case +of the pattern for literal parts. +.. +.. bpo: 36321 +.. date: 2019-10-19-21-41-20 +.. nonce: CFlxfy +.. section: Library +Remove misspelled attribute. The 3.8 changelog noted that this would be +removed in 3.9. +.. +.. bpo: 38521 +.. date: 2019-10-18-13-57-31 +.. nonce: U-7aaM +.. section: Library +Fixed erroneous equality comparison in statistics.NormalDist(). +.. +.. bpo: 38493 +.. date: 2019-10-16-19-56-51 +.. nonce: 86ExWB +.. section: Library +Added :const:`~os.CLD_KILLED` and :const:`~os.CLD_STOPPED` for +:attr:`si_code`. Patch by Donghee Na. +.. +.. bpo: 38478 +.. date: 2019-10-15-11-37-57 +.. nonce: A87OPO +.. section: Library +Fixed a bug in :meth:`inspect.signature.bind` that was causing it to fail +when handling a keyword argument with same name as positional-only +parameter. Patch by Pablo Galindo. +.. +.. bpo: 33604 +.. date: 2019-10-15-09-47-40 +.. nonce: J12cWT +.. section: Library +Fixed ``hmac.new`` and ``hmac.HMAC`` to raise TypeError instead of ValueError +when the digestmod parameter, now required in 3.8, is omitted. Also +clarified the hmac module documentation and docstrings. +.. +.. bpo: 38378 +.. date: 2019-10-13-11-00-03 +.. nonce: yYNpSm +.. section: Library +Parameters *out* and *in* of :func:`os.sendfile` was renamed to *out_fd* and +*in_fd*. +.. +.. bpo: 38417 +.. date: 2019-10-12-00-13-47 +.. nonce: W7x_aS +.. section: Library +Added support for setting the umask in the child process to the subprocess +module on POSIX systems. +.. +.. bpo: 38449 +.. date: 2019-10-11-18-49-00 +.. nonce: 9TWMlz +.. section: Library +Revert PR 15522, which introduces a regression in +:meth:`mimetypes.guess_type` due to improper handling of filenames as urls. +.. +.. bpo: 38431 +.. date: 2019-10-10-16-53-00 +.. nonce: d5wzNp +.. section: Library +Fix ``__repr__`` method for :class:`dataclasses.InitVar` to support typing +objects, patch by Samuel Colvin. +.. +.. bpo: 38109 +.. date: 2019-10-10-00-25-28 +.. nonce: 9w-IGF +.. section: Library +Add missing :const:`stat.S_IFDOOR`, :const:`stat.S_IFPORT`, +:const:`stat.S_IFWHT`, :func:`stat.S_ISDOOR`, :func:`stat.S_ISPORT`, and +:func:`stat.S_ISWHT` values to the Python implementation of :mod:`stat`. +.. +.. bpo: 38422 +.. date: 2019-10-09-18-16-51 +.. nonce: aiM5bq +.. section: Library +Clarify docstrings of pathlib suffix(es) +.. +.. bpo: 38405 +.. date: 2019-10-08-11-18-40 +.. nonce: 0-7e7s +.. section: Library +Nested subclasses of :class:`typing.NamedTuple` are now pickleable. +.. +.. bpo: 38332 +.. date: 2019-10-05-02-07-52 +.. nonce: hwrPN7 +.. section: Library +Prevent :exc:`KeyError` thrown by :func:`!_encoded_words.decode` when given +an encoded-word with invalid content-type encoding from propagating all the +way to :func:`email.message.get`. +.. +.. bpo: 38371 +.. date: 2019-10-04-18-39-59 +.. nonce: S6Klvm +.. section: Library +Deprecated the ``split()`` method in :class:`!_tkinter.TkappType` in favour +of the ``splitlist()`` method which has more consistent and predictable +behavior. +.. +.. bpo: 38341 +.. date: 2019-10-01-21-06-18 +.. nonce: uqwgU_ +.. section: Library +Add :exc:`smtplib.SMTPNotSupportedError` to the :mod:`smtplib` exported +names. +.. +.. bpo: 38319 +.. date: 2019-09-30-22-06-33 +.. nonce: 5QjiDa +.. section: Library +sendfile() used in socket and shutil modules was raising OverflowError for +files >= 2GiB on 32-bit architectures. (patch by Giampaolo Rodola) +.. +.. bpo: 38242 +.. date: 2019-09-30-00-15-27 +.. nonce: uPIyAc +.. section: Library +Revert the new asyncio Streams API +.. +.. bpo: 13153 +.. date: 2019-09-29-22-47-37 +.. nonce: 0mO9qR +.. section: Library +OS native encoding is now used for converting between Python strings and Tcl +objects. This allows to display, copy and paste to clipboard emoji and +other non-BMP characters. Converting strings from Tcl to Python and back +now never fails (except MemoryError). +.. +.. bpo: 38019 +.. date: 2019-09-29-13-50-24 +.. nonce: 6MoOE3 +.. section: Library +Correctly handle pause/resume reading of closed asyncio unix pipe. +.. +.. bpo: 38163 +.. date: 2019-09-28-20-16-40 +.. nonce: x51-vK +.. section: Library +Child mocks will now detect their type as either synchronous or +asynchronous, asynchronous child mocks will be AsyncMocks and synchronous +child mocks will be either MagicMock or Mock (depending on their parent +type). +.. +.. bpo: 38161 +.. date: 2019-09-27-16-31-28 +.. nonce: zehai1 +.. section: Library +Removes _AwaitEvent from AsyncMock. +.. +.. bpo: 38216 +.. date: 2019-09-27-15-24-45 +.. nonce: -7yvZR +.. section: Library +Allow the rare code that wants to send invalid http requests from the +``http.client`` library a way to do so. The fixes for bpo-30458 led to +breakage for some projects that were relying on this ability to test their +own behavior in the face of bad requests. +.. +.. bpo: 28286 +.. date: 2019-09-26-12-16-30 +.. nonce: LdSsrN +.. section: Library +Deprecate opening :class:`~gzip.GzipFile` for writing implicitly. Always +specify the *mode* argument for writing. +.. +.. bpo: 38108 +.. date: 2019-09-25-21-37-02 +.. nonce: Jr9HU6 +.. section: Library +Any synchronous magic methods on an AsyncMock now return a MagicMock. Any +asynchronous magic methods on a MagicMock now return an AsyncMock. +.. +.. bpo: 38265 +.. date: 2019-09-25-05-16-19 +.. nonce: X6-gsT +.. section: Library +Update the *length* parameter of :func:`os.pread` to accept +:c:type:`Py_ssize_t` instead of :c:expr:`int`. +.. +.. bpo: 38112 +.. date: 2019-09-24-10-55-01 +.. nonce: 2EinX9 +.. section: Library +:mod:`compileall` has a higher default recursion limit and new command-line +arguments for path manipulation, symlinks handling, and multiple +optimization levels. +.. +.. bpo: 38248 +.. date: 2019-09-22-13-05-36 +.. nonce: Yo3N_1 +.. section: Library +asyncio: Fix inconsistent immediate Task cancellation +.. +.. bpo: 38237 +.. date: 2019-09-20-14-27-17 +.. nonce: xRUZbx +.. section: Library +The arguments for the builtin pow function are more descriptive. They can +now also be passed in as keywords. +.. +.. bpo: 34002 +.. date: 2019-09-19-19-58-33 +.. nonce: KBnaVX +.. section: Library +Improve efficiency in parts of email package by changing while-pop to a for +loop, using isdisjoint instead of set intersections. +.. +.. bpo: 38191 +.. date: 2019-09-17-12-28-27 +.. nonce: 1TU0HV +.. section: Library +Constructors of :class:`~typing.NamedTuple` and :class:`~typing.TypedDict` +types now accept arbitrary keyword argument names, including "cls", "self", +"typename", "_typename", "fields" and "_fields". +.. +.. bpo: 38155 +.. date: 2019-09-16-21-47-48 +.. nonce: d92lRc +.. section: Library +Add ``__all__`` to :mod:`datetime`. Patch by Tahia Khan. +.. +.. bpo: 38185 +.. date: 2019-09-16-19-12-57 +.. nonce: zYWppY +.. section: Library +Fixed case-insensitive string comparison in :class:`sqlite3.Row` indexing. +.. +.. bpo: 38136 +.. date: 2019-09-16-09-54-42 +.. nonce: MdI-Zb +.. section: Library +Changes AsyncMock call count and await count to be two different counters. +Now await count only counts when a coroutine has been awaited, not when it +has been called, and vice-versa. Update the documentation around this. +.. +.. bpo: 37828 +.. date: 2019-09-15-21-31-18 +.. nonce: gLLDX7 +.. section: Library +Fix default mock name in :meth:`unittest.mock.Mock.assert_called` +exceptions. Patch by Abraham Toriz Cruz. +.. +.. bpo: 38175 +.. date: 2019-09-15-10-30-33 +.. nonce: 61XlUv +.. section: Library +Fix a memory leak in comparison of :class:`sqlite3.Row` objects. +.. +.. bpo: 33936 +.. date: 2019-09-14-10-34-00 +.. nonce: 8wCI_n +.. section: Library +_hashlib no longer calls obsolete OpenSSL initialization function with +OpenSSL 1.1.0+. +.. +.. bpo: 34706 +.. date: 2019-09-13-14-54-33 +.. nonce: HWVpOY +.. section: Library +Preserve subclassing in inspect.Signature.from_callable. +.. +.. bpo: 38153 +.. date: 2019-09-13-12-18-51 +.. nonce: nHAbuJ +.. section: Library +Names of hashing algorithms from OpenSSL are now normalized to follow +Python's naming conventions. For example OpenSSL uses sha3-512 instead of +sha3_512 or blake2b512 instead of blake2b. +.. +.. bpo: 38115 +.. date: 2019-09-13-09-24-58 +.. nonce: BOO-Y1 +.. section: Library +Fix a bug in dis.findlinestarts() where it would return invalid bytecode +offsets. Document that a code object's co_lnotab can contain invalid +bytecode offsets. +.. +.. bpo: 38148 +.. date: 2019-09-13-08-55-43 +.. nonce: Lnww6D +.. section: Library +Add slots to :mod:`asyncio` transport classes, which can reduce memory +usage. +.. +.. bpo: 38142 +.. date: 2019-09-12-18-41-35 +.. nonce: 1I0Ch0 +.. section: Library +The _hashlib OpenSSL wrapper extension module is now PEP-384 compliant. +.. +.. bpo: 9216 +.. date: 2019-09-12-14-54-45 +.. nonce: W7QMpC +.. section: Library +hashlib constructors now support usedforsecurity flag to signal that a +hashing algorithm is not used in a security context. +.. +.. bpo: 36991 +.. date: 2019-09-12-14-52-38 +.. nonce: 1OcSm8 +.. section: Library +Fixes a potential incorrect AttributeError exception escaping +ZipFile.extract() in some unsupported input error situations. +.. +.. bpo: 38134 +.. date: 2019-09-12-13-18-55 +.. nonce: gXJTbP +.. section: Library +Remove obsolete copy of PBKDF2_HMAC_fast. All supported OpenSSL versions +contain a fast implementation. +.. +.. bpo: 38132 +.. date: 2019-09-12-12-47-35 +.. nonce: KSFx1F +.. section: Library +The OpenSSL hashlib wrapper uses a simpler implementation. Several Macros +and pointless caches are gone. The hash name now comes from OpenSSL's EVP. +The algorithm name stays the same, except it is now always lower case. +.. +.. bpo: 38008 +.. date: 2019-09-12-10-47-34 +.. nonce: sH74Iy +.. section: Library +Fix parent class check in protocols to correctly identify the module that +provides a builtin protocol, instead of assuming they all come from the +:mod:`collections.abc` module +.. +.. bpo: 34037 +.. date: 2019-09-11-21-38-41 +.. nonce: LIAS_3 +.. section: Library +For :mod:`asyncio`, add a new coroutine +:meth:`loop.shutdown_default_executor`. The new coroutine provides an API to +schedule an executor shutdown that waits on the threadpool to finish +closing. Also, :func:`asyncio.run` has been updated to utilize the new +coroutine. Patch by Kyle Stanley. +.. +.. bpo: 37405 +.. date: 2019-09-11-20-27-41 +.. nonce: MG5xiY +.. section: Library +Fixed regression bug for socket.getsockname() for non-CAN_ISOTP AF_CAN +address family sockets by returning a 1-tuple instead of string. +.. +.. bpo: 38121 +.. date: 2019-09-11-16-54-57 +.. nonce: SrSDzB +.. section: Library +Update parameter names on functions in importlib.metadata matching the +changes in the 0.22 release of importlib_metadata. +.. +.. bpo: 38110 +.. date: 2019-09-11-14-49-20 +.. nonce: A19Y-q +.. section: Library +The os.closewalk() implementation now uses the libc fdwalk() API on +platforms where it is available. +.. +.. bpo: 38093 +.. date: 2019-09-11-14-45-30 +.. nonce: yQ6k7y +.. section: Library +Fixes AsyncMock so it doesn't crash when used with AsyncContextManagers or +AsyncIterators. +.. +.. bpo: 37488 +.. date: 2019-09-11-11-44-16 +.. nonce: S8CJUL +.. section: Library +Add warning to :meth:`datetime.utctimetuple`, :meth:`datetime.utcnow` and +:meth:`datetime.utcfromtimestamp` . +.. +.. bpo: 35640 +.. date: 2019-09-10-15-52-55 +.. nonce: X0lp5f +.. section: Library +Allow passing a :term:`path-like object` as ``directory`` argument to the +:class:`http.server.SimpleHTTPRequestHandler` class. Patch by Géry Ogam. +.. +.. bpo: 38086 +.. date: 2019-09-10-11-42-59 +.. nonce: w5TlG- +.. section: Library +Update importlib.metadata with changes from `importlib_metadata 0.21 +`_. +.. +.. bpo: 37251 +.. date: 2019-09-10-10-59-50 +.. nonce: 8zn2o3 +.. section: Library +Remove ``__code__`` check in AsyncMock that incorrectly evaluated function +specs as async objects but failed to evaluate classes with ``__await__`` but +no ``__code__`` attribute defined as async objects. +.. +.. bpo: 38037 +.. date: 2019-09-09-18-39-23 +.. nonce: B0UgFU +.. section: Library +Fix reference counters in the :mod:`signal` module. +.. +.. bpo: 38066 +.. date: 2019-09-09-14-39-47 +.. nonce: l9mWv- +.. section: Library +Hide internal asyncio.Stream methods: feed_eof(), feed_data(), +set_exception() and set_transport(). +.. +.. bpo: 38059 +.. date: 2019-09-08-11-36-50 +.. nonce: 8SA6co +.. section: Library +inspect.py now uses sys.exit() instead of exit() +.. +.. bpo: 38049 +.. date: 2019-09-07-12-32-50 +.. nonce: xKP4tf +.. section: Library +Added command-line interface for the :mod:`ast` module. +.. +.. bpo: 37953 +.. date: 2019-09-06-17-40-34 +.. nonce: db5FQq +.. section: Library +In :mod:`typing`, improved the ``__hash__`` and ``__eq__`` methods for +:class:`ForwardReferences`. +.. +.. bpo: 38026 +.. date: 2019-09-04-20-34-14 +.. nonce: 0LLRX- +.. section: Library +Fixed :func:`inspect.getattr_static` used ``isinstance`` while it should +avoid dynamic lookup. +.. +.. bpo: 35923 +.. date: 2019-09-03-01-41-35 +.. nonce: lYpKbY +.. section: Library +Update :class:`importlib.machinery.BuiltinImporter` to use +``loader._ORIGIN`` instead of a hardcoded value. Patch by Donghee Na. +.. +.. bpo: 38010 +.. date: 2019-09-02-14-30-39 +.. nonce: JOnz9Z +.. section: Library +In ``importlib.metadata`` sync with ``importlib_metadata`` 0.20, clarifying +behavior of ``files()`` and fixing issue where only one requirement was +returned for ``requires()`` on ``dist-info`` packages. +.. +.. bpo: 38006 +.. date: 2019-09-02-13-37-27 +.. nonce: Y7vA0Q +.. section: Library +weakref.WeakValueDictionary defines a local remove() function used as +callback for weak references. This function was created with a closure. +Modify the implementation to avoid the closure. +.. +.. bpo: 37995 +.. date: 2019-08-31-13-36-09 +.. nonce: rS8HzT +.. section: Library +Added the *indent* option to :func:`ast.dump` which allows it to produce a +multiline indented output. +.. +.. bpo: 34410 +.. date: 2019-08-31-01-52-59 +.. nonce: 7KbWZQ +.. section: Library +Fixed a crash in the :func:`tee` iterator when re-enter it. RuntimeError is +now raised in this case. +.. +.. bpo: 37140 +.. date: 2019-08-30-11-21-10 +.. nonce: cFAX-a +.. section: Library +Fix a ctypes regression of Python 3.8. When a ctypes.Structure is passed by +copy to a function, ctypes internals created a temporary object which had +the side effect of calling the structure finalizer (__del__) twice. The +Python semantics requires a finalizer to be called exactly once. Fix ctypes +internals to no longer call the finalizer twice. +.. +.. bpo: 37587 +.. date: 2019-08-29-18-48-48 +.. nonce: N7TGTC +.. section: Library +``_json.scanstring`` is now up to 3x faster when there are many backslash +escaped characters in the JSON string. +.. +.. bpo: 37834 +.. date: 2019-08-29-16-41-36 +.. nonce: FThnsh +.. section: Library +Prevent shutil.rmtree exception when built on non-Windows system without fd +system call support, like older versions of macOS. +.. +.. bpo: 10978 +.. date: 2019-08-29-01-19-13 +.. nonce: J6FQYY +.. section: Library +Semaphores and BoundedSemaphores can now release more than one waiting +thread at a time. +.. +.. bpo: 37972 +.. date: 2019-08-28-21-40-12 +.. nonce: kP-n4L +.. section: Library +Subscripts to the ``unittest.mock.call`` objects now receive the same chaining +mechanism as any other custom attributes, so that the following usage no +longer raises a ``TypeError``: +``call().foo().__getitem__('bar')`` +Patch by blhsing +.. +.. bpo: 37965 +.. date: 2019-08-28-14-04-18 +.. nonce: 7xGE-C +.. section: Library +Fix C compiler warning caused by distutils.ccompiler.CCompiler.has_function. +.. +.. bpo: 37964 +.. date: 2019-08-27-21-19-28 +.. nonce: SxdnsF +.. section: Library +Add ``F_GETPATH`` command to :mod:`fcntl`. +.. +.. bpo: 37960 +.. date: 2019-08-27-10-52-13 +.. nonce: CTY7Lw +.. section: Library +``repr()`` of buffered and text streams now silences only expected +exceptions when get the value of "name" and "mode" attributes. +.. +.. bpo: 37961 +.. date: 2019-08-27-10-30-44 +.. nonce: 4nm0zZ +.. section: Library +Add a ``total_nframe`` field to the traces collected by the tracemalloc +module. This field indicates the original number of frames before it was +truncated. +.. +.. bpo: 37951 +.. date: 2019-08-27-10-03-48 +.. nonce: MfRQgL +.. section: Library +Most features of the subprocess module now work again in subinterpreters. +Only *preexec_fn* is restricted in subinterpreters. +.. +.. bpo: 36205 +.. date: 2019-08-27-03-53-26 +.. nonce: AfkGRl +.. section: Library +Fix the rusage implementation of time.process_time() to correctly report the +sum of the system and user CPU time. +.. +.. bpo: 37950 +.. date: 2019-08-26-10-45-51 +.. nonce: -K1IKT +.. section: Library +Fix :func:`ast.dump` when call with incompletely initialized node. +.. +.. bpo: 34679 +.. date: 2019-08-25-18-07-48 +.. nonce: HECzL7 +.. section: Library +Restores instantiation of Windows IOCP event loops from the non-main thread. +.. +.. bpo: 36917 +.. date: 2019-08-25-14-56-42 +.. nonce: GBxdw2 +.. section: Library +Add default implementation of the :meth:`ast.NodeVisitor.visit_Constant` +method which emits a deprecation warning and calls corresponding methods +``visit_Num()``, ``visit_Str()``, etc. +.. +.. bpo: 37798 +.. date: 2019-08-24-16-54-49 +.. nonce: 7mRQCk +.. section: Library +Update test_statistics.py to verify that the statistics module works well +for both C and Python implementations. Patch by Donghee Na +.. +.. bpo: 26589 +.. date: 2019-08-23-00-55-19 +.. nonce: M1xyxG +.. section: Library +Added a new status code to the http module: 451 +UNAVAILABLE_FOR_LEGAL_REASONS +.. +.. bpo: 37915 +.. date: 2019-08-22-16-13-27 +.. nonce: xyoZI5 +.. section: Library +Fix a segmentation fault that appeared when comparing instances of +``datetime.timezone`` and ``datetime.tzinfo`` objects. Patch by Pablo +Galindo. +.. +.. bpo: 32554 +.. date: 2019-08-22-01-49-05 +.. nonce: 4xiXyM +.. section: Library +Deprecate having random.seed() call hash on arbitrary types. +.. +.. bpo: 9938 +.. date: 2019-08-21-16-38-56 +.. nonce: t3G7N9 +.. section: Library +Add optional keyword argument ``exit_on_error`` for :class:`ArgumentParser`. +.. +.. bpo: 37851 +.. date: 2019-08-21-13-43-04 +.. nonce: mIIfD_ +.. section: Library +The :mod:`faulthandler` module no longer allocates its alternative stack at +Python startup. Now the stack is only allocated at the first faulthandler +usage. +.. +.. bpo: 32793 +.. date: 2019-08-20-05-17-32 +.. nonce: cgpXl6 +.. section: Library +Fix a duplicated debug message when :meth:`smtplib.SMTP.connect` is called. +.. +.. bpo: 37885 +.. date: 2019-08-19-10-31-41 +.. nonce: 4Nc9sp +.. section: Library +venv: Don't generate unset variable warning on deactivate. +.. +.. bpo: 37868 +.. date: 2019-08-17-22-33-54 +.. nonce: hp64fi +.. section: Library +Fix dataclasses.is_dataclass when given an instance that never raises +AttributeError in __getattr__. That is, an object that returns something +for __dataclass_fields__ even if it's not a dataclass. +.. +.. bpo: 37811 +.. date: 2019-08-14-21-41-07 +.. nonce: d1xYj7 +.. section: Library +Fix ``socket`` module's ``socket.connect(address)`` function being unable to +establish connection in case of interrupted system call. The problem was +observed on all OSes which ``poll(2)`` system call can take only +non-negative integers and -1 as a timeout value. +.. +.. bpo: 37863 +.. date: 2019-08-14-20-46-39 +.. nonce: CkXqgX +.. section: Library +Optimizations for Fraction.__hash__ suggested by Tim Peters. +.. +.. bpo: 21131 +.. date: 2019-08-14-15-34-23 +.. nonce: 0MMQRi +.. section: Library +Fix ``faulthandler.register(chain=True)`` stack. faulthandler now allocates +a dedicated stack of ``SIGSTKSZ*2`` bytes, instead of just ``SIGSTKSZ`` +bytes. Calling the previous signal handler in faulthandler signal handler +uses more than ``SIGSTKSZ`` bytes of stack memory on some platforms. +.. +.. bpo: 37798 +.. date: 2019-08-14-13-51-24 +.. nonce: AmXrik +.. section: Library +Add C fastpath for statistics.NormalDist.inv_cdf() Patch by Donghee Na +.. +.. bpo: 37804 +.. date: 2019-08-12-23-07-47 +.. nonce: Ene6L- +.. section: Library +Remove the deprecated method ``threading.Thread.isAlive()``. Patch by Donghee +Na. +.. +.. bpo: 37819 +.. date: 2019-08-11-10-34-19 +.. nonce: LVJls- +.. section: Library +Add Fraction.as_integer_ratio() to match the corresponding methods in bool, +int, float, and decimal. +.. +.. bpo: 14465 +.. date: 2019-08-10-18-50-04 +.. nonce: qZGC4g +.. section: Library +Add an xml.etree.ElementTree.indent() function for pretty-printing XML +trees. Contributed by Stefan Behnel. +.. +.. bpo: 37810 +.. date: 2019-08-10-12-33-27 +.. nonce: d4zbvB +.. section: Library +Fix :mod:`difflib` ``?`` hint in diff output when dealing with tabs. Patch +by Anthony Sottile. +.. +.. bpo: 37772 +.. date: 2019-08-07-23-48-09 +.. nonce: hLCvdn +.. section: Library +In ``zipfile.Path``, when adding implicit dirs, ensure that ancestral +directories are added and that duplicates are excluded. +.. +.. bpo: 18578 +.. date: 2019-08-07-19-34-07 +.. nonce: xfvdb_ +.. section: Library +Renamed and documented ``test.bytecode_helper`` as +``test.support.bytecode_helper``. Patch by Joannah Nanjekye. +.. +.. bpo: 37785 +.. date: 2019-08-07-14-49-22 +.. nonce: y7OlT8 +.. section: Library +Fix xgettext warnings in :mod:`argparse`. +.. +.. bpo: 34488 +.. date: 2019-08-06-21-30-58 +.. nonce: OqxVo8 +.. section: Library +:meth:`writelines` method of :class:`io.BytesIO` is now slightly faster when +many small lines are passed. Patch by Sergey Fedoseev. +.. +.. bpo: 37449 +.. date: 2019-08-04-17-22-33 +.. nonce: ycbL2z +.. section: Library +``ensurepip`` now uses ``importlib.resources.read_binary()`` to read data +instead of ``pkgutil.get_data()``. Patch by Joannah Nanjekye. +.. +.. bpo: 28292 +.. date: 2019-08-04-11-47-58 +.. nonce: vkihH5 +.. section: Library +Mark calendar.py helper functions as being private. The follows PEP 8 +guidance to maintain the style conventions in the module and it addresses a +known case of user confusion. +.. +.. bpo: 18049 +.. date: 2019-08-02-16-44-42 +.. nonce: OA4qBL +.. section: Library +Add definition of THREAD_STACK_SIZE for AIX in Python/thread_pthread.h The +default thread stacksize caused crashes with the default recursion limit +Patch by M Felt +.. +.. bpo: 37742 +.. date: 2019-08-02-14-01-25 +.. nonce: f4Xn9S +.. section: Library +The logging.getLogger() API now returns the root logger when passed the name +'root', whereas previously it returned a non-root logger named 'root'. This +could affect cases where user code explicitly wants a non-root logger named +'root', or instantiates a logger using logging.getLogger(__name__) in some +top-level module called 'root.py'. +.. +.. bpo: 37738 +.. date: 2019-08-01-17-11-16 +.. nonce: A3WWcT +.. section: Library +Fix the implementation of curses ``addch(str, color_pair)``: pass the color +pair to ``setcchar()``, instead of always passing 0 as the color pair. +.. +.. bpo: 37723 +.. date: 2019-07-31-16-49-01 +.. nonce: zq6tw8 +.. section: Library +Fix performance regression on regular expression parsing with huge character +sets. Patch by Yann Vaginay. +.. +.. bpo: 35943 +.. date: 2019-07-31-15-52-51 +.. nonce: -KswoB +.. section: Library +The function :c:func:`PyImport_GetModule` now ensures any module it returns +is fully initialized. Patch by Joannah Nanjekye. +.. +.. bpo: 32178 +.. date: 2019-07-30-22-41-05 +.. nonce: X-IFLe +.. section: Library +Fix IndexError in :mod:`email` package when trying to parse invalid address +fields starting with ``:``. +.. +.. bpo: 37268 +.. date: 2019-07-30-01-27-29 +.. nonce: QDmA44 +.. section: Library +The :mod:`parser` module is deprecated and will be removed in future +versions of Python. +.. +.. bpo: 11953 +.. date: 2019-07-29-21-39-45 +.. nonce: 4Hpwf9 +.. section: Library +Completing WSA* error codes in :mod:`socket`. +.. +.. bpo: 37685 +.. date: 2019-07-28-22-25-25 +.. nonce: _3bN9f +.. section: Library +Fixed comparisons of :class:`datetime.timedelta` and +:class:`datetime.timezone`. +.. +.. bpo: 37697 +.. date: 2019-07-28-17-44-21 +.. nonce: 7UV5d0 +.. section: Library +Synchronize ``importlib.metadata`` with `importlib_metadata 0.19 +`_, +improving handling of EGG-INFO files and fixing a crash when entry point +names contained colons. +.. +.. bpo: 37695 +.. date: 2019-07-27-20-21-03 +.. nonce: QANdvg +.. section: Library +Correct :func:`curses.unget_wch` error message. Patch by Anthony Sottile. +.. +.. bpo: 37689 +.. date: 2019-07-27-18-00-43 +.. nonce: glEmZi +.. section: Library +Add :meth:`is_relative_to` in :class:`PurePath` to determine whether or not +one path is relative to another. +.. +.. bpo: 29553 +.. date: 2019-07-27-10-14-45 +.. nonce: TVeIDe +.. section: Library +Fixed :meth:`argparse.ArgumentParser.format_usage` for mutually exclusive +groups. Patch by Andrew Nester. +.. +.. bpo: 37691 +.. date: 2019-07-26-22-30-01 +.. nonce: 1Li3rx +.. section: Library +Let math.dist() accept coordinates as sequences (or iterables) rather than +just tuples. +.. +.. bpo: 37685 +.. date: 2019-07-26-00-12-29 +.. nonce: TqckMZ +.. section: Library +Fixed ``__eq__``, ``__lt__`` etc implementations in some classes. They now +return :data:`NotImplemented` for unsupported type of the other operand. +This allows the other operand to play role (for example the equality +comparison with :data:`~unittest.mock.ANY` will return ``True``). +.. +.. bpo: 37354 +.. date: 2019-07-25-10-28-40 +.. nonce: RT3_3H +.. section: Library +Make Activate.ps1 Powershell script static to allow for signing it. +.. +.. bpo: 37664 +.. date: 2019-07-24-18-27-44 +.. nonce: o-GYZC +.. section: Library +Update wheels bundled with ensurepip (pip 19.2.3 and setuptools 41.2.0) +.. +.. bpo: 37663 +.. date: 2019-07-24-14-38-53 +.. nonce: h4-9-1 +.. section: Library +Bring consistency to venv shell activation scripts by always using +__VENV_PROMPT__. +.. +.. bpo: 37642 +.. date: 2019-07-21-20-59-31 +.. nonce: L61Bvy +.. section: Library +Allowed the pure Python implementation of :class:`datetime.timezone` to +represent sub-minute offsets close to minimum and maximum boundaries, +specifically in the ranges (23:59, 24:00) and (-23:59, 24:00). Patch by +Ngalim Siregar +.. +.. bpo: 36161 +.. date: 2019-07-20-01-17-43 +.. nonce: Fzf-f9 +.. section: Library +In :mod:`posix`, use ``ttyname_r`` instead of ``ttyname`` for thread safety. +.. +.. bpo: 36324 +.. date: 2019-07-19-22-44-41 +.. nonce: 1VjywS +.. section: Library +Make internal attributes for statistics.NormalDist() private. +.. +.. bpo: 37555 +.. date: 2019-07-19-20-13-48 +.. nonce: S5am28 +.. section: Library +Fix ``NonCallableMock._call_matcher`` returning tuple instead of ``_Call`` +object when ``self._spec_signature`` exists. Patch by Elizabeth Uselton +.. +.. bpo: 29446 +.. date: 2019-07-19-16-06-48 +.. nonce: iXGuoi +.. section: Library +Make ``from tkinter import *`` import only the expected objects. +.. +.. bpo: 16970 +.. date: 2019-07-19-01-46-56 +.. nonce: GEASf5 +.. section: Library +Adding a value error when an invalid value in passed to nargs Patch by +Robert Leenders +.. +.. bpo: 34443 +.. date: 2019-07-17-11-10-08 +.. nonce: OFnGqz +.. section: Library +Exceptions from :mod:`enum` now use the ``__qualname`` of the enum class in +the exception message instead of the ``__name__``. +.. +.. bpo: 37491 +.. date: 2019-07-17-06-54-43 +.. nonce: op0aMs +.. section: Library +Fix ``IndexError`` when parsing email headers with unexpectedly ending +bare-quoted string value. Patch by Abhilash Raj. +.. +.. bpo: 37587 +.. date: 2019-07-13-16-02-48 +.. nonce: fd-1aF +.. section: Library +Make json.loads faster for long strings. (Patch by Marco Paolini) +.. +.. bpo: 18378 +.. date: 2019-07-13-13-40-12 +.. nonce: NHcojp +.. section: Library +Recognize "UTF-8" as a valid value for LC_CTYPE in locale._parse_localename. +.. +.. bpo: 37579 +.. date: 2019-07-13-10-59-43 +.. nonce: B1Tq9i +.. section: Library +Return :exc:`NotImplemented` in Python implementation of ``__eq__`` for +:class:`~datetime.timedelta` and :class:`~datetime.time` when the other +object being compared is not of the same type to match C implementation. +Patch by Karthikeyan Singaravelan. +.. +.. bpo: 21478 +.. date: 2019-07-10-23-07-11 +.. nonce: cCw9rF +.. section: Library +Record calls to parent when autospecced object is attached to a mock using +:func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan. +.. +.. bpo: 37531 +.. date: 2019-07-09-19-38-26 +.. nonce: GX7s8S +.. section: Library +"python3 -m test -jN --timeout=TIMEOUT" now kills a worker process if it +runs longer than *TIMEOUT* seconds. +.. +.. bpo: 37482 +.. date: 2019-07-09-11-20-21 +.. nonce: auzvev +.. section: Library +Fix serialization of display name in originator or destination address +fields with both encoded words and special chars. +.. +.. bpo: 36993 +.. date: 2019-07-09-05-44-39 +.. nonce: 4javqu +.. section: Library +Improve error reporting for corrupt zip files with bad zip64 extra data. +Patch by Daniel Hillier. +.. +.. bpo: 37502 +.. date: 2019-07-08-03-15-04 +.. nonce: qZGC4g +.. section: Library +pickle.loads() no longer raises TypeError when the buffers argument is set +to None +.. +.. bpo: 37520 +.. date: 2019-07-07-21-09-08 +.. nonce: Gg0KD6 +.. section: Library +Correct behavior for zipfile.Path.parent when the path object identifies a +subdirectory. +.. +.. bpo: 18374 +.. date: 2019-07-05-21-46-45 +.. nonce: qgE0H3 +.. section: Library +Fix the ``.col_offset`` attribute of nested :class:`ast.BinOp` instances +which had a too large value in some situations. +.. +.. bpo: 37424 +.. date: 2019-07-04-13-00-20 +.. nonce: 0i1MR- +.. section: Library +Fixes a possible hang when using a timeout on ``subprocess.run()`` while +capturing output. If the child process spawned its own children or +otherwise connected its stdout or stderr handles with another process, we +could hang after the timeout was reached and our child was killed when +attempting to read final output from the pipes. +.. +.. bpo: 37421 +.. date: 2019-07-03-12-47-52 +.. nonce: gR5hC8 +.. section: Library +Fix :func:`multiprocessing.util.get_temp_dir` finalizer: clear also the +'tempdir' configuration of the current process, so next call to +``get_temp_dir()`` will create a new temporary directory, rather than +reusing the removed temporary directory. +.. +.. bpo: 37481 +.. date: 2019-07-02-13-08-30 +.. nonce: hd5k09 +.. section: Library +The distutils ``bdist_wininst`` command is deprecated in Python 3.8, use +``bdist_wheel`` (wheel packages) instead. +.. +.. bpo: 37479 +.. date: 2019-07-02-12-43-57 +.. nonce: O53a5S +.. section: Library +When ``Enum.__str__`` is overridden in a derived class, the override will be +used by ``Enum.__format__`` regardless of whether mixin classes are present. +.. +.. bpo: 37440 +.. date: 2019-06-28-16-40-17 +.. nonce: t3wX-N +.. section: Library +http.client now enables TLS 1.3 post-handshake authentication for default +context or if a cert_file is passed to HTTPSConnection. +.. +.. bpo: 37437 +.. date: 2019-06-27-20-33-50 +.. nonce: du39_A +.. section: Library +Update vendorized expat version to 2.2.7. +.. +.. bpo: 37428 +.. date: 2019-06-27-13-27-02 +.. nonce: _wcwUd +.. section: Library +SSLContext.post_handshake_auth = True no longer sets +SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the +option is documented as ignored for clients, OpenSSL implicitly enables cert +chain validation when the flag is set. +.. +.. bpo: 37420 +.. date: 2019-06-26-22-25-05 +.. nonce: CxFJ09 +.. section: Library +:func:`os.sched_setaffinity` now correctly handles errors that arise during +iteration over its ``mask`` argument. Patch by Brandt Bucher. +.. +.. bpo: 37412 +.. date: 2019-06-26-16-28-59 +.. nonce: lx0VjC +.. section: Library +The :func:`os.getcwdb` function now uses the UTF-8 encoding on Windows, +rather than the ANSI code page: see :pep:`529` for the rationale. The +function is no longer deprecated on Windows. +.. +.. bpo: 37406 +.. date: 2019-06-26-03-00-06 +.. nonce: uovkpq +.. section: Library +The sqlite3 module now raises TypeError, rather than ValueError, if +operation argument type is not str: execute(), executemany() and calling a +connection. +.. +.. bpo: 29412 +.. date: 2019-06-25-19-27-25 +.. nonce: n4Zqdh +.. section: Library +Fix IndexError in parsing a header value ending unexpectedly. Patch by +Abhilash Raj. +.. +.. bpo: 36546 +.. date: 2019-06-25-05-07-48 +.. nonce: RUcxaK +.. section: Library +The *dist* argument for statistics.quantiles() is now positional only. The +current name doesn't reflect that the argument can be either a dataset or a +distribution. Marking the parameter as positional avoids confusion and +makes it possible to change the name later. +.. +.. bpo: 37394 +.. date: 2019-06-25-02-10-00 +.. nonce: srZ1zx +.. section: Library +Fix a bug that was causing the :mod:`queue` module to fail if the +accelerator module was not available. Patch by Pablo Galindo. +.. +.. bpo: 37376 +.. date: 2019-06-24-11-26-34 +.. nonce: SwSUQ4 +.. section: Library +:mod:`pprint` now has support for :class:`types.SimpleNamespace`. Patch by +Carl Bordum Hansen. +.. +.. bpo: 26967 +.. date: 2019-06-23-12-46-10 +.. nonce: xEuem1 +.. section: Library +An :class:`~argparse.ArgumentParser` with ``allow_abbrev=False`` no longer +disables grouping of short flags, such as ``-vv``, but only disables +abbreviation of long flags as documented. Patch by Zac Hatfield-Dodds. +.. +.. bpo: 37212 +.. date: 2019-06-22-22-00-35 +.. nonce: Zhv-tq +.. section: Library +:func:`unittest.mock.call` now preserves the order of keyword arguments in +repr output. Patch by Karthikeyan Singaravelan. +.. +.. bpo: 37372 +.. date: 2019-06-22-12-30-00 +.. nonce: kIKqZ6 +.. section: Library +Fix error unpickling datetime.time objects from Python 2 with seconds>=24. +Patch by Justin Blanchard. +.. +.. bpo: 37345 +.. date: 2019-06-22-08-51-44 +.. nonce: o8XABX +.. section: Library +Add formal support for UDPLITE sockets. Support was present before, but it +is now easier to detect support with ``hasattr(socket, 'IPPROTO_UDPLITE')`` +and there are constants defined for each of the values needed: +``socket.IPPROTO_UDPLITE``, ``UDPLITE_SEND_CSCOV``, and +``UDPLITE_RECV_CSCOV``. Patch by Gabe Appleton. +.. +.. bpo: 37358 +.. date: 2019-06-21-14-54-02 +.. nonce: RsASpn +.. section: Library +Optimized ``functools.partial`` by using vectorcall. +.. +.. bpo: 37347 +.. date: 2019-06-20-14-23-48 +.. nonce: Gf9yYI +.. section: Library +:meth:`sqlite3.Connection.create_aggregate`, +:meth:`sqlite3.Connection.create_function`, +:meth:`sqlite3.Connection.set_authorizer`, +:meth:`sqlite3.Connection.set_progress_handler` +:meth:`sqlite3.Connection.set_trace_callback` methods lead to segfaults if +some of these methods are called twice with an equal object but not the +same. Now callbacks are stored more carefully. Patch by Aleksandr Balezin. +.. +.. bpo: 37163 +.. date: 2019-06-19-10-35-53 +.. nonce: 9pPg2F +.. section: Library +The *obj* argument of :func:`dataclasses.replace` is positional-only now. +.. +.. bpo: 37085 +.. date: 2019-06-18-16-29-31 +.. nonce: GeYaD6 +.. section: Library +Add the optional Linux SocketCAN Broadcast Manager constants, used as flags +to configure the BCM behaviour, in the socket module. Patch by Karl Ding. +.. +.. bpo: 37328 +.. date: 2019-06-18-15-31-33 +.. nonce: 2PW1-l +.. section: Library +``HTMLParser.unescape`` is removed. It was undocumented and deprecated +since Python 3.4. +.. +.. bpo: 37305 +.. date: 2019-06-18-13-59-55 +.. nonce: fGzWlP +.. section: Library +Add .webmanifest -> application/manifest+json to list of recognized file +types and content type headers +.. +.. bpo: 37320 +.. date: 2019-06-17-22-10-37 +.. nonce: ffieYa +.. section: Library +``aifc.openfp()`` alias to ``aifc.open()``, ``sunau.openfp()`` alias to +``sunau.open()``, and ``wave.openfp()`` alias to ``wave.open()`` have been +removed. They were deprecated since Python 3.7. +.. +.. bpo: 37315 +.. date: 2019-06-17-11-59-52 +.. nonce: o1xFC0 +.. section: Library +Deprecated accepting floats with integral value (like ``5.0``) in +:func:`math.factorial`. +.. +.. bpo: 37312 +.. date: 2019-06-17-10-03-52 +.. nonce: qKvBfF +.. section: Library +``_dummy_thread`` and ``dummy_threading`` modules have been removed. These +modules were deprecated since Python 3.7 which requires threading support. +.. +.. bpo: 33972 +.. date: 2019-06-15-14-39-50 +.. nonce: XxnNPw +.. section: Library +Email with single part but content-type set to ``multipart/*`` doesn't raise +AttributeError anymore. +.. +.. bpo: 37280 +.. date: 2019-06-14-13-30-47 +.. nonce: Fxur0F +.. section: Library +Use threadpool for reading from file for sendfile fallback mode. +.. +.. bpo: 37279 +.. date: 2019-06-14-13-25-56 +.. nonce: OHlW6l +.. section: Library +Fix asyncio sendfile support when sendfile sends extra data in fallback +mode. +.. +.. bpo: 19865 +.. date: 2019-06-14-08-30-16 +.. nonce: FRGH4I +.. section: Library +:func:`ctypes.create_unicode_buffer` now also supports non-BMP characters +on platforms with 16-bit :c:type:`wchar_t` (for example, Windows and AIX). +.. +.. bpo: 37266 +.. date: 2019-06-13-11-59-52 +.. nonce: goLjef +.. section: Library +In a subinterpreter, spawning a daemon thread now raises an exception. +Daemon threads were never supported in subinterpreters. Previously, the +subinterpreter finalization crashed with a Python fatal error if a daemon +thread was still running. +.. +.. bpo: 37210 +.. date: 2019-06-12-16-10-50 +.. nonce: r4yMg6 +.. section: Library +Allow pure Python implementation of :mod:`pickle` to work even when the C +:mod:`!_pickle` module is unavailable. +.. +.. bpo: 21872 +.. date: 2019-06-12-08-56-22 +.. nonce: V9QGGN +.. section: Library +Fix :mod:`lzma`: module decompresses data incompletely. When decompressing a +FORMAT_ALONE format file, and it doesn't have the end marker, sometimes the +last one to dozens bytes can't be output. Patch by Ma Lin. +.. +.. bpo: 35922 +.. date: 2019-06-11-19-34-29 +.. nonce: rxpzWr +.. section: Library +Fix :meth:`RobotFileParser.crawl_delay` and +:meth:`RobotFileParser.request_rate` to return ``None`` rather than raise +:exc:`AttributeError` when no relevant rule is defined in the robots.txt +file. Patch by Rémi Lapeyre. +.. +.. bpo: 35766 +.. date: 2019-06-11-16-41-40 +.. nonce: v1Kj-T +.. section: Library +Change the format of feature_version to be a (major, minor) tuple. +.. +.. bpo: 36607 +.. date: 2019-06-11-13-52-04 +.. nonce: 5_mJkQ +.. section: Library +Eliminate :exc:`RuntimeError` raised by :func:`asyncio.all_tasks` if +internal tasks weak set is changed by another thread during iteration. +.. +.. bpo: 18748 +.. date: 2019-06-11-01-54-19 +.. nonce: ADqCkq +.. section: Library +:class:`!_pyio.IOBase` destructor now does nothing if getting the ``closed`` +attribute fails to better mimic :class:`!_io.IOBase` finalizer. +.. +.. bpo: 36402 +.. date: 2019-06-11-00-35-02 +.. nonce: b0IJVp +.. section: Library +Fix a race condition at Python shutdown when waiting for threads. Wait until +the Python thread state of all non-daemon threads get deleted (join all +non-daemon threads), rather than just wait until non-daemon Python threads +complete. +.. +.. bpo: 37206 +.. date: 2019-06-09-22-25-03 +.. nonce: 2WBg4q +.. section: Library +Default values which cannot be represented as Python objects no longer +improperly represented as ``None`` in function signatures. +.. +.. bpo: 37111 +.. date: 2019-06-09-17-22-33 +.. nonce: 2I0z2k +.. section: Library +Added ``encoding`` and ``errors`` keyword parameters to +``logging.basicConfig``. +.. +.. bpo: 12144 +.. date: 2019-06-08-23-26-58 +.. nonce: Z7mz-q +.. section: Library +Ensure cookies with ``expires`` attribute are handled in +:meth:`CookieJar.make_cookies`. +.. +.. bpo: 34886 +.. date: 2019-06-08-16-03-19 +.. nonce: Ov-pc9 +.. section: Library +Fix an unintended ValueError from :func:`subprocess.run` when checking for +conflicting *input* and *stdin* or *capture_output* and *stdout* or *stderr* +args when they were explicitly provided but with ``None`` values within a +passed in ``**kwargs`` dict rather than as passed directly by name. Patch +contributed by Rémi Lapeyre. +.. +.. bpo: 37173 +.. date: 2019-06-08-11-33-48 +.. nonce: 0e_8gS +.. section: Library +The exception message for ``inspect.getfile()`` now correctly reports the +passed class rather than the builtins module. +.. +.. bpo: 37178 +.. date: 2019-06-07-17-16-09 +.. nonce: Day_oB +.. section: Library +Give math.perm() a one argument form that means the same as +math.factorial(). +.. +.. bpo: 37178 +.. date: 2019-06-07-17-11-34 +.. nonce: b1StSv +.. section: Library +For math.perm(n, k), let k default to n, giving the same result as +factorial. +.. +.. bpo: 37165 +.. date: 2019-06-05-11-48-19 +.. nonce: V_rwfE +.. section: Library +Converted _collections._count_elements to use the Argument Clinic. +.. +.. bpo: 34767 +.. date: 2019-06-04-23-44-52 +.. nonce: BpDShN +.. section: Library +Do not always create a :class:`collections.deque` in :class:`asyncio.Lock`. +.. +.. bpo: 37158 +.. date: 2019-06-04-22-25-38 +.. nonce: JKm15S +.. section: Library +Speed-up statistics.fmean() by switching from a function to a generator. +.. +.. bpo: 34282 +.. date: 2019-06-04-15-39-14 +.. nonce: aAK54n +.. section: Library +Remove ``Enum._convert`` method, deprecated in 3.8. +.. +.. bpo: 37150 +.. date: 2019-06-04-14-44-41 +.. nonce: TTzHxj +.. section: Library +``argparse._ActionsContainer.add_argument`` now throws error, if someone +accidentally pass FileType class object instead of instance of FileType as +``type`` argument. +.. +.. bpo: 28724 +.. date: 2019-05-30-15-51-42 +.. nonce: 34TrS8 +.. section: Library +The socket module now has the :func:`socket.send_fds` and +:func:`socket.recv.fds` methods. Contributed by Joannah Nanjekye, Shinya +Okano and Victor Stinner. +.. +.. bpo: 35621 +.. date: 2019-05-28-19-03-46 +.. nonce: Abc1lf +.. section: Library +Support running asyncio subprocesses when execution event loop in a thread +on UNIX. +.. +.. bpo: 36520 +.. date: 2019-05-28-02-37-00 +.. nonce: W4tday +.. section: Library +Lengthy email headers with UTF-8 characters are now properly encoded when +they are folded. Patch by Jeffrey Kintscher. +.. +.. bpo: 30835 +.. date: 2019-05-27-15-29-46 +.. nonce: 3FoaWH +.. section: Library +Fixed a bug in email parsing where a message with invalid bytes in +content-transfer-encoding of a multipart message can cause an +AttributeError. Patch by Andrew Donnellan. +.. +.. bpo: 31163 +.. date: 2019-05-26-16-34-53 +.. nonce: 21A802 +.. section: Library +pathlib.Path instance's rename and replace methods now return the new Path +instance. +.. +.. bpo: 25068 +.. date: 2019-05-22-04-52-35 +.. nonce: vR_rC- +.. section: Library +:class:`urllib.request.ProxyHandler` now lowercases the keys of the passed +dictionary. +.. +.. bpo: 26185 +.. date: 2019-05-20-14-17-29 +.. nonce: pQW4mI +.. section: Library +Fix :func:`repr` on empty :class:`ZipInfo` object. Patch by Mickaël +Schoentgen. +.. +.. bpo: 21315 +.. date: 2019-05-19-10-48-46 +.. nonce: PgXVqF +.. section: Library +Email headers containing RFC2047 encoded words are parsed despite the +missing whitespace, and a defect registered. Also missing trailing +whitespace after encoded words is now registered as a defect. +.. +.. bpo: 31904 +.. date: 2019-05-17-16-50-02 +.. nonce: 4a5ggm +.. section: Library +Port test_datetime to VxWorks: skip zoneinfo tests on VxWorks +.. +.. bpo: 35805 +.. date: 2019-05-17-15-11-08 +.. nonce: E4YwYz +.. section: Library +Add parser for Message-ID header and add it to default HeaderRegistry. This +should prevent folding of Message-ID using RFC 2048 encoded words. +.. +.. bpo: 36871 +.. date: 2019-05-12-12-58-37 +.. nonce: 6xiEHZ +.. section: Library +Ensure method signature is used instead of constructor signature of a class +while asserting mock object against method calls. Patch by Karthikeyan +Singaravelan. +.. +.. bpo: 35070 +.. date: 2019-05-09-18-50-55 +.. nonce: 4vaqNL +.. section: Library +posix.getgrouplist() now works correctly when the user belongs to +NGROUPS_MAX supplemental groups. Patch by Jeffrey Kintscher. +.. +.. bpo: 31783 +.. date: 2019-05-07-19-25-55 +.. nonce: lgLo69 +.. section: Library +Fix race condition in ThreadPoolExecutor when worker threads are created +during interpreter shutdown. +.. +.. bpo: 36582 +.. date: 2019-05-07-17-42-36 +.. nonce: L_dxR6 +.. section: Library +Fix ``UserString.encode()`` to correctly return ``bytes`` rather than a +``UserString`` instance. +.. +.. bpo: 32424 +.. date: 2019-04-28-10-34-19 +.. nonce: eqNPhM +.. section: Library +Deprecate xml.etree.ElementTree.Element.copy() in favor of copy.copy(). +Patch by Gordon P. Hemsley +.. +.. bpo: 36564 +.. date: 2019-04-08-13-00-13 +.. nonce: _n67m_ +.. section: Library +Fix infinite loop in email header folding logic that would be triggered when +an email policy's max_line_length is not long enough to include the required +markup and any values in the message. Patch by Paul Ganssle +.. +.. bpo: 36543 +.. date: 2019-04-06-20-08-12 +.. nonce: RPjmUz +.. section: Library +Removed methods Element.getchildren(), Element.getiterator() and +ElementTree.getiterator() and the xml.etree.cElementTree module. +.. +.. bpo: 36409 +.. date: 2019-03-23-16-42-46 +.. nonce: ZYVKao +.. section: Library +Remove the old plistlib API deprecated in Python 3.4 +.. +.. bpo: 36302 +.. date: 2019-03-21-19-23-46 +.. nonce: Yc591g +.. section: Library +distutils sorts source file lists so that Extension .so files build more +reproducibly by default +.. +.. bpo: 36250 +.. date: 2019-03-09-16-04-12 +.. nonce: tSK4N1 +.. section: Library +Ignore ``ValueError`` from ``signal`` with ``interaction`` in non-main +thread. +.. +.. bpo: 36046 +.. date: 2019-02-19-17-32-45 +.. nonce: fX9OPj +.. section: Library +Added ``user``, ``group`` and ``extra_groups`` parameters to the +subprocess.Popen constructor. Patch by Patrick McLean. +.. +.. bpo: 32627 +.. date: 2019-02-03-19-13-08 +.. nonce: b68f64 +.. section: Library +Fix compile error when ``_uuid`` headers conflicting included. +.. +.. bpo: 35800 +.. date: 2019-01-25-17-12-17 +.. nonce: MCGJdQ +.. section: Library +Deprecate ``smtpd.MailmanProxy`` ready for future removal. +.. +.. bpo: 35168 +.. date: 2019-01-22-09-23-20 +.. nonce: UGv2yW +.. section: Library +:attr:`shlex.shlex.punctuation_chars` is now a read-only property. +.. +.. bpo: 8538 +.. date: 2019-01-09-16-18-52 +.. nonce: PfVZia +.. section: Library +Add support for boolean actions like ``--foo`` and ``--no-foo`` to argparse. +Patch contributed by Rémi Lapeyre. +.. +.. bpo: 20504 +.. date: 2018-11-21-18-05-50 +.. nonce: kG0ub5 +.. section: Library +Fixes a bug in :mod:`!cgi` module when a multipart/form-data request has no +``Content-Length`` header. +.. +.. bpo: 25988 +.. date: 2018-11-19-10-23-58 +.. nonce: 6o7gGK +.. section: Library +The abstract base classes in :mod:`collections.abc` no longer are exposed in +the regular :mod:`collections` module. +.. +.. bpo: 11122 +.. date: 2018-11-12-19-08-50 +.. nonce: Gj7BQn +.. section: Library +Distutils won't check for rpmbuild in specified paths only. +.. +.. bpo: 34775 +.. date: 2018-09-23-03-18-52 +.. nonce: vHeuHk +.. section: Library +Division handling of PurePath now returns NotImplemented instead of raising +a TypeError when passed something other than an instance of str or PurePath. +Patch by Roger Aiudi. +.. +.. bpo: 34749 +.. date: 2018-09-21-13-23-29 +.. nonce: B0k819 +.. section: Library +:func:`binascii.a2b_base64` is now up to 2 times faster. Patch by Sergey +Fedoseev. +.. +.. bpo: 34519 +.. date: 2018-08-27-15-44-50 +.. nonce: cPlH1h +.. section: Library +Add additional aliases for HP Roman 8. Patch by Michael Osipov. +.. +.. bpo: 28009 +.. date: 2018-08-04-12-26-11 +.. nonce: 4JcHZb +.. section: Library +Fix uuid.getnode() on platforms with '.' as MAC Addr delimiter as well fix +for MAC Addr format that omits a leading 0 in MAC Addr values. Currently, +AIX is the only know platform with these settings. Patch by Michael Felt. +.. +.. bpo: 30618 +.. date: 2018-07-14-13-48-56 +.. nonce: T5AUF6 +.. section: Library +Add :meth:`~pathlib.Path.readlink`. Patch by Girts Folkmanis. +.. +.. bpo: 32498 +.. date: 2018-06-17-21-02-25 +.. nonce: La3TZz +.. section: Library +Made :func:`urllib.parse.unquote` accept bytes in addition to strings. +Patch by Stein Karlsen. +.. +.. bpo: 33348 +.. date: 2018-04-24-13-18-48 +.. nonce: XaJDei +.. section: Library +lib2to3 now recognizes expressions after ``*`` and ``**`` like in ``f(*[] or +[])``. +.. +.. bpo: 32689 +.. date: 2018-02-13-17-58-30 +.. nonce: a-3SnH +.. section: Library +Update :func:`shutil.move` function to allow for Path objects to be used as +source argument. Patch by Emily Morehouse and Maxwell "5.13b" McKinnon. +.. +.. bpo: 32820 +.. date: 2018-02-13-12-25-43 +.. nonce: 0stF0u +.. section: Library +Added ``__format__`` to IPv4 and IPv6 classes. Always outputs a fully +zero-padded string. Supports b/x/n modifiers (bin/hex/native format). Native +format for IPv4 is bin, native format for IPv6 is hex. Also supports '#' and +'_' modifiers. +.. +.. bpo: 27657 +.. date: 2017-12-26-14-32-23 +.. nonce: 6BhyVK +.. section: Library +Fix urllib.parse.urlparse() with numeric paths. A string like "path:80" is +no longer parsed as a path but as a scheme ("path") and a path ("80"). +.. +.. bpo: 4963 +.. date: 2017-08-15-11-24-41 +.. nonce: LRYres +.. section: Library +Fixed non-deterministic behavior related to mimetypes extension mapping and +module reinitialization. +.. +.. bpo: 21767 +.. date: 2019-11-17-11-54-57 +.. nonce: Qq3Dos +.. section: Documentation +Explicitly mention abc support in functools.singledispatch +.. +.. bpo: 38816 +.. date: 2019-11-15-11-39-13 +.. nonce: vUaSVL +.. section: Documentation +Provides more details about the interaction between :c:func:`fork` and +CPython's runtime, focusing just on the C-API. This includes cautions about +where :c:func:`fork` should and shouldn't be called. +.. +.. bpo: 38351 +.. date: 2019-11-15-09-22-28 +.. nonce: xwhlse +.. section: Documentation +Modernize :mod:`email` examples from %-formatting to f-strings. +.. +.. bpo: 38778 +.. date: 2019-11-12-15-31-09 +.. nonce: PHhTlv +.. section: Documentation +Document the fact that :exc:`RuntimeError` is raised if :meth:`os.fork` is +called in a subinterpreter. +.. +.. bpo: 38592 +.. date: 2019-10-26-13-19-07 +.. nonce: Y96BYO +.. section: Documentation +Add Brazilian Portuguese to the language switcher at Python Documentation +website. +.. +.. bpo: 38294 +.. date: 2019-09-27-23-37-41 +.. nonce: go_jFf +.. section: Documentation +Add list of no-longer-escaped chars to re.escape documentation +.. +.. bpo: 38053 +.. date: 2019-09-07-19-09-01 +.. nonce: lttibE +.. section: Documentation +Modernized the plistlib documentation +.. +.. bpo: 26868 +.. date: 2019-09-07-15-55-46 +.. nonce: Raw0Gd +.. section: Documentation +Fix example usage of :c:func:`PyModule_AddObject` to properly handle errors. +.. +.. bpo: 36797 +.. date: 2019-09-05-14-47-51 +.. nonce: KN9Ga5 +.. section: Documentation +Fix a dead link in the distutils API Reference. +.. +.. bpo: 37977 +.. date: 2019-08-29-14-38-01 +.. nonce: pML-UI +.. section: Documentation +Warn more strongly and clearly about pickle insecurity +.. +.. bpo: 37979 +.. date: 2019-08-29-10-40-05 +.. nonce: TAUx_E +.. section: Documentation +Added a link to dateutil.parser.isoparse in the datetime.fromisoformat +documentation. Patch by Paul Ganssle +.. +.. bpo: 12707 +.. date: 2019-08-27-01-14-59 +.. nonce: Yj3_7_ +.. section: Documentation +Deprecate info(), geturl(), getcode() methods in favor of the headers, url, +and status properties, respectively, for HTTPResponse and addinfourl. Also +deprecate the code attribute of addinfourl in favor of the status attribute. +Patch by Ashwin Ramaswami +.. +.. bpo: 37937 +.. date: 2019-08-24-12-59-06 +.. nonce: F7fHbt +.. section: Documentation +Mention ``frame.f_trace`` in :func:`sys.settrace` docs. +.. +.. bpo: 37878 +.. date: 2019-08-16-20-01-10 +.. nonce: MvA6rZ +.. section: Documentation +Make :c:func:`PyThreadState_DeleteCurrent` Internal. +.. +.. bpo: 37759 +.. date: 2019-08-04-19-20-58 +.. nonce: EHRF4i +.. section: Documentation +Beginning edits to Whatsnew 3.8 +.. +.. bpo: 37726 +.. date: 2019-07-31-11-40-06 +.. nonce: h-3o9a +.. section: Documentation +Stop recommending getopt in the tutorial for command line argument parsing +and promote argparse. +.. +.. bpo: 32910 +.. date: 2019-07-25-10-30-32 +.. nonce: caLLAe +.. section: Documentation +Remove implementation-specific behaviour of how venv's Deactivate works. +.. +.. bpo: 37256 +.. date: 2019-07-16-14-48-12 +.. nonce: qJTrBb +.. section: Documentation +Fix wording of arguments for :class:`Request` in :mod:`urllib.request` +.. +.. bpo: 37284 +.. date: 2019-07-13-12-58-20 +.. nonce: rP8WpB +.. section: Documentation +Add a brief note to indicate that any new ``sys.implementation`` required +attributes must go through the PEP process. +.. +.. bpo: 30088 +.. date: 2019-07-13-12-43-01 +.. nonce: CIcBjy +.. section: Documentation +Documented that :class:`mailbox.Maildir` constructor doesn't attempt to +verify the maildir folder layout correctness. Patch by Sviatoslav Sydorenko. +.. +.. bpo: 37521 +.. date: 2019-07-12-15-09-56 +.. nonce: 7tiFR- +.. section: Documentation +Fix ``importlib`` examples to insert any newly created modules via +importlib.util.module_from_spec() immediately into sys.modules instead of +after calling loader.exec_module(). +Thanks to Benjamin Mintz for finding the bug. +.. +.. bpo: 37456 +.. date: 2019-07-06-17-51-36 +.. nonce: lgAQHn +.. section: Documentation +Slash ('/') is now part of syntax. +.. +.. bpo: 37487 +.. date: 2019-07-06-17-19-26 +.. nonce: QagfZ5 +.. section: Documentation +Fix PyList_GetItem index description to include 0. +.. +.. bpo: 37149 +.. date: 2019-07-06-02-19-02 +.. nonce: NumHn3 +.. section: Documentation +Replace the dead link to the Tkinter 8.5 reference by John Shipman, New +Mexico Tech, with a link to the archive.org copy. +.. +.. bpo: 37478 +.. date: 2019-07-06-00-57-27 +.. nonce: B0ioLw +.. section: Documentation +Added possible exceptions to the description of os.chdir(). +.. +.. bpo: 34903 +.. date: 2019-06-17-09-36-46 +.. nonce: r_wGRc +.. section: Documentation +Documented that in :meth:`datetime.datetime.strptime`, the leading zero in +some two-digit formats is optional. Patch by Mike Gleen. +.. +.. bpo: 36260 +.. date: 2019-06-04-09-29-00 +.. nonce: WrGuc- +.. section: Documentation +Add decompression pitfalls to zipfile module documentation. +.. +.. bpo: 37004 +.. date: 2019-05-22-04-30-07 +.. nonce: BRgxrt +.. section: Documentation +In the documentation for difflib, a note was added explicitly warning that +the results of SequenceMatcher's ratio method may depend on the order of the +input strings. +.. +.. bpo: 36960 +.. date: 2019-05-18-16-25-44 +.. nonce: xEKHXj +.. section: Documentation +Restructured the :mod:`datetime` docs in the interest of making them more +user-friendly and improving readability. Patch by Brad Solomon. +.. +.. bpo: 36487 +.. date: 2019-04-02-19-23-00 +.. nonce: Jg6-MG +.. section: Documentation +Make C-API docs clear about what the "main" interpreter is. +.. +.. bpo: 23460 +.. date: 2019-02-14-07-12-48 +.. nonce: Iqiqtm +.. section: Documentation +The documentation for decimal string formatting using the ``:g`` specifier has +been updated to reflect the correct exponential notation cutoff point. +Original patch contributed by Tuomas Suutari. +.. +.. bpo: 35803 +.. date: 2019-01-21-14-30-59 +.. nonce: yae6Lq +.. section: Documentation +Document and test that ``tempfile`` functions may accept a :term:`path-like +object` for the ``dir`` argument. Patch by Anthony Sottile. +.. +.. bpo: 33944 +.. date: 2018-10-26-18-10-29 +.. nonce: V1YeOA +.. section: Documentation +Added a note about the intended use of code in .pth files. +.. +.. bpo: 34293 +.. date: 2018-07-31-15-38-26 +.. nonce: yHupAL +.. section: Documentation +Fix the Doc/Makefile regarding PAPER environment variable and PDF builds +.. +.. bpo: 25237 +.. date: 2018-06-02-12-55-23 +.. nonce: m8-JMu +.. section: Documentation +Add documentation for tkinter modules +.. +.. bpo: 38614 +.. date: 2019-10-30-15-12-32 +.. nonce: M6UnLB +.. section: Tests +Fix test_communicate() of test_asyncio.test_subprocess: use +``support.LONG_TIMEOUT`` (5 minutes), instead of just 1 minute. +.. +.. bpo: 38614 +.. date: 2019-10-28-15-56-02 +.. nonce: aDdDYE +.. section: Tests +Add timeout constants to :mod:`test.support`: +:data:`~test.support.LOOPBACK_TIMEOUT`, +:data:`~test.support.INTERNET_TIMEOUT`, :data:`~test.support.SHORT_TIMEOUT` +and :data:`~test.support.LONG_TIMEOUT`. +.. +.. bpo: 38502 +.. date: 2019-10-17-00-49-38 +.. nonce: vUEic7 +.. section: Tests +test.regrtest now uses process groups in the multiprocessing mode (-jN +command line option) if process groups are available: if :func:`os.setsid` +and :func:`os.killpg` functions are available. +.. +.. bpo: 35998 +.. date: 2019-10-16-01-36-15 +.. nonce: G305Bf +.. section: Tests +Fix a race condition in test_asyncio.test_start_tls_server_1(). Previously, +there was a race condition between the test main() function which replaces +the protocol and the test ServerProto protocol which sends ANSWER once it +gets HELLO. Now, only the test main() function is responsible to send data, +ServerProto no longer sends data. +.. +.. bpo: 38470 +.. date: 2019-10-14-22-46-35 +.. nonce: NHtzpy +.. section: Tests +Fix ``test_compileall.test_compile_dir_maxlevels()`` on Windows without long +path support: only create 3 subdirectories instead of between 20 and 100 +subdirectories. +.. +.. bpo: 37531 +.. date: 2019-10-08-16-42-05 +.. nonce: 7v-_Ca +.. section: Tests +On timeout, regrtest no longer attempts to call ``popen.communicate()`` +again: it can hang until all child processes using stdout and stderr pipes +completes. Kill the worker process and ignores its output. Change also the +faulthandler timeout of the main process from 1 minute to 5 minutes, for +Python slowest buildbots. +.. +.. bpo: 38239 +.. date: 2019-09-26-15-48-36 +.. nonce: MfoVzY +.. section: Tests +Fix test_gdb for Link Time Optimization (LTO) builds. +.. +.. bpo: 38275 +.. date: 2019-09-25-14-40-57 +.. nonce: -kdveI +.. section: Tests +test_ssl now handles disabled TLS/SSL versions better. OpenSSL's crypto +policy and run-time settings are recognized and tests for disabled versions +are skipped. Tests also accept more TLS minimum_versions for platforms that +override OpenSSL's default with strict settings. +.. +.. bpo: 38271 +.. date: 2019-09-25-13-11-29 +.. nonce: iHXNIg +.. section: Tests +The private keys for test_ssl were encrypted with 3DES in traditional PKCS#5 +format. 3DES and the digest algorithm of PKCS#5 are blocked by some strict +crypto policies. Use PKCS#8 format with AES256 encryption instead. +.. +.. bpo: 38270 +.. date: 2019-09-25-12-18-31 +.. nonce: _x-9uH +.. section: Tests +test.support now has a helper function to check for availability of a hash +digest function. Several tests are refactored avoid MD5 and use SHA256 +instead. Other tests are marked to use MD5 and skipped when MD5 is disabled. +.. +.. bpo: 37123 +.. date: 2019-09-24-12-30-55 +.. nonce: IoutBn +.. section: Tests +Multiprocessing test test_mymanager() now also expects -SIGTERM, not only +exitcode 0. BaseManager._finalize_manager() sends SIGTERM to the manager +process if it takes longer than 1 second to stop, which happens on slow +buildbots. +.. +.. bpo: 38212 +.. date: 2019-09-24-12-24-05 +.. nonce: IWbhWz +.. section: Tests +Multiprocessing tests: increase test_queue_feeder_donot_stop_onexc() timeout +from 1 to 60 seconds. +.. +.. bpo: 38117 +.. date: 2019-09-11-17-22-32 +.. nonce: X7LgGY +.. section: Tests +Test with OpenSSL 1.1.1d +.. +.. bpo: 38018 +.. date: 2019-09-03-19-33-10 +.. nonce: zTrMu7 +.. section: Tests +Increase code coverage for multiprocessing.shared_memory. +.. +.. bpo: 37805 +.. date: 2019-08-25-19-51-46 +.. nonce: Kl1sti +.. section: Tests +Add tests for json.dump(..., skipkeys=True). Patch by Donghee Na. +.. +.. bpo: 37531 +.. date: 2019-08-20-19-24-19 +.. nonce: wRoXfU +.. section: Tests +Enhance regrtest multiprocess timeout: write a message when killing a worker +process, catch popen.kill() and popen.wait() exceptions, put a timeout on +the second call to popen.communicate(). +.. +.. bpo: 37876 +.. date: 2019-08-16-16-15-14 +.. nonce: m3k1w3 +.. section: Tests +Add tests for ROT-13 codec. +.. +.. bpo: 36833 +.. date: 2019-07-18-14-52-58 +.. nonce: Zoe9ek +.. section: Tests +Added tests for :samp:`PyDateTime_{xxx}_GET_{xxx}()` macros of the C API of the +:mod:`datetime` module. Patch by Joannah Nanjekye. +.. +.. bpo: 37558 +.. date: 2019-07-11-10-33-56 +.. nonce: SKHRsL +.. section: Tests +Fix test_shared_memory_cleaned_after_process_termination name handling +.. +.. bpo: 37526 +.. date: 2019-07-09-12-33-18 +.. nonce: vmm5y7 +.. section: Tests +Add :func:`test.support.catch_threading_exception`: context manager catching +:class:`threading.Thread` exception using :func:`threading.excepthook`. +.. +.. bpo: 37421 +.. date: 2019-07-08-10-11-36 +.. nonce: OY77go +.. section: Tests +test_concurrent_futures now explicitly stops the ForkServer instance if it's +running. +.. +.. bpo: 37421 +.. date: 2019-07-05-14-47-55 +.. nonce: n8o2to +.. section: Tests +multiprocessing tests now stop the ForkServer instance if it's running: +close the "alive" file descriptor to ask the server to stop and then remove +its UNIX address. +.. +.. bpo: 37421 +.. date: 2019-07-03-00-05-28 +.. nonce: ORGRSG +.. section: Tests +test_distutils.test_build_ext() is now able to remove the temporary +directory on Windows: don't import the newly built C extension ("xx") in the +current process, but test it in a separated process. +.. +.. bpo: 37421 +.. date: 2019-07-02-23-29-06 +.. nonce: WEfc5A +.. section: Tests +test_concurrent_futures now cleans up multiprocessing to remove immediately +temporary directories created by multiprocessing.util.get_temp_dir(). +.. +.. bpo: 37421 +.. date: 2019-07-02-23-20-35 +.. nonce: HCkKWz +.. section: Tests +test_winconsoleio doesn't leak a temporary file anymore: use +tempfile.TemporaryFile() to remove it when the test completes. +.. +.. bpo: 37421 +.. date: 2019-07-01-19-57-26 +.. nonce: NFH1f0 +.. section: Tests +multiprocessing tests now explicitly call ``_run_finalizers()`` to +immediately remove temporary directories created by tests. +.. +.. bpo: 37421 +.. date: 2019-07-01-19-56-17 +.. nonce: bOe350 +.. section: Tests +urllib.request tests now call :func:`~urllib.request.urlcleanup` to remove +temporary files created by ``urlretrieve()`` tests and to clear the +``_opener`` global variable set by ``urlopen()`` and functions calling +indirectly ``urlopen()``. +.. +.. bpo: 37472 +.. date: 2019-07-01-17-19-47 +.. nonce: WzkEAx +.. section: Tests +Remove ``Lib/test/outstanding_bugs.py``. +.. +.. bpo: 37199 +.. date: 2019-06-29-23-56-28 +.. nonce: FHDsLf +.. section: Tests +Fix test failures when IPv6 is unavailable or disabled. +.. +.. bpo: 19696 +.. date: 2019-06-29-16-02-21 +.. nonce: 05ijhN +.. section: Tests +Replace deprecated method "random.choose" with "random.choice" in +"test_pkg_import.py". +.. +.. bpo: 37335 +.. date: 2019-06-28-16-37-52 +.. nonce: o5S2hY +.. section: Tests +Remove no longer necessary code from c locale coercion tests +.. +.. bpo: 37421 +.. date: 2019-06-27-00-37-59 +.. nonce: rVJb3x +.. section: Tests +Fix test_shutil to no longer leak temporary files. +.. +.. bpo: 37411 +.. date: 2019-06-26-15-28-45 +.. nonce: 5lGNhM +.. section: Tests +Fix test_wsgiref.testEnviron() to no longer depend on the environment +variables (don't fail if "X" variable is set). +.. +.. bpo: 37400 +.. date: 2019-06-25-16-02-43 +.. nonce: cx_EWv +.. section: Tests +Fix test_os.test_chown(): use os.getgroups() rather than grp.getgrall() to +get groups. Rename also the test to test_chown_gid(). +.. +.. bpo: 37359 +.. date: 2019-06-24-10-47-07 +.. nonce: CkdtyO +.. section: Tests +Add --cleanup option to python3 -m test to remove ``test_python_*`` +directories of previous failed jobs. Add "make cleantest" to run ``python3 +-m test --cleanup``. +.. +.. bpo: 37362 +.. date: 2019-06-21-15-47-33 +.. nonce: D3xppx +.. section: Tests +test_gdb no longer fails if it gets an "unexpected" message on stderr: it +now ignores stderr. The purpose of test_gdb is to test that python-gdb.py +commands work as expected, not to test gdb. +.. +.. bpo: 35998 +.. date: 2019-06-14-17-05-49 +.. nonce: yX82oD +.. section: Tests +Avoid TimeoutError in test_asyncio: test_start_tls_server_1() +.. +.. bpo: 37278 +.. date: 2019-06-14-12-21-47 +.. nonce: z0HUOr +.. section: Tests +Fix test_asyncio ProactorLoopCtrlC: join the thread to prevent leaking a +running thread and leaking a reference. +.. +.. bpo: 37261 +.. date: 2019-06-13-12-19-56 +.. nonce: NuKFVo +.. section: Tests +Fix :func:`test.support.catch_unraisable_exception`: its __exit__() method +now ignores unraisable exception raised when clearing its ``unraisable`` +attribute. +.. +.. bpo: 37069 +.. date: 2019-06-13-00-46-25 +.. nonce: wdktFo +.. section: Tests +regrtest now uses :func:`sys.unraisablehook` to mark a test as "environment +altered" (ENV_CHANGED) if it emits an "unraisable exception". Moreover, +regrtest logs a warning in this case. +Use ``python3 -m test --fail-env-changed`` to catch unraisable exceptions in +tests. +.. +.. bpo: 37252 +.. date: 2019-06-12-14-30-29 +.. nonce: 4o-uLs +.. section: Tests +Fix assertions in ``test_close`` and ``test_events_mask_overflow`` devpoll +tests. +.. +.. bpo: 37169 +.. date: 2019-06-07-12-23-15 +.. nonce: yfXTFg +.. section: Tests +Rewrite ``_PyObject_IsFreed()`` unit tests. +.. +.. bpo: 37153 +.. date: 2019-06-04-18-30-39 +.. nonce: 711INB +.. section: Tests +``test_venv.test_multiprocessing()`` now explicitly calls +``pool.terminate()`` to wait until the pool completes. +.. +.. bpo: 34001 +.. date: 2019-06-03-20-47-10 +.. nonce: KvYx9z +.. section: Tests +Make test_ssl pass with LibreSSL. LibreSSL handles minimum and maximum TLS +version differently than OpenSSL. +.. +.. bpo: 36919 +.. date: 2019-05-28-15-41-34 +.. nonce: -vGt_m +.. section: Tests +Make ``test_source_encoding.test_issue2301`` implementation independent. The +test will work now for both CPython and IronPython. +.. +.. bpo: 30202 +.. date: 2019-04-15-19-05-35 +.. nonce: Wt7INj +.. section: Tests +Update ``test.test_importlib.test_abc`` to test ``find_spec()``. +.. +.. bpo: 28009 +.. date: 2019-04-11-07-59-43 +.. nonce: s85urF +.. section: Tests +Modify the test_uuid logic to test when a program is available AND can be +used to obtain a MACADDR as basis for an UUID. Patch by M. Felt +.. +.. bpo: 34596 +.. date: 2018-09-07-01-18-27 +.. nonce: r2-EGd +.. section: Tests +Fallback to a default reason when :func:`unittest.skip` is uncalled. Patch +by Naitree Zhu. +.. +.. bpo: 38809 +.. date: 2019-11-15-09-25-44 +.. nonce: 9jwta6 +.. section: Build +On Windows, build scripts will now recognize and use python.exe from an +active virtual env. +.. +.. bpo: 38684 +.. date: 2019-11-04-14-30-37 +.. nonce: aed593 +.. section: Build +Fix _hashlib build when Blake2 is disabled, but OpenSSL supports it. +.. +.. bpo: 38468 +.. date: 2019-10-13-16-18-24 +.. nonce: buCO84 +.. section: Build +Misc/python-config.in now uses ``getvar()`` for all still existing +``sysconfig.get_config_var()`` calls. Patch by Joannah Nanjekye. +.. +.. bpo: 37415 +.. date: 2019-10-11-15-32-58 +.. nonce: D9RXrq +.. section: Build +Fix stdatomic.h header check for ICC compiler: the ICC implementation lacks +atomic_uintptr_t type which is needed by Python. +.. +.. bpo: 38301 +.. date: 2019-09-28-02-37-11 +.. nonce: 123456 +.. section: Build +In Solaris family, we must be sure to use ``-D_REENTRANT``. Patch by Jesús +Cea Avión. +.. +.. bpo: 36002 +.. date: 2019-09-13-14-12-36 +.. nonce: Bcl4oe +.. section: Build +Locate ``llvm-profdata`` and ``llvm-ar`` binaries using ``AC_PATH_TOOL`` +rather than ``AC_PATH_TARGET_TOOL``. +.. +.. bpo: 37936 +.. date: 2019-09-10-00-54-48 +.. nonce: E7XEwu +.. section: Build +The :file:`.gitignore` file systematically keeps "rooted", with a +non-trailing slash, all the rules that are meant to apply to files in a +specific place in the repo. Previously, when the intended file to ignore +happened to be at the root of the repo, we'd most often accidentally also +ignore files and directories with the same name anywhere in the tree. +.. +.. bpo: 37760 +.. date: 2019-08-24-17-39-09 +.. nonce: f3jXuH +.. section: Build +The :file:`Tools/unicode/makeunicodedata.py` script, which is used for +converting information from the Unicode Character Database into generated +code and data used by the methods of :class:`str` and by the +:mod:`unicodedata` module, now handles each character's data as a +``dataclass`` with named attributes, rather than a length-18 list of +different fields. +.. +.. bpo: 37936 +.. date: 2019-08-24-00-29-40 +.. nonce: QrORqA +.. section: Build +The :file:`.gitignore` file no longer applies to any files that are in fact +tracked in the Git repository. Patch by Greg Price. +.. +.. bpo: 37725 +.. date: 2019-07-30-16-26-11 +.. nonce: MkG1TT +.. section: Build +Change "clean" makefile target to also clean the program guided optimization +(PGO) data. Previously you would have to use "make clean" and "make +profile-removal", or "make clobber". +.. +.. bpo: 37707 +.. date: 2019-07-29-11-36-16 +.. nonce: Sm-dGk +.. section: Build +Mark some individual tests to skip when --pgo is used. The tests marked +increase the PGO task time significantly and likely don't help improve +optimization of the final executable. +.. +.. bpo: 36044 +.. date: 2019-07-11-01-28-24 +.. nonce: gIgfiJ +.. section: Build +Reduce the number of unit tests run for the PGO generation task. This +speeds up the task by a factor of about 15x. Running the full unit test +suite is slow. This change may result in a slightly less optimized build +since not as many code branches will be executed. If you are willing to +wait for the much slower build, the old behavior can be restored using +'./configure [..] PROFILE_TASK="-m test --pgo-extended"'. We make no +guarantees as to which PGO task set produces a faster build. Users who care +should run their own relevant benchmarks as results can depend on the +environment, workload, and compiler tool chain. +.. +.. bpo: 37468 +.. date: 2019-07-01-14-39-40 +.. nonce: trbQ-_ +.. section: Build +``make install`` no longer installs ``wininst-*.exe`` files used by +distutils bdist_wininst: bdist_wininst only works on Windows. +.. +.. bpo: 37189 +.. date: 2019-06-17-09-40-59 +.. nonce: j5ebdT +.. section: Build +Many :samp:`PyRun_{XXX}()` functions like :c:func:`PyRun_String` were no longer +exported in ``libpython38.dll`` by mistake. Export them again to fix the ABI +compatibility. +.. +.. bpo: 25361 +.. date: 2019-03-19-22-07-37 +.. nonce: XO9Bfr +.. section: Build +Enables use of SSE2 instructions in Windows 32-bit build. +.. +.. bpo: 36210 +.. date: 2019-03-06-18-55-10 +.. nonce: fup9H2 +.. section: Build +Update optional extension module detection for AIX. ossaudiodev and spwd are +not applicable for AIX, and are no longer reported as missing. 3rd-party +packaging of ncurses (with ASIS support) conflicts with officially supported +AIX curses library, so configure AIX to use libcurses.a. However, skip +trying to build _curses_panel. +patch by M Felt +.. +.. bpo: 38589 +.. date: 2019-10-28-10-48-16 +.. nonce: V69Q1a +.. section: Windows +Fixes HTML Help shortcut when Windows is not installed to C drive +.. +.. bpo: 38453 +.. date: 2019-10-28-10-32-43 +.. nonce: NwwatW +.. section: Windows +Ensure ntpath.realpath() correctly resolves relative paths. +.. +.. bpo: 38519 +.. date: 2019-10-28-05-01-29 +.. nonce: dCkY66 +.. section: Windows +Restores the internal C headers that were missing from the nuget.org and +Microsoft Store packages. +.. +.. bpo: 38492 +.. date: 2019-10-16-09-49-09 +.. nonce: Te1LxC +.. section: Windows +Remove ``pythonw.exe`` dependency on the Microsoft C++ runtime. +.. +.. bpo: 38344 +.. date: 2019-10-05-05-50-58 +.. nonce: scr2LO +.. section: Windows +Fix error message in activate.bat +.. +.. bpo: 38359 +.. date: 2019-10-03-08-04-14 +.. nonce: wzwsl_ +.. section: Windows +Ensures ``pyw.exe`` launcher reads correct registry key. +.. +.. bpo: 38355 +.. date: 2019-10-02-15-38-49 +.. nonce: n3AWX6 +.. section: Windows +Fixes ``ntpath.realpath`` failing on ``sys.executable``. +.. +.. bpo: 38117 +.. date: 2019-09-16-14-07-11 +.. nonce: hJVf0C +.. section: Windows +Update bundled OpenSSL to 1.1.1d +.. +.. bpo: 38092 +.. date: 2019-09-13-14-11-42 +.. nonce: x31ehI +.. section: Windows +Reduce overhead when using multiprocessing in a Windows virtual environment. +.. +.. bpo: 38133 +.. date: 2019-09-12-12-05-55 +.. nonce: yFeRGS +.. section: Windows +Allow py.exe launcher to locate installations from the Microsoft Store and +improve display of active virtual environments. +.. +.. bpo: 38114 +.. date: 2019-09-11-15-24-04 +.. nonce: cc0E5E +.. section: Windows +The ``pip.ini`` is no longer included in the Nuget package. +.. +.. bpo: 32592 +.. date: 2019-09-11-14-51-56 +.. nonce: jvQMD9 +.. section: Windows +Set Windows 8 as the minimum required version for API support +.. +.. bpo: 36634 +.. date: 2019-09-11-14-42-04 +.. nonce: 8Un8ih +.. section: Windows +:func:`os.cpu_count` now returns active processors rather than maximum +processors. +.. +.. bpo: 36634 +.. date: 2019-09-11-12-34-31 +.. nonce: xLaGgb +.. section: Windows +venv activate.bat now works when the existing variables contain double quote +characters. +.. +.. bpo: 38081 +.. date: 2019-09-11-10-22-01 +.. nonce: 8JhzjD +.. section: Windows +Prevent error calling :func:`os.path.realpath` on ``'NUL'``. +.. +.. bpo: 38087 +.. date: 2019-09-10-14-21-40 +.. nonce: --eIib +.. section: Windows +Fix case sensitivity in test_pathlib and test_ntpath. +.. +.. bpo: 38088 +.. date: 2019-09-10-14-17-25 +.. nonce: FOvWSM +.. section: Windows +Fixes distutils not finding vcruntime140.dll with only the v142 toolset +installed. +.. +.. bpo: 37283 +.. date: 2019-09-09-12-22-23 +.. nonce: 8NvOkU +.. section: Windows +Ensure command-line and unattend.xml setting override previously detected +states in Windows installer. +.. +.. bpo: 38030 +.. date: 2019-09-04-14-01-08 +.. nonce: _USdtk +.. section: Windows +Fixes :func:`os.stat` failing for block devices on Windows +.. +.. bpo: 38020 +.. date: 2019-09-03-11-47-37 +.. nonce: xFZ2j0 +.. section: Windows +Fixes potential crash when calling :func:`os.readlink` (or indirectly +through :func:`~os.path.realpath`) on a file that is not a supported link. +.. +.. bpo: 37705 +.. date: 2019-08-30-15-15-22 +.. nonce: 2o4NWW +.. section: Windows +Improve the implementation of ``winerror_to_errno()``. +.. +.. bpo: 37549 +.. date: 2019-08-22-09-04-44 +.. nonce: TpKI3M +.. section: Windows +:func:`os.dup` no longer fails for standard streams on Windows 7. +.. +.. bpo: 1311 +.. date: 2019-08-21-12-58-18 +.. nonce: BoW1wU +.. section: Windows +The ``nul`` file on Windows now returns True from :func:`~os.path.exists` +and a valid result from :func:`os.stat` with ``S_IFCHR`` set. +.. +.. bpo: 9949 +.. date: 2019-08-14-13-40-15 +.. nonce: zW45Ks +.. section: Windows +Enable support for following symlinks in :func:`os.realpath`. +.. +.. bpo: 37834 +.. date: 2019-08-12-12-00-24 +.. nonce: VB2QVj +.. section: Windows +Treat all name surrogate reparse points on Windows in :func:`os.lstat` and +other reparse points as regular files in :func:`os.stat`. +.. +.. bpo: 36266 +.. date: 2019-08-08-18-05-27 +.. nonce: x4eZU3 +.. section: Windows +Add the module name in the formatted error message when DLL load fail +happens during module import in ``_PyImport_FindSharedFuncptrWindows()``. +Patch by Srinivas Nyayapati. +.. +.. bpo: 25172 +.. date: 2019-08-06-18-09-18 +.. nonce: Akreij +.. section: Windows +Trying to import the :mod:`!crypt` module on Windows will result in an +:exc:`ImportError` with a message explaining that the module isn't supported +on Windows. On other platforms, if the underlying ``_crypt`` module is not +available, the ImportError will include a message explaining the problem. +.. +.. bpo: 37778 +.. date: 2019-08-06-13-54-12 +.. nonce: AY1XhH +.. section: Windows +Fixes the icons used for file associations to the Microsoft Store package. +.. +.. bpo: 37734 +.. date: 2019-08-06-09-35-12 +.. nonce: EoJ9Nh +.. section: Windows +Fix use of registry values to launch Python from Microsoft Store app. +.. +.. bpo: 37702 +.. date: 2019-07-29-16-49-31 +.. nonce: Lj2f5e +.. section: Windows +Fix memory leak on Windows in creating an SSLContext object or running +``urllib.request.urlopen('https://...')``. +.. +.. bpo: 37672 +.. date: 2019-07-24-14-36-28 +.. nonce: uKEVHN +.. section: Windows +Switch Windows Store package's pip to use bundled :file:`pip.ini` instead of +:envvar:`PIP_USER` variable. +.. +.. bpo: 10945 +.. date: 2019-07-01-12-38-48 +.. nonce: s0YBHG +.. section: Windows +Officially drop support for creating bdist_wininst installers on non-Windows +systems. +.. +.. bpo: 37445 +.. date: 2019-06-28-18-10-29 +.. nonce: LsdYO6 +.. section: Windows +Include the ``FORMAT_MESSAGE_IGNORE_INSERTS`` flag in ``FormatMessageW()`` +calls. +.. +.. bpo: 37369 +.. date: 2019-06-28-09-44-08 +.. nonce: 1iVpxq +.. section: Windows +Fixes path for :data:`sys.executable` when running from the Microsoft Store. +.. +.. bpo: 37380 +.. date: 2019-06-25-04-15-22 +.. nonce: tPxjuz +.. section: Windows +Don't collect unfinished processes with ``subprocess._active`` on Windows to +cleanup later. Patch by Ruslan Kuprieiev. +.. +.. bpo: 37351 +.. date: 2019-06-20-12-50-32 +.. nonce: asTnVW +.. section: Windows +Removes libpython38.a from standard Windows distribution. +.. +.. bpo: 35360 +.. date: 2019-06-18-09-05-08 +.. nonce: tdqSmo +.. section: Windows +Update Windows builds to use SQLite 3.28.0. +.. +.. bpo: 37267 +.. date: 2019-06-13-04-15-51 +.. nonce: Ygo5ef +.. section: Windows +On Windows, :func:`os.dup` no longer creates an inheritable fd when handling +a character file. +.. +.. bpo: 36779 +.. date: 2019-06-11-15-41-34 +.. nonce: 0TMw6f +.. section: Windows +Ensure ``time.tzname`` is correct on Windows when the active code page is +set to CP_UTF7 or CP_UTF8. +.. +.. bpo: 32587 +.. date: 2019-05-10-15-25-44 +.. nonce: -0g2O3 +.. section: Windows +Make :const:`winreg.REG_MULTI_SZ` support zero-length strings. +.. +.. bpo: 28269 +.. date: 2019-05-05-05-23-34 +.. nonce: -MOHI7 +.. section: Windows +Replace use of :c:func:`strcasecmp` for the system function +:c:func:`!_stricmp`. Patch by Minmin Gong. +.. +.. bpo: 36590 +.. date: 2019-04-10-21-13-26 +.. nonce: ZTaKcu +.. section: Windows +Add native Bluetooth RFCOMM support to socket module. +.. +.. bpo: 38117 +.. date: 2019-09-15-21-29-13 +.. nonce: ZLsoAZ +.. section: macOS +Updated OpenSSL to 1.1.1d in macOS installer. +.. +.. bpo: 38089 +.. date: 2019-09-10-14-24-35 +.. nonce: eedgyD +.. section: macOS +Move Azure Pipelines to latest VM versions and make macOS tests optional +.. +.. bpo: 18049 +.. date: 2019-07-13-15-58-18 +.. nonce: MklhQQ +.. section: macOS +Increase the default stack size of threads from 5MB to 16MB on macOS, to +match the stack size of the main thread. This avoids crashes on deep +recursion in threads. +.. +.. bpo: 34602 +.. date: 2019-07-02-01-06-47 +.. nonce: 10d4wl +.. section: macOS +Avoid test suite failures on macOS by no longer calling resource.setrlimit +to increase the process stack size limit at runtime. The runtime change is +no longer needed since the interpreter is being built with a larger default +stack size. +.. +.. bpo: 35360 +.. date: 2019-06-18-08-58-30 +.. nonce: -CWbfy +.. section: macOS +Update macOS installer to use SQLite 3.28.0. +.. +.. bpo: 34631 +.. date: 2019-06-18-00-30-40 +.. nonce: vSifcv +.. section: macOS +Updated OpenSSL to 1.1.1c in macOS installer. +.. +.. bpo: 26353 +.. date: 2019-11-09-23-55-59 +.. nonce: duYZiF +.. section: IDLE +Stop adding newline when saving an IDLE shell window. +.. +.. bpo: 4630 +.. date: 2019-10-28-04-48-03 +.. nonce: upgjiV +.. section: IDLE +Add an option to toggle IDLE's cursor blink for shell, editor, and output +windows. See Settings, General, Window Preferences, Cursor Blink. Patch by +Zackery Spytz. +.. +.. bpo: 38598 +.. date: 2019-10-26-18-16-24 +.. nonce: 6kH9FY +.. section: IDLE +Do not try to compile IDLE shell or output windows +.. +.. bpo: 36698 +.. date: 2019-10-04-18-03-09 +.. nonce: BKcmom +.. section: IDLE +IDLE no longer fails when write non-encodable characters to stderr. It now +escapes them with a backslash, as the regular Python interpreter. Added the +``errors`` field to the standard streams. +.. +.. bpo: 35379 +.. date: 2019-09-17-01-28-56 +.. nonce: yAECDr +.. section: IDLE +When exiting IDLE, catch any AttributeError. One happens when +EditorWindow.close is called twice. Printing a traceback, when IDLE is run +from a terminal, is useless and annoying. +.. +.. bpo: 38183 +.. date: 2019-09-16-15-04-29 +.. nonce: eudCN1 +.. section: IDLE +To avoid problems, test_idle ignores the user config directory. It no longer +tries to create or access .idlerc or any files within. Users must run IDLE +to discover problems with saving settings. +.. +.. bpo: 38077 +.. date: 2019-09-09-22-08-36 +.. nonce: Mzpfe2 +.. section: IDLE +IDLE no longer adds 'argv' to the user namespace when initializing it. This +bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4. +.. +.. bpo: 38041 +.. date: 2019-09-05-23-12-13 +.. nonce: nxmGGK +.. section: IDLE +Shell restart lines now fill the window width, always start with '=', and +avoid wrapping unnecessarily. The line will still wrap if the included file +name is long relative to the width. +.. +.. bpo: 35771 +.. date: 2019-09-01-10-22-55 +.. nonce: tdbmbP +.. section: IDLE +To avoid occasional spurious test_idle failures on slower machines, increase +the ``hover_delay`` in test_tooltip. +.. +.. bpo: 37824 +.. date: 2019-08-26-00-41-53 +.. nonce: YY5jAI +.. section: IDLE +Properly handle user input warnings in IDLE shell. Cease turning +SyntaxWarnings into SyntaxErrors. +.. +.. bpo: 37929 +.. date: 2019-08-24-22-00-33 +.. nonce: jb7523 +.. section: IDLE +IDLE Settings dialog now closes properly when there is no shell window. +.. +.. bpo: 37902 +.. date: 2019-08-21-16-02-49 +.. nonce: _R_adE +.. section: IDLE +Add mousewheel scrolling for IDLE module, path, and stack browsers. Patch by +George Zhang. +.. +.. bpo: 37849 +.. date: 2019-08-14-09-43-15 +.. nonce: -bcYF3 +.. section: IDLE +Fixed completions list appearing too high or low when shown above the +current line. +.. +.. bpo: 36419 +.. date: 2019-08-04-17-10-01 +.. nonce: TJZqOc +.. section: IDLE +Refactor IDLE autocomplete and improve testing. +.. +.. bpo: 37748 +.. date: 2019-08-04-15-27-50 +.. nonce: 0vf6pg +.. section: IDLE +Reorder the Run menu. Put the most common choice, Run Module, at the top. +.. +.. bpo: 37692 +.. date: 2019-07-27-15-14-20 +.. nonce: TRHGjD +.. section: IDLE +Improve highlight config sample with example shell interaction and better +labels for shell elements. +.. +.. bpo: 37628 +.. date: 2019-07-26-17-51-13 +.. nonce: kX4AUF +.. section: IDLE +Settings dialog no longer expands with font size. +.. +.. bpo: 37627 +.. date: 2019-07-20-23-33-53 +.. nonce: dQhUNB +.. section: IDLE +Initialize the Customize Run dialog with the command line arguments most +recently entered before. The user can optionally edit before submitting +them. +.. +.. bpo: 33610 +.. date: 2019-07-18-10-11-36 +.. nonce: xYqMLg +.. section: IDLE +Fix code context not showing the correct context when first toggled on. +.. +.. bpo: 37530 +.. date: 2019-07-11-00-05-31 +.. nonce: AuyCyD +.. section: IDLE +Optimize code context to reduce unneeded background activity. Font and +highlight changes now occur along with text changes instead of after a +random delay. +.. +.. bpo: 27452 +.. date: 2019-07-03-22-47-44 +.. nonce: nePPLi +.. section: IDLE +Cleanup ``config.py`` by inlining ``RemoveFile`` and simplifying the +handling of ``file`` in ``CreateConfigHandlers``. +.. +.. bpo: 37325 +.. date: 2019-06-18-16-40-05 +.. nonce: GssOf1 +.. section: IDLE +Fix tab focus traversal order for help source and custom run dialogs. +.. +.. bpo: 37321 +.. date: 2019-06-17-16-35-30 +.. nonce: zVTTGS +.. section: IDLE +Both subprocess connection error messages now refer to the 'Startup failure' +section of the IDLE doc. +.. +.. bpo: 17535 +.. date: 2019-06-13-01-07-20 +.. nonce: K8i2St +.. section: IDLE +Add optional line numbers for IDLE editor windows. Windows open without +line numbers unless set otherwise in the General tab of the configuration +dialog. +.. +.. bpo: 26806 +.. date: 2019-06-10-22-48-50 +.. nonce: Zltkum +.. section: IDLE +To compensate for stack frames added by IDLE and avoid possible problems +with low recursion limits, add 30 to limits in the user code execution +process. Subtract 30 when reporting recursion limits to make this addition +mostly transparent. +.. +.. bpo: 37177 +.. date: 2019-06-07-00-17-41 +.. nonce: voU6pQ +.. section: IDLE +Properly 'attach' search dialogs to their main window so that they behave +like other dialogs and do not get hidden behind their main window. +.. +.. bpo: 37039 +.. date: 2019-06-04-23-27-33 +.. nonce: FN_fBf +.. section: IDLE +Adjust "Zoom Height" to individual screens by momentarily maximizing the +window on first use with a particular screen. Changing screen settings may +invalidate the saved height. While a window is maximized, "Zoom Height" has +no effect. +.. +.. bpo: 35763 +.. date: 2019-06-04-20-36-24 +.. nonce: 7XdoWz +.. section: IDLE +Make calltip reminder about '/' meaning positional-only less obtrusive by +only adding it when there is room on the first line. +.. +.. bpo: 5680 +.. date: 2019-06-03-00-39-29 +.. nonce: VCQfOO +.. section: IDLE +Add 'Run... Customized' to the Run menu to run a module with customized +settings. Any 'command line arguments' entered are added to sys.argv. One +can suppress the normal Shell main module restart. +.. +.. bpo: 36390 +.. date: 2019-03-21-08-35-00 +.. nonce: OdDCGk +.. section: IDLE +Gather Format menu functions into format.py. Combine paragraph.py, +rstrip.py, and format methods from editor.py. +.. +.. bpo: 38118 +.. date: 2019-10-08-15-07-52 +.. nonce: pIZD6H +.. section: Tools/Demos +Update Valgrind suppression file to ignore a false alarm in +:c:func:`PyUnicode_Decode` when using GCC builtin strcmp(). +.. +.. bpo: 38347 +.. date: 2019-10-02-09-48-42 +.. nonce: 2Tq5D1 +.. section: Tools/Demos +pathfix.py: Assume all files that end on '.py' are Python scripts when +working recursively. +.. +.. bpo: 37803 +.. date: 2019-09-12-16-15-55 +.. nonce: chEizy +.. section: Tools/Demos +pdb's ``--help`` and ``--version`` long options now work. +.. +.. bpo: 37942 +.. date: 2019-08-24-12-11-30 +.. nonce: 7H8N9a +.. section: Tools/Demos +Improve ArgumentClinic converter for floats. +.. +.. bpo: 37704 +.. date: 2019-07-29-13-59-19 +.. nonce: xxGUz_ +.. section: Tools/Demos +Remove ``Tools/scripts/h2py.py``: use cffi to access a C API in Python. +.. +.. bpo: 37675 +.. date: 2019-07-24-16-20-54 +.. nonce: 951Cvf +.. section: Tools/Demos +2to3 now works when run from a zipped standard library. +.. +.. bpo: 37034 +.. date: 2019-05-27-16-13-08 +.. nonce: zbTgy8 +.. section: Tools/Demos +Argument Clinic now uses the argument name on errors with keyword-only +argument instead of their position. Patch contributed by Rémi Lapeyre. +.. +.. bpo: 37064 +.. date: 2019-05-27-15-26-12 +.. nonce: k_SPW2 +.. section: Tools/Demos +Add option -k to pathscript.py script: preserve shebang flags. Add option -a +to pathscript.py script: add flags. +.. +.. bpo: 37633 +.. date: 2019-11-04-21-10-47 +.. nonce: oOGVdo +.. section: C API +Re-export some function compatibility wrappers for macros in ``pythonrun.h``. +.. +.. bpo: 38644 +.. date: 2019-11-04-17-59-46 +.. nonce: euO_RR +.. section: C API +Provide :c:func:`Py_EnterRecursiveCall` and :c:func:`Py_LeaveRecursiveCall` +as regular functions for the limited API. Previously, there were defined as +macros, but these macros didn't work with the limited API which cannot +access ``PyThreadState.recursion_depth`` field. Remove +``_Py_CheckRecursionLimit`` from the stable ABI. +.. +.. bpo: 38650 +.. date: 2019-10-30-22-03-03 +.. nonce: 0pi8zt +.. section: C API +The global variable :c:data:`PyStructSequence_UnnamedField` is now a +constant and refers to a constant string. +.. +.. bpo: 38540 +.. date: 2019-10-21-09-24-03 +.. nonce: 314N_T +.. section: C API +Fixed possible leak in :c:func:`PyArg_Parse` and similar functions for +format units ``"es#"`` and ``"et#"`` when the macro +:c:macro:`PY_SSIZE_T_CLEAN` is not defined. +.. +.. bpo: 38395 +.. date: 2019-10-08-01-23-24 +.. nonce: MJ6Ey9 +.. section: C API +Fix a crash in :class:`weakref.proxy` objects due to incorrect lifetime +management when calling some associated methods that may delete the last +reference to object being referenced by the proxy. Patch by Pablo Galindo. +.. +.. bpo: 36389 +.. date: 2019-10-07-17-15-09 +.. nonce: hFX_jD +.. section: C API +The ``_PyObject_CheckConsistency()`` function is now also available in +release mode. For example, it can be used to debug a crash in the +``visit_decref()`` function of the GC. +.. +.. bpo: 38266 +.. date: 2019-10-03-12-53-53 +.. nonce: 0FIC1q +.. section: C API +Revert the removal of PyThreadState_DeleteCurrent() with documentation. +.. +.. bpo: 38303 +.. date: 2019-09-30-16-53-30 +.. nonce: YoIs0M +.. section: C API +Update audioop extension module to use the stable ABI (PEP-384). Patch by +Tyler Kieft. +.. +.. bpo: 38234 +.. date: 2019-09-24-17-09-48 +.. nonce: d0bhEA +.. section: C API +:c:func:`!Py_SetPath` now sets :data:`sys.executable` to the program full +path (:c:func:`!Py_GetProgramFullPath`) rather than to the program name +(:c:func:`!Py_GetProgramName`). +.. +.. bpo: 38234 +.. date: 2019-09-20-17-22-41 +.. nonce: ZbquVK +.. section: C API +Python ignored arguments passed to :c:func:`!Py_SetPath`, +:c:func:`!Py_SetPythonHome` and :c:func:`!Py_SetProgramName`: fix Python +initialization to use specified arguments. +.. +.. bpo: 38205 +.. date: 2019-09-19-18-26-29 +.. nonce: Db1OJL +.. section: C API +The :c:func:`Py_UNREACHABLE` macro now calls :c:func:`Py_FatalError`. +.. +.. bpo: 38140 +.. date: 2019-09-13-01-24-47 +.. nonce: y59qaO +.. section: C API +Make dict and weakref offsets opaque for C heap types by passing the offsets +through PyMemberDef +.. +.. bpo: 15088 +.. date: 2019-09-05-14-17-21 +.. nonce: plt8Em +.. section: C API +The C function ``PyGen_NeedsFinalizing`` has been removed. It was not +documented, tested or used anywhere within CPython after the implementation +of :pep:`442`. Patch by Joannah Nanjekye. (Patch by Joannah Nanjekye) +.. +.. bpo: 36763 +.. date: 2019-08-23-18-45-11 +.. nonce: q3Kh8Z +.. section: C API +Options added by ``PySys_AddXOption()`` are now handled the same way than +``PyConfig.xoptions`` and command line ``-X`` options. +.. +.. bpo: 37926 +.. date: 2019-08-23-11-35-55 +.. nonce: hnI5IQ +.. section: C API +Fix a crash in ``PySys_SetArgvEx(0, NULL, 0)``. +.. +.. bpo: 37879 +.. date: 2019-08-17-13-50-21 +.. nonce: CZeUem +.. section: C API +Fix subtype_dealloc to suppress the type decref when the base type is a C +heap type +.. +.. bpo: 37645 +.. date: 2019-07-21-21-08-47 +.. nonce: 4DcUaI +.. section: C API +Add :c:func:`!_PyObject_FunctionStr` to get a user-friendly string +representation of a function-like object. Patch by Jeroen Demeyer. +.. +.. bpo: 29548 +.. date: 2019-07-17-09-50-50 +.. nonce: 5wIptQ +.. section: C API +The functions ``PyEval_CallObject``, ``PyEval_CallFunction``, +``PyEval_CallMethod`` and ``PyEval_CallObjectWithKeywords`` are deprecated. +Use :c:func:`PyObject_Call` and its variants instead. +.. +.. bpo: 37151 +.. date: 2019-07-16-11-02-00 +.. nonce: YKfuNA +.. section: C API +``PyCFunction_Call`` is now a deprecated alias of :c:func:`PyObject_Call`. +.. +.. bpo: 37540 +.. date: 2019-07-10-12-27-28 +.. nonce: E8Z773 +.. section: C API +The vectorcall protocol now requires that the caller passes only strings as +keyword names. +.. +.. bpo: 37207 +.. date: 2019-07-07-10-37-07 +.. nonce: SlVNky +.. section: C API +The vectorcall protocol is now enabled for ``type`` objects: set +``tp_vectorcall`` to a vectorcall function to be used instead of ``tp_new`` +and ``tp_init`` when calling the class itself. +.. +.. bpo: 21120 +.. date: 2019-07-06-23-56-47 +.. nonce: lXHqlT +.. section: C API +Exclude Python-ast.h, ast.h and asdl.h from the limited API. +.. +.. bpo: 37483 +.. date: 2019-07-02-15-42-37 +.. nonce: vftT4f +.. section: C API +Add new function ``_PyObject_CallOneArg`` for calling an object with one +positional argument. +.. +.. bpo: 36763 +.. date: 2019-06-28-15-49-16 +.. nonce: zrmgki +.. section: C API +Add :c:func:`PyConfig_SetWideStringList` function. +.. +.. bpo: 37337 +.. date: 2019-06-19-12-06-31 +.. nonce: gXIGyU +.. section: C API +Add fast functions for calling methods: +:c:func:`!_PyObject_VectorcallMethod`, :c:func:`!_PyObject_CallMethodNoArgs` +and :c:func:`!_PyObject_CallMethodOneArg`. +.. +.. bpo: 28805 +.. date: 2019-06-14-14-03-51 +.. nonce: qZC0N_ +.. section: C API +The :c:macro:`METH_FASTCALL` calling convention has been documented. +.. +.. bpo: 37221 +.. date: 2019-06-11-02-50-38 +.. nonce: 4tClQT +.. section: C API +The new function :c:func:`!PyCode_NewWithPosOnlyArgs` allows to create code +objects like :c:func:`!PyCode_New`, but with an extra *posonlyargcount* +parameter for indicating the number of positonal-only arguments. +.. +.. bpo: 37215 +.. date: 2019-06-10-15-32-34 +.. nonce: yzoNyU +.. section: C API +Fix dtrace issue introduce by bpo-36842 +.. +.. bpo: 37194 +.. date: 2019-06-07-14-03-52 +.. nonce: uck7MD +.. section: C API +Add a new public :c:func:`PyObject_CallNoArgs` function to the C API: call a +callable Python object without any arguments. It is the most efficient way +to call a callback without any argument. On x86-64, for example, +``PyObject_CallFunctionObjArgs(func, NULL)`` allocates 960 bytes on the +stack per call, whereas ``PyObject_CallNoArgs(func)`` only allocates 624 +bytes per call. +.. +.. bpo: 37170 +.. date: 2019-06-06-08-47-04 +.. nonce: hO_fpM +.. section: C API +Fix the cast on error in :c:func:`PyLong_AsUnsignedLongLongMask()`. +.. +.. bpo: 35381 +.. date: 2019-01-18-17-05-26 +.. nonce: 9CbeW3 +.. section: C API +Convert posixmodule.c statically allocated types ``DirEntryType`` and +``ScandirIteratorType`` to heap-allocated types. +.. +.. bpo: 34331 +.. date: 2018-08-04-00-59-44 +.. nonce: iaUkmU +.. section: C API +Use singular/plural noun in error message when instantiating an abstract +class with non-overridden abstract method(s). + +.. bpo: 29723 +.. date: 9895 +.. nonce: M5omgP +.. release date: 2017-03-21 +.. section: Core and Builtins +The ``sys.path[0]`` initialization change for bpo-29139 caused a regression +by revealing an inconsistency in how sys.path is initialized when executing +``__main__`` from a zipfile, directory, or other import location. The +interpreter now consistently avoids ever adding the import location's parent +directory to ``sys.path``, and ensures no other ``sys.path`` entries are +inadvertently modified when inserting the import location named on the +command line. +.. +.. bpo: 27593 +.. date: 9894 +.. nonce: nk7Etn +.. section: Build +fix format of git information used in sys.version +.. +.. bpo: 0 +.. date: 9893 +.. nonce: usKKNQ +.. section: Build +Fix incompatible comment in python.h + +.. bpo: 42103 +.. date: 2020-10-23-19-19-30 +.. nonce: cILT66 +.. release date: 2020-11-03 +.. section: Security +Prevented potential DoS attack via CPU and RAM exhaustion when processing +malformed Apple Property List files in binary format. +.. +.. bpo: 42051 +.. date: 2020-10-19-10-56-27 +.. nonce: EU_B7u +.. section: Security +The :mod:`plistlib` module no longer accepts entity declarations in XML +plist files to avoid XML vulnerabilities. This should not affect users as +entity declarations are not used in regular plist files. +.. +.. bpo: 42236 +.. date: 2020-11-01-21-21-38 +.. nonce: MPx-NK +.. section: Core and Builtins +If the ``nl_langinfo(CODESET)`` function returns an empty string, Python now +uses UTF-8 as the filesystem encoding. Patch by Victor Stinner. +.. +.. bpo: 42218 +.. date: 2020-10-31-17-50-23 +.. nonce: Dp_Z3v +.. section: Core and Builtins +Fixed a bug in the PEG parser that was causing crashes in debug mode. Now +errors are checked in left-recursive rules to avoid cases where such errors +do not get handled in time and appear as long-distance crashes in other +places. +.. +.. bpo: 42214 +.. date: 2020-10-30-22-16-30 +.. nonce: lXskM_ +.. section: Core and Builtins +Fixed a possible crash in the PEG parser when checking for the '!=' token in +the ``barry_as_flufl`` rule. Patch by Pablo Galindo. +.. +.. bpo: 42206 +.. date: 2020-10-30-13-11-01 +.. nonce: xxssR8 +.. section: Core and Builtins +Propagate and raise the errors caused by :c:func:`PyAST_Validate` in the +parser. +.. +.. bpo: 41796 +.. date: 2020-10-29-12-49-08 +.. nonce: tkGdHq +.. section: Core and Builtins +The :mod:`ast` module internal state is now per interpreter. Patch by Victor +Stinner. +.. +.. bpo: 42143 +.. date: 2020-10-27-21-34-05 +.. nonce: N6KXUO +.. section: Core and Builtins +Fix handling of errors during creation of ``PyFunctionObject``, which +resulted in operations on uninitialized memory. Patch by Yonatan +Goldschmidt. +.. +.. bpo: 41659 +.. date: 2020-10-27-18-32-49 +.. nonce: d4a-8o +.. section: Core and Builtins +Fix a bug in the parser, where a curly brace following a ``primary`` didn't +fail immediately. This led to invalid expressions like ``a {b}`` to throw a +:exc:`SyntaxError` with a wrong offset, or invalid expressions ending with a +curly brace like ``a {`` to not fail immediately in the REPL. +.. +.. bpo: 42150 +.. date: 2020-10-25-21-14-18 +.. nonce: b70u_T +.. section: Core and Builtins +Fix possible buffer overflow in the new parser when checking for +continuation lines. Patch by Pablo Galindo. +.. +.. bpo: 42123 +.. date: 2020-10-23-02-43-24 +.. nonce: 64gJWC +.. section: Core and Builtins +Run the parser two times. On the first run, disable all the rules that only +generate better error messages to gain performance. If there's a parse +failure, run the parser a second time with those enabled. +.. +.. bpo: 42093 +.. date: 2020-10-20-04-24-07 +.. nonce: ooZZNh +.. section: Core and Builtins +The ``LOAD_ATTR`` instruction now uses new "per opcode cache" mechanism and +it is about 36% faster now. Patch by Pablo Galindo and Yury Selivanov. +.. +.. bpo: 42030 +.. date: 2020-10-15-21-55-32 +.. nonce: PmU2CA +.. section: Core and Builtins +Support for the legacy AIX-specific shared library loading support has been +removed. All versions of AIX since 4.3 have supported and defaulted to using +the common Unix mechanism instead. +.. +.. bpo: 41984 +.. date: 2020-10-14-16-19-43 +.. nonce: SEtKMr +.. section: Core and Builtins +The garbage collector now tracks all user-defined classes. Patch by Brandt +Bucher. +.. +.. bpo: 41993 +.. date: 2020-10-10-13-53-52 +.. nonce: YMzixQ +.. section: Core and Builtins +Fixed potential issues with removing not completely initialized module from +``sys.modules`` when import fails. +.. +.. bpo: 41979 +.. date: 2020-10-09-10-55-50 +.. nonce: ImXIk2 +.. section: Core and Builtins +Star-unpacking is now allowed for with item's targets in the PEG parser. +.. +.. bpo: 41974 +.. date: 2020-10-08-09-58-19 +.. nonce: 8B-q8O +.. section: Core and Builtins +Removed special methods ``__int__``, ``__float__``, ``__floordiv__``, +``__mod__``, ``__divmod__``, ``__rfloordiv__``, ``__rmod__`` and +``__rdivmod__`` of the :class:`complex` class. They always raised a +:exc:`TypeError`. +.. +.. bpo: 41902 +.. date: 2020-10-02-13-32-05 +.. nonce: ZKTxzW +.. section: Core and Builtins +Micro optimization when compute :c:member:`~PySequenceMethods.sq_item` and +:c:member:`~PyMappingMethods.mp_subscript` of :class:`range`. Patch by +Donghee Na. +.. +.. bpo: 41894 +.. date: 2020-10-02-11-35-33 +.. nonce: ffmtOt +.. section: Core and Builtins +When loading a native module and a load failure occurs, prevent a possible +UnicodeDecodeError when not running in a UTF-8 locale by decoding the load +error message using the current locale's encoding. +.. +.. bpo: 41902 +.. date: 2020-10-01-22-44-23 +.. nonce: iLoMVF +.. section: Core and Builtins +Micro optimization for range.index if step is 1. Patch by Donghee Na. +.. +.. bpo: 41435 +.. date: 2020-08-07-13-42-48 +.. nonce: qPWjJA +.. section: Library +Add ``sys._current_exceptions()`` function to retrieve a dictionary mapping +each thread's identifier to the topmost exception currently active in that +thread at the time the function is called. +.. +.. bpo: 38605 +.. date: 2020-05-27-16-08-16 +.. nonce: rcs2uK +.. section: Core and Builtins +Enable ``from __future__ import annotations`` (:pep:`563`) by default. The +values found in :attr:`~object.__annotations__` dicts are now strings, for +example ``{"x": "int"}`` instead of ``{"x": int}``. +.. +.. bpo: 35455 +.. date: 2020-11-02-14-10-48 +.. nonce: Q1xTIo +.. section: Library +On Solaris, :func:`~time.thread_time` is now implemented with +``gethrvtime()`` because ``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` is not +always available. Patch by Jakub Kulik. +.. +.. bpo: 42233 +.. date: 2020-11-02-01-31-15 +.. nonce: YxRj-h +.. section: Library +The :func:`repr` of :mod:`typing` types containing :ref:`Generic Alias Types +` previously did not show the parameterized types in the +``GenericAlias``. They have now been changed to do so. +.. +.. bpo: 29566 +.. date: 2020-10-31-13-28-36 +.. nonce: 6aDbty +.. section: Library +``binhex.binhex()`` consistently writes macOS 9 line endings. +.. +.. bpo: 26789 +.. date: 2020-10-31-01-16-49 +.. nonce: 9BdNAt +.. section: Library +The :class:`logging.FileHandler` class now keeps a reference to the builtin +:func:`open` function to be able to open or reopen the file during Python +finalization. Fix errors like: ``NameError: name 'open' is not defined``. +Patch by Victor Stinner. +.. +.. bpo: 42157 +.. date: 2020-10-26-23-29-16 +.. nonce: 4wuwTe +.. section: Library +Removed the ``unicodedata.ucnhash_CAPI`` attribute which was an internal +PyCapsule object. The related private ``_PyUnicode_Name_CAPI`` structure was +moved to the internal C API. Patch by Victor Stinner. +.. +.. bpo: 42157 +.. date: 2020-10-26-19-08-07 +.. nonce: Bdpa04 +.. section: Library +Convert the :mod:`unicodedata` extension module to the multiphase +initialization API (:pep:`489`) and convert the ``unicodedata.UCD`` static +type to a heap type. Patch by Mohamed Koubaa and Victor Stinner. +.. +.. bpo: 42146 +.. date: 2020-10-25-19-25-02 +.. nonce: 6A8uvS +.. section: Library +Fix memory leak in :func:`subprocess.Popen` in case an uid (gid) specified +in ``user`` (``group``, ``extra_groups``) overflows ``uid_t`` (``gid_t``). +.. +.. bpo: 42103 +.. date: 2020-10-23-19-20-14 +.. nonce: C5obK2 +.. section: Library +:exc:`~plistlib.InvalidFileException` and :exc:`RecursionError` are now the +only errors caused by loading malformed binary Plist file (previously +ValueError and TypeError could be raised in some specific cases). +.. +.. bpo: 41490 +.. date: 2020-10-23-08-54-47 +.. nonce: -Yk6OD +.. section: Library +In ``importlib.resources``, ``.path`` method is more aggressive about +releasing handles to zipfile objects early, enabling use-cases like certifi +to leave the context open but delete the underlying zip file. +.. +.. bpo: 41052 +.. date: 2020-10-21-23-45-02 +.. nonce: 3N7J2J +.. section: Library +Pickling heap types implemented in C with protocols 0 and 1 raises now an +error instead of producing incorrect data. +.. +.. bpo: 42089 +.. date: 2020-10-19-16-53-19 +.. nonce: R1dthW +.. section: Library +In ``importlib.metadata.PackageNotFoundError``, make reference to the +package metadata being missing to improve the user experience. +.. +.. bpo: 41491 +.. date: 2020-10-19-14-02-09 +.. nonce: d1BUWH +.. section: Library +plistlib: fix parsing XML plists with hexadecimal integer values +.. +.. bpo: 42065 +.. date: 2020-10-17-23-17-18 +.. nonce: 85BsRA +.. section: Library +Fix an incorrectly formatted error from :meth:`!_codecs.charmap_decode` when +called with a mapped value outside the range of valid Unicode code points. +PR by Max Bernstein. +.. +.. bpo: 41966 +.. date: 2020-10-17-07-52-53 +.. nonce: gwEQRZ +.. section: Library +Fix pickling pure Python :class:`datetime.time` subclasses. Patch by Dean +Inwood. +.. +.. bpo: 19270 +.. date: 2020-10-16-22-48-01 +.. nonce: jd_gkA +.. section: Library +:meth:`sched.scheduler.cancel` will now cancel the correct event, if two +events with same priority are scheduled for the same time. Patch by Bar +Harel. +.. +.. bpo: 28660 +.. date: 2020-10-16-16-08-04 +.. nonce: eX9pvD +.. section: Library +:func:`textwrap.wrap` now attempts to break long words after hyphens when +``break_long_words=True`` and ``break_on_hyphens=True``. +.. +.. bpo: 35823 +.. date: 2020-10-16-07-45-35 +.. nonce: SNQo56 +.. section: Library +Use ``vfork()`` instead of ``fork()`` for :func:`subprocess.Popen` on Linux +to improve performance in cases where it is deemed safe. +.. +.. bpo: 42043 +.. date: 2020-10-15-17-20-37 +.. nonce: OS0p_v +.. section: Library +Add support for ``zipfile.Path`` inheritance. ``zipfile.Path.is_file()`` now +returns False for non-existent names. ``zipfile.Path`` objects now expose a +``.filename`` attribute and rely on that to resolve ``.name`` and +``.parent`` when the ``Path`` object is at the root of the zipfile. +.. +.. bpo: 42021 +.. date: 2020-10-12-21-21-24 +.. nonce: 8yv_8- +.. section: Library +Fix possible ref leaks in :mod:`sqlite3` module init. +.. +.. bpo: 39101 +.. date: 2020-10-11-21-43-03 +.. nonce: -I49Pm +.. section: Library +Fixed tests using IsolatedAsyncioTestCase from hanging on BaseExceptions. +.. +.. bpo: 41976 +.. date: 2020-10-08-18-22-28 +.. nonce: Svm0wb +.. section: Library +Fixed a bug that was causing :func:`ctypes.util.find_library` to return +``None`` when triying to locate a library in an environment when gcc>=9 is +available and ``ldconfig`` is not. Patch by Pablo Galindo +.. +.. bpo: 41943 +.. date: 2020-10-07-18-36-03 +.. nonce: Pt55fT +.. section: Library +Fix bug where TestCase.assertLogs doesn't correctly filter messages by +level. +.. +.. bpo: 41923 +.. date: 2020-10-03-23-14-50 +.. nonce: Buonw9 +.. section: Library +Implement :pep:`613`, introducing :data:`typing.TypeAlias` annotation. +.. +.. bpo: 41905 +.. date: 2020-10-01-21-11-03 +.. nonce: _JpjR4 +.. section: Library +A new function in abc: *update_abstractmethods* to re-calculate an abstract +class's abstract status. In addition, *dataclass* has been changed to call +this function. +.. +.. bpo: 23706 +.. date: 2020-09-30-11-05-11 +.. nonce: dHTGjF +.. section: Library +Added *newline* parameter to ``pathlib.Path.write_text()``. +.. +.. bpo: 41876 +.. date: 2020-09-29-16-23-54 +.. nonce: QicdDU +.. section: Library +Tkinter font class repr uses font name +.. +.. bpo: 41831 +.. date: 2020-09-22-11-07-50 +.. nonce: k-Eop_ +.. section: Library +``str()`` for the ``type`` attribute of the ``tkinter.Event`` object always +returns now the numeric code returned by Tk instead of the name of the event +type. +.. +.. bpo: 39337 +.. date: 2020-09-13-02-02-18 +.. nonce: L3NXTt +.. section: Library +:func:`encodings.normalize_encoding` now ignores non-ASCII characters. +.. +.. bpo: 41747 +.. date: 2020-09-08-23-41-29 +.. nonce: M6wLKv +.. section: Library +Ensure all methods that generated from :func:`dataclasses.dataclass` objects +now have the proper ``__qualname__`` attribute referring to the class they +belong to. Patch by Batuhan Taskaya. +.. +.. bpo: 30681 +.. date: 2020-09-04-17-33-04 +.. nonce: LR4fnY +.. section: Library +Handle exceptions caused by unparsable date headers when using email +"default" policy. Patch by Tim Bell, Georges Toth +.. +.. bpo: 41586 +.. date: 2020-08-19-08-32-13 +.. nonce: IYjmjK +.. section: Library +Add F_SETPIPE_SZ and F_GETPIPE_SZ to fcntl module. Allow setting pipesize on +subprocess.Popen. +.. +.. bpo: 41229 +.. date: 2020-07-19-20-10-41 +.. nonce: p8rJa2 +.. section: Library +Add ``contextlib.aclosing`` for deterministic cleanup of async generators +which is analogous to ``contextlib.closing`` for non-async generators. Patch +by Joongi Kim and John Belmonte. +.. +.. bpo: 16396 +.. date: 2020-07-08-09-45-00 +.. nonce: z8o8Pn +.. section: Library +Allow ``ctypes.wintypes`` to be imported on non-Windows systems. +.. +.. bpo: 4356 +.. date: 2020-05-31-10-48-47 +.. nonce: P8kXqp +.. section: Library +Add a key function to the bisect module. +.. +.. bpo: 40592 +.. date: 2020-05-14-16-01-34 +.. nonce: Cmk855 +.. section: Library +:func:`shutil.which` now ignores empty entries in :envvar:`PATHEXT` instead +of treating them as a match. +.. +.. bpo: 40492 +.. date: 2020-05-04-12-16-00 +.. nonce: ONk9Na +.. section: Library +Fix ``--outfile`` for :mod:`!cProfile` / :mod:`!profile` not writing the +output file in the original directory when the program being profiled +changes the working directory. PR by Anthony Sottile. +.. +.. bpo: 34204 +.. date: 2020-04-21-17-18-33 +.. nonce: 9wXTtY +.. section: Library +The :mod:`shelve` module now uses :const:`pickle.DEFAULT_PROTOCOL` by default +instead of :mod:`pickle` protocol ``3``. +.. +.. bpo: 27321 +.. date: 2020-01-19-18-40-26 +.. nonce: 8e6SpM +.. section: Library +Fixed KeyError exception when flattening an email to a string attempts to +replace a non-existent Content-Transfer-Encoding header. +.. +.. bpo: 38976 +.. date: 2019-12-05-05-22-49 +.. nonce: 5MG7Uu +.. section: Library +The :mod:`http.cookiejar` module now supports the parsing of cookies in +CURL-style cookiejar files through MozillaCookieJar on all platforms. +Previously, such cookie entries would be silently ignored when loading a +cookiejar with such entries. +Additionally, the HTTP Only attribute is persisted in the object, and will +be correctly written to file if the MozillaCookieJar object is subsequently +dumped. +.. +.. bpo: 42061 +.. date: 2020-10-28-21-39-45 +.. nonce: _x-0sg +.. section: Documentation +Document __format__ functionality for IP addresses. +.. +.. bpo: 41910 +.. date: 2020-10-21-14-40-54 +.. nonce: CzBMit +.. section: Documentation +Document the default implementation of ``object.__eq__``. +.. +.. bpo: 42010 +.. date: 2020-10-21-02-21-14 +.. nonce: 76vJ0u +.. section: Documentation +Clarify that subscription expressions are also valid for certain +:term:`classes ` and :term:`types ` in the standard library, +and for user-defined classes and types if the classmethod +:meth:`__class_getitem__` is provided. +.. +.. bpo: 41805 +.. date: 2020-10-10-01-36-37 +.. nonce: l-CGv5 +.. section: Documentation +Documented :ref:`generic alias type ` and +:data:`types.GenericAlias`. Also added an entry in glossary for +:term:`generic types `. +.. +.. bpo: 39693 +.. date: 2020-02-24-09-02-05 +.. nonce: QXw0Fm +.. section: Documentation +Fix tarfile's extractfile documentation +.. +.. bpo: 39416 +.. date: 2020-01-22-05-14-53 +.. nonce: uYjhEm +.. section: Documentation +Document some restrictions on the default string representations of numeric +classes. +.. +.. bpo: 41739 +.. date: 2020-10-12-00-11-47 +.. nonce: wSCc4K +.. section: Tests +Fix test_logging.test_race_between_set_target_and_flush(): the test now +waits until all threads complete to avoid leaking running threads. +.. +.. bpo: 41970 +.. date: 2020-10-08-14-00-17 +.. nonce: aZ8QFf +.. section: Tests +Avoid a test failure in ``test_lib2to3`` if the module has already imported +at the time the test executes. Patch by Pablo Galindo. +.. +.. bpo: 41944 +.. date: 2020-10-05-17-43-46 +.. nonce: rf1dYb +.. section: Tests +Tests for CJK codecs no longer call ``eval()`` on content received via HTTP. +.. +.. bpo: 41306 +.. date: 2020-08-03-13-44-37 +.. nonce: VDoWXI +.. section: Tests +Fixed a failure in ``test_tk.test_widgets.ScaleTest`` happening when +executing the test with Tk 8.6.10. +.. +.. bpo: 38980 +.. date: 2020-10-21-18-31-54 +.. nonce: xz7BNd +.. section: Build +Add ``-fno-semantic-interposition`` to both the compile and link line when +building with ``--enable-optimizations``. Patch by Victor Stinner and Pablo +Galindo. +.. +.. bpo: 38439 +.. date: 2020-10-20-13-19-42 +.. nonce: eMLi-t +.. section: Windows +Updates the icons for IDLE in the Windows Store package. +.. +.. bpo: 38252 +.. date: 2020-10-18-18-43-45 +.. nonce: 7Nlepg +.. section: Windows +Use 8-byte step to detect ASCII sequence in 64-bit Windows build. +.. +.. bpo: 39107 +.. date: 2020-09-24-23-09-40 +.. nonce: GbUZvD +.. section: Windows +Update Tcl and Tk to 8.6.10 in Windows installer. +.. +.. bpo: 41557 +.. date: 2020-08-26-09-35-06 +.. nonce: vt00cQ +.. section: Windows +Update Windows installer to use SQLite 3.33.0. +.. +.. bpo: 38324 +.. date: 2020-05-30-02-46-43 +.. nonce: 476M-5 +.. section: Windows +Avoid Unicode errors when accessing certain locale data on Windows. +.. +.. bpo: 41471 +.. date: 2020-10-19-12-25-19 +.. nonce: gwA7un +.. section: macOS +Ignore invalid prefix lengths in system proxy excludes. +.. +.. bpo: 33987 +.. date: 2020-10-24-21-27-37 +.. nonce: fIh9JL +.. section: IDLE +Mostly finish using ttk widgets, mainly for editor, settings, and searches. +Some patches by Mark Roseman. +.. +.. bpo: 40511 +.. date: 2020-06-16-12-16-13 +.. nonce: XkihpM +.. section: IDLE +Typing opening and closing parentheses inside the parentheses of a function +call will no longer cause unnecessary "flashing" off and on of an existing +open call-tip, e.g. when typed in a string literal. +.. +.. bpo: 38439 +.. date: 2020-04-22-09-37-40 +.. nonce: ieXL-c +.. section: IDLE +Add a 256×256 pixel IDLE icon to the Windows .ico file. Created by Andrew +Clover. Remove the low-color gif variations from the .ico file. +.. +.. bpo: 42157 +.. date: 2020-10-16-10-47-17 +.. nonce: e3BcPM +.. section: C API +The private ``_PyUnicode_Name_CAPI`` structure of the PyCapsule API +``unicodedata.ucnhash_CAPI`` has been moved to the internal C API. Patch by +Victor Stinner. +.. +.. bpo: 42015 +.. date: 2020-10-12-20-13-58 +.. nonce: X4H2_V +.. section: C API +Fix potential crash in deallocating method objects when dynamically +allocated :c:type:`PyMethodDef`'s lifetime is managed through the ``self`` argument +of a :c:type:`PyCFunction`. +.. +.. bpo: 40423 +.. date: 2020-10-11-19-17-44 +.. nonce: GsmgEj +.. section: C API +The :mod:`subprocess` module and ``os.closerange`` will now use the +``close_range(low, high, flags)`` syscall when it is available for more +efficient closing of ranges of descriptors. +.. +.. bpo: 41845 +.. date: 2020-10-11-05-05-53 +.. nonce: ZFvuQM +.. section: C API +:c:func:`PyObject_GenericGetDict` is available again in the limited API when +targeting 3.10 or later. +.. +.. bpo: 40422 +.. date: 2020-10-10-14-05-24 +.. nonce: sh8IDY +.. section: C API +Add ``_Py_closerange`` function to provide performant closing of a range of +file descriptors. +.. +.. bpo: 41986 +.. date: 2020-10-09-22-50-46 +.. nonce: JUPE59 +.. section: C API +:c:data:`!Py_FileSystemDefaultEncodeErrors` and :c:data:`!Py_UTF8Mode` are +available again in limited API. +.. +.. bpo: 41756 +.. date: 2020-09-28-14-31-07 +.. nonce: ZZ5wJG +.. section: C API +Add ``PyIter_Send`` function to allow sending value into +generator/coroutine/iterator without raising StopIteration exception to +signal return. +.. +.. bpo: 41784 +.. date: 2020-09-14-10-17-00 +.. nonce: Yl4gI2 +.. section: C API +Added ``PyUnicode_AsUTF8AndSize`` to the limited C API. + +.. bpo: 25709 +.. date: 9452 +.. nonce: OPX2TS +.. release date: 2015-12-06 +.. section: Core and Builtins +Fixed problem with in-place string concatenation and utf-8 cache. +.. +.. bpo: 25715 +.. date: 9451 +.. nonce: 3LLYLj +.. section: Windows +Python 3.5.1 installer shows wrong upgrade path and incorrect logic for +launcher detection. + +.. bpo: 42988 +.. date: 2021-03-24-14-16-56 +.. nonce: P2aNco +.. release date: 2021-04-05 +.. section: Security +:cve:`2021-3426`: Remove the ``getfile`` feature of the :mod:`pydoc` module +which could be abused to read arbitrary files on the disk (directory +traversal vulnerability). Moreover, even source code of Python modules can +contain sensitive data like passwords. Vulnerability reported by David +Schwörer. +.. +.. bpo: 43285 +.. date: 2021-03-13-03-48-14 +.. nonce: g-Hah3 +.. section: Security +:mod:`ftplib` no longer trusts the IP address value returned from the server +in response to the PASV command by default. This prevents a malicious FTP +server from using the response to probe IPv4 address and port combinations +on the client network. +Code that requires the former vulnerable behavior may set a +``trust_server_pasv_ipv4_address`` attribute on their :class:`ftplib.FTP` +instances to ``True`` to re-enable it. +.. +.. bpo: 43439 +.. date: 2021-03-08-23-06-07 +.. nonce: 5U3lXm +.. section: Security +Add audit hooks for :func:`gc.get_objects`, :func:`gc.get_referrers` and +:func:`gc.get_referents`. Patch by Pablo Galindo. +.. +.. bpo: 27129 +.. date: 2021-04-03-22-04-46 +.. nonce: u_ehHb +.. section: Core and Builtins +Update CPython bytecode magic number. +.. +.. bpo: 43672 +.. date: 2021-03-31-09-12-54 +.. nonce: jTT5uG +.. section: Core and Builtins +Raise ImportWarning when calling find_loader(). +.. +.. bpo: 43660 +.. date: 2021-03-29-19-50-34 +.. nonce: scTgag +.. section: Core and Builtins +Fix crash that happens when replacing ``sys.stderr`` with a callable that +can remove the object while an exception is being printed. Patch by Pablo +Galindo. +.. +.. bpo: 27129 +.. date: 2021-03-29-16-20-29 +.. nonce: BF03A5 +.. section: Core and Builtins +The bytecode interpreter uses instruction, rather byte, offsets internally. +This reduces the number of EXTENDED_ARG instructions needed and streamlines +instruction dispatch a bit. +.. +.. bpo: 40645 +.. date: 2021-03-29-11-55-06 +.. nonce: PhaT-B +.. section: Library +Fix reference leak in the :mod:`!_hashopenssl` extension. Patch by Pablo +Galindo. +.. +.. bpo: 42134 +.. date: 2021-03-26-17-30-19 +.. nonce: G4Sjxg +.. section: Core and Builtins +Calls to find_module() by the import system now raise ImportWarning. +.. +.. bpo: 41064 +.. date: 2021-03-24-00-32-20 +.. nonce: _H0K_g +.. section: Core and Builtins +Improve the syntax error for invalid usage of double starred elements ('**') +in f-strings. Patch by Pablo Galindo. +.. +.. bpo: 43575 +.. date: 2021-03-21-12-26-32 +.. nonce: pl-nSg +.. section: Core and Builtins +Speed up calls to ``map()`` by using the :pep:`590` ``vectorcall`` calling +convention. Patch by Donghee Na. +.. +.. bpo: 42137 +.. date: 2021-03-20-19-54-47 +.. nonce: A8aQvj +.. section: Core and Builtins +The import system now prefers using ``__spec__`` for ``ModuleType.__repr__`` +over ``module_repr()``. +.. +.. bpo: 43452 +.. date: 2021-03-20-01-21-37 +.. nonce: tDVJkc +.. section: Core and Builtins +Added micro-optimizations to ``_PyType_Lookup()`` to improve cache lookup +performance in the common case of cache hits. +.. +.. bpo: 43555 +.. date: 2021-03-19-22-49-40 +.. nonce: ZmhYSA +.. section: Core and Builtins +Report the column offset for :exc:`SyntaxError` for invalid line +continuation characters. Patch by Pablo Galindo. +.. +.. bpo: 43517 +.. date: 2021-03-16-17-12-54 +.. nonce: zAo6Ws +.. section: Core and Builtins +Fix misdetection of circular imports when using ``from pkg.mod import +attr``, which caused false positives in non-trivial multi-threaded code. +.. +.. bpo: 43497 +.. date: 2021-03-15-07-50-30 +.. nonce: Uc5ZCJ +.. section: Core and Builtins +Emit SyntaxWarnings for assertions with tuple constants, this is a +regression introduced in python3.7 +.. +.. bpo: 39316 +.. date: 2021-03-14-16-44-50 +.. nonce: Ns3a_F +.. section: Core and Builtins +Tracing now has correct line numbers for attribute accesses when the +attribute is on a different line from the object. Improves debugging and +profiling for multi-line method chains. +.. +.. bpo: 35883 +.. date: 2021-03-13-13-57-21 +.. nonce: UyGpdG +.. section: Core and Builtins +Python no longer fails at startup with a fatal error if a command line +argument contains an invalid Unicode character. The +:c:func:`Py_DecodeLocale` function now escapes byte sequences which would be +decoded as Unicode characters outside the [U+0000; U+10ffff] range. +.. +.. bpo: 43410 +.. date: 2021-03-05-17-23-36 +.. nonce: lCzIg0 +.. section: Core and Builtins +Fix a bug that was causing the parser to crash when emitting syntax errors +when reading input from stdin. Patch by Pablo Galindo +.. +.. bpo: 43406 +.. date: 2021-03-04-22-53-10 +.. nonce: Na_VpA +.. section: Core and Builtins +Fix a possible race condition where ``PyErr_CheckSignals`` tries to execute +a non-Python signal handler. +.. +.. bpo: 42128 +.. date: 2021-03-03-19-04-23 +.. nonce: VouZjn +.. section: Core and Builtins +Add ``__match_args__`` to :ref:`struct sequence objects `. +Patch by Pablo Galindo. +.. +.. bpo: 43390 +.. date: 2021-03-03-17-58-49 +.. nonce: epPpwV +.. section: Core and Builtins +CPython now sets the ``SA_ONSTACK`` flag in ``PyOS_setsig`` for the VM's +default signal handlers. This is friendlier to other in-process code that +an extension module or embedding use could pull in (such as Golang's cgo) +where tiny thread stacks are the norm and ``sigaltstack()`` has been used to +provide for signal handlers. This is a no-op change for the vast majority +of processes that don't use sigaltstack. +.. +.. bpo: 43287 +.. date: 2021-02-22-03-01-02 +.. nonce: aTs6fO +.. section: Core and Builtins +Speed up calls to ``filter()`` by using the :pep:`590` ``vectorcall`` +calling convention. Patch by Donghee Na. +.. +.. bpo: 37448 +.. date: 2021-02-21-14-19-35 +.. nonce: btl7vO +.. section: Core and Builtins +Add a radix tree based memory map to track in-use obmalloc arenas. Use to +replace the old implementation of address_in_range(). The radix tree +approach makes it easy to increase pool sizes beyond the OS page size. +Boosting the pool and arena size allows obmalloc to handle a significantly +higher percentage of requests from its ultra-fast paths. +It also has the advantage of eliminating the memory unsanitary behavior of +the previous address_in_range(). The old address_in_range() was marked with +the annotations _Py_NO_SANITIZE_ADDRESS, _Py_NO_SANITIZE_THREAD, and +_Py_NO_SANITIZE_MEMORY. Those annotations are no longer needed. +To disable the radix tree map, set a preprocessor flag as follows: +``-DWITH_PYMALLOC_RADIX_TREE=0``. +Co-authored-by: Tim Peters +.. +.. bpo: 29988 +.. date: 2020-02-03-13-23-10 +.. nonce: 8_UB5w +.. section: Core and Builtins +Only handle asynchronous exceptions and requests to drop the GIL when +returning from a call or on the back edges of loops. Makes sure that +:meth:`~object.__exit__` is always called in with statements, even for interrupts. +.. +.. bpo: 43720 +.. date: 2021-04-03-13-45-51 +.. nonce: FDZ5cZ +.. section: Library +Document various stdlib deprecations in imp, pkgutil, and importlib.util for +removal in Python 3.12. +.. +.. bpo: 43433 +.. date: 2021-03-28-23-50-20 +.. nonce: so9j5G +.. section: Library +:class:`xmlrpc.client.ServerProxy` no longer ignores query and fragment in +the URL of the server. +.. +.. bpo: 31956 +.. date: 2021-03-28-16-53-25 +.. nonce: Lt_67U +.. section: Library +The :meth:`~array.array.index` method of :class:`array.array` now has +optional *start* and *stop* parameters. +.. +.. bpo: 40066 +.. date: 2021-03-25-21-26-30 +.. nonce: 7EBQ3_ +.. section: Library +Enum: adjust ``repr()`` to show only enum and member name (not value, nor +angle brackets) and ``str()`` to show only member name. Update and improve +documentation to match. +.. +.. bpo: 42136 +.. date: 2021-03-25-08-44-26 +.. nonce: rRY9e1 +.. section: Library +Deprecate all module_repr() methods found in importlib as their use is being +phased out by Python 3.12. +.. +.. bpo: 35930 +.. date: 2021-03-23-17-18-56 +.. nonce: RZ51pM +.. section: Library +Raising an exception raised in a "future" instance will create reference +cycles. +.. +.. bpo: 41369 +.. date: 2021-03-21-17-50-42 +.. nonce: -fpmYZ +.. section: Library +Finish updating the vendored libmpdec to version 2.5.1. Patch by Stefan +Krah. +.. +.. bpo: 43422 +.. date: 2021-03-21-17-02-52 +.. nonce: POk6cU +.. section: Library +Revert the _decimal C API which was added in bpo-41324. +.. +.. bpo: 43577 +.. date: 2021-03-21-10-13-17 +.. nonce: m7JnAV +.. section: Library +Fix deadlock when using :class:`ssl.SSLContext` debug callback with +:meth:`ssl.SSLContext.sni_callback`. +.. +.. bpo: 43571 +.. date: 2021-03-20-17-40-35 +.. nonce: acAL0W +.. section: Library +It's now possible to create MPTCP sockets with IPPROTO_MPTCP +.. +.. bpo: 43542 +.. date: 2021-03-20-15-43-25 +.. nonce: 6bt2F6 +.. section: Library +``image/heic`` and ``image/heif`` were added to :mod:`mimetypes`. +.. +.. bpo: 40645 +.. date: 2021-03-19-10-22-17 +.. nonce: 5pXhb- +.. section: Library +The :mod:`hmac` module now uses OpenSSL's HMAC implementation when digestmod +argument is a hash name or builtin hash function. +.. +.. bpo: 43510 +.. date: 2021-03-16-17-20-33 +.. nonce: -BeQH_ +.. section: Library +Implement :pep:`597`: Add ``EncodingWarning`` warning, ``-X +warn_default_encoding`` option, :envvar:`PYTHONWARNDEFAULTENCODING` +environment variable and ``encoding="locale"`` argument value. +.. +.. bpo: 43521 +.. date: 2021-03-16-16-05-02 +.. nonce: mRT6fh +.. section: Library +``ast.unparse`` can now render NaNs and empty sets. +.. +.. bpo: 42914 +.. date: 2021-03-14-21-47-28 +.. nonce: 9U1o33 +.. section: Library +:func:`pprint.pprint` gains a new boolean ``underscore_numbers`` optional +argument to emit integers with thousands separated by an underscore +character for improved readability (for example ``1_000_000`` instead of +``1000000``). +.. +.. bpo: 41361 +.. date: 2021-03-13-08-18-01 +.. nonce: lXDIlr +.. section: Library +:meth:`~collections.deque.rotate` calls are now slightly faster due to +faster argument parsing. +.. +.. bpo: 43423 +.. date: 2021-03-11-15-44-18 +.. nonce: rRomRD +.. section: Library +:func:`subprocess.communicate` no longer raises an IndexError when there is +an empty stdout or stderr IO buffer during a timeout on Windows. +.. +.. bpo: 27820 +.. date: 2021-03-10-14-07-44 +.. nonce: Wwdy-r +.. section: Library +Fixed long-standing bug of smtplib.SMTP where doing AUTH LOGIN with +initial_response_ok=False will fail. +The cause is that SMTP.auth_login _always_ returns a password if provided +with a challenge string, thus non-compliant with the standard for AUTH +LOGIN. +Also fixes bug with the test for smtpd. +.. +.. bpo: 43445 +.. date: 2021-03-09-11-36-19 +.. nonce: jnj-UB +.. section: Library +Add frozen modules to :data:`sys.stdlib_module_names`. For example, add +``"_frozen_importlib"`` and ``"_frozen_importlib_external"`` names. +.. +.. bpo: 43245 +.. date: 2021-03-08-22-14-37 +.. nonce: nXL-MC +.. section: Library +Add keyword arguments support to ``ChainMap.new_child()``. +.. +.. bpo: 29982 +.. date: 2021-03-07-23-23-03 +.. nonce: Q9iszT +.. section: Library +Add optional parameter *ignore_cleanup_errors* to +:func:`tempfile.TemporaryDirectory` and allow multiple :func:`cleanup` +attempts. Contributed by C.A.M. Gerlach. +.. +.. bpo: 43428 +.. date: 2021-03-07-18-54-39 +.. nonce: br0XmX +.. section: Library +Include changes from `importlib_metadata 3.7 +`_: +Performance enhancements to distribution discovery. +``entry_points`` only returns unique distributions. +Introduces new ``EntryPoints`` object for containing a set of entry points +with convenience methods for selecting entry points by group or name. +``entry_points`` now returns this object if selection parameters are +supplied but continues to return a dict object for compatibility. Users are +encouraged to rely on the selection interface. The dict object result is +likely to be deprecated in the future. +Added packages_distributions function to return a mapping of packages to the +distributions that provide them. +.. +.. bpo: 43332 +.. date: 2021-03-07-11-23-20 +.. nonce: weatsh +.. section: Library +Improves the networking efficiency of :mod:`http.client` when using a proxy +via :meth:`~HTTPConnection.set_tunnel`. Fewer small send calls are made +during connection setup. +.. +.. bpo: 43420 +.. date: 2021-03-07-08-03-31 +.. nonce: cee_X5 +.. section: Library +Improve performance of :class:`fractions.Fraction` arithmetics for large +components. Contributed by Sergey B. Kirpichev. +.. +.. bpo: 43356 +.. date: 2021-03-04-21-51-20 +.. nonce: X7IGBM +.. section: Library +Allow passing a signal number to ``_thread.interrupt_main()``. +.. +.. bpo: 43399 +.. date: 2021-03-04-17-53-46 +.. nonce: Wn95u- +.. section: Library +Fix ``ElementTree.extend`` not working on iterators when using the Python +implementation +.. +.. bpo: 43369 +.. date: 2021-03-02-15-25-28 +.. nonce: F4knlQ +.. section: Library +Improve :mod:`sqlite3` error handling: If ``sqlite3_column_text()`` and +``sqlite3_column_blob()`` set ``SQLITE_NOMEM``, :exc:`MemoryError` is now +raised. Patch by Erlend E. Aasland. +.. +.. bpo: 43368 +.. date: 2021-03-02-13-45-05 +.. nonce: t9XEkQ +.. section: Library +Fix a regression introduced in PR 24562, where an empty bytestring was +fetched as ``None`` instead of ``b''`` in :mod:`sqlite3`. Patch by Mariusz +Felisiak. +.. +.. bpo: 41282 +.. date: 2021-03-02-09-54-22 +.. nonce: xL4h94 +.. section: Library +Fixed stacklevel of ``DeprecationWarning`` emitted from ``import +distutils``. +.. +.. bpo: 42129 +.. date: 2021-02-28-04-21-35 +.. nonce: V0KifQ +.. section: Library +``importlib.resources`` now honors namespace packages, merging resources +from each location in the namespace as introduced in ``importlib_resources`` +3.2 and including incidental changes through 5.0.3. +.. +.. bpo: 43295 +.. date: 2021-02-22-22-54-40 +.. nonce: h_ffu7 +.. section: Library +:meth:`datetime.datetime.strptime` now raises ``ValueError`` instead of +``IndexError`` when matching ``'z'`` with the ``%z`` format specifier. +.. +.. bpo: 43125 +.. date: 2021-02-07-19-13-30 +.. nonce: AqNoMa +.. section: Library +Return empty string if base64mime.body_encode receive empty bytes +.. +.. bpo: 43084 +.. date: 2021-01-31-17-31-13 +.. nonce: i8nLpK +.. section: Library +:func:`curses.window.enclose` returns now ``True`` or ``False`` (as was +documented) instead of ``1`` or ``0``. +.. +.. bpo: 42994 +.. date: 2021-01-21-16-58-34 +.. nonce: El0Ksp +.. section: Library +Add MIME types for opus, AAC, 3gpp and 3gpp2 +.. +.. bpo: 14678 +.. date: 2021-01-07-21-25-49 +.. nonce: 1zniCH +.. section: Library +Add an invalidate_caches() method to the zipimport.zipimporter class to +support importlib.invalidate_caches(). Patch by Desmond Cheong. +.. +.. bpo: 42782 +.. date: 2020-12-29-13-46-57 +.. nonce: 3r0HFY +.. section: Library +Fail fast in :func:`shutil.move` to avoid creating destination directories +on failure. +.. +.. bpo: 40066 +.. date: 2020-09-23-21-58-34 +.. nonce: f1dr_5 +.. section: Library +Enum's ``repr()`` and ``str()`` have changed: ``repr()`` is now +*EnumClass.MemberName* and ``str()`` is *MemberName*. Additionally, stdlib +Enum's whose contents are available as module attributes, such as +``RegexFlag.IGNORECASE``, have their ``repr()`` as *module.name*, e.g. +``re.IGNORECASE``. +.. +.. bpo: 26053 +.. date: 2020-09-01-10-12-13 +.. nonce: hXikw_ +.. section: Library +Fixed bug where the :mod:`pdb` interactive run command echoed the args from +the shell command line, even if those have been overridden at the pdb +prompt. +.. +.. bpo: 24160 +.. date: 2020-08-28-23-07-53 +.. nonce: MSGnKr +.. section: Library +Fixed bug where breakpoints did not persist across multiple debugger +sessions in :mod:`pdb`'s interactive mode. +.. +.. bpo: 40701 +.. date: 2020-05-27-05-42-39 +.. nonce: PBIgW1 +.. section: Library +When the :data:`tempfile.tempdir` global variable is set to a value of type +bytes, it is now handled consistently. Previously exceptions could be +raised from some tempfile APIs when the directory did not already exist in +this situation. Also ensures that the :func:`tempfile.gettempdir` and +:func:`tempfile.gettempdirb` functions *always* return ``str`` and +``bytes`` respectively. +.. +.. bpo: 39342 +.. date: 2020-01-15-11-15-35 +.. nonce: S8PuJO +.. section: Library +Expose ``X509_V_FLAG_ALLOW_PROXY_CERTS`` as +:const:`~ssl.VERIFY_ALLOW_PROXY_CERTS` to allow proxy certificate validation +as explained in +https://docs.openssl.org/1.1.1/man7/proxy-certificates/. +.. +.. bpo: 31861 +.. date: 2018-08-24-01-08-09 +.. nonce: -q9RKJ +.. section: Library +Add builtins.aiter and builtins.anext. Patch by Joshua Bronson (@jab), +Daniel Pope (@lordmauve), and Justin Wang (@justin39). +.. +.. bpo: 43199 +.. date: 2021-03-13-18-43-54 +.. nonce: ZWA6KX +.. section: Documentation +Answer "Why is there no goto?" in the Design and History FAQ. +.. +.. bpo: 43407 +.. date: 2021-03-04-22-53-03 +.. nonce: x570l5 +.. section: Documentation +Clarified that a result from :func:`time.monotonic`, +:func:`time.perf_counter`, :func:`time.process_time`, or +:func:`time.thread_time` can be compared with the result from any following +call to the same function - not just the next immediate call. +.. +.. bpo: 43354 +.. date: 2021-03-02-12-55-34 +.. nonce: ezZYkx +.. section: Documentation +Fix type documentation for ``Fault.faultCode``; the type has to be ``int`` +instead of ``str``. +.. +.. bpo: 41933 +.. date: 2020-10-05-20-04-43 +.. nonce: Pff94- +.. section: Documentation +Clarified wording of s * n in the Common Sequence Operations +.. +.. bpo: 37945 +.. date: 2021-03-31-11-38-42 +.. nonce: HTUYhv +.. section: Tests +Fix test_getsetlocale_issue1813() of test_locale: skip the test if +``setlocale()`` fails. Patch by Victor Stinner. +.. +.. bpo: 41561 +.. date: 2021-03-18-10-34-42 +.. nonce: pDg4w- +.. section: Tests +Add workaround for Ubuntu's custom OpenSSL security level policy. +.. +.. bpo: 43179 +.. date: 2021-03-31-12-20-23 +.. nonce: Qbe1OD +.. section: Build +Introduce and correctly use ALIGNOF_X in place of SIZEOF_X for +alignment-related code in optimized string routines. Patch by Jessica +Clarke. +.. +.. bpo: 43631 +.. date: 2021-03-26-09-16-34 +.. nonce: msJyPi +.. section: Build +Update macOS, Windows, and CI to OpenSSL 1.1.1k. +.. +.. bpo: 43617 +.. date: 2021-03-24-16-55-55 +.. nonce: d69KAv +.. section: Build +Improve configure.ac: Check for presence of autoconf-archive package and +remove our copies of M4 macros. +.. +.. bpo: 43466 +.. date: 2021-03-11-00-14-47 +.. nonce: N861Z5 +.. section: Build +The ``configure`` script now supports ``--with-openssl-rpath`` option. +.. +.. bpo: 43372 +.. date: 2021-03-04-17-13-57 +.. nonce: FfqDVL +.. section: Build +Use ``_freeze_importlib`` to generate code for the ``__hello__`` module. +This approach ensures the code matches the interpreter version. Previously, +PYTHON_FOR_REGEN was used to generate the code, which might be wrong. The +marshal format for code objects has changed with bpo-42246, commit 877df851. +Update the code and the expected code sizes in ctypes test_frozentable. +.. +.. bpo: 43440 +.. date: 2021-03-09-11-15-41 +.. nonce: igy2Mn +.. section: Windows +Build :mod:`sqlite3` with the ``R*Tree`` module enabled. Patch by Erlend E. +Aasland. +.. +.. bpo: 42225 +.. date: 2021-03-29-16-22-27 +.. nonce: iIeiLg +.. section: IDLE +Document that IDLE can fail on Unix either from misconfigured IP masquerade +rules or failure displaying complex colored (non-ascii) characters. +.. +.. bpo: 43688 +.. date: 2021-04-01-09-10-42 +.. nonce: G4gs6k +.. section: C API +The limited C API is now supported if Python is built in debug mode (if the +``Py_DEBUG`` macro is defined). In the limited C API, the +:c:func:`Py_INCREF` and :c:func:`Py_DECREF` functions are now implemented as +opaque function calls, rather than accessing directly the +:c:member:`PyObject.ob_refcnt` member, if Python is built in debug mode and +the ``Py_LIMITED_API`` macro targets Python 3.10 or newer. It became +possible to support the limited C API in debug mode because the +:c:type:`PyObject` structure is the same in release and debug mode since +Python 3.8 (see :issue:`36465`). +The limited C API is still not supported in the ``--with-trace-refs`` +special build (``Py_TRACE_REFS`` macro). +Patch by Victor Stinner. +.. +.. bpo: 43244 +.. date: 2021-03-24-01-22-14 +.. nonce: 31-97x +.. section: C API +Remove the ``pyarena.h`` header file with functions: +* ``PyArena_New()`` +* ``PyArena_Free()`` +* ``PyArena_Malloc()`` +* ``PyArena_AddPyObject()`` +These functions were undocumented, excluded from the limited C API, and were +only used internally by the compiler. Patch by Victor Stinner. +.. +.. bpo: 43244 +.. date: 2021-03-23-20-53-41 +.. nonce: VK3sLH +.. section: C API +Remove the compiler and parser functions using ``struct _mod`` type, because +the public AST C API was removed: +* ``PyAST_Compile()`` +* ``PyAST_CompileEx()`` +* ``PyAST_CompileObject()`` +* ``PyFuture_FromAST()`` +* ``PyFuture_FromASTObject()`` +* ``PyParser_ASTFromFile()`` +* ``PyParser_ASTFromFileObject()`` +* ``PyParser_ASTFromFilename()`` +* ``PyParser_ASTFromString()`` +* ``PyParser_ASTFromStringObject()`` +These functions were undocumented and excluded from the limited C API. Patch +by Victor Stinner. +.. +.. bpo: 43244 +.. date: 2021-03-19-12-56-11 +.. nonce: VuIyOD +.. section: C API +Remove ``ast.h``, ``asdl.h``, and ``Python-ast.h`` header files. These +functions were undocumented and excluded from the limited C API. Most names +defined by these header files were not prefixed by ``Py`` and so could +create names conflicts. For example, ``Python-ast.h`` defined a ``Yield`` +macro which was conflict with the ``Yield`` name used by the Windows +```` header. Use the Python :mod:`ast` module instead. Patch by +Victor Stinner. +.. +.. bpo: 43541 +.. date: 2021-03-18-12-44-33 +.. nonce: ICigzd +.. section: C API +Fix a ``PyEval_EvalCodeEx()`` regression: fix reference counting on +builtins. Patch by Victor Stinner. +.. +.. bpo: 43244 +.. date: 2021-03-17-23-53-14 +.. nonce: kfPqA_ +.. section: C API +Remove the ``symtable.h`` header file and the undocumented functions: +* ``PyST_GetScope()`` +* ``PySymtable_Build()`` +* ``PySymtable_BuildObject()`` +* ``PySymtable_Free()`` +* ``Py_SymtableString()`` +* ``Py_SymtableStringObject()`` +The ``Py_SymtableString()`` function was part the stable ABI by mistake but +it could not be used, because the ``symtable.h`` header file was excluded +from the limited C API. +The Python :mod:`symtable` module remains available and is unchanged. +Patch by Victor Stinner. +.. +.. bpo: 43244 +.. date: 2021-03-17-23-20-07 +.. nonce: diyn2C +.. section: C API +Remove the ``PyAST_Validate()`` function. It is no longer possible to build +a AST object (``mod_ty`` type) with the public C API. The function was +already excluded from the limited C API (:pep:`384`). Patch by Victor +Stinner. + +.. bpo: 40121 +.. date: 2020-03-30-23-16-25 +.. nonce: p2LIio +.. release date: 2020-04-27 +.. section: Security +Fixes audit events raised on creating a new socket. +.. +.. bpo: 39073 +.. date: 2020-03-15-01-28-36 +.. nonce: 6Szd3i +.. section: Security +Disallow CR or LF in email.headerregistry.Address arguments to guard against +header injection attacks. +.. +.. bpo: 39503 +.. date: 2020-01-30-16-15-29 +.. nonce: B299Yq +.. section: Security +:cve:`2020-8492`: The :class:`~urllib.request.AbstractBasicAuthHandler` class +of the :mod:`urllib.request` module uses an inefficient regular expression +which can be exploited by an attacker to cause a denial of service. Fix the +regex to prevent the catastrophic backtracking. Vulnerability reported by +Ben Caller and Matt Schwager. +.. +.. bpo: 40313 +.. date: 2020-04-20-23-58-35 +.. nonce: USVRW8 +.. section: Core and Builtins +Improve the performance of bytes.hex(). +.. +.. bpo: 40334 +.. date: 2020-04-20-14-06-19 +.. nonce: CTLGEp +.. section: Core and Builtins +Switch to a new parser, based on PEG. For more details see PEP 617. To +temporarily switch back to the old parser, use ``-X oldparser`` or +``PYTHONOLDPARSER=1``. In Python 3.10 we will remove the old parser +completely, including the ``parser`` module (already deprecated) and +anything that depends on it. +.. +.. bpo: 40267 +.. date: 2020-04-14-18-54-50 +.. nonce: Q2N6Bw +.. section: Core and Builtins +Fix the tokenizer to display the correct error message, when there is a +``SyntaxError`` on the last input character and no newline follows. It used to +be ``unexpected EOF while parsing``, while it should be ``invalid syntax``. +.. +.. bpo: 39522 +.. date: 2020-04-14-18-47-00 +.. nonce: uVeIV_ +.. section: Core and Builtins +Correctly unparse explicit ``u`` prefix for strings when postponed +evaluation for annotations activated. Patch by Batuhan Taskaya. +.. +.. bpo: 40246 +.. date: 2020-04-11-17-52-03 +.. nonce: vXPze5 +.. section: Core and Builtins +Report a specialized error message, ``invalid string prefix``, when the +tokenizer encounters a string with an invalid prefix. +.. +.. bpo: 40082 +.. date: 2020-04-08-22-33-24 +.. nonce: WI3-lu +.. section: Core and Builtins +Fix the signal handler: it now always uses the main interpreter, rather than +trying to get the current Python thread state. +.. +.. bpo: 37388 +.. date: 2020-04-07-15-44-29 +.. nonce: stlxBq +.. section: Core and Builtins +str.encode() and str.decode() no longer check the encoding and errors in +development mode or in debug mode during Python finalization. The codecs +machinery can no longer work on very late calls to str.encode() and +str.decode(). +.. +.. bpo: 40077 +.. date: 2020-04-04-12-43-19 +.. nonce: m15TTX +.. section: Core and Builtins +Fix possible refleaks in :mod:`!_json`, memo of PyScannerObject should be +traversed. +.. +.. bpo: 37207 +.. date: 2020-04-02-00-25-19 +.. nonce: ZTPmKJ +.. section: Core and Builtins +Speed up calls to ``dict()`` by using the :pep:`590` ``vectorcall`` calling +convention. +.. +.. bpo: 40141 +.. date: 2020-04-01-21-50-37 +.. nonce: 8fCRVj +.. section: Core and Builtins +Add column and line information to ``ast.keyword`` nodes. Patch by Pablo +Galindo. +.. +.. bpo: 1635741 +.. date: 2020-04-01-00-08-18 +.. nonce: bhGWam +.. section: Core and Builtins +Port :mod:`resource` to multiphase initialization (:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-03-31-22-15-04 +.. nonce: 8Ir1a0 +.. section: Core and Builtins +Port :mod:`math` to multiphase initialization (:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-03-31-21-12-27 +.. nonce: S2nkF3 +.. section: Core and Builtins +Port _uuid module to multiphase initialization (:pep:`489`). +.. +.. bpo: 40077 +.. date: 2020-03-27-01-11-08 +.. nonce: wT002V +.. section: Core and Builtins +Convert json module to use :c:func:`PyType_FromSpec`. +.. +.. bpo: 40067 +.. date: 2020-03-25-20-34-01 +.. nonce: 0bFda2 +.. section: Core and Builtins +Improve the error message for multiple star expressions in an assignment. +Patch by Furkan Onder +.. +.. bpo: 1635741 +.. date: 2020-03-24-22-26-26 +.. nonce: AB38ot +.. section: Core and Builtins +Port _functools module to multiphase initialization (PEP 489). Patch by +Paulo Henrique Silva. +.. +.. bpo: 1635741 +.. date: 2020-03-24-22-17-12 +.. nonce: jWaMRV +.. section: Core and Builtins +Port operator module to multiphase initialization (PEP 489). Patch by Paulo +Henrique Silva. +.. +.. bpo: 20526 +.. date: 2020-03-23-18-08-34 +.. nonce: NHNZIv +.. section: Core and Builtins +Fix :c:func:`PyThreadState_Clear()`. ``PyThreadState.frame`` is a borrowed +reference, not a strong reference: ``PyThreadState_Clear()`` must not call +``Py_CLEAR(tstate->frame)``. +.. +.. bpo: 1635741 +.. date: 2020-03-22-01-01-41 +.. nonce: gR7Igp +.. section: Core and Builtins +Port time module to multiphase initialization (:pep:`489`). Patch by Paulo +Henrique Silva. +.. +.. bpo: 1635741 +.. date: 2020-03-20-13-42-35 +.. nonce: bhIu5M +.. section: Core and Builtins +Port _weakref extension module to multiphase initialization (:pep:`489`). +.. +.. bpo: 40020 +.. date: 2020-03-19-21-53-41 +.. nonce: n-26G7 +.. section: Core and Builtins +Fix a leak and subsequent crash in parsetok.c caused by realloc misuse on a +rare codepath. +.. +.. bpo: 39939 +.. date: 2020-03-11-19-17-36 +.. nonce: NwCnAM +.. section: Core and Builtins +Added str.removeprefix and str.removesuffix methods and corresponding bytes, +bytearray, and collections.UserString methods to remove affixes from a +string if present. See :pep:`616` for a full description. Patch by Dennis +Sweeney. +.. +.. bpo: 39481 +.. date: 2020-01-28-17-19-18 +.. nonce: rqSeGl +.. section: Core and Builtins +Implement PEP 585. This supports list[int], tuple[str, ...] etc. +.. +.. bpo: 32894 +.. date: 2019-12-01-21-36-49 +.. nonce: 5g_UQr +.. section: Core and Builtins +Support unparsing of infinity numbers in postponed annotations. Patch by +Batuhan Taşkaya. +.. +.. bpo: 37207 +.. date: 2019-06-09-10-54-31 +.. nonce: bLjgLS +.. section: Core and Builtins +Speed up calls to ``list()`` by using the :pep:`590` ``vectorcall`` calling +convention. Patch by Mark Shannon. +.. +.. bpo: 40398 +.. date: 2020-04-26-22-25-36 +.. nonce: OdXnR3 +.. section: Library +:func:`typing.get_args` now always returns an empty tuple for special +generic aliases. +.. +.. bpo: 40396 +.. date: 2020-04-26-19-07-40 +.. nonce: Fn-is1 +.. section: Library +Functions :func:`typing.get_origin`, :func:`typing.get_args` and +:func:`typing.get_type_hints` support now generic aliases like +``list[int]``. +.. +.. bpo: 38061 +.. date: 2020-04-24-01-55-00 +.. nonce: XmULB3 +.. section: Library +Optimize the :mod:`subprocess` module on FreeBSD using ``closefrom()``. A +single ``close(fd)`` syscall is cheap, but when ``sysconf(_SC_OPEN_MAX)`` is +high, the loop calling ``close(fd)`` on each file descriptor can take +several milliseconds. +The workaround on FreeBSD to improve performance was to load and mount the +fdescfs kernel module, but this is not enabled by default. +Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans (kevans) +and Kubilay Kocak (koobs): +https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274 +.. +.. bpo: 38061 +.. date: 2020-04-24-01-27-08 +.. nonce: cdlkMz +.. section: Library +On FreeBSD, ``os.closerange(fd_low, fd_high)`` now calls +``closefrom(fd_low)`` if *fd_high* is greater than or equal to +``sysconf(_SC_OPEN_MAX)``. +Initial patch by Ed Maste (emaste), Conrad Meyer (cem), Kyle Evans (kevans) +and Kubilay Kocak (koobs): +https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242274 +.. +.. bpo: 40360 +.. date: 2020-04-22-20-55-17 +.. nonce: Er8sv- +.. section: Library +The :mod:`!lib2to3` module is pending deprecation due to :pep:`617`. +.. +.. bpo: 40138 +.. date: 2020-04-22-00-05-10 +.. nonce: i_oGqa +.. section: Library +Fix the Windows implementation of :func:`os.waitpid` for exit code larger +than ``INT_MAX >> 8``. The exit status is now interpreted as an unsigned +number. +.. +.. bpo: 39942 +.. date: 2020-04-20-20-16-02 +.. nonce: NvGnTc +.. section: Library +Set "__main__" as the default module name when "__name__" is missing in +:class:`typing.TypeVar`. Patch by Weipeng Hong. +.. +.. bpo: 40275 +.. date: 2020-04-20-19-06-55 +.. nonce: 9UcN2g +.. section: Library +The :mod:`logging` package is now imported lazily in :mod:`unittest` only +when the :meth:`~unittest.TestCase.assertLogs` assertion is used. +.. +.. bpo: 40275 +.. date: 2020-04-20-18-50-25 +.. nonce: Ofk6J8 +.. section: Library +The :mod:`asyncio` package is now imported lazily in :mod:`unittest` only +when the :class:`~unittest.IsolatedAsyncioTestCase` class is used. +.. +.. bpo: 40330 +.. date: 2020-04-19-17-31-29 +.. nonce: DGjoIS +.. section: Library +In :meth:`ShareableList.__setitem__`, check the size of a new string item +after encoding it to utf-8, not before. +.. +.. bpo: 40148 +.. date: 2020-04-19-14-16-43 +.. nonce: pDZR6V +.. section: Library +Added :meth:`pathlib.Path.with_stem` to create a new Path with the stem +replaced. +.. +.. bpo: 40325 +.. date: 2020-04-18-19-40-00 +.. nonce: KWSvix +.. section: Library +Deprecated support for set objects in random.sample(). +.. +.. bpo: 40257 +.. date: 2020-04-18-10-52-15 +.. nonce: lv4WTq +.. section: Library +Improved help for the :mod:`typing` module. Docstrings are now shown for all +special forms and special generic aliases (like ``Union`` and ``List``). +Using ``help()`` with generic alias like ``List[int]`` will show the help +for the correspondent concrete type (``list`` in this case). +.. +.. bpo: 40257 +.. date: 2020-04-15-19-34-11 +.. nonce: ux8FUr +.. section: Library +:func:`inspect.getdoc` no longer returns docstring inherited from the type of +the object or from parent class if it is a class if it is not defined in the +object itself. In :mod:`pydoc` the documentation string is now shown not +only for class, function, method etc, but for any object that has its own +``__doc__`` attribute. +.. +.. bpo: 40287 +.. date: 2020-04-15-17-21-48 +.. nonce: -mkEJH +.. section: Library +Fixed ``SpooledTemporaryFile.seek()`` to return the position. +.. +.. bpo: 40290 +.. date: 2020-04-15-16-43-48 +.. nonce: eqCMGJ +.. section: Library +Added zscore() to statistics.NormalDist(). +.. +.. bpo: 40282 +.. date: 2020-04-15-10-23-52 +.. nonce: rIYJmu +.. section: Library +Allow ``random.getrandbits(0)`` to succeed and to return 0. +.. +.. bpo: 40286 +.. date: 2020-04-15-00-39-25 +.. nonce: ai80FA +.. section: Library +Add :func:`random.randbytes` function and :meth:`random.Random.randbytes` +method to generate random bytes. +.. +.. bpo: 40277 +.. date: 2020-04-14-21-53-18 +.. nonce: NknSaf +.. section: Library +:func:`collections.namedtuple` now provides a human-readable repr for its +field accessors. +.. +.. bpo: 40270 +.. date: 2020-04-14-16-18-49 +.. nonce: XVJzeG +.. section: Library +The included copy of sqlite3 on Windows is now compiled with the json +extension. This allows the use of functions such as ``json_object``. +.. +.. bpo: 29255 +.. date: 2020-04-14-11-31-07 +.. nonce: 4EcyIN +.. section: Library +Wait in ``KqueueSelector.select`` when no fds are registered +.. +.. bpo: 40260 +.. date: 2020-04-12-21-18-56 +.. nonce: F6VWaE +.. section: Library +Ensure :mod:`modulefinder` uses :func:`io.open_code` and respects coding +comments. +.. +.. bpo: 40234 +.. date: 2020-04-10-16-13-47 +.. nonce: tar4d_ +.. section: Library +Allow again to spawn daemon threads in subinterpreters (revert change which +denied them). +.. +.. bpo: 39207 +.. date: 2020-04-10-01-24-58 +.. nonce: 2dE5Ox +.. section: Library +Workers in :class:`~concurrent.futures.ProcessPoolExecutor` are now spawned +on demand, only when there are no available idle workers to reuse. This +optimizes startup overhead and reduces the amount of lost CPU time to idle +workers. Patch by Kyle Stanley. +.. +.. bpo: 40091 +.. date: 2020-04-07-23-26-25 +.. nonce: 5M9AW5 +.. section: Library +Fix a hang at fork in the logging module: the new private _at_fork_reinit() +method is now used to reinitialize locks at fork in the child process. +.. +.. bpo: 40149 +.. date: 2020-04-07-18-06-38 +.. nonce: mMU2iu +.. section: Library +Implement traverse and clear slots in _abc._abc_data type. +.. +.. bpo: 40208 +.. date: 2020-04-06-20-09-33 +.. nonce: 3rO_q7 +.. section: Library +Remove deprecated :meth:`!symtable.SymbolTable.has_exec`. +.. +.. bpo: 40196 +.. date: 2020-04-06-11-05-13 +.. nonce: Jqowse +.. section: Library +Fix a bug in the :mod:`symtable` module that was causing incorrectly report +global variables as local. Patch by Pablo Galindo. +.. +.. bpo: 40190 +.. date: 2020-04-05-02-58-17 +.. nonce: HF3OWo +.. section: Library +Add support for ``_SC_AIX_REALMEM`` to :func:`posix.sysconf`. +.. +.. bpo: 40182 +.. date: 2020-04-04-23-44-09 +.. nonce: Bf_kFN +.. section: Library +Removed the ``_field_types`` attribute of the :class:`typing.NamedTuple` +class. +.. +.. bpo: 36517 +.. date: 2020-04-04-17-49-39 +.. nonce: Ilj1IJ +.. section: Library +Multiple inheritance with :class:`typing.NamedTuple` now raises an error +instead of silently ignoring other types. +.. +.. bpo: 40126 +.. date: 2020-04-04-00-47-40 +.. nonce: Y-bTNP +.. section: Library +Fixed reverting multiple patches in unittest.mock. Patcher's ``__exit__()`` +is now never called if its ``__enter__()`` is failed. Returning true from +``__exit__()`` silences now the exception. +.. +.. bpo: 40094 +.. date: 2020-04-02-01-13-28 +.. nonce: AeZ34K +.. section: Library +CGIHTTPRequestHandler of http.server now logs the CGI script exit code, +rather than the CGI script exit status of os.waitpid(). For example, if the +script is killed by signal 11, it now logs: "CGI script exit code -11." +.. +.. bpo: 40108 +.. date: 2020-03-31-01-11-20 +.. nonce: EGDVQ_ +.. section: Library +Improve the error message when triying to import a module using :mod:`runpy` +and incorrectly using the ".py" extension at the end of the module name. Patch +by Pablo Galindo. +.. +.. bpo: 40094 +.. date: 2020-03-28-18-25-49 +.. nonce: v-wQIU +.. section: Library +Add :func:`os.waitstatus_to_exitcode` function: convert a wait status to an +exit code. +.. +.. bpo: 40089 +.. date: 2020-03-27-17-22-34 +.. nonce: -lFsD0 +.. section: Library +Fix threading._after_fork(): if fork was not called by a thread spawned by +threading.Thread, threading._after_fork() now creates a _MainThread instance +for _main_thread, instead of a _DummyThread instance. +.. +.. bpo: 40089 +.. date: 2020-03-27-16-54-29 +.. nonce: VTq_8s +.. section: Library +Add a private ``_at_fork_reinit()`` method to :class:`!_thread.Lock`, +:class:`!_thread.RLock`, :class:`threading.RLock` and +:class:`threading.Condition` classes: reinitialize the lock at fork in the +child process, reset the lock to the unlocked state. Rename also the private +``_reset_internal_locks()`` method of :class:`threading.Event` to +``_at_fork_reinit()``. +.. +.. bpo: 25780 +.. date: 2020-03-27-08-57-46 +.. nonce: kIjVge +.. section: Library +Expose :const:`~socket.CAN_RAW_JOIN_FILTERS` in the :mod:`socket` module. +.. +.. bpo: 39503 +.. date: 2020-03-25-16-02-16 +.. nonce: YmMbYn +.. section: Library +:class:`~urllib.request.AbstractBasicAuthHandler` of :mod:`urllib.request` +now parses all WWW-Authenticate HTTP headers and accepts multiple challenges +per header: use the realm of the first Basic challenge. +.. +.. bpo: 39812 +.. date: 2020-03-25-00-35-48 +.. nonce: rIKnms +.. section: Library +Removed daemon threads from :mod:`concurrent.futures` by adding an internal +``threading._register_atexit()``, which calls registered functions prior to +joining all non-daemon threads. This allows for compatibility with +subinterpreters, which don't support daemon threads. +.. +.. bpo: 40050 +.. date: 2020-03-24-16-17-20 +.. nonce: 6GrOlz +.. section: Library +Fix ``importlib._bootstrap_external``: avoid creating a new ``winreg`` +builtin module if it's already available in :data:`sys.modules`, and remove +redundant imports. +.. +.. bpo: 40014 +.. date: 2020-03-23-17-52-00 +.. nonce: Ya70VG +.. section: Library +Fix ``os.getgrouplist()``: if ``getgrouplist()`` function fails because the +group list is too small, retry with a larger group list. On failure, the +glibc implementation of ``getgrouplist()`` sets ``ngroups`` to the total +number of groups. For other implementations, double the group list size. +.. +.. bpo: 40017 +.. date: 2020-03-21-00-46-18 +.. nonce: HFpHZS +.. section: Library +Add :const:`time.CLOCK_TAI` constant if the operating system support it. +.. +.. bpo: 40016 +.. date: 2020-03-19-19-40-27 +.. nonce: JWtxqJ +.. section: Library +In re docstring, clarify the relationship between inline and argument +compile flags. +.. +.. bpo: 39953 +.. date: 2020-03-19-16-33-03 +.. nonce: yy5lC_ +.. section: Library +Update internal table of OpenSSL error codes in the ``ssl`` module. +.. +.. bpo: 36144 +.. date: 2020-03-18-14-51-41 +.. nonce: lQm_RK +.. section: Library +Added :pep:`584` operators to :class:`weakref.WeakValueDictionary`. +.. +.. bpo: 36144 +.. date: 2020-03-18-14-02-58 +.. nonce: ooyn6Z +.. section: Library +Added :pep:`584` operators to :class:`weakref.WeakKeyDictionary`. +.. +.. bpo: 38891 +.. date: 2020-03-15-08-06-05 +.. nonce: 56Yokh +.. section: Library +Fix linear runtime behaviour of the ``__getitem__`` and ``__setitem__`` methods +in :class:`multiprocessing.shared_memory.ShareableList`. This avoids +quadratic performance when iterating a ``ShareableList``. Patch by Thomas +Krennwallner. +.. +.. bpo: 39682 +.. date: 2020-03-08-11-00-01 +.. nonce: AxXZNz +.. section: Library +Remove undocumented support for *closing* a ``pathlib.Path`` object via its +context manager. The context manager magic methods remain, but they are now +a no-op, making ``Path`` objects immutable. +.. +.. bpo: 36144 +.. date: 2020-03-07-11-26-08 +.. nonce: FG9jqy +.. section: Library +Added :pep:`584` operators (``|`` and ``|=``) to +:class:`collections.ChainMap`. +.. +.. bpo: 39011 +.. date: 2020-02-12-01-48-51 +.. nonce: hGve_t +.. section: Library +Normalization of line endings in ElementTree attributes was removed, as line +endings which were replaced by entity numbers should be preserved in +original form. +.. +.. bpo: 38410 +.. date: 2019-10-09-08-14-25 +.. nonce: _YyoMV +.. section: Library +Properly handle :func:`sys.audit` failures in +:func:`sys.set_asyncgen_hooks`. +.. +.. bpo: 36541 +.. date: 2019-06-18-19-38-27 +.. nonce: XI8mi1 +.. section: Library +lib2to3 now recognizes named assignment expressions (the walrus operator, +``:=``) +.. +.. bpo: 35967 +.. date: 2019-04-14-14-11-07 +.. nonce: KUMT9E +.. section: Library +In platform, delay the invocation of 'uname -p' until the processor +attribute is requested. +.. +.. bpo: 35113 +.. date: 2018-11-03-16-18-20 +.. nonce: vwvWKG +.. section: Library +:meth:`inspect.getsource` now returns correct source code for inner class +with same name as module level class. Decorators are also returned as part +of source of the class. Patch by Karthikeyan Singaravelan. +.. +.. bpo: 33262 +.. date: 2018-04-17-13-23-29 +.. nonce: vHC7YQ +.. section: Library +Deprecate passing None as an argument for :func:`shlex.split`'s ``s`` +parameter. Patch by Zackery Spytz. +.. +.. bpo: 31758 +.. date: 2017-10-14-21-02-40 +.. nonce: 563ZZb +.. section: Library +Prevent crashes when using an uninitialized ``_elementtree.XMLParser`` +object. Patch by Oren Milman. +.. +.. bpo: 27635 +.. date: 2020-04-01-00-27-03 +.. nonce: VwxUty +.. section: Documentation +The pickle documentation incorrectly claimed that ``__new__`` isn't called +by default when unpickling. +.. +.. bpo: 39879 +.. date: 2020-03-16-18-12-02 +.. nonce: CnQ7Cv +.. section: Documentation +Updated :ref:`datamodel` docs to include :func:`dict` insertion order +preservation. Patch by Furkan Onder and Samy Lahfa. +.. +.. bpo: 38387 +.. date: 2019-10-06-23-44-15 +.. nonce: fZoq0S +.. section: Documentation +Document :c:macro:`PyDoc_STRVAR` macro in the C-API reference. +.. +.. bpo: 13743 +.. date: 2019-09-25-23-20-55 +.. nonce: 5ToLDy +.. section: Documentation +Some methods within xml.dom.minidom.Element class are now better documented. +.. +.. bpo: 31904 +.. date: 2020-04-09-16-29-18 +.. nonce: ej348T +.. section: Tests +Set expected default encoding in test_c_locale_coercion.py for VxWorks RTOS. +.. +.. bpo: 40162 +.. date: 2020-04-03-02-40-16 +.. nonce: v3pQW_ +.. section: Tests +Update Travis CI configuration to OpenSSL 1.1.1f. +.. +.. bpo: 40146 +.. date: 2020-04-02-02-14-37 +.. nonce: J-Yo9G +.. section: Tests +Update OpenSSL to 1.1.1f in Azure Pipelines. +.. +.. bpo: 40094 +.. date: 2020-03-31-18-57-52 +.. nonce: m3fTJe +.. section: Tests +Add :func:`test.support.wait_process` function. +.. +.. bpo: 40003 +.. date: 2020-03-31-16-07-15 +.. nonce: SOruLY +.. section: Tests +``test.bisect_cmd`` now copies Python command line options like ``-O`` or +``-W``. Moreover, emit a warning if ``test.bisect_cmd`` is used with +``-w``/``--verbose2`` option. +.. +.. bpo: 39380 +.. date: 2020-03-22-20-00-04 +.. nonce: ZXlRQU +.. section: Tests +Add the encoding in :class:`ftplib.FTP` and :class:`ftplib.FTP_TLS` to the +constructor as keyword-only and change the default from ``latin-1`` to +``utf-8`` to follow :rfc:`2640`. +.. +.. bpo: 39793 +.. date: 2020-02-29-12-58-17 +.. nonce: Og2SUN +.. section: Tests +Use the same domain when testing ``make_msgid``. Patch by Batuhan Taskaya. +.. +.. bpo: 1812 +.. date: 2019-11-25-21-46-47 +.. nonce: sAbTbY +.. section: Tests +Fix newline handling in doctest.testfile when loading from a package whose +loader has a get_data method. Patch by Peter Donis. +.. +.. bpo: 38360 +.. date: 2020-04-22-02-33-54 +.. nonce: 74C68u +.. section: Build +Support single-argument form of macOS -isysroot flag. +.. +.. bpo: 40158 +.. date: 2020-04-03-17-54-33 +.. nonce: MWUTs4 +.. section: Build +Fix CPython MSBuild Properties in NuGet Package (build/native/python.props) +.. +.. bpo: 38527 +.. date: 2020-03-28-10-43-09 +.. nonce: fqCRgD +.. section: Build +Fix configure check on Solaris for "float word ordering": sometimes, the +correct "grep" command was not being used. Patch by Arnon Yaari. +.. +.. bpo: 40164 +.. date: 2020-04-04-13-13-44 +.. nonce: SPrSn5 +.. section: Windows +Updates Windows to OpenSSL 1.1.1f +.. +.. bpo: 8901 +.. date: 2020-01-24-09-15-41 +.. nonce: hVnhGO +.. section: Windows +Ignore the Windows registry when the ``-E`` option is used. +.. +.. bpo: 38329 +.. date: 2020-04-22-03-39-22 +.. nonce: H0a8JV +.. section: macOS +python.org macOS installers now update the Current version symlink of +/Library/Frameworks/Python.framework/Versions for 3.9 installs. Previously, +Current was only updated for Python 2.x installs. This should make it easier +to embed Python 3 into other macOS applications. +.. +.. bpo: 40164 +.. date: 2020-04-21-19-46-35 +.. nonce: 6HA6IC +.. section: macOS +Update macOS installer builds to use OpenSSL 1.1.1g. +.. +.. bpo: 38439 +.. date: 2019-12-05-14-20-53 +.. nonce: j_L2PI +.. section: IDLE +Add a 256×256 pixel IDLE icon to support more modern environments. Created +by Andrew Clover. Delete the unused macOS idle.icns icon file. +.. +.. bpo: 38689 +.. date: 2019-11-14-12-59-19 +.. nonce: Lgfxva +.. section: IDLE +IDLE will no longer freeze when inspect.signature fails when fetching a +calltip. +.. +.. bpo: 40385 +.. date: 2020-04-24-21-08-19 +.. nonce: nWIQdq +.. section: Tools/Demos +Removed the checkpyc.py tool. Please see compileall without force mode as a +potential alternative. +.. +.. bpo: 40179 +.. date: 2020-04-04-19-35-22 +.. nonce: u9FH10 +.. section: Tools/Demos +Fixed translation of ``#elif`` in Argument Clinic. +.. +.. bpo: 40094 +.. date: 2020-04-02-01-22-21 +.. nonce: 1XQQF6 +.. section: Tools/Demos +Fix ``which.py`` script exit code: it now uses +:func:`os.waitstatus_to_exitcode` to convert :func:`os.system` exit status +into an exit code. +.. +.. bpo: 40241 +.. date: 2020-04-13-02-56-24 +.. nonce: _FOf7E +.. section: C API +Move the :c:type:`!PyGC_Head` structure to the internal C API. +.. +.. bpo: 40170 +.. date: 2020-04-11-06-12-44 +.. nonce: cmM9oK +.. section: C API +Convert :c:func:`PyObject_IS_GC` macro to a function to hide implementation +details. +.. +.. bpo: 40241 +.. date: 2020-04-10-19-43-04 +.. nonce: Xm3w-1 +.. section: C API +Add the functions :c:func:`PyObject_GC_IsTracked` and +:c:func:`PyObject_GC_IsFinalized` to the public API to allow to query if +Python objects are being currently tracked or have been already finalized by +the garbage collector respectively. Patch by Pablo Galindo. +.. +.. bpo: 40170 +.. date: 2020-04-05-00-37-34 +.. nonce: Seuh3D +.. section: C API +The :c:func:`!PyObject_NEW` macro becomes an alias to the +:c:func:`PyObject_New` macro, and the :c:func:`!PyObject_NEW_VAR` macro +becomes an alias to the :c:func:`PyObject_NewVar` macro, to hide +implementation details. They no longer access directly the +:c:member:`PyTypeObject.tp_basicsize` member. +.. +.. bpo: 40170 +.. date: 2020-04-05-00-21-38 +.. nonce: Tx0vy6 +.. section: C API +:c:func:`PyType_HasFeature` now always calls :c:func:`PyType_GetFlags` to +hide implementation details. Previously, it accessed directly the +:c:member:`PyTypeObject.tp_flags` member when the limited C API was not +used. +.. +.. bpo: 40170 +.. date: 2020-04-05-00-10-45 +.. nonce: 6nFYbY +.. section: C API +Convert the :c:func:`!PyObject_GET_WEAKREFS_LISTPTR` macro to a function to +hide implementation details: the macro accessed directly to the +:c:member:`PyTypeObject.tp_weaklistoffset` member. +.. +.. bpo: 40170 +.. date: 2020-04-05-00-02-13 +.. nonce: IFsGZ- +.. section: C API +Convert :c:func:`PyObject_CheckBuffer` macro to a function to hide +implementation details: the macro accessed directly the +:c:member:`PyTypeObject.tp_as_buffer` member. +.. +.. bpo: 40170 +.. date: 2020-04-04-23-51-59 +.. nonce: uXQ701 +.. section: C API +Always declare :c:func:`PyIndex_Check` as an opaque function to hide +implementation details: remove ``PyIndex_Check()`` macro. The macro accessed +directly the :c:member:`PyTypeObject.tp_as_number` member. +.. +.. bpo: 39947 +.. date: 2020-03-25-19-44-55 +.. nonce: 2OxvPt +.. section: C API +Add :c:func:`PyThreadState_GetID` function: get the unique identifier of a +Python thread state. + +.. bpo: 22980 +.. date: 9109 +.. nonce: Lu_y6y +.. release date: 2015-04-19 +.. section: Core and Builtins +Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include the +architecture triplet in the extension name, to make it easy to test builds +for different ABIs in the same working tree. Under OS X, the extension name +now includes :pep:`3149`-style information. +.. +.. bpo: 22631 +.. date: 9108 +.. nonce: nTx_ZF +.. section: Core and Builtins +Added Linux-specific socket constant CAN_RAW_FD_FRAMES. Patch courtesy of +Joe Jevnik. +.. +.. bpo: 23731 +.. date: 9107 +.. nonce: FOXb37 +.. section: Core and Builtins +Implement :pep:`488`: removal of .pyo files. +.. +.. bpo: 23726 +.. date: 9106 +.. nonce: ZopTQ0 +.. section: Core and Builtins +Don't enable GC for user subclasses of non-GC types that don't add any new +fields. Patch by Eugene Toder. +.. +.. bpo: 23309 +.. date: 9105 +.. nonce: Wfnsnz +.. section: Core and Builtins +Avoid a deadlock at shutdown if a daemon thread is aborted while it is +holding a lock to a buffered I/O object, and the main thread tries to use +the same I/O object (typically stdout or stderr). A fatal error is emitted +instead. +.. +.. bpo: 22977 +.. date: 9104 +.. nonce: hutEse +.. section: Core and Builtins +Fixed formatting Windows error messages on Wine. Patch by Martin Panter. +.. +.. bpo: 23466 +.. date: 9103 +.. nonce: KhMltK +.. section: Core and Builtins +%c, %o, %x, and %X in bytes formatting now raise TypeError on non-integer +input. +.. +.. bpo: 24044 +.. date: 9102 +.. nonce: H7vb6- +.. section: Core and Builtins +Fix possible null pointer dereference in list.sort in out of memory +conditions. +.. +.. bpo: 21354 +.. date: 9101 +.. nonce: ZZTe1E +.. section: Core and Builtins +PyCFunction_New function is exposed by python DLL again. +.. +.. bpo: 23840 +.. date: 9100 +.. nonce: mtSbqO +.. section: Library +tokenize.open() now closes the temporary binary file on error to fix a +resource warning. +.. +.. bpo: 16914 +.. date: 9099 +.. nonce: GrP2Jr +.. section: Library +new debuglevel 2 in smtplib adds timestamps to debug output. +.. +.. bpo: 7159 +.. date: 9098 +.. nonce: KCgOUm +.. section: Library +urllib.request now supports sending auth credentials automatically after the +first 401. This enhancement is a superset of the enhancement from issue +#19494 and supersedes that change. +.. +.. bpo: 23703 +.. date: 9097 +.. nonce: kYybxm +.. section: Library +Fix a regression in urljoin() introduced in 901e4e52b20a. Patch by Demian +Brecht. +.. +.. bpo: 4254 +.. date: 9096 +.. nonce: eUC_2H +.. section: Library +Adds _curses.update_lines_cols(). Patch by Arnon Yaari +.. +.. bpo: 19933 +.. date: 9095 +.. nonce: Qq8utk +.. section: Library +Provide default argument for ndigits in round. Patch by Vajrasky Kok. +.. +.. bpo: 23193 +.. date: 9094 +.. nonce: n5ahcG +.. section: Library +Add a numeric_owner parameter to tarfile.TarFile.extract and +tarfile.TarFile.extractall. Patch by Michael Vogt and Eric Smith. +.. +.. bpo: 23342 +.. date: 9093 +.. nonce: CbSzYI +.. section: Library +Add a subprocess.run() function than returns a CalledProcess instance for a +more consistent API than the existing call* functions. +.. +.. bpo: 21217 +.. date: 9092 +.. nonce: TkFTlk +.. section: Library +inspect.getsourcelines() now tries to compute the start and end lines from +the code object, fixing an issue when a lambda function is used as decorator +argument. Patch by Thomas Ballinger and Allison Kaptur. +.. +.. bpo: 24521 +.. date: 9091 +.. nonce: bn4U-y +.. section: Library +Fix possible integer overflows in the pickle module. +.. +.. bpo: 22931 +.. date: 9090 +.. nonce: 4CuWYD +.. section: Library +Allow '[' and ']' in cookie values. +.. +.. bpo: 0 +.. date: 9089 +.. nonce: fgX8Qe +.. section: Library +The keywords attribute of functools.partial is now always a dictionary. +.. +.. bpo: 23811 +.. date: 9088 +.. nonce: B6tzf9 +.. section: Library +Add missing newline to the PyCompileError error message. Patch by Alex +Shkop. +.. +.. bpo: 21116 +.. date: 9087 +.. nonce: Orft3K +.. section: Library +Avoid blowing memory when allocating a multiprocessing shared array that's +larger than 50% of the available RAM. Patch by Médéric Boquien. +.. +.. bpo: 22982 +.. date: 9086 +.. nonce: xYmG62 +.. section: Library +Improve BOM handling when seeking to multiple positions of a writable text +file. +.. +.. bpo: 23464 +.. date: 9085 +.. nonce: _XGkBk +.. section: Library +Removed deprecated asyncio JoinableQueue. +.. +.. bpo: 23529 +.. date: 9084 +.. nonce: Hr7AHH +.. section: Library +Limit the size of decompressed data when reading from GzipFile, BZ2File or +LZMAFile. This defeats denial of service attacks using compressed bombs +(i.e. compressed payloads which decompress to a huge size). Patch by Martin +Panter and Nikolaus Rath. +.. +.. bpo: 21859 +.. date: 9083 +.. nonce: GYrUNP +.. section: Library +Added Python implementation of io.FileIO. +.. +.. bpo: 23865 +.. date: 9082 +.. nonce: PtSLgU +.. section: Library +close() methods in multiple modules now are idempotent and more robust at +shutdown. If they need to release multiple resources, all are released even +if errors occur. +.. +.. bpo: 23400 +.. date: 9081 +.. nonce: JSh9Z3 +.. section: Library +Raise same exception on both Python 2 and 3 if sem_open is not available. +Patch by Davin Potts. +.. +.. bpo: 10838 +.. date: 9080 +.. nonce: p9tSPC +.. section: Library +The subprocess now module includes SubprocessError and TimeoutError in its +list of exported names for the users wild enough to use ``from subprocess +import *``. +.. +.. bpo: 23411 +.. date: 9079 +.. nonce: 0im3Qw +.. section: Library +Added DefragResult, ParseResult, SplitResult, DefragResultBytes, +ParseResultBytes, and SplitResultBytes to urllib.parse.__all__. Patch by +Martin Panter. +.. +.. bpo: 23881 +.. date: 9078 +.. nonce: yZjl4b +.. section: Library +urllib.request.ftpwrapper constructor now closes the socket if the FTP +connection failed to fix a ResourceWarning. +.. +.. bpo: 23853 +.. date: 9077 +.. nonce: mNY1eI +.. section: Library +:meth:`socket.socket.sendall` does no more reset the socket timeout each +time data is sent successfully. The socket timeout is now the maximum total +duration to send all data. +.. +.. bpo: 22721 +.. date: 9076 +.. nonce: MVfBL9 +.. section: Library +An order of multiline pprint output of set or dict containing orderable and +non-orderable elements no longer depends on iteration order of set or dict. +.. +.. bpo: 15133 +.. date: 9075 +.. nonce: C0QfV8 +.. section: Library +_tkinter.tkapp.getboolean() now supports Tcl_Obj and always returns bool. +tkinter.BooleanVar now validates input values (accepted bool, int, str, and +Tcl_Obj). tkinter.BooleanVar.get() now always returns bool. +.. +.. bpo: 10590 +.. date: 9074 +.. nonce: nkxXfU +.. section: Library +xml.sax.parseString() now supports string argument. +.. +.. bpo: 23338 +.. date: 9073 +.. nonce: ZYMGN1 +.. section: Library +Fixed formatting ctypes error messages on Cygwin. Patch by Makoto Kato. +.. +.. bpo: 15582 +.. date: 9072 +.. nonce: 26wJNk +.. section: Library +inspect.getdoc() now follows inheritance chains. +.. +.. bpo: 2175 +.. date: 9071 +.. nonce: cHiVOp +.. section: Library +SAX parsers now support a character stream of InputSource object. +.. +.. bpo: 16840 +.. date: 9070 +.. nonce: kKIhPm +.. section: Library +Tkinter now supports 64-bit integers added in Tcl 8.4 and arbitrary +precision integers added in Tcl 8.5. +.. +.. bpo: 23834 +.. date: 9069 +.. nonce: fX3TF4 +.. section: Library +Fix socket.sendto(), use the C Py_ssize_t type to store the result of +sendto() instead of the C int type. +.. +.. bpo: 23618 +.. date: 9068 +.. nonce: Of_q5t +.. section: Library +:meth:`socket.socket.connect` now waits until the connection completes +instead of raising :exc:`InterruptedError` if the connection is interrupted +by signals, signal handlers don't raise an exception and the socket is +blocking or has a timeout. :meth:`socket.socket.connect` still raise +:exc:`InterruptedError` for non-blocking sockets. +.. +.. bpo: 21526 +.. date: 9067 +.. nonce: QQEXrR +.. section: Library +Tkinter now supports new boolean type in Tcl 8.5. +.. +.. bpo: 23836 +.. date: 9066 +.. nonce: zrEmlR +.. section: Library +Fix the faulthandler module to handle reentrant calls to its signal +handlers. +.. +.. bpo: 23838 +.. date: 9065 +.. nonce: IX6FPX +.. section: Library +linecache now clears the cache and returns an empty result on MemoryError. +.. +.. bpo: 10395 +.. date: 9064 +.. nonce: fi_lZp +.. section: Library +Added os.path.commonpath(). Implemented in posixpath and ntpath. Based on +patch by Rafik Draoui. +.. +.. bpo: 23611 +.. date: 9063 +.. nonce: QkBJVB +.. section: Library +Serializing more "lookupable" objects (such as unbound methods or nested +classes) now are supported with pickle protocols < 4. +.. +.. bpo: 13583 +.. date: 9062 +.. nonce: -MPBjZ +.. section: Library +sqlite3.Row now supports slice indexing. +.. +.. bpo: 18473 +.. date: 9061 +.. nonce: 89RHm- +.. section: Library +Fixed 2to3 and 3to2 compatible pickle mappings. Fixed ambiguous reverse +mappings. Added many new mappings. Import mapping is no longer applied to +modules already mapped with full name mapping. +.. +.. bpo: 23485 +.. date: 9060 +.. nonce: kQWN6L +.. section: Library +select.select() is now retried automatically with the recomputed timeout +when interrupted by a signal, except if the signal handler raises an +exception. This change is part of the :pep:`475`. +.. +.. bpo: 23752 +.. date: 9059 +.. nonce: 5fbVNb +.. section: Library +When built from an existing file descriptor, io.FileIO() now only calls +fstat() once. Before fstat() was called twice, which was not necessary. +.. +.. bpo: 23704 +.. date: 9058 +.. nonce: Ggjvm8 +.. section: Library +collections.deque() objects now support __add__, __mul__, and __imul__(). +.. +.. bpo: 23171 +.. date: 9057 +.. nonce: b6PBzM +.. section: Library +csv.Writer.writerow() now supports arbitrary iterables. +.. +.. bpo: 23745 +.. date: 9056 +.. nonce: E00Bml +.. section: Library +The new email header parser now handles duplicate MIME parameter names +without error, similar to how get_param behaves. +.. +.. bpo: 22117 +.. date: 9055 +.. nonce: bTO0xx +.. section: Library +Fix os.utime(), it now rounds the timestamp towards minus infinity (-inf) +instead of rounding towards zero. +.. +.. bpo: 23310 +.. date: 9054 +.. nonce: GXmFMR +.. section: Library +Fix MagicMock's initializer to work with __methods__, just like +configure_mock(). Patch by Kasia Jachim. +.. +.. bpo: 23817 +.. date: 9053 +.. nonce: DTmVan +.. section: Build +FreeBSD now uses "1.0" in the SOVERSION as other operating systems, instead +of just "1". +.. +.. bpo: 23501 +.. date: 9052 +.. nonce: iz10e6 +.. section: Build +Argument Clinic now generates code into separate files by default. +.. +.. bpo: 23799 +.. date: 9051 +.. nonce: XU2xDw +.. section: Tests +Added test.support.start_threads() for running and cleaning up multiple +threads. +.. +.. bpo: 22390 +.. date: 9050 +.. nonce: UPVFnq +.. section: Tests +test.regrtest now emits a warning if temporary files or directories are left +after running a test. +.. +.. bpo: 18128 +.. date: 9049 +.. nonce: lx2V5a +.. section: Tools/Demos +pygettext now uses standard +NNNN format in the POT-Creation-Date header. +.. +.. bpo: 23935 +.. date: 9048 +.. nonce: JSYowT +.. section: Tools/Demos +Argument Clinic's understanding of format units accepting bytes, bytearrays, +and buffers is now consistent with both the documentation and the +implementation. +.. +.. bpo: 23944 +.. date: 9047 +.. nonce: Q8ZL2s +.. section: Tools/Demos +Argument Clinic now wraps long impl prototypes at column 78. +.. +.. bpo: 20586 +.. date: 9046 +.. nonce: 7BiEkx +.. section: Tools/Demos +Argument Clinic now ensures that functions without docstrings have +signatures. +.. +.. bpo: 23492 +.. date: 9045 +.. nonce: kjIcQW +.. section: Tools/Demos +Argument Clinic now generates argument parsing code with PyArg_Parse instead +of PyArg_ParseTuple if possible. +.. +.. bpo: 23500 +.. date: 9044 +.. nonce: H6_dX_ +.. section: Tools/Demos +Argument Clinic is now smarter about generating the "#ifndef" (empty) +definition of the methoddef macro: it's only generated once, even if +Argument Clinic processes the same symbol multiple times, and it's emitted +at the end of all processing rather than immediately after the first use. +.. +.. bpo: 23998 +.. date: 9043 +.. nonce: z7mlLW +.. section: C API +PyImport_ReInitLock() now checks for lock allocation error + +.. bpo: 41304 +.. date: 2020-07-15-20-15-08 +.. nonce: vNEeYA +.. release date: 2020-10-05 +.. section: Security +Fixes ``python3x._pth`` being ignored on Windows, caused by the fix for +:issue:`29778` (:cve:`2020-15801`). +.. +.. bpo: 41162 +.. date: 2020-07-03-20-41-29 +.. nonce: tb8pVj +.. section: Security +Audit hooks are now cleared later during finalization to avoid missing +events. +.. +.. bpo: 29778 +.. date: 2020-07-03-17-21-37 +.. nonce: cR_fGS +.. section: Security +Ensure :file:`python3.dll` is loaded from correct locations when Python is +embedded (:cve:`2020-15523`). +.. +.. bpo: 41004 +.. date: 2020-06-29-16-02-29 +.. nonce: ovF0KZ +.. section: Security +The __hash__() methods of ipaddress.IPv4Interface and +ipaddress.IPv6Interface incorrectly generated constant hash values of 32 and +128 respectively. This resulted in always causing hash collisions. The fix +uses hash() to generate hash values for the tuple of (address, mask length, +network address). +.. +.. bpo: 39603 +.. date: 2020-02-12-14-17-39 +.. nonce: Gt3RSg +.. section: Security +Prevent http header injection by rejecting control characters in +http.client.putrequest(...). +.. +.. bpo: 41909 +.. date: 2020-10-04-10-55-12 +.. nonce: BqHPcm +.. section: Core and Builtins +Fixed stack overflow in :func:`issubclass` and :func:`isinstance` when +getting the ``__bases__`` attribute leads to infinite recursion. +.. +.. bpo: 41922 +.. date: 2020-10-04-01-02-58 +.. nonce: kHGT8I +.. section: Core and Builtins +Speed up calls to ``reversed()`` by using the :pep:`590` ``vectorcall`` +calling convention. Patch by Donghee Na. +.. +.. bpo: 41873 +.. date: 2020-09-28-08-58-28 +.. nonce: VzEDhA +.. section: Core and Builtins +Calls to ``float()`` are now faster due to the ``vectorcall`` calling +convention. Patch by Dennis Sweeney. +.. +.. bpo: 41870 +.. date: 2020-09-27-22-23-14 +.. nonce: 2v6_v4 +.. section: Core and Builtins +Speed up calls to ``bool()`` by using the :pep:`590` ``vectorcall`` calling +convention. Patch by Donghee Na. +.. +.. bpo: 1635741 +.. date: 2020-09-26-14-43-30 +.. nonce: aJS9B3 +.. section: Library +Port the :mod:`!_bisect` module to the multi-phase initialization API +(:pep:`489`). +.. +.. bpo: 39934 +.. date: 2020-09-24-12-15-45 +.. nonce: YVHTCF +.. section: Core and Builtins +Correctly count control blocks in 'except' in compiler. Ensures that a +syntax error, rather a fatal error, occurs for deeply nested, named +exception handlers. +.. +.. bpo: 41780 +.. date: 2020-09-15-23-29-49 +.. nonce: bOBUIH +.. section: Core and Builtins +Fix :meth:`__dir__` of :class:`types.GenericAlias`. Patch by Batuhan +Taskaya. +.. +.. bpo: 1635741 +.. date: 2020-09-12-18-34-34 +.. nonce: lh335O +.. section: Library +Port the :mod:`!_lsprof` extension module to multi-phase initialization +(:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-09-08-21-58-47 +.. nonce: vdjSLH +.. section: Library +Port the :mod:`cmath` extension module to multi-phase initialization +(:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-09-08-20-39-43 +.. nonce: jiXmyT +.. section: Library +Port the :mod:`!_scproxy` extension module to multi-phase initialization +(:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-09-07-11-35-02 +.. nonce: rvIexb +.. section: Library +Port the :mod:`termios` extension module to multi-phase initialization +(:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-09-07-09-45-47 +.. nonce: QuDIut +.. section: Library +Convert the :mod:`!_sha256` extension module types to heap types. +.. +.. bpo: 41690 +.. date: 2020-09-02-12-00-57 +.. nonce: Ny-Sfy +.. section: Core and Builtins +Fix a possible stack overflow in the parser when parsing functions and +classes with a huge amount of arguments. Patch by Pablo Galindo. +.. +.. bpo: 1635741 +.. date: 2020-09-01-17-22-35 +.. nonce: CnRME3 +.. section: Library +Port the :mod:`!_overlapped` extension module to multi-phase initialization +(:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-09-01-17-08-07 +.. nonce: X9CZgo +.. section: Library +Port the :mod:`!_curses_panel` extension module to multi-phase initialization +(:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-09-01-17-06-02 +.. nonce: 5jZymK +.. section: Library +Port the :mod:`!_opcode` extension module to multi-phase initialization +(:pep:`489`). +.. +.. bpo: 41681 +.. date: 2020-08-31-17-49-02 +.. nonce: 3-VJiH +.. section: Core and Builtins +Fixes the wrong error description in the error raised by using 2 ``,`` in +format string in f-string and :meth:`str.format`. +.. +.. bpo: 41675 +.. date: 2020-08-31-14-53-17 +.. nonce: VSoqWU +.. section: Library +The implementation of :func:`signal.siginterrupt` now uses +:c:func:`!sigaction` (if it is available in the system) instead of the +deprecated :c:func:`!siginterrupt`. Patch by Pablo Galindo. +.. +.. bpo: 41670 +.. date: 2020-08-31-11-37-59 +.. nonce: vmRJRx +.. section: Core and Builtins +Prevent line trace being skipped on platforms not compiled with +``USE_COMPUTED_GOTOS``. Fixes issue where some lines nested within a +try-except block were not being traced on Windows. +.. +.. bpo: 41654 +.. date: 2020-08-30-20-38-33 +.. nonce: HtnhAM +.. section: Core and Builtins +Fix a crash that occurred when destroying subclasses of +:class:`MemoryError`. Patch by Pablo Galindo. +.. +.. bpo: 1635741 +.. date: 2020-08-28-20-54-04 +.. nonce: 7ijlcI +.. section: Library +Port the :mod:`zlib` extension module to multi-phase initialization +(:pep:`489`). +.. +.. bpo: 41631 +.. date: 2020-08-26-11-23-31 +.. nonce: 3jZcd9 +.. section: Core and Builtins +The ``_ast`` module uses again a global state. Using a module state per +module instance is causing subtle practical problems. For example, the +Mercurial project replaces the ``__import__()`` function to implement lazy +import, whereas Python expected that ``import _ast`` always return a fully +initialized ``_ast`` module. +.. +.. bpo: 40077 +.. date: 2020-08-25-22-43-33 +.. nonce: vcxSUa +.. section: Library +Convert :mod:`!_operator` to use :c:func:`PyType_FromSpec`. +.. +.. bpo: 1653741 +.. date: 2020-08-13-07-19-21 +.. nonce: fubBkb +.. section: Core and Builtins +Port :mod:`!_sha3` to multi-phase init. Convert static types to heap types. +.. +.. bpo: 1635741 +.. date: 2020-08-13-07-18-05 +.. nonce: FC13e7 +.. section: Library +Port the :mod:`!_blake2` extension module to the multi-phase initialization +API (:pep:`489`). +.. +.. bpo: 41533 +.. date: 2020-08-12-20-29-57 +.. nonce: 4pcVAc +.. section: Core and Builtins +Free the stack allocated in ``va_build_stack`` if ``do_mkstack`` fails and +the stack is not a ``small_stack``. +.. +.. bpo: 41531 +.. date: 2020-08-12-19-32-15 +.. nonce: WgPzjT +.. section: Core and Builtins +Fix a bug that was dropping keys when compiling dict literals with more than +0xFFFF elements. Patch by Pablo Galindo. +.. +.. bpo: 41525 +.. date: 2020-08-12-07-35-07 +.. nonce: d9q3XL +.. section: Core and Builtins +The output of ``python --help`` contains now only ASCII characters. +.. +.. bpo: 1635741 +.. date: 2020-08-10-16-11-32 +.. nonce: O0d3ym +.. section: Library +Port the :mod:`!_sha1`, :mod:`!_sha512`, and :mod:`!_md5` extension modules to +multi-phase initialization API (:pep:`489`). +.. +.. bpo: 41431 +.. date: 2020-08-02-15-53-12 +.. nonce: TblUBT +.. section: Core and Builtins +Optimize ``dict_merge()`` for copying dict (e.g. ``dict(d)`` and +``{}.update(d)``). +.. +.. bpo: 41428 +.. date: 2020-07-28-22-43-27 +.. nonce: FM6xsI +.. section: Core and Builtins +Implement PEP 604. This supports (int | str) etc. in place of Union[str, +int]. +.. +.. bpo: 41340 +.. date: 2020-07-27-01-50-06 +.. nonce: pZXfcF +.. section: Core and Builtins +Removed fallback implementation for ``strdup``. +.. +.. bpo: 38156 +.. date: 2020-07-20-17-01-17 +.. nonce: ptcdRy +.. section: Core and Builtins +Handle interrupts that come after EOF correctly in ``PyOS_StdioReadline``. +.. +.. bpo: 41342 +.. date: 2020-07-19-15-40-52 +.. nonce: RRk_m_ +.. section: Core and Builtins +:func:`round` with integer argument is now faster (9--60%). +.. +.. bpo: 41334 +.. date: 2020-07-18-18-01-10 +.. nonce: t5xMGp +.. section: Core and Builtins +Constructors :func:`str`, :func:`bytes` and :func:`bytearray` are now faster +(around 30--40% for small objects). +.. +.. bpo: 41295 +.. date: 2020-07-18-08-15-32 +.. nonce: pu8Ezo +.. section: Core and Builtins +Resolve a regression in CPython 3.8.4 where defining "__setattr__" in a +multi-inheritance setup and calling up the hierarchy chain could fail if +builtins/extension types were involved in the base types. +.. +.. bpo: 41323 +.. date: 2020-07-17-11-31-54 +.. nonce: ChbZHh +.. section: Core and Builtins +Bytecode optimizations are performed directly on the control flow graph. +This will result in slightly more compact code objects in some +circumstances. +.. +.. bpo: 41247 +.. date: 2020-07-08-22-03-54 +.. nonce: PndYIk +.. section: Core and Builtins +Always cache the running loop holder when running +``asyncio.set_running_loop``. +.. +.. bpo: 41252 +.. date: 2020-07-08-21-55-23 +.. nonce: nBWL-Y +.. section: Core and Builtins +Fix incorrect refcounting in _ssl.c's ``_servername_callback()``. +.. +.. bpo: 1635741 +.. date: 2020-07-07-16-10-52 +.. nonce: zU-H_n +.. section: Core and Builtins +Port :mod:`multiprocessing` to multi-phase initialization +.. +.. bpo: 1635741 +.. date: 2020-07-06-20-43-19 +.. nonce: LYhsni +.. section: Library +Port :mod:`winapi` to multiphase initialization +.. +.. bpo: 41215 +.. date: 2020-07-06-18-36-33 +.. nonce: vFGFIz +.. section: Core and Builtins +Use non-NULL default values in the PEG parser keyword list to overcome a bug +that was preventing Python from being properly compiled when using the XLC +compiler. Patch by Pablo Galindo. +.. +.. bpo: 41218 +.. date: 2020-07-06-13-35-17 +.. nonce: oKnSr2 +.. section: Core and Builtins +Python 3.8.3 had a regression where compiling with +ast.PyCF_ALLOW_TOP_LEVEL_AWAIT would aggressively mark list comprehension +with CO_COROUTINE. Now only list comprehension making use of async/await +will tagged as so. +.. +.. bpo: 1635741 +.. date: 2020-07-03-23-10-02 +.. nonce: F5coWe +.. section: Library +Port :mod:`faulthandler` to multiphase initialization. +.. +.. bpo: 1635741 +.. date: 2020-07-01-20-17-38 +.. nonce: -AtPYu +.. section: Library +Port :mod:`sha256` to multiphase initialization +.. +.. bpo: 41175 +.. date: 2020-06-30-20-17-31 +.. nonce: acJoXB +.. section: Core and Builtins +Guard against a NULL pointer dereference within bytearrayobject triggered by +the ``bytearray() + bytearray()`` operation. +.. +.. bpo: 41100 +.. date: 2020-06-30-04-44-29 +.. nonce: PJwA6F +.. section: Core and Builtins +add arm64 to the allowable Mac OS arches in mpdecimal.h +.. +.. bpo: 41094 +.. date: 2020-06-23-23-26-42 +.. nonce: zEIJse +.. section: Core and Builtins +Fix decoding errors with audit when open files with non-ASCII names on +non-UTF-8 locale. +.. +.. bpo: 39960 +.. date: 2020-06-23-18-32-41 +.. nonce: Kez3fP +.. section: Core and Builtins +The "hackcheck" that prevents sneaking around a type's __setattr__() by +calling the superclass method was rewritten to allow C implemented heap +types. +.. +.. bpo: 41084 +.. date: 2020-06-23-15-10-19 +.. nonce: pt3y7F +.. section: Core and Builtins +Prefix the error message with 'f-string: ', when parsing an f-string +expression which throws a :exc:`SyntaxError`. +.. +.. bpo: 40521 +.. date: 2020-06-23-07-35-11 +.. nonce: dMNA6k +.. section: Core and Builtins +Empty frozensets are no longer singletons. +.. +.. bpo: 41076 +.. date: 2020-06-22-13-22-30 +.. nonce: eWYw2N +.. section: Core and Builtins +Pre-feed the parser with the location of the f-string expression, not the +f-string itself, which allows us to skip the shifting of the AST node +locations after the parsing is completed. +.. +.. bpo: 41056 +.. date: 2020-06-21-19-53-33 +.. nonce: IDu_EK +.. section: Core and Builtins +Fixes a reference to deallocated stack space during startup when +constructing sys.path involving a relative symlink when code was supplied +via -c. (discovered via Coverity) +.. +.. bpo: 41061 +.. date: 2020-06-21-10-54-02 +.. nonce: AHf9MU +.. section: Core and Builtins +Fix incorrect expressions and asserts in hashtable code and tests. +.. +.. bpo: 41052 +.. date: 2020-06-20-22-46-18 +.. nonce: 46MPeF +.. section: Core and Builtins +Opt out serialization/deserialization for _random.Random +.. +.. bpo: 40939 +.. date: 2020-06-20-19-27-47 +.. nonce: jxJ4yn +.. section: Core and Builtins +Rename ``PyPegen*`` functions to ``PyParser*``, so that we can remove the old +set of ``PyParser*`` functions that were using the old parser, but keep +everything backwards-compatible. +.. +.. bpo: 35975 +.. date: 2020-06-20-17-00-44 +.. nonce: UDHCHp +.. section: Core and Builtins +Stefan Behnel reported that cf_feature_version is used even when +PyCF_ONLY_AST is not set. This is against the intention and against the +documented behavior, so it's been fixed. +.. +.. bpo: 40939 +.. date: 2020-06-20-16-59-02 +.. nonce: 6810Ak +.. section: Core and Builtins +Remove the remaining files from the old parser and the :mod:`symbol` module. +.. +.. bpo: 40077 +.. date: 2020-06-18-19-04-30 +.. nonce: _yI-ax +.. section: Library +Convert :mod:`!_bz2` to use :c:func:`PyType_FromSpec`. +.. +.. bpo: 41006 +.. date: 2020-06-18-00-07-09 +.. nonce: H-wN-d +.. section: Core and Builtins +The ``encodings.latin_1`` module is no longer imported at startup. Now it is +only imported when it is the filesystem encoding or the stdio encoding. +.. +.. bpo: 40636 +.. date: 2020-06-17-10-27-17 +.. nonce: MYaCIe +.. section: Core and Builtins +:func:`zip` now supports :pep:`618`'s ``strict`` parameter, which raises a +:exc:`ValueError` if the arguments are exhausted at different lengths. Patch +by Brandt Bucher. +.. +.. bpo: 1635741 +.. date: 2020-06-17-00-52-21 +.. nonce: 61iyYh +.. section: Core and Builtins +Port :mod:`!_gdbm` to multiphase initialization. +.. +.. bpo: 40985 +.. date: 2020-06-15-16-29-55 +.. nonce: IIN_xX +.. section: Core and Builtins +Fix a bug that caused the :exc:`SyntaxError` text to be empty when a file +ends with a line ending in a line continuation character (i.e. backslash). +The error text should contain the text of the last line. +.. +.. bpo: 40958 +.. date: 2020-06-15-01-20-44 +.. nonce: 7O2Wh1 +.. section: Core and Builtins +Fix a possible buffer overflow in the PEG parser when gathering information +for emitting syntax errors. Patch by Pablo Galindo. +.. +.. bpo: 1635741 +.. date: 2020-06-12-22-56-17 +.. nonce: mmlp3Q +.. section: Core and Builtins +Port :mod:`!_dbm` to multiphase initialization. +.. +.. bpo: 40957 +.. date: 2020-06-12-12-21-54 +.. nonce: Z8n6I6 +.. section: Core and Builtins +Fix refleak in _Py_fopen_obj() when PySys_Audit() fails +.. +.. bpo: 40950 +.. date: 2020-06-12-00-12-28 +.. nonce: tzMy7m +.. section: Library +Add a state to the :mod:`!nis` module (:pep:`3121`) and apply the multiphase +initialization. Patch by Donghee Na. +.. +.. bpo: 40947 +.. date: 2020-06-11-16-06-49 +.. nonce: 72cZcR +.. section: Core and Builtins +The Python :ref:`Path Configuration ` now takes +:c:member:`PyConfig.platlibdir` in account. +.. +.. bpo: 40939 +.. date: 2020-06-10-11-27-15 +.. nonce: DO-wAI +.. section: Core and Builtins +Remove the old parser, the :mod:`parser` module and all associated support +code, command-line options and environment variables. Patch by Pablo +Galindo. +.. +.. bpo: 40847 +.. date: 2020-06-09-23-52-32 +.. nonce: 4XAACw +.. section: Core and Builtins +Fix a bug where a line with only a line continuation character is not +considered a blank line at tokenizer level. In such cases, more than a +single ``NEWLINE`` token was emitted. The old parser was working around the +issue, but the new parser threw a :exc:`SyntaxError` for valid input due to +this. For example, an empty line following a line continuation character was +interpreted as a :exc:`SyntaxError`. +.. +.. bpo: 40890 +.. date: 2020-06-09-00-20-13 +.. nonce: LoRV-g +.. section: Core and Builtins +Each dictionary view now has a ``mapping`` attribute that provides a +:class:`types.MappingProxyType` wrapping the original dictionary. Patch +contributed by Dennis Sweeney. +.. +.. bpo: 40889 +.. date: 2020-06-08-22-46-33 +.. nonce: vIBl-W +.. section: Core and Builtins +Improved the performance of symmetric difference operations on dictionary +item views. Patch by Dennis Sweeney. +.. +.. bpo: 40904 +.. date: 2020-06-08-01-08-57 +.. nonce: 76qQzo +.. section: Core and Builtins +Fix possible segfault in the new PEG parser when parsing f-string containing +yield statements with no value (:code:`f"{yield}"`). Patch by Pablo Galindo +.. +.. bpo: 40903 +.. date: 2020-06-07-22-50-10 +.. nonce: 7dWejS +.. section: Core and Builtins +Fixed a possible segfault in the new PEG parser when producing error +messages for invalid assignments of the form :code:`p=p=`. Patch by Pablo +Galindo +.. +.. bpo: 40880 +.. date: 2020-06-06-00-23-19 +.. nonce: fjdzSh +.. section: Core and Builtins +Fix invalid memory read in the new parser when checking newlines in string +literals. Patch by Pablo Galindo. +.. +.. bpo: 40883 +.. date: 2020-06-05-23-25-00 +.. nonce: M6sQ-Q +.. section: Core and Builtins +Fix memory leak in when parsing f-strings in the new parser. Patch by Pablo +Galindo +.. +.. bpo: 40870 +.. date: 2020-06-05-12-48-28 +.. nonce: 9cd2sk +.. section: Core and Builtins +Raise :exc:`ValueError` when validating custom AST's where the constants +``True``, ``False`` and ``None`` are used within a :class:`ast.Name` node. +.. +.. bpo: 40854 +.. date: 2020-06-03-13-53-24 +.. nonce: O6vfQU +.. section: Core and Builtins +Allow overriding :data:`sys.platlibdir` via a new :envvar:`PYTHONPLATLIBDIR` +environment variable. +.. +.. bpo: 40826 +.. date: 2020-06-01-20-31-07 +.. nonce: XCI4M2 +.. section: Core and Builtins +Fix GIL usage in :c:func:`PyOS_Readline`: lock the GIL to set an exception +and pass the Python thread state when checking if there is a pending signal. +.. +.. bpo: 1635741 +.. date: 2020-05-30-23-23-35 +.. nonce: 0D-laM +.. section: Core and Builtins +Port :mod:`fcntl` to multiphase initialization. +.. +.. bpo: 19468 +.. date: 2020-05-30-23-18-35 +.. nonce: S-TA7p +.. section: Core and Builtins +Delete unnecessary instance check in importlib.reload(). Patch by Furkan +Önder. +.. +.. bpo: 40824 +.. date: 2020-05-30-14-37-18 +.. nonce: XR3V5s +.. section: Core and Builtins +Unexpected errors in calling the ``__iter__`` method are no longer masked by +``TypeError`` in the :keyword:`in` operator and functions +:func:`~operator.contains`, :func:`~operator.indexOf` and +:func:`~operator.countOf` of the :mod:`operator` module. +.. +.. bpo: 40792 +.. date: 2020-05-27-22-37-58 +.. nonce: WEDqqU +.. section: Core and Builtins +Attributes ``start``, ``stop`` and ``step`` of the :class:`range` object now +always has exact type :class:`int`. Previously, they could have been an +instance of a subclass of ``int``. +.. +.. bpo: 40780 +.. date: 2020-05-26-17-43-58 +.. nonce: 3Ckdgm +.. section: Core and Builtins +Fix a corner case where g-style string formatting of a float failed to +remove trailing zeros. +.. +.. bpo: 38964 +.. date: 2020-05-25-21-49-11 +.. nonce: lrml90 +.. section: Core and Builtins +When there's a :exc:`SyntaxError` in the expression part of an fstring, the +filename attribute of the :exc:`SyntaxError` gets correctly set to the name +of the file the fstring resides in. +.. +.. bpo: 40750 +.. date: 2020-05-24-02-42-26 +.. nonce: ZmO9Ev +.. section: Core and Builtins +Support the "-d" debug flag in the new PEG parser. Patch by Pablo Galindo +.. +.. bpo: 40217 +.. date: 2020-05-23-01-15-51 +.. nonce: jZsHTc +.. section: Core and Builtins +Instances of types created with :c:func:`PyType_FromSpecWithBases` will no +longer automatically visit their class object when traversing references in +the garbage collector. The user is expected to manually visit the object's +class. Patch by Pablo Galindo. +.. +.. bpo: 39573 +.. date: 2020-05-22-00-34-34 +.. nonce: QO2QHj +.. section: Core and Builtins +:c:func:`Py_TYPE()` is changed to the inline static function. Patch by +Donghee Na. +.. +.. bpo: 40696 +.. date: 2020-05-21-01-54-00 +.. nonce: u3n8Wx +.. section: Core and Builtins +Fix a hang that can arise after :meth:`generator.throw` due to a cycle in +the exception context chain. +.. +.. bpo: 40521 +.. date: 2020-05-20-01-17-34 +.. nonce: wvAehI +.. section: Core and Builtins +Each interpreter now its has own free lists, singletons and caches: +* Free lists: float, tuple, list, dict, frame, context, +asynchronous generator, MemoryError. +* Singletons: empty tuple, empty bytes string, empty Unicode string, +single byte character, single Unicode (latin1) character. +* Slice cache. +They are no longer shared by all interpreters. +.. +.. bpo: 40679 +.. date: 2020-05-19-19-39-49 +.. nonce: SVzz9p +.. section: Core and Builtins +Certain :exc:`TypeError` messages about missing or extra arguments now +include the function's :term:`qualified name`. Patch by Dennis Sweeney. +.. +.. bpo: 29590 +.. date: 2020-05-03-22-26-00 +.. nonce: aRz3l7 +.. section: Core and Builtins +Make the stack trace correct after calling :meth:`generator.throw` on a +generator that has yielded from a ``yield from``. +.. +.. bpo: 4022 +.. date: 2020-04-11-13-07-49 +.. nonce: Ctpn_F +.. section: Core and Builtins +Improve performance of generators by not raising internal StopIteration. +.. +.. bpo: 1635741 +.. date: 2020-04-10-23-54-57 +.. nonce: ZURqoN +.. section: Library +Port :mod:`mmap` to multiphase initialization. +.. +.. bpo: 1635741 +.. date: 2020-04-05-02-35-08 +.. nonce: Kfe9fT +.. section: Library +Port :mod:`!_lzma` to multiphase initialization. +.. +.. bpo: 37999 +.. date: 2019-09-01-14-26-02 +.. nonce: XPl6dn +.. section: Core and Builtins +Builtin and extension functions that take integer arguments no longer accept +:class:`~decimal.Decimal`\ s, :class:`~fractions.Fraction`\ s and other +objects that can be converted to integers only with a loss (e.g. that have +the :meth:`~object.__int__` method but do not have the +:meth:`~object.__index__` method). +.. +.. bpo: 29882 +.. date: 2019-06-02-11-29-15 +.. nonce: AkRzjb +.. section: Core and Builtins +Add :meth:`int.bit_count`, counting the number of ones in the binary +representation of an integer. Patch by Niklas Fiekas. +.. +.. bpo: 36982 +.. date: 2019-05-25-05-27-39 +.. nonce: 0UHgfB +.. section: Library +Use ncurses extended color functions when available to support terminals +with 256 colors, and add the new function +:func:`curses.has_extended_color_support` to indicate whether extended color +support is provided by the underlying ncurses library. +.. +.. bpo: 19569 +.. date: 2018-08-29-15-57-07 +.. nonce: RGu2Kb +.. section: Core and Builtins +Add the private macros ``_Py_COMP_DIAG_PUSH``, +``_Py_COMP_DIAG_IGNORE_DEPR_DECLS``, and ``_Py_COMP_DIAG_POP``. +.. +.. bpo: 26680 +.. date: 2018-03-15-11-51-36 +.. nonce: wOWYps +.. section: Core and Builtins +The int type now supports the x.is_integer() method for compatibility with +float. +.. +.. bpo: 41900 +.. date: 2020-10-01-10-50-12 +.. nonce: Cho7oh +.. section: Library +C14N 2.0 serialisation in xml.etree.ElementTree failed for unprefixed +attributes when a default namespace was defined. +.. +.. bpo: 41887 +.. date: 2020-09-30-23-49-42 +.. nonce: -ee2S- +.. section: Library +Strip leading spaces and tabs on :func:`ast.literal_eval`. Also document +stripping of spaces and tabs for :func:`eval`. +.. +.. bpo: 41773 +.. date: 2020-09-28-23-22-25 +.. nonce: oKkus0 +.. section: Library +Note in documentation that :func:`random.choices` doesn't support non-finite +weights, raise :exc:`ValueError` when given non-finite weights. +.. +.. bpo: 41840 +.. date: 2020-09-23-23-17-59 +.. nonce: QRFr4L +.. section: Library +Fix a bug in the :mod:`symtable` module that was causing module-scope global +variables to not be reported as both local and global. Patch by Pablo +Galindo. +.. +.. bpo: 41842 +.. date: 2020-09-23-22-52-24 +.. nonce: lIuhC9 +.. section: Library +Add :func:`codecs.unregister` function to unregister a codec search +function. +.. +.. bpo: 40564 +.. date: 2020-09-23-03-33-37 +.. nonce: iXQqMq +.. section: Library +In ``zipfile.Path``, mutate the passed ZipFile object type instead of making +a copy. Prevents issues when both the local copy and the caller’s copy +attempt to close the same file handle. +.. +.. bpo: 40670 +.. date: 2020-09-22-14-55-34 +.. nonce: R5sm68 +.. section: Library +More reliable validation of statements in :class:`timeit.Timer`. It now +accepts "empty" statements (only whitespaces and comments) and rejects +misindentent statements. +.. +.. bpo: 41833 +.. date: 2020-09-22-13-51-14 +.. nonce: 6HVDjT +.. section: Library +The :class:`threading.Thread` constructor now uses the target name if the +*target* argument is specified but the *name* argument is omitted. +.. +.. bpo: 41817 +.. date: 2020-09-22-00-23-30 +.. nonce: bnh-VG +.. section: Library +fix ``tkinter.EventType`` Enum so all members are strings, and none are tuples +.. +.. bpo: 41810 +.. date: 2020-09-20-15-14-05 +.. nonce: 7l8lyV +.. section: Library +:data:`types.EllipsisType`, :data:`types.NotImplementedType` and +:data:`types.NoneType` have been reintroduced, providing a new set of types +readily interpretable by static type checkers. +.. +.. bpo: 41815 +.. date: 2020-09-19-23-14-54 +.. nonce: RNpuX3 +.. section: Library +Fix SQLite3 segfault when backing up closed database. Patch contributed by +Peter David McCormick. +.. +.. bpo: 41816 +.. date: 2020-09-19-12-22-08 +.. nonce: ynynXJ +.. section: Library +StrEnum added: it ensures that all members are already strings or string +candidates +.. +.. bpo: 41517 +.. date: 2020-09-15-22-43-30 +.. nonce: sLBH7g +.. section: Library +fix bug allowing Enums to be extended via multiple inheritance +.. +.. bpo: 39587 +.. date: 2020-09-15-14-56-13 +.. nonce: 69xzuh +.. section: Library +use the correct mix-in data type when constructing Enums +.. +.. bpo: 41792 +.. date: 2020-09-15-07-55-35 +.. nonce: qMpSlU +.. section: Library +Add is_typeddict function to typing.py to check if a type is a TypedDict +class +Previously there was no way to check that without using private API. See the +`relevant issue in python/typing +`_. +.. +.. bpo: 41789 +.. date: 2020-09-14-19-27-46 +.. nonce: pI_uZQ +.. section: Library +Honor ``object`` overrides in ``Enum`` class creation (specifically, ``__str__``, +``__repr__``, ``__format__``, and ``__reduce_ex__``). +.. +.. bpo: 32218 +.. date: 2020-09-12-16-18-42 +.. nonce: IpYkEe +.. section: Library +``enum.Flag`` and ``enum.IntFlag`` members are now iterable. +.. +.. bpo: 39651 +.. date: 2020-09-11-12-38-55 +.. nonce: JMp9l2 +.. section: Library +Fix a race condition in the ``call_soon_threadsafe()`` method of +``asyncio.ProactorEventLoop``: do nothing if the self-pipe socket has been +closed. +.. +.. bpo: 1635741 +.. date: 2020-09-08-13-55-34 +.. nonce: 56MLP- +.. section: Library +Port the ``mashal`` extension module to the multi-phase initialization API +(:pep:`489`). +.. +.. bpo: 1635741 +.. date: 2020-09-08-13-51-16 +.. nonce: wkPeoT +.. section: Library +Port the ``_string`` extension module to the multi-phase initialization API +(:pep:`489`). +.. +.. bpo: 41732 +.. date: 2020-09-06-20-27-10 +.. nonce: 1SKv26 +.. section: Library +Added an :term:`iterator` to :class:`memoryview`. +.. +.. bpo: 41720 +.. date: 2020-09-04-20-45-38 +.. nonce: PW9MzZ +.. section: Library +Fixed :meth:`turtle.Vec2D.__rmul__` for arguments which are not int or +float. +.. +.. bpo: 41696 +.. date: 2020-09-03-01-35-32 +.. nonce: zkYGre +.. section: Library +Fix handling of debug mode in :func:`asyncio.run`. This allows setting +``PYTHONASYNCIODEBUG`` or ``-X dev`` to enable asyncio debug mode when using +:func:`asyncio.run`. +.. +.. bpo: 41687 +.. date: 2020-09-01-15-57-51 +.. nonce: m1b1KA +.. section: Library +Fix implementation of sendfile to be compatible with Solaris. +.. +.. bpo: 41662 +.. date: 2020-08-30-21-38-57 +.. nonce: 6e9iZn +.. section: Library +No longer override exceptions raised in ``__len__()`` of a sequence of +parameters in :mod:`sqlite3` with :exc:`~sqlite3.ProgrammingError`. +.. +.. bpo: 39010 +.. date: 2020-08-30-10-24-26 +.. nonce: _mzXJW +.. section: Library +Restarting a ``ProactorEventLoop`` on Windows no longer logs spurious +``ConnectionResetErrors``. +.. +.. bpo: 41638 +.. date: 2020-08-29-16-45-12 +.. nonce: iZfW5N +.. section: Library +:exc:`~sqlite3.ProgrammingError` message for absent parameter in +:mod:`sqlite3` contains now the name of the parameter instead of its index +when parameters are supplied as a dict. +.. +.. bpo: 41662 +.. date: 2020-08-29-16-07-36 +.. nonce: Mn79zh +.. section: Library +Fixed crash when mutate list of parameters during iteration in +:mod:`sqlite3`. +.. +.. bpo: 41513 +.. date: 2020-08-23-14-23-18 +.. nonce: DGqc_I +.. section: Library +Improved the accuracy of math.hypot(). Internally, each step is computed +with extra precision so that the result is now almost always correctly +rounded. +.. +.. bpo: 41609 +.. date: 2020-08-21-15-51-15 +.. nonce: JmiUKG +.. section: Library +The pdb whatis command correctly reports instance methods as 'Method' rather +than 'Function'. +.. +.. bpo: 39994 +.. date: 2020-08-15-18-17-21 +.. nonce: dOgPOh +.. section: Library +Fixed pprint's handling of dict subclasses that override __repr__. +.. +.. bpo: 32751 +.. date: 2020-08-15-15-50-12 +.. nonce: 85je5X +.. section: Library +When cancelling the task due to a timeout, :meth:`asyncio.wait_for` will now +wait until the cancellation is complete also in the case when *timeout* is +<= 0, like it does with positive timeouts. +.. +.. bpo: 37658 +.. date: 2020-08-15-15-21-40 +.. nonce: f9nivB +.. section: Library +:meth:`asyncio.wait_for` now properly handles races between cancellation of +itself and the completion of the wrapped awaitable. +.. +.. bpo: 40782 +.. date: 2020-08-13-08-07-25 +.. nonce: aGZqmB +.. section: Library +Change the method asyncio.AbstractEventLoop.run_in_executor to not be a +coroutine. +.. +.. bpo: 41520 +.. date: 2020-08-12-13-25-16 +.. nonce: BEUWa4 +.. section: Library +Fix :mod:`codeop` regression that prevented turning compile warnings into +errors. +.. +.. bpo: 41528 +.. date: 2020-08-12-07-43-31 +.. nonce: bu83oD +.. section: Library +turtle uses math module functions to convert degrees to radians and vice +versa and to calculate vector norm +.. +.. bpo: 41513 +.. date: 2020-08-09-18-16-05 +.. nonce: e6K6EK +.. section: Library +Minor algorithmic improvement to math.hypot() and math.dist() giving small +gains in speed and accuracy. +.. +.. bpo: 41503 +.. date: 2020-08-07-15-18-16 +.. nonce: IYftcu +.. section: Library +Fixed a race between setTarget and flush in logging.handlers.MemoryHandler. +.. +.. bpo: 41497 +.. date: 2020-08-07-06-06-29 +.. nonce: aBtsWz +.. section: Library +Fix potential UnicodeDecodeError in dis module. +.. +.. bpo: 41467 +.. date: 2020-08-04-00-20-30 +.. nonce: Z8DgTL +.. section: Library +On Windows, fix asyncio ``recv_into()`` return value when the socket/pipe is +closed (:exc:`BrokenPipeError`): return ``0`` rather than an empty byte +string (``b''``). +.. +.. bpo: 41425 +.. date: 2020-08-03-01-59-48 +.. nonce: KJo6zF +.. section: Library +Make tkinter doc example runnable. +.. +.. bpo: 41421 +.. date: 2020-08-01-00-51-15 +.. nonce: dHKRVB +.. section: Library +Make an algebraic simplification to random.paretovariate(). It now is +slightly less subject to round-off error and is slightly faster. Inputs that +used to cause ZeroDivisionError now cause an OverflowError instead. +.. +.. bpo: 41440 +.. date: 2020-07-30-14-56-58 +.. nonce: rju34k +.. section: Library +Add :func:`os.cpu_count` support for VxWorks RTOS. +.. +.. bpo: 41316 +.. date: 2020-07-28-12-08-58 +.. nonce: bSCbK4 +.. section: Library +Fix the :mod:`tarfile` module to write only basename of TAR file to GZIP +compression header. +.. +.. bpo: 41384 +.. date: 2020-07-26-21-18-43 +.. nonce: MlzIgV +.. section: Library +Raise TclError instead of TypeError when an unknown option is passed to +tkinter.OptionMenu. +.. +.. bpo: 41317 +.. date: 2020-07-23-01-18-34 +.. nonce: O17Z6x +.. section: Library +Use add_done_callback() in asyncio.loop.sock_accept() to unsubscribe reader +early on cancellation. +.. +.. bpo: 41364 +.. date: 2020-07-21-21-45-55 +.. nonce: 5O-k7A +.. section: Library +Reduce import overhead of :mod:`uuid`. +.. +.. bpo: 35328 +.. date: 2020-07-21-16-20-55 +.. nonce: jXovHb +.. section: Library +Set the environment variable ``VIRTUAL_ENV_PROMPT`` at :mod:`venv` +activation. +.. +.. bpo: 41341 +.. date: 2020-07-20-19-13-17 +.. nonce: wqrj8C +.. section: Library +Recursive evaluation of ``typing.ForwardRef`` in ``get_type_hints``. +.. +.. bpo: 41344 +.. date: 2020-07-20-13-27-48 +.. nonce: iKipNd +.. section: Library +Prevent creating :class:`shared_memory.SharedMemory` objects with +:code:`size=0`. +.. +.. bpo: 41333 +.. date: 2020-07-18-18-07-40 +.. nonce: upkHIm +.. section: Library +:meth:`collections.OrderedDict.pop` is now 2 times faster. +.. +.. bpo: 41288 +.. date: 2020-07-13-15-06-35 +.. nonce: 8mn5P- +.. section: Library +Unpickling invalid NEWOBJ_EX opcode with the C implementation raises now +UnpicklingError instead of crashing. +.. +.. bpo: 39017 +.. date: 2020-07-12-22-16-58 +.. nonce: x3Cg-9 +.. section: Library +Avoid infinite loop when reading specially crafted TAR files using the +tarfile module (:cve:`2019-20907`). +.. +.. bpo: 41273 +.. date: 2020-07-11-00-15-01 +.. nonce: SVrsJh +.. section: Library +Speed up any transport using ``_ProactorReadPipeTransport`` by calling +``recv_into`` instead of ``recv``, thus not creating a new buffer for each +``recv`` call in the transport's read loop. +.. +.. bpo: 41235 +.. date: 2020-07-07-21-56-26 +.. nonce: H2csMU +.. section: Library +Fix the error handling in :meth:`ssl.SSLContext.load_dh_params`. +.. +.. bpo: 41207 +.. date: 2020-07-06-16-58-53 +.. nonce: Emw7Nk +.. section: Library +In distutils.spawn, restore expectation that DistutilsExecError is raised +when the command is not found. +.. +.. bpo: 29727 +.. date: 2020-07-05-19-16-02 +.. nonce: Q6Z2rg +.. section: Library +Register :class:`array.array` as a +:class:`~collections.abc.MutableSequence`. Patch by Pablo Galindo. +.. +.. bpo: 39168 +.. date: 2020-07-04-21-56-46 +.. nonce: DQWsXj +.. section: Library +Remove the ``__new__`` method of :class:`typing.Generic`. +.. +.. bpo: 41194 +.. date: 2020-07-03-13-15-08 +.. nonce: djrKjs +.. section: Library +Fix a crash in the ``_ast`` module: it can no longer be loaded more than +once. It now uses a global state rather than a module state. +.. +.. bpo: 41195 +.. date: 2020-07-02-15-03-04 +.. nonce: cEnpO3 +.. section: Library +Add read-only ssl.SSLContext.security_level attribute to retrieve the +context's security level. +.. +.. bpo: 41193 +.. date: 2020-07-02-11-53-45 +.. nonce: 8-Tnql +.. section: Library +The ``write_history()`` atexit function of the readline completer now +ignores any :exc:`OSError` to ignore error if the filesystem is read-only, +instead of only ignoring :exc:`FileNotFoundError` and +:exc:`PermissionError`. +.. +.. bpo: 41182 +.. date: 2020-07-01-17-33-50 +.. nonce: FPFI0N +.. section: Library +selector: use DefaultSelector based upon implementation +.. +.. bpo: 41161 +.. date: 2020-06-30-20-50-51 +.. nonce: QTdJjz +.. section: Library +The decimal module now requires libmpdec-2.5.0. Users of +--with-system-libmpdec should update their system library. +.. +.. bpo: 40874 +.. date: 2020-06-28-21-16-51 +.. nonce: YImvzA +.. section: Library +The decimal module now requires libmpdec-2.5.0. +.. +.. bpo: 41138 +.. date: 2020-06-27-13-51-36 +.. nonce: bIpf7g +.. section: Library +Fixed the :mod:`trace` module CLI for Python source files with non-UTF-8 +encoding. +.. +.. bpo: 31082 +.. date: 2020-06-25-10-11-47 +.. nonce: HsgDkx +.. section: Library +Use the term "iterable" in the docstring for :func:`functools.reduce`. +.. +.. bpo: 40521 +.. date: 2020-06-23-06-09-59 +.. nonce: HUfxP7 +.. section: Library +Remove freelist from collections.deque(). +.. +.. bpo: 31938 +.. date: 2020-06-22-20-08-40 +.. nonce: EVuko9 +.. section: Library +Fix default-value signatures of several functions in the :mod:`select` +module - by Anthony Sottile. +.. +.. bpo: 41068 +.. date: 2020-06-22-10-25-39 +.. nonce: _bX2BW +.. section: Library +Fixed reading files with non-ASCII names from ZIP archive directly after +writing them. +.. +.. bpo: 41058 +.. date: 2020-06-20-21-03-55 +.. nonce: gztdZy +.. section: Library +:func:`pdb.find_function` now correctly determines the source file encoding. +.. +.. bpo: 41056 +.. date: 2020-06-20-18-37-29 +.. nonce: d9v_uL +.. section: Library +Invalid file descriptor values are now prevented from being passed to +os.fpathconf. (discovered by Coverity) +.. +.. bpo: 41056 +.. date: 2020-06-20-18-35-43 +.. nonce: Garcle +.. section: Library +Fix a NULL pointer dereference within the ssl module during a MemoryError in +the keylog callback. (discovered by Coverity) +.. +.. bpo: 41056 +.. date: 2020-06-20-18-33-03 +.. nonce: gTH4Bq +.. section: Library +Fixed an instance where a MemoryError within the zoneinfo module might not +be reported or not reported at its source. (found by Coverity) +.. +.. bpo: 41048 +.. date: 2020-06-20-10-16-57 +.. nonce: hEXB-B +.. section: Library +:func:`mimetypes.read_mime_types` function reads the rule file using UTF-8 +encoding, not the locale encoding. Patch by Srinivas Reddy Thatiparthy. +.. +.. bpo: 41043 +.. date: 2020-06-20-00-19-30 +.. nonce: p-Pk-H +.. section: Library +Fixed the use of :func:`~glob.glob` in the stdlib: literal part of the path +is now always correctly escaped. +.. +.. bpo: 41025 +.. date: 2020-06-18-10-34-59 +.. nonce: elf_nz +.. section: Library +Fixed an issue preventing the C implementation of :class:`zoneinfo.ZoneInfo` +from being subclassed. +.. +.. bpo: 35018 +.. date: 2020-06-17-23-49-45 +.. nonce: NP5_Qk +.. section: Library +Add the :class:`xml.sax.handler.LexicalHandler` class that is present in +other SAX XML implementations. +.. +.. bpo: 41002 +.. date: 2020-06-17-17-26-24 +.. nonce: NPBItE +.. section: Library +Improve performance of HTTPResponse.read with a given amount. Patch by Bruce +Merry. +.. +.. bpo: 40448 +.. date: 2020-06-15-12-22-53 +.. nonce: 1dk8Bu +.. section: Library +:mod:`ensurepip` now disables the use of ``pip`` cache when installing the +bundled versions of ``pip`` and ``setuptools``. Patch by Krzysztof Konopko. +.. +.. bpo: 40967 +.. date: 2020-06-15-00-13-57 +.. nonce: _dx3OO +.. section: Library +Removed :meth:`!asyncio.Task.current_task` and +:meth:`!asyncio.Task.all_tasks`. Patch contributed by Rémi Lapeyre. +.. +.. bpo: 40924 +.. date: 2020-06-13-12-04-50 +.. nonce: SM_luS +.. section: Library +Ensure ``importlib.resources.path`` returns an extant path for the +SourceFileLoader's resource reader. Avoids the regression identified in +master while a long-term solution is devised. +.. +.. bpo: 40955 +.. date: 2020-06-12-11-55-30 +.. nonce: huixCg +.. section: Library +Fix a minor memory leak in :mod:`subprocess` module when extra_groups was +specified. +.. +.. bpo: 40855 +.. date: 2020-06-12-10-44-15 +.. nonce: jSot83 +.. section: Library +The standard deviation and variance functions in the statistics module were +ignoring their mu and xbar arguments. +.. +.. bpo: 40939 +.. date: 2020-06-11-11-07-10 +.. nonce: -D5Asl +.. section: Library +Use the new PEG parser when generating the stdlib :mod:`keyword` module. +.. +.. bpo: 23427 +.. date: 2020-06-08-18-59-16 +.. nonce: ilg1Cz +.. section: Library +Add :data:`sys.orig_argv` attribute: the list of the original command line +arguments passed to the Python executable. +.. +.. bpo: 33689 +.. date: 2020-06-06-14-09-55 +.. nonce: EFUDH7 +.. section: Library +Ignore empty or whitespace-only lines in .pth files. This matches the +documentated behavior. Before, empty lines caused the site-packages dir to +appear multiple times in sys.path. By Ido Michael, contributors Malcolm +Smith and Tal Einat. +.. +.. bpo: 40884 +.. date: 2020-06-06-02-42-26 +.. nonce: n7fOwS +.. section: Library +Added a ``defaults`` parameter to :class:`logging.Formatter`, to allow +specifying default values for custom fields. Patch by Asaf Alon and Bar +Harel. +.. +.. bpo: 40876 +.. date: 2020-06-05-20-00-18 +.. nonce: zDhiZj +.. section: Library +Clarify error message in the :mod:`csv` module. +.. +.. bpo: 39791 +.. date: 2020-06-05-19-29-10 +.. nonce: _CcO3d +.. section: Library +Refresh importlib.metadata from importlib_metadata 1.6.1. +.. +.. bpo: 40807 +.. date: 2020-06-04-16-25-15 +.. nonce: yYyLWx +.. section: Library +Stop codeop._maybe_compile, used by code.InteractiveInterpreter (and IDLE). +from emitting each warning three times. +.. +.. bpo: 32604 +.. date: 2020-06-02-23-49-07 +.. nonce: ZN4V4l +.. section: Library +Fix reference leak in the :mod:`select` module when the module is imported +in a subinterpreter. +.. +.. bpo: 39791 +.. date: 2020-06-02-02-16-02 +.. nonce: StCJlA +.. section: Library +Built-in loaders (SourceFileLoader and ZipImporter) now supply +``TraversableResources`` implementations for ``ResourceReader``, and the +fallback function has been removed. +.. +.. bpo: 39314 +.. date: 2020-06-01-02-16-29 +.. nonce: 0T9hlA +.. section: Library +:class:`rlcompleter.Completer` and the standard Python shell now close the +parenthesis for functions that take no arguments. Patch contributed by Rémi +Lapeyre. +.. +.. bpo: 17005 +.. date: 2020-05-31-23-32-36 +.. nonce: JlRUGB +.. section: Library +The topological sort functionality that was introduced initially in the +:mod:`functools` module has been moved to a new :mod:`graphlib` module to +better accommodate the new tools and keep the original scope of the +:mod:`functools` module. Patch by Pablo Galindo +.. +.. bpo: 40834 +.. date: 2020-05-31-15-52-18 +.. nonce: MO9_hb +.. section: Library +Fix truncate when sending str object with_xxsubinterpreters.channel_send. +.. +.. bpo: 40755 +.. date: 2020-05-30-18-48-58 +.. nonce: IyOe2J +.. section: Library +Add rich comparisons to collections.Counter(). +.. +.. bpo: 26407 +.. date: 2020-05-30-14-19-47 +.. nonce: MjWLO1 +.. section: Library +Unexpected errors in calling the ``__iter__`` method are no longer masked by +``TypeError`` in :func:`csv.reader`, :func:`csv.writer.writerow` and +:meth:`csv.writer.writerows`. +.. +.. bpo: 39384 +.. date: 2020-05-30-12-44-29 +.. nonce: Iqxy3q +.. section: Library +Fixed email.contentmanager to allow set_content() to set a null string. +.. +.. bpo: 40744 +.. date: 2020-05-30-08-10-23 +.. nonce: jKURVV +.. section: Library +The :mod:`sqlite3` module uses SQLite API functions that require SQLite +v3.7.3 or higher. This patch removes support for older SQLite versions, and +explicitly requires SQLite 3.7.3 both at build, compile and runtime. Patch +by Sergey Fedoseev and Erlend E. Aasland. +.. +.. bpo: 40777 +.. date: 2020-05-28-17-32-29 +.. nonce: 1kJU6N +.. section: Library +Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time to avoid +errors on some compilers. +.. +.. bpo: 38488 +.. date: 2020-05-28-16-51-00 +.. nonce: hFQNgA +.. section: Library +Update ensurepip to install pip 20.1.1 and setuptools 47.1.0. +.. +.. bpo: 40792 +.. date: 2020-05-27-22-19-42 +.. nonce: 87Yx01 +.. section: Library +The result of :func:`operator.index` now always has exact type :class:`int`. +Previously, the result could have been an instance of a subclass of ``int``. +.. +.. bpo: 40767 +.. date: 2020-05-27-21-27-01 +.. nonce: L5MnVV +.. section: Library +:mod:`webbrowser` now properly finds the default browser in pure Wayland +systems by checking the WAYLAND_DISPLAY environment variable. Patch +contributed by Jérémy Attali. +.. +.. bpo: 40791 +.. date: 2020-05-27-18-04-52 +.. nonce: IzpNor +.. section: Library +:func:`hashlib.compare_digest` uses OpenSSL's ``CRYPTO_memcmp()`` function +when OpenSSL is available. +.. +.. bpo: 40795 +.. date: 2020-05-27-17-00-18 +.. nonce: eZSnHA +.. section: Library +:mod:`ctypes` module: If ctypes fails to convert the result of a callback or +if a ctypes callback function raises an exception, sys.unraisablehook is now +called with an exception set. Previously, the error was logged into stderr +by :c:func:`PyErr_Print`. +.. +.. bpo: 16995 +.. date: 2020-05-27-00-09-52 +.. nonce: 4niOT7 +.. section: Library +Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` to support +the Base32 Encoding with Extended Hex Alphabet. +.. +.. bpo: 30008 +.. date: 2020-05-25-22-18-38 +.. nonce: CKC3td +.. section: Library +Fix :mod:`ssl` code to be compatible with OpenSSL 1.1.x builds that use +``no-deprecated`` and ``--api=1.1.0``. +.. +.. bpo: 30064 +.. date: 2020-05-25-11-52-23 +.. nonce: 6CICsH +.. section: Library +Fix asyncio ``loop.sock_*`` race condition issue +.. +.. bpo: 40759 +.. date: 2020-05-24-23-52-35 +.. nonce: DdZdaw +.. section: Library +Deprecate the :mod:`symbol` module. +.. +.. bpo: 40756 +.. date: 2020-05-24-11-06-37 +.. nonce: 7ZH83z +.. section: Library +The second argument (extra) of ``LoggerAdapter.__init__`` now defaults to +None. +.. +.. bpo: 37129 +.. date: 2020-05-23-04-18-00 +.. nonce: YoYoYo +.. section: Library +Add a new :const:`os.RWF_APPEND` flag for :func:`os.pwritev`. +.. +.. bpo: 40737 +.. date: 2020-05-23-00-22-11 +.. nonce: iph-CM +.. section: Library +Fix possible reference leak for :mod:`sqlite3` initialization. +.. +.. bpo: 40726 +.. date: 2020-05-22-12-45-58 +.. nonce: 7oBdMw +.. section: Library +Handle cases where the ``end_lineno`` is ``None`` on +:func:`ast.increment_lineno`. +.. +.. bpo: 40698 +.. date: 2020-05-20-14-38-04 +.. nonce: zwl5Hc +.. section: Library +``distutils`` upload creates SHA2-256 and Blake2b-256 digests. MD5 +digests is skipped if platform blocks MD5. +.. +.. bpo: 40695 +.. date: 2020-05-20-13-03-28 +.. nonce: lr4aIS +.. section: Library +:mod:`hashlib` no longer falls back to builtin hash implementations when +OpenSSL provides a hash digest and the algorithm is blocked by security +policy. +.. +.. bpo: 9216 +.. date: 2020-05-20-12-53-20 +.. nonce: ps7Yf1 +.. section: Library +:func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor +``_hashlib.new()``. test_hashlib and test_smtplib handle strict security +policy better. +.. +.. bpo: 40614 +.. date: 2020-05-18-22-41-02 +.. nonce: 8j3kmq +.. section: Library +:func:`ast.parse` will not parse self documenting expressions in f-strings +when passed ``feature_version`` is less than ``(3, 8)``. +.. +.. bpo: 40626 +.. date: 2020-05-18-17-29-30 +.. nonce: NeZufF +.. section: Library +Add h5 file extension as MIME Type application/x-hdf5, as per HDF Group +recommendation for HDF5 formatted data files. Patch contributed by Mark +Schwab. +.. +.. bpo: 25920 +.. date: 2020-05-18-15-38-25 +.. nonce: PxrLY8 +.. section: Library +On macOS, when building Python for macOS 10.4 and older, which wasn't the +case for python.org macOS installer, :func:`socket.getaddrinfo` no longer +uses an internal lock to prevent race conditions when calling +``getaddrinfo()`` which is thread-safe since macOS 10.5. Python 3.9 requires +macOS 10.6 or newer. The internal lock caused random hang on fork when +another thread was calling :func:`socket.getaddrinfo`. The lock was also +used on FreeBSD older than 5.3, OpenBSD older than 201311 and NetBSD older +than 4. +.. +.. bpo: 40671 +.. date: 2020-05-18-15-26-31 +.. nonce: NeZ9Cy +.. section: Library +Prepare ``_hashlib`` for :pep:`489` and use :c:func:`PyModule_AddType`. +.. +.. bpo: 32309 +.. date: 2020-05-17-02-03-09 +.. nonce: KM9psl +.. section: Library +Added a new :term:`coroutine` :func:`asyncio.to_thread`. It is mainly used +for running IO-bound functions in a separate thread to avoid blocking the +event loop, and essentially works as a high-level version of +:meth:`~asyncio.loop.run_in_executor` that can directly take keyword +arguments. +.. +.. bpo: 36543 +.. date: 2020-05-15-21-14-45 +.. nonce: Jt-eSX +.. section: Library +Restored the deprecated :mod:`xml.etree.cElementTree` module. +.. +.. bpo: 40611 +.. date: 2020-05-13-16-28-33 +.. nonce: ZCk0_c +.. section: Library +:const:`~mmap.MAP_POPULATE` constant has now been added to the list of +exported :mod:`mmap` module flags. +.. +.. bpo: 39881 +.. date: 2020-05-07-22-00-12 +.. nonce: E1xsNv +.. section: Library +PEP 554 for use in the test suite. (Patch By Joannah Nanjekye) +.. +.. bpo: 13097 +.. date: 2020-05-06-02-01-25 +.. nonce: Wh5xSK +.. section: Library +``ctypes`` now raises an ``ArgumentError`` when a callback is invoked with +more than 1024 arguments. +.. +.. bpo: 39385 +.. date: 2020-04-23-18-21-19 +.. nonce: MIAyS7 +.. section: Library +A new test assertion context-manager, :func:`unittest.assertNoLogs` will +ensure a given block of code emits no log messages using the logging module. +Contributed by Kit Yan Choi. +.. +.. bpo: 23082 +.. date: 2020-04-20-22-08-36 +.. nonce: iX90Id +.. section: Library +Updated the error message and docs of PurePath.relative_to() to better +reflect the function behaviour. +.. +.. bpo: 40318 +.. date: 2020-04-18-14-16-02 +.. nonce: K2UdRx +.. section: Library +Use SQLite3 trace v2 API, if it is available. +.. +.. bpo: 40105 +.. date: 2020-04-03-16-13-59 +.. nonce: hfM2c0 +.. section: Library +ZipFile truncates files to avoid corruption when a shorter comment is +provided in append ("a") mode. Patch by Jan Mazur. +.. +.. bpo: 40084 +.. date: 2020-03-29-21-32-00 +.. nonce: MCYwcv +.. section: Library +Fix ``Enum.__dir__``: dir(Enum.member) now includes attributes as well as +methods. +.. +.. bpo: 31122 +.. date: 2020-03-11-07-44-06 +.. nonce: zIQ80l +.. section: Library +ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer +closes connection during TLS negotiation +.. +.. bpo: 39728 +.. date: 2020-02-24-10-58-34 +.. nonce: kOOaHn +.. section: Library +fix default ``_missing_`` so a duplicate ``ValueError`` is not set as the +``__context__`` of the original ``ValueError``. +.. +.. bpo: 39244 +.. date: 2020-02-23-15-09-47 +.. nonce: aBK5IM +.. section: Library +Fixed :class:`multiprocessing.context.get_all_start_methods` to properly +return the default method first on macOS. +.. +.. bpo: 39040 +.. date: 2019-12-15-18-47-20 +.. nonce: tKa0Qs +.. section: Library +Fix parsing of invalid mime headers parameters by collapsing whitespace +between encoded words in a bare-quote-string. +.. +.. bpo: 38731 +.. date: 2019-11-13-07-37-11 +.. nonce: 9qmcSx +.. section: Library +Add ``--quiet`` option to command-line interface of :mod:`py_compile`. Patch +by Gregory Schevchenko. +.. +.. bpo: 35714 +.. date: 2019-10-25-23-45-49 +.. nonce: fw3xb7 +.. section: Library +:exc:`struct.error` is now raised if there is a null character in a +:mod:`struct` format string. +.. +.. bpo: 38144 +.. date: 2019-09-12-21-34-03 +.. nonce: 8uQCdd +.. section: Library +Added the *root_dir* and *dir_fd* parameters in :func:`glob.glob`. +.. +.. bpo: 26543 +.. date: 2019-08-11-16-28-03 +.. nonce: X-TJZO +.. section: Library +Fix :meth:`IMAP4.noop` when debug mode is enabled (ex: ``imaplib.Debug = +3``). +.. +.. bpo: 12178 +.. date: 2019-05-31-23-54-28 +.. nonce: N6FLCZ +.. section: Library +:func:`csv.writer` now correctly escapes *escapechar* when input contains +*escapechar*. Patch by Catalin Iacob, Berker Peksag, and Itay Elbirt. +.. +.. bpo: 36290 +.. date: 2019-03-17-19-01-53 +.. nonce: 7VXo_K +.. section: Library +AST nodes are now raising :exc:`TypeError` on conflicting keyword arguments. +Patch contributed by Rémi Lapeyre. +.. +.. bpo: 33944 +.. date: 2019-03-01-01-56-23 +.. nonce: -82Pkt +.. section: Library +Added site.py site-packages tracing in verbose mode. +.. +.. bpo: 35078 +.. date: 2018-10-27-09-37-03 +.. nonce: kweA3R +.. section: Library +Refactor formatweekday, formatmonthname methods in LocaleHTMLCalendar and +LocaleTextCalendar classes in calendar module to call the base class +methods.This enables customizable CSS classes for LocaleHTMLCalendar. Patch +by Srinivas Reddy Thatiparthy +.. +.. bpo: 29620 +.. date: 2018-08-21-16-20-33 +.. nonce: xxx666 +.. section: Library +:func:`~unittest.TestCase.assertWarns` no longer raises a +``RuntimeException`` when accessing a module's ``__warningregistry__`` +causes importation of a new module, or when a new module is imported in +another thread. Patch by Kernc. +.. +.. bpo: 31844 +.. date: 2018-07-30-12-48-17 +.. nonce: 0_GKsD +.. section: Library +Remove ``ParserBase.error()`` method from the private and undocumented +``_markupbase`` module. :class:`html.parser.HTMLParser` is the only +subclass of ``ParserBase`` and its ``error()`` implementation was deprecated +in Python 3.4 and removed in Python 3.5. +.. +.. bpo: 34226 +.. date: 2018-07-29-12-14-54 +.. nonce: BE7zbu +.. section: Library +Fix ``cgi.parse_multipart`` without content_length. Patch by Roger Duran +.. +.. bpo: 33660 +.. date: 2018-06-12-23-30-41 +.. nonce: AdDn5Z +.. section: Library +Fix pathlib.PosixPath to resolve a relative path located on the root +directory properly. +.. +.. bpo: 28557 +.. date: 2018-06-07-22-04-01 +.. nonce: ViNJnK +.. section: Library +Improve the error message for a misbehaving ``rawio.readinto`` +.. +.. bpo: 26680 +.. date: 2018-03-15-11-56-48 +.. nonce: Udkhn4 +.. section: Library +The d.is_integer() method is added to the Decimal type, for compatibility +with other number types. +.. +.. bpo: 26680 +.. date: 2018-03-15-11-55-04 +.. nonce: eKAi85 +.. section: Library +The x.is_integer() method is incorporated into the abstract types of the +numeric tower, Real, Rational and Integral, with appropriate default +implementations. +.. +.. bpo: 41428 +.. date: 2020-10-03-18-20-46 +.. nonce: _ju1NE +.. section: Documentation +Add documentation for :pep:`604` (Allow writing union types as ``X | Y``). +.. +.. bpo: 41774 +.. date: 2020-09-24-15-35-13 +.. nonce: 5IqdGP +.. section: Documentation +In Programming FAQ "Sequences (Tuples/Lists)" section, add "How do you +remove multiple items from a list". +.. +.. bpo: 35293 +.. date: 2020-09-12-17-37-13 +.. nonce: _cOwPD +.. section: Documentation +Fix RemovedInSphinx40Warning when building the documentation. Patch by +Donghee Na. +.. +.. bpo: 37149 +.. date: 2020-09-10-07-48-02 +.. nonce: VD0rCv +.. section: Documentation +Change Shipman tkinter doc link from archive.org to TkDocs. (The doc has +been removed from the NMT server.) The new link responds much faster and +includes a short explanatory note. +.. +.. bpo: 41726 +.. date: 2020-09-08-16-57-09 +.. nonce: g0UXrn +.. section: Documentation +Update the refcounts info of ``PyType_FromModuleAndSpec``. +.. +.. bpo: 41624 +.. date: 2020-08-25-15-11-23 +.. nonce: ddjJlN +.. section: Documentation +Fix the signature of :class:`typing.Coroutine`. +.. +.. bpo: 40204 +.. date: 2020-08-12-18-35-40 +.. nonce: C8A_pe +.. section: Documentation +Enable Sphinx 3.2 ``c_allow_pre_v3`` option and disable +``c_warn_on_allowed_pre_v3`` option to make the documentation compatible +with Sphinx 2 and Sphinx 3. +.. +.. bpo: 41045 +.. date: 2020-07-27-20-46-17 +.. nonce: GFF6Ul +.. section: Documentation +Add documentation for debug feature of f-strings. +.. +.. bpo: 41314 +.. date: 2020-07-25-14-20-00 +.. nonce: yrjko0 +.. section: Documentation +Changed the release when ``from __future__ import annotations`` becomes the +default from ``4.0`` to ``3.10`` (following a change in PEP 563). +.. +.. bpo: 40979 +.. date: 2020-07-21-15-23-30 +.. nonce: pLA8rO +.. section: Documentation +Refactored typing.rst, arranging more than 70 classes, functions, and +decorators into new sub-sections. +.. +.. bpo: 40552 +.. date: 2020-05-09-12-10-31 +.. nonce: _0uB73 +.. section: Documentation +Fix in tutorial section 4.2. Code snippet is now correct. +.. +.. bpo: 39883 +.. date: 2020-03-07-03-53-39 +.. nonce: 1tnb4- +.. section: Documentation +Make code, examples, and recipes in the Python documentation be licensed +under the more permissive BSD0 license in addition to the existing Python +2.0 license. +.. +.. bpo: 37703 +.. date: 2019-08-16-20-25-42 +.. nonce: Qm_l_H +.. section: Documentation +Updated Documentation to comprehensively elaborate on the behaviour of +gather.cancel() +.. +.. bpo: 41939 +.. date: 2020-10-05-09-37-43 +.. nonce: P4OlbA +.. section: Tests +Fix test_site.test_license_exists_at_url(): call +``urllib.request.urlcleanup()`` to reset the global +``urllib.request._opener``. Patch by Victor Stinner. +.. +.. bpo: 41731 +.. date: 2020-09-11-19-12-31 +.. nonce: Ivxh4U +.. section: Tests +Make test_cmd_line_script pass with option '-vv'. +.. +.. bpo: 41602 +.. date: 2020-08-25-19-25-36 +.. nonce: Z64s0I +.. section: Tests +Add tests for SIGINT handling in the runpy module. +.. +.. bpo: 41521 +.. date: 2020-08-11-14-59-13 +.. nonce: w2UYK7 +.. section: Tests +:mod:`test.support`: Rename ``blacklist`` parameter of +:func:`~test.support.check__all__` to ``not_exported``. +.. +.. bpo: 41477 +.. date: 2020-08-07-17-28-49 +.. nonce: GrFexU +.. section: Tests +Make ctypes optional in test_genericalias. +.. +.. bpo: 41085 +.. date: 2020-06-23-12-02-45 +.. nonce: JZKsyz +.. section: Tests +Fix integer overflow in the :meth:`array.array.index` method on 64-bit +Windows for index larger than ``2**31``. +.. +.. bpo: 41069 +.. date: 2020-06-22-00-21-12 +.. nonce: bLZkX- +.. section: Tests +:data:`test.support.TESTFN` and the current directory for tests when run via +``test.regrtest`` contain now non-ascii characters if possible. +.. +.. bpo: 38377 +.. date: 2020-06-17-18-00-21 +.. nonce: jfg4TH +.. section: Tests +On Linux, skip tests using multiprocessing if the current user cannot create +a file in ``/dev/shm/`` directory. Add the +:func:`~test.support.skip_if_broken_multiprocessing_synchronize` function to +the :mod:`test.support` module. +.. +.. bpo: 41009 +.. date: 2020-06-17-17-27-07 +.. nonce: Rvn6OQ +.. section: Tests +Fix use of ``support.require_{linux|mac|freebsd}_version()`` decorators as +class decorator. +.. +.. bpo: 41003 +.. date: 2020-06-17-15-07-14 +.. nonce: tiH_Fy +.. section: Tests +Fix ``test_copyreg`` when ``numpy`` is installed: ``test.pickletester`` now +saves/restores warnings filters when importing ``numpy``, to ignore filters +installed by ``numpy``. +.. +.. bpo: 40964 +.. date: 2020-06-12-20-46-23 +.. nonce: OBzf2c +.. section: Tests +Disable remote :mod:`imaplib` tests, host cyrus.andrew.cmu.edu is blocking +incoming connections. +.. +.. bpo: 40927 +.. date: 2020-06-09-18-48-18 +.. nonce: 67ylLg +.. section: Tests +Fix test_binhex when run twice: it now uses import_fresh_module() to ensure +that it raises DeprecationWarning each time. +.. +.. bpo: 17258 +.. date: 2020-05-26-07-53-31 +.. nonce: X_IKTQ +.. section: Tests +Skip some :mod:`multiprocessing` tests when MD5 hash digest is blocked. +.. +.. bpo: 31904 +.. date: 2020-04-09-15-40-03 +.. nonce: TJ4k3d +.. section: Tests +Increase LOOPBACK_TIMEOUT to 10 for VxWorks RTOS. +.. +.. bpo: 38169 +.. date: 2019-09-14-13-20-27 +.. nonce: hurq4B +.. section: Tests +Increase code coverage for SharedMemory and ShareableList +.. +.. bpo: 34401 +.. date: 2018-08-20-09-38-52 +.. nonce: eGxMPm +.. section: Tests +Make test_gdb properly run on HP-UX. Patch by Michael Osipov. +.. +.. bpo: 38249 +.. date: 2020-09-28-21-56-51 +.. nonce: uzMCaZ +.. section: Build +Update :c:macro:`Py_UNREACHABLE` to use __builtin_unreachable() if only the +compiler is able to use it. Patch by Donghee Na. +.. +.. bpo: 41617 +.. date: 2020-08-24-18-34-01 +.. nonce: sKKXz7 +.. section: Build +Fix ``pycore_bitutils.h`` header file to support old clang versions: +``__builtin_bswap16()`` is not available in LLVM clang 3.0. +.. +.. bpo: 40204 +.. date: 2020-06-25-06-59-13 +.. nonce: GpD04D +.. section: Build +Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. +.. +.. bpo: 36020 +.. date: 2020-06-15-22-14-25 +.. nonce: wbiv0P +.. section: Build +The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now +required to build Python. +.. +.. bpo: 40684 +.. date: 2020-06-08-19-57-05 +.. nonce: WIY2-i +.. section: Build +``make install`` now uses the ``PLATLIBDIR`` variable for the destination +``lib-dynload/`` directory when ``./configure --with-platlibdir`` is used. +.. +.. bpo: 40683 +.. date: 2020-05-19-10-54-08 +.. nonce: W8JHrr +.. section: Build +Fixed an issue where the :mod:`zoneinfo` module and its tests were not +included when Python is installed with ``make``. +.. +.. bpo: 41744 +.. date: 2020-09-11-17-59-33 +.. nonce: e_ugDQ +.. section: Windows +Fixes automatic import of props file when using the Nuget package. +.. +.. bpo: 41627 +.. date: 2020-09-04-21-35-28 +.. nonce: sx2KN1 +.. section: Windows +The user site directory for 32-bit now includes a ``-32`` suffix to +distinguish it from the 64-bit interpreter's directory. +.. +.. bpo: 41526 +.. date: 2020-08-13-22-40-58 +.. nonce: -i2bwb +.. section: Windows +Fixed layout of final page of the installer by removing the special thanks +to Mark Hammond (with his permission). +.. +.. bpo: 41492 +.. date: 2020-08-06-16-59-10 +.. nonce: 2FQ9cM +.. section: Windows +Fixes the description that appears in UAC prompts. +.. +.. bpo: 40948 +.. date: 2020-07-28-12-39-32 +.. nonce: ISUFO6 +.. section: Windows +Improve post-install message to direct people to the "py" command. +.. +.. bpo: 41412 +.. date: 2020-07-28-11-55-43 +.. nonce: ME20KB +.. section: Windows +The installer will now fail to install on Windows 7 and Windows 8. Further, +the UCRT dependency is now always downloaded on demand. +.. +.. bpo: 40741 +.. date: 2020-07-20-23-26-26 +.. nonce: C9sc_d +.. section: Windows +Update Windows release to include SQLite 3.32.3. +.. +.. bpo: 41142 +.. date: 2020-06-28-12-40-41 +.. nonce: jpZzzh +.. section: Windows +:mod:`!msilib` now supports creating CAB files with non-ASCII file path and +adding files with non-ASCII file path to them. +.. +.. bpo: 41074 +.. date: 2020-06-24-21-30-42 +.. nonce: gaQc3C +.. section: Windows +Fixed support of non-ASCII names in functions :func:`!msilib.OpenDatabase` +and :func:`!msilib.init_database` and non-ASCII SQL in method +:meth:`!msilib.Database.OpenView`. +.. +.. bpo: 41039 +.. date: 2020-06-23-03-12-57 +.. nonce: 0hgd0s +.. section: Windows +Stable ABI redirection DLL (python3.dll) now uses ``#pragma +comment(linker)`` for re-exporting. +.. +.. bpo: 40164 +.. date: 2020-06-12-13-13-44 +.. nonce: SPrSn5 +.. section: Windows +Updates Windows OpenSSL to 1.1.1g +.. +.. bpo: 39631 +.. date: 2020-05-19-14-43-33 +.. nonce: Z5yXam +.. section: Windows +Changes the registered MIME type for ``.py`` files on Windows to +``text/x-python`` instead of ``text/plain``. +.. +.. bpo: 40677 +.. date: 2020-05-19-04-11-12 +.. nonce: qQbLW8 +.. section: Windows +Manually define IO_REPARSE_TAG_APPEXECLINK in case some old Windows SDK +doesn't have it. +.. +.. bpo: 37556 +.. date: 2019-07-11-06-11-09 +.. nonce: sygMUU +.. section: Windows +Extend py.exe help to mention overrides via venv, shebang, environmental +variables & ini files. +.. +.. bpo: 41557 +.. date: 2020-08-26-09-31-37 +.. nonce: mcQ75z +.. section: macOS +Update macOS installer to use SQLite 3.33.0. +.. +.. bpo: 39580 +.. date: 2020-06-25-06-09-00 +.. nonce: N_vJ9h +.. section: macOS +Avoid opening Finder window if running installer from the command line. +Patch contributed by Rick Heil. +.. +.. bpo: 41100 +.. date: 2020-06-24-13-51-57 +.. nonce: mcHdc5 +.. section: macOS +Fix configure error when building on macOS 11. Note that the current Python +release was released shortly after the first developer preview of macOS 11 +(Big Sur); there are other known issues with building and running on the +developer preview. Big Sur is expected to be fully supported in a future +bugfix release of Python 3.8.x and with 3.9.0. +.. +.. bpo: 40741 +.. date: 2020-06-19-14-19-08 +.. nonce: L7yTbm +.. section: macOS +Update macOS installer to use SQLite 3.32.3. +.. +.. bpo: 41005 +.. date: 2020-06-17-13-45-15 +.. nonce: zZegdV +.. section: macOS +fixed an XDG settings issue not allowing macos to open browser in +webbrowser.py +.. +.. bpo: 40741 +.. date: 2020-06-07-20-10-56 +.. nonce: 80A2BW +.. section: macOS +Update macOS installer to use SQLite 3.32.2. +.. +.. bpo: 41775 +.. date: 2020-09-24-14-31-16 +.. nonce: sB8Vre +.. section: IDLE +Use 'IDLE Shell' as shell title +.. +.. bpo: 35764 +.. date: 2020-09-22-11-13-45 +.. nonce: VoNa8y +.. section: IDLE +Rewrite the Calltips doc section. +.. +.. bpo: 40181 +.. date: 2020-09-22-00-45-40 +.. nonce: hhQi3z +.. section: IDLE +In calltips, stop reminding that '/' marks the end of positional-only +arguments. +.. +.. bpo: 41468 +.. date: 2020-08-09-13-42-55 +.. nonce: zkP0_Y +.. section: IDLE +Improve IDLE run crash error message (which users should never see). +.. +.. bpo: 41373 +.. date: 2020-07-24-17-49-58 +.. nonce: YQIPu_ +.. section: IDLE +Save files loaded with no line ending, as when blank, or different line +endings, by setting its line ending to the system default. Fix regression in +3.8.4 and 3.9.0b4. +.. +.. bpo: 41300 +.. date: 2020-07-16-17-39-06 +.. nonce: wRixNb +.. section: IDLE +Save files with non-ascii chars. Fix regression released in 3.9.0b4 and +3.8.4. +.. +.. bpo: 37765 +.. date: 2020-07-07-18-44-30 +.. nonce: umc1o8 +.. section: IDLE +Add keywords to module name completion list. Rewrite Completions section of +IDLE doc. +.. +.. bpo: 41152 +.. date: 2020-06-29-14-51-15 +.. nonce: d6mV0C +.. section: IDLE +The encoding of ``stdin``, ``stdout`` and ``stderr`` in IDLE is now always +UTF-8. +.. +.. bpo: 41144 +.. date: 2020-06-27-17-02-00 +.. nonce: JoFGIX +.. section: IDLE +Make Open Module open a special module such as os.path. +.. +.. bpo: 39885 +.. date: 2020-05-29-18-21-58 +.. nonce: zB_-bN +.. section: IDLE +Make context menu Cut and Copy work again when right-clicking within a +selection. +.. +.. bpo: 40723 +.. date: 2020-05-24-06-19-43 +.. nonce: AJLd4U +.. section: IDLE +Make test_idle pass when run after import. +.. +.. bpo: 41936 +.. date: 2020-10-05-01-25-23 +.. nonce: 1gb5ra +.. section: C API +Removed undocumented macros ``Py_ALLOW_RECURSION`` and +``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the +:c:type:`PyInterpreterState` structure. +.. +.. bpo: 41692 +.. date: 2020-10-02-00-57-34 +.. nonce: fDScsF +.. section: C API +The ``PyUnicode_InternImmortal()`` function is now deprecated and will be +removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. Patch +by Victor Stinner. +.. +.. bpo: 41842 +.. date: 2020-09-27-20-43-16 +.. nonce: bCakAj +.. section: C API +Add :c:func:`PyCodec_Unregister` function to unregister a codec search +function. +.. +.. bpo: 41834 +.. date: 2020-09-22-14-47-12 +.. nonce: nrOrDU +.. section: C API +Remove the ``_Py_CheckRecursionLimit`` variable: it has been replaced by +``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` structure. +Patch by Victor Stinner. +.. +.. bpo: 41689 +.. date: 2020-09-01-23-39-45 +.. nonce: zxHbLB +.. section: C API +Types created with :c:func:`PyType_FromSpec` now make any signature in their +``tp_doc`` slot accessible from ``__text_signature__``. +.. +.. bpo: 41524 +.. date: 2020-08-12-17-09-06 +.. nonce: u6Xfr2 +.. section: C API +Fix bug in :c:func:`PyOS_mystrnicmp` and :c:func:`PyOS_mystricmp` that +incremented pointers beyond the end of a string. +.. +.. bpo: 41324 +.. date: 2020-08-10-16-05-08 +.. nonce: waZD35 +.. section: C API +Add a minimal decimal capsule API. The API supports fast conversions +between Decimals up to 38 digits and their triple representation as a C +struct. +.. +.. bpo: 30155 +.. date: 2020-07-26-19-39-45 +.. nonce: rHZRJ_ +.. section: C API +Add :c:func:`PyDateTime_DATE_GET_TZINFO` and +:c:func:`PyDateTime_TIME_GET_TZINFO` macros for accessing the ``tzinfo`` +attributes of :class:`datetime.datetime` and :class:`datetime.time` objects. +.. +.. bpo: 40170 +.. date: 2020-07-08-10-14-52 +.. nonce: N6Qx1i +.. section: C API +Revert :c:func:`PyType_HasFeature` change: it reads again directly the +:c:member:`PyTypeObject.tp_flags` member when the limited C API is not used, +rather than always calling :c:func:`PyType_GetFlags` which hides +implementation details. +.. +.. bpo: 41123 +.. date: 2020-06-29-15-49-36 +.. nonce: wYY4E1 +.. section: C API +Remove ``PyUnicode_AsUnicodeCopy``. +.. +.. bpo: 41123 +.. date: 2020-06-29-11-33-49 +.. nonce: qFevek +.. section: C API +Removed ``PyLong_FromUnicode()``. +.. +.. bpo: 41123 +.. date: 2020-06-28-11-39-22 +.. nonce: sjJWjQ +.. section: C API +Removed ``PyUnicode_GetMax()``. +.. +.. bpo: 41123 +.. date: 2020-06-26-13-29-25 +.. nonce: bRa1oy +.. section: C API +Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. +.. +.. bpo: 41103 +.. date: 2020-06-24-22-57-07 +.. nonce: doojgE +.. section: C API +``PyObject_AsCharBuffer()``, ``PyObject_AsReadBuffer()``, +``PyObject_CheckReadBuffer()``, and ``PyObject_AsWriteBuffer()`` are +removed. Please migrate to new buffer protocol; :c:func:`PyObject_GetBuffer` +and :c:func:`PyBuffer_Release`. +.. +.. bpo: 36346 +.. date: 2020-06-17-20-31-12 +.. nonce: mwIyxi +.. section: C API +Raises DeprecationWarning for ``PyUnicode_FromUnicode(NULL, size)`` and +``PyUnicode_FromStringAndSize(NULL, size)`` with ``size > 0``. +.. +.. bpo: 36346 +.. date: 2020-06-17-11-24-00 +.. nonce: fTMr3S +.. section: C API +Mark ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, ``PyUnicode_WSTR_LENGTH``, +``PyUnicode_FromUnicode``, ``PyUnicode_AsUnicode``, and +``PyUnicode_AsUnicodeAndSize`` as deprecated in C. Remove +``Py_UNICODE_MATCH`` which was deprecated and broken since Python 3.3. +.. +.. bpo: 40989 +.. date: 2020-06-15-23-17-51 +.. nonce: tlzG3r +.. section: C API +The :c:func:`PyObject_INIT` and :c:func:`PyObject_INIT_VAR` macros become +aliases to, respectively, :c:func:`PyObject_Init` and +:c:func:`PyObject_InitVar` functions. +.. +.. bpo: 36020 +.. date: 2020-06-15-16-46-01 +.. nonce: djI6jw +.. section: C API +On Windows, ``#include "pyerrors.h"`` no longer defines ``snprintf`` and +``vsnprintf`` macros. +.. +.. bpo: 40943 +.. date: 2020-06-10-18-37-26 +.. nonce: i4q7rK +.. section: C API +The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use +:c:func:`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use +``#``: ``es#``, ``et#``, ``s#``, ``u#``, ``y#``, ``z#``, ``U#`` and ``Z#``. +See :ref:`Parsing arguments and building values ` and the +:pep:`353`. +.. +.. bpo: 40910 +.. date: 2020-06-08-15-59-06 +.. nonce: L56oI0 +.. section: C API +Export explicitly the :c:func:`Py_GetArgcArgv` function to the C API and +document the function. Previously, it was exported implicitly which no +longer works since Python is built with ``-fvisibility=hidden``. +.. +.. bpo: 40724 +.. date: 2020-06-04-08-01-23 +.. nonce: qIIdSi +.. section: C API +Allow defining buffer slots in type specs. +.. +.. bpo: 40679 +.. date: 2020-06-03-17-48-13 +.. nonce: 3sgWma +.. section: C API +Fix a ``_PyEval_EvalCode()`` crash if *qualname* argument is NULL. +.. +.. bpo: 40839 +.. date: 2020-06-01-20-47-49 +.. nonce: bAi52Z +.. section: C API +Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed +for historical reason. It is no longer allowed. +.. +.. bpo: 40826 +.. date: 2020-06-01-16-12-37 +.. nonce: zQzFoK +.. section: C API +:c:func:`PyOS_InterruptOccurred` now fails with a fatal error if it is +called with the GIL released. +.. +.. bpo: 40792 +.. date: 2020-05-27-11-02-15 +.. nonce: pBw2Bb +.. section: C API +The result of :c:func:`PyNumber_Index` now always has exact type +:class:`int`. Previously, the result could have been an instance of a +subclass of ``int``. +.. +.. bpo: 39573 +.. date: 2020-05-26-16-21-47 +.. nonce: depAgq +.. section: C API +Convert :c:func:`Py_REFCNT` and :c:func:`Py_SIZE` macros to static inline +functions. They cannot be used as l-value anymore: use +:c:func:`Py_SET_REFCNT` and :c:func:`Py_SET_SIZE` to set an object reference +count and size. This change is backward incompatible on purpose, to prepare +the C API for an opaque :c:type:`PyObject` structure. +.. +.. bpo: 40703 +.. date: 2020-05-20-19-11-12 +.. nonce: qQXfW8 +.. section: C API +The PyType_FromSpec*() functions no longer overwrite the type's "__module__" +attribute if it is set via "Py_tp_members" or "Py_tp_getset". +.. +.. bpo: 39583 +.. date: 2020-02-08-08-01-35 +.. nonce: qURKSl +.. section: C API +Remove superfluous "extern C" declarations from ``Include/cpython/*.h``. + +.. bpo: 24667 +.. date: 9288 +.. nonce: tdwszf +.. release date: 2015-08-09 +.. section: Core and Builtins +Resize odict in all cases that the underlying dict resizes. +.. +.. bpo: 24824 +.. date: 9287 +.. nonce: Eoc4lq +.. section: Library +Signatures of codecs.encode() and codecs.decode() now are compatible with +pydoc. +.. +.. bpo: 24634 +.. date: 9286 +.. nonce: 7bnVgr +.. section: Library +Importing uuid should not try to load libc on Windows +.. +.. bpo: 24798 +.. date: 9285 +.. nonce: zDXL5R +.. section: Library +_msvccompiler.py doesn't properly support manifests +.. +.. bpo: 4395 +.. date: 9284 +.. nonce: JpT0k7 +.. section: Library +Better testing and documentation of binary operators. Patch by Martin +Panter. +.. +.. bpo: 23973 +.. date: 9283 +.. nonce: wT59Vh +.. section: Library +Update typing.py from GitHub repo. +.. +.. bpo: 23004 +.. date: 9282 +.. nonce: xswcPm +.. section: Library +mock_open() now reads binary data correctly when the type of read_data is +bytes. Initial patch by Aaron Hill. +.. +.. bpo: 23888 +.. date: 9281 +.. nonce: 7gw4oO +.. section: Library +Handle fractional time in cookie expiry. Patch by ssh. +.. +.. bpo: 23652 +.. date: 9280 +.. nonce: DKQ_7t +.. section: Library +Make it possible to compile the select module against the libc headers from +the Linux Standard Base, which do not include some EPOLL macros. Patch by +Matt Frank. +.. +.. bpo: 22932 +.. date: 9279 +.. nonce: mPclSJ +.. section: Library +Fix timezones in email.utils.formatdate. Patch from Dmitry Shachnev. +.. +.. bpo: 23779 +.. date: 9278 +.. nonce: ET4JJP +.. section: Library +imaplib raises TypeError if authenticator tries to abort. Patch from Craig +Holmquist. +.. +.. bpo: 23319 +.. date: 9277 +.. nonce: FXyUH- +.. section: Library +Fix ctypes.BigEndianStructure, swap correctly bytes. Patch written by +Matthieu Gautier. +.. +.. bpo: 23254 +.. date: 9276 +.. nonce: zNiy1X +.. section: Library +Document how to close the TCPServer listening socket. Patch from Martin +Panter. +.. +.. bpo: 19450 +.. date: 9275 +.. nonce: VG7T-L +.. section: Library +Update Windows and OS X installer builds to use SQLite 3.8.11. +.. +.. bpo: 17527 +.. date: 9274 +.. nonce: ve9fyw +.. section: Library +Add PATCH to wsgiref.validator. Patch from Luca Sbardella. +.. +.. bpo: 24791 +.. date: 9273 +.. nonce: Ok-3nA +.. section: Library +Fix grammar regression for call syntax: 'g(\*a or b)'. +.. +.. bpo: 23672 +.. date: 9272 +.. nonce: 8td2se +.. section: IDLE +Allow Idle to edit and run files with astral chars in name. Patch by Mohd +Sanad Zaki Rizvi. +.. +.. bpo: 24745 +.. date: 9271 +.. nonce: edbziT +.. section: IDLE +Idle editor default font. Switch from Courier to platform-sensitive +TkFixedFont. This should not affect current customized font selections. If +there is a problem, edit $HOME/.idlerc/config-main.cfg and remove ':samp:`font{xxx}`' +entries from [Editor Window]. Patch by Mark Roseman. +.. +.. bpo: 21192 +.. date: 9270 +.. nonce: CdbipH +.. section: IDLE +Idle editor. When a file is run, put its name in the restart bar. Do not +print false prompts. Original patch by Adnan Umer. +.. +.. bpo: 13884 +.. date: 9269 +.. nonce: vVcO1E +.. section: IDLE +Idle menus. Remove tearoff lines. Patch by Roger Serwy. +.. +.. bpo: 24129 +.. date: 9268 +.. nonce: Imr54z +.. section: Documentation +Clarify the reference documentation for name resolution. This includes +removing the assumption that readers will be familiar with the name +resolution scheme Python used prior to the introduction of lexical scoping +for function namespaces. Patch by Ivan Levkivskyi. +.. +.. bpo: 20769 +.. date: 9267 +.. nonce: ZUc9z9 +.. section: Documentation +Improve reload() docs. Patch by Dorian Pula. +.. +.. bpo: 23589 +.. date: 9266 +.. nonce: rjU421 +.. section: Documentation +Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan. +.. +.. bpo: 24729 +.. date: 9265 +.. nonce: PH3A9p +.. section: Documentation +Correct IO tutorial to match implementation regarding encoding parameter to +open function. +.. +.. bpo: 24751 +.. date: 9264 +.. nonce: pL2pbj +.. section: Tests +When running regrtest with the ``-w`` command line option, a test run is no +longer marked as a failure if all tests succeed when re-run. + +.. bpo: 29781 +.. date: 2017-09-05-15-26-30 +.. nonce: LwYtBP +.. release date: 2017-09-18 +.. section: Security +SSLObject.version() now correctly returns None when handshake over BIO has +not been performed yet. +.. +.. bpo: 30947 +.. date: 2017-08-16-16-35-59 +.. nonce: iNMmm4 +.. section: Security +Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to get security +fixes. +.. +.. bpo: 31471 +.. date: 2017-09-14-19-47-57 +.. nonce: 0yiA5Q +.. section: Core and Builtins +Fix an assertion failure in ``subprocess.Popen()`` on Windows, in case the env +argument has a bad ``keys()`` method. Patch by Oren Milman. +.. +.. bpo: 31418 +.. date: 2017-09-13-13-03-52 +.. nonce: rS-FlC +.. section: Core and Builtins +Fix an assertion failure in ``PyErr_WriteUnraisable()`` in case of an +exception with a bad ``__module__`` attribute. Patch by Oren Milman. +.. +.. bpo: 31416 +.. date: 2017-09-11-12-54-35 +.. nonce: 2hlQFd +.. section: Core and Builtins +Fix assertion failures in case of a bad warnings.filters or +warnings.defaultaction. Patch by Oren Milman. +.. +.. bpo: 31411 +.. date: 2017-09-11-08-50-41 +.. nonce: HZz82I +.. section: Core and Builtins +Raise a TypeError instead of SystemError in case warnings.onceregistry is +not a dictionary. Patch by Oren Milman. +.. +.. bpo: 31373 +.. date: 2017-09-06-15-25-59 +.. nonce: dC4jd4 +.. section: Core and Builtins +Fix several possible instances of undefined behavior due to floating-point +demotions. +.. +.. bpo: 30465 +.. date: 2017-09-06-10-47-29 +.. nonce: oe-3GD +.. section: Core and Builtins +Location information (``lineno`` and ``col_offset``) in f-strings is now +(mostly) correct. This fixes tools like flake8 from showing warnings on the +wrong line (typically the first line of the file). +.. +.. bpo: 31343 +.. date: 2017-09-04-14-57-27 +.. nonce: Kl_fS5 +.. section: Core and Builtins +Include sys/sysmacros.h for major(), minor(), and makedev(). GNU C library +plans to remove the functions from sys/types.h. +.. +.. bpo: 31291 +.. date: 2017-08-28-11-51-29 +.. nonce: t8QggK +.. section: Core and Builtins +Fix an assertion failure in ``zipimport.zipimporter.get_data`` on Windows, +when the return value of ``pathname.replace('/','\\')`` isn't a string. +Patch by Oren Milman. +.. +.. bpo: 31271 +.. date: 2017-08-25-20-43-22 +.. nonce: YMduKF +.. section: Core and Builtins +Fix an assertion failure in the ``write()`` method of ``io.TextIOWrapper``, when +the encoder doesn't return a bytes object. Patch by Oren Milman. +.. +.. bpo: 31243 +.. date: 2017-08-24-13-34-49 +.. nonce: dRJzqR +.. section: Core and Builtins +Fix a crash in some methods of ``io.TextIOWrapper``, when the decoder's state +is invalid. Patch by Oren Milman. +.. +.. bpo: 30721 +.. date: 2017-08-18-15-15-20 +.. nonce: Hmc56z +.. section: Core and Builtins +``print`` now shows correct usage hint for using Python 2 redirection +syntax. Patch by Sanyam Khurana. +.. +.. bpo: 31070 +.. date: 2017-08-09-09-40-54 +.. nonce: oDyLiI +.. section: Core and Builtins +Fix a race condition in importlib _get_module_lock(). +.. +.. bpo: 31095 +.. date: 2017-08-01-18-48-30 +.. nonce: bXWZDb +.. section: Core and Builtins +Fix potential crash during GC caused by ``tp_dealloc`` which doesn't call +``PyObject_GC_UnTrack()``. +.. +.. bpo: 31071 +.. date: 2017-07-31-13-28-53 +.. nonce: P9UBDy +.. section: Core and Builtins +Avoid masking original TypeError in call with * unpacking when other +arguments are passed. +.. +.. bpo: 30978 +.. date: 2017-07-21-07-39-05 +.. nonce: f0jODc +.. section: Core and Builtins +str.format_map() now passes key lookup exceptions through. Previously any +exception was replaced with a KeyError exception. +.. +.. bpo: 30808 +.. date: 2017-07-17-12-12-59 +.. nonce: bA3zOv +.. section: Core and Builtins +Use _Py_atomic API for concurrency-sensitive signal state. +.. +.. bpo: 30876 +.. date: 2017-07-11-06-31-32 +.. nonce: x35jZX +.. section: Core and Builtins +Relative import from unloaded package now reimports the package instead of +failing with SystemError. Relative import from non-package now fails with +ImportError rather than SystemError. +.. +.. bpo: 30703 +.. date: 2017-06-28-21-07-32 +.. nonce: ULCdFp +.. section: Core and Builtins +Improve signal delivery. +Avoid using Py_AddPendingCall from signal handler, to avoid calling +signal-unsafe functions. The tests I'm adding here fail without the rest of +the patch, on Linux and OS X. This means our signal delivery logic had +defects (some signals could be lost). +.. +.. bpo: 30765 +.. date: 2017-06-26-14-29-50 +.. nonce: Q5iBmf +.. section: Core and Builtins +Avoid blocking in pthread_mutex_lock() when PyThread_acquire_lock() is asked +not to block. +.. +.. bpo: 31161 +.. date: 06 +.. nonce: FcUAA0 +.. section: Core and Builtins +Make sure the 'Missing parentheses' syntax error message is only applied to +SyntaxError, not to subclasses. Patch by Martijn Pieters. +.. +.. bpo: 30814 +.. date: 05 +.. nonce: HcYsfM +.. section: Core and Builtins +Fixed a race condition when import a submodule from a package. +.. +.. bpo: 30597 +.. date: 04 +.. nonce: 7erHiP +.. section: Core and Builtins +``print`` now shows expected input in custom error message when used as a +Python 2 statement. Patch by Sanyam Khurana. +.. +.. bpo: 31499 +.. date: 2017-09-18-10-57-04 +.. nonce: BydYhf +.. section: Library +xml.etree: Fix a crash when a parser is part of a reference cycle. +.. +.. bpo: 28556 +.. date: 2017-09-14-11-02-56 +.. nonce: EUOiYs +.. section: Library +typing.get_type_hints now finds the right globalns for classes and modules +by default (when no ``globalns`` was specified by the caller). +.. +.. bpo: 28556 +.. date: 2017-09-13-23-27-39 +.. nonce: UmTQvv +.. section: Library +Speed improvements to the ``typing`` module. Original PRs by Ivan +Levkivskyi and Mitar. +.. +.. bpo: 31544 +.. date: 2017-09-13-19-55-35 +.. nonce: beTh6t +.. section: Library +The C accelerator module of ElementTree ignored exceptions raised when +looking up TreeBuilder target methods in XMLParser(). +.. +.. bpo: 31234 +.. date: 2017-09-13-18-05-56 +.. nonce: lGkcPg +.. section: Library +socket.create_connection() now fixes manually a reference cycle: clear the +variable storing the last exception on success. +.. +.. bpo: 31457 +.. date: 2017-09-13-13-33-39 +.. nonce: bIVBtI +.. section: Library +LoggerAdapter objects can now be nested. +.. +.. bpo: 31400 +.. date: 2017-09-08-14-19-57 +.. nonce: YOTPKi +.. section: Library +Improves SSL error handling to avoid losing error numbers. +.. +.. bpo: 28958 +.. date: 2017-09-06-19-41-01 +.. nonce: x4-K5F +.. section: Library +ssl.SSLContext() now uses OpenSSL error information when a context cannot be +instantiated. +.. +.. bpo: 27340 +.. date: 2017-09-06-06-50-41 +.. nonce: GgekV5 +.. section: Library +SSLSocket.sendall() now uses memoryview to create slices of data. This fixes +support for all bytes-like object. It is also more efficient and avoids +costly copies. +.. +.. bpo: 31178 +.. date: 2017-09-05-14-55-28 +.. nonce: JrSFo7 +.. section: Library +Fix string concatenation bug in rare error path in the subprocess module +.. +.. bpo: 31350 +.. date: 2017-09-05-10-30-48 +.. nonce: dXJ-7N +.. section: Library +Micro-optimize :func:`asyncio._get_running_loop` to become up to 10% faster. +.. +.. bpo: 31170 +.. date: 2017-09-04-23-41-35 +.. nonce: QGmJ1t +.. section: Library +expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of partial +characters for UTF-8 input (libexpat bug 115): +https://github.com/libexpat/libexpat/issues/115 +.. +.. bpo: 29136 +.. date: 2017-09-04-16-39-49 +.. nonce: vSn1oR +.. section: Library +Add TLS 1.3 cipher suites and OP_NO_TLSv1_3. +.. +.. bpo: 29212 +.. date: 2017-09-03-14-31-00 +.. nonce: bicycl +.. section: Library +Fix concurrent.futures.thread.ThreadPoolExecutor threads to have a non +repr() based thread name by default when no thread_name_prefix is supplied. +They will now identify themselves as "ThreadPoolExecutor-y_n". +.. +.. bpo: 9146 +.. date: 2017-09-03-14-10-00 +.. nonce: _-oo-_ +.. section: Library +Fix a segmentation fault in _hashopenssl when standard hash functions such +as md5 are not available in the linked OpenSSL library. As in some special +FIPS-140 build environments. +.. +.. bpo: 27144 +.. date: 2017-08-30-11-26-14 +.. nonce: PEDJsE +.. section: Library +The ``map()`` and ``as_completed()`` iterators in ``concurrent.futures`` now +avoid keeping a reference to yielded objects. +.. +.. bpo: 10746 +.. date: 2017-08-28-13-01-05 +.. nonce: nmAvfu +.. section: Library +Fix ctypes producing wrong :pep:`3118` type codes for integer types. +.. +.. bpo: 22536 +.. date: 2017-08-23 +.. nonce: _narf_ +.. section: Library +The subprocess module now sets the filename when FileNotFoundError is raised +on POSIX systems due to the executable or cwd not being found. +.. +.. bpo: 31249 +.. date: 2017-08-22-12-44-48 +.. nonce: STPbb9 +.. section: Library +concurrent.futures: WorkItem.run() used by ThreadPoolExecutor now breaks a +reference cycle between an exception object and the WorkItem object. +.. +.. bpo: 31247 +.. date: 2017-08-21-17-50-27 +.. nonce: 8S3zJp +.. section: Library +xmlrpc.server now explicitly breaks reference cycles when using +sys.exc_info() in code handling exceptions. +.. +.. bpo: 30102 +.. date: 2017-08-16-21-14-31 +.. nonce: 1sPqmc +.. section: Library +The ssl and hashlib modules now call OPENSSL_add_all_algorithms_noconf() on +OpenSSL < 1.1.0. The function detects CPU features and enables optimizations +on some CPU architectures such as POWER8. Patch is based on research from +Gustavo Serra Scalet. +.. +.. bpo: 31185 +.. date: 2017-08-11-19-30-00 +.. nonce: i6TPgL +.. section: Library +Fixed miscellaneous errors in asyncio speedup module. +.. +.. bpo: 31135 +.. date: 2017-08-08-14-44-37 +.. nonce: HH94xR +.. section: Library +ttk: fix the destroy() method of LabeledScale and OptionMenu classes. Call +the parent destroy() method even if the used attribute doesn't exist. The +LabeledScale.destroy() method now also explicitly clears label and scale +attributes to help the garbage collector to destroy all widgets. +.. +.. bpo: 31107 +.. date: 2017-08-02-12-48-15 +.. nonce: 1t2hn5 +.. section: Library +Fix ``copyreg._slotnames()`` mangled attribute calculation for classes whose +name begins with an underscore. Patch by Shane Harvey. +.. +.. bpo: 31061 +.. date: 2017-08-01-09-32-58 +.. nonce: husAYX +.. section: Library +Fixed a crash when using asyncio and threads. +.. +.. bpo: 30502 +.. date: 2017-07-27-11-33-58 +.. nonce: GJlfU8 +.. section: Library +Fix handling of long oids in ssl. Based on patch by Christian Heimes. +.. +.. bpo: 30119 +.. date: 2017-07-26-15-15-00 +.. nonce: DZ6C_S +.. section: Library +ftplib.FTP.putline() now throws ValueError on commands that contains CR or +LF. Patch by Donghee Na. +.. +.. bpo: 30595 +.. date: 2017-07-26-04-46-12 +.. nonce: -zJ7d8 +.. section: Library +multiprocessing.Queue.get() with a timeout now polls its reader in +non-blocking mode if it succeeded to acquire the lock but the acquire took +longer than the timeout. +.. +.. bpo: 29403 +.. date: 2017-07-20-02-29-49 +.. nonce: 3RinCV +.. section: Library +Fix ``unittest.mock``'s autospec to not fail on method-bound builtin +functions. Patch by Aaron Gallagher. +.. +.. bpo: 30961 +.. date: 2017-07-18-23-47-51 +.. nonce: 064jz0 +.. section: Library +Fix decrementing a borrowed reference in tracemalloc. +.. +.. bpo: 25684 +.. date: 2017-07-17-11-35-00 +.. nonce: usELVx +.. section: Library +Change ``ttk.OptionMenu`` radiobuttons to be unique across instances of +``OptionMenu``. +.. +.. bpo: 30886 +.. date: 2017-07-10-12-14-22 +.. nonce: nqQj34 +.. section: Library +Fix multiprocessing.Queue.join_thread(): it now waits until the thread +completes, even if the thread was started by the same process which created +the queue. +.. +.. bpo: 29854 +.. date: 2017-07-07-02-18-57 +.. nonce: J8wKb_ +.. section: Library +Fix segfault in readline when using readline's history-size option. Patch +by Nir Soffer. +.. +.. bpo: 30319 +.. date: 2017-07-04-13-48-21 +.. nonce: hg_3TX +.. section: Library +socket.close() now ignores ECONNRESET error. +.. +.. bpo: 30828 +.. date: 2017-07-04-13-10-52 +.. nonce: CLvEvV +.. section: Library +Fix out of bounds write in ``asyncio.CFuture.remove_done_callback()``. +.. +.. bpo: 30807 +.. date: 2017-06-29-22-04-44 +.. nonce: sLtjY- +.. section: Library +signal.setitimer() may disable the timer when passed a tiny value. +Tiny values (such as 1e-6) are valid non-zero values for setitimer(), which +is specified as taking microsecond-resolution intervals. However, on some +platform, our conversion routine could convert 1e-6 into a zero interval, +therefore disabling the timer instead of (re-)scheduling it. +.. +.. bpo: 30441 +.. date: 2017-06-29-14-25-14 +.. nonce: 3Wh9kc +.. section: Library +Fix bug when modifying os.environ while iterating over it +.. +.. bpo: 30532 +.. date: 2017-06-26-11-01-59 +.. nonce: qTeL1o +.. section: Library +Fix email header value parser dropping folding white space in certain cases. +.. +.. bpo: 30879 +.. date: 03 +.. nonce: N3KI-o +.. section: Library +os.listdir() and os.scandir() now emit bytes names when called with +bytes-like argument. +.. +.. bpo: 30746 +.. date: 02 +.. nonce: 7drQI0 +.. section: Library +Prohibited the '=' character in environment variable names in +``os.putenv()`` and ``os.spawn*()``. +.. +.. bpo: 29755 +.. date: 01 +.. nonce: diQcY_ +.. section: Library +Fixed the lgettext() family of functions in the gettext module. They now +always return bytes. +.. +.. bpo: 31294 +.. date: 2017-09-07-20-49-09 +.. nonce: WgI18w +.. section: Documentation +Fix incomplete code snippet in the ZeroMQSocketListener and +ZeroMQSocketHandler examples and adapt them to Python 3. +.. +.. bpo: 21649 +.. date: 2017-09-06-10-11-57 +.. nonce: EUvqA9 +.. section: Documentation +Add RFC 7525 and Mozilla server side TLS links to SSL documentation. +.. +.. bpo: 30803 +.. date: 2017-07-29-14-55-50 +.. nonce: 6hutqQ +.. section: Documentation +Clarify doc on truth value testing. Original patch by Peter Thomassen. +.. +.. bpo: 31320 +.. date: 2017-09-05-14-23-35 +.. nonce: JRDHx7 +.. section: Tests +Silence traceback in test_ssl +.. +.. bpo: 25674 +.. date: 2017-09-04-13-03-55 +.. nonce: whVTXh +.. section: Tests +Remove sha256.tbs-internet.com ssl test +.. +.. bpo: 30715 +.. date: 2017-07-25-15-27-44 +.. nonce: Sp7bTF +.. section: Tests +Address ALPN callback changes for OpenSSL 1.1.0f. The latest version behaves +like OpenSSL 1.0.2 and no longer aborts handshake. +.. +.. bpo: 30822 +.. date: 2017-07-20-14-29-54 +.. nonce: X0wREo +.. section: Tests +regrtest: Exclude tzdata from regrtest --all. When running the test suite +using --use=all / -u all, exclude tzdata since it makes test_datetime too +slow (15-20 min on some buildbots) which then times out on some buildbots. +Fix also regrtest command line parser to allow passing -u extralargefile to +run test_zipfile64. +.. +.. bpo: 30854 +.. date: 2017-07-05-16-54-59 +.. nonce: sPADRI +.. section: Build +Fix compile error when compiling --without-threads. Patch by Masayuki +Yamamoto. +.. +.. bpo: 30389 +.. date: 2017-09-06-17-14-54 +.. nonce: 9Dizrx +.. section: Windows +Adds detection of Visual Studio 2017 to distutils on Windows. +.. +.. bpo: 31340 +.. date: 2017-09-04-13-19-05 +.. nonce: MbkzLi +.. section: Windows +Change to building with MSVC v141 (included with Visual Studio 2017) +.. +.. bpo: 30581 +.. date: 2017-08-04-10-05-19 +.. nonce: OQhR7l +.. section: Windows +os.cpu_count() now returns the correct number of processors on Windows when +the number of logical processors is greater than 64. +.. +.. bpo: 30731 +.. date: 2017-07-13-11-22-53 +.. nonce: nmMDwI +.. section: Windows +Add a missing xmlns to python.manifest so that it matches the schema. +.. +.. bpo: 31493 +.. date: 2017-09-16-23-43-39 +.. nonce: nmHMCR +.. section: IDLE +IDLE code context -- fix code update and font update timers. +Canceling timers prevents a warning message when test_idle completes. +.. +.. bpo: 31488 +.. date: 2017-09-16-01-21-20 +.. nonce: 0rtXIT +.. section: IDLE +IDLE - Update non-key options in former extension classes. When applying +configdialog changes, call .reload for each feature class. Change ParenMatch +so updated options affect existing instances attached to existing editor +windows. +.. +.. bpo: 31477 +.. date: 2017-09-15-12-38-47 +.. nonce: n__6sa +.. section: IDLE +IDLE - Improve rstrip entry in doc. Strip trailing whitespace strips more +than blank spaces. Multiline string literals are not skipped. +.. +.. bpo: 31480 +.. date: 2017-09-14-17-53-53 +.. nonce: 4WJ0pl +.. section: IDLE +IDLE - make tests pass with zzdummy extension disabled by default. +.. +.. bpo: 31421 +.. date: 2017-09-12-08-38-27 +.. nonce: mYfQNq +.. section: IDLE +Document how IDLE runs tkinter programs. IDLE calls tcl/tk update in the +background in order to make live +interaction and experimentation with tkinter applications much easier. +.. +.. bpo: 31414 +.. date: 2017-09-11-15-46-05 +.. nonce: wiepgK +.. section: IDLE +IDLE -- fix tk entry box tests by deleting first. Adding to an int entry is +not the same as deleting and inserting because int('') will fail. +.. +.. bpo: 31051 +.. date: 2017-08-30-00-06-58 +.. nonce: 50Jp_Q +.. section: IDLE +Rearrange IDLE configdialog GenPage into Window, Editor, and Help sections. +.. +.. bpo: 30617 +.. date: 2017-08-27-16-49-36 +.. nonce: UHnswr +.. section: IDLE +IDLE - Add docstrings and tests for outwin subclass of editor. +Move some data and functions from the class to module level. Patch by Cheryl +Sabella. +.. +.. bpo: 31287 +.. date: 2017-08-27-15-31-33 +.. nonce: aZERfI +.. section: IDLE +IDLE - Do not modify tkinter.message in test_configdialog. +.. +.. bpo: 27099 +.. date: 2017-08-24-13-48-16 +.. nonce: rENefC +.. section: IDLE +Convert IDLE's built-in 'extensions' to regular features. +About 10 IDLE features were implemented as supposedly optional extensions. +Their different behavior could be confusing or worse for users and not good +for maintenance. Hence the conversion. +The main difference for users is that user configurable key bindings for +builtin features are now handled uniformly. Now, editing a binding in a +keyset only affects its value in the keyset. All bindings are defined +together in the system-specific default keysets in config-extensions.def. +All custom keysets are saved as a whole in config-extension.cfg. All take +effect as soon as one clicks Apply or Ok. +The affected events are '<>', '<>', +'<>', '<>', '<>', +'<>', '<>', and '<>'. Any (global) +customizations made before 3.6.3 will not affect their keyset-specific +customization after 3.6.3. and vice versa. +Initial patch by Charles Wohlganger. +.. +.. bpo: 31206 +.. date: 2017-08-18-14-13-42 +.. nonce: F1-tKK +.. section: IDLE +IDLE: Factor HighPage(Frame) class from ConfigDialog. Patch by Cheryl +Sabella. +.. +.. bpo: 31001 +.. date: 2017-08-17-15-00-20 +.. nonce: KLxYHC +.. section: IDLE +Add tests for configdialog highlight tab. Patch by Cheryl Sabella. +.. +.. bpo: 31205 +.. date: 2017-08-15-12-58-23 +.. nonce: iuziZ5 +.. section: IDLE +IDLE: Factor KeysPage(Frame) class from ConfigDialog. The slightly modified +tests continue to pass. Patch by Cheryl Sabella. +.. +.. bpo: 31130 +.. date: 2017-08-07-14-02-56 +.. nonce: FbsC7f +.. section: IDLE +IDLE -- stop leaks in test_configdialog. Initial patch by Victor Stinner. +.. +.. bpo: 31002 +.. date: 2017-08-03-17-54-02 +.. nonce: kUSgTE +.. section: IDLE +Add tests for configdialog keys tab. Patch by Cheryl Sabella. +.. +.. bpo: 19903 +.. date: 2017-08-03-14-08-42 +.. nonce: sqE1FS +.. section: IDLE +IDLE: Calltips use ``inspect.signature`` instead of ``inspect.getfullargspec``. +This improves calltips for builtins converted to use Argument Clinic. Patch +by Louie Lu. +.. +.. bpo: 31083 +.. date: 2017-07-31-23-20-51 +.. nonce: 991FXm +.. section: IDLE +IDLE - Add an outline of a TabPage class in configdialog. Update existing +classes to match outline. Initial patch by Cheryl Sabella. +.. +.. bpo: 31050 +.. date: 2017-07-30-17-39-59 +.. nonce: AXR3kP +.. section: IDLE +Factor GenPage(Frame) class from ConfigDialog. The slightly modified tests +continue to pass. Patch by Cheryl Sabella. +.. +.. bpo: 31004 +.. date: 2017-07-30-01-00-58 +.. nonce: m8cc1t +.. section: IDLE +IDLE - Factor FontPage(Frame) class from ConfigDialog. +Slightly modified tests continue to pass. Fix General tests. Patch mostly by +Cheryl Sabella. +.. +.. bpo: 30781 +.. date: 2017-07-28-18-59-06 +.. nonce: ud5m18 +.. section: IDLE +IDLE - Use ttk widgets in ConfigDialog. Patches by Terry Jan Reedy and +Cheryl Sabella. +.. +.. bpo: 31060 +.. date: 2017-07-27-14-48-42 +.. nonce: GdY_VY +.. section: IDLE +IDLE - Finish rearranging methods of ConfigDialog Grouping methods +pertaining to each tab and the buttons will aid writing tests and improving +the tabs and will enable splitting the groups into classes. +.. +.. bpo: 30853 +.. date: 2017-07-27-10-01-14 +.. nonce: enPvvc +.. section: IDLE +IDLE -- Factor a VarTrace class out of ConfigDialog. +Instance tracers manages pairs consisting of a tk variable and a callback +function. When tracing is turned on, setting the variable calls the +function. Test coverage for the new class is 100%. +.. +.. bpo: 31003 +.. date: 2017-07-25-01-28-35 +.. nonce: bYINVH +.. section: IDLE +IDLE: Add more tests for General tab. +.. +.. bpo: 30993 +.. date: 2017-07-22-18-08-41 +.. nonce: 34vJkB +.. section: IDLE +IDLE - Improve configdialog font page and tests. +In configdialog: Document causal pathways in create_font_tab docstring. +Simplify some attribute names. Move set_samples calls to var_changed_font +(idea from Cheryl Sabella). Move related functions to positions after the +create widgets function. +In test_configdialog: Fix test_font_set so not order dependent. Fix renamed +test_indent_scale so it tests the widget. Adjust tests for movement of +set_samples call. Add tests for load functions. Put all font tests in one +class and tab indent tests in another. Except for two lines, these tests +completely cover the related functions. +.. +.. bpo: 30981 +.. date: 2017-07-21-01-55-14 +.. nonce: ZFvQPt +.. section: IDLE +IDLE -- Add more configdialog font page tests. +.. +.. bpo: 28523 +.. date: 2017-07-21-00-54-52 +.. nonce: OPcqYJ +.. section: IDLE +IDLE: replace 'colour' with 'color' in configdialog. +.. +.. bpo: 30917 +.. date: 2017-07-17-23-35-57 +.. nonce: hSiuuO +.. section: IDLE +Add tests for idlelib.config.IdleConf. Increase coverage from 46% to 96%. +Patch by Louie Lu. +.. +.. bpo: 30934 +.. date: 2017-07-15-22-26-57 +.. nonce: BanuSB +.. section: IDLE +Document coverage details for idlelib tests. +Add section to idlelib/idle-test/README.txt. +Include check that branches are taken both ways. +Exclude IDLE-specific code that does not run during unit tests. +.. +.. bpo: 30913 +.. date: 2017-07-13-23-07-33 +.. nonce: aezn_e +.. section: IDLE +IDLE: Document ConfigDialog tk Vars, methods, and widgets in docstrings This +will facilitate improving the dialog and splitting up the class. Original +patch by Cheryl Sabella. +.. +.. bpo: 30899 +.. date: 2017-07-11-02-26-17 +.. nonce: SQmVO8 +.. section: IDLE +IDLE: Add tests for ConfigParser subclasses in config. Patch by Louie Lu. +.. +.. bpo: 30881 +.. date: 2017-07-11-02-21-42 +.. nonce: 4KAq_9 +.. section: IDLE +IDLE: Add docstrings to browser.py. Patch by Cheryl Sabella. +.. +.. bpo: 30851 +.. date: 2017-07-09-23-53-00 +.. nonce: AHXBYa +.. section: IDLE +IDLE: Remove unused variables in configdialog. One is a duplicate, one is +set but cannot be altered by users. Patch by Cheryl Sabella. +.. +.. bpo: 30870 +.. date: 2017-07-08-17-57-04 +.. nonce: IcR2pf +.. section: IDLE +IDLE: In Settings dialog, select font with Up, Down keys as well as mouse. +Initial patch by Louie Lu. +.. +.. bpo: 8231 +.. date: 2017-07-07-21-10-55 +.. nonce: yEge3L +.. section: IDLE +IDLE: call config.IdleConf.GetUserCfgDir only once. +.. +.. bpo: 30779 +.. date: 2017-07-07-20-26-37 +.. nonce: 8KXEXN +.. section: IDLE +IDLE: Factor ConfigChanges class from configdialog, put in config; test. * +In config, put dump test code in a function; run it and unittest in 'if +__name__ == '__main__'. * Add class config.ConfigChanges based on +changes_class_v4.py on bpo issue. * Add class test_config.ChangesTest, +partly using configdialog_tests_v1.py. * Revise configdialog to use +ConfigChanges; see tracker msg297804. * Revise test_configdialog to match +configdialog changes. * Remove configdialog functions unused or moved to +ConfigChanges. Cheryl Sabella contributed parts of the patch. +.. +.. bpo: 30777 +.. date: 2017-07-04-22-45-46 +.. nonce: uxzlMB +.. section: IDLE +IDLE: configdialog - Add docstrings and fix comments. Patch by Cheryl +Sabella. +.. +.. bpo: 30495 +.. date: 2017-06-29-18-23-06 +.. nonce: qIWgc4 +.. section: IDLE +IDLE: Improve textview with docstrings, PEP8 names, and more tests. Patch by +Cheryl Sabella. +.. +.. bpo: 30723 +.. date: 2017-06-27-19-05-40 +.. nonce: rQh06y +.. section: IDLE +IDLE: Make several improvements to parenmatch. Add 'parens' style to +highlight both opener and closer. Make 'default' style, which is not +default, a synonym for 'opener'. Make time-delay work the same with all +styles. Add help for config dialog extensions tab, including help for +parenmatch. Add new tests. Original patch by Charles Wohlganger. +.. +.. bpo: 30674 +.. date: 2017-06-27-01-40-34 +.. nonce: ppK_q8 +.. section: IDLE +IDLE: add docstrings to grep module. Patch by Cheryl Sabella +.. +.. bpo: 21519 +.. date: 2017-06-27-00-29-56 +.. nonce: fTj9T0 +.. section: IDLE +IDLE's basic custom key entry dialog now detects duplicates properly. +Original patch by Saimadhav Heblikar. +.. +.. bpo: 29910 +.. date: 2017-06-26-22-45-27 +.. nonce: mqHh7u +.. section: IDLE +IDLE no longer deletes a character after commenting out a region by a key +shortcut. Add ``return 'break'`` for this and other potential conflicts +between IDLE and default key bindings. +.. +.. bpo: 30728 +.. date: 2017-06-26-15-47-13 +.. nonce: qH4TGL +.. section: IDLE +Review and change idlelib.configdialog names. Lowercase method and attribute +names. Replace 'colour' with 'color', expand overly cryptic names, delete +unneeded underscores. Replace ``import *`` with specific imports. Patches by +Cheryl Sabella. +.. +.. bpo: 6739 +.. date: 2017-06-26-00-28-59 +.. nonce: x5MfhB +.. section: IDLE +IDLE: Verify user-entered key sequences by trying to bind them with tk. Add +tests for all 3 validation functions. Original patch by G Polo. Tests added +by Cheryl Sabella. +.. +.. bpo: 30983 +.. date: 2017-08-18-17-19-23 +.. nonce: ggGz9z +.. section: Tools/Demos +gdb integration commands (py-bt, etc.) work on optimized shared builds now, +too. :pep:`523` introduced _PyEval_EvalFrameDefault which inlines +PyEval_EvalFrameEx on non-debug shared builds. This broke the ability to +use py-bt, py-up, and a few other Python-specific gdb integrations. The +problem is fixed by only looking for _PyEval_EvalFrameDefault frames in +python-gdb.py. Original patch by Bruno "Polaco" Penteado. + +Put news entry `blurb`_ files for the *Tests* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Add support for parametrized resource ``wantobjects`` in regrtests, +which allows to run Tkinter tests with the specified value of +:data:`!tkinter.wantobjects`, for example ``-u wantobjects=0``. + +Put news entry `blurb`_ files for the *IDLE* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Better explain the operation of Format / Format Paragraph. + +Eliminate redundant refcounting from ``BINARY_OP_EXTEND``. + +Fix erroneous "cannot reuse already awaited coroutine" error that could +occur when a generator was run during the process of clearing a coroutine's +frame. + +Generator expressions in 3.15 now conform to the documented behavior when +the iterable does not support iteration. This matches the behavior in 3.14 +and earlier + +Fix JIT tracer memory leak, ensure the JIT tracer state is freed when daemon threads are cleaned up during interpreter shutdown. + +Fixes a crash in ``ga_repr_items_list`` function. + +Put news entry `blurb`_ files for the *Core and Builtins* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +If we are specializing to ``LOAD_GLOBAL_MODULE`` or ``LOAD_ATTR_MODULE``, try +to enable deferred reference counting for the value, if the object is owned by +a different thread. This applies to the free-threaded build only and should +improve scaling of multi-threaded programs. Note that when deferred reference +counting is enabled, the object will be deallocated by the GC, rather than by +:c:func:`Py_DECREF`. + +Check if the result is ``NULL`` in ``BINARY_OP_EXTENT`` opcode. + +Eliminate redundant refcounting in the JIT for ``BINARY_OP``. + +:meth:`bytes.translate` now allows the compiler to unroll its loop more +usefully for a 2x speedup in the common no-deletions specified case. + +Fix crash in :class:`set` when objects with the same hash are concurrently +added to the set after removing an element with the same hash while the set +still contains elements with the same hash. + +:class:`bytearray` buffers now have the same alignment +when empty as when allocated. Unaligned buffers can still be created by slicing. + +Improve error messages for printf-style formatting. +For errors in the format string, always include the position of the +start of the format unit. +For errors related to the formatted arguments, always include the number +or the name of the argument. +Raise more specific errors and include more information (type and number +of arguments, most probable causes of error). + +Put news entry `blurb`_ files for the *macOS* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Add support for OpenSSL 3.6, drop EOL 3.2. Patch by Hugo van Kemenade. + +Move WASI-related files to :file:`Platforms/WASI`. Along the way, leave a +deprecated :file:`Tools/wasm/wasi/__main__.py` behind for +backwards-compatibility. + +Put news entry `blurb`_ files for the *Build* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Prevent static builds from clashing with curses by making the optimizer +COLORS table static. + +Added :c:func:`PyLong_GetNativeLayout`, :c:struct:`PyLongLayout`, +:c:struct:`PyLongExport`, :c:func:`PyLong_Export`, +:c:func:`PyLong_FreeExport`, :c:struct:`PyLongWriter`, +:c:func:`PyLongWriter_Create`, :c:func:`PyLongWriter_Finish` and +:c:func:`PyLongWriter_Discard` to the limited API. + +Renamed :c:func:`!PyUnstable_Object_Dump` to :c:func:`PyObject_Dump`. + +Put news entry `blurb`_ files for the *C API* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Put news entry `blurb`_ files for the *Tools/Demos* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Remove the :meth:`!isxidstart` and :meth:`!isxidcontinue` methods of +:data:`unicodedata.ucd_3_2_0`. They are now only exposed as +:func:`unicodedata.isxidstart` and :func:`unicodedata.isxidcontinue`. + +Mime type ``image/jxl`` is now supported by :mod:`mimetypes`. + +Fix a crash in :meth:`array.array.fromlist` when an element's :meth:`~object.__index__` method mutates +the input list during conversion. + +:class:`annotationlib.ForwardRef` objects are now hashable when created from +annotation scopes with closures. Previously, hashing such objects would +throw an exception. Patch by Bartosz Sławecki. + +Add the *missing_as_none* parameter to :func:`~urllib.parse.urlparse`, +:func:`~urllib.parse.urlsplit` and :func:`~urllib.parse.urldefrag` +functions. Add the *keep_empty* parameter to +:func:`~urllib.parse.urlunparse` and :func:`~urllib.parse.urlunsplit` +functions. This allows to distinguish between empty and not defined URI +components and preserve empty components. + +Fix :func:`!ctypes.POINTER.set_type` not updating the format string to match the type. + +Add an ``on_error`` keyword-only parameter to +:func:`multiprocessing.set_forkserver_preload` to control how import failures +during module preloading are handled. Accepts ``'ignore'`` (default, silent), +``'warn'`` (emit :exc:`ImportWarning`), or ``'fail'`` (raise exception). +Contributed by Nick Neumann and Gregory P. Smith. + +Fixed a bug in :mod:`pdb` where expression results were not sent back to remote client. + +Fixed :mod:`asyncio` debugging tools to work with new remote debugging API. +Patch by Bartosz Sławecki. + +Fix an issue where :func:`inspect.getgeneratorstate` and :func:`inspect.getcoroutinestate` could fail for generators wrapped by :func:`types.coroutine` in the suspended state. + +Put news entry `blurb`_ files for the *Library* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Fix potential thread safety issues in :mod:`ssl` module. + +The Python implementation of :func:`functools.lru_cache` differed from the +default C implementation in that it did not check that its argument is +callable. This discrepancy is now fixed and both raise a :exc:`TypeError`. + +Fixed validation of file descriptor 0 in posix functions when used with +follow_symlinks parameter. + +Fix :meth:`io.BufferedReader.read1` state cleanup on buffer allocation failure. + +Fix _decimal builds configured with EXTRA_FUNCTIONALITY by correcting the +Context.apply wrapper to pass the right argument. + +Accepting ``+`` and ``/`` characters with an alternative alphabet in +:func:`base64.b64decode` and :func:`base64.urlsafe_b64decode` is now +deprecated. +In future Python versions they will be errors in the strict mode and +discarded in the non-strict mode. + +Added the *ignorechars* parameter in :func:`binascii.a2b_base64` and +:func:`base64.b64decode`. + +Fix a inconsistency issue in :meth:`~io.RawIOBase.write` that leads to +unexpected buffer overwrite by deduplicating the buffer exports. + +:mod:`mimetypes`: Add support for DICOM files (for medical imaging) with the official MIME type ``application/dicom``. Patch by Benedikt Johannes. + +Add new :mod:`tkinter` widget methods :meth:`!pack_content`, +:meth:`!place_content` and :meth:`!grid_content` which are alternative +spelling of old :meth:`!*_slaves` methods. + +Fixed a crash in ctypes when using a deprecated ``POINTER(str)`` type in +``argtypes``. Instead of aborting, ctypes now raises a proper Python +exception when the pointer target type is unresolved. + +Fix three crashes when non-string keyword arguments are supplied to objects +in the :mod:`ast` module. + +Add :meth:`symtable.Function.get_cells` and :meth:`symtable.Symbol.is_cell` methods. + +Use ``ppoll()`` if available in :func:`select.poll` to have a timeout +resolution of 1 nanosecond, instead of a resolution of 1 ms. Patch by Victor +Stinner. + +:class:`array.array` buffers now have the same alignment when empty as when +allocated. Unaligned buffers can still be created by slicing. + +Fix :func:`stat.filemode` in the pure-Python implementation to avoid misclassifying +invalid mode values as block devices. + +Put news entry `blurb`_ files for the *Windows* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Support negative timestamps in :func:`time.gmtime`, :func:`time.localtime`, and various :mod:`datetime` functions. + +Reject control characters in ``data:`` URL media types. + +Put news entry `blurb`_ files for the *Security* section in this directory. +.. _blurb: https://pypi.org/project/blurb/ + +Reject control characters in :class:`http.cookies.Morsel` fields and values. + +:mod:`~email.generator.BytesGenerator` will now refuse to serialize (write) headers +that are unsafely folded or delimited; see +:attr:`~email.policy.Policy.verify_generated_headers`. (Contributed by Bas +Bloemsaat and Petr Viktorin in :gh:`121650`). + +Reject control characters in IMAP commands. + +Fixed a bug in the folding of comments when flattening an email message +using a modern email policy. Comments consisting of a very long sequence of +non-foldable characters could trigger a forced line wrap that omitted the +required leading space on the continuation line, causing the remainder of +the comment to be interpreted as a new header field. This enabled header +injection with carefully crafted inputs. + +Reject control characters in POP3 commands. + +Reject C0 control characters within wsgiref.headers.Headers fields, values, +and parameters. + + +"""