Skip to content

Latest commit

 

History

History
518 lines (364 loc) · 9.51 KB

3.5.0a3.rst

File metadata and controls

518 lines (364 loc) · 9.51 KB

Increased performance of string search operations (str.find, str.index, str.count, the in operator, str.split, str.partition) with arguments of different kinds (UCS1, UCS2, UCS4).

Python doesn't support anymore platforms without stat() or fstat(), these functions are always required.

The -b option now affects comparisons of bytes with int.

Memoryviews now allow tuple indexing (including for multi-dimensional memoryviews).

Fixed generator lambdas. Patch by Bruno Cauet.

Fix the default __sizeof__ implementation for variable-sized objects.

The groupindex attribute of regular expression pattern object now is non-modifiable mapping.

Ignore KeyboardInterrupt when the pydoc pager is active. This mimics the behavior of the standard unix pagers, and prevents pipepager from shutting down while the pager itself is still running.

pprint() of OrderedDict now outputs the same representation as repr().

Removed IsBadStringPtr calls in ctypes

Improved some re error messages using regex for hints.

ntpath.expandvars() no longer loses unbalanced single quotes.

The zipfile.ZipFile.open function now supports 'x' (exclusive creation) mode.

The reader in BufferedRWPair now is closed even when closing writer failed in BufferedRWPair.close().

Unknown escapes in regular expressions that consist of '\' and ASCII letter now raise a deprecation warning and will be forbidden in Python 3.6.

string.Template now allows specifying the "self" parameter as a keyword argument. string.Formatter now allows specifying the "self" and the "format_string" parameters as keyword arguments.

The pprint module now supports mapping proxies.

pprint now wraps long bytes objects and bytearrays.

Fixed some corner cases in breaking words in tetxtwrap. Got rid of quadratic complexity in breaking long words.

The copy module now uses pickle protocol 4 (PEP 3154) and supports copying of instances of classes whose __new__ method takes keyword-only arguments.

Added a zipapp module to support creating executable zip file archives of Python code. Registered ".pyz" and ".pyzw" extensions on Windows for these archives (PEP 441).

Avoid explicit checks for str in zipapp, adding support for pathlib.Path objects as arguments.

Added support of arbitrary bytes-like objects and avoided unnecessary copying of memoryview in gzip.GzipFile.write(). Original patch by Wolfgang Maier.

Added support for writing ZIP files to unseekable streams.

Increase imaplib's MAXLINE to accommodate modern mailbox sizes.

If body is None, http.client.HTTPConnection.request now sets Content-Length to 0 for PUT, POST, and PATCH headers to avoid 411 errors from some web servers.

The nntplib.NNTP constructor no longer leaves the connection and socket open until the garbage collector cleans them up. Patch by Martin Panter.

collections.deque() objects now support methods for index(), insert(), and copy(). This allows deques to be registered as a MutableSequence and it improves their substitutability for lists.

:func:`signal.sigwaitinfo` and :func:`signal.sigtimedwait` are now retried when interrupted by a signal not in the sigset parameter, if the signal handler does not raise an exception. signal.sigtimedwait() recomputes the timeout with a monotonic clock when it is retried.

Few functions in modules mmap, ossaudiodev, socket, ssl, and codecs, that accepted only read-only bytes-like object now accept writable bytes-like object too.

If time.sleep() is interrupted by a signal, the sleep is now retried with the recomputed delay, except if the signal handler raises an exception (PEP 475).

_strptime now uniformly handles all days in week 0, including Dec 30 of previous year. Based on patch by Jim Carroll.

Iterator of NamedTemporaryFile now keeps a reference to NamedTemporaryFile instance. Patch by Bohuslav Kabrda.

The fake test case created by unittest.loader when it fails importing a test module is now picklable.

On Linux, os.urandom() now uses the new getrandom() syscall if available, syscall introduced in the Linux kernel 3.17. It is more reliable and more secure, because it avoids the need of a file descriptor and waits until the kernel has enough entropy.

Updated the implementation of the http.cookies.Morsel class. Setting attributes key, value and coded_value directly now is deprecated. update() and setdefault() now transform and check keys. Comparing for equality now takes into account attributes key, value and coded_value. copy() now returns a Morsel, not a dict. repr() now contains all attributes. Optimized checking keys and quoting values. Added new tests. Original patch by Demian Brecht.

Allow selection of output units in timeit. Patch by Julian Gindi.

Fix traceback.format_list when a traceback has been mutated.

Add rdivmod support to MagicMock() objects. Patch by Håkan Lövdahl.

Add charset parameter to HtmlDiff.make_file().

Support os.truncate and os.ftruncate on Windows.

Fixed parsing cookies with absent keys or values in cookiejar. Patch by Demian Brecht.

multiprocessing.Pool methods imap() and imap_unordered() now handle exceptions raised by an iterator. Patch by Alon Diamant and Davin Potts.

Add matmul support to MagicMock. Patch by Håkan Lövdahl.

enable(), register(), dump_traceback() and dump_traceback_later() functions of faulthandler now accept file descriptors. Patch by Wei Wu.

Disabled HTTP header injections in http.client. Original patch by Demian Brecht.

Modules bz2, tarfile and tokenize now can be reloaded with imp.reload(). Patch by Thomas Kluyver.

os.walk() now calls os.scandir() instead of os.listdir(). The usage of os.scandir() reduces the number of calls to os.stat(). Initial patch written by Ben Hoyt.

make patchcheck will ensure the interpreter is built.

Added tests for standard IO streams in IDLE.

Prevent test_urllib2net failures due to ftp connection timeout.

The result of open() in Tools/freeze/bkfile.py is now better compatible with regular files (in particular it now supports the context management protocol).