Professional Documents
Culture Documents
Opera
Opera
Python News
+++++++++++
.. *Not yet released, see sections below for changes released in 3.3.1*
- Issue #17408: Avoid using an obsolete instance of the copyreg module when
the interpreter is shutdown and then started again.
- Issue #17863: In the interactive console, don't loop forever if the encoding
can't be fetched from stdin.
exception instance for the 'value' element of the arg tuple if the exception
originated from C code; now an exception instance is always provided.
- Issue #17669: Fix crash involving finalization of generators using yield from.
Library
-------
- Issue #1159051: Back out a fix for handling corrupted gzip files that
broke backwards compatibility.
- Issue #16601: Restarting iteration over tarfile no more continues from where
it left off. Patch by Michael Birtwell.
- 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 #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
- Issue #15535: Fix namedtuple pickles which were picking up the OrderedDict
instead of just the underlying tuple.
- Issue #17192: Restore the patch for Issue #11729 which was ommitted in
3.3.1 when updating the bundled version of libffi used by ctypes. Update
many libffi files that were missed in 3.3.1's update to libffi-3.0.13.
- Issue #17353: Plistlib emitted empty data tags with deeply nested
datastructures
- Issue #17707: multiprocessing.Queue's get() method does not block for short
timeouts.
- Issue #17341: Include the invalid name in the error messages from re about
invalid group names.
- Issue #17702: os.environ now raises KeyError with the original environment
variable name (str on UNIX), instead of using the encoded name (bytes on
UNIX).
- Issue #16804: Fix a bug in the 'site' module that caused running
'python -S -m site' to incorrectly throw an exception.
- Issue #17016: Get rid of possible pointer wraparounds and integer overflows
in the re module. Patch by Nickolai Zeldovich.
- 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 #17502: Process DEFAULT values in mock side_effect that returns iterator.
Patch by Michael Foord.
- Issue #17526: fix an IndexError raised while passing code without filename to
inspect.findsource(). Initial patch by Tyler Doyle.
IDLE
----
- 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.
Tests
-----
- Issue #17833: Fix test_gdb failures seen on machines where debug symbols
for glibc are available (seen on PPC64 Linux).
- Issue #7855: Add tests for ctypes/winreg for issues found in IronPython.
Initial patch by Dino Viehland.
- Issue #17835: Fix test_io when the default OS pipe buffer size is larger
than one million bytes.
- Issue #17065: Use process-unique key for winreg tests to avoid failures if
test is run multiple times in parallel (eg: on a buildbot host).
- Issue #17843: Removed bz2 test data file that was triggering false-positive
virus warnings with certain antivirus software.
Documentation
-------------
- Issue #6696: add documentation for the Profile objects, and improve
profile/cProfile docs. Patch by Tom Pinckney.
Build
-----
- Issue #17547: In configure, explicitly pass -Wformat for the benefit for GCC
4.8.
Build
-----
IDLE
-------
- 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 #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 #16306: Fix multiple error messages when unknown command line
parameters where passed to the interpreter. Patch by Hieu Nguyen.
- 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 #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 #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 #15801: Make sure mappings passed to '%' formatting are actually
subscriptable.
- Issue #15111: __import__ should let ImportError propagate when a module that
is imported as a side-effect of using fromlist tries to import a module
that cannot be found.
Library
-------
- 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 #17368: Fix an off-by-one error in the Python JSON decoder that caused
a failure while decoding empty object literals when object_pairs_hook was
specified.
- Issue #14645: The email generator classes now produce output using the
specified linesep throughout. Previously if the prolog, epilog, or
body were stored with a different linesep, that linesep was used. This
fix corrects an RFC non-compliance issue with smtplib.send_message.
- Issue #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 #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 not only when
an internal XML encoding is UTF-8 or US-ASCII. It now accepts bytes and
strings larger than 2 GiB.
- 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
- Issue #17071: Signature.bind() now works when one of the keyword arguments
is named ``self``.
- Issue #16993: shutil.which() now preserves the case of the path and extension
on Windows.
descriptor argument.
- 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 #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
- 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 #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 #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 #16408: Fix file descriptors not being closed in error conditions
in the zipfile module. Patch by Serhiy Storchaka.
- Issue #16140: The subprocess module no longer double closes its child
subprocess.PIPE parent file descriptors on child error prior to exec().
- Remove a bare print to stdout from the subprocess module that could have
happened if the child process wrote garbage to its pre-exec error pipe.
- Issue #14396: Handle the odd rare case of waitpid returning 0 when not
expected in subprocess.Popen.wait().
- Issue #16431: Use the type information when constructing a Decimal subtype
from a Decimal argument.
- Issue #12759: sre_parse now raises a proper error when the name of the group
is missing. Initial patch by Serhiy Storchaka.
- Issue #16152: fix tokenize to ignore whitespace at the end of the code when
no newline is found. Patch by Ned Batchelder.
- Issue #16230: Fix a crash in select.select() when one 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 #16116: Fix include and library paths to be correct when building C
extensions in venvs.
- 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
- Issue #16461: Wave library should be able to deal with 4GB wav files,
and sample rate of 44100 Hz.
- 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.
McDonough.
IDLE
----
- Issue #16829: IDLE printing no longer fails if there are spaces or other
special characters in the file path.
- Issue #16819: IDLE method completion now correctly works for bytes literals.
- Issue #16511: Use default IDLE width and height if config param is not valid.
Patch Serhiy Storchaka.
- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu
Patch by Todd Rovito.
Tests
-----
- Issue #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 #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: Add a test suite for the `webbrowser` module, thanks to Anton
Barkovsky.
Build
-----
- 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 #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
- Fix cross compiling issue in setup.py, ensure that lib_dirs and inc_dirs are
defined in cross compiling mode, too.
- Issue #16593: Have BSD 'make -s' do the right thing, thanks to Daniel Shahaf
- Issue #15819: Make sure we can build Python out-of-tree from a read-only
source directory. (Somewhat related to issue #9860.)
- Issue #17161: make install now also installs a python3 man page.
C-API
-----
Documentation
-------------
- Issue #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 #17156: pygettext.py now uses an encoding of source file 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.
- Issue #16060: Fix refcounting bug when `__trunc__()` returns an object whose
`__int__()` gives a non-integer. Patch by Serhiy Storchaka.
Extension Modules
-----------------
===============================================
- 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 #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),
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.
- Issue #15477: In cmath and math modules, add workaround for platforms
whose
system-supplied log1p function doesn't respect signs of zeros.
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 #15456: Fix code `__sizeof__()` after #12399 change. Patch by Serhiy
Storchaka.
- 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 #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 #14635: `telnetlib` will use poll() rather than select() when possible to
avoid failing due to the select() file descriptor limit.
- 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 #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 #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.
`execfile()`.
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.
- Issue #15277: Fix a resource leak in support.py when IPv6 is disabled. Patch
by Brian Brazil.
Build
-----
- 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
- 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 #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 Martn.
- 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).
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.
- 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 #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.
C-API
-----
- 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 #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.
attribute.
- 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 #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 Gruszczyski.
- 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.
- Fix the builtin module initialization code to store the init function for
future reinitialization.
- 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
- 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 Jdrzejewski-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-Franois 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.
(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 #13021: Missing decref on an error path. Thanks to Suman Saha for
finding the bug and providing a patch.
- 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 #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-Franois 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-Franois 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 #9319: Include the filename in "Non-UTF8 code ..." syntax error.
- 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 #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
-------
fixed.
- 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.
(Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
SDK, neither of which are available in Xcode 4. This change does not
attempt to override settings to support their use with Xcode 4.)
- When '' is a path (e.g. in sys.path), make sure __file__ uses the current
working directory instead of '' in importlib.
- 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 #13781: Fix GzipFile bug that caused an exception to be raised when
opening for writing using a fileobj returned by os.fdopen().
- 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
- Issue #11006: Don't issue low level warning in subprocess when pipe2() fails.
- Issue #13637: "a2b" functions in the binascii module now accept ASCII-only
unicode strings.
- 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.
when set to False makes run() execute the scheduled events due to expire
soonest (if any) and then return. Patch by Giampaolo Rodol.
- Issue #5689: Add support for lzma compression to the tarfile module.
- 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.
and group ids on extraction. If one of them did not exist the respective id
of the current user (i.e. root) was used for the file and ownership
information was lost.
- 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
- 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 #12576: Fix urlopen behavior on sites which do not send (or obfuscate)
a ``Connection: close`` header.
- 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 Sthrk.
- Issue #4376: ctypes now supports nested structures in a endian different than
the parent structure. Patch by Vlad Riscutia.
- 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 #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.
and was unreliable since tests or user programs could modify the interpreter
environment after Distutils set it. Instead, have Distutils set the
deployment target only in the environment of each build subprocess. It is
still possible to globally override the default by setting
MACOSX_DEPLOYMENT_TARGET before launching the interpreter; its value must
be
greater or equal to the default value, the value with which the interpreter
was built. Also, implement the same handling in packaging.
- 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 #12065: connect_ex() on an SSL socket now returns the original errno
when the socket's timeout expires (it used to return None).
- 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
- Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch
by Kasun Herath.
- 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.
policy objects.
- 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 Sthrk.
- 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 #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 #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.
- Issue #9347: Fix formatting for tuples in argparse type= error messages.
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.
- Issue #3573: IDLE hangs when passing invalid command line args
- 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
- 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.
- Issue #12764: Fix a crash in ctypes when the name of a Structure field is not
a string.
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
- 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-Franois 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 #10911: Add tests on CGI with non-ASCII characters. Patch written by
Pierre Quentel.
- 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 #6005: Examples in the socket library documentation use sendall, where
relevant, instead send method.