News
News
News
Python News
+++++++++++
Tests
-----
IDLE
----
- Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
format unit.
- Issue #26991: Fix possible refleak when creating a function with annotations.
- Issue #27039: Fixed bytearray.remove() for values greater than 127. Patch by
Joe Jevnik.
- Issue #26659: Make the builtin slice type support cycle collection.
- Issue #26718: super.__init__ no longer leaks memory if called multiple times.
NOTE: A direct call of super.__init__ is not endorsed!
- Issue #25339: PYTHONIOENCODING now has priority over locale in setting the
error handler for stdin and stdout.
- Issue #26464: 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.
- Issue #4806: Avoid masking the original TypeError exception when using star
(*) unpacking in function calls. Based on patch by Hagen Fürstenau and
Daniel Urban.
- Issue #26194: 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.
- Issue #25843: 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.
- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
_PyObject_GetState() due to regressions observed in Cython-based projects.
- Issue #25973: Fix segfault when an invalid nonlocal statement binds a name
starting with two underscores.
- Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
- Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
This allows sys.getsize() to work correctly with their subclasses with
__slots__ defined.
- Issue #25709: Fixed problem with in-place string concatenation and utf-8 cache.
- Issue #26478: Fix semantic bugs when using binary operators with dictionary
views and tuples.
Library
-------
- Issue #27164: In the zlib module, allow decompressing raw Deflate streams
with a predefined zdict. Based on patch by Xiang Zhang.
- Issue #27014: Fix infinite recursion using typing.py. Thanks to Kalle Tuure!
- Issue #14132: Fix urllib.request redirect handling when the target only has
a query string. Original fix by Ján Janech.
- Issue #26977: Removed unnecessary, and ignored, call to sum of squares helper
in statistics.pvariance.
- Issue #26881: The modulefinder module now supports extended opcode arguments.
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.
- Issue #26733: Disassembling a class now disassembles class and static methods.
Patch by Xiang Zhang.
- Issue #24838: tarfile's ustar and gnu formats now correctly calculate name
and link field limits for multibyte character encodings like utf-8.
- Issue #26717: Stop encoding Latin-1-ized WSGI paths with UTF-8. Patch by
Anthony Sottile.
- Issue #26735: 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.
- Issue #23735: Handle terminal resizing with Readline 6.3+ by installing our
own SIGWINCH handler. Patch by Eric Price.
- Issue #26586: 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.
- Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
instead of up to 1024.
- Issue #24266: Ctrl+C during Readline history search now cancels the search
mode when compiled with Readline 7.
- Issue #23718: Fixed parsing time in week 0 before Jan 1. Original patch by
Tamás Bence Gedai.
- Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
- Issue #25718: Fixed pickling and copying the accumulate() iterator with
total is None.
- Issue #26475: Fixed debugging output for regular expressions with the (?x)
flag.
- Issue #26457: 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.
- Issue #26402: 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.
- Issue #26309: In the "socketserver" module, shut down the request (closing
the connected socket) when verify_request() returns false. Patch by Aviv
Palivoda.
- Issue #25995: os.walk() no longer uses FDs proportional to the tree depth.
- Issue #26117: The os.scandir() iterator now closes file descriptor not only
when the iteration is finished, but when it was failed with error.
- Issue #25945: 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.
- Issue #26147: xmlrpc now works with strings not encodable with used
non-UTF-8 encoding.
- Issue #25935: Garbage collector now breaks reference loops with OrderedDict.
- Issue #25447: fileinput now uses sys.stdin as-is if it does not have a
buffer attribute (restores backward compatibility).
- Issue #25447: Copying the lru_cache() wrapper object now always works,
independedly from the type of the wrapped object (by returning the original
object unchanged).
- Issue #6478: _strptime's regexp cache now is reset after changing timezone
with time.tzset().
- Issue #14285: 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.
- Issue #19771: 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).
- Issue #25177: 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.
- Issue #25718: Fixed copying object with state with boolean value is false.
- Issue #25624: ZipFile now always writes a ZIP_STORED header for directory
entries. Patch by Dingyuan Wang.
- Skip getaddrinfo if host is already resolved.
Patch by A. Jesse Jiryu Davis.
IDLE
----
- Issue #5124: 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.
- Issue #27117: Make colorizer htest and turtledemo work with dark themes.
Move code for configuring text widget colors to a new function.
Documentation
-------------
- Issue #24136: Document the new PEP 448 unpacking syntax of 3.5.
- Issue #26736: Used HTTPS for external links in the documentation if possible.
- Issue #25500: Fix documentation to not claim that __import__ is searched for
in the global scope.
Tests
-----
- Issue #21916: Added tests for the turtle module. Patch by ingrid,
Gregory Loyse and Jelle Zijlstra.
- Issue #26015: Added new tests for pickling iterators of mutable sequences.
Build
-----
- Issue #22359: 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.
- Issue #27229: Fix the cross-compiling pgen rule for in-tree builds. Patch
by Xavier de Gaye.
- Issue #25702: 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.
- Issue #26079: Fixing the build output folder for tix-8.4.3.6. Patch by
Bjoern Thiel.
- Issue #25827: Add support for building with ICC to ``configure``, including
a new ``--with-icc`` flag.
- Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
- Issue #24324: 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.
Windows
-------
Tools/Demos
-----------
- Issue #26799: 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.
- Issue #26271: Fix the Freeze tool to properly use flags passed through
configure. Patch by Daniel Shaulov.
Misc
----
Windows
-------
- Issue #25715: Python 3.5.1 installer shows wrong upgrade path and incorrect
logic for launcher detection.
- Issue #25388: Fixed tokenizer crash when processing undecodable source code
with a null byte.
- Issue #25462: The hash of the key now is calculated only once in most
operations in C implementation of OrderedDict.
- Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node
when compiling AST from Python objects.
- Issue #24802: Avoid buffer overreads when int(), float(), compile(), exec()
and eval() are passed bytes-like objects. These objects are not
necessarily terminated by a null byte, but the functions assumed they were.
- Issue #24726: Fixed a crash and leaking NULL in repr() of OrderedDict that
was mutated by direct calls of dict methods.
- Issue #25449: Iterating OrderedDict with keys with unstable hash now raises
KeyError in C implementations as well as in Python implementation.
- Issue #25395: Fixed crash when highly nested OrderedDict structures were
garbage collected.
- Issue #24806: Prevent builtin types that are not allowed to be subclassed from
being subclassed through multiple inheritance.
- Issue #25280: Import trace messages emitted in verbose (-v) mode are no
longer formatted twice.
- Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the
getrandom() function instead of the getentropy() function. The getentropy()
function is blocking to generate very good quality entropy, os.urandom()
doesn't need such high-quality entropy.
- Issue #25131: Make the line number and column offset of set/dict literals and
comprehensions correspond to the opening brace.
- Issue #25150: Hide the private _Py_atomic_xxx symbols from the public
Python.h header to fix a compilation error with OpenMP. PyThreadState_GET()
becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies.
Library
-------
- Issue #25626: Change three zlib functions to accept sizes that fit in
Py_ssize_t, but internally cap those sizes to UINT_MAX. This resolves a
regression in 3.5 where GzipFile.read() failed to read chunks larger than 2
or 4 GiB. The change affects the zlib.Decompress.decompress() max_length
parameter, the zlib.decompress() bufsize parameter, and the
zlib.Decompress.flush() length parameter.
- Issue #25590: In the Readline completer, only call getattr() once per
attribute.
- Issue #25584: Added "escape" to the __all__ list in the glob module.
- Issue #25584: Fixed recursive glob() with patterns starting with '\*\*'.
- Issue #18010: Fix the pydoc web server's module search function to handle
exceptions from importing packages.
- Issue #21827: Fixed textwrap.dedent() for the case when largest common
whitespace is a substring of smallest leading whitespace.
Based on patch by Robert Li.
- Issue #25447: The lru_cache() wrapper objects now can be copied and pickled
(by returning the original object unchanged).
- Issue #25441: asyncio: Raise error from drain() when socket is closed.
- Issue #25232: Fix CGIRequestHandler to split the query from the URL at the
first question mark (?) rather than the last. Patch from Xiang Zhang.
- Issue #23329: Allow the ssl module to be built with older versions of
LibreSSL.
- Issue #25047: The XML encoding declaration written by Element Tree now
respects the letter case given by the user. This restores the ability to
write encoding names in uppercase like "UTF-8", which worked in Python 2.
- Issue #25135: Make deque_clear() safer by emptying the deque before clearing.
This helps avoid possible reentrancy issues.
- Issue #19143: platform module now reads Windows version from kernel32.dll to
avoid compatibility shims.
- Issue #25092: Fix datetime.strftime() failure when errno was already set to
EINVAL.
- Issue #23144: Make sure that HTMLParser.feed() returns all the data, even
when convert_charrefs is True.
- Issue #24982: shutil.make_archive() with the "zip" format now adds entries
for directories (including empty directories) in ZIP file.
- Issue #25019: Fixed a crash caused by setting non-string key of expat parser.
Based on patch by John Leitch.
- Issue #16180: Exit pdb if file has syntax error, instead of trapping user
in an infinite loop. Patch by Xavier de Gaye.
- Issue #24891: Fix a race condition at Python startup if the file descriptor
of stdin (0), stdout (1) or stderr (2) is closed while Python is creating
sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set
to None if the creation of the object failed, instead of raising an OSError
exception. Initial patch written by Marco Paolini.
- Issue #24992: Fix error handling and a race condition (related to garbage
collection) in collections.OrderedDict constructor.
- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating
ssl.SSLContext.
IDLE
----
- Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
debugger is active (15347); b) closing the debugger with the [X] button
(15348); and c) activating the debugger when already active (24455).
The patch by Mark Roseman does this by making two changes.
1. Suspend and resume the gui.interaction method with the tcl vwait
mechanism intended for this purpose (instead of root.mainloop & .quit).
2. In gui.run, allow any existing interaction to terminate first.
- Issue #24750: Improve the appearance of the IDLE editor window status bar.
Patch by Mark Roseman.
- Issue #25313: Change the handling of new built-in text color themes to better
address the compatibility problem introduced by the addition of IDLE Dark.
Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
- Issue #22726: Re-activate the config dialog help button with some content
about the other buttons and the new IDLE Dark theme.
- Issue #24820: IDLE now has an 'IDLE Dark' built-in text color theme.
It is more or less IDLE Classic inverted, with a cobalt blue background.
Strings, comments, keywords, ... are still green, red, orange, ... .
To use it with IDLEs released before November 2015, hit the
'Save as New Custom Theme' button and enter a new name,
such as 'Custom Dark'. The custom theme will work with any IDLE
release, and can be modified.
- Issue #25224: README.txt is now an idlelib index for IDLE developers and
curious users. The previous user content is now in the IDLE doc chapter.
'IDLE' now means 'Integrated Development and Learning Environment'.
- Issue #24570: Idle: make calltip and completion boxes appear on Macs
affected by a tk regression. Initial patch by Mark Roseman.
- Issue #24801: Make right-click for context menu work on Mac Aqua.
Patch by Mark Roseman.
- Issue #25198: Enhance the initial html viewer now used for Idle Help.
* Properly indent fixed-pitch text (patch by Mark Roseman).
* Give code snippet a very Sphinx-like light blueish-gray background.
* Re-use initial width and height set by users for shell and editor.
* When the Table of Contents (TOC) menu is used, put the section header
at the top of the screen.
- Issue #25225: Condense and rewrite Idle doc section on text colors.
- Issue #21995: Explain some differences between IDLE and console Python.
- Issue #22820: Explain need for *print* when running file from Idle editor.
- Issue #25224: Doc: augment Idle feature list and no-subprocess section.
- Issue #16893: Replace help.txt with help.html for Idle doc display.
The new idlelib/help.html is rstripped Doc/build/html/library/idle.html.
It looks better than help.txt and will better document Idle as released.
The tkinter html viewer that works for this file was written by Mark Roseman.
The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.
- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
Documentation
-------------
- Issue #22558: Add remaining doc links to source code for Python-coded modules.
Patch by Yoni Lavi.
Tests
-----
- Issue #25099: Make test_compileall not fail when an entry on sys.path cannot
be written to (commonly seen in administrative installs on Windows).
Build
-----
- Issue #24915: Add LLVM support for PGO builds and use the test suite to
generate the profile data. Initial patch by Alecsandru Patrascu of Intel.
Windows
-------
- Issue #25089: Adds logging to installer for case where launcher is not
selected on upgrade.
- Issue #25081: Makes Back button in installer go back to upgrade page when
upgrading.
- Issue #25126: Clarifies that the non-web installer will download some
components.
Tools/Demos
-----------
Build
-----
Library
-------
Build
-----
Library
-------
- Issue #21167: NAN operations are now handled correctly when python is
compiled with ICC even if -fp-model strict is not specified.
Library
-------
- Issue #24667: Resize odict in all cases that the underlying dict resizes.
Library
-------
- Issue #24634: Importing uuid should not try to load libc on Windows
- Issue #23004: mock_open() now reads binary data correctly when the type of
read_data is bytes. Initial patch by Aaron Hill.
- Issue #23652: 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.
- Issue #19450: Update Windows and OS X installer builds to use SQLite 3.8.11.
- Issue #24791: Fix grammar regression for call syntax: 'g(\*a or b)'.
IDLE
----
- Issue #23672: Allow Idle to edit and run files with astral chars in name.
Patch by Mohd Sanad Zaki Rizvi.
- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
Documentation
-------------
- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
Tests
-----
- Issue #24751: 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.
- Issue #24583: Fix crash when set is mutated while being updated.
- Issue #24407: Fix crash when dict is mutated while being updated.
Library
-------
- Issue #24620: Random.setstate() now validates the value of state last element.
- Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero.
- Issue #24580: Symbolic group references to open group in re patterns now are
explicitly forbidden as well as numeric group references.
- Issue #24631: Fixed regression in the timeit module with multiline setup.
- Issue #15014: SMTP.auth() and SMTP.login() now support RFC 4954's optional
initial-response argument to the SMTP AUTH command.
Build
-----
- Issue #24603: Update Windows builds and OS X 10.5 installer to use OpenSSL
1.0.2d.
- Issue #24400: Introduce a distinct type for PEP 492 coroutines; add
types.CoroutineType, inspect.getcoroutinestate, inspect.getcoroutinelocals;
coroutines no longer use CO_GENERATOR flag; sys.set_coroutine_wrapper
works only for 'async def' coroutines; inspect.iscoroutine no longer
uses collections.abc.Coroutine, it's intended to test for pure 'async def'
coroutines only; add new opcode: GET_YIELD_FROM_ITER; fix generators wrapper
used in types.coroutine to be instance of collections.abc.Generator;
collections.abc.Awaitable and collections.abc.Coroutine can no longer
be used to detect generator-based coroutines--use inspect.isawaitable
instead.
Library
-------
- Issue #24552: Fix use after free in an error case of the _pickle module.
- Issue #24336: The contextmanager decorator now works with functions with
keyword arguments called "func" and "self". Patch by Martin Panter.
Tests
-----
Documentation
-------------
Build
-----
- Issue #24432: Update Windows builds and OS X 10.5 installer to use OpenSSL
1.0.2c.
- Issue #24284: The startswith and endswith methods of the str class no longer
return True when finding the empty string and the indexes are completely out
of range.
- Issue #11205: In dictionary displays, evaluate the key before the value.
Library
-------
- Issue #24270: Add math.isclose() and cmath.isclose() functions as per PEP 485.
Contributed by Chris Barker and Tal Einat.
- Issue #5633: Fixed timeit when the statement is a string and the setup is not.
- Issue #23985: Fix a possible buffer overrun when deleting a slice from
the front of a bytearray and then appending some other bytes data.
- Issue #23290: Optimize set_merge() for cases where the target is empty.
(Contributed by Serhiy Storchaka.)
- Issue #2292: PEP 448: Additional Unpacking Generalizations.
- Issue #24022: Fix tokenizer crash when processing undecodable source code.
- Issue #24017: PEP 492: Coroutines with async and await syntax.
Library
-------
- Issue #24230: The tempfile module now accepts bytes for prefix, suffix and dir
parameters and returns bytes in such situations (matching the os module APIs).
- Issue #20035: Replaced the ``tkinter._fix`` module used for setting up the
Tcl/Tk environment on Windows with a private function in the ``_tkinter``
module that makes no permanent changes to the environment.
- Issue #20098: New mangle_from policy option for email, default True
for compat32, but False for all other policies.
- Issue #24211: The email library now supports RFC 6532: it can generate
headers using utf-8 instead of encoded words.
- Issue #23488: Random generator objects now consume 2x less memory on 64-bit.
- Issue #22486: Added the math.gcd() function. The fractions.gcd() function now is
deprecated. Based on patch by Mark Dickinson.
- Issue #23796: peek and read1 methods of BufferedReader now raise ValueError
if they called on a closed object. Patch by John Hergenroeder.
- Issue #21800: imaplib now supports RFC 5161 (enable), RFC 6855
(utf8/internationalized email) and automatically encodes non-ASCII
usernames and passwords to UTF8.
- Issue #20274: Remove ignored and erroneous "kwargs" parameters from three
METH_VARARGS methods on _sqlite.Connection.
- Issue #24094: Fix possible crash in json.encode with poorly behaved dict
subclasses.
- Issue #9246: On POSIX, os.getcwd() now supports paths longer than 1025 bytes.
Patch written by William Orr.
- Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
- Issue #23908: os functions now reject paths with embedded null character
on Windows instead of silently truncate them.
IDLE
----
Tests
-----
Documentation
-------------
- Issue #24029: Document the name binding behavior for submodule imports.
- Issue #24077: Fix typo in man page for -I command option: -s, not -S
Tools/Demos
-----------
- Issue #22980: 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.
- Issue #23726: Don't enable GC for user subclasses of non-GC types that
don't add any new fields. Patch by Eugene Toder.
- Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
non-integer input.
Library
-------
- Issue #23840: tokenize.open() now closes the temporary binary file on error
to fix a resource warning.
- Issue #21217: 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.
- Issue #23529: 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.
- Issue #23865: 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.
- Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not
available. Patch by Davin Potts.
- Issue #2175: SAX parsers now support a character stream of InputSource object.
- Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
arbitrary precision integers added in Tcl 8.5.
- Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
result of sendto() instead of the C int type.
- Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
- Issue #23838: linecache now clears the cache and returns an empty result on
MemoryError.
- Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings. Fixed
ambigious reverse mappings. Added many new mappings. Import mapping is no
longer applied to modules already mapped with full name mapping.
- Issue #23752: When built from an existing file descriptor, io.FileIO() now
only calls fstat() once. Before fstat() was called twice, which was not
necessary.
- Issue #23745: The new email header parser now handles duplicate MIME
parameter names without error, similar to how get_param behaves.
- Issue #22117: Fix os.utime(), it now rounds the timestamp towards minus
infinity (-inf) instead of rounding towards zero.
Build
-----
- Issue #23817: FreeBSD now uses "1.0" in the SOVERSION as other operating
systems, instead of just "1".
- Issue #23501: Argument Clinic now generates code into separate files by default.
Tests
-----
Tools/Demos
-----------
- Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.
- Issue #20586: Argument Clinic now ensures that functions without docstrings
have signatures.
- Issue #23492: Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
- Issue #23500: 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.
C API
-----
- Issue #23681: The -b option now affects comparisons of bytes with int.
Library
-------
- Issue #22364: Improved some re error messages using regex for hints.
- Issue #21802: The reader in BufferedRWPair now is closed even when closing
writer failed in BufferedRWPair.close().
- Issue #4727: The copy module now uses pickle protocol 4 (PEP 3154) and
supports copying of instances of classes whose __new__ method takes
keyword-only arguments.
- Issue #23657: Avoid explicit checks for str in zipapp, adding support
for pathlib.Path objects as arguments.
- Issue #23252: Added support for writing ZIP files to unseekable streams.
- Issue #23001: 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.
- Issue #23136: _strptime now uniformly handles all days in week 0, including
Dec 30 of previous year. Based on patch by Jim Carroll.
- Issue #22903: The fake test case created by unittest.loader when it fails
importing a test module is now picklable.
- Issue #22181: 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.
- Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
Patch by Demian Brecht.
- Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload(). Patch by Thomas Kluyver.
Build
-----
Tests
-----
Library
-------
- Issue #22524: New os.scandir() function, part of the PEP 471: "os.scandir()
function -- a better and faster directory iterator". Patch written by Ben
Hoyt.
- Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the
SSL layer but the underlying connection hasn't been closed.
- Issue #21619: Popen objects no longer leave a zombie after exit in the with
statement if the pipe was broken. Patch by Martin Panter.
- Issue #22936: Make it possible to show local variables in tracebacks for
both the traceback module and unittest.
- Issues #814253, #9179: Group references and conditional group references now
work in lookbehind assertions in regular expressions.
- Issue #23215: Multibyte codecs with custom error handlers that ignores errors
consumed too much memory and raised SystemError or MemoryError.
Original patch by Aleksi Torhamo.
- Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encoding
differs from file system encoding (e.g. on Mac OS).
- Issue #23481: Remove RC4 from the SSL module's default cipher list.
- Issue #23096: Pickle representation of floats with protocol 0 now is the same
for both Python and C implementations.
- Issue #19105: pprint now more efficiently uses free space at the right.
- Issue #23801: Fix issue where cgi.FieldStorage did not always ignore the
entire preamble to a multipart body.
Build
-----
- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
the resulting executable faster.
C API
-----
- Issue #20204: Deprecation warning is now raised for builtin types without the
__module__ attribute.
Windows
-------
- Issue #23465: Implement PEP 486 - Make the Python Launcher aware of virtual
environments. Patch by Paul Moore.
- Issue #23437: Make user scripts directory versioned on Windows. Patch by Paul
Moore.
- Issue #22735: Fix many edge cases (including crashes) involving custom mro()
implementations.
- Issue #21295: Revert some changes (issue #16795) to AST line numbers and
column offsets that constituted a regression.
- Issue #22986: Allow changing an object's __class__ between a dynamic type and
static type in some cases.
- Issue #22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for
atomic memory access if available. Patch written by Vitor de Lima and Gustavo
Temple.
- Issue #20284: %-interpolation (aka printf) formatting added for bytes and
bytearray.
- Issue #23048: Fix jumping out of an infinite while loop in the pdb.
- Issue #20335: bytes constructor now raises TypeError when encoding or errors
is specified with non-string argument. Based on patch by Renaud Blanch.
- Issue #22869: Move the interpreter startup & shutdown code to a new
dedicated pylifecycle.c module
- Issue #22653: Fix an assertion failure in debug mode when doing a reentrant
dict insertion in debug mode.
- Issue #22643: Fix integer overflow in Unicode case operations (upper, lower,
title, swapcase, casefold).
- Issue #22604: Fix assertion error in debug mode when dividing a complex
number by (nan+0j).
- Issue #22520: Fix overflow checking when generating the repr of a unicode
object.
- Issue #22215: Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
- Issue #22077: Improve index error messages for bytearrays, bytes, lists,
and tuples by adding 'or slices'. Added ', not <typename>' for bytearrays.
Original patch by Claudiu Popa.
- Issue #21897: Fix a crash with the f_locals attribute with closure
variables when frame.clear() has been called.
- Issue #21418: Fix a crash in the builtin function super() when called without
argument and without current frame (ex: embedded Python).
- Issue #20355: -W command line options now have higher priority than the
PYTHONWARNINGS environment variable. Patch by Arfrever.
- Issue #21209: Fix sending tuples to custom generator objects with the yield
from syntax.
- Issue #21193: pow(a, b, c) now raises ValueError rather than TypeError when b
is negative. Patch by Josh Rosenberg.
- PEP 465 and Issue #21176: Add the '@' operator for matrix multiplication.
- Issue #19995: %c, %o, %x, and %X now raise TypeError on non-integer input.
- Issue #19655: The ASDL parser - used by the build process to generate code for
managing the Python AST in C - was rewritten. The new parser is self contained
and does not require to carry long the spark.py parser-generator library;
spark.py was removed from the source base.
- Issue #12546: Allow ``\x00`` to be used as a fill character when using str, int,
float, and complex __format__ methods.
- Issue #8931: Make alternate formatting ('#') for type 'c' raise an
exception. In versions prior to 3.5, '#' with 'c' had no effect. Now
specifying it is an error. Patch by Torsten Landschoff.
Library
-------
- Issue #13128: Print response headers for CONNECT requests when debuglevel
> 0. Patch by Demian Brecht.
- Issue #22818: Splitting on a pattern that could match an empty string now
raises a warning. Patterns that can only match empty strings are now
rejected.
- Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
- Issue #23133: Pickling of ipaddress objects now produces more compact and
portable representation.
- Issue #23248: Update ssl error codes from latest OpenSSL git master.
- Issue #15955: Add an option to limit output size when decompressing LZMA
data. Patch by Nikolaus Rath and Martin Panter.
- Issue #23063: In the disutils' check command, fix parsing of reST with code or
code-block directives.
- Issue #17911: Provide a new object API for traceback, including the ability
to not lookup lines at all until the traceback is actually rendered, without
any trace of the original objects being kept alive.
- Issue #23112: Fix SimpleHTTPServer to correctly carry the query string and
fragment when it redirects to add a trailing slash.
- Issue #23093: In the io, module allow more operations to work on detached
streams.
- Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
instead of reading /dev/urandom, to get pseudo-random bytes.
- Issue #19104: pprint now produces evaluable output for wrapped strings.
- Issue #22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
opcode if possible.
- Issue #16043: Add a default limit for the amount of data xmlrpclib.gzip_decode
will return. This resolves CVE-2013-1753.
- Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile is
asked to compile a source file containing multiple dots in the source file
name.
- Issue #21971: Update turtledemo doc and add module to the index.
- Issue #22407: Deprecated the use of re.LOCALE flag with str patterns or
re.ASCII. It was newer worked.
- Issue #22902: The "ip" command is now used on Linux to determine MAC address
in uuid.getnode(). Pach by Bruno Cauet.
- Issue #22915: SAX parser now supports files opened with file descriptor or
bytes path.
- Issue #12728: Different Unicode characters having the same uppercase but
different lowercase are now matched in case-insensitive regular expressions.
- Issue #22824: Updated reprlib output format for sets to use set literals.
Patch contributed by Berker Peksag.
- Issue #22824: Updated reprlib output format for arrays to display empty
arrays without an unnecessary empty list. Suggested by Serhiy Storchaka.
- Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
Based on patch by Aivars Kalvāns.
- Issue #22776: Brought excluded code into the scope of a try block in
SysLogHandler.emit().
- Issue #22410: Module level functions in the re module now cache compiled
locale-dependent regular expressions taking into account the locale.
- Issue #8876: distutils now falls back to copying files when hard linking
doesn't work. This allows use with special filesystems such as VirtualBox
shared folders.
- Issue #18216: gettext now raises an error when a .mo file has an
unsupported major version number. Patch by Aaron Hill.
- Issue #22676: Make the pickling of global objects which don't have a
__module__ attribute less slow.
- Issue #7559: unittest test loading ImportErrors are reported as import errors
with their import exception rather than as attribute errors after the import
has already failed.
- Issue #22641: In asyncio, the default SSL context for client connections
is now created using ssl.create_default_context(), for stronger security.
- Issue #22435: Fix a file descriptor leak when SocketServer bind fails.
- Issue #1519638: Now unmatched groups are replaced with empty strings in re.sub()
and re.subn().
- Issue #21965: Add support for in-memory SSL to the ssl module. Patch
by Geert Jansen.
- Issue #22219: The zipfile module CLI now adds entries for directories
(including empty directories) in ZIP file.
- Issue #22508: The email.__version__ variable has been removed; the email
code is no longer shipped separately from the stdlib, and __version__
hasn't been updated in several releases.
- Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
- Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
- Issue #23392: Added tests for marshal C API that works with FILE*.
- Issue #10510: distutils register and upload methods now use HTML standards
compliant CRLF line endings.
- Issue #5309: distutils' build and build_ext commands now accept a ``-j``
option to enable parallel building of extension modules.
- Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
directory attributes.
- Issue #22278: Fix urljoin problem with relative urls, a regression observed
after changes to issue22118 were submitted.
- Issue #4180: The warnings registries are now reset when the filters
are modified.
- Issue #22419: Limit the length of incoming HTTP request in wsgiref server to
65536 bytes and send a 414 error code for higher lengths. Patch contributed
by Devin Cook.
- Issue #21147: sqlite3 now raises an exception if the request contains a null
character instead of truncate it. Based on patch by Victor Stinner.
- Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
empty string or tuple argument.
- Issue #21951: Tkinter now most likely raises MemoryError instead of crash
if the memory allocation fails.
- Issue #22338: Fix a crash in the json module on memory allocation failure.
- Issue #22226: First letter no longer is stripped from the "status" key in
the result of Treeview.heading().
- Issue #19524: Fixed resource leak in the HTTP connection when an invalid
response is received. Patch by Martin Panter.
- Issue #20421: Add a .version() method to SSL sockets exposing the actual
protocol version in use.
- Issue #21597: The separator between the turtledemo text pane and the drawing
canvas can now be grabbed and dragged with a mouse. The code text pane can
be widened to easily view or copy the full width of the text. The canvas
can be widened on small screens. Original patches by Jan Kanis and Lita Cho.
- Issue #22216: smtplib now resets its state more completely after a quit. The
most obvious consequence of the previous behavior was a STARTTLS failure
during a connect/starttls/quit/connect/starttls sequence.
- Issue #22118: Switch urllib.parse to use RFC 3986 semantics for the
resolution of relative URLs, rather than RFCs 1808 and 2396.
Patch by Demian Brecht.
- Issue #21549: Added the "members" parameter to TarFile.list().
- Issue #22068: Avoided reference loops with Variables and Fonts in Tkinter.
- Issue #22184: The functools LRU Cache decorator factory now gives an earlier
and clearer error message when the user forgets the required parameters.
- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
AIX. Based on patch by Delhallt.
- Issue #22176: Update the ctypes module's libffi to v3.1. This release
adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
architectures.
- Issue #5411: Added support for the "xztar" format in the shutil module.
- Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the
__new__() method.
- Issue #22127: Bypass IDNA for pure-ASCII host names in the socket module
(in particular for numeric IPs).
- Issue #21047: set the default value for the *convert_charrefs* argument
of HTMLParser to True. Patch by Berker Peksag.
- Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
In particular this allows initializing images from binary data.
- Issue #17172: Make turtledemo start as active on OS X even when run with
subprocess. Patch by Lita Cho.
- Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
- Issue #19884: readline: Disable the meta modifier key if stdout is not
a terminal to not write the ANSI sequence ``"\033[1034h"`` into stdout. This
sequence is used on some terminal (ex: TERM=xterm-256color") to enable
support of 8 bit characters.
- Issue #4350: Removed a number of out-of-dated and non-working for a long time
Tkinter methods.
- Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
specified.
- Issue #22031: Reprs now always use hexadecimal format with the "0x" prefix
when contain an id in form " at 0x...".
- Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
- Issue #21151: Fixed a segfault in the winreg module when ``None`` is passed
as a ``REG_BINARY`` value to SetValueEx. Patch by John Ehresman.
- Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
it ignored I/O errors if at least the first C call read() succeed.
- Issue #21863: cProfile now displays the module name of C extension functions,
in addition to their own name.
- Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper
object is destroyed. The destructor now closes the file if needed. The
close() method can now be called twice: the second call does nothing.
- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
files closing. Patch by Claudiu Popa.
- Issue #21722: The distutils "upload" command now exits with a non-zero
return code when uploading fails. Patch by Martin Dengler.
- Issue #21723: asyncio.Queue: support any type of number (ex: float) for the
maximum size. Patch written by Vajrasky Kok.
- Issue #21711: support for "site-python" directories has now been removed
from the site module (it was deprecated in 3.4).
- Issue #18039: dbm.dump.open() now always creates a new database when the
flag has the value 'n'. Patch by Claudiu Popa.
- Issue #11709: Fix the pydoc.help function to not fail when sys.stdin is not a
valid file.
- Issue #13223: Fix pydoc.writedoc so that the HTML documentation for methods
that use 'self' in the example code is generated correctly.
- Issue #21463: In urllib.request, fix pruning of the FTP cache.
- Issue #21618: The subprocess module could fail to close open fds that were
inherited by the calling process and already higher than POSIX resource
limits would otherwise allow. On systems with a functioning /proc/self/fd
or /dev/fd interface the max is now ignored and all fds are closed.
- Issue #21552: Fixed possible integer overflow of too long string lengths in
the tkinter module on 64-bit platforms.
- Issue #14315: The zipfile module now ignores extra fields in the central
directory that are too short to be parsed instead of letting a struct.unpack
error bubble up as this "bad data" appears in many real world zip files in
the wild and is ignored by other zip tools.
- Issue #21402: tkinter.ttk now works when default root window is not set.
- Issue #18807: If copying (no symlinks) specified for a venv, then the python
interpreter aliases (python, python3) are now created by copying rather than
symlinking.
- Issue #20197: Added support for the WebP image type in the imghdr module.
Patch by Fabrice Aneche and Claudiu Popa.
- Issue #21137: Improve the repr for threading.Lock() and its variants
by showing the "locked" or "unlocked" status. Patch by Berker Peksag.
- Issue #21538: The plistlib module now supports loading of binary plist files
when reference or offset size is not a power of two.
- Issue #21525: Most Tkinter methods which accepted tuples now accept lists too.
- Issue #22236: Tkinter tests now don't reuse default root window. New root
window is created for every test class.
- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
shape.
- Issue #20826: Optimize ipaddress.collapse_addresses().
- Issue #13916: Disallowed the surrogatepass error handler for non UTF-\*
encodings.
- Issue #21398: Fix a unicode error in the pydoc pager when the documentation
contains characters not encodable to the stdout encoding.
- Issue #18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman
- Issue #19385: Make operations on a closed dbm.dumb database always raise the
same exception.
- Issue #21207: Detect when the os.urandom cached fd has been closed or
replaced, and open it anew.
- Issue #21127: Path objects can now be instantiated from str subclass
instances (such as ``numpy.str_``).
- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
- Issue #21197: Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX.
- Issue #17498: Some SMTP servers disconnect after certain errors, violating
strict RFC conformance. Instead of losing the error code when we issue the
subsequent RSET, smtplib now returns the error code and defers raising the
SMTPServerDisconnected error until the next command is issued.
- Issue #20539: Improved math.factorial error message for large positive inputs
and changed exception type (OverflowError -> ValueError) for large negative
inputs.
- Issue #19505: The items, keys, and values views of OrderedDict now support
reverse iteration using reversed().
- Issue #21082: In os.makedirs, do not set the process-wide umask. Note this
changes behavior of makedirs when exist_ok=True.
- Issue #20995: Enhance default ciphers used by the ssl module to enable
better security and prioritize perfect forward secrecy.
- Issue #19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
:py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the
``surrogateescape`` error handler, instead of the ``strict`` error handler.
- Issue #20574: Implement incremental decoder for cp65001 code (Windows code
page 65001, Microsoft UTF-8).
- Issue #20879: Delay the initialization of encoding and decoding tables for
base32, ascii85 and base85 codecs in the base64 module, and delay the
initialization of the unquote_to_bytes() table of the urllib.parse module, to
not waste memory if these modules are not used.
- Issue #19157: Include the broadcast address in the usuable hosts for IPv6
in ipaddress.
- Issue #11599: When an external command (e.g. compiler) fails, distutils now
prints out the whole command line (instead of just the command name) if the
environment variable DISTUTILS_DEBUG is set.
- Issue #4931: distutils should not produce unhelpful "error: None" messages
anymore. distutils.util.grok_environment_error is kept but doc-deprecated.
- Issue #20283: RE pattern methods now accept the string keyword parameters
as documented. The pattern and source keyword parameters are left as
deprecated aliases.
- Issue #20791: copy.copy() now doesn't make a copy when the input is
a bytes object. Initial patch by Peter Otten.
- Issue #11571: Ensure that the turtle window becomes the topmost window
when launched on OS X.
IDLE
----
- Issue #20577: Configuration of the max line length for the FormatParagraph
extension has been moved from the General tab of the Idle preferences dialog
to the FormatParagraph tab of the Config Extensions dialog.
Patch by Tal Einat.
- Issue #16893: Update Idle doc chapter to match current Idle and add new
information.
- Issue #4832: Save As to type Python files automatically adds .py to the
name you enter (even if your system does not display it). Some systems
automatically add .txt when type is Text files.
- Issue #21986: Code objects are not normally pickled by the pickle module.
To match this, they are no longer pickled when running under Idle.
- Issue #21139: Change default paragraph width to 72, the PEP 8 recommendation.
- Issue #21284: Paragraph reformat test passes after user changes reformat width.
Build
-----
- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
SSL 3.
- Issue #22592: Drop support of the Borland C compiler to build Python. The
distutils module still supports it to build extensions.
- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
above. Patch by Zachary Turner.
- Issue #18093: the programs that embed the CPython runtime are now in a
separate "Programs" directory, rather than being kept in the Modules
directory.
- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
now display special message when and only when there are failures.
- Issue #21141: The Windows build process no longer attempts to find Perl,
instead relying on OpenSSL source being configured and ready to build. The
``PCbuild\build_ssl.py`` script has been re-written and re-named to
``PCbuild\prepare_ssl.py``, and takes care of configuring OpenSSL source
for both 32 and 64 bit platforms. OpenSSL sources obtained from
svn.python.org will always be pre-configured and ready to build.
- Issue #19962: The Windows build process now creates "python.bat" in the
root of the source tree, which passes all arguments through to the most
recently built interpreter.
- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
- Issue #15234: For BerkelyDB and Sqlite, only add the found library and
include directories if they aren't already being searched. This avoids
an explicit runtime library dependency.
- Issue #15968: Incorporated Tcl, Tk, and Tix builds into the Windows build
solution.
- Issue #17219: Add library build dir for Python extension cross-builds.
- Issue #22919: Windows build updated to support VC 14.0 (Visual Studio 2015),
which will be used for the official release.
C API
-----
- Issue #22079: PyType_Ready() now checks that statically allocated type has
no dynamically allocated bases.
Documentation
-------------
- Issue #19548: Update the codecs module documentation to better cover the
distinction between text encodings and other codecs, together with other
clarifications. Patch by Martin Panter.
- Issue #21514: The documentation of the json module now refers to new JSON RFC
7159 instead of obsoleted RFC 4627.
- Issue #21777: The binary sequence methods on bytes and bytearray are now
documented explicitly, rather than assuming users will be able to derive
the expected behaviour from the behaviour of the corresponding str methods.
- Issue #6916: undocument deprecated asynchat.fifo class.
Tests
-----
- Issue #22838: All test_re tests now work with unittest test discovery.
- Issue #20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier
de Gaye.
- Issue #19493: Refactored the ctypes test package to skip tests explicitly
rather than silently.
- Issue #18492: All resources are now allowed when tests are not run by
regrtest.py.
- Issue #21634: Fix pystone micro-benchmark: use floor division instead of true
division to benchmark integers instead of floating point numbers. Set pystone
version to 1.2. Patch written by Lennart Regebro.
- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
- Issue #17756: Fix test_code test when run from the installed location.
- Issue #17752: Fix distutils tests when run from the installed location.
- Issue #18604: Consolidated checks for GUI availability. All platforms now
at least check whether Tk can be instantiated when the GUI resource is
requested.
- Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
values (like 0.9.8zc).
Tools/Demos
-----------
- Issue #22314: pydoc now works when the LINES environment variable is set.
- Issue #22615: Argument Clinic now supports the "type" argument for the
int converter. This permits using the int converter with enums and
typedefs.
- Issue #20079: The makelocalealias.py script now can parse the SUPPORTED file
from glibc sources and supports command line options for source paths.
- Add support for the PEP 465 matrix multiplication operator to 2to3.
- Issue #16047: Fix module exception list and __file__ handling in freeze.
Patch by Meador Inge.
Windows
-------
- The bundled version of Tcl/Tk has been updated to 8.6.3. The most visible
result of this change is the addition of new native file dialogs when
running on Windows Vista or newer. See Tcl/Tk's TIP 432 for more
information. Also, this version of Tcl/Tk includes support for Windows 10.
- Issue #17896: The Windows build scripts now expect external library sources
to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``.
- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
svn.python.org to build OpenSSL.
- Issue #21907: Improved the batch scripts provided for building Python.
- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
- Issue #22980: .pyd files with a version and platform tag (for example,
".cp35-win32.pyd") will now be loaded in preference to those without tags.
Library
-------
Documentation
-------------
Library
-------
Build
-----
- Issue #20748: Uninstalling pip does not leave behind the pyc of
the uninstaller anymore.
- Issue #20568: The Windows installer now installs the unversioned ``pip``
command in addition to the versioned ``pip3`` and ``pip3.4`` commands.
- Issue #20757: The ensurepip helper for the Windows uninstaller now skips
uninstalling pip (rather than failing) if the user has updated pip to a
different version from the one bundled with ensurepip.
- Issue #20619: Give the AST nodes of keyword-only arguments a column and line
number.
Library
-------
- Issue #20710: The pydoc summary line no longer displays the "self" parameter
for bound methods.
- Issue #20704: Implement new debug API in asyncio. Add new methods
BaseEventLoop.set_debug() and BaseEventLoop.get_debug().
Add support for setting 'asyncio.tasks._DEBUG' variable with
'PYTHONASYNCIODEBUG' environment variable.
- Issue #20681: Add new error handling API in asyncio. New APIs:
loop.set_exception_handler(), loop.default_exception_handler(), and
loop.call_exception_handler().
- Issue #19744: the ensurepip installation step now just prints a warning to
stderr rather than failing outright if SSL/TLS is unavailable. This allows
local installation of POSIX builds without SSL/TLS support.
- Issue #20594: Avoid name clash with the libc function posix_close.
Build
-----
- Issue #20641: Run MSI custom actions (pip installation, pyc compilation)
with the NoImpersonate flag, to support elevated execution (UAC).
- Issue #20404: io.TextIOWrapper (and hence the open() builtin) now uses the
internal codec marking system added for issue #19619 to throw LookupError
for known non-text encodings at stream construction time. The existing
output type checks remain in place to deal with unmarked third party
codecs.
- Issue #17162: Add PyType_GetSlot.
- Issue #20162: Fix an alignment issue in the siphash24() hash function which
caused a crash on PowerPC 64-bit (ppc64).
Library
-------
- Issue #20530: The signatures for slot builtins have been updated
to reflect the fact that they only accept positional-only arguments.
- Issue #14983: email.generator now always adds a line end after each MIME
boundary marker, instead of doing so only when there is an epilogue. This
fixes an RFC compliance bug and solves an issue with signed MIME parts.
- Issue #20540: Fix a performance regression (vs. Python 3.2) when layering
a multiprocessing Connection over a TCP socket. For small payloads, Nagle's
algorithm would introduce idle delays before the entire transmission of a
message.
- Issue #16983: the new email header parsing code will now decode encoded words
that are (incorrectly) surrounded by quotes, and register a defect.
- Issue #20536: the statistics module now correctly handle Decimal instances
with positive exponents
- Issue #20481: For at least Python 3.4, the statistics module will require
that all inputs for a single operation be of a single consistent type, or
else a mixed of ints and a single other consistent type. This avoids
some interoperability issues that arose with the previous approach of
coercing to a suitable common type.
- Issue #20531: Revert 3.4 version of fix for #19063, and apply the 3.3
version. That is, do *not* raise an error if unicode is passed to
email.message.Message.set_payload.
- Issue #20476: If a non-compat32 policy is used with any of the email parsers,
EmailMessage is now used as the factory class. The factory class should
really come from the policy; that will get fixed in 3.5.
- Issue #19186: Restore namespacing of expat symbols inside the pyexpat module.
- Issue #20053: ensurepip (and hence venv) are no longer affected by the
settings in the default pip configuration file.
- Issue #20426: When passing the re.DEBUG flag, re.compile() displays the
debug output every time it is called, regardless of the compilation cache.
- Issue #20368: The null character now correctly passed from Tcl to Python.
Improved error handling in variables-related commands.
- Issue #20311, #20452: poll and epoll now round the timeout away from zero,
instead of rounding towards zero, in select and selectors modules:
select.epoll.poll(), selectors.PollSelector.poll() and
selectors.EpollSelector.poll(). For example, a timeout of one microsecond
(1e-6) is now rounded to one millisecondi (1e-3), instead of being rounded to
zero. However, the granularity property and asyncio's resolution feature
were removed again.
- Issue #19456: ntpath.join() now joins relative paths correctly when a drive
is present.
- Issue #20105: the codec exception chaining now correctly sets the
traceback of the original exception as its __traceback__ attribute.
IDLE
----
- Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
- Update the python.gif icon for the Idle classbrowser and pathbowser
from the old green snake to the new blue and yellow snakes.
Tests
-----
- Issue #20532: Tests which use _testcapi now are marked as CPython only.
- Issue #19920: Added tests for TarFile.list(). Based on patch by Vajrasky Kok.
- Issue #19990: Added tests for the imghdr module. Based on patch by
Claudiu Popa.
Tools/Demos
-----------
- Issue #20530: Argument Clinic's signature format has been revised again.
The new syntax is highly human readable while still preventing false
positives. The syntax also extends Python syntax to denote "self" and
positional-only parameters, allowing inspect.Signature objects to be
totally accurate for all supported builtins in Python 3.4.
- Issue #20456: Cloned functions in Argument Clinic now use the correct
name, not the name of the function they were cloned from, for text
strings inside generated code.
- Issue #20456: Fixed Argument Clinic's test suite and "--converters" feature.
- Issue #20326: Argument Clinic now generates separate checksums for the
input and output sections of the block, allowing external tools to verify
that the input has not changed (and thus the output is not out-of-date).
Build
-----
C-API
-----
Documentation
-------------
- Issue #2382: SyntaxError cursor "^" is now written at correct position in most
cases when multibyte characters are in line (before "^"). This still not
works correctly with wide East Asian characters.
- Issue #18960: The first line of Python script could be executed twice when
the source encoding was specified on the second line. Now the source encoding
declaration on the second line isn't effective if the first line contains
anything except a comment. 'python -x' works now again with files with the
source encoding declarations, and can be used to make Python batch files
on Windows.
Library
-------
- Issue #20189: unittest.mock now no longer assumes that any object for
which it could get an inspect.Signature is a callable written in Python.
Fix courtesy of Michael Foord.
- Issue #20262: Warnings are raised now when duplicate names are added in the
ZIP file or too long ZIP file comment is truncated.
- Issue #20165: The unittest module no longer considers tests marked with
@expectedFailure successful if they pass.
- Issue #20243: TarFile no longer raise ReadError when opened in write mode.
- Issue #20238: TarFile opened with external fileobj and "w:gz" mode didn't
write complete output on close.
- Issue #20245: The open functions in the tarfile module now correctly handle
empty mode.
- Issue #13107: argparse and optparse no longer raises an exception when output
a help on environment with too small COLUMNS. Based on patch by
Elazar Gershuni.
- Issue #18960: The tokenize module now ignore the source encoding declaration
on the second line if the first line contains anything except a comment.
- Issue #20078: Reading malformed zipfiles no longer hangs with 100% CPU
consumption.
- Issue #14455: Fix some problems with the new binary plist support in plistlib.
IDLE
----
- Issue #17390: Add Python version to Idle editor window title bar.
Original patches by Edmond Burnett and Kent Johnson.
- Issue #18960: IDLE now ignores the source encoding declaration on the second
line if the first line contains anything except a comment.
Tests
-----
- Issue #19886: Use better estimated memory requirements for bigmem tests.
Tools/Demos
-----------
- Issue #20390: Argument Clinic's "class" directive syntax has been extended
with two new required arguments: "typedef" and "type_object".
- Issue #20390: Argument Clinic now fails if you have required parameters after
optional parameters.
- Issue #20390: Argument Clinic converters now have a new template they can
inject code into: "modifiers". Code put there is run in the parsing
function after argument parsing but before the call to the impl.
- Issue #20381: Argument Clinic now sanity checks the default argument when
c_default is also specified, providing a nice failure message for
disallowed values.
- Issue #20189: Argument Clinic now ensures that parser functions for
__new__ are always of type newfunc, the type of the tp_new slot.
Similarly, parser functions for __init__ are now always of type initproc,
the type of tp_init.
- Issue #20189: Argument Clinic now suppresses the docstring for __new__
and __init__ functions if no docstring is provided in the input.
- Issue #20189: Argument Clinic now suppresses the "self" parameter in the
impl for @staticmethod functions.
- Issue #20294: Argument Clinic now supports argument parsing for __new__ and
__init__ functions.
- Issue #20299: Argument Clinic custom converters may now change the default
value of c_default and py_default with a class member.
- Issue #19936: Added executable bits or shebang lines to Python scripts which
requires them. Disable executable bits and shebang lines in test and
benchmark files in order to prevent using a random system python, and in
source files of modules which don't provide command line interface. Fixed
shebang lines in the unittestgui and checkpip scripts.
- Issue #20268: Argument Clinic now supports cloning the parameters and
return converter of existing functions.
- Issue #20228: Argument Clinic now has special support for class special
methods.
- Issue #20196: Fixed a bug where Argument Clinic did not generate correct
parsing code for functions with positional-only parameters where all arguments
are optional.
- Issue #18960: 2to3 and the findnocoding.py script now ignore the source
encoding declaration on the second line if the first line contains anything
except a comment.
- Issue #19723: The marker comments Argument Clinic uses have been changed
to improve readability.
- Issue #20157: When Argument Clinic renames a parameter because its name
collides with a C keyword, it no longer exposes that rename to PyArg_Parse.
- Issue #20141: Improved Argument Clinic's support for the PyArg_Parse "O!"
format unit.
- Issue #20143: The line numbers reported in Argument Clinic errors are
now more accurate.
Build
-----
- Issue #12837: Silence a tautological comparison warning on OS X under Clang in
socketmodule.c.
- Issue #19526: Exclude all new API from the stable ABI. Exceptions can be
made if a need is demonstrated.
- Issue #19995: %c, %o, %x, and %X now issue a DeprecationWarning on non-integer
input; reworded docs to clarify that an integer type should define both __int__
and __index__.
- Issue #14432: Remove the thread state field from the frame structure. Fix a
crash when a generator is created in a C thread that is destroyed while the
generator is still used. The issue was that a generator contains a frame, and
the frame kept a reference to the Python state of the destroyed C thread. The
crash occurs when a trace function is setup.
- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
billion characters) input strings in _Py_dg_strtod.
Library
-------
- Issue #20046: Locale alias table no longer contains entities which can be
calculated. Generalized support of the euro modifier.
- Issue #19744: ensurepip now provides a better error message when Python is
built without SSL/TLS support (pip currently requires that support to run,
even if only operating with local wheel files)
- Issue #19734: ensurepip now ignores all pip environment variables to avoid
odd behaviour based on user configuration settings
- Issue #20037: Avoid crashes when opening a text file late at interpreter
shutdown.
- Implemented write flow control in asyncio for proactor event loop (Windows).
- Issue #5815: Fixed support for locales with modifiers. Fixed support for
locale encodings with hyphens.
- Issue #20026: Fix the sqlite module to handle correctly invalid isolation
level (wrong type).
- Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
quotechar fields. Original patch by Vajrasky Kok.
- Issue #19855: uuid.getnode() on Unix now looks on the PATH for the
executables used to find the mac address, with /sbin and /usr/sbin as
fallbacks.
- Issue #19506: Use a memoryview to avoid a data copy when piping data
to stdin within subprocess.Popen.communicate. 5-10% less cpu usage.
- Issue #19908: pathlib now joins relative Windows paths correctly when a drive
is present. Original patch by Antoine Pitrou.
- Issue #19881: Fix pickling bug where cpickle would emit bad pickle data for
large bytes string (i.e., with size greater than 2**32-1).
- Issue #3693: Make the error message more helpful when the array.array()
constructor is given a str. Move the array module typecode documentation to
the docstring of the constructor.
- Issue #11480: Fixed copy.copy to work with classes with custom metaclasses.
Patch by Daniel Urban.
- Issue #6477: Added support for pickling the types of built-in singletons
(i.e., Ellipsis, NotImplemented, None).
- Issue #19713: Add remaining PEP 451-related deprecations and move away
from using find_module/find_loaer/load_module.
IDLE
----
- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
- Issue #19481: print() of string subclass instance in IDLE no longer hangs.
Tests
-----
- Issue #20055: Fix test_shutil under Windows with symlink privileges held.
Patch by Vajrasky Kok.
- Issue #20070: Don't run test_urllib2net when network resources are not
enabled.
- Issue #19828: Fixed test_site when the whole suite is run with -S.
- Issue #19588: Fixed tests in test_random that were silently skipped most
of the time. Patch by Julian Gindi.
Build
-----
Documentation
-------------
- Issue #18840: Introduce the json module in the tutorial, and de-emphasize
the pickle module.
Tools/Demos
-----------
- Issue #19183: Implement PEP 456 'secure and interchangeable hash algorithm'.
Python now uses SipHash24 on all major platforms.
- Issue #12892: The utf-16* and utf-32* encoders no longer allow surrogate code
points (U+D800-U+DFFF) to be encoded. The utf-32* decoders no longer decode
byte sequences that correspond to surrogate code points. The surrogatepass
error handler now works with the utf-16* and utf-32* codecs. Based on
patches by Victor Stinner and Kang-Hao (Kenny) Lu.
- Issue #19466: Clear the frames of daemon threads earlier during the
Python shutdown to call objects destructors. So "unclosed file" resource
warnings are now corretly emitted for daemon threads.
- Issue #17936: Fix O(n**2) behaviour when adding or removing many subclasses
of a given type.
- Issue #19428: zipimport now handles errors when reading truncated or invalid
ZIP archive.
Library
-------
- Issue #3158: doctest can now find doctests in functions and methods
written in C.
- Issue #13592: Improved the repr for regular expression pattern objects.
Based on patch by Hugo Lopes Tavares.
- Issue #19673: Add pathlib to the stdlib as a provisional module (PEP 428).
- Issue #16596: pdb in a generator now properly skips over yield and
yield from rather than stepping out of the generator into its
caller. (This is essential for stepping through asyncio coroutines.)
- Issue #19552: venv now supports bootstrapping pip into virtual environments
- Issue #19682: Fix compatibility issue with old version of OpenSSL that
was introduced by Issue #18379.
- Issue #14455: plistlib now supports binary plists and has an updated API.
- Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
big-endian platforms.
- Issue #17276: MD5 as default digestmod for HMAC is deprecated. The HMAC
module supports digestmod names, e.g. hmac.HMAC('sha1').
- Issue #19449: in csv's writerow, handle non-string keys when generating the
error message that certain keys are not in the 'fieldnames' list.
- Issue #17618: Add Base85 and Ascii85 encoding/decoding to the base64 module.
- Fix compilation error under gcc of the ctypes module bundled libffi for arm.
- Issue #19448: Add private API to SSL module to lookup ASN.1 objects by OID,
NID, short name and long name.
- Issue #8311: Added support for writing any bytes-like objects in the aifc,
sunau, and wave modules.
- Issue #5202: Added support for unseekable files in the wave module.
- Issue #19523: Closed FileHandler leak which occurred when delay was set.
- Issue #19544 and Issue #6516: Restore support for --user and --group
parameters to sdist command accidentally rolled back as part of the
distutils2 rollback.
- Issue #19544 and Issue #6286: Restore use of urllib over http allowing use
of http_proxy for Distutils upload command, a feature accidentally lost
in the rollback of distutils2.
- Issue #19544 and Issue #7457: Restore the read_pkg_file method to
distutils.dist.DistributionMetadata accidentally removed in the undo of
distutils2.
- Issue #16685: Added support for any bytes-like objects in the audioop module.
Removed support for strings.
- Issue #19261: Added support for writing 24-bit samples in the sunau module.
- Issue #19378: Fixed a number of cases in the dis module where the new
"file" parameter was not being honoured correctly
- Issue #19480: HTMLParser now accepts all valid start-tag names as defined
by the HTML5 standard.
- Issue #15114: The html.parser module now raises a DeprecationWarning when the
strict argument of HTMLParser or the HTMLParser.error method are used.
- Issue #19330: the unnecessary wrapper functions have been removed from the
implementations of the new contextlib.redirect_stdout and
contextlib.suppress context managers, which also ensures they provide
reasonable help() output on instances
- Issue #19393: Fix symtable.symtable function to not be confused when there are
functions or classes named "top".
- Issue #19288: Fixed the "in" operator of dbm.gnu databases for string
argument. Original patch by Arfrever Frehtes Taifersar Arahesis.
- Issue #19287: Fixed the "in" operator of dbm.ndbm databases for string
argument. Original patch by Arfrever Frehtes Taifersar Arahesis.
- Issue #19327: Fixed the working of regular expressions with too big charset.
- Issue #15207: Fix mimetypes to read from correct part of Windows registry
Original patch by Dave Chambers
- Issue #18958: Improve error message for json.load(s) while passing a string
that starts with a UTF-8 BOM.
- Issue #19307: Improve error message for json.load(s) while passing objects
of the wrong type.
- Issue #17087: Improved the repr for regular expression match objects.
Tests
-----
- Issue #19085: Added basic tests for all tkinter widget options.
- Issue #19384: Fix test_py_compile for root user, patch by Claudiu Popa.
Documentation
-------------
Build
-----
- Issue #19358: "make clinic" now runs the Argument Clinic preprocessor
over all CPython source files.
- Add workaround for VS 2010 nmake clean issue. VS 2010 doesn't set up PATH
for nmake.exe correctly.
- Issue #19520: Fix compiler warning in the _sha3 module on 32bit Windows.
- Issue #19649: On OS X, the same set of file names are now installed
in bin directories for all configurations: non-framework vs framework,
and single arch vs universal builds. pythonx.y-32 is now always
installed for 64-bit/32-bit universal builds. The obsolete and
undocumented pythonw* symlinks are no longer installed anywhere.
- Issue #19553: PEP 453 - "make install" and "make altinstall" now install or
upgrade pip by default, using the bundled pip provided by the new ensurepip
module. A new configure option, --with-ensurepip[=upgrade|install|no], is
available to override the default ensurepip "--upgrade" option. The option
can also be set with "make [alt]install ENSUREPIP=[upgrade|install|no]".
- Issue #19551: PEP 453 - the OS X installer now installs pip by default.
Tools/Demos
-----------
- Issue #19730: Argument Clinic now supports all the existing PyArg
"format units" as legacy converters, as well as two new features:
"self converters" and the "version" directive.
- Issue #19301: Give classes and functions that are explicitly marked global a
global qualname.
- Issue #4555: All exported C symbols are now prefixed with either
"Py" or "_Py".
Library
-------
- Issue #17457: unittest test discovery now works with namespace packages.
Patch by Claudiu Popa.
- Issue #18235: Fix the sysconfig variables LDSHARED and BLDSHARED under AIX.
Patch by David Edelsohn.
- Issue #18606: Add the new "statistics" module (PEP 450). Contributed
by Steven D'Aprano.
- Issues #19201, Issue #19222, Issue #19223: Add "x" mode (exclusive creation)
in opening file to bz2, gzip and lzma modules. Patches by Tim Heaney and
Vajrasky Kok.
- Issue #18891: Completed the new email package (provisional) API additions
by adding new classes EmailMessage, MIMEPart, and ContentManager.
- Issue #18999: Multiprocessing now supports 'contexts' with the same API
as the module, but bound to specified start methods.
- Issue #18468: The re.split, re.findall, and re.sub functions and the group()
and groups() methods of match object now always return a string or a bytes
object.
- Issue #18725: The textwrap module now supports truncating multiline text.
- Issue #18776: atexit callbacks now display their full traceback when they
raise an exception.
- Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams.
- Issue #19205: Don't import the 're' module in site and sysconfig module to
speed up interpreter start.
- Issue #18764: Remove the 'print' alias for the PDB 'p' command so that it no
longer shadows the print function.
- Issue #10712: 2to3 has a new "asserts" fixer that replaces deprecated names
of unittest methods (e.g. failUnlessEqual -> assertEqual).
- Issue #18037: 2to3 now escapes ``'\u'`` and ``'\U'`` in native strings.
C API
-----
- Issue #1772673: The type of `char*` arguments now changed to `const char*`.
Tests
-----
- Issue #18919: Unified and extended tests for audio modules: aifc, sunau and
wave.
Documentation
-------------
- Issue #18972: Modernize email examples and use the argparse module in them.
Build
-----
- Issue #19130: Correct PCbuild/readme.txt, Python 3.3 and 3.4 require VS 2010.
- Issue #19019: Change the OS X installer build script to use CFLAGS instead
of OPT for special build options. By setting OPT, some compiler-specific
options like -fwrapv were overridden and thus not used, which could result
in broken interpreters when building with clang.
- Issue #19098: Prevent overflow in the compiler when the recursion limit is set
absurdly high.
Library
-------
- Issue #18594: The fast path for collections.Counter() was never taken
due to an over-restrictive type check.
- Issue #18626: the inspect module now offers a basic command line
introspection interface (Initial patch by Claudiu Popa)
- Issue #3015: Fixed tkinter with wantobject=False. Any Tcl command call
returned empty string.
- Issue #19037: The mailbox module now makes all changes to maildir files
before moving them into place, to avoid race conditions with other programs
that may be accessing the maildir directory.
- Issue #18873: The tokenize module now detects Python source code encoding
only in comment lines.
- Issue #17324: Fix http.server's request handling case on trailing '/'. Patch
contributed by Vajrasky Kok.
- Issue #18784: The uuid module no longer attempts to load libc via ctypes.CDLL
if all the necessary functions have already been found in libuuid. Patch by
Evgeny Sologubov.
Tests
-----
IDLE
----
- Issue #18873: IDLE now detects Python source code encoding only in comment
lines.
- Issue #18988: The "Tab" key now works when a word is already autocompleted.
Documentation
-------------
- Issue #17003: Unified the size argument names in the io module with common
practice.
Build
-----
- Issue #18596: Support the use of address sanity checking in recent versions
of clang and GCC by appropriately marking known false alarms in the small
object allocator. Patch contributed by Dhiru Kholia.
Tools/Demos
-----------
- Issue #18873: 2to3 and the findnocoding.py script now detect Python source
code encoding only in comment lines.
- Issue #18571: Implementation of the PEP 446: file descriptors and file
handles are now created non-inheritable; add functions
os.get/set_inheritable(), os.get/set_handle_inheritable() and
socket.socket.get/set_inheritable().
- Issue #11619: The parser and the import machinery do not encode Unicode
filenames anymore on Windows.
- Issue #18774: Remove last bits of GNU PTH thread code and thread_pth.h.
- Issue #18771: Add optimization to set object lookups to reduce the cost
of hash collisions. The core idea is to inspect a second key/hash pair
for each cache line retrieved.
- Issue #16105: When a signal handler fails to write to the file descriptor
registered with ``signal.set_wakeup_fd()``, report an exception instead
of ignoring the error.
- Issue #15301: Parsing fd, uid, and gid parameters for builtins
in Modules/posixmodule.c is now far more robust.
- Issue #18780: %-formatting codes %d, %i, and %u now treat int-subclasses
as int (displays value of int-subclass instead of str(int-subclass) ).
Library
-------
- Issue #18808: Thread.join() now waits for the underlying thread state to
be destroyed before returning. This prevents unpredictable aborts in
Py_EndInterpreter() when some non-daemon threads are still running.
- Issue #18458: Prevent crashes with newer versions of libedit. Its readline
emulation has changed from 0-based indexing to 1-based like gnu readline.
- Issue #18878: sunau.open now supports the context management protocol. Based on
patches by Claudiu Popa and R. David Murray.
- Issue #18876: The FileIO.mode attribute now better reflects the actual mode
under which the file was opened. Patch by Erik Bray.
- Issue #18901: The sunau getparams method now returns a namedtuple rather than
a plain tuple. Patch by Claudiu Popa.
- Issue #17487: The result of the wave getparams method now is pickleable again.
Patch by Claudiu Popa.
- Issue #18418: After fork(), reinit all threads states, not only active ones.
Patch by A. Jesse Jiryu Davis.
- Issue #17974: Switch unittest from using getopt to using argparse.
- Issue #11798: TestSuite now drops references to own tests after execution.
- Issue #16611: http.cookie now correctly parses the 'secure' and 'httponly'
cookie flags.
- Issue #11973: Fix a problem in kevent. The flags and fflags fields are now
properly handled as unsigned.
- Issue #18538: ``python -m dis`` now uses argparse for argument processing.
Patch by Michele Orrù.
- Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj
argument.
- Issue #18324: set_payload now correctly handles binary input. This also
supersedes the previous fixes for #14360, #1717, and #16564.
- Issue #17119: Fixed integer overflows when processing large strings and tuples
in the tkinter module.
- Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of
OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function.
- Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke
malloc weak symbols.
- Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
inside subjectAltName correctly. Formerly the module has used OpenSSL's
GENERAL_NAME_print() function to get the string represention of ASN.1
strings for ``rfc822Name`` (email), ``dNSName`` (DNS) and
``uniformResourceIdentifier`` (URI).
- Issue #18701: Remove support of old CPython versions (<3.0) from C code.
- Issue #18756: Improve error reporting in os.urandom() when the failure
is due to something else than /dev/urandom not existing (for example,
exhausting the file descriptor limit).
- Issue #18532: Change the builtin hash algorithms' names to lower case names
as promised by hashlib's documentation.
- Issue #8713: add new spwan and forkserver start methods, and new functions
get_all_start_methods, get_start_method, and set_start_method, to
multiprocessing.
- Issue #12015: The tempfile module now uses a suffix of 8 random characters
instead of 6, to reduce the risk of filename collision. The entropy was
reduced when uppercase letters were removed from the charset used to generate
random characters.
- Issue #18621: Prevent the site module's patched builtins from keeping
too many references alive for too long.
- Issue #4885: Add weakref support to mmap objects. Patch by Valerie Lambert.
- Issue #18920: argparse's default destination for the version action (-v,
--version) has also been changed to stdout, to match the Python executable.
Tests
-----
IDLE
----
- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster.
Documentation
-------------
Build
-----
- Issue #1584: Provide configure options to override default search paths for
Tcl and Tk when building _tkinter.
- Issue #15663: Tcl/Tk 8.5.14 is now included with the OS X 10.6+ 64-/32-bit
installer. It is no longer necessary to install a third-party version of
Tcl/Tk 8.5 to work around the problems in the Apple-supplied Tcl/Tk 8.5
shipped in OS X 10.6 and later releases.
Tools/Demos
-----------
- Issue #9035: ismount now recognises volumes mounted below a drive root
on Windows. Original patch by Atsuo Ishimoto.
- Issue #18408: Fix many various bugs in code handling errors, especially
on memory allocation failure (MemoryError).
- Issue #18342: Use the repr of a module name when an import fails when using
``from ... import ...``.
- Issue #18338: `python --version` now prints version string to stdout, and
not to stderr. Patch by Berker Peksag and Michael Dickens.
- Issue #17206: On Windows, increase the stack size from 2 MB to 4.2 MB to fix
a stack overflow in the marshal module (fix a crash in test_marshal).
Patch written by Jeremy Kloth.
- Issue #3329: Implement the PEP 445: Add new APIs to customize Python memory
allocators.
- Issue #18183: Fix various unicode operations on strings with large unicode
codepoints.
- Tweak the exception message when the magic number or size value in a bytecode
file is truncated.
- Issue #18065: Don't set __path__ to the package name for frozen packages.
- Issue #12370: Prevent class bodies from interfering with the __class__
closure.
- Issue #17644: Fix a crash in str.format when curly braces are used in square
brackets.
- Issue #17927: Frame objects kept arguments alive if they had been
copied into a cell, even if the cell was cleared.
- Issue #7330: Implement width and precision (ex: "%5.3s") for the format
string of PyUnicode_FromFormat() function, original patch written by Ysj Ray.
- Issue #17094: Clear stale thread states after fork(). Note that this
is a potentially disruptive change since it may release some system
resources which would otherwise remain perpetually alive (e.g. database
connections kept in thread-local storage).
- Issue #17408: Avoid using an obsolete instance of the copyreg module when
the interpreter is shutdown and then started again.
- Issue #5845: Enable tab-completion in the interactive interpreter by
default, thanks to a new sys.__interactivehook__.
- Issue #17853: Ensure locals of a class that shadow free variables always win
over the closures.
- Issue #17863: In the interactive console, don't loop forever if the encoding
can't be fetched from stdin.
- Issue #17669: Fix crash involving finalization of generators using yield from.
- Issue #14439: Python now prints the traceback on runpy failure at startup.
- Issue #17357: Add missing verbosity messages for -v/-vv that were lost during
the importlib transition.
- Issue #17323: The "[X refs, Y blocks]" printed by debug builds has been
disabled by default. It can be re-enabled with the `-X showrefcount` option.
- Issue #17275: Corrected class name in init error messages of the C version of
BufferedWriter and BufferedRandom.
- Issue #7963: Fixed misleading error message that issued when object is
called without arguments.
- Issue #5308: Raise ValueError when marshalling too large object (a sequence
with size >= 2**31), instead of producing illegal marshal data.
- Issue #12983: Bytes literals with invalid ``\x`` escape now raise a SyntaxError
and a full traceback including line number.
- Issue #17137: When a Unicode string is resized, the internal wide character
string (wstr) format is now cleared.
- Issue #17043: The unicode-internal decoder no longer read past the end of
input buffer.
- Issue #17098: All modules now have __loader__ set even if they pre-exist the
bootstrapping of importlib.
- Issue #16772: The base argument to the int constructor no longer accepts
floats, or other non-integer objects with an __int__ method. Objects
with an __index__ method are now accepted.
- Issue #16975: Fix error handling bug in the escape-decode bytes decoder.
- Issue #16906: Fix a logic error that prevented most static strings from being
cleared.
- Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB.
- Issue #16761: Calling int() with base argument only now raises TypeError.
- Issue #16759: Support the full DWORD (unsigned long) range in Reg2Py
when retrieving a REG_DWORD value. This corrects functions like
winreg.QueryValueEx that may have been returning truncated values.
- Issue #14420: Support the full DWORD (unsigned long) range in Py2Reg
when passed a REG_DWORD value. Fixes OverflowError in winreg.SetValueEx.
- Issue #16597: In buffered and text IO, call close() on the underlying stream
if invoking flush() fails.
- Issue #16421: loading multiple modules from one shared object is now
handled correctly (previously, the first module loaded from that file
was silently returned). Patch by Václav Šmilauer.
- Issue #16619: Create NameConstant AST class to represent None, True, and False
literals. As a result, these constants are never loaded at runtime from
builtins.
- Issue #16306: Fix multiple error messages when unknown command line
parameters where passed to the interpreter. Patch by Hieu Nguyen.
- Issue #16290: A float return value from the __complex__ special method is no
longer accepted in the complex() constructor.
- Issue #9535: Fix pending signals that have been received but not yet
handled by Python to not persist after os.fork() in the child process.
- Issue #14794: Fix slice.indices to return correct results for huge values,
rather than raising OverflowError.
- Issue #8271: the utf-8 decoder now outputs the correct number of U+FFFD
characters when used with the 'replace' error handler on invalid utf-8
sequences. Patch by Serhiy Storchaka, tests by Ezio Melotti.
- Issue #16271: Fix strange bugs that resulted from __qualname__ appearing in a
class's __dict__ and on type.
- Issue #12805: Make bytes.join and bytearray.join faster when the separator
is empty. Patch by Serhiy Storchaka.
- Issue #6074: Ensure cached bytecode files can always be updated by the
user that created them, even when the source file is read-only.
- Issue #14783: Improve int() docstring and switch docstrings for str(),
range(), and slice() to use multi-line signatures.
- Issue #15379: Fix passing of non-BMP characters as integers for the charmap
decoder (already working as unicode strings). Patch by Serhiy Storchaka.
- Issue #15144: Fix possible integer overflow when handling pointers as integer
values, by using `Py_uintptr_t` instead of `size_t`. Patch by Serhiy
Storchaka.
- Issue #15448: Buffered IO now frees the buffer when closed, instead
of when deallocating.
- Issue #15801: Make sure mappings passed to '%' formatting are actually
subscriptable.
Library
-------
- Issue #4331: Added functools.partialmethod (Initial patch by Alon Horev)
- Issue #14323: Expanded the number of digits in the coefficients for the
RGB -- YIQ conversions so that they match the FCC NTSC versions.
- Issue #15699: The readline module now uses PEP 3121-style module
initialization, so as to reclaim allocated resources (Python callbacks)
at shutdown. Original patch by Robin Schreiber.
- Issue #18431: The new email header parser now decodes RFC2047 encoded words
in structured headers.
- Issue #18432: The sched module's queue method was incorrectly returning
an iterator instead of a list.
- Issue #18044: The new email header parser was mis-parsing encoded words where
an encoded character immediately followed the '?' that follows the CTE
character, resulting in a decoding failure. They are now decoded correctly.
- Issue #18116: getpass was always getting an error when testing /dev/tty,
and thus was always falling back to stdin, and would then raise an exception
if stdin could not be used (such as /dev/null). It also leaked an open file.
All of these issues are now fixed.
- Issue #18240: The HMAC module is no longer restricted to bytes and accepts
any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström.
- Issue #18224: Removed pydoc script from created venv, as it causes problems
on Windows and adds no value over and above python -m pydoc ...
- Issue #18155: The csv module now correctly handles csv files that use
a delimter character that has a special meaning in regexes, instead of
throwing an exception.
- Issue #11390: Add -o and -f command line options to the doctest CLI to
specify doctest options (and convert it to using argparse).
- Issue #18058, 18057: Make the namespace package loader meet the
importlib.abc.InspectLoader ABC, allowing for namespace packages to work with
runpy.
- subprocess: Prevent a possible double close of parent pipe fds when the
subprocess exec runs into an error. Prevent a regular multi-close of the
/dev/null fd when any of stdin, stdout and stderr was set to DEVNULL.
- Issue #11959: SMTPServer and SMTPChannel now take an optional map, use of
which avoids affecting global state.
- Issue #18109: os.uname() now decodes fields from the locale encoding, and
socket.gethostname() now decodes the hostname from the locale encoding,
instead of using the UTF-8 encoding in strict mode.
- Issue #16986: ElementTree now correctly works with string input when the
internal XML encoding is not UTF-8 or US-ASCII.
- Issue #17996: socket module now exposes AF_LINK constant on BSD and OSX.
- Issue #17981: logging's SysLogHandler now closes the socket when it catches
socket OSErrors.
- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
is long, not int.
- Issue #17289: The readline module now plays nicer with external modules
or applications changing the rl_completer_word_break_characters global
variable. Initial patch by Bradley Froehle.
- Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit
platforms. Patch by Federico Schwindt.
- Issue #17353: Plistlib emitted empty data tags with deeply nested datastructures
- Issue #17341: Include the invalid name in the error messages from re about
invalid group names.
- Issue #17702: os.environ now raises KeyError with the original environment
variable name (str on UNIX), instead of using the encoded name (bytes on
UNIX).
- Issue #16804: Fix a bug in the 'site' module that caused running
'python -S -m site' to incorrectly throw an exception.
- Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal.
Initial patch by Daniel Riti.
- Issue #17016: Get rid of possible pointer wraparounds and integer overflows
in the re module. Patch by Nickolai Zeldovich.
- Issue #9556: the logging package now allows specifying a time-of-day for a
TimedRotatingFileHandler to rotate.
- Issue #14971: unittest test discovery no longer gets confused when a function
has a different __name__ than its name in the TestCase class dictionary.
- Issue #17487: The wave getparams method now returns a namedtuple rather than
a plain tuple.
- Issue #17675: socket repr() provides local and remote addresses (if any).
Patch by Giampaolo Rodola'
- Issue #17093: Make the ABCs in importlib.abc provide default values or raise
reasonable exceptions for their methods to make them more amenable to super()
calls.
- Issue #17502: Process DEFAULT values in mock side_effect that returns iterator.
- Issue #17032: The "global" in the "NameError: global name 'x' is not defined"
error message has been removed. Patch by Ram Rachum.
- Implement PEP 435 "Adding an Enum type to the Python standard library".
- Issue #17526: fix an IndexError raised while passing code without filename to
inspect.findsource(). Initial patch by Tyler Doyle.
- Issue #16692: The ssl module now supports TLS 1.1 and TLS 1.2. Initial
patch by Michele Orrù.
- Issue #17150: pprint now uses line continuations to wrap long string
literals.
- Issue #17485: Also delete the Request Content-Length header if the data
attribute is deleted. (Follow on to issue Issue #16464).
- Issue #15927: CVS now correctly parses escaped newlines and carriage
when parsing with quoting turned off.
- Use the HTTPS PyPI url for upload, overriding any plain HTTP URL in pypirc.
- Issue #5024: sndhdr.whichhdr now returns the frame count for WAV files
rather than -1.
- Issue #17460: Remove the strict argument of HTTPConnection and removing the
DeprecationWarning being issued from 3.2 onwards.
- Issue #17368: Fix an off-by-one error in the Python JSON decoder that caused
a failure while decoding empty object literals when object_pairs_hook was
specified.
- Issue #14645: The email generator classes now produce output using the
specified linesep throughout. Previously if the prolog, epilog, or
body were stored with a different linesep, that linesep was used. This
fix corrects an RFC non-compliance issue with smtplib.send_message.
- Issue #16935: unittest now counts the module as skipped if it raises SkipTest,
instead of counting it as an error. Patch by Zachary Ware.
- Issue #17223: array module: Fix a crasher when converting an array containing
invalid characters (outside range [U+0000; U+10ffff]) to Unicode:
repr(array), str(array) and array.tounicode(). Patch written by Manuel Jacob.
- Issue #17225: JSON decoder now counts columns in the first line starting
with 1, as in other lines.
- Issue #13153: Tkinter functions now raise TclError instead of ValueError when
a string argument contains non-BMP character.
- Issue #9669: Protect re against infinite loops on zero-width matching in
non-greedy repeat. Patch by Matthew Barnett.
- Issue #13169: The maximal repetition number in a regular expression has been
increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on
64-bit).
- Issue #17143: Fix a missing import in the trace module. Initial patch by
Berker Peksag.
- Issue #4591: Uid and gid values larger than 2**31 are supported now.
- Issue #10355: The mode, name, encoding and newlines properties now work on
SpooledTemporaryFile objects even when they have not yet rolled over.
Obsolete method xreadline (which has never worked in Python 3) has been
removed.
- Issue #15359: Add CAN_BCM protocol support to the socket module. Patch by
Brian Thorne.
- Issue #16948: Fix quoted printable body encoding for non-latin1 character
sets in the email package.
- Issue #16811: Fix folding of headers with no value in the provisional email
policies.
- Issue #17089: Expat parser now correctly works with string input when the
internal XML encoding is not UTF-8 or US-ASCII. It also now accepts bytes
and strings larger than 2 GiB.
- Issue #17015: When it has a spec, a Mock object now inspects its signature
when matching calls, so that arguments can be matched positionally or
by name.
- Issue #12268: The io module file object write methods no longer abort early
when one of its write system calls is interrupted (EINTR).
- Issue #4844: ZipFile now raises BadZipFile when opens a ZIP file with an
incomplete "End of Central Directory" record. Original patch by Guilherme
Polo and Alan McIntyre.
- Issue #17071: Signature.bind() now works when one of the keyword arguments
is named ``self``.
- Issue #16972: Have site.addpackage() consider already known paths even when
none are explicitly passed in. Bug report and fix by Kirill.
- Issue #1159051: GzipFile now raises EOFError when reading a corrupted file
with truncated header or footer.
- Issue #16993: shutil.which() now preserves the case of the path and extension
on Windows.
- Issue #16422: For compatibility with the Python version, the C version of
decimal now uses strings instead of integers for rounding mode constants.
- Issue #15861: tkinter now correctly works with lists and tuples containing
strings with whitespaces, backslashes or unbalanced braces.
- Issue #9720: zipfile now writes correct local headers for files larger than
4 GiB.
- Issue #15031: Refactor some .pyc management code to cut down on code
duplication. Thanks to Ronan Lamy for the report and taking an initial stab
at the problem.
- Issue #13899: ``\A``, ``\Z``, and ``\B`` now correctly match the A, Z,
and B literals when used inside character classes (e.g. ``'[\A]'``).
Patch by Matthew Barnett.
- Issue #8109: The ssl module now has support for server-side SNI, thanks
to a :meth:`SSLContext.set_servername_callback` method. Patch by Daniel
Black.
- Issue #16787: Increase asyncore and asynchat default output buffers size, to
decrease CPU usage and increase throughput.
- Issue #16485: Now file descriptors are closed if file header patching failed
on closing an aifc file.
- Issue #16618: Make glob.glob match consistently across strings and bytes
regarding leading dots. Patch by Serhiy Storchaka.
- Issue #16713: Parsing of 'tel' urls using urlparse separates params from
path.
- Issue #15701: Fix HTTPError info method call to return the headers information.
- Issue #15783: Except for the number methods, the C version of decimal now
supports all None default values present in decimal.py. These values were
largely undocumented.
- Issue #16488: epoll() objects now support the `with` statement. Patch
by Serhiy Storchaka.
- Issue #16049: Add abc.ABC class to enable the use of inheritance to create
ABCs, rather than the more cumbersome metaclass=ABCMeta. Patch by Bruno
Dupuis.
- Issue #15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree
that caused it to not ignore certain errors when ignore_errors was set.
Patch by Alessandro Moura and Serhiy Storchaka.
- Issue #16248: Disable code execution from the user's home directory by
tkinter when the -E flag is passed to Python. Patch by Zachary Ware.
- Issue #13614: Fix setup.py register failure with invalid rst in description.
Patch by Julien Courteau and Pierre Paul Lefebvre.
- Issue #13512: Create ~/.pypirc securely (CVE-2011-4944). Initial patch by
Philip Jenvey, tested by Mageia and Debian.
- Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later
on. Initial patch by SilentGhost and Jeff Ramnani.
- Issue #16585: Make CJK encoders support error handlers that return bytes per
PEP 383.
- Issue #16333: use (",", ": ") as default separator in json when indent is
specified, to avoid trailing whitespace. Patch by Serhiy Storchaka.
- Issue #16464: Reset the Content-Length header when a urllib Request is reused
with new data.
- Issue #12848: The pure Python pickle implementation now treats object
lengths as unsigned 32-bit integers, like the C implementation does.
Patch by Serhiy Storchaka.
- Issue #16423: urllib.request now has support for ``data:`` URLs. Patch by
Mathias Panzenböck.
- Issue #16408: Fix file descriptors not being closed in error conditions
in the zipfile module. Patch by Serhiy Storchaka.
- Issue #16469: Fix exceptions from float -> Fraction and Decimal -> Fraction
conversions for special values to be consistent with those for float -> int
and Decimal -> int. Patch by Alexey Kachayev.
- Issue #16140: The subprocess module no longer double closes its child
subprocess.PIPE parent file descriptors on child error prior to exec().
- Remove a bare print to stdout from the subprocess module that could have
happened if the child process wrote garbage to its pre-exec error pipe.
- Issue #14396: Handle the odd rare case of waitpid returning 0 when not
expected in subprocess.Popen.wait().
- Issue #16431: Use the type information when constructing a Decimal subtype
from a Decimal argument.
- Issue #12759: sre_parse now raises a proper error when the name of the group
is missing. Initial patch by Serhiy Storchaka.
- Issue #16152: fix tokenize to ignore whitespace at the end of the code when
no newline is found. Patch by Ned Batchelder.
- Issue #16230: Fix a crash in select.select() when one of the lists changes
size while iterated on. Patch by Serhiy Storchaka.
- Issue #16228: Fix a crash in the json module where a list changes size
while it is being encoded. Patch by Serhiy Storchaka.
- Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
Patch by Serhiy Storchaka.
- Issue #16116: Fix include and library paths to be correct when building C
extensions in venvs.
- Issue #16250: Fix the invocations of URLError which had misplaced filename
attribute for exception.
- Issue #10836: Fix exception raised when file not found in urlretrieve
Initial patch by Ezio Melotti.
- Issue #14398: Fix size truncation and overflow bugs in the bz2 module.
- Issue #16270: urllib may hang when used for retrieving files via FTP by using
a context manager. Patch by Giampaolo Rodola'.
- Issue #16461: Wave library should be able to deal with 4GB wav files,
and sample rate of 44100 Hz.
- Issue #13896: Make shelf instances work with 'with' as context managers.
Original patch by Filip Gruszczyński.
- Issue #15417: Add support for csh and fish in venv activation scripts.
- Issue #15452: logging configuration socket listener now has a verify option
that allows an application to apply a verification function to the
received configuration data before it is acted upon.
- Issue #15222: Insert blank line after each message in mbox mailboxes.
- Issue #16013: Fix `csv.Reader` parsing issue with ending quote characters.
Patch by Serhiy Storchaka.
- Issue #16113: Added sha3 module based on the Keccak reference implementation
3.2. The `hashlib` module has four additional hash algorithms: `sha3_224`,
`sha3_256`, `sha3_384` and `sha3_512`. As part of the patch some common
code was moved from _hashopenssl.c to hashlib.h.
- ctypes.call_commethod was removed, since its only usage was in the defunct
samples directory.
- Issue #16692: Added TLSv1.1 and TLSv1.2 support for the ssl modules.
IDLE
----
- Issue #18429: Format / Format Paragraph, now works when comment blocks
are selected. As with text blocks, this works best when the selection
only includes complete lines.
- Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
Patch by Tal Einat, Roget Serwy, and Todd Rovito.
- Issue #5492: Avoid traceback when exiting IDLE caused by a race condition.
- Issue #17511: Keep IDLE find dialog open after clicking "Find Next".
Original patch by Sarah K.
- Issue #18055: Move IDLE off of imp and on to importlib.
- Issue #17798: Allow IDLE to edit new files when specified on command line.
- Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit().
- Issue #14254: IDLE now handles readline correctly across shell restarts.
- Issue #17614: IDLE no longer raises exception when quickly closing a file.
- Issue #6698: IDLE now opens just an editor window when configured to do so.
- Issue #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo.
- Issue #16829: IDLE printing no longer fails if there are spaces or other
special characters in the file path.
- Issue #16819: IDLE method completion now correctly works for bytes literals.
- Issue #16511: Use default IDLE width and height if config param is not valid.
Patch Serhiy Storchaka.
- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu.
Patch by Todd Rovito.
Tests
-----
- Issue #18266: test_largefile now works with unittest test discovery and
supports running only selected tests. Patch by Zachary Ware.
- Issue #18375: Assume --randomize when --randseed is used for running the
testsuite.
- Issue #18207: Fix test_ssl for some versions of OpenSSL that ignore seconds
in ASN1_TIME fields.
- Issue #17992: Add timeouts to asyncore and asynchat tests so that they won't
accidentally hang.
- Issue #17833: Fix test_gdb failures seen on machines where debug symbols
for glibc are available (seen on PPC64 Linux).
- Issue #7855: Add tests for ctypes/winreg for issues found in IronPython.
Initial patch by Dino Viehland.
- Issue #17835: Fix test_io when the default OS pipe buffer size is larger
than one million bytes.
- Issue #17065: Use process-unique key for winreg tests to avoid failures if
test is run multiple times in parallel (eg: on a buildbot host).
- Issue #17448: test_sax now skips if there are no xml parsers available
instead of raising an ImportError.
- Issue #10652: make tcl/tk tests run after __all__ test, patch by
Zachary Ware.
- Issue #16664: Add regression tests for glob's behaviour concerning entries
starting with a ".". Patch by Sebastian Kreft.
- Issue #13390: The ``-R`` option to regrtest now also checks for memory
allocation leaks, using :func:`sys.getallocatedblocks()`.
- Issue #16559: Add more tests for the json module, including some from the
official test suite at json.org. Patch by Serhiy Storchaka.
- Issue #16661: Fix the `os.getgrouplist()` test by not assuming that it gives
the same output as :command:`id -G`.
- Issue #15557: Added a test suite for the webbrowser module, thanks to Anton
Barkovsky.
Build
-----
- Issue #18481: Add C coverage reporting with gcov and lcov. A new make target
"coverage-report" creates an instrumented Python build, runs unit tests
and creates a HTML. The report can be updated with "make coverage-lcov".
- Issue #17845: Clarified the message printed when some module are not built.
- Issue #17547: In configure, explicitly pass -Wformat for the benefit for GCC
4.8.
- Issue #15172: Document NASM 2.10+ as requirement for building OpenSSL 1.0.1
on Windows.
- Issue #17591: Use lowercase filenames when including Windows header files.
Patch by Roumen Petrov.
- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
- Issue #5033: Fix building of the sqlite3 extension module when the
SQLite library version has "beta" in it. Patch by Andreas Pelme.
- Issue #17029: Let h2py search the multiarch system include directory.
- Issue #16320: Remove redundant Makefile dependencies for strings and bytes.
- Fix cross compiling issue in setup.py, ensure that lib_dirs and inc_dirs are
defined in cross compiling mode, too.
- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
- Issue #16593: Have BSD 'make -s' do the right thing, thanks to Daniel Shahaf
- Issue #15819: Make sure we can build Python out-of-tree from a read-only
source directory. (Somewhat related to issue #9860.)
- Issue #17161: make install now also installs a python3 man page.
C-API
-----
Documentation
-------------
- Issue #18440: Clarify that `hash()` can truncate the value returned from an
object's custom `__hash__()` method.
- Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs.
- Issue #17977: The documentation for the cadefault argument's default value
in urllib.request.urlopen() is fixed to match the code.
- Issue #6696: add documentation for the Profile objects, and improve
profile/cProfile docs. Patch by Tom Pinckney.
- Issue #15465: Document the versioning macros in the C API docs rather than
the standard library docs. Patch by Kushal Das.
- Issue #16406: Combine the pages for uploading and registering to PyPI.
- Issue #13094: add "Why do lambdas defined in a loop with different values
all return the same result?" programming FAQ.
- Issue #16209: Move the documentation for the str built-in function to a new
str class entry in the "Text Sequence Type" section.
- Issue #15677: Document that zlib and gzip accept a compression level of 0 to
mean 'no compression'. Patch by Brian Brazil.
- Issue #15533: Clarify docs and add tests for `subprocess.Popen()`'s cwd
argument.
Tools/Demos
-----------
- Issue #18817: Fix a resource warning in Lib/aifc.py demo. Patch by
Vajrasky Kok.
- Issue #12990: The "Python Launcher" on OSX could not launch python scripts
that have paths that include wide characters.
- Issue #17156: pygettext.py now detects the encoding of source files and
correctly writes and escapes non-ascii characters.
- Issue #16549: Make json.tool work again on Python 3 and add tests.
Initial patch by Berker Peksag and Serhiy Storchaka.
Windows
-------
- Issue #18569: The installer now adds .py to the PATHEXT variable when extensions
are registered. Patch by Paul Moore.