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