5 (editors: check NEWS.help for information about editing NEWS using ReST.)
7 What's New in Python 2.6 alpha 1?
8 =================================
10 *Release date: XX-XXX-2008*
15 - Issue #1069410: The "can't load dll" message box on Windows is
16 suppressed while an extension is loaded by calling SetErrorMode in
17 dynload_win.c. The error is still reported properly.
19 - Bug #1915: Python compiles with --enable-unicode=no again. However
20 several extension methods and modules do not work without unicode
23 - Patch #1720595: add T_BOOL to the range of structmember types.
25 - Issue #1882: when compiling code from a string, encoding cookies in the
26 second line of code were not always recognized correctly.
28 - Issue #1679: "0x" was taken as a valid integer literal.
30 - Issue #1865: Bytes as an alias for str and b"" as an alias "" were
33 - sys.float_info / PyFloat_GetInfo: The floating point information
34 object was converted from a dict to a specialized structseq object.
36 - Patch #1816: Added sys.flags structseq. It exposes the status of most
37 command line arguments and PYTHON* environment variables.
39 - Object/structseq.c: Implemented new structseq representation. The patch
40 makes structseqs (e.g. the return value of os.stat) more readable.
42 - Patch #1700288: added a type attribute cache that caches method accesses,
43 resulting in speedups in heavily object-oriented code.
45 - Bug #1776: __import__() no longer accepts filenames on any platform.
46 The first parameter to __import__() must be a valid module name.
48 - Patch #1668: renamed THREADDEBUG envvar to PYTHONTHREADDEBUG.
50 - Patch #602345: Add -B command line option, PYTHONDONTWRITEBYTECODE envvar
51 and sys.dont_write_bytecode attribute. All these can be set to forbid Python
52 to attempt to write compiled bytecode files.
54 - Improve some exception messages when Windows fails to load an extension
55 module. Now we get for example '%1 is not a valid Win32 application' instead
58 - Bug #1481296: Fixed long(float('nan'))!=0L.
60 - Issue #1640: Added math.isinf(x), math.isnan(x) and math.copysign(x, y)
63 - Issue #1635: Platform independent creation and representation of NaN
64 and INF. float("nan"), float("inf") and float("-inf") now work on every
65 platform with IEEE 754 semantics.
67 - Compiler now generates simpler and faster code for dictionary literals.
68 The oparg for BUILD_MAP now indicates an estimated dictionary size.
69 There is a new opcode, STORE_MAP, for adding entries to the dictionary.
71 - Issue #1638: %zd configure test fails on Linux
73 - Issue #1620: New property decorator syntax was modifying the decorator
74 in place instead of creating a new decorator object.
76 - Issue #1580: New free format floating point representation based on
77 "Floating-Point Printer Sample Code", by Robert G. Burger. For example
78 repr(11./5) now returns '2.2' instead of '2.2000000000000002'.
80 - Issue #1538: Avoid copying string in split/rsplit if the split
83 - Issue #1553: An erroneous __length_hint__ can make list() raise a
86 - PEP 366: Allow explicit relative imports when executing modules
87 inside packages with the -m switch via a new module level
88 __package__ attribute.
90 - Issue #1534: Added ``PyFloat_GetMax()``, ``PyFloat_GetMin()`` and
91 ``PyFloat_GetInfo()`` to the float API.
93 - Issue #1521: On 64bit platforms, using PyArgs_ParseTuple with the t# of w#
94 format code incorrectly truncated the length to an int, even when
95 PY_SSIZE_T_CLEAN is set. The str.decode method used to return incorrect
96 results with huge strings.
98 - Issue #1402: Fix a crash on exit, when another thread is still running, and
99 if the deallocation of its frames somehow calls the PyGILState_Ensure() /
100 PyGILState_Release() functions.
102 - Expose the Py_Py3kWarningFlag as sys.py3kwarning.
104 - Issue #1445: Fix a SystemError when accessing the ``cell_contents``
105 attribute of an empty cell object.
107 - Issue #1460: The utf-7 incremental decoder did not accept truncated input.
108 It now correctly saves its state between chunks of data.
110 - Patch #1739468: Directories and zipfiles containing a __main__.py file can
111 now be directly executed by passing their name to the interpreter. The
112 directory/zipfile is automatically inserted as the first entry in sys.path.
114 - Issue #1265: Fix a problem with sys.settrace, if the tracing function uses a
115 generator expression when at the same time the executed code is closing a
118 - sets and frozensets now have an isdisjoint() method.
120 - optimize the performance of builtin.sum().
122 - Fix warnings found by the new version of the Coverity checker.
124 - The enumerate() builtin function is no longer bounded to sequences smaller
125 than LONG_MAX. Formerly, it raised an OverflowError. Now, automatically
126 shifts from ints to longs.
128 - Issue #1686386: Tuple's tp_repr did not take into account the possibility of
129 having a self-referential tuple, which is possible from C code. Nor did
130 object's tp_str consider that a type's tp_str could do something that could
131 lead to an inifinite recursion. Py_ReprEnter() and Py_EnterRecursiveCall(),
132 respectively, fixed the issues.
134 - Issue #1164: It was possible to trigger deadlock when using the 'print'
135 statement to write to a file since the GIL was not released as needed. Now
136 PyObject_Print() does the right thing along with various tp_print
137 implementations of the built-in types and those in the collections module.
139 - Issue #1147: Exceptions were directly allowing string exceptions in their
140 throw() method even though string exceptions no longer allowed.
142 - Issue #1096: Prevent a segfault from getting the repr of a very deeply nested
143 list by using the recursion counter.
145 - Issue #1202533: Fix infinite recursion calls triggered by calls to
146 PyObject_Call() never calling back out to Python code to trigger recursion
147 depth updates/checks. Required the creation of a static RuntimeError
148 instance in case normalizing an exception put the recursion check value past
149 its limit. Fixes crashers infinite_rec_(1|2|4|5).py.
151 - Patch #1031213: Decode source line in SyntaxErrors back to its original source
154 - Py_ssize_t fields work in structmember when HAVE_LONG_LONG is not defined.
156 - PEP 3123: Provide forward compatibility with Python 3.0, while keeping
157 backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
158 PyVarObject_HEAD_INIT.
160 - Patch #1673759: add a missing overflow check when formatting floats
163 - Patch #1733960: Allow T_LONGLONG to accept ints.
165 - T_PYSSIZET can now be used in PyMemberDef lists for Py_ssize_t members.
167 - Prevent expandtabs() on string and unicode objects from causing a segfault
168 when a large width is passed on 32-bit platforms.
170 - Bug #1733488: Fix compilation of bufferobject.c on AIX.
172 - Bug #1722485: remove docstrings again when running with -OO.
174 - Add new attribute names for function objects. All the func_* become
175 __*__ attributes. (Some already existed, e.g., __doc__ and __name__.)
177 - Add -3 option to the interpreter to warn about features that are
178 deprecated and will be changed/removed in Python 3.0.
180 - Patch #1686487: you can now pass any mapping after '**' in function
183 - except clauses may now be spelled either "except E, target:" or
184 "except E as target:". This is to provide forwards compatibility with
187 - Deprecate BaseException.message as per PEP 352.
189 - Bug #1303614: don't expose object's __dict__ when the dict is
190 inherited from a builtin base.
192 - When __slots__ are set to a unicode string, make it work the same as
193 setting a plain string, ie don't expand to single letter identifiers.
195 - Request #1191699: Slices can now be pickled.
197 - Request #1193128: str.translate() now allows a None argument for
198 translations that only remove characters without re-mapping the
199 remaining characters.
201 - Patch #1682205: a TypeError while unpacking an iterable is no longer
202 masked by a generic one with the message "unpack non-sequence".
204 - Remove unused file Python/fmod.c.
206 - Bug #1683368: The object.__init__() and object.__new__() methods are
207 now stricter in rejecting excess arguments. The only time when
208 either allows excess arguments is when it is not overridden and the
209 other one is. For backwards compatibility, when both are
210 overridden, it is a deprecation warning (for now; maybe a Py3k
211 warning later). Also, type.__init__() insists on the same signature
212 as supported by type.__new__().
214 - Patch #1675423: PyComplex_AsCComplex() now tries to convert an object
215 to complex using its __complex__() method before falling back to the
216 __float__() method. Therefore, the functions in the cmath module now
217 can operate on objects that define a __complex__() method.
219 - Patch #1623563: allow __class__ assignment for classes with __slots__.
220 The old and the new class are still required to have the same slot names.
222 - Patch #1642547: Fix an error/crash when encountering syntax errors in
223 complex if statements.
225 - Patch #1462488: Python no longer segfaults when ``object.__reduce_ex__()``
226 is called with an object that is faking its type.
228 - Patch #1680015: Don't modify __slots__ tuple if it contains an unicode
231 - Patch #1444529: the builtin compile() now accepts keyword arguments.
233 - Bug #1678647: write a newline after printing an exception in any
234 case, even when converting the value to a string failed.
236 - The dir() function has been extended to call the __dir__() method on
237 its argument, if it exists. If not, it will work like before. This allows
238 customizing the output of dir() in the presence of a __getattr__().
240 - Patch #922167: Python no longer segfaults when faced with infinitely
241 self-recursive reload() calls (as reported by bug #742342).
243 - Patch #1675981: remove unreachable code from ``type.__new__()`` method.
245 - Patch #1491866: change the complex() constructor to allow parthensized
246 forms. This means complex(repr(x)) now works instead of raising a
249 - Patch #703779: unset __file__ in __main__ after running a file. This
250 makes the filenames the warning module prints much more sensible when
251 a PYTHONSTARTUP file is used.
253 - Variant of patch #697613: don't exit the interpreter on a SystemExit
254 exception if the -i command line option or PYTHONINSPECT environment
255 variable is given, but break into the interactive interpreter just like
256 on other exceptions or normal program exit.
258 - Patch #1638879: don't accept strings with embedded NUL bytes in long().
260 - Bug #1674503: close the file opened by execfile() in an error condition.
262 - Patch #1674228: when assigning a slice (old-style), check for the
263 sq_ass_slice instead of the sq_slice slot.
265 - When printing an unraisable error, don't print exceptions. before the name.
266 This duplicates the behavior whening normally printing exceptions.
268 - Bug #1653736: Properly discard third argument to slot_nb_inplace_power.
270 - PEP 352: Raising a string exception now triggers a TypeError. Attempting to
271 catch a string exception raises DeprecationWarning.
273 - Bug #1377858: Fix the segfaulting of the interpreter when an object created
274 a weakref on itself during a __del__ call for new-style classes (classic
275 classes still have the bug).
277 - Bug #1579370: Make PyTraceBack_Here use the current thread, not the
278 frame's thread state.
280 - patch #1630975: Fix crash when replacing sys.stdout in sitecustomize.py
282 - Bug #1637022: Prefix AST symbols with _Py_.
284 - Prevent seg fault on shutdown which could occur if an object
287 - Bug #1566280: Explicitly invoke threading._shutdown from Py_Main,
288 to avoid relying on atexit.
290 - Bug #1590891: random.randrange don't return correct value for big number
292 - Patch #1586791: Better exception messages for some operations on strings,
295 - Bug #1067760: Deprecate passing floats to file.seek.
297 - Bug #1591996: Correctly forward exception in instance_contains().
299 - Bug #1588287: fix invalid assertion for `1,2` in debug builds.
301 - Bug #1576657: when setting a KeyError for a tuple key, make sure that
302 the tuple isn't used as the "exception arguments tuple".
304 - Bug #1565514, SystemError not raised on too many nested blocks.
306 - Bug #1576174: WindowsError now displays the windows error code
307 again, no longer the posix error code.
309 - Patch #1549049: Support long values in structmember, issue warnings
310 if the assigned value for structmember fields gets truncated.
312 - Update the peephole optimizer to remove more dead code (jumps after returns)
313 and inline unconditional jumps to returns.
315 - Bug #1545497: when given an explicit base, int() did ignore NULs
316 embedded in the string to convert.
318 - Bug #1569998: break inside a try statement (outside a loop) is now
319 recognized and rejected.
321 - list.pop(x) accepts any object x following the __index__ protocol.
323 - Fix some leftovers from the conversion from int to Py_ssize_t
324 (relevant to strings and sequences of more than 2**31 items).
326 - A number of places, including integer negation and absolute value,
327 were fixed to not rely on undefined behaviour of the C compiler
330 - Bug #1566800: make sure that EnvironmentError can be called with any
331 number of arguments, as was the case in Python 2.4.
333 - Patch #1567691: super() and new.instancemethod() now don't accept
334 keyword arguments any more (previously they accepted them, but didn't
337 - Fix a bug in the parser's future statement handling that led to "with"
338 not being recognized as a keyword after, e.g., this statement:
339 from __future__ import division, with_statement
341 - Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
343 - Fix %zd string formatting on Mac OS X so it prints negative numbers.
345 - Allow exception instances to be directly sliced again.
347 - Bug #1551432: Exceptions do not define an explicit __unicode__ method. This
348 allows calling unicode() on exceptions classes directly to succeed.
350 - Make _PyGILState_NoteThreadState() static, it was not used anywhere
351 outside of pystate.c and should not be necessary.
353 - Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack.
354 Also make sure that every exception class has __module__ set to
357 - Bug #1550983: emit better error messages for erroneous relative
358 imports (if not in package and if beyond toplevel package).
360 - Overflow checking code in integer division ran afoul of new gcc
361 optimizations. Changed to be more standard-conforming.
363 - Patch #1542451: disallow continue anywhere under a finally.
365 - Patch #1546288: fix seg fault in dict_equal due to ref counting bug.
367 - The return tuple from str.rpartition(sep) is (tail, sep, head) where
368 head is the original string if sep was not found.
370 - Bug #1520864: unpacking singleton tuples in list comprehensions and
371 generator expressions (x for x, in ... ) works again. Fixing this problem
372 required changing the .pyc magic number. This means that .pyc files
373 generated before 2.5c2 will be regenerated.
375 - with and as are now keywords.
377 - Bug #1664966: Fix crash in exec if Unicode filename can't be decoded.
379 - Issue #1537: Changed GeneratorExit's base class from Exception to
382 - Fix Issue #1703448: A joined thread could show up in the
383 threading.enumerate() list after the join() for a brief period until
389 - #1765140: add an optional delay argument to FileHandler and its
390 subclasses. Defaults to false (existing behaviour), but if true,
391 defers opening the file until the first call to emit().
393 - The pprint module now supports sets and frozensets.
395 - #1221598: add optional callbacks to ftplib.FTP's storbinary() and
396 storlines() methods. (Contributed by Phil Schwartz)
398 - #1715: include sub-extension modules in pydoc's text output.
400 - #1836: fix an off-by-one bug in TimedRotatingHandler's rollover
403 - #1021: fix a bug to allow basicConfig to accept NOTSET as a level.
405 - #932563: add LoggerAdapter convenience class to make it easier to add
406 contextual information in logging output.
408 - #1760556: fix a bug to avoid FileHandler throwing an exception in
411 - Bug #1530959: distutils' build command now uses different build directory
412 when building extension modules against versions of Python compiled
413 with ``--with-pydebug``.
415 - #1555501: move plistlib from plat-mac directory to general library.
417 - #1269: fix a bug in pstats.add_callers() and add a unit test file for
420 - #1669: don't allow shutil.rmtree() to be called on a symlink to a
423 - #1664522: in urllib, don't read non-existing directories in ftp mode,
424 returning a 0-byte file -- raise an IOError instead.
426 - #856047: respect the ``no_proxy`` environment variable when using the
427 ``http_proxy`` etc. environment variables in urllib.
429 - #1178141: add a getcode() method to the addinfourls that urllib.open()
430 returns so that you can retrieve the HTTP status code.
432 - Issue #1003: Fix zipfile decryption check, it would fail zip files
433 with extended local headers.
435 - #1189216: Fix the zipfile module to work on archives with headers
436 past the 2**31 byte boundary.
438 - #1336: fix a race condition in subprocess.Popen if the garbage
439 collector kicked in at the wrong time that would cause the process
440 to hang when the child wrote to stderr.
442 - #1146: fix how textwrap breaks a long word that would start in the
443 last column of a line.
445 - #1693149: trace.py --ignore-module - accept multiple comma-separated
448 - #1822: MIMEMultipart.is_multipart() behaves correctly for a just-created
449 (and empty) instance. Thanks Jonathan Share.
451 - #1861: Added an attribute to the sched module which returns an ordered
452 list of upcoming events (displayed as named tuples).
454 - #1837: The queue module now also supports a LIFO queue and a priority queue.
456 - Patch #1048820: Add insert-mode editing to curses.textpad.Textbox
457 (patch by Stefan Wehr). Also, fix an off-by-one bug in
460 - Issue #1831: ctypes now raises a TypeError if conflicting positional
461 and named arguments are passed to a Structure or Union initializer.
462 When too many positional arguments are passed, also a TypeError is
463 raised instead of a ValueError.
465 - Convert the internal ctypes array type cache to a WeakValueDict so
466 that array types do not live longer than needed.
468 - Issue #1786: pdb should use its own stdin/stdout around an exec call
469 and when creating a recursive instance.
471 - Issue #1698398 Zipfile.printdir() crashed because the format string
472 expected a tuple type of length six instead of time.struct_time object.
474 - Issue #1780: The Decimal constructor now accepts arbitrary leading
475 and trailing whitespace when constructing from a string.
476 Context.create_decimal no longer accepts trailing newlines.
478 - Decimal.as_tuple(), difflib.find_longest_match() and inspect functions
479 that returned a tuple now return a named tuple.
481 - Doctest now returns results as a named tuple for readability:
482 (0, 7) --> TestResults(failed=0, attempted=7)
484 - Issue #846388. re.match is interruptible now, which is particularly
485 good for long regular expression matches.
487 - pyexpat, patch #1137: allow setting buffer_size attribute
488 on Parser objects to set the character data buffer size.
490 - Issue #1757: The hash of a Decimal instance is no longer affected by
493 - Patch #467924: add ZipFile.extract() and ZipFile.extractall() in the
496 - Issue #1646: Make socket support the TIPC protocol.
498 - Bug #1742: return os.curdir from os.path.relpath() if both arguments are
499 equal instead of raising an exception.
501 - Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'.
503 - Patch #1698: allow '@' in username parsed by urlparse.py.
505 - Issue #1735: TarFile.extractall() now correctly sets directory permissions
508 - Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a mountpoint.
510 - Bug #1687: Fxed plistlib.py restricts <integer> to Python int when writing
512 - Issue #1700: Regular expression inline flags incorrectly handle certain
515 - Issue #1689: PEP 3141, numeric abstract base classes.
517 - Tk issue #1851526: Return results from Python callbacks to Tcl as
520 - Issue #1642: Fix segfault in ctypes when trying to delete attributes.
522 - Issue #1727780: Support loading pickles of random.Random objects created
523 on 32-bit systems on 64-bit systems, and vice versa. As a consequence
524 of the change, Random pickles created by Python 2.6 cannot be loaded
527 - Issue #1455: The distutils package now supports VS 2005 and VS 2008 for
528 both the msvccompiler and cygwincompiler.
530 - Issue #1531: tarfile.py: Read fileobj from the current offset, do not
533 - Issue #1534: Added a dictionary sys.float_info with information about the
534 internal floating point type to the sys module.
536 - Issue 1429818: patch for trace and doctest modules so they play nicely
539 - doctest made a bad assumption that a package's __loader__.get_data()
540 method used universal newlines.
542 - Issue #1705170: contextlib.contextmanager was still swallowing
543 StopIteration in some cases. This should no longer happen.
545 - Issue #1292: On alpha, arm, ppc, and s390 linux systems the
546 --with-system-ffi configure option defaults to "yes".
548 - IN module for FreeBSD 8 is added and preexisting FreeBSD 6 and 7
551 - Issues #1181, #1287: unsetenv() is now called when the os.environ.pop()
552 and os.environ.clear() methods are used.
554 - ctypes will now work correctly on 32-bit systems when Python is
555 configured with --with-system-ffi.
557 - Patch #1203: ctypes now does work on OS X when Python is built with
558 --disable-toolbox-glue.
560 - collections.deque() now supports a "maxlen" argument.
562 - itertools.count() is no longer bounded to LONG_MAX. Formerly, it raised
563 an OverflowError. Now, automatically shifts from ints to longs.
565 - Patch #1541463: optimize performance of cgi.FieldStorage operations.
567 - Decimal is fully updated to the latest Decimal Specification (v1.66).
569 - Bug #1153: repr.repr() now doesn't require set and dictionary items
570 to be orderable to properly represent them.
572 - A 'c_longdouble' type was added to the ctypes module.
574 - Bug #1709599: Run test_1565150 only if the file system is NTFS.
576 - When encountering a password-protected robots.txt file the RobotFileParser
577 no longer prompts interactively for a username and password (bug 813986).
579 - TarFile.__init__() no longer fails if no name argument is passed and
580 the fileobj argument has no usable name attribute (e.g. StringIO).
582 - The functools module now provides 'reduce', for forward compatibility
585 - Server-side SSL support and cert verification added, by Bill Janssen.
587 - socket.ssl deprecated; use new ssl module instead.
589 - uuid creation is now threadsafe.
591 - EUC-KR codec now handles the cheot-ga-keut composed make-up hangul
594 - GB18030 codec now can encode additional two-byte characters that
597 - Add new codecs for UTF-32, UTF-32-LE and UTF-32-BE.
599 - Bug #1704793: Return UTF-16 pair if unicodedata.lookup cannot
600 represent the result in a single character.
602 - Bug #978833: Close https sockets by releasing the _ssl object.
604 - Change location of the package index to pypi.python.org/pypi
606 - Bug #1701409: Fix a segfault in printing ctypes.c_char_p and
607 ctypes.c_wchar_p when they point to an invalid location. As a
608 sideeffect the representation of these instances has changed.
610 - tarfile.py: Added "exclude" keyword argument to TarFile.add().
612 - Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute.
614 - The urlopen function of urllib2 now has an optional timeout parameter (note
615 that it actually works with HTTP, HTTPS, FTP and FTPS connections).
617 - In ftplib, the FTP.ntransfercmd method, when in passive mode, now uses
618 the socket.create_connection function, using the timeout specified at
621 - Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it
622 reads a file that ends with incomplete sequence and sizehint argument
623 for .read() is specified.
625 - Bug #1730389: Change time.strptime() to use ``\s+`` instead of ``\s*`` when
626 matching spaces in the specified format argument.
628 - SF 1668596/1720897: distutils now copies data files
629 even if package_dir is empty.
631 - sha now raises a DeprecationWarning upon import.
633 - md5 now raises a DeprecationWarning upon import.
635 - Issue1385: The hmac module now computes the correct hmac when using hashes
636 with a block size other than 64 bytes (such as sha384 and sha512).
638 - mimify now raises a DeprecationWarning upon import.
640 - MimeWriter now raises a DeprecationWarning upon import.
642 - tarfile.py: Improved unicode support. Unicode input names are now
643 officially supported. Added "errors" argument to the TarFile class.
645 - urllib.ftpwrapper class now accepts an optional timeout.
647 - shlex.split() now has an optional "posix" parameter.
649 - The posixfile module now raises a DeprecationWarning.
651 - Remove the gopherlib module. This also leads to the removal of gopher
652 support in urllib/urllib2.
654 - Fix bug in marshal where bad data would cause a segfault due to
655 lack of an infinite recursion check.
657 - Removed plat-freebsd2 and plat-freebsd3 directories (and IN.py in
660 - HTML-escape the plain traceback in cgitb's HTML output, to prevent
661 the traceback inadvertently or maliciously closing the comment and
662 injecting HTML into the error page.
664 - The popen2 module and os.popen* are deprecated. Use the subprocess module.
666 - Added an optional credentials argument to SMTPHandler, for use with SMTP
667 servers which require authentication.
669 - Patch #1695948: Added optional timeout parameter to SocketHandler.
671 - Bug #1652788: Minor fix for currentframe.
673 - Patch #1598415: Added WatchedFileHandler to better support external
674 log file rotation using e.g. newsyslog or logrotate. This handler is
675 only useful in Unix/Linux environments.
677 - Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
678 (as opposed to the command line) will now write file names ending in
681 - As specified in RFC 2616, an HTTP response like 2xx indicates that
682 the client's request was successfully received, understood, and accepted.
683 Now in these cases no error is raised in urllib (issue #1177) and urllib2.
685 - Bug #1290505: time.strptime's internal cache of locale information is now
686 properly recreated when the locale is changed.
688 - Patch #1685563: remove (don't add) duplicate paths in distutils.MSVCCompiler.
690 - Added a timeout parameter to the constructor of other protocols
691 (telnetlib, ftplib, smtplib and poplib). This is second part of the
692 work started with create_connection() and timeout in httplib, and
693 closes patch #723312.
695 - Patch #1676823: Added create_connection() to socket.py, which may be
696 called with a timeout, and use it from httplib (whose HTTPConnection
697 and HTTPSConnection now accept an optional timeout).
699 - Bug #978833: Revert r50844, as it broke _socketobject.dup.
701 - Bug #1675967: re patterns pickled with Python 2.4 and earlier can
702 now be unpickled with Python 2.5 and newer.
704 - Patch #1630118: add a SpooledTemporaryFile class to tempfile.py.
706 - Patch #1273829: os.walk() now has a "followlinks" parameter. If set to
707 True (which is not the default), it visits symlinks pointing to
710 - Bug #1681228: the webbrowser module now correctly uses the default
711 GNOME or KDE browser, depending on whether there is a session of one
712 of those present. Also, it tries the Windows default browser before
713 trying Mozilla variants.
715 - Patch #1339796: add a relpath() function to os.path.
717 - Patch #1681153: the wave module now closes a file object it opened if
718 initialization failed.
720 - Bug #767111: fix long-standing bug in urllib which caused an
721 AttributeError instead of an IOError when the server's response didn't
722 contain a valid HTTP status line.
724 - Patch #957650: "%var%" environment variable references are now properly
725 expanded in ntpath.expandvars(), also "~user" home directory references
726 are recognized and handled on Windows.
728 - Patch #1429539: pdb now correctly initializes the __main__ module for
729 the debugged script, which means that imports from __main__ work
732 - The nonobvious commands.getstatus() function is now deprecated.
734 - Patch #1393667: pdb now has a "run" command which restarts the debugged
735 Python program, optionally with different arguments.
737 - Patch #1649190: Adding support for _Bool to ctypes as c_bool.
739 - Patch #1530482: add pydoc.render_doc() which returns the documentation
740 for a thing instead of paging it to stdout, which pydoc.doc() does.
742 - Patch #1533909: the timeit module now accepts callables in addition to
743 strings for the code to time and the setup code. Also added two
744 convenience functions for instantiating a Timer and calling its methods.
746 - Patch #1537850: tempfile.NamedTemporaryFile now has a "delete" parameter
747 which can be set to False to prevent the default delete-on-close
750 - Patch #1581073: add a flag to textwrap that prevents the dropping of
751 whitespace while wrapping.
753 - Patch #1603688: ConfigParser.SafeConfigParser now checks values that
754 are set for invalid interpolation sequences that would lead to errors
755 on reading back those values.
757 - Added support for the POSIX.1-2001 (pax) format to tarfile.py. Extended
758 and cleaned up the test suite. Added a new testtar.tar.
760 - Patch #1449244: Support Unicode strings in
761 email.message.Message.{set_charset,get_content_charset}.
763 - Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
764 pydoc's help keywords.
766 - Patch #1555098: use str.join() instead of repeated string
767 concatenation in robotparser.
769 - Patch #1635454: the csv.DictWriter class now includes the offending
770 field names in its exception message if you try to write a record with
771 a dictionary containing fields not in the CSV field names list.
773 - Patch #1668100: urllib2 now correctly raises URLError instead of
774 OSError if accessing a local file via the file:// protocol fails.
776 - Patch #1677862: Require a space or tab after import in .pth files.
778 - Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap
779 the IndexError caused by passing in an invalid breakpoint number.
781 - Patch #1599845: Add an option to disable the implicit calls to server_bind()
782 and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer
785 - Bug #1531963: Make SocketServer.TCPServer's server_address always
786 be equal to calling getsockname() on the server's socket. Fixed by
789 - Patch #742598: Add .timeout attribute to SocketServer that calls
790 .handle_timeout() when no requests are received.
792 - Bug #1651235: When a tuple was passed to a ctypes function call,
793 Python would crash instead of raising an error.
795 - Bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
796 returned string up to the first NUL character.
798 - Patch #957003: Implement smtplib.LMTP.
800 - Patch #1481079: add support for HTTP_REFERER to CGIHTTPServer.
802 - Patch #1675424: Added tests for uncovered code in the zipfile module.
803 The KeyError raised by Zipfile.getinfo for nonexistent names now has
804 a descriptive message.
806 - Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').
808 - unittest now verifies more of its assumptions. In particular, TestCase
809 and TestSuite subclasses (not instances) are no longer accepted in
810 TestSuite.addTest(). This should cause no incompatibility since it
811 never made sense with ordinary subclasses -- the failure just occurred
812 later, with a more cumbersome exception.
814 - Patch #787789: allow to pass custom TestRunner instances to unittest's
817 - Patches #1550273, #1550272: fix a few bugs in unittest and add a
818 comprehensive test suite for the module.
820 - Patch #1001604: glob.glob() now returns unicode filenames if it was
821 given a unicode argument and os.listdir() returns unicode filenames.
823 - Patch #1673619: setup.py identifies extension modules it doesn't know how
824 to build and those it knows how to build but that fail to build.
826 - Patch #912410: Replace HTML entity references for attribute values
829 - Patch #1663234: you can now run doctest on test files and modules
830 using "python -m doctest [-v] filename ...".
832 - Patch #1121142: Implement ZipFile.open.
834 - Taught setup.py how to locate Berkeley DB on Macs using MacPorts.
836 - Added heapq.merge() for merging sorted input streams.
838 - Added collections.namedtuple() for assigning field names to tuples.
840 - Added itertools.izip_longest().
842 - Have the encoding package's search function dynamically import using absolute
845 - Patch #1647484: Renamed GzipFile's filename attribute to name.
847 - Patch #1517891: Mode 'a' for ZipFile now creates the file if it
850 - Patch #698833: Support file decryption in zipfile.
852 - Patch #685268: Consider a package's __path__ in imputil.
854 - Patch 1463026: Support default namespace in XMLGenerator.
856 - Patch 1571379: Make trace's --ignore-dir facility work in the face of
857 relative directory names.
859 - Bug #1600860: Search for shared python library in LIBDIR,
860 not lib/python/config, on "linux" and "gnu" systems.
862 - Patch #1652681: tarfile.py: create nonexistent files in append mode and
863 allow appending to empty files.
865 - Bug #1124861: Automatically create pipes if GetStdHandle fails in
868 - Patch #1634778: add missing encoding aliases for iso8859_15 and
871 - Patch #1638243: the compiler package is now able to correctly compile
872 a with statement; previously, executing code containing a with statement
873 compiled by the compiler package crashed the interpreter.
875 - Bug #1643943: Fix time.strptime's support for the %U directive.
877 - Patch #1507247: tarfile.py: use current umask for intermediate
880 - Patch #1627441: close sockets properly in urllib2.
882 - Bug #494589: make ntpath.expandvars behave according to its docstring.
884 - Changed platform module API python_version_tuple() to actually
885 return a tuple (it used to return a list).
887 - Added new platform module APIs python_branch(), python_revision(),
888 python_implementation() and linux_distribution().
890 - Added support for IronPython and Jython to the platform module.
892 - The sets module has been deprecated. Use the built-in set/frozenset types
895 - Bug #1610795: make ctypes.util.find_library work on BSD systems.
897 - Fixes for 64-bit Windows: In ctypes.wintypes, correct the
898 definitions of HANDLE, WPARAM, LPARAM data types. Make
899 parameterless foreign function calls work.
901 - The version number of the ctypes package changed to "1.1.0".
903 - Bug #1627575: logging: Added _open() method to FileHandler which can
904 be used to reopen files. The FileHandler instance now saves the
905 encoding (which can be None) in an attribute called "encoding".
907 - Bug #411881: logging.handlers: bare except clause removed from
908 SMTPHandler.emit. Now, only ImportError is trapped.
910 - Bug #411881: logging.handlers: bare except clause removed from
911 SocketHandler.createSocket. Now, only socket.error is trapped.
913 - Bug #411881: logging: bare except clause removed from LogRecord.__init__.
914 Now, only ValueError, TypeError and AttributeError are trapped.
916 - Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument.
918 - Patch #1182394 from Shane Holloway: speed up HMAC.hexdigest.
920 - Patch #1262036: Prevent TarFiles from being added to themselves under
923 - Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell()
924 work correctly together with readline().
926 - Patch #1484695: The tarfile module now raises a HeaderError exception
927 if a buffer given to frombuf() is invalid.
929 - Bug #1503765: Fix a problem in logging.config with spaces in comma-
930 separated lists read from logging config files.
932 - Patch #1604907: Fix problems in logging.handlers caused at logging shutdown
933 when syslog handlers fail to initialize because of syslogd problems.
935 - Patch #1608267: fix a race condition in os.makedirs() if the directory
936 to be created is already there.
938 - Patch #1610437: fix a tarfile bug with long filename headers.
940 - Patch #1371075: Make ConfigParser accept optional dict type
941 for ordering, sorting, etc.
943 - Bug #1563807: _ctypes built on AIX fails with ld ffi error.
945 - Bug #1598620: A ctypes Structure cannot contain itself.
947 - Patch #1070046: Marshal new-style objects like InstanceType
950 - cStringIO.truncate(-1) now raises an IOError, like StringIO and
953 - Patch #1472877: Fix Tix subwidget name resolution.
955 - Patch #1594554: Always close a tkSimpleDialog on ok(), even
956 if an exception occurs.
958 - Patch #1538878: Don't make tkSimpleDialog dialogs transient if
959 the parent window is withdrawn.
961 - Bug #1597824: return the registered function from atexit.register()
962 to facilitate usage as a decorator.
964 - Patch #1360200: Use unmangled_version RPM spec field to deal with
967 - Patch #1359217: Process 2xx response in an ftplib transfer
968 that precedes an 1xx response.
970 - Patch #1355023: support whence argument for GzipFile.seek.
972 - Patch #1065257: Support passing open files as body in
973 HTTPConnection.request().
975 - Bug #1569790: mailbox.py: Maildir.get_folder() and MH.get_folder()
976 weren't passing the message factory on to newly created Maildir/MH
979 - Patch #1514543: mailbox.py: In the Maildir class, report errors if there's
980 a filename clash instead of possibly losing a message. (Patch by David
983 - Patch #1514544: Try to ensure that messages/indexes have been physically
984 written to disk after calling .flush() or .close(). (Patch by David
987 - Patch #1592250: Add elidge argument to Tkinter.Text.search.
989 - Patch #838546: Make terminal become controlling in pty.fork()
991 - Patch #1351744: Add askyesnocancel helper for tkMessageBox.
993 - Patch #1060577: Extract list of RPM files from spec file in
996 - Bug #1586613: fix zlib and bz2 codecs' incremental en/decoders.
998 - Patch #1583880: fix tarfile's problems with long names and posix/
1001 - Bug #1586448: the compiler module now emits the same bytecode for
1002 list comprehensions as the builtin compiler, using the LIST_APPEND
1005 - Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, and
1006 fix all codecs file wrappers to work correctly with the "with"
1007 statement (bug #1586513).
1009 - Lib/modulefinder.py now handles absolute and relative imports
1012 - Patch #1567274: Support SMTP over TLS.
1014 - Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that
1015 ctypes isn't considered as requiring executable stacks.
1017 - ctypes callback functions only support 'fundamental' data types as
1018 result type. Raise an error when something else is used. This is a
1019 partial fix for Bug #1574584.
1021 - Fix turtle so that time.sleep is imported for the entire library. Allows
1022 the demo2 function to be executed on its own instead of only when the
1023 module is run as a script.
1025 - Bug #813342: Start the IDLE subprocess with -Qnew if the parent
1026 is started with that option.
1028 - Bug #1565150: Fix subsecond processing for os.utime on Windows.
1030 - Support for MSVC 8 was added to bdist_wininst.
1032 - Bug #1446043: correctly raise a LookupError if an encoding name given
1033 to encodings.search_function() contains a dot.
1035 - Bug #1560617: in pyclbr, return full module name not only for classes,
1036 but also for functions.
1038 - Bug #1457823: cgi.(Sv)FormContentDict's constructor now takes
1039 keep_blank_values and strict_parsing keyword arguments.
1041 - Bug #1566602: correct failure of posixpath unittest when $HOME ends
1044 - Bug #1565661: in webbrowser, split() the command for the default
1045 GNOME browser in case it is a command with args.
1047 - Made the error message for time.strptime when the data data and format do
1048 match be more clear.
1050 - Fix a bug in traceback.format_exception_only() that led to an error
1051 being raised when print_exc() was called without an exception set.
1052 In version 2.4, this printed "None", restored that behavior.
1054 - Make webbrowser.BackgroundBrowser usable in Windows (it wasn't because
1055 the close_fds arg to subprocess.Popen is not supported).
1057 - Reverted patch #1504333 to sgmllib because it introduced an infinite loop.
1059 - Patch #1553314: Fix the inspect.py slowdown that was hurting IPython & SAGE
1060 by adding smarter caching in inspect.getmodule()
1062 - Fix missing import of the types module in logging.config.
1064 - Patch #1550886: Fix decimal module context management implementation
1065 to match the localcontext() example from PEP 343.
1067 - Bug #1545341: The 'classifier' keyword argument to the Distutils setup()
1068 function now accepts tuples as well as lists.
1070 - Bug #1541863: uuid.uuid1 failed to generate unique identifiers
1071 on systems with low clock resolution.
1073 - Bug #1531862: Do not close standard file descriptors in subprocess.
1075 - idle: Honor the "Cancel" action in the save dialog (Debian bug #299092).
1077 - Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the
1078 first chunk fed to the decoder started with a BOM, but was longer than 3 bytes.
1080 - The implementation of UnicodeError objects has been simplified (start and end
1081 attributes are now stored directly as Py_ssize_t members).
1083 - Issue829951: In the smtplib module, SMTP.starttls() now complies with
1084 RFC 3207 and forgets any knowledge obtained from the server not obtained
1085 from the TLS negotiation itself. Patch contributed by Bill Fenner.
1087 - Issue1339: The smtplib.SMTP class has been refactored a bit such
1088 that the SMTP.starttls() caller no longer needs to call ehlo()
1089 beforehand. SMTP.starttls() now raises an exception of the server
1090 does not claim to support starttls. Adds the SMTP.ehlo_or_helo_if_needed()
1091 method. Patch contributed by Bill Fenner.
1096 - #1087741: mmap.mmap is now a class, not a factory function. It is also
1099 - Patch #1648: added ``sys.getprofile()`` and ``sys.gettrace()``.
1101 - Patch #1663329: added ``os.closerange()`` function to quickly close a range
1102 of file descriptors without considering errors.
1104 - Patch 976880: ``mmap`` objects now have an ``rfind`` method that
1105 works as expected. ``mmap.find`` also takes an optional ``end``
1108 - _winreg's HKEY object has gained __enter__ and __exit__ methods to support
1109 the context manager protocol. The _winreg module also gained a new function
1110 ``ExpandEnvironmentStrings`` to expand REG_EXPAND_SZ keys.
1112 - itertools.starmap() now accepts any iterable input. Previously, it required
1113 the function inputs to be tuples.
1115 - Issue #1646: Make socket support TIPC. The socket module now has support
1116 for TIPC under Linux, see http://tipc.sf.net/ for more information.
1118 - Added interface for Windows' WSAIoctl to socket object and added an example
1119 for a simple network sniffer.
1121 - Bug #1301: Bad assert in _tkinter fixed.
1123 - Added bdist_wininst executable for VS 2008.
1125 - Bug #1604: collections.deque.__init__(iterable) now clears any prior contents
1126 before adding elements from the iterable. This fix brings the behavior into
1127 line with that for list.__init__().
1129 - Added wide char functions to msvcrt module: getwch, getwche, putwch and
1130 ungetwch. The functions accept or return unicode.
1132 - os.access now returns True on Windows for any existing directory.
1134 - Added warnpy3k function to the warnings module.
1136 - Marshal.dumps() now expects exact type matches for int, long, float, complex,
1137 tuple, list, dict, set, and frozenset. Formerly, it would silently miscode
1138 subclasses of those types. Now, it raises a ValueError instead.
1140 - Patch #1388440: Add set_completion_display_matches_hook and
1141 get_completion_type to readline.
1143 - Bug #1649098: Avoid declaration of zero-sized array declaration in
1146 - Removed the rgbimg module; been deprecated since Python 2.5.
1148 - Bug #1721309: prevent bsddb module from freeing random memory.
1150 - Bug #1233: fix bsddb.dbshelve.DBShelf append method to work as
1151 intended for RECNO databases.
1153 - pybsddb.sf.net Bug #477182: Load the database flags at database open
1154 time so that opening a database previously created with the DB_DUP or
1155 DB_DUPSORT flag set will keep the proper behavior on subsequent opens.
1156 Specifically: dictionary assignment to a DB object will replace all
1157 values for a given key when the database allows duplicate values.
1158 DB users should use DB.put(k, v) when they want to store duplicates; not
1161 - Add the bsddb.db.DBEnv.lock_id_free method.
1163 - Bug #1686475: Support stat'ing open files on Windows again.
1165 - Patch #1185447: binascii.b2a_qp() now correctly quotes binary characters
1166 with ASCII value less than 32. Also, it correctly quotes dots only if
1167 they occur on a single line, as opposed to the previous behavior of
1168 quoting dots if they are the second character of any line.
1170 - Bug #1622896: fix a rare corner case where the bz2 module raised an
1171 error in spite of a succesful compression.
1173 - Patch #1654417: make operator.{get,set,del}slice use the full range
1176 - Patch #1646728: datetime.fromtimestamp fails with negative
1177 fractional times. With unittest.
1179 - Patch #1490190: posixmodule now includes os.chflags() and os.lchflags()
1180 functions on platforms where the underlying system calls are available.
1182 - Patch #1494140: Add documentation for the new struct.Struct object.
1184 - Patch #1432399: Support the HCI protocol for bluetooth sockets
1186 - Patch #1657276: Make NETLINK_DNRTMSG conditional.
1188 - Bug #1653736: Complain about keyword arguments to time.isoformat.
1190 - Bug #1486663: don't reject keyword arguments for subclasses of builtin
1193 - Patch #1610575: The struct module now supports the 't' code, for
1196 - Patch #1635058: ensure that htonl and friends never accept or
1197 return negative numbers, per the underlying C implementation.
1199 - Patch #1544279: Improve thread-safety of the socket module by moving
1200 the sock_addr_t storage out of the socket object.
1202 - Patch #1019808: fix bug that causes an incorrect error to be returned
1203 when a socket timeout is set and a connection attempt fails.
1205 - Speed up function calls into the math module.
1207 - Bug #1588217: don't parse "= " as a soft line break in binascii's
1208 a2b_qp() function, instead leave it in the string as quopri.decode()
1211 - Bug #1599782: Fix segfault on bsddb.db.DB().type().
1213 - Bug #1567666: Emulate GetFileAttributesExA for Win95.
1215 - Patch #1576166: Support os.utime for directories on Windows NT+.
1217 - Patch #1572724: fix typo ('=' instead of '==') in _msi.c.
1219 - Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
1220 when encoding non-BMP unicode characters.
1222 - Bug #1556784: allow format strings longer than 127 characters in
1223 datetime's strftime function.
1225 - Fix itertools.count(n) to work with negative numbers again.
1227 - RLIMIT_SBSIZE was added to the resource module where available.
1229 - Bug #1551427: fix a wrong NULL pointer check in the win32 version
1232 - Bug #1548092: fix curses.tparm seg fault on invalid input.
1234 - Patch #1114: fix curses module compilation on 64-bit AIX, & possibly
1235 other 64-bit LP64 platforms where attr_t is not the same size as a long.
1236 (Contributed by Luke Mewburn.)
1238 - Bug #1550714: fix SystemError from itertools.tee on negative value for n.
1240 - Fixed a few bugs on cjkcodecs:
1241 - gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
1242 - iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
1243 codepoints to conform the standard.
1244 - iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2
1247 - Bug #1552726: in readline.c, avoid repeatedly polling in interactive
1248 mode by only placing a timeout on the select() if an input hook has
1249 been defined. This prevents an interactive Python from waking up 10
1250 times per second. Patch by Richard Boulton.
1252 - fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
1255 - Added support for linking the bsddb module against BerkeleyDB 4.5.x
1258 - Bug #1633621: if curses.resizeterm() or curses.resize_term() is called,
1259 update _curses.LINES, _curses.COLS, curses.LINES and curses.COLS.
1261 - Fix an off-by-one bug in locale.strxfrm().
1263 - Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*.
1265 - Build using system ffi library on arm*-linux*.
1267 - Bug #1372: zlibmodule.c: int overflow in PyZlib_decompress
1272 - Make test_runpy reentrant by fixing _check_module to clear out any module
1273 being tested. Was causing an error by __import__ doing a reload on the
1274 second run and thus suppressing bytecode recreation.
1276 - Capture socket connection resets and timeouts in test_socket_ssl and
1277 test_urllib2net and raise test.test_support.ResourceDenied.
1279 - Patch #1559413: Fix test_cmd_line if sys.executable contains a space.
1281 - Added test.test_support.TransientResource which is a context manager to
1282 surround calls to resources that are not guaranteed to work even if
1283 test.test_support.requires says that the resource should exist.
1285 - Added a test for slicing of an exception.
1287 - Added test.test_support.EnvironmentVarGuard. It's a class that provides a
1288 context manager so that one can temporarily set or unset environment
1291 - Added some tests for modulefinder.
1293 - Converted test_imp to use unittest.
1295 - Fix bsddb test_basics.test06_Transactions to check the version
1298 - test.test_support.catch_warning is a new context manager that can be used
1299 to catch the warnings issued by the warning framework.
1305 - Tools/scripts/win_add2path.py was added. The simple script modifes the
1306 PATH environment var of the HKCU tree and adds the python bin and script
1309 - Tools/18n/pygettext.py was added to the list of scripts installed by
1310 Tools/scripts/setup.py (tracker item 642309).
1312 - Added IronPython and Jython support to pybench (part of which
1315 - Made some minor changes to pybench output to allow the user
1316 to see which Python version is running pybench
1318 - Added support for the new platform module feature
1319 platform.python_implementation(); this will now be saved
1320 in the benchmark pickle
1325 - RFE #1765140: Updated documentation on FileHandler and subclasses to
1326 include new optional delay argument.
1328 - Bug #932563: Added section on getting contextual information into logging
1329 output, and added documentation for the new LoggerAdapter class.
1331 - Bug #1295: Added information about caching of formatted exception
1332 information in the LogRecord by Formatter.format().
1334 - Bug #1637365: add subsection about "__name__ == __main__" to the
1337 - Patch #1698768: updated the "using Python on the Mac" intro.
1339 - Bug #1569057: Document that calling file.next() when the file is open for
1340 writing is undefined.
1342 - Patch #1489771: the syntax rules in Python Reference Manual were
1343 updated to reflect the current Python syntax.
1345 - Patch #1686451: Fix return type for
1346 PySequence_{Count,Index,Fast_GET_SIZE}.
1348 - Patch #1679379: add documentation for fnmatch.translate().
1350 - Bug #1629566: clarify the docs on the return values of parsedate()
1351 and parsedate_tz() in email.utils and rfc822.
1353 - Patch #1671450: add a section about subclassing builtin types to the
1354 "extending and embedding" tutorial.
1356 - Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next
1359 - Bug #1565919: document set types in the Language Reference.
1361 - Bug #1546052: clarify that PyString_FromString(AndSize) copies the
1362 string pointed to by its parameter.
1364 - Bug #1566663: remove obsolete example from datetime docs.
1366 - Bug #1541682: Fix example in the "Refcount details" API docs.
1367 Additionally, remove a faulty example showing PySequence_SetItem applied
1368 to a newly created list object and add notes that this isn't a good idea.
1374 - Patch #1552024: add decorator support to unparse.py demo script.
1376 - Make auto-generated python.vim file list built-ins and exceptions in
1377 alphatbetical order. Makes output more deterministic and easier to tell if
1378 the file is stale or not.
1380 - Bug #1546372: Fixed small bugglet in pybench that caused a missing
1381 file not to get reported properly.
1387 - Issue #1726: Remove Python/atof.c from PCBuild/pythoncore.vcproj
1389 - Removed PCbuild8/ directory and added a new build directory for VS 2005
1390 based on the VS 2008 build directory to PC/VS8.0. The script
1391 PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0.
1393 - Moved PCbuild/ directory for VS 2003 to PC/VS7.1 and renamed PCBuild9/
1394 directory to PCBuild/.
1396 - Bug #1699: Define _BSD_SOURCE only on OpenBSD.
1398 - Bug #1608: use -fwrapv when GCC supports it. This is important,
1399 newer GCC versions may optimize away overflow buffer overflow checks
1400 without this option!
1402 - Patch #1418: Make the AC_REPLACE_FUNCS object files actually work.
1404 - Add a FAST_LOOPS build option that speeds-up looping by trading away
1405 periodic threadstate and signal checking in tight loops. By default,
1406 this option is turned-off. It should only be enabled in debugged,
1407 performance critical applications.
1409 - Patch #786737: Allow building in a tree of symlinks pointing to
1412 - Bug #1737210: Change Manufacturer of Windows installer to PSF.
1414 - Bug #1746880: Correctly install DLLs into system32 folder on Win64.
1416 - Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+.
1418 - Stop supporting AtheOS and cause a build error in configure for the platform.
1420 - Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
1421 returned by python-config if Python was built with --enable-shared
1422 because that prevented the shared library from being used.
1424 - Patch #1569798: fix a bug in distutils when building Python from a
1425 directory within sys.exec_prefix.
1427 - Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
1429 - Disable _XOPEN_SOURCE on NetBSD 1.x.
1431 - configure now checks whether gcc supports the PyArg_ParseTuple format
1434 - Bug #1578513: Cross compilation was broken by a change to configure.
1435 Repair so that it's back to how it was in 2.4.3.
1437 - Patch #1576954: Update VC6 build directory; remove redundant
1440 - Bug #1568842: Fix test for uintptr_t.
1442 - Patch #1540470, for OpenBSD 4.0.
1444 - Fix build failure on kfreebsd and on the hurd.
1446 - Fix the build of the library reference in info format.
1448 - Allow Emacs 22 for building the documentation in info format.
1450 - Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify
1451 to include some information about the build environment.
1456 - Added a new API function ``PyImport_ImportModuleNoBlock``.
1458 - ``PyImport_Import`` and ``PyImport_ImportModule`` now always do absolute
1459 imports. In earlier versions they might have used relative imports under
1462 - Issue #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE
1465 - Added case insensitive comparison methods ``PyOS_stricmp(char*, char*)``
1466 and ``PyOS_strnicmp(char*, char*, Py_ssize_t)``.
1468 - Bug #1542693: remove semi-colon at end of PyImport_ImportModuleEx macro
1469 so it can be used as an expression.
1475 - Conditionalize definition of _CRT_SECURE_NO_DEPRECATE
1476 and _CRT_NONSTDC_NO_DEPRECATE.
1478 - Bug #1216: Restore support for Visual Studio 2002.
1484 - cfmfile now raises a DeprecationWarning.
1486 - buildtools now raises a DeprecationWarning.
1488 - Removed the macfs module. It had been deprecated since Python 2.5. This
1489 lead to the deprecation of macostools.touched() as it relied solely on macfs
1490 and was a no-op under OS X.
1493 What's New in Python 2.5 release candidate 1?
1494 =============================================
1496 *Release date: 17-AUG-2006*
1501 - Unicode objects will no longer raise an exception when being
1502 compared equal or unequal to a string and a UnicodeDecodeError
1503 exception occurs, e.g. as result of a decoding failure.
1505 Instead, the equal (==) and unequal (!=) comparison operators will
1506 now issue a UnicodeWarning and interpret the two objects as
1507 unequal. The UnicodeWarning can be filtered as desired using
1508 the warning framework, e.g. silenced completely, turned into an
1509 exception, logged, etc.
1511 Note that compare operators other than equal and unequal will still
1512 raise UnicodeDecodeError exceptions as they've always done.
1514 - Fix segfault when doing string formatting on subclasses of long.
1516 - Fix bug related to __len__ functions using values > 2**32 on 64-bit machines
1517 with new-style classes.
1519 - Fix bug related to __len__ functions returning negative values with
1522 - Patch #1538606, Fix __index__() clipping. There were some problems
1523 discovered with the API and how integers that didn't fit into Py_ssize_t
1524 were handled. This patch attempts to provide enough alternatives
1525 to effectively use __index__.
1527 - Bug #1536021: __hash__ may now return long int; the final hash
1528 value is obtained by invoking hash on the long int.
1530 - Bug #1536786: buffer comparison could emit a RuntimeWarning.
1532 - Bug #1535165: fixed a segfault in input() and raw_input() when
1533 sys.stdin is closed.
1535 - On Windows, the PyErr_Warn function is now exported from
1536 the Python dll again.
1538 - Bug #1191458: tracing over for loops now produces a line event
1539 on each iteration. Fixing this problem required changing the .pyc
1540 magic number. This means that .pyc files generated before 2.5c1
1541 will be regenerated.
1543 - Bug #1333982: string/number constants were inappropriately stored
1544 in the byte code and co_consts even if they were not used, ie
1545 immediately popped off the stack.
1547 - Fixed a reference-counting problem in property().
1553 - Fix a bug in the ``compiler`` package that caused invalid code to be
1554 generated for generator expressions.
1556 - The distutils version has been changed to 2.5.0. The change to
1557 keep it programmatically in sync with the Python version running
1558 the code (introduced in 2.5b3) has been reverted. It will continue
1559 to be maintained manually as static string literal.
1561 - If the Python part of a ctypes callback function returns None,
1562 and this cannot be converted to the required C type, an exception is
1563 printed with PyErr_WriteUnraisable. Before this change, the C
1564 callback returned arbitrary values to the calling code.
1566 - The __repr__ method of a NULL ctypes.py_object() no longer raises
1569 - uuid.UUID now has a bytes_le attribute. This returns the UUID in
1570 little-endian byte order for Windows. In addition, uuid.py gained some
1571 workarounds for clocks with low resolution, to stop the code yielding
1574 - Patch #1540892: site.py Quitter() class attempts to close sys.stdin
1575 before raising SystemExit, allowing IDLE to honor quit() and exit().
1577 - Bug #1224621: make tabnanny recognize IndentationErrors raised by tokenize.
1579 - Patch #1536071: trace.py should now find the full module name of a
1580 file correctly even on Windows.
1582 - logging's atexit hook now runs even if the rest of the module has
1583 already been cleaned up.
1585 - Bug #1112549, fix DoS attack on cgi.FieldStorage.
1587 - Bug #1531405, format_exception no longer raises an exception if
1588 str(exception) raised an exception.
1590 - Fix a bug in the ``compiler`` package that caused invalid code to be
1591 generated for nested functions.
1597 - Patch #1511317: don't crash on invalid hostname (alias) info.
1599 - Patch #1535500: fix segfault in BZ2File.writelines and make sure it
1600 raises the correct exceptions.
1602 - Patch # 1536908: enable building ctypes on OpenBSD/AMD64. The
1603 '-no-stack-protector' compiler flag for OpenBSD has been removed.
1605 - Patch #1532975 was applied, which fixes Bug #1533481: ctypes now
1606 uses the _as_parameter_ attribute when objects are passed to foreign
1607 function calls. The ctypes version number was changed to 1.0.1.
1609 - Bug #1530559, struct.pack raises TypeError where it used to convert.
1610 Passing float arguments to struct.pack when integers are expected
1611 now triggers a DeprecationWarning.
1617 - test_socketserver should now work on cygwin and not fail sporadically
1620 - test_mailbox should now work on cygwin versions 2006-08-10 and later.
1622 - Bug #1535182: really test the xreadlines() method of bz2 objects.
1624 - test_threading now skips testing alternate thread stack sizes on
1625 platforms that don't support changing thread stack size.
1631 - Patch #1534922: unittest docs were corrected and enhanced.
1637 - Bug #1535502, build _hashlib on Windows, and use masm assembler
1640 - Bug #1534738, win32 debug version of _msi should be _msi_d.pyd.
1642 - Bug #1530448, ctypes build failure on Solaris 10 was fixed.
1648 - New API for Unicode rich comparisons: PyUnicode_RichCompare()
1650 - Bug #1069160. Internal correctness changes were made to
1651 ``PyThreadState_SetAsyncExc()``. A test case was added, and
1652 the documentation was changed to state that the return value
1653 is always 1 (normal) or 0 (if the specified thread wasn't found).
1656 What's New in Python 2.5 beta 3?
1657 ================================
1659 *Release date: 03-AUG-2006*
1664 - _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t; it previously
1665 returned a long (see PEP 353).
1667 - Bug #1515471: string.replace() accepts character buffers again.
1669 - Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().
1670 This provides the proper warning for struct.pack().
1671 PyErr_Warn() is now deprecated in favor of PyErr_WarnEx().
1673 - Patch #1531113: Fix augmented assignment with yield expressions.
1674 Also fix a SystemError when trying to assign to yield expressions.
1676 - Bug #1529871: The speed enhancement patch #921466 broke Python's compliance
1677 with PEP 302. This was fixed by adding an ``imp.NullImporter`` type that is
1678 used in ``sys.path_importer_cache`` to cache non-directory paths and avoid
1679 excessive filesystem operations during imports.
1681 - Bug #1521947: When checking for overflow, ``PyOS_strtol()`` used some
1682 operations on signed longs that are formally undefined by C.
1683 Unfortunately, at least one compiler now cares about that, so complicated
1684 the code to make that compiler happy again.
1686 - Bug #1524310: Properly report errors from FindNextFile in os.listdir.
1688 - Patch #1232023: Stop including current directory in search
1691 - Fix some potential crashes found with failmalloc.
1693 - Fix warnings reported by Klocwork's static analysis tool.
1695 - Bug #1512814, Fix incorrect lineno's when code within a function
1696 had more than 255 blank lines.
1698 - Patch #1521179: Python now accepts the standard options ``--help`` and
1699 ``--version`` as well as ``/?`` on Windows.
1701 - Bug #1520864: unpacking singleton tuples in a 'for' loop (for x, in) works
1702 again. Fixing this problem required changing the .pyc magic number.
1703 This means that .pyc files generated before 2.5b3 will be regenerated.
1705 - Bug #1524317: Compiling Python ``--without-threads`` failed.
1706 The Python core compiles again, and, in a build without threads, the
1707 new ``sys._current_frames()`` returns a dictionary with one entry,
1708 mapping the faux "thread id" 0 to the current frame.
1710 - Bug #1525447: build on MacOS X on a case-sensitive filesystem.
1716 - Fix #1693149. Now you can pass several modules separated by
1717 comma to trace.py in the same --ignore-module option.
1719 - Correction of patch #1455898: In the mbcs decoder, set final=False
1720 for stream decoder, but final=True for the decode function.
1722 - os.urandom no longer masks unrelated exceptions like SystemExit or
1725 - Bug #1525866: Don't copy directory stat times in
1726 shutil.copytree on Windows
1728 - Bug #1002398: The documentation for os.path.sameopenfile now correctly
1729 refers to file descriptors, not file objects.
1731 - The renaming of the xml package to xmlcore, and the import hackery done
1732 to make it appear at both names, has been removed. Bug #1511497,
1733 #1513611, and probably others.
1735 - Bug #1441397: The compiler module now recognizes module and function
1736 docstrings correctly as it did in Python 2.4.
1738 - Bug #1529297: The rewrite of doctest for Python 2.4 unintentionally
1739 lost that tests are sorted by name before being run. This rarely
1740 matters for well-written tests, but can create baffling symptoms if
1741 side effects from one test to the next affect outcomes. ``DocTestFinder``
1742 has been changed to sort the list of tests it returns.
1744 - The distutils version has been changed to 2.5.0, and is now kept
1745 in sync with sys.version_info[:3].
1747 - Bug #978833: Really close underlying socket in _socketobject.close.
1749 - Bug #1459963: urllib and urllib2 now normalize HTTP header names with
1752 - Patch #1525766: In pkgutil.walk_packages, correctly pass the onerror callback
1753 to recursive calls and call it with the failing package name.
1755 - Bug #1525817: Don't truncate short lines in IDLE's tool tips.
1757 - Patch #1515343: Fix printing of deprecated string exceptions with a
1758 value in the traceback module.
1760 - Resync optparse with Optik 1.5.3: minor tweaks for/to tests.
1762 - Patch #1524429: Use repr() instead of backticks in Tkinter again.
1764 - Bug #1520914: Change time.strftime() to accept a zero for any position in its
1765 argument tuple. For arguments where zero is illegal, the value is forced to
1766 the minimum value that is correct. This is to support an undocumented but
1767 common way people used to fill in inconsequential information in the time
1770 - Patch #1220874: Update the binhex module for Mach-O.
1772 - The email package has improved RFC 2231 support, specifically for
1773 recognizing the difference between encoded (name*0*=<blah>) and non-encoded
1774 (name*0=<blah>) parameter continuations. This may change the types of
1775 values returned from email.message.Message.get_param() and friends.
1776 Specifically in some cases where non-encoded continuations were used,
1777 get_param() used to return a 3-tuple of (None, None, string) whereas now it
1778 will just return the string (since non-encoded continuations don't have
1779 charset and language parts).
1781 Also, whereas % values were decoded in all parameter continuations, they are
1782 now only decoded in encoded parameter parts.
1784 - Bug #1517990: IDLE keybindings on MacOS X now work correctly
1786 - Bug #1517996: IDLE now longer shows the default Tk menu when a
1787 path browser, class browser or debugger is the frontmost window on MacOS X
1789 - Patch #1520294: Support for getset and member descriptors in types.py,
1790 inspect.py, and pydoc.py. Specifically, this allows for querying the type
1791 of an object against these built-in types and more importantly, for getting
1792 their docstrings printed in the interactive interpreter's help() function.
1798 - Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during
1799 a socket operation on a socket with a timeout, the exception will be
1800 caught correctly. Previously, the exception was not caught.
1802 - Patch #1529514: The _ctypes extension is now compiled on more
1803 openbsd target platforms.
1805 - The ``__reduce__()`` method of the new ``collections.defaultdict`` had
1806 a memory leak, affecting pickles and deep copies.
1808 - Bug #1471938: Fix curses module build problem on Solaris 8; patch by
1811 - Patch #1448199: Release interpreter lock in _winreg.ConnectRegistry.
1813 - Patch #1521817: Index range checking on ctypes arrays containing
1814 exactly one element enabled again. This allows iterating over these
1815 arrays, without the need to check the array size before.
1817 - Bug #1521375: When the code in ctypes.util.find_library was
1818 run with root privileges, it could overwrite or delete
1819 /dev/null in certain cases; this is now fixed.
1821 - Bug #1467450: On Mac OS X 10.3, RTLD_GLOBAL is now used as the
1822 default mode for loading shared libraries in ctypes.
1824 - Because of a misspelled preprocessor symbol, ctypes was always
1825 compiled without thread support; this is now fixed.
1827 - pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename
1828 methods now allow their database parameter to be None as the
1829 sleepycat API allows.
1831 - Bug #1526460: Fix socketmodule compile on NetBSD as it has a different
1832 bluetooth API compared with Linux and FreeBSD.
1837 - Bug #1501330: Change test_ossaudiodev to be much more tolerant in terms of
1838 how long the test file should take to play. Now accepts taking 2.93 secs
1839 (exact time) +/- 10% instead of the hard-coded 3.1 sec.
1841 - Patch #1529686: The standard tests ``test_defaultdict``, ``test_iterlen``,
1842 ``test_uuid`` and ``test_email_codecs`` didn't actually run any tests when
1843 run via ``regrtest.py``. Now they do.
1848 - Bug #1439538: Drop usage of test -e in configure as it is not portable.
1853 - PythonLauncher now works correctly when the path to the script contains
1854 characters that are treated specially by the shell (such as quotes).
1856 - Bug #1527397: PythonLauncher now launches scripts with the working directory
1857 set to the directory that contains the script instead of the user home
1858 directory. That latter was an implementation accident and not what users
1862 What's New in Python 2.5 beta 2?
1863 ================================
1865 *Release date: 11-JUL-2006*
1870 - Bug #1441486: The literal representation of -(sys.maxint - 1)
1871 again evaluates to a int object, not a long.
1873 - Bug #1501934: The scope of global variables that are locally assigned
1874 using augmented assignment is now correctly determined.
1876 - Bug #927248: Recursive method-wrapper objects can now safely
1879 - Bug #1417699: Reject locale-specific decimal point in float()
1882 - Bug #1511381: codec_getstreamcodec() in codec.c is corrected to
1883 omit a default "error" argument for NULL pointer. This allows
1884 the parser to take a codec from cjkcodecs again.
1886 - Bug #1519018: 'as' is now validated properly in import statements.
1888 - On 64 bit systems, int literals that use less than 64 bits are
1889 now ints rather than longs.
1891 - Bug #1512814, Fix incorrect lineno's when code at module scope
1892 started after line 256.
1894 - New function ``sys._current_frames()`` returns a dict mapping thread
1895 id to topmost thread stack frame. This is for expert use, and is
1896 especially useful for debugging application deadlocks. The functionality
1897 was previously available in Fazal Majid's ``threadframe`` extension
1898 module, but it wasn't possible to do this in a wholly threadsafe way from
1904 - Bug #1257728: Mention Cygwin in distutils error message about a missing
1907 - Patch #1519566: Update turtle demo, make begin_fill idempotent.
1909 - Bug #1508010: msvccompiler now requires the DISTUTILS_USE_SDK
1910 environment variable to be set in order to the SDK environment
1911 for finding the compiler, include files, etc.
1913 - Bug #1515998: Properly generate logical ids for files in bdist_msi.
1915 - warnings.py now ignores ImportWarning by default
1917 - string.Template() now correctly handles tuple-values. Previously,
1918 multi-value tuples would raise an exception and single-value tuples would
1919 be treated as the value they contain, instead.
1921 - Bug #822974: Honor timeout in telnetlib.{expect,read_until}
1922 even if some data are received.
1924 - Bug #1267547: Put proper recursive setup.py call into the
1925 spec file generated by bdist_rpm.
1927 - Bug #1514693: Update turtle's heading when switching between
1928 degrees and radians.
1930 - Reimplement turtle.circle using a polyline, to allow correct
1933 - Bug #1514703: Only setup canvas window in turtle when the canvas
1936 - Bug #1513223: .close() of a _socketobj now releases the underlying
1937 socket again, which then gets closed as it becomes unreferenced.
1939 - Bug #1504333: Make sgmllib support angle brackets in quoted
1942 - Bug #853506: Fix IPv6 address parsing in unquoted attributes in
1943 sgmllib ('[' and ']' were not accepted).
1945 - Fix a bug in the turtle module's end_fill function.
1947 - Bug #1510580: The 'warnings' module improperly required that a Warning
1948 category be either a types.ClassType and a subclass of Warning. The proper
1949 check is just that it is a subclass with Warning as the documentation states.
1951 - The compiler module now correctly compiles the new try-except-finally
1952 statement (bug #1509132).
1954 - The wsgiref package is now installed properly on Unix.
1956 - A bug was fixed in logging.config.fileConfig() which caused a crash on
1957 shutdown when fileConfig() was called multiple times.
1959 - The sqlite3 module did cut off data from the SQLite database at the first
1960 null character before sending it to a custom converter. This has been fixed
1966 - #1494314: Fix a regression with high-numbered sockets in 2.4.3. This
1967 means that select() on sockets > FD_SETSIZE (typically 1024) work again.
1968 The patch makes sockets use poll() internally where available.
1970 - Assigning None to pointer type fields in ctypes structures possible
1971 overwrote the wrong fields, this is fixed now.
1973 - Fixed a segfault in _ctypes when ctypes.wintypes were imported
1974 on non-Windows platforms.
1976 - Bug #1518190: The ctypes.c_void_p constructor now accepts any
1977 integer or long, without range checking.
1979 - Patch #1517790: It is now possible to use custom objects in the ctypes
1980 foreign function argtypes sequence as long as they provide a from_param
1981 method, no longer is it required that the object is a ctypes type.
1983 - The '_ctypes' extension module now works when Python is configured
1984 with the --without-threads option.
1986 - Bug #1513646: os.access on Windows now correctly determines write
1989 - Bug #1512695: cPickle.loads could crash if it was interrupted with
1990 a KeyboardInterrupt.
1992 - Bug #1296433: parsing XML with a non-default encoding and
1993 a CharacterDataHandler could crash the interpreter in pyexpat.
1995 - Patch #1516912: improve Modules support for OpenVMS.
2000 - Automate Windows build process for the Win64 SSL module.
2002 - 'configure' now detects the zlib library the same way as distutils.
2003 Previously, the slight difference could cause compilation errors of the
2004 'zlib' module on systems with more than one version of zlib.
2006 - The MSI compileall step was fixed to also support a TARGETDIR
2009 - Bug #1517388: sqlite3.dll is now installed on Windows independent
2012 - Bug #1513032: 'make install' failed on FreeBSD 5.3 due to lib-old
2013 trying to be installed even though it's empty.
2018 - Call os.waitpid() at the end of tests that spawn child processes in order
2019 to minimize resources (zombies).
2024 - Cover ImportWarning, PendingDeprecationWarning and simplefilter() in the
2025 documentation for the warnings module.
2027 - Patch #1509163: MS Toolkit Compiler no longer available.
2029 - Patch #1504046: Add documentation for xml.etree.
2032 What's New in Python 2.5 beta 1?
2033 ================================
2035 *Release date: 20-JUN-2006*
2040 - Patch #1507676: Error messages returned by invalid abstract object operations
2041 (such as iterating over an integer) have been improved and now include the
2042 type of the offending object to help with debugging.
2044 - Bug #992017: A classic class that defined a __coerce__() method that returned
2045 its arguments swapped would infinitely recurse and segfault the interpreter.
2047 - Fix the socket tests so they can be run concurrently.
2049 - Removed 5 integers from C frame objects (PyFrameObject).
2050 f_nlocals, f_ncells, f_nfreevars, f_stack_size, f_restricted.
2052 - Bug #532646: object.__call__() will continue looking for the __call__
2053 attribute on objects until one without one is found. This leads to recursion
2054 when you take a class and set its __call__ attribute to an instance of the
2055 class. Originally fixed for classic classes, but this fix is for new-style.
2056 Removes the infinite_rec_3 crasher.
2058 - The string and unicode methods startswith() and endswith() now accept
2059 a tuple of prefixes/suffixes to look for. Implements RFE #1491485.
2061 - Buffer objects, at the C level, never used the char buffer
2062 implementation even when the char buffer for the wrapped object was
2063 explicitly requested (originally returned the read or write buffer).
2064 Now a TypeError is raised if the char buffer is not present but is
2067 - Patch #1346214: Statements like "if 0: suite" are now again optimized
2068 away like they were in Python 2.4.
2070 - Builtin exceptions are now full-blown new-style classes instead of
2071 instances pretending to be classes, which speeds up exception handling
2072 by about 80% in comparison to 2.5a2.
2074 - Patch #1494554: Update unicodedata.numeric and unicode.isnumeric to
2077 - Patch #921466: sys.path_importer_cache is now used to cache valid and
2078 invalid file paths for the built-in import machinery which leads to
2079 fewer open calls on startup.
2081 - Patch #1442927: ``long(str, base)`` is now up to 6x faster for non-power-
2082 of-2 bases. The largest speedup is for inputs with about 1000 decimal
2083 digits. Conversion from non-power-of-2 bases remains quadratic-time in
2084 the number of input digits (it was and remains linear-time for bases
2085 2, 4, 8, 16 and 32).
2087 - Bug #1334662: ``int(string, base)`` could deliver a wrong answer
2088 when ``base`` was not 2, 4, 8, 10, 16 or 32, and ``string`` represented
2089 an integer close to ``sys.maxint``. This was repaired by patch
2090 #1335972, which also gives a nice speedup.
2092 - Patch #1337051: reduced size of frame objects.
2094 - PyErr_NewException now accepts a tuple of base classes as its
2097 - Patch #876206: function call speedup by retaining allocated frame
2100 - Bug #1462152: file() now checks more thoroughly for invalid mode
2101 strings and removes a possible "U" before passing the mode to the
2104 - Patch #1488312, Fix memory alignment problem on SPARC in unicode
2106 - Bug #1487966: Fix SystemError with conditional expression in assignment
2108 - WindowsError now has two error code attributes: errno, which carries
2109 the error values from errno.h, and winerror, which carries the error
2110 values from winerror.h. Previous versions put the winerror.h values
2111 (from GetLastError()) into the errno attribute.
2113 - Patch #1475845: Raise IndentationError for unexpected indent.
2115 - Patch #1479181: split open() and file() from being aliases for each other.
2117 - Patch #1497053 & bug #1275608: Exceptions occurring in ``__eq__()``
2118 methods were always silently ignored by dictionaries when comparing keys.
2119 They are now passed through (except when using the C API function
2120 ``PyDict_GetItem()``, whose semantics did not change).
2122 - Bug #1456209: In some obscure cases it was possible for a class with a
2123 custom ``__eq__()`` method to confuse dict internals when class instances
2124 were used as a dict's keys and the ``__eq__()`` method mutated the dict.
2125 No, you don't have any code that did this ;-)
2130 - Bug #1295808: expat symbols should be namespaced in pyexpat
2132 - Patch #1462338: Upgrade pyexpat to expat 2.0.0
2134 - Change binascii.hexlify to accept a read-only buffer instead of only a char
2135 buffer and actually follow its documentation.
2137 - Fixed a potentially invalid memory access of CJKCodecs' shift-jis decoder.
2139 - Patch #1478788 (modified version): The functional extension module has
2140 been renamed to _functools and a functools Python wrapper module added.
2141 This provides a home for additional function related utilities that are
2142 not specifically about functional programming. See PEP 309.
2144 - Patch #1493701: performance enhancements for struct module.
2146 - Patch #1490224: time.altzone is now set correctly on Cygwin.
2148 - Patch #1435422: zlib's compress and decompress objects now have a
2151 - Patch #1454481: thread stack size is now tunable at runtime for thread
2152 enabled builds on Windows and systems with Posix threads support.
2154 - On Win32, os.listdir now supports arbitrarily-long Unicode path names
2155 (up to the system limit of 32K characters).
2157 - Use Win32 API to implement os.{access,chdir,chmod,mkdir,remove,rename,rmdir,utime}.
2158 As a result, these functions now raise WindowsError instead of OSError.
2160 - ``time.clock()`` on Win64 should use the high-performance Windows
2161 ``QueryPerformanceCounter()`` now (as was already the case on 32-bit
2164 - Calling Tk_Init twice is refused if the first call failed as that
2167 - bsddb: added the DB_ARCH_REMOVE flag and fixed db.DBEnv.log_archive() to
2168 accept it without potentially using an uninitialized pointer.
2170 - bsddb: added support for the DBEnv.log_stat() and DBEnv.lsn_reset() methods
2171 assuming BerkeleyDB >= 4.0 and 4.4 respectively. [pybsddb project SF
2172 patch numbers 1494885 and 1494902]
2174 - bsddb: added an interface for the BerkeleyDB >= 4.3 DBSequence class.
2175 [pybsddb project SF patch number 1466734]
2177 - bsddb: fix DBCursor.pget() bug with keyword argument names when no data
2178 parameter is supplied. [SF pybsddb bug #1477863]
2180 - bsddb: the __len__ method of a DB object has been fixed to return correct
2181 results. It could previously incorrectly return 0 in some cases.
2182 Fixes SF bug 1493322 (pybsddb bug 1184012).
2184 - bsddb: the bsddb.dbtables Modify method now raises the proper error and
2185 aborts the db transaction safely when a modifier callback fails.
2186 Fixes SF python patch/bug #1408584.
2188 - bsddb: multithreaded DB access using the simple bsddb module interface
2189 now works reliably. It has been updated to use automatic BerkeleyDB
2190 deadlock detection and the bsddb.dbutils.DeadlockWrap wrapper to retry
2191 database calls that would previously deadlock. [SF python bug #775414]
2193 - Patch #1446489: add support for the ZIP64 extensions to zipfile.
2195 - Patch #1506645: add Python wrappers for the curses functions
2196 is_term_resized, resize_term and resizeterm.
2201 - Patch #815924: Restore ability to pass type= and icon= in tkMessageBox
2204 - Patch #812986: Update turtle output even if not tracing.
2206 - Patch #1494750: Destroy master after deleting children in
2209 - Patch #1096231: Add ``default`` argument to Tkinter.Wm.wm_iconbitmap.
2211 - Patch #763580: Add name and value arguments to Tkinter variable
2214 - Bug #1117556: SimpleHTTPServer now tries to find and use the system's
2215 mime.types file for determining MIME types.
2217 - Bug #1339007: Shelf objects now don't raise an exception in their
2218 __del__ method when initialization failed.
2220 - Patch #1455898: The MBCS codec now supports the incremental mode for
2221 double-byte encodings.
2223 - ``difflib``'s ``SequenceMatcher.get_matching_blocks()`` was changed to
2224 guarantee that adjacent triples in the return list always describe
2225 non-adjacent blocks. Previously, a pair of matching blocks could end
2226 up being described by multiple adjacent triples that formed a partition
2227 of the matching pair.
2229 - Bug #1498146: fix optparse to handle Unicode strings in option help,
2230 description, and epilog.
2232 - Bug #1366250: minor optparse documentation error.
2234 - Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately;
2237 - The wsgiref package has been added to the standard library.
2239 - The functions update_wrapper() and wraps() have been added to the functools
2240 module. These make it easier to copy relevant metadata from the original
2241 function when writing wrapper functions.
2243 - The optional ``isprivate`` argument to ``doctest.testmod()``, and the
2244 ``doctest.is_private()`` function, both deprecated in 2.4, were removed.
2246 - Patch #1359618: Speed up charmap encoder by using a trie structure
2249 - The functions in the ``pprint`` module now sort dictionaries by key
2250 before computing the display. Before 2.5, ``pprint`` sorted a dictionary
2251 if and only if its display required more than one line, although that
2252 wasn't documented. The new behavior increases predictability; e.g.,
2253 using ``pprint.pprint(a_dict)`` in a doctest is now reliable.
2255 - Patch #1497027: try HTTP digest auth before basic auth in urllib2
2256 (thanks for J. J. Lee).
2258 - Patch #1496206: improve urllib2 handling of passwords with respect to
2259 default HTTP and HTTPS ports.
2261 - Patch #1080727: add "encoding" parameter to doctest.DocFileSuite.
2263 - Patch #1281707: speed up gzip.readline.
2265 - Patch #1180296: Two new functions were added to the locale module:
2266 format_string() to get the effect of "format % items" but locale-aware,
2267 and currency() to format a monetary number with currency sign.
2269 - Patch #1486962: Several bugs in the turtle Tk demo module were fixed
2270 and several features added, such as speed and geometry control.
2272 - Patch #1488881: add support for external file objects in bz2 compressed
2275 - Patch #721464: pdb.Pdb instances can now be given explicit stdin and
2276 stdout arguments, making it possible to redirect input and output
2277 for remote debugging.
2279 - Patch #1484695: Update the tarfile module to version 0.8. This fixes
2280 a couple of issues, notably handling of long file names using the
2281 GNU LONGNAME extension.
2283 - Patch #1478292. ``doctest.register_optionflag(name)`` shouldn't create a
2284 new flag when ``name`` is already the name of an option flag.
2286 - Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler
2289 - Patch #1472854: make the rlcompleter.Completer class usable on non-
2292 - Patch #1470846: fix urllib2 ProxyBasicAuthHandler.
2294 - Bug #1472827: correctly escape newlines and tabs in attribute values in
2295 the saxutils.XMLGenerator class.
2301 - Bug #1502728: Correctly link against librt library on HP-UX.
2303 - OpenBSD 3.9 is supported now.
2305 - Patch #1492356: Port to Windows CE.
2307 - Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64.
2309 - Patch #1471883: Add --enable-universalsdk.
2325 What's New in Python 2.5 alpha 2?
2326 =================================
2328 *Release date: 27-APR-2006*
2333 - Bug #1465834: 'bdist_wininst preinstall script support' was fixed
2334 by converting these apis from macros into exported functions again:
2336 PyParser_SimpleParseFile PyParser_SimpleParseString PyRun_AnyFile
2337 PyRun_AnyFileEx PyRun_AnyFileFlags PyRun_File PyRun_FileEx
2338 PyRun_FileFlags PyRun_InteractiveLoop PyRun_InteractiveOne
2339 PyRun_SimpleFile PyRun_SimpleFileEx PyRun_SimpleString
2340 PyRun_String Py_CompileString
2342 - Under COUNT_ALLOCS, types are not necessarily immortal anymore.
2344 - All uses of PyStructSequence_InitType have been changed to initialize
2345 the type objects only once, even if the interpreter is initialized
2348 - Bug #1454485, array.array('u') could crash the interpreter. This was
2349 due to PyArgs_ParseTuple(args, 'u#', ...) trying to convert buffers (strings)
2350 to unicode when it didn't make sense. 'u#' now requires a unicode string.
2352 - Py_UNICODE is unsigned. It was always documented as unsigned, but
2353 due to a bug had a signed value in previous versions.
2355 - Patch #837242: ``id()`` of any Python object always gives a positive
2356 number now, which might be a long integer. ``PyLong_FromVoidPtr`` and
2357 ``PyLong_AsVoidPtr`` have been changed accordingly. Note that it has
2358 never been correct to implement a ``__hash()__`` method that returns the
2359 ``id()`` of an object:
2362 return id(self) # WRONG
2364 because a hash result must be a (short) Python int but it was always
2365 possible for ``id()`` to return a Python long. However, because ``id()``
2366 could return negative values before, on a 32-bit box an ``id()`` result
2367 was always usable as a hash value before this patch. That's no longer
2370 - Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c)
2371 to load extension modules and now provides the dl module. As a result,
2372 sys.setdlopenflags() now works correctly on these systems. (SF patch
2375 - Patch #1463867: enhanced garbage collection to allow cleanup of cycles
2376 involving generators that have paused outside of any ``try`` or ``with``
2377 blocks. (In 2.5a1, a paused generator that was part of a reference
2378 cycle could not be garbage collected, regardless of whether it was
2379 paused in a ``try`` or ``with`` block.)
2384 - Patch #1191065: Fix preprocessor problems on systems where recvfrom
2387 - Bug #1467952: os.listdir() now correctly raises an error if readdir()
2388 fails with an error condition.
2390 - Fixed bsddb.db.DBError derived exceptions so they can be unpickled.
2392 - Bug #1117761: bsddb.*open() no longer raises an exception when using
2393 the cachesize parameter.
2395 - Bug #1149413: bsddb.*open() no longer raises an exception when using
2396 a temporary db (file=None) with the 'n' flag to truncate on open.
2398 - Bug #1332852: bsddb module minimum BerkeleyDB version raised to 3.3
2399 as older versions cause excessive test failures.
2401 - Patch #1062014: AF_UNIX sockets under Linux have a special
2402 abstract namespace that is now fully supported.
2407 - Bug #1223937: subprocess.CalledProcessError reports the exit status
2408 of the process using the returncode attribute, instead of
2411 - Patch #1475231: ``doctest`` has a new ``SKIP`` option, which causes
2412 a doctest to be skipped (the code is not run, and the expected output
2413 or exception is ignored).
2415 - Fixed contextlib.nested to cope with exceptions being raised and
2416 caught inside exit handlers.
2418 - Updated optparse module to Optik 1.5.1 (allow numeric constants in
2419 hex, octal, or binary; add ``append_const`` action; keep going if
2420 gettext cannot be imported; added ``OptionParser.destroy()`` method;
2421 added ``epilog`` for better help generation).
2423 - Bug #1473760: ``tempfile.TemporaryFile()`` could hang on Windows, when
2424 called from a thread spawned as a side effect of importing a module.
2426 - The pydoc module now supports documenting packages contained in
2429 - The pkgutil module now has several new utility functions, such
2430 as ``walk_packages()`` to support working with packages that are either
2431 in the filesystem or zip files.
2433 - The mailbox module can now modify and delete messages from
2434 mailboxes, in addition to simply reading them. Thanks to Gregory
2435 K. Johnson for writing the code, and to the 2005 Google Summer of
2436 Code for funding his work.
2438 - The ``__del__`` method of class ``local`` in module ``_threading_local``
2439 returned before accomplishing any of its intended cleanup.
2441 - Patch #790710: Add breakpoint command lists in pdb.
2443 - Patch #1063914: Add Tkinter.Misc.clipboard_get().
2445 - Patch #1191700: Adjust column alignment in bdb breakpoint lists.
2447 - SimpleXMLRPCServer relied on the fcntl module, which is unavailable on
2448 Windows. Bug #1469163.
2450 - The warnings, linecache, inspect, traceback, site, and doctest modules
2451 were updated to work correctly with modules imported from zipfiles or
2452 via other PEP 302 __loader__ objects.
2454 - Patch #1467770: Reduce usage of subprocess._active to processes which
2455 the application hasn't waited on.
2457 - Patch #1462222: Fix Tix.Grid.
2459 - Fix exception when doing glob.glob('anything*/')
2461 - The pstats.Stats class accepts an optional stream keyword argument to
2462 direct output to an alternate file-like object.
2467 - The Makefile now has a reindent target, which runs reindent.py on
2470 - Patch #1470875: Building Python with MS Free Compiler
2472 - Patch #1161914: Add a python-config script.
2474 - Patch #1324762:Remove ccpython.cc; replace --with-cxx with
2475 --with-cxx-main. Link with C++ compiler only if --with-cxx-main was
2476 specified. (Can be overridden by explicitly setting LINKCC.) Decouple
2477 CXX from --with-cxx-main, see description in README.
2479 - Patch #1429775: Link extension modules with the shared libpython.
2481 - Fixed a libffi build problem on MIPS systems.
2483 - ``PyString_FromFormat``, ``PyErr_Format``, and ``PyString_FromFormatV``
2484 now accept formats "%u" for unsigned ints, "%lu" for unsigned longs,
2485 and "%zu" for unsigned integers of type ``size_t``.
2490 - test_contextlib now checks contextlib.nested can cope with exceptions
2491 being raised and caught inside exit handlers.
2493 - test_cmd_line now checks operation of the -m and -c command switches
2495 - The test_contextlib test in 2.5a1 wasn't actually run unless you ran
2496 it separately and by hand. It also wasn't cleaning up its changes to
2497 the current Decimal context.
2499 - regrtest.py now has a -M option to run tests that test the new limits of
2500 containers, on 64-bit architectures. Running these tests is only sensible
2501 on 64-bit machines with more than two gigabytes of memory. The argument
2502 passed is the maximum amount of memory for the tests to use.
2507 - Added the Python benchmark suite pybench to the Tools/ directory;
2508 contributed by Marc-Andre Lemburg.
2513 - Patch #1473132: Improve docs for ``tp_clear`` and ``tp_traverse``.
2515 - PEP 343: Added Context Types section to the library reference
2516 and attempted to bring other PEP 343 related documentation into
2517 line with the implementation and/or python-dev discussions.
2519 - Bug #1337990: clarified that ``doctest`` does not support examples
2520 requiring both expected output and an exception.
2523 What's New in Python 2.5 alpha 1?
2524 =================================
2526 *Release date: 05-APR-2006*
2531 - PEP 338: -m command line switch now delegates to runpy.run_module
2532 allowing it to support modules in packages and zipfiles
2534 - On Windows, .DLL is not an accepted file name extension for
2535 extension modules anymore; extensions are only found if they
2538 - Bug #1421664: sys.stderr.encoding is now set to the same value as
2539 sys.stdout.encoding.
2541 - __import__ accepts keyword arguments.
2543 - Patch #1460496: round() now accepts keyword arguments.
2545 - Fixed bug #1459029 - unicode reprs were double-escaped.
2547 - Patch #1396919: The system scope threads are reenabled on FreeBSD
2548 5.4 and later versions.
2550 - Bug #1115379: Compiling a Unicode string with an encoding declaration
2551 now gives a SyntaxError.
2553 - Previously, Python code had no easy way to access the contents of a
2554 cell object. Now, a ``cell_contents`` attribute has been added
2555 (closes patch #1170323).
2557 - Patch #1123430: Python's small-object allocator now returns an arena to
2558 the system ``free()`` when all memory within an arena becomes unused
2559 again. Prior to Python 2.5, arenas (256KB chunks of memory) were never
2560 freed. Some applications will see a drop in virtual memory size now,
2561 especially long-running applications that, from time to time, temporarily
2562 use a large number of small objects. Note that when Python returns an
2563 arena to the platform C's ``free()``, there's no guarantee that the
2564 platform C library will in turn return that memory to the operating system.
2565 The effect of the patch is to stop making that impossible, and in tests it
2566 appears to be effective at least on Microsoft C and gcc-based systems.
2567 Thanks to Evan Jones for hard work and patience.
2569 - Patch #1434038: property() now uses the getter's docstring if there is
2570 no "doc" argument given. This makes it possible to legitimately use
2571 property() as a decorator to produce a read-only property.
2573 - PEP 357, patch 1436368: add an __index__ method to int/long and a matching
2574 nb_index slot to the PyNumberMethods struct. The slot is consulted instead
2575 of requiring an int or long in slicing and a few other contexts, enabling
2576 other objects (e.g. Numeric Python's integers) to be used as slice indices.
2578 - Fixed various bugs reported by Coverity's Prevent tool.
2580 - PEP 352, patch #1104669: Make exceptions new-style objects. Introduced the
2581 new exception base class, BaseException, which has a new message attribute.
2582 KeyboardInterrupt and SystemExit to directly inherit from BaseException now.
2583 Raising a string exception now raises a DeprecationWarning.
2585 - Patch #1438387, PEP 328: relative and absolute imports. Imports can now be
2586 explicitly relative, using 'from .module import name' to mean 'from the same
2587 package as this module is in. Imports without dots still default to the
2588 old relative-then-absolute, unless 'from __future__ import
2589 absolute_import' is used.
2591 - Properly check if 'warnings' raises an exception (usually when a filter set
2592 to "error" is triggered) when raising a warning for raising string
2595 - CO_GENERATOR_ALLOWED is no longer defined. This behavior is the default.
2596 The name was removed from Include/code.h.
2598 - PEP 308: conditional expressions were added: (x if cond else y).
2601 - The copy module now "copies" function objects (as atomic objects).
2602 - dict.__getitem__ now looks for a __missing__ hook before raising
2605 - PEP 343: with statement implemented. Needs ``from __future__ import
2606 with_statement``. Use of 'with' as a variable will generate a warning.
2607 Use of 'as' as a variable will also generate a warning (unless it's
2608 part of an import statement).
2609 The following objects have __context__ methods:
2610 - The built-in file type.
2611 - The thread.LockType type.
2612 - The following types defined by the threading module:
2613 Lock, RLock, Condition, Semaphore, BoundedSemaphore.
2614 - The decimal.Context class.
2616 - Fix the encodings package codec search function to only search
2617 inside its own package. Fixes problem reported in patch #1433198.
2619 Note: Codec packages should implement and register their own
2620 codec search function. PEP 100 has the details.
2622 - PEP 353: Using ``Py_ssize_t`` as the index type.
2624 - ``PYMALLOC_DEBUG`` builds now add ``4*sizeof(size_t)`` bytes of debugging
2625 info to each allocated block, since the ``Py_ssize_t`` changes (PEP 353)
2626 now allow Python to make use of memory blocks exceeding 2**32 bytes for
2627 some purposes on 64-bit boxes. A ``PYMALLOC_DEBUG`` build was limited
2628 to 4-byte allocations before.
2630 - Patch #1400181, fix unicode string formatting to not use the locale.
2631 This is how string objects work. u'%f' could use , instead of .
2632 for the decimal point. Now both strings and unicode always use periods.
2634 - Bug #1244610, #1392915, fix build problem on OpenBSD 3.7 and 3.8.
2635 configure would break checking curses.h.
2637 - Bug #959576: The pwd module is now builtin. This allows Python to be
2638 built on UNIX platforms without $HOME set.
2640 - Bug #1072182, fix some potential problems if characters are signed.
2642 - Bug #889500, fix line number on SyntaxWarning for global declarations.
2644 - Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter.
2646 - Support for converting hex strings to floats no longer works.
2647 This was not portable. float('0x3') now raises a ValueError.
2649 - Patch #1382163: Expose Subversion revision number to Python. New C API
2650 function Py_GetBuildNumber(). New attribute sys.subversion. Build number
2651 is now displayed in interactive prompt banner.
2653 - Implementation of PEP 341 - Unification of try/except and try/finally.
2654 "except" clauses can now be written together with a "finally" clause in
2655 one try statement instead of two nested ones. Patch #1355913.
2657 - Bug #1379994: Builtin unicode_escape and raw_unicode_escape codec
2658 now encodes backslash correctly.
2660 - Patch #1350409: Work around signal handling bug in Visual Studio 2005.
2662 - Bug #1281408: Py_BuildValue now works correctly even with unsigned longs
2665 - SF Bug #1350188, "setdlopenflags" leads to crash upon "import"
2666 It was possible for dlerror() to return a NULL pointer, so
2667 it will now use a default error message in this case.
2669 - Replaced most Unicode charmap codecs with new ones using the
2670 new Unicode translate string feature in the builtin charmap
2671 codec; the codecs were created from the mapping tables available
2672 at ftp.unicode.org and contain a few updates (e.g. the Mac OS
2673 encodings now include a mapping for the Apple logo)
2675 - Added a few more codecs for Mac OS encodings
2677 - Sped up some Unicode operations.
2679 - A new AST parser implementation was completed. The abstract
2680 syntax tree is available for read-only (non-compile) access
2681 to Python code; an _ast module was added.
2683 - SF bug #1167751: fix incorrect code being produced for generator expressions.
2684 The following code now raises a SyntaxError: foo(a = i for i in range(10))
2686 - SF Bug #976608: fix SystemError when mtime of an imported file is -1.
2688 - SF Bug #887946: fix segfault when redirecting stdin from a directory.
2689 Provide a warning when a directory is passed on the command line.
2691 - Fix segfault with invalid coding.
2693 - SF bug #772896: unknown encoding results in MemoryError.
2695 - All iterators now have a Boolean value of True. Formerly, some iterators
2696 supported a __len__() method which evaluated to False when the iterator
2699 - On 64-bit platforms, when __len__() returns a value that cannot be
2700 represented as a C int, raise OverflowError.
2702 - test__locale is skipped on OS X < 10.4 (only partial locale support is
2705 - SF bug #893549: parsing keyword arguments was broken with a few format
2708 - Changes donated by Elemental Security to make it work on AIX 5.3
2709 with IBM's 64-bit compiler (SF patch #1284289). This also closes SF
2710 bug #105470: test_pwd fails on 64bit system (Opteron).
2712 - Changes donated by Elemental Security to make it work on HP-UX 11 on
2713 Itanium2 with HP's 64-bit compiler (SF patch #1225212).
2715 - Disallow keyword arguments for type constructors that don't use them
2716 (fixes bug #1119418).
2718 - Forward UnicodeDecodeError into SyntaxError for source encoding errors.
2720 - SF bug #900092: When tracing (e.g. for hotshot), restore 'return' events for
2721 exceptions that cause a function to exit.
2723 - The implementation of set() and frozenset() was revised to use its
2724 own internal data structure. Memory consumption is reduced by 1/3
2725 and there are modest speed-ups as well. The API is unchanged.
2727 - SF bug #1238681: freed pointer is used in longobject.c:long_pow().
2729 - SF bug #1229429: PyObject_CallMethod failed to decrement some
2730 reference counts in some error exit cases.
2732 - SF bug #1185883: Python's small-object memory allocator took over
2733 a block managed by the platform C library whenever a realloc specified
2734 a small new size. However, there's no portable way to know then how
2735 much of the address space following the pointer is valid, so there's no
2736 portable way to copy data from the C-managed block into Python's
2737 small-object space without risking a memory fault. Python's small-object
2738 realloc now leaves such blocks under the control of the platform C
2741 - SF bug #1232517: An overflow error was not detected properly when
2742 attempting to convert a large float to an int in os.utime().
2744 - SF bug #1224347: hex longs now print with lowercase letters just
2745 like their int counterparts.
2747 - SF bug #1163563: the original fix for bug #1010677 ("thread Module
2748 Breaks PyGILState_Ensure()") broke badly in the case of multiple
2749 interpreter states; back out that fix and do a better job (see
2750 http://mail.python.org/pipermail/python-dev/2005-June/054258.html
2751 for a longer write-up of the problem).
2753 - SF patch #1180995: marshal now uses a binary format by default when
2756 - SF patch #1181301: on platforms that appear to use IEEE 754 floats,
2757 the routines that promise to produce IEEE 754 binary representations
2758 of floats now simply copy bytes around.
2760 - bug #967182: disallow opening files with 'wU' or 'aU' as specified by PEP
2763 - patch #1109424: int, long, float, complex, and unicode now check for the
2764 proper magic slot for type conversions when subclassed. Previously the
2765 magic slot was ignored during conversion. Semantics now match the way
2766 subclasses of str always behaved. int/long/float, conversion of an instance
2767 to the base class has been moved to the proper nb_* magic slot and out of
2769 Thanks Walter D�rwald.
2771 - Descriptors defined in C with a PyGetSetDef structure, where the setter is
2772 NULL, now raise an AttributeError when attempting to set or delete the
2773 attribute. Previously a TypeError was raised, but this was inconsistent
2774 with the equivalent pure-Python implementation.
2776 - It is now safe to call PyGILState_Release() before
2777 PyEval_InitThreads() (note that if there is reason to believe there
2778 are multiple threads around you still must call PyEval_InitThreads()
2779 before using the Python API; this fix is for extension modules that
2780 have no way of knowing if Python is multi-threaded yet).
2782 - Typing Ctrl-C whilst raw_input() was waiting in a build with threads
2783 disabled caused a crash.
2785 - Bug #1165306: instancemethod_new allowed the creation of a method
2786 with im_class == im_self == NULL, which caused a crash when called.
2788 - Move exception finalisation later in the shutdown process - this
2789 fixes the crash seen in bug #1165761
2791 - Added two new builtins, any() and all().
2793 - Defining a class with empty parentheses is now allowed
2794 (e.g., ``class C(): pass`` is no longer a syntax error).
2795 Patch #1176012 added support to the 'parser' module and 'compiler' package
2796 (thanks to logistix for that added support).
2798 - Patch #1115086: Support PY_LONGLONG in structmember.
2800 - Bug #1155938: new style classes did not check that __init__() was
2803 - Patch #802188: Report characters after line continuation character
2804 ('\') with a specific error message.
2806 - Bug #723201: Raise a TypeError for passing bad objects to 'L' format.
2808 - Bug #1124295: the __name__ attribute of file objects was
2809 inadvertently made inaccessible in restricted mode.
2811 - Bug #1074011: closing sys.std{out,err} now causes a flush() and
2814 - min() and max() now support key= arguments with the same meaning as in
2817 - The peephole optimizer now performs simple constant folding in expressions:
2820 - set and frozenset objects can now be marshalled. SF #1098985.
2822 - Bug #1077106: Poor argument checking could cause memory corruption
2823 in calls to os.read().
2825 - The parser did not complain about future statements in illegal
2826 positions. It once again reports a syntax error if a future
2827 statement occurs after anything other than a doc string.
2829 - Change the %s format specifier for str objects so that it returns a
2830 unicode instance if the argument is not an instance of basestring and
2831 calling __str__ on the argument returns a unicode instance.
2833 - Patch #1413181: changed ``PyThreadState_Delete()`` to forget about the
2834 current thread state when the auto-GIL-state machinery knows about
2835 it (since the thread state is being deleted, continuing to remember it
2836 can't help, but can hurt if another thread happens to get created with
2837 the same thread id).
2842 - Patch #1380952: fix SSL objects timing out on consecutive read()s
2844 - Patch #1309579: wait3 and wait4 were added to the posix module.
2846 - Patch #1231053: The audioop module now supports encoding/decoding of alaw.
2847 In addition, the existing ulaw code was updated.
2849 - RFE #567972: Socket objects' family, type and proto properties are
2850 now exposed via new attributes.
2852 - Everything under lib-old was removed. This includes the following modules:
2853 Para, addpack, cmp, cmpcache, codehack, dircmp, dump, find, fmt, grep,
2854 lockfile, newdir, ni, packmail, poly, rand, statcache, tb, tzparse,
2855 util, whatsound, whrandom, zmod
2857 - The following modules were removed: regsub, reconvert, regex, regex_syntax.
2859 - re and sre were swapped, so help(re) provides full help. importing sre
2860 is deprecated. The undocumented re.engine variable no longer exists.
2862 - Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle
2863 SS2 (single-shift 2) escape sequences correctly.
2865 - The unicodedata module was updated to the 4.1 version of the Unicode
2866 database. The 3.2 version is still available as unicodedata.db_3_2_0
2867 for applications that require this specific version (such as IDNA).
2869 - The timing module is no longer built by default. It was deprecated
2870 in PEP 4 in Python 2.0 or earlier.
2872 - Patch 1433928: Added a new type, defaultdict, to the collections module.
2873 This uses the new __missing__ hook behavior added to dict (see above).
2875 - Bug #854823: socketmodule now builds on Sun platforms even when
2876 INET_ADDRSTRLEN is not defined.
2878 - Patch #1393157: os.startfile() now has an optional argument to specify
2879 a "command verb" to invoke on the file.
2881 - Bug #876637, prevent stack corruption when socket descriptor
2882 is larger than FD_SETSIZE.
2884 - Patch #1407135, bug #1424041: harmonize mmap behavior of anonymous memory.
2885 mmap.mmap(-1, size) now returns anonymous memory in both Unix and Windows.
2886 mmap.mmap(0, size) should not be used on Windows for anonymous memory.
2888 - Patch #1422385: The nis module now supports access to domains other
2889 than the system default domain.
2891 - Use Win32 API to implement os.stat/fstat. As a result, subsecond timestamps
2892 are reported, the limit on path name lengths is removed, and stat reports
2893 WindowsError now (instead of OSError).
2895 - Add bsddb.db.DBEnv.set_tx_timestamp allowing time based database recovery.
2897 - Bug #1413192, fix seg fault in bsddb if a transaction was deleted
2900 - Patch #1103116: Basic AF_NETLINK support.
2902 - Bug #1402308, (possible) segfault when using mmap.mmap(-1, ...)
2904 - Bug #1400822, _curses over{lay,write} doesn't work when passing 6 ints.
2905 Also fix ungetmouse() which did not accept arguments properly.
2906 The code now conforms to the documented signature.
2908 - Bug #1400115, Fix segfault when calling curses.panel.userptr()
2909 without prior setting of the userptr.
2911 - Fix 64-bit problems in bsddb.
2913 - Patch #1365916: fix some unsafe 64-bit mmap methods.
2915 - Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn build
2918 - Bug #869197: os.setgroups rejects long integer arguments
2920 - Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint
2922 - Bug #1344508, Fix UNIX mmap leaking file descriptors
2924 - Patch #1338314, Bug #1336623: fix tarfile so it can extract
2925 REGTYPE directories from tarfiles written by old programs.
2927 - Patch #1407992, fixes broken bsddb module db associate when using
2928 BerkeleyDB 3.3, 4.0 or 4.1.
2930 - Get bsddb module to build with BerkeleyDB version 4.4
2932 - Get bsddb module to build with BerkeleyDB version 3.2
2934 - Patch #1309009, Fix segfault in pyexpat when the XML document is in latin_1,
2935 but Python incorrectly assumes it is in UTF-8 format
2937 - Fix parse errors in the readline module when compiling without threads.
2939 - Patch #1288833: Removed thread lock from socket.getaddrinfo on
2940 FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3).
2942 - Patches #1298449 and #1298499: Add some missing checks for error
2943 returns in cStringIO.c.
2945 - Patch #1297028: fix segfault if call type on MultibyteCodec,
2946 MultibyteStreamReader, or MultibyteStreamWriter
2948 - Fix memory leak in posix.access().
2950 - Patch #1213831: Fix typo in unicodedata._getcode.
2952 - Bug #1007046: os.startfile() did not accept unicode strings encoded in
2953 the file system encoding.
2955 - Patch #756021: Special-case socket.inet_aton('255.255.255.255') for
2956 platforms that don't have inet_aton().
2958 - Bug #1215928: Fix bz2.BZ2File.seek() for 64-bit file offsets.
2960 - Bug #1191043: Fix bz2.BZ2File.(x)readlines for files containing one
2961 line without newlines.
2963 - Bug #728515: mmap.resize() now resizes the file on Unix as it did
2966 - Patch #1180695: Add nanosecond stat resolution, and st_gen,
2967 st_birthtime for FreeBSD.
2969 - Patch #1231069: The fcntl.ioctl function now uses the 'I' code for
2970 the request code argument, which results in more C-like behaviour
2971 for large or negative values.
2973 - Bug #1234979: For the argument of thread.Lock.acquire, the Windows
2974 implementation treated all integer values except 1 as false.
2976 - Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
2978 - Patch #1212117: os.stat().st_flags is now accessible as a attribute
2979 if available on the platform.
2981 - Patch #1103951: Expose O_SHLOCK and O_EXLOCK in the posix module if
2982 available on the platform.
2984 - Bug #1166660: The readline module could segfault if hook functions
2985 were set in a different thread than that which called readline.
2987 - collections.deque objects now support a remove() method.
2989 - operator.itemgetter() and operator.attrgetter() now support retrieving
2990 multiple fields. This provides direct support for sorting on multiple
2991 keys (primary, secondary, etc).
2993 - os.access now supports Unicode path names on non-Win32 systems.
2995 - Patches #925152, #1118602: Avoid reading after the end of the buffer
2996 in pyexpat.GetInputContext.
2998 - Patches #749830, #1144555: allow UNIX mmap size to default to current
3001 - Added functional.partial(). See PEP309.
3003 - Patch #1093585: raise a ValueError for negative history items in readline.
3004 {remove_history,replace_history}
3006 - The spwd module has been added, allowing access to the shadow password
3009 - stat_float_times is now True.
3011 - array.array objects are now picklable.
3013 - the cPickle module no longer accepts the deprecated None option in the
3014 args tuple returned by __reduce__().
3016 - itertools.islice() now accepts None for the start and step arguments.
3017 This allows islice() to work more readily with slices:
3018 islice(s.start, s.stop, s.step)
3020 - datetime.datetime() now has a strptime class method which can be used to
3021 create datetime object using a string and format.
3023 - Patch #1117961: Replace the MD5 implementation from RSA Data Security Inc
3024 with the implementation from http://sourceforge.net/projects/libmd5-rfc/.
3029 - Patch #1388073: Numerous __-prefixed attributes of unittest.TestCase have
3030 been renamed to have only a single underscore prefix. This was done to
3031 make subclassing easier.
3033 - PEP 338: new module runpy defines a run_module function to support
3034 executing modules which provide access to source code or a code object
3035 via the PEP 302 import mechanisms.
3037 - The email module's parsedate_tz function now sets the daylight savings
3038 flag to -1 (unknown) since it can't tell from the date whether it should
3041 - Patch #624325: urlparse.urlparse() and urlparse.urlsplit() results
3042 now sport attributes that provide access to the parts of the result.
3044 - Patch #1462498: sgmllib now handles entity and character references
3045 in attribute values.
3047 - Added the sqlite3 package. This is based on pysqlite2.1.3, and provides
3048 a DB-API interface in the standard library. You'll need sqlite 3.0.8 or
3049 later to build this - if you have an earlier version, the C extension
3050 module will not be built.
3052 - Bug #1460340: ``random.sample(dict)`` failed in various ways. Dicts
3053 aren't officially supported here, and trying to use them will probably
3054 raise an exception some day. But dicts have been allowed, and "mostly
3055 worked", so support for them won't go away without warning.
3057 - Bug #1445068: getpass.getpass() can now be given an explicit stream
3058 argument to specify where to write the prompt.
3060 - Patch #1462313, bug #1443328: the pickle modules now can handle classes
3061 that have __private names in their __slots__.
3063 - Bug #1250170: mimetools now handles socket.gethostname() failures gracefully.
3065 - patch #1457316: "setup.py upload" now supports --identity to select the
3066 key to be used for signing the uploaded code.
3068 - Queue.Queue objects now support .task_done() and .join() methods
3069 to make it easier to monitor when daemon threads have completed
3070 processing all enqueued tasks. Patch #1455676.
3072 - popen2.Popen objects now preserve the command in a .cmd attribute.
3074 - Added the ctypes ffi package.
3076 - email 4.0 package now integrated. This is largely the same as the email 3.0
3077 package that was included in Python 2.3, except that PEP 8 module names are
3078 now used (e.g. mail.message instead of email.Message). The MIME classes
3079 have been moved to a subpackage (e.g. email.mime.text instead of
3080 email.MIMEText). The old names are still supported for now. Several
3081 deprecated Message methods have been removed and lots of bugs have been
3082 fixed. More details can be found in the email package documentation.
3084 - Patches #1436130/#1443155: codecs.lookup() now returns a CodecInfo object
3085 (a subclass of tuple) that provides incremental decoders and encoders
3086 (a way to use stateful codecs without the stream API). Python functions
3087 codecs.getincrementaldecoder() and codecs.getincrementalencoder() as well
3088 as C functions PyCodec_IncrementalEncoder() and PyCodec_IncrementalDecoder()
3091 - Patch #1359365: Calling next() on a closed StringIO.String object raises
3092 a ValueError instead of a StopIteration now (like file and cString.String do).
3093 cStringIO.StringIO.isatty() will raise a ValueError now if close() has been
3094 called before (like file and StringIO.StringIO do).
3096 - A regrtest option -w was added to re-run failed tests in verbose mode.
3098 - Patch #1446372: quit and exit can now be called from the interactive
3099 interpreter to exit.
3101 - The function get_count() has been added to the gc module, and gc.collect()
3102 grew an optional 'generation' argument.
3104 - A library msilib to generate Windows Installer files, and a distutils
3105 command bdist_msi have been added.
3107 - PEP 343: new module contextlib.py defines decorator @contextmanager
3108 and helpful context managers nested() and closing().
3110 - The compiler package now supports future imports after the module docstring.
3112 - Bug #1413790: zipfile now sanitizes absolute archive names that are
3113 not allowed by the specs.
3115 - Patch #1215184: FileInput now can be given an opening hook which can
3116 be used to control how files are opened.
3118 - Patch #1212287: fileinput.input() now has a mode parameter for
3119 specifying the file mode input files should be opened with.
3121 - Patch #1215184: fileinput now has a fileno() function for getting the
3122 current file number.
3124 - Patch #1349274: gettext.install() now optionally installs additional
3125 translation functions other than _() in the builtin namespace.
3127 - Patch #1337756: fileinput now accepts Unicode filenames.
3129 - Patch #1373643: The chunk module can now read chunks larger than
3132 - Patch #1417555: SimpleHTTPServer now returns Last-Modified headers.
3134 - Bug #1430298: It is now possible to send a mail with an empty
3135 return address using smtplib.
3137 - Bug #1432260: The names of lambda functions are now properly displayed
3140 - Patch #1412872: zipfile now sets the creator system to 3 (Unix)
3141 unless the system is Win32.
3143 - Patch #1349118: urllib now supports user:pass@ style proxy
3144 specifications, raises IOErrors when proxies for unsupported protocols
3145 are defined, and uses the https proxy on https redirections.
3147 - Bug #902075: urllib2 now supports 'host:port' style proxy specifications.
3149 - Bug #1407902: Add support for sftp:// URIs to urlparse.
3151 - Bug #1371247: Update Windows locale identifiers in locale.py.
3153 - Bug #1394565: SimpleHTTPServer now doesn't choke on query parameters
3156 - Bug #1403410: The warnings module now doesn't get confused
3157 when it can't find out the module name it generates a warning for.
3159 - Patch #1177307: Added a new codec utf_8_sig for UTF-8 with a BOM signature.
3161 - Patch #1157027: cookielib mishandles RFC 2109 cookies in Netscape mode
3163 - Patch #1117398: cookielib.LWPCookieJar and .MozillaCookieJar now raise
3164 LoadError as documented, instead of IOError. For compatibility,
3165 LoadError subclasses IOError.
3167 - Added the hashlib module. It provides secure hash functions for MD5 and
3168 SHA1, 224, 256, 384, and 512. Note that recent developments make the
3169 historic MD5 and SHA1 unsuitable for cryptographic-strength applications.
3170 In <http://mail.python.org/pipermail/python-dev/2005-December/058850.html>
3171 Ronald L. Rivest offered this advice for Python:
3173 "The consensus of researchers in this area (at least as
3174 expressed at the NIST Hash Function Workshop 10/31/05),
3175 is that SHA-256 is a good choice for the time being, but
3176 that research should continue, and other alternatives may
3177 arise from this research. The larger SHA's also seem OK."
3179 - Added a subset of Fredrik Lundh's ElementTree package. Available
3180 modules are xml.etree.ElementTree, xml.etree.ElementPath, and
3181 xml.etree.ElementInclude, from ElementTree 1.2.6.
3183 - Patch #1162825: Support non-ASCII characters in IDLE window titles.
3185 - Bug #1365984: urllib now opens "data:" URLs again.
3187 - Patch #1314396: prevent deadlock for threading.Thread.join() when an exception
3188 is raised within the method itself on a previous call (e.g., passing in an
3191 - Bug #1340337: change time.strptime() to always return ValueError when there
3192 is an error in the format string.
3194 - Patch #754022: Greatly enhanced webbrowser.py (by Oleg Broytmann).
3196 - Bug #729103: pydoc.py: Fix docother() method to accept additional
3199 - Patch #1300515: xdrlib.py: Fix pack_fstring() to really use null bytes
3202 - Bug #1296004: httplib.py: Limit maximal amount of data read from the
3203 socket to avoid a MemoryError on Windows.
3205 - Patch #1166948: locale.py: Prefer LC_ALL, LC_CTYPE and LANG over LANGUAGE
3206 to get the correct encoding.
3208 - Patch #1166938: locale.py: Parse LANGUAGE as a colon separated list of
3211 - Patch #1268314: Cache lines in StreamReader.readlines for performance.
3213 - Bug #1290505: Fix clearing the regex cache for time.strptime().
3215 - Bug #1167128: Fix size of a symlink in a tarfile to be 0.
3217 - Patch #810023: Fix off-by-one bug in urllib.urlretrieve reporthook
3220 - Bug #1163178: Make IDNA return an empty string when the input is empty.
3222 - Patch #848017: Make Cookie more RFC-compliant. Use CRLF as default output
3223 separator and do not output trailing semicolon.
3225 - Patch #1062060: urllib.urlretrieve() now raises a new exception, named
3226 ContentTooShortException, when the actually downloaded size does not
3227 match the Content-Length header.
3229 - Bug #1121494: distutils.dir_utils.mkpath now accepts Unicode strings.
3231 - Bug #1178484: Return complete lines from codec stream readers
3232 even if there is an exception in later lines, resulting in
3233 correct line numbers for decoding errors in source code.
3235 - Bug #1192315: Disallow negative arguments to clear() in pdb.
3237 - Patch #827386: Support absolute source paths in msvccompiler.py.
3239 - Patch #1105730: Apply the new implementation of commonprefix in posixpath
3240 to ntpath, macpath, os2emxpath and riscospath.
3242 - Fix a problem in Tkinter introduced by SF patch #869468: delete bogus
3243 __hasattr__ and __delattr__ methods on class Tk that were breaking
3246 - Bug #1015140: disambiguated the term "article id" in nntplib docs and
3247 docstrings to either "article number" or "message id".
3249 - Bug #1238170: threading.Thread.__init__ no longer has "kwargs={}" as a
3250 parameter, but uses the usual "kwargs=None".
3252 - textwrap now processes text chunks at O(n) speed instead of O(n**2).
3253 Patch #1209527 (Contributed by Connelly).
3255 - urllib2 has now an attribute 'httpresponses' mapping from HTTP status code
3256 to W3C name (404 -> 'Not Found'). RFE #1216944.
3258 - Bug #1177468: Don't cache the /dev/urandom file descriptor for os.urandom,
3259 as this can cause problems with apps closing all file descriptors.
3261 - Bug #839151: Fix an attempt to access sys.argv in the warnings module;
3262 it can be missing in embedded interpreters
3264 - Bug #1155638: Fix a bug which affected HTTP 0.9 responses in httplib.
3266 - Bug #1100201: Cross-site scripting was possible on BaseHTTPServer via
3269 - Bug #1108948: Cookie.py produced invalid JavaScript code.
3271 - The tokenize module now detects and reports indentation errors.
3274 - The tokenize module has a new untokenize() function to support a full
3275 roundtrip from lexed tokens back to Python source code. In addition,
3276 the generate_tokens() function now accepts a callable argument that
3277 terminates by raising StopIteration.
3279 - Bug #1196315: fix weakref.WeakValueDictionary constructor.
3281 - Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
3282 component of the path.
3284 - Patch #1120353: The xmlrpclib module provides better, more transparent,
3285 support for datetime.{datetime,date,time} objects. With use_datetime set
3286 to True, applications shouldn't have to fiddle with the DateTime wrapper
3289 - distutils.commands.upload was added to support uploading distribution
3292 - distutils.commands.register now encodes the data as UTF-8 before posting
3295 - decimal operator and comparison methods now return NotImplemented
3296 instead of raising a TypeError when interacting with other types. This
3297 allows other classes to implement __radd__ style methods and have them
3300 - Bug #1163325: Decimal infinities failed to hash. Attempting to
3301 hash a NaN raised an InvalidOperation instead of a TypeError.
3303 - Patch #918101: Add tarfile open mode r|* for auto-detection of the
3304 stream compression; add, for symmetry reasons, r:* as a synonym of r.
3306 - Patch #1043890: Add extractall method to tarfile.
3308 - Patch #1075887: Don't require MSVC in distutils if there is nothing
3311 - Patch #1103407: Properly deal with tarfile iterators when untarring
3312 symbolic links on Windows.
3314 - Patch #645894: Use getrusage for computing the time consumption in
3315 profile.py if available.
3317 - Patch #1046831: Use get_python_version where appropriate in sysconfig.py.
3319 - Patch #1117454: Remove code to special-case cookies without values
3322 - Patch #1117339: Add cookielib special name tests.
3324 - Patch #1112812: Make bsddb/__init__.py more friendly for modulefinder.
3326 - Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush.
3328 - Patch #1107973: Allow to iterate over the lines of a tarfile.ExFileObject.
3330 - Patch #1104111: Alter setup.py --help and --help-commands.
3332 - Patch #1121234: Properly cleanup _exit and tkerror commands.
3334 - Patch #1049151: xdrlib now unpacks booleans as True or False.
3336 - Fixed bug in a NameError bug in cookielib. Patch #1116583.
3338 - Applied a security fix to SimpleXMLRPCserver (PSF-2005-001). This
3339 disables recursive traversal through instance attributes, which can
3340 be exploited in various ways.
3342 - Bug #1222790: in SimpleXMLRPCServer, set the reuse-address and close-on-exec
3343 flags on the HTTP listening socket.
3345 - Bug #792570: SimpleXMLRPCServer had problems if the request grew too large.
3346 Fixed by reading the HTTP body in chunks instead of one big socket.read().
3348 - Patches #893642, #1039083: add allow_none, encoding arguments to
3349 constructors of SimpleXMLRPCServer and CGIXMLRPCRequestHandler.
3351 - Bug #1110478: Revert os.environ.update to do putenv again.
3353 - Bug #1103844: fix distutils.install.dump_dirs() with negated options.
3355 - os.{SEEK_SET, SEEK_CUR, SEEK_END} have been added for convenience.
3357 - Enhancements to the csv module:
3359 + Dialects are now validated by the underlying C code, better
3360 reflecting its capabilities, and improving its compliance with
3362 + Dialect parameter parsing has been re-implemented to improve error
3364 + quotechar=None and quoting=QUOTE_NONE now work the way PEP 305
3366 + the parser now removes the escapechar prefix from escaped characters.
3367 + when quoting=QUOTE_NONNUMERIC, the writer now tests for numeric
3368 types, rather than any object that can be represented as a numeric.
3369 + when quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields
3371 + reader now allows \r characters to be quoted (previously it only allowed
3373 + writer doublequote handling improved.
3374 + Dialect classes passed to the module are no longer instantiated by
3375 the module before being parsed (the former validation scheme required
3376 this, but the mechanism was unreliable).
3377 + The dialect registry now contains instances of the internal
3378 C-coded dialect type, rather than references to python objects.
3379 + the internal c-coded dialect type is now immutable.
3380 + register_dialect now accepts the same keyword dialect specifications
3381 as the reader and writer, allowing the user to register dialects
3382 without first creating a dialect class.
3383 + a configurable limit to the size of parsed fields has been added -
3384 previously, an unmatched quote character could result in the entire
3385 file being read into the field buffer before an error was reported.
3386 + A new module method csv.field_size_limit() has been added that sets
3387 the parser field size limit (returning the former limit). The initial
3389 + A line_num attribute has been added to the reader object, which tracks
3390 the number of lines read from the source iterator. This is not
3391 the same as the number of records returned, as records can span
3393 + reader and writer objects were not being registered with the cyclic-GC.
3394 This has been fixed.
3396 - _DummyThread objects in the threading module now delete self.__block that is
3397 inherited from _Thread since it uses up a lock allocated by 'thread'. The
3398 lock primitives tend to be limited in number and thus should not be wasted on
3399 a _DummyThread object. Fixes bug #1089632.
3401 - The imghdr module now detects Exif files.
3403 - StringIO.truncate() now correctly adjusts the size attribute.
3406 - locale.py now uses an updated locale alias table (built using
3407 Tools/i18n/makelocalealias.py, a tool to parse the X11 locale
3408 alias file); the encoding lookup was enhanced to use Python's
3409 encoding alias table.
3411 - moved deprecated modules to Lib/lib-old: whrandom, tzparse, statcache.
3413 - the pickle module no longer accepts the deprecated None option in the
3414 args tuple returned by __reduce__().
3416 - optparse now optionally imports gettext. This allows its use in setup.py.
3418 - the pickle module no longer uses the deprecated bin parameter.
3420 - the shelve module no longer uses the deprecated binary parameter.
3422 - the pstats module no longer uses the deprecated ignore() method.
3424 - the filecmp module no longer uses the deprecated use_statcache argument.
3426 - unittest.TestCase.run() and unittest.TestSuite.run() can now be successfully
3427 extended or overridden by subclasses. Formerly, the subclassed method would
3428 be ignored by the rest of the module. (Bug #1078905).
3430 - heapq.nsmallest() and heapq.nlargest() now support key= arguments with
3431 the same meaning as in list.sort().
3433 - Bug #1076985: ``codecs.StreamReader.readline()`` now calls ``read()`` only
3434 once when a size argument is given. This prevents a buffer overflow in the
3435 tokenizer with very long source lines.
3437 - Bug #1083110: ``zlib.decompress.flush()`` would segfault if called
3438 immediately after creating the object, without any intervening
3439 ``.decompress()`` calls.
3441 - The reconvert.quote function can now emit triple-quoted strings. The
3442 reconvert module now has some simple documentation.
3444 - ``UserString.MutableString`` now supports negative indices in
3445 ``__setitem__`` and ``__delitem__``
3447 - Bug #1149508: ``textwrap`` now handles hyphenated numbers (eg. "2004-03-05")
3450 - Partial fixes for SF bugs #1163244 and #1175396: If a chunk read by
3451 ``codecs.StreamReader.readline()`` has a trailing "\r", read one more
3452 character even if the user has passed a size parameter to get a proper
3453 line ending. Remove the special handling of a "\r\n" that has been split
3456 - Bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complain
3457 about illegal code points. The codec now supports PEP 293 style error
3460 - Bug #1235646: ``codecs.StreamRecoder.next()`` now reencodes the data it reads
3461 from the input stream, so that the output is a byte string in the correct
3462 encoding instead of a unicode string.
3464 - Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
3465 considering it exactly like a '*'.
3467 - Bug #1245379: Add "unicode-1-1-utf-7" as an alias for "utf-7" to
3468 ``encodings.aliases``.
3470 - ` uu.encode()`` and ``uu.decode()`` now support unicode filenames.
3472 - Patch #1413711: Certain patterns of differences were making difflib
3473 touch the recursion limit.
3475 - Bug #947906: An object oriented interface has been added to the calendar
3476 module. It's possible to generate HTML calendar now and the module can be
3477 called as a script (e.g. via ``python -mcalendar``). Localized month and
3478 weekday names can be ouput (even if an exotic encoding is used) using
3479 special classes that use unicode.
3484 - Fix test_float, test_long, and test_struct failures on Tru64 with gcc
3485 by using -mieee gcc option.
3487 - Patch #1432345: Make python compile on DragonFly.
3489 - Build support for Win64-AMD64 was added.
3491 - Patch #1428494: Prefer linking against ncursesw over ncurses library.
3493 - Patch #881820: look for openpty and forkpty also in libbsd.
3495 - The sources of zlib are now part of the Python distribution (zlib 1.2.3).
3496 The zlib module is now builtin on Windows.
3498 - Use -xcode=pic32 for CCSHARED on Solaris with SunPro.
3500 - Bug #1189330: configure did not correctly determine the necessary
3501 value of LINKCC if python was built with GCC 4.0.
3503 - Upgrade Windows build to zlib 1.2.3 which eliminates a potential security
3504 vulnerability in zlib 1.2.1 and 1.2.2.
3506 - EXTRA_CFLAGS has been introduced as an environment variable to hold compiler
3507 flags that change binary compatibility. Changes were also made to
3508 distutils.sysconfig to also use the environment variable when used during
3509 compilation of the interpreter and of C extensions through distutils.
3511 - SF patch 1171735: Darwin 8's headers are anal about POSIX compliance,
3512 and linking has changed (prebinding is now deprecated, and libcc_dynamic
3513 no longer exists). This configure patch makes things right.
3515 - Bug #1158607: Build with --disable-unicode again.
3517 - spwdmodule.c is built only if either HAVE_GETSPNAM or HAVE_HAVE_GETSPENT is
3518 defined. Discovered as a result of not being able to build on OS X.
3520 - setup.py now uses the directories specified in LDFLAGS using the -L option
3521 and in CPPFLAGS using the -I option for adding library and include
3522 directories, respectively, for compiling extension modules against. This has
3523 led to the core being compiled using the values in CPPFLAGS. It also removes
3524 the need for the special-casing of both DarwinPorts and Fink for darwin since
3525 the proper directories can be specified in LDFLAGS (``-L/sw/lib`` for Fink,
3526 ``-L/opt/local/lib`` for DarwinPorts) and CPPFLAGS (``-I/sw/include`` for
3527 Fink, ``-I/opt/local/include`` for DarwinPorts).
3529 - Test in configure.in that checks for tzset no longer dependent on tm->tm_zone
3530 to exist in the struct (not required by either ISO C nor the UNIX 2 spec).
3531 Tests for sanity in tzname when HAVE_TZNAME defined were also defined.
3532 Closes bug #1096244. Thanks Gregory Bond.
3537 - ``PyMem_{Del, DEL}`` and ``PyMem_{Free, FREE}`` no longer map to
3538 ``PyObject_{Free, FREE}``. They map to the system ``free()`` now. If memory
3539 is obtained via the ``PyObject_`` family, it must be released via the
3540 ``PyObject_`` family, and likewise for the ``PyMem_`` family. This has
3541 always been officially true, but when Python's small-object allocator was
3542 introduced, an attempt was made to cater to a few extension modules
3543 discovered at the time that obtained memory via ``PyObject_New`` but
3544 released it via ``PyMem_DEL``. It's years later, and if such code still
3545 exists it will fail now (probably with segfaults, but calling wrong
3546 low-level memory management functions can yield many symptoms).
3548 - Added a C API for set and frozenset objects.
3550 - Removed PyRange_New().
3552 - Patch #1313939: PyUnicode_DecodeCharmap() accepts a unicode string as the
3553 mapping argument now. This string is used as a mapping table. Byte values
3554 greater than the length of the string and 0xFFFE are treated as undefined
3561 - In test_os, st_?time is now truncated before comparing it with ST_?TIME.
3563 - Patch #1276356: New resource "urlfetch" is implemented. This enables
3564 even impatient people to run tests that require remote files.
3570 - Bug #1402224: Add warning to dl docs about crashes.
3572 - Bug #1396471: Document that Windows' ftell() can return invalid
3573 values for text files with UNIX-style line endings.
3575 - Bug #1274828: Document os.path.splitunc().
3577 - Bug #1190204: Clarify which directories are searched by site.py.
3579 - Bug #1193849: Clarify os.path.expanduser() documentation.
3581 - Bug #1243192: re.UNICODE and re.LOCALE affect \d, \D, \s and \S.
3583 - Bug #755617: Document the effects of os.chown() on Windows.
3585 - Patch #1180012: The documentation for modulefinder is now in the library reference.
3587 - Patch #1213031: Document that os.chown() accepts argument values of -1.
3589 - Bug #1190563: Document os.waitpid() return value with WNOHANG flag.
3591 - Bug #1175022: Correct the example code for property().
3593 - Document the IterableUserDict class in the UserDict module.
3594 Closes bug #1166582.
3596 - Remove all latent references for "Macintosh" that referred to semantics for
3597 Mac OS 9 and change to reflect the state for OS X.
3598 Closes patch #1095802. Thanks Jack Jansen.
3607 - FreeBSD 7 support is added.
3613 - Created Misc/Vim/vim_syntax.py to auto-generate a python.vim file in that
3614 directory for syntax highlighting in Vim. Vim directory was added and placed
3615 vimrc to it (was previous up a level).
3617 - Added two new files to Tools/scripts: pysource.py, which recursively
3618 finds Python source files, and findnocoding.py, which finds Python
3619 source files that need an encoding declaration.
3620 Patch #784089, credits to Oleg Broytmann.
3622 - Bug #1072853: pindent.py used an uninitialized variable.
3624 - Patch #1177597: Correct Complex.__init__.
3626 - Fixed a display glitch in Pynche, which could cause the right arrow to
3627 wiggle over by a pixel.
3631 **(For information about older versions, consult the HISTORY file.)**