5
5
(editors: check NEWS.help for information about editing NEWS using ReST.)
7
What's New in Python 2.6 final
8
==============================
10
*Release date: XX-XXX-2008*
21
- Bug #3887: Package x64 version of CRT for AMD64 Windows binaries.
24
What's New in Python 2.6 release candidate 2?
25
=============================================
27
*Release date: 17-Sep-2008*
35
- Issue #3886: Possible integer overflows in the _hashopenssl module were
41
- Issue #3850: recursion tests in Misc/find_recursion_limit.py can raise
42
AttributeError instead of RuntimeError, depending in which C API call
43
exactly the recursion limit is exceeded. Consequently, both exception types
44
are caught and silenced.
49
- Issue #3617: Include a licensing statement regarding the Microsoft
50
C runtime in the Windows installer.
53
What's New in Python 2.6 release candidate 1?
54
=============================================
56
*Release date: 12-Sep-2008*
61
- Issue #3642: Suppress warning in obmalloc when size_t is larger than uint.
63
- Issue #3743: In a few places, PY_FORMAT_SIZE_T was incorrectly used with
64
PyString_FromFormat or PyErr_Format to display size_t values. The macro
65
PY_FORMAT_SIZE_T is designed to select the correct format for the OS
66
``printf`` function, whereas PyString_FromFormat has an independent
67
implementation and uses "%zd" on all platforms for size_t values.
68
This makes a difference on win64, where ``printf`` needs "%Id" to display
71
- Issue #3634: _weakref.ref(Exception).__init__() gave invalid return value on
74
- Issue #3777: long() applied to a float object now always return a long
75
object; previously an int would be returned for small values. the __long__
76
method is allowed to return either an int or a long, but the behaviour of
77
float objects should not change to respect backward compatibility.
79
- Issue #3751: str.rpartition would perform a left-partition when called with
82
- Issue #3683: Fix compilation when --without-threads is given.
84
- Issue #3668: Fix a memory leak with the "s*" argument parser in
85
PyArg_ParseTuple and friends, which occurred when the argument for "s*"
86
was correctly parsed but parsing of subsequent arguments failed.
88
- Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
89
match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__
90
mechanism. In the process, fix a bug where isinstance() and issubclass(),
91
when given a tuple of classes as second argument, were looking up
92
__instancecheck__ / __subclasscheck__ on the tuple rather than on each
95
- Fix crashes on memory allocation failure found with failmalloc.
97
- Fix memory leaks found with valgrind and update suppressions file.
99
- Fix compiler warnings in opt mode which would lead to invalid memory reads.
101
- Fix problem using wrong name in decimal module reported by pychecker.
103
- Silenced another compiler warning about a used but not defined
104
function 'stringlib_contains_obj'.
106
- Added warnings on the use of ``__getslice__``, ``__setslice__``, or
109
- Issue #3678: Correctly pass LDFLAGS and LDLAST to the linker on shared
110
library targets in the Makefile.
112
- Issue #1204: The configure script now tests for additional libraries
113
that may be required when linking against readline. This fixes issues
114
with x86_64 builds on some platforms (a few Linux flavors and OpenBSD).
119
- Aliased PyObject_Bytes to PyObject_Str.
124
- Issue #3640: Pickling a list or a dict uses less local variables, to reduce
125
stack usage in the case of deeply nested objects.
127
- Issue #3629: Fix sre "bytecode" validator for an end case.
129
- Issue #3811: The Unicode database was updated to 5.1.
131
- Issue #3781: Further warnings.catch_warnings() cleanup to prevent
132
silent misbehaviour when a single instance is nested in multiple
133
with statements, or when the methods are invoked in the wrong order.
135
- Issue #3809: Fixed spurious 'test.blah' file left behind by test_logging.
137
- Issue #3781: Clean up the API for warnings.catch_warnings() by having it
138
return a list or None rather than a custom object.
140
- Issue #1638033: Cookie.Morsel gained the httponly attribute.
142
- Issue #3535: zipfile couldn't read some zip files larger than 2GB.
144
- Issue #3776: Deprecate the bsddb package for removal in 3.0.
146
- Issue #3762: platform.architecture() fails if python is lanched via
149
- Issue #3772: Fixed regression problem in StreamHandler.emit().
151
- Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module
152
to the urlparse one. Added a PendingDeprecationWarning in the old
153
module, it will be deprecated in the future.
155
- Issue #2562: Fix distutils PKG-INFO writing logic to allow having
156
non-ascii characters and Unicode in setup.py meta-data.
158
- Issue #3726: Allow spaces in separators in logging configuration files.
160
- Issue #3719: platform.architecture() fails if there are spaces in the
161
path to the Python binary.
163
- Issue 3602: Moved test.test_support.catch_warning() to
164
warnings.catch_warnings() along with some API cleanup. Expanding the tests
165
for catch_warnings() also led to an improvement in the raising of a
166
DeprecationWarning related to warnings.warn_explicit().
168
- The deprecation warnings for the old camelCase threading API were removed.
170
- logging: fixed lack of use of encoding attribute specified on a stream.
172
- Silenced a trivial compiler warning in the sqlite module.
174
- Fixed two format strings in the _collections module.
176
- Issue #3703: _fileio.FileIO gave unhelpful error message when trying to open a
179
- Issue #3708: os.urandom no longer goes into an infinite loop when passed a
180
non-integer floating point number.
182
- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing
188
- Issue #2975: When compiling several extension modules with Visual Studio 2008
189
from the same python interpreter, some environment variables would grow
192
- Issue #3643: Added a few more checks to _testcapi to prevent segfaults by
193
exploitation of poor argument checking.
195
- sqlite3: Changed docstring of iterdump() to mark method as "Non-standard".
197
- Issue #3103: Reduced globals symbols used by sqlite3 module and made sure all
198
remaining ones have "pysqlite_" prefix.
200
- Issue #3846: Release the GIL during sqlite3_prepare calls. This improves
201
concurrent access to the same SQLite database from multiple
207
- Issue #3781: Add test.test_support.check_warnings() as a convenience
208
wrapper for warnings.catch_warnings() that makes it easier to check
209
that expected warning messages are being reported.
211
- Issue #3796: Some tests functions were not enabled in test_float.
213
- Issue #3768: Move test_py3kwarn over to the new API for catch_warnings().
218
- Issue #3833: Use a different upgrade code for Win64 installers.
220
- Issue #2271: Set SecureCustomProperties so that installation will properly
221
use the TARGETDIR even for unprivileged users.
223
- Allow passing the MSI file name to merge.py.
225
- Issue #3758: Rename the 'check' target to 'patchcheck' so as to not clash
226
with GNU build target guidelines.
229
What's New in Python 2.6 beta 3?
230
================================
232
*Release date: 20-Aug-2008*
237
- Issue #1878: Remove Py_TPFLAGS_HAVE_VERSION_TAG from
238
Py_TPFLAGS_DEFAULT when not building the core. This means 3rd party
239
extensions do not automatically benefit from the class attribute
240
cache; they will have to explicitly add Py_TPFLAGS_HAVE_VERSION_TAG
241
to their tp_flags field if they care. This is a backwards
242
compatibility feature; in 3.0, all types will use the cache by
245
- Keyword arguments can now follow starred arguments. (``f(a, *args,
246
keyword=23)`` is now valid syntax.)
248
- ctypes function pointers that are COM methods have a boolean True
251
- Issue #3139: Make buffer-interface thread-safe wrt. PyArg_ParseTuple,
252
by denying s# to parse objects that have a releasebuffer procedure,
255
- Issue #3537: Fix an assertion failure when an empty but presized dict
256
object was stored in the freelist.
258
- Issue #1481296: Make long(float('nan')) and int(float('nan')) raise
259
ValueError consistently across platforms.
261
- Issue #3479: On platforms where sizeof(int) is smaller than sizeof(long)
262
(64bit Unix, for example), unichr() would truncate its argument and return
263
u'\x00' for unichr(2**32). Now it properly raises an OverflowError.
265
- Apply security patches from Apple.
267
- Issue #2542: Now that issubclass() may call arbitrary code, ensure that
268
PyErr_ExceptionMatches returns 0 when an exception occurs there.
270
- Issue #1819: function calls with several named parameters are now on
271
average 35% faster (as measured by pybench).
273
- Issue #2378: An unexpected UnboundLocalError or NameError could appear when
274
the python debugger steps into a class statement: the free variables (local
275
variables defined in an outer scope) would be deleted from the outer scope.
277
- Issue #2620: Overflow checking when allocating or reallocating memory
278
was not always being done properly in some python types and extension
279
modules. PyMem_MALLOC, PyMem_REALLOC, PyMem_NEW and PyMem_RESIZE have
280
all been updated to perform better checks and places in the code that
281
would previously leak memory on the error path when such an allocation
282
failed have been fixed.
287
- Issue #3612: Added some missing basic types in ctypes.wintypes.
289
- The methods ``is_in_tuple()``, ``is_vararg()``, and ``is_keywordarg()`` of
290
symtable.Symbol have been deprecated for removal in 3.0 and the next release.
292
- Issue #2234: distutils failed for some versions of the cygwin compiler. The
293
version reported by these tools does not necessarily follow the python
294
version numbering scheme, so the module is less strict when parsing it.
296
- Issue #2235: Added Py3k warnings for types which will become unhashable
297
under the stricter __hash__ inheritance rules in 3.0. Several types
298
which did not meet the rules for hash invariants and were already
299
unhashable in 3.0 have now been explicitly flagged as unhashable in
300
2.6 as well (collections.Mapping, collections.Set, unittest.TestSuite,
301
xml.dom.minidom.NamedNodeMap, numbers.Number, UserList.UserList)
303
- Update __all__ for cookielib, csv, os, urllib2, and weakref to include things
304
imported into the module but exposed as part of the module's API.
306
- Remove an unneeded import of abc.ABCMeta from 'inspect'.
308
- Remove unneeded imports of 'sys' and 'warnings' from 'io'.
310
- Remove unneeded imports of 'warnings' from shelve, filecmp, and dummy_thread.
312
- Issue #3575: Incremental decoder's decode function now takes bytearray
313
by using 's*' instead of 't#'.
315
- Issue #2222: Fixed reference leak when occured os.rename()
316
fails unicode conversion on 2nd parameter. (windows only)
318
- Issue 2464. urllib2 now supports a malformation in the URL received
321
- Silence the DeprecationWarning raised when importing mimetools in
322
BaseHTTPServer, cgi (and rfc822), httplib.
324
- Issue #2776: fixed small issue when handling an URL with double slash
325
after a 302 response in the case of not going through a proxy.
327
- Issue #2676: in the email package, content-type parsing was hanging on
328
pathological input because of quadratic or exponential behaviour of a
331
- Issue #3476: binary buffered reading through the new "io" library is now
334
- Silence the DeprecationWarning of rfc822 when it is imported by mimetools
335
since mimetools itself is deprecated. Because modules are cached, all
336
subsequent imports of rfc822 will not raise a visible DeprecationWarning.
338
- Issue #3134: shutil referenced undefined WindowsError symbol.
340
- Issue #1342811: Fix leak in Tkinter.Menu.delete. Commands associated to
341
menu entries were not deleted.
343
- Copied the implementation of reduce() to _functools.reduce() to have a
344
version that did not raise a DeprecationWarning under -3.
346
- Issue #3205: When iterating over a BZ2File fails allocating memory, raise
347
a MemoryError rather than silently stop the iteration.
349
- Issue #3487: sre "bytecode" validator. Passing invalid "re-bytecode"
350
to _sre.compile() will now be rejected. This should not affect anybody
351
since the re.compile() function never generates invalid re-bytecode.
353
- Issue #3436: Make csv.DictReader's fieldnames attribute a property so that
354
upon first access it can be automatically initialized from the csv file if
355
it wasn't initialized during instantiation.
357
- Issue #2338: Create imp.reload() to help with transitioning to Python 3.0 as
358
the reload() built-in has been removed.
360
- Changed code in the following modules/packages to remove warnings raised
361
while running under the ``-3`` flag: aifc, asynchat, asyncore, bdb, bsddb,
362
ConfigParser, cookielib, csv, difflib, distutils, DocXMLRPCServer, email,
363
filecmp, fileinput, inspect, logging, modulefinder, pdb, pickle, profile,
364
pstats, pydoc, re, rlcompleter, SimpleXMLRPCServer, shelve, socket,
365
subprocess, sqlite3, tarfile, Tkinter, test.test_support, textwrap,
366
threading, tokenize, traceback, urlparse, wsgiref, xml, xmlrpclib.
368
- Issue #3039: Fix tarfile.TarFileCompat.writestr() which always
369
raised an AttributeError.
371
- Issue #2523: Fix quadratic behaviour when read()ing a binary file without
372
asking for a specific length. This problem only affected files opened
373
using the new "io" module, not the built-in open() function.
375
- Issue #3449: Update decimal module to use most recent specification
376
(v. 1.68) and tests (v. 2.58) from IBM.
378
- Issue 3437: Bug fix in robotparser parsing of Allow: lines.
380
- Issue 1592: Improve error reporting when operations are attempted
383
- Deprecate the "ast" parser function aliases.
385
- Issue #3120: On 64-bit Windows the subprocess module was truncating handles.
387
- Issue #3303: Fix a crash in locale.strcoll() when calling it with
390
- Issue #3302: Fix several crashes when calling locale's gettext functions
393
- Issue #3389: Allow resolving dotted names for handlers in logging
396
- Deprecate the sunaudio module for removal in Python 3.0.
398
- Issue #3394: zipfile.writestr sets external attributes when passed a
399
file name rather than a ZipInfo instance, so files are extracted with
400
mode 0600 rather than 000 under Unix.
402
- Issue #1857: subprocess.Popen.poll gained an additional _deadstate keyword
403
argument in python 2.5, this broke code that subclassed Popen to include its
404
own poll method. Fixed my moving _deadstate to an _internal_poll method.
409
- Generate the PatternGrammar pickle during "make install".
414
- Issue #2235: the C API function PyObject_HashNotImplemented and its
415
interaction with the tp_hash slot (added in 2.6b2) are now documented
417
- Issue #643841: The language reference now provides more detailed
418
coverage of the lookup process for special methods. The disclaimers
419
regarding lack of coverage of new-style classes have also been
420
removed, since the coverage is now fairly reasonable.
423
What's New in Python 2.6 beta 2?
424
================================
426
*Release date: 17-Jul-2008*
431
- Issue #3156: Fix inconsistent behavior of the bytearray type: all
432
its methods now allow for items objects that can be converted to
433
an integer using operator.index().
435
- Issue #3360: Fix incorrect parsing of '020000000000.0', which
436
produced a ValueError instead of giving the correct float.
438
- Issue #3083: Add alternate (#) formatting for bin, oct, hex output
439
for str.format(). This adds the prefix 0b, 0o, or 0x, respectively.
441
- Issue #3008: the float type has a new instance method 'float.hex'
442
and a new class method 'float.fromhex' to convert floating-point
443
numbers to and from hexadecimal strings, respectively.
445
- Issue #2235: __hash__ is once again inherited by default. To allow
446
collections.Hashable to remain meaningful in the presence of the
447
default hash implementation (object.__hash__), it is now possible
448
to explicit block inheritance of hash by setting __hash__=None at
449
the Python level, or tp_hash=PyObject_HashNotImplemented at the C
452
- Issue #3221: Issue a RuntimeWarning instead of raising SystemError if
453
the parent module cannot be found while performing an absolute import.
454
This means that an incorrectly defined __package__ attribute will
455
now only prevent relative imports in that module rather than causing
456
all imports from that module to fail.
458
- Issue #2517: Allow unicode messages in Exceptions again by correctly
459
bypassing the instance dictionary when looking up __unicode__ on
462
- Issue #3242: Fix a crash inside the print statement, if sys.stdout is
463
set to a custom object whose write() method happens to install
464
another file in sys.stdout.
466
- Issue #3088: Corrected a race condition in classes derived from
467
threading.local: the first member set by a thread could be saved in
468
another thread's dictionary.
470
- Issue #3004: Minor change to slice.indices(): the start and stop
471
arguments are now treated identically, making the behaviour easier
472
to describe and understand. For example, slice(None, -10,
473
1).indices(9) now returns (0, 0, 1) instead of (0, -1, 1), and
474
slice(None, 10, -1).indices(10) returns (9, 9, -1) instead of (9,
477
- Issue #3219: Calling a function with repeated keyword arguments,
478
f(a=2, a=23), would not cause a syntax error. This was a regression
479
from 2.4 caused by the switch to the new compiler.
481
- Issue #2862: Make int and float freelist management consistent with
482
other freelists. Changes their CompactFreeList apis into
483
ClearFreeList apis and calls them via gc.collect().
488
- Issue #3554: ctypes.string_at and ctypes.wstring_at did call Python
489
api functions without holding the GIL, which could lead to a fatal
490
error when they failed.
492
- Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap Tcl command objects.
494
- Issue #3395: fix reference in test_multiprocessing to old debugInfo method
496
- Issue #3312: Fix two crashes in sqlite3.
498
- Issue #1608818: Fix misbehavior in os.listdir() if readdir() fails.
500
- Issue #3125: Remove copy_reg in multiprocessing and replace it with
501
ForkingPickler.register() to resolve conflict with ctypes.
503
- Issue #3090: Fixed ARCHFLAGS parsing on OS/X
505
- Issue #3313: Fixed a crash when a failed dlopen() call does not set
506
a valid dlerror() message.
508
- Issue #3258: Fixed a crash when a ctypes POINTER type to an
509
incomplete structure was created.
511
- Issue #3339: dummy_thread.acquire() should not return None.
513
- Issue #3285: Fractions from_float() and from_decimal() accept Integral arguments.
515
- Issue #3301: Bisect module behaved badly when lo was negative.
517
- Issue #839496: SimpleHTTPServer used to open text files in text mode. This is
518
both unnecessary (HTTP allows text content to be sent in several forms) and
519
wrong because the actual transmitted size could differ from the
520
content-length. The problem had been corrected in the 2.4 branch, but never
523
- Issue #2663: add filtering capability to shutil.copytree().
525
- Issue #1622: Correct interpretation of various ZIP header fields.
527
- Issue #1526: Allow more than 64k files to be added to Zip64 file.
529
- Issue #1746: Correct handling of zipfile archive comments (previously
530
archives with comments over 4k were flagged as invalid). Allow writing
531
Zip files with archives by setting the 'comment' attribute of a ZipFile.
533
- Issue #449227: The rlcompleter module now adds "(" to callable objects
536
- Issue #3190: Pydoc now hides the automatic module attribute __package__ (the
537
handling is now the same as that of other special attributes like __name__).
539
- Issue #2885 (partial): The urllib.urlopen() function has been deprecated for
540
removal in Python 3.0 in favor of urllib2.urlopen().
542
- Issue #2113: Fix error in subprocess.Popen if the select system call is
543
interrupted by a signal.
545
- Issue #3309: Fix bz2.BZFile iterator to release its internal lock
546
properly when raising an exception due to the bz2file being closed.
549
- Issue #3094: httplib.HTTPSConnection Host: headers no longer include the
550
redundant ":443" port number designation when the connection is using the
551
default https port (443).
553
- Issue #874900: after an os.fork() call the threading module state is cleaned
554
up in the child process to prevent deadlock and report proper thread counts
555
if the new process uses the threading module.
560
- test.test_support.catch_warning now keeps track of all warnings it sees
561
and is now better documented. Explicit unit tests for this context manager
562
have been added to test_warnings.
567
- Issue #3215: Build sqlite3 as sqlite3.dll, not sqlite3.pyd.
573
- Document that robotparser has been renamed to urllib.robotparser in
576
- Document that urlparse has been renamed to urllib.parse in Python 3.0.
578
- Document that urllib2 is split across multiple modules and renamed in
581
- Document that urllib is split across multiple modules and renamed in
7
585
What's New in Python 2.6 beta 1?
8
586
================================
10
*Release date: XX-June-2008*
588
*Release date: 18-June-2008*
15
- The set methods, update() and union() now accept multiple arguments.
593
- Issue #3211: warnings.warn_explicit() did not guard against its 'registry'
594
argument being anything other than a dict or None. Also fixed a bug in error
595
handling when 'message' and 'category' were both set to None, triggering a
598
- Issue #3100: Corrected a crash on deallocation of a subclassed weakref which
599
holds the last (strong) reference to its referent.
601
- Add future_builtins.ascii().
603
- Several set methods now accept multiple arguments: update(), union(),
604
intersection(), intersection_update(), difference(), and difference_update().
17
606
- Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.