blob: 4341444a29fd017115071f3b9370cde01a24f148 [file] [log] [blame]
Skip Montanaroe5d7f7f2002-09-20 14:16:59 +00001+++++++++++
2Python News
3+++++++++++
4
Anthony Baxterb0c66302004-11-04 05:23:17 +00005(editors: check NEWS.help for information about editing NEWS using ReST.)
6
Christian Heimesbc873412007-12-08 22:11:32 +00007What's New in Python 3.0a3?
8===========================
9
Georg Brandl52d168a2008-01-07 18:10:24 +000010*Release date: XX-XXX-2008*
Christian Heimesbc873412007-12-08 22:11:32 +000011
12Core and Builtins
13-----------------
14
Christian Heimesa156e092008-02-16 07:38:31 +000015<<<<<<< .working
16=======
17- Issue #2115: Important speedup in setting __slot__ attributes. Also
18 prevent a possible crash: an Abstract Base Class would try to access a slot
19 on a registered virtual subclass.
20
21- Fixed repr() and str() of complex numbers with infinity or nan as real or
22 imaginary part.
23
24- Clear all free list during a gc.collect() of the highest generation in order
25 to allow pymalloc to free more arenas. Python may give back memory to the
26 OS earlier.
27
28- Issue #2045: Fix an infinite recursion triggered when printing a subclass of
29 collections.defaultdict, if its default_factory is set to a bound method.
30
31- Fixed a minor memory leak in dictobject.c. The content of the free
32 list was not freed on interpreter shutdown.
33
34- Limit free list of method and builtin function objects to 256 entries
35 each.
36
37- Patch #1953: Added ``sys._compact_freelists()`` and the C API functions
38 ``PyInt_CompactFreeList`` and ``PyFloat_CompactFreeList``
39 to compact the internal free lists of pre-allocted ints and floats.
40
41- Bug #1983: Fixed return type of fork(), fork1() and forkpty() calls.
42 Python expected the return type int but the fork familie returns pi_t.
43
44- Issue #1678380: Fix a bug that identifies 0j and -0j when they appear
45 in the same code unit.
46
47>>>>>>> .merge-right.r60845
Raymond Hettinger65baa342008-02-07 00:41:02 +000048- Issue #2025 : Add tuple.count() and tuple.index() methods to comply with
49 the collections.Sequence API.
50
Christian Heimesdfc12ed2008-01-31 15:16:38 +000051- Fixed multiple reinitialization of the Python interpreter. The small int
52 list in longobject.c has caused a seg fault during the third finalization.
53
Christian Heimesc04dac02008-01-30 11:27:57 +000054- Issue #1973: bytes.fromhex('') raises SystemError
55
Raymond Hettinger70b64fc2008-01-30 20:15:17 +000056- Issue #1771: remove cmp parameter from sorted() and list.sort()
57
Christian Heimes7b876152008-01-30 09:51:48 +000058- Issue #1969: split and rsplit in bytearray are inconsistent
59
Raymond Hettinger1dfde1d2008-01-22 23:25:35 +000060- map() and itertools.imap() no longer accept None for the first argument.
61 Use zip() instead.
62
Facundo Batista2336bdd2008-01-19 19:12:01 +000063- Issue #1769: Now int("- 1") is not allowed any more.
64
Christian Heimes386cd1e2008-01-15 02:01:20 +000065- Object/longobject.c: long(float('nan')) raises an OverflowError instead
66 of returning 0.
67
Christian Heimes3b06e532008-01-07 20:12:44 +000068- Issue #1762972: __file__ points to the source file instead of the pyc/pyo
69 file if the py file exists.
70
Guido van Rossumab078dd2008-01-06 00:09:11 +000071- Issue #1393: object_richcompare() returns NotImplemented instead of
72 False if the objects aren't equal, to give the other side a chance.
73
Guido van Rossume239b002008-01-06 00:44:20 +000074- Issue #1692: Interpreter was not displaying location of SyntaxError.
Kurt B. Kaiser43b15092008-01-05 04:32:22 +000075
Amaury Forgeot d'Arcbccd63c2008-01-04 01:21:27 +000076- Improve some exception messages when Windows fails to load an extension
77 module. Now we get for example '%1 is not a valid Win32 application' instead
78 of 'error code 193'. Also use Unicode strings to deal with non-English
79 locales.
80
Christian Heimesa3534a62007-12-11 19:56:40 +000081- Issue #1587: Added instancemethod wrapper for PyCFunctions. The Python C API
82 has gained a new type *PyInstanceMethod_Type* and the functions
83 *PyInstanceMethod_Check(o)*, *PyInstanceMethod_New(func)* and
84 *PyInstanceMethod_Function(im)*.
85
Amaury Forgeot d'Arcad8dcd52007-12-10 23:58:35 +000086- Constants gc.DEBUG_OBJECT and gc.DEBUG_INSTANCE have been removed from the
87 gc module; gc.DEBUG_COLLECTABLE or gc.DEBUG_UNCOLLECTABLE are now enough to
88 print the corresponding list of objects considered by the garbage collector.
89
Christian Heimes827b35c2007-12-10 22:19:17 +000090- Issue #1580: New free format floating point representation based on
91 "Floating-Point Printer Sample Code", by Robert G. Burger. For example
92 repr(11./5) now returns '2.2' instead of '2.2000000000000002'.
93
Guido van Rossume239b002008-01-06 00:44:20 +000094- Issue #1573: Improper use of the keyword-only syntax makes the parser crash.
Christian Heimesbc873412007-12-08 22:11:32 +000095
Christian Heimes0ded5b52007-12-10 15:50:56 +000096- Issue #1564: The set implementation should special-case PyUnicode instead
Guido van Rossume239b002008-01-06 00:44:20 +000097 of PyString.
Christian Heimes0ded5b52007-12-10 15:50:56 +000098
Christian Heimesbc873412007-12-08 22:11:32 +000099
Christian Heimes7131fd92008-02-19 14:21:46 +0000100<<<<<<< .working
101=======
102- Issue #1402: Fix a crash on exit, when another thread is still running, and
103 if the deallocation of its frames somehow calls the PyGILState_Ensure() /
104 PyGILState_Release() functions.
105
106- Expose the Py_Py3kWarningFlag as sys.py3kwarning.
107
108- Issue #1445: Fix a SystemError when accessing the ``cell_contents``
109 attribute of an empty cell object.
110
111- Issue #1460: The utf-7 incremental decoder did not accept truncated input.
112 It now correctly saves its state between chunks of data.
113
114- Patch #1739468: Directories and zipfiles containing a __main__.py file can
115 now be directly executed by passing their name to the interpreter. The
116 directory/zipfile is automatically inserted as the first entry in sys.path.
117
118- Issue #1265: Fix a problem with sys.settrace, if the tracing function uses a
119 generator expression when at the same time the executed code is closing a
120 paused generator.
121
122- sets and frozensets now have an isdisjoint() method.
123
124- optimize the performance of builtin.sum().
125
126- Fix warnings found by the new version of the Coverity checker.
127
128- The enumerate() builtin function is no longer bounded to sequences smaller
129 than LONG_MAX. Formerly, it raised an OverflowError. Now, automatically
130 shifts from ints to longs.
131
132- Issue #1686386: Tuple's tp_repr did not take into account the possibility of
133 having a self-referential tuple, which is possible from C code. Nor did
134 object's tp_str consider that a type's tp_str could do something that could
135 lead to an inifinite recursion. Py_ReprEnter() and Py_EnterRecursiveCall(),
136 respectively, fixed the issues.
137
138- Issue #1164: It was possible to trigger deadlock when using the 'print'
139 statement to write to a file since the GIL was not released as needed. Now
140 PyObject_Print() does the right thing along with various tp_print
141 implementations of the built-in types and those in the collections module.
142
143- Issue #1147: Exceptions were directly allowing string exceptions in their
144 throw() method even though string exceptions no longer allowed.
145
146- Issue #1096: Prevent a segfault from getting the repr of a very deeply nested
147 list by using the recursion counter.
148
149- Issue #1202533: Fix infinite recursion calls triggered by calls to
150 PyObject_Call() never calling back out to Python code to trigger recursion
151 depth updates/checks. Required the creation of a static RuntimeError
152 instance in case normalizing an exception put the recursion check value past
153 its limit. Fixes crashers infinite_rec_(1|2|4|5).py.
154
155- Patch #1031213: Decode source line in SyntaxErrors back to its original source
156 encoding.
157
158- Patch #1673759: add a missing overflow check when formatting floats
159 with %G.
160
161- Prevent expandtabs() on string and unicode objects from causing a segfault
162 when a large width is passed on 32-bit platforms.
163
164- Bug #1733488: Fix compilation of bufferobject.c on AIX.
165
166- Bug #1722485: remove docstrings again when running with -OO.
167
168- Add new attribute names for function objects. All the func_* become
169 __*__ attributes. (Some already existed, e.g., __doc__ and __name__.)
170
171- Add -3 option to the interpreter to warn about features that are
172 deprecated and will be changed/removed in Python 3.0.
173
174- Patch #1686487: you can now pass any mapping after '**' in function
175 calls.
176
177- except clauses may now be spelled either "except E, target:" or
178 "except E as target:". This is to provide forwards compatibility with
179 Python 3.0.
180
181- Deprecate BaseException.message as per PEP 352.
182
183- Bug #1303614: don't expose object's __dict__ when the dict is
184 inherited from a builtin base.
185
186- When __slots__ are set to a unicode string, make it work the same as
187 setting a plain string, ie don't expand to single letter identifiers.
188
189- Request #1191699: Slices can now be pickled.
190
191- Request #1193128: str.translate() now allows a None argument for
192 translations that only remove characters without re-mapping the
193 remaining characters.
194
195- Patch #1682205: a TypeError while unpacking an iterable is no longer
196 masked by a generic one with the message "unpack non-sequence".
197
198- Remove unused file Python/fmod.c.
199
200- Bug #1683368: The object.__init__() and object.__new__() methods are
201 now stricter in rejecting excess arguments. The only time when
202 either allows excess arguments is when it is not overridden and the
203 other one is. For backwards compatibility, when both are
204 overridden, it is a deprecation warning (for now; maybe a Py3k
205 warning later). Also, type.__init__() insists on the same signature
206 as supported by type.__new__().
207
208- Patch #1675423: PyComplex_AsCComplex() now tries to convert an object
209 to complex using its __complex__() method before falling back to the
210 __float__() method. Therefore, the functions in the cmath module now
211 can operate on objects that define a __complex__() method.
212
213- Patch #1623563: allow __class__ assignment for classes with __slots__.
214 The old and the new class are still required to have the same slot names.
215
216- Patch #1642547: Fix an error/crash when encountering syntax errors in
217 complex if statements.
218
219- Patch #1462488: Python no longer segfaults when ``object.__reduce_ex__()``
220 is called with an object that is faking its type.
221
222- Patch #1680015: Don't modify __slots__ tuple if it contains an unicode
223 name.
224
225- Patch #1444529: the builtin compile() now accepts keyword arguments.
226
227- Bug #1678647: write a newline after printing an exception in any
228 case, even when converting the value to a string failed.
229
230- The dir() function has been extended to call the __dir__() method on
231 its argument, if it exists. If not, it will work like before. This allows
232 customizing the output of dir() in the presence of a __getattr__().
233
234- Patch #922167: Python no longer segfaults when faced with infinitely
235 self-recursive reload() calls (as reported by bug #742342).
236
237- Patch #1675981: remove unreachable code from ``type.__new__()`` method.
238
239- Patch #1491866: change the complex() constructor to allow parthensized
240 forms. This means complex(repr(x)) now works instead of raising a
241 ValueError.
242
243- Patch #703779: unset __file__ in __main__ after running a file. This
244 makes the filenames the warning module prints much more sensible when
245 a PYTHONSTARTUP file is used.
246
247- Variant of patch #697613: don't exit the interpreter on a SystemExit
248 exception if the -i command line option or PYTHONINSPECT environment
249 variable is given, but break into the interactive interpreter just like
250 on other exceptions or normal program exit.
251
252- Patch #1638879: don't accept strings with embedded NUL bytes in long().
253
254- Bug #1674503: close the file opened by execfile() in an error condition.
255
256- Patch #1674228: when assigning a slice (old-style), check for the
257 sq_ass_slice instead of the sq_slice slot.
258
259- When printing an unraisable error, don't print exceptions. before the name.
260 This duplicates the behavior whening normally printing exceptions.
261
262- Bug #1653736: Properly discard third argument to slot_nb_inplace_power.
263
264- PEP 352: Raising a string exception now triggers a TypeError. Attempting to
265 catch a string exception raises DeprecationWarning.
266
267- Bug #1377858: Fix the segfaulting of the interpreter when an object created
268 a weakref on itself during a __del__ call for new-style classes (classic
269 classes still have the bug).
270
271- Bug #1579370: Make PyTraceBack_Here use the current thread, not the
272 frame's thread state.
273
274- patch #1630975: Fix crash when replacing sys.stdout in sitecustomize.py
275
276- Prevent seg fault on shutdown which could occur if an object
277 raised a warning.
278
279- Bug #1566280: Explicitly invoke threading._shutdown from Py_Main,
280 to avoid relying on atexit.
281
282- Bug #1590891: random.randrange don't return correct value for big number
283
284- Patch #1586791: Better exception messages for some operations on strings,
285 tuples and lists.
286
287- Bug #1067760: Deprecate passing floats to file.seek.
288
289- Bug #1591996: Correctly forward exception in instance_contains().
290
291- Bug #1588287: fix invalid assertion for `1,2` in debug builds.
292
293- Bug #1576657: when setting a KeyError for a tuple key, make sure that
294 the tuple isn't used as the "exception arguments tuple".
295
296- Bug #1565514, SystemError not raised on too many nested blocks.
297
298- Bug #1576174: WindowsError now displays the windows error code
299 again, no longer the posix error code.
300
301- Patch #1549049: Support long values in structmember, issue warnings
302 if the assigned value for structmember fields gets truncated.
303
304- Update the peephole optimizer to remove more dead code (jumps after returns)
305 and inline unconditional jumps to returns.
306
307- Bug #1545497: when given an explicit base, int() did ignore NULs
308 embedded in the string to convert.
309
310- Bug #1569998: break inside a try statement (outside a loop) is now
311 recognized and rejected.
312
313- list.pop(x) accepts any object x following the __index__ protocol.
314
315- A number of places, including integer negation and absolute value,
316 were fixed to not rely on undefined behaviour of the C compiler
317 anymore.
318
319- Bug #1566800: make sure that EnvironmentError can be called with any
320 number of arguments, as was the case in Python 2.4.
321
322- Patch #1567691: super() and new.instancemethod() now don't accept
323 keyword arguments any more (previously they accepted them, but didn't
324 use them).
325
326- Fix a bug in the parser's future statement handling that led to "with"
327 not being recognized as a keyword after, e.g., this statement:
328 from __future__ import division, with_statement
329
330- Bug #1557232: fix seg fault with def f((((x)))) and def f(((x),)).
331
332- Fix %zd string formatting on Mac OS X so it prints negative numbers.
333
334- Allow exception instances to be directly sliced again.
335
336- Bug #1551432: Exceptions do not define an explicit __unicode__ method. This
337 allows calling unicode() on exceptions classes directly to succeed.
338
339- Bug #1542051: Exceptions now correctly call PyObject_GC_UnTrack.
340 Also make sure that every exception class has __module__ set to
341 'exceptions'.
342
343- Bug #1550983: emit better error messages for erroneous relative
344 imports (if not in package and if beyond toplevel package).
345
346- Overflow checking code in integer division ran afoul of new gcc
347 optimizations. Changed to be more standard-conforming.
348
349- Patch #1542451: disallow continue anywhere under a finally.
350
351- Patch #1546288: fix seg fault in dict_equal due to ref counting bug.
352
353- The return tuple from str.rpartition(sep) is (tail, sep, head) where
354 head is the original string if sep was not found.
355
356- Bug #1520864: unpacking singleton tuples in list comprehensions and
357 generator expressions (x for x, in ... ) works again. Fixing this problem
358 required changing the .pyc magic number. This means that .pyc files
359 generated before 2.5c2 will be regenerated.
360
361- ``with`` and ``as`` are now keywords.
362
363- Bug #1664966: Fix crash in exec if Unicode filename can't be decoded.
364
365- Issue #1537: Changed GeneratorExit's base class from Exception to
366 BaseException.
367
368- Fix Issue #1703448: A joined thread could show up in the
369 threading.enumerate() list after the join() for a brief period until
370 it actually exited.
371
372
373Library
374-------
375
376- Issue #1916. Added isgenerator() and isgeneratorfunction() to inspect.py.
377
378- #1224: Fixed bad url parsing when path begins with double slash.
379
380- ctypes instances that are not or do not contain pointers can now be
381 pickled.
382
383- Patch #1966: Break infinite loop in httplib when the servers
384 implements the chunked encoding incorrectly.
385
386- Rename rational.py to fractions.py and the rational.Rational class
387 to fractions.Fraction, to avoid the name clash with the abstract
388 base class numbers.Rational. See discussion in issue #1682.
389
390- The pickletools module now provides an optimize() function
391 that eliminates unused PUT opcodes from a pickle string.
392
393- #2021: Allow tempfile.NamedTemporaryFile and SpooledTemporaryFile
394 to be used in with statements by correctly supporting the context
395 management protocol.
396
397- #1979: Add rich comparisons to Decimal, and make Decimal comparisons
398 involving a NaN follow the IEEE 754 standard.
399
400- #2004: tarfile.py: Use mode 0700 for temporary directories and default
401 permissions for missing directories.
402
403- #175006: The debugger used to skip the condition of a "while" statement
404 after the first iteration. Now it correctly steps on the expression, and
405 breakpoints on the "while" statement are honored on each loop.
406
407- #1765140: add an optional delay argument to FileHandler and its
408 subclasses. Defaults to false (existing behaviour), but if true,
409 defers opening the file until the first call to emit().
410
411- The pprint module now supports sets and frozensets.
412
413- #1221598: add optional callbacks to ftplib.FTP's storbinary() and
414 storlines() methods. (Contributed by Phil Schwartz)
415
416- #1715: include sub-extension modules in pydoc's text output.
417
418- #1836: fix an off-by-one bug in TimedRotatingHandler's rollover
419 time calculation.
420
421- #1021: fix a bug to allow basicConfig to accept NOTSET as a level.
422
423- #932563: add LoggerAdapter convenience class to make it easier to add
424 contextual information in logging output.
425
426- #1760556: fix a bug to avoid FileHandler throwing an exception in
427 flush().
428
429- Bug #1530959: distutils' build command now uses different build directory
430 when building extension modules against versions of Python compiled
431 with ``--with-pydebug``.
432
433- #1555501: move plistlib from plat-mac directory to general library.
434
435- #1269: fix a bug in pstats.add_callers() and add a unit test file for
436 pstats.
437
438- #1669: don't allow shutil.rmtree() to be called on a symlink to a
439 directory.
440
441- #1664522: in urllib, don't read non-existing directories in ftp mode,
442 returning a 0-byte file -- raise an IOError instead.
443
444- #856047: respect the ``no_proxy`` environment variable when using the
445 ``http_proxy`` etc. environment variables in urllib.
446
447- #1178141: add a getcode() method to the addinfourls that urllib.open()
448 returns so that you can retrieve the HTTP status code.
449
450- Issue #1003: Fix zipfile decryption check, it would fail zip files
451 with extended local headers.
452
453- #1189216: Fix the zipfile module to work on archives with headers
454 past the 2**31 byte boundary.
455
456- #1336: fix a race condition in subprocess.Popen if the garbage
457 collector kicked in at the wrong time that would cause the process
458 to hang when the child wrote to stderr.
459
460- #1146: fix how textwrap breaks a long word that would start in the
461 last column of a line.
462
463- #1693149: trace.py --ignore-module - accept multiple comma-separated
464 modules to be given.
465
466- #1822: MIMEMultipart.is_multipart() behaves correctly for a just-created
467 (and empty) instance. Thanks Jonathan Share.
468
469- #1861: Added an attribute to the sched module which returns an ordered
470 list of upcoming events (displayed as named tuples).
471
472- #1837: The queue module now also supports a LIFO queue and a priority queue.
473
474- Patch #1048820: Add insert-mode editing to curses.textpad.Textbox
475 (patch by Stefan Wehr). Also, fix an off-by-one bug in
476 Textbox.gather().
477
478- Issue #1831: ctypes now raises a TypeError if conflicting positional
479 and named arguments are passed to a Structure or Union initializer.
480 When too many positional arguments are passed, also a TypeError is
481 raised instead of a ValueError.
482
483- Convert the internal ctypes array type cache to a WeakValueDict so
484 that array types do not live longer than needed.
485
486- Issue #1786: pdb should use its own stdin/stdout around an exec call
487 and when creating a recursive instance.
488
489- Issue #1698398 Zipfile.printdir() crashed because the format string
490 expected a tuple type of length six instead of time.struct_time object.
491
492- Issue #1780: The Decimal constructor now accepts arbitrary leading
493 and trailing whitespace when constructing from a string.
494 Context.create_decimal no longer accepts trailing newlines.
495
496- Decimal.as_tuple(), difflib.find_longest_match() and inspect functions
497 that returned a tuple now return a named tuple.
498
499- Doctest now returns results as a named tuple for readability:
500 (0, 7) --> TestResults(failed=0, attempted=7)
501
502- Issue #846388. re.match is interruptible now, which is particularly
503 good for long regular expression matches.
504
505- pyexpat, patch #1137: allow setting buffer_size attribute
506 on Parser objects to set the character data buffer size.
507
508- Issue #1757: The hash of a Decimal instance is no longer affected by
509 the current context.
510
511- Patch #467924: add ZipFile.extract() and ZipFile.extractall() in the
512 zipfile module.
513
514- Issue #1646: Make socket support the TIPC protocol.
515
516- Bug #1742: return os.curdir from os.path.relpath() if both arguments are
517 equal instead of raising an exception.
518
519- Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'.
520
521- Patch #1698: allow '@' in username parsed by urlparse.py.
522
523- Issue #1735: TarFile.extractall() now correctly sets directory permissions
524 and times.
525
526- Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a mountpoint.
527
528- Bug #1687: Fxed plistlib.py restricts <integer> to Python int when writing
529
530- Issue #1700: Regular expression inline flags incorrectly handle certain
531 unicode characters.
532
533- Issue #1689: PEP 3141, numeric abstract base classes.
534
535- Tk issue #1851526: Return results from Python callbacks to Tcl as
536 Tcl objects.
537
538- Issue #1642: Fix segfault in ctypes when trying to delete attributes.
539
540- Issue #1727780: Support loading pickles of random.Random objects created
541 on 32-bit systems on 64-bit systems, and vice versa. As a consequence
542 of the change, Random pickles created by Python 2.6 cannot be loaded
543 in Python 2.5.
544
545- Issue #1455: The distutils package now supports VS 2005 and VS 2008 for
546 both the msvccompiler and cygwincompiler.
547
548- Issue #1531: tarfile.py: Read fileobj from the current offset, do not
549 seek to the start.
550
551- Issue #1534: Added a dictionary sys.float_info with information about the
552 internal floating point type to the sys module.
553
554- Issue 1429818: patch for trace and doctest modules so they play nicely
555 together.
556
557- doctest made a bad assumption that a package's __loader__.get_data()
558 method used universal newlines.
559
560- Issue #1705170: contextlib.contextmanager was still swallowing
561 StopIteration in some cases. This should no longer happen.
562
563- Issue #1292: On alpha, arm, ppc, and s390 linux systems the
564 --with-system-ffi configure option defaults to "yes".
565
566- IN module for FreeBSD 8 is added and preexisting FreeBSD 6 and 7
567 files are updated.
568
569- Issues #1181, #1287: unsetenv() is now called when the os.environ.pop()
570 and os.environ.clear() methods are used.
571
572- ctypes will now work correctly on 32-bit systems when Python is
573 configured with --with-system-ffi.
574
575- Patch #1203: ctypes now does work on OS X when Python is built with
576 --disable-toolbox-glue.
577
578- collections.deque() now supports a "maxlen" argument.
579
580- itertools.count() is no longer bounded to LONG_MAX. Formerly, it raised
581 an OverflowError. Now, automatically shifts from ints to longs.
582
583- Patch #1541463: optimize performance of cgi.FieldStorage operations.
584
585- Decimal is fully updated to the latest Decimal Specification (v1.66).
586
587- Bug #1153: repr.repr() now doesn't require set and dictionary items
588 to be orderable to properly represent them.
589
590- A 'c_longdouble' type was added to the ctypes module.
591
592- Bug #1709599: Run test_1565150 only if the file system is NTFS.
593
594- When encountering a password-protected robots.txt file the RobotFileParser
595 no longer prompts interactively for a username and password (bug 813986).
596
597- TarFile.__init__() no longer fails if no name argument is passed and
598 the fileobj argument has no usable name attribute (e.g. StringIO).
599
600- The functools module now provides 'reduce', for forward compatibility
601 with Python 3000.
602
603- Server-side SSL support and cert verification added, by Bill Janssen.
604
605- socket.ssl deprecated; use new ssl module instead.
606
607- uuid creation is now threadsafe.
608
609- EUC-KR codec now handles the cheot-ga-keut composed make-up hangul
610 syllables.
611
612- GB18030 codec now can encode additional two-byte characters that
613 are missing in GBK.
614
615- Add new codecs for UTF-32, UTF-32-LE and UTF-32-BE.
616
617- Bug #1704793: Return UTF-16 pair if unicodedata.lookup cannot
618 represent the result in a single character.
619
620- Bug #978833: Close https sockets by releasing the _ssl object.
621
622- Change location of the package index to pypi.python.org/pypi
623
624- Bug #1701409: Fix a segfault in printing ctypes.c_char_p and
625 ctypes.c_wchar_p when they point to an invalid location. As a
626 sideeffect the representation of these instances has changed.
627
628- tarfile.py: Added "exclude" keyword argument to TarFile.add().
629
630- Bug #1734723: Fix repr.Repr() so it doesn't ignore the maxtuple attribute.
631
632- The urlopen function of urllib2 now has an optional timeout parameter (note
633 that it actually works with HTTP, HTTPS, FTP and FTPS connections).
634
635- In ftplib, the FTP.ntransfercmd method, when in passive mode, now uses
636 the socket.create_connection function, using the timeout specified at
637 connection time.
638
639- Bug #1728403: Fix a bug that CJKCodecs StreamReader hangs when it
640 reads a file that ends with incomplete sequence and sizehint argument
641 for .read() is specified.
642
643- Bug #1730389: Change time.strptime() to use ``\s+`` instead of ``\s*`` when
644 matching spaces in the specified format argument.
645
646- SF 1668596/1720897: distutils now copies data files
647 even if package_dir is empty.
648
649- sha now raises a DeprecationWarning upon import.
650
651- md5 now raises a DeprecationWarning upon import.
652
653- Issue1385: The hmac module now computes the correct hmac when using hashes
654 with a block size other than 64 bytes (such as sha384 and sha512).
655
656- mimify now raises a DeprecationWarning upon import.
657
658- MimeWriter now raises a DeprecationWarning upon import.
659
660- tarfile.py: Improved unicode support. Unicode input names are now
661 officially supported. Added "errors" argument to the TarFile class.
662
663- urllib.ftpwrapper class now accepts an optional timeout.
664
665- shlex.split() now has an optional "posix" parameter.
666
667- The posixfile module now raises a DeprecationWarning.
668
669- Remove the gopherlib module. This also leads to the removal of gopher
670 support in urllib/urllib2.
671
672- Fix bug in marshal where bad data would cause a segfault due to
673 lack of an infinite recursion check.
674
675- Removed plat-freebsd2 and plat-freebsd3 directories (and IN.py in
676 the directories).
677
678- HTML-escape the plain traceback in cgitb's HTML output, to prevent
679 the traceback inadvertently or maliciously closing the comment and
680 injecting HTML into the error page.
681
682- The popen2 module and os.popen* are deprecated. Use the subprocess module.
683
684- Added an optional credentials argument to SMTPHandler, for use with SMTP
685 servers which require authentication.
686
687- Patch #1695948: Added optional timeout parameter to SocketHandler.
688
689- Bug #1652788: Minor fix for currentframe.
690
691- Patch #1598415: Added WatchedFileHandler to better support external
692 log file rotation using e.g. newsyslog or logrotate. This handler is
693 only useful in Unix/Linux environments.
694
695- Bug #1706381: Specifying the SWIG option "-c++" in the setup.py file
696 (as opposed to the command line) will now write file names ending in
697 ".cpp" too.
698
699- As specified in RFC 2616, an HTTP response like 2xx indicates that
700 the client's request was successfully received, understood, and accepted.
701 Now in these cases no error is raised in urllib (issue #1177) and urllib2.
702
703- Bug #1290505: time.strptime's internal cache of locale information is now
704 properly recreated when the locale is changed.
705
706- Patch #1685563: remove (don't add) duplicate paths in distutils.MSVCCompiler.
707
708- Added a timeout parameter to the constructor of other protocols
709 (telnetlib, ftplib, smtplib and poplib). This is second part of the
710 work started with create_connection() and timeout in httplib, and
711 closes patch #723312.
712
713- Patch #1676823: Added create_connection() to socket.py, which may be
714 called with a timeout, and use it from httplib (whose HTTPConnection
715 and HTTPSConnection now accept an optional timeout).
716
717- Bug #978833: Revert r50844, as it broke _socketobject.dup.
718
719- Bug #1675967: re patterns pickled with Python 2.4 and earlier can
720 now be unpickled with Python 2.5 and newer.
721
722- Patch #1630118: add a SpooledTemporaryFile class to tempfile.py.
723
724- Patch #1273829: os.walk() now has a "followlinks" parameter. If set to
725 True (which is not the default), it visits symlinks pointing to
726 directories.
727
728- Bug #1681228: the webbrowser module now correctly uses the default
729 GNOME or KDE browser, depending on whether there is a session of one
730 of those present. Also, it tries the Windows default browser before
731 trying Mozilla variants.
732
733- Patch #1339796: add a relpath() function to os.path.
734
735- Patch #1681153: the wave module now closes a file object it opened if
736 initialization failed.
737
738- Bug #767111: fix long-standing bug in urllib which caused an
739 AttributeError instead of an IOError when the server's response didn't
740 contain a valid HTTP status line.
741
742- Patch #957650: "%var%" environment variable references are now properly
743 expanded in ntpath.expandvars(), also "~user" home directory references
744 are recognized and handled on Windows.
745
746- Patch #1429539: pdb now correctly initializes the __main__ module for
747 the debugged script, which means that imports from __main__ work
748 correctly now.
749
750- The nonobvious commands.getstatus() function is now deprecated.
751
752- Patch #1393667: pdb now has a "run" command which restarts the debugged
753 Python program, optionally with different arguments.
754
755- Patch #1649190: Adding support for _Bool to ctypes as c_bool.
756
757- Patch #1530482: add pydoc.render_doc() which returns the documentation
758 for a thing instead of paging it to stdout, which pydoc.doc() does.
759
760- Patch #1533909: the timeit module now accepts callables in addition to
761 strings for the code to time and the setup code. Also added two
762 convenience functions for instantiating a Timer and calling its methods.
763
764- Patch #1537850: tempfile.NamedTemporaryFile now has a "delete" parameter
765 which can be set to False to prevent the default delete-on-close
766 behavior.
767
768- Patch #1581073: add a flag to textwrap that prevents the dropping of
769 whitespace while wrapping.
770
771- Patch #1603688: ConfigParser.SafeConfigParser now checks values that
772 are set for invalid interpolation sequences that would lead to errors
773 on reading back those values.
774
775- Added support for the POSIX.1-2001 (pax) format to tarfile.py. Extended
776 and cleaned up the test suite. Added a new testtar.tar.
777
778- Patch #1449244: Support Unicode strings in
779 email.message.Message.{set_charset,get_content_charset}.
780
781- Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
782 pydoc's help keywords.
783
784- Patch #1555098: use str.join() instead of repeated string
785 concatenation in robotparser.
786
787- Patch #1635454: the csv.DictWriter class now includes the offending
788 field names in its exception message if you try to write a record with
789 a dictionary containing fields not in the CSV field names list.
790
791- Patch #1668100: urllib2 now correctly raises URLError instead of
792 OSError if accessing a local file via the file:// protocol fails.
793
794- Patch #1677862: Require a space or tab after import in .pth files.
795
796- Patch #1192590: Fix pdb's "ignore" and "condition" commands so they trap
797 the IndexError caused by passing in an invalid breakpoint number.
798
799- Patch #1599845: Add an option to disable the implicit calls to server_bind()
800 and server_activate() in the constructors for TCPServer, SimpleXMLRPCServer
801 and DocXMLRPCServer.
802
803- Bug #1531963: Make SocketServer.TCPServer's server_address always
804 be equal to calling getsockname() on the server's socket. Fixed by
805 patch #1545011.
806
807- Patch #742598: Add .timeout attribute to SocketServer that calls
808 .handle_timeout() when no requests are received.
809
810- Bug #1651235: When a tuple was passed to a ctypes function call,
811 Python would crash instead of raising an error.
812
813- Bug #1646630: ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
814 returned string up to the first NUL character.
815
816- Patch #957003: Implement smtplib.LMTP.
817
818- Patch #1481079: add support for HTTP_REFERER to CGIHTTPServer.
819
820- Patch #1675424: Added tests for uncovered code in the zipfile module.
821 The KeyError raised by Zipfile.getinfo for nonexistent names now has
822 a descriptive message.
823
824- Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', '').
825
826- unittest now verifies more of its assumptions. In particular, TestCase
827 and TestSuite subclasses (not instances) are no longer accepted in
828 TestSuite.addTest(). This should cause no incompatibility since it
829 never made sense with ordinary subclasses -- the failure just occurred
830 later, with a more cumbersome exception.
831
832- Patch #787789: allow to pass custom TestRunner instances to unittest's
833 main() function.
834
835- Patches #1550273, #1550272: fix a few bugs in unittest and add a
836 comprehensive test suite for the module.
837
838- Patch #1001604: glob.glob() now returns unicode filenames if it was
839 given a unicode argument and os.listdir() returns unicode filenames.
840
841- Patch #1673619: setup.py identifies extension modules it doesn't know how
842 to build and those it knows how to build but that fail to build.
843
844- Patch #912410: Replace HTML entity references for attribute values
845 in HTMLParser.
846
847- Patch #1663234: you can now run doctest on test files and modules
848 using "python -m doctest [-v] filename ...".
849
850- Patch #1121142: Implement ZipFile.open.
851
852- Taught setup.py how to locate Berkeley DB on Macs using MacPorts.
853
854- Added heapq.merge() for merging sorted input streams.
855
856- Added collections.namedtuple() for assigning field names to tuples.
857
858- Added itertools.izip_longest().
859
860- Have the encoding package's search function dynamically import using absolute
861 import semantics.
862
863- Patch #1647484: Renamed GzipFile's filename attribute to name.
864
865- Patch #1517891: Mode 'a' for ZipFile now creates the file if it
866 doesn't exist.
867
868- Patch #698833: Support file decryption in zipfile.
869
870- Patch #685268: Consider a package's __path__ in imputil.
871
872- Patch 1463026: Support default namespace in XMLGenerator.
873
874- Patch 1571379: Make trace's --ignore-dir facility work in the face of
875 relative directory names.
876
877- Bug #1600860: Search for shared python library in LIBDIR,
878 not lib/python/config, on "linux" and "gnu" systems.
879
880- Patch #1652681: tarfile.py: create nonexistent files in append mode and
881 allow appending to empty files.
882
883- Bug #1124861: Automatically create pipes if GetStdHandle fails in
884 subprocess.
885
886- Patch #1634778: add missing encoding aliases for iso8859_15 and
887 iso8859_16.
888
889- Patch #1638243: the compiler package is now able to correctly compile
890 a with statement; previously, executing code containing a with statement
891 compiled by the compiler package crashed the interpreter.
892
893- Bug #1643943: Fix time.strptime's support for the %U directive.
894
895- Patch #1507247: tarfile.py: use current umask for intermediate
896 directories.
897
898- Patch #1627441: close sockets properly in urllib2.
899
900- Bug #494589: make ntpath.expandvars behave according to its docstring.
901
902- Changed platform module API python_version_tuple() to actually
903 return a tuple (it used to return a list).
904
905- Added new platform module APIs python_branch(), python_revision(),
906 python_implementation() and linux_distribution().
907
908- Added support for IronPython and Jython to the platform module.
909
910- The sets module has been deprecated. Use the built-in set/frozenset types
911 instead.
912
913- Bug #1610795: make ctypes.util.find_library work on BSD systems.
914
915- Fixes for 64-bit Windows: In ctypes.wintypes, correct the
916 definitions of HANDLE, WPARAM, LPARAM data types. Make
917 parameterless foreign function calls work.
918
919- The version number of the ctypes package changed to "1.1.0".
920
921- Bug #1627575: logging: Added _open() method to FileHandler which can
922 be used to reopen files. The FileHandler instance now saves the
923 encoding (which can be None) in an attribute called "encoding".
924
925- Bug #411881: logging.handlers: bare except clause removed from
926 SMTPHandler.emit. Now, only ImportError is trapped.
927
928- Bug #411881: logging.handlers: bare except clause removed from
929 SocketHandler.createSocket. Now, only socket.error is trapped.
930
931- Bug #411881: logging: bare except clause removed from LogRecord.__init__.
932 Now, only ValueError, TypeError and AttributeError are trapped.
933
934- Patch #1504073: Fix tarfile.open() for mode "r" with a fileobj argument.
935
936- Patch #1182394 from Shane Holloway: speed up HMAC.hexdigest.
937
938- Patch #1262036: Prevent TarFiles from being added to themselves under
939 certain conditions.
940
941- Patch #1230446: tarfile.py: fix ExFileObject so that read() and tell()
942 work correctly together with readline().
943
944- Patch #1484695: The tarfile module now raises a HeaderError exception
945 if a buffer given to frombuf() is invalid.
946
947- Bug #1503765: Fix a problem in logging.config with spaces in comma-
948 separated lists read from logging config files.
949
950- Patch #1604907: Fix problems in logging.handlers caused at logging shutdown
951 when syslog handlers fail to initialize because of syslogd problems.
952
953- Patch #1608267: fix a race condition in os.makedirs() if the directory
954 to be created is already there.
955
956- Patch #1610437: fix a tarfile bug with long filename headers.
957
958- Patch #1371075: Make ConfigParser accept optional dict type
959 for ordering, sorting, etc.
960
961- Bug #1563807: _ctypes built on AIX fails with ld ffi error.
962
963- Bug #1598620: A ctypes Structure cannot contain itself.
964
965- Patch #1070046: Marshal new-style objects like InstanceType
966 in xmlrpclib.
967
968- cStringIO.truncate(-1) now raises an IOError, like StringIO and
969 regular files.
970
971- Patch #1472877: Fix Tix subwidget name resolution.
972
973- Patch #1594554: Always close a tkSimpleDialog on ok(), even
974 if an exception occurs.
975
976- Patch #1538878: Don't make tkSimpleDialog dialogs transient if
977 the parent window is withdrawn.
978
979- Bug #1597824: return the registered function from atexit.register()
980 to facilitate usage as a decorator.
981
982- Patch #1360200: Use unmangled_version RPM spec field to deal with
983 file name mangling.
984
985- Patch #1359217: Process 2xx response in an ftplib transfer
986 that precedes an 1xx response.
987
988- Patch #1355023: support whence argument for GzipFile.seek.
989
990- Patch #1065257: Support passing open files as body in
991 HTTPConnection.request().
992
993- Bug #1569790: mailbox.py: Maildir.get_folder() and MH.get_folder()
994 weren't passing the message factory on to newly created Maildir/MH
995 objects.
996
997- Patch #1514543: mailbox.py: In the Maildir class, report errors if there's
998 a filename clash instead of possibly losing a message. (Patch by David
999 Watson.)
1000
1001- Patch #1514544: Try to ensure that messages/indexes have been physically
1002 written to disk after calling .flush() or .close(). (Patch by David
1003 Watson.)
1004
1005- Patch #1592250: Add elidge argument to Tkinter.Text.search.
1006
1007- Patch #838546: Make terminal become controlling in pty.fork()
1008
1009- Patch #1351744: Add askyesnocancel helper for tkMessageBox.
1010
1011- Patch #1060577: Extract list of RPM files from spec file in
1012 bdist_rpm
1013
1014- Bug #1586613: fix zlib and bz2 codecs' incremental en/decoders.
1015
1016- Patch #1583880: fix tarfile's problems with long names and posix/
1017 GNU modes.
1018
1019- Bug #1586448: the compiler module now emits the same bytecode for
1020 list comprehensions as the builtin compiler, using the LIST_APPEND
1021 opcode.
1022
1023- Fix codecs.EncodedFile which did not use file_encoding in 2.5.0, and
1024 fix all codecs file wrappers to work correctly with the "with"
1025 statement (bug #1586513).
1026
1027- Lib/modulefinder.py now handles absolute and relative imports
1028 correctly.
1029
1030- Patch #1567274: Support SMTP over TLS.
1031
1032- Patch #1560695: Add .note.GNU-stack to ctypes' sysv.S so that
1033 ctypes isn't considered as requiring executable stacks.
1034
1035- ctypes callback functions only support 'fundamental' data types as
1036 result type. Raise an error when something else is used. This is a
1037 partial fix for Bug #1574584.
1038
1039- Fix turtle so that time.sleep is imported for the entire library. Allows
1040 the demo2 function to be executed on its own instead of only when the
1041 module is run as a script.
1042
1043- Bug #813342: Start the IDLE subprocess with -Qnew if the parent
1044 is started with that option.
1045
1046- Bug #1565150: Fix subsecond processing for os.utime on Windows.
1047
1048- Support for MSVC 8 was added to bdist_wininst.
1049
1050- Bug #1446043: correctly raise a LookupError if an encoding name given
1051 to encodings.search_function() contains a dot.
1052
1053- Bug #1560617: in pyclbr, return full module name not only for classes,
1054 but also for functions.
1055
1056- Bug #1457823: cgi.(Sv)FormContentDict's constructor now takes
1057 keep_blank_values and strict_parsing keyword arguments.
1058
1059- Bug #1566602: correct failure of posixpath unittest when $HOME ends
1060 with a slash.
1061
1062- Bug #1565661: in webbrowser, split() the command for the default
1063 GNOME browser in case it is a command with args.
1064
1065- Made the error message for time.strptime when the data data and format do
1066 match be more clear.
1067
1068- Fix a bug in traceback.format_exception_only() that led to an error
1069 being raised when print_exc() was called without an exception set.
1070 In version 2.4, this printed "None", restored that behavior.
1071
1072- Make webbrowser.BackgroundBrowser usable in Windows (it wasn't because
1073 the close_fds arg to subprocess.Popen is not supported).
1074
1075- Reverted patch #1504333 to sgmllib because it introduced an infinite loop.
1076
1077- Patch #1553314: Fix the inspect.py slowdown that was hurting IPython & SAGE
1078 by adding smarter caching in inspect.getmodule()
1079
1080- Fix missing import of the types module in logging.config.
1081
1082- Patch #1550886: Fix decimal module context management implementation
1083 to match the localcontext() example from PEP 343.
1084
1085- Bug #1545341: The 'classifier' keyword argument to the Distutils setup()
1086 function now accepts tuples as well as lists.
1087
1088- Bug #1541863: uuid.uuid1 failed to generate unique identifiers
1089 on systems with low clock resolution.
1090
1091- Bug #1531862: Do not close standard file descriptors in subprocess.
1092
1093- idle: Honor the "Cancel" action in the save dialog (Debian bug #299092).
1094
1095- Fix utf-8-sig incremental decoder, which didn't recognise a BOM when the
1096 first chunk fed to the decoder started with a BOM, but was longer than 3 bytes.
1097
1098- The implementation of UnicodeError objects has been simplified (start and end
1099 attributes are now stored directly as Py_ssize_t members).
1100
1101- Issue829951: In the smtplib module, SMTP.starttls() now complies with
1102 RFC 3207 and forgets any knowledge obtained from the server not obtained
1103 from the TLS negotiation itself. Patch contributed by Bill Fenner.
1104
1105- Issue1339: The smtplib.SMTP class has been refactored a bit such
1106 that the SMTP.starttls() caller no longer needs to call ehlo()
1107 beforehand. SMTP.starttls() now raises an exception of the server
1108 does not claim to support starttls. Adds the SMTP.ehlo_or_helo_if_needed()
1109 method. Patch contributed by Bill Fenner.
1110
1111
1112>>>>>>> .merge-right.r60891
Christian Heimesbc873412007-12-08 22:11:32 +00001113Extension Modules
1114-----------------
1115
Christian Heimesa156e092008-02-16 07:38:31 +00001116<<<<<<< .working
Christian Heimes7131fd92008-02-19 14:21:46 +00001117<<<<<<< .working
Christian Heimes043d6f62008-01-07 17:19:16 +00001118- Issue #1762972: Readded the reload() function as imp.reload()
Christian Heimesa156e092008-02-16 07:38:31 +00001119=======
Christian Heimes7131fd92008-02-19 14:21:46 +00001120=======
1121- #2112: mmap.error is now a subclass of EnvironmentError and not a
1122 direct EnvironmentError
1123
1124>>>>>>> .merge-right.r60878
Christian Heimesa156e092008-02-16 07:38:31 +00001125- Bug #2111: mmap segfaults when trying to write a block opened with PROT_READ
1126
1127- #2063: correct order of utime and stime in os.times() result on Windows.
1128>>>>>>> .merge-right.r60845
Christian Heimesbc873412007-12-08 22:11:32 +00001129
Georg Brandl52d168a2008-01-07 18:10:24 +00001130
Christian Heimes7131fd92008-02-19 14:21:46 +00001131<<<<<<< .working
1132=======
1133- Updated ``big5hkscs`` codec to the HKSCS revision of 2004.
1134
1135- #1940: make it possible to use curses.filter() before curses.initscr()
1136 as the documentation says.
1137
1138- Backport of _fileio module from Python 3.0.
1139
1140- #1087741: mmap.mmap is now a class, not a factory function. It is also
1141 subclassable now.
1142
1143- Patch #1648: added ``sys.getprofile()`` and ``sys.gettrace()``.
1144
1145- Patch #1663329: added ``os.closerange()`` function to quickly close a range
1146 of file descriptors without considering errors.
1147
1148- Patch 976880: ``mmap`` objects now have an ``rfind`` method that
1149 works as expected. ``mmap.find`` also takes an optional ``end``
1150 parameter.
1151
1152- _winreg's HKEY object has gained __enter__ and __exit__ methods to support
1153 the context manager protocol. The _winreg module also gained a new function
1154 ``ExpandEnvironmentStrings`` to expand REG_EXPAND_SZ keys.
1155
1156- itertools.starmap() now accepts any iterable input. Previously, it required
1157 the function inputs to be tuples.
1158
1159- Issue #1646: Make socket support TIPC. The socket module now has support
1160 for TIPC under Linux, see http://tipc.sf.net/ for more information.
1161
1162- Added interface for Windows' WSAIoctl to socket object and added an example
1163 for a simple network sniffer.
1164
1165- Bug #1301: Bad assert in _tkinter fixed.
1166
1167- Added bdist_wininst executable for VS 2008.
1168
1169- Bug #1604: collections.deque.__init__(iterable) now clears any prior contents
1170 before adding elements from the iterable. This fix brings the behavior into
1171 line with that for list.__init__().
1172
1173- Added wide char functions to msvcrt module: getwch, getwche, putwch and
1174 ungetwch. The functions accept or return unicode.
1175
1176- os.access now returns True on Windows for any existing directory.
1177
1178- Added warnpy3k function to the warnings module.
1179
1180- Marshal.dumps() now expects exact type matches for int, long, float, complex,
1181 tuple, list, dict, set, and frozenset. Formerly, it would silently miscode
1182 subclasses of those types. Now, it raises a ValueError instead.
1183
1184- Patch #1388440: Add set_completion_display_matches_hook and
1185 get_completion_type to readline.
1186
1187- Bug #1649098: Avoid declaration of zero-sized array declaration in
1188 structure.
1189
1190- Removed the rgbimg module; been deprecated since Python 2.5.
1191
1192- Bug #1721309: prevent bsddb module from freeing random memory.
1193
1194- Bug #1233: fix bsddb.dbshelve.DBShelf append method to work as
1195 intended for RECNO databases.
1196
1197- pybsddb.sf.net Bug #477182: Load the database flags at database open
1198 time so that opening a database previously created with the DB_DUP or
1199 DB_DUPSORT flag set will keep the proper behavior on subsequent opens.
1200 Specifically: dictionary assignment to a DB object will replace all
1201 values for a given key when the database allows duplicate values.
1202 DB users should use DB.put(k, v) when they want to store duplicates; not
1203 DB[k] = v.
1204
1205- Add the bsddb.db.DBEnv.lock_id_free method.
1206
1207- Bug #1686475: Support stat'ing open files on Windows again.
1208
1209- Patch #1185447: binascii.b2a_qp() now correctly quotes binary characters
1210 with ASCII value less than 32. Also, it correctly quotes dots only if
1211 they occur on a single line, as opposed to the previous behavior of
1212 quoting dots if they are the second character of any line.
1213
1214- Bug #1622896: fix a rare corner case where the bz2 module raised an
1215 error in spite of a succesful compression.
1216
1217- Patch #1654417: make operator.{get,set,del}slice use the full range
1218 of Py_ssize_t.
1219
1220- Patch #1646728: datetime.fromtimestamp fails with negative
1221 fractional times. With unittest.
1222
1223- Patch #1490190: posixmodule now includes os.chflags() and os.lchflags()
1224 functions on platforms where the underlying system calls are available.
1225
1226- Patch #1494140: Add documentation for the new struct.Struct object.
1227
1228- Patch #1432399: Support the HCI protocol for bluetooth sockets
1229
1230- Patch #1657276: Make NETLINK_DNRTMSG conditional.
1231
1232- Bug #1653736: Complain about keyword arguments to time.isoformat.
1233
1234- Bug #1486663: don't reject keyword arguments for subclasses of builtin
1235 types.
1236
1237- Patch #1610575: The struct module now supports the 't' code, for
1238 C99 _Bool.
1239
1240- Patch #1635058: ensure that htonl and friends never accept or
1241 return negative numbers, per the underlying C implementation.
1242
1243- Patch #1544279: Improve thread-safety of the socket module by moving
1244 the sock_addr_t storage out of the socket object.
1245
1246- Patch #1019808: fix bug that causes an incorrect error to be returned
1247 when a socket timeout is set and a connection attempt fails.
1248
1249- Speed up function calls into the math module.
1250
1251- Bug #1588217: don't parse "= " as a soft line break in binascii's
1252 a2b_qp() function, instead leave it in the string as quopri.decode()
1253 does.
1254
1255- Bug #1599782: Fix segfault on bsddb.db.DB().type().
1256
1257- Bug #1567666: Emulate GetFileAttributesExA for Win95.
1258
1259- Patch #1576166: Support os.utime for directories on Windows NT+.
1260
1261- Patch #1572724: fix typo ('=' instead of '==') in _msi.c.
1262
1263- Bug #1572832: fix a bug in ISO-2022 codecs which may cause segfault
1264 when encoding non-BMP unicode characters.
1265
1266- Bug #1556784: allow format strings longer than 127 characters in
1267 datetime's strftime function.
1268
1269- Fix itertools.count(n) to work with negative numbers again.
1270
1271- RLIMIT_SBSIZE was added to the resource module where available.
1272
1273- Bug #1551427: fix a wrong NULL pointer check in the win32 version
1274 of os.urandom().
1275
1276- Bug #1548092: fix curses.tparm seg fault on invalid input.
1277
1278- Patch #1114: fix curses module compilation on 64-bit AIX, & possibly
1279 other 64-bit LP64 platforms where attr_t is not the same size as a long.
1280 (Contributed by Luke Mewburn.)
1281
1282- Bug #1550714: fix SystemError from itertools.tee on negative value for n.
1283
1284- Fixed a few bugs on cjkcodecs:
1285 - gbk and gb18030 codec now handle U+30FB KATAKANA MIDDLE DOT correctly.
1286 - iso2022_jp_2 codec now encodes into G0 for KS X 1001, GB2312
1287 codepoints to conform the standard.
1288 - iso2022_jp_3 and iso2022_jp_2004 codec can encode JIS X 0213:2
1289 codepoints now.
1290
1291- Bug #1552726: in readline.c, avoid repeatedly polling in interactive
1292 mode by only placing a timeout on the select() if an input hook has
1293 been defined. This prevents an interactive Python from waking up 10
1294 times per second. Patch by Richard Boulton.
1295
1296- fixed a bug with bsddb.DB.stat: the flags and txn keyword arguments
1297 were transposed.
1298
1299- Added support for linking the bsddb module against BerkeleyDB 4.5.x
1300 and 4.6.x.
1301
1302- Bug #1633621: if curses.resizeterm() or curses.resize_term() is called,
1303 update _curses.LINES, _curses.COLS, curses.LINES and curses.COLS.
1304
1305- Fix an off-by-one bug in locale.strxfrm().
1306
1307- Fix libffi configure for hppa*-*-linux* | parisc*-*-linux*.
1308
1309- Build using system ffi library on arm*-linux*.
1310
1311- Bug #1372: zlibmodule.c: int overflow in PyZlib_decompress
1312
1313- bsddb module: Fix memory leak when using database cursors on
1314 databases without a DBEnv.
1315
1316Tests
1317-----
1318
1319- Refactor test_logging to use doctest.
1320
1321- Refactor test_profile and test_cprofile to use the same code to profile.
1322
1323- Make test_runpy reentrant by fixing _check_module to clear out any module
1324 being tested. Was causing an error by __import__ doing a reload on the
1325 second run and thus suppressing bytecode recreation.
1326
1327- Capture socket connection resets and timeouts in test_socket_ssl and
1328 test_urllib2net and raise test.test_support.ResourceDenied.
1329
1330- Patch #1559413: Fix test_cmd_line if sys.executable contains a space.
1331
1332- Added test.test_support.TransientResource which is a context manager to
1333 surround calls to resources that are not guaranteed to work even if
1334 test.test_support.requires says that the resource should exist.
1335
1336- Added a test for slicing of an exception.
1337
1338- Added test.test_support.EnvironmentVarGuard. It's a class that provides a
1339 context manager so that one can temporarily set or unset environment
1340 variables.
1341
1342- Added some tests for modulefinder.
1343
1344- Converted test_imp to use unittest.
1345
1346- Fix bsddb test_basics.test06_Transactions to check the version
1347 number properly.
1348
1349- test.test_support.catch_warning is a new context manager that can be used
1350 to catch the warnings issued by the warning framework.
1351
1352
1353Tools
1354-----
1355
1356- Tools/scripts/reindent.py now creates the backup file using shutil.copy
1357 to preserve user/group and permissions. Added also a --nobackup option
1358 to not create the backup if the user is concerned regarding this. Check
1359 issue 1050828 for more details.
1360
1361- Tools/scripts/win_add2path.py was added. The simple script modifes the
1362 PATH environment var of the HKCU tree and adds the python bin and script
1363 directory.
1364
1365- Tools/18n/pygettext.py was added to the list of scripts installed by
1366 Tools/scripts/setup.py (tracker item 642309).
1367
1368- Added IronPython and Jython support to pybench (part of which
1369 was patch #1563844)
1370
1371- Made some minor changes to pybench output to allow the user
1372 to see which Python version is running pybench
1373
1374- Added support for the new platform module feature
1375 platform.python_implementation(); this will now be saved
1376 in the benchmark pickle
1377
1378
1379Documentation
1380-------------
1381
1382- RFE #1765140: Updated documentation on FileHandler and subclasses to
1383 include new optional delay argument.
1384
1385- Bug #932563: Added section on getting contextual information into logging
1386 output, and added documentation for the new LoggerAdapter class.
1387
1388- Bug #1295: Added information about caching of formatted exception
1389 information in the LogRecord by Formatter.format().
1390
1391- Bug #1637365: add subsection about "__name__ == __main__" to the
1392 Python tutorial.
1393
1394- Patch #1698768: updated the "using Python on the Mac" intro.
1395
1396- Bug #1569057: Document that calling file.next() when the file is open for
1397 writing is undefined.
1398
1399- Patch #1489771: the syntax rules in Python Reference Manual were
1400 updated to reflect the current Python syntax.
1401
1402- Patch #1686451: Fix return type for
1403 PySequence_{Count,Index,Fast_GET_SIZE}.
1404
1405- Patch #1679379: add documentation for fnmatch.translate().
1406
1407- Bug #1629566: clarify the docs on the return values of parsedate()
1408 and parsedate_tz() in email.utils and rfc822.
1409
1410- Patch #1671450: add a section about subclassing builtin types to the
1411 "extending and embedding" tutorial.
1412
1413- Bug #1629125: fix wrong data type (int -> Py_ssize_t) in PyDict_Next
1414 docs.
1415
1416- Bug #1565919: document set types in the Language Reference.
1417
1418- Bug #1546052: clarify that PyString_FromString(AndSize) copies the
1419 string pointed to by its parameter.
1420
1421- Bug #1566663: remove obsolete example from datetime docs.
1422
1423- Bug #1541682: Fix example in the "Refcount details" API docs.
1424 Additionally, remove a faulty example showing PySequence_SetItem applied
1425 to a newly created list object and add notes that this isn't a good idea.
1426
1427
1428Tools/Demos
1429-----------
1430
1431- Patch #1552024: add decorator support to unparse.py demo script.
1432
1433- Make auto-generated python.vim file list built-ins and exceptions in
1434 alphatbetical order. Makes output more deterministic and easier to tell if
1435 the file is stale or not.
1436
1437- Bug #1546372: Fixed small bugglet in pybench that caused a missing
1438 file not to get reported properly.
1439
1440
1441Build
1442-----
1443
1444- Have the search path for building extensions follow the declared order in
1445 $CPPFLAGS and $LDFLAGS when adding directories from those environment
1446 variables.
1447
1448- Bug #1983: Added a check to pyport to verify that sizeof(pid_t) is
1449 smaller or equal sizeof(long).
1450
1451- Bug #1234: Fixed semaphore errors on AIX 5.2
1452
1453- Issue #1726: Remove Python/atof.c from PCBuild/pythoncore.vcproj
1454
1455- Removed PCbuild8/ directory and added a new build directory for VS 2005
1456 based on the VS 2008 build directory to PC/VS8.0. The script
1457 PCbuild/vs8to9.py was added to sync changes from PCbuild to PC/VS8.0.
1458
1459- Moved PCbuild/ directory for VS 2003 to PC/VS7.1 and renamed PCBuild9/
1460 directory to PCBuild/.
1461
1462- Bug #1699: Define _BSD_SOURCE only on OpenBSD.
1463
1464- Bug #1608: use -fwrapv when GCC supports it. This is important,
1465 newer GCC versions may optimize away overflow buffer overflow checks
1466 without this option!
1467
1468- Patch #1418: Make the AC_REPLACE_FUNCS object files actually work.
1469
1470- Add a FAST_LOOPS build option that speeds-up looping by trading away
1471 periodic threadstate and signal checking in tight loops. By default,
1472 this option is turned-off. It should only be enabled in debugged,
1473 performance critical applications.
1474
1475- Patch #786737: Allow building in a tree of symlinks pointing to
1476 a readonly source.
1477
1478- Bug #1737210: Change Manufacturer of Windows installer to PSF.
1479
1480- Bug #1746880: Correctly install DLLs into system32 folder on Win64.
1481
1482- Define _BSD_SOURCE, to get access to POSIX extensions on OpenBSD 4.1+.
1483
1484- Stop supporting AtheOS and cause a build error in configure for the platform.
1485
1486- Bug #1655392: don't add -L/usr/lib/pythonX.Y/config to the LDFLAGS
1487 returned by python-config if Python was built with --enable-shared
1488 because that prevented the shared library from being used.
1489
1490- Patch #1569798: fix a bug in distutils when building Python from a
1491 directory within sys.exec_prefix.
1492
1493- Bug #1675511: Use -Kpic instead of -xcode=pic32 on Solaris/x86.
1494
1495- Disable _XOPEN_SOURCE on NetBSD 1.x.
1496
1497- configure now checks whether gcc supports the PyArg_ParseTuple format
1498 attribute.
1499
1500- Bug #1578513: Cross compilation was broken by a change to configure.
1501 Repair so that it's back to how it was in 2.4.3.
1502
1503- Patch #1576954: Update VC6 build directory; remove redundant
1504 files in VC7.
1505
1506- Bug #1568842: Fix test for uintptr_t.
1507
1508- Patch #1540470, for OpenBSD 4.0.
1509
1510- Fix build failure on kfreebsd and on the hurd.
1511
1512- Fix the build of the library reference in info format.
1513
1514- Allow Emacs 22 for building the documentation in info format.
1515
1516- Makefile.pre.in(buildbottest): Run an optional script pybuildbot.identify
1517 to include some information about the build environment.
1518
1519
1520C API
1521-----
1522
1523- Unified naming convention for free lists and their limits. All free lists
1524 in Object/ are named ``free_list``, the counter ``numfree`` and the upper
1525 limit is a macro ``PyName_MAXFREELIST`` inside an #ifndef block.
1526
1527- ``PySet_Add()`` can now modify a newly created frozenset. Similarly to
1528 ``PyTuple_SetItem``, it can be used to populate a brand new frozenset; but
1529 it does not steal a reference to the added item.
1530
1531- Added ``PySet_Check()`` and ``PyFrozenSet_Check()`` to the set API.
1532
1533- Backport of PyUnicode_FromString(), _FromStringAndSize(), _Format and
1534 _FormatV from Python 3.0. Made PyLong_AsSsize_t and PyLong_FromSsize_t
1535 public functions.
1536
1537- Patch #1720595: add T_BOOL to the range of structmember types.
1538
1539- Issue #1534: Added ``PyFloat_GetMax()``, ``PyFloat_GetMin()`` and
1540 ``PyFloat_GetInfo()`` to the float API.
1541
1542- Issue #1521: On 64bit platforms, using PyArgs_ParseTuple with the t# of w#
1543 format code incorrectly truncated the length to an int, even when
1544 PY_SSIZE_T_CLEAN is set. The str.decode method used to return incorrect
1545 results with huge strings.
1546
1547- Issue #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE
1548 and Py_REFCNT.
1549
1550- PEP 3123: Provide forward compatibility with Python 3.0, while keeping
1551 backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
1552 PyVarObject_HEAD_INIT.
1553
1554- Py_ssize_t fields work in structmember when HAVE_LONG_LONG is not defined.
1555
1556- Patch #1733960: Allow T_LONGLONG to accept ints.
1557
1558- T_PYSSIZET can now be used in PyMemberDef lists for Py_ssize_t members.
1559
1560- Added a new API function ``PyImport_ImportModuleNoBlock``.
1561
1562- Bug #1637022: Prefix AST symbols with _Py_.
1563
1564- Fix some leftovers from the conversion from int to Py_ssize_t
1565 (relevant to strings and sequences of more than 2**31 items).
1566
1567- Make _PyGILState_NoteThreadState() static, it was not used anywhere
1568 outside of pystate.c and should not be necessary.
1569
1570- ``PyImport_Import`` and ``PyImport_ImportModule`` now always do absolute
1571 imports. In earlier versions they might have used relative imports under
1572 some conditions.
1573
1574- Added case insensitive comparison methods ``PyOS_stricmp(char*, char*)``
1575 and ``PyOS_strnicmp(char*, char*, Py_ssize_t)``.
1576
1577- Bug #1542693: remove semi-colon at end of PyImport_ImportModuleEx macro
1578 so it can be used as an expression.
1579
1580
1581Windows
1582-------
1583
1584- Patch #1706: Drop support for Win9x, WinME and NT4. Python now requires
1585 Windows 2000 or greater. The _WINVER and NTDDI_VERSION macros are set to
1586 Win2k for x86/32bit builds and WinXP for AMD64 builds.
1587
1588- Conditionalize definition of _CRT_SECURE_NO_DEPRECATE
1589 and _CRT_NONSTDC_NO_DEPRECATE.
1590
1591- Bug #1216: Restore support for Visual Studio 2002.
1592
1593
1594Mac
1595---
1596
1597- cfmfile now raises a DeprecationWarning.
1598
1599- buildtools now raises a DeprecationWarning.
1600
1601- Removed the macfs module. It had been deprecated since Python 2.5. This
1602 lead to the deprecation of macostools.touched() as it relied solely on macfs
1603 and was a no-op under OS X.
1604
1605
1606What's New in Python 2.5 release candidate 1?
1607=============================================
1608
1609*Release date: 17-AUG-2006*
1610
1611Core and builtins
1612-----------------
1613
1614- Unicode objects will no longer raise an exception when being
1615 compared equal or unequal to a string and a UnicodeDecodeError
1616 exception occurs, e.g. as result of a decoding failure.
1617
1618 Instead, the equal (==) and unequal (!=) comparison operators will
1619 now issue a UnicodeWarning and interpret the two objects as
1620 unequal. The UnicodeWarning can be filtered as desired using
1621 the warning framework, e.g. silenced completely, turned into an
1622 exception, logged, etc.
1623
1624 Note that compare operators other than equal and unequal will still
1625 raise UnicodeDecodeError exceptions as they've always done.
1626
1627- Fix segfault when doing string formatting on subclasses of long.
1628
1629- Fix bug related to __len__ functions using values > 2**32 on 64-bit machines
1630 with new-style classes.
1631
1632- Fix bug related to __len__ functions returning negative values with
1633 classic classes.
1634
1635- Patch #1538606, Fix __index__() clipping. There were some problems
1636 discovered with the API and how integers that didn't fit into Py_ssize_t
1637 were handled. This patch attempts to provide enough alternatives
1638 to effectively use __index__.
1639
1640- Bug #1536021: __hash__ may now return long int; the final hash
1641 value is obtained by invoking hash on the long int.
1642
1643- Bug #1536786: buffer comparison could emit a RuntimeWarning.
1644
1645- Bug #1535165: fixed a segfault in input() and raw_input() when
1646 sys.stdin is closed.
1647
1648- On Windows, the PyErr_Warn function is now exported from
1649 the Python dll again.
1650
1651- Bug #1191458: tracing over for loops now produces a line event
1652 on each iteration. Fixing this problem required changing the .pyc
1653 magic number. This means that .pyc files generated before 2.5c1
1654 will be regenerated.
1655
1656- Bug #1333982: string/number constants were inappropriately stored
1657 in the byte code and co_consts even if they were not used, ie
1658 immediately popped off the stack.
1659
1660- Fixed a reference-counting problem in property().
1661
1662
1663>>>>>>> .merge-right.r60878
Christian Heimesbc873412007-12-08 22:11:32 +00001664Library
1665-------
1666
Raymond Hettinger48b8b662008-02-05 01:53:00 +00001667- Weakref dictionaries now inherit from MutableMapping.
1668 XXX their API still needs to be modernized (i.e. eliminate the iter methods).
1669
1670- Created new UserDict class in collections module. This one inherits from and
1671 complies with the MutableMapping ABC.
Raymond Hettinger48b8b662008-02-05 01:53:00 +00001672
Raymond Hettingeredf3b732008-02-04 22:07:15 +00001673- Removed UserDict.DictMixin. Replaced all its uses with collections.MutableMapping.
1674
Guido van Rossume239b002008-01-06 00:44:20 +00001675- Issue #1703: getpass() should flush after writing prompt.
Christian Heimesfc5aa9d2007-12-11 09:00:01 +00001676
Guido van Rossume239b002008-01-06 00:44:20 +00001677- Issue #1585: IDLE uses non-existent xrange() function.
1678
1679- Issue #1578: Problems in win_getpass.
1680
1681
Georg Brandl52d168a2008-01-07 18:10:24 +00001682Build
1683-----
1684
1685- Renamed --enable-unicode configure flag to --with-wide-unicode, since
1686 Unicode strings can't be disabled anymore.
1687
1688
Guido van Rossume239b002008-01-06 00:44:20 +00001689C API
1690-----
1691
1692- Issue #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE,
1693 Py_TYPE and Py_REFCNT.
1694
1695- New API PyImport_ImportModuleNoBlock(), works like PyImport_ImportModule()
1696 but won't block on the import lock (returning an error instead).
Christian Heimes0ec88b32007-12-10 17:02:00 +00001697
Christian Heimesbc873412007-12-08 22:11:32 +00001698
Fred Drake0e474a82007-10-11 18:01:43 +00001699What's New in Python 3.0a2?
Christian Heimesbc873412007-12-08 22:11:32 +00001700===========================
Fred Drake0e474a82007-10-11 18:01:43 +00001701
Guido van Rossum99533a92007-12-06 05:07:41 +00001702*Release date: 07-Dec-2007*
1703
1704(Note: this list is incomplete.)
Fred Drake0e474a82007-10-11 18:01:43 +00001705
Guido van Rossum40d20bc2007-10-22 00:09:51 +00001706Core and Builtins
1707-----------------
1708
Brett Cannon37f7e6e2007-10-26 05:42:09 +00001709- str8 now has the same construction signature as bytes.
1710
Brett Cannon40430012007-10-22 20:24:51 +00001711- Comparisons between str and str8 now return False/True for ==/!=. sqlite3
1712 returns str8 when recreating on object from it's __conform__ value. The
1713 struct module returns str8 for all string-related formats. This was true
1714 before this change, but becomes more apparent thanks to string comparisons
1715 always being False.
1716
Guido van Rossum40d20bc2007-10-22 00:09:51 +00001717- Replaced `PyFile_FromFile()` with `PyFile_FromFd(fd, name. mode, buffer,
1718 encoding, newline)`
1719
1720- Fixed `imp.find_module()` to obey the -*- coding: -*- header.
1721
1722- Changed `__file__` and `co_filename` to unicode. The path names are decoded
1723 with `Py_FileSystemDefaultEncoding` and a new API method
1724 `PyUnicode_DecodeFSDefault(char*)` was added.
1725
Guido van Rossum2dced8b2007-10-30 17:27:30 +00001726- io.open() and _fileio.FileIO have grown a new argument closefd. A false
1727 value disables the closing of the file descriptor.
1728
Guido van Rossum98297ee2007-11-06 21:34:58 +00001729- Added a new option -b to issues warnings (-bb for errors) about certain
1730 operations between bytes/buffer and str like str(b'') and comparsion.
1731
Christian Heimes58cb1b82007-11-13 02:19:40 +00001732- The standards streams sys.stdin, stdout and stderr may be None when the
1733 when the C runtime library returns an invalid file descriptor for the
1734 streams (fileno(stdin) < 0). For now this happens only for Windows GUI
1735 apps and scripts started with `pythonw.exe`.
1736
Christian Heimesbce52be2007-11-17 19:08:41 +00001737- Added PCbuild9 directory for VS 2008.
1738
1739- Renamed structmember.h WRITE_RESTRICTED to PY_WRITE_RESTRICTED to work
1740 around a name clash with VS 2008 on Windows.
1741
Christian Heimesff737952007-11-27 10:40:20 +00001742- Unbound methods are gone for good. ClassObject.method returns an ordinary
1743 function object, instance.method still returns a bound method object.
1744 The API of bound methods is cleaned up, too. The im_class attribute is
1745 removed and im_func + im_self are renamed to __func__ and __self__. The
1746 factory PyMethod_New takes only func and instance as argument.
1747
Christian Heimesf78b1c62007-12-02 16:52:32 +00001748- intobject.h is no longer included by Python.h. The remains were moved
1749 to longobject.h. It still exists to define several aliases from PyInt_
1750 to PyLong_ functions.
1751
Christian Heimesa37d4c62007-12-04 23:02:19 +00001752- Removed sys.maxint, use sys.maxsize instead.
1753
Christian Heimesbce52be2007-11-17 19:08:41 +00001754
Fred Drake0e474a82007-10-11 18:01:43 +00001755Extension Modules
1756-----------------
1757
1758- The `hotshot` profiler has been removed; use `cProfile` instead.
1759
1760
Brett Cannone9fd2312007-10-12 19:18:19 +00001761Library
1762-------
1763
1764- When loading an external file using testfile(), the passed-in encoding
1765 argument was being ignored if __loader__ is defined and forcing the source to
1766 be UTF-8.
1767
Guido van Rossum687b9c02007-10-25 23:18:51 +00001768- The methods `os.tmpnam()`, `os.tempnam()` and `os.tmpfile()` have been
1769 removed in favor of the tempfile module.
1770
Christian Heimesc9543e42007-11-28 08:28:28 +00001771- Removed the 'new' module.
1772
1773- Removed all types from the 'types' module that are easily accessable through
1774 builtins.
Brett Cannone9fd2312007-10-12 19:18:19 +00001775
Georg Brandl52d168a2008-01-07 18:10:24 +00001776
Guido van Rossum4405cf32007-08-30 17:16:55 +00001777What's New in Python 3.0a1?
Guido van Rossum45aecf42006-03-15 04:58:47 +00001778==========================
Thomas Wouters4d70c3d2006-06-08 14:42:34 +00001779
Guido van Rossum4405cf32007-08-30 17:16:55 +00001780*Release date: 31-Aug-2007*
Neal Norwitz4886cc32006-08-21 17:06:07 +00001781
1782Core and Builtins
1783-----------------
1784
Martin v. Löwis47383402007-08-15 07:32:56 +00001785- PEP 3131: Support non-ASCII identifiers.
1786
Martin v. Löwis447d33e2007-07-29 18:10:01 +00001787- PEP 3120: Change default encoding to UTF-8.
1788
Martin v. Löwis9f2e3462007-07-21 17:22:18 +00001789- PEP 3123: Use proper C inheritance for PyObject.
1790
Guido van Rossumcd16bf62007-06-13 18:07:49 +00001791- Removed the __oct__ and __hex__ special methods and added a bin()
1792 builtin function.
1793
1794- PEP 3127: octal literals now start with "0o". Old-style octal literals
1795 are invalid. There are binary literals with a prefix of "0b".
1796 This also affects int(x, 0).
1797
Guido van Rossume7ba4952007-06-06 23:52:48 +00001798- None, True, False are now keywords.
1799
Guido van Rossum29478ef2007-05-29 00:39:44 +00001800- PEP 3119: isinstance() and issubclass() can be overridden.
1801
Guido van Rossumebe3e162007-05-17 18:20:34 +00001802- Remove BaseException.message.
1803
Guido van Rossum1bc535d2007-05-15 18:46:22 +00001804- Remove tuple parameter unpacking (PEP 3113).
1805
Kurt B. Kaiser2c7f3142007-08-30 21:52:19 +00001806- Remove the f_restricted attribute from frames. This naturally leads to the
Guido van Rossuma8add0e2007-05-14 22:03:55 +00001807 removal of PyEval_GetRestricted() and PyFrame_IsRestricted().
1808
Guido van Rossum0368b722007-05-11 16:50:42 +00001809- PEP 3132 was accepted. That means that you can do ``a, *b = range(5)``
1810 to assign 0 to a and [1, 2, 3, 4] to b.
1811
Guido van Rossum805365e2007-05-07 22:24:25 +00001812- range() now returns an iterator rather than a list. Floats are not allowed.
1813 xrange() is no longer defined.
1814
Nick Coghlan650f0d02007-04-15 12:05:43 +00001815- Patch #1660500: hide iteration variable in list comps, add set comps
1816 and use common code to handle compilation of iterative expressions
1817
Guido van Rossume27dc722007-03-27 22:37:34 +00001818- By default, != returns the opposite of ==, unless the latter returns
1819 NotImplemented.
1820
Collin Winter670e6922007-03-21 02:57:17 +00001821- Patch #1680961: sys.exitfunc has been removed and replaced with a private
1822 C-level API.
1823
Georg Brandl801dd732007-03-18 20:18:31 +00001824- PEP 3115: new metaclasses: the metaclass is now specified as a
1825 keyword arg in the class statement, which can now use the full syntax of
1826 a parameter list. Also, the metaclass can implement a __prepare__ function
1827 which will be called to create the dictionary for the new class namespace.
1828
Georg Brandl428f0642007-03-18 18:35:15 +00001829- The long-deprecated argument "pend" of PyFloat_FromString() has been
1830 removed.
1831
Georg Brandle32b4222007-03-10 22:13:27 +00001832- The dir() function has been extended to call the __dir__() method on
1833 its argument, if it exists. If not, it will work like before. This allows
1834 customizing the output of dir() in the presence of a __getattr__().
Brett Cannonba7bf492007-02-27 00:15:55 +00001835
Neal Norwitz8dfc4a92007-08-11 06:39:53 +00001836- Removed support for __members__ and __methods__.
1837
Georg Brandle32b4222007-03-10 22:13:27 +00001838- Removed indexing/slicing on BaseException.
Neal Norwitz2633c692007-02-26 22:22:47 +00001839
Georg Brandle32b4222007-03-10 22:13:27 +00001840- input() became raw_input(): the name input() now implements the
Guido van Rossum0240b922007-02-26 21:23:50 +00001841 functionality formerly known as raw_input(); the name raw_input()
1842 is no longer defined.
1843
Brett Cannon39590462007-02-26 22:01:14 +00001844- Classes listed in an 'except' clause must inherit from BaseException.
Brett Cannonf74225d2007-02-26 21:10:16 +00001845
Guido van Rossumcc2b0162007-02-11 06:12:03 +00001846- PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone;
Guido van Rossumcf1be882007-08-30 22:07:17 +00001847 and .keys(), .items(), .values() return dict views, which behave
1848 like sets.
Guido van Rossumcc2b0162007-02-11 06:12:03 +00001849
Guido van Rossum8b545362007-02-09 23:52:14 +00001850- PEP 3105: print is now a function. Also (not in the PEP) the
1851 'softspace' attribute of files is now gone (since print() doesn't use
1852 it). A side effect of this change is that you can get incomplete
1853 output lines in interactive sessions:
1854
1855 >>> print(42, end="")
Kurt B. Kaiser2c7f3142007-08-30 21:52:19 +00001856 42>>>
Guido van Rossum8b545362007-02-09 23:52:14 +00001857
1858 We may be able to fix this after the I/O library rewrite.
Guido van Rossum4502c802007-02-09 05:42:38 +00001859
Brett Cannon398db8b2007-01-29 23:44:37 +00001860- PEP 3102: keyword-only arguments.
1861
Guido van Rossumd4588c12007-02-13 19:55:23 +00001862- Int/Long unification is complete. The 'long' built-in type
Guido van Rossumec7027f2007-01-30 00:00:40 +00001863 and literals with trailing 'L' or 'l' have been removed.
1864 Performance may be sub-optimal (haven't really benchmarked).
Guido van Rossumab186842007-01-14 03:42:30 +00001865
1866- 'except E, V' must now be spelled as 'except E as V' and deletes V
1867 at the end of the except clause; V must be a simple name.
1868
Neal Norwitzc1505362006-12-28 06:47:50 +00001869- Added function annotations per PEP 3107.
1870
Jeremy Hyltona4f9fc62007-02-27 15:53:28 +00001871- Added nonlocal declaration from PEP 3104
1872
1873 >>> def f(x):
1874 ... def inc():
1875 ... nonlocal x
1876 ... x += 1
1877 ... return x
1878 ... return inc
1879 ...
1880 >>> inc = f(0)
1881 >>> inc()
1882 1
1883 >>> inc()
1884 2
1885
Georg Brandl66a796e2006-12-19 20:50:34 +00001886- Moved intern() to sys.intern().
1887
1888- exec is now a function.
1889
1890- Renamed nb_nonzero to nb_bool and __nonzero__ to __bool__.
Jack Diederich4dafcc42006-11-28 19:15:13 +00001891
Neal Norwitz4886cc32006-08-21 17:06:07 +00001892- Classic classes are a thing of the past. All classes are new style.
1893
1894- Exceptions *must* derive from BaseException.
1895
1896- Integer division always returns a float. The -Q option is no more.
1897 All the following are gone:
1898 * PyNumber_Divide and PyNumber_InPlaceDivide
1899 * __div__, __rdiv__, and __idiv__
1900 * nb_divide, nb_inplace_divide
1901 * operator.div, operator.idiv, operator.__div__, operator.__idiv__
1902 (Only __truediv__ and __floordiv__ remain, not sure how to handle them
1903 if we want to re-use __div__ and friends. If we do, it will make
1904 it harder to write code for both 2.x and 3.x.)
1905
1906- 'as' and 'with' are keywords.
1907
1908- Absolute import is the default behavior for 'import foo' etc.
1909
Neal Norwitz378b2c92006-08-29 07:57:22 +00001910- Removed support for syntax:
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001911 backticks (ie, `x`), <>
Neal Norwitz378b2c92006-08-29 07:57:22 +00001912
Neal Norwitz4886cc32006-08-21 17:06:07 +00001913- Removed these Python builtins:
Neal Norwitz01688022007-08-12 00:43:29 +00001914 apply(), callable(), coerce(), execfile(), file(), reduce(), reload()
Neal Norwitz4886cc32006-08-21 17:06:07 +00001915
Neal Norwitz378b2c92006-08-29 07:57:22 +00001916- Removed these Python methods:
1917 {}.has_key
1918
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001919- Removed these opcodes:
1920 BINARY_DIVIDE, INPLACE_DIVIDE, UNARY_CONVERT
1921
1922- Remove C API support for restricted execution.
1923
Guido van Rossumcf1be882007-08-30 22:07:17 +00001924- zip(), map() and filter() now return iterators, behaving like their
1925 itertools counterparts. This also affect map()'s behavior on
1926 sequences of unequal length -- it now stops after the shortest one
1927 is exhausted.
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001928
1929- Additions:
Guido van Rossumcf1be882007-08-30 22:07:17 +00001930 set literals, set comprehensions, ellipsis literal.
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001931
1932- Added class decorators per PEP 3129.
1933
1934
1935Extension Modules
1936-----------------
1937
1938- Remove the imageop module. Obsolete long with its unit tests becoming
1939 useless from the removal of rgbimg and imgfile.
Neal Norwitz4886cc32006-08-21 17:06:07 +00001940
1941- Removed these attributes from Python modules:
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001942 * operator module: div, idiv, __div__, __idiv__, isCallable, sequenceIncludes
Guido van Rossume7ba4952007-06-06 23:52:48 +00001943 * sys module: exc_clear(), exc_type, exc_value, exc_traceback
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001944
1945
1946Library
1947-------
1948
1949- Remove the compiler package. Use of the _ast module and (an eventual)
1950 AST -> bytecode mechanism.
1951
1952- Removed these modules:
Guido van Rossum33d26892007-08-05 15:29:28 +00001953 * audiodev, Bastion, bsddb185, exceptions, linuxaudiodev,
1954 md5, MimeWriter, mimify, popen2,
1955 rexec, sets, sha, stringold, strop, sunaudiodev, timing, xmllib.
1956
1957- Moved these modules to Tools/Demos:
1958 * toaiff
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001959
1960- Remove obsolete IRIX modules: al/AL, cd/CD, cddb, cdplayer, cl/CL, DEVICE,
1961 ERRNO, FILE, fl/FL, flp, fm, GET, gl/GL, GLWS, IN, imgfile, IOCTL, jpeg,
1962 panel, panelparser, readcd, sgi, sv/SV, torgb, WAIT.
1963
1964- Remove obsolete functions:
1965 * commands.getstatus(), os.popen*,
1966
Martin v. Löwis967f1e32007-08-14 09:23:10 +00001967- Remove functions in the string module that are also string methods;
1968 Remove string.{letters, lowercase, uppercase}.
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001969
1970- Remove support for long obsolete platforms: plat-aix3, plat-irix5.
1971
1972- Remove xmlrpclib.SlowParser. It was based on xmllib.
1973
1974- Patch #1680961: atexit has been reimplemented in C.
1975
Walter Dörwald41980ca2007-08-16 21:55:45 +00001976- Add new codecs for UTF-32, UTF-32-LE and UTF-32-BE.
1977
Guido van Rossumd59da4b2007-05-22 18:11:13 +00001978
1979Build
1980-----
1981
1982C API
1983-----
1984
1985- Removed these Python slots:
1986 __coerce__, __div__, __idiv__, __rdiv__
Neal Norwitz4886cc32006-08-21 17:06:07 +00001987
Neal Norwitz4886cc32006-08-21 17:06:07 +00001988- Removed these C APIs:
Neal Norwitz8dfc4a92007-08-11 06:39:53 +00001989 PyNumber_Coerce(), PyNumber_CoerceEx(), PyMember_Get, PyMember_Set
Neal Norwitz4886cc32006-08-21 17:06:07 +00001990
1991- Removed these C slots/fields:
1992 nb_divide, nb_inplace_divide
1993
1994- Removed these macros:
Neal Norwitz30d1c512007-08-19 22:48:23 +00001995 staticforward, statichere, PyArg_GetInt, PyArg_NoArgs, _PyObject_Del
Neal Norwitz4886cc32006-08-21 17:06:07 +00001996
1997- Removed these typedefs:
1998 intargfunc, intintargfunc, intobjargproc, intintobjargproc,
Neal Norwitz8dfc4a92007-08-11 06:39:53 +00001999 getreadbufferproc, getwritebufferproc, getsegcountproc, getcharbufferproc,
2000 memberlist
Neal Norwitz4886cc32006-08-21 17:06:07 +00002001
Raymond Hettinger4901a1f2004-12-02 08:59:14 +00002002
Raymond Hettinger4901a1f2004-12-02 08:59:14 +00002003Tests
2004-----
2005
Brett Cannonced04e02005-02-13 22:53:22 +00002006Documentation
2007-------------
2008
Raymond Hettinger4901a1f2004-12-02 08:59:14 +00002009Mac
2010---
2011
Guido van Rossume7ba4952007-06-06 23:52:48 +00002012- The cfmfile was removed.
2013
2014
Guido van Rossum845702c2007-08-30 18:44:53 +00002015Platforms
2016---------
2017
2018- Support for BeOS and AtheOS was removed (according to PEP 11).
2019
2020- Support for RiscOS, Irix, Tru64 was removed (alledgedly).
2021
Hye-Shik Chang4e422812005-07-17 02:36:59 +00002022
Raymond Hettinger4901a1f2004-12-02 08:59:14 +00002023Tools/Demos
2024-----------
2025
Skip Montanaroe5d7f7f2002-09-20 14:16:59 +00002026**(For information about older versions, consult the HISTORY file.)**