Professional Documents
Culture Documents
News
News
Python News
+++++++++++
What's New in Python 2.7.11?
============================
*Release date: XXXX-XX-XX*
Core and Builtins
----------------- Issue #22939: Fixed integer overflow in iterator object. Original patch by
Clement Rouault.
- Issue #24102: Fixed exception type checking in standard error handlers.
Library
------- Issue #24257: Fixed segmentation fault in sqlite3.Row constructor with faked
cursor type.
- Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
when a directory with the chosen name already exists on Windows as well as
on Unix. tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.
- Issue #6598: Increased time precision and random number range in
email.utils.make_msgid() to strengthen the uniqueness of the message ID.
- Issue #24091: Fixed various crashes in corner cases in cElementTree.
- Issue #15267: HTTPConnection.request() now is compatibile with old-style
classes (such as TemporaryFile). Original patch by Atsuo Ishimoto.
- Issue #20014: array.array() now accepts unicode typecodes. Based on patch by
Vajrasky Kok.
- Issue #23637: Showing a warning no longer fails with UnicodeErrror.
Formatting unicode warning in the file with the path containing non-ascii
characters no longer fails with UnicodeErrror.
- Issue #24134: Reverted issue #24134 changes.
IDLE
---- Issue #15809: IDLE shell now uses locale encoding instead of Latin1 for
decoding unicode literals.
Documentation
------------- Issue #22155: Add File Handlers subsection with createfilehandler to Tkinter
doc. Remove obsolete example from FAQ. Patch by Martin Panter.
What's New in Python 2.7.10?
============================
Wieland Hoffmann.
- Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
values (like 0.9.8zc).
Tests
----- Issue #23799: Added test.test_support.start_threads() for running and
cleaning up multiple threads.
- Issue #22390: test.regrtest now emits a warning if temporary files or
directories are left after running a test.
- Issue #23583: Added tests for standard IO streams in IDLE.
- Issue #23392: Added tests for marshal C API that works with FILE*.
- Issue #18982: Add tests for CLI of the calendar module.
- Issue #19949: The test_xpickle test now tests compatibility with installed
Python 2.7 and reports skipped tests. Based on patch by Zachary Ware.
- Issue #11578: Backported test for the timeit module.
- Issue #22943: bsddb tests are locale independend now.
IDLE
---- Issue #23583: Fixed writing unicode to standard output stream in IDLE.
- Issue #20577: Configuration of the max line length for the FormatParagraph
extension has been moved from the General tab of the Idle preferences dialog
to the FormatParagraph tab of the Config Extensions dialog.
Patch by Tal Einat.
- Issue #16893: Update Idle doc chapter to match current Idle and add new
information.
- Issue #23180: Rename IDLE "Windows" menu item to "Window".
Patch by Al Sweigart.
Build
----- Issue #15506: Use standard PKG_PROG_PKG_CONFIG autoconf macro in the configure
script.
- Issue #23032: Fix installer build failures on OS X 10.4 Tiger
by disabling assembly code in the OpenSSL build.
- Issue #23686: Update OS X 10.5 installer and Windows builds to use
OpenSSL 1.0.2a.
C API
----- Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
- Issue #22079: PyType_Ready() now checks that statically allocated type has
no dynamically allocated bases.
What's New in Python 2.7.9?
===========================
*Release date: 2014-12-10*
Library
------- Issue #22959: Remove the *check_hostname* parameter of
httplib.HTTPSConnection. The *context* parameter should be used instead.
- Issue #16043: Add a default limit for the amount of data xmlrpclib.gzip_decode
will return. This resolves CVE-2013-1753.
- Issue #16042: CVE-2013-1752: smtplib: Limit amount of data read by limiting
the call to readline(). Original patch by Christian Heimes.
- Issue #16041: In poplib, limit maximum line length read from the server to
prevent CVE-2013-1752.
- Issue #22960: Add a context argument to xmlrpclib.ServerProxy.
Build
----- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
SSL 3.
- Issue #17128: Use private version of OpenSSL for 2.7.9 OS X 10.5+ installer.
What's New in Python 2.7.9 release candidate 1?
===============================================
*Release date: 2014-11-25*
Core and Builtins
----------------- Issue #21963: backout issue #1856 patch (avoid crashes and lockups when
daemon threads run while the interpreter is shutting down; instead, these
threads are now killed when they try to take the GIL), as it seems to
break some existing code.
- Issue #22604: Fix assertion error in debug mode when dividing a complex
number by (nan+0j).
- Issue #22470: Fixed integer overflow issues in "backslashreplace" and
"xmlcharrefreplace" error handlers.
- Issue #22526: Fix iterating through files with lines longer than 2^31 bytes.
- Issue #22519: Fix overflow checking in PyString_Repr.
- Issue #22518: Fix integer overflow issues in latin-1 encoding.
- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
AIX. Based on patch by Delhallt.
- Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the
__new__() method.
- Issue #16037: HTTPMessage.readheaders() raises an HTTPException when more
than 100 headers are read. Patch by Jyrki Pulliainen and Daniel Eriksson.
- Issue #21580: Now Tkinter correctly handles binary "data" and "maskdata"
configure options of tkinter.PhotoImage.
- Issue #19612: subprocess.communicate() now also ignores EINVAL when using at
least two pipes.
- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
on closed socket.
- Issue #16133: The asynchat.async_chat.handle_read() method now ignores
socket.error() exceptions with blocking I/O errors: EAGAIN, EALREADY,
EINPROGRESS, or EWOULDBLOCK.
- Issue #21990: Clean-up unnecessary and slow inner class definition in
saxutils (Contributed by Alex Gaynor).
- Issue #1730136: Fix the comparison between a tkFont.Font and an object of
another kind.
- Issue #19884: readline: Disable the meta modifier key if stdout is not
a terminal to not write the ANSI sequence "\033[1034h" into stdout. This
sequence is used on some terminal (ex: TERM=xterm-256color") to enable
support of 8 bit characters.
- Issue #22017: Correct reference counting errror in the initialization of the
_warnings module.
- Issue #21868: Prevent turtle crash when undo buffer set to a value less
than one.
- Issue #21151: Fixed a segfault in the _winreg module when ``None`` is passed
as a ``REG_BINARY`` value to SetValueEx. Patch by John Ehresman.
- Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
it ignored I/O errors if at least the first C call read() succeed.
- Issue #19870: BaseCookie now parses 'secure' and 'httponly' flags.
Backport of issue #16611.
- Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
due to possible uninitialized _config_vars.
- Issue #21323: Fix CGIHTTPServer to again handle scripts in CGI subdirectories,
broken by the fix for security issue #19435. Patch by Zach Byrne.
- Issue #22199: Make get_makefile_filename() available in Lib/sysconfig.py
for 2.7 to match other versions of sysconfig.
IDLE
---- Issue #3068: Add Idle extension configuration dialog to Options menu.
Changes are written to HOME/.idlerc/config-extensions.cfg.
Original patch by Tal Einat.
- Issue #16233: A module browser (File : Class Browser, Alt+C) requires a
editor window with a filename. When Class Browser is requested otherwise,
from a shell, output window, or 'Untitled' editor, Idle no longer displays
an error box. It now pops up an Open Module box (Alt+M). If a valid name
is entered and a module is opened, a corresponding browser is also opened.
- Issue #4832: Save As to type Python files automatically adds .py to the
name you enter (even if your system does not display it). Some systems
automatically add .txt when type is Text files.
- Issue #21986: Code objects are not normally pickled by the pickle module.
To match this, they are no longer pickled when running under Idle.
- Issue #22221: IDLE now ignores the source encoding declaration on the second
line if the first line contains anything except a comment.
- Issue #17390: Adjust Editor window title; remove 'Python',
move version to end.
- Issue #14105: Idle debugger breakpoints no longer disappear
when inseting or deleting lines.
Extension Modules
----------------- Issue #22381: Update zlib to 1.2.8.
- Issue #22176: Update the ctypes module's libffi to v3.1. This release
adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
architectures.
Tools/Demos
----------- Issue #10712: 2to3 has a new "asserts" fixer that replaces deprecated names
of unittest methods (e.g. failUnlessEqual -> assertEqual).
- Issue #22221: 2to3 and the findnocoding.py script now ignore the source
encoding declaration on the second line if the first line contains anything
except a comment.
- Issue #22201: Command-line interface of the zipfile module now correctly
extracts ZIP files with directory entries. Patch by Ryan Wilson.
Tests
----- Issue #22236: Tkinter tests now don't reuse default root window. New root
window is created for every test class.
- Issue #18004: test_overflow in test_list by mistake consumed 40 GiB of memory
on 64-bit systems.
- Issue #21976: Fix test_ssl to accept LibreSSL version strings. Thanks
to William Orr.
- Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
Build
----- Issue #20221: Removed conflicting (or circular) hypot definition when
compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
- Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
Jonathan Hosmer.
- The documentation Makefile no longer automatically downloads Sphinx. Users are
now required to have Sphinx already installed to build the documentation.
- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
above. Patch by Zachary Turner.
- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
now display special message when and only when there are failures.
- Issue #21166: Prevent possible segfaults and other random failures of
python --generate-posix-vars in pybuilddir.txt build target.
- Issue #18096: Fix library order returned by python-config.
- Issue #17219: Add library build dir for Python extension cross-builds.
- Issue #22877: PEP 477 - OS X installer now installs pip.
- Issue #22878: PEP 477 - "make install" and "make altinstall" can now install
or upgrade pip, using the bundled pip provided by the backported ensurepip
module. A configure option, --with-ensurepip[=upgrade|install|no], is
available to set the option for subsequent installs; the default for Python 2
in "no" (do not install or upgrade pip). The option can also be set with
"make [alt]install ENSUREPIP=[upgrade|install|no]".
Windows
------- Issue #17896: The Windows build scripts now expect external library sources
to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``.
- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
svn.python.org to build OpenSSL.
- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
- Issue #21552: Fixed possible integer overflow of too long string lengths in
the tkinter module on 64-bit platforms.
- Issue #14315: The zipfile module now ignores extra fields in the central
directory that are too short to be parsed instead of letting a struct.unpack
error bubble up as this "bad data" appears in many real world zip files in
the wild and is ignored by other zip tools.
- Issue #21402: Tkinter.ttk now works when default root window is not set.
- Issue #10203: sqlite3.Row now truly supports sequence protocol. In particulr
it supports reverse() and negative indices. Original patch by Claudiu Popa.
- Issue #8743: Fix interoperability between set objects and the
collections.Set() abstract base class.
- Issue #21481: Argparse equality and inequality tests now return
NotImplemented when comparing to an unknown type.
IDLE
---- Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
Heblikar.
- Issue #18592: Add unittest for SearchDialogBase. Patch by Phil Webster.
- Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar.
- Issue #21686: add unittest for HyperParser. Original patch by Saimadhav
Heblikar.
- Issue #12387: Add missing upper(lower)case versions of default Windows key
bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy.
- Issue #21695: Closing a Find-in-files output window while the search is
still in progress no longer closes Idle.
- Issue #18910: Add unittest for textView. Patch by Phil Webster.
- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar.
- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster.
Tests
----- Issue #20155: Changed HTTP method names in failing tests in test_httpservers
so that packet filtering software (specifically Windows Base Filtering Engine)
does not interfere with the transaction semantics expected by the tests.
- Issue #19493: Refactored the ctypes test package to skip tests explicitly
rather than silently.
- Issue #18492: All resources are now allowed when tests are not run by
regrtest.py.
- Issue #21605: Added tests for Tkinter images.
- Issue #21493: Added test for ntpath.expanduser(). Original patch by
Claudiu Popa.
- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
- Issue #13355: random.triangular() no longer fails with a ZeroDivisionError
when low equals high.
- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(),
PanedWindow.paneconfigure(), and Menu.entryconfigure().
- Issue #20635: Added tests for Tk geometry managers.
Build
----- Issue #21811: Anticipated fixes to support OS X versions > 10.9.
Windows
------- Issue #21671, CVE-2014-0224: The bundled version of OpenSSL has been
updated to 1.0.1h.
What's New in Python 2.7.7
==========================
*Release date: 2014-05-31*
Build
----- Issue #21462: Build the Windows installers with OpenSSL 1.0.1g.
- Issue #19866: Include some test data in the Windows installers, so tests don't
fail.
What's New in Python 2.7.7 release candidate 1?
===============================================
*Release date: 2014-05-17*
Core and Builtins
----------------- Issue #21350: Fix file.writelines() to accept arbitrary buffer objects,
as advertised. Patch by Brian Kearns.
- Issue #20437: Fixed 43 potential bugs when deleting objects references.
- Issue #21134: Fix segfault when str is called on an uninitialized
UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
- Issue #20494: Ensure that free()d memory arenas are really released on POSIX
systems supporting anonymous memory mappings. Patch by Charles-Franois
Natali.
- Issue #17825: Cursor "^" is correctly positioned for SyntaxError and
IndentationError.
- Raise a better error when non-unicode codecs are used for a file's coding
cookie.
- Issue #17976: Fixed potential problem with file.write() not detecting IO error
by inspecting the return value of fwrite(). Based on patches by Jaakko Moisio
and Victor Stinner.
- Issue #14432: Generator now clears the borrowed reference to the thread
state. Fix a crash when a generator is created in a C thread that is
destroyed while the generator is still used. The issue was that a generator
contains a frame, and the frame kept a reference to the Python state of the
destroyed C thread. The crash occurs when a trace function is setup.
- Issue #19932: Fix typo in import.h, missing whitespaces in function prototypes
.
- Issue #19638: Fix possible crash / undefined behaviour from huge (more than 2
billion characters) input strings in _Py_dg_strtod.
- Issue #12546: Allow \x00 to be used as a fill character when using str, int,
float, and complex __format__ methods.
Library
------- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
shape.
- Issue #7776: Backport Fix ``Host:'' header and reconnection when using
http.client.HTTPConnection.set_tunnel() from Python 3. Patch by Nikolaus
Rath.
- Issue #21306: Backport hmac.compare_digest from Python 3. This is part of PEP
466.
- Issue #21470: Do a better job seeding the random number generator by
using enough bytes to span the full state space of the Mersenne Twister.
- Issue #21469: Reduced the risk of false positives in robotparser by
checking to make sure that robots.txt has been read or does not exist
prior to returning True in can_fetch().
- Issue #21321: itertools.islice() now releases the reference to the source
iterator when the slice is exhausted. Patch by Anton Afanasyev.
- Issue #9291: Do not attempt to re-encode mimetype data read from registry in
ANSI mode. Initial patches by Dmitry Jemerov & Vladimir Iofik.
- Issue #21349: Passing a memoryview to _winreg.SetValueEx now correctly raises
a TypeError where it previously crashed the interpreter. Patch by Brian Kearns
- Fix arbitrary memory access in JSONDecoder.raw_decode with a negative second
parameter. Bug reported by Guido Vranken.
- Issue #21172: isinstance check relaxed from dict to collections.Mapping.
- Issue #21191: In os.fdopen, never close the file descriptor when an exception
happens.
- Issue #21149: Improved thread-safety in logging cleanup during interpreter
- Issue #20368: The null character now correctly passed from Tcl to Python (in
unicode strings only). Improved error handling in variables-related commands.
- Issue #20435: Fix _pyio.StringIO.getvalue() to take into account newline
translation settings.
- Issue #20288: fix handling of invalid numeric charrefs in HTMLParser.
- Issue #19456: ntpath.join() now joins relative paths correctly when a drive
is present.
- Issue #8260: The read(), readline() and readlines() methods of
codecs.StreamReader returned incomplete data when were called after
readline() or read(size). Based on patch by Amaury Forgeot d'Arc.
- Issue #20374: Fix build with GNU readline >= 6.3.
- Issue #14548: Make multiprocessing finalizers check pid before
running to cope with possibility of gc running just after fork.
(Backport from 3.x.)
- Issue #20262: Warnings are raised now when duplicate names are added in the
ZIP file or too long ZIP file comment is truncated.
- Issue #20270: urllib and urlparse now support empty ports.
- Issue #20243: TarFile no longer raise ReadError when opened in write mode.
- Issue #20245: The open functions in the tarfile module now correctly handle
empty mode.
- Issue #20086: Restored the use of locale-independent mapping instead of
locale-dependent str.lower() in locale.normalize().
- Issue #20246: Fix buffer overflow in socket.recvfrom_into.
- Issue #19082: Working SimpleXMLRPCServer and xmlrpclib examples, both in
modules and documentation.
- Issue #13107: argparse and optparse no longer raises an exception when output
a help on environment with too small COLUMNS. Based on patch by
Elazar Gershuni.
- Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly
asked for.
- Issue #20072: Fixed multiple errors in tkinter with wantobjects is False.
- Issue #1065986: pydoc can now handle unicode strings.
- Issue #16039: CVE-2013-1752: Change use of readline in imaplib module to
limit line length. Patch by Emil Lind.
- Issue #19422: Explicitly disallow non-SOCK_STREAM sockets in the ssl
module, rather than silently let them emit clear text data.
- Issue #20027: Fixed locale aliases for devanagari locales.
- Issue #20067: Tkinter variables now work when wantobjects is false.
- Issue #15866: The xmlcharrefreplace error handler no more produces two XML
entities for a non-BMP character on narrow build.
- Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise
OverflowError when an argument of %c format is out of range.
- Issue #18137: Detect integer overflow on precision in float.__format__()
and complex.__format__().
- Issue #18038: SyntaxError raised during compilation sources with illegal
encoding now always contains an encoding name.
- Issue #18019: Fix crash in the repr of dictionaries containing their own
views.
- Issue #18427: str.replace could crash the interpreter with huge strings.
Library
------- Issue #19393: Fix symtable.symtable function to not be confused when there are
functions or classes named "top".
- Issue #19327: Fixed the working of regular expressions with too big charset.
- Issue #19350: Increasing the test coverage of macurl2path. Patch by Colin
Williams.
- Issue #19352: Fix unittest discovery when a module can be reached
through several paths (e.g. under Debian/Ubuntu with virtualenv).
- Issue #15207: Fix mimetypes to read from correct part of Windows registry
Original patch by Dave Chambers
- Issue #8964: fix platform._sys_version to handle IronPython 2.6+.
Patch by Martin Matusiak.
- Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by
limiting the call to readline(). Original patch by Micha
Jastrzbski and Giampaolo Rodola.
- Issue #19276: Fixed the wave module on 64-bit big-endian platforms.
- Issue #18458: Prevent crashes with newer versions of libedit. Its readline
emulation has changed from 0-based indexing to 1-based like gnu readline.
Original patch by Ronald Oussoren.
- Issue #18919: If the close() method of a writer in the sunau or wave module
failed, second invocation of close() and destructor no more raise an
exception. Second invocation of close() on sunau writer now has no effects.
The aifc module now accepts lower case of names of the 'ulaw' and 'alaw'
codecs.
- Issue #19131: The aifc module now correctly reads and writes sampwidth of
compressed streams.
- Issue #19158: a rare race in BoundedSemaphore could allow .release() too
often.
- Issue #18037: 2to3 now escapes '\u' and '\U' in native strings.
- Issue #19137: The pprint module now correctly formats empty set and frozenset
and instances of set and frozenset subclasses.
- Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to
prevent readline() calls from consuming too much memory. Patch by Jyrki
Pulliainen.
- Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except
when necessary. Patch by Oscar Benjamin.
- Properly initialize all fields of a SSL object after allocation.
- Issue #4366: Fix building extensions on all platforms when --enable-shared
is used.
- Issue #18950: Fix miscellaneous bugs in the sunau module.
Au_read.readframes() now updates current file position and reads correct
number of frames from multichannel stream. Au_write.writeframesraw() now
correctly updates current file position. Au_read and Au_write now correctly
work with file object if start file position is not a zero.
- Issue #18050: Fixed an incompatibility of the re module with Python 2.7.3
and older binaries.
- Issue #19037: The mailbox module now makes all changes to maildir files
before moving them into place, to avoid race conditions with other programs
that may be accessing the maildir directory.
- Issue #14984: On POSIX systems, when netrc is called without a filename
argument (and therefore is reading the user's $HOME/.netrc file), it now
enforces the same security rules as typical ftp clients: the .netrc file must
be owned by the user that owns the process and must not be readable by any
other user.
- Issue #17324: Fix http.server's request handling case on trailing '/'. Patch
contributed by Vajrasky Kok.
- Issue #19018: The heapq.merge() function no longer suppresses IndexError
in the underlying iterables.
- Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL,
if all necessary functions are already found in libuuid.
Patch by Evgeny Sologubov.
- Issue #14971: unittest test discovery no longer gets confused when a function
has a different __name__ than its name in the TestCase class dictionary.
- Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in
the _sre module.
- Issue #18830: inspect.getclasstree() no more produces duplicated entries even
when input list contains duplicates.
- Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast
64-bit pointer to long (32 bits).
- Issue #18876: The FileIO.mode attribute now better reflects the actual mode
under which the file was opened. Patch by Erik Bray.
- Issue #18851: Avoid a double close of subprocess pipes when the child
process fails starting.
- Issue #18418: After fork(), reinit all threads states, not only active ones.
Patch by A. Jesse Jiryu Davis.
- Issue #11973: Fix a problem in kevent. The flags and fflags fields are now
properly handled as unsigned.
- Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
- Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj
argument.
- Issue #17119: Fixed integer overflows when processing large Unicode strings
and tuples in the tkinter module.
- Issue #15233: Python now guarantees that callables registered with the atexit
module will be called in a deterministic order.
- Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork.
A pthread_atfork() parent handler is used to seed the PRNG with pid, time
and some stack data.
- Issue #8865: Concurrent invocation of select.poll.poll() now raises a
RuntimeError exception. Patch by Christian Schubert.
- Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit
platforms. Patch by Yogesh Chaudhari.
- Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of
OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function.
- Issue #18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok.
- Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke
malloc weak symbols.
- Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
inside subjectAltName correctly. Formerly the module has used OpenSSL's
GENERAL_NAME_print() function to get the string represention of ASN.1
strings for ``rfc822Name`` (email), ``dNSName`` (DNS) and
``uniformResourceIdentifier`` (URI).
- Issue #18756: Improve error reporting in os.urandom() when the failure
is due to something else than /dev/urandom not existing (for example,
exhausting the file descriptor limit).
- Fix tkinter regression introduced by the security fix in issue #16248.
- Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get
docstrings and ValueError messages. Patch by Zhongyue Luo
- Issue #17998: Fix an internal error in regular expression engine.
- Issue #17557: Fix os.getgroups() to work with the modified behavior of
getgroups(2) on OS X 10.8. Original patch by Mateusz Lenik.
- Issue #18455: multiprocessing should not retry connect() with same socket.
Tools/Demos
----------- Issue #18873: 2to3 and the findnocoding.py script now detect Python source
code encoding only in comment lines.
- Issue #18817: Fix a resource warning in Lib/aifc.py demo.
- Issue #18439: Make patchcheck work on Windows for ACKS, NEWS.
- Issue #18448: Fix a typo in Demo/newmetaclasses/Eiffel.py.
- Issue #12990: The "Python Launcher" on OSX could not launch python scripts
that have paths that include wide characters.
Build
----- Issue #16067: Add description into MSI file to replace installer's temporary n
ame.
- Issue #18256: Compilation fix for recent AIX releases. Patch by
David Edelsohn.
- Issue #18098: The deprecated OS X Build Applet.app fails to build on
OS X 10.8 systems because the Apple-deprecated QuickDraw headers have
been removed from Xcode 4. Skip building it in this case.
- Issue #1584: Provide options to override default search paths for
Tcl and Tk when building _tkinter.
- Issue #15663: Tcl/Tk 8.5.15 is now included with the OS X 10.6+
64-bit/32-bit installer for 10.6+. It is no longer necessary
to install a third-party version of Tcl/Tk 8.5 to work around the
problems in the Apple-supplied Tcl/Tk 8.5 shipped in OS X 10.6
and later releases.
- Issue #19019: Change the OS X installer build script to use CFLAGS instead
of OPT for special build options. By setting OPT, some compiler-specific
options like -fwrapv were overridden and thus not used, which could result
in broken interpreters when building with clang.
IDLE
---- Issue #18873: IDLE now detects Python source code encoding only in comment
lines.
- Issue #18988: The "Tab" key now works when a word is already autocompleted.
- Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster.
- Issue #18429: Format / Format Paragraph, now works when comment blocks
are selected. As with text blocks, this works best when the selection
only includes complete lines.
- Issue #18226: Add docstrings and unittests for FormatParagraph.py.
Original patches by Todd Rovito and Phil Webster.
- Issue #15801 (again): With string % formatting, relax the type check for a
mapping such that any type with a __getitem__ can be used on the right hand
side.
IDLE
---- Issue #17625: In IDLE, close the replace dialog after it is used.
Tests
----- Issue #17835: Fix test_io when the default OS pipe buffer size is larger
than one million bytes.
- Issue #17531: Fix tests that thought group and user ids were always the int
type. Also, always allow -1 as a valid group and user id.
- Issue #17533: Fix test_xpickle with older versions of Python 2.5.
Documentation
------------- Issue 17538: Document XML vulnerabilties
What's New in Python 2.7.4 release candidate 1
==============================================
*Release date: 2013-03-23*
Core and Builtins
----------------- Issue #10211: Buffer objects expose the new buffer interface internally
- Issue #16445: Fixed potential segmentation fault when deleting an exception
message.
- Issue #17275: Corrected class name in init error messages of the C version of
BufferedWriter and BufferedRandom.
- Issue #7963: Fixed misleading error message that issued when object is
called without arguments.
- Issue #5308: Raise ValueError when marshalling too large object (a sequence
with size >= 2**31), instead of producing illegal marshal data.
- Issue #17043: The unicode-internal decoder no longer read past the end of
input buffer.
- Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder.
- Issue #10156: In the interpreter's initialization phase, unicode globals
are now initialized dynamically as needed.
- Issue #16975: Fix error handling bug in the escape-decode decoder.
- Issue #14850: Now a charmap decoder treats U+FFFE as "undefined mapping"
in any mapping, not only in a Unicode string.
- Issue #6074: Ensure cached bytecode files can always be updated by the
user that created them, even when the source file is read-only.
- Issue #14783: Improve int() and long() docstrings and switch docstrings for
unicode(), slice(), range(), and xrange() to use multi-line signatures.
- Issue #16030: Fix overflow bug in computing the `repr` of an xrange object
with large start, step or length.
- Issue #16029: Fix overflow bug occurring when pickling xranges with large
start, step or length.
- Issue #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 #15701: Fix HTTPError info method call to return the headers information
.
- Issue #16646: ftplib.FTP.makeport() might lose socket error details.
(patch by Serhiy Storchaka)
- Issue #16626: Fix infinite recursion in glob.glob() on Windows when the
pattern contains a wildcard in the drive or UNC path. Patch by Serhiy
Storchaka.
- Issue #16298: In HTTPResponse.read(), close the socket when there is no
Content-Length and the incoming stream is finished. Patch by Eran
Rundstein.
- Issue #16248: Disable code execution from the user's home directory by
tkinter when the -E flag is passed to Python. Patch by Zachary Ware.
- Issue #16628: Fix a memory leak in ctypes.resize().
- Issue #13614: Fix setup.py register failure with invalid rst in description.
Patch by Julien Courteau and Pierre Paul Lefebvre.
- Issue #10182: The re module doesn't truncate indices to 32 bits anymore.
Patch by Serhiy Storchaka.
- Issue #16573: In 2to3, treat enumerate() like a consuming call, so superfluous
list() calls aren't added to filter(), map(), and zip() which are directly
passed enumerate().
- Issue #1160: Fix compiling large regular expressions on UCS2 builds.
Patch by Serhiy Storchaka.
- Issue #14313: zipfile now raises NotImplementedError when the compression
type is unknown.
- Issue #16408: Fix file descriptors not being closed in error conditions
in the zipfile module. Patch by Serhiy Storchaka.
- Issue #16327: The subprocess module no longer leaks file descriptors
used for stdin/stdout/stderr pipes to the child when fork() fails.
- Issue #14396: Handle the odd rare case of waitpid returning 0 when not
expected in subprocess.Popen.wait().
- Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access
previously-freed memory. Patch by Serhiy Storchaka.
- Issue #16350: zlib.decompressobj().decompress() now accumulates data from
successive calls after EOF in unused_data, instead of only saving the argument
to the last call. decompressobj().flush() now correctly sets unused_data and
unconsumed_tail. A bug in the handling of MemoryError when setting the
unconsumed_tail attribute has also been fixed. Patch by Serhiy Storchaka.
- Issue #12759: sre_parse now raises a proper error when the name of the group
is missing. Initial patch by Serhiy Storchaka.
- Issue #16152: fix tokenize to ignore whitespace at the end of the code when
no newline is found. Patch by Ned Batchelder.
- Issue #16230: Fix a crash in select.select() when one the lists changes
- Issue #15247: FileIO now raises an error when given a file descriptor
pointing to a directory.
- Issue #14591: Fix bug in Random.jumpahead that could produce an invalid
Mersenne Twister state on 64-bit machines.
- Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox
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 #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
no longer lose data when an underlying read system call is interrupted
within an io module object. IOError is no longer raised due to a read
system call returning EINTR from within these methods.
- Issue #16012: Fix a regression in pyexpat. The parser's UseForeignDTD()
method doesn't require an argument again.
- Issue #13590: OS X Xcode 4 - improve support for universal extension modules
In particular, fix extension module build failures when trying to use
32-bit-only installer Pythons on systems with Xcode 4 (currently
OS X 10.8, 10.7, and optionally 10.6).
* Backport 3.3.0 fixes to 2.7 branch (for release in 2.7.4)
* Since Xcode 4 removes ppc support, extension module builds now
check for ppc compiler support and by default remove ppc and
ppc64 archs when they are not available.
* Extension module builds now revert to using system installed
headers and libs (/usr and /System/Library) if the SDK used
to build the interpreter is not installed or has moved.
* Try to avoid building extension modules with deprecated
and problematic Apple llvm-gcc compiler. If original compiler
is not available, use clang instead by default.
IDLE
---- IDLE was displaying spurious SystemExit tracebacks when running scripts
that terminated by raising SystemExit (i.e. unittest and turtledemo).
- Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase
interface and support all mandatory methods and properties.
- Issue #16829: IDLE printing no longer fails if there are spaces or other
special characters in the file path.
- Issue #16819: IDLE method completion now correctly works for unicode literals.
- Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by
Roger Serwy.
- Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu
Patch by Todd Rovito.
- Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog
ended with '\'. Patch by Roger Serwy.
- Issue #9803: Don't close IDLE on saving if breakpoint is open.
Patch by Roger Serwy.
- Issue #14958: Change IDLE systax highlighting to recognize all string and byte
literals currently supported in Python 2.7.
- Issue #14962: Update text coloring in IDLE shell window after changing
options. Patch by Roger Serwy.
- Issue #17086: Backport the patches from the 3.3 branch to cross-build
the package.
- Issue #3754: fix typo in pthread AC_CACHE_VAL.
- Issue #17029: Let h2py search the multiarch system include directory.
- Issue #16953: Fix socket module compilation on platforms with
HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong.
- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
- Issue #15923: fix a mistake in asdl_c.py that resulted in a TypeError after
2801bf875a24 (see #15801).
- Issue #11715: Fix multiarch detection without having Debian development
tools (dpkg-dev) installed.
- Issue #15819: Make sure we can build Python out-of-tree from a readonly
source directory. (Somewhat related to Issue #9860.)
- Issue #15822: Ensure 2to3 grammar pickles are properly installed.
- Issue #15560: Fix building _sqlite3 extension on OS X with an SDK.
- Issue #8847: Disable COMDAT folding in Windows PGO builds.
- Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs.
- Issue #16256: OS X installer now sets correct permissions for doc directory.
- Issue #8767: Restore building with --disable-unicode.
Patch by Stefano Taschini.
- Build against bzip2 1.0.6 and openssl 0.9.8x on Windows.
- Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban.
- Issue #14437: Fix building the _io module under Cygwin.
- Issue #15587: Enable Tk high-resolution text rendering on Macs with
Retina displays. Applies to Tkinter apps, such as IDLE, on OS X
framework builds linked with Cocoa Tk 8.5.
- Issue #17161: make install now also installs a python2 and python man page.
- Issue #16848: python-config now returns proper --ldflags values for OS X
framework builds.
Tools/Demos
----------- Issue #17156: pygettext.py now correctly escapes non-ascii characters.
- Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py. Now
pindent.py works with a "with" statement. pindent.py no longer produces
improper indentation. pindent.py now works with continued lines broken after
"class" or "def" keywords and with continuations at the start of line.
- Issue #13546: Fixed an overflow issue that could crash the intepreter when
calling sys.setrecursionlimit((1<<31)-1).
- Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder
already accepts them).
- Issue #10519: Avoid unnecessary recursive function calls in
setobject.c.
- Issue #13268: Fix the assert statement when a tuple is passed as the message.
- Issue #13018: Fix reference leaks in error paths in dictobject.c.
Patch by Suman Saha.
- Issue #12604: VTRACE macro expanded to no-op in _sre.c to avoid compiler
warnings. Patch by Josh Triplett and Petri Lehtinen.
- Issue #7833: Extension modules built using distutils on Windows will no
longer include a "manifest" to prevent them failing at import time in some
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
(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.
- Issue #6631: Disallow relative file paths in urllib urlopen methods.
- Issue #13781: Prevent gzip.GzipFile from using the dummy filename provided by
file objects opened with os.fdopen().
- Issue #13589: Fix some serialization primitives in the aifc module.
Patch by Oleg Plakhotnyuk.
- Issue #13803: Under Solaris, distutils doesn't include bitness
in the directory name.
- Issue #13642: Unquote before b64encoding user:password during Basic
Authentication. Patch contributed by Joonas Kuorilehto and Michele Orr.
- Issue #13636: Weak ciphers are now disabled by default in the ssl module
(except when SSLv2 is explicitly asked for).
- Issue #12798: Updated the mimetypes documentation.
- Issue #13639: Accept unicode filenames in tarfile.open(mode="w|gz").
- Issue #1785: Fix inspect and pydoc with misbehaving descriptors.
- Issue #7502: Fix equality comparison for DocTestCase instances. Patch by
Cdric Krier.
- Issue #11870: threading: Properly reinitialize threads internal locks and
condition variables to avoid deadlocks in child processes.
- Issue #8035: urllib: Fix a bug where the client could remain stuck after a
redirection or an error.
- tarfile.py: Correctly detect bzip2 compressed streams with blocksizes
other than 900k.
- Issue #13573: The csv.writer now uses the repr() for floats rather than str().
This allows floats to round-trip without loss of precision.
- Issue #13439: Fix many errors in turtle docstrings.
- Issue #12856: Ensure child processes do not inherit the parent's random
seed for filename generation in the tempfile module. Patch by Brian
Harring.
- Issue #13458: Fix a memory leak in the ssl module when decoding a
certificate with a subjectAltName. Patch by Robert Xiao.
- Issue #13415: os.unsetenv() doesn't ignore errors anymore.
- Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is
raised when the wrapped raw file is non-blocking and the write would block.
Previous code assumed that the raw write() would raise BlockingIOError, but
RawIOBase.write() is defined to returned None when the call would block.
Patch by sbt.
- Issue #13358: HTMLParser now calls handle_data only once for each CDATA.
- Issue #4147: minidom's toprettyxml no longer adds whitespace around a text
node when it is the only child of an element. Initial patch by Dan
Kenigsberg.
- Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly
handles non-valid attributes, including adjacent and unquoted attributes.
- Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely
when called with a timeout. Patch by Arnaud Ysmal.
- Issue #3067: Enhance the documentation and docstring of
locale.setlocale().
- Issue #13254: Fix Maildir initialization so that maildir contents
are read correctly.
- Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn.
- Issue #2892: preserve iterparse events in case of SyntaxError.
- Issue #670664: Fix HTMLParser to correctly handle the content of
``<script>...</script>`` and ``<style>...</style>``.
- Issue #10817: Fix urlretrieve function to raise ContentTooShortError even
when reporthook is None. Patch by Jyrki Pulliainen.
- Issue #7334: close source files on ElementTree.parse and iterparse.
- Issue #13232: logging: Improved logging of exceptions in the presence of
multiple encodings.
- Issue #10332: multiprocessing: fix a race condition when a Pool is closed
before all tasks have completed.
- Issue #1548891: The cStringIO.StringIO() constructor now encodes unicode
arguments with the system default encoding just like the write() method
does, instead of converting it to a raw buffer. This also fixes handling of
unicode input in the shlex module (#6988, #1170).
- Issue #9168: now smtpd is able to bind privileged port.
- Issue #12529: fix cgi.parse_header issue on strings with double-quotes and
semicolons together. Patch by Ben Darnell and Petri Lehtinen.
- 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
would be finalized after the reference to its underlying BufferedRWPair's
writer got cleared by the GC.
- Issue #12881: ctypes: Fix segfault with large structure field names.
- Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype.
Thanks to Suman Saha for finding the bug and providing a patch.
- Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that
file descriptor was actually received.
- Issue #12483: ctypes: Fix a crash when the destruction of a callback
object triggers the garbage collector.
- Issue #12950: Fix passing file descriptors in multiprocessing, under
OpenIndiana/Illumos.
- Issue #12764: Fix a crash in ctypes when the name of a Structure field is not
a string.
- Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to
some functions like file.write().
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
signature. Without this, architectures where sizeof void* != sizeof int are
broken. Patch given by Hallvard B Furuseth.
IDLE
---- Issue #964437 Make IDLE help window non-modal.
Patch by Guilherme Polo and Roger Serwy.
- Issue #13933: IDLE auto-complete did not work with some imported
module, like hashlib. (Patch by Roger Serwy)
- Issue #13506: Add '' to path for IDLE Shell when started and restarted with Re
start Shell.
Original patches by Marco Scataglini and Roger Serwy.
by Charles-Franois Natali.
- Issue #6780: fix starts/endswith error message to mention that tuples are
accepted too.
- Issue #5057: fix a bug in the peepholer that led to non-portable pyc files
between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP
chars (e.g. u"\U00012345"[0]).
- Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted
(EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch
written by Charles-Francois Natali.
- Issue #11144: Ensure that int(a_float) returns an int whenever possible.
Previously, there were some corner cases where a long was returned even
though the result was within the range of an int.
- Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when
there are many tags (e.g. when using mq). Patch by Nadeem Vawda.
- Issue #10451: memoryview objects could allow to mutate a readable buffer.
Initial patch by Ross Lagerwall.
- Issue #10892: Don't segfault when trying to delete __abstractmethods__ from a
class.
- Issue #8020: Avoid a crash where the small objects allocator would read
non-Python managed memory while it is being modified by another thread.
Patch by Matt Bandy.
- Issue #11004: Repaired edge case in deque.count().
- Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime()
can now handle dates after 2038.
- Issue #4236: Py_InitModule4 now checks the import machinery directly
rather than the Py_IsInitialized flag, avoiding a Fatal Python
error in certain circumstances when an import is done in __del__.
- Issue #11828: startswith and endswith don't accept None as slice index.
Patch by Torsten Becker.
- Issue #10674: Remove unused 'dictmaker' rule from grammar.
- Issue #10596: Fix float.__mod__ to have the same behaviour as
float.__divmod__ with respect to signed zeros. -4.0 % 4.0 should be
0.0, not -0.0.
- Issue #11386: bytearray.pop() now throws IndexError when the bytearray is
empty, instead of OverflowError.
Library
------- Issue #12161: Cause StringIO.getvalue() to raise a ValueError when used on a
closed StringIO instance.
- Issue #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true)
division (python -Qnew). Patch written by Ralf W. Grosse-Kunstleve.
- Issue #11666: let help() display named tuple attributes and methods
that start with a leading underscore.
- Issue #11673: Fix multiprocessing Array and RawArray constructors to accept a
size of type 'long', rather than only accepting 'int'.
- Issue #10042: Fixed the total_ordering decorator to handle cross-type
comparisons that could lead to infinite recursion.
- Issue #10979: unittest stdout buffering now works with class and module
setup and teardown.
- Issue #11569: use absolute path to the sysctl command in multiprocessing to
ensure that it will be found regardless of the shell PATH. This ensures
that multiprocessing.cpu_count works on default installs of MacOSX.
- Issue #11500: Fixed a bug in the os x proxy bypass code for fully qualified
IP addresses in the proxy exception list.
- Issue #11131: Fix sign of zero in plus and minus operations when
the context rounding mode is ROUND_FLOOR.
- Issue #5622: Fix curses.wrapper to raise correct exception if curses
initialization fails.
- Issue #11391: Writing to a mmap object created with
``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a
TypeError. Patch by Charles-Franois Natali.
- Issue #11306: mailbox in certain cases adapts to an inability to open
certain files in read-write mode. Previously it detected this by
checking for EACCES, now it also checks for EROFS.
- Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors
on accept(), send() and recv().
- Issue #11326: Add the missing connect_ex() implementation for SSL sockets,
and make it work for non-blocking connects.
- Issue #10956: Buffered I/O classes retry reading or writing after a signal
has arrived and the handler returned successfully.
- Issue #10680: Fix mutually exclusive arguments for argument groups in
argparse.
- Issue #4681: Allow mmap() to work on file sizes and offsets larger than
4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for
32-bit Windows.
- Issue #10360: In WeakSet, do not raise TypeErrors when testing for
membership of non-weakrefable objects.
- Issue #10549: Fix pydoc traceback when text-documenting certain classes.
- Issue #940286: pydoc.Helper.help() ignores input/output init parameters.
- Issue #11171: Fix detection of config/Makefile when --prefix !=
--exec-prefix, which caused Python to not start.
- Issue #11116: any error during addition of a message to a mailbox now causes
a rollback, instead of leaving the mailbox partially modified.
- Issue #8275: Fix passing of callback arguments with ctypes under Win64.
Patch by Stan Mihai.
- Issue #10949: Improved robustness of rotating file handlers.
- Issue #10955: Fix a potential crash when trying to mmap() a file past its
length. Initial patch by Ross Lagerwall.
- Issue #10898: Allow compiling the posix module when the C library defines
a symbol named FSTAT.
- Issue #10916: mmap should not segfault when a file is mapped using 0 as
length and a non-zero offset, and an attempt to read past the end of file
is made (IndexError is raised instead). Patch by Ross Lagerwall.
- Issue #10875: Update Regular Expression HOWTO; patch by 'SilentGhost'.
- Issue #10827: Changed the rules for 2-digit years. The time.asctime
function will now format any year when ``time.accept2dyear`` is
false and will accept years >= 1000 otherwise. The year range
accepted by ``time.mktime`` and ``time.strftime`` is still system
dependent, but ``time.mktime`` will now accept full range supported
by the OS. Conversion of 2-digit years to 4-digit is deprecated.
- Issue #10869: Fixed bug where ast.increment_lineno modified the root
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
- Issue #10467: Fix BytesIO.readinto() after seeking into a position after the
end of the file.
- Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru.
IDLE
---- Issue #6378: idle.bat now runs with the appropriate Python version rather than
the system default. Patch by Sridhar Ratnakumar.
Build
----- Backport r83399 to allow test_distutils to pass on installed versions.
- Issue #1303434: Generate ZIP file containing all PDBs.
Tests
----- Issue #9424: Replace deprecated assert* methods in the Python test suite.
Documentation
------------- Issue #10299: List the built-in functions in a table in functions.rst.
What's New in Python 2.7.1 release candidate 1?
===============================================
*Release date: 2010-11-13*
Core and Builtins
----------------- 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
current node.
- Issue #6869: Fix a refcount problem in the _ctypes extension.
- Issue5504 - ctypes should now work with systems where mmap can't be
PROT_WRITE and PROT_EXEC.
- Fix Issue8280 - urllib2's Request method will remove fragements in the url.
This is how it is supposed to work, wget and curl do the same. Previous
behavior was wrong.
- Issue #2944: asyncore doesn't handle connection refused correctly.
- Issue #3196: email header decoding is now forgiving if an RFC2047
encoded word encoded in base64 is lacking padding.
- Issue #9444: Argparse now uses the first element of prefix_chars as
the option character for the added 'h/help' option if prefix_chars
does not contain a '-', instead of raising an error.
- Issue #9354: Provide getsockopt() in asyncore's file_wrapper.
- Issue #9428: Fix running scripts with the profile/cProfile modules from
the command line.
- Issue #7781: Fix restricting stats by entry counts in the pstats
interactive browser.
- Issue #9209: Do not crash in the pstats interactive browser on invalid
regular expressions.
- Issue #7372: Fix pstats regression when stripping paths from profile
data generated with the profile module.
- Issue #4108: In urllib.robotparser, if there are multiple 'User-agent: *'
entries, consider the first one.
- 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 #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 #6589: cleanup asyncore.socket_map in case smtpd.SMTPServer constructor
raises an exception.
- Issue #8959: fix regression caused by using unmodified libffi
library on Windows. ctypes does now again check the stack before
and after calling foreign functions.
- Issue #8720: fix regression caused by fix for #4050 by making getsourcefile
smart enough to find source files in the linecache.
- Issue #8986: math.erfc was incorrectly raising OverflowError for
values between -27.3 and -30.0 on some platforms.
- Issue #8924: logging: Improved error handling for Unicode in exception text.
- Issue #8948: cleanup functions and class / module setups and teardowns are
now honored in unittest debug methods.
Documentation
------------- Issues #8909: Added the size of the bitmap used in the installer created by
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 every time.
- 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.
- Issue #4265: ``shutil.copyfile()`` was leaking file descriptors when disk
fills. Patch by Tres Seaver.
- Issue #7755: Use an unencumbered audio file for tests.
- Issue #8621: ``uuid.uuid4()`` returned the same sequence of values in the
parent and any children created using ``os.fork`` on Mac OS X 10.6.
- Issue #8313: ``traceback.format_exception_only()`` encodes unicode message to
ASCII with backslashreplace error handler if ``str(value)`` failed.
- Issue #8567: Fix precedence of signals in Decimal module: when a Decimal
operation raises multiple signals and more than one of those signals is
trapped, the specification determines the order in which the signals should be
handled. In many cases this order wasn't being followed, leading to the wrong
Python exception being raised.
- Issue #7865: The close() method of :mod:`io` objects should not swallow
exceptions raised by the implicit flush(). Also ensure that calling close()
several times is supported. Patch by Pascal Chambon.
- Issue #8576: logging updated to remove usage of find_unused_port().
- Issue #8490: asyncore now has a more solid test suite which actually tests its
API.
- Issue #8576: Remove use of find_unused_port() in test_smtplib and
test_multiprocessing. Patch by Paul Moore.
- Issue #7449: Fix many tests to support Python compiled without thread support.
Patches written by Jerry Seutter.
- Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of
SSL shutdowns.
Build
----- Issue #8625: Turn off optimization in ``--with-pydebug`` builds with gcc.
(Optimization was unintentionally turned on in gcc --with-pydebug builds in
2.7 beta1 as a result of the issue #1628484 fix, combined with autoconf's
strange choice of default CFLAGS produced by AC_PROG_CC for gcc.)
- Issue #8509: Fix quoting in help strings and code snippets in configure.in.
- Issue #3646: It is now easily possible to install a Python framework into your
home directory on Mac OS X, see Mac/README for more information.
- Issue #8510: Update to autoconf 2.65.
Misc
---- Update the Vim syntax highlight file.
What's New in Python 2.7 beta 1?
================================
*Release date: 2010-04-10*
Core and Builtins
----------------- Issue #7301: Add environment variable $PYTHONWARNINGS.
- Issue #8329: Don't return the same lists from select.select when no fds are
changed.
- Issue #8259: ``1L << (2**31)`` no longer produces an 'outrageous shift error'
on 64-bit machines. The shift count for either left or right shift is
permitted to be up to sys.maxsize.
- Ensure that tokenization of identifiers is not affected by locale.
- Issue #1222585: Added LDCXXSHARED for C++ support. Patch by Arfrever.
- Raise a TypeError when trying to delete a T_STRING_INPLACE struct member.
- Issue #7994: Issue a PendingDeprecationWarning if object.__format__ is called
with a non-empty format string. This is an effort to future-proof user
code. If a derived class does not currently implement __format__ but later
adds its own __format__, it would most likely break user code that had
supplied a format string. This will be changed to a DeprecationWarning in
Python 3.3 and it will be an error in Python 3.4.
- Issue #8268: Old-style classes (not just instances) now support weak
references.
- Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, in case it
is set.
- Issue #1583863: An unicode subclass can now override the __unicode__ method
- Issue #6474: Make error message from passing an inadequate number of keyword
arguments to a function correct.
- Issue #8164: Don't allow lambda functions to have a docstring.
- Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt
(SIGINT). If an error occurs while importing the site module, the error is
printed and Python exits. Initialize the GIL before importing the site
module.
- Code objects now support weak references.
Library
------- Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters.
- Issue #8321: Give access to OpenSSL version numbers from the `ssl` module,
using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO` and
`ssl.OPENSSL_VERSION_NUMBER`.
- Issue #8310: Allow dis to examine new style classes.
- Issue #8257: The Decimal construct now accepts a float instance directly,
converting that float to a Decimal of equal value:
>>> Decimal(1.1)
Decimal('1.100000000000000088817841970012523233890533447265625')
- collections.Counter() now supports a subtract() method.
- The functools module now has a total_ordering() class decorator to simplify
the specification of rich comparisons.
- The functools module also adds cmp_to_key() as a tool to transition old-style
comparison functions to new-style key-functions.
- Issue #8294: The Fraction constructor now accepts Decimal and float instances
directly.
- Issue #7279: Comparisons involving a Decimal signaling NaN now signal
InvalidOperation instead of returning False. (Comparisons involving a quiet
NaN are unchanged.) Also, Decimal quiet NaNs are now hashable; Decimal
signaling NaNs remain unhashable.
- Issue #2531: Comparison operations between floats and Decimal instances now
return a result based on the numeric values of the operands; previously they
returned an arbitrary result based on the relative ordering of id(float) and
id(Decimal).
- Issue #8233: When run as a script, py_compile.py optionally takes a single
argument `-` which tells it to read files to compile from stdin. Each line is
read on demand and the named file is compiled immediately. (Original patch by
Piotr Oarowski).
- Issue #3135: Add ``inspect.getcallargs()``, which binds arguments to a
function like a normal call.
- Backwards incompatible change: Unicode codepoints line tabulation (0x0B) and
form feed (0x0C) are now considered linebreaks, as specified in Unicode
Standard Annex #14. See issue #7643. http://www.unicode.org/reports/tr14/
- Comparisons using one of <, <=, >, >= between a complex instance and a
Fractions instance now raise TypeError instead of returning True/False. This
makes Fraction <=> complex comparisons consistent with int <=> complex, float
<=> complex, and complex <=> complex comparisons.
- Addition of ``WeakSet`` to the ``weakref`` module.
- logging: Added LOG_FTP to SysLogHandler and updated documentation.
- Issue #8205: Remove the "Modules" directory from sys.path when Python is
running from the build directory (POSIX only).
- Issue #7667: Fix doctest failures with non-ASCII paths.
- Issue #7512: shutil.copystat() could raise an OSError when the filesystem
didn't support chflags() (for example ZFS under FreeBSD). The error is now
silenced.
- Issue #7703: ctypes supports both buffer() and memoryview(). The former is
deprecated.
- Issue #7860: platform.uname now reports the correct 'machine' type when Python
is running in WOW64 mode on 64 bit Windows.
- logging: Added getChild utility method to Logger and added isEnabledFor method
to LoggerAdapter.
- Issue #8201: logging: Handle situation of non-ASCII and Unicode logger names
existing at the same time, causing a Unicode error when configuration code
attempted to sort the existing loggers.
- Issue #8200: logging: Handle errors when multiprocessing is not fully loaded
when logging occurs.
- Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets.
Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking
reads and writes are always retried by OpenSSL itself.
- Issue #8179: Fix macpath.realpath() on a non-existing path.
- Issue #8024: Update the Unicode database to 5.2.
- Issue #8104: socket.recv_into() and socket.recvfrom_into() now support writing
into objects supporting the new buffer API, for example bytearrays or
memoryviews.
Extension Modules
----------------- The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure
bugs and allows loading SQLite extensions from shared libraries.
- Issue #7808: Fix reference leaks in _bsddb and related tests.
- Issue #6544: Fix a reference leak in the kqueue implementation's error
handling.
- Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as
msvcr100.dll is not a platform assembly anymore.
- Issue #7242: On Solaris 9 and earlier calling ``os.fork()`` from within a
thread could raise an incorrect RuntimeError about not holding the import
lock. The import lock is now reinitialized after fork.
- Issue #7999: ``os.setreuid()`` and ``os.setregid()`` would refuse to accept a
-1 parameter on some platforms such as OS X.
Tests
----- Issue #7849: The utility ``test.test_support.check_warnings()`` verifies if
warnings are effectively raised. A new utility ``check_py3k_warnings()`` is
available.
- The four path modules (genericpath, macpath, ntpath, posixpath) share a
common TestCase for some tests: test_genericpath.CommonTest.
- Print platform information when running the whole test suite, or using the
``--verbose`` flag.
- Issue #767675: Enable test_pep277 on POSIX platforms with Unicode-friendly
filesystem encoding.
- 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,
Extension extra options may change the output without changing the .c file).
Initial patch by Collin Winter.
Extension Modules
----------------- Expat: Fix DoS via XML document with malformed UTF-8 sequences
(CVE_2009_3560).
Build
----- Issue #7632: When Py_USING_MEMORY_DEBUGGER is defined, disable the private
memory allocation scheme in dtoa.c and use PyMem_Malloc and PyMem_Free
instead. Also disable caching of powers of 5.
- Issue #7658: Ensure that the new pythonw executable works on OSX 10.4
- Issue #7714: Use ``gcc -dumpversion`` to detect the version of GCC on
MacOSX.
- Issue #7661: Allow ctypes to be built from a non-ASCII directory path.
Patch by Florent Xicluna.
Tools/Demos
----------- iobench (a file I/O benchmark) and ccbench (a concurrency benchmark) were
added to the ``Tools`` directory. They were previously living in the
sandbox.
Tests
----- Issue #7728: test_timeout was changed to use ``test_support.bind_port()``
instead of a hard coded port.
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.
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.
- Issue #7348: ``StringIO.StringIO.readline(-1)`` now acts as if it got no
argument like other file objects.
- Issue #7357: tarfile no longer suppresses fatal extraction errors by default.
- Issue #7470: logging: Fix bug in Unicode encoding fallback.
- Issue #5949: Fixed IMAP4_SSL hang when the IMAP server response is missing
proper end-of-line termination.
- Issue #7457: Added a read_pkg_file method to
``distutils.dist.DistributionMetadata``.
- Issue #3745: Undo the 2.7a1 change to have hashlib to reject unicode and non
buffer API supporting objects as input. That behavior is for 3.x only.
C-API
----- Issue #7767: New function ``PyLong_AsLongLongAndOverflow()`` added, analogous
to ``PyLong_AsLongAndOverflow()``.
- Issue #5080: The argument parsing functions ``PyArg_ParseTuple()``,
``PyArg_ParseTupleAndKeywords()``, ``PyArg_VaParse()``,
``PyArg_VaParseTupleAndKeywords()`` and ``PyArg_Parse()`` no longer accept
float arguments for integer format codes (other than 'L'): previously an
attempt to pass a float resulted in a DeprecationWarning; now it gives a
TypeError. For the 'L' format code (which previously had no warning) there is
now a DeprecationWarning.
- Issue #7033: Function ``PyErr_NewExceptionWithDoc()`` added.
Build
----- Issue #6491: Allow --with-dbmliborder to specify that no dbms will be built.
- Issue #6943: Use pkg-config to find the libffi headers when the
``--with-system-ffi`` flag is used.
- Issue #7609: Add a ``--with-system-expat`` option that causes the system's
expat library to be used for the pyexpat module instead of the one included
with Python.
- Issue #7589: Only build the nis module when the correct header files are
found.
- Switch to OpenSSL 0.9.8l and sqlite 3.6.21 on Windows.
- Issue #7541: when using ``python-config`` with a framework install the
compiler might use the wrong library.
Tests
----- Issue #7376: Instead of running a self-test (which was failing) when called
with no arguments, doctest.py now gives a usage message.
- Issue #7396: Fix regrtest -s, which was broken by the -j enhancement.
- Issue #7498: test_multiprocessing now uses test_support.find_unused_port
instead of a hardcoded port number in test_rapid_restart.
What's New in Python 2.7 alpha 1
================================
*Release date: 2009-12-05*
Core and Builtins
----------------- Issue #7419: ``locale.setlocale()`` could crash the interpreter on Windows
when called with invalid values.
- Issue #3382: 'F' formatting for float and complex now convert the result to
upper case. This only affects 'inf' and 'nan', since 'f' no longer converts
to 'g' for large values.
- Remove switch from "%f" formatting to "%g" formatting for floats larger than
1e50 in absolute value.
- Remove restrictions on precision when formatting floats. E.g., "%.120g" %
1e-100 used to raise OverflowError, but now gives the requested 120
significant digits instead.
.
- 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.
- Assignment to None using import statements now raises a SyntaxError.
- Issue #4547: When debugging a very large function, it was not always possible
to update the lineno attribute of the current frame.
- Issue #5330: C functions called with keyword arguments were not reported by
the various profiling modules (profile, cProfile). Patch by Hagen Frstenau.
- Issue #5982: staticmethod and classmethod now expose the wrapped function with
``__func__``.
- Added support for multiple context managers in the same with-statement.
Deprecated ``contextlib.nested()`` which is no longer needed.
- Issue #6101: A new opcode, SETUP_WITH, has been added to speed up the with
statement and correctly lookup the __enter__ and __exit__ special methods.
- Issue #5829: complex("1e500") no longer raises OverflowError. This makes it
consistent with float("1e500") and interpretation of real and imaginary
literals.
- Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more.
- ``__instancecheck__()`` and ``__subclasscheck__()`` are now completely ignored
on classic classes and instances.
- 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
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.
- Issue #7293: ``distutils.test_msvc9compiler`` is fixed to work on any fresh
Windows box. Help provided by David Bolen.
- Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch.
- Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using TLS
or SSL. Patch by Giampaolo Rodola'.
- Issue #4969: The mimetypes module now reads the MIME database from the
registry under Windows. Patch by Gabriel Genellina.
- Issue #6816: runpy now provides a run_path function that allows Python code to
execute file paths that refer to source or compiled Python files as well as
zipfiles, directories and other valid sys.path entries that contain a
__main__.py file. This allows applications that run other Python scripts to
support the same flexibility as the CPython command line itself.
- Issue #7318: multiprocessing now uses a timeout when it fails to establish a
connection with another process, rather than looping endlessly. The default
timeout is 20 seconds, which should be amply sufficient for local connections.
- Issue #7197: Allow unittest.TextTestRunner objects to be pickled and
unpickled. This fixes crashes under Windows when trying to run
test_multiprocessing in verbose mode.
- Issue #7282: Fix a memory leak when an RLock was used in a thread other than
those started through ``threading.Thread`` (for example, using
``thread.start_new_thread()``.
- Issue #7264: Fix a possible deadlock when deallocating thread-local objects
which are part of a reference cycle.
- Issue #7211: Allow 64-bit values for the ``ident`` and ``data`` fields of
kevent objects on 64-bit systems. Patch by Michael Broghton.
- Issue #6896: ``mailbox.Maildir`` now invalidates its internal cache each time
a modification is done through it. This fixes inconsistencies and test
failures on systems with slightly bogus mtime behaviour.
- Issue #7246 & Issue #7208: getpass now properly flushes input before reading
from stdin so that existing input does not confuse it and lead to incorrect
entry or an IOError. It also properly flushes it afterwards to avoid the
terminal echoing the input afterwards on OSes such as Solaris.
- Issue #7233: Fix a number of two-argument Decimal methods to make sure that
they accept an int or long as the second argument. Also fix buggy handling of
large arguments (those with coefficient longer than the current precision) in
shift and rotate.
- Issue #4750: Store the basename of the original filename in the gzip FNAME
header as required by RFC 1952.
- Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in
Distutils.
- Issue #7218: Fix test_site for win32, the directory comparison was done with
an uppercase.
- Issue #7205: Fix a possible deadlock when using a BZ2File object from several
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.
``io`` module.
- Issue #6258: Support AMD64 in bdist_msi.
- Issue #6252: Fixed bug in next rollover time computation in
TimedRotatingFileHandler.
- Issue #6263: Fixed syntax error in distutils.cygwincompiler.
- Issue #5201: distutils.sysconfig.parse_makefile() now understands ``$$`` in
Makefiles. This prevents compile errors when using syntax like:
``LDFLAGS='-rpath=\$$LIB:/some/other/path'``. Patch by Floris Bruynooghe.
- Issue #5767: Removed sgmlop support from xmlrpclib.
- Issue #6131: test_modulefinder leaked when run after test_distutils. Patch by
Hirokazu Yamamoto.
- Issue #6048: Now Distutils uses the tarfile module in archive_util.
- Issue #6121: pydoc now ignores leading and trailing spaces in the argument to
the 'help' function.
- In unittest, using a skipping decorator on a class is now equivalent to
skipping every test on the class. The ClassTestSuite class has been removed.
- Issue #6050: Don't fail extracting a directory from a zipfile if the directory
already exists.
- Issue #5311: bdist_msi can now build packages that do not depend on a specific
Python version.
- Issue #1309352: fcntl now converts its third arguments to a C `long` rather
than an int, which makes some operations possible under 64-bit Linux (e.g.
DN_MULTISHOT with F_NOTIFY).
- Issue #1424152: Fix for httplib, urllib2 to support SSL while working through
proxy. Original patch by Christopher Li, changes made by Senthil Kumaran.
- Issue #1983: Fix functions taking or returning a process identifier to use the
dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have a
process identifier type wider than the standard C integer type.
- Issue #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.
- 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'
which lets invalid fieldnames be automatically converted to positional names
in the form, _1, _2, ...
- Issue #4890: Handle empty text search pattern in Tkinter.Text.search.
- Issue #5170: Fixed Unicode output bug in logging and added test case. This is
a regression which did not occur in 2.5.
- Issue #4512 (part 2): Promote ``ZipImporter._get_filename()`` to be a public
documented method ``ZipImporter.get_filename()``.
- Issue #4195: The ``runpy`` module (and the ``-m`` switch) now support the
execution of packages by looking for and executing a ``__main__`` submodule
when a package name is supplied. Initial patch by Andi Vajda.
- Issue #1731706: Call Tcl_ConditionFinalize for Tcl_Conditions that will not be
used again (this requires Tcl/Tk 8.3.1), also fix a memory leak in Tkapp_Call
when calling from a thread different than the one that created the Tcl
interpreter. Patch by Robert Hancock.
- Issue #1520877: Now distutils.sysconfig reads $AR from the
environment/Makefile. Patch by Douglas Greiman.
- Issue #4285: Change sys.version_info to be a named tuple. Patch by Ross
Light.
- Issue #1276768: The verbose option was not used in the code of
distutils.file_util and distutils.dir_util.
- Issue #5132: Fixed trouble building extensions under Solaris with
--enabled-shared activated. Initial patch by Dave Peterson.
- Issue #1581476: Always use the Tcl global namespace when calling into Tcl.
- Issue #2047: shutil.move() could believe that its destination path was inside
its source path if it began with the same letters (e.g. "src" vs. "src.new").
- Issue #4920: Fixed .next() vs .__next__() issues in the ABCs for Iterator and
MutableSet.
- Added the ttk module. See issue #2983: Ttk support for Tkinter.
- Issue #5021: doctest.testfile() did not create __name__ and
collections.namedtuple() relied on __name__ being defined.
- Backport importlib from Python 3.1. Only the import_module() function has been
backported to help facilitate transitions from 2.7 to 3.1.
- Issue #1885: distutils: When running sdist with --formats=tar,gztar the tar
file was overriden by the gztar one.
- Issue #4863: distutils.mwerkscompiler has been removed.
- Added new itertools functions: combinations_with_replacement() and compress().
- Issue #5032: Added a step argument to itertools.count() and allowed
non-integer arguments.
- Fix and properly document the multiprocessing module's logging support, expose
the internal levels and provide proper usage examples.
- Issue #1672332: Fix unpickling of subnormal floats, which was
producing a ValueError on some platforms.
- Issue #3881: Help Tcl to load even when started through the unreadable local
symlink to "Program Files" on Vista.
- Issue #4710: Extract directories properly in the zipfile module; allow adding
directories to a zipfile.
- Issue #3807: _multiprocessing build fails when configure is passed
--without-threads argument. When this occurs, _multiprocessing will be
disabled, and not compiled.
- Issue #5008: When a file is opened in append mode with the new IO library, do
an explicit seek to the end of file (so that e.g. tell() returns the file size
rather than 0). This is consistent with the behaviour of the traditional 2.x
file object.
- Issue #5013: Fixed a bug in FileHandler which occurred when the delay
parameter was set.
- Issue #4998: The memory saving effect of __slots__ had been lost on Fractions
which inherited from numbers.py which did not have __slots__ defined. The
numbers hierarchy now has its own __slots__ declarations.
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.
- idle.py modified and simplified to better support developing experimental
versions of IDLE which are not installed in the standard location.
- Issue #5559: OutputWindow/PyShell right click menu "Go to file/line"
wasn't working with file paths containing spaces.
- Issue #5783: Windows: Version string for the .chm help file changed,
file not being accessed Patch by Guilherme Polo/
- Issue #1529142: Allow multiple IDLE GUI/subprocess pairs to exist
simultaneously. Thanks to David Scherer for suggesting the use of an
ephemeral port for the GUI. Patch by Weeble.
- Remove port spec from run.py and fix bug where subprocess fails to
extract port from command line when warnings are present.
- Issue #5129: Tk 8.5 Text widget requires 'wordprocessor' tabstyle attr
to handle mixed space/tab properly. Patch by Guilherme Polo.
- Issue #3549: On MacOS the preferences menu was not present
Tools/Demos
----------- Ttk demos added in Demo/tkinter/ttk/.
- Issue #4677: Add two list comprehension tests to pybench.
Build
----- Issue #6603: Change READ_TIMESTAMP macro in ceval.c so that it compiles
correctly under gcc on x86-64. This fixes a reported problem with the
--with-tsc build on x86-64.
- Bug #3989: Package the 2to3 script (as 2to3.py) in the Windows
installer.
- Bug #3887: Package x64 version of CRT for AMD64 Windows binaries.
What's New in Python 2.6 release candidate 2?
=============================================
*Release date: 17-Sep-2008*
Core and Builtins
----------------Extension Modules
----------------- Security Issue #2: imageop did not validate arguments correctly and could
segfault as a result.
- Issue #3886: Possible integer overflows in the _hashopenssl module were
closed.
Tools/Demos
----------- Issue #3850: recursion tests in Tools/scripts/find_recursion_limit.py can rais
e
AttributeError instead of RuntimeError, depending in which C API call
exactly the recursion limit is exceeded. Consequently, both exception types
are caught and silenced.
Build
----- Issue #3617: Include a licensing statement regarding the Microsoft
C runtime in the Windows installer.
What's New in Python 2.6 release candidate 1?
=============================================
*Release date: 12-Sep-2008*
Core and Builtins
----------------- Issue #3642: Suppress warning in obmalloc when size_t is larger than uint.
- Issue #3743: In a few places, PY_FORMAT_SIZE_T was incorrectly used with
PyString_FromFormat or PyErr_Format to display size_t values. The macro
PY_FORMAT_SIZE_T is designed to select the correct format for the OS
``printf`` function, whereas PyString_FromFormat has an independent
implementation and uses "%zd" on all platforms for size_t values.
This makes a difference on win64, where ``printf`` needs "%Id" to display
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.
- Issue #3811: The Unicode database was updated to 5.1.
- Issue #3781: Further warnings.catch_warnings() cleanup to prevent
silent misbehaviour when a single instance is nested in multiple
with statements, or when the methods are invoked in the wrong order.
- Issue #3809: Fixed spurious 'test.blah' file left behind by test_logging.
- Issue #3781: Clean up the API for warnings.catch_warnings() by having it
return a list or None rather than a custom object.
- Issue #1638033: Cookie.Morsel gained the httponly attribute.
- Issue #3535: zipfile couldn't read some zip files larger than 2GB.
- Issue #3776: Deprecate the bsddb package for removal in 3.0.
- Issue #3762: platform.architecture() fails if python is lanched via
its symbolic link.
- Issue #3772: Fixed regression problem in StreamHandler.emit().
- 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.
- Issue #2562: Fix distutils PKG-INFO writing logic to allow having
non-ascii characters and Unicode in setup.py meta-data.
- Issue #3726: Allow spaces in separators in logging configuration files.
- Issue #3719: platform.architecture() fails if there are spaces in the
path to the Python binary.
- Issue #3602: Moved test.test_support.catch_warning() to
warnings.catch_warnings() along with some API cleanup. Expanding the tests
for catch_warnings() also led to an improvement in the raising of a
DeprecationWarning related to warnings.warn_explicit().
- The deprecation warnings for the old camelCase threading API were removed.
- logging: fixed lack of use of encoding attribute specified on a stream.
- Silenced a trivial compiler warning in the sqlite module.
- Fixed two format strings in the _collections module.
- 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.
- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing
SEM_VALUE_MAX.
Extension Modules
----------------- Issue #4301: Patch the logging module to add processName support, remove
_check_logger_class from multiprocessing.
- Issue #2975: When compiling several extension modules with Visual Studio 2008
from the same python interpreter, some environment variables would grow
without limit.
- Issue #3643: Added a few more checks to _testcapi to prevent segfaults by
exploitation of poor argument checking.
- sqlite3: Changed docstring of iterdump() to mark method as "Non-standard".
- 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 #3781: Add test.test_support.check_warnings() as a convenience
wrapper for warnings.catch_warnings() that makes it easier to check
that expected warning messages are being reported.
- Issue #3796: Some tests functions were not enabled in test_float.
- Issue #3768: Move test_py3kwarn over to the new API for catch_warnings().
Build
----- Issue #3833: Use a different upgrade code for Win64 installers.
- Issue #2271: Set SecureCustomProperties so that installation will properly
use the TARGETDIR even for unprivileged users.
- Allow passing the MSI file name to merge.py.
- Issue #3758: Rename the 'check' target to 'patchcheck' so as to not clash
with GNU build target guidelines.
What's New in Python 2.6 beta 3?
================================
*Release date: 20-Aug-2008*
Core and Builtins
----------------- Issue #1878: Remove Py_TPFLAGS_HAVE_VERSION_TAG from
Py_TPFLAGS_DEFAULT when not building the core. This means 3rd party
extensions do not automatically benefit from the class attribute
cache; they will have to explicitly add Py_TPFLAGS_HAVE_VERSION_TAG
to their tp_flags field if they care. This is a backwards
compatibility feature; in 3.0, all types will use the cache by
default.
- Keyword arguments can now follow starred arguments. (``f(a, *args,
keyword=23)`` is now valid syntax.)
- ctypes function pointers that are COM methods have a boolean True
value again.
- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
asking for a specific length. This problem only affected files opened
using the new "io" module, not the built-in open() function.
- Issue #3449: Update decimal module to use most recent specification
(v. 1.68) and tests (v. 2.58) from IBM.
- Issue #3437: Bug fix in robotparser parsing of Allow: lines.
- Issue #1592: Improve error reporting when operations are attempted
on a closed shelf.
- Deprecate the "ast" parser function aliases.
- Issue #3120: On 64-bit Windows the subprocess module was truncating handles.
- Issue #3303: Fix a crash in locale.strcoll() when calling it with
invalid arguments.
- Issue #3302: Fix several crashes when calling locale's gettext functions
with None arguments.
- Issue #3389: Allow resolving dotted names for handlers in logging
configuration files.
- Deprecate the sunaudio module for removal in Python 3.0.
- Issue #3394: zipfile.writestr sets external attributes when passed a
file name rather than a ZipInfo instance, so files are extracted with
mode 0600 rather than 000 under Unix.
- Issue #1857: subprocess.Popen.poll gained an additional _deadstate keyword
argument in python 2.5, this broke code that subclassed Popen to include its
own poll method. Fixed my moving _deadstate to an _internal_poll method.
Build
----- Generate the PatternGrammar pickle during "make install".
Documentation
------------- Issue #2235: the C API function PyObject_HashNotImplemented and its
interaction with the tp_hash slot (added in 2.6b2) are now documented
- Issue #643841: The language reference now provides more detailed
coverage of the lookup process for special methods. The disclaimers
regarding lack of coverage of new-style classes have also been
removed, since the coverage is now fairly reasonable.
What's New in Python 2.6 beta 2?
================================
*Release date: 17-Jul-2008*
Core and Builtins
-----------------
- 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.
- The multifile module has been deprecated as per PEP 4.
- The imageop module has been deprecated for removal in Python 3.0.
- Issue #2250: Exceptions raised during evaluation of names in
rlcompleter's ``Completer.complete()`` method are now caught and
ignored.
- Issue #2659: Added ``break_on_hyphens`` option to textwrap
TextWrapper class.
- The mhlib module has been deprecated for removal in Python 3.0.
- The linuxaudiodev 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 dl 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.
- Issue #2487: change the semantics of math.ldexp(x, n) when n is too
large to fit in a C long. ldexp(x, n) now returns a zero (with
suitable sign) if n is large and negative; previously, it raised
OverflowError.
- The toaiff module has been deprecated for removal in Python 3.0.
- The test.testall 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.
- test.test_support.catch_warning() gained a 'record' argument.
- os.path.walk is deprecated in favor of os.walk.
- pdb gained the "until" command.
- The Mac Modules (including Carbon) have been deprecated for removal
in Python 3.0.
- Library: on MacOS X you can now set ``ARCHFLAGS`` in the shell
environment to control the '-arch' flags that are used to build
an extension. This was added for compatibility with Apple's build
of Python.
- The bundled OSX-specific copy of libbffi is now in sync with the version
shipped with PyObjC 2.0 and includes support for x86_64 and ppc64 platforms.
- The threading module gained aliases for names that will be removed in the
3.x series.
Build
----- The Windows installer now includes Tk 8.5, bzip2 1.0.5, and SQLite 3.5.9.
- 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
----------------- Issue #2719: backported the ``next()`` builtin from Python 3.
- Issue #2681: The octal literal ``0o8`` was incorrecly acctepted. Now
it properly raises a SyntaxError.
- Issue #2617: Reserved -J and -X arguments for Jython, IronPython and
other implementations of Python.
- Bug #1545497: when given an explicit base, int() did ignore NULs
embedded in the string to convert.
- Bug #1569998: break inside a try statement (outside a loop) is now
recognized and rejected.
- list.pop(x) accepts any object x following the __index__ protocol.
- A number of places, including integer negation and absolute value,
were fixed to not rely on undefined behaviour of the C compiler
anymore.
- Bug #1566800: make sure that EnvironmentError can be called with any
number of arguments, as was the case in Python 2.4.
- Patch #1567691: super() and new.instancemethod() now don't accept
keyword arguments any more (previously they accepted them, but
didn't use them).
- Fix a bug in the parser's future statement handling that led to
"with" not being recognized as a keyword after, e.g., this
statement: from __future__ import division, with_statement
- Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
- Fix %zd string formatting on Mac OS X so it prints negative numbers.
- Allow exception instances to be directly sliced again.
- Bug #1551432: Exceptions do not define an explicit __unicode__
method. This allows calling unicode() on exceptions classes
directly to succeed.
- Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack.
Also make sure that every exception class has __module__ set to
'exceptions'.
- Bug #1550983: emit better error messages for erroneous relative
imports (if not in package and if beyond toplevel package).
- Overflow checking code in integer division ran afoul of new gcc
optimizations. Changed to be more standard-conforming.
- Patch #1542451: disallow continue anywhere under a finally.
- Patch #1546288: fix seg fault in dict_equal due to ref counting bug.
- The return tuple from str.rpartition(sep) is (tail, sep, head) where
head is the original string if sep was not found.
- Bug #1520864: unpacking singleton tuples in list comprehensions and
generator expressions (x for x, in ... ) works again. Fixing this
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.
zipfile module.
- Issue #1646: Make socket support the TIPC protocol.
- Bug #1742: return os.curdir from os.path.relpath() if both arguments
are equal instead of raising an exception.
- Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'.
- Patch #1698: allow '@' in username parsed by urlparse.py.
- Issue #1735: TarFile.extractall() now correctly sets directory
permissions and times.
- Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a mountpoint.
- Bug #1687: Fxed plistlib.py restricts <integer> to Python int when
writing
- Issue #1700: Regular expression inline flags incorrectly handle
certain unicode characters.
- Issue #1689: PEP 3141, numeric abstract base classes.
- Tk issue #1851526: Return results from Python callbacks to Tcl as
Tcl objects.
- Issue #1642: Fix segfault in ctypes when trying to delete attributes.
- Issue #1727780: Support loading pickles of random.Random objects
created on 32-bit systems on 64-bit systems, and vice versa. As a
consequence of the change, Random pickles created by Python 2.6
cannot be loaded in Python 2.5.
- Issue #1455: The distutils package now supports VS 2005 and VS 2008
for both the msvccompiler and cygwincompiler.
- Issue #1531: tarfile.py: Read fileobj from the current offset, do
not seek to the start.
- Issue #1534: Added a dictionary sys.float_info with information
about the internal floating point type to the sys module.
- Issue #1429818: patch for trace and doctest modules so they play
nicely together.
- doctest made a bad assumption that a package's __loader__.get_data()
method used universal newlines.
- Issue #1705170: contextlib.contextmanager was still swallowing
StopIteration in some cases. This should no longer happen.
- 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.
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.
does.
- Bug #1599782: Fix segfault on bsddb.db.DB().type().
- Bug #1567666: Emulate GetFileAttributesExA for Win95.
- Patch #1576166: Support os.utime for directories on Windows NT+.
- Patch #1572724: fix typo ('=' instead of '==') in _msi.c.
- Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
when encoding non-BMP unicode characters.
- Bug #1556784: allow format strings longer than 127 characters in
datetime's strftime function.
- Fix itertools.count(n) to work with negative numbers again.
- RLIMIT_SBSIZE was added to the resource module where available.
- Bug #1551427: fix a wrong NULL pointer check in the win32 version of
os.urandom().
- Bug #1548092: fix curses.tparm seg fault on invalid input.
- 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.)
- Bug #1550714: fix SystemError from itertools.tee on negative value
for n.
- Fixed a few bugs on cjkcodecs:
- gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT
correctly.
- iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
codepoints to conform the standard.
- iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2
codepoints now.
- Bug #1552726: in readline.c, avoid repeatedly polling in interactive
mode by only placing a timeout on the select() if an input hook has
been defined. This prevents an interactive Python from waking up 10
times per second. Patch by Richard Boulton.
- 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.
- Bug #1633621: if curses.resizeterm() or curses.resize_term() is
called, update _curses.LINES, _curses.COLS, curses.LINES and
curses.COLS.
- Fix an off-by-one bug in locale.strxfrm().
- Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*.
- Build using system ffi library on arm*-linux*.