Professional Documents
Culture Documents
News
News
+++++++++++
What's New in Python 2.7.5?
===========================
*Release date: 2013-05-12*
Core and Builtins
----------------- Issue #15535: Fixed regression in the pickling of named tuples by
removing the __dict__ property introduced in 2.7.4.
- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
such as was shipped with Centos 5 and Mac OS X 10.4.
- Issue #17703: Fix a regression where an illegal use of Py_DECREF() after
interpreter finalization can cause a crash.
- Issue #16447: Fixed potential segmentation fault when setting __name__ on a
class.
- Issue #17610: Don't rely on non-standard behavior of the C qsort() function.
Library
------- Issue #16601: Restarting iteration over tarfile no more continues from where
it left off. Patch by Michael Birtwell.
- Issue 16584: in filecomp._cmp, catch IOError as well as os.error.
Patch by Till Maas.
- Issue #17926: Fix dbm.__contains__ on 64-bit big-endian machines.
- Issue #17918: When using SSLSocket.accept(), if the SSL handshake failed
on the new socket, the socket would linger indefinitely. Thanks to
Peter Saveliev for reporting.
- 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 #14173: Avoid crashing when reading a signal handler during
interpreter shutdown.
- 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 datastructur
es
- 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 #16037: Limit httplib's _read_status() function to work around broken
HTTP servers and reduce memory usage. It's actually a backport of a Python
3.2 fix. Thanks to Adrien Kunysz.
- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread
- Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.
- Issue #15801: Make sure mappings passed to '%' formatting are actually
subscriptable.
- Issue #15604: Update uses of PyObject_IsTrue() to check for and handle
errors correctly. Patch by Serhiy Storchaka.
- Issue #14579: Fix error handling bug in the utf-16 decoder. Patch by
Serhiy Storchaka.
- Issue #15368: An issue that caused bytecode generation to be
non-deterministic when using randomized hashing (-R) has been fixed.
- Issue #15897: zipimport.c doesn't check return value of fseek().
Patch by Felipe Cruz.
- Issue #16369: Global PyTypeObjects not initialized with PyType_Ready(...).
- 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 #13512: Create ~/.pypirc securely (CVE-2011-4944). Initial patch by
Philip Jenvey, tested by Mageia and Debian.
- Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later
on. Initial patch by SilentGhost and Jeff Ramnani.
- Issue #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 #14494: Fix __future__.py and its documentation to note that
absolute imports are the default behavior in 3.0 instead of 2.7.
Patch by Sven Marnach.
- Issue #14761: Fix potential leak on an error case in the import machinery.
files on flush().
- Issue #15219: Fix a reference leak when hashlib.new() is called with
invalid parameters.
- Issue #9559: If messages were only added, a new file is no longer
created and renamed over the old file when flush() is called on an
mbox, MMDF or Babyl mailbox.
- Issue #14653: email.utils.mktime_tz() no longer relies on system
mktime() when timezone offest is supplied.
- Issue #6056: Make multiprocessing use setblocking(True) on the
sockets it uses. Original patch by J Derek Wilson.
- Issue #15101: Make pool finalizer avoid joining current thread.
- Issue #15054: A bug in tokenize.tokenize that caused string literals
with 'b' and 'br' prefixes to be incorrectly tokenized has been fixed.
Patch by Serhiy Storchaka.
- Issue #15036: Mailbox no longer throws an error if a flush is done
between operations when removing or changing multiple items in mbox,
MMDF, or Babyl mailboxes.
- Issue #10133: Make multiprocessing deallocate buffer if socket read
fails. Patch by Hallvard B Furuseth.
- Issue #13854: Make multiprocessing properly handle non-integer
non-string argument to SystemExit.
- Issue #12157: Make pool.map() empty iterables correctly. Initial
patch by mouad.
- 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 #14875: Use float('inf') instead of float('1e66666') in the json module.
- Issue #14572: Prevent build failures with pre-3.5.0 versions of
sqlite3, such as was shipped with Centos 5 and Mac OS X 10.4.
- Issue #14426: Correct the Date format in Expires attribute of Set-Cookie
Header in Cookie.py.
- 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 #14798: Fix the functions in pyclbr to raise an ImportError
when the first part of a dotted name is not a package. Patch by
Xavier de Gaye.
- Issue #14832: fixed the order of the argument references in the error
message produced by unittest's assertItemsEqual.
- Issue #14829: Fix bisect issues under 64-bit Windows.
- 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 #14662: Prevent shutil failures on OS X when destination does not
support chflag operations. Patch by Hynek Schlawack.
- Issue #14157: Fix time.strptime failing without a year on February 29th.
Patch by Hynek Schlawack.
- Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '
/'.
- Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running
step. Patch by Xavier de Gaye.
- Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a
test class that doesn't inherit from TestCase (i.e. a mixin).
- Issue #14160: TarFile.extractfile() failed to resolve symbolic links when
the links were not located in an archive subdirectory.
- Issue #14638: pydoc now treats non-string __name__ values as if they
were missing, instead of raising an error.
- Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites
which send EOF without trailing \r\n.
- Issue #14308: Fix an exception when a "dummy" thread is in the threading
module's active list after a fork().
- 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 #13496: Fix potential overflow in bisect.bisect algorithm when applied
to a collection of size > sys.maxsize / 2.
- 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 #10340: asyncore - properly handle EINVAL in dispatcher constructor on
OSX; avoid to call handle_connect in case of a disconnected socket which
was not meant to connect.
- 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 #13694: asynchronous connect in asyncore.dispatcher does not set addr
attribute.
- Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem.
- Issue #11199: Fix the with urllib which hangs on particular ftp urls.
- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under
Windows when the child process has already exited.
- Issue #14195: An issue that caused weakref.WeakSet instances to incorrectly
return True for a WeakSet instance 'a' in both 'a < a' and 'a > a' has been
fixed.
- 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 #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils
on Windows.
- 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 #17477: Update the bsddb module to pybsddb 5.3.0, supporting
db-5.x, and dropping support for db-4.1 and db-4.2.
- Issue #17192: Update the ctypes module's libffi to v3.0.13. This
specifically addresses a stack misalignment issue on x86 and issues on
some more recent platforms.
- 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.
- Issue #12268: File readline, readlines and read or readall methods
embedded situations.
- Issue #13186: Fix __delitem__ on old-style instances when invoked through
PySequence_DelItem.
- 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.
- Issue #12973: Fix overflow checks that invoked undefined behaviour in
int.__pow__. These overflow checks were causing int.__pow__ to produce
incorrect results with recent versions of Clang, as a result of the
compiler optimizing the check away. Also fix similar overflow checks
in list_repeat (listobject.c) and islice_next (itertoolsmodule.c). These
bugs caused test failures with recent versions of Clang.
- Issue #12266: Fix str.capitalize() to correctly uppercase/lowercase
titlecased and cased non-letter characters.
- Issues #12610 and #12609: Verify that user generated AST has correct string
and identifier types before compiling.
- Issue #11627: Fix segfault when __new__ on a exception returns a
non-exception class.
- 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 #12501: Remove Py3k warning for callable. callable() is supported
again in Python 3.2.
- Issue #9611, #9015: FileIO.read(), FileIO.readinto(), FileIO.write() and
os.write() clamp the length to INT_MAX on Windows.
- 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 #8033: sqlite3: Fix 64-bit integer handling in user functions
on 32-bit architectures. Initial patch by Philippe Devalkeneer.
- HTMLParser is now able to handle slashes in the start tag.
- Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in
SimpleXMLRPCServer upon malformed POST request.
- Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF.
- Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert().
- Issue #13987: HTMLParser is now able to handle EOFs in the middle of a
construct and malformed start tags.
- Issue #13015: Fix a possible reference leak in defaultdict.__repr__.
Patch by Suman Saha.
- Issue #13979: A bug in ctypes.util.find_library that caused
the wrong library name to be returned has been fixed.
- Issue #1326113: distutils' build_ext command --libraries option now
correctly parses multiple values separated by whitespace or commas.
- Issue #13993: HTMLParser is now able to handle broken end tags.
- Issue #13960: HTMLParser is now able to handle broken comments.
- Issue #9750: Fix sqlite3.Connection.iterdump on tables and fields
with a name that is a keyword or contains quotes. Patch by Marko
Kohtala.
- Issue #13994: Earlier partial revert of Distutils enhancements in 2.7
has left two versions of customize_compiler, the original in
distutils.sysconfig and another copy in distutils.ccompiler, with some
parts of distutils calling one and others using the other.
Complete the revert back to only having one in distutils.sysconfig as
is the case in 3.x.
- Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building
Distutils-based packages with C extension modules may fail because
Apple has removed gcc-4.2, the version used to build python.org
64-bit/32-bit Pythons. If the user does not explicitly override
the default C compiler by setting the CC environment variable,
Distutils will now attempt to compile extension modules with clang
if gcc-4.2 is required but not found. Also as a convenience, if
the user does explicitly set CC, substitute its value as the default
compiler in the Distutils LDSHARED configuration variable for OS X.
(Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u
SDK, neither of which are available in Xcode 4. This change does not
attempt to override settings to support their use with Xcode 4.)
- Issue #9021: Add an introduction to the copy module documentation.
- Issue #6005: Examples in the socket library documentation use sendall, where
relevant, instead send method.
- Issue #10811: Fix recursive usage of cursors. Instead of crashing,
raise a ProgrammingError now.
- Issue #13676: Handle strings with embedded zeros correctly in sqlite3.
- 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.
- 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 #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.
- Issue #12514: Use try/finally to assure the timeit module restores garbage
collections when it is done.
- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
given as a low fd, it gets overwritten.
- Issue #12102: Document that buffered files must be flushed before being used
with mmap. Patch by Steffen Daode Nurpmeso.
- Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling.
- Issue #1813: Fix codec lookup and setting/getting locales under Turkish
locales.
- Issue #10883: Fix socket leaks in urllib when using FTP.
- 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 #12571: Add a plat-linux3 directory mirroring the plat-linux2
directory, so that "import DLFCN" and other similar imports work on
Linux 3.0.
- 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 #11603: Fix a crash when __str__ is rebound as __repr__. Patch by
Andreas Sthrk.
- Issue #12502: asyncore: fix polling loop with AF_UNIX sockets.
- Issue #4376: ctypes now supports nested structures in a endian different than
the parent structure. Patch by Vlad Riscutia.
- Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors
if the process has only one pipe.
- Issue #12467: warnings: fix a race condition if a warning is emitted at
shutdown, if globals()['__file__'] is None.
- Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by
the garbage collector while the Heap lock is held.
- Issue #9516: On Mac OS X, change Distutils to no longer globally attempt to
check or set the MACOSX_DEPLOYMENT_TARGET environment variable for the
interpreter process. This could cause failures in non-Distutils subprocesses
and was unreliable since tests or user programs could modify the interpreter
environment after Distutils set it. Instead, have Distutils set the
deployment target only in the environment of each build subprocess. It is
still possible to globally override the default by setting
MACOSX_DEPLOYMENT_TARGET before launching the interpreter; its value must be
greater or equal to the default value, the value with which the interpreter
was built.
- Issue #11802: The cache in filecmp now has a maximum size of 100 so that
it won't grow without bound.
- 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.
- Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
connection if its getresponse() method fails with a socket error. Patch
written by Ezio Melotti.
- Issue #9284: Allow inspect.findsource() to find the source of doctest
functions.
- Issue #10694: zipfile now ignores garbage at the end of a zipfile.
- Issue #11583: Speed up os.path.isdir on Windows by using GetFileAttributes
instead of os.stat.
- Issue #12080: Fix a performance issue in Decimal._power_exact that caused
some corner-case Decimal.__pow__ calls to take an unreasonably long time.
- Named tuples now work correctly with vars().
- sys.setcheckinterval() now updates the current ticker count as well as
updating the check interval, so if the user decreases the check interval,
the ticker doesn't have to wind down to zero from the old starting point
before the new interval takes effect. And if the user increases the
interval, it makes sure the new limit takes effect right away rather have an
early task switch before recognizing the new interval.
- Issue #12085: Fix an attribute error in subprocess.Popen destructor if the
constructor has failed, e.g. because of an undeclared keyword argument. Patch
written by Oleg Oshmyan.
Extension Modules
----------------- Issue #9041: An issue in ctypes.c_longdouble, ctypes.c_double, and
ctypes.c_float that caused an incorrect exception to be returned in the
case of overflow has been fixed.
- bsddb module: Erratic behaviour of "DBEnv->rep_elect()" because a typo.
Possible crash.
- Issue #13774: json: Fix a SystemError when a bogus encoding is passed to
json.loads().
- 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 #13070: Fix a crash when a TextIOWrapper caught in a reference cycle
DNS service (e.g. OpenDNS) resolves a non-existent domain name. The test
is now skipped instead.
- 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 #12141: Install a copy of template C module file so that
test_build_ext of test_distutils is no longer silently skipped when
run outside of a build directory.
- Issue #8746: Add additional tests for os.chflags() and os.lchflags().
Patch by Garrett Cooper.
- Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9
on Mac OS X. (Patch by Ronald Oussoren)
- Issue #12057: Add tests for ISO 2022 codecs (iso2022_jp, iso2022_jp_2,
iso2022_kr).
Documentation
------------- Issues #13491 and #13995: Fix many errors in sqlite3 documentation.
Initial patch for #13491 by Johannes Vogel.
- Issue #13402: Document absoluteness of sys.executable.
- Issue #13883: PYTHONCASEOK also works on OS X, OS/2, and RiscOS.
- Issue #2134: The tokenize documentation has been clarified to explain why
all operator and delimiter tokens are treated as token.OP tokens.
- Issue #13513: Fix io.IOBase documentation to correctly link to the
io.IOBase.readline method instead of the readline module.
- Issue #13237: Reorganise subprocess documentation to emphasise convenience
functions and the most commonly needed arguments to Popen.
- Issue #13141: Demonstrate recommended style for SocketServer examples.
What's New in Python 2.7.2?
===========================
*Release date: 2011-06-11*
Library
------- Issue #12009: Fixed regression in netrc file comment handling.
Extension Modules
----------------- Issue #1221: Make pyexpat.__version__ equal to the Python version.
What's New in Python 2.7.2 release candidate 1?
===============================================
node twice.
- Issue #7858: Raise an error properly when os.utime() fails under Windows
on an existing file.
- Issue #3839: wsgiref should not override a Content-Length header set by
the application. Initial patch by Clovis Fabricio.
- 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 #4662: os.tempnam(), os.tmpfile() and os.tmpnam() now raise a py3k
DeprecationWarning.
- Subclasses of collections.OrderedDict now work correctly with __missing__.
- 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 #10738: Fix webbrowser.Opera.raise_opts
- Issue #9824: SimpleCookie now encodes , and ; in values to cater to how
browsers actually parse cookies.
- Issue #1379416: eliminated a source of accidental unicode promotion in
email.header.Header.encode.
- Issue #5258/#10642: if site.py encounters a .pth file that generates an error,
it now prints the filename, line number, and traceback to stderr and skips
the rest of that individual file, instead of stopping processing entirely.
- Issue #10750: The ``raw`` attribute of buffered IO objects is now read-only.
- Issue #10242: unittest.TestCase.assertItemsEqual makes too many assumptions
about input.
- 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 #10714: Limit length of incoming request in http.server to 65536 bytes
for security reasons. Initial patch by Ross Lagerwall.
- Issue #9558: Fix distutils.command.build_ext with VS 8.0.
- Issue #10695: passing the port as a string value to telnetlib no longer
causes debug mode to fail.
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 #11052: Correct IDLE menu accelerators on Mac OS X for Save
commands.
- 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 #10107: Warn about unsaved files in IDLE on OSX.
- Issue #10406: Enable Rstrip IDLE extension on OSX (just like on other
platforms).
Build
----- Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
ensure "make install" creates symlinks in --prefix bin for the "-32"
files in the framework bin directory like the installer does.
- Issue #11411: Fix 'make DESTDIR=' with a relative destination.
- Issue #10709: Add updated AIX notes in Misc/README.AIX.
- Issue #11184: Fix large-file support on AIX.
- Issue #941346: Fix broken shared library build on AIX.
- Issue #11268: Prevent Mac OS X Installer failure if Documentation
package had previously been installed.
- Issue #11079: The /Applications/Python x.x folder created by the Mac
OS X installers now includes a link to the installed documentation.
- Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with
the system-provided Python.
- Issue #10843: Update third-party library versions used in OS X
32-bit installer builds: bzip2 1.0.6, readline 6.1.2, SQLite 3.7.4
(with FTS3/FTS4 and RTREE enabled), and ncursesw 5.5 (wide-char
support enabled).
- Don't run pgen twice when using make -j.
- Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in
the configure script but use $GREP instead. Patch by Fabian Groffen.
- Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD
and DragonFly BSD. Patch by Nicolas Joly.
- 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 #11164: Remove obsolete allnodes test from minidom test.
- Issue #12205: Fix test_subprocess failure due to uninstalled test data.
- 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.
- Fix test_startfile to wait for child process to terminate before finishing.
- Issue #11719: Fix message about unexpected test_msilib skip on non-Windows
platforms. Patch by Nadeem Vawda.
- Issue #7108: Fix test_commands to not fail when special attributes ('@'
or '.') appear in 'ls -l' output.
- Issue #11490: test_subprocess:test_leaking_fds_on_error no longer gives a
false positive if the last directory in the path is inaccessible.
- Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch
by Ross Lagerwall.
- 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.
What's New in Python 2.7.1?
===========================
*Release date: 2010-11-27*
Library
------- Issue #2236: distutils' mkpath ignored the mode parameter.
- Fix typo in one sdist option (medata-check).
- Issue #10323: itertools.islice() now consumes the minimum number of
inputs before stopping. Formerly, the final state of the underlying
iterator was undefined.
- Issue #10565: The collections.Iterator ABC now checks for both
``__iter__`` and ``next``.
- 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 #10125: Don't segfault when the iterator passed to
``file.writelines()`` closes the file.
- 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 #9862: Compensate for broken PIPE_BUF in AIX by hard coding
its value as the default 512 when compiling on AIX.
- Issue #9675: CObject use is marked as a Py3k warning, not a deprecation
warning.
- 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 #9869: Make long() and PyNumber_Long return something of type
long for a class whose __long__ method returns a plain int. This
fixes an interpreter crash when initializing an instance of a long
subclass from an object whose __long__ method returns a plain int.
- Issue #10006: type.__abstractmethods__ now raises an AttributeError.
- Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid
thread-local storage key.
- Issue #4947: The write() method of sys.stdout and sys.stderr uses their
encoding and errors attributes instead of using utf-8 in strict mode, to get
the same behaviour than the print statement.
- Issue #9737: Fix a crash when trying to delete a slice or an item from
a memoryview object.
- Restore GIL in nis_cat in case of error.
- Issue #9688: __basicsize__ and __itemsize__ must be accessed as Py_ssize_t.
- Issue #8530: Prevent stringlib fastsearch from reading beyond the front
of an array.
- Issue #83755: Implicit set-to-frozenset conversion was not thread-safe.
- 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 #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 #9948: Fixed problem of losing filename case information.
- Issue #9437: Fix building C extensions with non-default LDFLAGS.
- Issue #9759: GzipFile now raises ValueError when an operation is attempted
after the file is closed. Patch by Jeffrey Finkelstein.
- Issue #9042: Fix interaction of custom translation classes and caching in
gettext.
- 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 #10004: quoprimime no longer generates a traceback when confronted
with invalid characters after '=' in a Q-encoded word.
- Issue #9950: Fix socket.sendall() crash or misbehaviour when a signal is
received. Now sendall() properly calls signal handlers if necessary,
and retries sending if these returned successfully, including on sockets
with a timeout.
- Issue #9947: logging: Fixed locking bug in stopListening.
- Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler.
- Issue #9936: Fixed executable lines' search in the trace module.
- Issue #9928: Properly initialize the types exported by the bz2 module.
- Issue #9854: The default read() implementation in io.RawIOBase now
handles non-blocking readinto() returning None correctly.
- Issue #9729: Fix the signature of SSLSocket.recvfrom() and
SSLSocket.sendto() to match the corresponding socket methods. Also,
fix various SSLSocket methods to raise socket.error rather than an
unhelpful TypeError when called on an unconnected socket. Original patch
by Andrew Bennetts.
- Issue #9826: OrderedDict.__repr__ can now handle self-referential
values: d['x'] = d.
- Issue #767645: Set os.path.supports_unicode_filenames to True on Mac OS X.
- Issue #9837: The read() method of ZipExtFile objects (as returned by
ZipFile.open()) could return more bytes than requested.
- Issue #9825: removed __del__ from the definition of collections.OrderedDict.
This prevents user-created self-referencing ordered dictionaries from
becoming permanently uncollectable GC garbage. The downside is that
removing __del__ means that the internal doubly-linked list has to wait for
GC collection rather than freeing memory immediately when the refcnt drops
to zero.
- Issue #9816: random.Random.jumpahead(n) did not produce a sufficiently
different internal state for small values of n. Fixed by salting the
value.
- Issue #9792: In case of connection failure, socket.create_connection()
would swallow the exception and raise a new one, making it impossible
to fetch the original errno, or to filter timeout errors. Now the
original error is re-raised.
- 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 Bjrn Lindqvist.
- Issue #7005: Fixed output of None values for RawConfigParser.write and
ConfigParser.write.
- Issue #808164: Fixed socket.close to avoid references to globals, to
avoid issues when socket.close is called from a __del__ method.
- Issue #2986: difflib.SequenceMatcher gets a new parameter, autojunk, which
can be set to False to turn off the previously undocumented 'popularity'
heuristic. Patch by Terry Reedy and Eli Bendersky
- Issue #8797: urllib2 does a retry for Basic Authentication failure instead of
falling into recursion.
- Issue #1194222: email.utils.parsedate now returns RFC2822 compliant four
character years even if the message contains RFC822 two character years.
- Issue #8750: Fixed MutableSet's methods to correctly handle
reflexive operations, namely x -= x and x ^= x.
- Issue #9129: smtpd.py is vulnerable to DoS attacks deriving from missing
error handling when accepting a new connection.
- Issue #658749: asyncore's connect() method now correctly interprets winsock
errors.
- Issue #9501: Fixed logging regressions in cleanup code.
- Issue #9214: Set operations on KeysView or ItemsView in the collections
module now correctly return a set. (Patch by Eli Bendersky.)
- Issue #9617: Signals received during a low-level write operation aren't
ignored by the buffered IO layer anymore.
- Issue #2521: Use weakrefs on for caching in the abc module, so that classes
are not held onto after they are deleted elsewhere.
- Issue #9626: the view methods for collections.OrderedDict() were returning
the unordered versions inherited from dict. Those methods are now
overridden to provide ordered views.
- Issue #8688: MANIFEST files created by distutils now include a magic
- 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 #6719: In pdb, do not stop somewhere in the encodings machinery
if the source file to be debugged is in a non-builtin encoding.
- Issue #8048: Prevent doctests from failing when sys.displayhook has
been reassigned.
- Issue #8015: In pdb, do not crash when an empty line is entered as
a breakpoint command.
- Issue #9448: Fix a leak of OS resources (mutexes or semaphores) when
re-initializing a buffered IO object by calling its ``__init__`` method.
- Issue #7909: Do not touch paths with the special prefixes ``\\.\``
or ``\\?\`` in ntpath.normpath().
- Issue #5146: Handle UID THREAD command correctly in imaplib.
- Issue #5147: Fix the header generated for cookie files written by
http.cookiejar.MozillaCookieJar.
- Issue #8198: In pydoc, output all help text to the correct stream
when sys.stdout is reassigned.
- Issue #7395: Fix tracebacks in pstats interactive browser.
- Issue #8230: Fix Lib/test/sortperf.py.
- Issue #1713: Fix os.path.ismount(), which returned true for symbolic links
across devices.
- Issue #8826: Properly load old-style "expires" attribute in http.cookies.
- Issue #1690103: Fix initial namespace for code run with trace.main().
- Issue #8471: In doctest, properly reset the output stream to an empty
string when Unicode was previously output.
- 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 #6213: Implement getstate() and setstate() methods of utf-8-sig and
utf-16 incremental encoders.
- Issue #7113: Speed up loading in ConfigParser. Patch by ukasz Langa.
- 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 #7895: platform.mac_ver() no longer crashes after calling os.fork()
- Issue #5395: array.fromfile() would raise a spurious EOFError when an
I/O error occurred. Now an IOError is raised instead. Patch by chuck
(Jan Hosang).
- Issue #7646: The fnmatch pattern cache no longer grows without bound.
- Issue #9136: Fix 'dictionary changed size during iteration'
RuntimeError produced when profiling the decimal module. This was
due to a dangerous iteration over 'locals()' in Context.__init__.
- Fix extreme speed issue in Decimal.pow when the base is an exact
power of 10 and the exponent is tiny (for example,
Decimal(10) ** Decimal('1e-999999999')).
- Issue #9161: Fix regression in optparse's acceptance of unicode
strings in add_option calls.
- Issue #9130: Fix validation of relative imports in parser module.
- Issue #9128: Fix validation of class decorators in parser module.
- 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 #10003: Allow handling of SIGBREAK on Windows. Fixes a regression
introduced by issue #9324.
- Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file
descriptor is provided. Patch by Pascal Chambon.
- 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 #9324: Add parameter validation to signal.signal on Windows in order
to prevent crashes.
- Issue #9526: Remove some outdated (int) casts that were preventing
the array module from working correctly with arrays of more than
2**31 elements.
only.
- Issue #7829: Document in dis that bytecode is an implementation detail.
What's New in Python 2.7?
=========================
*Release date: 2010-07-03*
Core and Builtins
----------------- Prevent assignment to set literals.
Library
------- Issue #1868: Eliminate subtle timing issues in thread-local objects by
getting rid of the cached copy of thread-local attribute dictionary.
- Issue #9125: Add recognition of 'except ... as ...' syntax to parser module.
Extension Modules
----------------- Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module,
ensure that the input string length is a multiple of the frame size.
- Issue #9075: In the ssl module, remove the setting of a ``debug`` flag
on an OpenSSL structure.
What's New in Python 2.7 release candidate 2?
=============================================
*Release date: 2010-06-20*
Core and Builtins
----------------- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.
- Issue #8202: Previous change to ``sys.argv[0]`` handling for -m command line
option reverted due to unintended side effects on handling of ``sys.path``.
See tracker issue for details.
- 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).
- In the unicode/str.format(), raise a ValueError when indexes to arguments are
too large.
Build
----- Issue #8854: Fix finding Visual Studio 2008 on Windows x64.
Library
- 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 #3798: Write sys.exit() message to sys.stderr to use stderr encoding
and error handler, instead of writing to the C stderr file in utf-8
- 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
----- Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows embedders
of the interpreter to set sys.argv without also modifying sys.path. This
helps fix `CVE-2008-5983
<http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
Library
------- Issue #8302: SkipTest in unittest.TestCase.setUpClass or setUpModule is now
reported as a skip rather than an error.
- Issue #8351: Excessively large diffs due to
unittest.TestCase.assertSequenceEqual are no longer included in failure
reports.
- Issue #8899: time.struct_time now has class and atribute docstrings.
- Issue #4487: email now accepts as charset aliases all codec aliases
accepted by the codecs module.
- Issue #6470: Drop UNC prefix in FixTk.
- Issue #5610: feedparser no longer eats extra characters at the end of
a body part if the body part ends with a \r\n.
- Issue #8833: tarfile created hard link entries with a size field != 0 by
mistake.
- Issue #1368247: set_charset (and therefore MIMEText) now automatically
encodes a unicode _payload to the output_charset.
- Issue #7150: Raise OverflowError if the result of adding or subtracting
timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
- Issue #6662: Fix parsing of malformatted charref (&#bad;), patch written by
Fredrik Hrd
- Issue #8016: Add the CP858 codec.
- Issue #3924: Ignore cookies with invalid "version" field in cookielib.
- 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 #8782: Add a trailing newline in linecache.updatecache to the last line
of files without one.
- Issue #8729: Return NotImplemented from ``collections.Mapping.__eq__()`` when
comparing to a non-mapping.
- Issue #8759: Fix user paths in sysconfig for posix and os2 schemes.
- Issue #1285086: Speed up ``urllib.quote()`` and urllib.unquote for simple
cases.
- Issue #8688: Distutils now recalculates MANIFEST everytime.
- Issue #5099: The ``__del__()`` method of ``subprocess.Popen`` (and the methods
it calls) referenced global objects, causing errors to pop up during
interpreter shutdown.
Extension Modules
----------------- Issue #7384: If the system readline library is linked against ncurses,
the curses module must be linked against ncurses as well. Otherwise it
is not safe to load both the readline and curses modules in an application.
- Issue #2810: Fix cases where the Windows registry API returns
ERROR_MORE_DATA, requiring a re-try in order to get the complete result.
- Issue #8674: Fixed a number of incorrect or undefined-behaviour-inducing
overflow checks in the ``audioop`` module.
Tests
----- Issue #8889: test_support.transient_internet rewritten so that the new
checks also work on FreeBSD, which lacks EAI_NODATA.
- Issue #8835: test_support.transient_internet() catches gaierror(EAI_NONAME)
and gaierror(EAI_NODATA)
- Issue #7449: Skip test_socketserver if threading support is disabled
- On darwin, ``test_site`` assumed that a framework build was being used,
leading to a failure where four directories were expected for site-packages
instead of two in a non-framework build.
Build
----- Display installer warning that Windows 2000 won't be supported in future
releases.
- Issues #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for
multiprocessing only.
Tools/Demos
----------- Issue #5464: Implement plural forms in msgfmt.py.
What's New in Python 2.7 beta 2?
================================
*Release date: 2010-05-08*
Core and Builtins
----------------- Run Clang 2.7's static analyzer for ``Objects/`` and ``Python/``.
- Issue #1533: Fix inconsistency in range function argument processing: any
non-float non-integer argument is now converted to an integer (if possible)
using its __int__ method. Previously, only small arguments were treated this
way; larger arguments (those whose __int__ was outside the range of a C long)
would produce a TypeError.
- 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 #7319: When -Q is used, do not silence DeprecationWarning.
- Issue #7332: Remove the 16KB stack-based buffer in
``PyMarshal_ReadLastObjectFromFile``, which doesn't bring any noticeable
benefit compared to the dynamic memory allocation fallback. Patch by
Charles-Franois Natali.
- Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize is
passed to bytearray.
- Issue #7072: ``isspace(0xa0)`` is true on Mac OS X.
- Issue #8404: Fix set operations on dictionary views.
- 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 #8571: Fix an internal error when compressing or decompressing a chunk
larger than 1GB with the zlib module's compressor and decompressor objects.
- Issue #8573: asyncore ``_strerror()`` function might throw ValueError.
- Issue #8483: asyncore.dispatcher's __getattr__ method produced confusing error
messages when accessing undefined class attributes because of the cheap
inheritance with the underlying socket object. The cheap inheritance has been
deprecated.
assembly file.
C-API
----- Issue #8276: PyEval_CallObject() is now only available in macro form. The
function declaration, which was kept for backwards compatibility reasons, is
now removed (the macro was introduced in 1997!).
- 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 #8348: Fix test ftp url in test_urllib2net.
- Issue #8204: Fix test_ttk notebook test by forcing focus.
- Issue #8344: Fix test_ttk bug on FreeBSD.
- Issue #8193: Fix test_zlib failure with zlib 1.2.4.
- Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi.
- Issue #8263: Now regrtest.py will report a failure if it receives a
KeyboardInterrupt (SIGINT).
- Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special
Unicode normalization cases.
- Issue #7783: test.test_support.open_urlresource invalidates the outdated files
from the local cache.
What's New in Python 2.7 alpha 4?
=================================
*Release date: 2010-03-06*
Core and Builtins
----------------- 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 #7309: Fix unchecked attribute access when converting
UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings.
- 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.
- Issue #2560: Remove an unnecessary 'for' loop from ``my_fgets()`` in
Parser/myreadline.c.
- Issue #7988: Fix default alignment to be right aligned for
``complex.__format__``. Now it matches other numeric types.
- Issue #5211: The complex type no longer uses implicit coercion in mixed-type
binary arithmetic operations.
Library
------- Issue #7904: Changes to urllib.parse.urlsplit to handle schemes as defined by
RFC3986. Anything before :// is considered a scheme and is followed by an
authority (or netloc) and by '/' led path, which is optional.
- Issue #1555570: email no longer inserts extra blank lines when a \r\n
combo crosses an 8192 byte boundary.
- Issue #6906: Tk should not set Unicode environment variables on Windows.
- Issue #1054943: Fix ``unicodedata.normalize('NFC', text)`` for the Public
Review Issue #29 (http://unicode.org/review/pr-29.html).
- 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 manager protocol to the
``tarfile.TarFile`` class.
- Issue #7250: Fix info leak of os.environ across multi-run uses of
``wsgiref.handlers.CGIHandler``.
- Issue #1729305: Fix doctest to handle encode error with "backslashreplace".
- Issue #691291: ``codecs.open()`` should not convert end of lines on reading
and writing.
- Issue #7975: Correct regression in dict methods supported by bsddb.dbshelve.
- Issue #7959: ctypes callback functions are now registered correctly with the
cycle garbage collector.
- Issue #7970: ``email.Generator.flatten`` now correctly flattens
message/rfc822 messages parsed by ``email.Parser.HeaderParser``.
- 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 #6003: Add an argument to ``zipfile.Zipfile.writestr`` to specify the
compression type.
- 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 #7712: test_support gained a new ``temp_cwd`` context manager which is
now also used by regrtest to run all the tests in a temporary directory. The
original CWD is saved in ``test.test_support.SAVEDCWD``. Thanks to Florent
Xicluna who helped with the patch.
Build
----- Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9.
What's New in Python 2.7 alpha 3?
=================================
*Release date: 2010-02-06*
Core and Builtins
----------------- Issue #5677: Explicitly forbid write operations on read-only file objects,
and read operations on write-only file objects. On Windows, the system C
library would return a bogus result; on Solaris, it was possible to crash the
interpreter. Patch by Stefan Krah.
- Issue #7853: Normalize exceptions before they are passed to a context
manager's ``__exit__()`` method.
- Issue #7385: Fix a crash in ``PyMemoryView_FromObject()`` when
``PyObject_GetBuffer()`` fails. Patch by Florent Xicluna.
- Issue #7819: Check ``sys.call_tracing()`` arguments types.
- Issue #7788: Fix an interpreter crash produced by deleting a list slice with
very large step value.
- Issue #7766: Change ``sys.getwindowsversion()`` return value to a named tuple
and add the additional members returned in an OSVERSIONINFOEX structure. The
new members are service_pack_major, service_pack_minor, suite_mask, and
product_type.
- Issue #7561: Operations on empty bytearrays (such as ``int(bytearray())``)
could crash in many places because of the ``PyByteArray_AS_STRING()`` macro
returning NULL. The macro now returns a statically allocated empty string
instead.
- Issue #7622: Improve the split(), rsplit(), splitlines() and replace()
methods of bytes, bytearray and unicode objects by using a common
implementation based on stringlib's fast search. Patch by Florent Xicluna.
- 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.
- Issue #7319, #7770: Silence ``DeprecationWarning`` by default when the -3
option is not used.
- Issue #2335: Backport set literals syntax from Python 3.x.
- Issue #2333: Backport set and dict comprehensions syntax from Python 3.x.
- Issue #1967: Backport dictionary views from Python 3.x.
Library
------- Issue #9137: Fix issue in MutableMapping.update, which incorrectly
treated keyword arguments called 'self' or 'other' specially.
- Issue #7835: shelve should no longer produce mysterious warnings during
interpreter shutdown.
- 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 #7869: logging: Improved diagnostic for format-time errors.
- Issue #7868: logging: Added loggerClass attribute to Manager.
- Issue #7851: logging: Clarification on logging configuration files.
- Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is
specified, rather than fall through to AF_PACKET (in the ``socket`` module).
Also, raise ValueError rather than TypeError when an unknown TIPC address
type is specified. Patch by Brian Curtin.
- logging: Implemented PEP 391.
- 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 #7610: Reworked implementation of the internal ``zipfile.ZipExtFile``
class used to represent files stored inside an archive. The new
implementation is significantly faster and can be wrapped in a
``io.BufferedReader`` object for more speedups. It also solves an issue
where interleaved calls to ``read()`` and ``readline()`` give wrong results.
Patch by Nir Aides.
- Issue #7792: Registering non-classes to ABCs raised an obscure error.
- Removed the deprecated functions ``verify()`` and ``vereq()`` from
Lib/test/test_support.py.
- Issue #7773: Fix an UnboundLocalError in ``platform.linux_distribution()``
when the release file is empty.
- Issue #7748: Since unicode values are supported for some metadata options in
Documentation
------------- Updated "Using Python" documentation to include description of CPython's -J,
-U and -X options.
- Updated Python manual page (options -B, -O0, -s, environment variables
PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE).
What's New in Python 2.7 alpha 2?
=================================
*Release date: 2010-01-09*
Core and Builtins
----------------- The ``__complex__()`` method is now looked up on the class of instances to
make it consistent with other special methods.
- Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,
`rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna.
- Issue #5080: A number of functions and methods previously produced a
DeprecationWarning when passed a float argument where an integer was expected.
These functions and methods now raise TypeError instead. The majority of the
effects of this change are in the extension modules, but some core functions
and methods are affected: notably the 'chr', 'range' and 'xrange' builtins,
and many unicode/str methods.
- Issue #7604: Deleting an unset slotted attribute did not raise an
AttributeError.
- 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 #7413: Passing '\0' as the separator to datetime.datetime.isoformat()
used to drop the time part of the result.
- 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 #6108: ``unicode(exception)`` and ``str(exception)`` should return the
same message when only ``__str__()`` (and not ``__unicode__()``) is overridden
in the subclass.
- 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 #7491: Metaclass's __cmp__ method was ignored.
- Issue #7466: Segmentation fault when the garbage collector is called in the
middle of populating a tuple. Patch by Florent Xicluna.
Library
------- Issue #6963: Added "maxtasksperchild" argument to ``multiprocessing.Pool``,
allowing for a maximum number of tasks within the pool to be completed by the
worker before that worker is terminated, and a new one created to replace it.
- Issue #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes gcc
when it has a fully qualified configuration prefix. Initial patch by
Arfrever.
- 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 #7471: Improve the performance of GzipFile's buffering mechanism, and
make it implement the ``io.BufferedIOBase`` ABC to allow for further speedups
by wrapping it in an ``io.BufferedReader``. Patch by Nir Aides.
- Issue #3972: ``httplib.HTTPConnection`` now accepts an optional source_address
parameter to allow specifying where your connections come from.
- ``socket.create_connection()`` now accepts an optional source_address
parameter.
- Issue #5511: ``zipfile.ZipFile`` can now be used as a context manager.
Initial patch by Brian Curtin.
- Distutils now correctly identifies the build architecture as "x86_64" when
building on OSX 10.6 without "-arch" flags.
- 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.
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.
- Remove length limitation when constructing a complex number from a unicode
string.
- Issue #7244: ``itertools.izip_longest()`` no longer ignores exceptions raised
during the formation of an output tuple.
- Issue #1087418: Boost performance of bitwise operations for longs.
- Issue #1722344: ``threading._shutdown()`` is now called in ``Py_Finalize()``,
which fixes the problem of some exceptions being thrown at shutdown when the
interpreter is killed. Patch by Adam Olsen.
- Issue #7168: Document ``PyFloat_AsString()`` and ``PyFloat_AsReprString()``,
and note that they are unsafe and deprecated.
- Issue #7120: logging: Remove import of multiprocessing which is causing crash
in GAE.
- 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 #6300: unicode.encode, unicode.decode, str.decode, and str.encode now
take keyword arguments.
- 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 #6844: Do not emit DeprecationWarnings when accessing a "message"
attribute on exceptions that was set explicitly.
- Issue #6846: Fix bug where bytearray.pop() returns negative integers.
- ``classmethod()`` no longer checks if its argument is callable.
- 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 #6707: ``dir()`` on an uninitialized module caused a crash.
- Issue #6540: Fixed crash for ``bytearray.translate()`` with invalid parameters
.
- Issue #6573: ``set.union()`` stopped processing inputs if an instance of self
occurred in the argument chain.
- Issue #1616979: Added the cp720 (Arabic DOS) encoding.
- 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 #6119: Fixed an incorrect Py3k warning about order comparisons of
built-in functions and methods.
- Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. This fixes a
build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead
of stdint.h on that platform.
- Issue #4856: Remove checks for win NT.
- Issue #2016: Fixed a crash in a corner case where the dictionary of keyword
arguments could be modified during the function call setup.
- Removed the ipaddr module.
- Issue #6329: Fixed iteration for memoryview objects (it was being blocked
because it wasn't recognized as a sequence).
- Issue #6289: Encoding errors from ``compile()`` were being masked.
- When no module is given in a relative import, the module field of the
ImportFrom AST node is now None instead of an empty string.
- Issue #1180193: When importing a module from a .pyc (or .pyo) file with an
existing .py counterpart, override the co_filename attributes of all code
objects if the original filename is obsolete (which can happen if the file has
been renamed, moved, or if it is accessed through different paths). Patch by
Ziga Seilnacht and Jean-Paul Calderone.
- Issue #4075: Use ``OutputDebugStringW()`` in Py_FatalError.
- 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.
- Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types where
the tp_hash and tp_dict slots are both NULL.
- Issue #4764: With io.open, IOError.filename is set when trying to open a
directory on POSIX systems.
- Issue #4764: IOError.filename is set when trying to open a directory on POSIX
systems.
- Issue #4759: None is now allowed as the first argument of
``bytearray.translate()``. It was always allowed for ``bytes.translate()``.
- 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 #3439: Add a bit_length method to int and long.
- 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 #4445: Replace ``sizeof(PyStringObject)`` with
``offsetof(PyStringObject, ob_sval) + 1`` when allocating memory for str
instances. On a typical machine this saves 3 bytes of memory (on average) per
string allocation.
- Issue #3996: On Windows, the PyOS_CheckStack function would cause the
interpreter to abort ("Fatal Python error: Could not reset the stack!")
instead of throwing a MemoryError.
- 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 #4317: Fixed a crash in the ``imageop.rgb2rgb8()`` function.
- Issue #4230: If ``__getattr__`` is a descriptor, it now functions correctly.
- Issue #4048: The parser module now correctly validates relative imports.
- Issue #4225: ``from __future__ import unicode_literals`` didn't work in an
exec statement.
- Issue #4176: Fixed a crash when pickling an object which ``__reduce__`` method
does not return iterators for the 4th and 5th items.
- Issue #4209: Enabling unicode_literals and the print_function in the same
__future__ import didn't work.
- Using ``nonlocal`` as a variable name will now raise a Py3k SyntaxWarning
because it is a reserved word in 3.x.
- On windows, ``os.chdir()`` given unicode was not working if
GetCurrentDirectoryW returned a path longer than MAX_PATH. (But It's doubtful
this code path is really executed because I cannot move to such directory on
win2k)
- Issue #4069: When ``set.remove(element)`` is used with a set element, the
element is temporarily replaced with an equivalent frozenset. But the
eventual KeyError would always report the empty ``frozenset()`` as the missing
key. Now it correctly refers to the initial element.
- Issue #4509: Various issues surrounding resize of bytearray objects to which
there are buffer exports.
- Issue #4748: Lambda generators no longer return a value.
- Issue #3582: Use native TLS functions on Windows
- The re.sub(), re.subn() and re.split() functions now accept a flags parameter.
- Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with short
file names.
- 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 #5108: Handle %s like %S and %R in PyUnicode_FromFormatV(): Call
PyUnicode_DecodeUTF8() once, remember the result and output it in a second
step. This avoids problems with counting UTF-8 bytes that ignores the effect
of using the replace error handler in PyUnicode_DecodeUTF8().
- Issue #3739: The unicode-internal encoder now reports the number of characters
consumed like any other encoder (instead of the number of bytes).
- 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
------- Add count() and reverse() methods to collections.deque().
- Fix variations of extending deques: d.extend(d) d.extendleft(d) d+=d
- Issue #6986: Fix crash in the JSON C accelerator when called with the wrong
parameter types. Patch by Victor Stinner.
- logging: Added optional "secure" parameter to SMTPHandler, to enable use of
TLS with authentication credentials.
- 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 #7333: The ``posix`` module gains an ``initgroups()`` function providing
access to the initgroups(3) C library call on Unix systems which implement it.
Patch by Jean-Paul Calderone.
- Issue #7408: Fixed distutils.tests.sdist so it doesn't check for group
ownership when the group is not forced, because the group may be different
from the user's group and inherit from its container when the test is run.
- Issue #1515: Enable use of deepcopy() with instance methods. Patch by Robert
Collins.
- Issue #7403: logging: Fixed possible race condition in lock creation.
- 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 #5788: ``datetime.timedelta`` objects get a new ``total_seconds()``
method returning the total number of seconds in the duration. Patch by Brian
Quinlan.
- Issue #6615: logging: Used weakrefs in internal handler list.
- Issue #1488943: ``difflib.Differ`` doesn't always add hints for tab
characters.
- Issue #6123: tarfile now opens empty archives correctly and consistently
raises ReadError on empty files.
- Issue #7354: distutils.tests.test_msvc9compiler - dragfullwindows can be 2.
- Issue #5037: Proxy the __unicode__ special method to __unicode__ instead of
__str__.
- Issue #7341: Close the internal file object in the TarFile constructor in case
of an error.
threads at once.
- Issue #7071: byte-compilation in Distutils is now done with respect to
sys.dont_write_bytecode.
- Issue #7066: archive_util.make_archive now restores the cwd if an error is
raised. Initial patch by Ezio Melotti.
- 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 #7149: urllib fails on OSX in the proxy detection code.
- Issue #7069: Make inspect.isabstract() return a boolean.
- Add support to the ``ihooks`` module for relative imports.
- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment.
- Issue #7086: Added TCP support to SysLogHandler, and tidied up some
anachronisms in the code which were a relic of 1.5.2 compatibility.
- 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 #6516: Added owner/group support when creating tar archives in
Distutils.
- Issue #7031: Add ``TestCase.assert(Not)IsInstance()`` methods.
- Issue #6790: Make it possible again to pass an ``array.array`` to
``httplib.HTTPConnection.send``. Patch by Kirk McDonald.
- 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 #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils.
- Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6
- 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 #6938: Fix a TypeError in string formatting of a multiprocessing debug
message.
- Issue #6635: Fix profiler printing usage message.
- Issue #6856: Add a filter keyword argument to TarFile.add().
- Issue #6163: Fixed HP-UX runtime library dir options in
distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and Michael
Haubenwallner.
- Issue #6857: Default format() alignment should be '>' for Decimal instances.
- Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning
NaN or raising InvalidContext. Also, fix infinite recursion in
long(Decimal('nan')).
- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no
type specifier.
- Issue #4937: plat-mac/bundlebuilder refers to non-existing version.plist.
- Issue #6838: Use a list to accumulate the value instead of repeatedly
concatenating strings in httplib's HTTPResponse._read_chunked providing a
significant speed increase when downloading large files servend with a
Transfer-Encoding of 'chunked'.
- Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments
as documented.
- Issue #2666: Handle BROWSER environment variable properly for unknown browser
names in the webbrowser module.
- Issue #6054: Do not normalize stored pathnames in tarfile.
- Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN
payloads are now ordered by integer value rather than lexicographically.
- Issue #6693: New functions in site.py to get user/global site packages paths.
- The thread.lock type now supports weak references.
- Issue #1356969: Add missing info methods in Tix.HList.
- Issue #1522587: New constants and methods for the Tix.Grid widget.
- Issue #1250469: Fix the return value of Tix.PanedWindow.panes.
- Issue #1119673: Do not override Tkinter.Text methods when creating a
ScrolledText.
- 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 #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 #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket.
Patch by Farhan Ahmad, test by Marcin Bachry.
- Issue #6062: In distutils, fixed the package option of build_ext. Feedback
and tests on pywin32 by Tim Golden.
- Issue #6053: Fixed distutils tests on win32. Patch by Hirokazu Yamamoto.
- 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 #1655: Make imaplib IPv6-capable. Patch by Derek Morr.
- Issue #5918: Fix a crash in the parser module.
- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
- Issue #6022: A test file was created in the current working directory by
test_get_outputs in Distutils.
- Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source'
file is a binary. Patch by Brodie Rao, tests by Daniel Diniz.
- Issue #5977: distutils build_ext.get_outputs was not taking into account the
inplace option. Initial patch by kxroberto.
- Issue #5984: distutils.command.build_ext.check_extensions_list checks were
broken for old-style extensions.
- Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when
trying to print a traceback.
- Issue #5976: Fixed Distutils test_check_environ.
- 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 #4875: On win32, ctypes.util.find_library does no longer return
directories.
- Issue #5142: Add the ability to skip modules while stepping to pdb.
- Issue #1309567: Fix linecache behavior of stripping subdirectories when
looking for files given by a relative filename.
- Issue #5692: In ``zipfile.Zipfile``, fix wrong path calculation when
extracting a file to the root directory.
- Issue #5913: ``os.listdir()`` should fail for empty path on windows.
- 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 #3002: ``shutil.copyfile()`` and ``shutil.copytree()`` now raise an
error when a named pipe is encountered, rather than blocking infinitely.
- 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 #5874: distutils.tests.test_config_cmd is not locale-sensitive anymore.
- Issue #4305: ctypes should now build again on mipsel-linux-gnu
- Issue #1734234: Massively speedup ``unicodedata.normalize()`` when the string
is already in normalized form, by performing a quick check beforehand.
Original patch by Rauli Ruohonen.
- 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 #5810: Fixed Distutils test_build_scripts so it uses
``sysconfig.get_config_vars()``.
- Issue #4951: Fixed failure in test_httpservers.
- Issue #3102: All global symbols that the _ctypes extension defines are now
prefixed with 'Py' or '_ctypes'.
- Issue #5041: ctypes does now allow pickling wide character.
- Issue #5812: For the two-argument form of the Fraction constructor,
``Fraction(m, n)``, m and n are permitted to be arbitrary Rational instances.
- 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 #5795: Fixed test_distutils failure on Debian ppc.
- 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 #5607: Fixed Distutils test_get_platform for Mac OS X fat binaries.
- Issue #5741: Don't disallow "%%" (which is an escape for "%") when setting a
value in SafeConfigParser.
- Issue #5732: Added a new command in Distutils: check.
- Issue #5731: Distutils bdist_wininst no longer worked on non-Windows
platforms. Initial patch by Paul Moore.
- 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 #1491431: Fixed distutils.filelist.glob_to_re for edge cases. Initial
fix by Wayne Davison.
- Issue #5693: TestSuite.__iter__ can now be consistently overridden in
subclasses.
- Issue #5694: Removed spurious test output in Distutils (test_clean).
- Issue #5471: Fix os.path.expanduser() for $HOME set to '/'.
- Issue #1326077: Fix the formatting of SyntaxErrors by the traceback module.
- Issue #1726172: Fix IndexError in the case of and empty response in ftplib.
- Issue #2625: Added missing iteritems() call to the for loop in
mailbox.MH.get_message().
- Issue #5585: Add the ability to call an initializer to
mulitiprocessing.manager so that users can install custom handlers/etc.
- Issue #3551: Patch multiprocessing to raise a proper exception if the size of
the object when writefile is called causes a ERROR_NO_SYSTEM_RESOURCES. Added
docs to note the limitation.
- unittest.assertNotEqual() now uses the inequality operator (!=) instead of the
equality operator.
- Issue #6001: Test discovery for unittest. Implemented in
unittest.TestLoader.discover and from the command line.
- Issue #5679: The methods unittest.TestCase.addCleanup and doCleanups were
added. addCleanup allows you to add cleanup functions that will be called
unconditionally (after setUp if setUp fails, otherwise after tearDown). This
allows for much simpler resource allocation and deallocation during tests.
- 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 #1034053: unittest now supports skipping tests and expected failures.
- The unittest.TestCase.assertRaises() method now returns a context manager when
not given a callable so that code to be tested can be written inline using a
with statement.
- Issue #2578: The unittest.TestCase.assertEqual() now displays the differences
in lists, tuples, dicts and sets on failure. Many new handy type and
comparison specific assert* methods have been added that fail with error
messages actually useful for debugging. Contributed in part by Google.
- 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 #5381: Added object_pairs_hook to the json module. This allows
OrderedDicts to be built by the decoder.
- 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 #1222: ``locale.format()`` bug when the thousands separator is a space
character.
- Issue #5472: Fixed distutils.test_util tear down. Original patch by Tim
Golden.
- collections.deque objects now have a read-only attribute called maxlen.
- Issue #2638: Show a window constructed with tkSimpleDialog.Dialog only after
it is has been populated and properly configured in order to prevent window
flashing.
- Issue #4792: Prevent a segfault in _tkinter by using the guaranteed to be safe
interp argument given to the PythonCmd in place of the Tcl interpreter taken
from a PythonCmd_ClientData.
- Issue #5193: Guarantee that Tkinter.Text.search returns a string.
- Issue #5394: Removed > 2.3 syntax from distutils.msvc9compiler.
Original patch by Akira Kitada.
- Issue #5385: Fixed mmap crash after resize failure on windows.
- Issue #5179: Fixed subprocess handle leak on failure on windows.
- PEP 372: Added collections.OrderedDict().
- The _asdict() for method for namedtuples now returns an OrderedDict().
- The configparser module now defaults to using an ordered dictionary.
- Issue #4308: httplib.IncompleteRead's repr doesn't include all of the data all
ready received.
- Issue #5401: Fixed a performance problem in mimetypes when ``from mimetypes
import guess_extension`` was used.
- Issue #1733986: Fixed mmap crash on Windows in accessing elements of second
map object with same tagname but larger size than first map.
- 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 #5378: Added --quiet option to Distutils bdist_rpm command.
- Issue #5052: Make Distutils compatible with 2.3 again.
- Deprecated methods of symtable.Symbol have been removed: is_keywordarg(),
is_vararg(), and is_in_tuple().
- Issue #5316: Fixed buildbot failures introduced by multiple inheritance in
Distutils tests.
- 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 #5292: Fixed mmap crash on its boundary access m[len(m)].
- Issue #2279: distutils.sdist.add_defaults now add files from the package_data
and the data_files metadata.
- Issue #5257: Refactored all tests in distutils, so they use
support.TempdirManager, to avoid writing in the tests directory.
- Issue #4524: distutils build_script command failed with --with-suffix=3.
Initial patch by Amaury Forgeot d'Arc.
- Issue #2461: Added tests for distutils.util.
- Issue #1008086: Fixed socket.inet_aton() to always return 4 bytes even on LP64
platforms (most 64-bit Linux, bsd, unix systems).
- Issue #5203: Fixed ctypes segfaults when passing a unicode string to a
function without argtypes (only occurs if HAVE_USABLE_WCHAR_T is false).
- Issue #3386: distutils.sysconfig.get_python_lib prefix argument was ignored
under NT and OS2. Patch by Philip Jenvey.
- Issue #5128: Make compileall properly inspect bytecode to determine if needs
to be recreated. This avoids a timing hole thanks to the old reliance on the
ctime of the files involved.
- Issue #5122: Synchronize tk load failure check to prevent a potential
deadlock.
- Issue #1818: collections.namedtuple() now supports a keyword argument 'rename'
- 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 #1594: MacOS.GetCreatorAndType now always returns a big-endian result,
to be consistent with Apple tools.
- Issue #900949: plat-mac/videoreader.py no longer relies on a non-existing
module.
- Issue #16278952: plat-mac/videoreader.py now correctly imports MediaDescr
- Issue #1737832: plat-mac/EasyDialog.py no longer uses the broken aepack
module.
- Issue #1149804: macostools.mkdirs now even works when another process creates
one of the needed subdirectories.
- Issue #900506: added --no-zipimport flag to the bundlebuilder script.
- Issue #841800: bundlebuilder now works with 'python -O'.
- Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on
biarch systems. Try to rely on ldconfig only, without using objdump and gcc.
- 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).
- Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for new
arguments introduced in 2.5.
- Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in
makeunicodedata.py and regenerated the Unicode database (This fixes
u'\u1d79'.lower() == '\x00').
- Windows locale mapping updated to Vista.
IDLE
---- Issue #5150: IDLE's format menu now has an option to strip trailing
whitespace.
- Issue #5847: Remove -n switch on "Edit with IDLE" menu item.
Tools/Demos
----------- Ttk demos added in Demo/tkinter/ttk/.
- Issue #4677: Add two list comprehension tests to pybench.
Build
-----
- Issue #6556: Fixed the Distutils configuration files location explanation for
Windows.
- Issue #6801: symmetric_difference_update also accepts ``|``. Thanks to Carl
Chenet.
C-API
----- Issue #7528: Add PyLong_AsLongAndOverflow (backported from py3k).
- Issue #7228: Add '%lld' and '%llu' support to PyString_FromFormat(V) and
PyErr_Format, on machines with HAVE_LONG_LONG defined.
- Add new C-API function PyOS_string_to_double, and deprecated PyOS_ascii_atof
and PyOS_ascii_strtod.
- Removed _PyOS_double_to_string. Use PyOS_double_to_string instead. This is in
preparation for (but not strictly related to) issue #7117, short float repr.
- Issue #6624: PyArg_ParseTuple with "s" format when parsing argument with NULL:
Bogus TypeError detail string.
- Issue #5954: Add a PyFrame_GetLineNumber() function to replace most uses of
PyCode_Addr2Line().
- Issue #5959: Add a PyCode_NewEmpty() function to create a new empty code
object at a specified file, function, and line number.
- Issue #1419652: Change the first argument to PyImport_AppendInittab() to
``const char *`` as the string is stored beyond the call.
- Some PyBytes_* aliases have been removed because they don't exist in 3.x.
- Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError for negative
arguments. Previously, it raised TypeError.
- 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 #4122: On Windows, fix a compilation error when using the
Py_UNICODE_ISSPACE macro in an extension module.
- 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 #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}.
- Issue #7078: Set struct.__doc__ from _struct.__doc__.
- Issue #3366: Add erf, erfc, expm1, gamma, lgamma functions to math module.
- Issue #6823: Allow time.strftime() to accept a tuple with a isdst field
outside of the range of [-1, 1] by normalizing the value to within that range.
- Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris,
OpenBSD.
- Issue #4365: Add crtassem.h constants to the msvcrt module.
- Issue #4396: The parser module now correctly validates the with statement.
- Issue #5228: Make functools.partial objects can now be pickled.
Tests
----- Issue #7431: Use TESTFN in test_linecache instead of trying to create a file
in the Lib/test directory, which might be read-only for the user running the
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 #7295: Do not use a hardcoded file name in test_tarfile.
- Issue #7270: Add some dedicated unit tests for multi-thread synchronization
primitives such as Lock, RLock, Condition, Event and Semaphore.
- Issue #7222: Make thread "reaping" more reliable so that reference
leak-chasing test runs give sensible results. The previous method of reaping
threads could return successfully while some Thread objects were still
referenced. This also introduces a new private function: ``thread._count()``.
- 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.
- Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6.
- Issue #6806: test_platform failed under OS X 10.6.0 because ``sw_ver`` leaves
off the trailing 0 in the version number.
- Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to
Lib/lib-tk/test/test_tkinter/test_loadtk. With this, these tests demonstrate
the same behaviour as test_ttkguionly (and now also test_tk) which is to skip
the tests if DISPLAY is defined but can't be used.
- Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running
regression tests in parallel, shortening the total runtime.
- Issue #5354: New test support function import_fresh_module() makes it easy to
import both normal and optimised versions of modules. test_heapq and
test_warnings have been adjusted to use it, tests for other modules with both
C and Python implementations in the stdlib can be adjusted to use it over
time.
- Fix test_warnings to no longer reset the warnings filter.
- Fix test_logging to no longer reset the warnings filter.
- Issue #5635: Fix running test_sys with tracing enabled.
- regrtest no longer treats ImportError as equivalent to SkipTest. Imports that
should cause a test to be skipped are now done using import_module from test
support, which does the conversion.
- Issue #5083: New 'gui' resource for regrtest.
- Issue #5837: Certain sequences of calls to set() and unset() for
support.EnvironmentVarGuard objects restored the environment variables
incorrectly on __exit__.
- Issue #2389: Array objects are now pickled in a portable manner.
Misc
---- Issue #5611: Auto-detect whether a C file uses tabs or spaces in Vim.
What's New in Python 2.6 final
==============================
*Release date: 01-Oct-2008*
Core and Builtins
----------------- Issue #3967: Fixed a crash in the count() and find() methods of string-like
objects, when the "start" parameter is a huge value.
- Issue #3965: Fixed a crash on Windows when open() is given an invalid
filename or mode, and the filename is a unicode string.
- Bug #3951: Py_USING_MEMORY_DEBUGGER should not be enabled by default.
Library
------- Issue #3965: Allow repeated calls to turtle.Screen, by making it a
true singleton object.
- 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 #3950: Made turtle respect scale factors.
- Issue #3547: Fixed ctypes structures bitfields of varying integer
sizes.
- Issue #3879: A regression in urllib.getproxies_enviroment was fixed.
- Issue #3863: Disabled a unit test of fork being called from a thread
64bit values.
- Issue #3634: _weakref.ref(Exception).__init__() gave invalid return value on
error.
- 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 #3751: str.rpartition would perform a left-partition when called with
a unicode argument.
- Issue #3683: Fix compilation when --without-threads is given.
- 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.
- Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
mechanism. In the process, fix a bug where isinstance() and issubclass(),
when given a tuple of classes as second argument, were looking up
__instancecheck__ / __subclasscheck__ on the tuple rather than on each
type object.
- Fix crashes on memory allocation failure found with failmalloc.
- Fix memory leaks found with valgrind and update suppressions file.
- Fix compiler warnings in opt mode which would lead to invalid memory reads.
- Fix problem using wrong name in decimal module reported by pychecker.
- Silenced another compiler warning about a used but not defined
function 'stringlib_contains_obj'.
- Added warnings on the use of ``__getslice__``, ``__setslice__``, or
``__delslice__``.
- 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
----- Aliased PyObject_Bytes to PyObject_Str.
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 #3629: Fix sre "bytecode" validator for an end case.
- 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.
- Issue #1797 (partial fix): ctypes NULL function pointers have a
False boolean value now.
- Issue #2985: Allow 64-bit integer responses (``<i8>``) in XMLRPC
transfers.
- Issue #2877: The UserString.MutableString class has been removed in
Python 3.0.
- Do not close external file objects passed to tarfile.open(mode='w:bz2')
when the TarFile is closed.
- Issue #2959: For consistency with other file-like objects, gzip's
GzipFile.close() can now be called multiple times without raising
an exception.
- Issue #1390: Raise ValueError in toxml when an invalid comment would
otherwise be produced.
- Issue #2914: TimedRotatingFileHandler now takes an optional keyword
argument "utc" to use UTC time rather than local time.
- Issue #2929: TimedRotatingFileHandler was using the wrong path when
deleting old log files (filename only instead of full path).
- Issue #1775025: You can now specify zipfile members to open(),
read() or extract() via a ZipInfo instance. This allows handling
duplicate filenames in zipfiles.
- Issue #961805: Fix Text.edit_modified() in Tkinter.
- Issue #1793: Function ctypes.util.find_msvcrt() added that returns
the name of the C runtime library that Python uses.
ctypes.util.find_library(name) now call this function when name is
'm' or 'c'.
- The statvfs module has been deprecated for removal in Python 3.0.
- The sunaudiodev and SUNAUDIODEV modules have 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.
- Issue #1713041: fix pprint's handling of maximum depth.
- The timing module has been deprecated for removal in Python 3.0.
- The sv module has been deprecated for removal in Python 3.0.
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.
- Patch #1722225: Support QNX 6.
- ``Lib/lib-old`` is now added to sys.path.
- On MacOS X it is now possible to install the framework in 64-bit
mode or even as a 4-way universal binary (that is, PPC, i386,
PPC64 and x86_64 support in one binary).
This is controlled by the configure argument ``--with-universal-archs``:
- ``--with-universal-archs=all``: install 4-way universal
- ``--with-universal-archs=32-bit``: install 2-way universal, 32-bit (the defa
ult)
- ``--with-universal-archs=64-bit``: install 2-way universal, 64-bit
This option should be used in combination with ``--enable-universalsdk=``.
NOTE: 64-bit and 4-way builds are only suppported on Mac OS X 10.5 (or later).
C API
----- Add ``PyType_Modified()`` as a public API to clear the type cache.
- The PyBytes functions have been renamed to PyByteArray.
- The PyString functions have been renamed to PyBytes. A batch of
defines were added so that the linker still sees the original
PyString names.
What's New in Python 2.6 alpha 3?
=================================
*Release date: 08-May-2008*
Core and builtins
-----------------
``compile(..., PyCF_ONLY_AST)``.
- Patch #2426: Added sqlite3.Connection.iterdump method to allow easy
dumping of databases. Contributed by Paul Kippes at PyCon 2008.
- Patch #2477: Added from __future__ import unicode_literals.
- Added backport of bytearray type.
- Issue #2355: add Py3k warning for buffer().
- 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 #2348: add Py3k warning for file.softspace.
- Issue #2346/#2347: add Py3k warnings for __methods__ and
__members__.
- Issue #2358: Add a Py3k warning on sys.exc_clear() usage.
- Issue #2400: Allow relative imports to "import *".
- Issue #1745: Backport print function with ``from __future__ import
print_function``.
- Issue #2332: add new attribute names for instance method objects.
The two changes are: im_self -> __self__ and im_func -> __func__
- Issue #2379: Raise a Py3K warning for __getitem__ or __getslice__ on
exception instances.
- Issue #2371: Add a Py3k warning when catching an exception that
doesn't derive from BaseException.
- Issue #2341: Add a Py3k warning when raising an exception that
doesn't derive from BaseException.
- 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 #2359: Adding deprecation warnings for array.{read,write}.
- 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.
- Add a warning when asserting a non-empty tuple which is always true.
- Issue #2179: speed up with statement execution by storing the exit
method on the stack instead of in a temporary variable (patch by
Jeffrey Yaskin)
- Issue #1747858: Fix chown to work with large uid's and gid's on
64-bit platforms.
- Issue #1202: zlib.crc32 and zlib.adler32 no longer return different
values on 32-bit vs. 64-bit python interpreters. Both were correct,
but they now both return a signed integer object for consistency.
- Issue #1158: add %f format (fractions of a second represented as
microseconds) to datetime objects. Understood by both strptime and
strftime.
- Issue #705836: struct.pack(">f", x) now raises OverflowError on all
platforms when x is too large to fit into an IEEE 754 float;
previously it only raised OverflowError on non IEEE 754 platforms.
- Issues #2166, #1741 and #1531505: now distutils deals with HOME
correctly under win32
- Patch #1858: distutils: added multiple server support in .pypirc
- Issue #1106316: pdb.post_mortem()'s parameter, "traceback", is now
optional: it defaults to the traceback of the exception that is
currently being handled (is mandatory to be in the middle of an
exception, otherwise it raises ValueError).
- Issue #1193577: A .shutdown() method has been added to SocketServers
which terminates the .serve_forever() loop.
- Issue #2220: handle rlcompleter attribute match failure more
gracefully.
- Issue #2225: py_compile, when executed as a script, now returns a
non- zero status code if not all files could be compiled
successfully.
- 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".
- Issue #1577: shutil.move() now calls os.rename() if the destination
is a directory instead of copying-then-remove-source.
Tests
----- test_nis no longer fails when test.test_support.verbose is true and
NIS is not set up on the testing machine.
- Output comparison tests are no longer supported.
- Rewrite test_errno to use unittest and no longer be a no-op.
y) functions.
- Issue #1635: Platform independent creation and representation of NaN
and INF. float("nan"), float("inf") and float("-inf") now work on
every platform with IEEE 754 semantics.
- Compiler now generates simpler and faster code for dictionary
literals. The oparg for BUILD_MAP now indicates an estimated
dictionary size. There is a new opcode, STORE_MAP, for adding
entries to the dictionary.
- Issue #1638: %zd configure test fails on Linux.
- Issue #1620: New property decorator syntax was modifying the
decorator in place instead of creating a new decorator object.
- Issue #1538: Avoid copying string in split/rsplit if the split char
is not found.
- Issue #1553: An erroneous __length_hint__ can make list() raise a
SystemError.
- PEP 366: Allow explicit relative imports when executing modules
inside packages with the -m switch via a new module level
__package__ attribute.
- Issue #1402: Fix a crash on exit, when another thread is still
running, and if the deallocation of its frames somehow calls the
PyGILState_Ensure() / PyGILState_Release() functions.
- Expose the Py_Py3kWarningFlag as sys.py3kwarning.
- Issue #1445: Fix a SystemError when accessing the ``cell_contents``
attribute of an empty cell object.
- Issue #1460: The utf-7 incremental decoder did not accept truncated
input. It now correctly saves its state between chunks of data.
- Patch #1739468: Directories and zipfiles containing a __main__.py
file can now be directly executed by passing their name to the
interpreter. The directory/zipfile is automatically inserted as the
first entry in sys.path.
- Issue #1265: Fix a problem with sys.settrace, if the tracing
function uses a generator expression when at the same time the
executed code is closing a paused generator.
- sets and frozensets now have an isdisjoint() method.
- optimize the performance of builtin.sum().
- Fix warnings found by the new version of the Coverity checker.
- The enumerate() built-in function is no longer bounded to sequences
smaller than LONG_MAX. Formerly, it raised an OverflowError. Now,
automatically shifts from ints to longs.
- 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
problem required changing the .pyc magic number. This means that
.pyc files generated before 2.5c2 will be regenerated.
- ``with`` and ``as`` are now keywords.
- Bug #1664966: Fix crash in exec if Unicode filename can't be
decoded.
- Issue #1537: Changed GeneratorExit's base class from Exception to
BaseException.
- Issue #1703448: A joined thread could show up in the
threading.enumerate() list after the join() for a brief period until
it actually exited.
Library
------- Patch #2274: Add heapq.heappushpop().
- Add inspect.isabstract(object) to fix bug #2223
- Add a __format__ method to Decimal, to support PEP 3101.
- Add a timing parameter when using trace.Trace to print out
timestamps.
- Issue #1627: httplib now ignores negative Content-Length headers.
- Issue #900744: If an invalid chunked-encoding header is sent by a
server, httplib will now raise IncompleteRead and close the
connection instead of raising ValueError.
- Issue #1492: The content type of BaseHTTPServer error messages can
now be overridden.
- Issue #1781: ConfigParser now does not let you add the "default" section
(ignore-case)
- Removed uses of dict.has_key() from distutils, and uses of
callable() from copy_reg.py, so the interpreter now starts up
without warnings when '-3' is given. More work like this needs to
be done in the rest of the stdlib.
- Issue #1916: added isgenerator() and isgeneratorfunction() to
inspect.py.
- Issue #1224: Fixed bad url parsing when path begins with double
slash.
- ctypes instances that are not or do not contain pointers can now be
pickled.
- Patch #1966: Break infinite loop in httplib when the servers
implements the chunked encoding incorrectly.
- Rename rational.py to fractions.py and the rational.Rational class
to fractions.Fraction, to avoid the name clash with the abstract
base class numbers.Rational. See discussion in issue #1682.
- Issue #1292: On alpha, arm, ppc, and s390 linux systems the
--with-system-ffi configure option defaults to "yes".
- IN module for FreeBSD 8 is added and preexisting FreeBSD 6 and 7
files are updated.
- Issues #1181, #1287: unsetenv() is now called when the
os.environ.pop() and os.environ.clear() methods are used.
- ctypes will now work correctly on 32-bit systems when Python is
configured with --with-system-ffi.
- Patch #1203: ctypes now does work on OS X when Python is built with
--disable-toolbox-glue.
- collections.deque() now supports a "maxlen" argument.
- itertools.count() is no longer bounded to LONG_MAX. Formerly, it
raised an OverflowError. Now, automatically shifts from ints to
longs.
- Added itertools.product() which forms the Cartesian product of the
input iterables.
- Added itertools.combinations() and itertools.permutations().
- Patch #1541463: optimize performance of cgi.FieldStorage operations.
- Decimal is fully updated to the latest Decimal Specification
(v1.66).
- Bug #1153: repr.repr() now doesn't require set and dictionary items
to be orderable to properly represent them.
- A 'c_longdouble' type was added to the ctypes module.
- Bug #1709599: Run test_1565150 only if the file system is NTFS.
- When encountering a password-protected robots.txt file the
RobotFileParser no longer prompts interactively for a username and
password (bug 813986).
- TarFile.__init__() no longer fails if no name argument is passed and
the fileobj argument has no usable name attribute (e.g. StringIO).
- The functools module now provides 'reduce', for forward
compatibility with Python 3000.
- Server-side SSL support and cert verification added, by Bill
Janssen.
- socket.ssl deprecated; use new ssl module instead.
- uuid creation is now threadsafe.
- EUC-KR codec now handles the cheot-ga-keut composed make-up hangul
syllables.
- GB18030 codec now can encode additional two-byte characters that are
missing in GBK.
- Fix bug in marshal where bad data would cause a segfault due to lack
of an infinite recursion check.
- Removed plat-freebsd2 and plat-freebsd3 directories (and IN.py in
the directories).
- HTML-escape the plain traceback in cgitb's HTML output, to prevent
the traceback inadvertently or maliciously closing the comment and
injecting HTML into the error page.
- The popen2 module and os.popen* are deprecated. Use the subprocess
module.
- Added an optional credentials argument to SMTPHandler, for use with
SMTP servers which require authentication.
- Patch #1695948: Added optional timeout parameter to SocketHandler.
- Bug #1652788: Minor fix for currentframe.
- Patch #1598415: Added WatchedFileHandler to better support external
log file rotation using e.g. newsyslog or logrotate. This handler is
only useful in Unix/Linux environments.
- 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.
- As specified in RFC 2616, an HTTP response like 2xx indicates that
the client's request was successfully received, understood, and
accepted. Now in these cases no error is raised in urllib (issue
#1177) and urllib2.
- Bug #1290505: time.strptime's internal cache of locale information
is now properly recreated when the locale is changed.
- Patch #1685563: remove (don't add) duplicate paths in
distutils.MSVCCompiler.
- Added a timeout parameter to the constructor of other protocols
(telnetlib, ftplib, smtplib and poplib). This is second part of the
work started with create_connection() and timeout in httplib, and
closes patch #723312.
- Patch #1676823: Added create_connection() to socket.py, which may be
called with a timeout, and use it from httplib (whose HTTPConnection
and HTTPSConnection now accept an optional timeout).
- Bug #978833: Revert r50844, as it broke _socketobject.dup.
- Bug #1675967: re patterns pickled with Python 2.4 and earlier can
now be unpickled with Python 2.5 and newer.
- Patch #1630118: add a SpooledTemporaryFile class to tempfile.py.
- Patch #1273829: os.walk() now has a "followlinks" parameter. If set
to True (which is not the default), it visits symlinks pointing to
directories.
- 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 #1339796: add a relpath() function to os.path.
- Patch #1681153: the wave module now closes a file object it opened if
initialization failed.
- Bug #767111: fix long-standing bug in urllib which caused an
AttributeError instead of an IOError when the server's response
didn't contain a valid HTTP status line.
- Patch #957650: "%var%" environment variable references are now
properly expanded in ntpath.expandvars(), also "~user" home
directory references are recognized and handled on Windows.
- Patch #1429539: pdb now correctly initializes the __main__ module
for the debugged script, which means that imports from __main__ work
correctly now.
- The nonobvious commands.getstatus() function is now deprecated.
- Patch #1393667: pdb now has a "run" command which restarts the
debugged Python program, optionally with different arguments.
- Patch #1649190: Adding support for _Bool to ctypes as c_bool.
- Patch #1530482: add pydoc.render_doc() which returns the
documentation for a thing instead of paging it to stdout, which
pydoc.doc() does.
- Patch #1533909: the timeit module now accepts callables in addition
to strings for the code to time and the setup code. Also added two
convenience functions for instantiating a Timer and calling its
methods.
- Patch #1537850: tempfile.NamedTemporaryFile now has a "delete"
parameter which can be set to False to prevent the default
delete-on-close behavior.
- Patch #1581073: add a flag to textwrap that prevents the dropping of
whitespace while wrapping.
- Patch #1603688: ConfigParser.SafeConfigParser now checks values that
are set for invalid interpolation sequences that would lead to
errors on reading back those values.
- Added support for the POSIX.1-2001 (pax) format to
tarfile.py. Extended and cleaned up the test suite. Added a new
testtar.tar.
- Patch #1449244: Support Unicode strings in
email.message.Message.{set_charset,get_content_charset}.
- Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS"
to pydoc's help keywords.
- Patch #1555098: use str.join() instead of repeated string
concatenation in robotparser.
- Patch #1635454: the csv.DictWriter class now includes the offending
field names in its exception message if you try to write a record
with a dictionary containing fields not in the CSV field names list.
- Patch #1668100: urllib2 now correctly raises URLError instead of
OSError if accessing a local file via the file:// protocol fails.
- Patch #1677862: Require a space or tab after import in .pth files.
- Patch #1192590: Fix pdb's "ignore" and "condition" commands so they
trap the IndexError caused by passing in an invalid breakpoint
number.
- Patch #1599845: Add an option to disable the implicit calls to
server_bind() and server_activate() in the constructors for
TCPServer, SimpleXMLRPCServer and DocXMLRPCServer.
- Bug #1531963: Make SocketServer.TCPServer's server_address always be
equal to calling getsockname() on the server's socket. Fixed by
patch #1545011.
- Patch #742598: Add .timeout attribute to SocketServer that calls
.handle_timeout() when no requests are received.
- Bug #1651235: When a tuple was passed to a ctypes function call,
Python would crash instead of raising an error.
- Bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
returned string up to the first NUL character.
- Patch #957003: Implement smtplib.LMTP.
- Patch #1481079: add support for HTTP_REFERER to CGIHTTPServer.
- Patch #1675424: Added tests for uncovered code in the zipfile
module. The KeyError raised by Zipfile.getinfo for nonexistent
names now has a descriptive message.
- Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').
- unittest now verifies more of its assumptions. In particular,
TestCase and TestSuite subclasses (not instances) are no longer
accepted in TestSuite.addTest(). This should cause no
incompatibility since it never made sense with ordinary subclasses
-- the failure just occurred later, with a more cumbersome
exception.
- Patch #787789: allow to pass custom TestRunner instances to
unittest's main() function.
- Patches #1550273, #1550272: fix a few bugs in unittest and add a
comprehensive test suite for the module.
- Patch #1001604: glob.glob() now returns unicode filenames if it was
given a unicode argument and os.listdir() returns unicode filenames.
- Patch #1673619: setup.py identifies extension modules it doesn't
know how to build and those it knows how to build but that fail to
build.
- Patch #912410: Replace HTML entity references for attribute values
in HTMLParser.
- Patch #1663234: you can now run doctest on test files and modules
using "python -m doctest [-v] filename ...".
- Patch #1121142: Implement ZipFile.open.
- Taught setup.py how to locate Berkeley DB on Macs using MacPorts.
- Added heapq.merge() for merging sorted input streams.
- Added collections.namedtuple() for assigning field names to tuples.
- Added itertools.izip_longest().
- Have the encoding package's search function dynamically import using
absolute import semantics.
- Patch #1647484: Renamed GzipFile's filename attribute to name.
- Patch #1517891: Mode 'a' for ZipFile now creates the file if it
doesn't exist.
- Patch #698833: Support file decryption in zipfile.
- Patch #685268: Consider a package's __path__ in imputil.
- Patch #1463026: Support default namespace in XMLGenerator.
- Patch #1571379: Make trace's --ignore-dir facility work in the face
of relative directory names.
- Bug #1600860: Search for shared python library in LIBDIR, not
lib/python/config, on "linux" and "gnu" systems.
- Patch #1652681: tarfile.py: create nonexistent files in append mode
and allow appending to empty files.
- Bug #1124861: Automatically create pipes if GetStdHandle fails in
subprocess.
- Patch #1634778: add missing encoding aliases for iso8859_15 and
iso8859_16.
- Patch #1638243: the compiler package is now able to correctly
compile a with statement; previously, executing code containing a
with statement compiled by the compiler package crashed the
interpreter.
- Bug #1643943: Fix time.strptime's support for the %U directive.
- Patch #1507247: tarfile.py: use current umask for intermediate
directories.
- Patch #1627441: close sockets properly in urllib2.
- Bug #494589: make ntpath.expandvars behave according to its
docstring.
- Changed platform module API python_version_tuple() to actually
return a tuple (it used to return a list).
- Added new platform module APIs python_branch(), python_revision(),
python_implementation() and linux_distribution().
- Added support for IronPython and Jython to the platform module.
- The sets module has been deprecated. Use the built-in set/frozenset
types instead.
- Bug #1610795: make ctypes.util.find_library work on BSD systems.
- Fixes for 64-bit Windows: In ctypes.wintypes, correct the
definitions of HANDLE, WPARAM, LPARAM data types. Make
parameterless foreign function calls work.
- The version number of the ctypes package changed to "1.1.0".
- Bug #1627575: logging: Added _open() method to FileHandler which can
be used to reopen files. The FileHandler instance now saves the
encoding (which can be None) in an attribute called "encoding".
- Bug #411881: logging.handlers: bare except clause removed from
SMTPHandler.emit. Now, only ImportError is trapped.
- Bug #411881: logging.handlers: bare except clause removed from
SocketHandler.createSocket. Now, only socket.error is trapped.
- Bug #411881: logging: bare except clause removed from
LogRecord.__init__. Now, only ValueError, TypeError and
AttributeError are trapped.
- Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj
argument.
- Patch #1182394 from Shane Holloway: speed up HMAC.hexdigest.
- Patch #1262036: Prevent TarFiles from being added to themselves
under certain conditions.
- Patch #1230446: tarfile.py: fix ExFileObject so that read() and
tell() work correctly together with readline().
- Patch #1484695: The tarfile module now raises a HeaderError
exception if a buffer given to frombuf() is invalid.
- Bug #1503765: Fix a problem in logging.config with spaces in commaseparated lists read from logging config files.
- Patch #1604907: Fix problems in logging.handlers caused at logging
shutdown when syslog handlers fail to initialize because of syslogd
problems.
- Patch #1608267: fix a race condition in os.makedirs() if the
directory to be created is already there.
- Patch #1610437: fix a tarfile bug with long filename headers.
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.
- Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, and
fix all codecs file wrappers to work correctly with the "with"
statement (bug #1586513).
- Lib/modulefinder.py now handles absolute and relative imports
correctly.
- Patch #1567274: Support SMTP over TLS.
- Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that ctypes
isn't considered as requiring executable stacks.
- ctypes callback functions only support 'fundamental' data types as
result type. Raise an error when something else is used. This is a
partial fix for Bug #1574584.
- Fix turtle so that time.sleep is imported for the entire library.
Allows the demo2 function to be executed on its own instead of only
when the module is run as a script.
- Bug #1565150: Fix subsecond processing for os.utime on Windows.
- Support for MSVC 8 was added to bdist_wininst.
- Bug #1446043: correctly raise a LookupError if an encoding name
given to encodings.search_function() contains a dot.
- 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.
- Bug #1566602: correct failure of posixpath unittest when $HOME ends
with a slash.
- Bug #1565661: in webbrowser, split() the command for the default
GNOME browser in case it is a command with args.
- Made the error message for time.strptime when the data and
format do match be more clear.
- Fix a bug in traceback.format_exception_only() that led to an error
being raised when print_exc() was called without an exception set.
In version 2.4, this printed "None", restored that behavior.
- Make webbrowser.BackgroundBrowser usable in Windows (it wasn't
because the close_fds arg to subprocess.Popen is not supported).
- Reverted patch #1504333 to sgmllib because it introduced an infinite
loop.
- Patch #1553314: Fix the inspect.py slowdown that was hurting IPython
& SAGE by adding smarter caching in inspect.getmodule()
structure.
- Removed the rgbimg module; been deprecated since Python 2.5.
- Bug #1721309: prevent bsddb module from freeing random memory.
- Bug #1233: fix bsddb.dbshelve.DBShelf append method to work as
intended for RECNO databases.
- pybsddb.sf.net Bug #477182: Load the database flags at database open
time so that opening a database previously created with the DB_DUP
or DB_DUPSORT flag set will keep the proper behavior on subsequent
opens. Specifically: dictionary assignment to a DB object will
replace all values for a given key when the database allows
duplicate values. DB users should use DB.put(k, v) when they want
to store duplicates; not DB[k] = v.
- Add the bsddb.db.DBEnv.lock_id_free method.
- Bug #1686475: Support stat'ing open files on Windows again.
- Patch #1185447: binascii.b2a_qp() now correctly quotes binary
characters with ASCII value less than 32. Also, it correctly quotes
dots only if they occur on a single line, as opposed to the previous
behavior of quoting dots if they are the second character of any
line.
- Bug #1622896: fix a rare corner case where the bz2 module raised an
error in spite of a succesful compression.
- Patch #1654417: make operator.{get,set,del}slice use the full range
of Py_ssize_t.
- Patch #1646728: datetime.fromtimestamp fails with negative
fractional times. With unittest.
- Patch #1490190: posixmodule now includes os.chflags() and
os.lchflags() functions on platforms where the underlying system
calls are available.
- Patch #1494140: Add documentation for the new struct.Struct object.
- Patch #1432399: Support the HCI protocol for bluetooth sockets
- Patch #1657276: Make NETLINK_DNRTMSG conditional.
- Bug #1653736: Complain about keyword arguments to time.isoformat.
- Bug #1486663: don't reject keyword arguments for subclasses of
built-in types.
- 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.
- Patch #1544279: Improve thread-safety of the socket module by moving
the sock_addr_t storage out of the socket object.
------- 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.
- Conditionalize definition of _CRT_SECURE_NO_DEPRECATE and
_CRT_NONSTDC_NO_DEPRECATE.
- Bug #1216: Restore support for Visual Studio 2002.
Mac
--- cfmfile now raises a DeprecationWarning.
- buildtools now raises a DeprecationWarning.
- 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.
---**(For information about older versions, consult the HISTORY file.)**