diff options
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 4307 |
1 files changed, 3287 insertions, 1020 deletions
@@ -1,8 +1,7 @@ -+++++++++++ Python News +++++++++++ -What's New in Python 2.6.7? +What's New in Python 2.7.2? =========================== *Release date: XXXX-XX-XX* @@ -10,196 +9,862 @@ What's New in Python 2.6.7? Core and Builtins ----------------- -Library -------- +- Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, + clear the end-of-file indicator after CTRL+d. +- Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file + doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int + (length bigger than 2^31-1 bytes). -What's New in Python 2.6.7 rc 2? -================================ +- Issue #8651: Fix "z#" format of PyArg_Parse*() function: the size was not + written if PY_SSIZE_T_CLEAN is defined. + +- Issue #9756: When calling a method descriptor or a slot wrapper descriptor, + the check of the object type doesn't read the __class__ attribute anymore. + Fix a crash if a class override its __class__ attribute (e.g. a proxy of the + str type). Patch written by Andreas Stührk. + +- Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_* + APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch + by Charles-François Natali. + +- Issue #6780: fix starts/endswith error message to mention that tuples are + accepted too. + +- Issue #5057: fix a bug in the peepholer that led to non-portable pyc files + between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP + chars (e.g. u"\U00012345"[0]). + +- Issue #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. -*Release date: 2011-05-20* +- 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. -*NOTE: Python 2.6 is in security-fix-only mode. No non-security bug fixes are - allowed. Python 2.6.7 and beyond will be source only releases.* +- 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 #11662: Make urllib and urllib2 ignore redirections if the - scheme is not HTTP, HTTPS or FTP (CVE-2011-1521). +- Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore + to be able to unload the module. + +- Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX + with Tk 8.5. + +- Issue #10154, #10090: change the normalization of UTF-8 to "UTF-8" instead + of "UTF8" in the locale module as the latter is not supported MacOSX and OpenBSD. + +- Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET is + set in shell. + +- Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail + attribute when called without a max_length argument. + +- Issue #12062: In the `io` module, fix a flushing bug when doing a certain + type of I/O sequence on a file opened in read+write mode (namely: reading, + seeking a bit forward, writing, then seeking before the previous write but + still within buffered data, and writing again). + +- Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in + order to accept exactly one connection. Patch by Daniel Evers. + +- Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional. + +- Issue #11164: Remove obsolete allnodes test from minidom test. + +- Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch + by Kasun Herath. + +- Issue 11999: fixed sporadic sync failure mailbox.Maildir due to its trying to + detect mtime changes by comparing to the system clock instead of to the + previous value of the mtime. + +- Issue #10684: shutil.move used to delete a folder on case insensitive + filesystems when the source and destination name where the same except + for the case. + +- Issue #11982: fix json.loads('""') to return u'' rather than ''. + +- Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get + around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso. + +- Issue #10761: Fix tarfile.extractall failure when symlinked files are + present. Initial patch by Scott Leerssen. + +- Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the + strings are too long. + +- Issue #11236: getpass.getpass responds to ctrl-c or ctrl-z on terminal. + +- Issue #11768: The signal handler of the signal module only calls + Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or + parallel calls. PyErr_SetInterrupt() writes also into the wake up file. + +- Issue #11875: collections.OrderedDict's __reduce__ was temporarily + mutating the object instead of just working on a copy. - Issue #11442: Add a charset parameter to the Content-type in SimpleHTTPServer to avoid XSS attacks. +- Issue #11467: Fix urlparse behavior when handling urls which contains scheme + specific part only digits. Patch by Santoso Wijaya. -What's New in Python 2.6.7 rc 1? -================================ +- collections.Counter().copy() now works correctly for subclasses. -*Release date: 2011-05-06* +- Issue #11474: Fix the bug with url2pathname() handling of '/C|/' on Windows. + Patch by Santoso Wijaya. -*NOTE: Python 2.6 is in security-fix-only mode. No non-security bug fixes are - allowed. Python 2.6.7 and beyond will be source only releases.* +- Issue #9233: Fix json.loads('{}') to return a dict (instead of a list), when + _json is not available. +- Issue #11703: urllib2.geturl() does not return correct url when the original + url contains #fragment. -Core and Builtins ------------------ +- Issue #10019: Fixed regression in json module where an indent of 0 stopped + adding newlines and acted instead like 'None'. -Library -------- +- Issue #5162: Treat services like frozen executables to allow child spawning + from multiprocessing.forking on Windows. -- Issue #9129: smtpd.py is vulnerable to DoS attacks deriving from missing - error handling when accepting a new connection. +- Issue #4877: Fix a segfault in xml.parsers.expat while attempting to parse + a closed file. +- Issue #11830: Remove unnecessary introspection code in the decimal module. + It was causing a failed import in the Turkish locale where the locale + sensitive str.upper() method caused a name mismatch. -What's New in Python 2.6.6? -=========================== +- Issue #8428: Fix a race condition in multiprocessing.Pool when terminating + worker processes: new processes would be spawned while the pool is being + shut down. Patch by Charles-François Natali. -*Release date: 2010-08-24* +- Issue #7311: Fix HTMLParser to accept non-ASCII attribute values. -Core and Builtins ------------------ +- Issue #10963: Ensure that subprocess.communicate() never raises EPIPE. -Library -------- +- Issue #11662: Make urllib and urllib2 ignore redirections if the + scheme is not HTTP, HTTPS or FTP (CVE-2011-1521). + +- Issue #11256: Fix inspect.getcallargs on functions that take only keyword + arguments. +- Issue #11696: Fix ID generation in msilib. -What's New in Python 2.6.6 rc 2? -================================ +- Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when + trying to pack a negative (in-range) integer. -*Release date: 2010-08-16* +- Issue #11675: multiprocessing.[Raw]Array objects created from an integer size + are now zeroed on creation. This matches the behaviour specified by the + documentation. -Library -------- +- Issue #7639: Fix short file name generation in bdist_msi. + +- 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-François 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 #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the + menu accelerators for Open Module, Go to Line, and New Indent Width. + The accelerators still work but no longer appear in the menu items. + +- Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5, rather + than the currently problematic Apple-supplied one, when running with the + 64-/32-bit installer variant. + +- Issue #11052: Correct IDLE menu accelerators on Mac OS X for Save + commands. + +- 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 #6075: IDLE on Mac OS X now works with both Carbon AquaTk and + Cocoa AquaTk. + +- 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 #9600: Don't use relative import for _multiprocessing on Windows. +- 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 #8688: Revert regression introduced in 2.6.6rc1 (making Distutils - recalculate MANIFEST every time). +- Issue #10738: Fix webbrowser.Opera.raise_opts -- Issue #5798: Handle select.poll flag oddities properly on OS X. - This fixes test_asynchat and test_smtplib failures on OS X. +- Issue #9824: SimpleCookie now encodes , and ; in values to cater to how + browsers actually parse cookies. -- Issue #9543: Fix regression in socket.py introduced in Python 2.6.6 rc 1 - in r83624. +- Issue #1379416: eliminated a source of accidental unicode promotion in + email.header.Header.encode. + +- Issue #5258/#10642: if site.py encounters a .pth file that generates an error, + it now prints the filename, line number, and traceback to stderr and skips + the rest of that individual file, instead of stopping processing entirely. + +- Issue #10750: The ``raw`` attribute of buffered IO objects is now read-only. + +- Issue #10242: unittest.TestCase.assertItemsEqual makes too many assumptions + about input. + +- Issue #10611: SystemExit should not cause a unittest test run to exit. + +- Issue #6791: Limit header line length (to 65535 bytes) in http.client, + to avoid denial of services from the other party. + +- Issue #10404: Use ctl-button-1 on OSX for the context menu in Idle. + +- Issue #9907: Fix tab handling on OSX when using editline by calling + rl_initialize first, then setting our custom defaults, then reading .editrc. + +- Issue #4188: Avoid creating dummy thread objects when logging operations + from the threading module (with the internal verbose flag activated). + +- Issue #9721: Fix the behavior of urljoin when the relative url starts with a + ';' character. Patch by Wes Chow. + +- Issue #10714: Limit length of incoming request in http.server to 65536 bytes + for security reasons. Initial patch by Ross Lagerwall. + +- Issue #9558: Fix distutils.command.build_ext with VS 8.0. + +- Issue #10695: passing the port as a string value to telnetlib no longer + causes debug mode to fail. + +- Issue #10107: Warn about unsaved files in IDLE on OSX. + +- Issue #10406: Enable Rstrip IDLE extension on OSX (just like on other + platforms). + +- Issue #10478: Reentrant calls inside buffered IO objects (for example by + way of a signal handler) now raise a RuntimeError instead of freezing the + current process. + +- Issue #10497: Fix incorrect use of gettext in argparse. + +- Issue #10464: netrc now correctly handles lines with embedded '#' characters. + +- Issue #1731717: Fixed the problem where subprocess.wait() could cause an + OSError exception when The OS had been told to ignore SIGCLD in our process + or otherwise not wait for exiting child processes. + +- Issue #9509: argparse now properly handles IOErrors raised by + argparse.FileType. + +- Issue #9348: Raise an early error if argparse nargs and metavar don't match. + +- Issue #8982: Improve the documentation for the argparse Namespace object. + +- Issue #9343: Document that argparse parent parsers must be configured before + their children. + +- Issue #9026: Fix order of argparse sub-commands in help messages. + +- Issue #9347: Fix formatting for tuples in argparse type= error messages. Extension Modules ----------------- -- Issue #7567: Don't call `setupterm' twice. +- Stop using the old interface for providing methods and attributes in the _sre + module. Among other things, this gives these classes ``__class__`` + attributes. (See #12099) + +- Issue #10169: Fix argument parsing in socket.sendto() to avoid error masking. + +- Issue #12051: Fix segfault in json.dumps() while encoding highly-nested + objects using the C accelerations. + +- Issue #12017: Fix segfault in json.loads() while decoding highly-nested + objects using the C accelerations. + +- Issue #1838: Prevent segfault in ctypes, when _as_parameter_ on a class is set + to an instance of the class. + +- Issue #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY. + +Build +----- + +- Issue #11411: Fix 'make DESTDIR=' with a relative destination. + +- Issue #10709: Add updated AIX notes in Misc/README.AIX. + +- Issue #11184: Fix large-file support on AIX. + +- Issue #941346: Fix broken shared library build on AIX. + +- Issue #11268: Prevent Mac OS X Installer failure if Documentation + package had previously been installed. + +- Issue #11079: The /Applications/Python x.x folder created by the Mac + OS X installers now includes a link to the installed documentation. + +- Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with + the system-provided Python. + +- Issue #10843: Update third-party library versions used in OS X + 32-bit installer builds: bzip2 1.0.6, readline 6.1.2, SQLite 3.7.4 + (with FTS3/FTS4 and RTREE enabled), and ncursesw 5.5 (wide-char + support enabled). + +- Don't run pgen twice when using make -j. + +- Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in + the configure script but use $GREP instead. Patch by Fabian Groffen. + +- Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD + and DragonFly BSD. Patch by Nicolas Joly. + +- Issue #10655: Fix the build on PowerPC on Linux with GCC when building with + timestamp profiling (--with-tsc): the preprocessor test for the PowerPC + support now looks for "__powerpc__" as well as "__ppc__": the latter seems to + only be present on OS X; the former is the correct one for Linux with GCC. + +- Issue #1099: Fix the build on MacOSX when building a framework with pydebug + using GCC 4.0. + +IDLE +---- + +- Issue #11718: IDLE's open module dialog couldn't find the __init__.py + file in a package. Tests ----- -- Issue #9568: Fix test_urllib2_localnet on OS X 10.3. +- Issue #5723: Improve json tests to be executed with and without accelerations. -- Issue #9145: Fix test_coercion failure in refleak runs. +- Issue #11910: Fix test_heapq to skip the C tests when _heapq is missing. -- Issue #8433: Fix test_curses failure caused by newer versions of - ncurses returning ERR from getmouse() when there are no mouse - events available. +- Fix test_startfile to wait for child process to terminate before finishing. +- Issue #11719: Fix message about unexpected test_msilib skip on non-Windows + platforms. Patch by Nadeem Vawda. -What's New in Python 2.6.6 rc 1? -================================ +- Issue #7108: Fix test_commands to not fail when special attributes ('@' + or '.') appear in 'ls -l' output. -*Release date: 2010-08-03* +- Issue #11490: test_subprocess:test_leaking_fds_on_error no longer gives a + false positive if the last directory in the path is inaccessible. -Core and Builtins ------------------ +- Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch + by Ross Lagerwall. -- Issue #6213: Implement getstate() and setstate() methods of utf-8-sig and - utf-16 incremental encoders. +- Issue #6293: Have regrtest.py echo back sys.flags. This is done by default + in whole runs and enabled selectively using ``--header`` when running an + explicit list of tests. Original patch by Collin Winter. -- Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the - start byte and the continuation byte(s) are now considered invalid, instead - of the number of bytes specified by the start byte. - E.g.: '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and - replaces with U+FFFD only the start byte ('\xf1') and the continuation byte - ('\x80') even if '\xf1' is the start byte of a 4-bytes sequence. - Previous versions returned a single u'\ufffd'. +- Issue #775964: test_grp now skips YP/NIS entries instead of failing when + encountering them. -- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError. +- Issue #7110: regrtest now sends test failure reports and single-failure + tracebacks to stderr rather than stdout. -- 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). -- Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of - __hash__ in 3.x" warning. Also fix "XXX undetected error" that - arises from the "Overriding __eq__ blocks inheritance ..." warning - when turned into an exception: in this case the exception simply - gets ignored. +What's New in Python 2.7.1? +=========================== -- Issue #4108: In urllib.robotparser, if there are multiple 'User-agent: *' - entries, consider the first one. +*Release date: 2010-11-27* -- Issue #9354: Provide getsockopt() in asyncore's file_wrapper. +Library +------- -- In the unicode/str.format(), raise a ValueError when indexes to arguments are - too large. +- Issue #2236: distutils' mkpath ignored the mode parameter. -- Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding - and error handler, instead of writing to the C stderr file in utf-8 +- Fix typo in one sdist option (medata-check). -- Issue #7902: When using explicit relative import syntax, don't try - implicit relative import semantics. +- Issue #10323: itertools.islice() now consumes the minimum number of + inputs before stopping. Formerly, the final state of the underlying + iterator was undefined. -- Issue #7079: Fix a possible crash when closing a file object while using - it from another thread. Patch by Daniel Stutzbach. +- Issue #10565: The collections.Iterator ABC now checks for both + ``__iter__`` and ``next``. -- 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 #10092: Properly reset locale in calendar.Locale*Calendar classes. -- Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize - is passed to bytearray. +- Issue #10459: Update CJK character names to Unicode 5.2. -- Issue #8329: Don't return the same lists from select.select when no fds are - changed. +- Issue #6098: Don't claim DOM level 3 conformance in minidom. -- Raise a TypeError when trying to delete a T_STRING_INPLACE struct member. +- Issue #10561: In pdb, clear the breakpoints by the breakpoint number. -- Issue #1583863: An unicode subclass can now override the __unicode__ method. +- Issue #5762: Fix AttributeError raised by ``xml.dom.minidom`` when an empty + XML namespace attribute is encountered. -- Issue #7507: Quote "!" in pipes.quote(); it is special to some shells. +- Issue #1710703: Write structures for an empty ZIP archive when a ZipFile is + created in modes 'a' or 'w' and then closed without adding any files. Raise + BadZipfile (rather than IOError) when opening small non-ZIP files. -- Issue #7544: Preallocate thread memory before creating the thread to avoid - a fatal error in low memory condition. +- Issue #4493: urllib2 adds '/' in front of path components which does not + start with '/. Common behavior exhibited by browsers and other clients. -- Issue #7820: The parser tokenizer restores all bytes in the right if - the BOM check fails. +- Issue #6378: idle.bat now runs with the appropriate Python version rather than + the system default. Patch by Sridhar Ratnakumar. -- Issue #7072: isspace(0xa0) is true on Mac OS X +- Issue #10407: Fix one NameError in distutils. -C-API +- Issue #10198: fix duplicate header written to wave files when writeframes() + is called without data. + +- Issue #10467: Fix BytesIO.readinto() after seeking into a position after the + end of the file. + +- Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru. + +Build ----- -- Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows - embedders of the interpreter to set sys.argv without also modifying - sys.path. This helps fix `CVE-2008-5983 - <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_. +- 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 + fixes an interpreter crash when initializing an instance of a long + subclass from an object whose __long__ method returns a plain int. + +- Issue #10006: type.__abstractmethods__ now raises an AttributeError. + +- Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid + thread-local storage key. + +- Issue #4947: The write() method of sys.stdout and sys.stderr uses their + encoding and errors attributes instead of using utf-8 in strict mode, to get + the same behaviour than the print statement. + +- Issue #9737: Fix a crash when trying to delete a slice or an item from + a memoryview object. + +- Restore GIL in nis_cat in case of error. + +- Issue #9688: __basicsize__ and __itemsize__ must be accessed as Py_ssize_t. + +- Issue #8530: Prevent stringlib fastsearch from reading beyond the front + of an array. + +- Issue #83755: Implicit set-to-frozenset conversion was not thread-safe. + +- Issue #9416: Fix some issues with complex formatting where the + output with no type specifier failed to match the str output: + + - format(complex(-0.0, 2.0), '-') omitted the real part from the output, + - format(complex(0.0, 2.0), '-') included a sign and parentheses. + +- Issue #7616: Fix copying of overlapping memoryview slices with the Intel + compiler. Library ------- -- Issue #8447: Make distutils.sysconfig follow symlinks in the path to - the interpreter executable. This fixes a failure of test_httpservers - on OS X. +- Issue #9926: Wrapped TestSuite subclass does not get __call__ executed -- Issue #7092: Fix the DeprecationWarnings emitted by the standard library - when using the -3 flag. Patch by Florent Xicluna. +- Issue #4471: Properly shutdown socket in IMAP.shutdown(). Patch by + Lorenzo M. Catucci. -- Issue #7395: Fix tracebacks in pstats interactive browser. +- Issue #10126: Fix distutils' test_build when Python was built with + --enable-shared. -- Issue #1713: Fix os.path.ismount(), which returned true for symbolic links - across devices. +- Fix typo in one sdist option (medata-check). -- Issue #8826: Properly load old-style "expires" attribute in http.cookies. +- Issue #9199: Fix incorrect use of distutils.cmd.Command.announce. -- Issue #1690103: Fix initial namespace for code run with trace.main(). +- Issue #1718574: Fix options that were supposed to accept arguments but did + not in build_clib. + +- Issue #9281: Prevent race condition with mkdir in distutils. Patch by + Arfrever. + +- Issue #10229: Fix caching error in gettext. + +- Issue #10252: Close file objects in a timely manner in distutils code and + tests. Patch by Brian Brazil, completed by Éric Araujo. + +- Issue #10311: The signal module now restores errno before returning from + its low-level signal handler. Patch by Hallvard B Furuseth. + +- Issue #10038: json.loads() on str should always return unicode (regression + from Python 2.6). Patch by Walter Dörwald. + +- Issue #120176: Wrapped TestSuite subclass does not get __call__ executed. + +- Issue #6706: asyncore accept() method no longer raises + EWOULDBLOCK/ECONNABORTED on incomplete connection attempt but returns None + instead. + +- Issue #10266: uu.decode didn't close in_file explicitly when it was given + as a filename. Patch by Brian Brazil. + +- Issue #10246: uu.encode didn't close file objects explicitly when filenames + were given to it. Patch by Brian Brazil. + +- Issue #10253: FileIO leaks a file descriptor when trying to open a file + for append that isn't seekable. Patch by Brian Brazil. + +- Issue #6105: json.dumps now respects OrderedDict's iteration order. + +- Issue #9295: Fix a crash under Windows when calling close() on a file + object with custom buffering from two threads at once. + +- Issue #5027: The standard ``xml`` namespace is now understood by + xml.sax.saxutils.XMLGenerator as being bound to + http://www.w3.org/XML/1998/namespace. Patch by Troy J. Farrell. + +- Issue #10163: Skip unreadable registry keys during mimetypes + initialization. + +- Issue #5117: Fixed root directory related issue on posixpath.relpath() and + ntpath.relpath(). + +- Issue #9409: Fix the regex to match all kind of filenames, for interactive + debugging in doctests. + +- Issue #6612: Fix site and sysconfig to catch os.getcwd() error, eg. if the + current directory was deleted. Patch written by W. Trevor King. + +- Issue #10045: Improved performance when writing after seeking past the + end of the "file" in cStringIO. + +- Issue #9948: Fixed problem of losing filename case information. + +- Issue #9437: Fix building C extensions with non-default LDFLAGS. + +- Issue #9759: GzipFile now raises ValueError when an operation is attempted + after the file is closed. Patch by Jeffrey Finkelstein. + +- Issue #9042: Fix interaction of custom translation classes and caching in + gettext. + +- Issue #9065: tarfile no longer uses "root" as the default for the uname and + gname field. + +- Issue #1050268: parseaddr now correctly quotes double quote and backslash + characters that appear inside quoted strings in email addresses. + +- Issue #10004: quoprimime no longer generates a traceback when confronted + with invalid characters after '=' in a Q-encoded word. + +- Issue #9950: Fix socket.sendall() crash or misbehaviour when a signal is + received. Now sendall() properly calls signal handlers if necessary, + and retries sending if these returned successfully, including on sockets + with a timeout. + +- Issue #9947: logging: Fixed locking bug in stopListening. + +- Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler. + +- Issue #9936: Fixed executable lines' search in the trace module. + +- Issue #9928: Properly initialize the types exported by the bz2 module. + +- Issue #9854: The default read() implementation in io.RawIOBase now + handles non-blocking readinto() returning None correctly. + +- Issue #9729: Fix the signature of SSLSocket.recvfrom() and + SSLSocket.sendto() to match the corresponding socket methods. Also, + fix various SSLSocket methods to raise socket.error rather than an + unhelpful TypeError when called on an unconnected socket. Original patch + by Andrew Bennetts. + +- Issue #9826: OrderedDict.__repr__ can now handle self-referential + values: d['x'] = d. + +- Issue #767645: Set os.path.supports_unicode_filenames to True on Mac OS X. + +- Issue #9837: The read() method of ZipExtFile objects (as returned by + ZipFile.open()) could return more bytes than requested. + +- Issue #9825: removed __del__ from the definition of collections.OrderedDict. + This prevents user-created self-referencing ordered dictionaries from + becoming permanently uncollectable GC garbage. The downside is that + removing __del__ means that the internal doubly-linked list has to wait for + GC collection rather than freeing memory immediately when the refcnt drops + to zero. + +- Issue #9816: random.Random.jumpahead(n) did not produce a sufficiently + different internal state for small values of n. Fixed by salting the + value. + +- Issue #9792: In case of connection failure, socket.create_connection() + would swallow the exception and raise a new one, making it impossible + to fetch the original errno, or to filter timeout errors. Now the + original error is re-raised. + +- Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True, + and the passed buffer was exactly 1024 bytes long, the buffer wouldn't + be updated back after the system call. Original patch by Brian Brazil. + +- Issue #1100562: Fix deep-copying of objects derived from the list and + dict types. Patch by Michele Orrù and Björn Lindqvist. + +- Issue #7005: Fixed output of None values for RawConfigParser.write and + ConfigParser.write. + +- Issue #808164: Fixed socket.close to avoid references to globals, to + avoid issues when socket.close is called from a __del__ method. + +- Issue #2986: difflib.SequenceMatcher gets a new parameter, autojunk, which + can be set to False to turn off the previously undocumented 'popularity' + heuristic. Patch by Terry Reedy and Eli Bendersky + +- Issue #8797: urllib2 does a retry for Basic Authentication failure instead of + falling into recursion. + +- Issue #1194222: email.utils.parsedate now returns RFC2822 compliant four + character years even if the message contains RFC822 two character years. + +- Issue #8750: Fixed MutableSet's methods to correctly handle + reflexive operations, namely x -= x and x ^= x. + +- Issue #9129: smtpd.py is vulnerable to DoS attacks deriving from missing + error handling when accepting a new connection. + +- Issue #658749: asyncore's connect() method now correctly interprets winsock + errors. + +- Issue #9501: Fixed logging regressions in cleanup code. + +- Issue #9214: Set operations on KeysView or ItemsView in the collections + module now correctly return a set. (Patch by Eli Bendersky.) + +- Issue #9617: Signals received during a low-level write operation aren't + ignored by the buffered IO layer anymore. + +- Issue #2521: Use weakrefs on for caching in the abc module, so that classes + are not held onto after they are deleted elsewhere. + +- Issue #9626: the view methods for collections.OrderedDict() were returning + the unordered versions inherited from dict. Those methods are now + overridden to provide ordered views. + +- Issue #8688: MANIFEST files created by distutils now include a magic + comment indicating they are generated. Manually maintained MANIFESTs + without this marker will not be overwritten or removed. + +- Issue #7467: when reading a file from a ZIP archive, its CRC is checked + and a BadZipfile error is raised if it doesn't match (as used to be the + case in Python 2.5 and earlier). + +- Issue #9550: a BufferedReader could issue an additional read when the + original read request had been satisfied, which could block indefinitely + when the underlying raw IO channel was e.g. a socket. Report and original + patch by Jason V. Miller. + +- Issue #9551: Don't raise TypeError when setting the value to None for + SafeConfigParser instances constructed with allow_no_value == True. + +- Issue #6915: Under Windows, os.listdir() didn't release the Global + Interpreter Lock around all system calls. Original patch by Ryan Kelly. + +- Issue #3757: thread-local objects now support cyclic garbage collection. + Thread-local objects involved in reference cycles will be deallocated + timely by the cyclic GC, even if the underlying thread is still running. + +- Issue #6231: Fix xml.etree.ElementInclude to include the tail of the + 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. @@ -216,6 +881,9 @@ Library - 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(). @@ -227,27 +895,37 @@ Library - Issue #8198: In pydoc, output all help text to the correct stream when sys.stdout is reassigned. -- Issue #1019882: Fix IndexError when loading certain hotshot stats. +- Issue #7395: Fix tracebacks in pstats interactive browser. + +- Issue #8230: Fix Lib/test/sortperf.py. + +- Issue #1713: Fix os.path.ismount(), which returned true for symbolic links + across devices. + +- Issue #8826: Properly load old-style "expires" attribute in http.cookies. + +- Issue #1690103: Fix initial namespace for code run with trace.main(). - Issue #8471: In doctest, properly reset the output stream to an empty string when Unicode was previously output. -- Issue #8397: Raise an error when attempting to mix iteration and regular - reads on a BZ2File object, rather than returning incorrect results. - - Issue #8620: when a Cmd is fed input that reaches EOF without a final newline, it no longer truncates the last character of the last command line. -- Issue #7066: archive_util.make_archive now restores the cwd if an error is - raised. Initial patch by Ezio Melotti. +- Issue #6213: Implement getstate() and setstate() methods of utf-8-sig and + utf-16 incremental encoders. -- Issue #5006: Better handling of unicode byte-order marks (BOM) in the io - library. This means, for example, that opening an UTF-16 text file in append - mode doesn't add a BOM at the end of the file if the file isn't empty. +- Issue #7113: Speed up loading in ConfigParser. Patch by Łukasz Langa. - Issue #3704: cookielib was not properly handling URLs with a / in the parameters. +- Issue #9032: XML-RPC client retries the request on EPIPE error. The EPIPE + error occurs when the server closes the socket and the client sends a big + XML-RPC request. + +- Issue #5542: Remove special logic that closes HTTPConnection socket on EPIPE. + - Issue #4629: getopt raises an error if an argument ends with = whereas getopt doesn't except a value (eg. --help= is rejected if getopt uses ['help='] long options). @@ -258,11 +936,6 @@ Library I/O error occurred. Now an IOError is raised instead. Patch by chuck (Jan Hosang). -- Issue #1555570: email no longer inserts extra blank lines when a \r\n - combo crosses an 8192 byte boundary. - -- Issue #9164: Ensure sysconfig handles dupblice archs while building on OSX - - Issue #7646: The fnmatch pattern cache no longer grows without bound. - Issue #9136: Fix 'dictionary changed size during iteration' @@ -273,33 +946,328 @@ Library power of 10 and the exponent is tiny (for example, Decimal(10) ** Decimal('1e-999999999')). +- Issue #9161: Fix regression in optparse's acceptance of unicode + strings in add_option calls. + - Issue #9130: Fix validation of relative imports in parser module. - Issue #9128: Fix validation of class decorators in parser module. -- Issue #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 #9164: Ensure sysconfig handles dupblice archs while building on OSX -- Issue #6589: cleanup asyncore.socket_map in case smtpd.SMTPServer constructor - raises an exception. +- Issue #9315: Fix for the trace module to record correct class name + for tracing methods. + +Extension Modules +----------------- + +- Issue #9054: Fix a crash occurring when using the pyexpat module + with expat version 2.0.1. + +- Issue #10003: Allow handling of SIGBREAK on Windows. Fixes a regression + introduced by issue #9324. + +- Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file + descriptor is provided. Patch by Pascal Chambon. + +- Issue #7736: Release the GIL around calls to opendir() and closedir() + in the posix module. Patch by Marcin Bachry. + +- As a result of issue #2521, the _weakref module is now compiled into the + interpreter by default. + +- Issue #9324: Add parameter validation to signal.signal on Windows in order + to prevent crashes. + +- Issue #9526: Remove some outdated (int) casts that were preventing + the array module from working correctly with arrays of more than + 2**31 elements. + +- Fix memory leak in ssl._ssl._test_decode_cert. + +- Issue #8065: Fix memory leak in readline module (from failure to + free the result of history_get_history_state()). + +- Issue #9450: Fix memory leak in readline.replace_history_item and + readline.remove_history_item for readline version >= 5.0. + +- Issue #8105: Validate file descriptor passed to mmap.mmap on Windows. + +- Issue #1019882: Fix IndexError when loading certain hotshot stats. + +- Issue #9422: Fix memory leak when re-initializing a struct.Struct object. + +- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly + compared to other unix systems. In particular, os.getgroups() does + not reflect any changes made using os.setgroups() but basicly always + returns the same information as the id command. + + os.getgroups() can now return more than 16 groups on MacOSX. + +- Issue #9277: Fix bug in struct.pack for bools in standard mode + (e.g., struct.pack('>?')): if conversion to bool raised an exception + then that exception wasn't properly propagated on machines where + char is unsigned. + +- Issue #7567: Don't call `setupterm' twice. + + +Tools/Demos +----------- + +- Issue #7287: Demo/imputil/knee.py was removed. + +- Issue #9188: The gdb extension now handles correctly narrow (UCS2) as well + as wide (UCS4) unicode builds for both the host interpreter (embedded + inside gdb) and the interpreter under test. + +Build +----- + +- Issue #8852: Allow the socket module to build on OpenSolaris. + +- Issue #10054: Some platforms provide uintptr_t in inttypes.h. Patch by + Akira Kitada. + +- Issue #10055: Make json C89-compliant in UCS4 mode. + +- Issue #1633863: Don't ignore $CC under AIX. + +- Issue #9810: Compile bzip2 source files in python's project file + directly. It used to be built with bzip2's makefile. + +- Issue #941346: Improve the build process under AIX and allow Python to + be built as a shared library. Patch by Sébastien Sablé. + +- Issue #4026: Make the fcntl extension build under AIX. Patch by Sébastien + Sablé. + +- Issue #3101: Helper functions _add_one_to_index_C() and + _add_one_to_index_F() become _Py_add_one_to_index_C() and + _Py_add_one_to_index_F(), respectively. + +- Issue #9700: define HAVE_BROKEN_POSIX_SEMAPHORES under AIX 6.x. Patch by + Sébastien Sablé. + +- Issue #9280: Make sharedinstall depend on sharedmods. + +- Issue #9275: The OSX installer once again installs links to binaries in + ``/usr/local/bin``. + +- Issue #9392: A framework build on OSX will once again use a versioned name + of the ``2to3`` tool, that is you can use ``2to3-2.7`` to select the Python + 2.7 edition of 2to3. + +- Issue #9701: The MacOSX installer can patch the shell profile to ensure that + the "bin" directory inside the framework is on the shell's search path. This + feature now also supports the ZSH shell. + +- Issue #7473: avoid link errors when building a framework with a different + set of architectures than the one that is currently installed. + +Tests +----- + +- Issue #9978: Wait until subprocess completes initialization. (Win32KillTests + in test_os) + +- Issue #9894: Do not hardcode ENOENT in test_subprocess. + +- Issue #9323: Make test.regrtest.__file__ absolute, this was not always the + case when running profile or trace, for example. + +- Issue #9315: Added tests for the trace module. Patch by Eli Bendersky. + +- Strengthen test_unicode with explicit type checking for assertEqual tests. + +- Issue #8857: Provide a test case for socket.getaddrinfo. + +- Issue #7564: Skip test_ioctl if another process is attached to /dev/tty. + +- Issue #8433: Fix test_curses failure with newer versions of ncurses. + +- Issue #9496: Provide a test suite for the rlcompleter module. Patch by + Michele Orrù. + +- Issue #8605: Skip test_gdb if Python is compiled with optimizations. + +- Issue #9568: Fix test_urllib2_localnet on OS X 10.3. + +Documentation +------------- + +- Issue #9817: Add expat COPYING file; add expat, libffi and expat licenses + to Doc/license.rst. + +- Issue #9524: Document that two CTRL* signals are meant for use only + with os.kill. + +- Issue #9255: Document that the 'test' package is for internal Python use + only. + +- Issue #7829: Document in dis that bytecode is an implementation detail. + + +What's New in Python 2.7? +========================= + +*Release date: 2010-07-03* + +Core and Builtins +----------------- + +- Prevent assignment to set literals. + +Library +------- + +- Issue #1868: Eliminate subtle timing issues in thread-local objects by + getting rid of the cached copy of thread-local attribute dictionary. - Issue #9125: Add recognition of 'except ... as ...' syntax to parser module. -- Issue #9085: email package version number bumped to its correct - value of 4.0.2 (same as it was in 2.5). +Extension Modules +----------------- + +- Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module, + ensure that the input string length is a multiple of the frame size. - Issue #9075: In the ssl module, remove the setting of a ``debug`` flag on an OpenSSL structure. -- Issue #5610: feedparser no longer eats extra characters at the end of - a body part if the body part ends with a \r\n. + +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. -- Fix codecs.escape_encode to return the correct consumed size. +- Issue #8948: cleanup functions and class / module setups and teardowns are + now honored in unittest debug methods. + +Documentation +------------- + +- Issues #8909: Added the size of the bitmap used in the installer created by + distutils' bdist_wininst. Patch by Anatoly Techtonik. + +Misc +---- + +- Issue #8362: Add maintainers.rst: list of module maintainers + + +What's New in Python 2.7 Release Candidate 1? +============================================= + +*Release date: 2010-06-05* + +Core and Builtins +----------------- + +- Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the + start byte and the continuation byte(s) are now considered invalid, instead + of the number of bytes specified by the start byte. + E.g.: '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and + replaces with U+FFFD only the start byte ('\xf1') and the continuation byte + ('\x80') even if '\xf1' is the start byte of a 4-bytes sequence. + Previous versions returned a single u'\ufffd'. + +- Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of + __hash__ in 3.x" warning. Also fix "XXX undetected error" that + arises from the "Overriding __eq__ blocks inheritance ..." warning + when turned into an exception: in this case the exception simply + gets ignored. + +- Issue #8748: Fix two issues with comparisons between complex and integer + objects. (1) The comparison could incorrectly return True in some cases + (2**53+1 == complex(2**53) == 2**53), breaking transivity of equality. + (2) The comparison raised an OverflowError for large integers, leading + to unpredictable exceptions when combining integers and complex objects + in sets or dicts. + +- Issue #5211: Implicit coercion for the complex type is now completely + removed. (Coercion for arithmetic operations was already removed in 2.7 + alpha 4, but coercion for rich comparisons was accidentally left in.) + +- Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding + and error handler, instead of writing to the C stderr file in utf-8 + +- Issue #7902: When using explicit relative import syntax, don't try implicit + relative import semantics. + +- Issue #7079: Fix a possible crash when closing a file object while using it + from another thread. Patch by Daniel Stutzbach. + +- Issue #8868: Fix that ensures that python scripts have access to the + Window Server again in a framework build on MacOSX 10.5 or earlier. + +C-API +----- + +- Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows embedders + of the interpreter to set sys.argv without also modifying sys.path. This + helps fix `CVE-2008-5983 + <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_. + +Library +------- + +- Issue #8302: SkipTest in unittest.TestCase.setUpClass or setUpModule is now + reported as a skip rather than an error. + +- Issue #8351: Excessively large diffs due to + unittest.TestCase.assertSequenceEqual are no longer included in failure + reports. + +- Issue #8899: time.struct_time now has class and atribute docstrings. + +- Issue #4487: email now accepts as charset aliases all codec aliases + accepted by the codecs module. - Issue #6470: Drop UNC prefix in FixTk. +- Issue #5610: feedparser no longer eats extra characters at the end of + a body part if the body part ends with a \r\n. + - Issue #8833: tarfile created hard link entries with a size field != 0 by mistake. @@ -312,9 +1280,7 @@ Library - Issue #6662: Fix parsing of malformatted charref (&#bad;), patch written by Fredrik Håård -- Issue #1628205: Socket file objects returned by socket.socket.makefile() now - properly handles EINTR within the read, readline, write & flush methods. - The socket.sendall() method now properly handles interrupted system calls. +- Issue #8016: Add the CP858 codec. - Issue #3924: Ignore cookies with invalid "version" field in cookielib. @@ -323,672 +1289,1205 @@ Library StreamWriter classes. - Issue #5640: Fix Shift-JIS incremental encoder for error handlers different - than strict + 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 +- Issue #8729: Return NotImplemented from ``collections.Mapping.__eq__()`` when comparing to a non-mapping. -- Issue #5918: Fix a crash in the parser module. +- Issue #8759: Fix user paths in sysconfig for posix and os2 schemes. + +- Issue #1285086: Speed up ``urllib.quote()`` and urllib.unquote for simple + cases. - Issue #8688: Distutils now recalculates MANIFEST everytime. -- Issue #7640: In the new `io` module, fix relative seek() for buffered - readable streams when the internal buffer isn't empty. Patch by Pascal - Chambon. +- 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 #5099: subprocess.Popen.__del__ no longer references global objects, - leading to issues during interpreter shutdown. +- 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 #8681: Make the zlib module's error messages more informative when - the zlib itself doesn't give any detailed explanation. +- 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. + overflow checks in the ``audioop`` module. -- Issue #8571: Fix an internal error when compressing or decompressing a - chunk larger than 1GB with the zlib module's compressor and decompressor - objects. +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 #8573: asyncore _strerror() function might throw ValueError. +- Issue #7319: When -Q is used, do not silence DeprecationWarning. -- 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. +- 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-François Natali. -- Issue #4265: shutil.copyfile() was leaking file descriptors when disk fills. - Patch by Tres Seaver. +- Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize is + passed to bytearray. -- Issue #8621: uuid.uuid4() returned the same sequence of values in the - parent and any children created using ``os.fork`` on MacOS X 10.6. +- Issue #7072: ``isspace(0xa0)`` is true on Mac OS X. -- Issue #8313: traceback.format_exception_only() encodes unicode message to - ASCII with backslashreplace error handler if str(value) failed +- Issue #8404: Fix set operations on dictionary views. -- 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 #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. Initial patch by Pascal Chambon. + exceptions raised by the implicit flush(). Also ensure that calling close() + several times is supported. Patch by Pascal Chambon. -- Issue #8581: logging: removed errors raised when closing handlers twice. +- Issue #8576: logging updated to remove usage of find_unused_port(). - Issue #4687: Fix accuracy of garbage collection runtimes displayed with gc.DEBUG_STATS. -- Issue #8354: The siginterrupt setting is now preserved for all signals, - not just SIGCHLD. +- Issue #8354: The siginterrupt setting is now preserved for all signals, not + just SIGCHLD. -- Issue #8577: distutils.sysconfig.get_python_inc() now makes a difference +- Issue #7192: ``webbrowser.get("firefox")`` now works on Mac OS X, as does + ``webbrowser.get("safari")``. + +- Issue #8577: ``distutils.sysconfig.get_python_inc()`` now makes a difference between the build dir and the source dir when looking for "python.h" or "Include". -- Issue #8464: tarfile no longer creates files with execute permissions set - when mode="w|" is used. +- Issue #8464: tarfile no longer creates files with execute permissions set when + mode="w|" is used. + +- Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of + the Linux kernel. Patch by Yaniv Aknin. + +- Issue #6312: Fix http HEAD request when the transfer encoding is chunked. It + should correctly return an empty response now. -- Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions - of the Linux kernel. Patch by Yaniv Aknin. +- Issue #7490: To facilitate sharing of doctests between 2.x and 3.x test + suites, the ``IGNORE_EXCEPTION_DETAIL`` directive now also ignores the module + location of the raised exception. Based on initial patch by Lennart Regebro. -- Issue #6312: Fixed http HEAD request when the transfer encoding is chunked. - It should correctly return an empty response now. +- Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline before + the certificate footer. Patch by Kyle VanderBeek. -- Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline - before the certificate footer. Patch by Kyle VanderBeek. +- Issue #8546: Reject None given as the buffering argument to ``_pyio.open()``. -- Issue #8549: Fix compiling the _ssl extension under AIX. Patch by - Sridhar Ratnakumar. +- Issue #8549: Fix compiling the _ssl extension under AIX. Patch by Sridhar + Ratnakumar. -- Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, - where the method could block indefinitely if called just before the - event loop started running. This also fixes the occasional freezes - witnessed in test_httpservers. +- Issue #6656: Fix locale.format_string to handle escaped percents and mappings. + +- Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, where + the method could block indefinitely if called just before the event loop + started running. This also fixes the occasional freezes witnessed in + test_httpservers. - Issue #5103: SSL handshake would ignore the socket timeout and block indefinitely if the other end didn't respond. -- The do_handshake() method of SSL objects now adjusts the blocking mode of - the SSL structure if necessary (as other methods already do). +- The do_handshake() method of SSL objects now adjusts the blocking mode of the + SSL structure if necessary (as other methods already do). + +- Issue #7507: Quote "!" in pipes.quote(); it is special to some shells. -- Issue #5238: Calling makefile() on an SSL object would prevent the - underlying socket from being closed until all objects get truely destroyed. +- Issue #5238: Calling makefile() on an SSL object would prevent the underlying + socket from being closed until all objects get truely destroyed. -- Issue #7943: Fix circular reference created when instantiating an SSL - socket. Initial patch by Péter Szabó. +- Issue #7943: Fix circular reference created when instantiating an SSL socket. + Initial patch by Péter Szabó. -- Issue #8108: Fix the unwrap() method of SSL objects when the socket has - a non-infinite timeout. Also make that method friendlier with applications +- Issue #8451: Syslog module now uses basename(sys.argv[0]) instead of the + string "python" as the *ident*. openlog() arguments are all optional and + keywords. + +- Issue #8108: Fix the unwrap() method of SSL objects when the socket has a + non-infinite timeout. Also make that method friendlier with applications wanting to continue using the socket in clear-text mode, by disabling OpenSSL's internal readahead. Thanks to Darryl Miles for guidance. -- Issue #8484: Load all ciphers and digest algorithms when initializing - the _ssl extension, such that verification of some SSL certificates - doesn't fail because of an "unknown algorithm". +- Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl + extension, such that verification of some SSL certificates doesn't fail + because of an "unknown algorithm". + +- Issue #8437: Fix test_gdb failures, patch written by Dave Malcolm + +- Issue #4814: The timeout parameter is now applied also for connections + resulting from PORT/EPRT commands. + +- Issue #8463: Add missing reference to bztar in shutil's documentation. + +- Issue #8438: Remove reference to the missing "surrogateescape" encoding error + handler from the new IO library. -- Issue #4814: timeout parameter is now applied also for connections resulting - from PORT/EPRT commands. +- Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code + as stated in RFC-959 at chapter 5.4. -- Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response - code as stated in RFC-959 at chapter 5.4. +- Issue #8279: Fix test_gdb failures. + +- Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the + available cipher list. Helps fix test_ssl with OpenSSL 1.0.0. + +- Issue #2987: RFC 2732 support for urlparse (IPv6 addresses). Patch by Tony + Locke and Hans Ulrich Niedermann. + +- Issue #7585: difflib context and unified diffs now place a tab between + filename and date, conforming to the 'standards' they were originally designed + to follow. This improves compatibility with patch tools. + +- Issue #7472: Fixed typo in email.encoders module; messages using ISO-2022 + character sets will now consistently use a Content-Transfer-Encoding of 7bit + rather than sometimes being marked as 8bit. + +- Issue #8330: Fix expected output in test_gdb. + +- Issue #8374: Update the internal alias table in the :mod:`locale` module to + cover recent locale changes and additions. + +Extension Modules +----------------- + +- Issue #8644: Improved accuracy of ``timedelta.total_seconds()``. + +- Use Clang 2.7's static analyzer to find places to clean up some code. + +- Build the ossaudio extension on GNU/kFreeBSD. + +- On Windows, ctypes does no longer check the stack before and after calling a + foreign function. This allows to use the unmodified libffi library. + +Tests +----- + +- Issue #8672: Add a zlib test ensuring that an incomplete stream can be handled + by a decompressor object without errors (it returns incomplete uncompressed + data). + +- Issue #8490: asyncore now has a more solid test suite which actually tests its + API. + +- Issue #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 #8179: Fix macpath.realpath() on a non-existing path. +- 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 #7667: Fix doctest failures with non-ASCII paths. +- Issue #8257: The Decimal construct now accepts a float instance directly, + converting that float to a Decimal of equal value: -- Issue #7624: Fix isinstance(foo(), collections.Callable) for old-style - classes. + >>> 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 Ożarowski). + +- 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. + 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 #6544: fix a reference leak in the kqueue implementation's error - handling. - -- Issue #7774: Set sys.executable to an empty string if argv[0] has been - set to an non existent program name and Python is unable to retrieve the real - program name - -- Issue #6906: Tk should not set Unicode environment variables on Windows. +- Issue #8179: Fix macpath.realpath() on a non-existing path. -- Issue #1054943: Fix unicodedata.normalize('NFC', text) for the Public Review - Issue #29 +- Issue #8024: Update the Unicode database to 5.2. -- Issue #7494: fix a crash in _lsprof (cProfile) after clearing the profiler, - reset also the pointer to the current pointer context. +- Issue #8104: socket.recv_into() and socket.recvfrom_into() now support writing + into objects supporting the new buffer API, for example bytearrays or + memoryviews. - Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox with Tcl/Tk-8.5. -- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of - the locale. +- Issue #8140: Extend compileall to compile single files. Add -i option. + +- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the + locale. + +- Issue #7774: Set sys.executable to an empty string if ``argv[0]`` has been set + to an non existent program name and Python is unable to retrieve the real + program name. + +- Issue #8117: logging: Improved algorithm for computing initial rollover time + for ``TimedRotatingFileHandler`` by using the modification time of an existing + log file to compute the next rollover time. If the log file does not exist, + the current time is used as the basis for the computation. + +- Issue #6472: The ``xml.etree`` package is updated to ElementTree 1.3. The + cElementTree module is updated too. + +- Issue #7880: Fix sysconfig when the python executable is a symbolic link. + +- Issue #7624: Fix ``isinstance(foo(), collections.Callable)`` for old-style + classes. + +- Issue #7143: email: ``get_payload()`` used to strip any trailing newline from + a base64 transfer-encoded payload *after* decoding it; it no longer does. + This is a behavior change, so email's minor version number is now bumped, to + version 4.0.2, for the 2.7 release. + +- Issue #8235: _socket: Add the constant ``SO_SETFIB``. SO_SETFIB is + a socket option available on FreeBSD 7.1 and newer. + +- Issue #8038: unittest.TestCase.assertNotRegexpMatches + +- Addition of -b command line option to unittest for buffering stdout / stderr + during test runs. + +- Issue #1220212: Added os.kill support for Windows, including support for + sending CTRL+C and CTRL+BREAK events to console subprocesses. Extension Modules ----------------- -- Fix memory leak in ssl._ssl._test_decode_cert. +- Issue #8314: Fix unsigned long long bug in libffi on Sparc v8. -- Issue #9422: Fix memory leak when re-initializing a struct.Struct object. +- Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument. -- Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly - compared to other unix systems. In particular, os.getgroups() does - not reflect any changes made using os.setgroups() but basicly always - returns the same information as the id command. +- Issue #8156: bsddb module updated to version 4.8.4. + http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.8.4. This update drops + support for Berkeley DB 4.0, and adds support for 4.8. - os.getgroups() can now return more than 16 groups on MacOSX. +- Issue #3928: os.mknod() now available in Solaris, also. -- Issue #9277: Fix bug in struct.pack for bools in standard mode - (e.g., struct.pack('>?')): if conversion to bool raised an exception - then that exception wasn't properly propagated on machines where - char is unsigned. +- Issue #8142: Update libffi to the 3.0.9 release. -- Issue #7384: If the system readline library is linked against - ncurses, do not link the readline module against ncursesw. The - additional restriction of linking the readline and curses modules - against the same curses library is currently not enabled. +- Issue #8300: When passing a non-integer argument to struct.pack with any + integer format code, struct.pack first attempts to convert the non-integer + using its __index__ method. If that method is non-existent or raises + TypeError it goes on to try the __int__ method, as described below. -- 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 #1530559: When passing a non-integer argument to struct.pack with *any* + integer format code (one of 'bBhHiIlLqQ'), struct.pack attempts to use the + argument's __int__ method to convert to an integer before packing. It also + produces a DeprecationWarning in this case. (In Python 2.6, the behaviour was + inconsistent: __int__ was used for some integer codes but not for others, and + the set of integer codes for which it was used differed between native packing + and standard packing.) + +- Issue #7347: _winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a bug in + the return value of QueryReflectionKey. + +Tools/Demos +----------- + +- Issue #7993: Add a test of IO packet processing bandwidth to ccbench. It + measures the number of UDP packets processed per second depending on the + number of background CPU-bound Python threads. + +- python-config now supports multiple options on the same command line. Build ----- -- Issue #8854: Fix finding Visual Studio 2008 on Windows x64. - -- Issue #3928: os.mknod() now available in Solaris, also. +- Issue #8032: For gdb7, a python-gdb.py file is added to the build, allowing to + use advanced gdb features when debugging Python. -- Issue #8175: --with-universal-archs=all works correctly on OSX 10.5 +- Issue #1628484: The Makefile doesn't ignore the CFLAGS environment variable + anymore. It also forwards the LDFLAGS settings to the linker when building a + shared library. - Issue #6716: Quote -x arguments of compileall in MSI installer. -- Issue #1628484: The Makefile doesn't ignore the CFLAGS environment - variable anymore. It also forwards the LDFLAGS settings to the linker - when building a shared library. +- Issue #7705: Fix linking on FreeBSD. -Tests ------ +- Make sure that the FreeBSD build of the included libffi uses the proper + assembly file. -- Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are - effectively raised. A new private utility ``_check_py3k_warnings`` has been - backported to help silencing py3k warnings. +C-API +----- -- Issue #8672: Add a zlib test ensuring that an incomplete stream can be - handled by a decompressor object without errors (it returns incomplete - uncompressed data). +- Issue #8276: PyEval_CallObject() is now only available in macro form. The + function declaration, which was kept for backwards compatibility reasons, is + now removed (the macro was introduced in 1997!). -- Issue #8629: Disable some test_ssl tests, since they give different - results with OpenSSL 1.0.0 and higher. +- Issue #7992: A replacement PyCObject API, PyCapsule, has been backported from + Python 3.1. All existing Python CObjects in the main distribution have been + converted to capsules. To address backwards-compatibility concerns, + PyCObject_AsVoidPtr() was changed to understand capsules. -- Issue #8576: Remove use of find_unused_port() in test_smtplib and - test_multiprocessing. Patch by Paul Moore. +Tests +----- -- Issue #7027: regrtest.py keeps a reference to the encodings.ascii module as a - workaround to #7140 bug +- Issue #3864: Skip three test_signal tests on freebsd6 because they fail if any + thread was previously started, most likely due to a platform bug. -- Issue #3864: Skip three test_signal tests on freebsd6 because they fail - if any thread was previously started, most likely due to a platform bug. +- Issue #8348: Fix test ftp url in test_urllib2net. -- Issue #8193: Fix test_zlib failure with zlib 1.2.4. +- Issue #8204: Fix test_ttk notebook test by forcing focus. -Documentation -------------- +- Issue #8344: Fix test_ttk bug on FreeBSD. -- Issue #9255: Document that the 'test' package is for internal Python use - only. +- Issue #8193: Fix test_zlib failure with zlib 1.2.4. -- Issue #8909: Added the size of the bitmap used in the installer created by - distutils' bdist_wininst. Patch by Anatoly Techtonik. +- Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi. +- Issue #8263: Now regrtest.py will report a failure if it receives a + KeyboardInterrupt (SIGINT). -What's New in Python 2.6.5? -=========================== +- Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special + Unicode normalization cases. -*Release date: 2010-03-18* +- Issue #7783: test.test_support.open_urlresource invalidates the outdated files + from the local cache. -What's New in Python 2.6.5 rc 2? -================================ +What's New in Python 2.7 alpha 4? +================================= -*Release date: 2010-03-09* +*Release date: 2010-03-06* Core and Builtins ----------------- -- Issue #8089: a OS X framework build with --with-universal-archs=3-way|intel - had no way to select a 32-bit executable. +- Issue #7544: Preallocate thread memory before creating the thread to avoid a + fatal error in low memory condition. -- Issue #8084: fixes build issues on OSX 10.6 when targetting OSX 10.4. +- Issue #7820: The parser tokenizer restores all bytes in the right if the BOM + check fails. + +- Issue #7309: Fix unchecked attribute access when converting + UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings. + +- Issue #7649: "u'%c' % char" now behaves like "u'%s' % char" and raises a + UnicodeDecodeError if 'char' is a byte string that can't be decoded using the + default encoding. + +- Issue #6902: Fix problem with built-in types format incorrectly with 0 + padding. + +- Issue #2560: Remove an unnecessary 'for' loop from ``my_fgets()`` in + Parser/myreadline.c. + +- Issue #7988: Fix default alignment to be right aligned for + ``complex.__format__``. Now it matches other numeric types. + +- Issue #5211: The complex type no longer uses implicit coercion in mixed-type + binary arithmetic operations. Library ------- -- Reverting the changes made in r78432. Discussed in the tracker issue #7540. +- Issue #7904: Changes to urllib.parse.urlsplit to handle schemes as defined by + RFC3986. Anything before :// is considered a scheme and is followed by an + authority (or netloc) and by '/' led path, which is optional. -- Issue #8107: Fixed test_distutils so it doesn't crash when the source - directory cannot be found. +- Issue #1555570: email no longer inserts extra blank lines when a \r\n + combo crosses an 8192 byte boundary. -Extension Modules ------------------ +- Issue #6906: Tk should not set Unicode environment variables on Windows. -- Issue #7670: sqlite3: Fixed crashes when operating on closed connections. +- Issue #1054943: Fix ``unicodedata.normalize('NFC', text)`` for the Public + Review Issue #29 (http://unicode.org/review/pr-29.html). -- Issue #8053: logic was inverted on which platforms to run a test on. - caused test_thread to fail on Windows. +- Issue #7494: Fix a crash in ``_lsprof`` (cProfile) after clearing the profiler, + reset also the pointer to the current pointer context. +- Issue #7232: Add support for the context manager protocol to the + ``tarfile.TarFile`` class. -What's New in Python 2.6.5 rc 1? -================================ +- Issue #7250: Fix info leak of os.environ across multi-run uses of + ``wsgiref.handlers.CGIHandler``. -*Release date: 2010-03-01* +- Issue #1729305: Fix doctest to handle encode error with "backslashreplace". -Core and Builtins +- Issue #691291: ``codecs.open()`` should not convert end of lines on reading + and writing. + +- Issue #7975: Correct regression in dict methods supported by bsddb.dbshelve. + +- Issue #7959: ctypes callback functions are now registered correctly with the + cycle garbage collector. + +- Issue #7970: ``email.Generator.flatten`` now correctly flattens + message/rfc822 messages parsed by ``email.Parser.HeaderParser``. + +- Issue #3426: ``os.path.abspath`` now returns unicode when its arg is unicode. + +- Issue #7633: In the decimal module, ``Context`` class methods (with the + exception of canonical and is_canonical) now accept instances of int and long + wherever a Decimal instance is accepted, and implicitly convert that argument + to Decimal. Previously only some arguments were converted. + +- Issue #6003: Add an argument to ``zipfile.Zipfile.writestr`` to specify the + compression type. + +- Issue #7893: ``unittest.TextTestResult`` is made public and a ``resultclass`` + argument added to the TextTestRunner constructor allowing a different result + class to be used without having to subclass. + +- Issue #7588: ``unittest.TextTestResult.getDescription`` now includes the test + name in failure reports even if the test has a docstring. + +- Issue #5801: Remove spurious empty lines in wsgiref. + +- Issue #1537721: Add a ``writeheader()`` method to ``csv.DictWriter``. + +- Issue #7427: Improve the representation of httplib.BadStatusLine exceptions. + +- Issue #7481: When a ``threading.Thread`` failed to start it would leave the + instance stuck in initial state and present in ``threading.enumerate()``. + +- Issue #1068268: The subprocess module now handles EINTR in internal + ``os.waitpid()`` and ``os.read()`` system calls where appropriate. + +- Issue #6729: Add ``ctypes.c_ssize_t`` to represent ssize_t. + +- Issue #6247: The argparse module has been added to the standard library. + +Extension Modules ----------------- -- Issue #7309: Fix unchecked attribute access when converting - UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to - strings. +- The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure + bugs and allows loading SQLite extensions from shared libraries. -- Issue #7649: "u'%c' % char" now behaves like "u'%s' % char" and raises a - UnicodeDecodeError if 'char' is a byte string that can't be decoded using - the default encoding. +- Issue #7808: Fix reference leaks in _bsddb and related tests. -- Issue #5677: Explicitly forbid write operations on read-only file objects, - and read operations on write-only file objects. On Windows, the system C - library would return a bogus result; on Solaris, it was possible to crash - the interpreter. Patch by Stefan Krah. +- Issue #6544: Fix a reference leak in the kqueue implementation's error + handling. -- Issue #4978: Passing keyword arguments as unicode strings is now allowed. +- 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 #7819: Check sys.call_tracing() arguments types. +- Issue #7999: ``os.setreuid()`` and ``os.setregid()`` would refuse to accept a + -1 parameter on some platforms such as OS X. -- Issue #7788: Fix an interpreter crash produced by deleting a list - slice with very large step value. +Tests +----- -- Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`) - could crash in many places because of the PyByteArray_AS_STRING() macro - returning NULL. The macro now returns a statically allocated empty - string instead. +- Issue #7849: The utility ``test.test_support.check_warnings()`` verifies if + warnings are effectively raised. A new utility ``check_py3k_warnings()`` is + available. -- Issue #7604: Deleting an unset slotted attribute did not raise an - AttributeError. +- The four path modules (genericpath, macpath, ntpath, posixpath) share a + common TestCase for some tests: test_genericpath.CommonTest. -- Issue #7413: Passing '\0' as the separator to datetime.datetime.isoformat() - used to drop the time part of the result. +- Print platform information when running the whole test suite, or using the + ``--verbose`` flag. -- Issue #6108: unicode(exception) and str(exception) should return the same - message when only __str__ (and not __unicode__) is overridden in the - subclass. +- Issue #767675: Enable test_pep277 on POSIX platforms with Unicode-friendly + filesystem encoding. -- Issue #7491: Metaclass's __cmp__ method was ignored. +- 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. -- Add Py3k warnings for parameter names in parenthesis. +- 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. -- Issue #7362: Give a proper error message for def f((x)=3): pass. +Build +----- -- Issue #7085: Fix crash when importing some extensions in a thread - on MacOSX 10.6. +- Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9. -- Issue #7070: Fix round bug for large odd integer arguments. -- Issue #7078: Set struct.__doc__ from _struct.__doc__. +What's New in Python 2.7 alpha 3? +================================= -- Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which - fixes the problem of some exceptions being thrown at shutdown when the - interpreter is killed. Patch by Adam Olsen. +*Release date: 2010-02-06* -- Issue #7084: Fix a (very unlikely) crash when printing a list from one - thread, and mutating it from another one. Patch by Scott Dial. +Core and Builtins +----------------- -- Issue #1747858: Fix lchown & fchown to work with large uid's and gid's on - 64-bit platforms. +- Issue #5677: Explicitly forbid write operations on read-only file objects, + and read operations on write-only file objects. On Windows, the system C + library would return a bogus result; on Solaris, it was possible to crash the + interpreter. Patch by Stefan Krah. +- Issue #7853: Normalize exceptions before they are passed to a context + manager's ``__exit__()`` method. -Library -------- +- Issue #7385: Fix a crash in ``PyMemoryView_FromObject()`` when + ``PyObject_GetBuffer()`` fails. Patch by Florent Xicluna. -- Issue #7250: Fix info leak of os.environ across multi-run uses of - wsgiref.handlers.CGIHandler. +- Issue #7819: Check ``sys.call_tracing()`` arguments types. -- Issue #1729305: Fix doctest to handle encode error with "backslashreplace". +- Issue #7788: Fix an interpreter crash produced by deleting a list slice with + very large step value. -- Issue #691291: codecs.open() should not convert end of lines on reading and - writing. +- Issue #7766: Change ``sys.getwindowsversion()`` return value to a named tuple + and add the additional members returned in an OSVERSIONINFOEX structure. The + new members are service_pack_major, service_pack_minor, suite_mask, and + product_type. -- Issue #7975: correct regression in dict methods supported by bsddb.dbshelve. +- Issue #7561: Operations on empty bytearrays (such as ``int(bytearray())``) + could crash in many places because of the ``PyByteArray_AS_STRING()`` macro + returning NULL. The macro now returns a statically allocated empty string + instead. -- Issue #7959: ctypes callback functions are now registered correctly - with the cycle garbage collector. +- Issue #7622: Improve the split(), rsplit(), splitlines() and replace() + methods of bytes, bytearray and unicode objects by using a common + implementation based on stringlib's fast search. Patch by Florent Xicluna. -- Issue #6243: curses.getkey() can segfault when used with ungetch. - Fix by Trundle and Jerry Chen. +- Issue #7632: Fix various str -> float conversion bugs present in 2.7 alpha 2, + including: -- Issue #7597: curses.use_env() can now be called before initscr(). - Noted by Kan-Ru Chen. + (1) a serious 'wrong output' bug that could occur for long (> 40 digit) input + strings, + (2) a crash in dtoa.c that occurred in debug builds when parsing certain long + numeric strings corresponding to subnormal values, + (3) a memory leak for some values large enough to cause overflow, and + (4) a number of flaws that could lead to incorrectly rounded results. -- Issue #7970: email.Generator.flatten now correctly flattens message/rfc822 - messages parsed by email.Parser.HeaderParser. +- Issue #7319, #7770: Silence ``DeprecationWarning`` by default when the -3 + option is not used. -- Issue #3426: ``os.path.abspath`` now returns unicode when its arg is unicode. +- Issue #2335: Backport set literals syntax from Python 3.x. + +- Issue #2333: Backport set and dict comprehensions syntax from Python 3.x. + +- Issue #1967: Backport dictionary views from Python 3.x. + +Library +------- + +- Issue #9137: Fix issue in MutableMapping.update, which incorrectly + treated keyword arguments called 'self' or 'other' specially. - Issue #7835: shelve should no longer produce mysterious warnings during interpreter shutdown. +- Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in + XML processing instructions and comments. These raw characters are allowed + by the XML specification, and are necessary when outputting e.g. PHP code in + a processing instruction. Patch by Neil Muller. + +- Issue #7869: logging: Improved diagnostic for format-time errors. + +- Issue #7868: logging: Added loggerClass attribute to Manager. + +- Issue #7851: logging: Clarification on logging configuration files. + - Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is - specified, rather than fall through to AF_PACKET (in the `socket` module). + specified, rather than fall through to AF_PACKET (in the ``socket`` module). Also, raise ValueError rather than TypeError when an unknown TIPC address type is specified. Patch by Brian Curtin. +- logging: Implemented PEP 391. + - Issue #6939: Fix file I/O objects in the `io` module to keep the original - file position when calling `truncate()`. It would previously change the - file position to the given argument, which goes against the tradition of + file position when calling `truncate()`. It would previously change the file + position to the given argument, which goes against the tradition of ftruncate() and other truncation APIs. Patch by Pascal Chambon. -- Issue #7773: Fix an UnboundLocalError in platform.linux_distribution() when - the release file is empty. +- Issue #7610: Reworked implementation of the internal ``zipfile.ZipExtFile`` + class used to represent files stored inside an archive. The new + implementation is significantly faster and can be wrapped in a + ``io.BufferedReader`` object for more speedups. It also solves an issue + where interleaved calls to ``read()`` and ``readline()`` give wrong results. + Patch by Nir Aides. + +- Issue #7792: Registering non-classes to ABCs raised an obscure error. -- Issue #7748: Since unicode values are supported for some metadata options - in Distutils, the DistributionMetadata get_* methods will now return an utf-8 - encoded string for them. This ensure that the upload and register commands - send the right values to PyPI without any error. +- Removed the deprecated functions ``verify()`` and ``vereq()`` from + Lib/test/test_support.py. -- Issue #1670765: Prevent email.generator.Generator from re-wrapping +- Issue #7773: Fix an UnboundLocalError in ``platform.linux_distribution()`` + when the release file is empty. + +- Issue #7748: Since unicode values are supported for some metadata options in + Distutils, the DistributionMetadata get_* methods will now return an utf-8 + encoded string for them. This ensures that the upload and register commands + send the correct values to PyPI without any error. + +- Issue #1670765: Prevent ``email.generator.Generator`` from re-wrapping headers in multipart/signed MIME parts, which fixes one of the sources of invalid modifications to such parts by Generator. -- Issue #7701: Fix crash in binascii.b2a_uu() in debug mode when given a +- Issue #7701: Fix crash in ``binascii.b2a_uu()`` in debug mode when given a 1-byte argument. Patch by Victor Stinner. -- Issue #3299: Fix possible crash in the _sre module when given bad - argument values in debug mode. Patch by Victor Stinner. - -- Issue #5827: Make sure that normpath preserves unicode. Initial patch - by Matt Giuca. +- Issue #3299: Fix possible crash in the _sre module when given bad argument + values in debug mode. Patch by Victor Stinner. -- Issue #5372: Drop the reuse of .o files in Distutils' ccompiler (since - Extension extra options may change the output without changing the .c - file). Initial patch by Collin Winter. +- Issue #7703: Add support for the new buffer API to functions of the binascii + module. Backported from py3k by Florent Xicluna, with some additional tests. -- Issue #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes - gcc when it has a fully qualified configuration prefix. Initial patch - by Arfrever. +- Issue #2846: Add support for gzip.GzipFile reading zero-padded files. Patch + by Brian Curtin. -- Issue #7071: byte-compilation in Distutils is now done with respect to - sys.dont_write_bytecode. +- Issue #5827: Make sure that normpath preserves unicode. Initial patch by + Matt Giuca. -- Issue #7092: Remove py3k warning when importing cPickle. 2to3 handles - renaming of `cPickle` to `pickle`. The warning was annoying since there's - no alternative to cPickle if you care about performance. Patch by Florent - Xicluna. +- Issue #5372: Drop the reuse of .o files in Distutils' ccompiler (since + Extension extra options may change the output without changing the .c file). + Initial patch by Collin Winter. -- Issue #7455: Fix possible crash in cPickle on invalid input. Patch by - Victor Stinner. +Extension Modules +----------------- -- Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when - opening an empty or very small file. +- Expat: Fix DoS via XML document with malformed UTF-8 sequences + (CVE_2009_3560). -- 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. +Build +----- -- Issue #7231: urllib2 cannot handle https with proxy requiring auth. Patch by - Tatsuhiro Tsujikawa. +- 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 #7348: StringIO.StringIO.readline(-1) now acts as if it got no argument - like other file objects. +- Issue #7658: Ensure that the new pythonw executable works on OSX 10.4 -- Issue #5949: fixed IMAP4_SSL hang when the IMAP server response is - missing proper end-of-line termination. +- Issue #7714: Use ``gcc -dumpversion`` to detect the version of GCC on + MacOSX. -- Fix variations of extending deques: d.extend(d) d.extendleft(d) d+=d +- Issue #7661: Allow ctypes to be built from a non-ASCII directory path. + Patch by Florent Xicluna. -- Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is - generated in Distutils. Patch by Stephen Emslie. +Tools/Demos +----------- -- Issue #4120: Drop reference to CRT from manifest when building extensions - with msvc9compiler. +- iobench (a file I/O benchmark) and ccbench (a concurrency benchmark) were + added to the ``Tools`` directory. They were previously living in the + sandbox. -- Issue #7410: deepcopy of itertools.count() erroneously reset the count. +Tests +----- -- Issue #7403: logging: Fixed possible race condition in lock creation. +- issue #7728: test_timeout was changed to use ``test_support.bind_port()`` + instead of a hard coded port. -- Issue #7341: Close the internal file object in the TarFile constructor in - case of an error. +Documentation +------------- -- Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch +- Updated "Using Python" documentation to include description of CPython's -J, + -U and -X options. -- 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. +- Updated Python manual page (options -B, -O0, -s, environment variables + PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE). -- 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. +What's New in Python 2.7 alpha 2? +================================= -- Issue #7249: Methods of io.BytesIO now allow `long` as well as `int` - arguments. +*Release date: 2010-01-09* -- Issue #6665: Fix fnmatch to properly match filenames with newlines in them. +Core and Builtins +----------------- -- Issue #1008086: Fixed socket.inet_aton() to always return 4 bytes even on - LP64 platforms (most 64-bit Linux, bsd, unix systems). +- The ``__complex__()`` method is now looked up on the class of instances to + make it consistent with other special methods. -- 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 #7462: Implement the stringlib fast search algorithm for the `rfind`, + `rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna. -- Issue #7244: itertools.izip_longest() no longer ignores exceptions - raised during the formation of an output tuple. +- Issue #5080: A number of functions and methods previously produced a + DeprecationWarning when passed a float argument where an integer was expected. + These functions and methods now raise TypeError instead. The majority of the + effects of this change are in the extension modules, but some core functions + and methods are affected: notably the 'chr', 'range' and 'xrange' builtins, + and many unicode/str methods. -- Issue #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 #7604: Deleting an unset slotted attribute did not raise an + AttributeError. -- Issue #7082: When falling back to the MIME 'name' parameter, the - correct place to look for it is the Content-Type header. +- Issue #7534: Fix handling of IEEE specials (infinities, nans, negative zero) + in ** operator. The behaviour now conforms to that described in C99 Annex F. -- Issue #7099: Decimal.is_normal now returns True for numbers with exponent - larger than emax. +- Issue #7579: The msvcrt module now has docstrings for all its functions. -- Issue #7205: Fix a possible deadlock when using a BZ2File object from - several threads at once. +- Issue #7413: Passing '\0' as the separator to datetime.datetime.isoformat() + used to drop the time part of the result. -- Issue #7048: Force Decimal.logb to round its result when that result - is too large to fit in the current precision. +- Issue #1811: Improve accuracy and cross-platform consistency for true division + of integers: the result of a/b is now correctly rounded for ints a and b (at + least on IEEE 754 platforms), and in particular does not depend on the + internal representation of a long. -- Issue #1488943: difflib.Differ() doesn't always add hints for tab characters +- Issue #6108: ``unicode(exception)`` and ``str(exception)`` should return the + same message when only ``__str__()`` (and not ``__unicode__()``) is overridden + in the subclass. -- Issue #5037: Proxy the __unicode__ special method to __unicode__ instead of - __str__. +- Issue #6834: Replace the implementation for the 'python' and 'pythonw' + executables on OSX. -- Issue #7481: When a threading.Thread failed to start it would leave the - instance stuck in initial state and present in threading.enumerate(). + These executables now work properly with the arch(1) command: ``arch -ppc + python`` will start a universal binary version of python in PPC mode (unlike + previous releases). -- Issue #1068268: The subprocess module now handles EINTR in internal - os.waitpid and os.read system calls where appropriate. +- Issue #1680159: Unicode coercion during an 'in' operation no longer masks the + underlying error when the coercion fails for the left hand operand. -Extension Modules ------------------ +- Issue #7491: Metaclass's __cmp__ method was ignored. -- Issue #7808: Fix reference leaks in _bsddb and related tests. +- Issue #7466: Segmentation fault when the garbage collector is called in the + middle of populating a tuple. Patch by Florent Xicluna. -- Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as - msvcr100.dll is not a platform assembly anymore. -- Issue #6877: Make it possible to link the readline extension to libedit - on OSX. +Library +------- -- Expat: Fix DoS via XML document with malformed UTF-8 sequences - (CVE_2009_3560). +- Issue #6963: Added "maxtasksperchild" argument to ``multiprocessing.Pool``, + allowing for a maximum number of tasks within the pool to be completed by the + worker before that worker is terminated, and a new one created to replace it. -- Issue #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 #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes gcc + when it has a fully qualified configuration prefix. Initial patch by + Arfrever. -- Issue #7999: os.setreuid() and os.setregid() would refuse to accept a -1 - parameter on some platforms such as OS X. +- Issue #7092: Remove py3k warning when importing cPickle. 2to3 handles + renaming of `cPickle` to `pickle`. The warning was annoying since there's no + alternative to cPickle if you care about performance. Patch by Florent + Xicluna. -Build ------ +- Issue #7455: Fix possible crash in cPickle on invalid input. Patch by Victor + Stinner. -- Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9. +- Issue #7092: Fix the DeprecationWarnings emitted by the standard library when + using the -3 flag. Patch by Florent Xicluna. -- Issue #7661: Allow ctypes to be built from a non-ASCII directory path. - 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 #7589: Only build the nis module when the correct header files are - found. +- Issue #3972: ``httplib.HTTPConnection`` now accepts an optional source_address + parameter to allow specifying where your connections come from. -- Switch to OpenSSL 0.9.8l on Windows. +- ``socket.create_connection()`` now accepts an optional source_address + parameter. -- 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. +- Issue #5511: ``zipfile.ZipFile`` can now be used as a context manager. + Initial patch by Brian Curtin. -- Ensure that it possible to build extensions for the default - binary distribution on OSX 10.6 even when the user does not - have the 10.4u SDK installed. +- Distutils now correctly identifies the build architecture as "x86_64" when + building on OSX 10.6 without "-arch" flags. -- Issue #7541: when using ``python-config`` with a framework install the - compiler might use the wrong library. +- Issue #7556: Distutils' msvc9compiler now opens the MSVC Manifest file in text + mode. -Documentation -------------- +- 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. -- Updating `Using Python` documentation to include description of CPython's - -J, -U and -X options. +- Issue #7231: urllib2 cannot handle https with proxy requiring auth. Patch by + Tatsuhiro Tsujikawa. -- Update python manual page (options -B, -O0, -s, environment variables - PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE). +- 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. -Tests ------ +- Issue #7348: ``StringIO.StringIO.readline(-1)`` now acts as if it got no + argument like other file objects. -- issue #7728: test_timeout was changed to use test_support.bind_port - instead of a hard coded port. +- Issue #7357: tarfile no longer suppresses fatal extraction errors by default. -- Issue #7498: test_multiprocessing now uses test_support.find_unused_port - instead of a hardcoded port number in test_rapid_restart. +- Issue #7470: logging: Fix bug in Unicode encoding fallback. -- Issue #7431: use TESTFN in test_linecache instead of trying to create a - file in the Lib/test directory, which might be read-only for the - user running the tests. +- Issue #5949: Fixed IMAP4_SSL hang when the IMAP server response is missing + proper end-of-line termination. -- Issue #7324: add a sanity check to regrtest argument parsing to - catch the case of an option with no handler. +- Issue #7457: Added a read_pkg_file method to + ``distutils.dist.DistributionMetadata``. -- Issue #7295: Do not use a hardcoded file name in test_tarfile. +- 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. -- Issue #7270: Add some dedicated unit tests for multi-thread synchronization - primitives such as Lock, RLock, Condition, Event and Semaphore. +C-API +----- -- Issue #7055: test___all__ now greedily detects all modules which have an - __all__ attribute, rather than using a hardcoded and incomplete list. +- 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. -What's New in Python 2.6.4 final? -================================= +- Issue #7033: Function ``PyErr_NewExceptionWithDoc()`` added. -*Release date: 25-Oct-2009* +Build +----- -Core and Builtins ------------------ +- Issue #6491: Allow --with-dbmliborder to specify that no dbms will be built. -Library -------- +- 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. -What's New in Python 2.6.4rc2? -============================== +- Issue #7589: Only build the nis module when the correct header files are + found. -*Release date: 18-Oct-2009* +- Switch to OpenSSL 0.9.8l and sqlite 3.6.21 on Windows. -Core and Builtins ------------------ +- Issue #7541: when using ``python-config`` with a framework install the + compiler might use the wrong library. -Library -------- +Tests +----- -- Issue #7115: Fixed the extension module builds that is failing when using - paths in the extension name instead of dotted names. +- Issue #7376: Instead of running a self-test (which was failing) when called + with no arguments, doctest.py now gives a usage message. -- Issue #7120: logging: Removed import of multiprocessing which is causing - crash in GAE. +- Issue #7396: Fix regrtest -s, which was broken by the -j enhancement. -- Issue #7149: fix exception in urllib when detecting proxy settings on OSX. +- 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.6.4rc1? -============================== +What's New in Python 2.7 alpha 1 +================================ -*Release date: 07-Oct-2009* +*Release date: 2009-12-05* Core and Builtins ----------------- -- Issue #7019: Raise ValueError when unmarshalling bad long data, instead - of producing internally inconsistent Python longs. +- 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. + +- Add Py3k warnings for parameter names in parentheses. + +- Issue #7362: Give a proper error message for ``def f((x)=3): pass``. + +- Issue #7085: Fix crash when importing some extensions in a thread on MacOSX + 10.6. + +- Issue #7117: ``repr(x)`` for a float x returns a result based on the shortest + decimal string that's guaranteed to round back to x under correct rounding + (with round-half-to-even rounding mode). Previously it gave a string based on + rounding x to 17 decimal digits. repr(x) for a complex number behaves + similarly. On platforms where the correctly-rounded strtod and dtoa code is + not supported (see below), repr is unchanged. + +- Issue #7117: On almost all platforms: float-to-string and string-to-float + conversions within Python are now correctly rounded. Places these conversions + occur include: str for floats and complex numbers; the float and complex + constructors; old-style and new-style numeric formatting; serialization and + deserialization of floats and complex numbers using marshal, pickle and json; + parsing of float and imaginary literals in Python code; Decimal-to-float + conversion. + + The conversions use a Python-adapted version of David Gay's well-known dtoa.c, + providing correctly-rounded strtod and dtoa C functions. This code is + supported on Windows, and on Unix-like platforms using gcc, icc or suncc as + the C compiler. There may be a small number of platforms on which correct + operation of this code cannot be guaranteed, so the code is not used: notably, + this applies to platforms where the C double format is not IEEE 754 binary64, + and to platforms on x86 hardware where the x87 FPU is set to 64-bit precision + and Python's configure script is unable to determine how to change the FPU + precision. On these platforms conversions use the platform strtod and dtoa, + as before. + +- Issue #7117: Backport round implementation from Python 3.x. ``round()`` now + uses the correctly-rounded string <-> float conversions described above (when + available), and so produces correctly rounded results that will display nicely + under the float repr. There are two related small changes: (1) round now + accepts any class with an ``__index__()`` method for its second argument (but + no longer accepts floats for the second argument), and (2) an excessively + large second integer argument (e.g., ``round(1.234, 10**100)``) no longer + raises an exception. -Library -------- +- Issue #1757126: Fix the cyrillic-asian alias for the ptcp154 encoding. -- Issue #7068: Fixed the partial renaming that occured in r72594. +- Fix several issues with ``compile()``. The input can now contain Windows and + Mac newlines and is no longer required to end in a newline. -- Issue #7064: Fixed the incompatibility with Setuptools in distutils - when running the build_ext command. +- Remove length limitation when constructing a complex number from a unicode + string. -- Issue #7052: Removed nonexisting NullHandler from logging.__all__. +- Issue #7244: ``itertools.izip_longest()`` no longer ignores exceptions raised + during the formation of an output tuple. -- Issue #7039: Fixed distutils.tests.test_sysconfig when running on - installation with no build. +- Issue #1087418: Boost performance of bitwise operations for longs. -Tests ------ +- Issue #1722344: ``threading._shutdown()`` is now called in ``Py_Finalize()``, + which fixes the problem of some exceptions being thrown at shutdown when the + interpreter is killed. Patch by Adam Olsen. -- Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6. +- Issue #7168: Document ``PyFloat_AsString()`` and ``PyFloat_AsReprString()``, + and note that they are unsafe and deprecated. +- Issue #7120: logging: Remove import of multiprocessing which is causing crash + in GAE. -What's New in Python 2.6.3 -========================== +- Issue #7140: The ``__dict__`` of a module should not be cleared unless the + module is the only object holding a reference to it. -*Release date: 02-Oct-2009* +- Issue #1754094: Improve the stack depth calculation in the compiler. There + should be no other effect than a small decrease in memory use. Patch by + Christopher Tur Lesniewski-Laas. -What's New in Python 2.6.3rc1 -============================= +- Issue #7084: Fix a (very unlikely) crash when printing a list from one thread, + and mutating it from another one. Patch by Scott Dial. -*Release date: 29-Sep-2009* +- Issue #1571184: The Unicode database contains properties for more characters. + The tables for code points representing numeric values, white spaces or line + breaks are now generated from the official Unicode Character Database files, + and include information from the Unihan.txt file. -Core and Builtins ------------------ +- Issue #7050: Fix a SystemError when trying to use unpacking and augmented + assignment. + +- Issue #5329: Fix ``os.popen*`` regression from 2.5 with commands as a sequence + running through the shell. Patch by Jean-Paul Calderone and Jani Hakala. + +- Issue #7019: Raise ValueError when unmarshalling bad long data, instead of + producing internally inconsistent Python longs. + +- Issue #6990: Fix ``threading.local`` subclasses leaving old state around after + a reference cycle GC which could be recycled by new locals. -- Issue #5329: Fix os.popen* regression from 2.5 with commands as a - sequence running through the shell. Patch by Jean-Paul Calderone - and Jani Hakala. +- Issue #6300: unicode.encode, unicode.decode, str.decode, and str.encode now + take keyword arguments. -- Issue #6990: Fix threading.local subclasses leaving old state around - after a reference cycle GC which could be recycled by new locals. +- Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 + stream with a non-raising error handler like "replace" or "ignore". -- Issue #6922: Fix an infinite loop when trying to decode an invalid - UTF-32 stream with a non-raising error handler like "replace" or "ignore". +- Issue #6713: Improve performance of base 10 int -> string and long -> string + conversions. - Issue #1590864: Fix potential deadlock when mixing threads and fork(). @@ -997,425 +2496,914 @@ Core and Builtins - Issue #6846: Fix bug where bytearray.pop() returns negative integers. -- Issue #6707: dir() on an uninitialized module caused a crash. +- ``classmethod()`` no longer checks if its argument is callable. -- Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. +- Issue #6750: A text file opened with ``io.open()`` could duplicate its output + when writing from multiple threads at the same time. -- Issue #6573: set.union() stopped processing inputs if an instance of self +- Issue #6704: Improve the col_offset in AST for "for" statements with a target + of tuple unpacking. + +- Issue #6707: ``dir()`` on an uninitialized module caused a crash. + +- Issue #6540: Fixed crash for ``bytearray.translate()`` with invalid parameters. + +- Issue #6573: ``set.union()`` stopped processing inputs if an instance of self occurred in the argument chain. -- Issue #6070: On posix platforms import no longer copies the execute bit - from the .py file to the .pyc file if it is set. +- Issue #1616979: Added the cp720 (Arabic DOS) encoding. -- Issue #4547: When debugging a very large function, it was not always - possible to update the lineno attribute of the current frame. +- 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 +- 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 Fürstenau. + the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau. -- Issue #6089: str.format can raise SystemError with certain invalid - field specifiers. +- Issue #5982: staticmethod and classmethod now expose the wrapped function with + ``__func__``. -- Issue #5994: the marshal module now has docstrings. +- Added support for multiple context managers in the same with-statement. + Deprecated ``contextlib.nested()`` which is no longer needed. -- Issue #5981: Fix two minor inf/nan issues in float.fromhex: (1) inf - and nan strings with trailing whitespace were incorrectly rejected - and (2) the interpretation of fromhex('-nan') didn't match that of - float('-nan'). +- 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 #5890: in subclasses of 'property' the __doc__ attribute was - shadowed by classtype's, even if it was None. property now - inserts the __doc__ into the subclass instance __dict__. +- Issue #5829: complex("1e500") no longer raises OverflowError. This makes it + consistent with float("1e500") and interpretation of real and imaginary + literals. -- Issue #5724: (See also issue #4575.) Fix Py_IS_INFINITY macro to - work correctly on x87 FPUs: it now forces its argument to double - before testing for infinity. +- Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more. -- Issue #4971: Fix titlecase for characters that are their own - titlecase, but not their own uppercase. +- ``__instancecheck__()`` and ``__subclasscheck__()`` are now completely ignored + on classic classes and instances. -- Issue #5829: complex('1e-500') no longer raises an exception +- Issue #5994: The marshal module now has docstrings. -- Issue #5787: object.__getattribute__(some_type, "__bases__") segfaulted on - some built-in types. +- Issue #5981: Fix three minor inf/nan issues in float.fromhex: + + (1) inf and nan strings with trailing whitespace were incorrectly rejected; + (2) parsing of strings representing infinities and nans was locale aware; and + (3) the interpretation of fromhex('-nan') didn't match that of float('-nan'). + +- Issue #5920: For ``float.__format__()``, change the behavior with the empty + presentation type (that is, not one of 'e', 'f', 'g', or 'n') to be like 'g' + but with at least one decimal point and with a default precision + of 12. Previously, the behavior the same but with a default precision of 6. + This more closely matches ``str()``, and reduces surprises when adding + alignment flags to the empty presentation type. This also affects the new + complex.__format__ in the same way. + +- Issue #5890: In subclasses of 'property' the __doc__ attribute was shadowed by + classtype's, even if it was None. property now inserts the __doc__ into the + subclass instance __dict__. + +- Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal + sequences. Patch by Nick Barnes and Victor Stinner. + +- Issue #1588: Add complex.__format__. For example, ``format(complex(1, 2./3), + '.5')`` now produces a sensible result. + +- Issue #5864: Fix empty format code formatting for floats so that it never + gives more than the requested number of significant digits. + +- Issue #5793: Rationalize isdigit / isalpha / tolower, etc. Includes new + Py_ISDIGIT / Py_ISALPHA / Py_TOLOWER, etc. in pctypes.h. + +- Issue #4971: Fix titlecase for characters that are their own titlecase, but + not their own uppercase. + +- Issue #5835: Deprecate PyOS_ascii_formatd and replace it with + _PyOS_double_to_string or PyOS_double_to_string. - Issue #5283: Setting __class__ in __del__ caused a segfault. +- Issue #5816: ``complex(repr(z))`` now recovers z exactly, even when z involves + nans, infs or negative zeros. + +- Implement PEP 378, Format Specifier for Thousands Separator, for floats, ints, + and longs. + +- Issue #5515: 'n' formatting for ints, longs, and floats handles leading zero + formatting poorly. + +- Issue #5772: For float.__format__, don't add a trailing ".0" if we're using no + type code and we have an exponent. + +- Issue #3166: Make long -> float (and int -> float) conversions correctly + rounded. + +- Issue #5787: ``object.__getattribute__(some_type, "__bases__")`` segfaulted on + some built-in types. + +- Issue #1869: Fix a couple of minor round() issues. ``round(5e15+1)`` was + giving 5e15+2; ``round(-0.0)`` was losing the sign of the zero. + - Issue #5759: float() didn't call __float__ on str subclasses. +- Issue #5704: The "-3" command-line option now implies "-t". + +- Issue #2170: Refactored ``xml.dom.minidom.normalize``, increasing both its + clarity and its speed. + +- Issue #2396: The memoryview object was backported from Python 3.1. + +- Fix a problem in PyErr_NormalizeException that leads to "undetected errors" + when hitting the recursion limit under certain circumstances. + +- Issue #1665206: Remove the last eager import in _warnings.c and make it lazy. + +- Issue #4865: On MacOSX /Library/Python/2.7/site-packages is added to the end + sys.path, for compatibility with the system install of Python. + +- Issue #4688: Add a heuristic so that tuples and dicts containing only + untrackable objects are not tracked by the garbage collector. This can reduce + the size of collections and therefore the garbage collection overhead on + long-running programs, depending on their particular use of datatypes. + +- Issue #5512: Rewrite PyLong long division algorithm (x_divrem) to improve its + performance. Long divisions and remainder operations are now between 50% and + 150% faster. + +- Issue #4258: Make it possible to use base 2**30 instead of base 2**15 for the + internal representation of integers, for performance reasons. Base 2**30 is + enabled by default on 64-bit machines. Add --enable-big-digits option to + configure, which overrides the default. Add sys.long_info structseq to + provide information about the internal format. + +- Issue #4034: Fix weird attribute error messages of the traceback object. (As a + result traceback.__members__ no longer exists.) + +- Issue #4474: PyUnicode_FromWideChar now converts characters outside the BMP to + surrogate pairs, on systems with sizeof(wchar_t) == 4 and sizeof(Py_UNICODE) + == 2. + +- Issue #5237: Allow auto-numbered fields in str.format(). For example: ``'{} + {}'.format(1, 2) == '1 2'``. + +- Issue #3652: Make the 'line' argument for ``warnings.showwarning()`` a + requirement. Means the DeprecationWarning from Python 2.6 can go away. + +- Issue #5247: Improve error message when unknown format codes are used when + using ``str.format()`` with str, unicode, long, int, and float arguments. + +- Running Python with the -3 option now also warns about classic division for + ints and longs. + +- Issue #5260: Long integers now consume less memory: average saving is 2 bytes + per long on a 32-bit system and 6 bytes per long on a 64-bit system. + +- Issue #5186: Reduce hash collisions for objects with no __hash__ method by + rotating the object pointer by 4 bits to the right. + +- Issue #4575: Fix Py_IS_INFINITY macro to work correctly on x87 FPUs: it now + forces its argument to double before testing for infinity. + +- Issue #4978: Passing keyword arguments as unicode strings is now allowed. + +- Issue #1242657: the __len__() and __length_hint__() calls in several tools + were suppressing all exceptions. These include list(), filter(), map(), + zip(), and bytearray(). + +- os.ftruncate raises OSErrors instead of IOErrors for consistency with other os + functions. + +- Issue #4991: Passing invalid file descriptors to io.FileIO now raises an + OSError. + +- Issue #4807: Port the _winreg module to Windows CE. + +- Issue #4935: The overflow checking code in the expandtabs() method common to + str, bytes and bytearray could be optimized away by the compiler, letting the + interpreter segfault instead of raising an error. + +- Issue #3720: Fix a crash when an iterator modifies its class and removes its + __next__ method. + +- Issue #4893: Use NT threading on CE. + +- Issue #4915: Port sysmodule to Windows CE. + +- Issue #4074: Change the criteria for doing a full garbage collection (i.e. + collecting the oldest generation) so that allocating lots of objects without + destroying them does not show quadratic performance. Based on a proposal by + Martin von Löwis at + http://mail.python.org/pipermail/python-dev/2008-June/080579.html. + +- Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t. + +- Issue #1180193: When importing a module from a .pyc (or .pyo) file with an + existing .py counterpart, override the co_filename attributes of all code + objects if the original filename is obsolete (which can happen if the file has + been renamed, moved, or if it is accessed through different paths). Patch by + Ziga Seilnacht and Jean-Paul Calderone. + +- Issue #4075: Use ``OutputDebugStringW()`` in Py_FatalError. + +- Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open + file with `str' filename on Windows. + +- Issue #3680: Reference cycles created through a dict, set or deque iterator + did not get collected. + +- Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types where + the tp_hash and tp_dict slots are both NULL. + +- Issue #4764: With io.open, IOError.filename is set when trying to open a + directory on POSIX systems. + +- Issue #4764: IOError.filename is set when trying to open a directory on POSIX + systems. + +- Issue #4759: None is now allowed as the first argument of + ``bytearray.translate()``. It was always allowed for ``bytes.translate()``. + +- Added test case to ensure attempts to read from a file opened for writing + fail. + +- Issue #2467: gc.DEBUG_STATS reported invalid elapsed times. Also, always print + elapsed times, not only when some objects are uncollectable/unreachable. + Original patch by Neil Schemenauer. + +- Issue #3439: Add a bit_length method to int and long. + +- Issue #2183: Simplify and optimize bytecode for list comprehensions. Original + patch by Neal Norwitz. + +- Issue #4597: Fixed exception handling when the __exit__ function of a context + manager returns a value that cannot be converted to a bool. + +- Issue #4597: Fixed several opcodes that weren't always propagating exceptions. + +- Issue #4445: Replace ``sizeof(PyStringObject)`` with + ``offsetof(PyStringObject, ob_sval) + 1`` when allocating memory for str + instances. On a typical machine this saves 3 bytes of memory (on average) per + string allocation. + +- Issue #3996: On Windows, the PyOS_CheckStack function would cause the + interpreter to abort ("Fatal Python error: Could not reset the stack!") + instead of throwing a MemoryError. + +- Issue #3689: The list reversed iterator now supports __length_hint__ instead + of __len__. Behavior now matches other reversed iterators. + +- Issue #4367: Python would segfault during compiling when the unicodedata + module couldn't be imported and \N escapes were present. + +- Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()`` method on + file objects with closefd=False. The file descriptor is still kept open but + the file object behaves like a closed file. The ``FileIO`` object also got a + new readonly attribute ``closefd``. + +- Issue #4348: Some bytearray methods returned that didn't cause any change to + the bytearray, returned the same bytearray instead of a copy. + +- Issue #4317: Fixed a crash in the ``imageop.rgb2rgb8()`` function. + +- Issue #4230: If ``__getattr__`` is a descriptor, it now functions correctly. + +- Issue #4048: The parser module now correctly validates relative imports. + +- Issue #4225: ``from __future__ import unicode_literals`` didn't work in an + exec statement. + +- Issue #4176: Fixed a crash when pickling an object which ``__reduce__`` method + does not return iterators for the 4th and 5th items. + +- Issue #4209: Enabling unicode_literals and the print_function in the same + __future__ import didn't work. + +- Using ``nonlocal`` as a variable name will now raise a Py3k SyntaxWarning + because it is a reserved word in 3.x. + +- On windows, ``os.chdir()`` given unicode was not working if + GetCurrentDirectoryW returned a path longer than MAX_PATH. (But It's doubtful + this code path is really executed because I cannot move to such directory on + win2k) + +- Issue #4069: When ``set.remove(element)`` is used with a set element, the + element is temporarily replaced with an equivalent frozenset. But the + eventual KeyError would always report the empty ``frozenset()`` as the missing + key. Now it correctly refers to the initial element. + +- Issue #4509: Various issues surrounding resize of bytearray objects to which + there are buffer exports. + +- Issue #4748: Lambda generators no longer return a value. + +- Issue #3582: Use native TLS functions on Windows + +- The re.sub(), re.subn() and re.split() functions now accept a flags parameter. + +- Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with short + file names. + +- Issue #1113244: Py_XINCREF, Py_DECREF, Py_XDECREF: Add `do { ... } while (0)' + to avoid compiler warnings. + +- Issue #5705: os.setuid() would not accept values > 2**31-1 but pwd.getpwnam() + returned them on 64bit platforms. + - Issue #5108: Handle %s like %S and %R in PyUnicode_FromFormatV(): Call PyUnicode_DecodeUTF8() once, remember the result and output it in a second step. This avoids problems with counting UTF-8 bytes that ignores the effect of using the replace error handler in PyUnicode_DecodeUTF8(). +- Issue #3739: The unicode-internal encoder now reports the number of characters + consumed like any other encoder (instead of the number of bytes). + +- Issue #2422: When compiled with the ``--with-valgrind`` option, the pymalloc + allocator will be automatically disabled when running under Valgrind. This + gives improved memory leak detection when running under Valgrind, while taking + advantage of pymalloc at other times. + Library ------- -- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment +- Add count() and reverse() methods to collections.deque(). -- Issue #6790: Make it possible again to pass an `array.array` to - `httplib.HTTPConnection.send`. Patch by Kirk McDonald. +- Fix variations of extending deques: d.extend(d) d.extendleft(d) d+=d -- Issue #6236, #6348: Fix various failures in the `io` module under AIX - and other platforms, when using a non-gcc compiler. Patch by egreen. +- Issue #6986: Fix crash in the JSON C accelerator when called with the wrong + parameter types. Patch by Victor Stinner. -- Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 +- logging: Added optional "secure" parameter to SMTPHandler, to enable use of + TLS with authentication credentials. -- Issue #6947: Fix distutils test on windows. Patch by Hirokazu Yamamoto. +- Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is generated + in Distutils. Patch by Stephen Emslie. -- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) - does now always result in NULL. +- Issue #4120: Drop reference to CRT from manifest when building extensions with + msvc9compiler. -- Issue #5042: ctypes Structure sub-subclass does now initialize - correctly with base class positional arguments. +- Issue #7333: The ``posix`` module gains an ``initgroups()`` function providing + access to the initgroups(3) C library call on Unix systems which implement it. + Patch by Jean-Paul Calderone. -- Issue #6938: Fix a TypeError in string formatting of a multiprocessing - debug message. +- 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 #6635: Fix profiler printing usage message. +- Issue #1515: Enable use of deepcopy() with instance methods. Patch by Robert + Collins. -- Issue #6795: int(Decimal('nan')) now raises ValueError instead of - returning NaN or raising InvalidContext. Also, fix infinite recursion - in long(Decimal('nan')). +- Issue #7403: logging: Fixed possible race condition in lock creation. -- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats - with no type specifier. +- 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 #4937: plat-mac/bundlebuilder revers to non-existing version.plist +- 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 #6838: Use a list to accumulate the value instead of - repeatedly concatenating strings in httplib's - HTTPResponse._read_chunked providing a significant speed increase - when downloading large files servend with a Transfer-Encoding of 'chunked'. +- Issue #6615: logging: Used weakrefs in internal handler list. -- Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN - payloads are now ordered by integer value rather than lexicographically. +- Issue #1488943: ``difflib.Differ`` doesn't always add hints for tab + characters. -- Issue #6117: Fix O(n**2) performance degradation when outputting lots of - small data on a buffered socket.socket.makefile() object. +- Issue #6123: tarfile now opens empty archives correctly and consistently + raises ReadError on empty files. -- Issue #6637: defaultdict.copy() did not work when the default factory - was left unspecified. Also, the eval/repr round-trip would fail when - the default_factory was None. +- Issue #7354: distutils.tests.test_msvc9compiler - dragfullwindows can be 2. -- Issue #1424152: Fix for httplib, urllib2 to support SSL while working through - proxy. Original patch by Christopher Li, changes made by Senthil Kumaran. +- Issue #5037: Proxy the __unicode__ special method to __unicode__ instead of + __str__. -- Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was - unconditionally calling "os.close(sys.stdin.fileno())" resulting in file - descriptor errors +- Issue #7341: Close the internal file object in the TarFile constructor in case + of an error. -- Issue #6415: Fixed warnings.warn sagfault on bad formatted string. +- Issue #7293: ``distutils.test_msvc9compiler`` is fixed to work on any fresh + Windows box. Help provided by David Bolen. -- Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. +- Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch. -- Issue #5230: pydoc would report no documentation found if a module generated - a 'not found' import error when loaded; it now reports the import errors. - Thanks to Lucas Prado Melo for initial fix and collaboration on the tests. +- Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using TLS + or SSL. Patch by Giampaolo Rodola'. -- Issue #6274: Fixed possible file descriptors leak in subprocess.py +- Issue #4969: The mimetypes module now reads the MIME database from the + registry under Windows. Patch by Gabriel Genellina. -- Issue #6271: mmap tried to close invalid file handle (-1) when annonymous. - (On Unix) +- 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 #6258: Support AMD64 in bdist_msi. +- 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 #6252: Fixed bug in next rollover time computation in - TimedRotatingFileHandler. +- 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 #6121: pydoc now ignores leading and trailing spaces in the - argument to the 'help' function. +- 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 #6050: Don't fail extracting a directory from a zipfile if - the directory already exists. +- Issue #7264: Fix a possible deadlock when deallocating thread-local objects + which are part of a reference cycle. -- collections.namedtuple() was not working with the following field - names: cls, self, tuple, itemgetter, and property. +- Issue #7211: Allow 64-bit values for the ``ident`` and ``data`` fields of + kevent objects on 64-bit systems. Patch by Michael Broghton. -- 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 #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 #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 #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 #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket. - Patch by Farhan Ahmad, test by Marcin Bachry. +- 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 #1655: Make imaplib IPv6-capable. Patch by Derek Morr. +- Issue #4750: Store the basename of the original filename in the gzip FNAME + header as required by RFC 1952. -- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr. +- Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in + Distutils. -- Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when - trying to print a traceback. +- Issue #7218: Fix test_site for win32, the directory comparison was done with + an uppercase. -- Issue #5955: aifc's close method did not close the file it wrapped, - now it does. This also means getfp method now returns the real fp. +- Issue #7205: Fix a possible deadlock when using a BZ2File object from several + threads at once. -- Issue #4875: On win32, ctypes.util.find_library does no longer - return directories. +- Issue #7071: byte-compilation in Distutils is now done with respect to + sys.dont_write_bytecode. -- Issue #5692: In :class:`zipfile.Zipfile`, fix wrong path calculation when - extracting a file to the root directory. +- Issue #7066: archive_util.make_archive now restores the cwd if an error is + raised. Initial patch by Ezio Melotti. -- Issue #2245: aifc now skips chunk types it doesn't recognize, per spec. +- Issue #6218: io.StringIO and io.BytesIO instances are now picklable with + protocol 2. -- Issue #4305: ctypes should now build again on mipsel-linux-gnu +- Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424. -- Issue #5853: calling a function of the mimetypes module from several threads - at once could hit the recursion limit if the mimetypes database hadn't been - initialized before. +- Issue #7099: Decimal.is_normal now returns True for numbers with exponent + larger than emax. -- Issue #5041: ctypes does now allow pickling wide character. +- Issue #5833: Fix extra space character in readline completion with the GNU + readline library version 6.0. -- Issue #5768: Fixed bug in Unicode output logic and test case for same. +- Issue #7133: SSL objects now support the new buffer API. -- Issue #1161031: fix readwrite select flag handling: POLLPRI now - results in a handle_expt_event call, not handle_read_event, and POLLERR - and POLLNVAL now call handle_close, not handle_expt_event. Also, - dispatcher now has an 'ignore_log_types' attribute for suppressing - log messages, which is set to 'warning' by default. +- Issue #7149: urllib fails on OSX in the proxy detection code. -- Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in - makeunicodedata.py and regenerated the Unicode database (This fixes - u'\u1d79'.lower() == '\x00'). +- Issue #7069: Make inspect.isabstract() return a boolean. + +- Add support to the ``ihooks`` module for relative imports. + +- Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment. + +- Issue #7086: Added TCP support to SysLogHandler, and tidied up some + anachronisms in the code which were a relic of 1.5.2 compatibility. + +- Issue #7082: When falling back to the MIME 'name' parameter, the correct place + to look for it is the Content-Type header. + +- Issue #7048: Force Decimal.logb to round its result when that result is too + large to fit in the current precision. + +- Issue #6516: Added owner/group support when creating tar archives in + Distutils. -- Issue #1202: zipfile module would cause a DeprecationWarning when storing - files with a CRC32 > 2**31-1. +- Issue #7031: Add ``TestCase.assert(Not)IsInstance()`` methods. + +- Issue #6790: Make it possible again to pass an ``array.array`` to + ``httplib.HTTPConnection.send``. Patch by Kirk McDonald. + +- Issue #6236, #6348: Fix various failures in the `io` module under AIX and + other platforms, when using a non-gcc compiler. Patch by egreen. + +- Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. + +- Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 + +- Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now + always result in NULL. + +- Issue #5042: ctypes Structure sub-subclass does now initialize correctly with + base class positional arguments. + +- Issue #6938: Fix a TypeError in string formatting of a multiprocessing debug + message. + +- Issue #6635: Fix profiler printing usage message. + +- Issue #6856: Add a filter keyword argument to TarFile.add(). - Issue #6163: Fixed HP-UX runtime library dir options in - distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and - Michael Haubenwallner. + distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and Michael + Haubenwallner. + +- Issue #6857: Default format() alignment should be '>' for Decimal instances. + +- Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning + NaN or raising InvalidContext. Also, fix infinite recursion in + long(Decimal('nan')). + +- Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no + type specifier. + +- Issue #4937: plat-mac/bundlebuilder refers to non-existing version.plist. + +- Issue #6838: Use a list to accumulate the value instead of repeatedly + concatenating strings in httplib's HTTPResponse._read_chunked providing a + significant speed increase when downloading large files servend with a + Transfer-Encoding of 'chunked'. + +- Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments + as documented. + +- Issue #2666: Handle BROWSER environment variable properly for unknown browser + names in the webbrowser module. + +- Issue #6054: Do not normalize stored pathnames in tarfile. + +- Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN + payloads are now ordered by integer value rather than lexicographically. + +- Issue #6693: New functions in site.py to get user/global site packages paths. + +- The thread.lock type now supports weak references. + +- Issue #1356969: Add missing info methods in Tix.HList. + +- Issue #1522587: New constants and methods for the Tix.Grid widget. + +- Issue #1250469: Fix the return value of Tix.PanedWindow.panes. + +- Issue #1119673: Do not override Tkinter.Text methods when creating a + ScrolledText. + +- Issue #6665: Fix fnmatch to properly match filenames with newlines in them. + +- Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview* + and yview* methods. + +- Issue #6629: Fix a data corruption issue in the new `io` package, which could + occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or + "wb+" mode) after having buffered a certain amount of data for reading. This + bug was not present in the pure Python implementation. - Issue #4660: If a multiprocessing.JoinableQueue.put() was preempted, it was possible to get a spurious 'task_done() called too many times' error. -- Issue #6595: The Decimal constructor now allows arbitrary Unicode - decimal digits in input, as recommended by the standard. Previously - it was restricted to accepting [0-9]. +- Issue #1628205: Socket file objects returned by socket.socket.makefile() now + properly handles EINTR within the read, readline, write & flush methods. The + socket.sendall() method now properly handles interrupted system calls. + +- Issue #6595: The Decimal constructor now allows arbitrary Unicode decimal + digits in input, as recommended by the standard. Previously it was restricted + to accepting [0-9]. + +- Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when + opening an empty or very small file. - Issue #6553: Fixed a crash in cPickle.load(), when given a file-like object containing incomplete data. -- Issue #2622: Fixed an ImportError when importing email.message from a +- Issue #6545: Removed assert statements in distutils.Extension, so the behavior + is similar when used with -O. + +- unittest has been split up into a package. All old names should still work. + +- Issue #6431: Make Fraction type return NotImplemented when it doesn't know how + to handle a comparison without loss of precision. Also add correct handling + of infinities and nans for comparisons with float. + +- Issue #6415: Fixed warnings.warn segfault on bad formatted string. + +- Issue #6466: Now distutils.cygwinccompiler and distutils.emxccompiler uses the + same refactored function to get gcc/ld/dllwrap versions numbers. It's + ``distutils.util.get_compiler_versions()``. Added deprecation warnings for + the obsolete get_versions() functions. + +- Issue #6433: Fixed issues with multiprocessing.pool.map hanging on empty list. + +- Issue #6314: logging: Extra checks on the "level" argument in more places. + +- Issue #2622: Fixed an ImportError when importing email.messsage from a standalone application built with py2exe or py2app. - Issue #6455: Fixed test_build_ext under win32. +- Issue #6377: Enabled the compiler option, and deprecate its usage as an + attribute. + +- Issue #6413: Fixed the log level in distutils.dist for announce. + +- Issue #3392: The subprocess communicate() method no longer fails in select() + when file descriptors are large; communicate() now uses poll() when possible. + - Issue #6403: Fixed package path usage in build_ext. -- Issue #6287: Added the license field in Distutils documentation. +- Issues #5155, #5313, #5331: multiprocessing.Process._bootstrap was + unconditionally calling "os.close(sys.stdin.fileno())" resulting in file + descriptor errors. -- Issue #6263: Fixed syntax error in distutils.cygwincompiler. +- Issue #6365: Distutils build_ext inplace mode was copying the compiled + extension in a subdirectory if the extension name had dots. -- 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 #6344: Fixed a crash of mmap.read() when passed a negative argument. -- Issue #6062: In distutils, fixed the package option of build_ext. Feedback - and tests on pywin32 by Tim Golden. +- Issue #5230: pydoc would report no documentation found if a module generated a + 'not found' import error when loaded; it now reports the import errors. + Thanks to Lucas Prado Melo for initial fix and collaboration on the tests. -- Issue #1309567: Fix linecache behavior of stripping subdirectories when - looking for files given by a relative filename. +- Issue #6314: ``logging.basicConfig()`` performs extra checks on the "level" + argument. -- Issue #6046: Fixed the library extension when distutils build_ext is used - inplace. Initial patch by Roumen Petrov. +- Issue #6164: Added an AIX specific linker argument in Distutils unixcompiler. + Original patch by Sridhar Ratnakumar. -- Issue #6022: a test file was created in the current working directory by - test_get_outputs in Distutils. +- Issue #6274: Fixed possible file descriptors leak in subprocess.py. -- Issue #5977: distutils build_ext.get_outputs was not taking into account the - inplace option. Initial patch by kxroberto. +- Issue #6189: Restored compatibility of subprocess.py with Python 2.2. -- Issue #5984: distutils.command.build_ext.check_extensions_list checks were - broken for old-style extensions. +- Issue #6287: Added the license field in Distutils documentation. -- Issue #5854: Updated __all__ to include some missing names and remove some - names which should not be exported. +- Issue #6286: Now Distutils upload command is based on urllib2 instead of + httplib, allowing the usage of http_proxy. -- Issue #5810: Fixed Distutils test_build_scripts so it uses - sysconfig.get_config_vars. +- Issue #6271: mmap tried to close invalid file handle (-1) for anonymous maps + on Unix. -- Issue #6865: Fix reference counting issue in the initialization of the pwd - module. +- Issue #6215: All bug fixes and enhancements from the Python 3.1 io library + (including the fast C implementation) have been backported to the standard + ``io`` module. -Extension Modules ------------------ +- Issue #6258: Support AMD64 in bdist_msi. -- Issue #6944: Fix a SystemError when socket.getnameinfo() was called - with something other than a tuple as first argument. +- Issue #6252: Fixed bug in next rollover time computation in + TimedRotatingFileHandler. -- Issue #6848: Fix curses module build failure on OS X 10.6. +- Issue #6263: Fixed syntax error in distutils.cygwincompiler. -- Fix expat to not segfault with specially crafted input. +- 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 #4873: Fix resource leaks in error cases of pwd and grp. +- Issue #5767: Removed sgmlop support from xmlrpclib. -Build ------ +- Issue #6131: test_modulefinder leaked when run after test_distutils. Patch by + Hirokazu Yamamoto. -- Issue #6980: Fix ctypes build failure on armel-linux-gnueabi with - -mfloat-abi=softfp. +- Issue #6048: Now Distutils uses the tarfile module in archive_util. -- Issue #6802: Fix build issues on MacOSX 10.6 +- Issue #5150: IDLE's format menu now has an option to strip trailing + whitespace. -- Issue #5390: Add uninstall icon independent of whether file - extensions are installed. +- Issue #6121: pydoc now ignores leading and trailing spaces in the argument to + the 'help' function. -- Issue #6094: Build correctly with Subversion 1.7. +- 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 #5726: Make Modules/ld_so_aix return the actual exit code of the - linker, rather than always exit successfully. Patch by Floris Bruynooghe. +- Issue #6050: Don't fail extracting a directory from a zipfile if the directory + already exists. -- Issue #5809: Specifying both --enable-framework and --enable-shared is - an error. Configure now explicity tells you about this. +- Issue #5311: bdist_msi can now build packages that do not depend on a specific + Python version. -Documentation -------------- +- 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 #6556: Fixed the Distutils configuration files location explanation - for Windows. +- Issue #1424152: Fix for httplib, urllib2 to support SSL while working through + proxy. Original patch by Christopher Li, changes made by Senthil Kumaran. -- Issue #6801 : symmetric_difference_update also accepts |. - Thanks to Carl Chenet. +- 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. -Tests ------ +- Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket. + Patch by Farhan Ahmad, test by Marcin Bachry. -- Issue #5837: Certain sequences of calls to set() and unset() for - support.EnvironmentVarGuard objects restored the environment variables - incorrectly on __exit__. +- 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. -What's New in Python 2.6.2 -========================== +- Issue #6046: Fixed the library extension when distutils build_ext is used in + place. Initial patch by Roumen Petrov. -*Release date: 14-Apr-2009* +- 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. -What's New in Python 2.6.2 rc 1 -=============================== +- Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. -*Release date: 06-Apr-2009* +- Issue #5918: Fix a crash in the parser module. -Core and Builtins ------------------ +- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr. -- xrange() is now registered as a Sequence. +- Issue #6022: A test file was created in the current working directory by + test_get_outputs in Distutils. -- Fix a problem in PyErr_NormalizeException that leads to "undetected errors" - when hitting the recursion limit under certain circumstances. +- Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source' + file is a binary. Patch by Brodie Rao, tests by Daniel Diniz. -- Issue #1665206: Remove the last eager import in _warnings.c and make it lazy. +- Issue #5977: distutils build_ext.get_outputs was not taking into account the + inplace option. Initial patch by kxroberto. -- Issue #4034: Fix weird attribute error messages of the traceback object. (As - a result traceback.__members__ no longer exists.) +- Issue #5984: distutils.command.build_ext.check_extensions_list checks were + broken for old-style extensions. -- Issue #5247: Improve error message when unknown format codes are - used when using str.format() with str, unicode, long, int, and - float arguments. +- Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when + trying to print a traceback. -- Running Python with the -3 option now also warns about classic division - for ints and longs. +- Issue #5976: Fixed Distutils test_check_environ. -- Issue #5013: Fixed a bug in FileHandler which occurred when the delay - parameter was set. +- Issue #5900: Ensure RUNPATH is added to extension modules with RPATH if GNU ld + is used. Original patch by Floris Bruynooghe. -- Issue #1242657: the __len__() and __length_hint__() calls in several tools - were suppressing all exceptions. These include list(), filter(), map(), - zip(), and bytearray(). +- Issue #5941: Distutils build_clib command was not working anymore because of + an incomplete costumization of the archiver command. Added ARFLAGS in the + Makefile besides AR and make Distutils use it. Original patch by David + Cournapeau. -- Issue #4935: The overflow checking code in the expandtabs() method common - to str, bytes and bytearray could be optimized away by the compiler, letting - the interpreter segfault instead of raising an error. +- Issue #5955: aifc's close method did not close the file it wrapped, now it + does. This also means getfp method now returns the real fp. -- Issue #4915: Port sysmodule to Windows CE. +- Issue #4875: On win32, ctypes.util.find_library does no longer return + directories. -- Issue #1180193: When importing a module from a .pyc (or .pyo) file with - an existing .py counterpart, override the co_filename attributes of all - code objects if the original filename is obsolete (which can happen if the - file has been renamed, moved, or if it is accessed through different paths). - Patch by Ziga Seilnacht and Jean-Paul Calderone. +- Issue #5142: Add the ability to skip modules while stepping to pdb. -- Issue #4075: Use OutputDebugStringW in Py_FatalError. +- Issue #1309567: Fix linecache behavior of stripping subdirectories when + looking for files given by a relative filename. -- Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open - file with `str' filename on Windows. +- Issue #5692: In ``zipfile.Zipfile``, fix wrong path calculation when + extracting a file to the root directory. -- Issue #3680: Reference cycles created through a dict, set or deque iterator - did not get collected. +- Issue #5913: ``os.listdir()`` should fail for empty path on windows. -- Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types - where the tp_hash and tp_dict slots are both NULL. +- Issue #5084: Unpickling now interns the attribute names of pickled objects, + saving memory and avoiding growth in size of subsequent pickles. Proposal and + original patch by Jake McGuire. -- Issue #4764: With io.open, IOError.filename is set when trying to open a - directory on POSIX systems. +- Issue #3002: ``shutil.copyfile()`` and ``shutil.copytree()`` now raise an + error when a named pipe is encountered, rather than blocking infinitely. -- Issue #4764: IOError.filename is set when trying to open a directory on POSIX - systems. +- Issue #3959: The ipaddr module has been added to the standard library. + Contributed by Google. -- Issue #4759: None is now allowed as the first argument of - bytearray.translate(). It was always allowed for bytes.translate(). +- Issue #2245: aifc now skips chunk types it doesn't recognize, per spec. -- Issue #4759: fix a segfault for bytearray.translate(x, None). +- Issue #5874: distutils.tests.test_config_cmd is not locale-sensitive anymore. -- Added test case to ensure attempts to read from a file opened for writing - fail. +- Issue #4305: ctypes should now build again on mipsel-linux-gnu -- Issue #4597: Fixed several opcodes that weren't always propagating - exceptions. +- Issue #1734234: Massively speedup ``unicodedata.normalize()`` when the string + is already in normalized form, by performing a quick check beforehand. + Original patch by Rauli Ruohonen. -- Issue #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 #5853: Calling a function of the mimetypes module from several threads + at once could hit the recursion limit if the mimetypes database hadn't been + initialized before. -- Issue #4589: Fixed exception handling when the __exit__ function of a - context manager returns a value that cannot be converted to a bool. +- Issue #5854: Updated __all__ to include some missing names and remove some + names which should not be exported. -- 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 #5810: Fixed Distutils test_build_scripts so it uses + ``sysconfig.get_config_vars()``. -- Issue #3689: The list reversed iterator now supports __length_hint__ - instead of __len__. Behavior now matches other reversed iterators. +- Issue #4951: Fixed failure in test_httpservers. -- Issue #4509: Various issues surrounding resize of bytearray objects to - which there are buffer exports. +- Issue #3102: All global symbols that the _ctypes extension defines are now + prefixed with 'Py' or '_ctypes'. -- Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with - short file names. +- Issue #5041: ctypes does now allow pickling wide character. -- Issue #5705: os.setuid() would not accept values > 2**31-1 but pwd.getpwnam() - returned them on 64bit platforms. +- Issue #5812: For the two-argument form of the Fraction constructor, + ``Fraction(m, n)``, m and n are permitted to be arbitrary Rational instances. -Library -------- +- Issue #5812: Fraction('1e6') is valid: more generally, any string that's valid + for float() is now valid for Fraction(), with the exception of strings + representing NaNs and infinities. + +- Issue #5795: Fixed test_distutils failure on Debian ppc. + +- Issue #5768: Fixed bug in Unicode output logic and test case for same. -- Issue #5741: don't disallow "%%" (which is an escape for "%") when setting - a value in SafeConfigParser. +- Issue #1161031: Fix readwrite select flag handling: POLLPRI now results in a + handle_expt_event call, not handle_read_event, and POLLERR and POLLNVAL now + call handle_close, not handle_expt_event. Also, dispatcher now has an + 'ignore_log_types' attribute for suppressing log messages, which is set to + 'warning' by default. + +- Issue #5607: Fixed Distutils test_get_platform for Mac OS X fat binaries. + +- Issue #5741: Don't disallow "%%" (which is an escape for "%") when setting a + value in SafeConfigParser. + +- Issue #5732: Added a new command in Distutils: check. - Issue #5731: Distutils bdist_wininst no longer worked on non-Windows - platforms. Initial patch by Paul Moore. + platforms. Initial patch by Paul Moore. + +- Issue #2254: Fix CGIHTTPServer information disclosure. Relative paths are now + collapsed within the url properly before looking in cgi_directories. + +- Issue #5095: Added bdist_msi to the list of bdist supported formats. Initial + fix by Steven Bethard. + +- Issue #1491431: Fixed distutils.filelist.glob_to_re for edge cases. Initial + fix by Wayne Davison. -- Issue #1491431: Fixed distutils.filelist.glob_to_re for edge cases. - Initial fix by Wayne Davison. +- Issue #5693: TestSuite.__iter__ can now be consistently overridden in + subclasses. + +- Issue #5694: Removed spurious test output in Distutils (test_clean). - Issue #5471: Fix os.path.expanduser() for $HOME set to '/'. -- Issue #1726172: fix IndexError in the case of and empty response in ftplib. +- Issue #1326077: Fix the formatting of SyntaxErrors by the traceback module. + +- Issue #1726172: Fix IndexError in the case of and empty response in ftplib. + +- Issue #2625: Added missing iteritems() call to the for loop in + mailbox.MH.get_message(). + +- Issue #5585: Add the ability to call an initializer to + mulitiprocessing.manager so that users can install custom handlers/etc. + +- Issue #3551: Patch multiprocessing to raise a proper exception if the size of + the object when writefile is called causes a ERROR_NO_SYSTEM_RESOURCES. Added + docs to note the limitation. + +- unittest.assertNotEqual() now uses the inequality operator (!=) instead of the + equality operator. + +- Issue #6001: Test discovery for unittest. Implemented in + unittest.TestLoader.discover and from the command line. + +- Issue #5679: The methods unittest.TestCase.addCleanup and doCleanups were + added. addCleanup allows you to add cleanup functions that will be called + unconditionally (after setUp if setUp fails, otherwise after tearDown). This + allows for much simpler resource allocation and deallocation during tests. + +- Issue #3379: unittest.main now takes an optional exit argument. If False main + doesn't call sys.exit allowing it to be used from the interactive interpreter. + +- Issue #5995: unittest.main now takes an optional verbosity argument allowing + test modules to be run with a higher than default verbosity. + +- Issue #5995: A fix to allow you to run "python -m unittest test_module" or + "python -m unittest test_module.TestClass" from the command line. + +- Issue #5728: unittest.TestResult has new startTestRun and stopTestRun methods; + called immediately before and after a test run. + +- Issue #5663: Better failure messages for unittest asserts. Default assertTrue + and assertFalse messages are now useful. TestCase has a longMessage attribute. + This defaults to False, but if set to True useful error messages are shown in + addition to explicit messages passed to assert methods. + +- Issue #3110: Add additional protect around SEM_VALUE_MAX for multiprocessing. - In Pdb, prevent the reassignment of __builtin__._ by sys.displayhook on printing out values. -- Issue #4572: added SEEK_* symbolic constants to io module. +- Issue #4572: Added SEEK_* symbolic constants to io module. - Issue #1665206 (partially): Move imports in cgitb to the top of the module instead of performing them in functions. Helps prevent import deadlocking in @@ -1425,304 +3413,481 @@ Library - Actually make the SimpleXMLRPCServer CGI handler work. -- Issue #2625: added missing iteritems() call to the for loop in - mailbox.MH.get_message(). - -- Issue #5647: MutableSet.__iand__() no longer mutates self during iteration. +- Issue #2522: locale.format() now checks its first argument to ensure it has + been passed only one pattern, avoiding mysterious errors where it appeared + that it was failing to do localization. -- Issue #5619: Multiprocessing children disobey the debug flag and causes - popups on windows buildbots. Patch applied to work around this issue. +- Issue #5583: Added optional extensions in Distutils. Initial patch by Georg + Brandl. -- Issue #5632: Thread.ident was None for the main thread and threads not - created with the threading module. +- Issue #5619: Multiprocessing children disobey the debug flag and causes popups + on windows buildbots. Patch applied to work around this issue. -- Issue #5400: Added patch for multiprocessing on netbsd compilation/support +- Issue #5632: Thread.ident was None for the main thread and threads not created + with the threading module. -- Fix and properly document the multiprocessing module's logging - support, expose the internal levels and provide proper usage - examples. +- Issue #5400: Added patch for multiprocessing on netbsd compilation/support. - Issue #5387: Fixed mmap.move crash by integer overflow. -- Issue #3807: _multiprocessing build fails when configure is passed - --without-threads argument. When this occurs, _multiprocessing will - be disabled, and not compiled. - -- Issue #5261: Patch multiprocessing's semaphore.c to support context - manager use: "with multiprocessing.Lock()" works now. +- Issue #5261: Patch multiprocessing's semaphore.c to support context manager + use: "with multiprocessing.Lock()" works now. - Issue #5177: Multiprocessing's SocketListener class now uses - socket.SO_REUSEADDR on all connections so that the user no longer needs - to wait 120 seconds for the socket to expire. + socket.SO_REUSEADDR on all connections so that the user no longer needs to + wait 120 seconds for the socket to expire. -- Adjusted _tkinter to compile without warnings when WITH_THREAD is not - defined (part of issue #5035). +- Adjusted _tkinter to compile without warnings when WITH_THREAD is not defined + (part of issue #5035). - Issue #5561: Removed the sys.version_info shortcuts from platform's python_version() and python_version_tuple() since they produced different output compared to previous Python versions. -- Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop - forever on incomplete input. That caused tarfile.open() to hang when used - with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or - partial bzip2 compressed data. +- Issue #1034053: unittest now supports skipping tests and expected failures. + +- The unittest.TestCase.assertRaises() method now returns a context manager when + not given a callable so that code to be tested can be written inline using a + with statement. + +- Issue #2578: The unittest.TestCase.assertEqual() now displays the differences + in lists, tuples, dicts and sets on failure. Many new handy type and + comparison specific assert* methods have been added that fail with error + messages actually useful for debugging. Contributed in part by Google. + +- Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop forever + on incomplete input. That caused tarfile.open() to hang when used with mode + 'r' or 'r:bz2' and a fileobj argument that contained no data or partial bzip2 + compressed data. - Issue #5536: urllib.urlretrieve makes sure to close the file it's writing to even if an exception occurs. -- Fix Decimal.__format__ bug that swapped the meanings of the '<' and - '>' alignment characters. +- Issue #5381: Added object_pairs_hook to the json module. This allows + OrderedDicts to be built by the decoder. + +- Issue #2110: Add support for thousands separator and 'n' type specifier to + ``Decimal.__format__()``. -- Issue #1222: locale.format() bug when the thousands separator is a space +- 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 #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 #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. -- Issue #4308: httplib.IncompleteRead's repr doesn't include all of the data - all ready received. +- 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 in accessing elements of second map object - with same tagname but larger size than first map. (Windows) +- 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 #5282: Fixed mmap resize on 32bit windows and unix. When offset > 0, - The file was resized to wrong size. +- Issue #2279: distutils.sdist.add_defaults now add files from the package_data + and the data_files metadata. -- Issue #5287: Add exception handling around findCaller() call in logging to - help out IronPython. +- 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 #4998: The memory saving effect of __slots__ had been lost on Fractions - which inherited from numbers.py which did not have __slots__ defined. The - numbers hierarchy now has its own __slots__ declarations. +- Issue #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 #3321: _multiprocessing.Connection() doesn't check handle; added checks - for *nix machines for negative handles and large int handles. Without this - check it is possible to segfault the interpreter. - -- Issue #4449: AssertionError in mp_benchmarks.py, caused by an underlying - issue in sharedctypes.py. - - 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 #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. -- Partial fix to issue #1731706: memory leak in Tkapp_Call when calling - from a thread different than the one that created the Tcl interpreter. - Patch by Robert Hancock. +- 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. +- 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 #5021: doctest.testfile() did not create __name__ and - collections.namedtuple() relied on __name__ being defined. +- Issue #4920: Fixed .next() vs .__next__() issues in the ABCs for Iterator and + MutableSet. -- Issue #3881: Help Tcl to load even when started through the - unreadable local symlink to "Program Files" on Vista. +- Added the ttk module. See issue #2983: Ttk support for Tkinter. -- Issue #4710: Extract directories properly in the zipfile module; - allow adding directories to a zipfile. +- Issue #5021: doctest.testfile() did not create __name__ and + collections.namedtuple() relied on __name__ being defined. -- 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. +- 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 #3997: zipfiles generated with more than 65536 files could not be - opened with other applications. +- Issue #1885: distutils: When running sdist with --formats=tar,gztar the tar + file was overriden by the gztar one. -- Issue #4816: itertools.combinations() and itertools.product were raising - a ValueError for values of *r* larger than the input iterable. They now - correctly return an empty iterator. +- Issue #4863: distutils.mwerkscompiler has been removed. -- Fractions.from_float() no longer loses precision for integers too big to - cast as floats. +- Added new itertools functions: combinations_with_replacement() and compress(). -- Issue #4790: The nsmallest() and nlargest() functions in the heapq module - did unnecessary work in the common case where no key function was specified. +- Issue #5032: Added a step argument to itertools.count() and allowed + non-integer arguments. -- Issue #3767: Convert Tk object to string in tkColorChooser. +- Fix and properly document the multiprocessing module's logging support, expose + the internal levels and provide proper usage examples. -- Issue #3248: Allow placing ScrolledText in a PanedWindow. +- Issue #1672332: Fix unpickling of subnormal floats, which was + producing a ValueError on some platforms. -- Issue #3954: Fix a potential SystemError in _hotshot.logreader error - handling. +- Issue #3881: Help Tcl to load even when started through the unreadable local + symlink to "Program Files" on Vista. -- Issue #4574: fix a crash in io.IncrementalNewlineDecoder when a carriage - return encodes to more than one byte in the source encoding (e.g. UTF-16) - and gets split on a chunk boundary. +- Issue #4710: Extract directories properly in the zipfile module; allow adding + directories to a zipfile. -- Issue #4223: inspect.getsource() will now correctly display source code - for packages loaded via zipimport (or any other conformant PEP 302 - loader). Original patch by Alexander Belopolsky. +- Issue #3807: _multiprocessing build fails when configure is passed + --without-threads argument. When this occurs, _multiprocessing will be + disabled, and not compiled. -- Issue #4201: pdb can now access and display source code loaded via - zipimport (or any other conformant PEP 302 loader). Original patch by - Alexander Belopolsky. +- Issue #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 #4197: doctests in modules loaded via zipimport (or any other PEP - 302 conformant loader) will now work correctly in most cases (they - are still subject to the constraints that exist for all code running - from inside a module loaded via a PEP 302 loader and attempting to - perform IO operations based on __file__). Original patch by - Alexander Belopolsky. +- Issue #5013: Fixed a bug in FileHandler which occurred when the delay + parameter was set. -- Issues #4082 and #4512: Add runpy support to zipimport in a manner that - allows backporting to maintenance branches. Original patch by - Alexander Belopolsky. +- Issue #4998: The memory saving effect of __slots__ had been lost on Fractions + which inherited from numbers.py which did not have __slots__ defined. The + numbers hierarchy now has its own __slots__ declarations. -- Issue #4616: TarFile.utime(): Restore directory times on Windows. +- Issue #3321: _multiprocessing.Connection() doesn't check handle; added checks + for *nix machines for negative handles and large int handles. Without this + check it is possible to segfault the interpreter. -- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat - libs. +- Issue #4449: AssertionError in mp_benchmarks.py, caused by an underlying issue + in sharedctypes.py. -- FileIO's mode attribute now always includes ``"b"``. +- Issue #1225107: inspect.isclass() returned True for instances with a custom + __getattr__. -- Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on - biarch systems. Try to rely on ldconfig only, without using objdump and gcc. +- Issue #3997: Zipfiles generated with more than 65536 files could not be opened + with other applications. -- Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for - new arguments introduced in 2.5. +- Issue #1162154: ``inspect.getmembers()`` now skips attributes that raise + AttributeError, e.g. a __slots__ attribute which has not been set. -- Issue #1885: distutils. When running sdist with --formats=tar,gztar - the tar file was overriden by the gztar one. +- Issue #1696199: Add collections.Counter() for rapid and convenient counting. -- Registered Decimal as a numbers.Number so that isinstance(d, Number) works. +- Issue #3860: GzipFile and BZ2File now support the context manager protocol. -- Issue #1672332: fix unpickling of subnormal floats, which was - producing a ValueError on some platforms. +- Issue #4272: Add an optional argument to the GzipFile constructor to override + the timestamp in the gzip stream. The default value remains the current time. + The information can be used by e.g. gunzip when decompressing. Patch by + Jacques Frechet. - Restore Python 2.3 compatibility for decimal.py. - Issue #1702551: distutils sdist was not excluding VCS directories under Windows. Inital solution by Guy Dalberto. -- Issue #4812: add missing underscore prefix to some internal-use-only - constants in the decimal module. (Dec_0 becomes _Dec_0, etc.) +- The _tkinter module functions "createfilehandler", "deletefilehandler", + "createtimerhandler", "mainloop", "dooneevent" and "quit" have been deprecated + for removal in 3.x + +- Issue #4796: Added Decimal.from_float() and + Context.create_decimal_from_float() to the decimal module. + +- Issue #4812: Add missing underscore prefix to some internal-use-only constants + in the decimal module. (Dec_0 becomes _Dec_0, etc.) - Issue #4795: inspect.isgeneratorfunction() returns False instead of None when the function is not a generator. -- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case - no MSVC compiler is found under Windows. Original patch by Philip Jenvey. +- Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case no + MSVC compiler is found under Windows. Original patch by Philip Jenvey. + +- Issue #4646: distutils was choking on empty options arg in the setup function. + Original patch by Thomas Heller. - - Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@') - works as expected in the interactive environment. +- Fractions.from_float() no longer loses precision for integers too big to cast + as floats. + +- Issue #4790: The nsmallest() and nlargest() functions in the heapq module did + unnecessary work in the common case where no key function was specified. + +- Issue #3767: Convert Tk object to string in tkColorChooser. + +- Issue #3248: Allow placing ScrolledText in a PanedWindow. + +- Issue #4444: Allow assertRaises() to be used as a context handler, so that the + code under test can be written inline if more practical. + +- Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@') works + as expected in the interactive environment. - Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by Gabriel Genellina. -- Issue #4646: distutils was choking on empty options arg in the setup - function. Original patch by Thomas Heller. - - Issue #4400: .pypirc default generated file was broken in distutils. - Issue #4736: io.BufferedRWPair's closed property now functions properly. -- Issue #3954: Fix a potential SystemError in _hotshot.logreader error - handling. +- Issue #3954: Fix a potential SystemError in _hotshot.logreader error handling. + +- Issue #4574: Fix a crash in io.IncrementalNewlineDecoder when a carriage + return encodes to more than one byte in the source encoding (e.g. UTF-16) and + gets split on a chunk boundary. + +- Issue #4223: inspect.getsource() will now correctly display source code for + packages loaded via zipimport (or any other conformant PEP 302 + loader). Original patch by Alexander Belopolsky. + +- Issue #4201: pdb can now access and display source code loaded via zipimport + (or any other conformant PEP 302 loader). Original patch by Alexander + Belopolsky. + +- Issue #4197: Doctests in modules loaded via zipimport (or any other PEP 302 + conformant loader) will now work correctly in most cases (they are still + subject to the constraints that exist for all code running from inside a + module loaded via a PEP 302 loader and attempting to perform IO operations + based on __file__). Original patch by Alexander Belopolsky. + +- Issues #4082 and #4512: Add runpy support to zipimport in a manner that allows + backporting to maintenance branches. Original patch by Alexander Belopolsky. - Issue #4163: Use unicode-friendly word splitting in the textwrap functions when given an unicode string. - Issue #4616: TarFile.utime(): Restore directory times on Windows. -- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to - give correct results in the case where one argument is a quiet NaN - and the other is a finite number that requires rounding. +- Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to give correct + results in the case where one argument is a quiet NaN and the other is a + finite number that requires rounding. -- Issue #1030250: Distutils created directories even when run with the - --dry-run option. +- Issue #1030250: Distutils created directories even when run with the --dry-run + option. -- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat - libs. +- Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat libs. -- Issue #4529: fix the parser module's validation of try-except-finally +- Issue #4529: Fix the parser module's validation of try-except-finally statements. - Issue #4458: getopt.gnu_getopt() now recognizes a single "-" as an argument, not a malformed option. -- Added the subprocess.check_output() convenience function to get output - from a subprocess on success or raise an exception on error. +- Added the subprocess.check_output() convenience function to get output from a + subprocess on success or raise an exception on error. - Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to support unusual filenames (such as those containing semi-colons) in Content-Disposition headers. +- Issue #4384: Added logging integration with warnings module using + captureWarnings(). This change includes a NullHandler which does nothing; it + will be of use to library developers who want to avoid the "No handlers could + be found for logger XXX" message which can appear if the library user doesn't + configure logging. + +- Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an + exception. + +- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if the + ctypes module is not present. + +- FileIO's mode attribute now always includes ``"b"``. + +- Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__. + +- httplib.HTTPConnection.putheader() now accepts an arbitrary number of values + for any header, matching what the documentation has claimed for a while. + +- Issue #3774: Fixed an error when create a Tkinter menu item without command + and then remove it. + +- Fixed a modulefinder crash on certain relative imports. + +- Issue #4150: Pdb's "up" command now works for generator frames in post-mortem + debugging. + +- Issue #4092: Return ArgInfo as promised in the documentation from + inspect.getargvalues. + +- Issue #3935: Properly support list subclasses in bisect's C implementation. + +- Issue #4014: Don't claim that Python has an Alpha release status, in addition + to claiming it is Mature. + - Issue #4730: Fixed the cPickle module to handle correctly astral characters when protocol 0 is used. +- Issue #1594: MacOS.GetCreatorAndType now always returns a big-endian result, + to be consistent with Apple tools. + +- Issue #900949: plat-mac/videoreader.py no longer relies on a non-existing + module. + - Issue #16278952: plat-mac/videoreader.py now correctly imports MediaDescr -- Issue #1737832 : plat-mac/EasyDialog.py no longer uses the broken aepack +- Issue #1737832: plat-mac/EasyDialog.py no longer uses the broken aepack module. -- Issue #1149804: macostools.mkdirs now even works when another process - creates one of the needed subdirectories. +- Issue #1149804: macostools.mkdirs now even works when another process creates + one of the needed subdirectories. -Tools/Demos ------------ +- Issue #900506: added --no-zipimport flag to the bundlebuilder script. -- Issue #4677: add two list comprehension tests to pybench. +- Issue #841800: bundlebuilder now works with 'python -O'. -Extension Modules ------------------ +- Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on + biarch systems. Try to rely on ldconfig only, without using objdump and gcc. -- Issue #4301: Patch the logging module to add processName support, remove - _check_logger_class from multiprocessing. +- 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 #1040026: Fix os.times result on systems where HZ is incorrect. +- Issue #999042: The Python compiler now handles explict global statements + correctly (should be assigned using STORE_GLOBAL opcode). -- Issue #4397: Fix occasional test_socket failure on OS X. +- Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for new + arguments introduced in 2.5. -- Issue #4279: Fix build of parsermodule under Cygwin. +- Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in + makeunicodedata.py and regenerated the Unicode database (This fixes + u'\u1d79'.lower() == '\x00'). -- Issue #4051: Prevent conflict of UNICODE macros in cPickle. +- Windows locale mapping updated to Vista. -- Issue #4228: Pack negative values the same way as 2.4 in struct's L format. +Tools/Demos +----------- -- Issue #1040026: Fix os.times result on systems where HZ is incorrect. +- Ttk demos added in Demo/tkinter/ttk/. -- Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris, - OpenBSD. +- 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. + +- Add 2 new options to ``--with-universal-archs`` on MacOSX: ``intel`` builds a + distribution with ``i386`` and ``x86_64`` architectures, while ``3-way`` + builds a distribution with the ``ppc``, ``i386`` and ``x86_64`` architectures. + +- Issue #6802: Fix build issues on MacOSX 10.6. + +- Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6. + +- Issue #5390: Add uninstall icon independent of whether file extensions are + installed. + +- Issue #5809: Specifying both --enable-framework and --enable-shared is an + error. Configure now explicity tells you about this. + +- Issue #3585: Add pkg-config support. It creates a python-2.7.pc file and a + python.pc symlink in the $(LIBDIR)/pkgconfig directory. Patch by Clinton Roy. + +- Issue #6094: Build correctly with Subversion 1.7. + +- Issue #5847: Remove -n switch on "Edit with IDLE" menu item. + +- Issue #5726: Make Modules/ld_so_aix return the actual exit code of the linker, + rather than always exit successfully. Patch by Floris Bruynooghe. + +- Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify + the order that backends for the dbm extension are checked. + - Link the shared python library with $(MODLIBS). - Issue #5134: Silence compiler warnings when compiling sqlite with VC++. @@ -1731,133 +3896,232 @@ Build - Issue #4895: Use _strdup on Windows CE. -- Issue #4472: "configure --enable-shared" now works on OSX +- Issue #4472: ``configure --enable-shared`` now works on OSX. - Issues #4728 and #4060: WORDS_BIGEDIAN is now correct in Universal builds. +- Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs". + +- Issue #4289: Remove Cancel button from AdvancedDlg. + +- Issue #1656675: Register a drop handler for .py* files on Windows. + +- Issue #4120: Exclude manifest from extension modules in VS2008. + +- Issue #4091: Install pythonxy.dll in system32 again. + +- Issue #4018: Disable "for me" installations on Vista. + +- Issue #3758: Add ``patchcheck`` build target to ``.PHONY``. + +- Issue #4204: Fixed module build errors on FreeBSD 4. + +Documentation +------------- + +- Issue #6556: Fixed the Distutils configuration files location explanation for + Windows. + +- Issue #6801: symmetric_difference_update also accepts ``|``. Thanks to Carl + Chenet. + C-API ----- -- Issue #4720: The format for PyArg_ParseTupleAndKeywords can begin with '|'. +- Issue #7528: Add PyLong_AsLongAndOverflow (backported from py3k). -- Issue #3632: from the gdb debugger, the 'pyo' macro can now be called when - the GIL is released, or owned by another thread. +- Issue #7228: Add '%lld' and '%llu' support to PyString_FromFormat(V) and + PyErr_Format, on machines with HAVE_LONG_LONG defined. -Tests ------ +- Add new C-API function PyOS_string_to_double, and deprecated PyOS_ascii_atof + and PyOS_ascii_strtod. -- Issue #5635: Fix running test_sys with tracing enabled. +- Removed _PyOS_double_to_string. Use PyOS_double_to_string instead. This is in + preparation for (but not strictly related to) issue #7117, short float repr. -- regrtest no longer treats ImportError as equivalent to SkipTest. Imports - that should cause a test to be skipped are now done using import_module - from test support, which does the conversion. +- Issue #6624: PyArg_ParseTuple with "s" format when parsing argument with NULL: + Bogus TypeError detail string. -- Issue #5083: New 'gui' resource for regrtest. +- Issue #5954: Add a PyFrame_GetLineNumber() function to replace most uses of + PyCode_Addr2Line(). +- Issue #5959: Add a PyCode_NewEmpty() function to create a new empty code + object at a specified file, function, and line number. -What's New in Python 2.6.1 -========================== +- Issue #1419652: Change the first argument to PyImport_AppendInittab() to + ``const char *`` as the string is stored beyond the call. -*Release date: 04-Dec-2008* +- Some PyBytes_* aliases have been removed because they don't exist in 3.x. -Core and Builtins +- Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError for negative + arguments. Previously, it raised TypeError. + +- Issue #4720: The format for PyArg_ParseTupleAndKeywords can begin with '|'. + +- Issue #3632: From the gdb debugger, the 'pyo' macro can now be called when the + GIL is released, or owned by another thread. + +- Issue #4122: On Windows, fix a compilation error when using the + Py_UNICODE_ISSPACE macro in an extension module. + +- Issue #4293: Py_AddPendingCall() is now thread safe and can be used for + asynchronous notifications to python from any thread. Documentation added. + +Extension Modules ----------------- -- Issue #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 #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}. -- Issue #4367: Python would segfault during compiling when the unicodedata - module couldn't be imported and \N escapes were present. +- Issue #7078: Set struct.__doc__ from _struct.__doc__. -- Issue #4348: Some bytearray methods returned that didn't cause any change to - the bytearray, returned the same bytearray instead of a copy. +- Issue #3366: Add erf, erfc, expm1, gamma, lgamma functions to math module. -- Issue #4317: Fixed a crash in the imageop.rgb2rgb8() function. +- Issue #6823: Allow time.strftime() to accept a tuple with a isdst field + outside of the range of [-1, 1] by normalizing the value to within that range. -- Issue #4230: If ``__getattr__`` is a descriptor, it now functions correctly. +- Issue #6877: Make it possible to link the readline extension to libedit on + OSX. -- Issue #4048: The parser module now correctly validates relative imports. +- Issue #6944: Fix a SystemError when socket.getnameinfo() was called with + something other than a tuple as first argument. -- Issue #4225: ``from __future__ import unicode_literals`` didn't work in an - exec statement. +- Issue #6865: Fix reference counting issue in the initialization of the pwd + module. -- Issue #4176: Fixed a crash when pickling an object which ``__reduce__`` - method does not return iterators for the 4th and 5th items. +- Issue #6848: Fix curses module build failure on OS X 10.6. -- Issue #4209: Enabling unicode_literals and the print_function in the same - __future__ import didn't work. +- Fix a segfault in expat when given a specially crafted input lead to the + tokenizer not stopping. CVE-2009-3720. -- On windows, os.chdir given unicode was not working if GetCurrentDirectoryW - returned a path longer than MAX_PATH. (But It's doubtful this code path is - really executed because I cannot move to such directory on win2k) +- Issue #6561: '\d' in a regex now matches only characters with Unicode category + 'Nd' (Number, Decimal Digit). Previously it also matched characters with + category 'No'. -- Issue #4069: When set.remove(element) is used with a set element, the element - is temporarily replaced with an equivalent frozenset. But the eventual - KeyError would always report the empty frozenset([]) as the missing key. Now - it correctly refers to the initial element. +- Issue #1523: Remove deprecated overflow wrapping for struct.pack with an + integer format code ('bBhHiIlLqQ'). Packing an out-of-range integer now + consistently raises struct.error. -- Fixed C99 style comments in several files. Python is now C89 compatible - again. +- Issues #1530559, #1741130: Fix various struct.pack inconsistencies for the + integer formats ('bBhHiIlLqQ'). In the following, '*' represents any of '=', + '<', '>'. -Library -------- + - Packing a float now always gives a Deprecation Warning. Previously it + only warned for 'I', 'L', '*B', '*H', '*I', '*L'. -- Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an - exception. + - If x is not an int, long or float, then packing x will always result in + struct.error. Previously an x with an __int__ method could be packed by + 'b', 'B', 'h', 'H', 'i', 'l', '*b', '*h' ,'*i', '*l', and an x with a + __long__ method could be packed by 'q', 'Q', '*q', '*Q'; for x with + neither __int__ nor __long__, TypeError used to be raised (with a + confusing error message) for 'I', 'L', '*B', '*H', '*I', '*L', and + struct.error in other cases. -- Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if - the ctypes module is not present. + Note: as of Python 2.7 beta 1, the above is out of date. In 2.7 beta 1, any + argument with an __int__ method can be packed, but use of this feature + triggers a DeprecationWarning. -- Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__. +- Issue #4873: Fix resource leaks in error cases of pwd and grp. -- Issue #3774: Fixed an error when create a Tkinter menu item without command - and then remove it. +- Issue #4751: For hashlib algorithms provided by OpenSSL, the Python GIL is now + released during computation on data lengths >= 2048 bytes. -- Fixed a modulefinder crash on certain relative imports. +- Issue #3745: Fix hashlib to always reject unicode and non buffer-api + supporting objects as input no matter how it was compiled (built in + implementations or external openssl library). NOTE: Undone in 2.7a2. -- Issue #4150: Pdb's "up" command now works for generator frames in post-mortem - debugging. +- Issue #4397: Fix occasional test_socket failure on OS X. -- Issue #4092: Return ArgInfo as promised in the documentation from - inspect.getargvalues. +- Issue #4279: Fix build of parsermodule under Cygwin. -- Issue #3935: Properly support list subclasses in bisect's C implementation. +- Issue #4051: Prevent conflict of UNICODE macros in cPickle. -- Issue #4014: Don't claim that Python has an Alpha release status, in addition - to claiming it is Mature. +- Issue #4228: Pack negative values the same way as 2.4 in struct's L format. -Build +- Issue #1040026: Fix os.times result on systems where HZ is incorrect. + +- Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris, + OpenBSD. + +- Issue #4365: Add crtassem.h constants to the msvcrt module. + +- Issue #4396: The parser module now correctly validates the with statement. + +- Issue #5228: Make functools.partial objects can now be pickled. + +Tests ----- -- Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs". +- Issue #7431: Use TESTFN in test_linecache instead of trying to create a file + in the Lib/test directory, which might be read-only for the user running the + tests. -- Issue #4289: Remove Cancel button from AdvancedDlg. +- Issue #7324: Add a sanity check to regrtest argument parsing to catch the case + of an option with no handler. -- Issue #1656675: Register a drop handler for .py* files on Windows. +- Issue #7312: Add a -F flag to run the selected tests in a loop until a test + fails. Can be combined with -j. -- Issue #4120: Exclude manifest from extension modules in VS2008. +- Issue #7295: Do not use a hardcoded file name in test_tarfile. -- Issue #4091: Install pythonxy.dll in system32 again. +- Issue #7270: Add some dedicated unit tests for multi-thread synchronization + primitives such as Lock, RLock, Condition, Event and Semaphore. -- Issue #4018: Disable "for me" installations on Vista. +- Issue #7222: Make thread "reaping" more reliable so that reference + leak-chasing test runs give sensible results. The previous method of reaping + threads could return successfully while some Thread objects were still + referenced. This also introduces a new private function: ``thread._count()``. -- Issue #3758: Add ``patchcheck`` build target to .PHONY. +- Issue #7151: Fixed regrtest -j so that output to stderr from a test no longer + runs the risk of causing the worker thread to fail. -- Issue #4204: Fixed module build errors on FreeBSD 4. +- Issue #7055: test___all__ now greedily detects all modules which have an + __all__ attribute, rather than using a hardcoded and incomplete list. -C-API ------ +- Issue #7058: Added save/restore for things like sys.argv and cwd to + runtest_inner in regrtest, with warnings if the called test modifies them, + and a new section in the summary report at the end. -- Issue #4122: On Windows, fix a compilation error when using the - Py_UNICODE_ISSPACE macro in an extension module. +- Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6. -Extension Modules ------------------ +- Issue #6806: test_platform failed under OS X 10.6.0 because ``sw_ver`` leaves + off the trailing 0 in the version number. -- Issue #4365: Add crtassem.h constants to the msvcrt module. +- Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to + Lib/lib-tk/test/test_tkinter/test_loadtk. With this, these tests demonstrate + the same behaviour as test_ttkguionly (and now also test_tk) which is to skip + the tests if DISPLAY is defined but can't be used. -- Issue #4396: The parser module now correctly validates the with statement. +- Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running + regression tests in parallel, shortening the total runtime. + +- Issue #5354: New test support function import_fresh_module() makes it easy to + import both normal and optimised versions of modules. test_heapq and + test_warnings have been adjusted to use it, tests for other modules with both + C and Python implementations in the stdlib can be adjusted to use it over + time. + +- Fix test_warnings to no longer reset the warnings filter. + +- Fix test_logging to no longer reset the warnings filter. + +- Issue #5635: Fix running test_sys with tracing enabled. + +- regrtest no longer treats ImportError as equivalent to SkipTest. Imports that + should cause a test to be skipped are now done using import_module from test + support, which does the conversion. + +- Issue #5083: New 'gui' resource for regrtest. + +- Issue #5837: Certain sequences of calls to set() and unset() for + support.EnvironmentVarGuard objects restored the environment variables + incorrectly on __exit__. + +- Issue #2389: Array objects are now pickled in a portable manner. + +Misc +---- + +- Issue #5611: Auto-detect whether a C file uses tabs or spaces in Vim. What's New in Python 2.6 final @@ -1925,7 +4189,7 @@ Extension Modules Tools/Demos ----------- -- Issue #3850: recursion tests in Misc/find_recursion_limit.py can raise +- Issue #3850: recursion tests in Tools/scripts/find_recursion_limit.py can raise AttributeError instead of RuntimeError, depending in which C API call exactly the recursion limit is exceeded. Consequently, both exception types are caught and silenced. @@ -2072,6 +4336,9 @@ Library 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. |