Académique Documents
Professionnel Documents
Culture Documents
Python News
+++++++++++
Windows
-------
- Issue #25709: Fixed problem with in-place string concatenation and utf-8
cache.
- Issue #25388: Fixed tokenizer crash when processing undecodable source code
with a null byte.
- 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 #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 #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 #21167: NAN operations are now handled correctly when python is
compiled with ICC even if -fp-model strict is not specified.
- 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 #24407: Fix crash when dict is mutated while being updated.
- Issue #24022: Fix tokenizer crash when processing undecodable source code.
Library
-------
- Issue #6478: _strptime's regexp cache now is reset after changing timezone
with time.tzset().
- 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.
- Issue #25590: In the Readline completer, only call getattr() once per
attribute.
- Issue #25498: Fix a crash when garbage-collecting ctypes objects created
by wrapping a memoryview. This was a regression made in 3.4.3. Based
on patch by Eryksun.
- Issue #18010: Fix the pydoc web server's module search function to handle
exceptions from importing packages.
- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating
ssl.SSLContext.
- 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 #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 #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 #19143: platform module now reads Windows version from kernel32.dll to
avoid compatibility shims.
- 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 #23144: Make sure that HTMLParser.feed() returns all the data, even
when convert_charrefs is True.
- Issue #16180: Exit pdb if file has syntax error, instead of trapping user
in an infinite loop. Patch by Xavier de Gaye.
- 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 #24620: Random.setstate() now validates the value of state last element.
- Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero.
- 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.
- Issue #5633: Fixed timeit when the statement is a string and the setup is not.
- Issue #23840: tokenize.open() now closes the temporary binary file on error
to fix a resource warning.
- Issue #23796: peek and read1 methods of BufferedReader now raise ValueError
if they called on a closed object. Patch by John Hergenroeder.
- Issue #24521: Fix possible integer overflows in the pickle module.
- 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.
- Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq's siftup
and siftdown functions.
- 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.
- Issue #17898: Fix exception in gettext.py when parsing certain plural forms.
- 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 #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 #23745: The new email header parser now handles duplicate MIME
parameter names without error, similar to how get_param behaves.
- Issue #21802: The reader in BufferedRWPair now is closed even when closing
writer failed in BufferedRWPair.close().
- 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 #23615: Modules bz2, tarfile and tokenize now can be reloaded with
imp.reload(). Patch by Thomas Kluyver.
- 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.
- Issues #814253, #9179: Warnings now are raised when group references and
conditional group references are used 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 #23801: Fix issue where cgi.FieldStorage did not always ignore the
entire preamble to a multipart body.
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 #24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
- Issue #23672: Allow Idle to edit and run files with astral chars in name.
Patch by Mohd Sanad Zaki Rizvi.
- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
Do not print false prompts. Original patch by Adnan Umer.
- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
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).
- 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.
Build
-----
- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
the resulting executable faster.
C API
-----
- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
- 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
-----------
Windows
-------
- Issue #24306: Sets component ID for launcher to match 3.5 and later
to avoid downgrading.
- 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 #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 #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.
Library
-------
- Issue #18518: timeit now rejects statements which can't be compiled outside
a function or a loop (e.g. "return" or "break").
- Issue #23248: Update ssl error codes from latest OpenSSL git master.
- Issue #23063: In the disutils' check command, fix parsing of reST with code or
code-block directives.
- 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 #19104: pprint now produces evaluable output for wrapped strings.
- 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 #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 #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 #18853: Fixed ResourceWarning in shlex.__nain__.
- 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 #22219: The zipfile module CLI now adds entries for directories
(including empty directories) in ZIP file.
- 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.
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.
Tests
-----
- Issue #23392: Added tests for marshal C API that works with FILE*.
- Issue #22838: All test_re tests now work with unittest test discovery.
- Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
values (like 0.9.8zc).
Build
-----
- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
SSL 3.
- Issue #17219: Add library build dir for Python extension cross-builds.
- Issue #17128: Use private version of OpenSSL for 3.4.3 OS X 10.5+ installer.
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 #22914: Update the Python 2/3 porting HOWTO to describe a more automated
approach.
- Issue #21514: The documentation of the json module now refers to new JSON RFC
7159 instead of obsoleted RFC 4627.
Tools/Demos
-----------
- Issue #22314: pydoc now works when the LINES environment variable is set.
Windows
-------
- 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 #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
Library
-------
- Issue #10510: distutils register and upload methods now use HTML standards
compliant CRLF line endings.
- Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
directory attributes.
Library
-------
- 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 #21933: Turtledemo users can change the code font size with a menu
selection or control(command) '-' or '+' or control-mousewheel.
Original patch by Lita Cho.
- 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 #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 #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 #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
In particular this allows to initialize images from binary data.
- Issue #17172: Make turtledemo start as active on OS X even when run with
subprocess. Patch by Lita Cho.
- Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
specified.
- Issue #21867: Prevent turtle crash due to invalid undo buffer size.
- Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
- Issue #21897: Fix a crash with the f_locals attribute with closure
variables when frame.clear() has been called.
- 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 #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 #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 #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 #21538: The plistlib module now supports loading of binary plist files
when reference or offset size is not a power of two.
Extension Modules
-----------------
- 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.
Build
-----
- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
above. Patch by Zachary Turner.
- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
now display special message when and only when there are failures.
IDLE
----
Tests
-----
- Issue #22236: Tkinter tests now don't reuse default root window. New root
window is created for every test class.
- 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.
Documentation
-------------
- 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.
Windows
-------
- Issue #21671, #22160, CVE-2014-0224: The bundled version of OpenSSL has been
updated to 1.0.1i.
Tools/Demos
-----------
- Issue #21418: Fix a crash in the builtin function super() when called without
argument and without current frame (ex: embedded Python).
Library
-------
- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
shape.
- Issue #21398: Fix an unicode error in the pydoc pager when the documentation
contains characters not encodable to the stdout encoding.
Tests
-----
- Issue #17756: Fix test_code test when run from the installed location.
- Issue #17752: Fix distutils tests when run from the installed location.
IDLE
----
- Issue #12546: Allow ``\x00`` to be used as a fill character when using str, int,
float, and complex __format__ methods.
Library
-------
- 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 #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 #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 an prioritize perfect forward secrecy.
- 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.
Extension Modules
-----------------
- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
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 #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.
C API
-----
Documentation
-------------
Tests
-----
- Issue #18604: Consolidated checks for GUI availability. All platforms now
at least check whether Tk can be instantiated when the GUI resource is
requested.
Tools/Demos
-----------
- 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.
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 #20465: Update OS X and Windows installer builds to use
SQLite 3.8.3.1.
- 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 #20673: Implement support for UNIX Domain Sockets in asyncio.
New APIs: loop.create_unix_connection(), loop.create_unix_server(),
streams.open_unix_connection(), and streams.start_unix_server().
- 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 #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 #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 #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 #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.
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 #17828: The interpreter now attempts to chain errors that occur in
codec processing with a replacement exception of the same type that
includes the codec name in the error message. It ensures it only does this
when the creation of the replacement exception won't lose any information.
- 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 #18775: Add name and block_size attribute to HMAC object. They now
provide the same API elements as non-keyed cryptographic hash functions.
- 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 #19282: dbm.open now supports the context management protocol. (Inital
patch by Claudiu Popa)
- 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 #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 #19424: Fix the warnings module to accept filename containing surrogate
characters.
- 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 #19378: the main dis module tests are now run with both stdout
redirection *and* passing an explicit file parameter
- 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.
- Issue #19137: The pprint module now correctly formats instances of set and
frozenset subclasses.
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 #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 #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 #18111: The min() and max() functions now support a default argument
to be returned instead of raising a ValueError on an empty sequence.
(Contributed by Julian Berman.)
- 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 #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 an 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 #16856: Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.
- 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 #16215: Fix potential double memory free in str.replace(). Patch
by Serhiy Storchaka.
- 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 #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 #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 #16163: Make the importlib based version of pkgutil.iter_importers
work for submodules. Initial patch by Berker Peksag.
- 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 #17434: Properly raise a SyntaxError when a string occurs between future
imports.
- Issue #17032: The "global" in the "NameError: global name 'x' is not defined"
error message has been removed. Patch by Ram Rachum.
- Issue #18080: When building a C extension module on OS X, if the compiler
is overriden with the CC environment variable, use the new compiler as
the default for linking if LDSHARED is not also overriden. This restores
Distutils behavior introduced in 3.2.3 and inadvertently dropped in 3.3.0.
- 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 #5713: smtplib now handles 421 (closing connection) error codes when
sending mail by closing the socket and reporting the 421 error code via the
exception appropriate to the command that received the error response.
- 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 #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 #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 #15972: Fix error messages when os functions expecting a file name or
file descriptor receive the incorrect type.
- 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 #16860: In tempfile, use O_CLOEXEC when available to set the
close-on-exec flag atomically.
- 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 #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.
- The subprocess module now raises its own SubprocessError instead of a
RuntimeError in various error situations which should not normally happen.
- 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 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 #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.
- Issue #16123: IDLE - deprecate running without a subprocess.
Patch by Roger Serwy.
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 #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 #17249: convert a test in test_capi to use unittest and reap threads.
- 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 #16262: fix out-of-src-tree builds, if mercurial is not installed.
- 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 #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 #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.
- Issue #16060: Fix refcounting bug when `__trunc__()` returns an object whose
`__int__()` gives a non-integer. Patch by Serhiy Storchaka.
Extension Modules
-----------------
- Issue #16012: Fix a regression in pyexpat. The parser's `UseForeignDTD()`
method doesn't require an argument again.
- Fixes for a few crash and memory leak regressions found by Coverity.
Library
-------
Extension Modules
-----------------
- Issue #15781: Fix two small race conditions in import's module locking.
Library
-------
- Issue #15847: Fix a regression in argparse, which did not accept tuples as
argument lists anymore.
- Issue #15340: Fix importing the random module when ``/dev/urandom`` cannot be
opened. This was a regression caused by the hash randomization patch.
- Issue #14223: Fix `window.addch()` of the curses module for special characters
like curses.ACS_HLINE: the Python function addch(int) and addch(bytes) is now
calling the C function waddch()/mvwaddch() (as it was done in Python 3.2),
instead of wadd_wch()/mvwadd_wch(). The Python function addch(str) is still
calling the C function wadd_wch()/mvwadd_wch() if the Python curses is linked
to libncursesw.
Build
-----
- Issue #15822: Really ensure 2to3 grammar pickles are properly installed
(replaces fixes for Issue #15645).
Documentation
-------------
- Issue #15573: memoryview comparisons are now performed by value with full
support for any valid struct module format definition.
- Issue #15316: When an item in the fromlist for `__import__()` doesn't exist,
don't raise an error, but if an exception is raised as part of an import do
let that propagate.
- Issue #2051: Source file permission bits are once again correctly copied to
the cached bytecode file. (The migration to importlib reintroduced this
problem because these was no regression test. A test has been added as part of
this patch)
- Issue #14846: `importlib.FileFinder` now handles the case where the directory
being searched is removed after a previous import attempt.
Library
-------
- Issue #13370: Ensure that ctypes works on Mac OS X when Python is compiled
using the clang compiler.
- Issue #13072: The array module's 'u' format code is now deprecated and will be
removed in Python 4.0.
- Issue #15249: email's BytesGenerator now correctly mangles From lines (when
requested) even if the body contains undecodable bytes.
IDLE
----
- Issue #15678: Fix IDLE menus when started from OS X command line (3.3.0b2
regression).
Documentation
-------------
- Issue #4966: Bring the sequence docs up to date for the Py3k transition and
the many language enhancements since they were original written.
- The "path importer" misnomer has been replaced with Eric Snow's
more-awkward-but-at-least-not-wrong suggestion of "path based finder" in the
import system reference docs.
- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by
Daniel Ellis.
Tests
-----
- Issue #15747: ZFS always returns EOPNOTSUPP when attempting to set the
UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected tests in
test_posix.py to account for this.
- Issue #15285: Refactor the approach for testing connect timeouts using two
external hosts that have been configured specifically for this type of test.
- Issue #15743: Remove the deprecated method usage in `urllib` tests. Patch by
Jeff Knupp.
- Issue #15615: Add some tests for the `json` module's handling of invalid input
data. Patch by Kushal Das.
Build
-----
- Issue #15568: Fix the return value of ``yield from`` when StopIteration is
raised by a custom iterator.
- Issue #13119: `sys.stdout` and `sys.stderr` are now using "\r\n" newline on
Windows, as Python 2.
- Issue #15534: Fix the fast-search function for non-ASCII Unicode strings.
- Issue #15508: Fix the docstring for `__import__()` to have the proper default
value of 0 for 'level' and to not mention negative levels since they are not
supported.
- Issue #15466: Stop using TYPE_INT64 in marshal, to make importlib.h (and other
byte code files) equal between 32-bit and 64-bit systems.
- Issue #15456: Fix code `__sizeof__()` after #12399 change. Patch by Serhiy
Storchaka.
- Issue #15404: Refleak in PyMethodObject repr.
- Issue #15202: Consistently use the name "follow_symlinks" for new parameters
in os and shutil functions.
- Issue #15111: When a module imported using 'from import' has an ImportError
inside itself, don't mask that fact behind a generic ImportError for the
module itself.
- Issue #15291: Fix a memory leak where AST nodes where not properly
deallocated.
- Issue #15110: Fix the tracebacks generated by "import xxx" to not show the
importlib stack frames.
- Issue #15020: The program name used to search for Python's path is now
"python3" under Unix, not "python".
- Issue #15033: Fix the exit status bug when modules invoked using -m switch,
return the proper failure return value (1). Patch contributed by Jeff Knupp.
- Issue #15307: Virtual environments now use symlinks with framework builds on
Mac OS X, like other POSIX builds.
Library
-------
- Issue #14590: configparser now correctly strips inline comments when delimiter
occurs earlier without preceding space.
- Issue #15559: To avoid a problematic failure mode when passed to the bytes
constructor, objects in the ipaddress module no longer implement `__index__()`
(they still implement `__int__()` as appropriate).
- Issue #15546: Fix handling of pathological input data in the peek() and
read1() methods of the BZ2File, GzipFile and LZMAFile classes.
- Issue #15502: Bring the importlib ABCs into line with the current state of the
import protocols given PEP 420. Original patch by Eric Snow.
- Issue #15499: Launching a webbrowser in Unix used to sleep for a few seconds.
Original patch by Anton Barkovsky.
- Issue #13922: `argparse` no longer incorrectly strips '--'s that appear after
the first one.
- Issue #10017, issue #14998: Fix TypeError using pprint on dictionaries with
user-defined types as keys or other unorderable keys.
- Issue #15180: Clarify posixpath.join() error message when mixing str & bytes.
- Issue #15357: The import emulation in pkgutil is now deprecated. pkgutil uses
importlib internally rather than the emulation.
- Issue #15233: Python now guarantees that callables registered with the atexit
module will be called in a deterministic order.
- Issue #14814: Implement more consistent ordering and sorting behaviour for
ipaddress objects.
- Issue #14814: `ipaddress` now provides more informative error messages when
constructing instances directly (changes permitted during beta due to
provisional API status).
- Issue #15247: `io.FileIO` now raises an error when given a file descriptor
pointing to a directory.
- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on
flush().
- Issue #10571: Fix the "--sign" option of distutils' upload command. Patch by
Jakub Wilk.
- Issue #9559: If messages were only added, a new file is no longer created and
renamed over the old file when flush() is called on an mbox, MMDF or Babyl
mailbox.
C API
-----
Extension Modules
-----------------
IDLE
----
- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
ended with ``\``. Patch by Roger Serwy.
Tools/Demos
-----------
- Issue #15458: python-config gets a new option --configdir to print the $LIBPL
value.
- Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have been
enhanced to show information on more C frames relevant to CPython within the
"py-bt" and "py-bt-full" commands:
Documentation
-------------
- Issue #15444: Use proper spelling for non-ASCII contributor names. Patch by
Serhiy Storchaka.
- Issue #15295: Reorganize and rewrite the documentation on the import system.
- Issue #15230: Clearly document some of the limitations of the runpy module and
nudge readers towards importlib when appropriate.
- Issue #15053: Copy Python 3.3 import lock change notice to all relevant
functions in imp instead of just at the top of the relevant section.
- Issue #15288: Link to the term "loader" in notes in pkgutil about how things
won't work as expected in Python 3.3 and mark the requisite functions as
"changed" since they will no longer work with modules directly imported by
import itself.
Tests
-----
- Issue #15467: Move helpers for `__sizeof__()` tests into test_support. Patch
by Serhiy Storchaka.
- Issue #15320: Make iterating the list of tests thread-safe when running tests
in multiprocess mode. Patch by Chris Jerdonek.
- Issue #15300: Ensure the temporary test working directories are in the same
parent folder when running tests in multiprocess mode from a Python build.
Patch by Chris Jerdonek.
Build
-----
- Issue #11715: Fix multiarch detection without having Debian development tools
(dpkg-dev) installed.
- Issue #15037: Build OS X installers with local copy of ncurses 5.9 libraries
to avoid curses.unget_wch bug present in older versions of ncurses such as
those shipped with OS X.
- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK. Also, for
OS X installers, ensure consistent sqlite3 behavior and feature availability
by building a local copy of libsqlite3 rather than depending on the wide range
of versions supplied with various OS X releases.
- Issue #16256: OS X installer now sets correct permissions for doc directory.
- Issue #14197: For OS X framework builds, ensure links to the shared library
are created with the proper ABI suffix.
- Issue #14330: For cross builds, don't use host python, use host search paths
for host compiler.
- Issue #15235: Allow Berkley DB versions up to 5.3 to build the dbm module.
- Fix a (most likely) very rare memory leak when calling main() and not being
able to decode a command-line argument.
- Issue #14815: Use Py_ssize_t instead of long for the object hash, to
preserve all 64 bits of hash on Win64.
- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on
the work by Hirokazu Yamamoto.
- Issue #15096: Removed support for ur'' as the raw notation isn't
compatible with Python 2.x's raw unicode strings.
- Issue #13783: Generator objects now use the identifier APIs internally
Library
-------
- Remove the packaging module, which is not ready for prime time.
- Issue #11113: add a new "html5" dictionary containing the named character
references defined by the HTML5 standard and the equivalent Unicode
character(s) to the html.entities module.
- Issue #15114: the strict mode of HTMLParser and the HTMLParseError exception
are deprecated now that the parser is able to parse invalid markup.
- Issue #444582: Add shutil.which, for finding programs on the system path.
Original patch by Erik Demaine, with later iterations by Jan Killian
and Brian Curtin.
- Issue #14837: SSL errors now have ``library`` and ``reason`` attributes
describing precisely what happened and in which OpenSSL submodule. The
str() of a SSLError is also enhanced accordingly.
- Issue #14657: The frozen instance of importlib used for bootstrap is now
also the module imported as importlib._bootstrap.
- Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API.
Patch by Robin Schreiber.
- Issue #11823: disassembly now shows argument counts on calls with keyword args.
- The bz2 and lzma modules now each contain an open() function, allowing
compressed files to readily be opened in text mode as well as binary mode.
- Issue #14989: Make the CGI enable option to http.server available via command
line.
- Issue #14443: Ensure that .py files are byte-compiled with the correct Python
executable within bdist_rpm even on older versions of RPM
C-API
-----
- Issue #13783: Inadvertent additions to the public C API in the PEP 380
implementation have either been removed or marked as private interfaces.
Extension Modules
-----------------
IDLE
----
- Issue #14962: Update text coloring in IDLE shell window after changing
options. Patch by Roger Serwy.
Documentation
-------------
Tests
-----
- test_nntplib now tolerates being run from behind NNTP gateways that add
"X-Antivirus" headers to articles
Build
-----
- Issue #14835: Make plistlib output empty arrays & dicts like OS X.
Patch by Sidney San Martín.
- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
collector repeatedly trying to untrack dicts.
- Issue #14417: Mutating a dict during lookup now restarts the lookup instead
of raising a RuntimeError (undoes issue #14205).
- Issue #14738: Speed-up UTF-8 decoding on non-ASCII data. Patch by Serhiy
Storchaka.
Library
-------
- Issue #14690: Use monotonic clock instead of system clock in the sched,
subprocess and trace modules.
- Issue #12515: email now registers a defect if it gets to EOF while parsing
a MIME part without seeing the closing MIME boundary.
- Issue #1672568: email now always decodes base64 payloads, adding padding and
ignoring non-base64-alphabet characters if needed, and registering defects
for any such problems.
- Issue #14925: email now registers a defect when the parser decides that there
is a missing header/body separator line. MalformedHeaderDefect, which the
existing code would never actually generate, is deprecated.
- Issue #10365: File open dialog now works instead of crashing even when
the parent window is closed before the dialog. Patch by Roger Serwy.
- Issue #8739: Updated smtpd to support RFC 5321, and added support for the
RFC 1870 SIZE extension.
- Issue #14036: Add an additional check to validate that port in urlparse does
not go in illegal range and returns None.
- Issue #14588: The types module now provide new_class() and prepare_class()
functions to support PEP 3115 compliant dynamic class creation. Patch by
Daniel Urban and Nick Coghlan.
- Issue #14721: Send the correct 'Content-length: 0' header when the body is an
empty string ''. Initial Patch contributed by Arve Knudsen.
- Issue #14072: Fix parsing of 'tel' URIs in urlparse by making the check for
ports stricter.
- Issue #9374: Generic parsing of query and fragment portions of url for any
scheme. Supported both by RFC3986 and RFC2396.
- Issue #14829: Fix bisect and range() indexing with large indices
(>= 2 ** 32) under 64-bit Windows.
- Issue #14732: The _csv module now uses PEP 3121 module initialization.
Patch by Robin Schreiber.
- Issue #14809: Add HTTP status codes introduced by RFC 6585 to http.server
and http.client. Patch by EungJun Yi.
- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when
accessing the Tk clipboard. Modify clipboad_get() to first request type
UTF8_STRING when no specific type is requested in an X11 windowing
environment, falling back to the current default type STRING if that fails.
Original patch by Thomas Kluyver.
- Issue #12541: Be lenient with quotes around Realm field of HTTP Basic
Authentation in urllib2.
- Add importlib.util.resolve_name().
- Issue #14583: Fix importlib bug when a package's __init__.py would first
import one of its modules then raise an error.
- Issue #14741: Fix missing support for Ellipsis ('...') in parser module.
- Issue #14697: Fix missing support for set displays and set comprehensions in
parser module.
- Issue #14701: Fix missing support for 'raise ... from' in parser module.
- Issue #14127: The os.stat() result object now provides three additional
fields: st_ctime_ns, st_mtime_ns, and st_atime_ns, providing those times as an
integer with nanosecond resolution. The functions os.utime(), os.lutimes(),
and os.futimes() now accept a new parameter, ns, which accepts mtime and atime
as integers with nanosecond resolution.
- Issue #14127 and #10148: shutil.copystat now preserves exact mtime and atime
on filesystems providing nanosecond resolution.
IDLE
----
- Issue #14958: Change IDLE systax highlighting to recognize all string and
byte literals supported in Python 3.3.
- Issue #14929: Stop IDLE 3.x from closing on Unicode decode errors when
grepping. Patch by Roger Serwy.
Tools/Demos
-----------
Build
-----
- Issue #13210: Windows build now uses VS2010, ported from VS2008.
C-API
-----
- Issue #14705: The PyArg_Parse() family of functions now support the 'p' format
unit, which accepts a "boolean predicate" argument. It converts any Python
value into an integer--0 if it is "false", and 1 otherwise.
Documentation
-------------
- Issue #14588: The language reference now accurately documents the Python 3
class definition process. Patch by Nick Coghlan.
- Issue #14433: Prevent msvcrt crash in interactive prompt when stdin is closed.
- Issue #13903: Implement PEP 412. Individual dictionary instances can now share
their keys with other dictionaries. Classes take advantage of this to share
their instance dictionary keys for improved memory and performance.
- Issue #14630: Fix a memory access bug for instances of a subclass of int
with value 0.
- Issue #14339: Speed improvements to bin, oct and hex functions. Patch by
Serhiy Storchaka.
- Issue #14385: It is now possible to use a custom type for the __builtins__
namespace, instead of a dict. It can be used for sandboxing for example.
Raise also a NameError instead of ImportError if __build_class__ name if not
found in __builtins__.
- Issue #13889: Check and (if necessary) set FPU control word before calling
any of the dtoa.c string <-> float conversion functions, on MSVC builds of
Python. This fixes issues when embedding Python in a Delphi app.
- __import__() now matches PEP 328 and documentation by defaulting 'index' to 0
instead of -1 and removing support for negative values.
- Issue #1559549: ImportError now has 'name' and 'path' attributes that are set
using keyword arguments to its constructor. They are currently not set by
import as they are meant for use by importlib.
Library
-------
- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running
step. Patch by Xavier de Gaye.
- Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites
which send EOF without trailing \r\n.
- Issue #14605: Add importlib.abc.FileLoader, importlib.machinery.(FileFinder,
SourceFileLoader, SourcelessFileLoader, ExtensionFileLoader).
- Issue #11750: The Windows API functions scattered in the _subprocess and
_multiprocessing.win32 modules now live in a single module "_winapi".
Patch by sbt.
- Issue #14538: HTMLParser can now parse correctly start tags that contain
a bare '/'.
- Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message.
- Issue #13959: Add imp.py and rename the built-in module to _imp, allowing for
re-implementing parts of the module in pure Python.
- Issue #14399: zipfile now recognizes that the archive has been modified even
if only the comment is changed. In addition, the TypeError that results from
trying to set a non-binary value as a comment is now raised at the time
the comment is set rather than at the time the zipfile is written.
- Issue #7978: socketserver now restarts the select() call when EINTR is
returned. This avoids crashing the server loop when a signal is received.
Patch by Jerzy Kozera.
- Issue #3033: Add displayof parameter to tkinter font. Patch by Guilherme Polo.
- Issue #802310: Generate always unique tkinter font names if not directly passed.
Build
-----
- "make touch" will now touch generated files that are checked into Mercurial,
after a "hg update" which failed to bring the timestamps into the right order.
Tests
-----
- Issue #14355: Regrtest now supports the standard unittest test loading, and
will use it if a test file contains no `test_main` method.
IDLE
----
Tools / Demos
-------------
- Issue #3561: The Windows installer now has an option, off by default, for
placing the Python installation into the system "Path" environment variable.
- Issue #14331: Use significantly less stack space when importing modules by
allocating path buffers on the heap instead of the stack.
- Issue #14435: Remove dedicated block allocator from floatobject.c and rely
on the PyObject_Malloc() api like all other objects.
Library
-------
- Issue #14300: Under Windows, sockets created using socket.dup() now allow
overlapped I/O. Patch by sbt.
- Issue #13872: socket.detach() now marks the socket closed (as mirrored
in the socket repr()). Patch by Matt Joiner.
- Issue #14416: syslog now defines the LOG_ODELAY and LOG_AUTHPRIV constants
if they are defined in <syslog.h>.
- Issue #14380: MIMEText now defaults to utf-8 when passed non-ASCII unicode
with no charset specified.
- Issue #14204: The ssl module now has support for the Next Protocol
Negotiation extension, if available in the underlying OpenSSL library.
Patch by Colin Marc.
- Issue #3035: Unused functions from tkinter are marked as pending deprecated.
- Issue #12757: Fix the skipping of doctests when python is run with -OO so
that it works in unittest's verbose mode as well as non-verbose mode.
- Issue #7652: Integrate the decimal floating point libmpdec library to speed
up the decimal module. Performance gains of the new C implementation are
between 10x and 100x, depending on the application.
- Issue #14269: SMTPD now conforms to the RFC and requires a HELO command
before MAIL, RCPT, or DATA.
- Issue #11199: Fix the with urllib which hangs on particular ftp urls.
- Issue #14222: Use the new time.steady() function instead of time.time() for
timeout in queue and threading modules to not be affected of system time
update.
- Issue #12818: format address no longer needlessly \ escapes ()s in names when
the name ends up being quoted.
- Issue #13839: When invoked on the command-line, the pstats module now
accepts several filenames of profile stat files and merges them all.
Patch by Matt Joiner.
- Issue #14291: Email now defaults to utf-8 for non-ASCII unicode headers
instead of raising an error. This fixes a regression relative to 2.7.
- Issue #14184: Increase the default stack size for secondary threads on
Mac OS X to avoid interpreter crashes when using threads on 10.7.
- Issue #10543: Fix unittest test discovery with Jython bytecode files.
- Issue #13394: the aifc module now uses warnings.warn() to signal warnings.
- Issue #14223: curses.addch() is no more limited to the range 0-255 when the
Python curses is not linked to libncursesw. It was a regression introduced
in Python 3.3a1.
- Issue #14210: pdb now has tab-completion not only for command names, but
also for their arguments, wherever possible.
- Issue #14310: Sockets can now be with other processes on Windows using
the api socket.socket.share() and socket.fromshare().
- Issue #10576: The gc module now has a 'callbacks' member that will get
called when garbage collection takes place.
Build
-----
- Issue #14321: Do not run pgen during the build if files are up to date.
Documentation
-------------
Extension Modules
-----------------
- Issue #14259: The finditer() method of re objects did not take any
keyword arguments, contrary to the documentation.
Tests
-----
- Issue #13521: dict.setdefault() now does only one lookup for the given key,
making it "atomic" for many purposes. Patch by Filip Gruszczyński.
- PEP 409, Issue #6210: "raise X from None" is now supported as a means of
suppressing the display of the chained exception context. The chained
context still remains available as the __context__ attribute.
Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review
and many ideas.
- Issue #14084: Fix a file descriptor leak when importing a module with a
bad encoding.
- Issue #14040: Remove rarely used file name suffixes for C extensions
(under POSIX mainly).
- Issue #11235: Fix OverflowError when trying to import a source file whose
modification time doesn't fit in a 32-bit timestamp.
- Issue #8052: The posix subprocess module would take a long time closing
all possible file descriptors in the child process rather than just open
file descriptors. It now closes only the open fds if possible for the
default close_fds=True behavior.
- Issue #13629: Renumber the tokens in token.h so that they match the indexes
into _PyParser_TokenNames.
- Issue #13645: pyc files now contain the size of the corresponding source
code, to avoid timestamp collisions (especially on filesystems with a low
timestamp resolution) when checking for freshness of the bytecode.
- PEP 380, Issue #11682: Add "yield from <x>" to support easy delegation to
subgenerators (initial patch by Greg Ewing, integration into 3.3 by
Renaud Blanch, Ryan Kelly, Zbigniew Jędrzejewski-Szmek and Nick Coghlan)
- Issue #13748: Raw bytes literals can now be written with the ``rb`` prefix
as well as ``br``.
- Issue #12736: Use full unicode case mappings for upper, lower, and title case.
- Issue #6695: Full garbage collection runs now clear the freelist of set
objects. Initial patch by Matthias Troffaes.
- Fix the fix for issue #12149: it was incorrect, although it had the side
effect of appearing to resolve the issue. Thanks to Mark Shannon for
noticing.
- Issue #13503: Use a more efficient reduction format for bytearrays with
pickle protocol >= 3. The old reduction format is kept with older protocols
in order to allow unpickling under Python 2. Patch by Irmen de Jong.
- Issue #7111: Python can now be run without a stdin, stdout or stderr
stream. It was already the case with Python 2. However, the corresponding
sys module entries are now set to None (instead of an unusable file object).
- Issue #11849: Ensure that free()d memory arenas are really released
on POSIX systems supporting anonymous memory mappings. Patch by
Charles-François Natali.
- PEP 3155 / issue #13448: Qualified name for classes and functions.
- Issue #13436: Fix a bogus error message when an AST object was passed
an invalid integer value.
- Issue #13411: memoryview objects are now hashable when the underlying
object is hashable.
- Issue #10227: Add an allocation cache for a single slice object. Patch by
Stefan Behnel.
- Issue #13392: Writing a pyc file should now be atomic under Windows as well.
- Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder
already accepts them).
- Issue #13389: Full garbage collection passes now clear the freelists for
list and dict objects. They already cleared other freelists in the
interpreter.
- Issue #13327: Remove the need for an explicit None as the second argument
to os.utime, os.lutimes, os.futimes, os.futimens, os.futimesat, in
order to update to the current time. Also added keyword argument
handling to os.utimensat in order to remove the need for explicit None.
- Issue #9896: Add start, stop, and step attributes to range objects.
- Issue #13201: Define '==' and '!=' to compare range objects based on
the sequence of values they define (instead of comparing based on
object identity).
- Issue #12753: Add support for Unicode name aliases and named sequences.
Both ``unicodedata.lookup()`` and '\N{...}' now resolve aliases,
and ``unicodedata.lookup()`` resolves named sequences too.
- Issue #12170: The count(), find(), rfind(), index() and rindex() methods
of bytes and bytearray objects now accept an integer between 0 and 255
as their first argument. Patch by Petri Lehtinen.
- Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore
error handlers on all Windows versions. The MBCS codec is now supporting all
error handlers, instead of only replace to encode and ignore to decode.
- Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described
as "The pipe is being closed") is now mapped to POSIX errno EPIPE
(previously EINVAL).
- Issue #12911: Fix memory consumption when calculating the repr() of huge
tuples or lists.
- PEP 393: flexible string representation. Thanks to Torsten Becker for the
initial implementation, and Victor Stinner for various bug fixes.
- Issue #9200: The str.is* methods now work with strings that contain non-BMP
characters even in narrow Unicode builds.
- Issue #12791: Break reference cycles early when a generator exits with
an exception.
- Issue #12766: Raise a ValueError when creating a class with a class variable
that conflicts with a name in __slots__.
- Issue #12732: In narrow unicode builds, allow Unicode identifiers which fall
outside the BMP.
- Verify the types of AST strings and identifiers provided by the user before
compiling them.
- Issue #12647: The None object now has a __bool__() method that returns False.
Formerly, bool(None) returned False only because of special case logic
in PyObject_IsTrue().
- Issue #12149: Update the method cache after a type's dictionary gets
cleared by the garbage collector. This fixes a segfault when an instance
and its type get caught in a reference cycle, and the instance's
deallocator calls one of the methods on the type (e.g. when subclassing
IOBase). Diagnosis and patch by Davide Rizzo.
- Issue #9611, Issue #9015: FileIO.read() clamps the length to INT_MAX on Windows.
- Issue #9642: Uniformize the tests on the availability of the mbcs codec, add
a new HAVE_MBCS define.
- Issue #9642: Fix filesystem encoding initialization: use the ANSI code page
on Windows if the mbcs codec is not available, and fail with a fatal error if
we cannot get the locale encoding (if nl_langinfo(CODESET) is not available)
instead of using UTF-8.
- When a generator yields, do not retain the caller's exception state on the
generator.
- Issue #12475: Prevent generators from leaking their exception state into the
caller's frame as they return for the last time.
- Issue #12291: You can now load multiple marshalled objects from a stream,
with other data interleaved between marshalled objects.
- Issue #12370: Fix super with no arguments when __class__ is overriden in the
class body.
- Issue #12084: os.stat on Windows now works properly with relative symbolic
links when called from any directory.
- Loosen type restrictions on the __dir__ method. __dir__ can now return any
sequence, which will be converted to a list and sorted by dir().
- Issue #12225: Still allow Python to build if Python is not in its hg repo or
mercurial is not installed.
- Issue #1195: my_fgets() now always clears errors before calling fgets(). Fix
the following case: sys.stdin.read() stopped with CTRL+d (end of file),
raw_input() interrupted by CTRL+c.
- Issue #12216: Allow unexpected EOF errors to happen on any line of the file.
- Issue #12199: The TryExcept and TryFinally and AST nodes have been unified
into a Try node.
- Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)
- Issue #12106: The use of the multiple-with shorthand syntax is now reflected
in the AST.
- Issue #12190: Try to use the same filename object when compiling unmarshalling
a code objects in the same file.
- Issue #12166: Move implementations of dir() specialized for various types into
the __dir__() methods of those types.
- Issue #5715: In socketserver, close the server socket in the child process.
- Correct lookup of __dir__ on objects. Among other things, this causes errors
besides AttributeError found on lookup to be propagated.
- Issue #12060: Use sig_atomic_t type and volatile keyword in the signal
module. Patch written by Charles-François Natali.
- Issue #1856: Avoid crashes and lockups when daemon threads run while the
interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
- Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_*
APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch
by Charles-François Natali.
- Issue #10914: Initialize correctly the filesystem codec when creating a new
subinterpreter to fix a bootstrap issue with codecs implemented in Python, as
the ISO-8859-15 codec.
- Issue #11918: OS/2 and VMS are no more supported because of the lack of
maintainer.
- Issue #6780: fix starts/endswith error message to mention that tuples are
accepted too.
- Issue #5057: fix a bug in the peepholer that led to non-portable pyc files
between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP
chars (e.g. "\U00012345"[0]).
- Issue #11335: Fixed a memory leak in list.sort when the key function
throws an exception.
- Issue #8923: When a string is encoded to UTF-8 in strict mode, the result is
cached into the object. Examples: str.encode(), str.encode('utf-8'),
PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(unicode, "utf-8",
NULL).
- Issue #11272: On Windows, input() strips '\r' (and not only '\n'), and
sys.stdin uses universal newline (replace '\r\n' by '\n').
- Issue #11828: startswith and endswith now accept None as slice index.
Patch by Torsten Becker.
- Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx().
It encoded the Unicode filename to UTF-8, but the encoding fails on
undecodable filename (on surrogate characters) which raises an unexpected
UnicodeEncodeError on recursion limit.
- Issue #10516: New copy() and clear() methods for lists and bytearrays.
- Issue #12380: The rjust, ljust and center methods of bytes and bytearray
now accept a bytearray argument.
Library
-------
- Issue #13550: Remove the debug machinery from the threading module: remove
verbose arguments from all threading classes and functions.
- Issue #13641: Decoding functions in the base64 module now accept ASCII-only
unicode strings. Patch by Catalin Iacob.
- Issue #13961: Move importlib over to using os.replace() for atomic renaming.
- Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF.
- Issue #10287: nntplib now queries the server's CAPABILITIES first before
sending MODE READER, and only sends it if not already in READER mode.
Patch by Hynek Schlawack.
- Issue #13993: HTMLParser is now able to handle broken end tags when
strict=False.
- Issue #13930: lib2to3 now supports writing converted output files to another
directory tree as well as copying unchanged files and altering the file
suffix.
- Issue #10287: nntplib now queries the server's CAPABILITIES again after
authenticating (since the result may change, according to RFC 4643).
Patch by Hynek Schlawack.
- When '' is a path (e.g. in sys.path), make sure __file__ uses the current
working directory instead of '' in importlib.
- Issue #13609: Add two functions to query the terminal size:
os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
Patch by Zbigniew Jędrzejewski-Szmek.
- Issue #2945: Make the distutils upload command aware of bdist_rpm products.
- Issue #11805: package_data in setup.cfg should allow more than one value.
- Issue #13848: open() and the FileIO constructor now check for NUL
characters in the file name. Patch by Hynek Schlawack.
- Issue #13806: The size check in audioop decompression functions was too
strict and could reject valid compressed data. Patch by Oleg Plakhotnyuk.
- Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC
IV attack countermeasure.
- Issue #13772: In os.symlink() under Windows, do not try to guess the link
target's type (file or directory). The detection was buggy and made the
call non-atomic (therefore prone to race conditions).
- Issue #13809: Fix regression where bz2 module wouldn't work when threads are
disabled. Original patch by Amaury Forgeot d'Arc.
- Issue #9993: When the source and destination are on different filesystems,
and the source is a symlink, shutil.move() now recreates a symlink on the
destination instead of copying the file contents. Patch by Jonathan Niehof
and Hynek Schlawack.
- Issue #13636: Weak ciphers are now disabled by default in the ssl module
(except when SSLv2 is explicitly asked for).
- Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the
SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
- Issue #11006: Don't issue low level warning in subprocess when pipe2() fails.
- Issue #13634: Add support for querying and disabling SSL compression.
- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
- Issue #13560: os.strerror() now uses the current locale encoding instead of
UTF-8.
- Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem
encoding and the surrogateescape error handler, rather than UTF-8. Patch
by David Watson.
- Issue #10350: Read and save errno before calling a function which might
overwrite it. Original patch by Hallvard B Furuseth.
- Issue #13591: A bug in importlib has been fixed that caused import_module
to load a module twice.
- Issue #5689: Add support for lzma compression to the tarfile module.
- Issue #5905, Issue #13560: time.strftime() is now using the current locale
encoding, instead of UTF-8, if the wcsftime() function is not available.
- Issue #13464: Add a readinto() method to http.client.HTTPResponse. Patch
by Jon Kuhn.
- Issue #6715: Add a module 'lzma' for compression using the LZMA algorithm.
Thanks to Per Øyvind Karlsen for the initial implementation.
- Issue #12618: Fix a bug that prevented py_compile from creating byte
compiled files in the current directory. Initial patch by Sjoerd de Vries.
- Issue #13444: When stdout has been closed explicitly, we should not attempt
to flush it at shutdown and print an error.
- Issue #12567: The curses module uses Unicode functions for Unicode arguments
when it is linked to the ncurses library. It encodes also Unicode strings to
the locale encoding instead of UTF-8.
- Issue #12856: Ensure child processes do not inherit the parent's random
seed for filename generation in the tempfile module. Patch by Brian
Harring.
- Issue #13458: Fix a memory leak in the ssl module when decoding a
certificate with a subjectAltName. Patch by Robert Xiao.
- Issue #13358: HTMLParser now calls handle_data only once for each CDATA.
- Issue #13374: The Windows bytes API has been deprecated in the os module. Use
Unicode filenames instead of bytes filenames to not depend on the ANSI code
page anymore and to support any filename.
- Issue #13297: Use bytes type to send and receive binary data through XMLRPC.
- Issue #13293: Better error message when trying to marshal bytes using
xmlrpc.client.
- Issue #13273: fix a bug that prevented HTMLParser to properly detect some
tags when strict=False.
- Issue #13226: Add RTLD_xxx constants to the os module. These constants can be
used with sys.setdlopenflags().
- Issue #13150: sysconfig no longer parses the Makefile and config.h files
when imported, instead doing it at build time. This makes importing
sysconfig faster and reduces Python startup time by 20%.
- Issue #12448: smtplib now flushes stdout while running ``python -m smtplib``
in order to display the prompt correctly.
- Issue #12454: The mailbox module is now using ASCII, instead of the locale
encoding, to read and write .mh_sequences files.
- Issue #1673007: urllib.request now supports HEAD request via new method argument.
Patch contributions by David Stanek, Patrick Westerhoff and Ezio Melotti.
- Issue #12386: packaging does not fail anymore when writing the RESOURCES
file.
- Issue #13158: Fix decoding and encoding of GNU tar specific base-256 number
fields in tarfile.
- Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding,
instead of the locale encoding.
- Issue #13150: The tokenize module doesn't compile large regular expressions
at startup anymore.
- Issue #11254: Teach distutils and packaging to compile .pyc and .pyo files in
PEP 3147-compliant __pycache__ directories.
- Issue #3163: The struct module gets new format characters 'n' and 'N'
supporting C integer types ``ssize_t`` and ``size_t``, respectively.
- Issue #12306: Expose the runtime version of the zlib C library as a constant,
ZLIB_RUNTIME_VERSION, in the zlib module. Patch by Torsten Landschoff.
- Issue #8933: distutils' PKG-INFO files and packaging's METADATA files will
now correctly report Metadata-Version: 1.1 instead of 1.0 if a Classifier or
Download-URL field is present.
- Issue #9561: distutils and packaging now writes egg-info files using UTF-8,
instead of the locale encoding.
- Issue #8286: The distutils command sdist will print a warning message instead
of crashing when an invalid path is given in the manifest template.
- Issue #12720: Expose low-level Linux extended file attribute functions in os.
- Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in
the C pickle implementation.
- Issue #11564: Avoid crashes when trying to pickle huge objects or containers
(more than 2**31 items). Instead, in most cases, an OverflowError is raised.
- Issue #9923: The mailcap module now correctly uses the platform path
separator for the MAILCAP environment variable on non-POSIX platforms.
- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
Pipe.
- Issue #6560: The sendmsg/recvmsg API is now exposed by the socket module
when provided by the underlying platform, supporting processing of
ancillary data in pure Python code. Patch by David Watson and Heiko Wundram.
- Issue #12213: Fix a buffering bug with interleaved reads and writes that
could appear on BufferedRandom streams.
- Issue #12687: Fix a possible buffering bug when unpickling text mode
(protocol 0, mostly) pickles.
- Issue #10087: Fix the html output format of the calendar module.
- Issue #12683: urlparse updated to include svn as schemes that uses relative
paths. (svn from 1.5 onwards support relative path).
- Issues #11104, #8688: Fix the behavior of distutils' sdist command with
manually-maintained MANIFEST files.
- Issue #12514: Use try/finally to assure the timeit module restores garbage
collections when it is done.
- Issue #12592: Make Python build on OpenBSD 5 (and future major releases).
- Issue #12372: POSIX semaphores are broken on AIX: don't use them.
- Issue #7484: smtplib no longer puts <> around addresses in VRFY and EXPN
commands; they aren't required and in fact postfix doesn't support that form.
- Issue #11321: Fix a crash with multiple imports of the _pickle module when
embedding Python. Patch by Andreas Stührk.
- Issues #12169 and #10510: Factor out code used by various packaging commands
to make HTTP POST requests, and make sure it uses CRLF.
- Issue #12016: Multibyte CJK decoders now resynchronize faster. They only
ignore the first byte of an invalid byte sequence. For example,
b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of '\ufffd'.
- Issue #12451: pydoc: importfile() now opens the Python script in binary mode,
instead of text mode using the locale encoding, to avoid encoding issues.
- Issue #12451: runpy: run_path() now opens the Python script in binary mode,
instead of text mode using the locale encoding, to support other encodings
than UTF-8 (scripts using the coding cookie).
- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
of the text mode (using the locale encoding) to avoid encoding issues.
- Issue #12462: time.sleep() now immediately calls the (Python) signal handler
if it is interrupted by a signal, instead of having to wait until the next
instruction.
- Issue #12442: new shutil.disk_usage function, providing total, used and free
disk space statistics.
- Issue #12451: The XInclude default loader of xml.etree now decodes files from
UTF-8 instead of the locale encoding if the encoding is not specified. It now
also opens XML files for the parser in binary mode instead of the text mode
to avoid encoding issues.
- Issue #12451: distutils now opens the setup script in binary mode to read the
encoding cookie, instead of opening it in UTF-8.
- Issue #12422: In the copy module, don't store objects that are their own copy
in the memo dict.
- Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira
Kitada.
- Issue #1874: email now detects and reports as a defect the presence of
any CTE other than 7bit, 8bit, or binary on a multipart.
- Issue #12383: Fix subprocess module with env={}: don't copy the environment
variables, start with an empty environment.
- Issue #11637: Fix support for importing packaging setup hooks from the
project directory.
- Issue #11700: mailbox proxy object close methods can now be called multiple
times without error.
- Issue #12287: In ossaudiodev, check that the device isn't closed in several
methods.
- Issue #12246: Warn and fail when trying to install a third-party project from
an uninstalled Python (built in a source checkout). Original patch by
Tshepang Lekhonkhobe.
- Issue #10424: Argparse now includes the names of the missing required
arguments in the missing arguments error message.
- Issue #12021: Make mmap's read() method argument optional. Patch by Petri
Lehtinen.
- Issue #12080: Fix a Decimal.power() case that took an unreasonably long time
to compute.
- Issue #12175: FileIO.readall() now only reads the file position and size
once.
- Issue #10818: Remove the Tk GUI and the serve() function of the pydoc module,
pydoc -g has been deprecated in Python 3.2 and it has a new enhanced web
server.
- Issue #1441530: In imaplib, read the data in one chunk to speed up large
reads and simplify code.
- Issue #12070: Fix the Makefile parser of the sysconfig module to handle
correctly references to "bogus variable" (e.g. "prefix=$/opt/python").
- Issue #12100: Don't reset incremental encoders of CJK codecs at each call to
their encode() method anymore, but continue to call the reset() method if the
final argument is True.
- Issue #8650: Make zlib module 64-bit clean. compress(), decompress() and
their incremental counterparts now raise OverflowError if given an input
larger than 4GB, instead of silently truncating the input and returning
an incorrect result.
- Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence
on a file opened in read+write mode (namely: reading, seeking a bit forward,
writing, then seeking before the previous write but still within buffered
data, and writing again).
- Issue #11888: Add log2 function to math module. Patch written by Mark
Dickinson.
- Issue #8407: The signal handler writes the signal number as a single byte
instead of a nul byte into the wakeup file descriptor. So it is possible to
wait more than one signal and know which signals were raised.
- Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch
by Kasun Herath.
- Issue #11916: Add a number of MacOSX specific definitions to the errno module.
Patch by Pierre Carrier.
- Issue #11999: fixed sporadic sync failure mailbox.Maildir due to its trying to
detect mtime changes by comparing to the system clock instead of to the
previous value of the mtime.
- ntpath.samefile failed to notice that "a.txt" and "A.TXT" refer to the same
file on Windows XP. As noticed in issue #10684.
- Issue #11768: The signal handler of the signal module only calls
Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or
parallel calls. PyErr_SetInterrupt() writes also into the wake up file.
- Issue #11492: fix several issues with header folding in the email package.
- Issue #11467: Fix urlparse behavior when handling urls which contains scheme
specific part only digits. Patch by Santoso Wijaya.
- Issue #11474: Fix the bug with url2pathname() handling of '/C|/' on Windows.
Patch by Santoso Wijaya.
- Issue #11703: urllib2.geturl() does not return correct url when the original
url contains #fragment.
- Issue #5162: Treat services like frozen executables to allow child spawning
from multiprocessing.forking on Windows.
- Issue #11635: Don't use polling in worker threads and processes launched by
concurrent.futures.
- Issue #8754: Have importlib use the repr of a module name in error messages.
- Issue #11591: Prevent "import site" from modifying sys.path when python
was started with -S.
- Issue #11666: let help() display named tuple attributes and methods
that start with a leading underscore.
- Issue #10979: unittest stdout buffering now works with class and module
setup and teardown.
- Issue #11401: fix handling of headers with no value; this fixes a regression
relative to Python2 and the result is now the same as it was in Python2.
- Issue #9298: base64 bodies weren't being folded to line lengths less than 78,
which was a regression relative to Python2. Unlike Python2, the last line
of the folded body now ends with a carriage return.
- Issue #11133: fix two cases where inspect.getattr_static can trigger code
execution. Patch by Andreas Stührk.
- Issue #11554: Fixed support for Japanese codecs; previously the body output
encoding was not done if euc-jp or shift-jis was specified as the charset.
- Issue #11500: Fixed a bug in the OS X proxy bypass code for fully qualified
IP addresses in the proxy exception list.
- Issue #11491: dbm.error is no longer raised when dbm.open is called with
the "n" as the flag argument and the file exists. The behavior matches
the documentation and general logic.
- Issue #1162477: Postel Principle adjustment to email date parsing: handle the
fact that some non-compliant MUAs use '.' instead of ':' in time specs.
- Issue #9795: add context manager protocol support for nntplib.NNTP class.
- Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors
on accept(), send() and recv().
- Issue #11326: Add the missing connect_ex() implementation for SSL sockets,
and make it work for non-blocking connects.
- Issue #4761: Add the ``*at()`` family of functions (openat(), etc.) to the
posix module. Patch by Ross Lagerwall.
- Issue #7322: Trying to read from a socket's file-like object after a timeout
occurred now raises an error instead of silently losing data.
- Issue #11291: poplib.POP no longer suppresses errors on quit().
- Issue #10956: Buffered I/O classes retry reading or writing after a signal
has arrived and the handler returned successfully.
- Issue #10924: Adding salt and Modular Crypt Format to crypt library.
Moved old C wrapper to _crypt, and added a Python wrapper with
enhanced salt generation and simpler API for password generation.
- Issue #4681: Allow mmap() to work on file sizes and offsets larger than
4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for
32-bit Windows.
- Issue #11169: compileall module uses repr() to format filenames and paths to
escape surrogate characters and show spaces.
- Issue #9348: Raise an early error if argparse nargs and metavar don't match.
Build
-----
- Issue #12852: Set _XOPEN_SOURCE to 700, instead of 600, to get POSIX 2008
functions on OpenBSD (e.g. fdopendir).
- Issue #11863: Remove support for legacy systems deprecated in Python 3.2
(following PEP 11). These systems are systems using Mach C Threads,
SunOS lightweight processes, GNU pth threads and IRIX threads.
IDLE
----
- Issue #14409: IDLE now properly executes commands in the Shell window
when it cannot read the normal config files on startup and
has to use the built-in default key bindings.
There was previously a bug in one of the defaults.
- IDLE can be launched as python -m idlelib
- Issue #3573: IDLE hangs when passing invalid command line args
(directory(ies) instead of file(s)) (Patch by Guilherme Polo)
- Issue #13933: IDLE auto-complete did not work with some imported
module, like hashlib. (Patch by Roger Serwy)
- Issue #13506: Add '' to path for IDLE Shell when started and restarted with
Restart Shell.
Original patches by Marco Scataglini and Roger Serwy.
- Issue #4625: If IDLE cannot write to its recent file or breakpoint files,
display a message popup and continue rather than crash. Original patch by
Roger Serwy.
- Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..".
Patch by Tal Einat.
- Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart.
(Patch by Roger Serwy)
- Issue #12636: IDLE reads the coding cookie when executing a Python script.
- Issue #12590: IDLE editor window now always displays the first line
when opening a long file. With Tk 8.5, the first line was hidden.
- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX
with Tk 8.5.
- Issue #11718: IDLE's open module dialog couldn't find the __init__.py
file in a package.
Tools/Demos
-----------
- Issue #13930: 2to3 is now able to write its converted output files to another
directory tree as well as copying unchanged files and altering the file
suffix. See its new -o, -W and --add-suffix options. This makes it more
useful in many automated code translation workflows.
- Issue #13628: python-gdb.py is now able to retrieve more frames in the Python
traceback if Python is optimized.
- Issue #11179: Make ccbench work under Python 3.1 and 2.7 again.
Extension Modules
-----------------
- Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
- Issue #12881: ctypes: Fix segfault with large structure field names.
Tests
-----
- Issue #13447: Add a test file to host regression tests for bugs in the
scripts found in the Tools directory.
- Issue #12804: Fix test_socket and test_urllib2net failures when running tests
on a system without internet access.
- Issue #13726: Fix the ambiguous -S flag in regrtest. It is -o/--slow for slow
tests.
- Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore.
- Issue #6484: Add unit tests for mailcap module (patch by Gregory Nofi)
- Issue #11651: Improve the Makefile test targets to run more of the test suite
more quickly. The --multiprocess option is now enabled by default, reducing
the amount of time needed to run the tests. "make test" and "make quicktest"
now include some resource-intensive tests, but no longer run the test suite
twice to check for bugs in .pyc generation. Tools/scripts/run_test.py provides
an easy platform-independent way to run test suite with sensible defaults.
- Issue #12331: The test suite for the packaging module can now run from an
installed Python.
- Issue #12331: The test suite for lib2to3 can now run from an installed
Python.
- Issue #12624: It is now possible to fail after the first failure when
running in verbose mode (``-v`` or ``-W``), by using the ``--failfast``
(or ``-G``) option to regrtest. This is useful with long test suites
such as test_io or test_subprocess.
- Issue #12573: Add resource checks for dangling Thread and Process objects.
- Issue #11512: Add a test suite for the cgitb module. Patch by Robbie Clemons.
- Issue #12469: Run wakeup and pending signal tests in a subprocess to run the
test in a fresh process with only one thread and to not change signal
handling of the parent process.
- Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run
test_tk or test_ttk_guionly under a username that is not currently logged
in to the console windowserver (as may be the case under buildbot or ssh).
- Issue #12400: regrtest -W doesn't rerun the tests twice anymore, but captures
the output and displays it on failure instead. regrtest -v doesn't print the
error twice anymore if there is only one error.
- Issue #12057: Add tests for ISO 2022 codecs (iso2022_jp, iso2022_jp_2,
iso2022_kr).
- Issue #5723: Improve json tests to be executed with and without accelerations.
- Issue #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
Patch written by Charles-Francois Natali.
- Issue #8407, #11859: Fix tests of test_io using threads and an alarm: use
pthread_sigmask() to ensure that the SIGALRM signal is received by the main
thread.
- Issue #11811: Factor out detection of IPv6 support on the current host
and make it available as ``test.support.IPV6_ENABLED``. Patch by
Charles-François Natali.
- Fix possible "file already exists" error when running the tests in parallel.
- Issue #11727: Add a --timeout option to regrtest: if a test takes more than
TIMEOUT seconds, dumps the traceback of all threads and exits.
- The email test suite now lives in the Lib/test/test_email package. The test
harness code has also been modernized to allow use of new unittest features.
- Issue #11578: added test for the timeit module. Patch by Michael Henry.
- Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
Patch by Hirokazu Yamamoto.
C-API
-----
- Issue #12380: PyArg_ParseTuple now accepts a bytearray for the 'c' format.
Documentation
-------------
- Issue #13989: Document that GzipFile does not support text mode, and give a
more helpful error message when opened with an invalid mode string.
- Issue #12102: Document that buffered files must be flushed before being used
with mmap. Patch by Steffen Daode Nurpmeso.
- Issue #8982: Improve the documentation for the argparse Namespace object.
- Issue #9343: Document that argparse parent parsers must be configured before
their children.
- Issue #6005: Examples in the socket library documentation use sendall, where
relevant, instead send method.