Professional Documents
Culture Documents
News Python
News Python
Python News
+++++++++++
(editors: check NEWS.help for information about editing NEWS using ReST.)
- Issue #1665206: Remove the last eager import in _warnings.c and make it lazy.
- Issue #4034: Fix weird attribute error messages of the traceback object. (As
a result traceback.__members__ no longer exists.)
- Issue #5247: Improve error message when unknown format codes are
used when using str.format() with str, unicode, long, int, and
float arguments.
- Running Python with the -3 option now also warns about classic division
for ints and longs.
- Issue #5013: Fixed a bug in FileHandler which occurred when the delay
parameter was set.
- Issue #4935: The overflow checking code in the expandtabs() method common
to str, bytes and bytearray could be optimized away by the compiler, letting
the interpreter segfault instead of raising an error.
- Issue #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 #4797: IOError.filename was not set when _fileio.FileIO failed to open
file with `str' filename on Windows.
- Issue #3680: Reference cycles created through a dict, set or deque iterator
did not get collected.
- Added test case to ensure attempts to read from a file opened for writing
fail.
- Issue #5705: os.setuid() would not accept values > 2**31-1 but pwd.getpwnam()
returned them on 64bit platforms.
Library
-------
- Issue #5741: don't disallow "%%" (which is an escape for "%") when setting
a value in SafeConfigParser.
- Issue 1726172: fix IndexError in the case of and empty response in ftplib.
- Issue #1665206 (partially): Move imports in cgitb to the top of the module
instead of performing them in functions. Helps prevent import deadlocking in
threads.
- Issue #2522: locale.format now checks its first argument to ensure it has
been passed only one pattern, avoiding mysterious errors where it appeared
that it was failing to do localization.
- Issue #5619: Multiprocessing children disobey the debug flag and causes
popups on windows buildbots. Patch applied to work around this issue.
- Issue #5632: Thread.ident was None for the main thread and threads not
created with the threading module.
- Issue #5536: urllib.urlretrieve makes sure to close the file it's writing to
even if an exception occurs.
- Fix Decimal.__format__ bug that swapped the meanings of the '<' and
'>' alignment characters.
- Issue #1733986: Fixed mmap crash in accessing elements of second map object
with same tagname but larger size than first map. (Windows)
- Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer
overrun.
- Issue #5282: Fixed mmap resize on 32bit windows and unix. When offset > 0,
The file was resized to wrong size.
- Issue #4998: The memory saving effect of __slots__ had been lost on Fractions
which inherited from numbers.py which did not have __slots__ defined. The
numbers hierarchy now has its own __slots__ declarations.
- Issue #5170: Fixed Unicode output bug in logging and added test case.
This is a regression which did not occur in 2.5.
- Issue #1581476: Always use the Tcl global namespace when calling into Tcl.
- Issue #2047: shutil.move() could believe that its destination path was
inside its source path if it began with the same letters (e.g. "src" vs.
"src.new").
- Issue #3881: Help Tcl to load even when started through the
unreadable local symlink to "Program Files" on Vista.
- Issue #5008: When a file is opened in append mode with the new IO library,
do an explicit seek to the end of file (so that e.g. tell() returns the
file size rather than 0). This is consistent with the behaviour of the
traditional 2.x file object.
- Issue #3997: zipfiles generated with more than 65536 files could not be
opened with other applications.
- Issue 4790: The nsmallest() and nlargest() functions in the heapq module
did unnecessary work in the common case where no key function was specified.
- Issue #4201: pdb can now access and display source code loaded via
zipimport (or any other conformant PEP 302 loader). Original patch by
Alexander Belopolsky.
- Issue #4197: doctests in modules loaded via zipimport (or any other PEP
302 conformant loader) will now work correctly in most cases (they
are still subject to the constraints that exist for all code running
from inside a module loaded via a PEP 302 loader and attempting to
perform IO operations based on __file__). Original patch by
Alexander Belopolsky.
- Issues #4082 and #4512: Add runpy support to zipimport in a manner that
allows backporting to maintenance branches. Original patch by
Alexander Belopolsky.
- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat
libs.
- Issue #1702551: distutils sdist was not excluding VCS directories under
Windows. Inital solution by Guy Dalberto.
- Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@')
works as expected in the interactive environment.
- Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by
Gabriel Genellina.
- Issue #4646: distutils was choking on empty options arg in the setup
function. Original patch by Thomas Heller.
- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to
give correct results in the case where one argument is a quiet NaN
and the other is a finite number that requires rounding.
- Issue #1030250: Distutils created directories even when run with the
--dry-run option.
- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat
libs.
- Issue #4730: Fixed the cPickle module to handle correctly astral characters
when protocol 0 is used.
Tools/Demos
-----------
Extension Modules
-----------------
- Issue #4301: Patch the logging module to add processName support, remove
_check_logger_class from multiprocessing.
- Issue #4228: Pack negative values the same way as 2.4 in struct's L format.
- Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris,
OpenBSD.
Build
-----
- Issue #5134: Silence compiler warnings when compiling sqlite with VC++.
C-API
-----
- 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.
Tests
-----
- Issue #4367: Python would segfault during compiling when the unicodedata
module couldn't be imported and \N escapes were present.
- Issue #4348: Some bytearray methods returned that didn't cause any change to
the bytearray, returned the same bytearray instead of a copy.
- Issue #4048: The parser module now correctly validates relative imports.
- Issue #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.
- Fixed C99 style comments in several files. Python is now C89 compatible
again.
Library
-------
- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if
the ctypes module is not present.
- Issue #3774: Fixed an error when create a Tkinter menu item without command
and then remove it.
- Issue #4150: Pdb's "up" command now works for generator frames in post-mortem
debugging.
- Issue #4092: Return ArgInfo as promised in the documentation from
inspect.getargvalues.
- Issue #4014: Don't claim that Python has an Alpha release status, in addition
to claiming it is Mature.
Build
-----
C-API
-----
Extension Modules
-----------------
- Issue #4396: The parser module now correctly validates the with statement.
- Issue #3967: Fixed a crash in the count() and find() methods of string-like
objects, when the "start" parameter is a huge value.
Library
-------
- Issue #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 #3863: Disabled a unit test of fork being called from a thread
when running on platforms known to exhibit OS bugs when attempting that.
Build
-----
- Bug #3989: Package the 2to3 script (as 2to3.py) in the Windows
installer.
- Bug #3887: Package x64 version of CRT for AMD64 Windows binaries.
Extension Modules
-----------------
- Security Issue #2: imageop did not validate arguments correctly and could
segfault as a result.
Tools/Demos
-----------
Build
-----
- Issue #3642: Suppress warning in obmalloc when size_t is larger than uint.
- Issue #3777: long() applied to a float object now always return a long
object; previously an int would be returned for small values. the __long__
method is allowed to return either an int or a long, but the behaviour of
float objects should not change to respect backward compatibility.
- Issue #3668: Fix a memory leak with the "s*" argument parser in
PyArg_ParseTuple and friends, which occurred when the argument for "s*"
was correctly parsed but parsing of subsequent arguments failed.
- Fix memory leaks found with valgrind and update suppressions file.
- Fix compiler warnings in opt mode which would lead to invalid memory reads.
- Issue #3678: Correctly pass LDFLAGS and LDLAST to the linker on shared
library targets in the Makefile.
- Issue #1204: The configure script now tests for additional libraries
that may be required when linking against readline. This fixes issues
with x86_64 builds on some platforms (a few Linux flavors and OpenBSD).
C-API
-----
Library
-------
- Issue #3640: Pickling a list or a dict uses less local variables, to reduce
stack usage in the case of deeply nested objects.
- Issue #3535: zipfile couldn't read some zip files larger than 2GB.
- Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
to the urlparse one. Added a PendingDeprecationWarning in the old
module, it will be deprecated in the future.
- The deprecation warnings for the old camelCase threading API were removed.
- Issue #3703: _fileio.FileIO gave unhelpful error message when trying to open a
directory.
- Issue #3708: os.urandom no longer goes into an infinite loop when passed a
non-integer floating point number.
Extension Modules
-----------------
- Issue #2975: When compiling several extension modules with Visual Studio 2008
from the same python interpreter, some environment variables would grow
without limit.
- Issue #3103: Reduced globals symbols used by sqlite3 module and made sure all
remaining ones have "pysqlite_" prefix.
- Issue #3846: Release the GIL during sqlite3_prepare calls. This improves
concurrent access to the same SQLite database from multiple
threads/processes.
Tests
-----
- Issue #3768: Move test_py3kwarn over to the new API for catch_warnings().
Build
-----
- ctypes function pointers that are COM methods have a boolean True
value again.
- Issue #3537: Fix an assertion failure when an empty but presized dict
object was stored in the freelist.
- Issue #2542: Now that issubclass() may call arbitrary code, ensure that
PyErr_ExceptionMatches returns 0 when an exception occurs there.
- Issue #1819: function calls with several named parameters are now on
average 35% faster (as measured by pybench).
Library
-------
- Issue #2234: distutils failed for some versions of the cygwin compiler. The
version reported by these tools does not necessarily follow the python
version numbering scheme, so the module is less strict when parsing it.
- Issue #2235: Added Py3k warnings for types which will become unhashable
under the stricter __hash__ inheritance rules in 3.0. Several types
which did not meet the rules for hash invariants and were already
unhashable in 3.0 have now been explicitly flagged as unhashable in
2.6 as well (collections.Mapping, collections.Set, unittest.TestSuite,
xml.dom.minidom.NamedNodeMap, numbers.Number, UserList.UserList)
- Update __all__ for cookielib, csv, os, urllib2, and weakref to include things
imported into the module but exposed as part of the module's API.
- Issue #2776: fixed small issue when handling an URL with double slash
after a 302 response in the case of not going through a proxy.
- Issue #3476: binary buffered reading through the new "io" library is now
thread-safe.
- Issue #3205: When iterating over a BZ2File fails allocating memory, raise
a MemoryError rather than silently stop the iteration.
- Issue #3487: sre "bytecode" validator. Passing invalid "re-bytecode"
to _sre.compile() will now be rejected. This should not affect anybody
since the re.compile() function never generates invalid re-bytecode.
- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
asking for a specific length. This problem only affected files opened
using the new "io" module, not the built-in open() function.
- Issue #3120: On 64-bit Windows the subprocess module was truncating handles.
- Issue #3302: Fix several crashes when calling locale's gettext functions
with None arguments.
Build
-----
Documentation
-------------
- Issue #3083: Add alternate (#) formatting for bin, oct, hex output
for str.format(). This adds the prefix 0b, 0o, or 0x, respectively.
- Issue #3008: the float type has a new instance method 'float.hex'
and a new class method 'float.fromhex' to convert floating-point
numbers to and from hexadecimal strings, respectively.
- Issue #2862: Make int and float freelist management consistent with
other freelists. Changes their CompactFreeList apis into
ClearFreeList apis and calls them via gc.collect().
Library
-------
- Issue #3313: Fixed a crash when a failed dlopen() call does not set
a valid dlerror() message.
- Issue #839496: SimpleHTTPServer used to open text files in text mode. This is
both unnecessary (HTTP allows text content to be sent in several forms) and
wrong because the actual transmitted size could differ from the
content-length. The problem had been corrected in the 2.4 branch, but never
merged into trunk.
- Issue #1526: Allow more than 64k files to be added to Zip64 file.
- Issue #449227: The rlcompleter module now adds "(" to callable objects
when completed.
- Issue #3190: Pydoc now hides the automatic module attribute __package__ (the
handling is now the same as that of other special attributes like __name__).
- Issue #2885 (partial): The urllib.urlopen() function has been deprecated for
removal in Python 3.0 in favor of urllib2.urlopen().
- Issue #874900: after an os.fork() call the threading module state is cleaned
up in the child process to prevent deadlock and report proper thread counts
if the new process uses the threading module.
Tests
-----
Build
-----
Documentation
-------------
- Add future_builtins.ascii().
Extension Modules
-----------------
- Issue #1179: [CVE-2007-4965] Integer overflow in imageop module.
- Issue #3116: marshal.dumps() had quadratic behavior for strings > 32Mb.
- Support for Windows 9x has been removed from the winsound module.
Library
-------
- Issue #2722: Now the os.getcwd() supports very long path names.
- Issue #2888: Fixed the behaviour of pprint when working with nested
structures, to match the behaviour of 2.5 and 3.0 (now follows the common
sense).
- Issue #1817: cgi now correctly handles the querystring on POST requests
- Issue #3126: StreamHandler and FileHandler check before calling "flush" and
"close" that the stream object has these, using hasattr (thanks to bobf for
the patch).
- Issue #1798: Add ctypes calling convention that allows safe access
to errno.
- Issue #2404: ctypes objects support the new pep3118 buffer interface.
- The sgmllib and htmllib modules have been deprecated for removal
in Python 3.0.
- Issue #3011: locale module alias table was updated to the latest
version from the X.org locale.alias file.
- The statvfs module has been deprecated for removal in Python 3.0.
- The WAIT module from IRIX has been deprecated for removal in Python
3.0.
- The torgb module from IRIX has been deprecated for removal in Python
3.0.
- The SV module from IRIX has been deprecated for removal in Python
3.0.
- The readcd module from IRIX has been deprecated for removal in
Python 3.0.
- The panelparser module from IRIX has been deprecated for removal in
Python 3.0.
- The panel module from IRIX has been deprecated for removal in Python
3.0.
- The jpeg module from IRIX has been deprecated for removal in Python
3.0.
- The IOCTL module from IRIX has been deprecated for removal in Python
3.0.
- The IN module from IRIX has been deprecated for removal in Python
3.0.
- The imgfile module from IRIX has been deprecated for removal in
Python 3.0.
- The GLWS module from IRIX has been deprecated for removal in Python
3.0.
- The GET module from IRIX has been deprecated for removal in Python
3.0.
- The fm module from IRIX has been deprecated for removal in Python
3.0.
- The FL, flp, and fl modules from IRIX have been deprecated for
removal in Python 3.0.
- The FILE module on IRIX has been deprecated for removal in Python
3.0.
- The ERRNO module on IRIX has been deprecated for removal in Python
3.0.
- The DEVICE, GL, gl, and cgen modules (which indirectly includes
cgensupport) have been deprecated for removal in Python 3.0.
- The CL, CL_old, and cl modules for IRIX have been deprecated for
removal in Python 3.0.
- The cdplayer module for IRIX has been deprecated for removal in
Python 3.0.
- The cddb module for IRIX has been deprecated for removal in Python
3.0.
- The cd and CD modules for IRIX have been deprecated for removal in
Python 3.0.
- The al and AL modules for IRIX have been deprecated for removal in
Python 3.0.
- The timing module has been deprecated for removal in Python 3.0.
- The imageop module has been deprecated for removal in Python 3.0.
- The mhlib module has been deprecated for removal in Python 3.0.
- The ihooks module has been deprecated for removal in Python 3.0.
- The fpformat module has been deprecated for removal in Python 3.0.
- The Canvas module has been deprecated for removal in Python 3.0.
- The compiler package has been deprecated for removal in Python 3.0.
- The Bastion and rexec modules have been deprecated for removal in
Python 3.0.
- The bsddb185 module has been deprecated for removal in Python 3.0.
- The pure module has been deprecated for removal in Python 3.0.
- The toaiff module has been deprecated for removal in Python 3.0.
- The new module has been deprecated for removal in Python 3.0.
- The user module has been deprecated for removal in Python 3.0.
- The stringold module has been deprecated for removal in Python 3.0.
- The mutex module has been deprecated for removal in Python 3.0.
- The imputil module has been deprecated for removal in Python 3.0.
- The Mac Modules (including Carbon) have been deprecated for removal
in Python 3.0.
- The bundled OSX-specific copy of libbffi is now in sync with the version
shipped with PyObjC 2.0 and includes support for x86_64 and ppc64 platforms.
- The threading module gained aliases for names that will be removed in the
3.x series.
Build
-----
- The Windows installer now includes Tk 8.5, bzip2 1.0.5, and SQLite 3.5.9.
NOTE: 64-bit and 4-way builds are only suppported on Mac OS X 10.5 (or later).
C API
-----
- Issue #2681: The octal literal ``0o8`` was incorrecly acctepted. Now
it properly raises a SyntaxError.
Extension Modules
-----------------
- Added phase(z) -> phi, polar(z) -> r, phi and rect(r, phi) -> z to
the cmath module.
- Four new methods were added to the math and cmath modules: acosh,
asinh, atanh and log1p.
Library
-------
- The audiodev module has been deprecated for removal in Python 3.0.
- Issue #2750: Add the 'json' package. Based on simplejson 1.9 and
contributed by Bob Ippolito.
- The getpass module has been improved on Unix. It now uses /dev/tty
by default and uses stderr instead of stdout. A GetPassWarning is
issued when input echo cannot be controlled.
- Issue #815646: Individual file objects may now be used from multiple
threads at once without fear of crashing the Python interpreter. If
file.close() is called while an object is in use by another thread
an IOError exception will be raised and the file will not be closed.
- The bundled libffi copy is now in sync with the recently released
libffi3.0.5 version, apart from some small changes to
Modules/_ctypes/libffi/configure.ac.
Tests
-----
Build
-----
- Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when
gcc is used as compiler.
- 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 #2321: use pymalloc for unicode object string data to reduce
memory usage in some circumstances.
- PEP 3127: octal literals now start with "0o". Old-style octal
literals are still valid. There are binary literals with a prefix of
"0b". This also affects int(x, 0).
- Issue #1779871: GNU gcc can now build Python on OS X because the
flags -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd are no
longer passed.
Extension Modules
-----------------
Library
-------
- Issue #1747858: Fix chown to work with large uid's and gid's on
64-bit platforms.
- Issues #2166, #1741 and #1531505: now distutils deals with HOME
correctly under win32
- Bug #1725737: In distutils' sdist, exclude RCS, CVS etc. also in the
root directory, and also exclude .hg, .git, .bzr, and _darcs.
- Issue #1872: The struct module typecode for _Bool has been changed
from 't' to '?'.
- The bundled libffi copy is now in sync with the recently released
libffi3.0.4 version, apart from some small changes to
Modules/_ctypes/libffi/configure.ac. On OS X, preconfigured libffi
files are used. On all linux systems the --with-system-ffi
configure option defaults to "yes".
Tests
-----
Build
-----
- A new script 2to3 is now installed, to run the 2.x to 3.x converter.
- Python/memmove.c and Python/strerror.c have been removed; both
functions are in the C89 standard library.
C API
-----
- Issue #2051: pyc and pyo files are no longer created with permission
644. The mode is now inherited from the py file.
- Issue #1881: An internal parser limit has been increased. Also see
issue 215555 for a discussion.
- Issue #1678380: Fix a bug that identifies 0j and -0j when they
appear in the same code unit.
- Issue #1882: when compiling code from a string, encoding cookies in the
second line of code were not always recognized correctly.
- Issue #1865: ``bytes`` as an alias for ``str`` and b"" as an alias "" were
added.
- Issue #1460: The utf-7 incremental decoder did not accept truncated
input. It now correctly saves its state between chunks of data.
- Issue #1686386: Tuple's tp_repr did not take into account the
possibility of having a self-referential tuple, which is possible
from C code. Nor did object's tp_str consider that a type's tp_str
could do something that could lead to an inifinite recursion.
Py_ReprEnter() and Py_EnterRecursiveCall(), respectively, fixed the
issues.
- Add new attribute names for function objects. All the func_* become
__*__ attributes. (Some already existed, e.g., __doc__ and
__name__.)
- Patch #1686487: you can now pass any mapping after '**' in function
calls.
- When __slots__ are set to a unicode string, make it work the same as
setting a plain string, ie don't expand to single letter identifiers.
- The dir() function has been extended to call the __dir__() method on
its argument, if it exists. If not, it will work like before. This
allows customizing the output of dir() in the presence of a
__getattr__().
- Bug #1579370: Make PyTraceBack_Here use the current thread, not the
frame's thread state.
- Bug #1576657: when setting a KeyError for a tuple key, make sure
that the tuple isn't used as the "exception arguments tuple".
- Update the peephole optimizer to remove more dead code (jumps after
returns) and inline unconditional jumps to returns.
- Bug #1545497: when given an explicit base, int() did ignore NULs
embedded in the string to convert.
- Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
- Patch #1546288: fix seg fault in dict_equal due to ref counting bug.
Library
-------
- Patch #2274: Add heapq.heappushpop().
- Issue #1781: ConfigParser now does not let you add the "default" section
(ignore-case)
- 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.
- Issue #2004: tarfile.py: Use mode 0700 for temporary directories and
default permissions for missing directories.
- Issue #1003: Fix zipfile decryption check, it would fail zip files
with extended local headers.
- Issue #1146: fix how textwrap breaks a long word that would start in
the last column of a line.
- Issue #1693149: trace.py --ignore-module - accept multiple
comma-separated modules to be given.
- Issue #1837: The queue module now also supports a LIFO queue and a
priority queue.
- Issue #1786: pdb should use its own stdin/stdout around an exec call
and when creating a recursive instance.
- Issue #1455: The distutils package now supports VS 2005 and VS 2008
for both the msvccompiler and cygwincompiler.
- Issue #1429818: patch for trace and doctest modules so they play
nicely together.
- Issue #1292: On alpha, arm, ppc, and s390 linux systems the
--with-system-ffi configure option defaults to "yes".
- Patch #1203: ctypes now does work on OS X when Python is built with
--disable-toolbox-glue.
- collections.deque() now supports a "maxlen" argument.
- Bug #1153: repr.repr() now doesn't require set and dictionary items
to be orderable to properly represent them.
- GB18030 codec now can encode additional two-byte characters that are
missing in GBK.
- Issue #1385: The hmac module now computes the correct hmac when
using hashes with a block size other than 64 bytes (such as sha384
and sha512).
- Fix bug in marshal where bad data would cause a segfault due to lack
of an infinite recursion check.
- The popen2 module and os.popen* are deprecated. Use the subprocess
module.
- Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
(as opposed to the command line) will now write file names ending in
".cpp" too.
- Bug #1675967: re patterns pickled with Python 2.4 and earlier can
now be unpickled with Python 2.5 and newer.
- Bug #1681228: the webbrowser module now correctly uses the default
GNOME or KDE browser, depending on whether there is a session of one
of those present. Also, it tries the Windows default browser before
trying Mozilla variants.
- Patch #1681153: the wave module now closes a file object it opened if
initialization failed.
- Patch #1393667: pdb now has a "run" command which restarts the
debugged Python program, optionally with different arguments.
- Patch #1663234: you can now run doctest on test files and modules
using "python -m doctest [-v] filename ...".
- Added itertools.izip_longest().
- Patch #1517891: Mode 'a' for ZipFile now creates the file if it
doesn't exist.
- The sets module has been deprecated. Use the built-in set/frozenset
types instead.
- Patch #1583880: fix tarfile's problems with long names and posix/
GNU modes.
- Bug #1586448: the compiler module now emits the same bytecode for
list comprehensions as the builtin 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).
- Bug #813342: Start the IDLE subprocess with -Qnew if the parent is
started with that option.
- Bug #1560617: in pyclbr, return full module name not only for
classes, but also for functions.
- Made the error message for time.strptime when the data data and
format do match be more clear.
- Patch #1553314: Fix the inspect.py slowdown that was hurting IPython
& SAGE by adding smarter caching in inspect.getmodule()
- idle: Honor the "Cancel" action in the save dialog (Debian bug
#299092).
- Issue #1339: The smtplib.SMTP class has been refactored a bit such
that the SMTP.starttls() caller no longer needs to call ehlo()
beforehand. SMTP.starttls() now raises an exception of the server
does not claim to support starttls. Adds the
SMTP.ehlo_or_helo_if_needed() method. Patch contributed by Bill
Fenner.
Extension Modules
-----------------
- Bug #2111: mmap segfaults when trying to write a block opened with
PROT_READ.
- Issue #1646: Make socket support TIPC. The socket module now has
support for TIPC under Linux, see http://tipc.sf.net/ for more
information.
- Marshal.dumps() now expects exact type matches for int, long, float,
complex, tuple, list, dict, set, and frozenset. Formerly, it would
silently miscode subclasses of those types. Now, it raises a
ValueError instead.
- Bug #1622896: fix a rare corner case where the bz2 module raised an
error in spite of a succesful compression.
- Patch #1610575: The struct module now supports the 't' code, for C99
_Bool.
- Patch #1635058: ensure that htonl and friends never accept or return
negative numbers, per the underlying C implementation.
- Patch #1544279: Improve thread-safety of the socket module by moving
the sock_addr_t storage out of the socket object.
- Bug #1588217: don't parse "= " as a soft line break in binascii's
a2b_qp() function, instead leave it in the string as quopri.decode()
does.
- Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters.
- Bug #1551427: fix a wrong NULL pointer check in the win32 version of
os.urandom().
- Patch #1114: fix curses module compilation on 64-bit AIX, & possibly
other 64-bit LP64 platforms where attr_t is not the same size as a
long. (Contributed by Luke Mewburn.)
- fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
were transposed.
- Added support for linking the bsddb module against BerkeleyDB 4.5.x,
4.6.x and 4.7.x.
Tests
-----
- Made some minor changes to pybench output to allow the user to see
which Python version is running pybench.
Documentation
-------------
- Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next
docs.
Tools/Demos
-----------
Build
-----
- Have the search path for building extensions follow the declared
order in $CPPFLAGS and $LDFLAGS when adding directories from those
environment variables.
- Bug #1608: use -fwrapv when GCC supports it. This is important,
newer GCC versions may optimize away overflow buffer overflow checks
without this option!
- Patch #1418: Make the AC_REPLACE_FUNCS object files actually work.
- Stop supporting AtheOS and cause a build error in configure for the
platform.
C API
-----
- Unified naming convention for free lists and their limits. All free
lists in Object/ are named ``free_list``, the counter ``numfree``
and the upper limit is a macro ``PyName_MAXFREELIST`` inside an
#ifndef block.
- Patch #1706: Drop support for Win9x, WinME and NT4. Python now
requires Windows 2000 or greater. The _WINVER and NTDDI_VERSION
macros are set to Win2k for x86/32bit builds and WinXP for AMD64
builds.
Mac
---
- Removed the macfs module. It had been deprecated since Python 2.5.
This lead to the deprecation of macostools.touched() as it relied
solely on macfs and was a no-op under OS X.
----