Professional Documents
Culture Documents
NEWS
NEWS
Python News
+++++++++++
Library
-------
Documentation
-------------
- 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.
- Issue #18905: "pydoc -p 0" now outputs actually used port. Based on patch by
Wieland Hoffmann.
Tests
-----
IDLE
----
- Issue #16893: Update Idle doc chapter to match current Idle and add new
information.
- Issue #16043: Add a default limit for the amount of data xmlrpclib.gzip_decode
will return. This resolves CVE-2013-1753.
- Issue #16041: In poplib, limit maximum line length read from the server to
prevent CVE-2013-1752.
Build
-----
- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
SSL 3.
- Issue #17128: Use private version of OpenSSL for 2.7.9 OS X 10.5+ installer.
- Issue #21963: backout issue #1856 patch (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), as it seems to
break some existing code.
- Issue #22604: Fix assertion error in debug mode when dividing a complex
number by (nan+0j).
- Issue #22526: Fix iterating through files with lines longer than 2^31 bytes.
- Issue #22221: Now the source encoding declaration on the second line isn't
effective if the first line contains anything except a comment.
Library
-------
- 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 #20421: Add a .version() method to SSL sockets exposing the actual
protocol version in use.
- Issue #22435: Fix a file descriptor leak when SocketServer bind fails.
- Issue #13664: GzipFile now supports non-ascii Unicode filenames.
- 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.
- Issue #22530: Allow the ``group()`` method of regular expression match objects
to take a ``long`` as an index.
- 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.
- 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 #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 #22226: First letter no longer is stripped from the "status" key in
the result of Treeview.heading().
- 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 #21308: Backport numerous features from Python's ssl module. This is
part of PEP 466.
- Issue #22068: Avoided reference loops with Variables and Fonts in Tkinter.
- 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 binary "data" and "maskdata"
configure options of tkinter.PhotoImage.
- Issue #19884: readline: Disable the meta modifier key if stdout is not
a terminal to not write the ANSI sequence "\033[1034h" into stdout. This
sequence is used on some terminal (ex: TERM=xterm-256color") to enable
support of 8 bit characters.
- Issue #21868: Prevent turtle crash when undo buffer set to a value less
than one.
- 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.
IDLE
----
- Issue #4832: Save As to type Python files automatically adds .py to the
name you enter (even if your system does not display it). Some systems
automatically add .txt when type is Text files.
- Issue #21986: Code objects are not normally pickled by the pickle module.
To match this, they are no longer pickled when running under Idle.
- Issue #22221: IDLE now ignores the source encoding declaration on the second
line if the first line contains anything except a comment.
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.
Tools/Demos
-----------
- Issue #10712: 2to3 has a new "asserts" fixer that replaces deprecated names
of unittest methods (e.g. failUnlessEqual -> assertEqual).
- Issue #22221: 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.
Tests
-----
- Issue #22236: Tkinter tests now don't reuse default root window. New root
window is created for every test class.
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.
- Issue #17219: Add library build dir for Python extension cross-builds.
- Issue #22878: PEP 477 - "make install" and "make altinstall" can now install
or upgrade pip, using the bundled pip provided by the backported ensurepip
module. A configure option, --with-ensurepip[=upgrade|install|no], is
available to set the option for subsequent installs; the default for Python 2
in "no" (do not install or upgrade pip). The option can also be set with
"make [alt]install ENSUREPIP=[upgrade|install|no]".
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.
- Issue #19656: Running Python with the -3 option now also warns about
non-ascii bytes literals.
Library
-------
- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
files closing.
- Issue #8343: Named group error messages in the re module did not show
the name of the erroneous group.
- Issue #21722: The distutils "upload" command now exits with a non-zero
return code when uploading fails. Patch by Martin Dengler.
- 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 #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.
IDLE
----
Tests
-----
- 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 #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
Build
-----
Windows
-------
Build
-----
- Issue #19866: Include some test data in the Windows installers, so tests don't
fail.
- Issue #20494: Ensure that free()d memory arenas are really released on POSIX
systems supporting anonymous memory mappings. Patch by Charles-François
Natali.
- Raise a better error when non-unicode codecs are used for a file's coding
cookie.
- Issue #17976: Fixed potential problem with file.write() not detecting IO error
by inspecting the return value of fwrite(). Based on patches by Jaakko Moisio
and Victor Stinner.
- Issue #14432: Generator now clears the borrowed reference to the thread
state. 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.
- Issue #12546: Allow \x00 to be used as a fill character when using str, int,
float, and complex __format__ methods.
Library
-------
- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
shape.
- Issue #7776: Backport Fix ``Host:'' header and reconnection when using
http.client.HTTPConnection.set_tunnel() from Python 3. Patch by Nikolaus
Rath.
- Issue #9291: Do not attempt to re-encode mimetype data read from registry in
ANSI mode. Initial patches by Dmitry Jemerov & Vladimir Iofik.
- Issue #21191: In os.fdopen, never close the file descriptor when an exception
happens.
- Issue #21149: Improved thread-safety in logging cleanup during interpreter
shutdown. Thanks to Devin Jeanpierre for the patch.
- 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 #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.
- Improve the random module's default seeding to use 256 bits of entropy
from os.urandom(). This was already done for Python 3, mildly improving
security with a bigger seed space.
- Issue #20501: fileinput module no longer reads whole file into memory when using
fileinput.hook_encoded.
- Issue #20594: Avoid name clash with the libc function posix_close.
- 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 #20368: The null character now correctly passed from Tcl to Python (in
unicode strings only). Improved error handling in variables-related commands.
- Issue #19456: ntpath.join() now joins relative paths correctly when a drive
is present.
- Issue #20262: Warnings are raised now when duplicate names are added in the
ZIP file or too long ZIP file comment is truncated.
- Issue #20243: TarFile no longer raise ReadError when opened in write mode.
- 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 #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 #17200: telnetlib's read_until and expect timeout was broken by the
fix to Issue #14635 in Python 2.7.4 to be interpreted as milliseconds
instead of seconds when the platform supports select.poll (ie: everywhere).
It is now treated as seconds once again.
- Issue #19099: The struct module now supports Unicode format strings.
- Issue #19878: Fix segfault in bz2 module after calling __init__ twice with
non-existent filename. Initial patch by Vajrasky Kok.
- Issue #16373: Prevent infinite recursion for ABC Set class comparisons.
- Issue #19633: Fixed writing not compressed 16- and 32-bit wave files on
big-endian platforms.
- 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 #19523: Closed FileHandler leak which occurred when delay was set.
- Issue #19480: HTMLParser now accepts all valid start-tag names as defined
by the HTML5 standard.
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.
This was backported from Python 3.3.
- Add support for the PEP 465 matrix multiplication operator to 2to3.
- 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.
IDLE
----
- Issue #21139: Change default paragraph width to 72, the PEP 8 recommendation.
- Issue #21284: Paragraph reformat test passes after user changes reformat width.
- Issue #20406: Use Python application icons for Idle window title bars.
Patch mostly by Serhiy Storchaka.
- Issue #17390: Add Python version to Idle editor window title bar.
Original patches by Edmond Burnett and Kent Johnson.
- Issue #20058: sys.stdin.readline() in IDLE now always returns only one line.
Tests
-----
- Issue #17752: Fix distutils tests when run from the installed location.
- Issue #18604: Consolidated checks for GUI availability. All platforms now
at least check whether Tk can be instantiated when the GUI resource is
requested.
- Issue #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.
- Issue #19804: The test_find_mac test in test_uuid is now skipped if the
ifconfig executable is not available.
- Issue #19886: Use better estimated memory requirements for bigmem tests.
- Issue #19588: Fixed tests in test_random that were silently skipped most
of the time. Patch by Julian Gindi.
- Issue #19085: Added basic tests for all tkinter widget options.
Build
-----
- Issue #21285: Refactor and fix curses configure check to always search
in a ncursesw directory.
Documentation
-------------
- Issue #18840: Introduce the json module in the tutorial, and de-emphasize
the pickle module.
Windows
-------
- Issue #21303, #20565: Updated the version of Tcl/Tk included in the
installer from 8.5.2 to 8.5.15.
Mac OS X
--------
Library
-------
IDLE
----
- Issue #19426: Fixed the opening of Python source file with specified encoding.
Tests
-----
- Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are
loaded from .py[co] files.
Build
-----
- Issue #13461: Fix a crash in the "replace" error handler on 64-bit platforms.
Patch by Yogesh Chaudhari.
- Issue #15866: The xmlcharrefreplace error handler no more produces two XML
entities for a non-BMP character on narrow build.
- Issue #18019: Fix crash in the repr of dictionaries containing their own
views.
- Issue #18427: str.replace could crash the interpreter with huge strings.
Library
-------
- Issue #19393: Fix symtable.symtable function to not be confused when there are
functions or classes named "top".
- 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 #18458: Prevent crashes with newer versions of libedit. Its readline
emulation has changed from 0-based indexing to 1-based like gnu readline.
Original patch by Ronald Oussoren.
- Issue #18919: If the close() method of a writer in the sunau or wave module
failed, second invocation of close() and destructor no more raise an
exception. Second invocation of close() on sunau writer now has no effects.
The aifc module now accepts lower case of names of the 'ulaw' and 'alaw'
codecs.
- Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams.
- Issue #18037: 2to3 now escapes '\u' and '\U' in native strings.
- Issue #19137: The pprint module now correctly formats empty set and frozenset
and instances of set and frozenset subclasses.
- 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 #17324: Fix http.server's request handling case on trailing '/'. Patch
contributed by Vajrasky Kok.
- Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.
- 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 #18876: The FileIO.mode attribute now better reflects the actual mode
under which the file was opened. Patch by Erik Bray.
- Issue #18851: Avoid a double close of subprocess pipes when the child
process fails starting.
- Issue #18418: After fork(), reinit all threads states, not only active ones.
Patch by A. Jesse Jiryu Davis.
- Issue #11973: Fix a problem in kevent. The flags and fflags fields are now
properly handled as unsigned.
- Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj
argument.
- Issue #17119: Fixed integer overflows when processing large Unicode strings
and tuples in the tkinter module.
- Issue #15233: Python now guarantees that callables registered with the atexit
module will be called in a deterministic order.
- 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 #18455: multiprocessing should not retry connect() with same socket.
- Issue #18155: The csv module now correctly handles csv files that use
a delimiter character that has a special meaning in regexes, instead of
throwing an exception.
Tools/Demos
-----------
- Issue #18873: 2to3 and the findnocoding.py script now detect Python source
code encoding only in comment lines.
- Issue #12990: The "Python Launcher" on OSX could not launch python scripts
that have paths that include wide characters.
Build
-----
- Issue #16067: Add description into MSI file to replace installer's temporary
name.
- 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.
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.
- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster.
- 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.
Tests
-----
- Issue #18919: Added tests for the sunau module. Unified and extended tests
for audio modules: aifc, sunau and wave.
Documentation
-------------
- Issue #18758: Fixed and improved cross-references.
Library
-------
- Issue #16601: Restarting iteration over tarfile no more continues from where
it left off. Patch by Michael Birtwell.
- Issue #19267: Fix support of multibyte encoding (ex: UTF-16) in the logging
module.
- 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 #17192: Restore the patch for Issue #10309 which was ommitted
in 2.7.4 when updating the bundled version of libffi used by ctypes.
- Issue #17843: Removed test data file that was triggering false-positive virus
warnings with certain antivirus software.
- 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 #17016: Get rid of possible pointer wraparounds and integer overflows
in the re module. Patch by Nickolai Zeldovich.
- Issue #17656: Fix extraction of zip files with unicode member paths.
- Issue #13150, #17512: 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 #17526: fix an IndexError raised while passing code without filename to
inspect.findsource(). Initial patch by Tyler Doyle.
Build
-----
- Issue #17547: In configure, explicitly pass -Wformat for the benefit for GCC
4.8.
Tests
-----
- 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).
IDLE
----
- 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.
Documentation
-------------
- Issue #6696: add documentation for the Profile objects, and improve
profile/cProfile docs. Patch by Tom Pinckney.
What's New in Python 2.7.4?
===========================
Build
-----
- Issue #15801 (again): With string % formatting, relax the type check for a
mapping such that any type with a __getitem__ can be used on the right hand
side.
IDLE
----
Tests
-----
- Issue #17835: Fix test_io when the default OS pipe buffer size is larger
than one million bytes.
- Issue #17531: Fix tests that thought group and user ids were always the int
type. Also, always allow -1 as a valid group and user id.
Documentation
-------------
- Issue #10211: Buffer objects expose the new buffer interface internally
- 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 #17043: The unicode-internal decoder no longer read past the end of
input buffer.
- Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB.
- Issue #16839: Fix a segfault when calling unicode() on a classic class early
in interpreter initialization.
- Issue #16761: Calling ``int()`` and ``long()`` 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 ValueError in winreg.SetValueEx when
given a long.
- Issue #13863: Work around buggy 'fstat' implementation on Windows / NTFS that
lead to incorrect timestamps (off by one hour) being stored in .pyc files on
some systems.
- Issue #9011: Fix hacky AST code that modified the CST when compiling
a negated numeric literal.
- Issue #16306: Fix multiple error messages when unknown command line
parameters where passed to the interpreter. Patch by Hieu Nguyen.
- Issue #15379: Fix passing of non-BMP characters as integers for the charmap
decoder (already working as unicode strings). Patch by Serhiy Storchaka.
- 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 #14700: Fix buggy overflow checks for large width and precision
in string formatting operations.
- 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() and long() docstrings and switch docstrings for
unicode(), slice(), range(), and xrange() to use multi-line signatures.
- Issue #16030: Fix overflow bug in computing the `repr` of an xrange object
with large start, step or length.
- Issue #16029: Fix overflow bug occurring when pickling xranges with large
start, step or length.
- Issue #15801: Make sure mappings passed to '%' formatting are actually
subscriptable.
- Issue #14579: Fix error handling bug in the utf-16 decoder. Patch by
Serhiy Storchaka.
- 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 #12268: File readline, readlines and read() methods no longer lose
data when an underlying read system call is interrupted. IOError is no
longer raised due to a read system call returning EINTR from within these
methods.
- Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later
on. Initial patch by SilentGhost and Jeff Ramnani.
- Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on
the work by Hirokazu Yamamoto.
- Issue #14775: Fix a potential quadratic dict build-up due to the garbage
collector repeatedly trying to untrack dicts.
- Issue #14761: Fix potential leak on an error case in the import machinery.
- 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 #14505: Fix file descriptor leak when deallocating file objects
created with PyFile_FromString().
- Issue #14331: Use significantly less stack space when importing modules by
allocating path buffers on the heap instead of the stack.
- Issue #14161: fix the __repr__ of file objects to escape the file name.
- Issue #1469629: Allow cycles through an object's __dict__ slot to be
collected. (For example if ``x.__dict__ is x``).
- Issue #13521: dict.setdefault() now does only one lookup for the given key,
making it "atomic" for many purposes. Patch by Filip Gruszczyński.
- Issue #10538: When using the "s*" code with PyArg_ParseTuple() to fill a
Py_buffer structure with data from an object supporting only the old
PyBuffer interface, a reference to the source objects is now properly added
to the Py_buffer.obj member.
Library
-------
- Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN,
retry the select() loop instead of bailing out. This is because select()
can incorrectly report a socket as ready for reading (for example, if it
received some data with an invalid checksum).
- Issue #1285086: Get rid of the refcounting hack and speed up urllib.unquote().
- 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 #17225: JSON decoder now counts columns in the first line starting
with 1, as in other lines.
- 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 #4591: Uid and gid values larger than 2**31 are supported now.
- Issue #1470548: XMLGenerator now works with UTF-16 and UTF-32 encodings.
- 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 #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 #16485: Now file descriptors are closed if file header patching failed
on closing an aifc file.
- 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 #16713: Fix the parsing of tel url with params using urlparse module.
- Issue #16597: In buffered and text IO, call close() on the underlying stream
if invoking flush() fails.
- Issue #15701: Fix HTTPError info method call to return the headers information.
- 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 #16408: Fix file descriptors not being closed in error conditions
in the zipfile module. Patch by Serhiy Storchaka.
- Issue #14396: Handle the odd rare case of waitpid returning 0 when not
expected in subprocess.Popen.wait().
- 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 #14398: Fix size truncation and overflow bugs in the bz2 module.
- 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.
- Issue #15676: Now "mmap" check for empty files before doing the
offset check. Patch by Steven Willis.
- Issue #15340: Fix importing the random module when /dev/urandom cannot
be opened. This was a regression caused by the hash randomization patch.
- Issue #15477: In cmath and math modules, add workaround for platforms whose
system-supplied log1p function doesn't respect signs of zeros.
- Issue #14635: telnetlib will use poll() rather than select() when possible
to avoid failing due to the select() file descriptor limit.
- Issue #15247: FileIO now raises an error when given a file descriptor
pointing to a directory.
- Issue #14036: Add an additional check to validate that port in urlparse does
not go in illegal range and returns None.
- Issue #14888: Fix misbehaviour of the _md5 module when called on data
larger than 2**32 bytes.
- Issue #15908: Fix misbehaviour of the sha1 module when called on data
larger than 2**32 bytes.
- Issue #15910: Fix misbehaviour of _md5 and sha1 modules when "updating"
on data larger than 2**32 bytes.
- Issue #14721: Send proper header, Content-length: 0 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 #14832: fixed the order of the argument references in the error
message produced by unittest's assertItemsEqual.
- 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 with HTTP Basic
Authentation in urllib2.
- Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites
which send EOF without trailing \r\n.
- 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 #14399: zipfile now recognizes that the archive has been modified even
if only the comment is changed. As a consequence of this fix, ZipFile is now
a new style class.
- 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 #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 #11199: Fix the with urllib which hangs on particular ftp urls.
- Issue #14159: Fix the len() of weak sets to return a better approximation
when some objects are dead or dying. Moreover, the implementation is now
O(1) rather than O(n).
- Issue #2945: Make the distutils upload command aware of bdist_rpm products.
- Issue #16441: Avoid excessive memory usage working with large gzip
files using the gzip module.
- Issue #15782: Prevent compile errors of OS X Carbon modules _Fm, _Qd, and
_Qdoffs when compiling with an SDK of 10.7 or later. The OS X APIs they
wrap have long been deprecated and have now been removed with 10.7.
These modules were already empty for 64-bit builds and have been removed
in Python 3.
Extension Modules
-----------------
- Issue #12268: The io module file object write methods no longer abort early
when a write system calls is interrupted (EINTR).
- Fix the leak of a dict in the time module when used in an embedded
interpreter that is repeatedly initialized and shutdown and reinitialized.
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 unicode literals.
- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu
Patch by Todd Rovito.
- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
ended with '\'. Patch by Roger Serwy.
- Issue #14958: Change IDLE systax highlighting to recognize all string and byte
literals currently supported in Python 2.7.
- Issue #14962: Update text coloring in IDLE shell window after changing
options. Patch by Roger Serwy.
- 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
(directory(ies) instead of file(s)) (Patch by Guilherme Polo)
- Issue #10365: File open dialog now works instead of crashing even when
parent window is closed while dialog is open.
Tests
-----
- Issue #13447: Add a test file to host regression tests for bugs in the
scripts found in the Tools directory.
- Issue #17299: Add test coverage for cPickle with file objects and general IO
objects. Original patch by Aman Shah.
- 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 #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 #16549: Add tests for json.tools. Initial patch by Berker Peksag
and Serhiy Storchaka.
- Issue #16559: Add more tests for the json module, including some from the
official test suite at json.org. Patch by Serhiy Storchaka.
- Issue #15765: Extend a previous fix to Solaris and OpenBSD for quirky
getcwd() behaviour (issue #9185) to NetBSD as well.
- Issue #15615: Add some tests for the json module's handling of invalid
input data. Patch by Kushal Das.
Build
-----
- Issue #5033: Fix building of the sqlite3 extension module when the
SQLite library version has "beta" in it. Patch by Andreas Pelme.
- Issue #17086: Backport the patches from the 3.3 branch to cross-build
the package.
- Issue #17029: Let h2py search the multiarch system include directory.
- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
- Issue #15819: Make sure we can build Python out-of-tree from a readonly
source directory. (Somewhat related to Issue #9860.)
- Issue #16256: OS X installer now sets correct permissions for doc directory.
- Issue #8767: Restore building with --disable-unicode.
Patch by Stefano Taschini.
- Issue #17161: make install now also installs a python2 and python man page.
Tools/Demos
-----------
Documentation
-------------
- 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 #15677: Document that zlib and gzip accept a compression level of 0 to
mean 'no compression'. Patch by Brian Brazil.
- Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by
Daniel Ellis.
Library
-------
- Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes in the hash
table internal to the pyexpat module's copy of the expat library to avoid a
denial of service due to hash collisions. Patch by David Malcolm with some
modifications by the expat project.
- Issue #11235: Fix OverflowError when trying to import a source file whose
modification time doesn't fit in a 32-bit timestamp.
- 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 #13546: Fixed an overflow issue that could crash the intepreter when
calling sys.setrecursionlimit((1<<31)-1).
- Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder
already accepts them).
- Issue #13268: Fix the assert statement when a tuple is passed as the message.
- Issue #13156: Revert the patch for issue #10517 (reset TLS upon fork()),
which was only relevant for the native pthread TLS implementation.
- Issue #7732: Fix a crash on importing a module if a directory has the same
name than a Python module (e.g. "__init__.py"): don't close the file twice.
- Issues #12610 and #12609: Verify that user generated AST has correct string
and identifier types before compiling.
- Issue #12149: Update the method cache after a type's dictionnary 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 #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 #10860: httplib now correctly handles an empty port after port
delimiter in URLs.
- dict_proxy objects now display their contents rather than just the class
name.
Library
-------
- Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF.
- Issue #6005: Examples in the socket library documentation use sendall, where
relevant, instead send method.
- 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 #13781: Prevent gzip.GzipFile from using the dummy filename provided by
file objects opened with os.fdopen().
- Issue #13636: Weak ciphers are now disabled by default in the ssl module
(except when SSLv2 is explicitly asked for).
- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
- Issue #13573: The csv.writer now uses the repr() for floats rather than str().
This allows floats to round-trip without loss of precision.
- 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 #13114: Fix the distutils commands check and register when the
long description is a Unicode string with non-ASCII characters.
- 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 #11657: Fix sending file descriptors over 255 over a multiprocessing
Pipe.
- Issue #12213: Fix a buffering bug with interleaved reads and writes that
could appear on io.BufferedRandom streams.
- 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 #8887: "pydoc somebuiltin.somemethod" (or help('somebuiltin.somemethod')
in Python code) now finds the doc of the method.
- Issue #12514: Use try/finally to assure the timeit module restores garbage
collections when it is done.
- Issue #12102: Document that buffered files must be flushed before being used
with mmap. Patch by Steffen Daode Nurpmeso.
- Issue #1813: Fix codec lookup and setting/getting locales under Turkish
locales.
- 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 #4376: ctypes now supports nested structures in a endian different than
the parent structure. Patch by Vlad Riscutia.
- Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira
Kitada.
- Issue #11700: mailbox proxy object close methods can now be called multiple
times without error, and _ProxyFile now closes the wrapped file.
Extension Modules
-----------------
- Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
- Issue #13159: FileIO, BZ2File, and the built-in file class now use a
linear-time buffer growth strategy instead of a quadratic one.
- 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.
IDLE
----
- 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 #8793: Prevent IDLE crash when given strings with invalid hex escape
sequences.
- Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart.
(Patch by Roger Serwy)
- 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
(directory(ies) instead of file(s)).
Build
-----
- Issue #6807: Run msisupport.mak earlier.
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.
Tests
-----
- Issue #12331: The test suite for lib2to3 can now run from an installed
Python.
- 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 #12057: Add tests for ISO 2022 codecs (iso2022_jp, iso2022_jp_2,
iso2022_kr).
Documentation
-------------
- Issue #2134: The tokenize documentation has been clarified to explain why
all operator and delimiter tokens are treated as token.OP tokens.
Library
-------
- Issue #12009: Fixed regression in netrc file comment handling.
Extension Modules
-----------------
- 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 #8651: Fix "z#" format of PyArg_Parse*() function: the size was not
written if PY_SSIZE_T_CLEAN is defined.
- 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 #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. u"\U00012345"[0]).
- Issue #8020: Avoid a crash where the small objects allocator would read
non-Python managed memory while it is being modified by another thread.
Patch by Matt Bandy.
- Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime()
can now handle dates after 2038.
- Issue #11828: startswith and endswith don't accept None as slice index.
Patch by Torsten Becker.
Library
-------
- Issue #1441530: In imaplib, use makefile() to wrap the SSL socket to avoid
heap fragmentation and MemoryError with some malloc implementations.
- 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 #12062: In the `io` module, 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 #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.
- 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 #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 #9233: Fix json.loads('{}') to return a dict (instead of a list), when
_json is not available.
- 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 #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 #11500: Fixed a bug in the os x proxy bypass code for fully qualified
IP addresses in the proxy exception list.
- Issue #11131: Fix sign of zero in plus and minus operations when
the context rounding mode is ROUND_FLOOR.
- 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 #10956: Buffered I/O classes retry reading or writing after a signal
has arrived and the handler returned successfully.
- 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 #11116: any error during addition of a message to a mailbox now causes
a rollback, instead of leaving the mailbox partially modified.
- Issue #8275: Fix passing of callback arguments with ctypes under Win64.
Patch by Stan Mihai.
- Issue #10955: Fix a potential crash when trying to mmap() a file past its
length. Initial patch by Ross Lagerwall.
- Issue #10898: Allow compiling the posix module when the C library defines
a symbol named FSTAT.
- Issue #10916: mmap should not segfault when a file is mapped using 0 as
length and a non-zero offset, and an attempt to read past the end of file
is made (IndexError is raised instead). Patch by Ross Lagerwall.
- Issue #10827: Changed the rules for 2-digit years. The time.asctime
function will now format any year when ``time.accept2dyear`` is
false and will accept years >= 1000 otherwise. The year range
accepted by ``time.mktime`` and ``time.strftime`` is still system
dependent, but ``time.mktime`` will now accept full range supported
by the OS. Conversion of 2-digit years to 4-digit is deprecated.
- Issue #7858: Raise an error properly when os.utime() fails under Windows
on an existing file.
- Issue #10806, issue #9905: Fix subprocess pipes when some of the standard
file descriptors (0, 1, 2) are closed in the parent process. Initial
patch by Ross Lagerwall.
- Issue #10753 - Characters ';', '=' and ',' in the PATH_INFO environment
variable won't be quoted when the URI is constructed by the wsgiref.util 's
request_uri method. According to RFC 3986, these characters can be a part of
params in PATH component of URI and need not be quoted.
- Issue #10611: SystemExit should not cause a unittest test run to exit.
- Issue #6791: Limit header line length (to 65535 bytes) in http.client,
to avoid denial of services from the other party.
- Issue #9907: Fix tab handling on OSX when using editline by calling
rl_initialize first, then setting our custom defaults, then reading .editrc.
- Issue #4188: Avoid creating dummy thread objects when logging operations
from the threading module (with the internal verbose flag activated).
- Issue #9721: Fix the behavior of urljoin when the relative url starts with a
';' character. Patch by Wes Chow.
- Issue #10464: netrc now correctly handles lines with embedded '#' characters.
- Issue #9348: Raise an early error if argparse nargs and metavar don't match.
- Issue #8982: Improve the documentation for the argparse Namespace object.
- Issue #9343: Document that argparse parent parsers must be configured before
their children.
- Issue #9347: Fix formatting for tuples in argparse type= error messages.
Extension Modules
-----------------
- Stop using the old interface for providing methods and attributes in the _sre
module. Among other things, this gives these classes ``__class__``
attributes. (See #12099)
IDLE
----
- Issue #11718: IDLE's open module dialog couldn't find the __init__.py
file in a package.
- 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 #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the
menu accelerators for Open Module, Go to Line, and New Indent Width.
The accelerators still work but no longer appear in the menu items.
- Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5, rather
than the currently problematic Apple-supplied one, when running with the
64-/32-bit installer variant.
- Issue #6075: IDLE on Mac OS X now works with both Carbon AquaTk and
Cocoa AquaTk.
- Issue #10404: Use ctl-button-1 on OSX for the context menu in Idle.
- Issue #10406: Enable Rstrip IDLE extension on OSX (just like on other
platforms).
- Issue #4676: <Home> toggle failing on Tk 8.5, causing IDLE exits and
strange selection behavior. Improve selection extension behaviour.
Build
-----
- Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with
the system-provided Python.
- Issue #10655: Fix the build on PowerPC on Linux with GCC when building with
timestamp profiling (--with-tsc): the preprocessor test for the PowerPC
support now looks for "__powerpc__" as well as "__ppc__": the latter seems to
only be present on OS X; the former is the correct one for Linux with GCC.
- Issue #1099: Fix the build on MacOSX when building a framework with pydebug
using GCC 4.0.
Tests
-----
- Issue #5723: Improve json tests to be executed with and without accelerations.
- Issue #11910: Fix test_heapq to skip the C tests when _heapq is missing.
- Issue #7108: Fix test_commands to not fail when special attributes ('@'
or '.') appear in 'ls -l' output.
- Issue #6293: Have regrtest.py echo back sys.flags. This is done by default
in whole runs and enabled selectively using ``--header`` when running an
explicit list of tests. Original patch by Collin Winter.
- Issue #775964: test_grp now skips YP/NIS entries instead of failing when
encountering them.
- Issue #7110: regrtest now sends test failure reports and single-failure
tracebacks to stderr rather than stdout.
Library
-------
- Issue #1710703: Write structures for an empty ZIP archive when a ZipFile is
created in modes 'a' or 'w' and then closed without adding any files. Raise
BadZipfile (rather than IOError) when opening small non-ZIP files.
- Issue #4493: urllib2 adds '/' in front of path components which does not
start with '/. Common behavior exhibited by browsers and other clients.
- Issue #10198: fix duplicate header written to wave files when writeframes()
is called without data.
- Issue #10467: Fix BytesIO.readinto() after seeking into a position after the
end of the file.
- Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru.
IDLE
----
- Issue #6378: idle.bat now runs with the appropriate Python version rather than
the system default. Patch by Sridhar Ratnakumar.
Build
-----
Tests
-----
- Issue #9424: Replace deprecated assert* methods in the Python test suite.
Documentation
-------------
- Issue #10221: dict.pop(k) now has a key error message that includes the
missing key (same message d[k] returns for missing keys).
- Issue #10186: Fix the SyntaxError caret when the offset is equal to the
length of the offending line.
- Issue #9997: Don't let the name "top" have special significance in scope
resolution.
- Issue #10068: Global objects which have reference cycles with their module's
dict are now cleared again. This causes issue #7140 to appear again.
- Issue #9737: Fix a crash when trying to delete a slice or an item from
a memoryview object.
- Issue #8530: Prevent stringlib fastsearch from reading beyond the front
of an array.
- Issue #9416: Fix some issues with complex formatting where the
output with no type specifier failed to match the str output:
- format(complex(-0.0, 2.0), '-') omitted the real part from the output,
- format(complex(0.0, 2.0), '-') included a sign and parentheses.
- Issue #7616: Fix copying of overlapping memoryview slices with the Intel
compiler.
Library
-------
- Issue #9926: Wrapped TestSuite subclass does not get __call__ executed
- Issue #10126: Fix distutils' test_build when Python was built with
--enable-shared.
- Issue #1718574: Fix options that were supposed to accept arguments but did
not in build_clib.
- Issue #10252: Close file objects in a timely manner in distutils code and
tests. Patch by Brian Brazil, completed by Éric Araujo.
- Issue #10311: The signal module now restores errno before returning from
its low-level signal handler. Patch by Hallvard B Furuseth.
- Issue #120176: Wrapped TestSuite subclass does not get __call__ executed.
- Issue #6706: asyncore accept() method no longer raises
EWOULDBLOCK/ECONNABORTED on incomplete connection attempt but returns None
instead.
- Issue #10266: uu.decode didn't close in_file explicitly when it was given
as a filename. Patch by Brian Brazil.
- Issue #10246: uu.encode didn't close file objects explicitly when filenames
were given to it. Patch by Brian Brazil.
- Issue #10253: FileIO leaks a file descriptor when trying to open a file
for append that isn't seekable. Patch by Brian Brazil.
- Issue #9295: Fix a crash under Windows when calling close() on a file
object with custom buffering from two threads at once.
- Issue #9409: Fix the regex to match all kind of filenames, for interactive
debugging in doctests.
- Issue #6612: Fix site and sysconfig to catch os.getcwd() error, eg. if the
current directory was deleted. Patch written by W. Trevor King.
- Issue #10045: Improved performance when writing after seeking past the
end of the "file" in cStringIO.
- Issue #9065: tarfile no longer uses "root" as the default for the uname and
gname field.
- Issue #1050268: parseaddr now correctly quotes double quote and backslash
characters that appear inside quoted strings in email addresses.
- Issue #9928: Properly initialize the types exported by the bz2 module.
- Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True,
and the passed buffer was exactly 1024 bytes long, the buffer wouldn't
be updated back after the system call. Original patch by Brian Brazil.
- Issue #1100562: Fix deep-copying of objects derived from the list and
dict types. Patch by Michele Orrù and Björn Lindqvist.
- Issue #2521: Use weakrefs on for caching in the abc module, so that classes
are not held onto after they are deleted elsewhere.
- Issue #7467: when reading a file from a ZIP archive, its CRC is checked
and a BadZipfile error is raised if it doesn't match (as used to be the
case in Python 2.5 and earlier).
- Issue #9551: Don't raise TypeError when setting the value to None for
SafeConfigParser instances constructed with allow_no_value == True.
- Fix Issue8280 - urllib2's Request method will remove fragements in the url.
This is how it is supposed to work, wget and curl do the same. Previous
behavior was wrong.
- Issue #9428: Fix running scripts with the profile/cProfile modules from
the command line.
- Issue #7372: Fix pstats regression when stripping paths from profile
data generated with the profile module.
- Issue #8397: Raise an error when attempting to mix iteration and regular
reads on a BZ2File object, rather than returning incorrect results.
- Issue #5294: Fix the behavior of pdb's "continue" command when called
in the top-level debugged frame.
- Issue #5727: Restore the ability to use readline when calling into pdb
in doctests.
- Issue #7909: Do not touch paths with the special prefixes ``\\.\``
or ``\\?\`` in ntpath.normpath().
- Issue #8198: In pydoc, output all help text to the correct stream
when sys.stdout is reassigned.
- Issue #1713: Fix os.path.ismount(), which returned true for symbolic links
across devices.
- Issue #1690103: Fix initial namespace for code run with trace.main().
- Issue #8620: when a Cmd is fed input that reaches EOF without a final
newline, it no longer truncates the last character of the last command line.
- Issue #3704: cookielib was not properly handling URLs with a / in the
parameters.
- Issue #9032: XML-RPC client retries the request on EPIPE error. The EPIPE
error occurs when the server closes the socket and the client sends a big
XML-RPC request.
- Issue #5542: Remove special logic that closes HTTPConnection socket on EPIPE.
- Issue #4629: getopt raises an error if an argument ends with = whereas getopt
doesn't except a value (eg. --help= is rejected if getopt uses ['help='] long
options).
- Issue #7646: The fnmatch pattern cache no longer grows without bound.
- Issue #9164: Ensure sysconfig handles dupblice archs while building on OSX
- Issue #9315: Fix for the trace module to record correct class name
for tracing methods.
Extension Modules
-----------------
- Issue #9054: Fix a crash occurring when using the pyexpat module
with expat version 2.0.1.
- Issue #7736: Release the GIL around calls to opendir() and closedir()
in the posix module. Patch by Marcin Bachry.
- As a result of issue #2521, the _weakref module is now compiled into the
interpreter by default.
- Issue #9526: Remove some outdated (int) casts that were preventing
the array module from working correctly with arrays of more than
2**31 elements.
- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
compared to other unix systems. In particular, os.getgroups() does
not reflect any changes made using os.setgroups() but basicly always
returns the same information as the id command.
Tools/Demos
-----------
- Issue #9188: The gdb extension now handles correctly narrow (UCS2) as well
as wide (UCS4) unicode builds for both the host interpreter (embedded
inside gdb) and the interpreter under test.
Build
-----
- Issue #941346: Improve the build process under AIX and allow Python to
be built as a shared library. Patch by Sébastien Sablé.
- Issue #4026: Make the fcntl extension build under AIX. Patch by Sébastien
Sablé.
- Issue #9275: The OSX installer once again installs links to binaries in
``/usr/local/bin``.
- Issue #9392: A framework build on OSX will once again use a versioned name
of the ``2to3`` tool, that is you can use ``2to3-2.7`` to select the Python
2.7 edition of 2to3.
- Issue #9701: The MacOSX installer can patch the shell profile to ensure that
the "bin" directory inside the framework is on the shell's search path. This
feature now also supports the ZSH shell.
- Issue #7473: avoid link errors when building a framework with a different
set of architectures than the one that is currently installed.
Tests
-----
- Issue #9978: Wait until subprocess completes initialization. (Win32KillTests
in test_os)
- Issue #9323: Make test.regrtest.__file__ absolute, this was not always the
case when running profile or trace, for example.
- Issue #9315: Added tests for the trace module. Patch by Eli Bendersky.
- Issue #9496: Provide a test suite for the rlcompleter module. Patch by
Michele Orrù.
Documentation
-------------
- Issue #9817: Add expat COPYING file; add expat, libffi and expat licenses
to Doc/license.rst.
- Issue #9524: Document that two CTRL* signals are meant for use only
with os.kill.
- Issue #9255: Document that the 'test' package is for internal Python use
only.
Library
-------
- Issue #9125: Add recognition of 'except ... as ...' syntax to parser module.
Extension Modules
-----------------
- Issue #9075: In the ssl module, remove the setting of a ``debug`` flag
on an OpenSSL structure.
- Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash
the interpreter with characters outside the Basic Multilingual Plane
(higher than 0x10000).
Build
-----
Library
-------
- Issue #8720: fix regression caused by fix for #4050 by making getsourcefile
smart enough to find source files in the linecache.
- Issue #8924: logging: Improved error handling for Unicode in exception text.
- Issue #8948: cleanup functions and class / module setups and teardowns are
now honored in unittest debug methods.
Documentation
-------------
- Issues #8909: Added the size of the bitmap used in the installer created by
distutils' bdist_wininst. Patch by Anatoly Techtonik.
Misc
----
- Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the
start byte and the continuation byte(s) are now considered invalid, instead
of the number of bytes specified by the start byte.
E.g.: '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and
replaces with U+FFFD only the start byte ('\xf1') and the continuation byte
('\x80') even if '\xf1' is the start byte of a 4-bytes sequence.
Previous versions returned a single u'\ufffd'.
- Issue #8748: Fix two issues with comparisons between complex and integer
objects. (1) The comparison could incorrectly return True in some cases
(2**53+1 == complex(2**53) == 2**53), breaking transivity of equality.
(2) The comparison raised an OverflowError for large integers, leading
to unpredictable exceptions when combining integers and complex objects
in sets or dicts.
- Issue #5211: Implicit coercion for the complex type is now completely
removed. (Coercion for arithmetic operations was already removed in 2.7
alpha 4, but coercion for rich comparisons was accidentally left in.)
- Issue #7902: When using explicit relative import syntax, don't try implicit
relative import semantics.
- Issue #7079: Fix a possible crash when closing a file object while using it
from another thread. Patch by Daniel Stutzbach.
- Issue #8868: Fix that ensures that python scripts have access to the
Window Server again in a framework build on MacOSX 10.5 or earlier.
C-API
-----
Library
-------
- Issue #4487: email now accepts as charset aliases all codec aliases
accepted by the codecs module.
- Issue #8833: tarfile created hard link entries with a size field != 0 by
mistake.
- Issue #6268: Fix seek() method of codecs.open(), don't read or write the BOM
twice after seek(0). Fix also reset() method of codecs, UTF-16, UTF-32 and
StreamWriter classes.
- Issue #5640: Fix Shift-JIS incremental encoder for error handlers different
than 'strict'.
- Issue #8759: Fix user paths in sysconfig for posix and os2 schemes.
Extension Modules
-----------------
- Issue #2810: Fix cases where the Windows registry API returns
ERROR_MORE_DATA, requiring a re-try in order to get the complete result.
Tests
-----
Build
-----
Tools/Demos
-----------
- Issue #8202: ``sys.argv[0]`` is now set to '-m' instead of '-c' when searching
for the module file to be executed with the -m command line option.
- Issue #8084: PEP 370 now conforms to system conventions for framework builds
on MacOS X. That is, ``python setup.py install --user`` will install into
``~/Library/Python/2.7`` instead of ``~/.local``.
Library
-------
- Issue #8681: Make the zlib module's error messages more informative when the
zlib itself doesn't give any detailed explanation.
- Issue #8354: The siginterrupt setting is now preserved for all signals, not
just SIGCHLD.
- Issue #8464: tarfile no longer creates files with execute permissions set when
mode="w|" is used.
- Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of
the Linux kernel. Patch by Yaniv Aknin.
- Issue #6312: Fix http HEAD request when the transfer encoding is chunked. It
should correctly return an empty response now.
- Issue #7490: To facilitate sharing of doctests between 2.x and 3.x test
suites, the ``IGNORE_EXCEPTION_DETAIL`` directive now also ignores the module
location of the raised exception. Based on initial patch by Lennart Regebro.
- Issue #8549: Fix compiling the _ssl extension under AIX. Patch by Sridhar
Ratnakumar.
- Issue #5103: SSL handshake would ignore the socket timeout and block
indefinitely if the other end didn't respond.
- The do_handshake() method of SSL objects now adjusts the blocking mode of the
SSL structure if necessary (as other methods already do).
- Issue #5238: Calling makefile() on an SSL object would prevent the underlying
socket from being closed until all objects get truely destroyed.
- Issue #7943: Fix circular reference created when instantiating an SSL socket.
Initial patch by Péter Szabó.
- Issue #8108: Fix the unwrap() method of SSL objects when the socket has a
non-infinite timeout. Also make that method friendlier with applications
wanting to continue using the socket in clear-text mode, by disabling
OpenSSL's internal readahead. Thanks to Darryl Miles for guidance.
- Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl
extension, such that verification of some SSL certificates doesn't fail
because of an "unknown algorithm".
- Issue #4814: The timeout parameter is now applied also for connections
resulting from PORT/EPRT commands.
- Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code
as stated in RFC-959 at chapter 5.4.
- Issue #2987: RFC 2732 support for urlparse (IPv6 addresses). Patch by Tony
Locke and Hans Ulrich Niedermann.
- Issue #7585: difflib context and unified diffs now place a tab between
filename and date, conforming to the 'standards' they were originally designed
to follow. This improves compatibility with patch tools.
- Issue #8374: Update the internal alias table in the :mod:`locale` module to
cover recent locale changes and additions.
Extension Modules
-----------------
- Use Clang 2.7's static analyzer to find places to clean up some code.
- On Windows, ctypes does no longer check the stack before and after calling a
foreign function. This allows to use the unmodified libffi library.
Tests
-----
- Issue #8672: Add a zlib test ensuring that an incomplete stream can be handled
by a decompressor object without errors (it returns incomplete uncompressed
data).
- Issue #8490: asyncore now has a more solid test suite which actually tests its
API.
- Issue #7449: Fix many tests to support Python compiled without thread support.
Patches written by Jerry Seutter.
- Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of
SSL shutdowns.
Build
-----
- Issue #8509: Fix quoting in help strings and code snippets in configure.in.
- Issue #3646: It is now easily possible to install a Python framework into your
home directory on Mac OS X, see Mac/README for more information.
Misc
----
- Issue #8329: Don't return the same lists from select.select when no fds are
changed.
- Issue #8259: ``1L << (2**31)`` no longer produces an 'outrageous shift error'
on 64-bit machines. The shift count for either left or right shift is
permitted to be up to sys.maxsize.
- Ensure that tokenization of identifiers is not affected by locale.
- Issue #8268: Old-style classes (not just instances) now support weak
references.
- Issue #1583863: An unicode subclass can now override the __unicode__ method
- Issue #6474: Make error message from passing an inadequate number of keyword
arguments to a function correct.
Library
-------
- Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters.
- Issue #8321: Give access to OpenSSL version numbers from the `ssl` module,
using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO` and
`ssl.OPENSSL_VERSION_NUMBER`.
- Issue #8257: The Decimal construct now accepts a float instance directly,
converting that float to a Decimal of equal value:
>>> Decimal(1.1)
Decimal('1.100000000000000088817841970012523233890533447265625')
- Issue #8294: The Fraction constructor now accepts Decimal and float instances
directly.
- Issue #2531: Comparison operations between floats and Decimal instances now
return a result based on the numeric values of the operands; previously they
returned an arbitrary result based on the relative ordering of id(float) and
id(Decimal).
- Comparisons using one of <, <=, >, >= between a complex instance and a
Fractions instance now raise TypeError instead of returning True/False. This
makes Fraction <=> complex comparisons consistent with int <=> complex, float
<=> complex, and complex <=> complex comparisons.
- Issue #8205: Remove the "Modules" directory from sys.path when Python is
running from the build directory (POSIX only).
- Issue #7703: ctypes supports both buffer() and memoryview(). The former is
deprecated.
- Issue #7860: platform.uname now reports the correct 'machine' type when Python
is running in WOW64 mode on 64 bit Windows.
- logging: Added getChild utility method to Logger and added isEnabledFor method
to LoggerAdapter.
- Issue #8201: logging: Handle situation of non-ASCII and Unicode logger names
existing at the same time, causing a Unicode error when configuration code
attempted to sort the existing loggers.
- Issue #8200: logging: Handle errors when multiprocessing is not fully loaded
when logging occurs.
- Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets.
Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking
reads and writes are always retried by OpenSSL itself.
- Issue #7774: Set sys.executable to an empty string if ``argv[0]`` has been set
to an non existent program name and Python is unable to retrieve the real
program name.
- Issue #8117: logging: Improved algorithm for computing initial rollover time
for ``TimedRotatingFileHandler`` by using the modification time of an existing
log file to compute the next rollover time. If the log file does not exist,
the current time is used as the basis for the computation.
- Issue #7880: Fix sysconfig when the python executable is a symbolic link.
- Issue #7143: email: ``get_payload()`` used to strip any trailing newline from
a base64 transfer-encoded payload *after* decoding it; it no longer does.
This is a behavior change, so email's minor version number is now bumped, to
version 4.0.2, for the 2.7 release.
- Issue #1220212: Added os.kill support for Windows, including support for
sending CTRL+C and CTRL+BREAK events to console subprocesses.
Extension Modules
-----------------
- Issue #8314: Fix unsigned long long bug in libffi on Sparc v8.
- Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument.
- Issue #8156: bsddb module updated to version 4.8.4.
http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.8.4. This update drops
support for Berkeley DB 4.0, and adds support for 4.8.
- Issue #7347: _winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a bug in
the return value of QueryReflectionKey.
Tools/Demos
-----------
Build
-----
- Issue #8032: For gdb7, a python-gdb.py file is added to the build, allowing to
use advanced gdb features when debugging Python.
- Issue #1628484: The Makefile doesn't ignore the CFLAGS environment variable
anymore. It also forwards the LDFLAGS settings to the linker when building a
shared library.
- Make sure that the FreeBSD build of the included libffi uses the proper
assembly file.
C-API
-----
- Issue #7992: A replacement PyCObject API, PyCapsule, has been backported from
Python 3.1. All existing Python CObjects in the main distribution have been
converted to capsules. To address backwards-compatibility concerns,
PyCObject_AsVoidPtr() was changed to understand capsules.
Tests
-----
- Issue #3864: Skip three test_signal tests on freebsd6 because they fail if any
thread was previously started, most likely due to a platform bug.
- Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi.
- Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special
Unicode normalization cases.
- Issue #7544: Preallocate thread memory before creating the thread to avoid a
fatal error in low memory condition.
- Issue #7820: The parser tokenizer restores all bytes in the right if the BOM
check fails.
- Issue #7649: "u'%c' % char" now behaves like "u'%s' % char" and raises a
UnicodeDecodeError if 'char' is a byte string that can't be decoded using the
default encoding.
- Issue #6902: Fix problem with built-in types format incorrectly with 0
padding.
Library
-------
- Issue #1555570: email no longer inserts extra blank lines when a \r\n
combo crosses an 8192 byte boundary.
- Issue #7494: Fix a crash in ``_lsprof`` (cProfile) after clearing the profiler,
reset also the pointer to the current pointer context.
- Issue #7232: Add support for the context management protocol to the
``tarfile.TarFile`` class.
- Issue #7959: ctypes callback functions are now registered correctly with the
cycle garbage collector.
- Issue #3426: ``os.path.abspath`` now returns unicode when its arg is unicode.
- Issue #7633: In the decimal module, ``Context`` class methods (with the
exception of canonical and is_canonical) now accept instances of int and long
wherever a Decimal instance is accepted, and implicitly convert that argument
to Decimal. Previously only some arguments were converted.
- Issue #6247: The argparse module has been added to the standard library.
Extension Modules
-----------------
- The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure
bugs and allows loading SQLite extensions from shared libraries.
- Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as
msvcr100.dll is not a platform assembly anymore.
Tests
-----
- Print platform information when running the whole test suite, or using the
``--verbose`` flag.
- Issue #6292: For the moment at least, the test suite runs cleanly if python
is run with the -OO flag. Tests requiring docstrings are skipped.
- Issue #7788: Fix an interpreter crash produced by deleting a list slice with
very large step value.
- Issue #7632: Fix various str -> float conversion bugs present in 2.7 alpha 2,
including:
(1) a serious 'wrong output' bug that could occur for long (> 40 digit) input
strings,
(2) a crash in dtoa.c that occurred in debug builds when parsing certain long
numeric strings corresponding to subnormal values,
(3) a memory leak for some values large enough to cause overflow, and
(4) a number of flaws that could lead to incorrectly rounded results.
Library
-------
- Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in
XML processing instructions and comments. These raw characters are allowed
by the XML specification, and are necessary when outputting e.g. PHP code in
a processing instruction. Patch by Neil Muller.
- Issue #6939: Fix file I/O objects in the `io` module to keep the original
file position when calling `truncate()`. It would previously change the file
position to the given argument, which goes against the tradition of
ftruncate() and other truncation APIs. Patch by Pascal Chambon.
- Issue #7748: Since unicode values are supported for some metadata options in
Distutils, the DistributionMetadata get_* methods will now return an utf-8
encoded string for them. This ensures that the upload and register commands
send the correct values to PyPI without any error.
- Issue #3299: Fix possible crash in the _sre module when given bad argument
values in debug mode. Patch by Victor Stinner.
- Issue #7703: Add support for the new buffer API to functions of the binascii
module. Backported from py3k by Florent Xicluna, with some additional tests.
- Issue #2846: Add support for gzip.GzipFile reading zero-padded files. Patch
by Brian Curtin.
- Issue #5827: Make sure that normpath preserves unicode. Initial patch by
Matt Giuca.
Extension Modules
-----------------
- Expat: Fix DoS via XML document with malformed UTF-8 sequences
(CVE_2009_3560).
Build
-----
- Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
Tools/Demos
-----------
Tests
-----
Documentation
-------------
- Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,
`rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.
- Issue #7534: Fix handling of IEEE specials (infinities, nans, negative zero)
in ** operator. The behaviour now conforms to that described in C99 Annex F.
- Issue #7579: The msvcrt module now has docstrings for all its functions.
- Issue #1811: Improve accuracy and cross-platform consistency for true division
of integers: the result of a/b is now correctly rounded for ints a and b (at
least on IEEE 754 platforms), and in particular does not depend on the
internal representation of a long.
- Issue #6834: Replace the implementation for the 'python' and 'pythonw'
executables on OSX.
These executables now work properly with the arch(1) command: ``arch -ppc
python`` will start a universal binary version of python in PPC mode (unlike
previous releases).
- Issue #1680159: Unicode coercion during an 'in' operation no longer masks the
underlying error when the coercion fails for the left hand operand.
- Issue #7466: Segmentation fault when the garbage collector is called in the
middle of populating a tuple. Patch by Florent Xicluna.
Library
-------
- Issue #7092: Remove py3k warning when importing cPickle. 2to3 handles
renaming of `cPickle` to `pickle`. The warning was annoying since there's no
alternative to cPickle if you care about performance. Patch by Florent
Xicluna.
- Issue #7455: Fix possible crash in cPickle on invalid input. Patch by Victor
Stinner.
- Issue #7092: Fix the DeprecationWarnings emitted by the standard library when
using the -3 flag. Patch by Florent Xicluna.
- Issue #7556: Distutils' msvc9compiler now opens the MSVC Manifest file in text
mode.
- Issue #7552: Removed line feed in the base64 Authorization header in the
Distutils upload command to avoid an error when PyPI reads it. This occurs on
long passwords. Initial patch by JP St. Pierre.
- Issue #7231: urllib2 cannot handle https with proxy requiring auth. Patch by
Tatsuhiro Tsujikawa.
- Issue #7349: Make methods of file objects in the io module accept None as an
argument where file-like objects (ie StringIO and BytesIO) accept them to mean
the same as passing no argument.
- Issue #5949: Fixed IMAP4_SSL hang when the IMAP server response is missing
proper end-of-line termination.
- Issue #3745: Undo the 2.7a1 change to have hashlib to reject unicode and non
buffer API supporting objects as input. That behavior is for 3.x only.
C-API
-----
Build
-----
- Issue #6943: Use pkg-config to find the libffi headers when the
``--with-system-ffi`` flag is used.
- Issue #7589: Only build the nis module when the correct header files are
found.
Tests
-----
- Issue #7376: Instead of running a self-test (which was failing) when called
with no arguments, doctest.py now gives a usage message.
- Issue #7396: Fix regrtest -s, which was broken by the -j enhancement.
- Issue #3382: 'F' formatting for float and complex now convert the result to
upper case. This only affects 'inf' and 'nan', since 'f' no longer converts
to 'g' for large values.
- Remove switch from "%f" formatting to "%g" formatting for floats larger than
1e50 in absolute value.
- Issue #7362: Give a proper error message for ``def f((x)=3): pass``.
- Issue #7085: Fix crash when importing some extensions in a thread on MacOSX
10.6.
- Issue #7117: ``repr(x)`` for a float x returns a result based on the shortest
decimal string that's guaranteed to round back to x under correct rounding
(with round-half-to-even rounding mode). Previously it gave a string based on
rounding x to 17 decimal digits. repr(x) for a complex number behaves
similarly. On platforms where the correctly-rounded strtod and dtoa code is
not supported (see below), repr is unchanged.
- Issue #7117: Backport round implementation from Python 3.x. ``round()`` now
uses the correctly-rounded string <-> float conversions described above (when
available), and so produces correctly rounded results that will display nicely
under the float repr. There are two related small changes: (1) round now
accepts any class with an ``__index__()`` method for its second argument (but
no longer accepts floats for the second argument), and (2) an excessively
large second integer argument (e.g., ``round(1.234, 10**100)``) no longer
raises an exception.
- Issue #1757126: Fix the cyrillic-asian alias for the ptcp154 encoding.
- Fix several issues with ``compile()``. The input can now contain Windows and
Mac newlines and is no longer required to end in a newline.
- Issue #7140: The ``__dict__`` of a module should not be cleared unless the
module is the only object holding a reference to it.
- Issue #1754094: Improve the stack depth calculation in the compiler. There
should be no other effect than a small decrease in memory use. Patch by
Christopher Tur Lesniewski-Laas.
- Issue #7084: Fix a (very unlikely) crash when printing a list from one thread,
and mutating it from another one. Patch by Scott Dial.
- Issue #1571184: The Unicode database contains properties for more characters.
The tables for code points representing numeric values, white spaces or line
breaks are now generated from the official Unicode Character Database files,
and include information from the Unihan.txt file.
- Issue #7050: Fix a SystemError when trying to use unpacking and augmented
assignment.
- Issue #5329: Fix ``os.popen*`` regression from 2.5 with commands as a sequence
running through the shell. Patch by Jean-Paul Calderone and Jani Hakala.
- Issue #7019: Raise ValueError when unmarshalling bad long data, instead of
producing internally inconsistent Python longs.
- Issue #6990: Fix ``threading.local`` subclasses leaving old state around after
a reference cycle GC which could be recycled by new locals.
- Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32
stream with a non-raising error handler like "replace" or "ignore".
- Issue #6713: Improve performance of base 10 int -> string and long -> string
conversions.
- Issue #1590864: Fix potential deadlock when mixing threads and fork().
- Issue #6750: A text file opened with ``io.open()`` could duplicate its output
when writing from multiple threads at the same time.
- Issue #6704: Improve the col_offset in AST for "for" statements with a target
of tuple unpacking.
- Issue #6070: On posix platforms import no longer copies the execute bit from
the .py file to the .pyc file if it is set. Patch by Marco N.
- Issue #4618: When unicode arguments are passed to ``print()``, the default
separator and end should be unicode also.
- Issue #2016: Fixed a crash in a corner case where the dictionary of keyword
arguments could be modified during the function call setup.
- Issue #6329: Fixed iteration for memoryview objects (it was being blocked
because it wasn't recognized as a sequence).
- Issue #5330: C functions called with keyword arguments were not reported by
the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau.
- Issue #5982: staticmethod and classmethod now expose the wrapped function with
``__func__``.
- Issue #6101: A new opcode, SETUP_WITH, has been added to speed up the with
statement and correctly lookup the __enter__ and __exit__ special methods.
(1) inf and nan strings with trailing whitespace were incorrectly rejected;
(2) parsing of strings representing infinities and nans was locale aware; and
(3) the interpretation of fromhex('-nan') didn't match that of float('-nan').
- Issue #5920: For ``float.__format__()``, change the behavior with the empty
presentation type (that is, not one of 'e', 'f', 'g', or 'n') to be like 'g'
but with at least one decimal point and with a default precision
of 12. Previously, the behavior the same but with a default precision of 6.
This more closely matches ``str()``, and reduces surprises when adding
alignment flags to the empty presentation type. This also affects the new
complex.__format__ in the same way.
- Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal
sequences. Patch by Nick Barnes and Victor Stinner.
- Issue #5864: Fix empty format code formatting for floats so that it never
gives more than the requested number of significant digits.
- Issue #4971: Fix titlecase for characters that are their own titlecase, but
not their own uppercase.
- Issue #5835: Deprecate PyOS_ascii_formatd and replace it with
_PyOS_double_to_string or PyOS_double_to_string.
- Implement PEP 378, Format Specifier for Thousands Separator, for floats, ints,
and longs.
- Issue #5515: 'n' formatting for ints, longs, and floats handles leading zero
formatting poorly.
- Issue #5772: For float.__format__, don't add a trailing ".0" if we're using no
type code and we have an exponent.
- Issue #3166: Make long -> float (and int -> float) conversions correctly
rounded.
- Issue #2396: The memoryview object was backported from Python 3.1.
- Issue #1665206: Remove the last eager import in _warnings.c and make it lazy.
- Issue #4688: Add a heuristic so that tuples and dicts containing only
untrackable objects are not tracked by the garbage collector. This can reduce
the size of collections and therefore the garbage collection overhead on
long-running programs, depending on their particular use of datatypes.
- Issue #5512: Rewrite PyLong long division algorithm (x_divrem) to improve its
performance. Long divisions and remainder operations are now between 50% and
150% faster.
- Issue #4258: Make it possible to use base 2**30 instead of base 2**15 for the
internal representation of integers, for performance reasons. Base 2**30 is
enabled by default on 64-bit machines. Add --enable-big-digits option to
configure, which overrides the default. Add sys.long_info structseq to
provide information about the internal format.
- Issue #4034: Fix weird attribute error messages of the traceback object. (As a
result traceback.__members__ no longer exists.)
- Issue #5247: Improve error message when unknown format codes are used when
using ``str.format()`` with str, unicode, long, int, and float arguments.
- Running Python with the -3 option now also warns about classic division for
ints and longs.
- Issue #5260: Long integers now consume less memory: average saving is 2 bytes
per long on a 32-bit system and 6 bytes per long on a 64-bit system.
- Issue #5186: Reduce hash collisions for objects with no __hash__ method by
rotating the object pointer by 4 bits to the right.
- Issue #4575: Fix Py_IS_INFINITY macro to work correctly on x87 FPUs: it now
forces its argument to double before testing for infinity.
- Issue #4935: The overflow checking code in the expandtabs() method common to
str, bytes and bytearray could be optimized away by the compiler, letting the
interpreter segfault instead of raising an error.
- Issue #3720: Fix a crash when an iterator modifies its class and removes its
__next__ method.
- Issue #4074: Change the criteria for doing a full garbage collection (i.e.
collecting the oldest generation) so that allocating lots of objects without
destroying them does not show quadratic performance. Based on a proposal by
Martin von Löwis at
http://mail.python.org/pipermail/python-dev/2008-June/080579.html.
- Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open
file with `str' filename on Windows.
- Issue #3680: Reference cycles created through a dict, set or deque iterator
did not get collected.
- Added test case to ensure attempts to read from a file opened for writing
fail.
- Issue #2467: gc.DEBUG_STATS reported invalid elapsed times. Also, always print
elapsed times, not only when some objects are uncollectable/unreachable.
Original patch by Neil Schemenauer.
- Issue #2183: Simplify and optimize bytecode for list comprehensions. Original
patch by Neal Norwitz.
- Issue #4597: Fixed exception handling when the __exit__ function of a context
manager returns a value that cannot be converted to a bool.
- Issue #4597: Fixed several opcodes that weren't always propagating exceptions.
- Issue #3689: The list reversed iterator now supports __length_hint__ instead
of __len__. Behavior now matches other reversed iterators.
- Issue #4367: Python would segfault during compiling when the unicodedata
module couldn't be imported and \N escapes were present.
- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()`` method on
file objects with closefd=False. The file descriptor is still kept open but
the file object behaves like a closed file. The ``FileIO`` object also got a
new readonly attribute ``closefd``.
- Issue #4348: Some bytearray methods returned that didn't cause any change to
the bytearray, returned the same bytearray instead of a copy.
- Issue #4048: The parser module now correctly validates relative imports.
- Issue #4176: Fixed a crash when pickling an object which ``__reduce__`` method
does not return iterators for the 4th and 5th items.
- The re.sub(), re.subn() and re.split() functions now accept a flags parameter.
- Issue #1113244: Py_XINCREF, Py_DECREF, Py_XDECREF: Add `do { ... } while (0)'
to avoid compiler warnings.
- Issue #5705: os.setuid() would not accept values > 2**31-1 but pwd.getpwnam()
returned them on 64bit platforms.
- Issue #2422: When compiled with the ``--with-valgrind`` option, the pymalloc
allocator will be automatically disabled when running under Valgrind. This
gives improved memory leak detection when running under Valgrind, while taking
advantage of pymalloc at other times.
Library
-------
- Issue #6986: Fix crash in the JSON C accelerator when called with the wrong
parameter types. Patch by Victor Stinner.
- Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is generated
in Distutils. Patch by Stephen Emslie.
- Issue #4120: Drop reference to CRT from manifest when building extensions with
msvc9compiler.
- Issue #1515: Enable use of deepcopy() with instance methods. Patch by Robert
Collins.
- Issue #6845: Add restart support for binary upload in ftplib. The
``storbinary()`` method of FTP and FTP_TLS objects gains an optional "rest"
argument. Patch by Pablo Mouzo.
- Issue #6123: tarfile now opens empty archives correctly and consistently
raises ReadError on empty files.
- Issue #7341: Close the internal file object in the TarFile constructor in case
of an error.
- Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch.
- Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using TLS
or SSL. Patch by Giampaolo Rodola'.
- Issue #4969: The mimetypes module now reads the MIME database from the
registry under Windows. Patch by Gabriel Genellina.
- Issue #6816: runpy now provides a run_path function that allows Python code to
execute file paths that refer to source or compiled Python files as well as
zipfiles, directories and other valid sys.path entries that contain a
__main__.py file. This allows applications that run other Python scripts to
support the same flexibility as the CPython command line itself.
- Issue #7282: Fix a memory leak when an RLock was used in a thread other than
those started through ``threading.Thread`` (for example, using
``thread.start_new_thread()``.
- Issue #7211: Allow 64-bit values for the ``ident`` and ``data`` fields of
kevent objects on 64-bit systems. Patch by Michael Broghton.
- Issue #6896: ``mailbox.Maildir`` now invalidates its internal cache each time
a modification is done through it. This fixes inconsistencies and test
failures on systems with slightly bogus mtime behaviour.
- Issue #7246 & Issue #7208: getpass now properly flushes input before reading
from stdin so that existing input does not confuse it and lead to incorrect
entry or an IOError. It also properly flushes it afterwards to avoid the
terminal echoing the input afterwards on OSes such as Solaris.
- Issue #7233: Fix a number of two-argument Decimal methods to make sure that
they accept an int or long as the second argument. Also fix buggy handling of
large arguments (those with coefficient longer than the current precision) in
shift and rotate.
- Issue #4750: Store the basename of the original filename in the gzip FNAME
header as required by RFC 1952.
- Issue #7205: Fix a possible deadlock when using a BZ2File object from several
threads at once.
- Issue #6218: io.StringIO and io.BytesIO instances are now picklable with
protocol 2.
- Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424.
- Issue #7099: Decimal.is_normal now returns True for numbers with exponent
larger than emax.
- Issue #5833: Fix extra space character in readline completion with the GNU
readline library version 6.0.
- Issue #7133: SSL objects now support the new buffer API.
- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment.
- Issue #7082: When falling back to the MIME 'name' parameter, the correct place
to look for it is the Content-Type header.
- Issue #7048: Force Decimal.logb to round its result when that result is too
large to fit in the current precision.
- Issue #6236, #6348: Fix various failures in the `io` module under AIX and
other platforms, when using a non-gcc compiler. Patch by egreen.
- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now
always result in NULL.
- Issue #5042: ctypes Structure sub-subclass does now initialize correctly with
base class positional arguments.
- Issue #6857: Default format() alignment should be '>' for Decimal instances.
- Issue #2666: Handle BROWSER environment variable properly for unknown browser
names in the webbrowser module.
- Issue #6693: New functions in site.py to get user/global site packages paths.
- Issue #1522587: New constants and methods for the Tix.Grid widget.
- Issue #6665: Fix fnmatch to properly match filenames with newlines in them.
- Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview*
and yview* methods.
- Issue #6629: Fix a data corruption issue in the new `io` package, which could
occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or
"wb+" mode) after having buffered a certain amount of data for reading. This
bug was not present in the pure Python implementation.
- Issue #6595: The Decimal constructor now allows arbitrary Unicode decimal
digits in input, as recommended by the standard. Previously it was restricted
to accepting [0-9].
- unittest has been split up into a package. All old names should still work.
- Issue #6431: Make Fraction type return NotImplemented when it doesn't know how
to handle a comparison without loss of precision. Also add correct handling
of infinities and nans for comparisons with float.
- Issue #6314: logging: Extra checks on the "level" argument in more places.
- Issue #6377: Enabled the compiler option, and deprecate its usage as an
attribute.
- Issue #6365: Distutils build_ext inplace mode was copying the compiled
extension in a subdirectory if the extension name had dots.
- Issue #6271: mmap tried to close invalid file handle (-1) for anonymous maps
on Unix.
- Issue #6215: All bug fixes and enhancements from the Python 3.1 io library
(including the fast C implementation) have been backported to the standard
``io`` module.
- Issue #6121: pydoc now ignores leading and trailing spaces in the argument to
the 'help' function.
- Issue #5311: bdist_msi can now build packages that do not depend on a specific
Python version.
- Issue #1309352: fcntl now converts its third arguments to a C `long` rather
than an int, which makes some operations possible under 64-bit Linux (e.g.
DN_MULTISHOT with F_NOTIFY).
- Issue #1424152: Fix for httplib, urllib2 to support SSL while working through
proxy. Original patch by Christopher Li, changes made by Senthil Kumaran.
- Issue #1983: Fix functions taking or returning a process identifier to use the
dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have a
process identifier type wider than the standard C integer type.
- Issue #6046: Fixed the library extension when distutils build_ext is used in
place. Initial patch by Roumen Petrov.
- Issue #6041: Now distutils `sdist` and `register` commands use `check` as a
subcommand.
- Issue #2116: Weak references and weak dictionaries now support copy()ing and
deepcopy()ing.
- Issue #6022: A test file was created in the current working directory by
test_get_outputs in Distutils.
- Issue #5977: distutils build_ext.get_outputs was not taking into account the
inplace option. Initial patch by kxroberto.
- Issue #5900: Ensure RUNPATH is added to extension modules with RPATH if GNU ld
is used. Original patch by Floris Bruynooghe.
- Issue #5941: Distutils build_clib command was not working anymore because of
an incomplete costumization of the archiver command. Added ARFLAGS in the
Makefile besides AR and make Distutils use it. Original patch by David
Cournapeau.
- Issue #5955: aifc's close method did not close the file it wrapped, now it
does. This also means getfp method now returns the real fp.
- Issue #5142: Add the ability to skip modules while stepping to pdb.
- Issue #5084: Unpickling now interns the attribute names of pickled objects,
saving memory and avoiding growth in size of subsequent pickles. Proposal and
original patch by Jake McGuire.
- Issue #3959: The ipaddr module has been added to the standard library.
Contributed by Google.
- Issue #2245: aifc now skips chunk types it doesn't recognize, per spec.
- Issue #5853: Calling a function of the mimetypes module from several threads
at once could hit the recursion limit if the mimetypes database hadn't been
initialized before.
- Issue #5854: Updated __all__ to include some missing names and remove some
names which should not be exported.
- Issue #3102: All global symbols that the _ctypes extension defines are now
prefixed with 'Py' or '_ctypes'.
- Issue #5812: Fraction('1e6') is valid: more generally, any string that's valid
for float() is now valid for Fraction(), with the exception of strings
representing NaNs and infinities.
- Issue #5768: Fixed bug in Unicode output logic and test case for same.
- Issue #1161031: Fix readwrite select flag handling: POLLPRI now results in a
handle_expt_event call, not handle_read_event, and POLLERR and POLLNVAL now
call handle_close, not handle_expt_event. Also, dispatcher now has an
'ignore_log_types' attribute for suppressing log messages, which is set to
'warning' by default.
- Issue #5741: Don't disallow "%%" (which is an escape for "%") when setting a
value in SafeConfigParser.
- Issue #2254: Fix CGIHTTPServer information disclosure. Relative paths are now
collapsed within the url properly before looking in cgi_directories.
- Issue #5095: Added bdist_msi to the list of bdist supported formats. Initial
fix by Steven Bethard.
- Issue #1726172: Fix IndexError in the case of and empty response in ftplib.
- Issue #3379: unittest.main now takes an optional exit argument. If False main
doesn't call sys.exit allowing it to be used from the interactive interpreter.
- Issue #5663: Better failure messages for unittest asserts. Default assertTrue
and assertFalse messages are now useful. TestCase has a longMessage attribute.
This defaults to False, but if set to True useful error messages are shown in
addition to explicit messages passed to assert methods.
- Issue #1665206 (partially): Move imports in cgitb to the top of the module
instead of performing them in functions. Helps prevent import deadlocking in
threads.
- Issue #2522: locale.format() now checks its first argument to ensure it has
been passed only one pattern, avoiding mysterious errors where it appeared
that it was failing to do localization.
- Issue #5619: Multiprocessing children disobey the debug flag and causes popups
on windows buildbots. Patch applied to work around this issue.
- Issue #5632: Thread.ident was None for the main thread and threads not created
with the threading module.
- Issue #1034053: unittest now supports skipping tests and expected failures.
- Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop forever
on incomplete input. That caused tarfile.open() to hang when used with mode
'r' or 'r:bz2' and a fileobj argument that contained no data or partial bzip2
compressed data.
- Issue #5536: urllib.urlretrieve makes sure to close the file it's writing to
even if an exception occurs.
- Issue #2110: Add support for thousands separator and 'n' type specifier to
``Decimal.__format__()``.
- Fix Decimal.__format__ bug that swapped the meanings of the '<' and '>'
alignment characters.
- Issue #4308: httplib.IncompleteRead's repr doesn't include all of the data all
ready received.
- Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer
overrun.
- Issue #1533164: Installed but not listed *.pyo was breaking Distutils
bdist_rpm command.
- Issue #5287: Add exception handling around findCaller() call to help out
IronPython.
- Issue #5282: Fixed mmap resize on 32bit Windows and Unix. When ``offset >
0``, the file was resized to wrong size.
- Issue #5170: Fixed Unicode output bug in logging and added test case. This is
a regression which did not occur in 2.5.
- Issue #4195: The ``runpy`` module (and the ``-m`` switch) now support the
execution of packages by looking for and executing a ``__main__`` submodule
when a package name is supplied. Initial patch by Andi Vajda.
- Issue #1276768: The verbose option was not used in the code of
distutils.file_util and distutils.dir_util.
- Issue #1581476: Always use the Tcl global namespace when calling into Tcl.
- Issue #2047: shutil.move() could believe that its destination path was inside
its source path if it began with the same letters (e.g. "src" vs. "src.new").
- Issue #4920: Fixed .next() vs .__next__() issues in the ABCs for Iterator and
MutableSet.
- Added the ttk module. See issue #2983: Ttk support for Tkinter.
- Issue #1885: distutils: When running sdist with --formats=tar,gztar the tar
file was overriden by the gztar one.
- Fix and properly document the multiprocessing module's logging support, expose
the internal levels and provide proper usage examples.
- Issue #3881: Help Tcl to load even when started through the unreadable local
symlink to "Program Files" on Vista.
- Issue #4710: Extract directories properly in the zipfile module; allow adding
directories to a zipfile.
- Issue #5008: When a file is opened in append mode with the new IO library, do
an explicit seek to the end of file (so that e.g. tell() returns the file size
rather than 0). This is consistent with the behaviour of the traditional 2.x
file object.
- Issue #5013: Fixed a bug in FileHandler which occurred when the delay
parameter was set.
- Issue #4998: The memory saving effect of __slots__ had been lost on Fractions
which inherited from numbers.py which did not have __slots__ defined. The
numbers hierarchy now has its own __slots__ declarations.
- Issue #3997: Zipfiles generated with more than 65536 files could not be opened
with other applications.
- Issue #1702551: distutils sdist was not excluding VCS directories under
Windows. Initial solution by Guy Dalberto.
- Issue #4646: distutils was choking on empty options arg in the setup function.
Original patch by Thomas Heller.
- Issue #4790: The nsmallest() and nlargest() functions in the heapq module did
unnecessary work in the common case where no key function was specified.
- Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@') works
as expected in the interactive environment.
- Issue #4223: inspect.getsource() will now correctly display source code for
packages loaded via zipimport (or any other conformant PEP 302
loader). Original patch by Alexander Belopolsky.
- Issue #4201: pdb can now access and display source code loaded via zipimport
(or any other conformant PEP 302 loader). Original patch by Alexander
Belopolsky.
- Issue #4197: Doctests in modules loaded via zipimport (or any other PEP 302
conformant loader) will now work correctly in most cases (they are still
subject to the constraints that exist for all code running from inside a
module loaded via a PEP 302 loader and attempting to perform IO operations
based on __file__). Original patch by Alexander Belopolsky.
- Issues #4082 and #4512: Add runpy support to zipimport in a manner that allows
backporting to maintenance branches. Original patch by Alexander Belopolsky.
- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to give correct
results in the case where one argument is a quiet NaN and the other is a
finite number that requires rounding.
- Issue #1030250: Distutils created directories even when run with the --dry-run
option.
- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat libs.
- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if the
ctypes module is not present.
- Issue #3774: Fixed an error when create a Tkinter menu item without command
and then remove it.
- Issue #4150: Pdb's "up" command now works for generator frames in post-mortem
debugging.
- Issue #4014: Don't claim that Python has an Alpha release status, in addition
to claiming it is Mature.
- Issue #4730: Fixed the cPickle module to handle correctly astral characters
when protocol 0 is used.
- Issue #1149804: macostools.mkdirs now even works when another process creates
one of the needed subdirectories.
- Issue #5104: The socket module now raises OverflowError when 16-bit port and
protocol numbers are supplied outside the allowed 0-65536 range on bind() and
getservbyport().
- Issue #999042: The Python compiler now handles explict global statements
correctly (should be assigned using STORE_GLOBAL opcode).
IDLE
----
- Issue #5150: IDLE's format menu now has an option to strip trailing
whitespace.
- Issue #5783: Windows: Version string for the .chm help file changed,
file not being accessed Patch by Guilherme Polo/
- Remove port spec from run.py and fix bug where subprocess fails to
extract port from command line when warnings are present.
Tools/Demos
-----------
Build
-----
- Issue #5390: Add uninstall icon independent of whether file extensions are
installed.
- Issue #5726: Make Modules/ld_so_aix return the actual exit code of the linker,
rather than always exit successfully. Patch by Floris Bruynooghe.
- Issue #5134: Silence compiler warnings when compiling sqlite with VC++.
Documentation
-------------
- Issue #6556: Fixed the Distutils configuration files location explanation for
Windows.
C-API
-----
- Issue #6624: PyArg_ParseTuple with "s" format when parsing argument with NULL:
Bogus TypeError detail string.
- Some PyBytes_* aliases have been removed because they don't exist in 3.x.
- Issue #4720: The format for PyArg_ParseTupleAndKeywords can begin with '|'.
- Issue #3632: From the gdb debugger, the 'pyo' macro can now be called when the
GIL is released, or owned by another thread.
- Issue #4293: Py_AddPendingCall() is now thread safe and can be used for
asynchronous notifications to python from any thread. Documentation added.
Extension Modules
-----------------
- Issue #3366: Add erf, erfc, expm1, gamma, lgamma functions to math module.
- Issue #6865: Fix reference counting issue in the initialization of the pwd
module.
- Fix a segfault in expat when given a specially crafted input lead to the
tokenizer not stopping. CVE-2009-3720.
- Issue #6561: '\d' in a regex now matches only characters with Unicode category
'Nd' (Number, Decimal Digit). Previously it also matched characters with
category 'No'.
Note: as of Python 2.7 beta 1, the above is out of date. In 2.7 beta 1, any
argument with an __int__ method can be packed, but use of this feature
triggers a DeprecationWarning.
- Issue #4873: Fix resource leaks in error cases of pwd and grp.
- Issue #4751: For hashlib algorithms provided by OpenSSL, the Python GIL is now
released during computation on data lengths >= 2048 bytes.
- Issue #3745: Fix hashlib to always reject unicode and non buffer-api
supporting objects as input no matter how it was compiled (built in
implementations or external openssl library). NOTE: Undone in 2.7a2.
- Issue #4228: Pack negative values the same way as 2.4 in struct's L format.
- Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris,
OpenBSD.
- Issue #4396: The parser module now correctly validates the with statement.
Tests
-----
- Issue #7324: Add a sanity check to regrtest argument parsing to catch the case
of an option with no handler.
- Issue #7312: Add a -F flag to run the selected tests in a loop until a test
fails. Can be combined with -j.
- Issue #7270: Add some dedicated unit tests for multi-thread synchronization
primitives such as Lock, RLock, Condition, Event and Semaphore.
- Issue #7151: Fixed regrtest -j so that output to stderr from a test no longer
runs the risk of causing the worker thread to fail.
- Issue #7055: test___all__ now greedily detects all modules which have an
__all__ attribute, rather than using a hardcoded and incomplete list.
- Issue #7058: Added save/restore for things like sys.argv and cwd to
runtest_inner in regrtest, with warnings if the called test modifies them,
and a new section in the summary report at the end.
Misc
----
- Issue #3967: Fixed a crash in the count() and find() methods of string-like
objects, when the "start" parameter is a huge value.
Library
-------
- Issue #3895: It was possible to crash the interpreter when an external timer
was used with cProfile that returned an object that could not be converted
into a float.
- Issue #3863: Disabled a unit test of fork being called from a thread
when running on platforms known to exhibit OS bugs when attempting that.
Build
-----
- Bug #3989: Package the 2to3 script (as 2to3.py) in the Windows
installer.
- Bug #3887: Package x64 version of CRT for AMD64 Windows binaries.
Extension Modules
-----------------
- Security Issue #2: imageop did not validate arguments correctly and could
segfault as a result.
Tools/Demos
-----------
Build
-----
- Issue #3642: Suppress warning in obmalloc when size_t is larger than uint.
- Issue #3777: long() applied to a float object now always return a long
object; previously an int would be returned for small values. the __long__
method is allowed to return either an int or a long, but the behaviour of
float objects should not change to respect backward compatibility.
- Issue #3668: Fix a memory leak with the "s*" argument parser in
PyArg_ParseTuple and friends, which occurred when the argument for "s*"
was correctly parsed but parsing of subsequent arguments failed.
- Fix memory leaks found with valgrind and update suppressions file.
- Fix compiler warnings in opt mode which would lead to invalid memory reads.
- Issue #3678: Correctly pass LDFLAGS and LDLAST to the linker on shared
library targets in the Makefile.
- Issue #1204: The configure script now tests for additional libraries
that may be required when linking against readline. This fixes issues
with x86_64 builds on some platforms (a few Linux flavors and OpenBSD).
C-API
-----
Library
-------
- Issue #3640: Pickling a list or a dict uses less local variables, to reduce
stack usage in the case of deeply nested objects.
- Issue #600362: Relocated parse_qs() and parse_qsl(), from the cgi module
to the urlparse one. Added a PendingDeprecationWarning in the old
module, it will be deprecated in the future.
- The deprecation warnings for the old camelCase threading API were removed.
- Issue #3703: _fileio.FileIO gave unhelpful error message when trying to open a
directory.
- Issue #3708: os.urandom no longer goes into an infinite loop when passed a
non-integer floating point number.
Extension Modules
-----------------
- Issue #4301: Patch the logging module to add processName support, remove
_check_logger_class from multiprocessing.
- Issue #2975: When compiling several extension modules with Visual Studio 2008
from the same python interpreter, some environment variables would grow
without limit.
- Issue #3846: Release the GIL during sqlite3_prepare calls. This improves
concurrent access to the same SQLite database from multiple
threads/processes.
Tests
-----
- Issue #3768: Move test_py3kwarn over to the new API for catch_warnings().
Build
-----
- ctypes function pointers that are COM methods have a boolean True
value again.
- Issue #3537: Fix an assertion failure when an empty but presized dict
object was stored in the freelist.
- Issue #2542: Now that issubclass() may call arbitrary code, ensure that
PyErr_ExceptionMatches returns 0 when an exception occurs there.
- Issue #1819: function calls with several named parameters are now on
average 35% faster (as measured by pybench).
Library
-------
- Issue #2234: distutils failed for some versions of the cygwin compiler. The
version reported by these tools does not necessarily follow the python
version numbering scheme, so the module is less strict when parsing it.
- Issue #2235: Added Py3k warnings for types which will become unhashable
under the stricter __hash__ inheritance rules in 3.0. Several types
which did not meet the rules for hash invariants and were already
unhashable in 3.0 have now been explicitly flagged as unhashable in
2.6 as well (collections.Mapping, collections.Set, unittest.TestSuite,
xml.dom.minidom.NamedNodeMap, numbers.Number, UserList.UserList)
- Update __all__ for cookielib, csv, os, urllib2, and weakref to include things
imported into the module but exposed as part of the module's API.
- Issue #2776: fixed small issue when handling an URL with double slash
after a 302 response in the case of not going through a proxy.
- Issue #3476: binary buffered reading through the new "io" library is now
thread-safe.
- Issue #3205: When iterating over a BZ2File fails allocating memory, raise
a MemoryError rather than silently stop the iteration.
- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
asking for a specific length. This problem only affected files opened
using the new "io" module, not the built-in open() function.
- Issue #3449: Update decimal module to use most recent specification
(v. 1.68) and tests (v. 2.58) from IBM.
- Issue #3120: On 64-bit Windows the subprocess module was truncating handles.
- Issue #3302: Fix several crashes when calling locale's gettext functions
with None arguments.
Build
-----
Documentation
-------------
- Issue #3083: Add alternate (#) formatting for bin, oct, hex output
for str.format(). This adds the prefix 0b, 0o, or 0x, respectively.
- Issue #3008: the float type has a new instance method 'float.hex'
and a new class method 'float.fromhex' to convert floating-point
numbers to and from hexadecimal strings, respectively.
- Issue #2862: Make int and float freelist management consistent with
other freelists. Changes their CompactFreeList apis into
ClearFreeList apis and calls them via gc.collect().
Library
-------
- Issue #3313: Fixed a crash when a failed dlopen() call does not set
a valid dlerror() message.
- Issue #839496: SimpleHTTPServer used to open text files in text mode. This is
both unnecessary (HTTP allows text content to be sent in several forms) and
wrong because the actual transmitted size could differ from the
content-length. The problem had been corrected in the 2.4 branch, but never
merged into trunk.
- Issue #1526: Allow more than 64k files to be added to Zip64 file.
- Issue #449227: The rlcompleter module now adds "(" to callable objects
when completed.
- Issue #3190: Pydoc now hides the automatic module attribute __package__ (the
handling is now the same as that of other special attributes like __name__).
- Issue #2885 (partial): The urllib.urlopen() function has been deprecated for
removal in Python 3.0 in favor of urllib2.urlopen().
- Issue #874900: after an os.fork() call the threading module state is cleaned
up in the child process to prevent deadlock and report proper thread counts
if the new process uses the threading module.
Tests
-----
Build
-----
Documentation
-------------
- Add future_builtins.ascii().
Extension Modules
-----------------
- Issue #1179: [CVE-2007-4965] Integer overflow in imageop module.
- Issue #3116: marshal.dumps() had quadratic behavior for strings > 32Mb.
- Support for Windows 9x has been removed from the winsound module.
Library
-------
- Issue #2722: Now the os.getcwd() supports very long path names.
- Issue #2888: Fixed the behaviour of pprint when working with nested
structures, to match the behaviour of 2.5 and 3.0 (now follows the common
sense).
- Issue #1817: cgi now correctly handles the querystring on POST requests
- Issue #3126: StreamHandler and FileHandler check before calling "flush" and
"close" that the stream object has these, using hasattr (thanks to bobf for
the patch).
- Issue #1798: Add ctypes calling convention that allows safe access
to errno.
- Issue #2404: ctypes objects support the new pep3118 buffer interface.
- The sgmllib and htmllib modules have been deprecated for removal
in Python 3.0.
- Issue #3011: locale module alias table was updated to the latest
version from the X.org locale.alias file.
- The statvfs module has been deprecated for removal in Python 3.0.
- The WAIT module from IRIX has been deprecated for removal in Python
3.0.
- The torgb module from IRIX has been deprecated for removal in Python
3.0.
- The SV module from IRIX has been deprecated for removal in Python
3.0.
- The readcd module from IRIX has been deprecated for removal in
Python 3.0.
- The panelparser module from IRIX has been deprecated for removal in
Python 3.0.
- The panel module from IRIX has been deprecated for removal in Python
3.0.
- The jpeg module from IRIX has been deprecated for removal in Python
3.0.
- The IOCTL module from IRIX has been deprecated for removal in Python
3.0.
- The IN module from IRIX has been deprecated for removal in Python
3.0.
- The imgfile module from IRIX has been deprecated for removal in
Python 3.0.
- The GLWS module from IRIX has been deprecated for removal in Python
3.0.
- The GET module from IRIX has been deprecated for removal in Python
3.0.
- The fm module from IRIX has been deprecated for removal in Python
3.0.
- The FL, flp, and fl modules from IRIX have been deprecated for
removal in Python 3.0.
- The FILE module on IRIX has been deprecated for removal in Python
3.0.
- The ERRNO module on IRIX has been deprecated for removal in Python
3.0.
- The DEVICE, GL, gl, and cgen modules (which indirectly includes
cgensupport) have been deprecated for removal in Python 3.0.
- The CL, CL_old, and cl modules for IRIX have been deprecated for
removal in Python 3.0.
- The cdplayer module for IRIX has been deprecated for removal in
Python 3.0.
- The cddb module for IRIX has been deprecated for removal in Python
3.0.
- The cd and CD modules for IRIX have been deprecated for removal in
Python 3.0.
- The al and AL modules for IRIX have been deprecated for removal in
Python 3.0.
- The timing module has been deprecated for removal in Python 3.0.
- The imageop module has been deprecated for removal in Python 3.0.
- Issue #2250: Exceptions raised during evaluation of names in
rlcompleter's ``Completer.complete()`` method are now caught and
ignored.
- The mhlib module has been deprecated for removal in Python 3.0.
- The ihooks module has been deprecated for removal in Python 3.0.
- The fpformat module has been deprecated for removal in Python 3.0.
- The Canvas module has been deprecated for removal in Python 3.0.
- The compiler package has been deprecated for removal in Python 3.0.
- The Bastion and rexec modules have been deprecated for removal in
Python 3.0.
- The bsddb185 module has been deprecated for removal in Python 3.0.
- The pure module has been deprecated for removal in Python 3.0.
- The toaiff module has been deprecated for removal in Python 3.0.
- The new module has been deprecated for removal in Python 3.0.
- The user module has been deprecated for removal in Python 3.0.
- The stringold module has been deprecated for removal in Python 3.0.
- The mutex module has been deprecated for removal in Python 3.0.
- The imputil module has been deprecated for removal in Python 3.0.
- The Mac Modules (including Carbon) have been deprecated for removal
in Python 3.0.
- Library: on MacOS X you can now set ``ARCHFLAGS`` in the shell
environment to control the '-arch' flags that are used to build
an extension. This was added for compatibility with Apple's build
of Python.
- The bundled OSX-specific copy of libbffi is now in sync with the version
shipped with PyObjC 2.0 and includes support for x86_64 and ppc64 platforms.
- The threading module gained aliases for names that will be removed in the
3.x series.
Build
-----
- The Windows installer now includes Tk 8.5, bzip2 1.0.5, and SQLite 3.5.9.
NOTE: 64-bit and 4-way builds are only suppported on Mac OS X 10.5 (or later).
C API
-----
Extension Modules
-----------------
- Added phase(z) -> phi, polar(z) -> r, phi and rect(r, phi) -> z to
the cmath module.
- Four new methods were added to the math and cmath modules: acosh,
asinh, atanh and log1p.
Library
-------
- The audiodev module has been deprecated for removal in Python 3.0.
- Issue #2750: Add the 'json' package. Based on simplejson 1.9 and
contributed by Bob Ippolito.
- The getpass module has been improved on Unix. It now uses /dev/tty
by default and uses stderr instead of stdout. A GetPassWarning is
issued when input echo cannot be controlled.
- Issue #815646: Individual file objects may now be used from multiple
threads at once without fear of crashing the Python interpreter. If
file.close() is called while an object is in use by another thread
an IOError exception will be raised and the file will not be closed.
- The bundled libffi copy is now in sync with the recently released
libffi3.0.5 version, apart from some small changes to
Modules/_ctypes/libffi/configure.ac.
Tests
-----
Build
-----
- Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when
gcc is used as compiler.
C API
-----
- Issue #1477: With narrow Unicode builds, the unicode escape sequence
\Uxxxxxxxx did not accept values outside the Basic Multilingual
Plane. This affected raw unicode literals and the
'raw-unicode-escape' codec. Now UTF-16 surrogates are generated in
this case, like normal unicode literals and the 'unicode-escape'
codec.
- Issue #2332: add new attribute names for instance method objects.
The two changes are: im_self -> __self__ and im_func -> __func__
- Issue #2321: use pymalloc for unicode object string data to reduce
memory usage in some circumstances.
- PEP 3127: octal literals now start with "0o". Old-style octal
literals are still valid. There are binary literals with a prefix of
"0b". This also affects int(x, 0).
- Issue #1779871: GNU gcc can now build Python on OS X because the
flags -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd are no
longer passed.
Extension Modules
-----------------
Library
-------
- Issue #1747858: Fix chown to work with large uid's and gid's on
64-bit platforms.
- Issues #2166, #1741 and #1531505: now distutils deals with HOME
correctly under win32
- Bug #1725737: In distutils' sdist, exclude RCS, CVS etc. also in the
root directory, and also exclude .hg, .git, .bzr, and _darcs.
- Issue #1872: The struct module typecode for _Bool has been changed
from 't' to '?'.
- The bundled libffi copy is now in sync with the recently released
libffi3.0.4 version, apart from some small changes to
Modules/_ctypes/libffi/configure.ac. On OS X, preconfigured libffi
files are used. On all linux systems the --with-system-ffi
configure option defaults to "yes".
Tests
-----
Build
-----
- A new script 2to3 is now installed, to run the 2.x to 3.x converter.
C API
-----
- Issue #2051: pyc and pyo files are no longer created with permission
644. The mode is now inherited from the py file.
- Issue #1881: An internal parser limit has been increased. Also see
issue #215555 for a discussion.
- Added the future_builtins module, which contains hex() and oct().
These are the PEP 3127 version of these functions, designed to be
compatible with the hex() and oct() builtins from Python 3.0. They
differ slightly in their output formats from the existing, unchanged
Python 2.6 builtins. The expected usage of the future_builtins
module is:
from future_builtins import hex, oct
- Issue #1678380: Fix a bug that identifies 0j and -0j when they
appear in the same code unit.
- Issue #1882: when compiling code from a string, encoding cookies in the
second line of code were not always recognized correctly.
- Issue #1865: ``bytes`` as an alias for ``str`` and b"" as an alias "" were
added.
- Issue #1460: The utf-7 incremental decoder did not accept truncated
input. It now correctly saves its state between chunks of data.
- Issue #1686386: Tuple's tp_repr did not take into account the
possibility of having a self-referential tuple, which is possible
from C code. Nor did object's tp_str consider that a type's tp_str
could do something that could lead to an inifinite recursion.
Py_ReprEnter() and Py_EnterRecursiveCall(), respectively, fixed the
issues.
- Add new attribute names for function objects. All the func_* become
__*__ attributes. (Some already existed, e.g., __doc__ and
__name__.)
- Patch #1686487: you can now pass any mapping after '**' in function
calls.
- When __slots__ are set to a unicode string, make it work the same as
setting a plain string, ie don't expand to single letter identifiers.
- The dir() function has been extended to call the __dir__() method on
its argument, if it exists. If not, it will work like before. This
allows customizing the output of dir() in the presence of a
__getattr__().
- Bug #1579370: Make PyTraceBack_Here use the current thread, not the
frame's thread state.
- Bug #1576657: when setting a KeyError for a tuple key, make sure
that the tuple isn't used as the "exception arguments tuple".
- Update the peephole optimizer to remove more dead code (jumps after
returns) and inline unconditional jumps to returns.
- Bug #1545497: when given an explicit base, int() did ignore NULs
embedded in the string to convert.
- Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
- Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
- Patch #1546288: fix seg fault in dict_equal due to ref counting bug.
Library
-------
- Issue #1781: ConfigParser now does not let you add the "default" section
(ignore-case)
- ctypes instances that are not or do not contain pointers can now be
pickled.
- Issue #2004: tarfile.py: Use mode 0700 for temporary directories and
default permissions for missing directories.
- Issue #1003: Fix zipfile decryption check, it would fail zip files
with extended local headers.
- Issue #1146: fix how textwrap breaks a long word that would start in
the last column of a line.
- Issue #1837: The queue module now also supports a LIFO queue and a
priority queue.
- Issue #1786: pdb should use its own stdin/stdout around an exec call
and when creating a recursive instance.
- Issue #1455: The distutils package now supports VS 2005 and VS 2008
for both the msvccompiler and cygwincompiler.
- Issue #1531: tarfile.py: Read fileobj from the current offset, do
not seek to the start.
- Issue #1429818: patch for trace and doctest modules so they play
nicely together.
- Issue #1292: On alpha, arm, ppc, and s390 linux systems the
--with-system-ffi configure option defaults to "yes".
- Patch #1203: ctypes now does work on OS X when Python is built with
--disable-toolbox-glue.
- Bug #1153: repr.repr() now doesn't require set and dictionary items
to be orderable to properly represent them.
- GB18030 codec now can encode additional two-byte characters that are
missing in GBK.
- Issue #1385: The hmac module now computes the correct hmac when
using hashes with a block size other than 64 bytes (such as sha384
and sha512).
- Fix bug in marshal where bad data would cause a segfault due to lack
of an infinite recursion check.
- The popen2 module and os.popen* are deprecated. Use the subprocess
module.
- Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
(as opposed to the command line) will now write file names ending in
".cpp" too.
- Bug #1675967: re patterns pickled with Python 2.4 and earlier can
now be unpickled with Python 2.5 and newer.
- Bug #1681228: the webbrowser module now correctly uses the default
GNOME or KDE browser, depending on whether there is a session of one
of those present. Also, it tries the Windows default browser before
trying Mozilla variants.
- Patch #1681153: the wave module now closes a file object it opened if
initialization failed.
- Patch #1393667: pdb now has a "run" command which restarts the
debugged Python program, optionally with different arguments.
- Patch #1663234: you can now run doctest on test files and modules
using "python -m doctest [-v] filename ...".
- Added itertools.izip_longest().
- Patch #1517891: Mode 'a' for ZipFile now creates the file if it
doesn't exist.
- The sets module has been deprecated. Use the built-in set/frozenset
types instead.
- Patch #1583880: fix tarfile's problems with long names and posix/
GNU modes.
- Bug #1586448: the compiler module now emits the same bytecode for
list comprehensions as the built-in compiler, using the LIST_APPEND
opcode.
- Bug #1560617: in pyclbr, return full module name not only for
classes, but also for functions.
- Bug #1457823: cgi.(Sv)FormContentDict's constructor now takes
keep_blank_values and strict_parsing keyword arguments.
- Made the error message for time.strptime when the data and
format do match be more clear.
- Patch #1553314: Fix the inspect.py slowdown that was hurting IPython
& SAGE by adding smarter caching in inspect.getmodule()
- Issue #1339: The smtplib.SMTP class has been refactored a bit such
that the SMTP.starttls() caller no longer needs to call ehlo()
beforehand. SMTP.starttls() now raises an exception of the server
does not claim to support starttls. Adds the
SMTP.ehlo_or_helo_if_needed() method. Patch contributed by Bill
Fenner.
Extension Modules
-----------------
- Bug #2111: mmap segfaults when trying to write a block opened with
PROT_READ.
- Issue #1646: Make socket support TIPC. The socket module now has
support for TIPC under Linux, see http://tipc.sf.net/ for more
information.
- Marshal.dumps() now expects exact type matches for int, long, float,
complex, tuple, list, dict, set, and frozenset. Formerly, it would
silently miscode subclasses of those types. Now, it raises a
ValueError instead.
- Bug #1622896: fix a rare corner case where the bz2 module raised an
error in spite of a succesful compression.
- Patch #1610575: The struct module now supports the 't' code, for C99
_Bool.
- Patch #1635058: ensure that htonl and friends never accept or return
negative numbers, per the underlying C implementation.
- Bug #1588217: don't parse "= " as a soft line break in binascii's
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
- Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters.
- Bug #1551427: fix a wrong NULL pointer check in the win32 version of
os.urandom().
- fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
were transposed.
- Added support for linking the bsddb module against BerkeleyDB 4.5.x,
4.6.x and 4.7.x.
IDLE
----
- Bug #813342: Start the IDLE subprocess with -Qnew if the parent is
started with that option.
- IDLE: Honor the "Cancel" action in the save dialog (Debian bug
#299092).
Tests
-----
Tools
-----
- Made some minor changes to pybench output to allow the user to see
which Python version is running pybench.
Documentation
-------------
- RFE #1765140: Updated documentation on FileHandler and subclasses to
include new optional delay argument.
- Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next
docs.
Tools/Demos
-----------
- Have the search path for building extensions follow the declared
order in $CPPFLAGS and $LDFLAGS when adding directories from those
environment variables.
- Bug #1608: use -fwrapv when GCC supports it. This is important,
newer GCC versions may optimize away overflow buffer overflow checks
without this option!
- Stop supporting AtheOS and cause a build error in configure for the
platform.
C API
-----
- Unified naming convention for free lists and their limits. All free
lists in Object/ are named ``free_list``, the counter ``numfree``
and the upper limit is a macro ``PyName_MAXFREELIST`` inside an
#ifndef block.
Windows
-------
- Patch #1706: Drop support for Win9x, WinME and NT4. Python now
requires Windows 2000 or greater. The _WINVER and NTDDI_VERSION
macros are set to Win2k for x86/32bit builds and WinXP for AMD64
builds.
Mac
---
- Removed the macfs module. It had been deprecated since Python 2.5.
This lead to the deprecation of macostools.touched() as it relied
solely on macfs and was a no-op under OS X.
----