Skip to content

Latest commit

 

History

History
665 lines (466 loc) · 12.1 KB

3.5.0a4.rst

File metadata and controls

665 lines (466 loc) · 12.1 KB

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.

Added Linux-specific socket constant CAN_RAW_FD_FRAMES. Patch courtesy of Joe Jevnik.

Implement PEP 488: removal of .pyo files.

Don't enable GC for user subclasses of non-GC types that don't add any new fields. Patch by Eugene Toder.

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.

Fixed formatting Windows error messages on Wine. Patch by Martin Panter.

%c, %o, %x, and %X in bytes formatting now raise TypeError on non-integer input.

Fix possible null pointer dereference in list.sort in out of memory conditions.

PyCFunction_New function is exposed by python DLL again.

tokenize.open() now closes the temporary binary file on error to fix a resource warning.

new debuglevel 2 in smtplib adds timestamps to debug output.

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.

Fix a regression in urljoin() introduced in 901e4e52b20a. Patch by Demian Brecht.

Adds _curses.update_lines_cols(). Patch by Arnon Yaari

Provide default argument for ndigits in round. Patch by Vajrasky Kok.

Add a numeric_owner parameter to tarfile.TarFile.extract and tarfile.TarFile.extractall. Patch by Michael Vogt and Eric Smith.

Add a subprocess.run() function than returns a CalledProcess instance for a more consistent API than the existing call* functions.

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.

Fix possible integer overflows in the pickle module.

Allow '[' and ']' in cookie values.

The keywords attribute of functools.partial is now always a dictionary.

Add missing newline to the PyCompileError error message. Patch by Alex Shkop.

Avoid blowing memory when allocating a multiprocessing shared array that's larger than 50% of the available RAM. Patch by Médéric Boquien.

Improve BOM handling when seeking to multiple positions of a writable text file.

Removed deprecated asyncio JoinableQueue.

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.

Added Python implementation of io.FileIO.

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.

Raise same exception on both Python 2 and 3 if sem_open is not available. Patch by Davin Potts.

The subprocess now module includes SubprocessError and TimeoutError in its list of exported names for the users wild enough to use from subprocess import *.

Added DefragResult, ParseResult, SplitResult, DefragResultBytes, ParseResultBytes, and SplitResultBytes to urllib.parse.__all__. Patch by Martin Panter.

urllib.request.ftpwrapper constructor now closes the socket if the FTP connection failed to fix a ResourceWarning.

: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.

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.

_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.

xml.sax.parseString() now supports string argument.

Fixed formatting ctypes error messages on Cygwin. Patch by Makoto Kato.

inspect.getdoc() now follows inheritance chains.

SAX parsers now support a character stream of InputSource object.

Tkinter now supports 64-bit integers added in Tcl 8.4 and arbitrary precision integers added in Tcl 8.5.

Fix socket.sendto(), use the C Py_ssize_t type to store the result of sendto() instead of the C int type.

: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.

Tkinter now supports new boolean type in Tcl 8.5.

Fix the faulthandler module to handle reentrant calls to its signal handlers.

linecache now clears the cache and returns an empty result on MemoryError.

Added os.path.commonpath(). Implemented in posixpath and ntpath. Based on patch by Rafik Draoui.

Serializing more "lookupable" objects (such as unbound methods or nested classes) now are supported with pickle protocols < 4.

sqlite3.Row now supports slice indexing.

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.

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.

When built from an existing file descriptor, io.FileIO() now only calls fstat() once. Before fstat() was called twice, which was not necessary.

collections.deque() objects now support __add__, __mul__, and __imul__().

csv.Writer.writerow() now supports arbitrary iterables.

The new email header parser now handles duplicate MIME parameter names without error, similar to how get_param behaves.

Fix os.utime(), it now rounds the timestamp towards minus infinity (-inf) instead of rounding towards zero.

Fix MagicMock's initializer to work with __methods__, just like configure_mock(). Patch by Kasia Jachim.

FreeBSD now uses "1.0" in the SOVERSION as other operating systems, instead of just "1".

Argument Clinic now generates code into separate files by default.

Added test.support.start_threads() for running and cleaning up multiple threads.

test.regrtest now emits a warning if temporary files or directories are left after running a test.

pygettext now uses standard +NNNN format in the POT-Creation-Date header.

Argument Clinic's understanding of format units accepting bytes, bytearrays, and buffers is now consistent with both the documentation and the implementation.

Argument Clinic now wraps long impl prototypes at column 78.

Argument Clinic now ensures that functions without docstrings have signatures.

Argument Clinic now generates argument parsing code with PyArg_Parse instead of PyArg_ParseTuple if possible.

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.

PyImport_ReInitLock() now checks for lock allocation error