| Guido van Rossum | a598c93 | 2000-09-04 16:26:03 +0000 | [diff] [blame] | 1 | Python History | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 2 | -------------- | 
 | 3 |  | 
| Guido van Rossum | 439d1fa | 1998-12-21 21:41:14 +0000 | [diff] [blame] | 4 | This file contains the release messages for previous Python releases. | 
 | 5 | As you read on you go back to the dark ages of Python's history. | 
 | 6 |  | 
 | 7 |  | 
 | 8 | ====================================================================== | 
 | 9 |  | 
 | 10 |  | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 11 | What's New in Python 3.3.0? | 
 | 12 | =========================== | 
 | 13 |  | 
 | 14 | *Release date: 29-Sep-2012* | 
 | 15 |  | 
 | 16 | Core and Builtins | 
 | 17 | ----------------- | 
 | 18 |  | 
 | 19 | - Issue #16046: Fix loading sourceless legacy .pyo files. | 
 | 20 |  | 
 | 21 | - Issue #16060: Fix refcounting bug when __trunc__ returns an object | 
 | 22 |   whose __int__ gives a non-integer.  Patch by Serhiy Storchaka. | 
 | 23 |  | 
 | 24 | Extension Modules | 
 | 25 | ----------------- | 
 | 26 |  | 
 | 27 | - Issue #16012: Fix a regression in pyexpat. The parser's UseForeignDTD() | 
 | 28 |   method doesn't require an argument again. | 
 | 29 |  | 
 | 30 |  | 
 | 31 | What's New in Python 3.3.0 Release Candidate 3? | 
 | 32 | =============================================== | 
 | 33 |  | 
 | 34 | *Release date: 23-Sep-2012* | 
 | 35 |  | 
 | 36 | Core and Builtins | 
 | 37 | ----------------- | 
 | 38 |  | 
 | 39 | - Issue #15900: Fix reference leak in PyUnicode_TranslateCharmap(). | 
 | 40 |  | 
 | 41 | - Issue #15926: Fix crash after multiple reinitializations of the interpreter. | 
 | 42 |  | 
 | 43 | - Issue #15895: Fix FILE pointer leak in one error branch of | 
 | 44 |   PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file, closeit | 
 | 45 |   is false an and set_main_loader() fails. | 
 | 46 |  | 
 | 47 | - Fixes for a few crash and memory leak regressions found by Coverity. | 
 | 48 |  | 
 | 49 | Library | 
 | 50 | ------- | 
 | 51 |  | 
 | 52 | - Issue #15882: Change _decimal to accept any coefficient tuple when | 
 | 53 |   constructing infinities. This is done for backwards compatibility | 
 | 54 |   with decimal.py: Infinity coefficients are undefined in _decimal | 
 | 55 |   (in accordance with the specification). | 
 | 56 |  | 
 | 57 | - Issue #15925: Fix a regression in email.util where the parsedate() and | 
 | 58 |   parsedate_tz() functions did not return None anymore when the argument could | 
 | 59 |   not be parsed. | 
 | 60 |  | 
 | 61 | Extension Modules | 
 | 62 | ----------------- | 
 | 63 |  | 
 | 64 | - Issue #15973: Fix a segmentation fault when comparing datetime timezone | 
 | 65 |   objects. | 
 | 66 |  | 
 | 67 | - Issue #15977: Fix memory leak in Modules/_ssl.c when the function | 
 | 68 |   _set_npn_protocols() is called multiple times, thanks to Daniel Sommermann. | 
 | 69 |  | 
 | 70 | - Issue #15969: faulthandler module: rename dump_tracebacks_later() to | 
 | 71 |   dump_traceback_later() and cancel_dump_tracebacks_later() to | 
 | 72 |   cancel_dump_traceback_later(). | 
 | 73 |  | 
 | 74 | - _decimal module: use only C 89 style comments. | 
 | 75 |  | 
 | 76 |  | 
 | 77 | What's New in Python 3.3.0 Release Candidate 2? | 
 | 78 | =============================================== | 
 | 79 |  | 
 | 80 | *Release date: 09-Sep-2012* | 
 | 81 |  | 
 | 82 | Core and Builtins | 
 | 83 | ----------------- | 
 | 84 |  | 
 | 85 | - Issue #13992: The trashcan mechanism is now thread-safe.  This eliminates | 
 | 86 |   sporadic crashes in multi-thread programs when several long deallocator | 
 | 87 |   chains ran concurrently and involved subclasses of built-in container | 
 | 88 |   types. | 
 | 89 |  | 
 | 90 | - Issue #15784: Modify OSError.__str__() to better distinguish between | 
 | 91 |   errno error numbers and Windows error numbers. | 
 | 92 |  | 
 | 93 | - Issue #15781: Fix two small race conditions in import's module locking. | 
 | 94 |  | 
 | 95 | Library | 
 | 96 | ------- | 
 | 97 |  | 
 | 98 | - Issue #15847: Fix a regression in argparse, which did not accept tuples | 
 | 99 |   as argument lists anymore. | 
 | 100 |  | 
 | 101 | - Issue #15828: Restore support for C extensions in imp.load_module(). | 
 | 102 |  | 
 | 103 | - Issue #15340: Fix importing the random module when /dev/urandom cannot | 
 | 104 |   be opened.  This was a regression caused by the hash randomization patch. | 
 | 105 |  | 
 | 106 | - Issue #10650: Deprecate the watchexp parameter of the Decimal.quantize() | 
 | 107 |   method. | 
 | 108 |  | 
 | 109 | - Issue #15785: Modify window.get_wch() API of the curses module: return | 
 | 110 |   a character for most keys, and an integer for special keys, instead of | 
 | 111 |   always returning an integer. So it is now possible to distinguish special | 
 | 112 |   keys like keypad keys. | 
 | 113 |  | 
 | 114 | - Issue #14223: Fix window.addch() of the curses module for special characters | 
 | 115 |   like curses.ACS_HLINE: the Python function addch(int) and addch(bytes) is now | 
 | 116 |   calling the C function waddch()/mvwaddch() (as it was done in Python 3.2), | 
 | 117 |   instead of wadd_wch()/mvwadd_wch(). The Python function addch(str) is still | 
 | 118 |   calling the C function wadd_wch()/mvwadd_wch() if the Python curses is linked | 
 | 119 |   to libncursesw. | 
 | 120 |  | 
 | 121 | Build | 
 | 122 | ----- | 
 | 123 |  | 
 | 124 | - Issue #15822: Really ensure 2to3 grammar pickles are properly installed | 
 | 125 |   (replaces fixes for Issue #15645). | 
 | 126 |  | 
 | 127 | Documentation | 
 | 128 | ------------- | 
 | 129 |  | 
 | 130 | - Issue #15814: The memoryview enhancements in 3.3.0 accidentally permitted | 
 | 131 |   the hashing of multi-dimensional memorviews and memoryviews with multi-byte | 
 | 132 |   item formats. The intended restrictions have now been documented - they | 
 | 133 |   will be correctly enforced in 3.3.1 | 
 | 134 |  | 
 | 135 |  | 
 | 136 | What's New in Python 3.3.0 Release Candidate 1? | 
 | 137 | =============================================== | 
 | 138 |  | 
 | 139 | *Release date: 25-Aug-2012* | 
 | 140 |  | 
 | 141 | Core and Builtins | 
 | 142 | ----------------- | 
 | 143 |  | 
 | 144 | - Issue #15573: memoryview comparisons are now performed by value with full | 
 | 145 |   support for any valid struct module format definition. | 
 | 146 |  | 
 | 147 | - Issue #15316: When an item in the fromlist for __import__ doesn't exist, | 
 | 148 |   don't raise an error, but if an exception is raised as part of an import do | 
 | 149 |   let that propagate. | 
 | 150 |  | 
 | 151 | - Issue #15778: ensure that str(ImportError(msg)) returns a str | 
 | 152 |   even when msg isn't a str. | 
 | 153 |  | 
 | 154 | - Issue #2051: Source file permission bits are once again correctly | 
 | 155 |   copied to the cached bytecode file. (The migration to importlib | 
 | 156 |   reintroduced this problem because these was no regression test. A test | 
 | 157 |   has been added as part of this patch) | 
 | 158 |  | 
 | 159 | - Issue #15761: Fix crash when PYTHONEXECUTABLE is set on Mac OS X. | 
 | 160 |  | 
 | 161 | - Issue #15726: Fix incorrect bounds checking in PyState_FindModule. | 
 | 162 |   Patch by Robin Schreiber. | 
 | 163 |  | 
 | 164 | - Issue #15604: Update uses of PyObject_IsTrue() to check for and handle | 
 | 165 |   errors correctly.  Patch by Serhiy Storchaka. | 
 | 166 |  | 
 | 167 | - Issue #14846: importlib.FileFinder now handles the case where the | 
 | 168 |   directory being searched is removed after a previous import attempt | 
 | 169 |  | 
 | 170 | Library | 
 | 171 | ------- | 
 | 172 |  | 
 | 173 | - Issue #13370: Ensure that ctypes works on Mac OS X when Python is | 
 | 174 |   compiled using the clang compiler | 
 | 175 |  | 
 | 176 | - Issue #13072: The array module's 'u' format code is now deprecated and | 
 | 177 |   will be removed in Python 4.0. | 
 | 178 |  | 
 | 179 | - Issue #15544: Fix Decimal.__float__ to work with payload-carrying NaNs. | 
 | 180 |  | 
 | 181 | - Issue #15249: BytesGenerator now correctly mangles From lines (when | 
 | 182 |   requested) even if the body contains undecodable bytes. | 
 | 183 |  | 
 | 184 | - Issue #15777: Fix a refleak in _posixsubprocess. | 
 | 185 |  | 
 | 186 | - Issue ##665194: Update email.utils.localtime to use datetime.astimezone and | 
 | 187 |   correctly handle historic changes in UTC offsets. | 
 | 188 |  | 
 | 189 | - Issue #15199: Fix JavaScript's default MIME type to application/javascript. | 
 | 190 |   Patch by Bohuslav Kabrda. | 
 | 191 |  | 
 | 192 | - Issue #12643: code.InteractiveConsole now respects sys.excepthook when | 
 | 193 |   displaying exceptions (Patch by Aaron Iles) | 
 | 194 |  | 
 | 195 | - Issue #13579: string.Formatter now understands the 'a' conversion specifier. | 
 | 196 |  | 
 | 197 | - Issue #15793: Stack corruption in ssl.RAND_egd(). | 
 | 198 |   Patch by Serhiy Storchaka. | 
 | 199 |  | 
 | 200 | - Issue #15595: Fix subprocess.Popen(universal_newlines=True) | 
 | 201 |   for certain locales (utf-16 and utf-32 family). Patch by Chris Jerdonek. | 
 | 202 |  | 
 | 203 | - Issue #15477: In cmath and math modules, add workaround for platforms whose | 
 | 204 |   system-supplied log1p function doesn't respect signs of zeros. | 
 | 205 |  | 
 | 206 | - Issue #15715: importlib.__import__() will silence an ImportError when the use | 
 | 207 |   of fromlist leads to a failed import. | 
 | 208 |  | 
 | 209 | - Issue #14669: Fix pickling of connections and sockets on MacOSX | 
 | 210 |   by sending/receiving an acknowledgment after file descriptor transfer. | 
 | 211 |   TestPicklingConnection has been reenabled for MacOSX. | 
 | 212 |  | 
 | 213 | - Issue #11062: Fix adding a message from file to Babyl mailbox. | 
 | 214 |  | 
 | 215 | - Issue #15646: Prevent equivalent of a fork bomb when using | 
 | 216 |   multiprocessing on Windows without the "if __name__ == '__main__'" | 
 | 217 |   idiom. | 
 | 218 |  | 
 | 219 | - Issue #15678: Fix IDLE menus when started from OS X command line | 
 | 220 |   (3.3.0b2 regression). | 
 | 221 |  | 
 | 222 | C API | 
 | 223 | ----- | 
 | 224 |  | 
 | 225 | Extension Modules | 
 | 226 | ----------------- | 
 | 227 |  | 
 | 228 | Tools/Demos | 
 | 229 | ----------- | 
 | 230 |  | 
 | 231 | Documentation | 
 | 232 | ------------- | 
 | 233 |  | 
 | 234 | - Issue #14674: Add a discussion of the json module's standard compliance. | 
 | 235 |   Patch by Chris Rebert. | 
 | 236 |  | 
 | 237 | - Create a 'Concurrent Execution' section in the docs, and split up the | 
 | 238 |   'Optional Operating System Services' section to use a more user-centric | 
 | 239 |   classification scheme (splitting them across the new CE section, IPC and | 
 | 240 |   text processing). Operating system limitatons can be reflected with | 
 | 241 |   the Sphinx ``:platform:`` tag, it doesn't make sense as part of the Table of | 
 | 242 |   Contents. | 
 | 243 |  | 
 | 244 | - Issue #4966: Bring the sequence docs up to date for the Py3k transition | 
 | 245 |   and the many language enhancements since they were original written | 
 | 246 |  | 
 | 247 | - The "path importer" misnomer has been replaced with Eric Snow's | 
 | 248 |   more-awkward-but-at-least-not-wrong suggestion of "path based finder" in | 
 | 249 |   the import system reference docs | 
 | 250 |  | 
 | 251 | - Issue #15640: Document importlib.abc.Finder as deprecated. | 
 | 252 |  | 
 | 253 | - Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by | 
 | 254 |   Daniel Ellis. | 
 | 255 |  | 
 | 256 | Tests | 
 | 257 | ----- | 
 | 258 |  | 
 | 259 | - Issue #15747: ZFS always returns EOPNOTSUPP when attempting to set the | 
 | 260 |   UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected | 
 | 261 |   tests in test_posix.py to account for this. | 
 | 262 |  | 
 | 263 | - Issue #15285: Refactor the approach for testing connect timeouts using | 
 | 264 |   two external hosts that have been configured specifically for this type | 
 | 265 |   of test. | 
 | 266 |  | 
 | 267 | - Issue #15743: Remove the deprecated method usage in urllib tests. Patch by | 
 | 268 |   Jeff Knupp. | 
 | 269 |  | 
 | 270 | - Issue #15615: Add some tests for the json module's handling of invalid | 
 | 271 |   input data.  Patch by Kushal Das. | 
 | 272 |  | 
 | 273 | Build | 
 | 274 | ----- | 
 | 275 |  | 
 | 276 | - Output lib files for PGO build into PGO directory. | 
 | 277 |  | 
 | 278 | - Pick up 32-bit launcher from PGO directory on 64-bit PGO build. | 
 | 279 |  | 
 | 280 | - Drop PC\python_nt.h as it's not used. Add input dependency on custom | 
 | 281 |   build step. | 
 | 282 |  | 
 | 283 | - Issue #15511: Drop explicit dependency on pythonxy.lib from _decimal | 
 | 284 |   amd64 configuration. | 
 | 285 |  | 
 | 286 | - Add missing PGI/PGO configurations for pywlauncher. | 
 | 287 |  | 
 | 288 | - Issue #15645: Ensure 2to3 grammar pickles are properly installed. | 
 | 289 |  | 
 | 290 |  | 
 | 291 | What's New in Python 3.3.0 Beta 2? | 
 | 292 | ================================== | 
 | 293 |  | 
 | 294 | *Release date: 12-Aug-2012* | 
 | 295 |  | 
 | 296 | Core and Builtins | 
 | 297 | ----------------- | 
 | 298 |  | 
 | 299 | - Issue #15568: Fix the return value of "yield from" when StopIteration is | 
 | 300 |   raised by a custom iterator. | 
 | 301 |  | 
 | 302 | - Issue #13119: sys.stdout and sys.stderr are now using "\r\n" newline on | 
 | 303 |   Windows, as Python 2. | 
 | 304 |  | 
 | 305 | - Issue #15534: Fix the fast-search function for non-ASCII Unicode strings. | 
 | 306 |  | 
 | 307 | - Issue #15508: Fix the docstring for __import__ to have the proper default | 
 | 308 |   value of 0 for 'level' and to not mention negative levels since they are not | 
 | 309 |   supported. | 
 | 310 |  | 
 | 311 | - Issue #15425: Eliminated traceback noise from more situations involving | 
 | 312 |   importlib. | 
 | 313 |  | 
 | 314 | - Issue #14578: Support modules registered in the Windows registry again. | 
 | 315 |  | 
 | 316 | - Issue #15466: Stop using TYPE_INT64 in marshal, to make importlib.h (and other | 
 | 317 |   byte code files) equal between 32-bit and 64-bit systems. | 
 | 318 |  | 
 | 319 | - Issue #1692335: Move initial exception args assignment to | 
 | 320 |   "BaseException.__new__" to help pickling of naive subclasses. | 
 | 321 |  | 
 | 322 | - Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays. | 
 | 323 |  | 
 | 324 | - Issue #15456: Fix code __sizeof__ after #12399 change.  Patch by Serhiy | 
 | 325 |   Storchaka. | 
 | 326 |  | 
 | 327 | - Issue #15404: Refleak in PyMethodObject repr. | 
 | 328 |  | 
 | 329 | - Issue #15394: An issue in PyModule_Create that caused references to be leaked | 
 | 330 |   on some error paths has been fixed.  Patch by Julia Lawall. | 
 | 331 |  | 
 | 332 | - Issue #15368: An issue that caused bytecode generation to be non-deterministic | 
 | 333 |   has been fixed. | 
 | 334 |  | 
 | 335 | - Issue #15202: Consistently use the name "follow_symlinks" for new parameters | 
 | 336 |   in os and shutil functions. | 
 | 337 |  | 
 | 338 | - Issue #15314: __main__.__loader__ is now set correctly during interpreter | 
 | 339 |   startup. | 
 | 340 |  | 
 | 341 | - Issue #15111: When a module imported using 'from import' has an ImportError | 
 | 342 |   inside itself, don't mask that fact behind a generic ImportError for the | 
 | 343 |   module itself. | 
 | 344 |  | 
 | 345 | - Issue #15293: Add GC support to the AST base node type. | 
 | 346 |  | 
 | 347 | - Issue #15291: Fix a memory leak where AST nodes where not properly | 
 | 348 |   deallocated. | 
 | 349 |  | 
 | 350 | - Issue #15110: Fix the tracebacks generated by "import xxx" to not show the | 
 | 351 |   importlib stack frames. | 
 | 352 |  | 
 | 353 | - Issue #15020: The program name used to search for Python's path is now | 
 | 354 |   "python3" under Unix, not "python". | 
 | 355 |  | 
 | 356 | - Issue #15033: Fix the exit status bug when modules invoked using -m swith, | 
 | 357 |   return the proper failure return value (1). Patch contributed by Jeff Knupp. | 
 | 358 |  | 
 | 359 | - Issue #15229: An OSError subclass whose __init__ doesn't call back | 
 | 360 |   OSError.__init__ could produce incomplete instances, leading to crashes when | 
 | 361 |   calling str() on them. | 
 | 362 |  | 
 | 363 | - Issue 15307: Virtual environments now use symlinks with framework builds on | 
 | 364 |   Mac OS X, like other POSIX builds. | 
 | 365 |  | 
 | 366 | Library | 
 | 367 | ------- | 
 | 368 |  | 
 | 369 | - Issue #15424: Add a __sizeof__ implementation for array objects.  Patch by | 
 | 370 |   Ludwig Hähne. | 
 | 371 |  | 
 | 372 | - Issue #15576: Allow extension modules to act as a package's __init__ module. | 
 | 373 |  | 
 | 374 | - Issue #15502: Have importlib.invalidate_caches() work on sys.meta_path instead | 
 | 375 |   of sys.path_importer_cache. | 
 | 376 |  | 
 | 377 | - Issue #15163: Pydoc shouldn't list __loader__ as module data. | 
 | 378 |  | 
 | 379 | - Issue #15471: Do not use mutable objects as defaults for | 
 | 380 |   importlib.__import__(). | 
 | 381 |  | 
 | 382 | - Issue #15559: To avoid a problematic failure mode when passed to the bytes | 
 | 383 |   constructor, objects in the ipaddress module no longer implement __index__ | 
 | 384 |   (they still implement __int__ as appropriate) | 
 | 385 |  | 
 | 386 | - Issue #15546: Fix handling of pathological input data in the peek() and | 
 | 387 |   read1() methods of the BZ2File, GzipFile and LZMAFile classes. | 
 | 388 |  | 
 | 389 | - Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog | 
 | 390 |   ended with '\'. Patch by Roger Serwy. | 
 | 391 |  | 
 | 392 | - Issue #12655: Instead of requiring a custom type, os.sched_getaffinity and | 
 | 393 |   os.sched_setaffinity now use regular sets of integers to represent the CPUs a | 
 | 394 |   process is restricted to. | 
 | 395 |  | 
 | 396 | - Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation | 
 | 397 |   code.  Patch by Philipp Hagemeister. | 
 | 398 |  | 
 | 399 | - Issue #15519: Properly expose WindowsRegistryFinder in importlib (and use the | 
 | 400 |   correct term for it). Original patch by Eric Snow. | 
 | 401 |  | 
 | 402 | - Issue #15502: Bring the importlib ABCs into line with the current state of the | 
 | 403 |   import protocols given PEP 420. Original patch by Eric Snow. | 
 | 404 |  | 
 | 405 | - Issue #15499: Launching a webbrowser in Unix used to sleep for a few seconds. | 
 | 406 |   Original patch by Anton Barkovsky. | 
 | 407 |  | 
 | 408 | - Issue #15463: The faulthandler module truncates strings to 500 characters, | 
 | 409 |   instead of 100, to be able to display long file paths. | 
 | 410 |  | 
 | 411 | - Issue #6056: Make multiprocessing use setblocking(True) on the sockets it | 
 | 412 |   uses.  Original patch by J Derek Wilson. | 
 | 413 |  | 
 | 414 | - Issue #15364: Fix sysconfig.get_config_var('srcdir') to be an absolute path. | 
 | 415 |  | 
 | 416 | - Issue #15041: Update "see also" list in tkinter documentation. | 
 | 417 |  | 
 | 418 | - Issue #15413: os.times() had disappeared under Windows. | 
 | 419 |  | 
 | 420 | - Issue #15402: An issue in the struct module that caused sys.getsizeof to | 
 | 421 |   return incorrect results for struct.Struct instances has been fixed.  Initial | 
 | 422 |   patch by Serhiy Storchaka. | 
 | 423 |  | 
 | 424 | - Issue #15232: When mangle_from is True, email.Generator now correctly mangles | 
 | 425 |   lines that start with 'From ' that occur in a MIME preamble or epilogue. | 
 | 426 |  | 
 | 427 | - Issue #15094: Incorrectly placed #endif in _tkinter.c.  Patch by Serhiy | 
 | 428 |   Storchaka. | 
 | 429 |  | 
 | 430 | - Issue #13922: argparse no longer incorrectly strips '--'s that appear after | 
 | 431 |   the first one. | 
 | 432 |  | 
 | 433 | - Issue #12353: argparse now correctly handles null argument values. | 
 | 434 |  | 
 | 435 | - Issue #10017, issue #14998: Fix TypeError using pprint on dictionaries with | 
 | 436 |   user-defined types as keys or other unorderable keys. | 
 | 437 |  | 
 | 438 | - Issue #15397: inspect.getmodulename() is now based directly on importlib via a | 
 | 439 |   new importlib.machinery.all_suffixes() API. | 
 | 440 |  | 
 | 441 | - Issue #14635: telnetlib will use poll() rather than select() when possible to | 
 | 442 |   avoid failing due to the select() file descriptor limit. | 
 | 443 |  | 
 | 444 | - Issue #15180: Clarify posixpath.join() error message when mixing str & bytes. | 
 | 445 |  | 
 | 446 | - Issue #15343: pkgutil now includes an iter_importer_modules implementation for | 
 | 447 |   importlib.machinery.FileFinder (similar to the way it already handled | 
 | 448 |   zipimport.zipimporter). | 
 | 449 |  | 
 | 450 | - Issue #15314: runpy now sets __main__.__loader__ correctly. | 
 | 451 |  | 
 | 452 | - Issue #15357: The import emulation in pkgutil is now deprecated. pkgutil uses | 
 | 453 |   importlib internally rather than the emulation. | 
 | 454 |  | 
 | 455 | - Issue #15233: Python now guarantees that callables registered with the atexit | 
 | 456 |   module will be called in a deterministic order. | 
 | 457 |  | 
 | 458 | - Issue #15238: shutil.copystat now copies Linux "extended attributes". | 
 | 459 |  | 
 | 460 | - Issue #15230: runpy.run_path now correctly sets __package__ as described in | 
 | 461 |   the documentation. | 
 | 462 |  | 
 | 463 | - Issue #15315: Support VS 2010 in distutils cygwincompiler. | 
 | 464 |  | 
 | 465 | - Issue #15294: Fix a regression in pkgutil.extend_path()'s handling of nested | 
 | 466 |   namespace packages. | 
 | 467 |  | 
 | 468 | - Issue #15056: imp.cache_from_source() and source_from_cache() raise | 
 | 469 |   NotImplementedError when sys.implementation.cache_tag is set to None. | 
 | 470 |  | 
 | 471 | - Issue #15256: Grammatical mistake in exception raised by imp.find_module(). | 
 | 472 |  | 
 | 473 | - Issue #5931: wsgiref environ variable SERVER_SOFTWARE will specify an | 
 | 474 |   implementation specific term like CPython, Jython instead of generic "Python". | 
 | 475 |  | 
 | 476 | - Issue #13248: Remove obsolete argument "max_buffer_size" of BufferedWriter and | 
 | 477 |   BufferedRWPair, from the io module. | 
 | 478 |  | 
 | 479 | - Issue #13248: Remove obsolete argument "version" of argparse.ArgumentParser. | 
 | 480 |  | 
 | 481 | - Issue #14814: Implement more consistent ordering and sorting behaviour for | 
 | 482 |   ipaddress objects. | 
 | 483 |  | 
 | 484 | - Issue #14814: ipaddress network objects correctly return NotImplemented when | 
 | 485 |   compared to arbitrary objects instead of raising TypeError. | 
 | 486 |  | 
 | 487 | - Issue #14990: Correctly fail with SyntaxError on invalid encoding declaration. | 
 | 488 |  | 
 | 489 | - Issue #14814: ipaddress now provides more informative error messages when | 
 | 490 |   constructing instances directly (changes permitted during beta due to | 
 | 491 |   provisional API status). | 
 | 492 |  | 
 | 493 | - Issue #15247: FileIO now raises an error when given a file descriptor pointing | 
 | 494 |   to a directory. | 
 | 495 |  | 
 | 496 | - Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open. | 
 | 497 |  | 
 | 498 | - Issue #15166: Implement imp.get_tag() using sys.implementation.cache_tag. | 
 | 499 |  | 
 | 500 | - Issue #15210: Catch KeyError when importlib.__init__ can't find | 
 | 501 |   _frozen_importlib in sys.modules, not ImportError. | 
 | 502 |  | 
 | 503 | - Issue #15030: importlib.abc.PyPycLoader now supports the new source size | 
 | 504 |   header field in .pyc files. | 
 | 505 |  | 
 | 506 | - Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox files on | 
 | 507 |   flush(). | 
 | 508 |  | 
 | 509 | - Issue #10571: Fix the "--sign" option of distutils' upload command.  Patch by | 
 | 510 |   Jakub Wilk. | 
 | 511 |  | 
 | 512 | - Issue #9559: If messages were only added, a new file is no longer created and | 
 | 513 |   renamed over the old file when flush() is called on an mbox, MMDF or Babyl | 
 | 514 |   mailbox. | 
 | 515 |  | 
 | 516 | - Issue 10924: Fixed crypt.mksalt() to use a RNG that is suitable for | 
 | 517 |   cryptographic purpose. | 
 | 518 |  | 
 | 519 | - Issue #15184: Ensure consistent results of OS X configuration tailoring for | 
 | 520 |   universal builds by factoring out common OS X-specific customizations from | 
 | 521 |   sysconfig, distutils.sysconfig, distutils.util, and distutils.unixccompiler | 
 | 522 |   into a new module _osx_support. | 
 | 523 |  | 
 | 524 | C API | 
 | 525 | ----- | 
 | 526 |  | 
 | 527 | - Issue #15610: PyImport_ImportModuleEx() now uses a 'level' of 0 instead of -1. | 
 | 528 |  | 
 | 529 | - Issues #15169, #14599: Strip out the C implementation of | 
 | 530 |   imp.source_from_cache() used by PyImport_ExecCodeModuleWithPathnames() and | 
 | 531 |   used the Python code instead. Leads to PyImport_ExecCodeModuleObject() to not | 
 | 532 |   try to infer the source path from the bytecode path as | 
 | 533 |   PyImport_ExecCodeModuleWithPathnames() does. | 
 | 534 |  | 
 | 535 | Extension Modules | 
 | 536 | ----------------- | 
 | 537 |  | 
 | 538 | - Issue #15676: Now "mmap" check for empty files before doing the | 
 | 539 |   offset check.  Patch by Steven Willis. | 
 | 540 |  | 
 | 541 | - Issue #6493: An issue in ctypes on Windows that caused structure bitfields | 
 | 542 |   of type ctypes.c_uint32 and width 32 to incorrectly be set has been fixed. | 
 | 543 |  | 
 | 544 | - Issue #15194: Update libffi to the 3.0.11 release. | 
 | 545 |  | 
 | 546 | Tools/Demos | 
 | 547 | ----------- | 
 | 548 |  | 
 | 549 | - Issue #15458: python-config gets a new option --configdir to print the $LIBPL | 
 | 550 |   value. | 
 | 551 |  | 
 | 552 | - Move importlib.test.benchmark to Tools/importbench. | 
 | 553 |  | 
 | 554 | - Issue #12605: The gdb hooks for debugging CPython (within Tools/gdb) have been | 
 | 555 |   enhanced to show information on more C frames relevant to CPython within the | 
 | 556 |   "py-bt" and "py-bt-full" commands: | 
 | 557 |  | 
 | 558 |   * C frames that are waiting on the GIL | 
 | 559 |   * C frames that are garbage-collecting | 
 | 560 |   * C frames that are due to the invocation of a PyCFunction | 
 | 561 |  | 
 | 562 | Documentation | 
 | 563 | ------------- | 
 | 564 |  | 
 | 565 | - Issue #15444: Use proper spelling for non-ASCII contributor names.  Patch | 
 | 566 |   by Serhiy Storchaka. | 
 | 567 |  | 
 | 568 | - Issue #15295: Reorganize and rewrite the documentation on the import system. | 
 | 569 |  | 
 | 570 | - Issue #15230: Clearly document some of the limitations of the runpy module and | 
 | 571 |   nudge readers towards importlib when appropriate. | 
 | 572 |  | 
 | 573 | - Issue #15053: Copy Python 3.3 import lock change notice to all relevant | 
 | 574 |   functions in imp instead of just at the top of the relevant section. | 
 | 575 |  | 
 | 576 | - Issue #15288: Link to the term "loader" in notes in pkgutil about how things | 
 | 577 |   won't work as expected in Python 3.3 and mark the requisite functions as | 
 | 578 |   "changed" since they will no longer work with modules directly imported by | 
 | 579 |   import itself. | 
 | 580 |  | 
 | 581 | - Issue #13557: Clarify effect of giving two different namespaces to exec or | 
 | 582 |   execfile(). | 
 | 583 |  | 
 | 584 | - Issue #15250: Document that filecmp.dircmp compares files shallowly. Patch | 
 | 585 |   contributed by Chris Jerdonek. | 
 | 586 |  | 
 | 587 | Tests | 
 | 588 | ----- | 
 | 589 |  | 
 | 590 | - Issue #15467: Move helpers for __sizeof__ tests into test_support.  Patch by | 
 | 591 |   Serhiy Storchaka. | 
 | 592 |  | 
 | 593 | - Issue #15320: Make iterating the list of tests thread-safe when running tests | 
 | 594 |   in multiprocess mode. Patch by Chris Jerdonek. | 
 | 595 |  | 
 | 596 | - Issue #15168: Move importlib.test to test.test_importlib. | 
 | 597 |  | 
 | 598 | - Issue #15091: Reactivate a test on UNIX which was failing thanks to a | 
 | 599 |   forgotten importlib.invalidate_caches() call. | 
 | 600 |  | 
 | 601 | - Issue #15230: Adopted a more systematic approach in the runpy tests. | 
 | 602 |  | 
 | 603 | - Issue #15300: Ensure the temporary test working directories are in the same | 
 | 604 |   parent folder when running tests in multiprocess mode from a Python build. | 
 | 605 |   Patch by Chris Jerdonek. | 
 | 606 |  | 
 | 607 | - Issue #15284: Skip {send,recv}msg tests in test_socket when IPv6 is not | 
 | 608 |   enabled. Patch by Brian Brazil. | 
 | 609 |  | 
 | 610 | - Issue #15277: Fix a resource leak in support.py when IPv6 is disabled.  Patch | 
 | 611 |   by Brian Brazil. | 
 | 612 |  | 
 | 613 | Build | 
 | 614 | ----- | 
 | 615 |  | 
 | 616 | - Issue #11715: Fix multiarch detection without having Debian development tools | 
 | 617 |   (dpkg-dev) installed. | 
 | 618 |  | 
 | 619 | - Issue #15037: Build OS X installers with local copy of ncurses 5.9 libraries | 
 | 620 |   to avoid curses.unget_wch bug present in older versions of ncurses such as | 
 | 621 |   those shipped with OS X. | 
 | 622 |  | 
 | 623 | - Issue #15560: Fix building _sqlite3 extension on OS X with an SDK.  Also, for | 
 | 624 |   OS X installers, ensure consistent sqlite3 behavior and feature availability | 
 | 625 |   by building a local copy of libsqlite3 rather than depending on the wide range | 
 | 626 |   of versions supplied with various OS X releases. | 
 | 627 |  | 
 | 628 | - Issue #8847: Disable COMDAT folding in Windows PGO builds. | 
 | 629 |  | 
 | 630 | - Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs. | 
 | 631 |  | 
 | 632 | - Issue #15431: Add _freeze_importlib project to regenerate importlib.h on | 
 | 633 |   Windows. Patch by Kristján Valur Jónsson. | 
 | 634 |  | 
 | 635 | - Issue #14197: For OS X framework builds, ensure links to the shared library | 
 | 636 |   are created with the proper ABI suffix. | 
 | 637 |  | 
 | 638 | - Issue #14330: For cross builds, don't use host python, use host search paths | 
 | 639 |   for host compiler. | 
 | 640 |  | 
 | 641 | - Issue #15235: Allow Berkley DB versions up to 5.3 to build the dbm module. | 
 | 642 |  | 
 | 643 | - Issue #15268: Search curses.h in /usr/include/ncursesw. | 
 | 644 |  | 
 | 645 |  | 
 | 646 | What's New in Python 3.3.0 Beta 1? | 
 | 647 | ================================== | 
 | 648 |  | 
 | 649 | *Release date: 27-Jun-2012* | 
 | 650 |  | 
 | 651 | Core and Builtins | 
 | 652 | ----------------- | 
 | 653 |  | 
 | 654 | - Fix a (most likely) very rare memory leak when calling main() and not being | 
 | 655 |   able to decode a command-line argument. | 
 | 656 |  | 
 | 657 | - Issue #14815: Use Py_ssize_t instead of long for the object hash, to | 
 | 658 |   preserve all 64 bits of hash on Win64. | 
 | 659 |  | 
 | 660 | - Issue #12268: File readline, readlines and read() or readall() methods | 
 | 661 |   no longer lose data when an underlying read system call is interrupted. | 
 | 662 |   IOError is no longer raised due to a read system call returning EINTR | 
 | 663 |   from within these methods. | 
 | 664 |  | 
 | 665 | - Issue #11626: Add _SizeT functions to stable ABI. | 
 | 666 |  | 
 | 667 | - Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber. | 
 | 668 |  | 
 | 669 | - Issue #15142: Fix reference leak when deallocating instances of types | 
 | 670 |   created using PyType_FromSpec(). | 
 | 671 |  | 
 | 672 | - Issue #15042: Add PyState_AddModule and PyState_RemoveModule. Add version | 
 | 673 |   guard for Py_LIMITED_API additions. Patch by Robin Schreiber. | 
 | 674 |  | 
 | 675 | - Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on | 
 | 676 |   the work by Hirokazu Yamamoto. | 
 | 677 |  | 
 | 678 | - Issue #15096: Removed support for ur'' as the raw notation isn't | 
 | 679 |   compatible with Python 2.x's raw unicode strings. | 
 | 680 |  | 
 | 681 | - Issue #13783: Generator objects now use the identifier APIs internally | 
 | 682 |  | 
 | 683 | - Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels. | 
 | 684 |   Patch by Serhiy Storchaka. | 
 | 685 |  | 
 | 686 | - Issue #15026: utf-16 encoding is now significantly faster (up to 10x). | 
 | 687 |   Patch by Serhiy Storchaka. | 
 | 688 |  | 
 | 689 | - Issue #11022: open() and io.TextIOWrapper are now calling | 
 | 690 |   locale.getpreferredencoding(False) instead of locale.getpreferredencoding() | 
 | 691 |   in text mode if the encoding is not specified. Don't change temporary the | 
 | 692 |   locale encoding using locale.setlocale(), use the current locale encoding | 
 | 693 |   instead of the user preferred encoding. | 
 | 694 |  | 
 | 695 | - Issue #14673: Add Eric Snow's sys.implementation implementation. | 
 | 696 |  | 
 | 697 | - Issue #15038: Optimize python Locks on Windows. | 
 | 698 |  | 
 | 699 | Library | 
 | 700 | ------- | 
 | 701 |  | 
 | 702 | - Issue #9803: Don't close IDLE on saving if breakpoint is open. | 
 | 703 |   Patch by Roger Serwy. | 
 | 704 |  | 
 | 705 | - Issue #12288: Consider '0' and '0.0' as valid initialvalue | 
 | 706 |   for tkinter SimpleDialog. | 
 | 707 |  | 
 | 708 | - Issue #15512: Add a __sizeof__ implementation for parser. | 
 | 709 |   Patch by Serhiy Storchaka. | 
 | 710 |  | 
 | 711 | - Issue #15469: Add a __sizeof__ implementation for deque objects. | 
 | 712 |   Patch by Serhiy Storchaka. | 
 | 713 |  | 
 | 714 | - Issue #15489: Add a __sizeof__ implementation for BytesIO objects. | 
 | 715 |   Patch by Serhiy Storchaka. | 
 | 716 |  | 
 | 717 | - Issue #15487: Add a __sizeof__ implementation for buffered I/O objects. | 
 | 718 |   Patch by Serhiy Storchaka. | 
 | 719 |  | 
 | 720 | - Issue #15514: Correct __sizeof__ support for cpu_set. | 
 | 721 |   Patch by Serhiy Storchaka. | 
 | 722 |  | 
 | 723 | - Issue #15187: Bugfix: remove temporary directories test_shutil was leaving | 
 | 724 |   behind. | 
 | 725 |  | 
 | 726 | - Issue #15177: Added dir_fd parameter to os.fwalk(). | 
 | 727 |  | 
 | 728 | - Issue #15176: Clarified behavior, documentation, and implementation | 
 | 729 |   of os.listdir(). | 
 | 730 |  | 
 | 731 | - Issue #15061: Re-implemented hmac.compare_digest() in C to prevent further | 
 | 732 |   timing analysis and to support all buffer protocol aware objects as well as | 
 | 733 |   ASCII only str instances safely. | 
 | 734 |  | 
 | 735 | - Issue #15164: Change return value of platform.uname() from a | 
 | 736 |   plain tuple to a collections.namedtuple. | 
 | 737 |  | 
 | 738 | - Support Mageia Linux in the platform module. | 
 | 739 |  | 
 | 740 | - Issue #11678: Support Arch linux in the platform module. | 
 | 741 |  | 
 | 742 | - Issue #15118: Change return value of os.uname() and os.times() from | 
 | 743 |   plain tuples to immutable iterable objects with named attributes | 
 | 744 |   (structseq objects). | 
 | 745 |  | 
 | 746 | - Speed up _decimal by another 10-15% by caching the thread local context | 
 | 747 |   that was last accessed. In the pi benchmark (64-bit platform, prec=9), | 
 | 748 |   _decimal is now only 1.5x slower than float. | 
 | 749 |  | 
 | 750 | - Remove the packaging module, which is not ready for prime time. | 
 | 751 |  | 
 | 752 | - Issue #15154: Add "dir_fd" parameter to os.rmdir, remove "rmdir" | 
 | 753 |   parameter from os.remove / os.unlink. | 
 | 754 |  | 
 | 755 | - Issue #4489: Add a shutil.rmtree that isn't susceptible to symlink attacks. | 
 | 756 |   It is used automatically on platforms supporting the necessary os.openat() | 
 | 757 |   and os.unlinkat() functions. Main code by Martin von Löwis. | 
 | 758 |  | 
 | 759 | - Issue #15156: HTMLParser now uses the new "html.entities.html5" dictionary. | 
 | 760 |  | 
 | 761 | - Issue #11113: add a new "html5" dictionary containing the named character | 
 | 762 |   references defined by the HTML5 standard and the equivalent Unicode | 
 | 763 |   character(s) to the html.entities module. | 
 | 764 |  | 
 | 765 | - Issue #15114: the strict mode of HTMLParser and the HTMLParseError exception | 
 | 766 |   are deprecated now that the parser is able to parse invalid markup. | 
 | 767 |  | 
 | 768 | - Issue #3665: \u and \U escapes are now supported in unicode regular | 
 | 769 |   expressions.  Patch by Serhiy Storchaka. | 
 | 770 |  | 
 | 771 | - Issue #15153: Added inspect.getgeneratorlocals to simplify white box | 
 | 772 |   testing of generator state updates | 
 | 773 |  | 
 | 774 | - Issue #13062: Added inspect.getclosurevars to simplify testing stateful | 
 | 775 |   closures | 
 | 776 |  | 
 | 777 | - Issue #11024: Fixes and additional tests for Time2Internaldate. | 
 | 778 |  | 
 | 779 | - Issue #14626: Large refactoring of functions / parameters in the os module. | 
 | 780 |   Many functions now support "dir_fd" and "follow_symlinks" parameters; | 
 | 781 |   some also support accepting an open file descriptor in place of of a path | 
 | 782 |   string.  Added os.support_* collections as LBYL helpers.  Removed many | 
 | 783 |   functions only previously seen in 3.3 alpha releases (often starting with | 
 | 784 |   "f" or "l", or ending with "at").  Originally suggested by Serhiy Storchaka; | 
 | 785 |   implemented by Larry Hastings. | 
 | 786 |  | 
 | 787 | - Issue #15008: Implement PEP 362 "Signature Objects". | 
 | 788 |   Patch by Yury Selivanov. | 
 | 789 |  | 
 | 790 | - Issue: #15138: base64.urlsafe_{en,de}code() are now 3-4x faster. | 
 | 791 |  | 
 | 792 | - Issue #444582: Add shutil.which, for finding programs on the system path. | 
 | 793 |   Original patch by Erik Demaine, with later iterations by Jan Killian | 
 | 794 |   and Brian Curtin. | 
 | 795 |  | 
 | 796 | - Issue #14837: SSL errors now have ``library`` and ``reason`` attributes | 
 | 797 |   describing precisely what happened and in which OpenSSL submodule.  The | 
 | 798 |   str() of a SSLError is also enhanced accordingly. | 
 | 799 |  | 
 | 800 | - Issue #9527: datetime.astimezone() method will now supply a class | 
 | 801 |   timezone instance corresponding to the system local timezone when | 
 | 802 |   called with no arguments. | 
 | 803 |  | 
 | 804 | - Issue #14653: email.utils.mktime_tz() no longer relies on system | 
 | 805 |   mktime() when timezone offest is supplied. | 
 | 806 |  | 
 | 807 | - Issue #14684: zlib.compressobj() and zlib.decompressobj() now support the use | 
 | 808 |   of predefined compression dictionaries. Original patch by Sam Rushing. | 
 | 809 |  | 
 | 810 | - Fix GzipFile's handling of filenames given as bytes objects. | 
 | 811 |  | 
 | 812 | - Issue #14772: Return destination values from some shutil functions. | 
 | 813 |  | 
 | 814 | - Issue #15064: Implement context manager protocol for multiprocessing types | 
 | 815 |  | 
 | 816 | - Issue #15101: Make pool finalizer avoid joining current thread. | 
 | 817 |  | 
 | 818 | - Issue #14657: The frozen instance of importlib used for bootstrap is now | 
 | 819 |   also the module imported as importlib._bootstrap. | 
 | 820 |  | 
 | 821 | - Issue #14055: Add __sizeof__ support to _elementtree. | 
 | 822 |  | 
 | 823 | - Issue #15054: A bug in tokenize.tokenize that caused string literals | 
 | 824 |   with 'b' prefixes to be incorrectly tokenized has been fixed. | 
 | 825 |   Patch by Serhiy Storchaka. | 
 | 826 |  | 
 | 827 | - Issue #15006: Allow equality comparison between naive and aware | 
 | 828 |   time or datetime objects. | 
 | 829 |  | 
 | 830 | - Issue #14982: Document that pkgutil's iteration functions require the | 
 | 831 |   non-standard iter_modules() method to be defined by an importer (something | 
 | 832 |   the importlib importers do not define). | 
 | 833 |  | 
 | 834 | - Issue #15036: Mailbox no longer throws an error if a flush is done | 
 | 835 |   between operations when removing or changing multiple items in mbox, | 
 | 836 |   MMDF, or Babyl mailboxes. | 
 | 837 |  | 
 | 838 | - Issue #14059: Implement multiprocessing.Barrier. | 
 | 839 |  | 
 | 840 | - Issue #15061: The inappropriately named hmac.secure_compare has been | 
 | 841 |   renamed to hmac.compare_digest, restricted to operating on bytes inputs | 
 | 842 |   only and had its documentation updated to more accurately reflect both its | 
 | 843 |   intent and its limitations | 
 | 844 |  | 
 | 845 | - Issue #13841: Make child processes exit using sys.exit() on Windows. | 
 | 846 |  | 
 | 847 | - Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API. | 
 | 848 |   Patch by Robin Schreiber. | 
 | 849 |  | 
 | 850 | - Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields | 
 | 851 |   in struct tm, time.struct_time objects returned by time.gmtime(), | 
 | 852 |   time.localtime() and time.strptime() functions now have tm_zone and | 
 | 853 |   tm_gmtoff attributes.  Original patch by Paul Boddie. | 
 | 854 |  | 
 | 855 | - Rename adjusted attribute to adjustable in time.get_clock_info() result. | 
 | 856 |  | 
 | 857 | - Issue #3518: Remove references to non-existent BaseManager.from_address() | 
 | 858 |   method. | 
 | 859 |  | 
 | 860 | - Issue #13857: Added textwrap.indent() function (initial patch by Ezra | 
 | 861 |   Berch) | 
 | 862 |  | 
 | 863 | - Issue #2736: Added datetime.timestamp() method. | 
 | 864 |  | 
 | 865 | - Issue #13854: Make multiprocessing properly handle non-integer | 
 | 866 |   non-string argument to SystemExit. | 
 | 867 |  | 
 | 868 | - Issue #12157: Make pool.map() empty iterables correctly.  Initial | 
 | 869 |   patch by mouad. | 
 | 870 |  | 
 | 871 | - Issue #11823: disassembly now shows argument counts on calls with keyword args. | 
 | 872 |  | 
 | 873 | - Issue #14711: os.stat_float_times() has been deprecated. | 
 | 874 |  | 
 | 875 | - LZMAFile now accepts the modes "rb"/"wb"/"ab" as synonyms of "r"/"w"/"a". | 
 | 876 |  | 
 | 877 | - The bz2 and lzma modules now each contain an open() function, allowing | 
 | 878 |   compressed files to readily be opened in text mode as well as binary mode. | 
 | 879 |  | 
 | 880 | - BZ2File.__init__() and LZMAFile.__init__() now accept a file object as their | 
 | 881 |   first argument, rather than requiring a separate "fileobj" argument. | 
 | 882 |  | 
 | 883 | - gzip.open() now accepts file objects as well as filenames. | 
 | 884 |  | 
 | 885 | - Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError | 
 | 886 |   when the path existed and had the S_ISGID mode bit set when it was | 
 | 887 |   not explicitly asked for.  This is no longer an exception as mkdir | 
 | 888 |   cannot control if the OS sets that bit for it or not. | 
 | 889 |  | 
 | 890 | - Issue #14989: Make the CGI enable option to http.server available via command | 
 | 891 |   line. | 
 | 892 |  | 
 | 893 | - Issue #14987: Add a missing import statement to inspect. | 
 | 894 |  | 
 | 895 | - Issue #1079: email.header.decode_header now correctly parses all the examples | 
 | 896 |   in RFC2047.  There is a necessary visible behavior change: the leading and/or | 
 | 897 |   trailing whitespace on ASCII parts is now preserved. | 
 | 898 |  | 
 | 899 | - Issue #14969: Better handling of exception chaining in contextlib.ExitStack | 
 | 900 |  | 
 | 901 | - Issue #14962: Update text coloring in IDLE shell window after changing | 
 | 902 |   options.  Patch by Roger Serwy. | 
 | 903 |  | 
 | 904 | - Issue #14963: Convert contextlib.ExitStack.__exit__ to use an iterative | 
 | 905 |   algorithm (Patch by Alon Horev) | 
 | 906 |  | 
 | 907 | - Issue #14785: Add sys._debugmallocstats() to help debug low-level memory | 
 | 908 |   allocation issues | 
 | 909 |  | 
 | 910 | - Issue #14443: Ensure that .py files are byte-compiled with the correct Python | 
 | 911 |   executable within bdist_rpm even on older versions of RPM | 
 | 912 |  | 
 | 913 | C-API | 
 | 914 | ----- | 
 | 915 |  | 
 | 916 | - Issue #13783: Inadvertent additions to the public C API in the PEP 380 | 
 | 917 |   implementation have either been removed or marked as private interfaces. | 
 | 918 |  | 
 | 919 | Extension Modules | 
 | 920 | ----------------- | 
 | 921 |  | 
 | 922 | - Issue #15000: Support the "unique" x32 architecture in _posixsubprocess.c. | 
 | 923 |  | 
 | 924 | Documentation | 
 | 925 | ------------- | 
 | 926 |  | 
 | 927 | - Issue #15081: Document PyState_FindModule. | 
 | 928 |   Patch by Robin Schreiber. | 
 | 929 |  | 
 | 930 | - Issue #14814: Added first draft of ipaddress module API reference | 
 | 931 |  | 
 | 932 | Tests | 
 | 933 | ----- | 
 | 934 |  | 
 | 935 | - Issue #14769: test_capi now has SkipitemTest, which cleverly checks | 
 | 936 |   for "parity" between PyArg_ParseTuple() and the Python/getargs.c static | 
 | 937 |   function skipitem() for all possible "format units". | 
 | 938 |  | 
 | 939 | - test_nntplib now tolerates being run from behind NNTP gateways that add | 
 | 940 |   "X-Antivirus" headers to articles | 
 | 941 |  | 
 | 942 | - Issue #15043: test_gdb is now skipped entirely if gdb security settings | 
 | 943 |   block loading of the gdb hooks | 
 | 944 |  | 
 | 945 | - Issue #14963: Add test cases for exception handling behaviour | 
 | 946 |   in contextlib.ExitStack (Initial patch by Alon Horev) | 
 | 947 |  | 
 | 948 | Build | 
 | 949 | ----- | 
 | 950 |  | 
 | 951 | - Issue #13590: Improve support for OS X Xcode 4: | 
 | 952 |     * Try to avoid building Python or extension modules with problematic | 
 | 953 |       llvm-gcc compiler. | 
 | 954 |     * Since Xcode 4 removes ppc support, extension module builds now | 
 | 955 |       check for ppc compiler support and automatically remove ppc and | 
 | 956 |       ppc64 archs when not available. | 
 | 957 |     * Since Xcode 4 no longer install SDKs in default locations, | 
 | 958 |       extension module builds now revert to using installed headers | 
 | 959 |       and libs if the SDK used to build the interpreter is not | 
 | 960 |       available. | 
 | 961 |     * Update ./configure to use better defaults for universal builds; | 
 | 962 |       in particular, --enable-universalsdk=yes uses the Xcode default | 
 | 963 |       SDK and --with-universal-archs now defaults to "intel" if ppc | 
 | 964 |       not available. | 
 | 965 |  | 
 | 966 | - Issue #14225: Fix Unicode support for curses (#12567) on OS X | 
 | 967 |  | 
 | 968 | - Issue #14928: Fix importlib bootstrap issues by using a custom executable | 
 | 969 |   (Modules/_freeze_importlib) to build Python/importlib.h. | 
 | 970 |  | 
 | 971 |  | 
 | 972 | What's New in Python 3.3.0 Alpha 4? | 
 | 973 | =================================== | 
 | 974 |  | 
 | 975 | *Release date: 31-May-2012* | 
 | 976 |  | 
 | 977 | Core and Builtins | 
 | 978 | ----------------- | 
 | 979 |  | 
 | 980 | - Issue #14835: Make plistlib output empty arrays & dicts like OS X. | 
 | 981 |   Patch by Sidney San Martín. | 
 | 982 |  | 
 | 983 | - Issue #14744: Use the new _PyUnicodeWriter internal API to speed up | 
 | 984 |   str%args and str.format(args). | 
 | 985 |  | 
 | 986 | - Issue #14930: Make memoryview objects weakrefable. | 
 | 987 |  | 
 | 988 | - Issue #14775: Fix a potential quadratic dict build-up due to the garbage | 
 | 989 |   collector repeatedly trying to untrack dicts. | 
 | 990 |  | 
 | 991 | - Issue #14857: fix regression in references to PEP 3135 implicit __class__ | 
 | 992 |   closure variable (Reopens issue #12370) | 
 | 993 |  | 
 | 994 | - Issue #14712 (PEP 405): Virtual environments. Implemented by Vinay Sajip. | 
 | 995 |  | 
 | 996 | - Issue #14660 (PEP 420): Namespace packages. Implemented by Eric Smith. | 
 | 997 |  | 
 | 998 | - Issue #14494: Fix __future__.py and its documentation to note that | 
 | 999 |   absolute imports are the default behavior in 3.0 instead of 2.7. | 
 | 1000 |   Patch by Sven Marnach. | 
 | 1001 |  | 
 | 1002 | - Issue #9260: A finer-grained import lock.  Most of the import sequence | 
 | 1003 |   now uses per-module locks rather than the global import lock, eliminating | 
 | 1004 |   well-known issues with threads and imports. | 
 | 1005 |  | 
 | 1006 | - Issue #14624: UTF-16 decoding is now 3x to 4x faster on various inputs. | 
 | 1007 |   Patch by Serhiy Storchaka. | 
 | 1008 |  | 
 | 1009 | - asdl_seq and asdl_int_seq are now Py_ssize_t sized. | 
 | 1010 |  | 
 | 1011 | - Issue #14133 (PEP 415): Implement suppression of __context__ display with an | 
 | 1012 |   attribute on BaseException. This replaces the original mechanism of PEP 409. | 
 | 1013 |  | 
 | 1014 | - Issue #14417: Mutating a dict during lookup now restarts the lookup instead | 
 | 1015 |   of raising a RuntimeError (undoes issue #14205). | 
 | 1016 |  | 
 | 1017 | - Issue #14738: Speed-up UTF-8 decoding on non-ASCII data.  Patch by Serhiy | 
 | 1018 |   Storchaka. | 
 | 1019 |  | 
 | 1020 | - Issue #14700: Fix two broken and undefined-behaviour-inducing overflow checks | 
 | 1021 |   in old-style string formatting. | 
 | 1022 |  | 
 | 1023 | - Issue #14705: The PyArg_Parse() family of functions now support the 'p' format | 
 | 1024 |   unit, which accepts a "boolean predicate" argument.  It converts any Python | 
 | 1025 |   value into an integer--0 if it is "false", and 1 otherwise. | 
 | 1026 |  | 
 | 1027 | Library | 
 | 1028 | ------- | 
 | 1029 |  | 
 | 1030 | - Issue #14690: Use monotonic clock instead of system clock in the sched, | 
 | 1031 |   subprocess and trace modules. | 
 | 1032 |  | 
 | 1033 | - Issue #14958: Change IDLE systax highlighting to recognize all string and | 
 | 1034 |   byte literals supported in Python 3.3. | 
 | 1035 |  | 
 | 1036 | - Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu. | 
 | 1037 |  | 
 | 1038 | - Issue #14443: Tell rpmbuild to use the correct version of Python in | 
 | 1039 |   bdist_rpm. Initial patch by Ross Lagerwall. | 
 | 1040 |  | 
 | 1041 | - Issue #14929: Stop Idle 3.x from closing on Unicode decode errors when | 
 | 1042 |   grepping. Patch by Roger Serwy. | 
 | 1043 |  | 
 | 1044 | - Issue #12515: email now registers a defect if it gets to EOF while parsing | 
 | 1045 |   a MIME part without seeing the closing MIME boundary. | 
 | 1046 |  | 
 | 1047 | - Issue #12510: Attempting to get invalid tooltip no longer closes Idle. | 
 | 1048 |   Other tooltipss have been corrected or improved and the number of tests | 
 | 1049 |   has been tripled. Original patch by Roger Serwy. | 
 | 1050 |  | 
 | 1051 | - Issue #1672568: email now always decodes base64 payloads, adding padding and | 
 | 1052 |   ignoring non-base64-alphabet characters if needed, and registering defects | 
 | 1053 |   for any such problems. | 
 | 1054 |  | 
 | 1055 | - Issue #14925: email now registers a defect when the parser decides that there | 
 | 1056 |   is a missing header/body separator line.  MalformedHeaderDefect, which the | 
 | 1057 |   existing code would never actually generate, is deprecated. | 
 | 1058 |  | 
 | 1059 | - Issue #10365: File open dialog now works instead of crashing even when | 
 | 1060 |   the parent window is closed before the dialog. Patch by Roger Serwy. | 
 | 1061 |  | 
 | 1062 | - Issue #8739: Updated smtpd to support RFC 5321, and added support for the | 
 | 1063 |   RFC 1870 SIZE extension. | 
 | 1064 |  | 
 | 1065 | - Issue #665194: Added a localtime function to email.utils to provide an | 
 | 1066 |   aware local datetime for use in setting Date headers. | 
 | 1067 |  | 
 | 1068 | - Issue #12586: Added new provisional policies that implement convenient | 
 | 1069 |   unicode support for email headers.  See What's New for details. | 
 | 1070 |  | 
 | 1071 | - Issue #14731: Refactored email Policy framework to support full backward | 
 | 1072 |   compatibility with Python 3.2 by default yet allow for the introduction of | 
 | 1073 |   new features through new policies.  Note that Policy.must_be_7bit is renamed | 
 | 1074 |   to cte_type. | 
 | 1075 |  | 
 | 1076 | - Issue #14876: Use user-selected font for highlight configuration. | 
 | 1077 |  | 
 | 1078 | - Issue #14920: Fix the help(urllib.parse) failure on locale C on terminals. | 
 | 1079 |   Have ascii characters in help. | 
 | 1080 |  | 
 | 1081 | - Issue #14548: Make multiprocessing finalizers check pid before | 
 | 1082 |   running to cope with possibility of gc running just after fork. | 
 | 1083 |  | 
 | 1084 | - Issue #14863: Update the documentation of os.fdopen() to reflect the | 
 | 1085 |   fact that it's only a thin wrapper around open() anymore. | 
 | 1086 |  | 
 | 1087 | - Issue #14036: Add an additional check to validate that port in urlparse does | 
 | 1088 |   not go in illegal range and returns None. | 
 | 1089 |  | 
 | 1090 | - Issue #14862: Add missing names to os.__all__ | 
 | 1091 |  | 
 | 1092 | - Issue #14875: Use float('inf') instead of float('1e66666') in the json module. | 
 | 1093 |  | 
 | 1094 | - Issue #13585: Added contextlib.ExitStack | 
 | 1095 |  | 
 | 1096 | - PEP 3144, Issue #14814: Added the ipaddress module | 
 | 1097 |  | 
 | 1098 | - Issue #14426: Correct the Date format in Expires attribute of Set-Cookie | 
 | 1099 |   Header in Cookie.py. | 
 | 1100 |  | 
 | 1101 | - Issue #14588: The types module now provide new_class() and prepare_class() | 
 | 1102 |   functions to support PEP 3115 compliant dynamic class creation. Patch by | 
 | 1103 |   Daniel Urban and Nick Coghlan. | 
 | 1104 |  | 
 | 1105 | - Issue #13152: Allow to specify a custom tabsize for expanding tabs in | 
 | 1106 |   textwrap. Patch by John Feuerstein. | 
 | 1107 |  | 
 | 1108 | - Issue #14721: Send the correct 'Content-length: 0' header when the body is an | 
 | 1109 |   empty string ''. Initial Patch contributed by Arve Knudsen. | 
 | 1110 |  | 
 | 1111 | - Issue #14072: Fix parsing of 'tel' URIs in urlparse by making the check for | 
 | 1112 |   ports stricter. | 
 | 1113 |  | 
 | 1114 | - Issue #9374: Generic parsing of query and fragment portions of url for any | 
 | 1115 |   scheme. Supported both by RFC3986 and RFC2396. | 
 | 1116 |  | 
 | 1117 | - Issue #14798: Fix the functions in pyclbr to raise an ImportError | 
 | 1118 |   when the first part of a dotted name is not a package. Patch by | 
 | 1119 |   Xavier de Gaye. | 
 | 1120 |  | 
 | 1121 | - Issue #12098: multiprocessing on Windows now starts child processes | 
 | 1122 |   using the same sys.flags as the current process.  Initial patch by | 
 | 1123 |   Sergey Mezentsev. | 
 | 1124 |  | 
 | 1125 | - Issue #13031: Small speed-up for tarfile when unzipping tarfiles. | 
 | 1126 |   Patch by Justin Peel. | 
 | 1127 |  | 
 | 1128 | - Issue #14780: urllib.request.urlopen() now has a ``cadefault`` argument | 
 | 1129 |   to use the default certificate store.  Initial patch by James Oakley. | 
 | 1130 |  | 
 | 1131 | - Issue #14829: Fix bisect and range() indexing with large indices | 
 | 1132 |   (>= 2 ** 32) under 64-bit Windows. | 
 | 1133 |  | 
 | 1134 | - Issue #14732: The _csv module now uses PEP 3121 module initialization. | 
 | 1135 |   Patch by Robin Schreiber. | 
 | 1136 |  | 
 | 1137 | - Issue #14809: Add HTTP status codes introduced by RFC 6585 to http.server | 
 | 1138 |   and http.client. Patch by EungJun Yi. | 
 | 1139 |  | 
 | 1140 | - Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when | 
 | 1141 |   accessing the Tk clipboard.  Modify clipboad_get() to first request type | 
 | 1142 |   UTF8_STRING when no specific type is requested in an X11 windowing | 
 | 1143 |   environment, falling back to the current default type STRING if that fails. | 
 | 1144 |   Original patch by Thomas Kluyver. | 
 | 1145 |  | 
 | 1146 | - Issue #14773: Fix os.fwalk() failing on dangling symlinks. | 
 | 1147 |  | 
 | 1148 | - Issue #12541: Be lenient with quotes around Realm field of HTTP Basic | 
 | 1149 |   Authentation in urllib2. | 
 | 1150 |  | 
 | 1151 | - Issue #14807: move undocumented tarfile.filemode() to stat.filemode() and add | 
 | 1152 |   doc entry. Add tarfile.filemode alias with deprecation warning. | 
 | 1153 |  | 
 | 1154 | - Issue #13815: TarFile.extractfile() now returns io.BufferedReader objects. | 
 | 1155 |  | 
 | 1156 | - Issue #14532: Add a secure_compare() helper to the hmac module, to mitigate | 
 | 1157 |   timing attacks. Patch by Jon Oberheide. | 
 | 1158 |  | 
 | 1159 | - Add importlib.util.resolve_name(). | 
 | 1160 |  | 
 | 1161 | - Issue #14366: Support lzma compression in zip files. | 
 | 1162 |   Patch by Serhiy Storchaka. | 
 | 1163 |  | 
 | 1164 | - Issue #13959: Introduce importlib.find_loader() and document | 
 | 1165 |   imp.find_module/load_module as deprecated. | 
 | 1166 |  | 
 | 1167 | - Issue #14082: shutil.copy2() now copies extended attributes, if possible. | 
 | 1168 |   Patch by Hynek Schlawack. | 
 | 1169 |  | 
 | 1170 | - Issue #13959: Make importlib.abc.FileLoader.load_module()/get_filename() and | 
 | 1171 |   importlib.machinery.ExtensionFileLoader.load_module() have their single | 
 | 1172 |   argument be optional. Allows for the replacement (and thus deprecation) of | 
 | 1173 |   imp.load_source()/load_package()/load_compiled(). | 
 | 1174 |  | 
 | 1175 | - Issue #13959: imp.get_suffixes() has been deprecated in favour of the new | 
 | 1176 |   attributes on importlib.machinery: SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES, | 
 | 1177 |   OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES, and EXTENSION_SUFFIXES. This | 
 | 1178 |   led to an indirect deprecation of inspect.getmoduleinfo(). | 
 | 1179 |  | 
 | 1180 | - Issue #14662: Prevent shutil failures on OS X when destination does not | 
 | 1181 |   support chflag operations.  Patch by Hynek Schlawack. | 
 | 1182 |  | 
 | 1183 | - Issue #14157: Fix time.strptime failing without a year on February 29th. | 
 | 1184 |   Patch by Hynek Schlawack. | 
 | 1185 |  | 
 | 1186 | - Issue #14753: Make multiprocessing's handling of negative timeouts | 
 | 1187 |   the same as it was in Python 3.2. | 
 | 1188 |  | 
 | 1189 | - Issue #14583: Fix importlib bug when a package's __init__.py would first | 
 | 1190 |   import one of its modules then raise an error. | 
 | 1191 |  | 
 | 1192 | - Issue #14741: Fix missing support for Ellipsis ('...') in parser module. | 
 | 1193 |  | 
 | 1194 | - Issue #14697: Fix missing support for set displays and set comprehensions in | 
 | 1195 |   parser module. | 
 | 1196 |  | 
 | 1197 | - Issue #14701: Fix missing support for 'raise ... from' in parser module. | 
 | 1198 |  | 
 | 1199 | - Add support for timeouts to the acquire() methods of | 
 | 1200 |   multiprocessing's lock/semaphore/condition proxies. | 
 | 1201 |  | 
 | 1202 | - Issue #13989: Add support for text mode to gzip.open(). | 
 | 1203 |  | 
 | 1204 | - Issue #14127: The os.stat() result object now provides three additional | 
 | 1205 |   fields: st_ctime_ns, st_mtime_ns, and st_atime_ns, providing those times as an | 
 | 1206 |   integer with nanosecond resolution.  The functions os.utime(), os.lutimes(), | 
 | 1207 |   and os.futimes() now accept a new parameter, ns, which accepts mtime and atime | 
 | 1208 |   as integers with nanosecond resolution. | 
 | 1209 |  | 
 | 1210 | - Issue #14127 and #10148: shutil.copystat now preserves exact mtime and atime | 
 | 1211 |   on filesystems providing nanosecond resolution. | 
 | 1212 |  | 
 | 1213 | Tools/Demos | 
 | 1214 | ----------- | 
 | 1215 |  | 
 | 1216 | - Issue #14695: Bring Tools/parser/unparse.py support up to date with | 
 | 1217 |   the Python 3.3 Grammar. | 
 | 1218 |  | 
 | 1219 | Build | 
 | 1220 | ----- | 
 | 1221 |  | 
 | 1222 | - Issue #14472: Update .gitignore. Patch by Matej Cepl. | 
 | 1223 |  | 
 | 1224 | - Upgrade Windows library versions: bzip 1.0.6, OpenSSL 1.0.1c. | 
 | 1225 |  | 
 | 1226 | - Issue #14693: Under non-Windows platforms, hashlib's fallback modules are | 
 | 1227 |   always compiled, even if OpenSSL is present at build time. | 
 | 1228 |  | 
 | 1229 | - Issue #13210: Windows build now uses VS2010, ported from VS2008. | 
 | 1230 |  | 
 | 1231 | Documentation | 
 | 1232 | ------------- | 
 | 1233 |  | 
 | 1234 | - Issue #14588: The language reference now accurately documents the Python 3 | 
 | 1235 |   class definition process. Patch by Nick Coghlan. | 
 | 1236 |  | 
 | 1237 | - Issue #14943: Correct a default argument value for winreg.OpenKey | 
 | 1238 |   and correctly list the argument names in the function's explanation. | 
 | 1239 |  | 
 | 1240 |  | 
 | 1241 | What's New in Python 3.3.0 Alpha 3? | 
 | 1242 | =================================== | 
 | 1243 |  | 
 | 1244 | *Release date: 01-May-2012* | 
 | 1245 |  | 
 | 1246 | Core and Builtins | 
 | 1247 | ----------------- | 
 | 1248 |  | 
 | 1249 | - Issue #14699: Fix calling the classmethod descriptor directly. | 
 | 1250 |  | 
 | 1251 | - Issue #14433: Prevent msvcrt crash in interactive prompt when stdin is closed. | 
 | 1252 |  | 
 | 1253 | - Issue #14521: Make result of float('nan') and float('-nan') more consistent | 
 | 1254 |   across platforms. | 
 | 1255 |  | 
 | 1256 | - Issue #14646: __import__() sets __loader__ if the loader did not. | 
 | 1257 |  | 
 | 1258 | - Issue #14605: No longer have implicit entries in sys.meta_path. If | 
 | 1259 |   sys.meta_path is found to be empty, raise ImportWarning. | 
 | 1260 |  | 
 | 1261 | - Issue #14605: No longer have implicit entries in sys.path_hooks. If | 
 | 1262 |   sys.path_hooks is found to be empty, a warning will be raised. None is now | 
 | 1263 |   inserted into sys.path_importer_cache if no finder was discovered. This also | 
 | 1264 |   means imp.NullImporter is no longer implicitly used. | 
 | 1265 |  | 
 | 1266 | - Issue #13903: Implement PEP 412. Individual dictionary instances can now share | 
 | 1267 |   their keys with other dictionaries. Classes take advantage of this to share | 
 | 1268 |   their instance dictionary keys for improved memory and performance. | 
 | 1269 |  | 
 | 1270 | - Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError | 
 | 1271 |   when repr() or str() is called on such an object. | 
 | 1272 |  | 
 | 1273 | - Issue #14658: Fix binding a special method to a builtin implementation of a | 
 | 1274 |   special method with a different name. | 
 | 1275 |  | 
 | 1276 | - Issue #14630: Fix a memory access bug for instances of a subclass of int | 
 | 1277 |   with value 0. | 
 | 1278 |  | 
 | 1279 | - Issue #14339: Speed improvements to bin, oct and hex functions.  Patch by | 
 | 1280 |   Serhiy Storchaka. | 
 | 1281 |  | 
 | 1282 | - Issue #14098: New functions PyErr_GetExcInfo and PyErr_SetExcInfo. | 
 | 1283 |   Patch by Stefan Behnel. | 
 | 1284 |  | 
 | 1285 | - Issue #14385: It is now possible to use a custom type for the __builtins__ | 
 | 1286 |   namespace, instead of a dict. It can be used for sandboxing for example. | 
 | 1287 |   Raise also a NameError instead of ImportError if __build_class__ name if not | 
 | 1288 |   found in __builtins__. | 
 | 1289 |  | 
 | 1290 | - Issue #12599: Be more strict in accepting None compared to a false-like | 
 | 1291 |   object for importlib.util.module_for_loader and | 
 | 1292 |   importlib.machinery.PathFinder. | 
 | 1293 |  | 
 | 1294 | - Issue #14612: Fix jumping around with blocks by setting f_lineno. | 
 | 1295 |  | 
 | 1296 | - Issue #14592: Attempting a relative import w/o __package__ or __name__ set in | 
 | 1297 |   globals raises a KeyError. | 
 | 1298 |  | 
 | 1299 | - Issue #14607: Fix keyword-only arguments which started with ``__``. | 
 | 1300 |  | 
 | 1301 | - Issue #10854: The ImportError raised when an extension module on Windows | 
 | 1302 |   fails to import now uses the new path and name attributes from | 
 | 1303 |   Issue #1559549. | 
 | 1304 |  | 
 | 1305 | - Issue #13889: Check and (if necessary) set FPU control word before calling | 
 | 1306 |   any of the dtoa.c string <-> float conversion functions, on MSVC builds of | 
 | 1307 |   Python.  This fixes issues when embedding Python in a Delphi app. | 
 | 1308 |  | 
 | 1309 | - __import__() now matches PEP 328 and documentation by defaulting 'index' to 0 | 
 | 1310 |   instead of -1 and removing support for negative values. | 
 | 1311 |  | 
 | 1312 | - Issue #2377: Make importlib the implementation of __import__(). | 
 | 1313 |  | 
 | 1314 | - Issue #1559549: ImportError now has 'name' and 'path' attributes that are set | 
 | 1315 |   using keyword arguments to its constructor. They are currently not set by | 
 | 1316 |   import as they are meant for use by importlib. | 
 | 1317 |  | 
 | 1318 | - Issue #14474: Save and restore exception state in thread.start_new_thread() | 
 | 1319 |   while writing error message if the thread leaves a unhandled exception. | 
 | 1320 |  | 
 | 1321 | - Issue #13019: Fix potential reference leaks in bytearray.extend().  Patch | 
 | 1322 |   by Suman Saha. | 
 | 1323 |  | 
 | 1324 | Library | 
 | 1325 | ------- | 
 | 1326 |  | 
 | 1327 | - Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'. | 
 | 1328 |  | 
 | 1329 | - Issue #14371: Support bzip2 in zipfile module.  Patch by Serhiy Storchaka. | 
 | 1330 |  | 
 | 1331 | - Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running | 
 | 1332 |   step.  Patch by Xavier de Gaye. | 
 | 1333 |  | 
 | 1334 | - Issue #14696: Fix parser module to understand 'nonlocal' declarations. | 
 | 1335 |  | 
 | 1336 | - Issue #10941: Fix imaplib.Internaldate2tuple to produce correct result near | 
 | 1337 |   the DST transition.  Patch by Joe Peterson. | 
 | 1338 |  | 
 | 1339 | - Issue #9154: Fix parser module to understand function annotations. | 
 | 1340 |  | 
 | 1341 | - Issue #6085: In http.server.py SimpleHTTPServer.address_string returns the | 
 | 1342 |   client ip address instead client hostname. Patch by Charles-François Natali. | 
 | 1343 |  | 
 | 1344 | - Issue #14309: Deprecate time.clock(), use time.perf_counter() or | 
 | 1345 |   time.process_time() instead. | 
 | 1346 |  | 
 | 1347 | - Issue #14428: Implement the PEP 418. Add time.get_clock_info(), | 
 | 1348 |   time.perf_counter() and time.process_time() functions, and rename | 
 | 1349 |   time.steady() to time.monotonic(). | 
 | 1350 |  | 
 | 1351 | - Issue #14646: importlib.util.module_for_loader() now sets __loader__ and | 
 | 1352 |   __package__ (when possible). | 
 | 1353 |  | 
 | 1354 | - Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a | 
 | 1355 |   test class that doesn't inherit from TestCase (i.e. a mixin). | 
 | 1356 |  | 
 | 1357 | - Issue #4892: multiprocessing Connections can now be transferred over | 
 | 1358 |   multiprocessing Connections.  Patch by Richard Oudkerk (sbt). | 
 | 1359 |  | 
 | 1360 | - Issue #14160: TarFile.extractfile() failed to resolve symbolic links when | 
 | 1361 |   the links were not located in an archive subdirectory. | 
 | 1362 |  | 
 | 1363 | - Issue #14638: pydoc now treats non-string __name__ values as if they | 
 | 1364 |   were missing, instead of raising an error. | 
 | 1365 |  | 
 | 1366 | - Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites | 
 | 1367 |   which send EOF without trailing \r\n. | 
 | 1368 |  | 
 | 1369 | - Issue #14605: Add importlib.abc.FileLoader, importlib.machinery.(FileFinder, | 
 | 1370 |   SourceFileLoader, SourcelessFileLoader, ExtensionFileLoader). | 
 | 1371 |  | 
 | 1372 | - Issue #13959: imp.cache_from_source()/source_from_cache() now follow | 
 | 1373 |   os.path.join()/split() semantics for path manipulation instead of its prior, | 
 | 1374 |   custom semantics of caring the right-most path separator forward in path | 
 | 1375 |   joining. | 
 | 1376 |  | 
 | 1377 | - Issue #2193: Allow ":" character in Cookie NAME values. | 
 | 1378 |  | 
 | 1379 | - Issue #14629: tokenizer.detect_encoding will specify the filename in the | 
 | 1380 |   SyntaxError exception if found at readline.__self__.name. | 
 | 1381 |  | 
 | 1382 | - Issue #14629: Raise SyntaxError in tokenizer.detect_encoding if the | 
 | 1383 |   first two lines have non-UTF-8 characters without an encoding declaration. | 
 | 1384 |  | 
 | 1385 | - Issue #14308: Fix an exception when a "dummy" thread is in the threading | 
 | 1386 |   module's active list after a fork(). | 
 | 1387 |  | 
 | 1388 | - Issue #11750: The Windows API functions scattered in the _subprocess and | 
 | 1389 |   _multiprocessing.win32 modules now live in a single module "_winapi". | 
 | 1390 |   Patch by sbt. | 
 | 1391 |  | 
 | 1392 | - Issue #14087: multiprocessing: add Condition.wait_for(). Patch by sbt. | 
 | 1393 |  | 
 | 1394 | - Issue #14538: HTMLParser can now parse correctly start tags that contain | 
 | 1395 |   a bare '/'. | 
 | 1396 |  | 
 | 1397 | - Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message. | 
 | 1398 |  | 
 | 1399 | - Issue #14386: Expose the dict_proxy internal type as types.MappingProxyType. | 
 | 1400 |  | 
 | 1401 | - Issue #13959: Make imp.reload() always use a module's __loader__ to perform | 
 | 1402 |   the reload. | 
 | 1403 |  | 
 | 1404 | - Issue #13959: Add imp.py and rename the built-in module to _imp, allowing for | 
 | 1405 |   re-implementing parts of the module in pure Python. | 
 | 1406 |  | 
 | 1407 | - Issue #13496: Fix potential overflow in bisect.bisect algorithm when applied | 
 | 1408 |   to a collection of size > sys.maxsize / 2. | 
 | 1409 |  | 
 | 1410 | - Have importlib take advantage of ImportError's new 'name' and 'path' | 
 | 1411 |   attributes. | 
 | 1412 |  | 
 | 1413 | - Issue #14399: zipfile now recognizes that the archive has been modified even | 
 | 1414 |   if only the comment is changed.  In addition, the TypeError that results from | 
 | 1415 |   trying to set a non-binary value as a comment is now now raised at the time | 
 | 1416 |   the comment is set rather than at the time the zipfile is written. | 
 | 1417 |  | 
 | 1418 | - trace.CoverageResults.is_ignored_filename() now ignores any name that starts | 
 | 1419 |   with "<" and ends with ">" instead of special-casing "<string>" and | 
 | 1420 |   "<doctest ". | 
 | 1421 |  | 
 | 1422 | - Issue #12537: The mailbox module no longer depends on knowledge of internal | 
 | 1423 |   implementation details of the email package Message object. | 
 | 1424 |  | 
 | 1425 | - Issue #7978: socketserver now restarts the select() call when EINTR is | 
 | 1426 |   returned.  This avoids crashing the server loop when a signal is received. | 
 | 1427 |   Patch by Jerzy Kozera. | 
 | 1428 |  | 
 | 1429 | - Issue #14522: Avoid duplicating socket handles in multiprocessing.connection. | 
 | 1430 |   Patch by sbt. | 
 | 1431 |  | 
 | 1432 | - Don't Py_DECREF NULL variable in io.IncrementalNewlineDecoder. | 
 | 1433 |  | 
 | 1434 | - Issue #8515: Set __file__ when run file in IDLE. | 
 | 1435 |   Initial patch by Bruce Frederiksen. | 
 | 1436 |  | 
 | 1437 | - Issue #14496: Fix wrong name in idlelib/tabbedpages.py. | 
 | 1438 |   Patch by Popa Claudiu. | 
 | 1439 |  | 
 | 1440 | - Issue #3033: Add displayof parameter to tkinter font. Patch by Guilherme Polo. | 
 | 1441 |  | 
 | 1442 | - Issue #14482: Raise a ValueError, not a NameError, when trying to create | 
 | 1443 |   a multiprocessing Client or Listener with an AF_UNIX type address under | 
 | 1444 |   Windows.  Patch by Popa Claudiu. | 
 | 1445 |  | 
 | 1446 | - Issue #802310: Generate always unique tkinter font names if not directly passed. | 
 | 1447 |  | 
 | 1448 | - Issue #14151: Raise a ValueError, not a NameError, when trying to create | 
 | 1449 |   a multiprocessing Client or Listener with an AF_PIPE type address under | 
 | 1450 |   non-Windows platforms.  Patch by Popa Claudiu. | 
 | 1451 |  | 
 | 1452 | - Issue #14493: Use gvfs-open or xdg-open in webbrowser. | 
 | 1453 |  | 
 | 1454 | Build | 
 | 1455 | ----- | 
 | 1456 |  | 
 | 1457 | - "make touch" will now touch generated files that are checked into Mercurial, | 
 | 1458 |   after a "hg update" which failed to bring the timestamps into the right order. | 
 | 1459 |  | 
 | 1460 | Tests | 
 | 1461 | ----- | 
 | 1462 |  | 
 | 1463 | - Issue #14026: In test_cmd_line_script, check that sys.argv is populated | 
 | 1464 |   correctly for the various invocation approaches (Patch by Jason Yeo) | 
 | 1465 |  | 
 | 1466 | - Issue #14032: Fix incorrect variable name in test_cmd_line_script debugging | 
 | 1467 |   message (Patch by Jason Yeo) | 
 | 1468 |  | 
 | 1469 | - Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing | 
 | 1470 |   a test failure in test_ssl. | 
 | 1471 |  | 
 | 1472 | - Issue #14355: Regrtest now supports the standard unittest test loading, and | 
 | 1473 |   will use it if a test file contains no `test_main` method. | 
 | 1474 |  | 
 | 1475 | Tools / Demos | 
 | 1476 | ------------- | 
 | 1477 |  | 
 | 1478 | - Issue #3561: The Windows installer now has an option, off by default, for | 
 | 1479 |   placing the Python installation into the system "Path" environment variable. | 
 | 1480 |  | 
 | 1481 | - Issue #13165: stringbench is now available in the Tools/stringbench folder. | 
 | 1482 |   It used to live in its own SVN project. | 
 | 1483 |  | 
 | 1484 |  | 
 | 1485 | What's New in Python 3.3.0 Alpha 2? | 
 | 1486 | =================================== | 
 | 1487 |  | 
 | 1488 | *Release date: 01-Apr-2012* | 
 | 1489 |  | 
 | 1490 | Core and Builtins | 
 | 1491 | ----------------- | 
 | 1492 |  | 
 | 1493 | - Issue #1683368: object.__new__ and object.__init__ raise a TypeError if they | 
 | 1494 |   are passed arguments and their complementary method is not overridden. | 
 | 1495 |  | 
 | 1496 | - Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as | 
 | 1497 |   the module name that was not interned. | 
 | 1498 |  | 
 | 1499 | - Issue #14331: Use significantly less stack space when importing modules by | 
 | 1500 |   allocating path buffers on the heap instead of the stack. | 
 | 1501 |  | 
 | 1502 | - Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not | 
 | 1503 |   passed strings. | 
 | 1504 |  | 
 | 1505 | - Issue #1469629: Allow cycles through an object's __dict__ slot to be | 
 | 1506 |   collected. (For example if ``x.__dict__ is x``). | 
 | 1507 |  | 
 | 1508 | - Issue #14205: dict lookup raises a RuntimeError if the dict is modified | 
 | 1509 |   during a lookup. | 
 | 1510 |  | 
 | 1511 | - Issue #14220: When a generator is delegating to another iterator with the | 
 | 1512 |   yield from syntax, it needs to have its ``gi_running`` flag set to True. | 
 | 1513 |  | 
 | 1514 | - Issue #14435: Remove dedicated block allocator from floatobject.c and rely | 
 | 1515 |   on the PyObject_Malloc() api like all other objects. | 
 | 1516 |  | 
 | 1517 | - Issue #14471: Fix a possible buffer overrun in the winreg module. | 
 | 1518 |  | 
 | 1519 | - Issue #14288: Allow the serialization of builtin iterators | 
 | 1520 |  | 
 | 1521 | Library | 
 | 1522 | ------- | 
 | 1523 |  | 
 | 1524 | - Issue #14300: Under Windows, sockets created using socket.dup() now allow | 
 | 1525 |   overlapped I/O.  Patch by sbt. | 
 | 1526 |  | 
 | 1527 | - Issue #13872: socket.detach() now marks the socket closed (as mirrored | 
 | 1528 |   in the socket repr()).  Patch by Matt Joiner. | 
 | 1529 |  | 
 | 1530 | - Issue #14406: Fix a race condition when using ``concurrent.futures.wait( | 
 | 1531 |   return_when=ALL_COMPLETED)``.  Patch by Matt Joiner. | 
 | 1532 |  | 
 | 1533 | - Issue #5136: deprecate old, unused functions from tkinter. | 
 | 1534 |  | 
 | 1535 | - Issue #14409: IDLE now properly executes commands in the Shell window | 
 | 1536 |   when it cannot read the normal config files on startup and | 
 | 1537 |   has to use the built-in default key bindings. | 
 | 1538 |   There was previously a bug in one of the defaults. | 
 | 1539 |  | 
 | 1540 | - Issue #14416: syslog now defines the LOG_ODELAY and LOG_AUTHPRIV constants | 
 | 1541 |   if they are defined in <syslog.h>. | 
 | 1542 |  | 
 | 1543 | - IDLE can be launched as python -m idlelib | 
 | 1544 |  | 
 | 1545 | - Issue #14295: Add unittest.mock | 
 | 1546 |  | 
 | 1547 | - Issue #7652: Add --with-system-libmpdec option to configure for linking | 
 | 1548 |   the _decimal module against an installed libmpdec. | 
 | 1549 |  | 
 | 1550 | - Issue #14380: MIMEText now defaults to utf-8 when passed non-ASCII unicode | 
 | 1551 |   with no charset specified. | 
 | 1552 |  | 
 | 1553 | - Issue #10340: asyncore - properly handle EINVAL in dispatcher constructor on | 
 | 1554 |   OSX; avoid to call handle_connect in case of a disconnected socket which | 
 | 1555 |   was not meant to connect. | 
 | 1556 |  | 
 | 1557 | - Issue #14204: The ssl module now has support for the Next Protocol | 
 | 1558 |   Negotiation extension, if available in the underlying OpenSSL library. | 
 | 1559 |   Patch by Colin Marc. | 
 | 1560 |  | 
 | 1561 | - Issue #3035: Unused functions from tkinter are marked as pending deprecated. | 
 | 1562 |  | 
 | 1563 | - Issue #12757: Fix the skipping of doctests when python is run with -OO so | 
 | 1564 |   that it works in unittest's verbose mode as well as non-verbose mode. | 
 | 1565 |  | 
 | 1566 | - Issue #7652: Integrate the decimal floating point libmpdec library to speed | 
 | 1567 |   up the decimal module. Performance gains of the new C implementation are | 
 | 1568 |   between 10x and 100x, depending on the application. | 
 | 1569 |  | 
 | 1570 | - Issue #3573: IDLE hangs when passing invalid command line args | 
 | 1571 |   (directory(ies) instead of file(s)) (Patch by Guilherme Polo) | 
 | 1572 |  | 
 | 1573 | - Issue #14269: SMTPD now conforms to the RFC and requires a HELO command | 
 | 1574 |   before MAIL, RCPT, or DATA. | 
 | 1575 |  | 
 | 1576 | - Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr | 
 | 1577 |   attribute. | 
 | 1578 |  | 
 | 1579 | - Issue #14344: fixed the repr of email.policy objects. | 
 | 1580 |  | 
 | 1581 | - Issue #11686: Added missing entries to email package __all__ lists | 
 | 1582 |   (mostly the new Bytes classes). | 
 | 1583 |  | 
 | 1584 | - Issue #14335: multiprocessing's custom Pickler subclass now inherits from | 
 | 1585 |   the C-accelerated implementation.  Patch by sbt. | 
 | 1586 |  | 
 | 1587 | - Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem. | 
 | 1588 |  | 
 | 1589 | - Issue #11199: Fix the with urllib which hangs on particular ftp urls. | 
 | 1590 |  | 
 | 1591 | - Improve the memory utilization and speed of functools.lru_cache. | 
 | 1592 |  | 
 | 1593 | - Issue #14222: Use the new time.steady() function instead of time.time() for | 
 | 1594 |   timeout in queue and threading modules to not be affected of system time | 
 | 1595 |   update. | 
 | 1596 |  | 
 | 1597 | - Issue #13248: Remove lib2to3.pytree.Base.get_prefix/set_prefix. | 
 | 1598 |  | 
 | 1599 | - Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes in the hash | 
 | 1600 |   table internal to the pyexpat module's copy of the expat library to avoid a | 
 | 1601 |   denial of service due to hash collisions.  Patch by David Malcolm with some | 
 | 1602 |   modifications by the expat project. | 
 | 1603 |  | 
 | 1604 | - Issue #14200: Idle shell crash on printing non-BMP unicode character. | 
 | 1605 |  | 
 | 1606 | - Issue #12818: format address no longer needlessly \ escapes ()s in names when | 
 | 1607 |   the name ends up being quoted. | 
 | 1608 |  | 
 | 1609 | - Issue #14062: BytesGenerator now correctly folds Header objects, | 
 | 1610 |   including using linesep when folding. | 
 | 1611 |  | 
 | 1612 | - Issue #13839: When invoked on the command-line, the pstats module now | 
 | 1613 |   accepts several filenames of profile stat files and merges them all. | 
 | 1614 |   Patch by Matt Joiner. | 
 | 1615 |  | 
 | 1616 | - Issue #14291: Email now defaults to utf-8 for non-ASCII unicode headers | 
 | 1617 |   instead of raising an error.  This fixes a regression relative to 2.7. | 
 | 1618 |  | 
 | 1619 | - Issue #989712: Support using Tk without a mainloop. | 
 | 1620 |  | 
 | 1621 | - Issue #5219: Prevent event handler cascade in IDLE. | 
 | 1622 |  | 
 | 1623 | - Issue #3835: Refuse to use unthreaded Tcl in threaded Python. | 
 | 1624 |  | 
 | 1625 | - Issue #2843: Add new Tk API to Tkinter. | 
 | 1626 |  | 
 | 1627 | - Issue #14184: Increase the default stack size for secondary threads on | 
 | 1628 |   Mac OS X to avoid interpreter crashes when using threads on 10.7. | 
 | 1629 |  | 
 | 1630 | - Issue #14180: datetime.date.fromtimestamp(), | 
 | 1631 |   datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() | 
 | 1632 |   now raise an OSError instead of ValueError if localtime() or gmtime() failed. | 
 | 1633 |  | 
 | 1634 | - Issue #14180: time.ctime(), gmtime(), time.localtime(), | 
 | 1635 |   datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp() and | 
 | 1636 |   datetime.datetime.utcfromtimestamp() now raises an OverflowError, instead of | 
 | 1637 |   a ValueError, if the timestamp does not fit in time_t. | 
 | 1638 |  | 
 | 1639 | - Issue #14180: datetime.datetime.fromtimestamp() and | 
 | 1640 |   datetime.datetime.utcfromtimestamp() now round microseconds towards zero | 
 | 1641 |   instead of rounding to nearest with ties going away from zero. | 
 | 1642 |  | 
 | 1643 | - Issue #10543: Fix unittest test discovery with Jython bytecode files. | 
 | 1644 |  | 
 | 1645 | - Issue #1178863: Separate initialisation from setting when initializing | 
 | 1646 |   Tkinter.Variables; harmonize exceptions to ValueError; only delete variables | 
 | 1647 |   that have not been deleted; assert that variable names are strings. | 
 | 1648 |  | 
 | 1649 | - Issue #14104: Implement time.monotonic() on Mac OS X, patch written by | 
 | 1650 |   Nicholas Riley. | 
 | 1651 |  | 
 | 1652 | - Issue #13394: the aifc module now uses warnings.warn() to signal warnings. | 
 | 1653 |  | 
 | 1654 | - Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under | 
 | 1655 |   Windows when the child process has already exited. | 
 | 1656 |  | 
 | 1657 | - Issue #14223: curses.addch() is no more limited to the range 0-255 when the | 
 | 1658 |   Python curses is not linked to libncursesw. It was a regression introduced | 
 | 1659 |   in Python 3.3a1. | 
 | 1660 |  | 
 | 1661 | - Issue #14168: Check for presence of Element._attrs in minidom before | 
 | 1662 |   accessing it. | 
 | 1663 |  | 
 | 1664 | - Issue #12328: Fix multiprocessing's use of overlapped I/O on Windows. | 
 | 1665 |   Also, add a multiprocessing.connection.wait(rlist, timeout=None) function | 
 | 1666 |   for polling multiple objects at once.  Patch by sbt. | 
 | 1667 |  | 
 | 1668 | - Issue #14007: Accept incomplete TreeBuilder objects (missing start, end, | 
 | 1669 |   data or close method) for the Python implementation as well. | 
 | 1670 |   Drop the no-op TreeBuilder().xml() method from the C implementation. | 
 | 1671 |  | 
 | 1672 | - Issue #14210: pdb now has tab-completion not only for command names, but | 
 | 1673 |   also for their arguments, wherever possible. | 
 | 1674 |  | 
 | 1675 | - Issue #14310: Sockets can now be with other processes on Windows using | 
 | 1676 |   the api socket.socket.share() and socket.fromshare(). | 
 | 1677 |  | 
 | 1678 | - Issue #10576: The gc module now has a 'callbacks' member that will get | 
 | 1679 |   called when garbage collection takes place. | 
 | 1680 |  | 
 | 1681 | Build | 
 | 1682 | ----- | 
 | 1683 |  | 
 | 1684 | - Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban. | 
 | 1685 |  | 
 | 1686 | - Issue #14387: Do not include accu.h from Python.h. | 
 | 1687 |  | 
 | 1688 | - Issue #14359: Only use O_CLOEXEC in _posixmodule.c if it is defined. | 
 | 1689 |   Based on patch from Hervé Coatanhay. | 
 | 1690 |  | 
 | 1691 | - Issue #14321: Do not run pgen during the build if files are up to date. | 
 | 1692 |  | 
 | 1693 | Documentation | 
 | 1694 | ------------- | 
 | 1695 |  | 
 | 1696 | - Issue #14034: added the argparse tutorial. | 
 | 1697 |  | 
 | 1698 | - Issue #14324: Fix configure tests for cross builds. | 
 | 1699 |  | 
 | 1700 | - Issue #14327: Call AC_CANONICAL_HOST in configure.ac and check in | 
 | 1701 |   config.{guess,sub}. Don't use uname calls for cross builds. | 
 | 1702 |  | 
 | 1703 | Extension Modules | 
 | 1704 | ----------------- | 
 | 1705 |  | 
 | 1706 | - Issue #9041: An issue in ctypes.c_longdouble, ctypes.c_double, and | 
 | 1707 |   ctypes.c_float that caused an incorrect exception to be returned in the | 
 | 1708 |   case of overflow has been fixed. | 
 | 1709 |  | 
 | 1710 | - Issue #14212: The re module didn't retain a reference to buffers it was | 
 | 1711 |   scanning, resulting in segfaults. | 
 | 1712 |  | 
 | 1713 | - Issue #14259: The finditer() method of re objects did not take any | 
 | 1714 |   keyword arguments, contrary to the documentation. | 
 | 1715 |  | 
 | 1716 | - Issue #10142: Support for SEEK_HOLE/SEEK_DATA (for example, under ZFS). | 
 | 1717 |  | 
 | 1718 | Tests | 
 | 1719 | ----- | 
 | 1720 |  | 
 | 1721 | - Issue #14442: Add missing errno import in test_smtplib. | 
 | 1722 |  | 
 | 1723 | - Issue #8315: (partial fix) python -m unittest test.test_email now works. | 
 | 1724 |  | 
 | 1725 |  | 
 | 1726 | What's New in Python 3.3.0 Alpha 1? | 
 | 1727 | =================================== | 
 | 1728 |  | 
 | 1729 | *Release date: 05-Mar-2012* | 
 | 1730 |  | 
 | 1731 | Core and Builtins | 
 | 1732 | ----------------- | 
 | 1733 |  | 
 | 1734 | - Issue #14172: Fix reference leak when marshalling a buffer-like object | 
 | 1735 |   (other than a bytes object). | 
 | 1736 |  | 
 | 1737 | - Issue #13521: dict.setdefault() now does only one lookup for the given key, | 
 | 1738 |   making it "atomic" for many purposes.  Patch by Filip Gruszczyński. | 
 | 1739 |  | 
 | 1740 | - PEP 409, Issue #6210: "raise X from None" is now supported as a means of | 
 | 1741 |   suppressing the display of the chained exception context. The chained | 
 | 1742 |   context still remains available as the __context__ attribute. | 
 | 1743 |  | 
 | 1744 | - Issue #10181: New memoryview implementation fixes multiple ownership | 
 | 1745 |   and lifetime issues of dynamically allocated Py_buffer members (#9990) | 
 | 1746 |   as well as crashes (#8305, #7433). Many new features have been added | 
 | 1747 |   (See whatsnew/3.3), and the documentation has been updated extensively. | 
 | 1748 |   The ndarray test object from _testbuffer.c implements all aspects of | 
 | 1749 |   PEP-3118, so further development towards the complete implementation | 
 | 1750 |   of the PEP can proceed in a test-driven manner. | 
 | 1751 |  | 
 | 1752 |   Thanks to Nick Coghlan, Antoine Pitrou and Pauli Virtanen for review | 
 | 1753 |   and many ideas. | 
 | 1754 |  | 
 | 1755 | - Issue #12834: Fix incorrect results of memoryview.tobytes() for | 
 | 1756 |   non-contiguous arrays. | 
 | 1757 |  | 
 | 1758 | - Issue #5231: Introduce memoryview.cast() method that allows changing | 
 | 1759 |   format and shape without making a copy of the underlying memory. | 
 | 1760 |  | 
 | 1761 | - Issue #14084: Fix a file descriptor leak when importing a module with a | 
 | 1762 |   bad encoding. | 
 | 1763 |  | 
 | 1764 | - Upgrade Unicode data to Unicode 6.1. | 
 | 1765 |  | 
 | 1766 | - Issue #14040: Remove rarely used file name suffixes for C extensions | 
 | 1767 |   (under POSIX mainly). | 
 | 1768 |  | 
 | 1769 | - Issue #14051: Allow arbitrary attributes to be set of classmethod and | 
 | 1770 |   staticmethod. | 
 | 1771 |  | 
 | 1772 | - Issue #13703: oCERT-2011-003: Randomize hashes of str and bytes to protect | 
 | 1773 |   against denial of service attacks due to hash collisions within the dict and | 
 | 1774 |   set types.  Patch by David Malcolm, based on work by Victor Stinner. | 
 | 1775 |  | 
 | 1776 | - Issue #13020: Fix a reference leak when allocating a structsequence object | 
 | 1777 |   fails.  Patch by Suman Saha. | 
 | 1778 |  | 
 | 1779 | - Issue #13908: Ready types returned from PyType_FromSpec. | 
 | 1780 |  | 
 | 1781 | - Issue #11235: Fix OverflowError when trying to import a source file whose | 
 | 1782 |   modification time doesn't fit in a 32-bit timestamp. | 
 | 1783 |  | 
 | 1784 | - Issue #12705: A SyntaxError exception is now raised when attempting to | 
 | 1785 |   compile multiple statements as a single interactive statement. | 
 | 1786 |  | 
 | 1787 | - Fix the builtin module initialization code to store the init function for | 
 | 1788 |   future reinitialization. | 
 | 1789 |  | 
 | 1790 | - Issue #8052: The posix subprocess module would take a long time closing | 
 | 1791 |   all possible file descriptors in the child process rather than just open | 
 | 1792 |   file descriptors.  It now closes only the open fds if possible for the | 
 | 1793 |   default close_fds=True behavior. | 
 | 1794 |  | 
 | 1795 | - Issue #13629: Renumber the tokens in token.h so that they match the indexes | 
 | 1796 |   into _PyParser_TokenNames. | 
 | 1797 |  | 
 | 1798 | - Issue #13752: Add a casefold() method to str. | 
 | 1799 |  | 
 | 1800 | - Issue #13761: Add a "flush" keyword argument to the print() function, | 
 | 1801 |   used to ensure flushing the output stream. | 
 | 1802 |  | 
 | 1803 | - Issue #13645: pyc files now contain the size of the corresponding source | 
 | 1804 |   code, to avoid timestamp collisions (especially on filesystems with a low | 
 | 1805 |   timestamp resolution) when checking for freshness of the bytecode. | 
 | 1806 |  | 
 | 1807 | - PEP 380, Issue #11682: Add "yield from <x>" to support easy delegation to | 
 | 1808 |   subgenerators (initial patch by Greg Ewing, integration into 3.3 by | 
 | 1809 |   Renaud Blanch, Ryan Kelly, Zbigniew Jędrzejewski-Szmek and Nick Coghlan) | 
 | 1810 |  | 
 | 1811 | - Issue #13748: Raw bytes literals can now be written with the ``rb`` prefix | 
 | 1812 |   as well as ``br``. | 
 | 1813 |  | 
 | 1814 | - Issue #12736: Use full unicode case mappings for upper, lower, and title case. | 
 | 1815 |  | 
 | 1816 | - Issue #12760: Add a create mode to open(). Patch by David Townshend. | 
 | 1817 |  | 
 | 1818 | - Issue #13738: Simplify implementation of bytes.lower() and bytes.upper(). | 
 | 1819 |  | 
 | 1820 | - Issue #13577: Built-in methods and functions now have a __qualname__. | 
 | 1821 |   Patch by sbt. | 
 | 1822 |  | 
 | 1823 | - Issue #6695: Full garbage collection runs now clear the freelist of set | 
 | 1824 |   objects.  Initial patch by Matthias Troffaes. | 
 | 1825 |  | 
 | 1826 | - Fix OSError.__init__ and OSError.__new__ so that each of them can be | 
 | 1827 |   overriden and take additional arguments (followup to issue #12555). | 
 | 1828 |  | 
 | 1829 | - Fix the fix for issue #12149: it was incorrect, although it had the side | 
 | 1830 |   effect of appearing to resolve the issue.  Thanks to Mark Shannon for | 
 | 1831 |   noticing. | 
 | 1832 |  | 
 | 1833 | - Issue #13505: Pickle bytes objects in a way that is compatible with | 
 | 1834 |   Python 2 when using protocols <= 2. | 
 | 1835 |  | 
 | 1836 | - Issue #11147: Fix an unused argument in _Py_ANNOTATE_MEMORY_ORDER.  (Fix | 
 | 1837 |   given by Campbell Barton). | 
 | 1838 |  | 
 | 1839 | - Issue #13503: Use a more efficient reduction format for bytearrays with | 
 | 1840 |   pickle protocol >= 3.  The old reduction format is kept with older protocols | 
 | 1841 |   in order to allow unpickling under Python 2.  Patch by Irmen de Jong. | 
 | 1842 |  | 
 | 1843 | - Issue #7111: Python can now be run without a stdin, stdout or stderr | 
 | 1844 |   stream.  It was already the case with Python 2.  However, the corresponding | 
 | 1845 |   sys module entries are now set to None (instead of an unusable file object). | 
 | 1846 |  | 
 | 1847 | - Issue #11849: Ensure that free()d memory arenas are really released | 
 | 1848 |   on POSIX systems supporting anonymous memory mappings.  Patch by | 
 | 1849 |   Charles-François Natali. | 
 | 1850 |  | 
 | 1851 | - Issue #13452: PyUnicode_EncodeDecimal() doesn't support error handlers | 
 | 1852 |   different than "strict" anymore. The caller was unable to compute the | 
 | 1853 |   size of the output buffer: it depends on the error handler. | 
 | 1854 |  | 
 | 1855 | - PEP 3155 / issue #13448: Qualified name for classes and functions. | 
 | 1856 |  | 
 | 1857 | - Issue #13436: Fix a bogus error message when an AST object was passed | 
 | 1858 |   an invalid integer value. | 
 | 1859 |  | 
 | 1860 | - Issue #13411: memoryview objects are now hashable when the underlying | 
 | 1861 |   object is hashable. | 
 | 1862 |  | 
 | 1863 | - Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER | 
 | 1864 |   to allow compiling extension modules with -Wswitch-enum on gcc. | 
 | 1865 |   Initial patch by Floris Bruynooghe. | 
 | 1866 |  | 
 | 1867 | - Issue #10227: Add an allocation cache for a single slice object.  Patch by | 
 | 1868 |   Stefan Behnel. | 
 | 1869 |  | 
 | 1870 | - Issue #13393: BufferedReader.read1() now asks the full requested size to | 
 | 1871 |   the raw stream instead of limiting itself to the buffer size. | 
 | 1872 |  | 
 | 1873 | - Issue #13392: Writing a pyc file should now be atomic under Windows as well. | 
 | 1874 |  | 
 | 1875 | - Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder | 
 | 1876 |   already accepts them). | 
 | 1877 |  | 
 | 1878 | - Issue #13389: Full garbage collection passes now clear the freelists for | 
 | 1879 |   list and dict objects.  They already cleared other freelists in the | 
 | 1880 |   interpreter. | 
 | 1881 |  | 
 | 1882 | - Issue #13327: Remove the need for an explicit None as the second argument | 
 | 1883 |   to os.utime, os.lutimes, os.futimes, os.futimens, os.futimesat, in | 
 | 1884 |   order to update to the current time. Also added keyword argument | 
 | 1885 |   handling to os.utimensat in order to remove the need for explicit None. | 
 | 1886 |  | 
 | 1887 | - Issue #13350: Simplify some C code by replacing most usages of | 
 | 1888 |   PyUnicode_Format by PyUnicode_FromFormat. | 
 | 1889 |  | 
 | 1890 | - Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode | 
 | 1891 |   error handler in interactive mode (when calling into PyOS_Readline()). | 
 | 1892 |  | 
 | 1893 | - Issue #9896: Add start, stop, and step attributes to range objects. | 
 | 1894 |  | 
 | 1895 | - Issue #13343: Fix a SystemError when a lambda expression uses a global | 
 | 1896 |   variable in the default value of a keyword-only argument: ``lambda *, | 
 | 1897 |   arg=GLOBAL_NAME: None`` | 
 | 1898 |  | 
 | 1899 | - Issue #12797: Added custom opener parameter to builtin open() and | 
 | 1900 |   FileIO.open(). | 
 | 1901 |  | 
 | 1902 | - Issue #10519: Avoid unnecessary recursive function calls in | 
 | 1903 |   setobject.c. | 
 | 1904 |  | 
 | 1905 | - Issue #10363: Deallocate global locks in Py_Finalize(). | 
 | 1906 |  | 
 | 1907 | - Issue #13018: Fix reference leaks in error paths in dictobject.c. | 
 | 1908 |   Patch by Suman Saha. | 
 | 1909 |  | 
 | 1910 | - Issue #13201: Define '==' and '!=' to compare range objects based on | 
 | 1911 |   the sequence of values they define (instead of comparing based on | 
 | 1912 |   object identity). | 
 | 1913 |  | 
 | 1914 | - Issue #1294232: In a few cases involving metaclass inheritance, the | 
 | 1915 |   interpreter would sometimes invoke the wrong metaclass when building a new | 
 | 1916 |   class object. These cases now behave correctly. Patch by Daniel Urban. | 
 | 1917 |  | 
 | 1918 | - Issue #12753: Add support for Unicode name aliases and named sequences. | 
 | 1919 |   Both ``unicodedata.lookup()`` and '\N{...}' now resolve aliases, | 
 | 1920 |   and ``unicodedata.lookup()`` resolves named sequences too. | 
 | 1921 |  | 
 | 1922 | - Issue #12170: The count(), find(), rfind(), index() and rindex() methods | 
 | 1923 |   of bytes and bytearray objects now accept an integer between 0 and 255 | 
 | 1924 |   as their first argument.  Patch by Petri Lehtinen. | 
 | 1925 |  | 
 | 1926 | - Issue #12604: VTRACE macro expanded to no-op in _sre.c to avoid compiler | 
 | 1927 |   warnings. Patch by Josh Triplett and Petri Lehtinen. | 
 | 1928 |  | 
 | 1929 | - Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore | 
 | 1930 |   error handlers on all Windows versions. The MBCS codec is now supporting all | 
 | 1931 |   error handlers, instead of only replace to encode and ignore to decode. | 
 | 1932 |  | 
 | 1933 | - Issue #13188: When called without an explicit traceback argument, | 
 | 1934 |   generator.throw() now gets the traceback from the passed exception's | 
 | 1935 |   ``__traceback__`` attribute.  Patch by Petri Lehtinen. | 
 | 1936 |  | 
 | 1937 | - Issue #13146: Writing a pyc file is now atomic under POSIX. | 
 | 1938 |  | 
 | 1939 | - Issue #7833: Extension modules built using distutils on Windows will no | 
 | 1940 |   longer include a "manifest" to prevent them failing at import time in some | 
 | 1941 |   embedded situations. | 
 | 1942 |  | 
 | 1943 | - PEP 3151 / issue #12555: reworking the OS and IO exception hierarchy. | 
 | 1944 |  | 
| R David Murray | 7ecc5ba | 2012-10-06 22:10:42 -0400 | [diff] [blame] | 1945 | - Issue #13560: Add PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() | 
 | 1946 |   and PyUnicode_EncodeLocale() functions to the C API to decode/encode from/to | 
 | 1947 |   the current locale encoding. | 
 | 1948 |  | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 1949 | - Add internal API for static strings (_Py_identifier et al.). | 
 | 1950 |  | 
 | 1951 | - Issue #13063: the Windows error ERROR_NO_DATA (numbered 232 and described | 
 | 1952 |   as "The pipe is being closed") is now mapped to POSIX errno EPIPE | 
 | 1953 |   (previously EINVAL). | 
 | 1954 |  | 
 | 1955 | - Issue #12911: Fix memory consumption when calculating the repr() of huge | 
 | 1956 |   tuples or lists. | 
 | 1957 |  | 
 | 1958 | - PEP 393: flexible string representation. Thanks to Torsten Becker for the | 
 | 1959 |   initial implementation, and Victor Stinner for various bug fixes. | 
 | 1960 |  | 
 | 1961 | - Issue #14081: The 'sep' and 'maxsplit' parameter to str.split, bytes.split, | 
 | 1962 |   and bytearray.split may now be passed as keyword arguments. | 
 | 1963 |  | 
 | 1964 | - Issue #13012: The 'keepends' parameter to str.splitlines may now be passed | 
 | 1965 |   as a keyword argument:  "my_string.splitlines(keepends=True)".  The same | 
 | 1966 |   change also applies to bytes.splitlines and bytearray.splitlines. | 
 | 1967 |  | 
 | 1968 | - Issue #7732: Don't open a directory as a file anymore while importing a | 
 | 1969 |   module. Ignore the direcotry if its name matchs the module name (e.g. | 
 | 1970 |   "__init__.py") and raise a ImportError instead. | 
 | 1971 |  | 
 | 1972 | - Issue #13021: Missing decref on an error path.  Thanks to Suman Saha for | 
 | 1973 |   finding the bug and providing a patch. | 
 | 1974 |  | 
 | 1975 | - Issue #12973: Fix overflow checks that relied on undefined behaviour in | 
 | 1976 |   list_repeat (listobject.c) and islice_next (itertoolsmodule.c).  These bugs | 
 | 1977 |   caused test failures with recent versions of Clang. | 
 | 1978 |  | 
 | 1979 | - Issue #12904: os.utime, os.futimes, os.lutimes, and os.futimesat now write | 
 | 1980 |   atime and mtime with nanosecond precision on modern POSIX platforms. | 
 | 1981 |  | 
 | 1982 | - Issue #12802: the Windows error ERROR_DIRECTORY (numbered 267) is now | 
 | 1983 |   mapped to POSIX errno ENOTDIR (previously EINVAL). | 
 | 1984 |  | 
 | 1985 | - Issue #9200: The str.is* methods now work with strings that contain non-BMP | 
 | 1986 |   characters even in narrow Unicode builds. | 
 | 1987 |  | 
 | 1988 | - Issue #12791: Break reference cycles early when a generator exits with | 
 | 1989 |   an exception. | 
 | 1990 |  | 
 | 1991 | - Issue #12773: Make __doc__ mutable on user-defined classes. | 
 | 1992 |  | 
 | 1993 | - Issue #12766: Raise a ValueError when creating a class with a class variable | 
 | 1994 |   that conflicts with a name in __slots__. | 
 | 1995 |  | 
 | 1996 | - Issue #12266: Fix str.capitalize() to correctly uppercase/lowercase | 
 | 1997 |   titlecased and cased non-letter characters. | 
 | 1998 |  | 
 | 1999 | - Issue #12732: In narrow unicode builds, allow Unicode identifiers which fall | 
 | 2000 |   outside the BMP. | 
 | 2001 |  | 
 | 2002 | - Issue #12575: Validate user-generated AST before it is compiled. | 
 | 2003 |  | 
 | 2004 | - Make type(None), type(Ellipsis), and type(NotImplemented) callable. They | 
 | 2005 |   return the respective singleton instances. | 
 | 2006 |  | 
 | 2007 | - Forbid summing bytes with sum(). | 
 | 2008 |  | 
 | 2009 | - Verify the types of AST strings and identifiers provided by the user before | 
 | 2010 |   compiling them. | 
 | 2011 |  | 
 | 2012 | - Issue #12647: The None object now has a __bool__() method that returns False. | 
 | 2013 |   Formerly, bool(None) returned False only because of special case logic | 
 | 2014 |   in PyObject_IsTrue(). | 
 | 2015 |  | 
 | 2016 | - Issue #12579: str.format_map() now raises a ValueError if used on a | 
 | 2017 |   format string that contains positional fields. Initial patch by | 
 | 2018 |   Julian Berman. | 
 | 2019 |  | 
 | 2020 | - Issue #10271: Allow warnings.showwarning() be any callable. | 
 | 2021 |  | 
 | 2022 | - Issue #11627: Fix segfault when __new__ on a exception returns a | 
 | 2023 |   non-exception class. | 
 | 2024 |  | 
 | 2025 | - Issue #12149: Update the method cache after a type's dictionary gets | 
 | 2026 |   cleared by the garbage collector.  This fixes a segfault when an instance | 
 | 2027 |   and its type get caught in a reference cycle, and the instance's | 
 | 2028 |   deallocator calls one of the methods on the type (e.g. when subclassing | 
 | 2029 |   IOBase).  Diagnosis and patch by Davide Rizzo. | 
 | 2030 |  | 
 | 2031 | - Issue #9611, #9015: FileIO.read() clamps the length to INT_MAX on Windows. | 
 | 2032 |  | 
 | 2033 | - Issue #9642: Uniformize the tests on the availability of the mbcs codec, add | 
 | 2034 |   a new HAVE_MBCS define. | 
 | 2035 |  | 
 | 2036 | - Issue #9642: Fix filesystem encoding initialization: use the ANSI code page | 
 | 2037 |   on Windows if the mbcs codec is not available, and fail with a fatal error if | 
 | 2038 |   we cannot get the locale encoding (if nl_langinfo(CODESET) is not available) | 
 | 2039 |   instead of using UTF-8. | 
 | 2040 |  | 
 | 2041 | - When a generator yields, do not retain the caller's exception state on the | 
 | 2042 |   generator. | 
 | 2043 |  | 
 | 2044 | - Issue #12475: Prevent generators from leaking their exception state into the | 
 | 2045 |   caller's frame as they return for the last time. | 
 | 2046 |  | 
 | 2047 | - Issue #12291: You can now load multiple marshalled objects from a stream, | 
 | 2048 |   with other data interleaved between marshalled objects. | 
 | 2049 |  | 
 | 2050 | - Issue #12356: When required positional or keyword-only arguments are not | 
 | 2051 |   given, produce a informative error message which includes the name(s) of the | 
 | 2052 |   missing arguments. | 
 | 2053 |  | 
 | 2054 | - Issue #12370: Fix super with no arguments when __class__ is overriden in the | 
 | 2055 |   class body. | 
 | 2056 |  | 
 | 2057 | - Issue #12084: os.stat on Windows now works properly with relative symbolic | 
 | 2058 |   links when called from any directory. | 
 | 2059 |  | 
 | 2060 | - Loosen type restrictions on the __dir__ method. __dir__ can now return any | 
 | 2061 |   sequence, which will be converted to a list and sorted by dir(). | 
 | 2062 |  | 
 | 2063 | - Issue #12265: Make error messages produced by passing an invalid set of | 
 | 2064 |   arguments to a function more informative. | 
 | 2065 |  | 
 | 2066 | - Issue #12225: Still allow Python to build if Python is not in its hg repo or | 
 | 2067 |   mercurial is not installed. | 
 | 2068 |  | 
 | 2069 | - Issue #1195: my_fgets() now always clears errors before calling fgets(). Fix | 
 | 2070 |   the following case: sys.stdin.read() stopped with CTRL+d (end of file), | 
 | 2071 |   raw_input() interrupted by CTRL+c. | 
 | 2072 |  | 
 | 2073 | - Issue #12216: Allow unexpected EOF errors to happen on any line of the file. | 
 | 2074 |  | 
 | 2075 | - Issue #12199: The TryExcept and TryFinally and AST nodes have been unified | 
 | 2076 |   into a Try node. | 
 | 2077 |  | 
 | 2078 | - Issue #9670: Increase the default stack size for secondary threads on | 
 | 2079 |   Mac OS X and FreeBSD to reduce the chances of a crash instead of a | 
 | 2080 |   "maximum recursion depth" RuntimeError exception. | 
 | 2081 |   (patch by Ronald Oussoren) | 
 | 2082 |  | 
 | 2083 | - Issue #12106: The use of the multiple-with shorthand syntax is now reflected | 
 | 2084 |   in the AST. | 
 | 2085 |  | 
 | 2086 | - Issue #12190: Try to use the same filename object when compiling unmarshalling | 
 | 2087 |   a code objects in the same file. | 
 | 2088 |  | 
 | 2089 | - Issue #12166: Move implementations of dir() specialized for various types into | 
 | 2090 |   the __dir__() methods of those types. | 
 | 2091 |  | 
 | 2092 | - Issue #5715: In socketserver, close the server socket in the child process. | 
 | 2093 |  | 
 | 2094 | - Correct lookup of __dir__ on objects. Among other things, this causes errors | 
 | 2095 |   besides AttributeError found on lookup to be propagated. | 
 | 2096 |  | 
 | 2097 | - Issue #12060: Use sig_atomic_t type and volatile keyword in the signal | 
 | 2098 |   module. Patch written by Charles-François Natali. | 
 | 2099 |  | 
 | 2100 | - Issue #1746656: Added the if_nameindex, if_indextoname, if_nametoindex | 
 | 2101 |   methods to the socket module. | 
 | 2102 |  | 
 | 2103 | - Issue #12044: Fixed subprocess.Popen when used as a context manager to | 
 | 2104 |   wait for the process to end when exiting the context to avoid unintentionally | 
 | 2105 |   leaving zombie processes around. | 
 | 2106 |  | 
 | 2107 | - Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, | 
 | 2108 |   clear the end-of-file indicator after CTRL+d. | 
 | 2109 |  | 
 | 2110 | - Issue #1856: Avoid crashes and lockups when daemon threads run while the | 
 | 2111 |   interpreter is shutting down; instead, these threads are now killed when | 
 | 2112 |   they try to take the GIL. | 
 | 2113 |  | 
 | 2114 | - Issue #9756: When calling a method descriptor or a slot wrapper descriptor, | 
 | 2115 |   the check of the object type doesn't read the __class__ attribute anymore. | 
 | 2116 |   Fix a crash if a class override its __class__ attribute (e.g. a proxy of the | 
 | 2117 |   str type). Patch written by Andreas Stührk. | 
 | 2118 |  | 
 | 2119 | - Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_* | 
 | 2120 |   APIs, to avoid a crash with the pthread implementation in RHEL 5.  Patch | 
 | 2121 |   by Charles-François Natali. | 
 | 2122 |  | 
 | 2123 | - Issue #10914: Initialize correctly the filesystem codec when creating a new | 
 | 2124 |   subinterpreter to fix a bootstrap issue with codecs implemented in Python, as | 
 | 2125 |   the ISO-8859-15 codec. | 
 | 2126 |  | 
 | 2127 | - Issue #11918: OS/2 and VMS are no more supported because of the lack of | 
 | 2128 |   maintainer. | 
 | 2129 |  | 
 | 2130 | - Issue #6780: fix starts/endswith error message to mention that tuples are | 
 | 2131 |   accepted too. | 
 | 2132 |  | 
 | 2133 | - Issue #5057: fix a bug in the peepholer that led to non-portable pyc files | 
 | 2134 |   between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP | 
 | 2135 |   chars (e.g. "\U00012345"[0]). | 
 | 2136 |  | 
 | 2137 | - Issue #11845: Fix typo in rangeobject.c that caused a crash in | 
 | 2138 |   compute_slice_indices.  Patch by Daniel Urban. | 
 | 2139 |  | 
 | 2140 | - Issue #5673: Added a `timeout` keyword argument to subprocess.Popen.wait, | 
 | 2141 |   subprocess.Popen.communicated, subprocess.call, subprocess.check_call, and | 
 | 2142 |   subprocess.check_output.  If the blocking operation takes more than `timeout` | 
 | 2143 |   seconds, the `subprocess.TimeoutExpired` exception is raised. | 
 | 2144 |  | 
 | 2145 | - Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted | 
 | 2146 |   (EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch | 
 | 2147 |   written by Charles-Francois Natali. | 
 | 2148 |  | 
 | 2149 | - Issue #9319: Include the filename in "Non-UTF8 code ..." syntax error. | 
 | 2150 |  | 
 | 2151 | - Issue #10785: Store the filename as Unicode in the Python parser. | 
 | 2152 |  | 
 | 2153 | - Issue #11619: _PyImport_LoadDynamicModule() doesn't encode the path to bytes | 
 | 2154 |   on Windows. | 
 | 2155 |  | 
 | 2156 | - Issue #10998: Remove mentions of -Q, sys.flags.division_warning and | 
 | 2157 |   Py_DivisionWarningFlag left over from Python 2. | 
 | 2158 |  | 
 | 2159 | - Issue #11244: Remove an unnecessary peepholer check that was preventing | 
 | 2160 |   negative zeros from being constant-folded properly. | 
 | 2161 |  | 
 | 2162 | - Issue #11395: io.FileIO().write() clamps the data length to 32,767 bytes on | 
 | 2163 |   Windows if the file is a TTY to workaround a Windows bug. The Windows console | 
 | 2164 |   returns an error (12: not enough space error) on writing into stdout if | 
 | 2165 |   stdout mode is binary and the length is greater than 66,000 bytes (or less, | 
 | 2166 |   depending on heap usage). | 
 | 2167 |  | 
 | 2168 | - Issue #11320: fix bogus memory management in Modules/getpath.c, leading to | 
 | 2169 |   a possible crash when calling Py_SetPath(). | 
 | 2170 |  | 
 | 2171 | - Issue #11432: A bug was introduced in subprocess.Popen on posix systems with | 
 | 2172 |   3.2.0 where the stdout or stderr file descriptor being the same as the stdin | 
 | 2173 |   file descriptor would raise an exception. webbrowser.open would fail. fixed. | 
 | 2174 |  | 
 | 2175 | - Issue #9856: Change object.__format__ with a non-empty format string | 
 | 2176 |   to be a DeprecationWarning. In 3.2 it was a PendingDeprecationWarning. | 
 | 2177 |   In 3.4 it will be a TypeError. | 
 | 2178 |  | 
 | 2179 | - Issue #11244: The peephole optimizer is now able to constant-fold | 
 | 2180 |   arbitrarily complex expressions.  This also fixes a 3.2 regression where | 
 | 2181 |   operations involving negative numbers were not constant-folded. | 
 | 2182 |  | 
 | 2183 | - Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when | 
 | 2184 |   there are many tags (e.g. when using mq).  Patch by Nadeem Vawda. | 
 | 2185 |  | 
 | 2186 | - Issue #11335: Fixed a memory leak in list.sort when the key function | 
 | 2187 |   throws an exception. | 
 | 2188 |  | 
 | 2189 | - Issue #8923: When a string is encoded to UTF-8 in strict mode, the result is | 
 | 2190 |   cached into the object. Examples: str.encode(), str.encode('utf-8'), | 
 | 2191 |   PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(unicode, "utf-8", | 
 | 2192 |   NULL). | 
 | 2193 |  | 
 | 2194 | - Issue #10831: PyUnicode_FromFormat() supports %li, %lli and %zi formats. | 
 | 2195 |  | 
 | 2196 | - Issue #10829: Refactor PyUnicode_FromFormat(), use the same function to parse | 
 | 2197 |   the format string in the 3 steps, fix crashs on invalid format strings. | 
 | 2198 |  | 
 | 2199 | - Issue #13007: whichdb should recognize gdbm 1.9 magic numbers. | 
 | 2200 |  | 
 | 2201 | - Issue #11246: Fix PyUnicode_FromFormat("%V") to decode the byte string from | 
 | 2202 |   UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode). | 
 | 2203 |   Patch written by Ray Allen. | 
 | 2204 |  | 
 | 2205 | - Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with | 
 | 2206 |   a buffer struct having a NULL data pointer. | 
 | 2207 |  | 
 | 2208 | - Issue #11272: On Windows, input() strips '\r' (and not only '\n'), and | 
 | 2209 |   sys.stdin uses universal newline (replace '\r\n' by '\n'). | 
 | 2210 |  | 
 | 2211 | - issue #11828: startswith and endswith don't accept None as slice index. | 
 | 2212 |   Patch by Torsten Becker. | 
 | 2213 |  | 
 | 2214 | - Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on | 
 | 2215 |   narrow build. | 
 | 2216 |  | 
 | 2217 | - Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx(). | 
 | 2218 |   It encoded the Unicode filename to UTF-8, but the encoding fails on | 
 | 2219 |   undecodable filename (on surrogate characters) which raises an unexpected | 
 | 2220 |   UnicodeEncodeError on recursion limit. | 
 | 2221 |  | 
 | 2222 | - Issue #11187: Remove bootstrap code (use ASCII) of | 
 | 2223 |   PyUnicode_AsEncodedString(), it was replaced by a better fallback (use the | 
 | 2224 |   locale encoding) in PyUnicode_EncodeFSDefault(). | 
 | 2225 |  | 
 | 2226 | - Check for NULL result in PyType_FromSpec. | 
 | 2227 |  | 
 | 2228 | - Issue #10516: New copy() and clear() methods for lists and bytearrays. | 
 | 2229 |  | 
 | 2230 | - Issue #11386: bytearray.pop() now throws IndexError when the bytearray is | 
 | 2231 |   empty, instead of OverflowError. | 
 | 2232 |  | 
 | 2233 | - Issue #12380: The rjust, ljust and center methods of bytes and bytearray | 
 | 2234 |   now accept a bytearray argument. | 
 | 2235 |  | 
 | 2236 | Library | 
 | 2237 | ------- | 
 | 2238 |  | 
 | 2239 | - Issue #14195: An issue that caused weakref.WeakSet instances to incorrectly | 
 | 2240 |   return True for a WeakSet instance 'a' in both 'a < a' and 'a > a' has been | 
 | 2241 |   fixed. | 
 | 2242 |  | 
 | 2243 | - Issue #14166: Pickler objects now have an optional ``dispatch_table`` | 
 | 2244 |   attribute which allows to set custom per-pickler reduction functions. | 
 | 2245 |   Patch by sbt. | 
 | 2246 |  | 
 | 2247 | - Issue #14177: marshal.loads() now raises TypeError when given an unicode | 
 | 2248 |   string.  Patch by Guilherme Gonçalves. | 
 | 2249 |  | 
 | 2250 | - Issue #13550: Remove the debug machinery from the threading module: remove | 
 | 2251 |   verbose arguments from all threading classes and functions. | 
 | 2252 |  | 
 | 2253 | - Issue #14159: Fix the len() of weak containers (WeakSet, WeakKeyDictionary, | 
 | 2254 |   WeakValueDictionary) to return a better approximation when some objects | 
 | 2255 |   are dead or dying.  Moreover, the implementation is now O(1) rather than | 
 | 2256 |   O(n). | 
 | 2257 |  | 
 | 2258 | - Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode. | 
 | 2259 |   Patch by Mikhail Novikov. | 
 | 2260 |  | 
 | 2261 | - Issue #11841: Fix comparison bug with 'rc' versions in packaging.version. | 
 | 2262 |   Patch by Filip Gruszczyński. | 
 | 2263 |  | 
 | 2264 | - Issue #13447: Add a test file to host regression tests for bugs in the | 
 | 2265 |   scripts found in the Tools directory. | 
 | 2266 |  | 
 | 2267 | - Issue #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils | 
 | 2268 |   on Windows.  Also fixed in packaging. | 
 | 2269 |  | 
 | 2270 | - Issue #8033: sqlite3: Fix 64-bit integer handling in user functions | 
 | 2271 |   on 32-bit architectures. Initial patch by Philippe Devalkeneer. | 
 | 2272 |  | 
 | 2273 | - HTMLParser is now able to handle slashes in the start tag. | 
 | 2274 |  | 
 | 2275 | - Issue #13641: Decoding functions in the base64 module now accept ASCII-only | 
 | 2276 |   unicode strings.  Patch by Catalin Iacob. | 
 | 2277 |  | 
 | 2278 | - Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a | 
 | 2279 |   new importlib.invalidate_caches() function. | 
 | 2280 |  | 
 | 2281 | - Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in | 
 | 2282 |   SimpleXMLRPCServer upon malformed POST request. | 
 | 2283 |  | 
 | 2284 | - Issue #13961: Move importlib over to using os.replace() for atomic renaming. | 
 | 2285 |  | 
 | 2286 | - Do away with ambiguous level values (as suggested by PEP 328) in | 
 | 2287 |   importlib.__import__() by raising ValueError when level < 0. | 
 | 2288 |  | 
 | 2289 | - Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF. | 
 | 2290 |  | 
 | 2291 | - Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert(). | 
 | 2292 |  | 
 | 2293 | - Issue #13777: Add PF_SYSTEM sockets on OS X. | 
 | 2294 |   Patch by Michael Goderbauer. | 
 | 2295 |  | 
 | 2296 | - Issue #13015: Fix a possible reference leak in defaultdict.__repr__. | 
 | 2297 |   Patch by Suman Saha. | 
 | 2298 |  | 
 | 2299 | - Issue #1326113: distutils' and packaging's build_ext commands option now | 
 | 2300 |   correctly parses multiple values (separated by whitespace or commas) given | 
 | 2301 |   to their --libraries option. | 
 | 2302 |  | 
 | 2303 | - Issue #10287: nntplib now queries the server's CAPABILITIES first before | 
 | 2304 |   sending MODE READER, and only sends it if not already in READER mode. | 
 | 2305 |   Patch by Hynek Schlawack. | 
 | 2306 |  | 
 | 2307 | - Issue #13993: HTMLParser is now able to handle broken end tags when | 
 | 2308 |   strict=False. | 
 | 2309 |  | 
 | 2310 | - Issue #13930: lib2to3 now supports writing converted output files to another | 
 | 2311 |   directory tree as well as copying unchanged files and altering the file | 
 | 2312 |   suffix. | 
 | 2313 |  | 
 | 2314 | - Issue #9750: Fix sqlite3.Connection.iterdump on tables and fields | 
 | 2315 |   with a name that is a keyword or contains quotes. Patch by Marko | 
 | 2316 |   Kohtala. | 
 | 2317 |  | 
 | 2318 | - Issue #10287: nntplib now queries the server's CAPABILITIES again after | 
 | 2319 |   authenticating (since the result may change, according to RFC 4643). | 
 | 2320 |   Patch by Hynek Schlawack. | 
 | 2321 |  | 
 | 2322 | - Issue #13989: Document that GzipFile does not support text mode, and give a | 
 | 2323 |   more helpful error message when opened with an invalid mode string. | 
 | 2324 |  | 
 | 2325 | - Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building | 
 | 2326 |   Distutils-based packages with C extension modules may fail because | 
 | 2327 |   Apple has removed gcc-4.2, the version used to build python.org | 
 | 2328 |   64-bit/32-bit Pythons.  If the user does not explicitly override | 
 | 2329 |   the default C compiler by setting the CC environment variable, | 
 | 2330 |   Distutils will now attempt to compile extension modules with clang | 
 | 2331 |   if gcc-4.2 is required but not found. Also as a convenience, if | 
 | 2332 |   the user does explicitly set CC, substitute its value as the default | 
 | 2333 |   compiler in the Distutils LDSHARED configuration variable for OS X. | 
 | 2334 |   (Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u | 
 | 2335 |   SDK, neither of which are available in Xcode 4.  This change does not | 
 | 2336 |   attempt to override settings to support their use with Xcode 4.) | 
 | 2337 |  | 
 | 2338 | - Issue #13960: HTMLParser is now able to handle broken comments when | 
 | 2339 |   strict=False. | 
 | 2340 |  | 
 | 2341 | - Issue #13921: Undocument and clean up sqlite3.OptimizedUnicode, | 
 | 2342 |   which is obsolete in Python 3.x. It's now aliased to str for | 
 | 2343 |   backwards compatibility. | 
 | 2344 |  | 
 | 2345 | - When '' is a path (e.g. in sys.path), make sure __file__ uses the current | 
 | 2346 |   working directory instead of '' in importlib. | 
 | 2347 |  | 
 | 2348 | - Issue #13609: Add two functions to query the terminal size: | 
 | 2349 |   os.get_terminal_size (low level) and shutil.get_terminal_size (high level). | 
 | 2350 |   Patch by Zbigniew Jędrzejewski-Szmek. | 
 | 2351 |  | 
 | 2352 | - Issue #13845: On Windows, time.time() now uses GetSystemTimeAsFileTime() | 
 | 2353 |   instead of ftime() to have a resolution of 100 ns instead of 1 ms (the clock | 
 | 2354 |   accuracy is between 0.5 ms and 15 ms). | 
 | 2355 |  | 
 | 2356 | - Issue #13846: Add time.monotonic(), monotonic clock. | 
 | 2357 |  | 
 | 2358 | - Issue #8184: multiprocessing: On Windows, don't set SO_REUSEADDR on | 
 | 2359 |   Connection sockets, and set FILE_FLAG_FIRST_PIPE_INSTANCE on named pipes, to | 
 | 2360 |   make sure two listeners can't bind to the same socket/pipe (or any existing | 
 | 2361 |   socket/pipe). | 
 | 2362 |  | 
 | 2363 | - Issue #9021: Add an introduction to the copy module documentation. | 
 | 2364 |  | 
 | 2365 | - Issue #6005: Examples in the socket library documentation use sendall, where | 
 | 2366 |   relevant, instead send method. | 
 | 2367 |  | 
 | 2368 | - Issue #10811: Fix recursive usage of cursors. Instead of crashing, | 
 | 2369 |   raise a ProgrammingError now. | 
 | 2370 |  | 
 | 2371 | - Issue #10881: Fix test_site failure with OS X framework builds. | 
 | 2372 |  | 
 | 2373 | - Issue #964437: Make IDLE help window non-modal. | 
 | 2374 |   Patch by Guilherme Polo and Roger Serwy. | 
 | 2375 |  | 
 | 2376 | - Issue #13734: Add os.fwalk(), a directory walking function yielding file | 
 | 2377 |   descriptors. | 
 | 2378 |  | 
 | 2379 | - Issue #2945: Make the distutils upload command aware of bdist_rpm products. | 
 | 2380 |  | 
 | 2381 | - Issue #13712: pysetup create should not convert package_data to extra_files. | 
 | 2382 |  | 
 | 2383 | - Issue #11805: package_data in setup.cfg should allow more than one value. | 
 | 2384 |  | 
 | 2385 | - Issue #13933: IDLE auto-complete did not work with some imported | 
 | 2386 |   module, like hashlib.  (Patch by Roger Serwy) | 
 | 2387 |  | 
 | 2388 | - Issue #13901: Prevent test_distutils failures on OS X with --enable-shared. | 
 | 2389 |  | 
 | 2390 | - Issue #13676: Handle strings with embedded zeros correctly in sqlite3. | 
 | 2391 |  | 
 | 2392 | - Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell. | 
 | 2393 |   Original patches by Marco Scataglini and Roger Serwy. | 
 | 2394 |  | 
 | 2395 | - Issue #8828: Add new function os.replace(), for cross-platform renaming | 
 | 2396 |   with overwriting. | 
 | 2397 |  | 
 | 2398 | - Issue #13848: open() and the FileIO constructor now check for NUL | 
 | 2399 |   characters in the file name.  Patch by Hynek Schlawack. | 
 | 2400 |  | 
 | 2401 | - Issue #13806: The size check in audioop decompression functions was too | 
 | 2402 |   strict and could reject valid compressed data.  Patch by Oleg Plakhotnyuk. | 
 | 2403 |  | 
 | 2404 | - Issue #13812: When a multiprocessing Process child raises an exception, | 
 | 2405 |   flush stderr after printing the exception traceback. | 
 | 2406 |  | 
 | 2407 | - Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC | 
 | 2408 |   IV attack countermeasure. | 
 | 2409 |  | 
 | 2410 | - Issue #13847: time.localtime() and time.gmtime() now raise an OSError instead | 
 | 2411 |   of ValueError on failure. time.ctime() and time.asctime() now raises an | 
 | 2412 |   OSError if localtime() failed. time.clock() now raises a RuntimeError if the | 
 | 2413 |   processor time used is not available or its value cannot be represented | 
 | 2414 |  | 
 | 2415 | - Issue #13862: Fix spurious failure in test_zlib due to runtime/compile time | 
 | 2416 |   minor versions not matching. | 
 | 2417 |  | 
 | 2418 | - Issue #12804: Fix test_socket and test_urllib2net failures when running tests | 
 | 2419 |   on a system without internet access. | 
 | 2420 |  | 
 | 2421 | - Issue #13772: In os.symlink() under Windows, do not try to guess the link | 
 | 2422 |   target's type (file or directory).  The detection was buggy and made the | 
 | 2423 |   call non-atomic (therefore prone to race conditions). | 
 | 2424 |  | 
 | 2425 | - Issue #6631: Disallow relative file paths in urllib urlopen methods. | 
 | 2426 |  | 
 | 2427 | - Issue #13722: Avoid silencing ImportErrors when initializing the codecs | 
 | 2428 |   registry. | 
 | 2429 |  | 
 | 2430 | - Issue #13781: Fix GzipFile bug that caused an exception to be raised when | 
 | 2431 |   opening for writing using a fileobj returned by os.fdopen(). | 
 | 2432 |  | 
 | 2433 | - Issue #13803: Under Solaris, distutils doesn't include bitness | 
 | 2434 |   in the directory name. | 
 | 2435 |  | 
 | 2436 | - Issue #10278: Add time.wallclock() function, monotonic clock. | 
 | 2437 |  | 
 | 2438 | - Issue #13809: Fix regression where bz2 module wouldn't work when threads are | 
 | 2439 |   disabled. Original patch by Amaury Forgeot d'Arc. | 
 | 2440 |  | 
 | 2441 | - Issue #13589: Fix some serialization primitives in the aifc module. | 
 | 2442 |   Patch by Oleg Plakhotnyuk. | 
 | 2443 |  | 
 | 2444 | - Issue #13642: Unquote before b64encoding user:password during Basic | 
 | 2445 |   Authentication. Patch contributed by Joonas Kuorilehto. | 
 | 2446 |  | 
 | 2447 | - Issue #13726: Fix the ambiguous -S flag in regrtest. It is -o/--slow for slow | 
 | 2448 |   tests. | 
 | 2449 |  | 
 | 2450 | - Issue #12364: Fix a hang in concurrent.futures.ProcessPoolExecutor. | 
 | 2451 |   The hang would occur when retrieving the result of a scheduled future after | 
 | 2452 |   the executor had been shut down. | 
 | 2453 |  | 
 | 2454 | - Issue #13502: threading: Fix a race condition in Event.wait() that made it | 
 | 2455 |   return False when the event was set and cleared right after. | 
 | 2456 |  | 
 | 2457 | - Issue #9993: When the source and destination are on different filesystems, | 
 | 2458 |   and the source is a symlink, shutil.move() now recreates a symlink on the | 
 | 2459 |   destination instead of copying the file contents.  Patch by Jonathan Niehof | 
 | 2460 |   and Hynek Schlawack. | 
 | 2461 |  | 
 | 2462 | - Issue #12926: Fix a bug in tarfile's link extraction. | 
 | 2463 |  | 
 | 2464 | - Issue #13696: Fix the 302 Relative URL Redirection problem. | 
 | 2465 |  | 
 | 2466 | - Issue #13636: Weak ciphers are now disabled by default in the ssl module | 
 | 2467 |   (except when SSLv2 is explicitly asked for). | 
 | 2468 |  | 
 | 2469 | - Issue #12715: Add an optional symlinks argument to shutil functions | 
 | 2470 |   (copyfile, copymode, copystat, copy, copy2).  When that parameter is | 
 | 2471 |   true, symlinks aren't dereferenced and the operation instead acts on the | 
 | 2472 |   symlink itself (or creates one, if relevant).  Patch by Hynek Schlawack. | 
 | 2473 |  | 
 | 2474 | - Add a flags parameter to select.epoll. | 
 | 2475 |  | 
 | 2476 | - Issue #12798: Updated the mimetypes documentation. | 
 | 2477 |  | 
 | 2478 | - Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the | 
 | 2479 |   SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option. | 
 | 2480 |  | 
 | 2481 | - Issue #11006: Don't issue low level warning in subprocess when pipe2() fails. | 
 | 2482 |  | 
 | 2483 | - Issue #13620: Support for Chrome browser in webbrowser.  Patch contributed | 
 | 2484 |   by Arnaud Calmettes. | 
 | 2485 |  | 
 | 2486 | - Issue #11829: Fix code execution holes in inspect.getattr_static for | 
 | 2487 |   metaclasses with metaclasses. Patch by Andreas Stührk. | 
 | 2488 |  | 
 | 2489 | - Issue #12708: Add starmap() and starmap_async() methods (similar to | 
 | 2490 |   itertools.starmap()) to multiprocessing.Pool.  Patch by Hynek Schlawack. | 
 | 2491 |  | 
 | 2492 | - Issue #1785: Fix inspect and pydoc with misbehaving descriptors. | 
 | 2493 |  | 
 | 2494 | - Issue #13637: "a2b" functions in the binascii module now accept ASCII-only | 
 | 2495 |   unicode strings. | 
 | 2496 |  | 
 | 2497 | - Issue #13634: Add support for querying and disabling SSL compression. | 
 | 2498 |  | 
 | 2499 | - Issue #13627: Add support for SSL Elliptic Curve-based Diffie-Hellman | 
 | 2500 |   key exchange, through the SSLContext.set_ecdh_curve() method and the | 
 | 2501 |   ssl.OP_SINGLE_ECDH_USE option. | 
 | 2502 |  | 
 | 2503 | - Issue #13635: Add ssl.OP_CIPHER_SERVER_PREFERENCE, so that SSL servers | 
 | 2504 |   choose the cipher based on their own preferences, rather than on the | 
 | 2505 |   client's. | 
 | 2506 |  | 
 | 2507 | - Issue #11813: Fix inspect.getattr_static for modules. Patch by Andreas | 
 | 2508 |   Stührk. | 
 | 2509 |  | 
 | 2510 | - Issue #7502: Fix equality comparison for DocTestCase instances.  Patch by | 
 | 2511 |   Cédric Krier. | 
 | 2512 |  | 
 | 2513 | - Issue #11870: threading: Properly reinitialize threads internal locks and | 
 | 2514 |   condition variables to avoid deadlocks in child processes. | 
 | 2515 |  | 
 | 2516 | - Issue #8035: urllib: Fix a bug where the client could remain stuck after a | 
 | 2517 |   redirection or an error. | 
 | 2518 |  | 
 | 2519 | - Issue #13560: os.strerror() now uses the current locale encoding instead of | 
 | 2520 |   UTF-8. | 
 | 2521 |  | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 2522 | - Issue #8373: The filesystem path of AF_UNIX sockets now uses the filesystem | 
 | 2523 |   encoding and the surrogateescape error handler, rather than UTF-8.  Patch | 
 | 2524 |   by David Watson. | 
 | 2525 |  | 
 | 2526 | - Issue #10350: Read and save errno before calling a function which might | 
 | 2527 |   overwrite it.  Original patch by Hallvard B Furuseth. | 
 | 2528 |  | 
 | 2529 | - Issue #11610: Introduce a more general way to declare abstract properties. | 
 | 2530 |  | 
 | 2531 | - Issue #13591: A bug in importlib has been fixed that caused import_module | 
 | 2532 |   to load a module twice. | 
 | 2533 |  | 
 | 2534 | - Issue #4625: If IDLE cannot write to its recent file or breakpoint files, | 
 | 2535 |   display a message popup and continue rather than crash.  Original patch by | 
 | 2536 |   Roger Serwy. | 
 | 2537 |  | 
 | 2538 | - Issue #13449 sched.scheduler.run() method has a new "blocking" parameter which | 
 | 2539 |   when set to False makes run() execute the scheduled events due to expire | 
 | 2540 |   soonest (if any) and then return.  Patch by Giampaolo Rodolà. | 
 | 2541 |  | 
 | 2542 | - Issue #8684 sched.scheduler class can be safely used in multi-threaded | 
 | 2543 |   environments.  Patch by Josiah Carlson and Giampaolo Rodolà. | 
 | 2544 |  | 
 | 2545 | - Alias resource.error to OSError ala PEP 3151. | 
 | 2546 |  | 
 | 2547 | - Issue #5689: Add support for lzma compression to the tarfile module. | 
 | 2548 |  | 
 | 2549 | - Issue #13248: Turn 3.2's PendingDeprecationWarning into 3.3's | 
 | 2550 |   DeprecationWarning.  It covers 'cgi.escape', 'importlib.abc.PyLoader', | 
 | 2551 |   'importlib.abc.PyPycLoader', 'nntplib.NNTP.xgtitle', 'nntplib.NNTP.xpath', | 
 | 2552 |   and private attributes of 'smtpd.SMTPChannel'. | 
 | 2553 |  | 
 | 2554 | - Issue #5905, #13560: time.strftime() is now using the current locale | 
 | 2555 |   encoding, instead of UTF-8, if the wcsftime() function is not available. | 
 | 2556 |  | 
 | 2557 | - Issue #8641: Update IDLE 3 syntax coloring to recognize b".." and not u"..". | 
 | 2558 |   Patch by Tal Einat. | 
 | 2559 |  | 
 | 2560 | - Issue #13464: Add a readinto() method to http.client.HTTPResponse.  Patch | 
 | 2561 |   by Jon Kuhn. | 
 | 2562 |  | 
 | 2563 | - tarfile.py: Correctly detect bzip2 compressed streams with blocksizes | 
 | 2564 |   other than 900k. | 
 | 2565 |  | 
 | 2566 | - Issue #13439: Fix many errors in turtle docstrings. | 
 | 2567 |  | 
 | 2568 | - Issue #6715: Add a module 'lzma' for compression using the LZMA algorithm. | 
 | 2569 |   Thanks to Per Øyvind Karlsen for the initial implementation. | 
 | 2570 |  | 
 | 2571 | - Issue #13487: Make inspect.getmodule robust against changes done to | 
 | 2572 |   sys.modules while it is iterating over it. | 
 | 2573 |  | 
 | 2574 | - Issue #12618: Fix a bug that prevented py_compile from creating byte | 
 | 2575 |   compiled files in the current directory.  Initial patch by Sjoerd de Vries. | 
 | 2576 |  | 
 | 2577 | - Issue #13444: When stdout has been closed explicitly, we should not attempt | 
 | 2578 |   to flush it at shutdown and print an error. | 
 | 2579 |  | 
 | 2580 | - Issue #12567: The curses module uses Unicode functions for Unicode arguments | 
 | 2581 |   when it is linked to the ncurses library. It encodes also Unicode strings to | 
 | 2582 |   the locale encoding instead of UTF-8. | 
 | 2583 |  | 
 | 2584 | - Issue #12856: Ensure child processes do not inherit the parent's random | 
 | 2585 |   seed for filename generation in the tempfile module.  Patch by Brian | 
 | 2586 |   Harring. | 
 | 2587 |  | 
 | 2588 | - Issue #9957: SpooledTemporaryFile.truncate() now accepts an optional size | 
 | 2589 |   parameter, as other file-like objects.  Patch by Ryan Kelly. | 
 | 2590 |  | 
 | 2591 | - Issue #13458: Fix a memory leak in the ssl module when decoding a | 
 | 2592 |   certificate with a subjectAltName.  Patch by Robert Xiao. | 
 | 2593 |  | 
 | 2594 | - Issue #13415: os.unsetenv() doesn't ignore errors anymore. | 
 | 2595 |  | 
 | 2596 | - Issue #13245: sched.scheduler class constructor's timefunc and | 
 | 2597 |   delayfunct parameters are now optional. | 
 | 2598 |   scheduler.enter and scheduler.enterabs methods gained a new kwargs parameter. | 
 | 2599 |   Patch contributed by Chris Clark. | 
 | 2600 |  | 
 | 2601 | - Issue #12328: Under Windows, refactor handling of Ctrl-C events and | 
 | 2602 |   make _multiprocessing.win32.WaitForMultipleObjects interruptible when | 
 | 2603 |   the wait_flag parameter is false.  Patch by sbt. | 
 | 2604 |  | 
 | 2605 | - Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is | 
 | 2606 |   raised when the wrapped raw file is non-blocking and the write would block. | 
 | 2607 |   Previous code assumed that the raw write() would raise BlockingIOError, but | 
 | 2608 |   RawIOBase.write() is defined to returned None when the call would block. | 
 | 2609 |   Patch by sbt. | 
 | 2610 |  | 
 | 2611 | - Issue #13358: HTMLParser now calls handle_data only once for each CDATA. | 
 | 2612 |  | 
 | 2613 | - Issue #4147: minidom's toprettyxml no longer adds whitespace around a text | 
 | 2614 |   node when it is the only child of an element.  Initial patch by Dan | 
 | 2615 |   Kenigsberg. | 
 | 2616 |  | 
 | 2617 | - Issue #13374: The Windows bytes API has been deprecated in the os module. Use | 
 | 2618 |   Unicode filenames instead of bytes filenames to not depend on the ANSI code | 
 | 2619 |   page anymore and to support any filename. | 
 | 2620 |  | 
 | 2621 | - Issue #13297: Use bytes type to send and receive binary data through XMLRPC. | 
 | 2622 |  | 
 | 2623 | - Issue #6397: Support "/dev/poll" polling objects in select module, | 
 | 2624 |   under Solaris & derivatives. | 
 | 2625 |  | 
 | 2626 | - Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly | 
 | 2627 |   handles non-valid attributes, including adjacent and unquoted attributes. | 
 | 2628 |  | 
 | 2629 | - Issue #13193: Fix distutils.filelist.FileList and packaging.manifest.Manifest | 
 | 2630 |   under Windows. | 
 | 2631 |  | 
 | 2632 | - Issue #13384: Remove unnecessary __future__ import in Lib/random.py | 
 | 2633 |  | 
 | 2634 | - Issue #13149: Speed up append-only StringIO objects. | 
 | 2635 |  | 
 | 2636 | - Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely | 
 | 2637 |   when called with a timeout.  Patch by Arnaud Ysmal. | 
 | 2638 |  | 
 | 2639 | - Issue #13254: Fix Maildir initialization so that maildir contents | 
 | 2640 |   are read correctly. | 
 | 2641 |  | 
 | 2642 | - Issue #3067: locale.setlocale() now raises TypeError if the second | 
 | 2643 |   argument is an invalid iterable. Its documentation and docstring | 
 | 2644 |   were also updated. Initial patch by Jyrki Pulliainen. | 
 | 2645 |  | 
 | 2646 | - Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn. | 
 | 2647 |  | 
 | 2648 | - Issue #13339: Fix compile error in posixmodule.c due to missing semicolon. | 
 | 2649 |   Thanks to Robert Xiao. | 
 | 2650 |  | 
 | 2651 | - Byte compilation in packaging is now isolated from the calling Python -B or | 
 | 2652 |   -O options, instead of being disallowed under -B or buggy under -O. | 
 | 2653 |  | 
 | 2654 | - Issue #10570: curses.putp() and curses.tparm() are now expecting a byte | 
 | 2655 |   string, instead of a Unicode string. | 
 | 2656 |  | 
 | 2657 | - Issue #13295: http.server now produces valid HTML 4.01 strict. | 
 | 2658 |  | 
 | 2659 | - Issue #2892: preserve iterparse events in case of SyntaxError. | 
 | 2660 |  | 
 | 2661 | - Issue #13287: urllib.request and urllib.error now contains an __all__ | 
 | 2662 |   attribute to expose only relevant classes and functions.  Patch by Florent | 
 | 2663 |   Xicluna. | 
 | 2664 |  | 
 | 2665 | - Issue #670664: Fix HTMLParser to correctly handle the content of | 
 | 2666 |   ``<script>...</script>`` and ``<style>...</style>``. | 
 | 2667 |  | 
 | 2668 | - Issue #10817: Fix urlretrieve function to raise ContentTooShortError even | 
 | 2669 |   when reporthook is None. Patch by Jyrki Pulliainen. | 
 | 2670 |  | 
 | 2671 | - Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart. | 
 | 2672 |   (Patch by Roger Serwy) | 
 | 2673 |  | 
 | 2674 | - Fix the xmlrpc.client user agent to return something similar to | 
 | 2675 |   urllib.request user agent: "Python-xmlrpc/3.3". | 
 | 2676 |  | 
 | 2677 | - Issue #13293: Better error message when trying to marshal bytes using | 
 | 2678 |   xmlrpc.client. | 
 | 2679 |  | 
 | 2680 | - Issue #13291: NameError in xmlrpc package. | 
 | 2681 |  | 
 | 2682 | - Issue #13258: Use callable() built-in in the standard library. | 
 | 2683 |  | 
 | 2684 | - Issue #13273: fix a bug that prevented HTMLParser to properly detect some | 
 | 2685 |   tags when strict=False. | 
 | 2686 |  | 
 | 2687 | - Issue #11183: Add finer-grained exceptions to the ssl module, so that | 
 | 2688 |   you don't have to inspect the exception's attributes in the common case. | 
 | 2689 |  | 
 | 2690 | - Issue #13216: Add cp65001 codec, the Windows UTF-8 (CP_UTF8). | 
 | 2691 |  | 
 | 2692 | - Issue #13226: Add RTLD_xxx constants to the os module. These constants can be | 
 | 2693 |   used with sys.setdlopenflags(). | 
 | 2694 |  | 
 | 2695 | - Issue #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants to | 
 | 2696 |   the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a | 
 | 2697 |   monotonic clock | 
 | 2698 |  | 
 | 2699 | - Issue #10332: multiprocessing: fix a race condition when a Pool is closed | 
 | 2700 |   before all tasks have completed. | 
 | 2701 |  | 
 | 2702 | - Issue #13255: wrong docstrings in array module. | 
 | 2703 |  | 
 | 2704 | - Issue #8540: Remove deprecated Context._clamp attribute in Decimal module. | 
 | 2705 |  | 
| R David Murray | 435ee1f | 2012-10-06 18:20:08 -0400 | [diff] [blame] | 2706 | - Issue #13235: Added DeprecationWarning to logging.warn() method and function. | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 2707 |  | 
 | 2708 | - Issue #9168: now smtpd is able to bind privileged port. | 
 | 2709 |  | 
 | 2710 | - Issue #12529: fix cgi.parse_header issue on strings with double-quotes and | 
 | 2711 |   semicolons together. Patch by Ben Darnell and Petri Lehtinen. | 
 | 2712 |  | 
 | 2713 | - Issue #13227: functools.lru_cache() now has a option to distinguish | 
 | 2714 |   calls with different argument types. | 
 | 2715 |  | 
 | 2716 | - Issue #6090: zipfile raises a ValueError when a document with a timestamp | 
 | 2717 |   earlier than 1980 is provided. Patch contributed by Petri Lehtinen. | 
 | 2718 |  | 
 | 2719 | - Issue #13150: sysconfig no longer parses the Makefile and config.h files | 
 | 2720 |   when imported, instead doing it at build time.  This makes importing | 
 | 2721 |   sysconfig faster and reduces Python startup time by 20%. | 
 | 2722 |  | 
 | 2723 | - Issue #12448: smtplib now flushes stdout while running ``python -m smtplib`` | 
 | 2724 |   in order to display the prompt correctly. | 
 | 2725 |  | 
 | 2726 | - Issue #12454: The mailbox module is now using ASCII, instead of the locale | 
| R David Murray | 435ee1f | 2012-10-06 18:20:08 -0400 | [diff] [blame] | 2727 |   encoding, to read and write .mh_sequences files. | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 2728 |  | 
 | 2729 | - Issue #13194: zlib.compressobj().copy() and zlib.decompressobj().copy() are | 
 | 2730 |   now available on Windows. | 
 | 2731 |  | 
| R David Murray | 435ee1f | 2012-10-06 18:20:08 -0400 | [diff] [blame] | 2732 | - Issue #1673007: urllib.request now supports HEAD request via new method argument. | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 2733 |   Patch contributions by David Stanek, Patrick Westerhoff and Ezio Melotti. | 
 | 2734 |  | 
 | 2735 | - Issue #12386: packaging does not fail anymore when writing the RESOURCES | 
 | 2736 |   file. | 
 | 2737 |  | 
 | 2738 | - Issue #13158: Fix decoding and encoding of GNU tar specific base-256 number | 
 | 2739 |   fields in tarfile. | 
 | 2740 |  | 
 | 2741 | - Issue #13025: mimetypes is now reading MIME types using the UTF-8 encoding, | 
 | 2742 |   instead of the locale encoding. | 
 | 2743 |  | 
 | 2744 | - Issue #10653: On Windows, use strftime() instead of wcsftime() because | 
 | 2745 |   wcsftime() doesn't format time zone correctly. | 
 | 2746 |  | 
 | 2747 | - Issue #13150: The tokenize module doesn't compile large regular expressions | 
 | 2748 |   at startup anymore. | 
 | 2749 |  | 
 | 2750 | - Issue #11171: Fix distutils.sysconfig.get_makefile_filename when Python was | 
 | 2751 |   configured with different prefix and exec-prefix. | 
 | 2752 |  | 
 | 2753 | - Issue #11254: Teach distutils and packaging to compile .pyc and .pyo files in | 
 | 2754 |   PEP 3147-compliant __pycache__ directories. | 
 | 2755 |  | 
 | 2756 | - Issue #7367: Fix pkgutil.walk_paths to skip directories whose | 
 | 2757 |   contents cannot be read. | 
 | 2758 |  | 
 | 2759 | - Issue #3163: The struct module gets new format characters 'n' and 'N' | 
 | 2760 |   supporting C integer types ``ssize_t`` and ``size_t``, respectively. | 
 | 2761 |  | 
 | 2762 | - Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale. | 
 | 2763 |   Reported and diagnosed by Thomas Kluyver. | 
 | 2764 |  | 
 | 2765 | - Issue #13087: BufferedReader.seek() now always raises UnsupportedOperation | 
 | 2766 |   if the underlying raw stream is unseekable, even if the seek could be | 
 | 2767 |   satisfied using the internal buffer.  Patch by John O'Connor. | 
 | 2768 |  | 
 | 2769 | - Issue #7689: Allow pickling of dynamically created classes when their | 
 | 2770 |   metaclass is registered with copyreg.  Patch by Nicolas M. Thiéry and Craig | 
 | 2771 |   Citro. | 
 | 2772 |  | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 2773 | - Issue #13034: When decoding some SSL certificates, the subjectAltName | 
 | 2774 |   extension could be unreported. | 
 | 2775 |  | 
 | 2776 | - Issue #9871: Prevent IDLE 3 crash when given byte stings | 
 | 2777 |   with invalid hex escape sequences, like b'\x0'. | 
 | 2778 |   (Original patch by Claudiu Popa.) | 
 | 2779 |  | 
 | 2780 | - Issue #12306: Expose the runtime version of the zlib C library as a constant, | 
 | 2781 |   ZLIB_RUNTIME_VERSION, in the zlib module. Patch by Torsten Landschoff. | 
 | 2782 |  | 
 | 2783 | - Issue #12959: Add collections.ChainMap to collections.__all__. | 
 | 2784 |  | 
 | 2785 | - Issue #8933: distutils' PKG-INFO files and packaging's METADATA files will | 
 | 2786 |   now correctly report Metadata-Version: 1.1 instead of 1.0 if a Classifier or | 
 | 2787 |   Download-URL field is present. | 
 | 2788 |  | 
 | 2789 | - Issue #12567: Add curses.unget_wch() function. Push a character so the next | 
 | 2790 |   get_wch() will return it. | 
 | 2791 |  | 
 | 2792 | - Issue #9561: distutils and packaging now writes egg-info files using UTF-8, | 
 | 2793 |   instead of the locale encoding. | 
 | 2794 |  | 
 | 2795 | - Issue #8286: The distutils command sdist will print a warning message instead | 
 | 2796 |   of crashing when an invalid path is given in the manifest template. | 
 | 2797 |  | 
 | 2798 | - Issue #12841: tarfile unnecessarily checked the existence of numerical user | 
 | 2799 |   and group ids on extraction. If one of them did not exist the respective id | 
 | 2800 |   of the current user (i.e. root) was used for the file and ownership | 
 | 2801 |   information was lost. | 
 | 2802 |  | 
 | 2803 | - Issue #12888: Fix a bug in HTMLParser.unescape that prevented it to escape | 
 | 2804 |   more than 128 entities.  Patch by Peter Otten. | 
 | 2805 |  | 
 | 2806 | - Issue #12878: Expose a __dict__ attribute on io.IOBase and its subclasses. | 
 | 2807 |  | 
 | 2808 | - Issue #12636: IDLE reads the coding cookie when executing a Python script. | 
 | 2809 |  | 
 | 2810 | - Issue #12494: On error, call(), check_call(), check_output() and | 
 | 2811 |   getstatusoutput() functions of the subprocess module now kill the process, | 
 | 2812 |   read its status (to avoid zombis) and close pipes. | 
 | 2813 |  | 
 | 2814 | - Issue #12720: Expose low-level Linux extended file attribute functions in os. | 
 | 2815 |  | 
 | 2816 | - Issue #10946: The distutils commands bdist_dumb, bdist_wininst and bdist_msi | 
 | 2817 |   now respect a --skip-build option given to bdist.  The packaging commands | 
 | 2818 |   were fixed too. | 
 | 2819 |  | 
 | 2820 | - Issue #12847: Fix a crash with negative PUT and LONG_BINPUT arguments in | 
 | 2821 |   the C pickle implementation. | 
 | 2822 |  | 
 | 2823 | - Issue #11564: Avoid crashes when trying to pickle huge objects or containers | 
 | 2824 |   (more than 2**31 items).  Instead, in most cases, an OverflowError is raised. | 
 | 2825 |  | 
 | 2826 | - Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is | 
 | 2827 |   greater than FD_SETSIZE. | 
 | 2828 |  | 
 | 2829 | - Issue #12839: Fix crash in zlib module due to version mismatch. | 
 | 2830 |   Fix by Richard M. Tew. | 
 | 2831 |  | 
 | 2832 | - Issue #9923: The mailcap module now correctly uses the platform path | 
 | 2833 |   separator for the MAILCAP environment variable on non-POSIX platforms. | 
 | 2834 |  | 
 | 2835 | - Issue #12835: Follow up to #6560 that unconditionally prevents use of the | 
 | 2836 |   unencrypted sendmsg/recvmsg APIs on SSL wrapped sockets. Patch by David | 
 | 2837 |   Watson. | 
 | 2838 |  | 
 | 2839 | - Issue #12803: SSLContext.load_cert_chain() now accepts a password argument | 
 | 2840 |   to be used if the private key is encrypted.  Patch by Adam Simpkins. | 
 | 2841 |  | 
 | 2842 | - Issue #11657: Fix sending file descriptors over 255 over a multiprocessing | 
 | 2843 |   Pipe. | 
 | 2844 |  | 
 | 2845 | - Issue #12811: tabnanny.check() now promptly closes checked files. Patch by | 
 | 2846 |   Anthony Briggs. | 
 | 2847 |  | 
 | 2848 | - Issue #6560: The sendmsg/recvmsg API is now exposed by the socket module | 
 | 2849 |   when provided by the underlying platform, supporting processing of | 
 | 2850 |   ancillary data in pure Python code. Patch by David Watson and Heiko Wundram. | 
 | 2851 |  | 
 | 2852 | - Issue #12326: On Linux, sys.platform doesn't contain the major version | 
 | 2853 |   anymore. It is now always 'linux', instead of 'linux2' or 'linux3' depending | 
 | 2854 |   on the Linux version used to build Python. | 
 | 2855 |  | 
 | 2856 | - Issue #12213: Fix a buffering bug with interleaved reads and writes that | 
 | 2857 |   could appear on BufferedRandom streams. | 
 | 2858 |  | 
 | 2859 | - Issue #12778: Reduce memory consumption when JSON-encoding a large | 
 | 2860 |   container of many small objects. | 
 | 2861 |  | 
 | 2862 | - Issue #12650: Fix a race condition where a subprocess.Popen could leak | 
 | 2863 |   resources (FD/zombie) when killed at the wrong time. | 
 | 2864 |  | 
 | 2865 | - Issue #12744: Fix inefficient representation of integers between 2**31 and | 
 | 2866 |   2**63 on systems with a 64-bit C "long". | 
 | 2867 |  | 
 | 2868 | - Issue #12646: Add an 'eof' attribute to zlib.Decompress, to make it easier to | 
 | 2869 |   detect truncated input streams. | 
 | 2870 |  | 
 | 2871 | - Issue #11513: Fix exception handling ``tarfile.TarFile.gzopen()`` when | 
 | 2872 |   the file cannot be opened. | 
 | 2873 |  | 
 | 2874 | - Issue #12687: Fix a possible buffering bug when unpickling text mode | 
 | 2875 |   (protocol 0, mostly) pickles. | 
 | 2876 |  | 
 | 2877 | - Issue #10087: Fix the html output format of the calendar module. | 
 | 2878 |  | 
 | 2879 | - Issue #12540: Prevent zombie IDLE processes on Windows due to changes | 
 | 2880 |   in os.kill(). | 
 | 2881 |  | 
| R David Murray | 3dc23d4 | 2012-10-06 16:30:46 -0400 | [diff] [blame] | 2882 | - Issue #13121: add support for inplace math operators to collections.Counter. | 
 | 2883 |  | 
 | 2884 | - Add support for unary plus and unary minus to collections.Counter. | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 2885 |  | 
 | 2886 | - Issue #12683: urlparse updated to include svn as schemes that uses relative | 
 | 2887 |   paths. (svn from 1.5 onwards support relative path). | 
 | 2888 |  | 
 | 2889 | - Issue #12655: Expose functions from sched.h in the os module: sched_yield(), | 
 | 2890 |   sched_setscheduler(), sched_getscheduler(), sched_setparam(), | 
 | 2891 |   sched_get_min_priority(), sched_get_max_priority(), sched_rr_get_interval(), | 
 | 2892 |   sched_getaffinity(), sched_setaffinity(). | 
 | 2893 |  | 
 | 2894 | - Add ThreadError to threading.__all__. | 
 | 2895 |  | 
 | 2896 | - Issues #11104, #8688: Fix the behavior of distutils' sdist command with | 
 | 2897 |   manually-maintained MANIFEST files. | 
 | 2898 |  | 
 | 2899 | - Issue #11281: smtplib.STMP gets source_address parameter, which adds the | 
 | 2900 |   ability to bind to specific source address on a machine with multiple | 
 | 2901 |   interfaces. Patch by Paulo Scardine. | 
 | 2902 |  | 
 | 2903 | - Issue #12464: tempfile.TemporaryDirectory.cleanup() should not follow | 
 | 2904 |   symlinks: fix it. Patch by Petri Lehtinen. | 
 | 2905 |  | 
 | 2906 | - Issue #8887: "pydoc somebuiltin.somemethod" (or help('somebuiltin.somemethod') | 
 | 2907 |   in Python code) now finds the doc of the method. | 
 | 2908 |  | 
| R David Murray | d9c6ab4 | 2012-10-06 14:38:17 -0400 | [diff] [blame] | 2909 | - Issue #10968: Remove indirection in threading.  The public names (Event, | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 2910 |   Condition, etc.) used to be factory functions returning instances of hidden | 
| R David Murray | d9c6ab4 | 2012-10-06 14:38:17 -0400 | [diff] [blame] | 2911 |   classes (_Event, _Condition, etc.), because (if Guido recalls correctly) this | 
 | 2912 |   code pre-dates the ability to subclass extension types.  It is now possible | 
 | 2913 |   to inherit from these classes without having to import the private | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 2914 |   underscored names like multiprocessing did. | 
 | 2915 |  | 
 | 2916 | - Issue #9723: Add shlex.quote functions, to escape filenames and command | 
 | 2917 |   lines. | 
 | 2918 |  | 
 | 2919 | - Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime. | 
 | 2920 |  | 
 | 2921 | - Issue #12514: Use try/finally to assure the timeit module restores garbage | 
 | 2922 |   collections when it is done. | 
 | 2923 |  | 
 | 2924 | - Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is | 
 | 2925 |   given as a low fd, it gets overwritten. | 
 | 2926 |  | 
 | 2927 | - Issue #12590: IDLE editor window now always displays the first line | 
 | 2928 |   when opening a long file.  With Tk 8.5, the first line was hidden. | 
 | 2929 |  | 
 | 2930 | - Issue #12576: Fix urlopen behavior on sites which do not send (or obfuscates) | 
 | 2931 |   Connection:close header. | 
 | 2932 |  | 
 | 2933 | - Issue #12102: Document that buffered files must be flushed before being used | 
 | 2934 |   with mmap. Patch by Steffen Daode Nurpmeso. | 
 | 2935 |  | 
 | 2936 | - Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling. | 
 | 2937 |  | 
 | 2938 | - Issue #1813: Fix codec lookup under Turkish locales. | 
 | 2939 |  | 
 | 2940 | - Issue #12591: Improve support of "universal newlines" in the subprocess | 
 | 2941 |   module: the piped streams can now be properly read from or written to. | 
 | 2942 |  | 
 | 2943 | - Issue #12591: Allow io.TextIOWrapper to work with raw IO objects (without | 
 | 2944 |   a read1() method), and add a *write_through* parameter to mandate | 
 | 2945 |   unbuffered writes. | 
 | 2946 |  | 
 | 2947 | - Issue #10883: Fix socket leaks in urllib.request when using FTP. | 
 | 2948 |  | 
 | 2949 | - Issue #12592: Make Python build on OpenBSD 5 (and future major releases). | 
 | 2950 |  | 
 | 2951 | - Issue #12372: POSIX semaphores are broken on AIX: don't use them. | 
 | 2952 |  | 
 | 2953 | - Issue #12551: Provide a get_channel_binding() method on SSL sockets so as | 
 | 2954 |   to get channel binding data for the current SSL session (only the | 
 | 2955 |   "tls-unique" channel binding is implemented).  This allows the implementation | 
 | 2956 |   of certain authentication mechanisms such as SCRAM-SHA-1-PLUS.  Patch by | 
 | 2957 |   Jacek Konieczny. | 
 | 2958 |  | 
 | 2959 | - Issue #665194: email.utils now has format_datetime and parsedate_to_datetime | 
 | 2960 |   functions, allowing for round tripping of RFC2822 format dates. | 
 | 2961 |  | 
 | 2962 | - Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2 | 
 | 2963 |   directory, so that "import DLFCN" and other similar imports work on | 
 | 2964 |   Linux 3.0. | 
 | 2965 |  | 
 | 2966 | - Issue #7484: smtplib no longer puts <> around addresses in VRFY and EXPN | 
 | 2967 |   commands; they aren't required and in fact postfix doesn't support that form. | 
 | 2968 |  | 
 | 2969 | - Issue #12273: Remove ast.__version__. AST changes can be accounted for by | 
 | 2970 |   checking sys.version_info or sys._mercurial. | 
 | 2971 |  | 
 | 2972 | - Silence spurious "broken pipe" tracebacks when shutting down a | 
 | 2973 |   ProcessPoolExecutor. | 
 | 2974 |  | 
 | 2975 | - Fix potential resource leaks in concurrent.futures.ProcessPoolExecutor | 
 | 2976 |   by joining all queues and processes when shutdown() is called. | 
 | 2977 |  | 
 | 2978 | - Issue #11603: Fix a crash when __str__ is rebound as __repr__.  Patch by | 
 | 2979 |   Andreas Stührk. | 
 | 2980 |  | 
 | 2981 | - Issue #11321: Fix a crash with multiple imports of the _pickle module when | 
 | 2982 |   embedding Python.  Patch by Andreas Stührk. | 
 | 2983 |  | 
 | 2984 | - Issue #6755: Add get_wch() method to curses.window class. Patch by Iñigo | 
 | 2985 |   Serna. | 
 | 2986 |  | 
 | 2987 | - Add cgi.closelog() function to close the log file. | 
 | 2988 |  | 
 | 2989 | - Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. | 
 | 2990 |  | 
 | 2991 | - Issue #4376: ctypes now supports nested structures in a endian different than | 
 | 2992 |   the parent structure. Patch by Vlad Riscutia. | 
 | 2993 |  | 
 | 2994 | - Raise ValueError when attempting to set the _CHUNK_SIZE attribute of a | 
 | 2995 |   TextIOWrapper to a huge value, not TypeError. | 
 | 2996 |  | 
 | 2997 | - Issue #12504: Close file handles in a timely manner in packaging.database. | 
 | 2998 |   This fixes a bug with the remove (uninstall) feature on Windows. | 
 | 2999 |  | 
 | 3000 | - Issues #12169 and #10510: Factor out code used by various packaging commands | 
 | 3001 |   to make HTTP POST requests, and make sure it uses CRLF. | 
 | 3002 |  | 
 | 3003 | - Issue #12016: Multibyte CJK decoders now resynchronize faster. They only | 
 | 3004 |   ignore the first byte of an invalid byte sequence. For example, | 
 | 3005 |   b'\xff\n'.decode('gb2312', 'replace') gives '\ufffd\n' instead of '\ufffd'. | 
 | 3006 |  | 
 | 3007 | - Issue #12459: time.sleep() now raises a ValueError if the sleep length is | 
 | 3008 |   negative, instead of an infinite sleep on Windows or raising an IOError on | 
 | 3009 |   Linux for example, to have the same behaviour on all platforms. | 
 | 3010 |  | 
 | 3011 | - Issue #12451: pydoc: html_getfile() now uses tokenize.open() to support | 
 | 3012 |   Python scripts using a encoding different than UTF-8 (read the coding cookie | 
 | 3013 |   of the script). | 
 | 3014 |  | 
 | 3015 | - Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors | 
 | 3016 |   if the process has only one pipe. | 
 | 3017 |  | 
 | 3018 | - Issue #12467: warnings: fix a race condition if a warning is emitted at | 
 | 3019 |   shutdown, if globals()['__file__'] is None. | 
 | 3020 |  | 
 | 3021 | - Issue #12451: pydoc: importfile() now opens the Python script in binary mode, | 
 | 3022 |   instead of text mode using the locale encoding, to avoid encoding issues. | 
 | 3023 |  | 
 | 3024 | - Issue #12451: runpy: run_path() now opens the Python script in binary mode, | 
 | 3025 |   instead of text mode using the locale encoding, to support other encodings | 
 | 3026 |   than UTF-8 (scripts using the coding cookie). | 
 | 3027 |  | 
 | 3028 | - Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead | 
 | 3029 |   of the text mode (using the locale encoding) to avoid encoding issues. | 
 | 3030 |  | 
 | 3031 | - Issue #12147: Adjust the new-in-3.2 smtplib.send_message method for better | 
 | 3032 |   conformance to the RFCs:  correctly handle Sender and Resent- headers. | 
 | 3033 |  | 
 | 3034 | - Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by | 
 | 3035 |   the garbage collector while the Heap lock is held. | 
 | 3036 |  | 
| R David Murray | 8155ff4 | 2012-10-02 18:26:31 -0400 | [diff] [blame] | 3037 | - Issue #12462: time.sleep() now immediately calls the (Python) signal handler | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 3038 |   if it is interrupted by a signal, instead of having to wait until the next | 
 | 3039 |   instruction. | 
 | 3040 |  | 
 | 3041 | - Issue #12442: new shutil.disk_usage function, providing total, used and free | 
 | 3042 |   disk space statistics. | 
 | 3043 |  | 
 | 3044 | - Issue #12451: The XInclude default loader of xml.etree now decodes files from | 
 | 3045 |   UTF-8 instead of the locale encoding if the encoding is not specified. It now | 
 | 3046 |   also opens XML files for the parser in binary mode instead of the text mode | 
 | 3047 |   to avoid encoding issues. | 
 | 3048 |  | 
 | 3049 | - Issue #12451: doctest.debug_script() doesn't create a temporary file | 
 | 3050 |   anymore to avoid encoding issues. | 
 | 3051 |  | 
 | 3052 | - Issue #12451: pydoc.synopsis() now reads the encoding cookie if available, | 
 | 3053 |   to read the Python script from the right encoding. | 
 | 3054 |  | 
 | 3055 | - Issue #12451: distutils now opens the setup script in binary mode to read the | 
 | 3056 |   encoding cookie, instead of opening it in UTF-8. | 
 | 3057 |  | 
 | 3058 | - Issue #9516: On Mac OS X, change Distutils to no longer globally attempt to | 
 | 3059 |   check or set the MACOSX_DEPLOYMENT_TARGET environment variable for the | 
 | 3060 |   interpreter process.  This could cause failures in non-Distutils subprocesses | 
 | 3061 |   and was unreliable since tests or user programs could modify the interpreter | 
 | 3062 |   environment after Distutils set it.  Instead, have Distutils set the the | 
 | 3063 |   deployment target only in the environment of each build subprocess.  It is | 
 | 3064 |   still possible to globally override the default by setting | 
 | 3065 |   MACOSX_DEPLOYMENT_TARGET before launching the interpreter; its value must be | 
 | 3066 |   greater or equal to the default value, the value with which the interpreter | 
 | 3067 |   was built.  Also, implement the same handling in packaging. | 
 | 3068 |  | 
 | 3069 | - Issue #12422: In the copy module, don't store objects that are their own copy | 
 | 3070 |   in the memo dict. | 
 | 3071 |  | 
 | 3072 | - Issue #12303: Add sigwaitinfo() and sigtimedwait() to the signal module. | 
 | 3073 |  | 
 | 3074 | - Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira | 
 | 3075 |   Kitada. | 
 | 3076 |  | 
 | 3077 | - Issue #1874: email now detects and reports as a defect the presence of | 
 | 3078 |   any CTE other than 7bit, 8bit, or binary on a multipart. | 
 | 3079 |  | 
 | 3080 | - Issue #12383: Fix subprocess module with env={}: don't copy the environment | 
 | 3081 |   variables, start with an empty environment. | 
 | 3082 |  | 
 | 3083 | - Issue #11637: Fix support for importing packaging setup hooks from the | 
 | 3084 |   project directory. | 
 | 3085 |  | 
 | 3086 | - Issue #6771: Moved the curses.wrapper function from the single-function | 
 | 3087 |   wrapper module into __init__, eliminating the module.  Since __init__ was | 
 | 3088 |   already importing the function to curses.wrapper, there is no API change. | 
 | 3089 |  | 
 | 3090 | - Issue #11584: email.header.decode_header no longer fails if the header | 
 | 3091 |   passed to it is a Header object, and Header/make_header no longer fail | 
 | 3092 |   if given binary unknown-8bit input. | 
 | 3093 |  | 
 | 3094 | - Issue #11700: mailbox proxy object close methods can now be called multiple | 
 | 3095 |   times without error. | 
 | 3096 |  | 
 | 3097 | - Issue #11767: Correct file descriptor leak in mailbox's __getitem__ method. | 
 | 3098 |  | 
 | 3099 | - Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP | 
 | 3100 |   connection if its getresponse() method fails with a socket error. Patch | 
 | 3101 |   written by Ezio Melotti. | 
 | 3102 |  | 
 | 3103 | - Issue #12240: Allow multiple setup hooks in packaging's setup.cfg files. | 
 | 3104 |   Original patch by Erik Bray. | 
 | 3105 |  | 
 | 3106 | - Issue #9284: Allow inspect.findsource() to find the source of doctest | 
 | 3107 |   functions. | 
 | 3108 |  | 
 | 3109 | - Issue #11595: Fix assorted bugs in packaging.util.cfg_to_args, a | 
 | 3110 |   compatibility helper for the distutils-packaging transition.  Original patch | 
 | 3111 |   by Erik Bray. | 
 | 3112 |  | 
 | 3113 | - Issue #12287: In ossaudiodev, check that the device isn't closed in several | 
 | 3114 |   methods. | 
 | 3115 |  | 
 | 3116 | - Issue #12009: Fixed regression in netrc file comment handling. | 
 | 3117 |  | 
 | 3118 | - Issue #12246: Warn and fail when trying to install a third-party project from | 
 | 3119 |   an uninstalled Python (built in a source checkout).  Original patch by | 
 | 3120 |   Tshepang Lekhonkhobe. | 
 | 3121 |  | 
 | 3122 | - Issue #10694: zipfile now ignores garbage at the end of a zipfile. | 
 | 3123 |  | 
 | 3124 | - Issue #12283: Fixed regression in smtplib quoting of leading dots in DATA. | 
 | 3125 |  | 
 | 3126 | - Issue #10424: Argparse now includes the names of the missing required | 
 | 3127 |   arguments in the missing arguments error message. | 
 | 3128 |  | 
 | 3129 | - Issue #12168: SysLogHandler now allows NUL termination to be controlled using | 
 | 3130 |   a new 'append_nul' attribute on the handler. | 
 | 3131 |  | 
 | 3132 | - Issue #11583: Speed up os.path.isdir on Windows by using GetFileAttributes | 
 | 3133 |   instead of os.stat. | 
 | 3134 |  | 
 | 3135 | - Issue #12021: Make mmap's read() method argument optional. Patch by Petri | 
 | 3136 |   Lehtinen. | 
 | 3137 |  | 
 | 3138 | - Issue #9205: concurrent.futures.ProcessPoolExecutor now detects killed | 
 | 3139 |   children and raises BrokenProcessPool in such a situation.  Previously it | 
 | 3140 |   would reliably freeze/deadlock. | 
 | 3141 |  | 
 | 3142 | - Issue #12040: Expose a new attribute ``sentinel`` on instances of | 
 | 3143 |   ``multiprocessing.Process``.  Also, fix Process.join() to not use polling | 
 | 3144 |   anymore, when given a timeout. | 
 | 3145 |  | 
 | 3146 | - Issue #11893: Remove obsolete internal wrapper class ``SSLFakeFile`` in the | 
 | 3147 |   smtplib module.  Patch by Catalin Iacob. | 
 | 3148 |  | 
 | 3149 | - Issue #12080: Fix a Decimal.power() case that took an unreasonably long time | 
 | 3150 |   to compute. | 
 | 3151 |  | 
 | 3152 | - Issue #12221: Remove __version__ attributes from pyexpat, pickle, tarfile, | 
 | 3153 |   pydoc, tkinter, and xml.parsers.expat. This were useless version constants | 
 | 3154 |   left over from the Mercurial transition | 
 | 3155 |  | 
 | 3156 | - Named tuples now work correctly with vars(). | 
 | 3157 |  | 
 | 3158 | - Issue #12085: Fix an attribute error in subprocess.Popen destructor if the | 
 | 3159 |   constructor has failed, e.g. because of an undeclared keyword argument. Patch | 
 | 3160 |   written by Oleg Oshmyan. | 
 | 3161 |  | 
 | 3162 | - Issue #12028: Make threading._get_ident() public, rename it to | 
 | 3163 |   threading.get_ident() and document it. This function was already used using | 
 | 3164 |   _thread.get_ident(). | 
 | 3165 |  | 
 | 3166 | - Issue #12171: IncrementalEncoder.reset() of CJK codecs (multibytecodec) calls | 
 | 3167 |   encreset() instead of decreset(). | 
 | 3168 |  | 
 | 3169 | - Issue #12218: Removed wsgiref.egg-info. | 
 | 3170 |  | 
 | 3171 | - Issue #12196: Add pipe2() to the os module. | 
 | 3172 |  | 
 | 3173 | - Issue #985064: Make plistlib more resilient to faulty input plists. | 
 | 3174 |   Patch by Mher Movsisyan. | 
 | 3175 |  | 
 | 3176 | - Issue #1625: BZ2File and bz2.decompress() now support multi-stream files. | 
 | 3177 |   Initial patch by Nir Aides. | 
 | 3178 |  | 
 | 3179 | - Issue #12175: BufferedReader.read(-1) now calls raw.readall() if available. | 
 | 3180 |  | 
 | 3181 | - Issue #12175: FileIO.readall() now only reads the file position and size | 
 | 3182 |   once. | 
 | 3183 |  | 
 | 3184 | - Issue #12175: RawIOBase.readall() now returns None if read() returns None. | 
 | 3185 |  | 
 | 3186 | - Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError | 
 | 3187 |   if the file is closed. | 
 | 3188 |  | 
| R David Murray | 6e7bd65 | 2012-10-01 21:47:57 -0400 | [diff] [blame] | 3189 | - Issue #11109: New service_action method for BaseServer, used by ForkingMixIn | 
 | 3190 |   class for cleanup. Initial Patch by Justin Warkentin. | 
| Georg Brandl | 86dc732 | 2012-10-01 18:58:45 +0200 | [diff] [blame] | 3191 |  | 
 | 3192 | - Issue #12045: Avoid duplicate execution of command in | 
 | 3193 |   ctypes.util._get_soname().  Patch by Sijin Joseph. | 
 | 3194 |  | 
 | 3195 | - Issue #10818: Remove the Tk GUI and the serve() function of the pydoc module, | 
 | 3196 |   pydoc -g has been deprecated in Python 3.2 and it has a new enhanced web | 
 | 3197 |   server. | 
 | 3198 |  | 
 | 3199 | - Issue #1441530: In imaplib, read the data in one chunk to speed up large | 
 | 3200 |   reads and simplify code. | 
 | 3201 |  | 
 | 3202 | - Issue #12070: Fix the Makefile parser of the sysconfig module to handle | 
 | 3203 |   correctly references to "bogus variable" (e.g. "prefix=$/opt/python"). | 
 | 3204 |  | 
 | 3205 | - Issue #12100: Don't reset incremental encoders of CJK codecs at each call to | 
 | 3206 |   their encode() method anymore, but continue to call the reset() method if the | 
 | 3207 |   final argument is True. | 
 | 3208 |  | 
 | 3209 | - Issue #12049: Add RAND_bytes() and RAND_pseudo_bytes() functions to the ssl | 
 | 3210 |   module. | 
 | 3211 |  | 
 | 3212 | - Issue #6501: os.device_encoding() returns None on Windows if the application | 
 | 3213 |   has no console. | 
 | 3214 |  | 
 | 3215 | - Issue #12105: Add O_CLOEXEC to the os module. | 
 | 3216 |  | 
 | 3217 | - Issue #12079: Decimal('Infinity').fma(Decimal('0'), (3.91224318126786e+19+0j)) | 
 | 3218 |   now raises TypeError (reflecting the invalid type of the 3rd argument) rather | 
 | 3219 |   than Decimal.InvalidOperation. | 
 | 3220 |  | 
 | 3221 | - Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore | 
 | 3222 |   to be able to unload the module. | 
 | 3223 |  | 
 | 3224 | - Add the packaging module, an improved fork of distutils (also known as | 
 | 3225 |   distutils2). | 
 | 3226 |  | 
 | 3227 | - Issue #12065: connect_ex() on an SSL socket now returns the original errno | 
 | 3228 |   when the socket's timeout expires (it used to return None). | 
 | 3229 |  | 
 | 3230 | - Issue #8809: The SMTP_SSL constructor and SMTP.starttls() now support | 
 | 3231 |   passing a ``context`` argument pointing to an ssl.SSLContext instance. | 
 | 3232 |   Patch by Kasun Herath. | 
 | 3233 |  | 
 | 3234 | - Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX | 
 | 3235 |   with Tk 8.5. | 
 | 3236 |  | 
 | 3237 | - Issue #9516: Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET | 
 | 3238 |   is set in shell. | 
 | 3239 |  | 
 | 3240 | - Issue #8650: Make zlib module 64-bit clean. compress(), decompress() and | 
 | 3241 |   their incremental counterparts now raise OverflowError if given an input | 
 | 3242 |   larger than 4GB, instead of silently truncating the input and returning | 
 | 3243 |   an incorrect result. | 
 | 3244 |  | 
 | 3245 | - Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail | 
 | 3246 |   attribute when called without a max_length argument. | 
 | 3247 |  | 
 | 3248 | - Issue #12062: Fix a flushing bug when doing a certain type of I/O sequence | 
 | 3249 |   on a file opened in read+write mode (namely: reading, seeking a bit forward, | 
 | 3250 |   writing, then seeking before the previous write but still within buffered | 
 | 3251 |   data, and writing again). | 
 | 3252 |  | 
 | 3253 | - Issue #9971: Write an optimized implementation of BufferedReader.readinto(). | 
 | 3254 |   Patch by John O'Connor. | 
 | 3255 |  | 
 | 3256 | - Issue #1028: Tk returns invalid Unicode null in %A: UnicodeDecodeError. | 
 | 3257 |   With Tk < 8.5 _tkinter.c:PythonCmd() raised UnicodeDecodeError, caused | 
 | 3258 |   IDLE to exit.  Converted to valid Unicode null in PythonCmd(). | 
 | 3259 |  | 
 | 3260 | - Issue #11799: urllib.request Authentication Handlers will raise a ValueError | 
 | 3261 |   when presented with an unsupported Authentication Scheme. Patch contributed | 
 | 3262 |   by Yuval Greenfield. | 
 | 3263 |  | 
 | 3264 | - Issue #10419, #6011: build_scripts command of distutils handles correctly | 
 | 3265 |   non-ASCII path (path to the Python executable). Open and write the script in | 
 | 3266 |   binary mode, but ensure that the shebang is decodable from UTF-8 and from the | 
 | 3267 |   encoding of the script. | 
 | 3268 |  | 
 | 3269 | - Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in | 
 | 3270 |   order to accept exactly one connection.  Patch by Daniel Evers. | 
 | 3271 |  | 
 | 3272 | - Issue #12011: signal.signal() and signal.siginterrupt() raise an OSError, | 
 | 3273 |   instead of a RuntimeError: OSError has an errno attribute. | 
 | 3274 |  | 
 | 3275 | - Issue #3709: add a flush_headers method to BaseHTTPRequestHandler, which | 
 | 3276 |   manages the sending of headers to output stream and flushing the internal | 
 | 3277 |   headers buffer. Patch contribution by Andrew Schaaf | 
 | 3278 |  | 
 | 3279 | - Issue #11743: Rewrite multiprocessing connection classes in pure Python. | 
 | 3280 |  | 
 | 3281 | - Issue #11164: Stop trying to use _xmlplus in the xml module. | 
 | 3282 |  | 
 | 3283 | - Issue #11888: Add log2 function to math module. Patch written by Mark | 
 | 3284 |   Dickinson. | 
 | 3285 |  | 
 | 3286 | - Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional. | 
 | 3287 |  | 
 | 3288 | - Issue #8407: The signal handler writes the signal number as a single byte | 
 | 3289 |   instead of a nul byte into the wakeup file descriptor. So it is possible to | 
 | 3290 |   wait more than one signal and know which signals were raised. | 
 | 3291 |  | 
 | 3292 | - Issue #8407: Add pthread_kill(), sigpending() and sigwait() functions to the | 
 | 3293 |   signal module. | 
 | 3294 |  | 
 | 3295 | - Issue #11927: SMTP_SSL now uses port 465 by default as documented.  Patch | 
 | 3296 |   by Kasun Herath. | 
 | 3297 |  | 
 | 3298 | - Issue #12002: ftplib's abort() method raises TypeError. | 
 | 3299 |  | 
 | 3300 | - Issue #11916: Add a number of MacOSX specific definitions to the errno module. | 
 | 3301 |   Patch by Pierre Carrier. | 
 | 3302 |  | 
 | 3303 | - Issue #11999: fixed sporadic sync failure mailbox.Maildir due to its trying to | 
 | 3304 |   detect mtime changes by comparing to the system clock instead of to the | 
 | 3305 |   previous value of the mtime. | 
 | 3306 |  | 
 | 3307 | - Issue #11072: added MLSD command (RFC-3659) support to ftplib. | 
 | 3308 |  | 
 | 3309 | - Issue #8808: The IMAP4_SSL constructor now allows passing an SSLContext | 
 | 3310 |   parameter to control parameters of the secure channel.  Patch by Sijin | 
 | 3311 |   Joseph. | 
 | 3312 |  | 
 | 3313 | - ntpath.samefile failed to notice that "a.txt" and "A.TXT" refer to the same | 
 | 3314 |   file on Windows XP. As noticed in issue #10684. | 
 | 3315 |  | 
 | 3316 | - Issue #12000: When a SSL certificate has a subjectAltName without any | 
 | 3317 |   dNSName entry, ssl.match_hostname() should use the subject's commonName. | 
 | 3318 |   Patch by Nicolas Bareil. | 
 | 3319 |  | 
 | 3320 | - Issue #10775: assertRaises, assertRaisesRegex, assertWarns, and | 
 | 3321 |   assertWarnsRegex now accept a keyword argument 'msg' when used as context | 
 | 3322 |   managers.  Initial patch by Winston Ewert. | 
 | 3323 |  | 
 | 3324 | - Issue #10684: shutil.move used to delete a folder on case insensitive | 
 | 3325 |   filesystems when the source and destination name where the same except | 
 | 3326 |   for the case. | 
 | 3327 |  | 
 | 3328 | - Issue #11647: objects created using contextlib.contextmanager now support | 
 | 3329 |   more than one call to the function when used as a decorator. Initial patch | 
 | 3330 |   by Ysj Ray. | 
 | 3331 |  | 
 | 3332 | - Issue #11930: Removed deprecated time.accept2dyear variable. | 
 | 3333 |   Removed year >= 1000 restriction from datetime.strftime. | 
 | 3334 |  | 
 | 3335 | - logging: don't define QueueListener if Python has no thread support. | 
 | 3336 |  | 
 | 3337 | - functools.cmp_to_key() now works with collections.Hashable(). | 
 | 3338 |  | 
 | 3339 | - Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get | 
 | 3340 |   around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso. | 
 | 3341 |  | 
 | 3342 | - Issue #8407: Add signal.pthread_sigmask() function to fetch and/or change the | 
 | 3343 |   signal mask of the calling thread. | 
 | 3344 |  | 
 | 3345 | - Issue #11858: configparser.ExtendedInterpolation expected lower-case section | 
 | 3346 |   names. | 
 | 3347 |  | 
 | 3348 | - Issue #11324: ConfigParser(interpolation=None) now works correctly. | 
 | 3349 |  | 
 | 3350 | - Issue #11811: ssl.get_server_certificate() is now IPv6-compatible.  Patch | 
 | 3351 |   by Charles-François Natali. | 
 | 3352 |  | 
 | 3353 | - Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the | 
 | 3354 |   strings are too long. | 
 | 3355 |  | 
 | 3356 | - Issue #11236: getpass.getpass responds to ctrl-c or ctrl-z on terminal. | 
 | 3357 |  | 
 | 3358 | - Issue #11856: Speed up parsing of JSON numbers. | 
 | 3359 |  | 
 | 3360 | - Issue #11005: threading.RLock()._release_save() raises a RuntimeError if the | 
 | 3361 |   lock was not acquired. | 
 | 3362 |  | 
 | 3363 | - Issue #11258: Speed up ctypes.util.find_library() under Linux by a factor | 
 | 3364 |   of 5 to 10.  Initial patch by Jonas H. | 
 | 3365 |  | 
 | 3366 | - Issue #11382: Trivial system calls, such as dup() or pipe(), needn't | 
 | 3367 |   release the GIL.  Patch by Charles-François Natali. | 
 | 3368 |  | 
 | 3369 | - Issue #11223: Add threading._info() function providing informations about | 
 | 3370 |   the thread implementation. | 
 | 3371 |  | 
 | 3372 | - Issue #11731: simplify/enhance email parser/generator API by introducing | 
 | 3373 |   policy objects. | 
 | 3374 |  | 
 | 3375 | - Issue #11768: The signal handler of the signal module only calls | 
 | 3376 |   Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or | 
 | 3377 |   parallel calls. PyErr_SetInterrupt() writes also into the wake up file. | 
 | 3378 |  | 
 | 3379 | - Issue #11492: fix several issues with header folding in the email package. | 
 | 3380 |  | 
 | 3381 | - Issue #11852: Add missing imports and update tests. | 
 | 3382 |  | 
 | 3383 | - Issue #11875: collections.OrderedDict's __reduce__ was temporarily | 
 | 3384 |   mutating the object instead of just working on a copy. | 
 | 3385 |  | 
 | 3386 | - Issue #11467: Fix urlparse behavior when handling urls which contains scheme | 
 | 3387 |   specific part only digits. Patch by Santoso Wijaya. | 
 | 3388 |  | 
 | 3389 | - collections.Counter().copy() now works correctly for subclasses. | 
 | 3390 |  | 
 | 3391 | - Issue #11474: Fix the bug with url2pathname() handling of '/C|/' on Windows. | 
 | 3392 |   Patch by Santoso Wijaya. | 
 | 3393 |  | 
 | 3394 | - Issue #11684: complete email.parser bytes API by adding BytesHeaderParser. | 
 | 3395 |  | 
 | 3396 | - The bz2 module now handles 4GiB+ input buffers correctly. | 
 | 3397 |  | 
 | 3398 | - Issue #9233: Fix json.loads('{}') to return a dict (instead of a list), when | 
 | 3399 |   _json is not available. | 
 | 3400 |  | 
 | 3401 | - Issue #11830: Remove unnecessary introspection code in the decimal module. | 
 | 3402 |  | 
 | 3403 | - Issue #11703: urllib2.geturl() does not return correct url when the original | 
 | 3404 |   url contains #fragment. | 
 | 3405 |  | 
 | 3406 | - Issue #10019: Fixed regression in json module where an indent of 0 stopped | 
 | 3407 |   adding newlines and acted instead like 'None'. | 
 | 3408 |  | 
 | 3409 | - Issue #11186: pydoc ignores a module if its name contains a surrogate | 
 | 3410 |   character in the index of modules. | 
 | 3411 |  | 
 | 3412 | - Issue #11815: Use a light-weight SimpleQueue for the result queue in | 
 | 3413 |   concurrent.futures.ProcessPoolExecutor. | 
 | 3414 |  | 
 | 3415 | - Issue #5162: Treat services like frozen executables to allow child spawning | 
 | 3416 |   from multiprocessing.forking on Windows. | 
 | 3417 |  | 
 | 3418 | - logging.basicConfig now supports an optional 'handlers' argument taking an | 
 | 3419 |   iterable of handlers to be added to the root logger. Additional parameter | 
 | 3420 |   checks were also added to basicConfig. | 
 | 3421 |  | 
 | 3422 | - Issue #11814: Fix likely typo in multiprocessing.Pool._terminate(). | 
 | 3423 |  | 
 | 3424 | - Issue #11747: Fix range formatting in difflib.context_diff() and | 
 | 3425 |   difflib.unified_diff(). | 
 | 3426 |  | 
 | 3427 | - Issue #8428: Fix a race condition in multiprocessing.Pool when terminating | 
 | 3428 |   worker processes: new processes would be spawned while the pool is being | 
 | 3429 |   shut down.  Patch by Charles-François Natali. | 
 | 3430 |  | 
 | 3431 | - Issue #2650: re.escape() no longer escapes the '_'. | 
 | 3432 |  | 
 | 3433 | - Issue #11757: select.select() now raises ValueError when a negative timeout | 
 | 3434 |   is passed (previously, a select.error with EINVAL would be raised).  Patch | 
 | 3435 |   by Charles-François Natali. | 
 | 3436 |  | 
 | 3437 | - Issue #7311: fix html.parser to accept non-ASCII attribute values. | 
 | 3438 |  | 
 | 3439 | - Issue #11605: email.parser.BytesFeedParser was incorrectly converting | 
 | 3440 |   multipart subparts with an 8-bit CTE into unicode instead of preserving the | 
 | 3441 |   bytes. | 
 | 3442 |  | 
 | 3443 | - Issue #1690608: email.util.formataddr is now RFC 2047 aware:  it now has a | 
 | 3444 |   charset parameter that defaults to utf-8 and is used as the charset for RFC | 
 | 3445 |   2047 encoding when the realname contains non-ASCII characters. | 
 | 3446 |  | 
 | 3447 | - Issue #10963: Ensure that subprocess.communicate() never raises EPIPE. | 
 | 3448 |  | 
 | 3449 | - Issue #10791: Implement missing method GzipFile.read1(), allowing GzipFile | 
 | 3450 |   to be wrapped in a TextIOWrapper.  Patch by Nadeem Vawda. | 
 | 3451 |  | 
 | 3452 | - Issue #11707: Added a fast C version of functools.cmp_to_key(). | 
 | 3453 |   Patch by Filip Gruszczyński. | 
 | 3454 |  | 
 | 3455 | - Issue #11688: Add sqlite3.Connection.set_trace_callback().  Patch by | 
 | 3456 |   Torsten Landschoff. | 
 | 3457 |  | 
 | 3458 | - Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve | 
 | 3459 |   private keys. | 
 | 3460 |  | 
 | 3461 | - Issue #5863: Rewrite BZ2File in pure Python, and allow it to accept | 
 | 3462 |   file-like objects using a new ``fileobj`` constructor argument.  Patch by | 
 | 3463 |   Nadeem Vawda. | 
 | 3464 |  | 
 | 3465 | - unittest.TestCase.assertSameElements has been removed. | 
 | 3466 |  | 
 | 3467 | - sys.getfilesystemencoding() raises a RuntimeError if initfsencoding() was not | 
 | 3468 |   called yet: detect bootstrap (startup) issues earlier. | 
 | 3469 |  | 
 | 3470 | - Issue #11393: Add the new faulthandler module. | 
 | 3471 |  | 
 | 3472 | - Issue #11618: Fix the timeout logic in threading.Lock.acquire() under Windows. | 
 | 3473 |  | 
 | 3474 | - Removed the 'strict' argument to email.parser.Parser, which has been | 
 | 3475 |   deprecated since Python 2.4. | 
 | 3476 |  | 
 | 3477 | - Issue #11256: Fix inspect.getcallargs on functions that take only keyword | 
 | 3478 |   arguments. | 
 | 3479 |  | 
 | 3480 | - Issue #11696: Fix ID generation in msilib. | 
 | 3481 |  | 
 | 3482 | - itertools.accumulate now supports an optional *func* argument for | 
 | 3483 |   a user-supplied binary function. | 
 | 3484 |  | 
 | 3485 | - Issue #11692: Remove unnecessary demo functions in subprocess module. | 
 | 3486 |  | 
 | 3487 | - Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when | 
 | 3488 |   trying to pack a negative (in-range) integer. | 
 | 3489 |  | 
 | 3490 | - Issue #11675: multiprocessing.[Raw]Array objects created from an integer size | 
 | 3491 |   are now zeroed on creation.  This matches the behaviour specified by the | 
 | 3492 |   documentation. | 
 | 3493 |  | 
 | 3494 | - Issue #7639: Fix short file name generation in bdist_msi | 
 | 3495 |  | 
 | 3496 | - Issue #11659: Fix ResourceWarning in test_subprocess introduced by #11459. | 
 | 3497 |   Patch by Ben Hayden. | 
 | 3498 |  | 
 | 3499 | - Issue #11635: Don't use polling in worker threads and processes launched by | 
 | 3500 |   concurrent.futures. | 
 | 3501 |  | 
 | 3502 | - Issue #6811: Allow importlib to change a code object's co_filename attribute | 
 | 3503 |   to match the path to where the source code currently is, not where the code | 
 | 3504 |   object originally came from. | 
 | 3505 |  | 
 | 3506 | - Issue #8754: Have importlib use the repr of a module name in error messages. | 
 | 3507 |  | 
 | 3508 | - Issue #11591: Prevent "import site" from modifying sys.path when python | 
 | 3509 |   was started with -S. | 
 | 3510 |  | 
 | 3511 | - collections.namedtuple() now adds a _source attribute to the generated | 
 | 3512 |   class.  This make the source more accessible than the outdated | 
 | 3513 |   "verbose" option which prints to stdout but doesn't make the source | 
 | 3514 |   string available. | 
 | 3515 |  | 
 | 3516 | - Issue #11371: Mark getopt error messages as localizable.  Patch by Filip | 
 | 3517 |   Gruszczyński. | 
 | 3518 |  | 
 | 3519 | - Issue #11333: Add __slots__ to collections ABCs. | 
 | 3520 |  | 
 | 3521 | - Issue #11628: cmp_to_key generated class should use __slots__. | 
 | 3522 |  | 
 | 3523 | - Issue #11666: let help() display named tuple attributes and methods | 
 | 3524 |   that start with a leading underscore. | 
 | 3525 |  | 
 | 3526 | - Issue #11662: Make urllib and urllib2 ignore redirections if the | 
 | 3527 |   scheme is not HTTP, HTTPS or FTP (CVE-2011-1521). | 
 | 3528 |  | 
 | 3529 | - Issue #5537: Fix time2isoz() and time2netscape() functions of | 
 | 3530 |   httplib.cookiejar for expiration year greater than 2038 on 32-bit systems. | 
 | 3531 |  | 
 | 3532 | - Issue #4391: Use proper gettext plural forms in optparse. | 
 | 3533 |  | 
 | 3534 | - Issue #11127: Raise a TypeError when trying to pickle a socket object. | 
 | 3535 |  | 
 | 3536 | - Issue #11563: Connection:close header is sent by requests using URLOpener | 
 | 3537 |   class which helps in closing of sockets after connection is over. Patch | 
 | 3538 |   contributions by Jeff McNeil and Nadeem Vawda. | 
 | 3539 |  | 
 | 3540 | - Issue #11459: A ``bufsize`` value of 0 in subprocess.Popen() really creates | 
 | 3541 |   unbuffered pipes, such that select() works properly on them. | 
 | 3542 |  | 
 | 3543 | - Issue #5421: Fix misleading error message when one of socket.sendto()'s | 
 | 3544 |   arguments has the wrong type.  Patch by Nikita Vetoshkin. | 
 | 3545 |  | 
 | 3546 | - Issue #10812: Add some extra posix functions to the os module. | 
 | 3547 |  | 
 | 3548 | - Issue #10979: unittest stdout buffering now works with class and module | 
 | 3549 |   setup and teardown. | 
 | 3550 |  | 
 | 3551 | - Issue #11577: fix ResourceWarning triggered by improved binhex test coverage | 
 | 3552 |  | 
 | 3553 | - Issue #11243: fix the parameter querying methods of Message to work if | 
 | 3554 |   the headers contain un-encoded non-ASCII data. | 
 | 3555 |  | 
 | 3556 | - Issue #11401: fix handling of headers with no value; this fixes a regression | 
 | 3557 |   relative to Python2 and the result is now the same as it was in Python2. | 
 | 3558 |  | 
 | 3559 | - Issue #9298: base64 bodies weren't being folded to line lengths less than 78, | 
 | 3560 |   which was a regression relative to Python2.  Unlike Python2, the last line | 
 | 3561 |   of the folded body now ends with a carriage return. | 
 | 3562 |  | 
 | 3563 | - Issue #11560: shutil.unpack_archive now correctly handles the format | 
 | 3564 |   parameter. Patch by Evan Dandrea. | 
 | 3565 |  | 
 | 3566 | - Issue #5870: Add `subprocess.DEVNULL` constant. | 
 | 3567 |  | 
 | 3568 | - Issue #11133: fix two cases where inspect.getattr_static can trigger code | 
 | 3569 |   execution. Patch by Andreas Stührk. | 
 | 3570 |  | 
 | 3571 | - Issue #11569: use absolute path to the sysctl command in multiprocessing to | 
 | 3572 |   ensure that it will be found regardless of the shell PATH. This ensures | 
 | 3573 |   that multiprocessing.cpu_count works on default installs of MacOSX. | 
 | 3574 |  | 
 | 3575 | - Issue #11501: disutils.archive_utils.make_zipfile no longer fails if zlib is | 
 | 3576 |   not installed. Instead, the zipfile.ZIP_STORED compression is used to create | 
 | 3577 |   the ZipFile. Patch by Natalia B. Bidart. | 
 | 3578 |  | 
 | 3579 | - Issue #11289: `smtp.SMTP` class is now a context manager so it can be used | 
 | 3580 |   in a `with` statement.  Contributed by Giampaolo Rodola. | 
 | 3581 |  | 
 | 3582 | - Issue #11554: Fixed support for Japanese codecs; previously the body output | 
 | 3583 |   encoding was not done if euc-jp or shift-jis was specified as the charset. | 
 | 3584 |  | 
 | 3585 | - Issue #11509: Significantly increase test coverage of fileinput. | 
 | 3586 |   Patch by Denver Coneybeare at PyCon 2011 Sprints. | 
 | 3587 |  | 
 | 3588 | - Issue #11407: `TestCase.run` returns the result object used or created. | 
 | 3589 |   Contributed by Janathan Hartley. | 
 | 3590 |  | 
 | 3591 | - Issue #11500: Fixed a bug in the OS X proxy bypass code for fully qualified | 
 | 3592 |   IP addresses in the proxy exception list. | 
 | 3593 |  | 
 | 3594 | - Issue #11491: dbm.error is no longer raised when dbm.open is called with | 
 | 3595 |   the "n" as the flag argument and the file exists. The behavior matches | 
 | 3596 |   the documentation and general logic. | 
 | 3597 |  | 
 | 3598 | - Issue #1162477: Postel Principle adjustment to email date parsing: handle the | 
 | 3599 |   fact that some non-compliant MUAs use '.' instead of ':' in time specs. | 
 | 3600 |  | 
 | 3601 | - Issue #11131: Fix sign of zero in decimal.Decimal plus and minus | 
 | 3602 |   operations when the rounding mode is ROUND_FLOOR. | 
 | 3603 |  | 
 | 3604 | - Issue #9935: Speed up pickling of instances of user-defined classes. | 
 | 3605 |  | 
 | 3606 | - Issue #5622: Fix curses.wrapper to raise correct exception if curses | 
 | 3607 |   initialization fails. | 
 | 3608 |  | 
 | 3609 | - Issue #11408: In threading.Lock.acquire(), only call gettimeofday() when | 
 | 3610 |   really necessary.  Patch by Charles-François Natali. | 
 | 3611 |  | 
 | 3612 | - Issue #11391: Writing to a mmap object created with | 
 | 3613 |   ``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a | 
 | 3614 |   TypeError.  Patch by Charles-François Natali. | 
 | 3615 |  | 
 | 3616 | - Issue #9795: add context manager protocol support for nntplib.NNTP class. | 
 | 3617 |  | 
 | 3618 | - Issue #11306: mailbox in certain cases adapts to an inability to open | 
 | 3619 |   certain files in read-write mode.  Previously it detected this by | 
 | 3620 |   checking for EACCES, now it also checks for EROFS. | 
 | 3621 |  | 
 | 3622 | - Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors | 
 | 3623 |   on accept(), send() and recv(). | 
 | 3624 |  | 
 | 3625 | - Issue #11377: Deprecate platform.popen() and reimplement it with os.popen(). | 
 | 3626 |  | 
 | 3627 | - Issue #8513: On UNIX, subprocess supports bytes command string. | 
 | 3628 |  | 
 | 3629 | - Issue #10866: Add socket.sethostname().  Initial patch by Ross Lagerwall. | 
 | 3630 |  | 
 | 3631 | - Issue #11140: Lock.release() now raises a RuntimeError when attempting | 
 | 3632 |   to release an unacquired lock, as claimed in the threading documentation. | 
 | 3633 |   The _thread.error exception is now an alias of RuntimeError.  Patch by | 
 | 3634 |   Filip Gruszczyński.  Patch for _dummy_thread by Aymeric Augustin. | 
 | 3635 |  | 
 | 3636 | - Issue #8594: ftplib now provides a source_address parameter to specify which | 
 | 3637 |   (address, port) to bind to before connecting. | 
 | 3638 |  | 
 | 3639 | - Issue #11326: Add the missing connect_ex() implementation for SSL sockets, | 
 | 3640 |   and make it work for non-blocking connects. | 
 | 3641 |  | 
 | 3642 | - Issue #11297: Add collections.ChainMap(). | 
 | 3643 |  | 
 | 3644 | - Issue #10755: Add the posix.flistdir() function.  Patch by Ross Lagerwall. | 
 | 3645 |  | 
 | 3646 | - Issue #4761: Add the ``*at()`` family of functions (openat(), etc.) to the | 
 | 3647 |   posix module.  Patch by Ross Lagerwall. | 
 | 3648 |  | 
 | 3649 | - Issue #7322: Trying to read from a socket's file-like object after a timeout | 
 | 3650 |   occurred now raises an error instead of silently losing data. | 
 | 3651 |  | 
 | 3652 | - Issue #11291: poplib.POP no longer suppresses errors on quit(). | 
 | 3653 |  | 
 | 3654 | - Issue #11177: asyncore's create_socket() arguments can now be omitted. | 
 | 3655 |  | 
 | 3656 | - Issue #6064: Add a ``daemon`` keyword argument to the threading.Thread | 
 | 3657 |   and multiprocessing.Process constructors in order to override the | 
 | 3658 |   default behaviour of inheriting the daemonic property from the current | 
 | 3659 |   thread/process. | 
 | 3660 |  | 
 | 3661 | - Issue #10956: Buffered I/O classes retry reading or writing after a signal | 
 | 3662 |   has arrived and the handler returned successfully. | 
 | 3663 |  | 
 | 3664 | - Issue #10784: New os.getpriority() and os.setpriority() functions. | 
 | 3665 |  | 
 | 3666 | - Issue #11114: Fix catastrophic performance of tell() on text files (up | 
 | 3667 |   to 1000x faster in some cases).  It is still one to two order of magnitudes | 
 | 3668 |   slower than binary tell(). | 
 | 3669 |  | 
 | 3670 | - Issue #10882: Add os.sendfile function. | 
 | 3671 |  | 
 | 3672 | - Issue #10868: Allow usage of the register method of an ABC as a class | 
 | 3673 |   decorator. | 
 | 3674 |  | 
 | 3675 | - Issue #11224: Fixed a regression in tarfile that affected the file-like | 
 | 3676 |   objects returned by TarFile.extractfile() regarding performance, memory | 
 | 3677 |   consumption and failures with the stream interface. | 
 | 3678 |  | 
 | 3679 | - Issue #10924: Adding salt and Modular Crypt Format to crypt library. | 
 | 3680 |   Moved old C wrapper to _crypt, and added a Python wrapper with | 
 | 3681 |   enhanced salt generation and simpler API for password generation. | 
 | 3682 |  | 
 | 3683 | - Issue #11074: Make 'tokenize' so it can be reloaded. | 
 | 3684 |  | 
 | 3685 | - Issue #11085: Moved collections abstract base classes into a separate | 
 | 3686 |   module called collections.abc, following the pattern used by importlib.abc. | 
 | 3687 |   For backwards compatibility, the names are imported into the collections | 
 | 3688 |   module. | 
 | 3689 |  | 
 | 3690 | - Issue #4681: Allow mmap() to work on file sizes and offsets larger than | 
 | 3691 |   4GB, even on 32-bit builds.  Initial patch by Ross Lagerwall, adapted for | 
 | 3692 |   32-bit Windows. | 
 | 3693 |  | 
 | 3694 | - Issue #11169: compileall module uses repr() to format filenames and paths to | 
 | 3695 |   escape surrogate characters and show spaces. | 
 | 3696 |  | 
 | 3697 | - Issue #11089: Fix performance issue limiting the use of ConfigParser() | 
 | 3698 |   with large config files. | 
 | 3699 |  | 
 | 3700 | - Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers | 
 | 3701 |   larger than 4GB.  Patch by Nadeem Vawda. | 
 | 3702 |  | 
 | 3703 | - Issue #11388: Added a clear() method to MutableSequence | 
 | 3704 |  | 
 | 3705 | - Issue #11174: Add argparse.MetavarTypeHelpFormatter, which uses type names | 
 | 3706 |   for the names of optional and positional arguments in help messages. | 
 | 3707 |  | 
 | 3708 | - Issue #9348: Raise an early error if argparse nargs and metavar don't match. | 
 | 3709 |  | 
 | 3710 | - Issue #8982: Improve the documentation for the argparse Namespace object. | 
 | 3711 |  | 
 | 3712 | - Issue #9343: Document that argparse parent parsers must be configured before | 
 | 3713 |   their children. | 
 | 3714 |  | 
 | 3715 | - Issue #9026: Fix order of argparse sub-commands in help messages. | 
 | 3716 |  | 
 | 3717 | - Issue #9347: Fix formatting for tuples in argparse type= error messages. | 
 | 3718 |  | 
 | 3719 | - Issue #12191: Added shutil.chown() to change user and/or group owner of a | 
 | 3720 |   given path also specifying their names. | 
 | 3721 |  | 
 | 3722 | - Issue #13988: The _elementtree accelerator is used whenever available. | 
 | 3723 |   Now xml.etree.cElementTree becomes a deprecated alias to ElementTree. | 
 | 3724 |  | 
 | 3725 | Build | 
 | 3726 | ----- | 
 | 3727 |  | 
 | 3728 | - Issue #6807: Run msisupport.mak earlier. | 
 | 3729 |  | 
 | 3730 | - Issue #10580: Minor grammar change in Windows installer. | 
 | 3731 |  | 
 | 3732 | - Issue #13326: Clean __pycache__ directories correctly on OpenBSD. | 
 | 3733 |  | 
 | 3734 | - PEP 393: the configure option --with-wide-unicode is removed. | 
 | 3735 |  | 
 | 3736 | - Issue #12852: Set _XOPEN_SOURCE to 700, instead of 600, to get POSIX 2008 | 
 | 3737 |   functions on OpenBSD (e.g. fdopendir). | 
 | 3738 |  | 
 | 3739 | - Issue #11863: Remove support for legacy systems deprecated in Python 3.2 | 
 | 3740 |   (following PEP 11).  These systems are systems using Mach C Threads, | 
 | 3741 |   SunOS lightweight processes, GNU pth threads and IRIX threads. | 
 | 3742 |  | 
 | 3743 | - Issue #8746: Correct faulty configure checks so that os.chflags() and | 
 | 3744 |   os.lchflags() are once again built on systems that support these | 
 | 3745 |   functions (BSD and OS X).  Also add new stat file flags for OS X | 
 | 3746 |   (UF_HIDDEN and UF_COMPRESSED). | 
 | 3747 |  | 
 | 3748 | - Issue #10645: Installing Python no longer creates a | 
 | 3749 |   Python-X.Y.Z-pyX.Y.egg-info file in the lib-dynload directory. | 
 | 3750 |  | 
 | 3751 | - Do not accidentally include the directory containing sqlite.h twice when | 
 | 3752 |   building sqlite3. | 
 | 3753 |  | 
 | 3754 | - Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds, | 
 | 3755 |   ensure "make install" creates symlinks in --prefix bin for the "-32" | 
 | 3756 |   files in the framework bin directory like the installer does. | 
 | 3757 |  | 
 | 3758 | - Issue #11347: Use --no-as-needed when linking libpython3.so. | 
 | 3759 |  | 
 | 3760 | - Issue #11411: Fix 'make DESTDIR=' with a relative destination. | 
 | 3761 |  | 
 | 3762 | - Issue #11268: Prevent Mac OS X Installer failure if Documentation | 
 | 3763 |   package had previously been installed. | 
 | 3764 |  | 
 | 3765 | - Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2. | 
 | 3766 |  | 
 | 3767 |  | 
 | 3768 | IDLE | 
 | 3769 | ---- | 
 | 3770 |  | 
 | 3771 | - Issue #11718: IDLE's open module dialog couldn't find the __init__.py | 
 | 3772 |   file in a package. | 
 | 3773 |  | 
 | 3774 | Tools/Demos | 
 | 3775 | ----------- | 
 | 3776 |  | 
 | 3777 | - Issue #14053: patchcheck.py ("make patchcheck") now works with MQ patches. | 
 | 3778 |   Patch by Francisco Martín Brugué. | 
 | 3779 |  | 
 | 3780 | - Issue #13930: 2to3 is now able to write its converted output files to another | 
 | 3781 |   directory tree as well as copying unchanged files and altering the file | 
 | 3782 |   suffix.  See its new -o, -W and --add-suffix options.  This makes it more | 
 | 3783 |   useful in many automated code translation workflows. | 
 | 3784 |  | 
 | 3785 | - Issue #13628: python-gdb.py is now able to retrieve more frames in the Python | 
 | 3786 |   traceback if Python is optimized. | 
 | 3787 |  | 
 | 3788 | - Issue #11996: libpython (gdb), replace "py-bt" command by "py-bt-full" and | 
 | 3789 |   add a smarter "py-bt" command printing a classic Python traceback. | 
 | 3790 |  | 
 | 3791 | - Issue #11179: Make ccbench work under Python 3.1 and 2.7 again. | 
 | 3792 |  | 
 | 3793 | - Issue #10639: reindent.py no longer converts newlines and will raise | 
 | 3794 |   an error if attempting to convert a file with mixed newlines. | 
 | 3795 |   "--newline" option added to specify new line character. | 
 | 3796 |  | 
 | 3797 | Extension Modules | 
 | 3798 | ----------------- | 
 | 3799 |  | 
 | 3800 | - Issue #13840: The error message produced by ctypes.create_string_buffer | 
 | 3801 |   when given a Unicode string has been fixed. | 
 | 3802 |  | 
 | 3803 | - Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by | 
 | 3804 |   Vilmos Nebehaj. | 
 | 3805 |  | 
 | 3806 | - Issue #7777: socket: Add Reliable Datagram Sockets (PF_RDS) support. | 
 | 3807 |  | 
 | 3808 | - Issue #13159: FileIO and BZ2Compressor/BZ2Decompressor now use a linear-time | 
 | 3809 |   buffer growth strategy instead of a quadratic-time one. | 
 | 3810 |  | 
 | 3811 | - Issue #10141: socket: Add SocketCAN (PF_CAN) support. Initial patch by | 
 | 3812 |   Matthias Fuchs, updated by Tiago Gonçalves. | 
 | 3813 |  | 
 | 3814 | - Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle | 
 | 3815 |   would be finalized after the reference to its underlying BufferedRWPair's | 
 | 3816 |   writer got cleared by the GC. | 
 | 3817 |  | 
 | 3818 | - Issue #12881: ctypes: Fix segfault with large structure field names. | 
 | 3819 |  | 
 | 3820 | - Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by | 
 | 3821 |   Thomas Jarosch. | 
 | 3822 |  | 
 | 3823 | - Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype. | 
 | 3824 |   Thanks to Suman Saha for finding the bug and providing a patch. | 
 | 3825 |  | 
 | 3826 | - Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that | 
 | 3827 |   file descriptor was actually received. | 
 | 3828 |  | 
 | 3829 | - Issue #1172711: Add 'long long' support to the array module. | 
 | 3830 |   Initial patch by Oren Tirosh and Hirokazu Yamamoto. | 
 | 3831 |  | 
 | 3832 | - Issue #12483: ctypes: Fix a crash when the destruction of a callback | 
 | 3833 |   object triggers the garbage collector. | 
 | 3834 |  | 
 | 3835 | - Issue #12950: Fix passing file descriptors in multiprocessing, under | 
 | 3836 |   OpenIndiana/Illumos. | 
 | 3837 |  | 
 | 3838 | - Issue #12764: Fix a crash in ctypes when the name of a Structure field is not | 
 | 3839 |   a string. | 
 | 3840 |  | 
 | 3841 | - Issue #11241: subclasses of ctypes.Array can now be subclassed. | 
 | 3842 |  | 
 | 3843 | - Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to | 
 | 3844 |   some functions like file.write(). | 
 | 3845 |  | 
 | 3846 | - Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper | 
 | 3847 |   signature.  Without this, architectures where sizeof void* != sizeof int are | 
 | 3848 |   broken.  Patch given by Hallvard B Furuseth. | 
 | 3849 |  | 
 | 3850 | - Issue #12051: Fix segfault in json.dumps() while encoding highly-nested | 
 | 3851 |   objects using the C accelerations. | 
 | 3852 |  | 
 | 3853 | - Issue #12017: Fix segfault in json.loads() while decoding highly-nested | 
 | 3854 |   objects using the C accelerations. | 
 | 3855 |  | 
 | 3856 | - Issue #1838: Prevent segfault in ctypes, when _as_parameter_ on a class is set | 
 | 3857 |   to an instance of the class. | 
 | 3858 |  | 
 | 3859 | Tests | 
 | 3860 | ----- | 
 | 3861 |  | 
 | 3862 | - Issue #11689: Fix a variable scoping error in an sqlite3 test | 
 | 3863 |  | 
 | 3864 | - Issue #13786: Remove unimplemented 'trace' long option from regrtest.py. | 
 | 3865 |  | 
 | 3866 | - Issue #13725: Fix regrtest to recognize the documented -d flag. | 
 | 3867 |   Patch by Erno Tukia. | 
 | 3868 |  | 
 | 3869 | - Issue #13304: Skip test case if user site-packages disabled (-s or | 
 | 3870 |   PYTHONNOUSERSITE).  (Patch by Carl Meyer) | 
 | 3871 |  | 
 | 3872 | - Issue #5661: Add a test for ECONNRESET/EPIPE handling to test_asyncore. Patch | 
 | 3873 |   by Xavier de Gaye. | 
 | 3874 |  | 
 | 3875 | - Issue #13218: Fix test_ssl failures on Debian/Ubuntu. | 
 | 3876 |  | 
 | 3877 | - Re-enable lib2to3's test_parser.py tests, though with an expected failure | 
 | 3878 |   (see issue 13125). | 
 | 3879 |  | 
 | 3880 | - Issue #12656: Add tests for IPv6 and Unix sockets to test_asyncore. | 
 | 3881 |  | 
 | 3882 | - Issue #6484: Add unit tests for mailcap module (patch by Gregory Nofi) | 
 | 3883 |  | 
 | 3884 | - Issue #11651: Improve the Makefile test targets to run more of the test suite | 
 | 3885 |   more quickly. The --multiprocess option is now enabled by default, reducing | 
 | 3886 |   the amount of time needed to run the tests. "make test" and "make quicktest" | 
 | 3887 |   now include some resource-intensive tests, but no longer run the test suite | 
 | 3888 |   twice to check for bugs in .pyc generation. Tools/scripts/run_test.py provides | 
 | 3889 |   an easy platform-independent way to run test suite with sensible defaults. | 
 | 3890 |  | 
 | 3891 | - Issue #12331: The test suite for the packaging module can now run from an | 
 | 3892 |   installed Python. | 
 | 3893 |  | 
 | 3894 | - Issue #12331: The test suite for lib2to3 can now run from an installed | 
 | 3895 |   Python. | 
 | 3896 |  | 
 | 3897 | - Issue #12626: In regrtest, allow to filter tests using a glob filter | 
 | 3898 |   with the ``-m`` (or ``--match``) option.  This works with all test cases | 
 | 3899 |   using the unittest module.  This is useful with long test suites | 
 | 3900 |   such as test_io or test_subprocess. | 
 | 3901 |  | 
 | 3902 | - Issue #12624: It is now possible to fail after the first failure when | 
 | 3903 |   running in verbose mode (``-v`` or ``-W``), by using the ``--failfast`` | 
 | 3904 |   (or ``-G``) option to regrtest.  This is useful with long test suites | 
 | 3905 |   such as test_io or test_subprocess. | 
 | 3906 |  | 
 | 3907 | - Issue #12587: Correct faulty test file and reference in test_tokenize. | 
 | 3908 |   (Patch by Robert Xiao) | 
 | 3909 |  | 
 | 3910 | - Issue #12573: Add resource checks for dangling Thread and Process objects. | 
 | 3911 |  | 
 | 3912 | - Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64' | 
 | 3913 |   as the processor type on some Mac systems. | 
 | 3914 |  | 
 | 3915 | - Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary | 
 | 3916 |   failure in name resolution. | 
 | 3917 |  | 
 | 3918 | - Issue #11812: Solve transient socket failure to connect to 'localhost' | 
 | 3919 |   in test_telnetlib.py. | 
 | 3920 |  | 
 | 3921 | - Solved a potential deadlock in test_telnetlib.py. Related to issue #11812. | 
 | 3922 |  | 
 | 3923 | - Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and | 
 | 3924 |   an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder | 
 | 3925 |   Web site. | 
 | 3926 |  | 
 | 3927 | - Avoid failing in test_urllibnet.test_bad_address when some overzealous | 
 | 3928 |   DNS service (e.g. OpenDNS) resolves a non-existent domain name.  The test | 
 | 3929 |   is now skipped instead. | 
 | 3930 |  | 
 | 3931 | - Issue #12440: When testing whether some bits in SSLContext.options can be | 
 | 3932 |   reset, check the version of the OpenSSL headers Python was compiled against, | 
 | 3933 |   rather than the runtime version of the OpenSSL library. | 
 | 3934 |  | 
 | 3935 | - Issue #11512: Add a test suite for the cgitb module. Patch by Robbie Clemons. | 
 | 3936 |  | 
 | 3937 | - Issue #12497: Install test/data to prevent failures of the various codecmaps | 
 | 3938 |   tests. | 
 | 3939 |  | 
 | 3940 | - Issue #12496: Install test/capath directory to prevent test_connect_capath | 
 | 3941 |   testcase failure in test_ssl. | 
 | 3942 |  | 
 | 3943 | - Issue #12469: Run wakeup and pending signal tests in a subprocess to run the | 
 | 3944 |   test in a fresh process with only one thread and to not change signal | 
 | 3945 |   handling of the parent process. | 
 | 3946 |  | 
 | 3947 | - Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run | 
 | 3948 |   test_tk or test_ttk_guionly under a username that is not currently logged | 
 | 3949 |   in to the console windowserver (as may be the case under buildbot or ssh). | 
 | 3950 |  | 
 | 3951 | - Issue #12407: Explicitly skip test_capi.EmbeddingTest under Windows. | 
 | 3952 |  | 
 | 3953 | - Issue #12400: regrtest -W doesn't rerun the tests twice anymore, but captures | 
 | 3954 |   the output and displays it on failure instead. regrtest -v doesn't print the | 
 | 3955 |   error twice anymore if there is only one error. | 
 | 3956 |  | 
 | 3957 | - Issue #12141: Install copies of template C module file so that | 
 | 3958 |   test_build_ext of test_distutils and test_command_build_ext of | 
 | 3959 |   test_packaging are no longer silently skipped when | 
 | 3960 |   run outside of a build directory. | 
 | 3961 |  | 
 | 3962 | - Issue #8746: Add additional tests for os.chflags() and os.lchflags(). | 
 | 3963 |   Patch by Garrett Cooper. | 
 | 3964 |  | 
 | 3965 | - Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9 | 
 | 3966 |   2.8 +  on Mac OS X.  (Patch by Ronald Oussoren) | 
 | 3967 |  | 
 | 3968 | - Issue #12057: Add tests for ISO 2022 codecs (iso2022_jp, iso2022_jp_2, | 
 | 3969 |   iso2022_kr). | 
 | 3970 |  | 
 | 3971 | - Issue #12096: Fix a race condition in test_threading.test_waitfor(). Patch | 
 | 3972 |   written by Charles-François Natali. | 
 | 3973 |  | 
 | 3974 | - Issue #11614: import __hello__ prints "Hello World!". Patch written by | 
 | 3975 |   Andreas Stührk. | 
 | 3976 |  | 
 | 3977 | - Issue #5723: Improve json tests to be executed with and without accelerations. | 
 | 3978 |  | 
 | 3979 | - Issue #12041: Make test_wait3 more robust. | 
 | 3980 |  | 
 | 3981 | - Issue #11873: Change regex in test_compileall to fix occasional failures when | 
 | 3982 |   when the randomly generated temporary path happened to match the regex. | 
 | 3983 |  | 
 | 3984 | - Issue #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost". | 
 | 3985 |   Patch written by Charles-Francois Natali. | 
 | 3986 |  | 
 | 3987 | - Issue #8407, #11859: Fix tests of test_io using threads and an alarm: use | 
 | 3988 |   pthread_sigmask() to ensure that the SIGALRM signal is received by the main | 
 | 3989 |   thread. | 
 | 3990 |  | 
 | 3991 | - Issue #11811: Factor out detection of IPv6 support on the current host | 
 | 3992 |   and make it available as ``test.support.IPV6_ENABLED``.  Patch by | 
 | 3993 |   Charles-François Natali. | 
 | 3994 |  | 
 | 3995 | - Issue #10914: Add a minimal embedding test to test_capi. | 
 | 3996 |  | 
 | 3997 | - Issue #11223: Skip test_lock_acquire_interruption() and | 
 | 3998 |   test_rlock_acquire_interruption() of test_threadsignals if a thread lock is | 
 | 3999 |   implemented using a POSIX mutex and a POSIX condition variable. A POSIX | 
 | 4000 |   condition variable cannot be interrupted by a signal (e.g. on Linux, the | 
 | 4001 |   futex system call is restarted). | 
 | 4002 |  | 
 | 4003 | - Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition. | 
 | 4004 |  | 
 | 4005 | - Fix possible "file already exists" error when running the tests in parallel. | 
 | 4006 |  | 
 | 4007 | - Issue #11719: Fix message about unexpected test_msilib skip on non-Windows | 
 | 4008 |   platforms. Patch by Nadeem Vawda. | 
 | 4009 |  | 
 | 4010 | - Issue #11727: Add a --timeout option to regrtest: if a test takes more than | 
 | 4011 |   TIMEOUT seconds, dumps the traceback of all threads and exits. | 
 | 4012 |  | 
 | 4013 | - Issue #11653: fix -W with -j in regrtest. | 
 | 4014 |  | 
 | 4015 | - The email test suite now lives in the Lib/test/test_email package.  The test | 
 | 4016 |   harness code has also been modernized to allow use of new unittest features. | 
 | 4017 |  | 
 | 4018 | - regrtest now discovers test packages as well as test modules. | 
 | 4019 |  | 
 | 4020 | - Issue #11577: improve test coverage of binhex.py. Patch by Arkady Koplyarov. | 
 | 4021 |  | 
 | 4022 | - New test_crashers added to exercise the scripts in the Lib/test/crashers | 
 | 4023 |   directory and confirm they fail as expected | 
 | 4024 |  | 
 | 4025 | - Issue #11578: added test for the timeit module.  Patch by Michael Henry. | 
 | 4026 |  | 
 | 4027 | - Issue #11503: improve test coverage of posixpath.py. Patch by Evan Dandrea. | 
 | 4028 |  | 
 | 4029 | - Issue #11505: improves test coverage of string.py, increases granularity of | 
 | 4030 |   string.Formatter tests. Initial patch by Alicia Arlen. | 
 | 4031 |  | 
 | 4032 | - Issue #11548: Improve test coverage of the shutil module. Patch by | 
 | 4033 |   Evan Dandrea. | 
 | 4034 |  | 
 | 4035 | - Issue #11554: Reactivated test_email_codecs. | 
 | 4036 |  | 
 | 4037 | - Issue #11505: improves test coverage of string.py. Patch by Alicia | 
 | 4038 |   Arlen | 
 | 4039 |  | 
 | 4040 | - Issue #11490: test_subprocess:test_leaking_fds_on_error no longer gives a | 
 | 4041 |   false positive if the last directory in the path is inaccessible. | 
 | 4042 |  | 
 | 4043 | - Issue #11223: Fix test_threadsignals to fail, not hang, when the | 
 | 4044 |   non-semaphore implementation of locks is used under POSIX. | 
 | 4045 |  | 
 | 4046 | - Issue #10911: Add tests on CGI with non-ASCII characters. Patch written by | 
 | 4047 |   Pierre Quentel. | 
 | 4048 |  | 
 | 4049 | - Issue #9931: Fix hangs in GUI tests under Windows in certain conditions. | 
 | 4050 |   Patch by Hirokazu Yamamoto. | 
 | 4051 |  | 
 | 4052 | - Issue #10512: Properly close sockets under test.test_cgi. | 
 | 4053 |  | 
 | 4054 | - Issue #10992: Make tests pass under coverage. | 
 | 4055 |  | 
 | 4056 | - Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due | 
 | 4057 |   to open door files. | 
 | 4058 |  | 
 | 4059 | - Issue #10990: Prevent tests from clobbering a set trace function. | 
 | 4060 |  | 
 | 4061 | C-API | 
 | 4062 | ----- | 
 | 4063 |  | 
 | 4064 | - Add PyObject_GenericGetDict and PyObject_GeneriSetDict. They are generic | 
 | 4065 |   implementations for the getter and setter of a ``__dict__`` descriptor of C | 
 | 4066 |   types. | 
 | 4067 |  | 
 | 4068 | - Issue #13727: Add 3 macros to access PyDateTime_Delta members: | 
 | 4069 |   PyDateTime_DELTA_GET_DAYS, PyDateTime_DELTA_GET_SECONDS, | 
 | 4070 |   PyDateTime_DELTA_GET_MICROSECONDS. | 
 | 4071 |  | 
 | 4072 | - Issue #10542: Add 4 macros to work with surrogates: Py_UNICODE_IS_SURROGATE, | 
 | 4073 |   Py_UNICODE_IS_HIGH_SURROGATE, Py_UNICODE_IS_LOW_SURROGATE, | 
 | 4074 |   Py_UNICODE_JOIN_SURROGATES. | 
 | 4075 |  | 
 | 4076 | - Issue #12724: Add Py_RETURN_NOTIMPLEMENTED macro for returning NotImplemented. | 
 | 4077 |  | 
 | 4078 | - PY_PATCHLEVEL_REVISION has been removed, since it's meaningless with | 
 | 4079 |   Mercurial. | 
 | 4080 |  | 
 | 4081 | - Issue #12173: The first argument of PyImport_ImportModuleLevel is now `const | 
 | 4082 |   char *` instead of `char *`. | 
 | 4083 |  | 
 | 4084 | - Issue #12380: PyArg_ParseTuple now accepts a bytearray for the 'c' format. | 
 | 4085 |  | 
 | 4086 | Documentation | 
 | 4087 | ------------- | 
 | 4088 |  | 
 | 4089 | - Issues #13491 and #13995: Fix many errors in sqlite3 documentation. | 
 | 4090 |   Initial patch for #13491 by Johannes Vogel. | 
 | 4091 |  | 
 | 4092 | - Issue #13402: Document absoluteness of sys.executable. | 
 | 4093 |  | 
 | 4094 | - Issue #13883: PYTHONCASEOK also works on OS X. | 
 | 4095 |  | 
 | 4096 | - Issue #12949: Document the kwonlyargcount argument for the PyCode_New | 
 | 4097 |   C API function. | 
 | 4098 |  | 
 | 4099 | - Issue #13513: Fix io.IOBase documentation to correctly link to the | 
 | 4100 |   io.IOBase.readline method instead of the readline module. | 
 | 4101 |  | 
 | 4102 | - Issue #13237: Reorganise subprocess documentation to emphasise convenience | 
 | 4103 |   functions and the most commonly needed arguments to Popen. | 
 | 4104 |  | 
 | 4105 | - Issue #13141: Demonstrate recommended style for socketserver examples. | 
 | 4106 |  | 
 | 4107 | - Issue #11818: Fix tempfile examples for Python 3. | 
 | 4108 |  | 
 | 4109 |  | 
 | 4110 | What's New in Python 3.2? | 
 | 4111 | ========================= | 
 | 4112 |  | 
 | 4113 | *Release date: 20-Feb-2011* | 
 | 4114 |  | 
 | 4115 | Core and Builtins | 
 | 4116 | ----------------- | 
 | 4117 |  | 
 | 4118 | - Issue #11249: Fix potential crashes when using the limited API. | 
 | 4119 |  | 
 | 4120 | Build | 
 | 4121 | ----- | 
 | 4122 |  | 
 | 4123 | - Issue #11222: Fix non-framework shared library build on Mac OS X. | 
 | 4124 |  | 
 | 4125 | - Issue #11184: Fix large-file support on AIX. | 
 | 4126 |  | 
 | 4127 | - Issue #941346: Fix broken shared library build on AIX. | 
 | 4128 |  | 
 | 4129 | Documentation | 
 | 4130 | ------------- | 
 | 4131 |  | 
 | 4132 | - Issue #10709: Add updated AIX notes in Misc/README.AIX. | 
 | 4133 |  | 
 | 4134 |  | 
 | 4135 | What's New in Python 3.2 Release Candidate 3? | 
 | 4136 | ============================================= | 
 | 4137 |  | 
 | 4138 | *Release date: 13-Feb-2011* | 
 | 4139 |  | 
 | 4140 | Core and Builtins | 
 | 4141 | ----------------- | 
 | 4142 |  | 
 | 4143 | - Issue #11134: Add missing fields to typeslots.h. | 
 | 4144 |  | 
 | 4145 | - Issue #11135: Remove redundant doc field from PyType_Spec. | 
 | 4146 |  | 
 | 4147 | - Issue #11067: Add PyType_GetFlags, to support PyUnicode_Check in the limited | 
 | 4148 |   ABI. | 
 | 4149 |  | 
 | 4150 | - Issue #11118: Fix bogus export of None in python3.dll. | 
 | 4151 |  | 
 | 4152 | Library | 
 | 4153 | ------- | 
 | 4154 |  | 
 | 4155 | - Issue #11116: any error during addition of a message to a mailbox now causes a | 
 | 4156 |   rollback, instead of leaving the mailbox partially modified. | 
 | 4157 |  | 
 | 4158 | - Issue #11132: Fix passing of "optimize" parameter when recursing in | 
 | 4159 |   compileall.compile_dir(). | 
 | 4160 |  | 
 | 4161 | - Issue #11110: Fix a potential decref of a NULL in sqlite3. | 
 | 4162 |  | 
 | 4163 | - Issue #8275: Fix passing of callback arguments with ctypes under Win64.  Patch | 
 | 4164 |   by Stan Mihai. | 
 | 4165 |  | 
 | 4166 | Build | 
 | 4167 | ----- | 
 | 4168 |  | 
 | 4169 | - Issue #11079: The /Applications/Python x.x folder created by the Mac OS X | 
 | 4170 |   installers now includes a link to the installed documentation and no longer | 
 | 4171 |   includes an Extras directory.  The Tools directory is now installed in the | 
 | 4172 |   framework under share/doc. | 
 | 4173 |  | 
 | 4174 | - Issue #11121: Fix building with --enable-shared. | 
 | 4175 |  | 
 | 4176 | Tests | 
 | 4177 | ----- | 
 | 4178 |  | 
 | 4179 | - Issue #10971: test_zipimport_support is once again compatible with the refleak | 
 | 4180 |   hunter feature of test.regrtest. | 
 | 4181 |  | 
 | 4182 |  | 
 | 4183 | What's New in Python 3.2 Release Candidate 2? | 
 | 4184 | ============================================= | 
 | 4185 |  | 
 | 4186 | *Release date: 30-Jan-2011* | 
 | 4187 |  | 
 | 4188 | Core and Builtins | 
 | 4189 | ----------------- | 
 | 4190 |  | 
 | 4191 | - Issue #10451: memoryview objects could allow to mutate a readable buffer. | 
 | 4192 |   Initial patch by Ross Lagerwall. | 
 | 4193 |  | 
 | 4194 | Library | 
 | 4195 | ------- | 
 | 4196 |  | 
 | 4197 | - Issue #9124: mailbox now accepts binary input and reads and writes mailbox | 
 | 4198 |   files in binary mode, using the email package's binary support to parse | 
 | 4199 |   arbitrary email messages.  StringIO and text file input is deprecated, | 
 | 4200 |   and string input fails early if non-ASCII characters are used, where | 
 | 4201 |   previously it would fail when the email was processed in a later step. | 
 | 4202 |  | 
 | 4203 | - Issue #10845: Mitigate the incompatibility between the multiprocessing | 
 | 4204 |   module on Windows and the use of package, zipfile or directory execution | 
 | 4205 |   by special casing main modules that actually *are* called __main__.py. | 
 | 4206 |  | 
 | 4207 | - Issue #11045: Protect logging call against None argument. | 
 | 4208 |  | 
 | 4209 | - Issue #11052: Correct IDLE menu accelerators on Mac OS X for Save | 
 | 4210 |   commands. | 
 | 4211 |  | 
 | 4212 | - Issue #11053: Fix IDLE "Syntax Error" windows to behave as in 2.x, | 
 | 4213 |   preventing a confusing hung appearance on OS X with the windows | 
 | 4214 |   obscured. | 
 | 4215 |  | 
 | 4216 | - Issue #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the | 
 | 4217 |   menu accelerators for Open Module, Go to Line, and New Indent Width. | 
 | 4218 |   The accelerators still work but no longer appear in the menu items. | 
 | 4219 |  | 
 | 4220 | - Issue #10989: Fix a crash on SSLContext.load_verify_locations(None, True). | 
 | 4221 |  | 
 | 4222 | - Issue #11020: Command-line pyclbr was broken because of missing 2-to-3 | 
 | 4223 |   conversion. | 
 | 4224 |  | 
 | 4225 | - Issue #11019: Fixed BytesGenerator so that it correctly handles a Message | 
 | 4226 |   with a None body. | 
 | 4227 |  | 
 | 4228 | - Issue #11014: Make 'filter' argument in tarfile.Tarfile.add() into a | 
 | 4229 |   keyword-only argument.  The preceding positional argument was deprecated, | 
 | 4230 |   so it made no sense to add filter as a positional argument. | 
 | 4231 |  | 
 | 4232 | - Issue #11004: Repaired edge case in deque.count(). | 
 | 4233 |  | 
 | 4234 | - Issue #10974: IDLE no longer crashes if its recent files list includes files | 
 | 4235 |   with non-ASCII characters in their path names. | 
 | 4236 |  | 
 | 4237 | - Have hashlib.algorithms_available and hashlib.algorithms_guaranteed both | 
 | 4238 |   return sets instead of one returning a tuple and the other a frozenset. | 
 | 4239 |  | 
 | 4240 | - Issue #10987: Fix the recursion limit handling in the _pickle module. | 
 | 4241 |  | 
 | 4242 | - Issue #10983: Fix several bugs making tunnel requests in http.client. | 
 | 4243 |  | 
 | 4244 | - Issue #10955: zipimport uses ASCII encoding instead of cp437 to decode | 
 | 4245 |   filenames, at bootstrap, if the codec registry is not ready yet. It is still | 
 | 4246 |   possible to have non-ASCII filenames using the Unicode flag (UTF-8 encoding) | 
 | 4247 |   for all file entries in the ZIP file. | 
 | 4248 |  | 
 | 4249 | - Issue #10949: Improved robustness of rotating file handlers. | 
 | 4250 |  | 
 | 4251 | - Issue #10955: Fix a potential crash when trying to mmap() a file past its | 
 | 4252 |   length.  Initial patch by Ross Lagerwall. | 
 | 4253 |  | 
 | 4254 | - Issue #10898: Allow compiling the posix module when the C library defines | 
 | 4255 |   a symbol named FSTAT. | 
 | 4256 |  | 
 | 4257 | - Issue #10980: the HTTP server now encodes headers with iso-8859-1 (latin1) | 
 | 4258 |   encoding.  This is the preferred encoding of PEP 3333 and the base encoding | 
 | 4259 |   of HTTP 1.1. | 
 | 4260 |  | 
 | 4261 | - To match the behaviour of HTTP server, the HTTP client library now also | 
 | 4262 |   encodes headers with iso-8859-1 (latin1) encoding.  It was already doing | 
 | 4263 |   that for incoming headers which makes this behaviour now consistent in | 
 | 4264 |   both incoming and outgoing direction. | 
 | 4265 |  | 
 | 4266 | - Issue #9509: argparse now properly handles IOErrors raised by | 
 | 4267 |   argparse.FileType. | 
 | 4268 |  | 
 | 4269 | - Issue #10961: The new pydoc server now better handles exceptions raised | 
 | 4270 |   during request handling. | 
 | 4271 |  | 
 | 4272 | - Issue #10680: Fix mutually exclusive arguments for argument groups in | 
 | 4273 |   argparse. | 
 | 4274 |  | 
 | 4275 | Build | 
 | 4276 | ----- | 
 | 4277 |  | 
 | 4278 | - Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with | 
 | 4279 |   the system-provided Python. | 
 | 4280 |  | 
 | 4281 |  | 
 | 4282 | What's New in Python 3.2 Release Candidate 1 | 
 | 4283 | ============================================ | 
 | 4284 |  | 
 | 4285 | *Release date: 16-Jan-2011* | 
 | 4286 |  | 
 | 4287 | Core and Builtins | 
 | 4288 | ----------------- | 
 | 4289 |  | 
 | 4290 | - Issue #10889: range indexing and slicing now works correctly on ranges with | 
 | 4291 |   a length that exceeds sys.maxsize. | 
 | 4292 |  | 
 | 4293 | - Issue #10892: Don't segfault when trying to delete __abstractmethods__ from a | 
 | 4294 |   class. | 
 | 4295 |  | 
 | 4296 | - Issue #8020: Avoid a crash where the small objects allocator would read | 
 | 4297 |   non-Python managed memory while it is being modified by another thread.  Patch | 
 | 4298 |   by Matt Bandy. | 
 | 4299 |  | 
 | 4300 | - Issue #10841: On Windows, set the binary mode on stdin, stdout, stderr and all | 
 | 4301 |   io.FileIO objects (to not translate newlines, \r\n <=> \n).  The Python parser | 
 | 4302 |   translates newlines (\r\n => \n). | 
 | 4303 |  | 
 | 4304 | - Remove buffer API from stable ABI for now, see #10181. | 
 | 4305 |  | 
 | 4306 | - Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file | 
 | 4307 |   doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int | 
 | 4308 |   (length bigger than 2^31-1 bytes). | 
 | 4309 |  | 
 | 4310 | - Issue #9015, #9611: FileIO.readinto(), FileIO.write(), os.write() and | 
 | 4311 |   stdprinter.write() clamp the length to INT_MAX on Windows. | 
 | 4312 |  | 
 | 4313 | - Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime() | 
 | 4314 |   can now handle dates after 2038. | 
 | 4315 |  | 
 | 4316 | - Issue #10780: PyErr_SetFromWindowsErrWithFilename() and | 
 | 4317 |   PyErr_SetExcFromWindowsErrWithFilename() decode the filename from the | 
 | 4318 |   filesystem encoding instead of UTF-8. | 
 | 4319 |  | 
 | 4320 | - Issue #10779: PyErr_WarnExplicit() decodes the filename from the filesystem | 
 | 4321 |   encoding instead of UTF-8. | 
 | 4322 |  | 
 | 4323 | - Add sys.flags attribute for the new -q command-line option. | 
 | 4324 |  | 
 | 4325 | - Issue #11506: Trying to assign to a bytes literal should result in a | 
 | 4326 |   SyntaxError. | 
 | 4327 |  | 
 | 4328 | Library | 
 | 4329 | ------- | 
 | 4330 |  | 
 | 4331 | - Issue #10916: mmap should not segfault when a file is mapped using 0 as length | 
 | 4332 |   and a non-zero offset, and an attempt to read past the end of file is made | 
 | 4333 |   (IndexError is raised instead).  Patch by Ross Lagerwall. | 
 | 4334 |  | 
 | 4335 | - Issue #10154, #10090: change the normalization of UTF-8 to "UTF-8" instead | 
 | 4336 |   of "UTF8" in the locale module as the latter is not supported MacOSX and OpenBSD. | 
 | 4337 |  | 
 | 4338 | - Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5, rather | 
 | 4339 |   than the currently problematic Apple-supplied one, when running with the | 
 | 4340 |   64-/32-bit installer variant. | 
 | 4341 |  | 
 | 4342 | - Issue #4953: cgi.FieldStorage and cgi.parse() parse the request as bytes, not | 
 | 4343 |   as unicode, and accept binary files. Add encoding and errors attributes to | 
 | 4344 |   cgi.FieldStorage. Patch written by Pierre Quentel (with many inputs by Glenn | 
 | 4345 |   Linderman). | 
 | 4346 |  | 
 | 4347 | - Add encoding and errors arguments to urllib.parse_qs() and urllib.parse_qsl(). | 
 | 4348 |  | 
 | 4349 | - Issue #10899: No function type annotations in the standard library.  Removed | 
 | 4350 |   function type annotations from _pyio.py. | 
 | 4351 |  | 
 | 4352 | - Issue #10875: Update Regular Expression HOWTO; patch by 'SilentGhost'. | 
 | 4353 |  | 
 | 4354 | - Issue #10872: The repr() of TextIOWrapper objects now includes the mode | 
 | 4355 |   if available. | 
 | 4356 |  | 
 | 4357 | - Issue #10869: Fixed bug where ast.increment_lineno modified the root node | 
 | 4358 |   twice. | 
 | 4359 |  | 
 | 4360 | - Issue #5871: email.header.Header.encode now raises an error if any | 
 | 4361 |   continuation line in the formatted value has no leading white space and looks | 
 | 4362 |   like a header.  Since Generator uses Header to format all headers, this check | 
 | 4363 |   is made for all headers in any serialized message at serialization time.  This | 
 | 4364 |   provides protection against header injection attacks. | 
 | 4365 |  | 
 | 4366 | - Issue #10859: Make ``contextlib.GeneratorContextManager`` officially | 
 | 4367 |   private by renaming it to ``_GeneratorContextManager``. | 
 | 4368 |  | 
 | 4369 | - Issue #10042: Fixed the total_ordering decorator to handle cross-type | 
 | 4370 |   comparisons that could lead to infinite recursion. | 
 | 4371 |  | 
 | 4372 | - Issue #10686: the email package now :rfc:`2047`\ -encodes headers with | 
 | 4373 |   non-ASCII bytes (parsed by a BytesParser) when doing conversion to 7bit-clean | 
 | 4374 |   presentation, instead of replacing them with ?s. | 
 | 4375 |  | 
 | 4376 | - email.header.Header was incorrectly encoding folding whitespace when | 
 | 4377 |   rfc2047-encoding header values with embedded newlines, leaving them without | 
 | 4378 |   folding whitespace.  It now uses the continuation_ws, as it does for | 
 | 4379 |   continuation lines that it creates itself. | 
 | 4380 |  | 
 | 4381 | - Issue #1777412, #10827: Changed the rules for 2-digit years. The | 
 | 4382 |   time.asctime(), time.ctime() and time.strftime() functions will now format | 
 | 4383 |   any year when ``time.accept2dyear`` is False and will accept years >= 1000 | 
 | 4384 |   otherwise. ``time.mktime`` and ``time.strftime`` now accept full range | 
 | 4385 |   supported by the OS. With Visual Studio or on Solaris, the year is limited to | 
 | 4386 |   the range [1; 9999]. Conversion of 2-digit years to 4-digit is deprecated. | 
 | 4387 |  | 
 | 4388 | - Issue #7858: Raise an error properly when os.utime() fails under Windows | 
 | 4389 |   on an existing file. | 
 | 4390 |  | 
 | 4391 | - Issue #3839: wsgiref should not override a Content-Length header set by | 
 | 4392 |   the application.  Initial patch by Clovis Fabricio. | 
 | 4393 |  | 
 | 4394 | - Issue #10492: bdb.Bdb.run() only traces the execution of the code, not the | 
 | 4395 |   compilation (if the input is a string). | 
 | 4396 |  | 
 | 4397 | - Issue #7995: When calling accept() on a socket with a timeout, the returned | 
 | 4398 |   socket is now always blocking, regardless of the operating system. | 
 | 4399 |  | 
 | 4400 | - Issue #10756: atexit normalizes the exception before displaying it. Patch by | 
 | 4401 |   Andreas Stührk. | 
 | 4402 |  | 
 | 4403 | - Issue #10790: email.header.Header.append's charset logic now works correctly | 
 | 4404 |   for charsets whose output codec is different from its input codec. | 
 | 4405 |  | 
 | 4406 | - Issue #10819: SocketIO.name property returns -1 when its closed, instead of | 
 | 4407 |   raising a ValueError, to fix repr(). | 
 | 4408 |  | 
 | 4409 | - Issue #8650: zlib.compress() and zlib.decompress() raise an OverflowError if | 
 | 4410 |   the input buffer length doesn't fit into an unsigned int (length bigger than | 
 | 4411 |   2^32-1 bytes). | 
 | 4412 |  | 
 | 4413 | - Issue #6643: Reinitialize locks held within the threading module after fork to | 
 | 4414 |   avoid a potential rare deadlock or crash on some platforms. | 
 | 4415 |  | 
 | 4416 | - Issue #10806, issue #9905: Fix subprocess pipes when some of the standard file | 
 | 4417 |   descriptors (0, 1, 2) are closed in the parent process.  Initial patch by Ross | 
 | 4418 |   Lagerwall. | 
 | 4419 |  | 
 | 4420 | - `unittest.TestCase` can be instantiated without a method name; for simpler | 
 | 4421 |   exploration from the interactive interpreter. | 
 | 4422 |  | 
 | 4423 | - Issue #10798: Reject supporting concurrent.futures if the system has too | 
 | 4424 |   few POSIX semaphores. | 
 | 4425 |  | 
 | 4426 | - Issue #10807: Remove base64, bz2, hex, quopri, rot13, uu and zlib codecs from | 
 | 4427 |   the codec aliases. They are still accessible via codecs.lookup(). | 
 | 4428 |  | 
 | 4429 | - Issue #10801: In zipfile, support different encodings for the header and the | 
 | 4430 |   filenames. | 
 | 4431 |  | 
 | 4432 | - Issue #6285: IDLE no longer crashes on missing help file; patch by Scott | 
 | 4433 |   David Daniels. | 
 | 4434 |  | 
 | 4435 | - Fix collections.OrderedDict.setdefault() so that it works in subclasses that | 
 | 4436 |   define __missing__(). | 
 | 4437 |  | 
 | 4438 | - Issue #10786: unittest.TextTestRunner default stream no longer bound at import | 
 | 4439 |   time. `sys.stderr` now looked up at instantiation time.  Fix contributed by | 
 | 4440 |   Mark Roddy. | 
 | 4441 |  | 
 | 4442 | - Issue #10753: Characters ';', '=' and ',' in the PATH_INFO environment variable | 
 | 4443 |   won't be quoted when the URI is constructed by the wsgiref.util's request_uri | 
 | 4444 |   method. According to RFC 3986, these characters can be a part of params in | 
 | 4445 |   PATH component of URI and need not be quoted. | 
 | 4446 |  | 
 | 4447 | - Issue #10738: Fix webbrowser.Opera.raise_opts. | 
 | 4448 |  | 
 | 4449 | - Issue #9824: SimpleCookie now encodes , and ; in values to cater to how | 
 | 4450 |   browsers actually parse cookies. | 
 | 4451 |  | 
 | 4452 | - Issue #9333: os.symlink now available regardless of user privileges.  The | 
 | 4453 |   function now raises OSError on Windows >=6.0 when the user is unable to create | 
 | 4454 |   symbolic links. XP and 2003 still raise NotImplementedError. | 
 | 4455 |  | 
 | 4456 | - Issue #10783: struct.pack() no longer implicitly encodes unicode to UTF-8. | 
 | 4457 |  | 
 | 4458 | - Issue #10730: Add SVG mime types to mimetypes module. | 
 | 4459 |  | 
 | 4460 | - Issue #10768: Make the Tkinter ScrolledText widget work again. | 
 | 4461 |  | 
 | 4462 | - Issue #10777: Fix "dictionary changed size during iteration" bug in | 
 | 4463 |   ElementTree register_namespace(). | 
 | 4464 |  | 
 | 4465 | - Issue #10626: test_logging now preserves logger disabled states. | 
 | 4466 |  | 
 | 4467 | - Issue #10774: test_logging now removes temp files created during tests. | 
 | 4468 |  | 
 | 4469 | - Issue #5258/#10642: if site.py encounters a .pth file that generates an error, | 
 | 4470 |   it now prints the filename, line number, and traceback to stderr and skips | 
 | 4471 |   the rest of that individual file, instead of stopping processing entirely. | 
 | 4472 |  | 
 | 4473 | - Issue #10763: subprocess.communicate() closes stdout and stderr if both are | 
 | 4474 |   pipes (bug specific to Windows). | 
 | 4475 |  | 
 | 4476 | - Issue #1693546: fix email.message RFC 2231 parameter encoding to be in better | 
 | 4477 |   compliance (no "s around encoded values). | 
 | 4478 |  | 
 | 4479 | - Improved the diff message in the unittest module's assertCountEqual(). | 
 | 4480 |  | 
 | 4481 | - Issue #1155362: email.utils.parsedate_tz now handles a missing space before | 
 | 4482 |   the '-' of a timezone field as well as before a '+'. | 
 | 4483 |  | 
 | 4484 | - Issue #4871: The zipfile module now gives a more useful error message if | 
 | 4485 |   an attempt is made to use a string to specify the archive password. | 
 | 4486 |  | 
 | 4487 | - Issue #10750: The ``raw`` attribute of buffered IO objects is now read-only. | 
 | 4488 |  | 
 | 4489 | - Deprecated assertDictContainsSubset() in the unittest module. | 
 | 4490 |  | 
 | 4491 | C-API | 
 | 4492 | ----- | 
 | 4493 |  | 
 | 4494 | - PyObject_CallMethod now passes along any underlying AttributeError from | 
 | 4495 |   PyObject_GetAttr, instead of replacing it with something less informative | 
 | 4496 |  | 
 | 4497 | - Issue #10913: Deprecate misleading functions PyEval_AcquireLock() and | 
 | 4498 |   PyEval_ReleaseLock().  The thread-state aware APIs should be used instead. | 
 | 4499 |  | 
 | 4500 | - Issue #10333: Remove ancient GC API, which has been deprecated since Python | 
 | 4501 |   2.2. | 
 | 4502 |  | 
 | 4503 | Build | 
 | 4504 | ----- | 
 | 4505 |  | 
 | 4506 | - Issue #10843: Update third-party library versions used in OS X 32-bit | 
 | 4507 |   installer builds: bzip2 1.0.6, readline 6.1.2, SQLite 3.7.4 (with FTS3/FTS4 | 
 | 4508 |   and RTREE enabled), and ncursesw 5.5 (wide-char support enabled). | 
 | 4509 |  | 
 | 4510 | - Issue #10820: Fix OS X framework installs to support version-specific | 
 | 4511 |   scripts (#10679). | 
 | 4512 |  | 
 | 4513 | - Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in | 
 | 4514 |   the configure script but use $GREP instead.  Patch by Fabian Groffen. | 
 | 4515 |  | 
 | 4516 | - Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD | 
 | 4517 |   and DragonFly BSD.  Patch by Nicolas Joly. | 
 | 4518 |  | 
 | 4519 | - Issue #10679: The "idle", "pydoc" and "2to3" scripts are now installed with | 
 | 4520 |   a version-specific suffix on "make altinstall". | 
 | 4521 |  | 
 | 4522 | - Issue #10655: Fix the build on PowerPC on Linux with GCC when building with | 
 | 4523 |   timestamp profiling (--with-tsc): the preprocessor test for the PowerPC | 
 | 4524 |   support now looks for "__powerpc__" as well as "__ppc__": the latter seems to | 
 | 4525 |   only be present on OS X; the former is the correct one for Linux with GCC. | 
 | 4526 |  | 
 | 4527 | - Issue #1099: Fix the build on MacOSX when building a framework with pydebug | 
 | 4528 |   using GCC 4.0. | 
 | 4529 |  | 
 | 4530 | Tools/Demos | 
 | 4531 | ----------- | 
 | 4532 |  | 
 | 4533 | - Issue #10843: Install the Tools directory on OS X in the applications Extras | 
 | 4534 |   (/Applications/Python 3.n/Extras/) where the Demo directory had previous been | 
 | 4535 |   installed. | 
 | 4536 |  | 
 | 4537 | - Issue #7962: The Demo directory is gone.  Most of the old and unmaintained | 
 | 4538 |   demos have been removed, others integrated in documentation or a new | 
 | 4539 |   Tools/demo subdirectory. | 
 | 4540 |  | 
 | 4541 | - Issue #10502: Addition of the unittestgui tool. Originally by Steve Purcell. | 
 | 4542 |   Updated for test discovery by Mark Roddy and Python 3 compatibility by Brian | 
 | 4543 |   Curtin. | 
 | 4544 |  | 
 | 4545 | Tests | 
 | 4546 | ----- | 
 | 4547 |  | 
 | 4548 | - Issue #11910: Fix test_heapq to skip the C tests when _heapq is missing. | 
 | 4549 |  | 
 | 4550 | - Fix test_startfile to wait for child process to terminate before finishing. | 
 | 4551 |  | 
 | 4552 | - Issue #10822: Fix test_posix:test_getgroups failure under Solaris.  Patch | 
 | 4553 |   by Ross Lagerwall. | 
 | 4554 |  | 
 | 4555 | - Make the --coverage flag work for test.regrtest. | 
 | 4556 |  | 
 | 4557 | - Issue #1677694: Refactor and improve test_timeout.  Original patch by | 
 | 4558 |   Björn Lindqvist. | 
 | 4559 |  | 
 | 4560 | - Issue #5485: Add tests for the UseForeignDTD method of expat parser objects. | 
 | 4561 |   Patch by Jean-Paul Calderone and Sandro Tosi. | 
 | 4562 |  | 
 | 4563 | - Issue #6293: Have regrtest.py echo back sys.flags.  This is done by default in | 
 | 4564 |   whole runs and enabled selectively using ``--header`` when running an explicit | 
 | 4565 |   list of tests.  Original patch by Collin Winter. | 
 | 4566 |  | 
 | 4567 |  | 
 | 4568 | What's New in Python 3.2 Beta 2? | 
 | 4569 | ================================ | 
 | 4570 |  | 
 | 4571 | *Release date: 19-Dec-2010* | 
 | 4572 |  | 
 | 4573 | Core and Builtins | 
 | 4574 | ----------------- | 
 | 4575 |  | 
 | 4576 | - Issue #8844: Regular and recursive lock acquisitions can now be interrupted | 
 | 4577 |   by signals on platforms using pthreads.  Patch by Reid Kleckner. | 
 | 4578 |  | 
 | 4579 | - Issue #4236: PyModule_Create2 now checks the import machinery directly | 
 | 4580 |   rather than the Py_IsInitialized flag, avoiding a Fatal Python | 
 | 4581 |   error in certain circumstances when an import is done in __del__. | 
 | 4582 |  | 
 | 4583 | - Issue #5587: add a repr to dict_proxy objects.  Patch by David Stanek and | 
 | 4584 |   Daniel Urban. | 
 | 4585 |  | 
 | 4586 | Library | 
 | 4587 | ------- | 
 | 4588 |  | 
 | 4589 | - Issue #3243:  Support iterable bodies in httplib. Patch Contributions by | 
 | 4590 |   Xuanji Li and Chris AtLee. | 
 | 4591 |  | 
 | 4592 | - Issue #10611: SystemExit exception will no longer kill a unittest run. | 
 | 4593 |  | 
 | 4594 | - Issue #9857: It is now possible to skip a test in a setUp, tearDown or clean | 
 | 4595 |   up function. | 
 | 4596 |  | 
 | 4597 | - Issue #10573: use actual/expected consistently in unittest methods. | 
 | 4598 |   The order of the args of assertCountEqual is also changed. | 
 | 4599 |  | 
 | 4600 | - Issue #9286: email.utils.parseaddr no longer concatenates blank-separated | 
 | 4601 |   words in the local part of email addresses, thereby preserving the input. | 
 | 4602 |  | 
 | 4603 | - Issue #6791: Limit header line length (to 65535 bytes) in http.client | 
 | 4604 |   and http.server, to avoid denial of services from the other party. | 
 | 4605 |  | 
 | 4606 | - Issue #10404: Use ctl-button-1 on OSX for the context menu in Idle. | 
 | 4607 |  | 
 | 4608 | - Issue #9907: Fix tab handling on OSX when using editline by calling | 
 | 4609 |   rl_initialize first, then setting our custom defaults, then reading .editrc. | 
 | 4610 |  | 
 | 4611 | - Issue #4188: Avoid creating dummy thread objects when logging operations | 
 | 4612 |   from the threading module (with the internal verbose flag activated). | 
 | 4613 |  | 
 | 4614 | - Issue #10711: Remove HTTP 0.9 support from http.client.  The ``strict`` | 
 | 4615 |   parameter to HTTPConnection and friends is deprecated. | 
 | 4616 |  | 
 | 4617 | - Issue #9721: Fix the behavior of urljoin when the relative url starts with a | 
 | 4618 |   ';' character. Patch by Wes Chow. | 
 | 4619 |  | 
 | 4620 | - Issue #10714: Limit length of incoming request in http.server to 65536 bytes | 
 | 4621 |   for security reasons.  Initial patch by Ross Lagerwall. | 
 | 4622 |  | 
 | 4623 | - Issue #9558: Fix distutils.command.build_ext with VS 8.0. | 
 | 4624 |  | 
 | 4625 | - Issue #10667: Fast path for collections.Counter(). | 
 | 4626 |  | 
 | 4627 | - Issue #10695: passing the port as a string value to telnetlib no longer | 
 | 4628 |   causes debug mode to fail. | 
 | 4629 |  | 
 | 4630 | - Issue #1078919: add_header now automatically RFC2231 encodes parameters | 
 | 4631 |   that contain non-ascii values. | 
 | 4632 |  | 
 | 4633 | - Issue #10188 (partial resolution): tempfile.TemporaryDirectory emits | 
 | 4634 |   a warning on sys.stderr rather than throwing a misleading exception | 
 | 4635 |   if cleanup fails due to nulling out of modules during shutdown. | 
 | 4636 |   Also avoids an AttributeError when mkdtemp call fails and issues | 
 | 4637 |   a ResourceWarning on implicit cleanup via __del__. | 
 | 4638 |  | 
 | 4639 | - Issue #10107: Warn about unsaved files in IDLE on OSX. | 
 | 4640 |  | 
 | 4641 | - Issue #7213: subprocess.Popen's default for close_fds has been changed. | 
 | 4642 |   It is now True in most cases other than on Windows when input, output or | 
 | 4643 |   error handles are provided. | 
 | 4644 |  | 
 | 4645 | - Issue #6559: subprocess.Popen has a new pass_fds parameter (actually | 
 | 4646 |   added in 3.2beta1) to allow specifying a specific list of file descriptors | 
 | 4647 |   to keep open in the child process. | 
 | 4648 |  | 
 | 4649 | - Issue #1731717: Fixed the problem where subprocess.wait() could cause an | 
 | 4650 |   OSError exception when The OS had been told to ignore SIGCLD in our process | 
 | 4651 |   or otherwise not wait for exiting child processes. | 
 | 4652 |  | 
 | 4653 | Tests | 
 | 4654 | ----- | 
 | 4655 |  | 
 | 4656 | - Issue #775964: test_grp now skips YP/NIS entries instead of failing when | 
 | 4657 |   encountering them. | 
 | 4658 |  | 
 | 4659 | Tools/Demos | 
 | 4660 | ----------- | 
 | 4661 |  | 
 | 4662 | - Issue #6075: IDLE on Mac OS X now works with both Carbon AquaTk and | 
 | 4663 |   Cocoa AquaTk. | 
 | 4664 |  | 
 | 4665 | - Issue #10710: ``Misc/setuid-prog.c`` is removed from the source tree. | 
 | 4666 |  | 
 | 4667 | - Issue #10706: Remove outdated script runtests.sh.  Either ``make test`` | 
 | 4668 |   or ``python -m test`` should be used instead. | 
 | 4669 |  | 
 | 4670 | Build | 
 | 4671 | ----- | 
 | 4672 |  | 
 | 4673 | - The Windows build now uses Tcl/Tk 8.5.9 and sqlite3 3.7.4. | 
 | 4674 |  | 
 | 4675 | - Issue #9234: argparse supports alias names for subparsers. | 
 | 4676 |  | 
 | 4677 |  | 
 | 4678 | What's New in Python 3.2 Beta 1? | 
 | 4679 | ================================ | 
 | 4680 |  | 
 | 4681 | *Release date: 05-Dec-2010* | 
 | 4682 |  | 
 | 4683 | Core and Builtins | 
 | 4684 | ----------------- | 
 | 4685 |  | 
 | 4686 | - Issue #10630: Return dict views from the dict proxy keys()/values()/items() | 
 | 4687 |   methods. | 
 | 4688 |  | 
 | 4689 | - Issue #10596: Fix float.__mod__ to have the same behaviour as float.__divmod__ | 
 | 4690 |   with respect to signed zeros.  -4.0 % 4.0 should be 0.0, not -0.0. | 
 | 4691 |  | 
 | 4692 | - Issue #1772833: Add the -q command-line option to suppress copyright and | 
 | 4693 |   version output in interactive mode. | 
 | 4694 |  | 
 | 4695 | - Provide an *optimize* parameter in the built-in compile() function. | 
 | 4696 |  | 
 | 4697 | - Fixed several corner case issues on Windows in os.stat/os.lstat related to | 
 | 4698 |   reparse points. | 
 | 4699 |  | 
 | 4700 | - PEP 384 (Defining a Stable ABI) is implemented. | 
 | 4701 |  | 
 | 4702 | - Issue #2690: Range objects support negative indices and slicing. | 
 | 4703 |  | 
 | 4704 | - Issue #9915: Speed up sorting with a key. | 
 | 4705 |  | 
 | 4706 | - Issue #8685: Speed up set difference ``a - b`` when source set ``a`` is much | 
 | 4707 |   larger than operand ``b``.  Patch by Andrew Bennetts. | 
 | 4708 |  | 
 | 4709 | - Issue #10518: Bring back the callable() builtin. | 
 | 4710 |  | 
 | 4711 | - Issue #7094: Added alternate formatting (specified by '#') to ``__format__`` | 
 | 4712 |   method of float, complex, and Decimal. This allows more precise control over | 
 | 4713 |   when decimal points are displayed. | 
 | 4714 |  | 
 | 4715 | - Issue #10474: range.count() should return integers. | 
 | 4716 |  | 
 | 4717 | - Issue #1574217: isinstance now catches only AttributeError, rather than | 
 | 4718 |   masking all errors. | 
 | 4719 |  | 
 | 4720 | Library | 
 | 4721 | ------- | 
 | 4722 |  | 
 | 4723 | - logging: added "handler of last resort". See http://bit.ly/last-resort-handler | 
 | 4724 |  | 
 | 4725 | - test.support: Added TestHandler and Matcher classes for better support of | 
 | 4726 |   assertions about logging. | 
 | 4727 |  | 
 | 4728 | - Issue #4391: Use proper plural forms in argparse. | 
 | 4729 |  | 
 | 4730 | - Issue #10601: sys.displayhook uses 'backslashreplace' error handler on | 
 | 4731 |   UnicodeEncodeError. | 
 | 4732 |  | 
 | 4733 | - Add the "display" and "undisplay" pdb commands. | 
 | 4734 |  | 
 | 4735 | - Issue #7245: Add a SIGINT handler in pdb that allows to break a program again | 
 | 4736 |   after a "continue" command. | 
 | 4737 |  | 
 | 4738 | - Add the "interact" pdb command. | 
 | 4739 |  | 
 | 4740 | - Issue #7905: Actually respect the keyencoding parameter to shelve.Shelf. | 
 | 4741 |  | 
 | 4742 | - Issue #1569291: Speed up array.repeat(). | 
 | 4743 |  | 
 | 4744 | - Provide an interface to set the optimization level of compilation in | 
 | 4745 |   py_compile, compileall and zipfile.PyZipFile. | 
 | 4746 |  | 
 | 4747 | - Issue #7904: Changes to urllib.parse.urlsplit to handle schemes as defined by | 
 | 4748 |   RFC3986. Anything before :// is considered a scheme and is followed by an | 
 | 4749 |   authority (or netloc) and by '/' led path, which is optional. | 
 | 4750 |  | 
 | 4751 | - Issue #6045: dbm.gnu databases now support get() and setdefault() methods. | 
 | 4752 |  | 
 | 4753 | - Issue #10620: `python -m unittest` can accept file paths instead of module | 
 | 4754 |   names for running specific tests. | 
 | 4755 |  | 
 | 4756 | - Issue #9424: Deprecate the `unittest.TestCase` methods `assertEquals`, | 
 | 4757 |   `assertNotEquals`, `assertAlmostEquals`, `assertNotAlmostEquals` and `assert_` | 
 | 4758 |   and replace them with the correct methods in the Python test suite. | 
 | 4759 |  | 
 | 4760 | - Issue #10272: The ssl module now raises socket.timeout instead of a generic | 
 | 4761 |   SSLError on socket timeouts. | 
 | 4762 |  | 
 | 4763 | - Issue #10528: Allow translators to reorder placeholders in localizable | 
 | 4764 |   messages from argparse. | 
 | 4765 |  | 
 | 4766 | - Issue #10497: Fix incorrect use of gettext in argparse. | 
 | 4767 |  | 
 | 4768 | - Issue #10478: Reentrant calls inside buffered IO objects (for example by | 
 | 4769 |   way of a signal handler) now raise a RuntimeError instead of freezing the | 
 | 4770 |   current process. | 
 | 4771 |  | 
 | 4772 | - logging: Added getLogRecordFactory/setLogRecordFactory with docs and tests. | 
 | 4773 |  | 
 | 4774 | - Issue #10549: Fix pydoc traceback when text-documenting certain classes. | 
 | 4775 |  | 
 | 4776 | - Issue #2001: New HTML server with enhanced Web page features.  Patch by Ron | 
 | 4777 |   Adam. | 
 | 4778 |  | 
 | 4779 | - Issue #10360: In WeakSet, do not raise TypeErrors when testing for membership | 
 | 4780 |   of non-weakrefable objects. | 
 | 4781 |  | 
 | 4782 | - Issue #940286: pydoc.Helper.help() ignores input/output init parameters. | 
 | 4783 |  | 
 | 4784 | - Issue #1745035: Add a command size and data size limit to smtpd.py, to prevent | 
 | 4785 |   DoS attacks.  Patch by Savio Sena. | 
 | 4786 |  | 
 | 4787 | - Issue #4925: Add filename to error message when executable can't be found in | 
 | 4788 |   subprocess. | 
 | 4789 |  | 
 | 4790 | - Issue #10391: Don't dereference invalid memory in error messages in the ast | 
 | 4791 |   module. | 
 | 4792 |  | 
 | 4793 | - Issue #10027: st_nlink was not being set on Windows calls to os.stat or | 
 | 4794 |   os.lstat. Patch by Hirokazu Yamamoto. | 
 | 4795 |  | 
 | 4796 | - Issue #9333: Expose os.symlink only when the SeCreateSymbolicLinkPrivilege is | 
 | 4797 |   held by the user's account, i.e., when the function can actually be used. | 
 | 4798 |  | 
 | 4799 | - Issue #8879: Add os.link support for Windows. | 
 | 4800 |  | 
 | 4801 | - Issue #7911: ``unittest.TestCase.longMessage`` defaults to True for improved | 
 | 4802 |   failure messages by default. Patch by Mark Roddy. | 
 | 4803 |  | 
 | 4804 | - Issue #1486713: HTMLParser now has an optional tolerant mode where it tries to | 
 | 4805 |   guess at the correct parsing of invalid html. | 
 | 4806 |  | 
 | 4807 | - Issue #10554: Add context manager support to subprocess.Popen objects. | 
 | 4808 |  | 
 | 4809 | - Issue #8989: email.utils.make_msgid now has a domain parameter that can | 
 | 4810 |   override the domain name used in the generated msgid. | 
 | 4811 |  | 
 | 4812 | - Issue #9299: Add exist_ok parameter to os.makedirs to suppress the 'File | 
 | 4813 |   exists' exception when a target directory already exists with the specified | 
 | 4814 |   mode. Patch by Ray Allen. | 
 | 4815 |  | 
 | 4816 | - Issue #9573: os.fork() now works correctly when triggered as a side effect of | 
 | 4817 |   a module import. | 
 | 4818 |  | 
 | 4819 | - Issue #10464: netrc now correctly handles lines with embedded '#' characters. | 
 | 4820 |  | 
 | 4821 | - Added itertools.accumulate(). | 
 | 4822 |  | 
 | 4823 | - Issue #4113: Added custom ``__repr__`` method to ``functools.partial``. | 
 | 4824 |   Original patch by Daniel Urban. | 
 | 4825 |  | 
 | 4826 | - Issue #10273: Rename `assertRegexpMatches` and `assertRaisesRegexp` to | 
 | 4827 |   `assertRegex` and `assertRaisesRegex`. | 
 | 4828 |  | 
 | 4829 | - Issue #10535: Enable silenced warnings in unittest by default. | 
 | 4830 |  | 
 | 4831 | - Issue #9873: The URL parsing functions in urllib.parse now accept ASCII byte | 
 | 4832 |   sequences as input in addition to character strings. | 
 | 4833 |  | 
 | 4834 | - Issue #10586: The statistics API for the new functools.lru_cache has been | 
 | 4835 |   changed to a single cache_info() method returning a named tuple. | 
 | 4836 |  | 
 | 4837 | - Issue #10323: itertools.islice() now consumes the minimum number of inputs | 
 | 4838 |   before stopping.  Formerly, the final state of the underlying iterator was | 
 | 4839 |   undefined. | 
 | 4840 |  | 
 | 4841 | - Issue #10565: The collections.Iterator ABC now checks for both __iter__ and | 
 | 4842 |   __next__. | 
 | 4843 |  | 
 | 4844 | - Issue #10242: Fixed implementation of unittest.ItemsEqual and gave it a new | 
 | 4845 |   more informative name, unittest.CountEqual. | 
 | 4846 |  | 
 | 4847 | - Issue #10561: In pdb, clear the breakpoints by the breakpoint number. | 
 | 4848 |  | 
 | 4849 | - Issue #2986: difflib.SequenceMatcher gets a new parameter, autojunk, which can | 
 | 4850 |   be set to False to turn off the previously undocumented 'popularity' | 
 | 4851 |   heuristic. Patch by Terry Reedy and Eli Bendersky. | 
 | 4852 |  | 
 | 4853 | - Issue #10534: in difflib, expose bjunk and bpopular sets; deprecate | 
 | 4854 |   undocumented and now redundant isbjunk and isbpopular methods. | 
 | 4855 |  | 
 | 4856 | - Issue #9846: zipfile is now correctly closing underlying file objects. | 
 | 4857 |  | 
 | 4858 | - Issue #10459: Update CJK character names to Unicode 6.0. | 
 | 4859 |  | 
 | 4860 | - Issue #4493: urllib.request adds '/' in front of path components which does not | 
 | 4861 |   start with '/. Common behavior exhibited by browsers and other clients. | 
 | 4862 |  | 
 | 4863 | - Issue #6378: idle.bat now runs with the appropriate Python version rather than | 
 | 4864 |   the system default. Patch by Sridhar Ratnakumar. | 
 | 4865 |  | 
 | 4866 | - Issue #10470: 'python -m unittest' will now run test discovery by default, | 
 | 4867 |   when no extra arguments have been provided. | 
 | 4868 |  | 
 | 4869 | - Issue #3709: BaseHTTPRequestHandler will buffer the headers and write to | 
 | 4870 |   output stream only when end_headers is invoked. This is a speedup and an | 
 | 4871 |   internal optimization.  Patch by Andrew Shaaf. | 
 | 4872 |  | 
 | 4873 | - Issue #10220: Added inspect.getgeneratorstate. Initial patch by Rodolpho | 
 | 4874 |   Eckhardt. | 
 | 4875 |  | 
 | 4876 | - Issue #10453: compileall now uses argparse instead of getopt, and thus | 
 | 4877 |   provides clean output when called with '-h'. | 
 | 4878 |  | 
 | 4879 | - Issue #8078: Add constants for higher baud rates in the termios module.  Patch | 
 | 4880 |   by Rodolpho Eckhardt. | 
 | 4881 |  | 
 | 4882 | - Issue #10407: Fix two NameErrors in distutils. | 
 | 4883 |  | 
 | 4884 | - Issue #10371: Deprecated undocumented functions in the trace module. | 
 | 4885 |  | 
 | 4886 | - Issue #10467: Fix BytesIO.readinto() after seeking into a position after the | 
 | 4887 |   end of the file. | 
 | 4888 |  | 
 | 4889 | - configparser: 100% test coverage. | 
 | 4890 |  | 
 | 4891 | - Issue #10499: configparser supports pluggable interpolation handlers. The | 
 | 4892 |   default classic interpolation handler is called BasicInterpolation. Another | 
 | 4893 |   interpolation handler added (ExtendedInterpolation) which supports the syntax | 
 | 4894 |   used by zc.buildout (e.g. interpolation between sections). | 
 | 4895 |  | 
 | 4896 | - configparser: the SafeConfigParser class has been renamed to ConfigParser. | 
 | 4897 |   The legacy ConfigParser class has been removed but its interpolation mechanism | 
 | 4898 |   is still available as LegacyInterpolation. | 
 | 4899 |  | 
 | 4900 | - configparser: Usage of RawConfigParser is now discouraged for new projects | 
 | 4901 |   in favor of ConfigParser(interpolation=None). | 
 | 4902 |  | 
 | 4903 | - Issue #1682942: configparser supports alternative option/value delimiters. | 
 | 4904 |  | 
 | 4905 | - Issue #5412: configparser supports mapping protocol access. | 
 | 4906 |  | 
 | 4907 | - Issue #9411: configparser supports specifying encoding for read operations. | 
 | 4908 |  | 
 | 4909 | - Issue #9421: configparser's getint(), getfloat() and getboolean() methods | 
 | 4910 |   accept vars and default arguments just like get() does. | 
 | 4911 |  | 
 | 4912 | - Issue #9452: configparser supports reading from strings and dictionaries | 
 | 4913 |   (thanks to the mapping protocol API, the latter can be used to copy data | 
 | 4914 |   between parsers). | 
 | 4915 |  | 
 | 4916 | - configparser: accepted INI file structure is now customizable, including | 
 | 4917 |   comment prefixes, name of the DEFAULT section, empty lines in multiline | 
 | 4918 |   values, and indentation. | 
 | 4919 |  | 
 | 4920 | - Issue #10326: unittest.TestCase instances can be pickled. | 
 | 4921 |  | 
 | 4922 | - Issue #9926: Wrapped TestSuite subclass does not get __call__ executed. | 
 | 4923 |  | 
 | 4924 | - Issue #9920: Skip tests for cmath.atan and cmath.atanh applied to complex | 
 | 4925 |   zeros on systems where the log1p function fails to respect the sign of zero. | 
 | 4926 |   This fixes a test failure on AIX. | 
 | 4927 |  | 
 | 4928 | - Issue #9732: Addition of getattr_static to the inspect module. | 
 | 4929 |  | 
 | 4930 | - Issue #10446: Module documentation generated by pydoc now links to a | 
 | 4931 |   version-specific online reference manual. | 
 | 4932 |  | 
 | 4933 | - Make the 'No module named' exception message from importlib consistent. | 
 | 4934 |  | 
 | 4935 | - Issue #10443: Add the SSLContext.set_default_verify_paths() method. | 
 | 4936 |  | 
 | 4937 | - Issue #10440: Support RUSAGE_THREAD as a constant in the resource module. | 
 | 4938 |   Patch by Robert Collins. | 
 | 4939 |  | 
 | 4940 | - Issue #10429: IMAP.starttls() stored the capabilities as bytes objects, rather | 
 | 4941 |   than strings. | 
 | 4942 |  | 
 | 4943 | C-API | 
 | 4944 | ----- | 
 | 4945 |  | 
 | 4946 | - Issue #10557: Added a new API function, PyUnicode_TransformDecimalToASCII(), | 
 | 4947 |   which transforms non-ASCII decimal digits in a Unicode string to their ASCII | 
 | 4948 |   equivalents. | 
 | 4949 |  | 
 | 4950 | - Issue #9518: Extend the PyModuleDef_HEAD_INIT macro to explicitly | 
 | 4951 |   zero-initialize all fields, fixing compiler warnings seen when building | 
 | 4952 |   extension modules with gcc with "-Wmissing-field-initializers" (implied by | 
 | 4953 |   "-W"). | 
 | 4954 |  | 
 | 4955 | - Issue #10255: Fix reference leak in Py_InitializeEx().  Patch by Neil | 
 | 4956 |   Schemenauer. | 
 | 4957 |  | 
 | 4958 | - structseq.h is now included in Python.h. | 
 | 4959 |  | 
 | 4960 | - Loosen PyArg_ValidateKeywordArguments to allow dict subclasses. | 
 | 4961 |  | 
 | 4962 | Tests | 
 | 4963 | ----- | 
 | 4964 |  | 
 | 4965 | - regrtest.py once again ensures the test directory is removed from sys.path | 
 | 4966 |   when it is invoked directly as the __main__ module. | 
 | 4967 |  | 
 | 4968 | - `python -m test` can be used to run the test suite as well as `python -m | 
 | 4969 |   test.regrtest`. | 
 | 4970 |  | 
 | 4971 | - Do not fail test_socket when the IP address of the local hostname cannot be | 
 | 4972 |   looked up. | 
 | 4973 |  | 
 | 4974 | - Issue #8886: Use context managers throughout test_zipfile. Patch by Eric | 
 | 4975 |   Carstensen. | 
 | 4976 |  | 
 | 4977 | Build | 
 | 4978 | ----- | 
 | 4979 |  | 
 | 4980 | - Issue #10325: Fix two issues in the fallback definitions for PY_ULLONG_MAX and | 
 | 4981 |   PY_LLONG_MAX that made them unsuitable for use in preprocessor conditionals. | 
 | 4982 |  | 
 | 4983 | Documentation | 
 | 4984 | ------------- | 
 | 4985 |  | 
 | 4986 | - Issue #10299: List the built-in functions in a table in functions.rst. | 
 | 4987 |  | 
 | 4988 |  | 
 | 4989 | What's New in Python 3.2 Alpha 4? | 
 | 4990 | ================================= | 
 | 4991 |  | 
 | 4992 | *Release date: 13-Nov-2010* | 
 | 4993 |  | 
 | 4994 | Core and Builtins | 
 | 4995 | ----------------- | 
 | 4996 |  | 
 | 4997 | - Issue #10372: Import the warnings module only after the IO library is | 
 | 4998 |   initialized, so as to avoid bootstrap issues with the '-W' option. | 
 | 4999 |  | 
 | 5000 | - Issue #10293: Remove obsolete field in the PyMemoryView structure, unused | 
 | 5001 |   undocumented value PyBUF_SHADOW, and strangely-looking code in | 
 | 5002 |   PyMemoryView_GetContiguous. | 
 | 5003 |  | 
 | 5004 | - Issue #6081: Add str.format_map(), similar to ``str.format(**mapping)``. | 
 | 5005 |  | 
 | 5006 | - If FileIO.__init__ fails, close the file descriptor. | 
 | 5007 |  | 
 | 5008 | - Issue #10221: dict.pop(k) now has a key error message that includes the | 
 | 5009 |   missing key (same message d[k] returns for missing keys). | 
 | 5010 |  | 
 | 5011 | - Issue #5437: A preallocated MemoryError instance should not keep traceback | 
 | 5012 |   data (including local variables caught in the stack trace) alive infinitely. | 
 | 5013 |  | 
 | 5014 | - Issue #10186: Fix the SyntaxError caret when the offset is equal to the length | 
 | 5015 |   of the offending line. | 
 | 5016 |  | 
 | 5017 | - Issue #10089: Add support for arbitrary -X options on the command line.  They | 
 | 5018 |   can be retrieved through a new attribute ``sys._xoptions``. | 
 | 5019 |  | 
 | 5020 | - Issue #4388: On Mac OS X, decode command line arguments from UTF-8, instead of | 
 | 5021 |   the locale encoding.  If the LANG (and LC_ALL and LC_CTYPE) environment | 
 | 5022 |   variable is not set, the locale encoding is ISO-8859-1, whereas most programs | 
 | 5023 |   (including Python) expect UTF-8.  Python already uses UTF-8 for the filesystem | 
 | 5024 |   encoding and to encode command line arguments on this OS. | 
 | 5025 |  | 
 | 5026 | - Issue #9713, #10114: Parser functions (e.g. PyParser_ASTFromFile) expect | 
 | 5027 |   filenames encoded to the filesystem encoding with the surrogateescape error | 
 | 5028 |   handler (to support undecodable bytes), instead of UTF-8 in strict mode. | 
 | 5029 |  | 
 | 5030 | - Issue #9997: Don't let the name "top" have special significance in scope | 
 | 5031 |   resolution. | 
 | 5032 |  | 
 | 5033 | - Issue #9862: Compensate for broken PIPE_BUF in AIX by hard coding its value as | 
 | 5034 |   the default 512 when compiling on AIX. | 
 | 5035 |  | 
 | 5036 | - Use locale encoding instead of UTF-8 to encode and decode filenames if | 
 | 5037 |   Py_FileSystemDefaultEncoding is not set. | 
 | 5038 |  | 
 | 5039 | - Issue #10095: fp_setreadl() doesn't reopen the file, instead reuse the file | 
 | 5040 |   descriptor. | 
 | 5041 |  | 
 | 5042 | - Issue #9418: Moved private string methods ``_formatter_parser`` and | 
 | 5043 |   ``_formatter_field_name_split`` into a new ``_string`` module. | 
 | 5044 |  | 
 | 5045 | - Issue #9992: Remove PYTHONFSENCODING environment variable. | 
 | 5046 |  | 
 | 5047 | Library | 
 | 5048 | ------- | 
 | 5049 |  | 
 | 5050 | - Issue #12943: python -m tokenize support has been added to tokenize. | 
 | 5051 |  | 
 | 5052 | - Issue #10465: fix broken delegating of attributes by gzip._PaddedFile. | 
 | 5053 |  | 
 | 5054 | - Issue #10356: Decimal.__hash__(-1) should return -2. | 
 | 5055 |  | 
 | 5056 | - Issue #1553375: logging: Added stack_info kwarg to display stack information. | 
 | 5057 |  | 
 | 5058 | - Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru. | 
 | 5059 |  | 
 | 5060 | - Fix Fraction.__hash__ so that Fraction.__hash__(-1) is -2.  (See also issue | 
 | 5061 |   #10356.) | 
 | 5062 |  | 
 | 5063 | - Issue #4471: Add the IMAP.starttls() method to enable encryption on standard | 
 | 5064 |   IMAP4 connections.  Original patch by Lorenzo M. Catucci. | 
 | 5065 |  | 
 | 5066 | - Issue #1466065: Add 'validate' option to base64.b64decode to raise an error if | 
 | 5067 |   there are non-base64 alphabet characters in the input. | 
 | 5068 |  | 
 | 5069 | - Issue #10386: Add __all__ to token module; this simplifies importing in | 
 | 5070 |   tokenize module and prevents leaking of private names through ``import *``. | 
 | 5071 |  | 
 | 5072 | - Issue #4471: Properly shutdown socket in IMAP.shutdown().  Patch by Lorenzo | 
 | 5073 |   M. Catucci. | 
 | 5074 |  | 
 | 5075 | - Fix IMAP.login() to work properly. | 
 | 5076 |  | 
 | 5077 | - Issue #9244: multiprocessing pool worker processes could terminate | 
 | 5078 |   unexpectedly if the return value of a task could not be pickled.  Only the | 
 | 5079 |   ``repr`` of such errors are now sent back, wrapped in an | 
 | 5080 |   ``MaybeEncodingError`` exception. | 
 | 5081 |  | 
 | 5082 | - Issue #9244: The ``apply_async()`` and ``map_async()`` methods of | 
 | 5083 |   ``multiprocessing.Pool`` now accepts a ``error_callback`` argument.  This can | 
 | 5084 |   be a callback with the signature ``callback(exc)``, which will be called if | 
 | 5085 |   the target raises an exception. | 
 | 5086 |  | 
 | 5087 | - Issue #10022: The dictionary returned by the ``getpeercert()`` method of SSL | 
 | 5088 |   sockets now has additional items such as ``issuer`` and ``notBefore``. | 
 | 5089 |  | 
 | 5090 | - ``usenetrc`` is now false by default for NNTP objects. | 
 | 5091 |  | 
 | 5092 | - Issue #1926: Add support for NNTP over SSL on port 563, as well as STARTTLS. | 
 | 5093 |   Patch by Andrew Vant. | 
 | 5094 |  | 
 | 5095 | - Issue #10335: Add tokenize.open(), detect the file encoding using | 
 | 5096 |   tokenize.detect_encoding() and open it in read only mode. | 
 | 5097 |  | 
 | 5098 | - Issue #10321: Add support for binary data to smtplib.SMTP.sendmail, and a new | 
 | 5099 |   method send_message to send an email.message.Message object. | 
 | 5100 |  | 
 | 5101 | - Issue #6011: sysconfig and distutils.sysconfig use the surrogateescape error | 
 | 5102 |   handler to parse the Makefile file.  Avoid a UnicodeDecodeError if the source | 
 | 5103 |   code directory name contains a non-ASCII character and the locale encoding is | 
 | 5104 |   ASCII. | 
 | 5105 |  | 
 | 5106 | - Issue #10329: The trace module writes reports using the input Python script | 
 | 5107 |   encoding, instead of the locale encoding.  Patch written by Alexander | 
 | 5108 |   Belopolsky. | 
 | 5109 |  | 
 | 5110 | - Issue #10126: Fix distutils' test_build when Python was built with | 
 | 5111 |   --enable-shared. | 
 | 5112 |  | 
 | 5113 | - Issue #9281: Prevent race condition with mkdir in distutils.  Patch by | 
 | 5114 |   Arfrever. | 
 | 5115 |  | 
 | 5116 | - Issue #10229: Fix caching error in gettext. | 
 | 5117 |  | 
 | 5118 | - Issue #10252: Close file objects in a timely manner in distutils code and | 
 | 5119 |   tests.  Patch by Brian Brazil, completed by Éric Araujo. | 
 | 5120 |  | 
 | 5121 | - Issue #10180: Pickling file objects is now explicitly forbidden, since | 
 | 5122 |   unpickling them produced nonsensical results. | 
 | 5123 |  | 
 | 5124 | - Issue #10311: The signal module now restores errno before returning from its | 
 | 5125 |   low-level signal handler.  Patch by Hallvard B Furuseth. | 
 | 5126 |  | 
 | 5127 | - Issue #10282: Add a ``nntp_implementation`` attribute to NNTP objects. | 
 | 5128 |  | 
 | 5129 | - Issue #10283: Add a ``group_pattern`` argument to NNTP.list(). | 
 | 5130 |  | 
 | 5131 | - Issue #10155: Add IISCGIHandler to wsgiref.handlers to support IIS CGI | 
 | 5132 |   environment better, and to correct unicode environment values for WSGI 1.0.1. | 
 | 5133 |  | 
 | 5134 | - Issue #10281: nntplib now returns None for absent fields in the OVER/XOVER | 
 | 5135 |   response, instead of raising an exception. | 
 | 5136 |  | 
 | 5137 | - wsgiref now implements and validates PEP 3333, rather than an experimental | 
 | 5138 |   extension of PEP 333.  (Note: earlier versions of Python 3.x may have | 
 | 5139 |   incorrectly validated some non-compliant applications as WSGI compliant; if | 
 | 5140 |   your app validates with Python <3.2b1+, but not on this version, it is likely | 
 | 5141 |   the case that your app was not compliant.) | 
 | 5142 |  | 
 | 5143 | - Issue #10280: NNTP.nntp_version should reflect the highest version advertised | 
 | 5144 |   by the server. | 
 | 5145 |  | 
 | 5146 | - Issue #10184: Touch directories only once when extracting a tarfile. | 
 | 5147 |  | 
 | 5148 | - Issue #10199: New package, ``turtledemo`` now contains selected demo scripts | 
 | 5149 |   that were formerly found under Demo/turtle. | 
 | 5150 |  | 
 | 5151 | - Issue #10265: Close file objects explicitly in sunau.  Patch by Brian Brazil. | 
 | 5152 |  | 
 | 5153 | - Issue #10266: uu.decode didn't close in_file explicitly when it was given as a | 
 | 5154 |   filename.  Patch by Brian Brazil. | 
 | 5155 |  | 
 | 5156 | - Issue #10110: Queue objects didn't recognize full queues when the maxsize | 
 | 5157 |   parameter had been reduced. | 
 | 5158 |  | 
 | 5159 | - Issue #10160: Speed up operator.attrgetter.  Patch by Christos Georgiou. | 
 | 5160 |  | 
 | 5161 | - logging: Added style option to basicConfig() to allow %, {} or $-formatting. | 
 | 5162 |  | 
 | 5163 | - Issue #5729: json.dumps() now supports using a string such as '\t' for | 
 | 5164 |   pretty-printing multilevel objects. | 
 | 5165 |  | 
 | 5166 | - Issue #10253: FileIO leaks a file descriptor when trying to open a file for | 
 | 5167 |   append that isn't seekable.  Patch by Brian Brazil. | 
 | 5168 |  | 
 | 5169 | - Support context manager protocol for file-like objects returned by mailbox | 
 | 5170 |   ``get_file()`` methods. | 
 | 5171 |  | 
 | 5172 | - Issue #10246: uu.encode didn't close file objects explicitly when filenames | 
 | 5173 |   were given to it.  Patch by Brian Brazil. | 
 | 5174 |  | 
 | 5175 | - Issue #10198: fix duplicate header written to wave files when writeframes() is | 
 | 5176 |   called without data. | 
 | 5177 |  | 
 | 5178 | - Close file objects in modulefinder in a timely manner. | 
 | 5179 |  | 
 | 5180 | - Close a io.TextIOWrapper object in email.parser in a timely manner. | 
 | 5181 |  | 
 | 5182 | - Close a file object in distutils.sysconfig in a timely manner. | 
 | 5183 |  | 
 | 5184 | - Close a file object in pkgutil in a timely manner. | 
 | 5185 |  | 
 | 5186 | - Issue #10233: Close file objects in a timely manner in the tarfile module and | 
 | 5187 |   its test suite. | 
 | 5188 |  | 
 | 5189 | - Issue #10093: ResourceWarnings are now issued when files and sockets are | 
 | 5190 |   deallocated without explicit closing.  These warnings are silenced by default, | 
 | 5191 |   except in pydebug mode. | 
 | 5192 |  | 
 | 5193 | - tarfile.py: Add support for all missing variants of the GNU sparse extensions | 
 | 5194 |   and create files with holes when extracting sparse members. | 
 | 5195 |  | 
 | 5196 | - Issue #10218: Return timeout status from ``Condition.wait`` in threading. | 
 | 5197 |  | 
 | 5198 | - Issue #7351: Add ``zipfile.BadZipFile`` spelling of the exception name and | 
 | 5199 |   deprecate the old name ``zipfile.BadZipfile``. | 
 | 5200 |  | 
 | 5201 | - Issue #5027: The standard ``xml`` namespace is now understood by | 
 | 5202 |   xml.sax.saxutils.XMLGenerator as being bound to | 
 | 5203 |   http://www.w3.org/XML/1998/namespace.  Patch by Troy J. Farrell. | 
 | 5204 |  | 
 | 5205 | - Issue #5975: Add csv.unix_dialect class. | 
 | 5206 |  | 
 | 5207 | - Issue #7761: telnetlib.interact failures on Windows fixed. | 
 | 5208 |  | 
 | 5209 | - logging: Added style option to Formatter to allow %, {} or $-formatting. | 
 | 5210 |  | 
 | 5211 | - Issue #5178: Added tempfile.TemporaryDirectory class that can be used as a | 
 | 5212 |   context manager. | 
 | 5213 |  | 
 | 5214 | - Issue #1349106: Generator (and BytesGenerator) flatten method and Header | 
 | 5215 |   encode method now support a 'linesep' argument. | 
 | 5216 |  | 
 | 5217 | - Issue #5639: Add a *server_hostname* argument to ``SSLContext.wrap_socket`` in | 
 | 5218 |   order to support the TLS SNI extension.  ``HTTPSConnection`` and ``urlopen()`` | 
 | 5219 |   also use this argument, so that HTTPS virtual hosts are now supported. | 
 | 5220 |  | 
 | 5221 | - Issue #10166: Avoid recursion in pstats Stats.add() for many stats items. | 
 | 5222 |  | 
 | 5223 | - Issue #10163: Skip unreadable registry keys during mimetypes initialization. | 
 | 5224 |  | 
 | 5225 | - logging: Made StreamHandler terminator configurable. | 
 | 5226 |  | 
 | 5227 | - logging: Allowed filters to be just callables. | 
 | 5228 |  | 
 | 5229 | - logging: Added tests for _logRecordClass changes. | 
 | 5230 |  | 
 | 5231 | - Issue #10092: Properly reset locale in calendar.Locale*Calendar classes. | 
 | 5232 |  | 
 | 5233 | - logging: Added _logRecordClass, getLogRecordClass, setLogRecordClass to | 
 | 5234 |   increase flexibility of LogRecord creation. | 
 | 5235 |  | 
 | 5236 | - Issue #5117: Case normalization was needed on ntpath.relpath().  Also fixed | 
 | 5237 |   root directory issue on posixpath.relpath().  (Ported working fixes from | 
 | 5238 |   ntpath.) | 
 | 5239 |  | 
 | 5240 | - Issue #1343: xml.sax.saxutils.XMLGenerator now has an option | 
 | 5241 |   short_empty_elements to direct it to use self-closing tags when appropriate. | 
 | 5242 |  | 
 | 5243 | - Issue #9807 (part 1): Expose the ABI flags in sys.abiflags.  Add --abiflags | 
 | 5244 |   switch to python-config for command line access. | 
 | 5245 |  | 
 | 5246 | - Issue #6098: Don't claim DOM level 3 conformance in minidom. | 
 | 5247 |  | 
 | 5248 | - Issue #5762: Fix AttributeError raised by ``xml.dom.minidom`` when an empty | 
 | 5249 |   XML namespace attribute is encountered. | 
 | 5250 |  | 
 | 5251 | - Issue #2830: Add the ``html.escape()`` function, which quotes all problematic | 
 | 5252 |   characters by default.  Deprecate ``cgi.escape()``. | 
 | 5253 |  | 
 | 5254 | - Issue #9409: Fix the regex to match all kind of filenames, for interactive | 
 | 5255 |   debugging in doctests. | 
 | 5256 |  | 
 | 5257 | - Issue #9183: ``datetime.timezone(datetime.timedelta(0))`` will now return the | 
 | 5258 |   same instance as ``datetime.timezone.utc``. | 
 | 5259 |  | 
 | 5260 | - Issue #7523: Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module, where | 
 | 5261 |   supported by the system.  Patch by Nikita Vetoshkin. | 
 | 5262 |  | 
 | 5263 | - Issue #10063: file:// scheme will stop accessing remote hosts via ftp | 
 | 5264 |   protocol. file:// urls had fallback to access remote hosts via ftp. This was | 
 | 5265 |   not correct, change is made to raise a URLError when a remote host is tried to | 
 | 5266 |   access via file:// scheme. | 
 | 5267 |  | 
 | 5268 | - Issue #1710703: Write structures for an empty ZIP archive when a ZipFile is | 
 | 5269 |   created in modes 'a' or 'w' and then closed without adding any files. Raise | 
 | 5270 |   BadZipfile (rather than IOError) when opening small non-ZIP files. | 
 | 5271 |  | 
 | 5272 | - Issue #10041: The signature of optional arguments in socket.makefile() didn't | 
 | 5273 |   match that of io.open(), and they also didn't get forwarded properly to | 
 | 5274 |   TextIOWrapper in text mode.  Patch by Kai Zhu. | 
 | 5275 |  | 
 | 5276 | - Issue #9003: http.client.HTTPSConnection, urllib.request.HTTPSHandler and | 
 | 5277 |   urllib.request.urlopen now take optional arguments to allow for server | 
 | 5278 |   certificate checking, as recommended in public uses of HTTPS. | 
 | 5279 |  | 
 | 5280 | - Issue #6612: Fix site and sysconfig to catch os.getcwd() error, eg. if the | 
 | 5281 |   current directory was deleted. Patch written by W. Trevor King. | 
 | 5282 |  | 
 | 5283 | - Issue #3873: Speed up unpickling from file objects that have a peek() method. | 
 | 5284 |  | 
 | 5285 | - Issue #10075: Add a session_stats() method to SSLContext objects. | 
 | 5286 |  | 
 | 5287 | - Issue #9948: Fixed problem of losing filename case information. | 
 | 5288 |  | 
 | 5289 | Extension Modules | 
 | 5290 | ----------------- | 
 | 5291 |  | 
 | 5292 | - Issue #5109: array.array constructor will now use fast code when | 
 | 5293 |   initial data is provided in an array object with correct type. | 
 | 5294 |  | 
 | 5295 | - Issue #6317: Now winsound.PlaySound only accepts unicode. | 
 | 5296 |  | 
 | 5297 | - Issue #6317: Now winsound.PlaySound can accept non ascii filename. | 
 | 5298 |  | 
 | 5299 | - Issue #9377: Use Unicode API for gethostname on Windows. | 
 | 5300 |  | 
 | 5301 | - Issue #10143: Update "os.pathconf" values. | 
 | 5302 |  | 
 | 5303 | - Issue #6518: Support context manager protcol for ossaudiodev types. | 
 | 5304 |  | 
 | 5305 | - Issue #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY. | 
 | 5306 |  | 
 | 5307 | - Issue #9054: Fix a crash occurring when using the pyexpat module with expat | 
 | 5308 |   version 2.0.1. | 
 | 5309 |  | 
 | 5310 | - Issue #5355: Provide mappings from Expat error numbers to string descriptions | 
 | 5311 |   and backwards, in order to actually make it possible to analyze error codes | 
 | 5312 |   provided by ExpatError. | 
 | 5313 |  | 
 | 5314 | - The Unicode database was updated to 6.0.0. | 
 | 5315 |  | 
 | 5316 | C-API | 
 | 5317 | ----- | 
 | 5318 |  | 
 | 5319 | - Issue #10288: The deprecated family of "char"-handling macros | 
 | 5320 |   (ISLOWER()/ISUPPER()/etc) have now been removed: use Py_ISLOWER() etc instead. | 
 | 5321 |  | 
 | 5322 | - Issue #9778: Hash values are now always the size of pointers. A new Py_hash_t | 
 | 5323 |   type has been introduced. | 
 | 5324 |  | 
 | 5325 | Tools/Demos | 
 | 5326 | ----------- | 
 | 5327 |  | 
 | 5328 | - Issue #10117: Tools/scripts/reindent.py now accepts source files that use | 
 | 5329 |   encoding other than ASCII or UTF-8.  Source encoding is preserved when | 
 | 5330 |   reindented code is written to a file. | 
 | 5331 |  | 
 | 5332 | - Issue #7287: Demo/imputil/knee.py was removed. | 
 | 5333 |  | 
 | 5334 | Tests | 
 | 5335 | ----- | 
 | 5336 |  | 
 | 5337 | - Issue #3699: Fix test_bigaddrspace and extend it to test bytestrings as well | 
 | 5338 |   as unicode strings.  Initial patch by Sandro Tosi. | 
 | 5339 |  | 
 | 5340 | - Issue #10294: Remove dead code form test_unicode_file. | 
 | 5341 |  | 
 | 5342 | - Issue #10123: Don't use non-ascii filenames in test_doctest tests. Add a new | 
 | 5343 |   test specific to unicode (non-ascii name and filename). | 
 | 5344 |  | 
 | 5345 | Build | 
 | 5346 | ----- | 
 | 5347 |  | 
 | 5348 | - Issue #10268: Add a --enable-loadable-sqlite-extensions option to configure. | 
 | 5349 |  | 
 | 5350 | - Issue #8852: Allow the socket module to build on OpenSolaris. | 
 | 5351 |  | 
 | 5352 | - Drop -OPT:Olimit compiler option. | 
 | 5353 |  | 
 | 5354 | - Issue #10094: Use versioned .so files on GNU/kfreeBSD and the GNU Hurd. | 
 | 5355 |  | 
 | 5356 | - Accept Oracle Berkeley DB 5.0 and 5.1 as backend for the dbm extension. | 
 | 5357 |  | 
 | 5358 | - Issue #7473: avoid link errors when building a framework with a different set | 
 | 5359 |   of architectures than the one that is currently installed. | 
 | 5360 |  | 
 | 5361 |  | 
 | 5362 | What's New in Python 3.2 Alpha 3? | 
 | 5363 | ================================= | 
 | 5364 |  | 
 | 5365 | *Release date: 09-Oct-2010* | 
 | 5366 |  | 
 | 5367 | Core and Builtins | 
 | 5368 | ----------------- | 
 | 5369 |  | 
 | 5370 | - Issue #10068: Global objects which have reference cycles with their module's | 
 | 5371 |   dict are now cleared again. This causes issue #7140 to appear again. | 
 | 5372 |  | 
 | 5373 | - Issue #9738: Document PyErr_SetString() and PyErr_SetFromErrnoWithFilename() | 
 | 5374 |   encodings. | 
 | 5375 |  | 
 | 5376 | - ast.literal_eval() can now handle negative numbers.  It is also a little more | 
 | 5377 |   liberal in what it accepts without compromising the safety of the evaluation. | 
 | 5378 |   For example, 3j+4 and 3+4+5 are both accepted. | 
 | 5379 |  | 
 | 5380 | - Issue #10006: type.__abstractmethods__ now raises an AttributeError.  As a | 
 | 5381 |   result metaclasses can now be ABCs (see #9533). | 
 | 5382 |  | 
 | 5383 | - Issue #8670: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_t. | 
 | 5384 |  | 
 | 5385 | - Issue #8670: PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() replace | 
 | 5386 |   UTF-16 surrogate pairs by single non-BMP characters for 16 bits Py_UNICODE and | 
 | 5387 |   32 bits wchar_t (eg. Linux in narrow build). | 
 | 5388 |  | 
 | 5389 | - Issue #10003: Allow handling of SIGBREAK on Windows. Fixes a regression | 
 | 5390 |   introduced by issue #9324. | 
 | 5391 |  | 
 | 5392 | - Issue #9979: Create function PyUnicode_AsWideCharString(). | 
 | 5393 |  | 
 | 5394 | - Issue #7397: Mention that importlib.import_module() is probably what someone | 
 | 5395 |   really wants to be using in __import__'s docstring. | 
 | 5396 |  | 
 | 5397 | - Issue #8521: Allow CreateKeyEx, OpenKeyEx, and DeleteKeyEx functions of winreg | 
 | 5398 |   to use named arguments. | 
 | 5399 |  | 
 | 5400 | - Issue #9930: Remove bogus subtype check that was causing (e.g.) | 
 | 5401 |   float.__rdiv__(2.0, 3) to return NotImplemented instead of the expected 1.5. | 
 | 5402 |  | 
 | 5403 | - Issue #9808: Implement os.getlogin for Windows. Patch by Jon Anglin. | 
 | 5404 |  | 
 | 5405 | - Issue #9901: Destroying the GIL in Py_Finalize() can fail if some other | 
 | 5406 |   threads are still running.  Instead, reinitialize the GIL on a second call to | 
 | 5407 |   Py_Initialize(). | 
 | 5408 |  | 
 | 5409 | - All SyntaxErrors now have a column offset and therefore a caret when the error | 
 | 5410 |   is printed. | 
 | 5411 |  | 
 | 5412 | - Issue #9252: PyImport_Import no longer uses a fromlist hack to return the | 
 | 5413 |   module that was imported, but instead gets the module from sys.modules. | 
 | 5414 |  | 
 | 5415 | - Issue #9213: The range type_items now provides index() and count() methods, to | 
 | 5416 |   conform to the Sequence ABC.  Patch by Daniel Urban and Daniel Stutzbach. | 
 | 5417 |  | 
 | 5418 | - Issue #7994: Issue a PendingDeprecationWarning if object.__format__ is called | 
 | 5419 |   with a non-empty format string.  This is an effort to future-proof user | 
 | 5420 |   code. If a derived class does not currently implement __format__ but later | 
 | 5421 |   adds its own __format__, it would most likely break user code that had | 
 | 5422 |   supplied a format string.  This will be changed to a DeprecationWaring in | 
 | 5423 |   Python 3.3 and it will be an error in Python 3.4. | 
 | 5424 |  | 
 | 5425 | - Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properly | 
 | 5426 |   re-created on a subsequent call to Py_Initialize().  The problem (a crash) | 
 | 5427 |   wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial. | 
 | 5428 |  | 
 | 5429 | - Issue #9210: Configure option --with-wctype-functions was removed.  Using the | 
 | 5430 |   functions from the libc caused the methods .upper() and lower() to become | 
 | 5431 |   locale aware and created subtly wrong results. | 
 | 5432 |  | 
 | 5433 | - Issue #9738: PyUnicode_FromFormat() and PyErr_Format() raise an error on a | 
 | 5434 |   non-ASCII byte in the format string. | 
 | 5435 |  | 
 | 5436 | - Issue #4617: Previously it was illegal to delete a name from the local | 
 | 5437 |   namespace if it occurs as a free variable in a nested block.  This limitation | 
 | 5438 |   of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF). | 
 | 5439 |  | 
 | 5440 | - Issue #9804: ascii() now always represents unicode surrogate pairs as a single | 
 | 5441 |   ``\UXXXXXXXX``, regardless of whether the character is printable or not. | 
 | 5442 |   Also, the "backslashreplace" error handler now joins surrogate pairs into a | 
 | 5443 |   single character on UCS-2 builds. | 
 | 5444 |  | 
 | 5445 | - Issue #9757: memoryview objects get a release() method to release the | 
 | 5446 |   underlying buffer (previously this was only done when deallocating the | 
 | 5447 |   memoryview), and gain support for the context management protocol. | 
 | 5448 |  | 
 | 5449 | - Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid | 
 | 5450 |   thread-local storage key. | 
 | 5451 |  | 
 | 5452 | Library | 
 | 5453 | ------- | 
 | 5454 |  | 
 | 5455 | - Issue #2236: distutils' mkpath ignored the mode parameter. | 
 | 5456 |  | 
 | 5457 | - Fix typo in one sdist option (medata-check). | 
 | 5458 |  | 
 | 5459 | - Issue #9199: Fix incorrect use of distutils.cmd.Command.announce. | 
 | 5460 |  | 
 | 5461 | - Issue #1718574: Fix options that were supposed to accept arguments but did | 
 | 5462 |   not in build_clib. | 
 | 5463 |  | 
 | 5464 | - Issue #9437: Fix building C extensions with non-default LDFLAGS. | 
 | 5465 |  | 
 | 5466 | - Issue #4661: email can now parse bytes input and generate either converted | 
 | 5467 |   7bit output or bytes output.  Email version bumped to 5.1.0. | 
 | 5468 |  | 
 | 5469 | - Issue #1589: Add ssl.match_hostname(), to help implement server identity | 
 | 5470 |   verification for higher-level protocols. | 
 | 5471 |  | 
 | 5472 | - Issue #9759: GzipFile now raises ValueError when an operation is attempted | 
 | 5473 |   after the file is closed.  Patch by Jeffrey Finkelstein. | 
 | 5474 |  | 
 | 5475 | - Issue #9042: Fix interaction of custom translation classes and caching in | 
 | 5476 |   gettext. | 
 | 5477 |  | 
 | 5478 | - Issue #6706: asyncore.dispatcher now provides a handle_accepted() method | 
 | 5479 |   returning a (sock, addr) pair which is called when a connection has been | 
 | 5480 |   established with a new remote endpoint.  This is supposed to be used as a | 
 | 5481 |   replacement for old handle_accept() and avoids the user to call accept() | 
 | 5482 |   directly. | 
 | 5483 |  | 
 | 5484 | - Issue #9065: tarfile no longer uses "root" as the default for the uname and | 
 | 5485 |   gname field. | 
 | 5486 |  | 
 | 5487 | - Issue #8980: Fixed a failure in distutils.command check that was shadowed by | 
 | 5488 |   an environment that does not have docutils.  Patch by Arfrever. | 
 | 5489 |  | 
 | 5490 | - Issue #1050268: parseaddr now correctly quotes double quote and backslash | 
 | 5491 |   characters that appear inside quoted strings in email addresses. | 
 | 5492 |  | 
 | 5493 | - Issue #10004: quoprimime no longer generates a traceback when confronted with | 
 | 5494 |   invalid characters after '=' in a Q-encoded word. | 
 | 5495 |  | 
 | 5496 | - Issue #1491: BaseHTTPServer nows send a ``100 Continue`` response before | 
 | 5497 |   sending a 200 OK for the Expect: 100-continue request header. | 
 | 5498 |  | 
 | 5499 | - Issue #9360: Cleanup and improvements to the nntplib module.  The API now | 
 | 5500 |   conforms to the philosophy of bytes and unicode separation in Python 3.  A | 
 | 5501 |   test suite has also been added. | 
 | 5502 |  | 
 | 5503 | - Issue #9962: GzipFile now has the peek() method. | 
 | 5504 |  | 
 | 5505 | - Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN, | 
 | 5506 |   retry the select() loop instead of bailing out.  This is because select() can | 
 | 5507 |   incorrectly report a socket as ready for reading (for example, if it received | 
 | 5508 |   some data with an invalid checksum). | 
 | 5509 |  | 
 | 5510 | - Issue #3612: Added new types to ctypes.wintypes. (CHAR and pointers) | 
 | 5511 |  | 
 | 5512 | - Issue #9950: Fix socket.sendall() crash or misbehaviour when a signal is | 
 | 5513 |   received.  Now sendall() properly calls signal handlers if necessary, and | 
 | 5514 |   retries sending if these returned successfully, including on sockets with a | 
 | 5515 |   timeout. | 
 | 5516 |  | 
 | 5517 | - Issue #9947: logging: Fixed locking bug in stopListening. | 
 | 5518 |  | 
 | 5519 | - Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler. | 
 | 5520 |  | 
 | 5521 | - Issue #9936: Fixed executable lines' search in the trace module. | 
 | 5522 |  | 
 | 5523 | - Issue #9790: Rework imports necessary for samefile and sameopenfile | 
 | 5524 |   in ntpath. | 
 | 5525 |  | 
 | 5526 | - Issue #9928: Properly initialize the types exported by the bz2 module. | 
 | 5527 |  | 
 | 5528 | - Issue #1675951: Allow GzipFile to work with unseekable file objects.  Patch by | 
 | 5529 |   Florian Festi. | 
 | 5530 |  | 
 | 5531 | - Logging: Added QueueListener class to facilitate logging usage for | 
 | 5532 |   performance-critical threads. | 
 | 5533 |  | 
 | 5534 | - Issue #9916: Add some missing errno symbols. | 
 | 5535 |  | 
 | 5536 | - Issue #9877: Expose sysconfig.get_makefile_filename() | 
 | 5537 |  | 
 | 5538 | - logging: Added hasHandlers() method to Logger and LoggerAdapter. | 
 | 5539 |  | 
 | 5540 | - Issue #9908: Fix os.stat() on bytes paths under Windows 7. | 
 | 5541 |  | 
 | 5542 | - Issue #2643: msync() is not called anymore when deallocating an open mmap | 
 | 5543 |   object, only munmap(). | 
 | 5544 |  | 
 | 5545 | - logging: Changed LoggerAdapter implementation internally, to make it easier to | 
 | 5546 |   subclass in a useful way. | 
 | 5547 |  | 
 | 5548 | - logging: hasHandlers method was added to Logger, and isEnabledFor, | 
 | 5549 |   getEffectiveLevel, hasHandlers and setLevel were added to LoggerAdapter. | 
 | 5550 |   LoggerAdapter was introduced into the unit tests for logging. | 
 | 5551 |  | 
 | 5552 | - Issue #1686: Fix string.Template when overriding the pattern attribute. | 
 | 5553 |  | 
 | 5554 | - Issue #9854: SocketIO objects now observe the RawIOBase interface in | 
 | 5555 |   non-blocking mode: they return None when an operation would block (instead of | 
 | 5556 |   raising an exception). | 
 | 5557 |  | 
 | 5558 | - Issue #1730136: Fix the comparison between a tk.font.Font and an object of | 
 | 5559 |   another kind. | 
 | 5560 |  | 
 | 5561 | - Issue #9441: logging has better coverage for rotating file handlers. | 
 | 5562 |  | 
 | 5563 | - Issue #9865: collections.OrderedDict now has a __sizeof__ method. | 
 | 5564 |  | 
 | 5565 | - Issue #9854: The default read() implementation in io.RawIOBase now handles | 
 | 5566 |   non-blocking readinto() returning None correctly. | 
 | 5567 |  | 
 | 5568 | - Issue #1552: socket.socketpair() now returns regular socket.socket objects | 
 | 5569 |   supporting the whole socket API (rather than the "raw" _socket.socket | 
 | 5570 |   objects). | 
 | 5571 |  | 
 | 5572 | - Issue #9853: Fix the signature of SSLSocket.recvfrom() and SSLSocket.sendto() | 
 | 5573 |   to match the corresponding socket methods. | 
 | 5574 |  | 
 | 5575 | - Issue #9840: Added a decorator to reprlib for wrapping __repr__ methods to make | 
 | 5576 |   them handle recursive calls within the same thread. | 
 | 5577 |  | 
 | 5578 | - logging: Enhanced HTTPHandler with secure and credentials initializers. | 
 | 5579 |  | 
 | 5580 | - Issue #767645: Set os.path.supports_unicode_filenames to True on Mac OS X. | 
 | 5581 |  | 
 | 5582 | - Issue #9837: The read() method of ZipExtFile objects (as returned by | 
 | 5583 |   ZipFile.open()) could return more bytes than requested. | 
 | 5584 |  | 
 | 5585 | - Issue #9826: OrderedDict.__repr__ can now handle self-referential values: | 
 | 5586 |   d['x'] = d. | 
 | 5587 |  | 
 | 5588 | - Issue #9825: Using __del__ in the definition of collections.OrderedDict made | 
 | 5589 |   it possible for the user to create self-referencing ordered dictionaries which | 
 | 5590 |   become permanently uncollectable GC garbage.  Reinstated the Python 3.1 | 
 | 5591 |   approach of using weakref proxies so that reference cycles never get created | 
 | 5592 |   in the first place. | 
 | 5593 |  | 
 | 5594 | - Issue #9579, #9580: Fix os.confstr() for value longer than 255 bytes and | 
 | 5595 |   encode the value with filesystem encoding and surrogateescape (instead of | 
 | 5596 |   utf-8 in strict mode) . Patch written by David Watson. | 
 | 5597 |  | 
 | 5598 | - Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING | 
 | 5599 |   environment variable to set the filesystem encoding at Python startup. | 
 | 5600 |   sys.setfilesystemencoding() creates inconsistencies because it is unable to | 
 | 5601 |   reencode all filenames in all objects. | 
 | 5602 |  | 
 | 5603 | - Issue #9410: Various optimizations to the pickle module, leading to speedups | 
 | 5604 |   up to 4x (depending on the benchmark).  Mostly ported from Unladen Swallow; | 
 | 5605 |   initial patch by Alexandre Vassalotti. | 
 | 5606 |  | 
 | 5607 | - The pprint module now supports printing OrderedDicts in their given order | 
 | 5608 |   (formerly, it would sort the keys). | 
 | 5609 |  | 
 | 5610 | - Logging: Added QueueHandler class to facilitate logging usage with | 
 | 5611 |   multiprocessing. | 
 | 5612 |  | 
 | 5613 | - Issue #9707: Rewritten reference implementation of threading.local which is | 
 | 5614 |   friendlier towards reference cycles.  This change is not normally visible | 
 | 5615 |   since an optimized C implementation (_thread._local) is used instead. | 
 | 5616 |  | 
 | 5617 | - Issue #6394: os.getppid() is now supported on Windows.  Note that it will | 
 | 5618 |   still return the id of the parent process after it has exited.  This process | 
 | 5619 |   id may even have been reused by another unrelated process. | 
 | 5620 |  | 
 | 5621 | - Issue #9792: In case of connection failure, socket.create_connection() would | 
 | 5622 |   swallow the exception and raise a new one, making it impossible to fetch the | 
 | 5623 |   original errno, or to filter timeout errors.  Now the original error is | 
 | 5624 |   re-raised. | 
 | 5625 |  | 
 | 5626 | - Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True, and | 
 | 5627 |   the passed buffer was exactly 1024 bytes long, the buffer wouldn't be updated | 
 | 5628 |   back after the system call.  Original patch by Brian Brazil. | 
 | 5629 |  | 
 | 5630 | - Updates to the random module: | 
 | 5631 |  | 
 | 5632 |   * Document which parts of the module are guaranteed to stay the same across | 
 | 5633 |     versions and which parts are subject to change. | 
 | 5634 |  | 
 | 5635 |   * Update the seed() method to use all of the bits in a string instead of just | 
 | 5636 |     the hash value.  This makes better use of the seed value and assures the | 
 | 5637 |     seeding is platform independent.  Issue #7889. | 
 | 5638 |  | 
 | 5639 |   * Improved the random()-->integer algorithm used in choice(), shuffle(), | 
 | 5640 |     sample(), randrange(), and randint().  Formerly, it used int(n*random()) | 
 | 5641 |     which has a slight bias whenever n is not a power of two.  Issue #9025. | 
 | 5642 |  | 
 | 5643 |   * Improved documentation of arguments to randrange().  Issue #9379. | 
 | 5644 |  | 
 | 5645 | - collections.OrderedDict now supports a new method for repositioning keys to | 
 | 5646 |   either end. | 
 | 5647 |  | 
 | 5648 | - Issue #9754: Similarly to assertRaises and assertRaisesRegexp, unittest test | 
 | 5649 |   cases now also have assertWarns and assertWarnsRegexp methods to check that a | 
 | 5650 |   given warning type was triggered by the code under test. | 
 | 5651 |  | 
 | 5652 | - Issue #5506: BytesIO objects now have a getbuffer() method exporting a view of | 
 | 5653 |   their contents without duplicating them.  The view is both readable and | 
 | 5654 |   writable. | 
 | 5655 |  | 
 | 5656 | - Issue #7566: Implement os.path.sameopenfile for Windows. | 
 | 5657 |  | 
 | 5658 | - Issue #9293: I/O streams now raise ``io.UnsupportedOperation`` when an | 
 | 5659 |   unsupported operation is attempted (for example, writing to a file open only | 
 | 5660 |   for reading). | 
 | 5661 |  | 
 | 5662 | - hashlib has two new constant attributes: algorithms_guaranteed and | 
 | 5663 |   algorithms_avaiable that respectively list the names of hash algorithms | 
 | 5664 |   guaranteed to exist in all Python implementations and the names of hash | 
 | 5665 |   algorithms available in the current process. | 
 | 5666 |  | 
 | 5667 | - A new package ``concurrent.futures`` as defined by PEP 3148. | 
 | 5668 |  | 
 | 5669 | C-API | 
 | 5670 | ----- | 
 | 5671 |  | 
 | 5672 | - Add PyErr_SyntaxLocationEx, which supports passing a column offset. | 
 | 5673 |  | 
 | 5674 | - Issue #9834: Don't segfault in PySequence_GetSlice, PySequence_SetSlice, or | 
 | 5675 |   PySequence_DelSlice when the object doesn't have any mapping operations | 
 | 5676 |   defined. | 
 | 5677 |  | 
 | 5678 | Tools/Demos | 
 | 5679 | ----------- | 
 | 5680 |  | 
 | 5681 | - Issue #9188: The gdb extension now handles correctly narrow (UCS2) as well as | 
 | 5682 |   wide (UCS4) unicode builds for both the host interpreter (embedded inside gdb) | 
 | 5683 |   and the interpreter under test. | 
 | 5684 |  | 
 | 5685 | Tests | 
 | 5686 | ----- | 
 | 5687 |  | 
 | 5688 | - Issue #9308: Added tests for importing encoded modules that do not | 
 | 5689 |   depend on specific stdlib modules being encoded in a certain way. | 
 | 5690 |  | 
 | 5691 | - Issue #1051: Add a script (Lib/test/make_ssl_certs.py) to generate the custom | 
 | 5692 |   certificate and private key files used by SSL-related certs. | 
 | 5693 |  | 
 | 5694 | - Issue #9978: Wait until subprocess completes initialization. (Win32KillTests | 
 | 5695 |   in test_os) | 
 | 5696 |  | 
 | 5697 | - Issue #7110: regrtest now sends test failure reports and single-failure | 
 | 5698 |   tracebacks to stderr rather than stdout. | 
 | 5699 |  | 
 | 5700 | - Issue #9628: fix runtests.sh -x option so more than one test can be excluded. | 
 | 5701 |  | 
 | 5702 | - Issue #9899: Fix test_tkinter.test_font on various platforms.  Patch by Ned | 
 | 5703 |   Deily. | 
 | 5704 |  | 
 | 5705 | - Issue #9894: Do not hardcode ENOENT in test_subprocess. | 
 | 5706 |  | 
 | 5707 | - Issue #9315: Added tests for the trace module.  Patch by Eli Bendersky. | 
 | 5708 |  | 
 | 5709 | - Issue #9323: Make test.regrtest.__file__ absolute, this was not always the | 
 | 5710 |   case when running profile or trace, for example. | 
 | 5711 |  | 
 | 5712 | - Issue #9568: Fix test_urllib2_localnet on OS X 10.3. | 
 | 5713 |  | 
 | 5714 | Build | 
 | 5715 | ----- | 
 | 5716 |  | 
 | 5717 | - Issue #10062: Allow building on platforms which do not have sem_timedwait. | 
 | 5718 |  | 
 | 5719 | - Issue #10054: Some platforms provide uintptr_t in inttypes.h.  Patch by Akira | 
 | 5720 |   Kitada. | 
 | 5721 |  | 
 | 5722 | - Issue #10055: Make json C89-compliant in UCS4 mode. | 
 | 5723 |  | 
 | 5724 | - Issue #9552: Avoid unnecessary rebuild of OpenSSL. (Windows) | 
 | 5725 |  | 
 | 5726 | - Issue #1633863: Don't ignore $CC under AIX. | 
 | 5727 |  | 
 | 5728 | - Issue #9810: Compile bzip2 source files in Python's project file directly. It | 
 | 5729 |   used to be built with bzip2's makefile. | 
 | 5730 |  | 
 | 5731 | - Issue #9848: Stopping trying to build _weakref in setup.py as it is a built-in | 
 | 5732 |   module. | 
 | 5733 |  | 
 | 5734 | - Issue #9806: python-config now has an ``--extension-suffix`` option that | 
 | 5735 |   outputs the suffix for dynamic libraries including the ABI version name | 
 | 5736 |   defined by PEP 3149. | 
 | 5737 |  | 
 | 5738 | - Issue #941346: Improve the build process under AIX and allow Python to be | 
 | 5739 |   built as a shared library.  Patch by Sébastien Sablé. | 
 | 5740 |  | 
 | 5741 | - Issue #4026: Make the fcntl extension build under AIX.  Patch by Sébastien | 
 | 5742 |   Sablé. | 
 | 5743 |  | 
 | 5744 | - Issue #9701: The MacOSX installer can patch the shell profile to ensure that | 
 | 5745 |   the "bin" directory inside the framework is on the shell's search path. This | 
 | 5746 |   feature now also supports the ZSH shell. | 
 | 5747 |  | 
 | 5748 |  | 
 | 5749 | What's New in Python 3.2 Alpha 2? | 
 | 5750 | ================================= | 
 | 5751 |  | 
 | 5752 | *Release date: 05-Sep-2010* | 
 | 5753 |  | 
 | 5754 | Core and Builtins | 
 | 5755 | ----------------- | 
 | 5756 |  | 
 | 5757 | - Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced by | 
 | 5758 |   the new (and simpler) DUP_TOP_TWO.  Performance isn't changed, but our | 
 | 5759 |   bytecode is a bit simplified.  Patch by Demur Rumed. | 
 | 5760 |  | 
 | 5761 | - Issue #9766: Rename poorly named variables exposed by _warnings to prevent | 
 | 5762 |   confusion with the proper variables names from 'warnings' itself. | 
 | 5763 |  | 
 | 5764 | - Issue #9212: dict_keys and dict_items now provide the isdisjoint() method, to | 
 | 5765 |   conform to the Set ABC.  Patch by Daniel Urban. | 
 | 5766 |  | 
 | 5767 | - Issue #9737: Fix a crash when trying to delete a slice or an item from a | 
 | 5768 |   memoryview object. | 
 | 5769 |  | 
 | 5770 | - Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding() are | 
 | 5771 |   now removed, since their effect was inexistent in 3.x (the default encoding is | 
 | 5772 |   hardcoded to utf-8 and cannot be changed). | 
 | 5773 |  | 
 | 5774 | - Issue #7415: PyUnicode_FromEncodedObject() now uses the new buffer API | 
 | 5775 |   properly.  Patch by Stefan Behnel. | 
 | 5776 |  | 
 | 5777 | - Issue #5553: The Py_LOCAL_INLINE macro now results in inlining on most | 
 | 5778 |   platforms.  Previously, it inlined only when using Microsoft Visual C. | 
 | 5779 |  | 
 | 5780 | - Issue #9712: Fix tokenize on identifiers that start with non-ascii names. | 
 | 5781 |  | 
 | 5782 | - Issue #9688: __basicsize__ and __itemsize__ must be accessed as Py_ssize_t. | 
 | 5783 |  | 
 | 5784 | - Issue #9684: Added a definition for SIZEOF_WCHAR_T to PC/pyconfig.h, to match | 
 | 5785 |   the pyconfig.h generated by configure on other systems. | 
 | 5786 |  | 
 | 5787 | - Issue #9666: Only catch AttributeError in hasattr(). All other exceptions that | 
 | 5788 |   occur during attribute lookup are now propagated to the caller. | 
 | 5789 |  | 
 | 5790 | - Issue #8622: Add PYTHONFSENCODING environment variable to override the | 
 | 5791 |   filesystem encoding. | 
 | 5792 |  | 
 | 5793 | - Issue #5127: The C functions that access the Unicode Database now accept and | 
 | 5794 |   return characters from the full Unicode range, even on narrow unicode builds | 
 | 5795 |   (Py_UNICODE_TOLOWER, Py_UNICODE_ISDECIMAL, and others).  A visible difference | 
 | 5796 |   in Python is that unicodedata.numeric() now returns the correct value for | 
 | 5797 |   large code points, and repr() may consider more characters as printable. | 
 | 5798 |  | 
 | 5799 | - Issue #9425: Create PyModule_GetFilenameObject() function to get the filename | 
 | 5800 |   as a unicode object, instead of a byte string. Function needed to support | 
 | 5801 |   unencodable filenames. Deprecate PyModule_GetFilename() in favor on the new | 
 | 5802 |   function. | 
 | 5803 |  | 
 | 5804 | - Issue #8063: Call _PyGILState_Init() earlier in Py_InitializeEx(). | 
 | 5805 |  | 
 | 5806 | - Issue #9612: The set object is now 64-bit clean under Windows. | 
 | 5807 |  | 
 | 5808 | - Issue #8202: sys.argv[0] is now set to '-m' instead of '-c' when searching for | 
 | 5809 |   the module file to be executed with the -m command line option. | 
 | 5810 |  | 
 | 5811 | - Issue #9599: Create PySys_FormatStdout() and PySys_FormatStderr() functions to | 
 | 5812 |   write a message formatted by PyUnicode_FromFormatV() to sys.stdout and | 
 | 5813 |   sys.stderr. | 
 | 5814 |  | 
 | 5815 | - Issue #9542: Create PyUnicode_FSDecoder() function, a ParseTuple converter: | 
 | 5816 |   decode bytes objects to unicode using PyUnicode_DecodeFSDefaultAndSize(); str | 
 | 5817 |   objects are output as-is. | 
 | 5818 |  | 
 | 5819 | - Issue #9203: Computed gotos are now enabled by default on supported compilers | 
 | 5820 |   (which are detected by the configure script).  They can still be disable | 
 | 5821 |   selectively by specifying --without-computed-gotos. | 
 | 5822 |  | 
 | 5823 | - Issue #9425: Create PyErr_WarnFormat() function, similar to PyErr_WarnEx() but | 
 | 5824 |   use PyUnicode_FromFormatV() to format the warning message. | 
 | 5825 |  | 
 | 5826 | - Issue #8530: Prevent stringlib fastsearch from reading beyond the front of an | 
 | 5827 |   array. | 
 | 5828 |  | 
 | 5829 | - Issue #5319: Print an error if flushing stdout fails at interpreter shutdown. | 
 | 5830 |  | 
 | 5831 | - Issue #9337: The str() of a float or complex number is now identical to its | 
 | 5832 |   repr(). | 
 | 5833 |  | 
 | 5834 | - Issue #9416: Fix some issues with complex formatting where the output with no | 
 | 5835 |   type specifier failed to match the str output: | 
 | 5836 |  | 
 | 5837 |     - format(complex(-0.0, 2.0), '-') omitted the real part from the output, | 
 | 5838 |     - format(complex(0.0, 2.0), '-') included a sign and parentheses. | 
 | 5839 |  | 
 | 5840 | Extension Modules | 
 | 5841 | ----------------- | 
 | 5842 |  | 
 | 5843 | - Issue #8013: time.asctime and time.ctime no longer call system | 
 | 5844 |   asctime and ctime functions.  The year range for time.asctime is now | 
 | 5845 |   1900 through maxint.  The range for time.ctime is the same as for | 
 | 5846 |   time.localtime.  The string produced by these functions is longer | 
 | 5847 |   than 24 characters when year is greater than 9999. | 
 | 5848 |  | 
 | 5849 | - Issue #6608: time.asctime is now checking struct tm fields its input | 
 | 5850 |   before passing it to the system asctime.  Patch by MunSic Jeong. | 
 | 5851 |  | 
 | 5852 | - Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file | 
 | 5853 |   descriptor is provided.  Patch by Pascal Chambon. | 
 | 5854 |  | 
 | 5855 | - Issue #7736: Release the GIL around calls to opendir() and closedir() in the | 
 | 5856 |   posix module.  Patch by Marcin Bachry. | 
 | 5857 |  | 
 | 5858 | - Issue #4835: make PyLong_FromSocket_t() and PyLong_AsSocket_t() private to the | 
 | 5859 |   socket module, and fix the width of socket descriptors to be correctly | 
 | 5860 |   detected under 64-bit Windows. | 
 | 5861 |  | 
 | 5862 | - Issue #1027206: Support IDNA in gethostbyname, gethostbyname_ex, getaddrinfo | 
 | 5863 |   and gethostbyaddr.  getnameinfo is now restricted to numeric addresses as | 
 | 5864 |   input. | 
 | 5865 |  | 
 | 5866 | - Issue #9214: Set operations on a KeysView or ItemsView in collections now | 
 | 5867 |   correctly return a set.  Patch by Eli Bendersky. | 
 | 5868 |  | 
 | 5869 | - Issue #5737: Add Solaris-specific mnemonics in the errno module.  Patch by | 
 | 5870 |   Matthew Ahrens. | 
 | 5871 |  | 
 | 5872 | - Restore GIL in nis_cat in case of error. Decode NIS data to fs encoding, using | 
 | 5873 |   the surrogate error handler. | 
 | 5874 |  | 
 | 5875 | - Issue #665761: ``functools.reduce()`` will no longer mask exceptions other | 
 | 5876 |   than ``TypeError`` raised by the iterator argument. | 
 | 5877 |  | 
 | 5878 | - Issue #9570: Use PEP 383 decoding in os.mknod and os.mkfifo. | 
 | 5879 |  | 
 | 5880 | - Issue #6915: Under Windows, os.listdir() didn't release the Global Interpreter | 
 | 5881 |   Lock around all system calls.  Original patch by Ryan Kelly. | 
 | 5882 |  | 
 | 5883 | - Issue #8524: Add a detach() method to socket objects, so as to put the socket | 
 | 5884 |   into the closed state without closing the underlying file descriptor. | 
 | 5885 |  | 
 | 5886 | - Issue #477863: Emit a ResourceWarning at shutdown if gc.garbage is not empty. | 
 | 5887 |  | 
 | 5888 | - Issue #6869: Fix a refcount problem in the _ctypes extension. | 
 | 5889 |  | 
 | 5890 | - Issue #5504: ctypes should now work with systems where mmap can't be | 
 | 5891 |   PROT_WRITE and PROT_EXEC. | 
 | 5892 |  | 
 | 5893 | - Issue #9507: Named tuple repr will now automatically display the right name in | 
 | 5894 |   a tuple subclass. | 
 | 5895 |  | 
 | 5896 | - Issue #9324: Add parameter validation to signal.signal on Windows in order to | 
 | 5897 |   prevent crashes. | 
 | 5898 |  | 
 | 5899 | - Issue #9526: Remove some outdated (int) casts that were preventing the array | 
 | 5900 |   module from working correctly with arrays of more than 2**31 elements. | 
 | 5901 |  | 
 | 5902 | - Fix memory leak in ssl._ssl._test_decode_cert. | 
 | 5903 |  | 
 | 5904 | - Issue #8065: Fix memory leak in readline module (from failure to free the | 
 | 5905 |   result of history_get_history_state()). | 
 | 5906 |  | 
 | 5907 | - Issue #9450: Fix memory leak in readline.replace_history_item and | 
 | 5908 |   readline.remove_history_item for readline version >= 5.0. | 
 | 5909 |  | 
 | 5910 | - Issue #8105: Validate file descriptor passed to mmap.mmap on Windows. | 
 | 5911 |  | 
 | 5912 | - Issue #8046: Add context manager protocol support and .closed property to mmap | 
 | 5913 |   objects. | 
 | 5914 |  | 
 | 5915 | Library | 
 | 5916 | ------- | 
 | 5917 |  | 
 | 5918 | - Issue #7451: Improve decoding performance of JSON objects, and reduce the | 
 | 5919 |   memory consumption of said decoded objects when they use the same strings as | 
 | 5920 |   keys. | 
 | 5921 |  | 
 | 5922 | - Issue #1100562: Fix deep-copying of objects derived from the list and dict | 
 | 5923 |   types.  Patch by Michele Orrù and Björn Lindqvist. | 
 | 5924 |  | 
 | 5925 | - Issue #9753: Fixed socket.dup, which did not always work correctly on Windows. | 
 | 5926 |  | 
 | 5927 | - Issue #9421: Made the get<type> methods consistently accept the vars and | 
 | 5928 |   default arguments on all parser classes. | 
 | 5929 |  | 
 | 5930 | - Issue #7005: Fixed output of None values for RawConfigParser.write and | 
 | 5931 |   ConfigParser.write. | 
 | 5932 |  | 
 | 5933 | - Issue #8990: array.fromstring() and array.tostring() get renamed to | 
 | 5934 |   frombytes() and tobytes(), respectively, to avoid confusion.  Furthermore, | 
 | 5935 |   array.frombytes(), array.extend() as well as the array.array() constructor now | 
 | 5936 |   accept bytearray objects.  Patch by Thomas Jollans. | 
 | 5937 |  | 
 | 5938 | - Issue #808164: Fixed socket.close to avoid references to globals, to avoid | 
 | 5939 |   issues when socket.close is called from a __del__ method. | 
 | 5940 |  | 
 | 5941 | - Issue #9706: ssl module provides a better error handling in various | 
 | 5942 |   circumstances. | 
 | 5943 |  | 
 | 5944 | - Issue #1868: Eliminate subtle timing issues in thread-local objects by getting | 
 | 5945 |   rid of the cached copy of thread-local attribute dictionary. | 
 | 5946 |  | 
 | 5947 | - Issue #1512791: In setframerate() in the wave module, non-integral frame rates | 
 | 5948 |   are rounded to the nearest integer. | 
 | 5949 |  | 
 | 5950 | - Issue #8797: urllib2 does a retry for Basic Authentication failure instead of | 
 | 5951 |   falling into recursion. | 
 | 5952 |  | 
 | 5953 | - Issue #1194222: email.utils.parsedate now returns RFC2822 compliant four | 
 | 5954 |   character years even if the message contains RFC822 two character years. | 
 | 5955 |  | 
 | 5956 | - Issue #8750: Fixed MutableSet's methods to correctly handle reflexive | 
 | 5957 |   operations on its self, namely x -= x and x ^= x. | 
 | 5958 |  | 
 | 5959 | - Issue #9129: smtpd.py is vulnerable to DoS attacks deriving from missing error | 
 | 5960 |   handling when accepting a new connection. | 
 | 5961 |  | 
 | 5962 | - Issue #9601: ftplib now provides a workaround for non-compliant | 
 | 5963 |   implementations such as IIS shipped with Windows server 2003 returning invalid | 
 | 5964 |   response codes for MKD and PWD commands. | 
 | 5965 |  | 
 | 5966 | - Issue #658749: asyncore's connect() method now correctly interprets winsock | 
 | 5967 |   errors. | 
 | 5968 |  | 
 | 5969 | - Issue #9501: Fixed logging regressions in cleanup code. | 
 | 5970 |  | 
 | 5971 | - Fix functools.total_ordering() to skip methods inherited from object. | 
 | 5972 |  | 
 | 5973 | - Issue #9572: Importlib should not raise an exception if a directory it thought | 
 | 5974 |   it needed to create was done concurrently by another process. | 
 | 5975 |  | 
 | 5976 | - Issue #9617: Signals received during a low-level write operation aren't | 
 | 5977 |   ignored by the buffered IO layer anymore. | 
 | 5978 |  | 
 | 5979 | - Issue #843590: Make "macintosh" an alias to the "mac_roman" encoding. | 
 | 5980 |  | 
 | 5981 | - Create os.fsdecode(): decode from the filesystem encoding with surrogateescape | 
 | 5982 |   error handler, or strict error handler on Windows. | 
 | 5983 |  | 
 | 5984 | - Issue #3488: Provide convenient shorthand functions ``gzip.compress`` and | 
 | 5985 |   ``gzip.decompress``.  Original patch by Anand B. Pillai. | 
 | 5986 |  | 
 | 5987 | - Issue #8807: poplib.POP3_SSL class now accepts a context parameter, which is a | 
 | 5988 |   ssl.SSLContext object allowing bundling SSL configuration options, | 
 | 5989 |   certificates and private keys into a single (potentially long-lived) | 
 | 5990 |   structure. | 
 | 5991 |  | 
 | 5992 | - Issue #8866: parameters passed to socket.getaddrinfo can now be specified as | 
 | 5993 |   single keyword arguments. | 
 | 5994 |  | 
 | 5995 | - Address XXX comment in dis.py by having inspect.py prefer to reuse the dis.py | 
 | 5996 |   compiler flag values over defining its own. | 
 | 5997 |  | 
 | 5998 | - Issue #9147: Added dis.code_info() which is similar to show_code() but returns | 
 | 5999 |   formatted code information in a string rather than displaying on screen. | 
 | 6000 |  | 
 | 6001 | - Issue #9567: functools.update_wrapper now adds a __wrapped__ attribute | 
 | 6002 |   pointing to the original callable. | 
 | 6003 |  | 
 | 6004 | - Issue #3445: functools.update_wrapper now tolerates missing attributes on | 
 | 6005 |   wrapped callables. | 
 | 6006 |  | 
 | 6007 | - Issue #5867: Add abc.abstractclassmethod and abc.abstractstaticmethod. | 
 | 6008 |  | 
 | 6009 | - Issue #9605: posix.getlogin() decodes the username with file filesystem | 
 | 6010 |   encoding and surrogateescape error handler. Patch written by David Watson. | 
 | 6011 |  | 
 | 6012 | - Issue #9604: posix.initgroups() encodes the username using the fileystem | 
 | 6013 |   encoding and surrogateescape error handler. Patch written by David Watson. | 
 | 6014 |  | 
 | 6015 | - Issue #9603: posix.ttyname() and posix.ctermid() decode the terminal name | 
 | 6016 |   using the filesystem encoding and surrogateescape error handler. Patch written | 
 | 6017 |   by David Watson. | 
 | 6018 |  | 
 | 6019 | - Issue #7647: The posix module now has the ST_RDONLY and ST_NOSUID constants, | 
 | 6020 |   for use with the statvfs() function.  Patch by Adam Jackson. | 
 | 6021 |  | 
 | 6022 | - Issue #8688: MANIFEST files created by distutils now include a magic comment | 
 | 6023 |   indicating they are generated.  Manually maintained MANIFESTs without this | 
 | 6024 |   marker will not be overwritten or removed. | 
 | 6025 |  | 
 | 6026 | - Issue #7467: when reading a file from a ZIP archive, its CRC is checked and a | 
 | 6027 |   BadZipfile error is raised if it doesn't match (as used to be the case in | 
 | 6028 |   Python 2.5 and earlier). | 
 | 6029 |  | 
 | 6030 | - Issue #9550: a BufferedReader could issue an additional read when the original | 
 | 6031 |   read request had been satisfied, which could block indefinitely when the | 
 | 6032 |   underlying raw IO channel was e.g. a socket.  Report and original patch by | 
 | 6033 |   Jason V. Miller. | 
 | 6034 |  | 
 | 6035 | - Issue #3757: thread-local objects now support cyclic garbage collection. | 
 | 6036 |   Thread-local objects involved in reference cycles will be deallocated timely | 
 | 6037 |   by the cyclic GC, even if the underlying thread is still running. | 
 | 6038 |  | 
 | 6039 | - Issue #9452: Add read_file, read_string, and read_dict to the configparser | 
 | 6040 |   API; new source attribute to exceptions. | 
 | 6041 |  | 
 | 6042 | - Issue #6231: Fix xml.etree.ElementInclude to include the tail of the current | 
 | 6043 |   node. | 
 | 6044 |  | 
 | 6045 | - Issue #8047: Fix the xml.etree serializer to return bytes by default.  Use | 
 | 6046 |   ``encoding="unicode"`` to generate a Unicode string. | 
 | 6047 |  | 
 | 6048 | - Issue #8280: urllib2's Request method will remove fragments in the url.  This | 
 | 6049 |   is how it is supposed to work, wget and curl do the same.  Previous behavior | 
 | 6050 |   was wrong. | 
 | 6051 |  | 
 | 6052 | - Issue #6683: For SMTP logins we now try all authentication methods advertised | 
 | 6053 |   by the server.  Many servers are buggy and advertise authentication methods | 
 | 6054 |   they do not support in reality. | 
 | 6055 |  | 
 | 6056 | - Issue #8814: function annotations (the ``__annotations__`` attribute) are now | 
 | 6057 |   included in the set of attributes copied by default by functools.wraps and | 
 | 6058 |   functools.update_wrapper.  Patch by Terrence Cole. | 
 | 6059 |  | 
 | 6060 | - Issue #2944: asyncore doesn't handle connection refused correctly. | 
 | 6061 |  | 
 | 6062 | - Issue #4184: Private attributes on smtpd.SMTPChannel made public and deprecate | 
 | 6063 |   the private attributes. Add tests for smtpd module. | 
 | 6064 |  | 
 | 6065 | - Issue #3196: email header decoding is now forgiving if an RFC2047 encoded word | 
 | 6066 |   encoded in base64 is lacking padding. | 
 | 6067 |  | 
 | 6068 | - Issue #9444: Argparse now uses the first element of prefix_chars as the option | 
 | 6069 |   character for the added 'h/help' option if prefix_chars does not contain a | 
 | 6070 |   '-', instead of raising an error. | 
 | 6071 |  | 
 | 6072 | - Issue #7372: Fix pstats regression when stripping paths from profile data | 
 | 6073 |   generated with the profile module. | 
 | 6074 |  | 
 | 6075 | - Issue #9428: Fix running scripts with the profile/cProfile modules from the | 
 | 6076 |   command line. | 
 | 6077 |  | 
 | 6078 | - Issue #7781: Fix restricting stats by entry counts in the pstats interactive | 
 | 6079 |   browser. | 
 | 6080 |  | 
 | 6081 | - Issue #9209: Do not crash in the pstats interactive browser on invalid regular | 
 | 6082 |   expressions. | 
 | 6083 |  | 
 | 6084 | - Update collections.OrderedDict to match the implementation in Py2.7 (based on | 
 | 6085 |   lists instead of weakly referenced Link objects). | 
 | 6086 |  | 
 | 6087 | - Issue #8397: Raise an error when attempting to mix iteration and regular reads | 
 | 6088 |   on a BZ2File object, rather than returning incorrect results. | 
 | 6089 |  | 
 | 6090 | - Issue #9448: Fix a leak of OS resources (mutexes or semaphores) when | 
 | 6091 |   re-initializing a buffered IO object by calling its ``__init__`` method. | 
 | 6092 |  | 
 | 6093 | - Issue #1713: Fix os.path.ismount(), which returned true for symbolic links | 
 | 6094 |   across devices. | 
 | 6095 |  | 
 | 6096 | - Issue #8826: Properly load old-style "expires" attribute in http.cookies. | 
 | 6097 |  | 
 | 6098 | - Issue #1690103: Fix initial namespace for code run with trace.main(). | 
 | 6099 |  | 
 | 6100 | - Issue #7395: Fix tracebacks in pstats interactive browser. | 
 | 6101 |  | 
 | 6102 | - Issue #8230: Fix Lib/test/sortperf.py. | 
 | 6103 |  | 
 | 6104 | - Issue #8620: when a cmd.Cmd() is fed input that reaches EOF without a final | 
 | 6105 |   newline, it no longer truncates the last character of the last command line. | 
 | 6106 |  | 
 | 6107 | - Issue #5146: Handle UID THREAD command correctly in imaplib. | 
 | 6108 |  | 
 | 6109 | - Issue #5147: Fix the header generated for cookie files written by | 
 | 6110 |   http.cookiejar.MozillaCookieJar. | 
 | 6111 |  | 
 | 6112 | - Issue #8198: In pydoc, output all help text to the correct stream when | 
 | 6113 |   sys.stdout is reassigned. | 
 | 6114 |  | 
 | 6115 | - Issue #7909: Do not touch paths with the special prefixes ``\\.\`` or ``\\?\`` | 
 | 6116 |   in ntpath.normpath(). | 
 | 6117 |  | 
 | 6118 | - Issue #1286: Allow using fileinput.FileInput as a context manager. | 
 | 6119 |  | 
 | 6120 | - Add lru_cache() decorator to the functools module. | 
 | 6121 |  | 
 | 6122 | Tools/Demos | 
 | 6123 | ----------- | 
 | 6124 |  | 
 | 6125 | - Fix ``Tools/scripts/checkpyc.py`` after PEP 3147. | 
 | 6126 |  | 
 | 6127 | - Issue #8867: Fix ``Tools/scripts/serve.py`` to work with files containing | 
 | 6128 |   non-ASCII content. | 
 | 6129 |  | 
 | 6130 | Tests | 
 | 6131 | ----- | 
 | 6132 |  | 
 | 6133 | - Issue #9601: Provide a test case for ftplib.parse257. | 
 | 6134 |  | 
 | 6135 | - Issue #8857: Provide a test case for socket.getaddrinfo. | 
 | 6136 |  | 
 | 6137 | - Issue #7564: Skip test_ioctl if another process is attached to /dev/tty. | 
 | 6138 |  | 
 | 6139 | - Issue #8433: Fix test_curses failure with newer versions of ncurses. | 
 | 6140 |  | 
 | 6141 | - Issue #9496: Provide a test suite for the rlcompleter module.  Patch by | 
 | 6142 |   Michele Orrù. | 
 | 6143 |  | 
 | 6144 | - Issue #8687: provide a test suite for sched.py module. | 
 | 6145 |  | 
 | 6146 | Build | 
 | 6147 | ----- | 
 | 6148 |  | 
 | 6149 | - Issue #1303434: Generate ZIP file containing all PDBs. | 
 | 6150 |  | 
 | 6151 | - Issue #9193: PEP 3149 is accepted. | 
 | 6152 |  | 
 | 6153 | - Issue #3101: Helper functions _add_one_to_index_C() and _add_one_to_index_F() | 
 | 6154 |   become _Py_add_one_to_index_C() and _Py_add_one_to_index_F(), respectively. | 
 | 6155 |  | 
 | 6156 | - Issue #9700: define HAVE_BROKEN_POSIX_SEMAPHORES under AIX 6.x.  Patch by | 
 | 6157 |   Sébastien Sablé. | 
 | 6158 |  | 
 | 6159 | - Don't run pgen twice when using make -j. | 
 | 6160 |  | 
 | 6161 |  | 
 | 6162 | What's New in Python 3.2 Alpha 1? | 
 | 6163 | ================================= | 
 | 6164 |  | 
 | 6165 | *Release date: 01-Aug-2010* | 
 | 6166 |  | 
 | 6167 | Core and Builtins | 
 | 6168 | ----------------- | 
 | 6169 |  | 
 | 6170 | - Issue #8991: convertbuffer() rejects discontigious buffers. | 
 | 6171 |  | 
 | 6172 | - Issue #7616: Fix copying of overlapping memoryview slices with the Intel | 
 | 6173 |   compiler. | 
 | 6174 |  | 
 | 6175 | - Issue #8413: structsequence now subclasses tuple. | 
 | 6176 |  | 
 | 6177 | - Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the | 
 | 6178 |   start byte and the continuation byte(s) are now considered invalid, instead of | 
 | 6179 |   the number of bytes specified by the start byte.  E.g.: | 
 | 6180 |   '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and replaces | 
 | 6181 |   with U+FFFD only the start byte ('\xf1') and the continuation byte ('\x80') | 
 | 6182 |   even if '\xf1' is the start byte of a 4-bytes sequence.  Previous versions | 
 | 6183 |   returned a single u'\ufffd'. | 
 | 6184 |  | 
 | 6185 | - Issue #9011: A negated imaginary literal (e.g., "-7j") now has real part -0.0 | 
 | 6186 |   rather than 0.0.  So "-7j" is now exactly equivalent to "-(7j)". | 
 | 6187 |  | 
 | 6188 | - Be more specific in error messages about positional arguments. | 
 | 6189 |  | 
 | 6190 | - Issue #8949: "z" format of PyArg_Parse*() functions doesn't accept bytes | 
 | 6191 |   objects, as described in the documentation. | 
 | 6192 |  | 
 | 6193 | - Issue #6543: Write the traceback in the terminal encoding instead of utf-8. | 
 | 6194 |   Fix the encoding of the modules filename.  Patch written by Amaury Forgeot | 
 | 6195 |   d'Arc. | 
 | 6196 |  | 
 | 6197 | - Issue #9011: Remove buggy and unnecessary (in 3.x) ST->AST compilation code | 
 | 6198 |   dealing with unary minus applied to a constant.  The removed code was mutating | 
 | 6199 |   the ST, causing a second compilation to fail. | 
 | 6200 |  | 
 | 6201 | - Issue #850997: mbcs encoding (Windows only) handles errors argument: strict | 
 | 6202 |   mode raises unicode errors.  The encoder only supports "strict" and "replace" | 
 | 6203 |   error handlers, the decoder only supports "strict" and "ignore" error | 
 | 6204 |   handlers.  Patch written by Mark Hammond. | 
 | 6205 |  | 
 | 6206 | - Issue #8850: Remove "w" and "w#" formats from PyArg_Parse*() functions, use | 
 | 6207 |   "w*" format instead. Add tests for "w*" format. | 
 | 6208 |  | 
 | 6209 | - Issue #8592: PyArg_Parse*() functions raise a TypeError for "y", "u" and "Z" | 
 | 6210 |   formats if the string contains a null byte/character.  Write unit tests for | 
 | 6211 |   string formats. | 
 | 6212 |  | 
 | 6213 | - Issue #7490: To facilitate sharing of doctests between 2.x and 3.x test | 
 | 6214 |   suites, the IGNORE_EXCEPTION_DETAIL directive now also ignores the module | 
 | 6215 |   location of the raised exception. | 
 | 6216 |  | 
 | 6217 | - Issue #8969: On Windows, use mbcs codec in strict mode to encode and decode | 
 | 6218 |   filenames and enable os.fsencode(). | 
 | 6219 |  | 
 | 6220 | - Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError. | 
 | 6221 |  | 
 | 6222 | - Issue #8941: Decoding big endian UTF-32 data in UCS-2 builds could crash the | 
 | 6223 |   interpreter with characters outside the Basic Multilingual Plane (higher than | 
 | 6224 |   0x10000). | 
 | 6225 |  | 
 | 6226 | - Issue #8950: (See also issue #5080).  Py_ArgParse*() functions now raise | 
 | 6227 |   TypeError instead of giving a DeprecationWarning when a float is parsed using | 
 | 6228 |   the 'L' code (for long long).  (All other integer codes already raise | 
 | 6229 |   TypeError in this case.) | 
 | 6230 |  | 
 | 6231 | - Issue #8922: Normalize the encoding name in PyUnicode_AsEncodedString() to | 
 | 6232 |   enable shortcuts for upper case encoding name. Add also a shortcut for | 
 | 6233 |   "iso-8859-1" in PyUnicode_AsEncodedString() and PyUnicode_Decode(). | 
 | 6234 |  | 
 | 6235 | - Issue #8838: Remove codecs.charbuffer_encode() function.  The buffer protocol | 
 | 6236 |   doesn't support "char buffer" anymore in Python 3. | 
 | 6237 |  | 
 | 6238 | - Issue #8339: Remove "t#" format of PyArg_Parse*() functions, use "s#" or "s*" | 
 | 6239 |   instead.  codecs.charbuffer_encode() now accepts modifiable buffer objects | 
 | 6240 |   like bytearray. | 
 | 6241 |  | 
 | 6242 | - Issue #8837: Remove "O?" format of PyArg_Parse*() functions.  The format is no | 
 | 6243 |   used anymore and it was never documented. | 
 | 6244 |  | 
 | 6245 | - In str.format(), raise a ValueError when indexes to arguments are too large. | 
 | 6246 |  | 
 | 6247 | - Issue #2844: Make int('42', n) consistently raise ValueError for invalid | 
 | 6248 |   integers n (including n = -909). | 
 | 6249 |  | 
 | 6250 | - Issue #8188: Introduce a new scheme for computing hashes of numbers (instances | 
 | 6251 |   of int, float, complex, decimal.Decimal and fractions.Fraction) that makes it | 
 | 6252 |   easy to maintain the invariant that hash(x) == hash(y) whenever x and y have | 
 | 6253 |   equal value. | 
 | 6254 |  | 
 | 6255 | - Issue #8748: Fix two issues with comparisons between complex and integer | 
 | 6256 |   objects.  (1) The comparison could incorrectly return True in some cases | 
 | 6257 |   (2**53+1 == complex(2**53) == 2**53), breaking transitivity of equality. | 
 | 6258 |   (2) The comparison raised an OverflowError for large integers, leading to | 
 | 6259 |   unpredictable exceptions when combining integers and complex objects in sets | 
 | 6260 |   or dicts. | 
 | 6261 |  | 
 | 6262 | - Issue #8766: Initialize _warnings module before importing the first module. | 
 | 6263 |   Fix a crash if an empty directory called "encodings" exists in sys.path. | 
 | 6264 |  | 
 | 6265 | - Issue #8589: Decode PYTHONWARNINGS environment variable with the file system | 
 | 6266 |   encoding and surrogateescape error handler instead of the locale encoding to | 
 | 6267 |   be consistent with os.environ.  Add PySys_AddWarnOptionUnicode() function. | 
 | 6268 |  | 
 | 6269 | - PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead | 
 | 6270 |   of strict) error handler to escape surrogates. | 
 | 6271 |  | 
 | 6272 | - Issue #8715: Create PyUnicode_EncodeFSDefault() function: Encode a Unicode | 
 | 6273 |   object to Py_FileSystemDefaultEncoding with the "surrogateescape" error | 
 | 6274 |   handler, and return bytes.  If Py_FileSystemDefaultEncoding is not set, fall | 
 | 6275 |   back to UTF-8. | 
 | 6276 |  | 
 | 6277 | - Enable shortcuts for common encodings in PyUnicode_AsEncodedString() for any | 
 | 6278 |   error handler, not only the default error handler (strict). | 
 | 6279 |  | 
 | 6280 | - Issue #8610: Load file system codec at startup, and display a fatal error on | 
 | 6281 |   failure.  Set the file system encoding to utf-8 (instead of None) if getting | 
 | 6282 |   the locale encoding failed, or if nl_langinfo(CODESET) function is missing. | 
 | 6283 |  | 
 | 6284 | - PyFile_FromFd() uses PyUnicode_DecodeFSDefault() instead of | 
 | 6285 |   PyUnicode_FromString() to support surrogates in the filename and use the right | 
 | 6286 |   encoding. | 
 | 6287 |  | 
 | 6288 | - Issue #7507: Quote "!" in pipes.quote(); it is special to some shells. | 
 | 6289 |  | 
 | 6290 | - PyUnicode_DecodeFSDefaultAndSize() uses surrogateescape error handler. | 
 | 6291 |  | 
 | 6292 | - Issue #8419: Prevent the dict constructor from accepting non-string keyword | 
 | 6293 |   arguments. | 
 | 6294 |  | 
 | 6295 | - Issue #8124: PySys_WriteStdout() and PySys_WriteStderr() don't execute | 
 | 6296 |   indirectly Python signal handlers anymore because mywrite() ignores exceptions | 
 | 6297 |   (KeyboardInterrupt). | 
 | 6298 |  | 
 | 6299 | - Issue #8092: Fix PyUnicode_EncodeUTF8() to support error handler producing | 
 | 6300 |   unicode string (eg. backslashreplace). | 
 | 6301 |  | 
 | 6302 | - Issue #8485: PyUnicode_FSConverter() doesn't accept byteearray objects | 
 | 6303 |   anymore, you have to convert your bytearray filenames to bytes. | 
 | 6304 |  | 
 | 6305 | - Issue #7332: Remove the 16KB stack-based buffer in | 
 | 6306 |   PyMarshal_ReadLastObjectFromFile, which doesn't bring any noticeable benefit | 
 | 6307 |   compared to the dynamic memory allocation fallback.  Patch by Charles-François | 
 | 6308 |   Natali. | 
 | 6309 |  | 
 | 6310 | - Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize is | 
 | 6311 |   passed to bytes or bytearray. | 
 | 6312 |  | 
 | 6313 | - Issue #7301: Add environment variable $PYTHONWARNINGS. | 
 | 6314 |  | 
 | 6315 | - Issue #8329: Don't return the same lists from select.select when no fds are | 
 | 6316 |   changed. | 
 | 6317 |  | 
 | 6318 | - Issue #8259: 1L << (2**31) no longer produces an 'outrageous shift error' on | 
 | 6319 |   64-bit machines.  The shift count for either left or right shift is permitted | 
 | 6320 |   to be up to sys.maxsize. | 
 | 6321 |  | 
 | 6322 | - Ensure that tokenization of identifiers is not affected by locale. | 
 | 6323 |  | 
 | 6324 | - Issue #1222585: Added LDCXXSHARED for C++ support. Patch by Arfrever. | 
 | 6325 |  | 
 | 6326 | - Raise a TypeError when trying to delete a T_STRING_INPLACE struct member. | 
 | 6327 |  | 
 | 6328 | - Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, in case it | 
 | 6329 |   is set. | 
 | 6330 |  | 
 | 6331 | - Issue #8226: sys.setfilesystemencoding() raises a LookupError if the encoding | 
 | 6332 |   is unknown. | 
 | 6333 |  | 
 | 6334 | - Issue #1583863: A str subclass can now override the __str__ method. | 
 | 6335 |  | 
 | 6336 | - Issue #8014: Setting a T_UINT or T_PYSSIZET attribute of an object with | 
 | 6337 |   PyMemberDefs could produce an internal error; raise TypeError instead. | 
 | 6338 |  | 
 | 6339 | - Issue #7845: Rich comparison methods on the complex type now return | 
 | 6340 |   NotImplemented rather than raising a TypeError when comparing with an | 
 | 6341 |   incompatible type; this allows user-defined classes to implement their own | 
 | 6342 |   comparisons with complex. | 
 | 6343 |  | 
 | 6344 | - Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt | 
 | 6345 |   (SIGINT). If an error occurs while importing the site module, the error is | 
 | 6346 |   printed and Python exits. Initialize the GIL before importing the site module. | 
 | 6347 |  | 
 | 6348 | - Issue #7173: Generator finalization could invalidate sys.exc_info(). | 
 | 6349 |  | 
 | 6350 | - Issue #7544: Preallocate thread memory before creating the thread to avoid a | 
 | 6351 |   fatal error in low memory condition. | 
 | 6352 |  | 
 | 6353 | - Issue #7820: The parser tokenizer restores all bytes in the right if the BOM | 
 | 6354 |   check fails. | 
 | 6355 |  | 
 | 6356 | - Handle errors from looking up __prepare__ correctly. | 
 | 6357 |  | 
 | 6358 | - Issue #5939: Add additional runtime checking to ensure a valid capsule in | 
 | 6359 |   Modules/_ctypes/callproc.c. | 
 | 6360 |  | 
 | 6361 | - Issue #7309: Fix unchecked attribute access when converting | 
 | 6362 |   UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings. | 
 | 6363 |  | 
 | 6364 | - Issue #6902: Fix problem with built-in types format incorrectly with 0 | 
 | 6365 |   padding. | 
 | 6366 |  | 
 | 6367 | - Issue #7988: Fix default alignment to be right aligned for complex.__format__. | 
 | 6368 |   Now it matches other numeric types. | 
 | 6369 |  | 
 | 6370 | - Issue #5988: Remove deprecated functions PyOS_ascii_formatd, | 
 | 6371 |   PyOS_ascii_strtod, and PyOS_ascii_atof.  Use PyOS_double_to_string and | 
 | 6372 |   PyOS_string_to_double instead.  See issue #5835 for the original deprecations. | 
 | 6373 |  | 
 | 6374 | - Issue #7385: Fix a crash in `MemoryView_FromObject` when `PyObject_GetBuffer` | 
 | 6375 |   fails.  Patch by Florent Xicluna. | 
 | 6376 |  | 
 | 6377 | - Issue #7788: Fix an interpreter crash produced by deleting a list slice with | 
 | 6378 |   very large step value. | 
 | 6379 |  | 
 | 6380 | - Issue #7766: Change sys.getwindowsversion() return value to a named tuple and | 
 | 6381 |   add the additional members returned in an OSVERSIONINFOEX structure.  The new | 
 | 6382 |   members are service_pack_major, service_pack_minor, suite_mask, and | 
 | 6383 |   product_type. | 
 | 6384 |  | 
 | 6385 | - Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`) could | 
 | 6386 |   crash in many places because of the PyByteArray_AS_STRING() macro returning | 
 | 6387 |   NULL.  The macro now returns a statically allocated empty string instead. | 
 | 6388 |  | 
 | 6389 | - Issue #6690: Optimize the bytecode for expressions such as `x in {1, 2, 3}`, | 
 | 6390 |   where the right hand operand is a set of constants, by turning the set into a | 
 | 6391 |   frozenset and pre-building it as a constant.  The comparison operation is made | 
 | 6392 |   against the constant instead of building a new set each time it is executed (a | 
 | 6393 |   similar optimization already existed which turned a list of constants into a | 
 | 6394 |   pre-built tuple).  Patch and additional tests by Dave Malcolm. | 
 | 6395 |  | 
 | 6396 | - Issue #7622: Improve the split(), rsplit(), splitlines() and replace() methods | 
 | 6397 |   of bytes, bytearray and unicode objects by using a common implementation based | 
 | 6398 |   on stringlib's fast search.  Patch by Florent Xicluna. | 
 | 6399 |  | 
 | 6400 | - Issue #7632: Fix various str -> float conversion bugs present in 2.7 alpha 2, | 
 | 6401 |   including: (1) a serious 'wrong output' bug that could occur for long (> 40 | 
 | 6402 |   digit) input strings, (2) a crash in dtoa.c that occurred in debug builds when | 
 | 6403 |   parsing certain long numeric strings corresponding to subnormal values, (3) a | 
 | 6404 |   memory leak for some values large enough to cause overflow, and (4) a number | 
 | 6405 |   of flaws that could lead to incorrectly rounded results. | 
 | 6406 |  | 
 | 6407 | - The __complex__ method is now looked up on the class of instances to make it | 
 | 6408 |   consistent with other special methods. | 
 | 6409 |  | 
 | 6410 | - Issue #7462: Implement the stringlib fast search algorithm for the `rfind`, | 
 | 6411 |   `rindex`, `rsplit` and `rpartition` methods.  Patch by Florent Xicluna. | 
 | 6412 |  | 
 | 6413 | - Issue #7604: Deleting an unset slotted attribute did not raise an | 
 | 6414 |   AttributeError. | 
 | 6415 |  | 
 | 6416 | - Issue #7534: Fix handling of IEEE specials (infinities, nans, negative zero) | 
 | 6417 |   in ** operator.  The behaviour now conforms to that described in C99 Annex F. | 
 | 6418 |  | 
 | 6419 | - Issue #1811: improve accuracy and cross-platform consistency for true division | 
 | 6420 |   of integers: the result of a/b is now correctly rounded for ints a and b (at | 
 | 6421 |   least on IEEE 754 platforms), and in particular does not depend on the | 
 | 6422 |   internal representation of an int. | 
 | 6423 |  | 
 | 6424 | - Issue #6834: replace the implementation for the 'python' and 'pythonw' | 
 | 6425 |   executables on OSX. | 
 | 6426 |  | 
 | 6427 |   These executables now work properly with the arch(1) command: ``arch -ppc | 
 | 6428 |   python`` will start a universal binary version of python in PPC mode (unlike | 
 | 6429 |   previous releases). | 
 | 6430 |  | 
 | 6431 | - Issue #7466: Segmentation fault when the garbage collector is called in the | 
 | 6432 |   middle of populating a tuple.  Patch by Florent Xicluna. | 
 | 6433 |  | 
 | 6434 | - Issue #7419: setlocale() could crash the interpreter on Windows when called | 
 | 6435 |   with invalid values. | 
 | 6436 |  | 
 | 6437 | - Issue #6077: On Windows, files opened with tempfile.TemporaryFile in "wt+" | 
 | 6438 |   mode would appear truncated on the first '0x1a' byte (aka. Ctrl+Z). | 
 | 6439 |  | 
 | 6440 | - Issue #7085: Fix crash when importing some extensions in a thread on MacOSX | 
 | 6441 |   10.6. | 
 | 6442 |  | 
 | 6443 | - Issue #1757126: Fix the cyrillic-asian alias for the ptcp154 encoding. | 
 | 6444 |  | 
 | 6445 | - Issue #6970: Remove redundant calls when comparing objects that don't | 
 | 6446 |   implement the relevant rich comparison methods. | 
 | 6447 |  | 
 | 6448 | - Issue #7298: Fixes for range and reversed(range(...)).  Iteration over | 
 | 6449 |   range(a, b, c) incorrectly gave an empty iterator when a, b and c fit in C | 
 | 6450 |   long but the length of the range did not.  Also fix several cases where | 
 | 6451 |   reversed(range(a, b, c)) gave wrong results, and fix a refleak for | 
 | 6452 |   reversed(range(a, b, c)) with large arguments. | 
 | 6453 |  | 
 | 6454 | - Issue #7244: itertools.izip_longest() no longer ignores exceptions raised | 
 | 6455 |   during the formation of an output tuple. | 
 | 6456 |  | 
 | 6457 | - Issue #3297: On wide unicode builds, do not split unicode characters into | 
 | 6458 |   surrogates. | 
 | 6459 |  | 
 | 6460 | - Remove length limitation when constructing a complex number from a string. | 
 | 6461 |  | 
 | 6462 | - Issue #1087418: Boost performance of bitwise operations for longs. | 
 | 6463 |  | 
 | 6464 | - Support for AtheOS has been completely removed from the code base. It was | 
 | 6465 |   disabled since Python 3.0. | 
 | 6466 |  | 
 | 6467 | - Support for several legacy threading libraries has been disabled. These | 
 | 6468 |   libraries are: Mach C threads, SunOS LWP, GNU pth, Irix threads. Support code | 
 | 6469 |   will be entirely removed in 3.3. | 
 | 6470 |  | 
 | 6471 | - Support for OSF* has been disabled. If nobody stands up, support will be | 
 | 6472 |   removed in 3.3. See <http://bugs.python.org/issue8606>. | 
 | 6473 |  | 
 | 6474 | - Peephole constant folding had missed UNARY_POSITIVE. | 
 | 6475 |  | 
 | 6476 | - Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which | 
 | 6477 |   fixes the problem of some exceptions being thrown at shutdown when the | 
 | 6478 |   interpreter is killed. Patch by Adam Olsen. | 
 | 6479 |  | 
 | 6480 | - Issue #7147: Remove support for compiling Python without complex number | 
 | 6481 |   support. | 
 | 6482 |  | 
 | 6483 | - Issue #7120: logging: Removed import of multiprocessing which is causing crash | 
 | 6484 |   in GAE. | 
 | 6485 |  | 
 | 6486 | - Issue #1754094: Improve the stack depth calculation in the compiler.  There | 
 | 6487 |   should be no other effect than a small decrease in memory use.  Patch by | 
 | 6488 |   Christopher Tur Lesniewski-Laas. | 
 | 6489 |  | 
 | 6490 | - Issue #7065: Fix a crash in bytes.maketrans and bytearray.maketrans when using | 
 | 6491 |   byte values greater than 127.  Patch by Derk Drukker. | 
 | 6492 |  | 
 | 6493 | - Issue #1571184: The Unicode database contains properties for more characters. | 
 | 6494 |   The tables for code points representing numeric values, white spaces or line | 
 | 6495 |   breaks are now generated from the official Unicode Character Database files, | 
 | 6496 |   and include information from the Unihan.txt file. | 
 | 6497 |  | 
 | 6498 | - Issue #7019: Raise ValueError when unmarshalling bad long data, instead of | 
 | 6499 |   producing internally inconsistent Python longs. | 
 | 6500 |  | 
 | 6501 | - Issue #6990: Fix threading.local subclasses leaving old state around after a | 
 | 6502 |   reference cycle GC which could be recycled by new locals. | 
 | 6503 |  | 
 | 6504 | - Issue #5460: Fix an ambiguity in the grammar. | 
 | 6505 |  | 
 | 6506 | - Issue #1766304: Improve performance of membership tests on range objects. | 
 | 6507 |  | 
 | 6508 | - Issue #6713: Improve performance of integer -> string conversions. | 
 | 6509 |  | 
 | 6510 | - Issue #6846: Fix bug where bytearray.pop() returns negative integers. | 
 | 6511 |  | 
 | 6512 | - Issue #6750: A text file opened with io.open() could duplicate its output when | 
 | 6513 |   writing from multiple threads at the same time. | 
 | 6514 |  | 
 | 6515 | - Issue #6707: dir() on an uninitialized module caused a crash. | 
 | 6516 |  | 
 | 6517 | - Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. | 
 | 6518 |  | 
 | 6519 | - Issue #6573: set.union() stopped processing inputs if an instance of self | 
 | 6520 |   occurred in the argument chain. | 
 | 6521 |  | 
 | 6522 | - Issue #6070: On posix platforms import no longer copies the execute bit from | 
 | 6523 |   the .py file to the .pyc file if it is set. | 
 | 6524 |  | 
 | 6525 | - Issue #1616979: Added the cp720 (Arabic DOS) encoding. | 
 | 6526 |  | 
 | 6527 | - Issue #6428: Since Python 3.0, the __bool__ method must return a bool object, | 
 | 6528 |   and not an int.  Fix the corresponding error message, and the documentation. | 
 | 6529 |  | 
 | 6530 | - The deprecated PyCObject has been removed. | 
 | 6531 |  | 
 | 6532 | - Issue #6347: Include inttypes.h as well as stdint.h in pyport.h.  This fixes a | 
 | 6533 |   build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead | 
 | 6534 |   of stdint.h on that platform. | 
 | 6535 |  | 
 | 6536 | - Issue #6373: Fixed a SystemError when encoding with the latin-1 codec and the | 
 | 6537 |   'surrogateescape' error handler, a string which contains unpaired surrogates. | 
 | 6538 |  | 
 | 6539 | - Issue #4856: Remove checks for win NT. | 
 | 6540 |  | 
 | 6541 | - Issue #6687: PyBytes_FromObject() no longer accepts an integer as its argument | 
 | 6542 |   to construct a null-initialized bytes object. | 
 | 6543 |  | 
 | 6544 | - Issue #1023290: Add from_bytes() and to_bytes() methods to integers.  These | 
 | 6545 |   methods allow the conversion of integers to bytes, and vice-versa. | 
 | 6546 |  | 
 | 6547 | - Issue #7382: Fix bug in bytes.__getnewargs__ that prevented bytes instances | 
 | 6548 |   from being copied with copy.copy(), and bytes subclasses from being pickled | 
 | 6549 |   properly. | 
 | 6550 |  | 
 | 6551 | - Code objects now support weak references. | 
 | 6552 |  | 
 | 6553 | - Issue #7072: isspace(0xa0) is true on Mac OS X. | 
 | 6554 |  | 
 | 6555 | - Issue #8084: PEP 370 now conforms to system conventions for framework builds | 
 | 6556 |   on MacOS X. That is, "python setup.py install --user" will install into | 
 | 6557 |   "~/Library/Python/2.7" instead of "~/.local". | 
 | 6558 |  | 
 | 6559 | C-API | 
 | 6560 | ----- | 
 | 6561 |  | 
 | 6562 | - Issue #2443: A new macro, `Py_VA_COPY`, copies the state of the | 
 | 6563 |   variable argument list.  `Py_VA_COPY` is equivalent to C99 | 
 | 6564 |   `va_copy`, but available on all python platforms. | 
 | 6565 |  | 
 | 6566 | - PySlice_GetIndicesEx now clips the step to [-PY_SSIZE_T_MAX, PY_SSIZE_T_MAX] | 
 | 6567 |   instead of [-PY_SSIZE_T_MAX-1, PY_SSIZE_T_MAX].  This makes it safe to do | 
 | 6568 |   "step = -step" when reversing a slice. | 
 | 6569 |  | 
 | 6570 | - Issue #5753: A new C API function, `PySys_SetArgvEx`, allows embedders of the | 
 | 6571 |   interpreter to set sys.argv without also modifying sys.path.  This helps fix | 
 | 6572 |   `CVE-2008-5983 | 
 | 6573 |   <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_. | 
 | 6574 |  | 
 | 6575 | - Add PyArg_ValidateKeywordArguments, which checks if all keyword arguments are | 
 | 6576 |   strings in an efficient manner. | 
 | 6577 |  | 
 | 6578 | - Issue #8276: PyEval_CallObject() is now only available in macro form.  The | 
 | 6579 |   function declaration, which was kept for backwards compatibility reasons, is | 
 | 6580 |   now removed (the macro was introduced in 1997!). | 
 | 6581 |  | 
 | 6582 | - Issue #7767: New function PyLong_AsLongLongAndOverflow added, analogous to | 
 | 6583 |   PyLong_AsLongAndOverflow. | 
 | 6584 |  | 
 | 6585 | - Make PyUnicode_CompareWithASCIIString return not equal if the Python string | 
 | 6586 |   has '\0' at the end. | 
 | 6587 |  | 
 | 6588 | - Issue #5080: The argument parsing functions PyArg_ParseTuple, | 
 | 6589 |   PyArg_ParseTupleAndKeywords, PyArg_VaParse, PyArg_VaParseTupleAndKeywords and | 
 | 6590 |   PyArg_Parse now raise a DeprecationWarning for float arguments passed with the | 
 | 6591 |   'L' format code.  This will become a TypeError in a future version of Python, | 
 | 6592 |   to match the behaviour of the other integer format codes. | 
 | 6593 |  | 
 | 6594 | - Issue #7033: Function ``PyErr_NewExceptionWithDoc()`` added. | 
 | 6595 |  | 
 | 6596 | - Issue #7414: 'C' code wasn't being skipped properly (for keyword arguments) in | 
 | 6597 |   PyArg_ParseTupleAndKeywords. | 
 | 6598 |  | 
 | 6599 | - Issue #7228: Add '%lld' and '%llu' support to PyString_FromFormat(V) and | 
 | 6600 |   PyErr_Format, on machines with HAVE_LONG_LONG defined. | 
 | 6601 |  | 
 | 6602 | - Issue #6151: Made PyDescr_COMMON conform to standard C (like PyObject_HEAD in | 
 | 6603 |   PEP 3123).  The PyDescr_TYPE and PyDescr_NAME macros should be should used for | 
 | 6604 |   accessing the d_type and d_name members of structures using PyDescr_COMMON. | 
 | 6605 |  | 
 | 6606 | - Issue #6405: Remove duplicate type declarations in descrobject.h. | 
 | 6607 |  | 
 | 6608 | - The code flags for old __future__ features are now available again. | 
 | 6609 |  | 
 | 6610 | - Issue #5954: Add a PyFrame_GetLineNumber() function to replace most uses of | 
 | 6611 |   PyCode_Addr2Line(). | 
 | 6612 |  | 
 | 6613 | - Issue #5959: Add a PyCode_NewEmpty() function to create a new empty code | 
 | 6614 |   object at a specified file, function, and line number. | 
 | 6615 |  | 
 | 6616 | - Issue #1419652: Change the first argument to PyImport_AppendInittab() to | 
 | 6617 |   ``const char *`` as the string is stored beyond the call. | 
 | 6618 |  | 
 | 6619 | - Issue #2422: When compiled with the ``--with-valgrind`` option, the pymalloc | 
 | 6620 |   allocator will be automatically disabled when running under Valgrind.  This | 
 | 6621 |   gives improved memory leak detection when running under Valgrind, while taking | 
 | 6622 |   advantage of pymalloc at other times. | 
 | 6623 |  | 
 | 6624 | Library | 
 | 6625 | ------- | 
 | 6626 |  | 
 | 6627 | - In pdb, when Ctrl-C is entered while defining commands for a breakpoint, the | 
 | 6628 |   old commands are restored. | 
 | 6629 |  | 
 | 6630 | - For traceback debugging, the pdb listing now also shows the locations where | 
 | 6631 |   the exception was originally (re)raised, if it differs from the last line | 
 | 6632 |   executed (e.g. in case of finally clauses). | 
 | 6633 |  | 
 | 6634 | - The pdb command "source" has been added.  It displays the source code for a | 
 | 6635 |   given object, if possible. | 
 | 6636 |  | 
 | 6637 | - The pdb command "longlist" has been added.  It displays the whole source code | 
 | 6638 |   for the current function. | 
 | 6639 |  | 
 | 6640 | - Issue #1503502: Make pdb.Pdb easier to subclass by putting message and error | 
 | 6641 |   output into methods. | 
 | 6642 |  | 
 | 6643 | - Issue #809887: Make the output of pdb's breakpoint deletions more consistent; | 
 | 6644 |   emit a message when a breakpoint is enabled or disabled. | 
 | 6645 |  | 
 | 6646 | - Issue #5294: Fix the behavior of pdb's "continue" command when called in the | 
 | 6647 |   top-level debugged frame. | 
 | 6648 |  | 
 | 6649 | - Issue #5727: Restore the ability to use readline when calling into pdb in | 
 | 6650 |   doctests. | 
 | 6651 |  | 
 | 6652 | - Issue #6719: In pdb, do not stop somewhere in the encodings machinery if the | 
 | 6653 |   source file to be debugged is in a non-builtin encoding. | 
 | 6654 |  | 
 | 6655 | - Issue #8048: Prevent doctests from failing when sys.displayhook has been | 
 | 6656 |   reassigned. | 
 | 6657 |  | 
 | 6658 | - Issue #8015: In pdb, do not crash when an empty line is entered as a | 
 | 6659 |   breakpoint command. | 
 | 6660 |  | 
 | 6661 | - In pdb, allow giving a line number to the "until" command. | 
 | 6662 |  | 
 | 6663 | - Issue #1437051: For pdb, allow "continue" and related commands in .pdbrc | 
 | 6664 |   files.  Also, add a command-line option "-c" that runs a command as if given | 
 | 6665 |   in .pdbrc. | 
 | 6666 |  | 
 | 6667 | - Issue #4179: In pdb, allow "list ." as a command to return to the currently | 
 | 6668 |   debugged line. | 
 | 6669 |  | 
 | 6670 | - Issue #4108: In urllib.robotparser, if there are multiple ``User-agent: *`` | 
 | 6671 |   entries, consider the first one. | 
 | 6672 |  | 
 | 6673 | - Issue #6630: Allow customizing regex flags when subclassing the | 
 | 6674 |   string.Template class. | 
 | 6675 |  | 
 | 6676 | - Issue #9411: Allow specifying an encoding for config files in the configparser | 
 | 6677 |   module. | 
 | 6678 |  | 
 | 6679 | - Issue #1682942: Improvements to configparser: support alternate delimiters, | 
 | 6680 |   alternate comment prefixes and empty lines in values. | 
 | 6681 |  | 
 | 6682 | - Issue #9354: Provide getsockopt() in asyncore's file_wrapper. | 
 | 6683 |  | 
 | 6684 | - Issue #8966: ctypes: Remove implicit bytes-unicode conversion. | 
 | 6685 |  | 
 | 6686 | - Issue #9378: python -m pickle <pickle file> will now load and display the | 
 | 6687 |   first object in the pickle file. | 
 | 6688 |  | 
 | 6689 | - Issue #4770: Restrict binascii module to accept only bytes (as specified). | 
 | 6690 |   And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` | 
 | 6691 |   before ASCII-to-binary decoding. | 
 | 6692 |  | 
 | 6693 | - Issue #9384: ``python -m tkinter`` will now display a simple demo applet. | 
 | 6694 |  | 
 | 6695 | - The default size of the re module's compiled regular expression cache has been | 
 | 6696 |   increased from 100 to 500 and the cache replacement policy has changed from | 
 | 6697 |   simply clearing the entire cache on overflow to forgetting the least recently | 
 | 6698 |   used cached compiled regular expressions.  This is a performance win for | 
 | 6699 |   applications that use a lot of regular expressions and limits the impact of | 
 | 6700 |   the performance hit anytime the cache is exceeded. | 
 | 6701 |  | 
 | 6702 | - Issue #7113: Speed up loading in configparser. Patch by Łukasz Langa. | 
 | 6703 |  | 
 | 6704 | - Issue #9032: XML-RPC client retries the request on EPIPE error.  The EPIPE | 
 | 6705 |   error occurs when the server closes the socket and the client sends a big | 
 | 6706 |   XML-RPC request. | 
 | 6707 |  | 
 | 6708 | - Issue #4629: getopt raises an error if an argument ends with "=", whereas | 
 | 6709 |   getopt doesn't accept a value (eg. --help= is rejected if getopt uses | 
 | 6710 |   ['help='] long options). | 
 | 6711 |  | 
 | 6712 | - Issue #7989: Added pure python implementation of the `datetime` module.  The C | 
 | 6713 |   module is renamed to `_datetime` and if available, overrides all classes | 
 | 6714 |   defined in datetime with fast C impementation.  Python implementation is based | 
 | 6715 |   on the original python prototype for the datetime module by Tim Peters with | 
 | 6716 |   minor modifications by the PyPy project.  The test suite now tests `datetime` | 
 | 6717 |   module with and without `_datetime` acceleration using the same test cases. | 
 | 6718 |  | 
 | 6719 | - Issue #7895: platform.mac_ver() no longer crashes after calling os.fork(). | 
 | 6720 |  | 
 | 6721 | - Issue #9323: Fixed a bug in trace.py that resulted in loosing the name of the | 
 | 6722 |   script being traced.  Patch by Eli Bendersky. | 
 | 6723 |  | 
 | 6724 | - Issue #9282: Fixed --listfuncs option of trace.py.  Thanks Eli Bendersky for | 
 | 6725 |   the patch. | 
 | 6726 |  | 
 | 6727 | - Issue #3704: http.cookiejar was not properly handling URLs with a / in the | 
 | 6728 |   parameters. | 
 | 6729 |  | 
 | 6730 | - Issue #9268: ``pickletools.dis()`` now has an optional *annotate* argument | 
 | 6731 |   which controls printing of opcode descriptions in ``dis()`` output. | 
 | 6732 |  | 
 | 6733 | - Issue #1555570: email no longer inserts extra blank lines when a \r\n combo | 
 | 6734 |   crosses an 8192 byte boundary. | 
 | 6735 |  | 
 | 6736 | - Issue #9243: Fix sndhdr module and add unit tests, contributed by James Lee. | 
 | 6737 |  | 
 | 6738 | - ``ast.literal_eval()`` now allows byte literals. | 
 | 6739 |  | 
 | 6740 | - Issue #9137: Fix issue in MutableMapping.update, which incorrectly treated | 
 | 6741 |   keyword arguments called 'self' or 'other' specially. | 
 | 6742 |  | 
 | 6743 | - ``ast.literal_eval()`` now allows set literals. | 
 | 6744 |  | 
 | 6745 | - Issue #9164: Ensure that sysconfig handles duplicate -arch flags in CFLAGS. | 
 | 6746 |  | 
 | 6747 | - Issue #7646: The fnmatch pattern cache no longer grows without bound. | 
 | 6748 |  | 
 | 6749 | - Issue #9136: Fix 'dictionary changed size during iteration' RuntimeError | 
 | 6750 |   produced when profiling the decimal module.  This was due to a dangerous | 
 | 6751 |   iteration over 'locals()' in Context.__init__. | 
 | 6752 |  | 
 | 6753 | - Fix extreme speed issue in Decimal.pow when the base is an exact power of 10 | 
 | 6754 |   and the exponent is tiny (for example, ``Decimal(10) ** | 
 | 6755 |   Decimal('1e-999999999')``). | 
 | 6756 |  | 
 | 6757 | - Issue #9186: Fix math.log1p(-1.0) to raise ValueError, not OverflowError. | 
 | 6758 |  | 
 | 6759 | - Issue #9130: Fix validation of relative imports in parser module. | 
 | 6760 |  | 
 | 6761 | - Issue #9128: Fix validation of class decorators in parser module. | 
 | 6762 |  | 
 | 6763 | - Issue #9094: python -m pickletools will now disassemble pickle files listed in | 
 | 6764 |   the command line arguments.  See output of python -m pickletools -h for more | 
 | 6765 |   details. | 
 | 6766 |  | 
 | 6767 | - Issue #5468: urlencode to handle bytes type and other encodings in its query | 
 | 6768 |   parameter. Patch by Dan Mahn. | 
 | 6769 |  | 
 | 6770 | - Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module, | 
 | 6771 |   ensure that the input string length is a multiple of the frame size. | 
 | 6772 |  | 
 | 6773 | - Issue #6507: Accept source strings in dis.dis().  Original patch by Daniel | 
 | 6774 |   Urban. | 
 | 6775 |  | 
 | 6776 | - Issue #7829: Clearly document that the dis module is exposing an | 
 | 6777 |   implementation detail that is not stable between Python VMs or releases. | 
 | 6778 |  | 
 | 6779 | - Issue #6589: cleanup asyncore.socket_map in case smtpd.SMTPServer constructor | 
 | 6780 |   raises an exception. | 
 | 6781 |  | 
 | 6782 | - Issue #9110: Addition of ContextDecorator to contextlib, for creating APIs | 
 | 6783 |   that act as both context managers and decorators. contextmanager changes to | 
 | 6784 |   use ContextDecorator. | 
 | 6785 |  | 
 | 6786 | - Implement importlib.abc.SourceLoader and deprecate PyLoader and PyPycLoader | 
 | 6787 |   for removal in Python 3.4. | 
 | 6788 |  | 
 | 6789 | - Issue #9064: pdb's "up" and "down" commands now accept an optional argument | 
 | 6790 |   giving the number of frames to go. | 
 | 6791 |  | 
 | 6792 | - Issue #9018: os.path.normcase() now raises a TypeError if the argument is not | 
 | 6793 |   ``str`` or ``bytes``. | 
 | 6794 |  | 
 | 6795 | - Issue #9075: In the ssl module, remove the setting of a ``debug`` flag on an | 
 | 6796 |   OpenSSL structure. | 
 | 6797 |  | 
 | 6798 | - Issue #8682: The ssl module now temporary increments the reference count of a | 
 | 6799 |   socket object got through ``PyWeakref_GetObject``, so as to avoid possible | 
 | 6800 |   deallocation while the object is still being used. | 
 | 6801 |  | 
 | 6802 | - Issue #1368368: FancyURLOpener class changed to throw an Exception on wrong | 
 | 6803 |   password instead of presenting an interactive prompt.  Older behavior can be | 
 | 6804 |   obtained by passing retry=True to http_error_xxx methods of FancyURLOpener. | 
 | 6805 |  | 
 | 6806 | - Issue #8720: Fix regression caused by fix for #4050 by making getsourcefile | 
 | 6807 |   smart enough to find source files in the linecache. | 
 | 6808 |  | 
 | 6809 | - Issue #5610: feedparser no longer eats extra characters at the end of a body | 
 | 6810 |   part if the body part ends with a ``\r\n``. | 
 | 6811 |  | 
 | 6812 | - Issue #8986: math.erfc was incorrectly raising OverflowError for values | 
 | 6813 |   between -27.3 and -30.0 on some platforms. | 
 | 6814 |  | 
 | 6815 | - Issue #8784: Set tarfile default encoding to 'utf-8' on Windows. | 
 | 6816 |  | 
 | 6817 | - Issue #8966: If a ctypes structure field is an array of c_char, convert its | 
 | 6818 |   value to bytes instead of str (as done for c_char and c_char_p). | 
 | 6819 |  | 
 | 6820 | - Issue #8188: Comparisons between Decimal and Fraction objects are now | 
 | 6821 |   permitted, returning a result based on the exact numerical values of the | 
 | 6822 |   operands.  This builds on issue #2531, which allowed Decimal-to-float | 
 | 6823 |   comparisons; all comparisons involving numeric types (bool, int, float, | 
 | 6824 |   complex, Decimal, Fraction) should now act as expected. | 
 | 6825 |  | 
 | 6826 | - Issue #8897: Fix sunau module, use bytes to write the header. Patch written by | 
 | 6827 |   Thomas Jollans. | 
 | 6828 |  | 
 | 6829 | - Issue #8899: time.struct_time now has class and attribute docstrings. | 
 | 6830 |  | 
 | 6831 | - Issue #6470: Drop UNC prefix in FixTk. | 
 | 6832 |  | 
 | 6833 | - Issue #4768: base64 encoded email body parts were incorrectly stored as binary | 
 | 6834 |   strings.  They are now correctly converted to strings. | 
 | 6835 |  | 
 | 6836 | - Issue #8833: tarfile created hard link entries with a size field != 0 by | 
 | 6837 |   mistake. | 
 | 6838 |  | 
 | 6839 | - Charset.body_encode now correctly handles base64 encoding by encoding with the | 
 | 6840 |   output_charset before calling base64mime.encode.  Passes the tests from 2.x | 
 | 6841 |   issue #1368247. | 
 | 6842 |  | 
 | 6843 | - Issue #8845: sqlite3 Connection objects now have a read-only in_transaction | 
 | 6844 |   attribute that is True iff there are uncommitted changes. | 
 | 6845 |  | 
 | 6846 | - Issue #1289118: datetime.timedelta objects can now be multiplied by float and | 
 | 6847 |   divided by float and int objects.  Results are rounded to the nearest multiple | 
 | 6848 |   of timedelta.resolution with ties resolved using round-half-to-even method. | 
 | 6849 |  | 
 | 6850 | - Issue #7150: Raise OverflowError if the result of adding or subtracting | 
 | 6851 |   timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range. | 
 | 6852 |  | 
 | 6853 | - Issue #8806: add SSL contexts support to ftplib. | 
 | 6854 |  | 
 | 6855 | - Issue #4769: Fix main() function of the base64 module, use sys.stdin.buffer | 
 | 6856 |   and sys.stdout.buffer (instead of sys.stdin and sys.stdout) to use the bytes | 
 | 6857 |   API. | 
 | 6858 |  | 
 | 6859 | - Issue #8770: Now sysconfig displays information when it's called as a script. | 
 | 6860 |   Initial idea by Sridhar Ratnakumar. | 
 | 6861 |  | 
 | 6862 | - Issue #6662: Fix parsing of malformatted charref (&#bad;), patch written by | 
 | 6863 |   Fredrik Håård. | 
 | 6864 |  | 
 | 6865 | - Issue #8540: Decimal module: rename the Context._clamp attribute to | 
 | 6866 |   Context.clamp and make it public.  This is useful in creating contexts that | 
 | 6867 |   correspond to the decimal interchange formats specified in IEEE 754. | 
 | 6868 |  | 
 | 6869 | - Issue #6268: Fix seek() method of codecs.open(), don't read or write the BOM | 
 | 6870 |   twice after seek(0). Fix also reset() method of codecs, UTF-16, UTF-32 and | 
 | 6871 |   StreamWriter classes. | 
 | 6872 |  | 
 | 6873 | - Issue #3798: sys.exit(message) writes the message to sys.stderr file, instead | 
 | 6874 |   of the C file stderr, to use stderr encoding and error handler. | 
 | 6875 |  | 
 | 6876 | - Issue #8782: Add a trailing newline in linecache.updatecache to the last line | 
 | 6877 |   of files without one. | 
 | 6878 |  | 
 | 6879 | - Issue #8729: Return NotImplemented from collections.Mapping.__eq__ when | 
 | 6880 |   comparing to a non-mapping. | 
 | 6881 |  | 
 | 6882 | - Issue #8774: tabnanny uses the encoding cookie (#coding:...) to use the | 
 | 6883 |   correct encoding. | 
 | 6884 |  | 
 | 6885 | - Issue #4870: Add an `options` attribute to SSL contexts, as well as several | 
 | 6886 |   ``OP_*`` constants to the `ssl` module.  This allows to selectively disable | 
 | 6887 |   protocol versions, when used in combination with `PROTOCOL_SSLv23`. | 
 | 6888 |  | 
 | 6889 | - Issue #8759: Fixed user paths in sysconfig for posix and os2 schemes. | 
 | 6890 |  | 
 | 6891 | - Issue #8663: distutils.log emulates backslashreplace error handler. Fix | 
 | 6892 |   compilation in a non-ASCII directory if stdout encoding is ASCII (eg. if | 
 | 6893 |   stdout is not a TTY). | 
 | 6894 |  | 
 | 6895 | - Issue #8513: os.get_exec_path() supports b'PATH' key and bytes value. | 
 | 6896 |   subprocess.Popen() and os._execvpe() support bytes program name. Add | 
 | 6897 |   os.supports_bytes_environ flag: True if the native OS type of the environment | 
 | 6898 |   is bytes (eg. False on Windows). | 
 | 6899 |  | 
 | 6900 | - Issue #8633: tarfile is now able to read and write archives with "raw" binary | 
 | 6901 |   pax headers as described in POSIX.1-2008. | 
 | 6902 |  | 
 | 6903 | - Issue #1285086: Speed up urllib.parse functions: quote, quote_from_bytes, | 
 | 6904 |   unquote, unquote_to_bytes. | 
 | 6905 |  | 
 | 6906 | - Issue #8688: Distutils now recalculates MANIFEST everytime. | 
 | 6907 |  | 
 | 6908 | - Issue #8477: ssl.RAND_egd() and ssl._test_decode_cert() support str with | 
 | 6909 |   surrogates and bytes for the filename. | 
 | 6910 |  | 
 | 6911 | - Issue #8550: Add first class ``SSLContext`` objects to the ssl module. | 
 | 6912 |  | 
 | 6913 | - Issue #8681: Make the zlib module's error messages more informative when the | 
 | 6914 |   zlib itself doesn't give any detailed explanation. | 
 | 6915 |  | 
 | 6916 | - The audioop module now supports sound fragments of length greater than 2**31 | 
 | 6917 |   bytes on 64-bit machines, and is PY_SSIZE_T_CLEAN. | 
 | 6918 |  | 
 | 6919 | - Issue #4972: Add support for the context manager protocol to the ftplib.FTP | 
 | 6920 |   class. | 
 | 6921 |  | 
 | 6922 | - Issue #8664: In py_compile, create __pycache__ when the compiled path is | 
 | 6923 |   given. | 
 | 6924 |  | 
 | 6925 | - Issue #8514: Add os.fsencode() function (Unix only): encode a string to bytes | 
 | 6926 |   for use in the file system, environment variables or the command line. | 
 | 6927 |  | 
 | 6928 | - Issue #8571: Fix an internal error when compressing or decompressing a chunk | 
 | 6929 |   larger than 1GB with the zlib module's compressor and decompressor objects. | 
 | 6930 |  | 
 | 6931 | - Issue #8603: Support bytes environmental variables on Unix: Add os.environb | 
 | 6932 |   mapping and os.getenvb() function. os.unsetenv() encodes str argument to the | 
 | 6933 |   file system encoding with the surrogateescape error handler (instead of | 
 | 6934 |   utf8/strict) and accepts bytes. posix.environ keys and values are now bytes. | 
 | 6935 |  | 
 | 6936 | - Issue #8573: asyncore _strerror() function might throw ValueError. | 
 | 6937 |  | 
 | 6938 | - Issue #8483: asyncore.dispatcher's __getattr__ method produced confusing error | 
 | 6939 |   messages when accessing undefined class attributes because of the cheap | 
 | 6940 |   inheritance with the underlying socket object.  The cheap inheritance has been | 
 | 6941 |   deprecated. | 
 | 6942 |  | 
 | 6943 | - Issue #4265: shutil.copyfile() was leaking file descriptors when disk fills. | 
 | 6944 |   Patch by Tres Seaver. | 
 | 6945 |  | 
 | 6946 | - Issue #8390: tarfile uses surrogateescape as the default error handler | 
 | 6947 |   (instead of replace in read mode or strict in write mode). | 
 | 6948 |  | 
 | 6949 | - Issue #7755: Use an unencumbered audio file for tests. | 
 | 6950 |  | 
 | 6951 | - Issue #8621: uuid.uuid4() returned the same sequence of values in the parent | 
 | 6952 |   and any children created using ``os.fork`` on MacOS X 10.6. | 
 | 6953 |  | 
 | 6954 | - Issue #8567: Fix precedence of signals in Decimal module: when a Decimal | 
 | 6955 |   operation raises multiple signals and more than one of those signals is | 
 | 6956 |   trapped, the specification determines the order in which the signals should be | 
 | 6957 |   handled.  In many cases this order wasn't being followed, leading to the wrong | 
 | 6958 |   Python exception being raised. | 
 | 6959 |  | 
 | 6960 | - Issue #7865: The close() method of ``io`` objects should not swallow | 
 | 6961 |   exceptions raised by the implicit flush().  Also qensure that calling close() | 
 | 6962 |   several times is supported.  Patch by Pascal Chambon. | 
 | 6963 |  | 
 | 6964 | - Issue #4687: Fix accuracy of garbage collection runtimes displayed with | 
 | 6965 |   gc.DEBUG_STATS. | 
 | 6966 |  | 
 | 6967 | - Issue #8354: The siginterrupt setting is now preserved for all signals, not | 
 | 6968 |   just SIGCHLD. | 
 | 6969 |  | 
 | 6970 | - Issue #7192: webbrowser.get("firefox") now works on Mac OS X, as does | 
 | 6971 |   webbrowser.get("safari"). | 
 | 6972 |  | 
 | 6973 | - Issue #8464: tarfile no longer creates files with execute permissions set when | 
 | 6974 |   mode="w|" is used. | 
 | 6975 |  | 
 | 6976 | - Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of | 
 | 6977 |   the Linux kernel.  Patch by Yaniv Aknin. | 
 | 6978 |  | 
 | 6979 | - Issue #8295: Added shutil.unpack_archive. | 
 | 6980 |  | 
 | 6981 | - Issue #6312: Fixed http HEAD request when the transfer encoding is chunked. | 
 | 6982 |   It should correctly return an empty response now. | 
 | 6983 |  | 
 | 6984 | - Issue #8546: Reject None given as the buffering argument to _pyio.open. | 
 | 6985 |  | 
 | 6986 | - Issue #8549: Fix compiling the _ssl extension under AIX.  Patch by | 
 | 6987 |   Sridhar Ratnakumar. | 
 | 6988 |  | 
 | 6989 | - Issue #6656: fix locale.format_string to handle escaped percents | 
 | 6990 |   and mappings. | 
 | 6991 |  | 
 | 6992 | - Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, where | 
 | 6993 |   the method could block indefinitely if called just before the event loop | 
 | 6994 |   started running.  This also fixes the occasional freezes witnessed in | 
 | 6995 |   test_httpservers. | 
 | 6996 |  | 
 | 6997 | - Issue #8524: When creating an SSL socket, the timeout value of the original | 
 | 6998 |   socket wasn't retained (instead, a socket with a positive timeout would be | 
 | 6999 |   turned into a non-blocking SSL socket). | 
 | 7000 |  | 
 | 7001 | - Issue #5103: SSL handshake would ignore the socket timeout and block | 
 | 7002 |   indefinitely if the other end didn't respond. | 
 | 7003 |  | 
 | 7004 | - The do_handshake() method of SSL objects now adjusts the blocking mode of the | 
 | 7005 |   SSL structure if necessary (as other methods already do). | 
 | 7006 |  | 
 | 7007 | - Issue #8391: os.execvpe() and os.getenv() supports unicode with surrogates and | 
 | 7008 |   bytes strings for environment keys and values. | 
 | 7009 |  | 
 | 7010 | - Issue #8467: Pure Python implementation of subprocess encodes the error | 
 | 7011 |   message using surrogatepass error handler to support surrogates in the | 
 | 7012 |   message. | 
 | 7013 |  | 
 | 7014 | - Issue #8468: bz2.BZ2File() accepts str with surrogates and bytes filenames. | 
 | 7015 |  | 
 | 7016 | - Issue #8451: Syslog module now uses basename(sys.argv[0]) instead of the | 
 | 7017 |   string "python" as the *ident*.  openlog() arguments are all optional and | 
 | 7018 |   keywords. | 
 | 7019 |  | 
 | 7020 | - Issue #8108: Fix the unwrap() method of SSL objects when the socket has a | 
 | 7021 |   non-infinite timeout.  Also make that method friendlier with applications | 
 | 7022 |   wanting to continue using the socket in clear-text mode, by disabling | 
 | 7023 |   OpenSSL's internal readahead.  Thanks to Darryl Miles for guidance. | 
 | 7024 |  | 
 | 7025 | - Issue #8496: make mailcap.lookup() always return a list, rather than an | 
 | 7026 |   iterator.  Patch by Gregory Nofi. | 
 | 7027 |  | 
 | 7028 | - Issue #8195: Fix a crash in sqlite Connection.create_collation() if the | 
 | 7029 |   collation name contains a surrogate character. | 
 | 7030 |  | 
 | 7031 | - Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl | 
 | 7032 |   extension, such that verification of some SSL certificates doesn't fail | 
 | 7033 |   because of an "unknown algorithm". | 
 | 7034 |  | 
 | 7035 | - Issue #6547: Added the ignore_dangling_symlinks option to shutil.copytree. | 
 | 7036 |  | 
 | 7037 | - Issue #1540112: Now allowing the choice of a copy function in shutil.copytree. | 
 | 7038 |  | 
 | 7039 | - Issue #4814: timeout parameter is now applied also for connections resulting | 
 | 7040 |   from PORT/EPRT commands. | 
 | 7041 |  | 
 | 7042 | - Issue #8463: added missing reference to bztar in shutil's documentation. | 
 | 7043 |  | 
 | 7044 | - Issue #7154: urllib.request can now detect the proxy settings on OSX 10.6 (as | 
 | 7045 |   long as the user didn't specify 'automatic proxy configuration'). | 
 | 7046 |  | 
 | 7047 | - Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code | 
 | 7048 |   as stated in RFC-959 at chapter 5.4. | 
 | 7049 |  | 
 | 7050 | - Issue #8394: _ctypes.dlopen() accepts bytes, bytearray and str with | 
 | 7051 |   surrogates. | 
 | 7052 |  | 
 | 7053 | - Issue #850728: Add a *timeout* parameter to the `acquire()` method of | 
 | 7054 |   `threading.Semaphore` objects.  Original patch by Torsten Landschoff. | 
 | 7055 |  | 
 | 7056 | - Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the | 
 | 7057 |   available cipher list.  Helps fix test_ssl with OpenSSL 1.0.0. | 
 | 7058 |  | 
 | 7059 | - Issue #8393: subprocess accepts bytes, bytearray and str with surrogates for | 
 | 7060 |   the current working directory. | 
 | 7061 |  | 
 | 7062 | - Issue #7606: XML-RPC traceback stored in X-traceback is now encoded to ASCII | 
 | 7063 |   using backslashreplace error handler. | 
 | 7064 |  | 
 | 7065 | - Issue #8412: os.system() now accepts bytes, bytearray and str with surrogates. | 
 | 7066 |  | 
 | 7067 | - Issue #2987: RFC2732 support for urlparse (IPv6 addresses). Patch by Tony | 
 | 7068 |   Locke and Hans Ulrich Niedermann. | 
 | 7069 |  | 
 | 7070 | - Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters. | 
 | 7071 |  | 
 | 7072 | - Issue #7316: The acquire() method of lock objects in the ``threading`` | 
 | 7073 |   module now takes an optional timeout argument in seconds.  Timeout support | 
 | 7074 |   relies on the system threading library, so as to avoid a semi-busy wait loop. | 
 | 7075 |  | 
 | 7076 | - Issue #8383: pickle and pickletools use surrogatepass error handler when | 
 | 7077 |   encoding unicode as utf8 to support lone surrogates and stay compatible with | 
 | 7078 |   Python 2.x and 3.x. | 
 | 7079 |  | 
 | 7080 | - Issue #7585: difflib context and unified diffs now place a tab between | 
 | 7081 |   filename and date, conforming to the 'standards' they were originally designed | 
 | 7082 |   to follow.  This improves compatibility with patch tools. | 
 | 7083 |  | 
 | 7084 | - Issue #7472: Fixed typo in email.encoders module; messages using ISO-2022 | 
 | 7085 |   character sets will now consistently use a Content-Transfer-Encoding of 7bit | 
 | 7086 |   rather than sometimes being marked as 8bit. | 
 | 7087 |  | 
 | 7088 | - Issue #8375: test_distutils now checks if the temporary directory are still | 
 | 7089 |   present before it cleans them. | 
 | 7090 |  | 
 | 7091 | - Issue #8374: Update the internal alias table in the ``locale`` module to | 
 | 7092 |   cover recent locale changes and additions. | 
 | 7093 |  | 
 | 7094 | - Issue #8321: Give access to OpenSSL version numbers from the `ssl` module, | 
 | 7095 |   using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO` and | 
 | 7096 |   `ssl.OPENSSL_VERSION_NUMBER`. | 
 | 7097 |  | 
 | 7098 | - Add functools.total_ordering() and functools.cmp_to_key(). | 
 | 7099 |  | 
 | 7100 | - Issue #8257: The Decimal construct now accepts a float instance directly, | 
 | 7101 |   converting that float to a Decimal of equal value: | 
 | 7102 |  | 
 | 7103 |      >>> Decimal(1.1) | 
 | 7104 |      Decimal('1.100000000000000088817841970012523233890533447265625') | 
 | 7105 |  | 
 | 7106 | - Issue #8294: The Fraction constructor now accepts Decimal and float instances | 
 | 7107 |   directly. | 
 | 7108 |  | 
 | 7109 | - Issue #7279: Comparisons involving a Decimal signaling NaN now signal | 
 | 7110 |   InvalidOperation instead of returning False.  (Comparisons involving a quiet | 
 | 7111 |   NaN are unchanged.)  Also, Decimal quiet NaNs are now hashable; Decimal | 
 | 7112 |   signaling NaNs remain unhashable. | 
 | 7113 |  | 
 | 7114 | - Issue #2531: Comparison operations between floats and Decimal instances now | 
 | 7115 |   return a result based on the numeric values of the operands; previously they | 
 | 7116 |   returned an arbitrary result based on the relative ordering of id(float) and | 
 | 7117 |   id(Decimal).  See also issue #8188, which adds Decimal-to-Fraction | 
 | 7118 |   comparisons. | 
 | 7119 |  | 
 | 7120 | - Added a subtract() method to collections.Counter(). | 
 | 7121 |  | 
 | 7122 | - Issue #8233: When run as a script, py_compile.py optionally takes a single | 
 | 7123 |   argument `-` which tells it to read files to compile from stdin.  Each line is | 
 | 7124 |   read on demand and the named file is compiled immediately.  (Original patch by | 
 | 7125 |   Piotr Ożarowski). | 
 | 7126 |  | 
 | 7127 | - Backwards incompatible change: Unicode codepoints line tabulation (0x0B) and | 
 | 7128 |   form feed (0x0C) are now considered linebreaks, as specified in Unicode | 
 | 7129 |   Standard Annex #14.  See issue #7643.  http://www.unicode.org/reports/tr14/ | 
 | 7130 |  | 
 | 7131 | - Comparisons using one of <, <=, >, >= between a complex instance and a | 
 | 7132 |   Fractions instance now raise TypeError instead of returning True/False.  This | 
 | 7133 |   makes Fraction <=> complex comparisons consistent with int <=> complex, float | 
 | 7134 |   <=> complex, and complex <=> complex comparisons. | 
 | 7135 |  | 
 | 7136 | - Issue #8139: ossaudiodev didn't initialize its types properly, therefore some | 
 | 7137 |   methods (such as oss_mixer_device.fileno()) were not available.  Initial patch | 
 | 7138 |   by Bertrand Janin. | 
 | 7139 |  | 
 | 7140 | - Issue #8205: Remove the "Modules" directory from sys.path when Python is | 
 | 7141 |   running from the build directory (POSIX only). | 
 | 7142 |  | 
 | 7143 | - Issue #7512: shutil.copystat() could raise an OSError when the filesystem | 
 | 7144 |   didn't support chflags() (for example ZFS under FreeBSD).  The error is now | 
 | 7145 |   silenced. | 
 | 7146 |  | 
 | 7147 | - Issue #7860: platform.uname now reports the correct 'machine' type when Python | 
 | 7148 |   is running in WOW64 mode on 64 bit Windows. | 
 | 7149 |  | 
 | 7150 | - Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets. | 
 | 7151 |   Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking | 
 | 7152 |   reads and writes are always retried by OpenSSL itself. | 
 | 7153 |  | 
 | 7154 | - Issue #4282: Fix the main function of the profile module for a non-ASCII | 
 | 7155 |   script, open the file in binary mode and not in text mode with the default | 
 | 7156 |   (utf8) encoding. | 
 | 7157 |  | 
 | 7158 | - Issue #8179: Fix macpath.realpath() on a non-existing path. | 
 | 7159 |  | 
 | 7160 | - Issue #8024: Update the Unicode database to 5.2. | 
 | 7161 |  | 
 | 7162 | - Issue #8168: py_compile now handles files with utf-8 BOMS. | 
 | 7163 |  | 
 | 7164 | - ``tokenize.detect_encoding`` now returns ``'utf-8-sig'`` when a UTF-8 BOM is | 
 | 7165 |   detected. | 
 | 7166 |  | 
 | 7167 | - Issue #6716/2: Backslash-replace error output in compilall. | 
 | 7168 |  | 
 | 7169 | - Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox | 
 | 7170 |   with Tcl/Tk-8.5. | 
 | 7171 |  | 
 | 7172 | - Issue #8140: extend compileall to compile single files.  Add -i option. | 
 | 7173 |  | 
 | 7174 | - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the | 
 | 7175 |   locale. | 
 | 7176 |  | 
 | 7177 | - The internals of the subprocess module on POSIX systems have been replaced by | 
 | 7178 |   an extension module (_posixsubprocess) so that the fork()+exec() can be done | 
 | 7179 |   safely without the possibility of deadlock in multithreaded applications. | 
 | 7180 |  | 
 | 7181 | - subprocess.Popen now has restore_signals and start_new_session features.  The | 
 | 7182 |   default of restore_signals=True is a new behavior compared to earlier Python | 
 | 7183 |   versions.  This means that signals such as SIGPIPE are not ignored by default | 
 | 7184 |   in subprocesses launched by Python (Issue #1652). | 
 | 7185 |  | 
 | 7186 | - Issue #6472: The xml.etree package is updated to ElementTree 1.3.  The | 
 | 7187 |   cElementTree module is updated too. | 
 | 7188 |  | 
 | 7189 | - Issue #7774: Set sys.executable to an empty string if argv[0] has been set to | 
 | 7190 |   an non existent program name and Python is unable to retrieve the real program | 
 | 7191 |   name. | 
 | 7192 |  | 
 | 7193 | - Issue #7880: Fix sysconfig when the python executable is a symbolic link. | 
 | 7194 |  | 
 | 7195 | - Issue #6509: fix re.sub to work properly when the pattern, the string, and the | 
 | 7196 |   replacement were all bytes.  Patch by Antoine Pitrou. | 
 | 7197 |  | 
 | 7198 | - The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure | 
 | 7199 |   bugs and allows loading SQLite extensions from shared libraries. | 
 | 7200 |  | 
 | 7201 | - Issue #1054943: Fix ``unicodedata.normalize('NFC', text)`` for the Public | 
 | 7202 |   Review Issue #29 (http://unicode.org/review/pr-29.html). | 
 | 7203 |  | 
 | 7204 | - Issue #7494: fix a crash in _lsprof (cProfile) after clearing the profiler, | 
 | 7205 |   reset also the pointer to the current pointer context. | 
 | 7206 |  | 
 | 7207 | - Issue #7232: Add support for the context manager protocol to the TarFile | 
 | 7208 |   class. | 
 | 7209 |  | 
 | 7210 | - Issue #7250: Fix info leak of os.environ across multi-run uses of | 
 | 7211 |   wsgiref.handlers.CGIHandler. | 
 | 7212 |  | 
 | 7213 | - Issue #1729305: Fix doctest to handle encode error with "backslashreplace". | 
 | 7214 |  | 
 | 7215 | - Issue #691291: codecs.open() should not convert end of lines on reading and | 
 | 7216 |   writing. | 
 | 7217 |  | 
 | 7218 | - Issue #7869: logging: improved diagnostic for format-time errors. | 
 | 7219 |  | 
 | 7220 | - Issue #7868: logging: added loggerClass attribute to Manager. | 
 | 7221 |  | 
 | 7222 | - logging: Implemented PEP 391. | 
 | 7223 |  | 
 | 7224 | - Issue #1537721: Add a writeheader() method to csv.DictWriter. | 
 | 7225 |  | 
 | 7226 | - Issue #7959: ctypes callback functions are now registered correctly with the | 
 | 7227 |   cycle garbage collector. | 
 | 7228 |  | 
 | 7229 | - Issue #5801: removed spurious empty lines in wsgiref. | 
 | 7230 |  | 
 | 7231 | - Issue #6666: fix bug in trace.py that applied the list of directories to be | 
 | 7232 |   ignored only to the first file.  Noted by Bogdan Opanchuk. | 
 | 7233 |  | 
 | 7234 | - Issue #7597: curses.use_env() can now be called before initscr().  Noted by | 
 | 7235 |   Kan-Ru Chen. | 
 | 7236 |  | 
 | 7237 | - Issue #7310: fix the __repr__ of os.environ to show the environment variables. | 
 | 7238 |  | 
 | 7239 | - Issue #7970: email.Generator.flatten now correctly flattens message/rfc822 | 
 | 7240 |   messages parsed by email.Parser.HeaderParser. | 
 | 7241 |  | 
 | 7242 | - Issue #7361: Importlib was not properly checking the number of bytes in | 
 | 7243 |   bytecode file when it was less then 8 bytes. | 
 | 7244 |  | 
 | 7245 | - Issue #7633: In the decimal module, Context class methods (with the exception | 
 | 7246 |   of canonical and is_canonical) now accept instances of int and long wherever a | 
 | 7247 |   Decimal instance is accepted, and implicitly convert that argument to Decimal. | 
 | 7248 |   Previously only some arguments were converted. | 
 | 7249 |  | 
 | 7250 | - Issue #7835: shelve should no longer produce mysterious warnings during | 
 | 7251 |   interpreter shutdown. | 
 | 7252 |  | 
 | 7253 | - Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in XML | 
 | 7254 |   processing instructions and comments.  These raw characters are allowed by the | 
 | 7255 |   XML specification, and are necessary when outputting e.g.  PHP code in a | 
 | 7256 |   processing instruction.  Patch by Neil Muller. | 
 | 7257 |  | 
 | 7258 | - Issue #6233: ElementTree failed converting unicode characters to XML entities | 
 | 7259 |   when they could't be represented in the requested output encoding.  Patch by | 
 | 7260 |   Jerry Chen. | 
 | 7261 |  | 
 | 7262 | - Issue #6003: add an argument to ``zipfile.Zipfile.writestr`` to specify the | 
 | 7263 |   compression type. | 
 | 7264 |  | 
 | 7265 | - Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is | 
 | 7266 |   specified, rather than fall through to AF_PACKET (in the `socket` module). | 
 | 7267 |   Also, raise ValueError rather than TypeError when an unknown TIPC address type | 
 | 7268 |   is specified.  Patch by Brian Curtin. | 
 | 7269 |  | 
 | 7270 | - Issue #6939: Fix file I/O objects in the `io` module to keep the original file | 
 | 7271 |   position when calling `truncate()`.  It would previously change the file | 
 | 7272 |   position to the given argument, which goes against the tradition of | 
 | 7273 |   ftruncate() and other truncation APIs.  Patch by Pascal Chambon. | 
 | 7274 |  | 
 | 7275 | - Issue #7610: Reworked implementation of the internal | 
 | 7276 |   ``zipfile.ZipExtFile`` class used to represent files stored inside an | 
 | 7277 |   archive.  The new implementation is significantly faster and can be wrapped in | 
 | 7278 |   a ``io.BufferedReader`` object for more speedups.  It also solves an | 
 | 7279 |   issue where interleaved calls to `read()` and `readline()` give wrong results. | 
 | 7280 |   Patch by Nir Aides. | 
 | 7281 |  | 
 | 7282 | - Issue #6963: Added "maxtasksperchild" argument to multiprocessing.Pool, | 
 | 7283 |   allowing for a maximum number of tasks within the pool to be completed by the | 
 | 7284 |   worker before that worker is terminated, and a new one created to replace it. | 
 | 7285 |  | 
 | 7286 | - Issue #7792: Registering non-classes to ABCs raised an obscure error. | 
 | 7287 |  | 
 | 7288 | - Issue #7785: Don't accept bytes in FileIO.write(). | 
 | 7289 |  | 
 | 7290 | - Removed the functions 'verify' and 'vereq' from Lib/test/support.py. | 
 | 7291 |  | 
 | 7292 | - Issue #7773: Fix an UnboundLocalError in platform.linux_distribution() when | 
 | 7293 |   the release file is empty. | 
 | 7294 |  | 
 | 7295 | - Issue #7561: Fix crashes when using bytearray objects with the posix | 
 | 7296 |   module. | 
 | 7297 |  | 
 | 7298 | - Issue #1670765: Prevent email.generator.Generator from re-wrapping headers in | 
 | 7299 |   multipart/signed MIME parts, which fixes one of the sources of invalid | 
 | 7300 |   modifications to such parts by Generator. | 
 | 7301 |  | 
 | 7302 | - Issue #7703: Add support for the new buffer API to `binascii.a2bhqx`.  Patch | 
 | 7303 |   by Florent Xicluna, along with some additional tests. | 
 | 7304 |  | 
 | 7305 | - Issue #7701: Fix crash in binascii.b2a_uu() in debug mode when given a 1-byte | 
 | 7306 |   argument.  Patch by Victor Stinner. | 
 | 7307 |  | 
 | 7308 | - Issue #3299: Fix possible crash in the _sre module when given bad argument | 
 | 7309 |   values in debug mode.  Patch by Victor Stinner. | 
 | 7310 |  | 
 | 7311 | - Issue #2846: Add support for gzip.GzipFile reading zero-padded files.  Patch | 
 | 7312 |   by Brian Curtin. | 
 | 7313 |  | 
 | 7314 | - Issue #7681: Use floor division in appropiate places in the wave module. | 
 | 7315 |  | 
 | 7316 | - Issue #5372: Drop the reuse of .o files in Distutils' ccompiler (since | 
 | 7317 |   Extension extra options may change the output without changing the .c | 
 | 7318 |   file). Initial patch by Collin Winter. | 
 | 7319 |  | 
 | 7320 | - Issue #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes gcc | 
 | 7321 |   when it has a fully qualified configuration prefix. Initial patch by Arfrever. | 
 | 7322 |  | 
 | 7323 | - Issue #7105: Make WeakKeyDictionary and WeakValueDictionary robust against the | 
 | 7324 |   destruction of weakref'ed objects while iterating. | 
 | 7325 |  | 
 | 7326 | - Issue #7455: Fix possible crash in cPickle on invalid input.  Patch by Victor | 
 | 7327 |   Stinner. | 
 | 7328 |  | 
 | 7329 | - Issue #1628205: Socket file objects returned by socket.socket.makefile() now | 
 | 7330 |   properly handles EINTR within the read, readline, write & flush methods.  The | 
 | 7331 |   socket.sendall() method now properly handles interrupted system calls. | 
 | 7332 |  | 
 | 7333 | - Issue #7471: Improve the performance of GzipFile's buffering mechanism, and | 
 | 7334 |   make it implement the `io.BufferedIOBase` ABC to allow for further speedups by | 
 | 7335 |   wrapping it in an `io.BufferedReader`.  Patch by Nir Aides. | 
 | 7336 |  | 
 | 7337 | - Issue #3972: http.client.HTTPConnection now accepts an optional source_address | 
 | 7338 |   parameter to allow specifying where your connections come from. | 
 | 7339 |  | 
 | 7340 | - socket.create_connection now accepts an optional source_address parameter. | 
 | 7341 |  | 
 | 7342 | - Issue #5511: now zipfile.ZipFile can be used as a context manager.  Initial | 
 | 7343 |   patch by Brian Curtin. | 
 | 7344 |  | 
 | 7345 | - Issue #7556: Make sure Distutils' msvc9compile reads and writes the MSVC XML | 
 | 7346 |   Manifest file in text mode so string patterns can be used in regular | 
 | 7347 |   expressions. | 
 | 7348 |  | 
 | 7349 | - Issue #7552: Removed line feed in the base64 Authorization header in the | 
 | 7350 |   Distutils upload command to avoid an error when PyPI reads it.  This occurs on | 
 | 7351 |   long passwords. Initial patch by JP St. Pierre. | 
 | 7352 |  | 
 | 7353 | - Issue #7231: urllib2 cannot handle https with proxy requiring auth.  Patch by | 
 | 7354 |   Tatsuhiro Tsujikawa. | 
 | 7355 |  | 
 | 7356 | - Issue #4757: `zlib.compress` and other methods in the zlib module now raise a | 
 | 7357 |   TypeError when given an `str` object (rather than a `bytes`-like object). | 
 | 7358 |   Patch by Victor Stinner and Florent Xicluna. | 
 | 7359 |  | 
 | 7360 | - Issue #7349: Make methods of file objects in the io module accept None as an | 
 | 7361 |   argument where file-like objects (ie StringIO and BytesIO) accept them to mean | 
 | 7362 |   the same as passing no argument. | 
 | 7363 |  | 
 | 7364 | - Issue #7357: tarfile no longer suppresses fatal extraction errors by default. | 
 | 7365 |  | 
 | 7366 | - Issue #5949: added check for correct lineends in input from IMAP server in | 
 | 7367 |   imaplib. | 
 | 7368 |  | 
 | 7369 | - Add count() and reverse() methods to collections.deque(). | 
 | 7370 |  | 
 | 7371 | - Fix variations of extending deques:  d.extend(d)  d.extendleft(d)  d+=d | 
 | 7372 |  | 
 | 7373 | - Issue #6986: Fix crash in the JSON C accelerator when called with the wrong | 
 | 7374 |   parameter types.  Patch by Victor Stinner. | 
 | 7375 |  | 
 | 7376 | - Issue #7457: added a read_pkg_file method to | 
 | 7377 |   distutils.dist.DistributionMetadata. | 
 | 7378 |  | 
 | 7379 | - logging: Added optional `secure` parameter to SMTPHandler, to enable use of | 
 | 7380 |   TLS with authentication credentials. | 
 | 7381 |  | 
 | 7382 | - Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is generated | 
 | 7383 |   in Distutils.  Patch by Stephen Emslie. | 
 | 7384 |  | 
 | 7385 | - Issue #4120: Drop reference to CRT from manifest when building extensions with | 
 | 7386 |   msvc9compiler. | 
 | 7387 |  | 
 | 7388 | - Issue #7333: The `posix` module gains an `initgroups()` function providing | 
 | 7389 |   access to the initgroups(3) C library call on Unix systems which implement it. | 
 | 7390 |   Patch by Jean-Paul Calderone. | 
 | 7391 |  | 
 | 7392 | - Issue #7408: Fixed distutils.tests.sdist so it doesn't check for group | 
 | 7393 |   ownership when the group is not forced, because the group may be different | 
 | 7394 |   from the user's group and inherit from its container when the test is run. | 
 | 7395 |  | 
 | 7396 | - Issue #4486: When an exception has an explicit cause, do not print its | 
 | 7397 |   implicit context too.  This affects the `traceback` module as well as built-in | 
 | 7398 |   exception printing. | 
 | 7399 |  | 
 | 7400 | - Issue #1515: Enable use of deepcopy() with instance methods.  Patch by Robert | 
 | 7401 |   Collins. | 
 | 7402 |  | 
 | 7403 | - Issue #7403: logging: Fixed possible race condition in lock creation. | 
 | 7404 |  | 
 | 7405 | - Issue #6845: Add restart support for binary upload in ftplib.  The | 
 | 7406 |   `storbinary()` method of FTP and FTP_TLS objects gains an optional `rest` | 
 | 7407 |   argument.  Patch by Pablo Mouzo. | 
 | 7408 |  | 
 | 7409 | - Issue #5788: `datetime.timedelta` objects get a new `total_seconds()` method | 
 | 7410 |   returning the total number of seconds in the duration.  Patch by Brian | 
 | 7411 |   Quinlan. | 
 | 7412 |  | 
 | 7413 | - Issue #7133: SSL objects now support the new buffer API. | 
 | 7414 |  | 
 | 7415 | - Issue #1488943: difflib.Differ() doesn't always add hints for tab characters. | 
 | 7416 |  | 
 | 7417 | - Issue #6123: tarfile now opens empty archives correctly and consistently | 
 | 7418 |   raises ReadError on empty files. | 
 | 7419 |  | 
 | 7420 | - Issue #7354: distutils.tests.test_msvc9compiler - dragfullwindows can be 2. | 
 | 7421 |  | 
 | 7422 | - Issue #5037: Proxy the __bytes__ special method instead to __bytes__ instead | 
 | 7423 |   of __str__. | 
 | 7424 |  | 
 | 7425 | - Issue #7341: Close the internal file object in the TarFile constructor in case | 
 | 7426 |   of an error. | 
 | 7427 |  | 
 | 7428 | - Issue #7293: distutils.test_msvc9compiler is fixed to work on any fresh | 
 | 7429 |   Windows box. Help provided by David Bolen. | 
 | 7430 |  | 
 | 7431 | - Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using TLS | 
 | 7432 |   or SSL.  Patch by Giampaolo Rodola'. | 
 | 7433 |  | 
 | 7434 | - Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch. | 
 | 7435 |  | 
 | 7436 | - Issue #4969: The mimetypes module now reads the MIME database from the | 
 | 7437 |   registry under Windows.  Patch by Gabriel Genellina. | 
 | 7438 |  | 
 | 7439 | - Issue #6816: runpy now provides a run_path function that allows Python code to | 
 | 7440 |   execute file paths that refer to source or compiled Python files as well as | 
 | 7441 |   zipfiles, directories and other valid sys.path entries that contain a | 
 | 7442 |   __main__.py file.  This allows applications that run other Python scripts to | 
 | 7443 |   support the same flexibility as the CPython command line itself. | 
 | 7444 |  | 
 | 7445 | - Issue #7318: multiprocessing now uses a timeout when it fails to establish a | 
 | 7446 |   connection with another process, rather than looping endlessly.  The default | 
 | 7447 |   timeout is 20 seconds, which should be amply sufficient for local connections. | 
 | 7448 |  | 
 | 7449 | - Issue #7197: Allow unittest.TextTestRunner objects to be pickled and | 
 | 7450 |   unpickled.  This fixes crashes under Windows when trying to run | 
 | 7451 |   test_multiprocessing in verbose mode. | 
 | 7452 |  | 
 | 7453 | - Issue #7893: ``unittest.TextTestResult`` is made public and a ``resultclass`` | 
 | 7454 |   argument added to the TextTestRunner constructor allowing a different result | 
 | 7455 |   class to be used without having to subclass. | 
 | 7456 |  | 
 | 7457 | - Issue #7588: ``unittest.TextTestResult.getDescription`` now includes the test | 
 | 7458 |   name in failure reports even if the test has a docstring. | 
 | 7459 |  | 
 | 7460 | - Issue #3001: Add a C implementation of recursive locks which is used by | 
 | 7461 |   default when instantiating a `threading.RLock` object. This makes recursive | 
 | 7462 |   locks as fast as regular non-recursive locks (previously, they were slower by | 
 | 7463 |   10x to 15x). | 
 | 7464 |  | 
 | 7465 | - Issue #7282: Fix a memory leak when an RLock was used in a thread other than | 
 | 7466 |   those started through `threading.Thread` (for example, using | 
 | 7467 |   `_thread.start_new_thread()`). | 
 | 7468 |  | 
 | 7469 | - Issue #7187: Importlib would not silence the IOError raised when trying to | 
 | 7470 |   write new bytecode when it was made read-only. | 
 | 7471 |  | 
 | 7472 | - Issue #7264: Fix a possible deadlock when deallocating thread-local objects | 
 | 7473 |   which are part of a reference cycle. | 
 | 7474 |  | 
 | 7475 | - Issue #7211: Allow 64-bit values for the `ident` and `data` fields of kevent | 
 | 7476 |   objects on 64-bit systems.  Patch by Michael Broghton. | 
 | 7477 |  | 
 | 7478 | - Issue #6896: mailbox.Maildir now invalidates its internal cache each time a | 
 | 7479 |   modification is done through it.  This fixes inconsistencies and test failures | 
 | 7480 |   on systems with slightly bogus mtime behaviour. | 
 | 7481 |  | 
 | 7482 | - Issue #7246 & Issue #7208: getpass now properly flushes input before reading | 
 | 7483 |   from stdin so that existing input does not confuse it and lead to incorrect | 
 | 7484 |   entry or an IOError.  It also properly flushes it afterwards to avoid the | 
 | 7485 |   terminal echoing the input afterwards on OSes such as Solaris. | 
 | 7486 |  | 
 | 7487 | - Issue #7233: Fix a number of two-argument Decimal methods to make sure that | 
 | 7488 |   they accept an int or long as the second argument.  Also fix buggy handling of | 
 | 7489 |   large arguments (those with coefficient longer than the current precision) in | 
 | 7490 |   shift and rotate. | 
 | 7491 |  | 
 | 7492 | - Issue #4750: Store the basename of the original filename in the gzip FNAME | 
 | 7493 |   header as required by RFC 1952. | 
 | 7494 |  | 
 | 7495 | - Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in | 
 | 7496 |   Distutils. | 
 | 7497 |  | 
 | 7498 | - Issue #7218: Fix test_site for win32, the directory comparison was done with | 
 | 7499 |   an uppercase. | 
 | 7500 |  | 
 | 7501 | - Issue #7205: Fix a possible deadlock when using a BZ2File object from | 
 | 7502 |   several threads at once. | 
 | 7503 |  | 
 | 7504 | - Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424. | 
 | 7505 |  | 
 | 7506 | - Issue #7099: Decimal.is_normal now returns True for numbers with exponent | 
 | 7507 |   larger than emax. | 
 | 7508 |  | 
 | 7509 | - Issue #7080: locale.strxfrm() raises a MemoryError on 64-bit non-Windows | 
 | 7510 |   platforms, and assorted locale fixes by Derk Drukker. | 
 | 7511 |  | 
 | 7512 | - Issue #5833: Fix extra space character in readline completion with the GNU | 
 | 7513 |   readline library version 6.0. | 
 | 7514 |  | 
 | 7515 | - Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment. | 
 | 7516 |  | 
 | 7517 | - Issue #7086: Added TCP support to SysLogHandler, and tidied up some | 
 | 7518 |   anachronisms in the code which were a relic of 1.5.2 compatibility. | 
 | 7519 |  | 
 | 7520 | - Issue #7082: When falling back to the MIME 'name' parameter, the correct place | 
 | 7521 |   to look for it is the Content-Type header. | 
 | 7522 |  | 
 | 7523 | - Make tokenize.detect_coding() normalize utf-8 and iso-8859-1 variants like the | 
 | 7524 |   builtin tokenizer. | 
 | 7525 |  | 
 | 7526 | - Issue #7048: Force Decimal.logb to round its result when that result is too | 
 | 7527 |   large to fit in the current precision. | 
 | 7528 |  | 
 | 7529 | - Issue #6236, #6348: Fix various failures in the I/O library under AIX and | 
 | 7530 |   other platforms, when using a non-gcc compiler. Patch by Derk Drukker. | 
 | 7531 |  | 
 | 7532 | - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...)  does now | 
 | 7533 |   always result in NULL. | 
 | 7534 |  | 
 | 7535 | - Issue #5042: Structure sub-subclass does now initialize correctly with base | 
 | 7536 |   class positional arguments. | 
 | 7537 |  | 
 | 7538 | - Issue #6882: Import uuid creates zombies processes. | 
 | 7539 |  | 
 | 7540 | - Issue #6635: Fix profiler printing usage message. | 
 | 7541 |  | 
 | 7542 | - Issue #6856: Add a filter keyword argument to TarFile.add(). | 
 | 7543 |  | 
 | 7544 | - Issue #6888: pdb's alias command was broken when no arguments were given. | 
 | 7545 |  | 
 | 7546 | - Issue #6857: Default format() alignment should be '>' for Decimal instances. | 
 | 7547 |  | 
 | 7548 | - Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning | 
 | 7549 |   NaN or raising InvalidContext.  Also, fix infinite recursion in | 
 | 7550 |   long(Decimal('nan')). | 
 | 7551 |  | 
 | 7552 | - Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no | 
 | 7553 |   type specifier. | 
 | 7554 |  | 
 | 7555 | - Issue #6239: ctypes.c_char_p return value must return bytes. | 
 | 7556 |  | 
 | 7557 | - Issue #6838: Use a list to accumulate the value instead of repeatedly | 
 | 7558 |   concatenating strings in http.client's HTTPResponse._read_chunked providing a | 
 | 7559 |   significant speed increase when downloading large files servend with a | 
 | 7560 |   Transfer-Encoding of 'chunked'. | 
 | 7561 |  | 
 | 7562 | - Trying to import a submodule from a module that is not a package, ImportError | 
 | 7563 |   should be raised, not AttributeError. | 
 | 7564 |  | 
 | 7565 | - When the globals past to importlib.__import__() has __package__ set to None, | 
 | 7566 |   fall back to computing what __package__ should be instead of giving up. | 
 | 7567 |  | 
 | 7568 | - Raise a TypeError when the name of a module to be imported for | 
 | 7569 |   importlib.__import__ is not a string (was raising an AttributeError before). | 
 | 7570 |  | 
 | 7571 | - Allow the fromlist passed into importlib.__import__ to be any iterable. | 
 | 7572 |  | 
 | 7573 | - Have importlib raise ImportError if None is found in sys.modules. | 
 | 7574 |  | 
 | 7575 | - Issue #6054: Do not normalize stored pathnames in tarfile. | 
 | 7576 |  | 
 | 7577 | - Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN | 
 | 7578 |   payloads are now ordered by integer value rather than lexicographically. | 
 | 7579 |  | 
 | 7580 | - Issue #1356969: Add missing info methods in tix.HList. | 
 | 7581 |  | 
 | 7582 | - Issue #1522587: New constants and methods for the tix.Grid widget. | 
 | 7583 |  | 
 | 7584 | - Issue #1250469: Fix the return value of tix.PanedWindow.panes. | 
 | 7585 |  | 
 | 7586 | - Issue #1119673: Do not override tkinter.Text methods when creating a | 
 | 7587 |   ScrolledText. | 
 | 7588 |  | 
 | 7589 | - Issue #6665: Fix fnmatch to properly match filenames with newlines in them. | 
 | 7590 |  | 
 | 7591 | - Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview* | 
 | 7592 |   and yview* methods. | 
 | 7593 |  | 
 | 7594 | - Issue #6629: Fix a data corruption issue in the new I/O library, which could | 
 | 7595 |   occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or | 
 | 7596 |   "wb+" mode) after having buffered a certain amount of data for reading. This | 
 | 7597 |   bug was not present in the pure Python implementation. | 
 | 7598 |  | 
 | 7599 | - Issue #6622: Fix "local variable 'secret' referenced before assignment" bug in | 
 | 7600 |   POP3.apop. | 
 | 7601 |  | 
 | 7602 | - Issue #2715: Remove remnants of Carbon.File from binhex module. | 
 | 7603 |  | 
 | 7604 | - Issue #6595: The Decimal constructor now allows arbitrary Unicode decimal | 
 | 7605 |   digits in input, as recommended by the standard.  Previously it was restricted | 
 | 7606 |   to accepting [0-9]. | 
 | 7607 |  | 
 | 7608 | - Issue #6106: telnetlib.Telnet.process_rawq doesn't handle default WILL/WONT | 
 | 7609 |   DO/DONT correctly. | 
 | 7610 |  | 
 | 7611 | - Issue #1424152: Fix for http.client, urllib.request to support SSL while | 
 | 7612 |   working through proxy.  Original patch by Christopher Li, changes made by | 
 | 7613 |   Senthil Kumaran. | 
 | 7614 |  | 
 | 7615 | - Add importlib.abc.ExecutionLoader to represent the PEP 302 protocol for | 
 | 7616 |   loaders that allow for modules to be executed. Both importlib.abc.PyLoader and | 
 | 7617 |   PyPycLoader inherit from this class and provide implementations in relation to | 
 | 7618 |   other methods required by the ABCs. | 
 | 7619 |  | 
 | 7620 | - importlib.abc.PyLoader did not inherit from importlib.abc.ResourceLoader like | 
 | 7621 |   the documentation said it did even though the code in PyLoader relied on the | 
 | 7622 |   abstract method required by ResourceLoader. | 
 | 7623 |  | 
 | 7624 | - Issue #6431: Make Fraction type return NotImplemented when it doesn't know how | 
 | 7625 |   to handle a comparison without loss of precision.  Also add correct handling | 
 | 7626 |   of infinities and nans for comparisons with float. | 
 | 7627 |  | 
 | 7628 | - Issue #6415: Fixed warnings.warn segfault on bad formatted string. | 
 | 7629 |  | 
 | 7630 | - Issue #6358: The exit status of a command started with os.popen() was reported | 
 | 7631 |   differently than it did with python 2.x. | 
 | 7632 |  | 
 | 7633 | - Issue #6323: The pdb debugger did not exit when running a script with a syntax | 
 | 7634 |   error. | 
 | 7635 |  | 
 | 7636 | - Issue #3392: The subprocess communicate() method no longer fails in select() | 
 | 7637 |   when file descriptors are large; communicate() now uses poll() when possible. | 
 | 7638 |  | 
 | 7639 | - Issue #6369: Fix an RLE decompression bug in the binhex module. | 
 | 7640 |  | 
 | 7641 | - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. | 
 | 7642 |  | 
 | 7643 | - The deprecated function string.maketrans has been removed. | 
 | 7644 |  | 
 | 7645 | - Issue #4005: Fixed a crash of pydoc when there was a zip file present in | 
 | 7646 |   sys.path. | 
 | 7647 |  | 
 | 7648 | - Issue #6218: io.StringIO and io.BytesIO instances are now picklable. | 
 | 7649 |  | 
 | 7650 | - The os.get_exec_path() function to return the list of directories that will be | 
 | 7651 |   searched for an executable when launching a subprocess was added. | 
 | 7652 |  | 
 | 7653 | - Issue #7481: When a threading.Thread failed to start it would leave the | 
 | 7654 |   instance stuck in initial state and present in threading.enumerate(). | 
 | 7655 |  | 
 | 7656 | - Issue #1068268: The subprocess module now handles EINTR in internal os.waitpid | 
 | 7657 |   and os.read system calls where appropriate. | 
 | 7658 |  | 
 | 7659 | - Issue #6729: Added ctypes.c_ssize_t to represent ssize_t. | 
 | 7660 |  | 
 | 7661 | - Issue #6247: The argparse module has been added to the standard library. | 
 | 7662 |  | 
 | 7663 | - Issue #8235: _socket: Add the constant ``SO_SETFIB``.  SO_SETFIB is a socket | 
 | 7664 |   option available on FreeBSD 7.1 and newer. | 
 | 7665 |  | 
 | 7666 | - Issue #9315: Fix for the trace module to record correct class name | 
 | 7667 |   for tracing methods. | 
 | 7668 |  | 
 | 7669 | Extension Modules | 
 | 7670 | ----------------- | 
 | 7671 |  | 
 | 7672 | - Issue #9959: Tweak formula used for computing math.log of an integer, | 
 | 7673 |   making it marginally more accurate for exact powers of 2. | 
 | 7674 |  | 
 | 7675 | - Issue #9422: Fix memory leak when re-initializing a struct.Struct object. | 
 | 7676 |  | 
 | 7677 | - Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly | 
 | 7678 |   compared to other unix systems. In particular, os.getgroups() does not reflect | 
 | 7679 |   any changes made using os.setgroups() but basicly always returns the same | 
 | 7680 |   information as the id command. os.getgroups() can now return more than 16 | 
 | 7681 |   groups on MacOSX. | 
 | 7682 |  | 
 | 7683 | - Issue #6095: Make directory argument to os.listdir optional. | 
 | 7684 |  | 
 | 7685 | - Issue #9277: Fix bug in struct.pack for bools in standard mode (e.g., | 
 | 7686 |   struct.pack('>?')): if conversion to bool raised an exception then that | 
 | 7687 |   exception wasn't properly propagated on machines where char is unsigned. | 
 | 7688 |  | 
 | 7689 | - Issue #5180: Fixed a bug that prevented loading 2.x pickles in 3.x python when | 
 | 7690 |   they contain instances of old-style classes. | 
 | 7691 |  | 
 | 7692 | - Issue #9165: Add new functions math.isfinite and cmath.isfinite, to accompany | 
 | 7693 |   existing isinf and isnan functions. | 
 | 7694 |  | 
 | 7695 | - Issue #1578269: Implement os.symlink for Windows 6.0+.  Patch by Jason | 
 | 7696 |   R. Coombs. | 
 | 7697 |  | 
 | 7698 | - In struct.pack, correctly propogate exceptions from computing the truth of an | 
 | 7699 |   object in the '?' format. | 
 | 7700 |  | 
 | 7701 | - Issue #9000: datetime.timezone objects now have eval-friendly repr. | 
 | 7702 |  | 
 | 7703 | - In the math module, correctly lookup __trunc__, __ceil__, and __floor__ as | 
 | 7704 |   special methods. | 
 | 7705 |  | 
 | 7706 | - Issue #9005: Prevent utctimetuple() from producing year 0 or year 10,000. | 
 | 7707 |   Prior to this change, timezone adjustment in utctimetuple() could produce | 
 | 7708 |   tm_year value of 0 or 10,000.  Now an OverflowError is raised in these edge | 
 | 7709 |   cases. | 
 | 7710 |  | 
 | 7711 | - Issue #6641: The ``datetime.strptime`` method now supports the ``%z`` | 
 | 7712 |   directive.  When the ``%z`` directive is present in the format string, an | 
 | 7713 |   aware ``datetime`` object is returned with ``tzinfo`` bound to a | 
 | 7714 |   ``datetime.timezone`` instance constructed from the parsed offset.  If both | 
 | 7715 |   ``%z`` and ``%Z`` are present, the data in ``%Z`` field is used for timezone | 
 | 7716 |   name, but ``%Z`` data without ``%z`` is discarded. | 
 | 7717 |  | 
 | 7718 | - Issue #5094: The ``datetime`` module now has a simple concrete class | 
 | 7719 |   implementing ``datetime.tzinfo`` interface.  Instances of the new class, | 
 | 7720 |   ``datetime.timezone``, return fixed name and UTC offset from their | 
 | 7721 |   ``tzname(dt)`` and ``utcoffset(dt)`` methods.  The ``dst(dt)`` method always | 
 | 7722 |   returns ``None``.  A class attribute, ``utc`` contains an instance | 
 | 7723 |   representing the UTC timezone.  Original patch by Rafe Kaplan. | 
 | 7724 |  | 
 | 7725 | - Issue #8973: Add __all__ to struct module; this ensures that help(struct) | 
 | 7726 |   includes documentation for the struct.Struct class. | 
 | 7727 |  | 
 | 7728 | - Issue #3129: Trailing digits in struct format string are no longer ignored. | 
 | 7729 |   For example, "1" or "ilib123" are now invalid formats and cause | 
 | 7730 |   ``struct.error`` to be raised.  Patch by Caleb Deveraux. | 
 | 7731 |  | 
 | 7732 | - Issue #7384: If the system readline library is linked against ncurses, the | 
 | 7733 |   curses module must be linked against ncurses as well. Otherwise it is not safe | 
 | 7734 |   to load both the readline and curses modules in an application. | 
 | 7735 |  | 
 | 7736 | - Issue #2810: Fix cases where the Windows registry API returns ERROR_MORE_DATA, | 
 | 7737 |   requiring a re-try in order to get the complete result. | 
 | 7738 |  | 
 | 7739 | - Issue #8692: Optimize math.factorial: replace the previous naive algorithm | 
 | 7740 |   with an improved 'binary-split' algorithm that uses fewer multiplications and | 
 | 7741 |   allows many of the multiplications to be performed using plain C integer | 
 | 7742 |   arithmetic instead of PyLong arithmetic.  Also uses a lookup table for small | 
 | 7743 |   arguments. | 
 | 7744 |  | 
 | 7745 | - Issue #8674: Fixed a number of incorrect or undefined-behaviour-inducing | 
 | 7746 |   overflow checks in the audioop module. | 
 | 7747 |  | 
 | 7748 | - Issue #8644: The accuracy of td.total_seconds() has been improved (by | 
 | 7749 |   calculating with integer arithmetic instead of float arithmetic internally): | 
 | 7750 |   the result is now always correctly rounded, and is equivalent to ``td / | 
 | 7751 |   timedelta(seconds=1)``. | 
 | 7752 |  | 
 | 7753 | - Issue #2706: Allow division of a timedelta by another timedelta: timedelta / | 
 | 7754 |   timedelta, timedelta % timedelta, timedelta // timedelta and divmod(timedelta, | 
 | 7755 |   timedelta) are all supported. | 
 | 7756 |  | 
 | 7757 | - Issue #8314: Fix unsigned long long bug in libffi on Sparc v8. | 
 | 7758 |  | 
 | 7759 | - Issue #8300: When passing a non-integer argument to struct.pack with any | 
 | 7760 |   integer format code, struct.pack first attempts to convert the non-integer | 
 | 7761 |   using its __index__ method.  If that method is non-existent or raises | 
 | 7762 |   TypeError it goes on to try the __int__ method, as described below. | 
 | 7763 |  | 
 | 7764 | - Issue #8142: Update libffi to the 3.0.9 release. | 
 | 7765 |  | 
 | 7766 | - Issue #6949: Allow the _dbm extension to be built with db 4.8.x. | 
 | 7767 |  | 
 | 7768 | - Issue #6544: Fix a reference leak in the kqueue implementation's error | 
 | 7769 |   handling. | 
 | 7770 |  | 
 | 7771 | - Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as | 
 | 7772 |   msvcr100.dll is not a platform assembly anymore. | 
 | 7773 |  | 
 | 7774 | - Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}. | 
 | 7775 |  | 
 | 7776 | - Issue #7078: Set struct.__doc__ from _struct.__doc__. | 
 | 7777 |  | 
 | 7778 | - Issue #3366: Add erf, erfc, expm1, gamma, lgamma functions to math module. | 
 | 7779 |  | 
 | 7780 | - Issue #6877: It is now possible to link the readline extension to the libedit | 
 | 7781 |   readline emulation on OSX 10.5 or later. | 
 | 7782 |  | 
 | 7783 | - Issue #6848: Fix curses module build failure on OS X 10.6. | 
 | 7784 |  | 
 | 7785 | - Fix a segfault that could be triggered by expat with specially formed input. | 
 | 7786 |  | 
 | 7787 | - Issue #6561: '\d' in a regex now matches only characters with Unicode category | 
 | 7788 |   'Nd' (Number, Decimal Digit).  Previously it also matched characters with | 
 | 7789 |   category 'No'. | 
 | 7790 |  | 
 | 7791 | - Issue #4509: Array objects are no longer modified after an operation failing | 
 | 7792 |   due to the resize restriction in-place when the object has exported buffers. | 
 | 7793 |  | 
 | 7794 | - Issue #2389: Array objects are now pickled in a portable manner. | 
 | 7795 |  | 
 | 7796 | - Expat: Fix DoS via XML document with malformed UTF-8 sequences | 
 | 7797 |   (CVE_2009_3560). | 
 | 7798 |  | 
 | 7799 | - Issue #7242: On Solaris 9 and earlier calling os.fork() from within a thread | 
 | 7800 |   could raise an incorrect RuntimeError about not holding the import lock.  The | 
 | 7801 |   import lock is now reinitialized after fork. | 
 | 7802 |  | 
 | 7803 | - Issue #7999: os.setreuid() and os.setregid() would refuse to accept a -1 | 
 | 7804 |   parameter on some platforms such as OS X. | 
 | 7805 |  | 
 | 7806 | - Build the ossaudio extension on GNU/kFreeBSD. | 
 | 7807 |  | 
 | 7808 | - Issue #7347: winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a bug in | 
 | 7809 |   the return value of QueryReflectionKey. | 
 | 7810 |  | 
 | 7811 | - Issue #7567: PyCurses_setupterm: Don't call ``setupterm`` twice. | 
 | 7812 |  | 
 | 7813 | Build | 
 | 7814 | ----- | 
 | 7815 |  | 
 | 7816 | - Use OpenSSL 1.0.0a on Windows. | 
 | 7817 |  | 
 | 7818 | - Issue #9280: Make sharedinstall depend on sharedmods. | 
 | 7819 |  | 
 | 7820 | - Issue #9189: Make a user-specified CFLAGS, CPPFLAGS, or LDFLAGS setting | 
 | 7821 |   override the configure and makefile defaults, without deleting options the | 
 | 7822 |   user didn't intend to override.  Developers should no longer need to specify | 
 | 7823 |   OPT or EXTRA_CFLAGS, although those variables are still present for | 
 | 7824 |   backward-compatibility. | 
 | 7825 |  | 
 | 7826 | - Issue #8854: Fix finding Visual Studio 2008 on Windows x64. | 
 | 7827 |  | 
 | 7828 | - Issue #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for | 
 | 7829 |   multiprocessing only. | 
 | 7830 |  | 
 | 7831 | - Issue #8625: Turn off optimization in --with-pydebug builds with gcc. | 
 | 7832 |   (Optimization was unintentionally turned on in gcc --with-pydebug builds as a | 
 | 7833 |   result of the issue #1628484 fix, combined with autoconf's strange choice of | 
 | 7834 |   default CFLAGS produced by AC_PROG_CC for gcc.) | 
 | 7835 |  | 
 | 7836 | - Issue #3646: It is now easily possible to install a Python framework into your | 
 | 7837 |   home directory on MacOSX, see Mac/README for more information. | 
 | 7838 |  | 
 | 7839 | - Issue #3928: os.mknod() now available in Solaris, also. | 
 | 7840 |  | 
 | 7841 | - Issue #3326: Build Python without -fno-strict-aliasing when the gcc does not | 
 | 7842 |   give false warnings. | 
 | 7843 |  | 
 | 7844 | - Issue #1628484: The Makefile doesn't ignore the CFLAGS environment variable | 
 | 7845 |   anymore.  It also forwards the LDFLAGS settings to the linker when building a | 
 | 7846 |   shared library. | 
 | 7847 |  | 
 | 7848 | - Issue #6716: Quote -x arguments of compileall in MSI installer.  Exclude 2to3 | 
 | 7849 |   tests from compileall. | 
 | 7850 |  | 
 | 7851 | - Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9. | 
 | 7852 |  | 
 | 7853 | - Issue #7632: When Py_USING_MEMORY_DEBUGGER is defined, disable the private | 
 | 7854 |   memory allocation scheme in dtoa.c and use PyMem_Malloc and PyMem_Free | 
 | 7855 |   instead.  Also disable caching of powers of 5. | 
 | 7856 |  | 
 | 7857 | - Issue #6491: Allow --with-dbmliborder to specify that no dbms will be built. | 
 | 7858 |  | 
 | 7859 | - Issue #6943: Use pkg-config to find the libffi headers when the | 
 | 7860 |   --with-system-ffi flag is used. | 
 | 7861 |  | 
 | 7862 | - Issue #7609: Add a --with-system-expat option that causes the system's expat | 
 | 7863 |   library to be used for the pyexpat module instead of the one included with | 
 | 7864 |   Python. | 
 | 7865 |  | 
 | 7866 | - Issue #7589: Only build the nis module when the correct header files are | 
 | 7867 |   found. | 
 | 7868 |  | 
 | 7869 | - Switch to OpenSSL 0.9.8l and sqlite 3.6.21 on Windows. | 
 | 7870 |  | 
 | 7871 | - Issue #5792: Extend the short float repr support to x86 systems using | 
 | 7872 |   icc or suncc. | 
 | 7873 |  | 
 | 7874 | - Issue #6603: Change READ_TIMESTAMP macro in ceval.c so that it compiles | 
 | 7875 |   correctly under gcc on x86-64.  This fixes a reported problem with the | 
 | 7876 |   --with-tsc build on x86-64. | 
 | 7877 |  | 
 | 7878 | - Issue #6802: Fix build issues on MacOSX 10.6. | 
 | 7879 |  | 
 | 7880 | - Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6. | 
 | 7881 |  | 
 | 7882 | - Issue #4601: 'make install' did not set the appropriate permissions on | 
 | 7883 |   directories. | 
 | 7884 |  | 
 | 7885 | - Issue #5390: Add uninstall icon independent of whether file extensions are | 
 | 7886 |   installed. | 
 | 7887 |  | 
 | 7888 | - Issue #7541: When using ``python-config`` with a framework install the | 
 | 7889 |   compiler might use the wrong library. | 
 | 7890 |  | 
 | 7891 | - python-config now supports multiple options on the same command line. | 
 | 7892 |  | 
 | 7893 | - Issue #8509: Fix quoting in help strings and code snippets in configure.in. | 
 | 7894 |  | 
 | 7895 | - Issue #8510: Update to autoconf2.65. | 
 | 7896 |  | 
 | 7897 | Documentation | 
 | 7898 | ------------- | 
 | 7899 |  | 
 | 7900 | - Issue #9817: Add expat COPYING file; add expat, libffi and expat licenses | 
 | 7901 |   to Doc/license.rst. | 
 | 7902 |  | 
 | 7903 | - Issue #9524: Document that two CTRL* signals are meant for use only | 
 | 7904 |   with os.kill. | 
 | 7905 |  | 
 | 7906 | - Issue #9255: Document that the 'test' package is meant for internal Python use | 
 | 7907 |   only. | 
 | 7908 |  | 
 | 7909 | - A small WSGI server was added as Tools/scripts/serve.py, and is used to | 
 | 7910 |   implement a local documentation server via 'make serve' in the doc directory. | 
 | 7911 |  | 
 | 7912 | - Updating `Using Python` documentation to include description of CPython's -J | 
 | 7913 |   and -X options. | 
 | 7914 |  | 
 | 7915 | - Document that importing a module that has None in sys.modules triggers an | 
 | 7916 |   ImportError. | 
 | 7917 |  | 
 | 7918 | - Issue #6556: Fixed the Distutils configuration files location explanation for | 
 | 7919 |   Windows. | 
 | 7920 |  | 
 | 7921 | - Update python manual page (options -B, -O0, -s, environment variables | 
 | 7922 |   PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE). | 
 | 7923 |  | 
 | 7924 | - Issue #8909: Added the size of the bitmap used in the installer created by | 
 | 7925 |   distutils' bdist_wininst. Patch by Anatoly Techtonik. | 
 | 7926 |  | 
 | 7927 | Tests | 
 | 7928 | ----- | 
 | 7929 |  | 
 | 7930 | - Issue #9251: test_threaded_import didn't fail when run through regrtest if the | 
 | 7931 |   import lock was disabled. | 
 | 7932 |  | 
 | 7933 | - Issue #8605: Skip test_gdb if Python is compiled with optimizations. | 
 | 7934 |  | 
 | 7935 | - Issue #7449: Skip test_socketserver if threading support is disabled. | 
 | 7936 |  | 
 | 7937 | - Issue #8672: Add a zlib test ensuring that an incomplete stream can be handled | 
 | 7938 |   by a decompressor object without errors (it returns incomplete uncompressed | 
 | 7939 |   data). | 
 | 7940 |  | 
 | 7941 | - Issue #8533: regrtest uses backslashreplace error handler for stdout to avoid | 
 | 7942 |   UnicodeEncodeError (write non-ASCII character to stdout using ASCII encoding). | 
 | 7943 |  | 
 | 7944 | - Issue #8576: Remove use of find_unused_port() in test_smtplib and | 
 | 7945 |   test_multiprocessing.  Patch by Paul Moore. | 
 | 7946 |  | 
 | 7947 | - Issue #7449: Fix many tests to support Python compiled without thread | 
 | 7948 |   support. Patches written by Jerry Seutter. | 
 | 7949 |  | 
 | 7950 | - Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of | 
 | 7951 |   SSL shutdowns. | 
 | 7952 |  | 
 | 7953 | - Issues #8279, #8330, #8437, #8480, #8495: Fix test_gdb failures, patch written | 
 | 7954 |   by Dave Malcolm. | 
 | 7955 |  | 
 | 7956 | - Issue #3864: Skip three test_signal tests on freebsd6 because they fail if any | 
 | 7957 |   thread was previously started, most likely due to a platform bug. | 
 | 7958 |  | 
 | 7959 | - Issue #8193: Fix test_zlib failure with zlib 1.2.4. | 
 | 7960 |  | 
 | 7961 | - Issue #8248: Add some tests for the bool type.  Patch by Gregory Nofi. | 
 | 7962 |  | 
 | 7963 | - Issue #8263: Now regrtest.py will report a failure if it receives a | 
 | 7964 |   KeyboardInterrupt (SIGINT). | 
 | 7965 |  | 
 | 7966 | - Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special | 
 | 7967 |   Unicode normalization cases. | 
 | 7968 |  | 
 | 7969 | - Issue #7783: test.support.open_urlresource invalidates the outdated files from | 
 | 7970 |   the local cache. | 
 | 7971 |  | 
 | 7972 | - Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are | 
 | 7973 |   effectively raised. | 
 | 7974 |  | 
 | 7975 | - The four path modules (genericpath, macpath, ntpath, posixpath) share a common | 
 | 7976 |   TestCase for some tests: test_genericpath.CommonTest. | 
 | 7977 |  | 
 | 7978 | - Print platform information when running the whole test suite, or using the | 
 | 7979 |   --verbose flag. | 
 | 7980 |  | 
 | 7981 | - Issue #767675: enable test_pep277 on POSIX platforms with Unicode-friendly | 
 | 7982 |   filesystem encoding. | 
 | 7983 |  | 
 | 7984 | - Issue #6292: for the moment at least, the test suite runs cleanly if python is | 
 | 7985 |   run with the -OO flag.  Tests requiring docstrings are skipped. | 
 | 7986 |  | 
 | 7987 | - Issue #7712: test.support gained a new `temp_cwd` context manager which is now | 
 | 7988 |   also used by regrtest to run all the tests in a temporary directory.  The | 
 | 7989 |   original CWD is saved in `support.SAVEDCWD`.  Thanks to Florent Xicluna who | 
 | 7990 |   helped with the patch. | 
 | 7991 |  | 
 | 7992 | - Issue #7924: Fix an intermittent 'XXX undetected error' failure in test_capi | 
 | 7993 |   (only seen so far on platforms where the curses module wasn't built), due to | 
 | 7994 |   an uncleared exception. | 
 | 7995 |  | 
 | 7996 | - Issue #7728: test_timeout was changed to use support.bind_port instead of a | 
 | 7997 |   hard coded port. | 
 | 7998 |  | 
 | 7999 | - Issue #7376: Instead of running a self-test (which was failing) when called | 
 | 8000 |   with no arguments, doctest.py now gives a usage message. | 
 | 8001 |  | 
 | 8002 | - Issue #7396: fix regrtest -s, which was broken by the -j enhancement. | 
 | 8003 |  | 
 | 8004 | - Issue #7498: test_multiprocessing now uses test.support.find_unused_port | 
 | 8005 |   instead of a hardcoded port number in test_rapid_restart. | 
 | 8006 |  | 
 | 8007 | - Issue #7431: Use TESTFN in test_linecache instead of trying to create a file | 
 | 8008 |   in the Lib/test directory, which might be read-only for the user running the | 
 | 8009 |   tests. | 
 | 8010 |  | 
 | 8011 | - Issue #7324: Add a sanity check to regrtest argument parsing to catch the case | 
 | 8012 |   of an option with no handler. | 
 | 8013 |  | 
 | 8014 | - Issue #7312: Add a -F flag to run the selected tests in a loop until a test | 
 | 8015 |   fails.  Can be combined with -j. | 
 | 8016 |  | 
 | 8017 | - Issue #6551: test_zipimport could import and then destroy some modules of the | 
 | 8018 |   encodings package, which would make other tests fail further down the road | 
 | 8019 |   because the internally cached encoders and decoders would point to empty | 
 | 8020 |   global variables. | 
 | 8021 |  | 
 | 8022 | - Issue #7295: Do not use a hardcoded file name in test_tarfile. | 
 | 8023 |  | 
 | 8024 | - Issue #7270: Add some dedicated unit tests for multi-thread synchronization | 
 | 8025 |   primitives such as Lock, RLock, Condition, Event and Semaphore. | 
 | 8026 |  | 
 | 8027 | - Issue #7248 (part 2): Use a unique temporary directory for importlib source | 
 | 8028 |   tests instead of tempfile.tempdir. This prevents the tests from sharing state | 
 | 8029 |   between concurrent executions on the same system. | 
 | 8030 |  | 
 | 8031 | - Issue #7248: In importlib.test.source.util a try/finally block did not make | 
 | 8032 |   sure that some referenced objects actually were created in the block before | 
 | 8033 |   calling methods on the object. | 
 | 8034 |  | 
 | 8035 | - Issue #7222: Make thread "reaping" more reliable so that reference | 
 | 8036 |   leak-chasing test runs give sensible results.  The previous method of reaping | 
 | 8037 |   threads could return successfully while some Thread objects were still | 
 | 8038 |   referenced.  This also introduces a new private function: | 
 | 8039 |   ``_thread._count()``. | 
 | 8040 |  | 
 | 8041 | - Issue #7151: Fixed regrtest -j so that output to stderr from a test no longer | 
 | 8042 |   runs the risk of causing the worker thread to fail. | 
 | 8043 |  | 
 | 8044 | - Issue #7055: test___all__ now greedily detects all modules which have an | 
 | 8045 |   __all__ attribute, rather than using a hardcoded and incomplete list. | 
 | 8046 |  | 
 | 8047 | - Issue #7058: Added save/restore for things like sys.argv and cwd to | 
 | 8048 |   runtest_inner in regrtest, with warnings if the called test modifies them, and | 
 | 8049 |   a new section in the summary report at the end. | 
 | 8050 |  | 
 | 8051 | - Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6. | 
 | 8052 |  | 
 | 8053 | - Fixed tests in importlib.test.source.test_abc_loader that were masking the | 
 | 8054 |   proper exceptions that should be raised for missing or improper code object | 
 | 8055 |   bytecode. | 
 | 8056 |  | 
 | 8057 | - Removed importlib's custom test discovery code and switched to | 
 | 8058 |   unittest.TestLoader.discover(). | 
 | 8059 |  | 
 | 8060 | Tools/Demos | 
 | 8061 | ----------- | 
 | 8062 |  | 
 | 8063 | - Issue #5464, #8974: Implement plural forms in msgfmt.py. | 
 | 8064 |  | 
 | 8065 | - iobench (a file I/O benchmark) and ccbench (a concurrency benchmark) were | 
 | 8066 |   added to the `Tools/` directory.  They were previously living in the sandbox. | 
 | 8067 |  | 
 | 8068 |  | 
 | 8069 | What's New in Python 3.1? | 
 | 8070 | ========================= | 
 | 8071 |  | 
 | 8072 | *Release date: 27-June-2009* | 
 | 8073 |  | 
 | 8074 | Core and Builtins | 
 | 8075 | ----------------- | 
 | 8076 |  | 
 | 8077 | - Issue #6334: Fix bug in range length calculation for ranges with | 
 | 8078 |   large arguments. | 
 | 8079 |  | 
 | 8080 | - Issue #6329: Fixed iteration for memoryview objects (it was being blocked | 
 | 8081 |   because it wasn't recognized as a sequence). | 
 | 8082 |  | 
 | 8083 | Library | 
 | 8084 | ------- | 
 | 8085 |  | 
 | 8086 | - Issue #6126: Fixed pdb command-line usage. | 
 | 8087 |  | 
 | 8088 | - Issue #6314: logging: performs extra checks on the "level" argument. | 
 | 8089 |  | 
 | 8090 | - Issue #6274: Fixed possible file descriptors leak in subprocess.py | 
 | 8091 |  | 
 | 8092 | - Accessing io.StringIO.buffer now raises an AttributeError instead of | 
 | 8093 |   io.UnsupportedOperation. | 
 | 8094 |  | 
 | 8095 | - Issue #6271: mmap tried to close invalid file handle (-1) when anonymous. | 
 | 8096 |   (On Unix) | 
 | 8097 |  | 
 | 8098 | - Issue #1202: zipfile module would cause a struct.error when attempting to | 
 | 8099 |   store files with a CRC32 > 2**31-1. | 
 | 8100 |  | 
 | 8101 | Extension Modules | 
 | 8102 | ----------------- | 
 | 8103 |  | 
 | 8104 | - Issue #5590: Remove unused global variable in pyexpat extension. | 
 | 8105 |  | 
 | 8106 |  | 
 | 8107 | What's New in Python 3.1 Release Candidate 2? | 
 | 8108 | ============================================= | 
 | 8109 |  | 
 | 8110 | *Release date: 13-June-2009* | 
 | 8111 |  | 
 | 8112 | Core and Builtins | 
 | 8113 | ----------------- | 
 | 8114 |  | 
 | 8115 | - Fixed SystemError triggered by "range([], 1, -1)". | 
 | 8116 |  | 
 | 8117 | - Issue #5924: On Windows, a large PYTHONPATH environment variable | 
 | 8118 |   (more than 255 characters) would be completely ignored. | 
 | 8119 |  | 
 | 8120 | - Issue #4547: When debugging a very large function, it was not always | 
 | 8121 |   possible to update the lineno attribute of the current frame. | 
 | 8122 |  | 
 | 8123 | - Issue #5330: C functions called with keyword arguments were not reported by | 
 | 8124 |   the various profiling modules (profile, cProfile). Patch by Hagen Fürstenau. | 
 | 8125 |  | 
 | 8126 | Library | 
 | 8127 | ------- | 
 | 8128 |  | 
 | 8129 | - Issue #6438: Fixed distutils.cygwinccompiler.get_versions : the regular | 
 | 8130 |   expression string pattern was trying to match against a bytes returned by | 
 | 8131 |   Popen. Tested under win32 to build the py-postgresql project. | 
 | 8132 |  | 
 | 8133 | - Issue #6258: Support AMD64 in bdist_msi. | 
 | 8134 |  | 
 | 8135 | - Issue #6195: fixed doctest to no longer try to read 'source' data from | 
 | 8136 |   binary files. | 
 | 8137 |  | 
 | 8138 | - Issue #5262: Fixed bug in next rollover time computation in | 
 | 8139 |   TimedRotatingFileHandler. | 
 | 8140 |  | 
 | 8141 | - Issue #6217: The C implementation of io.TextIOWrapper didn't include the | 
 | 8142 |   errors property.  Additionally, the errors and encoding properties of StringIO | 
 | 8143 |   are always None now. | 
 | 8144 |  | 
 | 8145 | - Issue #6137: The pickle module now translates module names when loading | 
 | 8146 |   or dumping pickles with a 2.x-compatible protocol, in order to make data | 
 | 8147 |   sharing and migration easier. This behaviour can be disabled using the | 
 | 8148 |   new `fix_imports` optional argument. | 
 | 8149 |  | 
 | 8150 | - Removed the ipaddr module. | 
 | 8151 |  | 
 | 8152 | - Issue #3613: base64.{encode,decode}string are now called | 
 | 8153 |   base64.{encode,decode}bytes which reflects what type they accept and return. | 
 | 8154 |   The old names are still there as deprecated aliases. | 
 | 8155 |  | 
 | 8156 | - Issue #5767: Remove sgmlop support from xmlrpc.client. | 
 | 8157 |  | 
 | 8158 | - Issue #6150: Fix test_unicode on wide-unicode builds. | 
 | 8159 |  | 
 | 8160 | - Issue #6149: Fix initialization of WeakValueDictionary objects from non-empty | 
 | 8161 |   parameters. | 
 | 8162 |  | 
 | 8163 | Windows | 
 | 8164 | ------- | 
 | 8165 |  | 
 | 8166 | - Issue #6221: Delete test registry key before running the test. | 
 | 8167 |  | 
 | 8168 | - Issue #6158: Package Sine-1000Hz-300ms.aif in MSI file. | 
 | 8169 |  | 
 | 8170 | C-API | 
 | 8171 | ----- | 
 | 8172 |  | 
 | 8173 | - Issue #5735: Python compiled with --with-pydebug should throw an | 
 | 8174 |   ImportError when trying to import modules compiled without | 
 | 8175 |   --with-pydebug, and vice-versa. | 
 | 8176 |  | 
 | 8177 |  | 
 | 8178 | Build | 
 | 8179 | ----- | 
 | 8180 |  | 
 | 8181 | - Issue #6154: Make sure the intl library is added to LIBS if needed. Also | 
 | 8182 |   added LIBS to OS X framework builds. | 
 | 8183 |  | 
 | 8184 | - Issue #5809: Specifying both --enable-framework and --enable-shared is | 
 | 8185 |   an error. Configure now explicity tells you about this. | 
 | 8186 |  | 
 | 8187 |  | 
 | 8188 |  | 
 | 8189 | What's New in Python 3.1 release candidate 1? | 
 | 8190 | ============================================= | 
 | 8191 |  | 
 | 8192 | *Release date: 2009-05-30* | 
 | 8193 |  | 
 | 8194 | Core and Builtins | 
 | 8195 | ----------------- | 
 | 8196 |  | 
 | 8197 | - Issue #6097: Escape UTF-8 surrogates resulting from mbstocs conversion | 
 | 8198 |   of the command line. | 
 | 8199 |  | 
 | 8200 | - Issue #6012: Add cleanup support to O& argument parsing. | 
 | 8201 |  | 
 | 8202 | - Issue #6089: Fixed str.format with certain invalid field specifiers | 
 | 8203 |   that would raise SystemError. | 
 | 8204 |  | 
 | 8205 | - Issue #5982: staticmethod and classmethod now expose the wrapped | 
 | 8206 |   function with __func__. | 
 | 8207 |  | 
 | 8208 | - Added support for multiple context managers in the same with-statement. | 
 | 8209 |   Deprecated contextlib.nested() which is no longer needed. | 
 | 8210 |  | 
 | 8211 | - Issue #5829: complex("1e500") no longer raises OverflowError.  This | 
 | 8212 |   makes it consistent with float("1e500") and interpretation of real | 
 | 8213 |   and imaginary literals. | 
 | 8214 |  | 
 | 8215 | - Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more. | 
 | 8216 |  | 
 | 8217 | - Issue #5994: the marshal module now has docstrings. | 
 | 8218 |  | 
 | 8219 | - Issue #5981: Fix three minor inf/nan issues in float.fromhex: | 
 | 8220 |   (1) inf and nan strings with trailing whitespace were incorrectly | 
 | 8221 |   rejected;  (2) parsing of strings representing infinities and nans | 
 | 8222 |   was locale aware; and (3) the interpretation of fromhex('-nan') | 
 | 8223 |   didn't match that of float('-nan'). | 
 | 8224 |  | 
 | 8225 | Library | 
 | 8226 | ------- | 
 | 8227 |  | 
 | 8228 | - Issue #4859: Implement PEP 383 for pwd, spwd, and grp. | 
 | 8229 |  | 
 | 8230 | - smtplib 'login' and 'cram-md5' login are also fixed (see Issue #5259). | 
 | 8231 |  | 
 | 8232 | - Issue #6121: pydoc now ignores leading and trailing spaces in the | 
 | 8233 |   argument to the 'help' function. | 
 | 8234 |  | 
 | 8235 | - Issue #6118: urllib.parse.quote_plus ignored the encoding and errors | 
 | 8236 |   arguments for strings with a space in them. | 
 | 8237 |  | 
 | 8238 | - collections.namedtuple() was not working with the following field | 
 | 8239 |   names:  cls, self, tuple, itemgetter, and property. | 
 | 8240 |  | 
 | 8241 | - In unittest, using a skipping decorator on a class is now equivalent to | 
 | 8242 |   skipping every test on the class.  The ClassTestSuite class has been removed. | 
 | 8243 |  | 
 | 8244 | - Issue #6050: Don't fail extracting a directory from a zipfile if | 
 | 8245 |   the directory already exists. | 
 | 8246 |  | 
 | 8247 | - Issue #1309352: fcntl now converts its third arguments to a C `long` rather | 
 | 8248 |   than an int, which makes some operations possible under 64-bit Linux (e.g. | 
 | 8249 |   DN_MULTISHOT with F_NOTIFY). | 
 | 8250 |  | 
 | 8251 | - Issue #5761: Add the name of the underlying file to the repr() of various | 
 | 8252 |   IO objects. | 
 | 8253 |  | 
 | 8254 | - Issue #5259: smtplib plain auth login no longer gives a traceback.  Fix | 
 | 8255 |   by Musashi Tamura, tests by Marcin Bachry. | 
 | 8256 |  | 
 | 8257 | - Issue #1983: Fix functions taking or returning a process identifier to use | 
 | 8258 |   the dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have | 
 | 8259 |   a process identifier type wider than the standard C integer type. | 
 | 8260 |  | 
 | 8261 | - Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket. | 
 | 8262 |   Patch by Farhan Ahmad, test by Marcin Bachry. | 
 | 8263 |  | 
 | 8264 | - Issue #2116: Weak references and weak dictionaries now support copy()ing and | 
 | 8265 |   deepcopy()ing. | 
 | 8266 |  | 
 | 8267 | - Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. | 
 | 8268 |  | 
 | 8269 | - Issue #5918: Fix a crash in the parser module. | 
 | 8270 |  | 
 | 8271 | - Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr. | 
 | 8272 |  | 
 | 8273 | - Issue #5006: Better handling of unicode byte-order marks (BOM) in the io | 
 | 8274 |   library. This means, for example, that opening an UTF-16 text file in | 
 | 8275 |   append mode doesn't add a BOM at the end of the file if the file isn't | 
 | 8276 |   empty. | 
 | 8277 |  | 
 | 8278 | - Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source' | 
 | 8279 |   file is a binary.  Patch by Brodie Rao, tests by Daniel Diniz.  This fix | 
 | 8280 |   corrects a pydoc regression. | 
 | 8281 |  | 
 | 8282 | - Issue #5955: aifc's close method did not close the file it wrapped, | 
 | 8283 |   now it does.  This also means getfp method now returns the real fp. | 
 | 8284 |  | 
 | 8285 | Installation | 
 | 8286 | ------------ | 
 | 8287 |  | 
 | 8288 | - Issue #6047: fullinstall has been removed because Python 3's executable will | 
 | 8289 |   now be known as python3. | 
 | 8290 |  | 
 | 8291 | - Lib/smtpd.py is no longer installed as a script. | 
 | 8292 |  | 
 | 8293 | Extension Modules | 
 | 8294 | ----------------- | 
 | 8295 |  | 
 | 8296 | - Issue #3061: Use wcsftime for time.strftime where available. | 
 | 8297 |  | 
 | 8298 | - Issue #4873: Fix resource leaks in error cases of pwd and grp. | 
 | 8299 |  | 
 | 8300 | - Issue #6093: Fix off-by-one error in locale.strxfrm. | 
 | 8301 |  | 
 | 8302 | - The _functools and _locale modules are now built into the libpython shared | 
 | 8303 |   library instead of as extension modules. | 
 | 8304 |  | 
 | 8305 | Build | 
 | 8306 | ----- | 
 | 8307 |  | 
 | 8308 | - Issue #3585: Add pkg-config support. It creates a python-2.7.pc file | 
 | 8309 |   and a python3.pc symlink in the $(LIBDIR)/pkgconfig directory. Patch by | 
 | 8310 |   Clinton Roy. | 
 | 8311 |  | 
 | 8312 | Tests | 
 | 8313 | ----- | 
 | 8314 |  | 
 | 8315 | - Issue #5442: Tests for importlib were not properly skipping case-sensitivity | 
 | 8316 |   tests on darwin even when the OS was installed on a case-sensitive | 
 | 8317 |   filesystem. Also fixed tests that should not be run when | 
 | 8318 |   sys.dont_write_bytecode is true. | 
 | 8319 |  | 
 | 8320 |  | 
 | 8321 | What's New in Python 3.1 beta 1? | 
 | 8322 | ================================ | 
 | 8323 |  | 
 | 8324 | *Release date: 2009-05-06* | 
 | 8325 |  | 
 | 8326 | Core and Builtins | 
 | 8327 | ----------------- | 
 | 8328 |  | 
 | 8329 | - Issue #5914: Add new C API function PyOS_string_to_double, and | 
 | 8330 |   deprecate PyOS_ascii_strtod and PyOS_ascii_atof. | 
 | 8331 |  | 
 | 8332 | - Issue #3382: float.__format__, complex.__format__, and %-formatting | 
 | 8333 |   no longer map 'F' to 'f'. Because of issue #5859 (below), this only | 
 | 8334 |   affects nan -> NAN and inf -> INF. | 
 | 8335 |  | 
 | 8336 | - Issue #5799: ntpath (ie, os.path on Windows) fully supports UNC pathnames | 
 | 8337 |   in all operations, including splitdrive, split, etc.  splitunc() now issues | 
 | 8338 |   a PendingDeprecation warning. | 
 | 8339 |  | 
 | 8340 | - Issue #5920: For float.__format__, change the behavior with the | 
 | 8341 |   empty presentation type (that is, not one of 'e', 'f', 'g', or 'n') | 
 | 8342 |   to be like 'g' but with at least one decimal point and with a | 
 | 8343 |   default precision of 12. Previously, the behavior the same but with | 
 | 8344 |   a default precision of 6.  This more closely matches str(), and | 
 | 8345 |   reduces surprises when adding alignment flags to the empty | 
 | 8346 |   presentation type. This also affects the new complex.__format__ in | 
 | 8347 |   the same way. | 
 | 8348 |  | 
 | 8349 | - Implement PEP 383, Non-decodable Bytes in System Character Interfaces. | 
 | 8350 |  | 
 | 8351 | - Issue #5890: in subclasses of 'property' the __doc__ attribute was | 
 | 8352 |   shadowed by classtype's, even if it was None.  property now | 
 | 8353 |   inserts the __doc__ into the subclass instance __dict__. | 
 | 8354 |  | 
 | 8355 | - Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal | 
 | 8356 |   sequences. Patch by Nick Barnes and Victor Stinner. | 
 | 8357 |  | 
 | 8358 | - Issue #3672: Reject surrogates in utf-8 codec; add surrogatepass error handler. | 
 | 8359 |  | 
 | 8360 | - Issue #5883: In the io module, the BufferedIOBase and TextIOBase ABCs have | 
 | 8361 |   received a new method, detach().  detach() disconnects the underlying stream | 
 | 8362 |   from the buffer or text IO and returns it. | 
 | 8363 |  | 
 | 8364 | - Issue #5859: Remove switch from '%f' to '%g'-style formatting for | 
 | 8365 |   floats with absolute value over 1e50.  Also remove length | 
 | 8366 |   restrictions for float formatting: '%.67f' % 12.34 and '%.120e' % | 
 | 8367 |   12.34 no longer raise an exception. | 
 | 8368 |  | 
 | 8369 | - Issue #1588: Add complex.__format__. For example, | 
 | 8370 |   format(complex(1, 2./3), '.5') now produces a sensible result. | 
 | 8371 |  | 
 | 8372 | - Issue #5864: Fix empty format code formatting for floats so that it | 
 | 8373 |   never gives more than the requested number of significant digits. | 
 | 8374 |  | 
 | 8375 | - Issue #5793: Rationalize isdigit / isalpha / tolower, etc. Includes | 
 | 8376 |   new Py_ISDIGIT / Py_ISALPHA / Py_TOLOWER, etc. in pctypes.h. | 
 | 8377 |  | 
 | 8378 | - Issue #5835: Deprecate PyOS_ascii_formatd. | 
 | 8379 |  | 
 | 8380 | - Issue #4971: Fix titlecase for characters that are their own | 
 | 8381 |   titlecase, but not their own uppercase. | 
 | 8382 |  | 
 | 8383 | - Issue #5283: Setting __class__ in __del__ caused a segfault. | 
 | 8384 |  | 
 | 8385 | - Issue #5816: complex(repr(z)) now recovers z exactly, even when | 
 | 8386 |   z involves nans, infs or negative zeros. | 
 | 8387 |  | 
 | 8388 | - Issue #3166: Make int -> float conversions correctly rounded. | 
 | 8389 |  | 
 | 8390 | - Issue #1869 (and many duplicates): make round(x, n) correctly | 
 | 8391 |   rounded for a float x, by using the decimal <-> binary conversions | 
 | 8392 |   from Python/dtoa.c.  As a consequence, (e.g.) round(x, 2) now | 
 | 8393 |   consistently agrees with format(x, '.2f'). | 
 | 8394 |  | 
 | 8395 | - Issue #5787: object.__getattribute__(some_type, "__bases__") segfaulted on | 
 | 8396 |   some builtin types. | 
 | 8397 |  | 
 | 8398 | - Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100'. | 
 | 8399 |  | 
 | 8400 | - Issue #5515: str.format() type 'n' combined with commas and leading | 
 | 8401 |   zeros no longer gives odd results with ints and floats. | 
 | 8402 |  | 
 | 8403 | - Implement PEP 378, Format Specifier for Thousands Separator, for | 
 | 8404 |   floats. | 
 | 8405 |  | 
 | 8406 | - The str function switches to exponential notation at | 
 | 8407 |   1e11, not 1e12.  This avoids printing 13 significant digits in | 
 | 8408 |   situations where only 12 of them are correct.  Example problem | 
 | 8409 |   value: str(1e11 + 0.5).  (This minor issue has existed in 2.x for a | 
 | 8410 |   long time.) | 
 | 8411 |  | 
 | 8412 | - Issue #1580: On most platforms, use a 'short' float repr: for a | 
 | 8413 |   finite float x, repr(x) now outputs a string based on the shortest | 
 | 8414 |   sequence of decimal digits that rounds to x.  Previous behaviour was | 
 | 8415 |   to output 17 significant digits and then strip trailing zeros. | 
 | 8416 |   Another minor difference is that the new repr switches to | 
 | 8417 |   exponential notation at 1e16 instead of the previous 1e17; this | 
 | 8418 |   avoids misleading output in some cases. | 
 | 8419 |  | 
 | 8420 |   There's a new sys attribute sys.float_repr_style, which takes | 
 | 8421 |   the value 'short' to indicate that we're using short float repr, | 
 | 8422 |   and 'legacy' if the short float repr isn't available for one | 
 | 8423 |   reason or another. | 
 | 8424 |  | 
 | 8425 |   The float repr change involves incorporating David Gay's 'perfect | 
 | 8426 |   rounding' code into the Python core (it's in Python/dtoa.c).  As a | 
 | 8427 |   secondary consequence, all string-to-float and float-to-string | 
 | 8428 |   conversions (including all float formatting operations) will be | 
 | 8429 |   correctly rounded on these platforms. | 
 | 8430 |  | 
 | 8431 |   See issue #1580 discussions for details of platforms for which | 
 | 8432 |   this change does not apply. | 
 | 8433 |  | 
 | 8434 | - Issue #5759: float() didn't call __float__ on str subclasses. | 
 | 8435 |  | 
 | 8436 | - The string.maketrans() function is deprecated; there is a new static method | 
 | 8437 |   maketrans() on the bytes and bytearray classes.  This removes confusion about | 
 | 8438 |   the types string.maketrans() is supposed to work with, and mirrors the | 
 | 8439 |   methods available on the str class. | 
 | 8440 |  | 
 | 8441 | - Issue #2170: refactored xml.dom.minidom.normalize, increasing both | 
 | 8442 |   its clarity and its speed. | 
 | 8443 |  | 
 | 8444 | - Issue #1113244: Py_XINCREF, Py_DECREF, Py_XDECREF: Add ``do { ... } while (0)`` | 
 | 8445 |   to avoid compiler warnings. | 
 | 8446 |  | 
 | 8447 | - Issue #3739: The unicode-internal encoder now reports the number of characters | 
 | 8448 |   consumed like any other encoder (instead of the number of bytes). | 
 | 8449 |  | 
 | 8450 | Installation | 
 | 8451 | ------------ | 
 | 8452 |  | 
 | 8453 | - Issue #5756: Install idle and pydoc with a 3 suffix. | 
 | 8454 |  | 
 | 8455 | Library | 
 | 8456 | ------- | 
 | 8457 |  | 
 | 8458 | - Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument. | 
 | 8459 |  | 
 | 8460 | - Issue #5311: bdist_msi can now build packages that do not depend on a | 
 | 8461 |   specific Python version. | 
 | 8462 |  | 
 | 8463 | - Issue #5150: IDLE's format menu now has an option to strip trailing | 
 | 8464 |   whitespace. | 
 | 8465 |  | 
 | 8466 | - Issue #5940: distutils.command.build_clib.check_library_list was not doing | 
 | 8467 |   the right type checkings anymore. | 
 | 8468 |  | 
 | 8469 | - Issue #4875: On win32, ctypes.util.find_library does no longer | 
 | 8470 |   return directories. | 
 | 8471 |  | 
 | 8472 | - Issue #5142: Add the ability to skip modules while stepping to pdb. | 
 | 8473 |  | 
 | 8474 | - Issue #1309567: Fix linecache behavior of stripping subdirectories when | 
 | 8475 |   looking for files given by a relative filename. | 
 | 8476 |  | 
 | 8477 | - Issue #5923: Update the ``turtle`` module to version 1.1, add two new | 
 | 8478 |   turtle demos in Demo/turtle. | 
 | 8479 |  | 
 | 8480 | - Issue #5692: In ``zipfile.Zipfile``, fix wrong path calculation when | 
 | 8481 |   extracting a file to the root directory. | 
 | 8482 |  | 
 | 8483 | - Issue #5913: os.listdir() should fail for empty path on windows. | 
 | 8484 |  | 
 | 8485 | - Issue #5084: unpickling now interns the attribute names of pickled objects, | 
 | 8486 |   saving memory and avoiding growth in size of subsequent pickles. Proposal | 
 | 8487 |   and original patch by Jake McGuire. | 
 | 8488 |  | 
 | 8489 | - The json module now works exclusively with str and not bytes. | 
 | 8490 |  | 
 | 8491 | - Issue #3959: The ipaddr module has been added to the standard library. | 
 | 8492 |   Contributed by Google. | 
 | 8493 |  | 
 | 8494 | - Issue #3002: ``shutil.copyfile()`` and ``shutil.copytree()`` now raise an | 
 | 8495 |   error when a named pipe is encountered, rather than blocking infinitely. | 
 | 8496 |  | 
 | 8497 | - Issue #5857: tokenize.tokenize() now returns named tuples. | 
 | 8498 |  | 
 | 8499 | - Issue #4305: ctypes should now build again on mipsel-linux-gnu | 
 | 8500 |  | 
 | 8501 | - Issue #1734234: Massively speedup ``unicodedata.normalize()`` when the | 
 | 8502 |   string is already in normalized form, by performing a quick check beforehand. | 
 | 8503 |   Original patch by Rauli Ruohonen. | 
 | 8504 |  | 
 | 8505 | - Issue #5853: calling a function of the mimetypes module from several threads | 
 | 8506 |   at once could hit the recursion limit if the mimetypes database hadn't been | 
 | 8507 |   initialized before. | 
 | 8508 |  | 
 | 8509 | - Issue #5854: Updated __all__ to include some missing names and remove some | 
 | 8510 |   names which should not be exported. | 
 | 8511 |  | 
 | 8512 | - Issue #3102:  All global symbols that the _ctypes extension defines | 
 | 8513 |   are now prefixed with 'Py' or '_ctypes'. | 
 | 8514 |  | 
 | 8515 | - Issue #5041: ctypes does now allow pickling wide character. | 
 | 8516 |  | 
 | 8517 | - Issue #5812: For the two-argument form of the Fraction constructor, | 
 | 8518 |   Fraction(m, n), m and n are permitted to be arbitrary Rational | 
 | 8519 |   instances. | 
 | 8520 |  | 
 | 8521 | - Issue #5812: Fraction('1e6') is valid: more generally, any string | 
 | 8522 |   that's valid for float() is now valid for Fraction(), with the | 
 | 8523 |   exception of strings representing NaNs and infinities. | 
 | 8524 |  | 
 | 8525 | - Issue #5734: BufferedRWPair was poorly tested and had several glaring | 
 | 8526 |   bugs. Patch by Brian Quinlan. | 
 | 8527 |  | 
 | 8528 | - Issue #1161031: fix readwrite select flag handling: POLLPRI now | 
 | 8529 |   results in a handle_expt_event call, not handle_read_event, and POLLERR | 
 | 8530 |   and POLLNVAL now call handle_close, not handle_expt_event.  Also, | 
 | 8531 |   dispatcher now has an 'ignore_log_types' attribute for suppressing | 
 | 8532 |   log messages, which is set to 'warning' by default. | 
 | 8533 |  | 
 | 8534 | - Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for | 
 | 8535 |   new arguments introduced in 2.5. | 
 | 8536 |  | 
 | 8537 | - Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in | 
 | 8538 |   makeunicodedata.py and regenerated the Unicode database (This fixes | 
 | 8539 |   u'\u1d79'.lower() == '\x00'). | 
 | 8540 |  | 
 | 8541 | Extension Modules | 
 | 8542 | ----------------- | 
 | 8543 |  | 
 | 8544 | - Issue #5881: Remove old undocumented compatibility interfaces in hashlib and | 
 | 8545 |   pwd. | 
 | 8546 |  | 
 | 8547 | - Issue #5463: In struct module, remove deprecated float coercion | 
 | 8548 |   for integer type codes: struct.pack('L', 0.3) should now raise | 
 | 8549 |   an error.  The _PY_STRUCT_FLOAT_COERCE constant has been removed. | 
 | 8550 |   The version number has been bumped to 0.3. | 
 | 8551 |  | 
 | 8552 | - Issue #5359: Readd the Berkeley DB detection code to allow _dbm be built | 
 | 8553 |   using Berkeley DB. | 
 | 8554 |  | 
 | 8555 | Tests | 
 | 8556 | ----- | 
 | 8557 |  | 
 | 8558 | - Issue #5354: New test support function import_fresh_module() makes | 
 | 8559 |   it easy to import both normal and optimised versions of modules. | 
 | 8560 |   test_heapq and test_warnings have been adjusted to use it, tests for | 
 | 8561 |   other modules with both C and Python implementations in the stdlib | 
 | 8562 |   can be adjusted to use it over time. | 
 | 8563 |  | 
 | 8564 | - Issue #5837: Certain sequences of calls to set() and unset() for | 
 | 8565 |   support.EnvironmentVarGuard objects restored the environment variables | 
 | 8566 |   incorrectly on __exit__. | 
 | 8567 |  | 
 | 8568 | C-API | 
 | 8569 | ----- | 
 | 8570 |  | 
 | 8571 | - Issue #5630: A replacement PyCObject API, PyCapsule, has been added. | 
 | 8572 |  | 
 | 8573 |  | 
 | 8574 | What's New in Python 3.1 alpha 2? | 
 | 8575 | ================================= | 
 | 8576 |  | 
 | 8577 | *Release date: 2009-4-4* | 
 | 8578 |  | 
 | 8579 | Core and Builtins | 
 | 8580 | ----------------- | 
 | 8581 |  | 
 | 8582 | - Implement PEP 378, Format Specifier for Thousands Separator, for | 
 | 8583 |   integers. | 
 | 8584 |  | 
 | 8585 | - Issue #5666: Py_BuildValue's 'c' code should create byte strings. | 
 | 8586 |  | 
 | 8587 | - Issue #5499: The 'c' code for argument parsing functions now only accepts a | 
 | 8588 |   byte, and the 'C' code only accepts a unicode character. | 
 | 8589 |  | 
 | 8590 | - Fix a problem in PyErr_NormalizeException that leads to "undetected errors" | 
 | 8591 |   when hitting the recursion limit under certain circumstances. | 
 | 8592 |  | 
 | 8593 | - Issue #1665206: Remove the last eager import in _warnings.c and make it lazy. | 
 | 8594 |  | 
 | 8595 | - Fix a segfault when running test_exceptions with coverage, caused by | 
 | 8596 |   insufficient checks in accessors of Exception.__context__. | 
 | 8597 |  | 
 | 8598 | - Issue #5604: non-ASCII characters in module name passed to | 
 | 8599 |   imp.find_module() were converted to UTF-8 while the path is | 
 | 8600 |   converted to the default filesystem encoding, causing nonsense. | 
 | 8601 |  | 
 | 8602 | - Issue #5126: str.isprintable() returned False for space characters. | 
 | 8603 |  | 
 | 8604 | - Issue #4865: On MacOSX /Library/Python/2.7/site-packages is added to | 
 | 8605 |   the end sys.path, for compatibility with the system install of Python. | 
 | 8606 |  | 
 | 8607 | - Issue #4688: Add a heuristic so that tuples and dicts containing only | 
 | 8608 |   untrackable objects are not tracked by the garbage collector. This can | 
 | 8609 |   reduce the size of collections and therefore the garbage collection overhead | 
 | 8610 |   on long-running programs, depending on their particular use of datatypes. | 
 | 8611 |  | 
 | 8612 | - Issue #5512: Rewrite PyLong long division algorithm (x_divrem) to | 
 | 8613 |   improve its performance.  Long divisions and remainder operations | 
 | 8614 |   are now between 50% and 150% faster. | 
 | 8615 |  | 
 | 8616 | - Issue #4258: Make it possible to use base 2**30 instead of base | 
 | 8617 |   2**15 for the internal representation of integers, for performance | 
 | 8618 |   reasons.  Base 2**30 is enabled by default on 64-bit machines.  Add | 
 | 8619 |   --enable-big-digits option to configure, which overrides the | 
 | 8620 |   default.  Add sys.int_info structseq to provide information about | 
 | 8621 |   the internal format. | 
 | 8622 |  | 
 | 8623 | - Issue #4474: PyUnicode_FromWideChar now converts characters outside | 
 | 8624 |   the BMP to surrogate pairs, on systems with sizeof(wchar_t) == 4 | 
 | 8625 |   and sizeof(Py_UNICODE) == 2. | 
 | 8626 |  | 
 | 8627 | - Issue #5237: Allow auto-numbered fields in str.format(). For | 
 | 8628 |   example: '{} {}'.format(1, 2) == '1 2'. | 
 | 8629 |  | 
 | 8630 | - Issue #5392: when a very low recursion limit was set, the interpreter would | 
 | 8631 |   abort with a fatal error after the recursion limit was hit twice. | 
 | 8632 |  | 
 | 8633 | - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with | 
 | 8634 |   short file names. | 
 | 8635 |  | 
 | 8636 | Library | 
 | 8637 | ------- | 
 | 8638 |  | 
 | 8639 | - Issue #2625: added missing items() call to the for loop in | 
 | 8640 |   mailbox.MH.get_message(). | 
 | 8641 |  | 
 | 8642 | - Issue #5640: Fix _multibytecodec so that CJK codecs don't repeat | 
 | 8643 |   error substitutions from non-strict codec error callbacks in | 
 | 8644 |   incrementalencoder and StreamWriter. | 
 | 8645 |  | 
 | 8646 | - Issue #5656: Fix the coverage reporting when running the test suite with | 
 | 8647 |   the -T argument. | 
 | 8648 |  | 
 | 8649 | - Issue #5647: MutableSet.__iand__() no longer mutates self during iteration. | 
 | 8650 |  | 
 | 8651 | - Issue #5624: Fix the _winreg module name still used in several modules. | 
 | 8652 |  | 
 | 8653 | - Issue #5628: Fix io.TextIOWrapper.read() with a unreadable buffer. | 
 | 8654 |  | 
 | 8655 | - Issue #5619: Multiprocessing children disobey the debug flag and causes | 
 | 8656 |   popups on windows buildbots. Patch applied to work around this issue. | 
 | 8657 |  | 
 | 8658 | - Issue #5400: Added patch for multiprocessing on netbsd compilation/support | 
 | 8659 |  | 
 | 8660 | - Issue #5387: Fixed mmap.move crash by integer overflow. | 
 | 8661 |  | 
 | 8662 | - Issue #5261: Patch multiprocessing's semaphore.c to support context | 
 | 8663 |   manager use: "with multiprocessing.Lock()" works now. | 
 | 8664 |  | 
 | 8665 | - Issue #5236: Change time.strptime() to only take strings. Didn't work with | 
 | 8666 |   bytes already but the failure was non-obvious. | 
 | 8667 |  | 
 | 8668 | - Issue #5177: Multiprocessing's SocketListener class now uses | 
 | 8669 |   socket.SO_REUSEADDR on all connections so that the user no longer needs | 
 | 8670 |   to wait 120 seconds for the socket to expire. | 
 | 8671 |  | 
 | 8672 | - Issue #5595: Fix UnboundedLocalError in ntpath.ismount(). | 
 | 8673 |  | 
 | 8674 | - Issue #1174606: Calling read() without arguments of an unbounded file | 
 | 8675 |   (typically /dev/zero under Unix) could crash the interpreter. | 
 | 8676 |  | 
 | 8677 | - The max_buffer_size arguments of io.BufferedWriter, io.BufferedRWPair, and | 
 | 8678 |   io.BufferedRandom have been deprecated for removal in Python 3.2. | 
 | 8679 |  | 
 | 8680 | - Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop | 
 | 8681 |   forever on incomplete input. That caused tarfile.open() to hang when used | 
 | 8682 |   with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or | 
 | 8683 |   partial bzip2 compressed data. | 
 | 8684 |  | 
 | 8685 | - Issue #2110: Add support for thousands separator and 'n' type | 
 | 8686 |   specifier to Decimal.__format__ | 
 | 8687 |  | 
 | 8688 | - Fix Decimal.__format__ bug that swapped the meanings of the '<' and | 
 | 8689 |   '>' alignment characters. | 
 | 8690 |  | 
 | 8691 | - The error detection code in FileIO.close() could fail to reflect the `errno` | 
 | 8692 |   value, and report it as -1 instead. | 
 | 8693 |  | 
 | 8694 | - Issue #5016: FileIO.seekable() could return False if the file position | 
 | 8695 |   was negative when truncated to a C int. Patch by Victor Stinner. | 
 | 8696 |  | 
 | 8697 | Extension Modules | 
 | 8698 | ----------------- | 
 | 8699 |  | 
 | 8700 | - Issue #5391: mmap now deals exclusively with bytes. | 
 | 8701 |  | 
 | 8702 | - Issue #5463: In struct module, remove deprecated overflow wrapping | 
 | 8703 |   when packing an integer: struct.pack('=L', -1) now raises | 
 | 8704 |   struct.error instead of returning b'\xff\xff\xff\xff'.  The | 
 | 8705 |   _PY_STRUCT_RANGE_CHECKING and _PY_STRUCT_OVERFLOW_MASKING constants | 
 | 8706 |   have been removed from the struct module. | 
 | 8707 |  | 
 | 8708 |  | 
 | 8709 | What's New in Python 3.1 alpha 1 | 
 | 8710 | ================================ | 
 | 8711 |  | 
 | 8712 | *Release date: 2009-03-07* | 
 | 8713 |  | 
 | 8714 | Core and Builtins | 
 | 8715 | ----------------- | 
 | 8716 |  | 
 | 8717 | - The io module has been reimplemented in C for speed. | 
 | 8718 |  | 
 | 8719 | - Give dict views an informative __repr__. | 
 | 8720 |  | 
 | 8721 | - Issue #5247: Improve error message when unknown format codes are | 
 | 8722 |   used when using str.format() with str, int, and float arguments. | 
 | 8723 |  | 
 | 8724 | - Issue #5249: time.strftime returned malformed string when format string | 
 | 8725 |   contained non ascii character on windows. | 
 | 8726 |  | 
 | 8727 | - Issue #4626: compile(), exec(), and eval() ignore the coding cookie if the | 
 | 8728 |   source has already been decoded into str. | 
 | 8729 |  | 
 | 8730 | - Issue #5186: Reduce hash collisions for objects with no __hash__ method by | 
 | 8731 |   rotating the object pointer by 4 bits to the right. | 
 | 8732 |  | 
 | 8733 | - Issue #4575: Fix Py_IS_INFINITY macro to work correctly on x87 FPUs: | 
 | 8734 |   it now forces its argument to double before testing for infinity. | 
 | 8735 |  | 
 | 8736 | - Issue #5137: Make len() correctly raise a TypeError when a __len__ method | 
 | 8737 |   returns a non-number type. | 
 | 8738 |  | 
 | 8739 | - Issue #5182: Removed memoryview.__str__. | 
 | 8740 |  | 
 | 8741 | - Issue #1717: Removed builtin cmp() function, dropped tp_compare | 
 | 8742 |   slot, the C API functions PyObject_Compare and PyUnicode_Compare and | 
 | 8743 |   the type definition cmpfunc.  The tp_compare slot has been renamed | 
 | 8744 |   to tp_reserved, and is reserved for future usage. | 
 | 8745 |  | 
 | 8746 | - Issue #1242657: the __len__() and __length_hint__() calls in several tools | 
 | 8747 |   were suppressing all exceptions.  These include list() and bytearray(). | 
 | 8748 |  | 
 | 8749 | - Issue #4707: round(x, n) now returns an integer if x is an integer. | 
 | 8750 |   Previously it returned a float. | 
 | 8751 |  | 
 | 8752 | - Issue #4753: By enabling a configure option named '--with-computed-gotos' | 
 | 8753 |   on compilers that support it (notably: gcc, SunPro, icc), the bytecode | 
 | 8754 |   evaluation loop is compiled with a new dispatch mechanism which gives | 
 | 8755 |   speedups of up to 20%, depending on the system, on various benchmarks. | 
 | 8756 |  | 
 | 8757 | - Issue #4874: Most builtin decoders now reject unicode input. | 
 | 8758 |  | 
 | 8759 | - Issue #4842: Don't allow trailing 'L' when constructing an integer | 
 | 8760 |   from a string. | 
 | 8761 |  | 
 | 8762 | - Issue #4991: os.fdopen now raises an OSError for invalid file descriptors. | 
 | 8763 |  | 
 | 8764 | - Issue #4838: When a module is deallocated, free the memory backing the | 
 | 8765 |   optional module state data. | 
 | 8766 |  | 
 | 8767 | - Issue #4910: Rename nb_long slot to nb_reserved, and change its | 
 | 8768 |   type to ``(void *)``. | 
 | 8769 |  | 
 | 8770 | - Issue #4935: The overflow checking code in the expandtabs() method common | 
 | 8771 |   to str, bytes and bytearray could be optimized away by the compiler, letting | 
 | 8772 |   the interpreter segfault instead of raising an error. | 
 | 8773 |  | 
 | 8774 | - Issue #3720: Fix a crash when an iterator modifies its class and removes its | 
 | 8775 |   __next__ method. | 
 | 8776 |  | 
 | 8777 | - Issue #4910: Builtin int() function and PyNumber_Long/PyNumber_Int API | 
 | 8778 |   function no longer attempt to call the __long__ slot to convert an object | 
 | 8779 |   to an integer.  Only the __int__ and __trunc__ slots are examined. | 
 | 8780 |  | 
 | 8781 | - Issue #4893: Use NT threading on CE. | 
 | 8782 |  | 
 | 8783 | - Issue #4915: Port sysmodule to Windows CE. | 
 | 8784 |  | 
 | 8785 | - Issue #4868: utf-8, utf-16 and latin1 decoding are now 2x to 4x faster. The | 
 | 8786 |   common cases are optimized thanks to a dedicated fast path and a moderate | 
 | 8787 |   amount of loop unrolling. | 
 | 8788 |  | 
 | 8789 | - Issue #4074: Change the criteria for doing a full garbage collection (i.e. | 
 | 8790 |   collecting the oldest generation) so that allocating lots of objects without | 
 | 8791 |   destroying them does not show quadratic performance. Based on a proposal by | 
 | 8792 |   Martin von Löwis at | 
 | 8793 |   http://mail.python.org/pipermail/python-dev/2008-June/080579.html. | 
 | 8794 |  | 
 | 8795 | - Issue #4604: Some objects of the I/O library could still be used after | 
 | 8796 |   having been closed (for instance, a read() call could return some | 
 | 8797 |   previously buffered data). Patch by Dmitry Vasiliev. | 
 | 8798 |  | 
 | 8799 | - Issue #4705: Fix the -u ("unbuffered binary stdout and stderr") command-line | 
 | 8800 |   flag to work properly. Furthermore, when specifying -u, the text stdout | 
 | 8801 |   and stderr streams have line-by-line buffering enabled (the default being | 
 | 8802 |   to buffer arbitrary chunks of data). | 
 | 8803 |  | 
 | 8804 | - The internal table, _PyLong_DigitValue, is now an array of unsigned chars | 
 | 8805 |   instead of ints (reducing its size from 4 to 8 times thereby reducing | 
 | 8806 |   Python's overall memory). | 
 | 8807 |  | 
 | 8808 | - Issue #1180193: When importing a module from a .pyc (or .pyo) file with | 
 | 8809 |   an existing .py counterpart, override the co_filename attributes of all | 
 | 8810 |   code objects if the original filename is obsolete (which can happen if the | 
 | 8811 |   file has been renamed, moved, or if it is accessed through different paths). | 
 | 8812 |   Patch by Ziga Seilnacht and Jean-Paul Calderone. | 
 | 8813 |  | 
 | 8814 | - Issue #4580: Fix slicing of memoryviews when the item size is greater than | 
 | 8815 |   one byte. Also fixes the meaning of len() so that it returns the number of | 
 | 8816 |   items, rather than the size in bytes. | 
 | 8817 |  | 
 | 8818 | - Issue #4075: Use OutputDebugStringW in Py_FatalError. | 
 | 8819 |  | 
 | 8820 | - Issue #4747: When the terminal does not use utf-8, executing a script with | 
 | 8821 |   non-ascii characters in its name could fail with a "SyntaxError: None" error. | 
 | 8822 |  | 
 | 8823 | - Issue #4797: IOError.filename was not set when ``_fileio.FileIO`` failed | 
 | 8824 |   to open file with a bytes filename on Windows. | 
 | 8825 |  | 
 | 8826 | - Issue #3680: Reference cycles created through a dict, set or deque iterator | 
 | 8827 |   did not get collected. | 
 | 8828 |  | 
 | 8829 | - Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types | 
 | 8830 |   where the tp_hash and tp_dict slots are both NULL. | 
 | 8831 |  | 
 | 8832 | - Issue #4759: None is now allowed as the first argument of | 
 | 8833 |   bytearray.translate().  It was always allowed for bytes.translate(). | 
 | 8834 |  | 
 | 8835 | - Added test case to ensure attempts to read from a file opened for writing | 
 | 8836 |   fail. | 
 | 8837 |  | 
 | 8838 | - Issue #3106: Speedup some comparisons (str/str and int/int). | 
 | 8839 |  | 
 | 8840 | - Issue #2183: Simplify and optimize bytecode for list, dict and set | 
 | 8841 |   comprehensions. Original patch for list comprehensions by Neal Norwitz. | 
 | 8842 |  | 
 | 8843 | - Issue #2467: gc.DEBUG_STATS reported invalid elapsed times. Also, always | 
 | 8844 |   print elapsed times, not only when some objects are uncollectable / | 
 | 8845 |   unreachable. Original patch by Neil Schemenauer. | 
 | 8846 |  | 
 | 8847 | - Issue #3439: Add a bit_length method to int. | 
 | 8848 |  | 
 | 8849 | - Issue #2173: When getting device encoding, check that return value of | 
 | 8850 |   nl_langinfo is not the empty string.  This was causing silent build | 
 | 8851 |   failures on OS X. | 
 | 8852 |  | 
 | 8853 | - Issue #4597: Fixed several opcodes that weren't always propagating | 
 | 8854 |   exceptions. | 
 | 8855 |  | 
 | 8856 | - Issue #4589: Fixed exception handling when the __exit__ function of a | 
 | 8857 |   context manager returns a value that cannot be converted to a bool. | 
 | 8858 |  | 
 | 8859 | - Issue #4445: Replace "sizeof(PyBytesObject)" with | 
 | 8860 |   "offsetof(PyBytesObject, ob_sval) + 1" when allocating memory for | 
 | 8861 |   bytes instances.  On a typical machine this saves 3 bytes of memory | 
 | 8862 |   (on average) per allocation of a bytes instance. | 
 | 8863 |  | 
 | 8864 | - Issue #4533: File read operation was dreadfully slow due to a slowly | 
 | 8865 |   growing read buffer. Fixed by using the same growth rate algorithm as | 
 | 8866 |   Python 2.x. | 
 | 8867 |  | 
 | 8868 | - Issue #4509: Various issues surrounding resize of bytearray objects to | 
 | 8869 |   which there are buffer exports (e.g. memoryview instances). | 
 | 8870 |  | 
 | 8871 | - Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()`` | 
 | 8872 |   method on file objects with closefd=False. The file descriptor is still | 
 | 8873 |   kept open but the file object behaves like a closed file. The ``FileIO`` | 
 | 8874 |   object also got a new readonly attribute ``closefd``. | 
 | 8875 |  | 
 | 8876 | - Issue #4569: Interpreter crash when mutating a memoryview with an item size | 
 | 8877 |   larger than 1. | 
 | 8878 |  | 
 | 8879 | - Issue #4748: Lambda generators no longer return a value. | 
 | 8880 |  | 
 | 8881 | - The re.sub(), re.subn() and re.split() functions now accept a flags parameter. | 
 | 8882 |  | 
 | 8883 | - Issue #5108: Handle %s like %S, %R and %A in PyUnicode_FromFormatV(): Call | 
 | 8884 |   PyUnicode_DecodeUTF8() once, remember the result and output it in a second | 
 | 8885 |   step. This avoids problems with counting UTF-8 bytes that ignores the effect | 
 | 8886 |   of using the replace error handler in PyUnicode_DecodeUTF8(). | 
 | 8887 |  | 
 | 8888 | Library | 
 | 8889 | ------- | 
 | 8890 |  | 
 | 8891 | - Issue #7071: byte-compilation in Distutils is now done with respect to | 
 | 8892 |   sys.dont_write_bytecode. | 
 | 8893 |  | 
 | 8894 | - Issue #7066: archive_util.make_archive now restores the cwd if an error is | 
 | 8895 |   raised. Initial patch by Ezio Melotti. | 
 | 8896 |  | 
 | 8897 | - Issue #6516: Added owner/group support when creating tar archives in | 
 | 8898 |   Distutils. | 
 | 8899 |  | 
 | 8900 | - Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. | 
 | 8901 |  | 
 | 8902 | - Issue #6163: Fixed HP-UX runtime library dir options in | 
 | 8903 |   distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and | 
 | 8904 |   Michael Haubenwallner. | 
 | 8905 |  | 
 | 8906 | - Issue #6693: New functions in site.py to get user/global site packages paths. | 
 | 8907 |  | 
 | 8908 | - Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when | 
 | 8909 |   opening an empty or very small file. | 
 | 8910 |  | 
 | 8911 | - Issue #6545: Removed assert statements in distutils.Extension, so the | 
 | 8912 |   behavior is similar when used with -O. | 
 | 8913 |  | 
 | 8914 | - unittest has been split up into a package.  All old names should still work. | 
 | 8915 |  | 
 | 8916 | - Issue #6466: now distutils.cygwinccompiler and distutils.emxccompiler | 
 | 8917 |   uses the same refactored function to get gcc/ld/dllwrap versions numbers. | 
 | 8918 |   It's `distutils.util.get_compiler_versions`. Added deprecation warnings | 
 | 8919 |   for the obsolete get_versions() functions. | 
 | 8920 |  | 
 | 8921 | - Issue #6433: fixed issues with multiprocessing.pool.map hanging on empty list | 
 | 8922 |  | 
 | 8923 | - Issue #6314: logging: Extra checks on the "level" argument in more places. | 
 | 8924 |  | 
 | 8925 | - Issue #2622: Fixed an ImportError when importing email.message from a | 
 | 8926 |   standalone application built with py2exe or py2app. | 
 | 8927 |  | 
 | 8928 | - Issue #6455: Fixed test_build_ext under win32. | 
 | 8929 |  | 
 | 8930 | - Issue #6377: Enabled the compiler option, and deprecate its usage as an | 
 | 8931 |   attribute. | 
 | 8932 |  | 
 | 8933 | - Issue #6413: Fixed the log level in distutils.dist for announce. | 
 | 8934 |  | 
 | 8935 | - Issue #6403: Fixed package path usage in build_ext. | 
 | 8936 |  | 
 | 8937 | - Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was | 
 | 8938 |   unconditionally calling "os.close(sys.stdin.fileno())" resulting in file | 
 | 8939 |   descriptor errors | 
 | 8940 |  | 
 | 8941 | - Issue #6365: Distutils build_ext inplace mode was copying the compiled | 
 | 8942 |   extension in a subdirectory if the extension name had dots. | 
 | 8943 |  | 
 | 8944 | - Issue #6164: Added an AIX specific linker argument in Distutils | 
 | 8945 |   unixcompiler. Original patch by Sridhar Ratnakumar. | 
 | 8946 |  | 
 | 8947 | - Issue #6286: Now Distutils upload command is based on urllib2 instead of | 
 | 8948 |   httplib, allowing the usage of http_proxy. | 
 | 8949 |  | 
 | 8950 | - Issue #6287: Added the license field in Distutils documentation. | 
 | 8951 |  | 
 | 8952 | - Issue #6263: Fixed syntax error in distutils.cygwincompiler. | 
 | 8953 |  | 
 | 8954 | - Issue #5201: distutils.sysconfig.parse_makefile() now understands `$$` | 
 | 8955 |   in Makefiles. This prevents compile errors when using syntax like: | 
 | 8956 |   `LDFLAGS='-rpath=\$$LIB:/some/other/path'`. Patch by Floris Bruynooghe. | 
 | 8957 |  | 
 | 8958 | - Issue #6131: test_modulefinder leaked when run after test_distutils. | 
 | 8959 |   Patch by Hirokazu Yamamoto. | 
 | 8960 |  | 
 | 8961 | - Issue #6048: Now Distutils uses the tarfile module in archive_util. | 
 | 8962 |  | 
 | 8963 | - Issue #6062: In distutils, fixed the package option of build_ext. Feedback | 
 | 8964 |   and tests on pywin32 by Tim Golden. | 
 | 8965 |  | 
 | 8966 | - Issue #6053: Fixed distutils tests on win32. patch by Hirokazu Yamamoto. | 
 | 8967 |  | 
 | 8968 | - Issue #6046: Fixed the library extension when distutils build_ext is used | 
 | 8969 |   inplace. Initial patch by Roumen Petrov. | 
 | 8970 |  | 
 | 8971 | - Issue #6041: Now distutils `sdist` and `register` commands use `check` as a | 
 | 8972 |   subcommand. | 
 | 8973 |  | 
 | 8974 | - Issue #6022: a test file was created in the current working directory by | 
 | 8975 |   test_get_outputs in Distutils. | 
 | 8976 |  | 
 | 8977 | - Issue #5977: distutils build_ext.get_outputs was not taking into account the | 
 | 8978 |   inplace option. Initial patch by kxroberto. | 
 | 8979 |  | 
 | 8980 | - Issue #5984: distutils.command.build_ext.check_extensions_list checks were broken | 
 | 8981 |   for old-style extensions. | 
 | 8982 |  | 
 | 8983 | - Issue #5976: Fixed Distutils test_check_environ. | 
 | 8984 |  | 
 | 8985 | - Issue #5941: Distutils build_clib command was not working anymore because | 
 | 8986 |   of an incomplete costumization of the archiver command. Added ARFLAGS in the | 
 | 8987 |   Makefile besides AR and make Distutils use it. Original patch by David | 
 | 8988 |   Cournapeau. | 
 | 8989 |  | 
 | 8990 | - Issue #2245: aifc now skips chunk types it doesn't recognize, per spec. | 
 | 8991 |  | 
 | 8992 | - Issue #5874: distutils.tests.test_config_cmd is not locale-sensitive | 
 | 8993 |   anymore. | 
 | 8994 |  | 
 | 8995 | - Issue #5810: Fixed Distutils test_build_scripts so it uses | 
 | 8996 |   sysconfig.get_config_vars. | 
 | 8997 |  | 
 | 8998 | - Issue #4951: Fixed failure in test_httpservers. | 
 | 8999 |  | 
 | 9000 | - Issue #5795: Fixed test_distutils failure on Debian ppc. | 
 | 9001 |  | 
 | 9002 | - Issue #5607: fixed Distutils test_get_platform for Mac OS X fat binaries. | 
 | 9003 |  | 
 | 9004 | - Issue #5741: don't disallow "%%" (which is an escape for "%") when setting | 
 | 9005 |   a value in SafeConfigParser. | 
 | 9006 |  | 
 | 9007 | - Issue #5732: added a new command in Distutils: check. | 
 | 9008 |  | 
 | 9009 | - Issue #5731: Distutils bdist_wininst no longer worked on non-Windows | 
 | 9010 |   platforms. Initial patch by Paul Moore. | 
 | 9011 |  | 
 | 9012 | - Issue #5095: Added bdist_msi to the list of bdist supported formats. | 
 | 9013 |   Initial fix by Steven Bethard. | 
 | 9014 |  | 
 | 9015 | - Issue #1491431: Fixed distutils.filelist.glob_to_re for edge cases. | 
 | 9016 |   Initial fix by Wayne Davison. | 
 | 9017 |  | 
 | 9018 | - Issue #5694: removed spurious test output in Distutils (test_clean). | 
 | 9019 |  | 
 | 9020 | - Issue #1326077: fix the formatting of SyntaxErrors by the traceback module. | 
 | 9021 |  | 
 | 9022 | - Issue #1665206 (partially): Move imports in cgitb to the top of the module | 
 | 9023 |   instead of performing them in functions. Helps prevent import deadlocking in | 
 | 9024 |   threads. | 
 | 9025 |  | 
 | 9026 | - Issue #2522: locale.format now checks its first argument to ensure it has | 
 | 9027 |   been passed only one pattern, avoiding mysterious errors where it appeared | 
 | 9028 |   that it was failing to do localization. | 
 | 9029 |  | 
 | 9030 | - Issue #5583: Added optional Extensions in Distutils. Initial patch by Georg | 
 | 9031 |   Brandl. | 
 | 9032 |  | 
 | 9033 | - Issue #1222: locale.format() bug when the thousands separator is a space | 
 | 9034 |   character. | 
 | 9035 |  | 
 | 9036 | - Issue #5472: Fixed distutils.test_util tear down. Original patch by | 
 | 9037 |   Tim Golden. | 
 | 9038 |  | 
 | 9039 | - collections.deque() objects now have a read-only attribute called maxlen. | 
 | 9040 |  | 
 | 9041 | - Issue #2638: Show a window constructed with tkSimpleDialog.Dialog only after | 
 | 9042 |   it is has been populated and properly configured in order to prevent | 
 | 9043 |   window flashing. | 
 | 9044 |  | 
 | 9045 | - Issue #4792: Prevent a segfault in _tkinter by using the | 
 | 9046 |   guaranteed to be safe interp argument given to the PythonCmd in place of | 
 | 9047 |   the Tcl interpreter taken from a PythonCmd_ClientData. | 
 | 9048 |  | 
 | 9049 | - Issue #5193: Guarantee that tkinter.Text.search returns a string. | 
 | 9050 |  | 
 | 9051 | - Issue #5394: removed > 2.3 syntax from distutils.msvc9compiler. | 
 | 9052 |   Original patch by Akira Kitada. | 
 | 9053 |  | 
 | 9054 | - Issue #5334: array.fromfile() failed to insert values when EOFError was raised. | 
 | 9055 |  | 
 | 9056 | - Issue #5385: Fixed mmap crash after resize failure on windows. | 
 | 9057 |  | 
 | 9058 | - Issue #5179: Fixed subprocess handle leak on failure on windows. | 
 | 9059 |  | 
 | 9060 | - PEP 372:  Added collections.OrderedDict(). | 
 | 9061 |  | 
 | 9062 | - The _asdict() for method for namedtuples now returns an OrderedDict(). | 
 | 9063 |  | 
 | 9064 | - configparser now defaults to using an ordered dictionary. | 
 | 9065 |  | 
 | 9066 | - Issue #5401: Fixed a performance problem in mimetypes when ``from mimetypes | 
 | 9067 |   import guess_extension`` was used. | 
 | 9068 |  | 
 | 9069 | - Issue #1733986: Fixed mmap crash in accessing elements of second map object | 
 | 9070 |   with same tagname but larger size than first map. (Windows) | 
 | 9071 |  | 
 | 9072 | - Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer | 
 | 9073 |   overrun. | 
 | 9074 |  | 
 | 9075 | - Issue #1533164: Installed but not listed ``*.pyo`` was breaking Distutils | 
 | 9076 |   bdist_rpm command. | 
 | 9077 |  | 
 | 9078 | - Issue #5378: added --quiet option to Distutils bdist_rpm command. | 
 | 9079 |  | 
 | 9080 | - Issue #5052: make Distutils compatible with 2.3 again. | 
 | 9081 |  | 
 | 9082 | - Issue #5316: Fixed buildbot failures introduced by multiple inheritance | 
 | 9083 |   in Distutils tests. | 
 | 9084 |  | 
 | 9085 | - Issue #5287: Add exception handling around findCaller() call to help out | 
 | 9086 |   IronPython. | 
 | 9087 |  | 
 | 9088 | - Issue #5282: Fixed mmap resize on 32bit windows and unix. When offset > 0, | 
 | 9089 |   The file was resized to wrong size. | 
 | 9090 |  | 
 | 9091 | - Issue #5292: Fixed mmap crash on its boundary access m[len(m)]. | 
 | 9092 |  | 
 | 9093 | - Issue #2279: distutils.sdist.add_defaults now add files | 
 | 9094 |   from the package_data and the data_files metadata. | 
 | 9095 |  | 
 | 9096 | - Issue #5257: refactored all tests in distutils, so they use | 
 | 9097 |   support.TempdirManager, to avoid writing in the tests directory. | 
 | 9098 |  | 
 | 9099 | - Issue #4524: distutils build_script command failed with --with-suffix=3. | 
 | 9100 |   Initial patch by Amaury Forgeot d'Arc. | 
 | 9101 |  | 
 | 9102 | - Issue #2461: added tests for distutils.util | 
 | 9103 |  | 
 | 9104 | - Issue #4998: The memory saving effect of __slots__ had been lost on Fractions | 
 | 9105 |   which inherited from numbers.py which did not have __slots__ defined.  The | 
 | 9106 |   numbers hierarchy now has its own __slots__ declarations. | 
 | 9107 |  | 
 | 9108 | - Issue #4631: Fix urlopen() result when an HTTP response uses chunked | 
 | 9109 |   encoding. | 
 | 9110 |  | 
 | 9111 | - Issue #5203: Fixed ctypes segfaults when passing a unicode string to a | 
 | 9112 |   function without argtypes (only occurs if HAVE_USABLE_WCHAR_T is false). | 
 | 9113 |  | 
 | 9114 | - Issue #3386: distutils.sysconfig.get_python_lib prefix argument was ignored | 
 | 9115 |   under NT and OS2. Patch by Philip Jenvey. | 
 | 9116 |  | 
 | 9117 | - Issue #5128: Make compileall properly inspect bytecode to determine if needs | 
 | 9118 |   to be recreated. This avoids a timing hole thanks to the old reliance on the | 
 | 9119 |   ctime of the files involved. | 
 | 9120 |  | 
 | 9121 | - Issue #5122: Synchronize tk load failure check to prevent a potential | 
 | 9122 |   deadlock. | 
 | 9123 |  | 
 | 9124 | - Issue #1818: collections.namedtuple() now supports a keyword argument | 
 | 9125 |   'rename' which lets invalid fieldnames be automatically converted to | 
 | 9126 |   positional names in the form, _1, _2, ... | 
 | 9127 |  | 
 | 9128 | - Issue #4890: Handle empty text search pattern in Tkinter.Text.search. | 
 | 9129 |  | 
 | 9130 | - Issue #4512 (part 2): Promote ``ZipImporter._get_filename()`` to be a | 
 | 9131 |   public documented method ``ZipImporter.get_filename()``. | 
 | 9132 |  | 
 | 9133 | - Issue #4195: The ``runpy`` module (and the ``-m`` switch) now support | 
 | 9134 |   the execution of packages by looking for and executing a ``__main__`` | 
 | 9135 |   submodule when a package name is supplied. Initial patch by Andi | 
 | 9136 |   Vajda. | 
 | 9137 |  | 
 | 9138 | - Issue #1731706: Call Tcl_ConditionFinalize for Tcl_Conditions that will | 
 | 9139 |   not be used again (this requires Tcl/Tk 8.3.1), also fix a memory leak in | 
 | 9140 |   Tkapp_Call when calling from a thread different than the one that created | 
 | 9141 |   the Tcl interpreter. Patch by Robert Hancock. | 
 | 9142 |  | 
 | 9143 | - Issue #4285: Change sys.version_info to be a named tuple. Patch by | 
 | 9144 |   Ross Light. | 
 | 9145 |  | 
 | 9146 | - Issue #1520877: Now distutils.sysconfig reads $AR from the | 
 | 9147 |   environment/Makefile. Patch by Douglas Greiman. | 
 | 9148 |  | 
 | 9149 | - Issue #1276768: The verbose option was not used in the code of | 
 | 9150 |   distutils.file_util and distutils.dir_util. | 
 | 9151 |  | 
 | 9152 | - Issue #5132: Fixed trouble building extensions under Solaris with | 
 | 9153 |   --enabled-shared activated. Initial patch by Dave Peterson. | 
 | 9154 |  | 
 | 9155 | - Issue #1581476: Always use the Tcl global namespace when calling into Tcl. | 
 | 9156 |  | 
 | 9157 | - The shelve module now defaults to pickle protocol 3. | 
 | 9158 |  | 
 | 9159 | - Fix a bug in the trace module where a bytes object from co_lnotab had its | 
 | 9160 |   items being passed through ord(). | 
 | 9161 |  | 
 | 9162 | - Issue #2047: shutil.move() could believe that its destination path was | 
 | 9163 |   inside its source path if it began with the same letters (e.g. "src" vs. | 
 | 9164 |   "src.new"). | 
 | 9165 |  | 
 | 9166 | - Added the ttk module. See issue #2983: Ttk support for Tkinter. | 
 | 9167 |  | 
 | 9168 | - Removed isSequenceType(), isMappingType, and isNumberType() from the | 
 | 9169 |   operator module; use the abstract base classes instead.  Also removed | 
 | 9170 |   the repeat() function; use mul() instead. | 
 | 9171 |  | 
 | 9172 | - Issue #5021:  doctest.testfile() did not create __name__ and | 
 | 9173 |   collections.namedtuple() relied on __name__ being defined. | 
 | 9174 |  | 
 | 9175 | - Backport importlib from Python 3.1. Only the import_module() function has | 
 | 9176 |   been backported to help facilitate transitions from 2.7 to 3.1. | 
 | 9177 |  | 
 | 9178 | - Issue #1885: distutils. When running sdist with --formats=tar,gztar | 
 | 9179 |   the tar file was overriden by the gztar one. | 
 | 9180 |  | 
 | 9181 | - Issue #4863: distutils.mwerkscompiler has been removed. | 
 | 9182 |  | 
 | 9183 | - Added a new itertools functions:  combinations_with_replacement() | 
 | 9184 |   and compress(). | 
 | 9185 |  | 
 | 9186 | - Issue #5032:  added a step argument to itertools.count() and | 
 | 9187 |   allowed non-integer arguments. | 
 | 9188 |  | 
 | 9189 | - Fix and properly document the multiprocessing module's logging | 
 | 9190 |   support, expose the internal levels and provide proper usage | 
 | 9191 |   examples. | 
 | 9192 |  | 
 | 9193 | - Issue #1672332: fix unpickling of subnormal floats, which was | 
 | 9194 |   producing a ValueError on some platforms. | 
 | 9195 |  | 
 | 9196 | - Issue #3881: Help Tcl to load even when started through the | 
 | 9197 |   unreadable local symlink to "Program Files" on Vista. | 
 | 9198 |  | 
 | 9199 | - Issue #4710: Extract directories properly in the zipfile module; | 
 | 9200 |   allow adding directories to a zipfile. | 
 | 9201 |  | 
 | 9202 | - Issue #3807: _multiprocessing build fails when configure is passed | 
 | 9203 |   --without-threads argument. When this occurs, _multiprocessing will | 
 | 9204 |   be disabled, and not compiled. | 
 | 9205 |  | 
 | 9206 | - Issue #5008: When a file is opened in append mode with the new IO library, | 
 | 9207 |   do an explicit seek to the end of file (so that e.g. tell() returns the | 
 | 9208 |   file size rather than 0). This is consistent with the behaviour of the | 
 | 9209 |   traditional 2.x file object. | 
 | 9210 |  | 
 | 9211 | - Issue #5013: Fixed a bug in FileHandler which occurred when the delay | 
 | 9212 |   parameter was set. | 
 | 9213 |  | 
 | 9214 | - Issue #4842: Always append a trailing 'L' when pickling longs using | 
 | 9215 |   pickle protocol 0.  When reading, the 'L' is optional. | 
 | 9216 |  | 
 | 9217 | - Add the importlib package. | 
 | 9218 |  | 
 | 9219 | - Issue #4301: Patch the logging module to add processName support, remove | 
 | 9220 |   _check_logger_class from multiprocessing. | 
 | 9221 |  | 
 | 9222 | - Issue #3325: Remove python2.x try: except: imports for old cPickle from | 
 | 9223 |   multiprocessing. | 
 | 9224 |  | 
 | 9225 | - Issue #4959: inspect.formatargspec now works for keyword only arguments | 
 | 9226 |   without defaults. | 
 | 9227 |  | 
 | 9228 | - Issue #3321: ``_multiprocessing.Connection()`` doesn't check handle; added checks | 
 | 9229 |   for Unix machines for negative handles and large int handles. Without this check | 
 | 9230 |   it is possible to segfault the interpreter. | 
 | 9231 |  | 
 | 9232 | - Issue #4449: AssertionError in mp_benchmarks.py, caused by an underlying issue | 
 | 9233 |   in sharedctypes.py. | 
 | 9234 |  | 
 | 9235 | - Issue #1225107: inspect.isclass() returned True for instances with a custom | 
 | 9236 |   __getattr__. | 
 | 9237 |  | 
 | 9238 | - Issue #3826 and #4791: The socket module now closes the underlying socket | 
 | 9239 |   appropriately when it is being used via socket.makefile() objects | 
 | 9240 |   rather than delaying the close by waiting for garbage collection to do it. | 
 | 9241 |  | 
 | 9242 | - Issue #1696199:  Add collections.Counter() for rapid and convenient | 
 | 9243 |   counting. | 
 | 9244 |  | 
 | 9245 | - Issue #3860: GzipFile and BZ2File now support the context manager protocol. | 
 | 9246 |  | 
 | 9247 | - Issue #4867: Fixed a crash in ctypes when passing a string to a | 
 | 9248 |   function without defining argtypes. | 
 | 9249 |  | 
 | 9250 | - Issue #4272: Add an optional argument to the GzipFile constructor to override | 
 | 9251 |   the timestamp in the gzip stream. The default value remains the current time. | 
 | 9252 |   The information can be used by e.g. gunzip when decompressing. Patch by | 
 | 9253 |   Jacques Frechet. | 
 | 9254 |  | 
 | 9255 | - Restore Python 2.3 compatibility for decimal.py. | 
 | 9256 |  | 
 | 9257 | - Issue #3638: Remove functions from _tkinter module level that depend on | 
 | 9258 |   TkappObject to work with multiple threads. | 
 | 9259 |  | 
 | 9260 | - Issue #4718: Adapt the wsgiref package so that it actually works with | 
 | 9261 |   Python 3.x, in accordance with the `official amendments of the spec | 
 | 9262 |   <http://www.wsgi.org/wsgi/Amendments_1.0>`_. | 
 | 9263 |  | 
 | 9264 | - Issue #4796: Added Decimal.from_float() and Context.create_decimal_from_float() | 
 | 9265 |   to the decimal module. | 
 | 9266 |  | 
 | 9267 | - Fractions.from_float() no longer loses precision for integers too big to | 
 | 9268 |   cast as floats. | 
 | 9269 |  | 
 | 9270 | - Issue #4812: add missing underscore prefix to some internal-use-only | 
 | 9271 |   constants in the decimal module.  (Dec_0 becomes _Dec_0, etc.) | 
 | 9272 |  | 
 | 9273 | - Issue #4790: The nsmallest() and nlargest() functions in the heapq module | 
 | 9274 |   did unnecessary work in the common case where no key function was specified. | 
 | 9275 |  | 
 | 9276 | - Issue #4795: inspect.isgeneratorfunction() returns False instead of None when | 
 | 9277 |   the function is not a generator. | 
 | 9278 |  | 
 | 9279 | - Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case | 
 | 9280 |   no MSVC compiler is found under Windows. Original patch by Philip Jenvey. | 
 | 9281 |  | 
 | 9282 | - Issue #4646: distutils was choking on empty options arg in the setup | 
 | 9283 |   function. Original patch by Thomas Heller. | 
 | 9284 |  | 
 | 9285 | - Issue #3767: Convert Tk object to string in tkColorChooser. | 
 | 9286 |  | 
 | 9287 | - Issue #3248: Allow placing ScrolledText in a PanedWindow. | 
 | 9288 |  | 
 | 9289 | - Issue #4444: Allow assertRaises() to be used as a context handler, so that | 
 | 9290 |   the code under test can be written inline if more practical. | 
 | 9291 |  | 
 | 9292 | - Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@') | 
 | 9293 |   works as expected in the interactive environment. | 
 | 9294 |  | 
 | 9295 | - Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by | 
 | 9296 |   Gabriel Genellina. | 
 | 9297 |  | 
 | 9298 | - Issue #4574: reading an UTF16-encoded text file crashes if \r on 64-char | 
 | 9299 |   boundary. | 
 | 9300 |  | 
 | 9301 | - Issue #4223: inspect.getsource() will now correctly display source code | 
 | 9302 |   for packages loaded via zipimport (or any other conformant PEP 302 | 
 | 9303 |   loader). Original patch by Alexander Belopolsky. | 
 | 9304 |  | 
 | 9305 | - Issue #4201: pdb can now access and display source code loaded via | 
 | 9306 |   zipimport (or any other conformant PEP 302 loader). Original patch by | 
 | 9307 |   Alexander Belopolsky. | 
 | 9308 |  | 
 | 9309 | - Issue #4197: doctests in modules loaded via zipimport (or any other PEP | 
 | 9310 |   302 conformant loader) will now work correctly in most cases (they | 
 | 9311 |   are still subject to the constraints that exist for all code running | 
 | 9312 |   from inside a module loaded via a PEP 302 loader and attempting to | 
 | 9313 |   perform IO operations based on __file__). Original patch by | 
 | 9314 |   Alexander Belopolsky. | 
 | 9315 |  | 
 | 9316 | - Issues #4082 and #4512: Add runpy support to zipimport in a manner that | 
 | 9317 |   allows backporting to maintenance branches. Original patch by | 
 | 9318 |   Alexander Belopolsky. | 
 | 9319 |  | 
 | 9320 | - Issue #4163: textwrap module: allow word splitting on a hyphen preceded by | 
 | 9321 |   a non-ASCII letter. | 
 | 9322 |  | 
 | 9323 | - Issue #4616: TarFile.utime(): Restore directory times on Windows. | 
 | 9324 |  | 
 | 9325 | - Issue #4021: tokenize.detect_encoding() now raises a SyntaxError when the | 
 | 9326 |   codec cannot be found.  This is for compatibility with the builtin behavior. | 
 | 9327 |  | 
 | 9328 | - Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to | 
 | 9329 |   give correct results in the case where one argument is a quiet NaN | 
 | 9330 |   and the other is a finite number that requires rounding. | 
 | 9331 |  | 
 | 9332 | - Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat | 
 | 9333 |   libs. | 
 | 9334 |  | 
 | 9335 | - Added the subprocess.check_call_output() convenience function to get output | 
 | 9336 |   from a subprocess on success or raise an exception on error. | 
 | 9337 |  | 
 | 9338 | - Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to | 
 | 9339 |   support unusual filenames (such as those containing semi-colons) in | 
 | 9340 |   Content-Disposition headers. | 
 | 9341 |  | 
 | 9342 | - Issue #4384: Added logging integration with warnings module using | 
 | 9343 |   captureWarnings(). This change includes a NullHandler which does nothing; | 
 | 9344 |   it will be of use to library developers who want to avoid the "No handlers | 
 | 9345 |   could be found for logger XXX" message which can appear if the library user | 
 | 9346 |   doesn't configure logging. | 
 | 9347 |  | 
 | 9348 | - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an | 
 | 9349 |   exception. | 
 | 9350 |  | 
 | 9351 | - Issue #4529: fix the parser module's validation of try-except-finally | 
 | 9352 |   statements. | 
 | 9353 |  | 
 | 9354 | - Issue #4458: getopt.gnu_getopt() now recognizes a single "-" as an argument, | 
 | 9355 |   not a malformed option. | 
 | 9356 |  | 
 | 9357 | - Added the subprocess.check_output() convenience function to get output | 
 | 9358 |   from a subprocess on success or raise an exception on error. | 
 | 9359 |  | 
 | 9360 | - Issue #4542: On Windows, binascii.crc32 still accepted str as binary input; | 
 | 9361 |   the corresponding tests now pass. | 
 | 9362 |  | 
 | 9363 | - Issue #4537: webbrowser.UnixBrowser would fail to open the browser because | 
 | 9364 |   it was calling the wrong open() function. | 
 | 9365 |  | 
 | 9366 | - Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to | 
 | 9367 |   support unusual filenames (such as those containing semi-colons) in | 
 | 9368 |   Content-Disposition headers. | 
 | 9369 |  | 
 | 9370 | - Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on | 
 | 9371 |   biarch systems. Try to rely on ldconfig only, without using objdump and gcc. | 
 | 9372 |  | 
 | 9373 | - Issue #5104: The socket module now raises OverflowError when 16-bit port and | 
 | 9374 |   protocol numbers are supplied outside the allowed 0-65536 range on bind() | 
 | 9375 |   and getservbyport(). | 
 | 9376 |  | 
 | 9377 | - Windows locale mapping updated to Vista. | 
 | 9378 |  | 
 | 9379 | Tools/Demos | 
 | 9380 | ----------- | 
 | 9381 |  | 
 | 9382 | - Issue #4704: remove use of cmp() in pybench, bump its version number to 2.1, | 
 | 9383 |   and make it 2.6-compatible. | 
 | 9384 |  | 
 | 9385 | - Ttk demos added in Demo/tkinter/ttk/ | 
 | 9386 |  | 
 | 9387 | - Issue #4677: add two list comprehension tests to pybench. | 
 | 9388 |  | 
 | 9389 |  | 
 | 9390 | Build | 
 | 9391 | ----- | 
 | 9392 |  | 
 | 9393 | - Issue #6094: Build correctly with Subversion 1.7. | 
 | 9394 |  | 
 | 9395 | - Issue #5847: Remove -n switch on "Edit with IDLE" menu item. | 
 | 9396 |  | 
 | 9397 | - Issue #5726: Make Modules/ld_so_aix return the actual exit code of the | 
 | 9398 |   linker, rather than always exit successfully. Patch by Floris Bruynooghe. | 
 | 9399 |  | 
 | 9400 | - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify | 
 | 9401 |   the order that backends for the dbm extension are checked. | 
 | 9402 |  | 
 | 9403 | - Link the shared python library with $(MODLIBS). | 
 | 9404 |  | 
 | 9405 | - Issue #5134: Silence compiler warnings when compiling sqlite with VC++. | 
 | 9406 |  | 
 | 9407 | - Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows. | 
 | 9408 |  | 
 | 9409 | - Issue #4895: Use _strdup on Windows CE. | 
 | 9410 |  | 
 | 9411 | - Issue #4472: "configure --enable-shared" now works on OSX | 
 | 9412 |  | 
 | 9413 | - Issues #4728 and #4060: WORDS_BIGEDIAN is now correct in Universal builds. | 
 | 9414 |  | 
 | 9415 | - Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs". | 
 | 9416 |  | 
 | 9417 | - Issue #4289: Remove Cancel button from AdvancedDlg. | 
 | 9418 |  | 
 | 9419 | - Issue #1656675: Register a drop handler for .py* files on Windows. | 
 | 9420 |  | 
 | 9421 | - Issue #4120: Exclude manifest from extension modules in VS2008. | 
 | 9422 |  | 
 | 9423 | - Issue #4091: Install pythonxy.dll in system32 again. | 
 | 9424 |  | 
 | 9425 | - Issue #4018: Disable "for me" installations on Vista. | 
 | 9426 |  | 
 | 9427 | - Issue #3758: Add ``patchcheck`` build target to .PHONY. | 
 | 9428 |  | 
 | 9429 | - Issue #4204: Fixed module build errors on FreeBSD 4. | 
 | 9430 |  | 
 | 9431 |  | 
 | 9432 | C-API | 
 | 9433 | ----- | 
 | 9434 |  | 
 | 9435 | - Issue #6624: yArg_ParseTuple with "s" format when parsing argument with | 
 | 9436 |   NUL: Bogus TypeError detail string. | 
 | 9437 |  | 
 | 9438 | - Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError | 
 | 9439 |   for negative arguments.  Previously, it raised TypeError. | 
 | 9440 |  | 
 | 9441 | - Issue #4720: The format for PyArg_ParseTupleAndKeywords can begin with '|'. | 
 | 9442 |  | 
 | 9443 | - Issue #3632: from the gdb debugger, the 'pyo' macro can now be called when | 
 | 9444 |   the GIL is released, or owned by another thread. | 
 | 9445 |  | 
 | 9446 | - Issue #4122: On Windows, fix a compilation error when using the | 
 | 9447 |   Py_UNICODE_ISSPACE macro in an extension module. | 
 | 9448 |  | 
 | 9449 |  | 
 | 9450 | Extension Modules | 
 | 9451 | ----------------- | 
 | 9452 |  | 
 | 9453 | - Issue #3745: Fix hashlib to always reject unicode and non buffer-api | 
 | 9454 |   supporting objects as input no matter how it was compiled (built in | 
 | 9455 |   implementations or external openssl library). | 
 | 9456 |  | 
 | 9457 | - Issue #4397: Fix occasional test_socket failure on OS X. | 
 | 9458 |  | 
 | 9459 | - Issue #4279: Fix build of parsermodule under Cygwin. | 
 | 9460 |  | 
 | 9461 | - Issue #4751: hashlib now releases the GIL when hashing large buffers | 
 | 9462 |   (with a hardwired threshold of 2048 bytes), allowing better parallelization | 
 | 9463 |   on multi-CPU systems. Contributed by Lukas Lueg (ebfe) and Victor Stinner. | 
 | 9464 |  | 
 | 9465 | - Issue #4051: Prevent conflict of UNICODE macros in cPickle. | 
 | 9466 |  | 
 | 9467 | - Issue #4738: Each zlib object now has a separate lock, allowing to compress | 
 | 9468 |   or decompress several streams at once on multi-CPU systems. Also, the GIL | 
 | 9469 |   is now released when computing the CRC of a large buffer. Patch by ebfe. | 
 | 9470 |  | 
 | 9471 | - Issue #4228: Pack negative values the same way as 2.4 in struct's L format. | 
 | 9472 |  | 
 | 9473 | - Issue #1040026: Fix os.times result on systems where HZ is incorrect. | 
 | 9474 |  | 
 | 9475 | - Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris, | 
 | 9476 |   OpenBSD. | 
 | 9477 |  | 
 | 9478 | - Issue #4583: array.array would not always prohibit resizing when a buffer | 
 | 9479 |   has been exported, resulting in an interpreter crash when accessing the | 
 | 9480 |   buffer. | 
 | 9481 |  | 
 | 9482 |  | 
 | 9483 | - Issue #5228: Make functools.partial objects can now be pickled. | 
 | 9484 |  | 
 | 9485 | Tests | 
 | 9486 | ----- | 
 | 9487 |  | 
 | 9488 | - Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running | 
 | 9489 |   regression tests in parallel, shortening the total runtime. | 
 | 9490 |  | 
 | 9491 | - Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to | 
 | 9492 |   Lib/tkinter/test/test_tkinter/test_loadtk. With this, these tests demonstrate | 
 | 9493 |   the same behaviour as test_ttkguionly (and now also test_tk) which is to | 
 | 9494 |   skip the tests if DISPLAY is defined but can't be used. | 
 | 9495 |  | 
 | 9496 | - regrtest no longer treats ImportError as equivalent to SkipTest.  Imports | 
 | 9497 |   that should cause a test to be skipped are now done using import_module | 
 | 9498 |   from test support, which does the conversion. | 
 | 9499 |  | 
 | 9500 | - Issue #5083: New 'gui' resource for regrtest. | 
 | 9501 |  | 
 | 9502 |  | 
 | 9503 | Docs | 
 | 9504 | ---- | 
 | 9505 |  | 
 | 9506 |  | 
| Barry Warsaw | 97f005d | 2008-12-03 16:46:14 +0000 | [diff] [blame] | 9507 | What's New in Python 3.0 final | 
 | 9508 | ============================== | 
 | 9509 |  | 
 | 9510 | *Release date: 03-Dec-2008* | 
 | 9511 |  | 
 | 9512 | Core and Builtins | 
 | 9513 | ----------------- | 
 | 9514 |  | 
 | 9515 | - Issue #3996: On Windows, the PyOS_CheckStack function would cause the | 
 | 9516 |   interpreter to abort ("Fatal Python error: Could not reset the stack!") | 
 | 9517 |   instead of throwing a MemoryError. | 
 | 9518 |  | 
 | 9519 | - Issue #3689: The list reversed iterator now supports __length_hint__ | 
 | 9520 |   instead of __len__.  Behavior now matches other reversed iterators. | 
 | 9521 |  | 
 | 9522 | - Issue #4367: Python would segfault during compiling when the unicodedata | 
 | 9523 |   module couldn't be imported and \N escapes were present. | 
 | 9524 |  | 
 | 9525 | - Fix build failure of _cursesmodule.c building with -D_FORTIFY_SOURCE=2. | 
 | 9526 |  | 
 | 9527 | Library | 
 | 9528 | ------- | 
 | 9529 |  | 
 | 9530 | - Issue #4387: binascii now refuses to accept str as binary input. | 
 | 9531 |  | 
 | 9532 | - Issue #4073: Add 2to3 support to build_scripts, refactor that support | 
 | 9533 |   in build_py. | 
 | 9534 |  | 
 | 9535 | - IDLE would print a "Unhandled server exception!" message when internal | 
 | 9536 |   debugging is enabled. | 
 | 9537 |  | 
 | 9538 | - Issue #4455: IDLE failed to display the windows list when two windows have | 
 | 9539 |   the same title. | 
 | 9540 |  | 
 | 9541 | - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an | 
 | 9542 |   exception. | 
 | 9543 |  | 
 | 9544 | - Issue #4433: Fixed an access violation when garbage collecting | 
 | 9545 |   _ctypes.COMError instances. | 
 | 9546 |  | 
 | 9547 | - Issue #4429: Fixed UnicodeDecodeError in ctypes. | 
 | 9548 |  | 
 | 9549 | - Issue #4373: Corrected a potential reference leak in the pickle module and | 
 | 9550 |   silenced a false positive ref leak in distutils.tests.test_build_ext. | 
 | 9551 |  | 
 | 9552 | - Issue #4382: dbm.dumb did not specify the expected file encoding for opened | 
 | 9553 |   files. | 
 | 9554 |  | 
 | 9555 | - Issue #4383: When IDLE cannot make the connection to its subprocess, it would | 
 | 9556 |   fail to properly display the error message. | 
 | 9557 |  | 
 | 9558 | Build | 
 | 9559 | ----- | 
 | 9560 |  | 
 | 9561 | - Issue #4407: Fix source file that caused the compileall step in Windows installer | 
 | 9562 |   to fail. | 
 | 9563 |  | 
 | 9564 | Docs | 
 | 9565 | ---- | 
 | 9566 |  | 
 | 9567 | - Issue #4449: Fixed multiprocessing examples | 
 | 9568 |  | 
 | 9569 | - Issue #3799: Document that dbm.gnu and dbm.ndbm will accept string arguments | 
 | 9570 |   for keys and values which will be converted to bytes before committal. | 
 | 9571 |  | 
 | 9572 |  | 
 | 9573 | What's New in Python 3.0 release candidate 3? | 
 | 9574 | ============================================= | 
 | 9575 |  | 
 | 9576 | *Release date: 20-Nov-2008* | 
 | 9577 |  | 
 | 9578 |  | 
 | 9579 | Core and Builtins | 
 | 9580 | ----------------- | 
 | 9581 |  | 
 | 9582 | - Issue #4349: sys.path included a non-existent platform directory because of a | 
 | 9583 |   faulty Makefile. | 
 | 9584 |  | 
 | 9585 | - Issue #3327: Don't overallocate in the modules_by_index list. | 
 | 9586 |  | 
 | 9587 | - Issue #1721812:  Binary set operations and copy() returned the input type | 
 | 9588 |   instead of the appropriate base type.  This was incorrect because set | 
 | 9589 |   subclasses would be created without their __init__() method being called. | 
 | 9590 |   The corrected behavior brings sets into line with lists and dicts. | 
 | 9591 |  | 
 | 9592 | - Issue #4296: Fix PyObject_RichCompareBool so that "x in [x]" evaluates to | 
 | 9593 |   True, even when x doesn't compare equal to itself.  This was a regression | 
 | 9594 |   from 2.6. | 
 | 9595 |  | 
 | 9596 | - Issue #3705: Command-line arguments were not correctly decoded when the | 
 | 9597 |   terminal does not use UTF8. | 
 | 9598 |  | 
 | 9599 | Library | 
 | 9600 | ------- | 
 | 9601 |  | 
 | 9602 | - Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if | 
 | 9603 |   the ctypes module is not present. | 
 | 9604 |  | 
 | 9605 | - FileIO's mode attribute now always includes ``"b"``. | 
 | 9606 |  | 
 | 9607 | - Issue #3799: Fix dbm.dumb to accept strings as well as bytes for keys. String | 
 | 9608 |   keys are now written out in UTF-8. | 
 | 9609 |  | 
 | 9610 | - Issue #4338: Fix distutils upload command. | 
 | 9611 |  | 
 | 9612 | - Issue #4354: Fix distutils register command. | 
 | 9613 |  | 
 | 9614 | - Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__. | 
 | 9615 |  | 
 | 9616 | - Issue #4307: The named tuple that ``inspect.getfullargspec()`` returns now | 
 | 9617 |   uses ``kwonlydefaults`` instead of ``kwdefaults``. | 
 | 9618 |  | 
 | 9619 | - Issue #4298: Fix a segfault when pickle.loads is passed a ill-formed input. | 
 | 9620 |  | 
 | 9621 | - Issue #4283: Fix a left-over "iteritems" call in distutils. | 
 | 9622 |  | 
 | 9623 | Build | 
 | 9624 | ----- | 
 | 9625 |  | 
 | 9626 | - Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs". | 
 | 9627 |  | 
 | 9628 | - Issue #4289: Remove Cancel button from AdvancedDlg. | 
 | 9629 |  | 
 | 9630 | - Issue #1656675: Register a drop handler for .py* files on Windows. | 
 | 9631 |  | 
 | 9632 | Tools/Demos | 
 | 9633 | ----------- | 
 | 9634 |  | 
 | 9635 | - Demos of the socketserver module now work with Python 3. | 
 | 9636 |  | 
 | 9637 |  | 
 | 9638 | What's New in Python 3.0 release candidate 2 | 
 | 9639 | ============================================ | 
 | 9640 |  | 
 | 9641 | *Release date: 05-Nov-2008* | 
 | 9642 |  | 
 | 9643 | Core and Builtins | 
 | 9644 | ----------------- | 
 | 9645 |  | 
 | 9646 | - Issue #4211: The __path__ attribute of frozen packages is now a list instead | 
 | 9647 |   of a string as required by PEP 302. | 
 | 9648 |  | 
 | 9649 | - Issue #3727: Fixed poplib. | 
 | 9650 |  | 
 | 9651 | - Issue #3714: Fixed nntplib by using bytes where appropriate. | 
 | 9652 |  | 
 | 9653 | - Issue #1210: Fixed imaplib and its documentation. | 
 | 9654 |  | 
 | 9655 | - Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()``  | 
 | 9656 |   method on file objects with closefd=False. The file descriptor is still | 
 | 9657 |   kept open but the file object behaves like a closed file. The ``FileIO`` | 
 | 9658 |   object also got a new readonly attribute ``closefd``. | 
 | 9659 |  | 
 | 9660 | - Issue #3626: On cygwin, starting python with a non-existent script name | 
 | 9661 |   would not display anything if the file name is only 1 character long. | 
 | 9662 |  | 
 | 9663 | - Issue #4176: Fixed a crash when pickling an object which ``__reduce__`` | 
 | 9664 |   method does not return iterators for the 4th and 5th items. | 
 | 9665 |  | 
 | 9666 | - Issue #3723: Fixed initialization of subinterpreters. | 
 | 9667 |  | 
 | 9668 | - Issue #4213: The file system encoding is now normalized by the | 
 | 9669 |   codec subsystem, for example UTF-8 is turned into utf-8. | 
 | 9670 |  | 
 | 9671 | - Issue #4200: Changed the atexit module to store its state in its | 
 | 9672 |   PyModuleDef atexitmodule. This fixes a bug with multiple subinterpeters. | 
 | 9673 |  | 
 | 9674 | - Issue #4237: io.FileIO() was raising invalid warnings caused by | 
 | 9675 |   insufficient initialization of PyFileIOObject struct members. | 
 | 9676 |  | 
 | 9677 | - Issue #4170: Pickling a collections.defaultdict object would crash the | 
 | 9678 |   interpreter. | 
 | 9679 |  | 
 | 9680 | - Issue #4146: Compilation on OpenBSD has been restored. | 
 | 9681 |  | 
 | 9682 | - Issue #3574: compile() incorrectly handled source code encoded as Latin-1. | 
 | 9683 |  | 
 | 9684 | - Issues #2384 and #3975: Tracebacks were not correctly printed when the | 
 | 9685 |   source file contains a ``coding:`` header: the wrong line was displayed, and | 
 | 9686 |   the encoding was not respected. | 
 | 9687 |  | 
 | 9688 | - Issue #3740: Null-initialize module state. | 
 | 9689 |  | 
 | 9690 | - Issue #3946: PyObject_CheckReadBuffer crashed on a memoryview object. | 
 | 9691 |  | 
 | 9692 | - Issue #1688: On Windows, the input() prompt was not correctly displayed if it | 
 | 9693 |   contains non-ascii characters. | 
 | 9694 |  | 
 | 9695 | - Bug #3951: Py_USING_MEMORY_DEBUGGER should not be enabled by default. | 
 | 9696 |  | 
 | 9697 | Library | 
 | 9698 | ------- | 
 | 9699 |  | 
 | 9700 | - Issue #3664: The pickle module could segfault if a subclass of Pickler fails | 
 | 9701 |   to call the base __init__ method. | 
 | 9702 |  | 
 | 9703 | - Issue #3725: telnetlib now works completely in bytes. | 
 | 9704 |  | 
 | 9705 | - Issue #4072: Restore build_py_2to3. | 
 | 9706 |  | 
 | 9707 | - Issue #4014: Don't claim that Python has an Alpha release status, in addition | 
 | 9708 |   to claiming it is Mature. | 
 | 9709 |  | 
 | 9710 | - Issue #3187: Add sys.setfilesystemencoding. | 
 | 9711 |  | 
 | 9712 | - Issue #3187: Better support for "undecodable" filenames.  Code by Victor | 
 | 9713 |   Stinner, with small tweaks by GvR. | 
 | 9714 |  | 
 | 9715 | - Issue #3965: Allow repeated calls to turtle.Screen, by making it a | 
 | 9716 |   true singleton object. | 
 | 9717 |  | 
 | 9718 | - Issue #3911: ftplib.FTP.makeport() could give invalid port numbers. | 
 | 9719 |  | 
 | 9720 | - Issue #3929: When the database cannot be opened, dbm.open() would incorrectly | 
 | 9721 |   raise a TypeError: "'tuple' object is not callable" instead of the expected | 
 | 9722 |   dbm.error. | 
 | 9723 |  | 
 | 9724 | - Bug #3884: Make the turtle module toplevel again. | 
 | 9725 |  | 
 | 9726 | - Issue #3547: Fixed ctypes structures bitfields of varying integer | 
 | 9727 |   sizes. | 
 | 9728 |  | 
 | 9729 | Extension Modules | 
 | 9730 | ----------------- | 
 | 9731 |  | 
 | 9732 | - Issue #3659: Subclasses of str didn't work as SQL parameters. | 
 | 9733 |  | 
 | 9734 | Build | 
 | 9735 | ----- | 
 | 9736 |  | 
 | 9737 | - Issue #4120: Exclude manifest from extension modules in VS2008. | 
 | 9738 |  | 
 | 9739 | - Issue #4091: Install pythonxy.dll in system32 again. | 
 | 9740 |  | 
 | 9741 | - Issue #4018: Disable "for me" installations on Vista. | 
 | 9742 |  | 
 | 9743 | - Issue #4204: Fixed module build errors on FreeBSD 4. | 
 | 9744 |  | 
 | 9745 | Tools/Demos | 
 | 9746 | ----------- | 
 | 9747 |  | 
 | 9748 | - Issue #3717: Fix Demo/embed/demo.c. | 
 | 9749 |  | 
 | 9750 | - Issue #4072: Add a distutils demo for build_py_2to3. | 
 | 9751 |  | 
 | 9752 |  | 
 | 9753 | What's New in Python 3.0 release candidate 1 | 
 | 9754 | ============================================ | 
 | 9755 |  | 
 | 9756 | *Release date: 17-Sep-2008* | 
 | 9757 |  | 
 | 9758 | Core and Builtins | 
 | 9759 | ----------------- | 
 | 9760 |  | 
 | 9761 | - Issue #3827: memoryview lost its size attribute in favor of using len(view). | 
 | 9762 |  | 
 | 9763 | - Issue #3813: could not lanch python.exe via symbolic link on cygwin. | 
 | 9764 |  | 
 | 9765 | - Issue #3705: fix crash when given a non-ascii value on the command line for | 
 | 9766 |   the "-c" and "-m" parameters. Now the behaviour is as expected under Linux, | 
 | 9767 |   although under Windows it fails at a later point. | 
 | 9768 |  | 
 | 9769 | - Issue #3279: Importing site at interpreter was failing silently because the | 
 | 9770 |   site module uses the open builtin which was not initialized at the time. | 
 | 9771 |  | 
 | 9772 | - Issue #3660: Corrected a reference leak in str.encode() when the encoder | 
 | 9773 |   does not return a bytes object. | 
 | 9774 |  | 
 | 9775 | - Issue #3774: Added a few more checks in PyTokenizer_FindEncoding to handle | 
 | 9776 |   error conditions. | 
 | 9777 |  | 
 | 9778 | - Issue #3594: Fix Parser/tokenizer.c:fp_setreadl() to open the file being | 
 | 9779 |   tokenized by either a file path or file pointer for the benefit of | 
 | 9780 |   PyTokenizer_FindEncoding(). | 
 | 9781 |  | 
 | 9782 | - Issue #3696: Error parsing arguments on OpenBSD <= 4.4 and Cygwin. On | 
 | 9783 |   these systems, the mbstowcs() function is slightly buggy and must be | 
 | 9784 |   replaced with strlen() for the purpose of counting of number of wide | 
 | 9785 |   characters needed to represent the multi-byte character string. | 
 | 9786 |  | 
 | 9787 | - Issue #3697: "Fatal Python error: Cannot recover from stack overflow" | 
 | 9788 |   could be easily encountered under Windows in debug mode when exercising | 
 | 9789 |   the recursion limit checking code, due to bogus handling of recursion | 
 | 9790 |   limit when USE_STACKCHEK was enabled. | 
 | 9791 |  | 
 | 9792 | - Issue 3639: The _warnings module could segfault the interpreter when | 
 | 9793 |   unexpected types were passed in as arguments. | 
 | 9794 |  | 
 | 9795 | - Issue #3712: The memoryview object had a reference leak and didn't support | 
 | 9796 |   cyclic garbage collection. | 
 | 9797 |  | 
 | 9798 | - Issue #3668: Fix a memory leak with the "s*" argument parser in | 
 | 9799 |   PyArg_ParseTuple and friends, which occurred when the argument for "s*"  | 
 | 9800 |   was correctly parsed but parsing of subsequent arguments failed. | 
 | 9801 |  | 
 | 9802 | - Issue #3611: An exception __context__ could be cleared in a complex pattern | 
 | 9803 |   involving a __del__ method re-raising an exception. | 
 | 9804 |  | 
 | 9805 | - Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to  | 
 | 9806 |   match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__ | 
 | 9807 |   mechanism. In the process, fix a bug where isinstance() and issubclass(), | 
 | 9808 |   when given a tuple of classes as second argument, were looking up | 
 | 9809 |   __instancecheck__ / __subclasscheck__ on the tuple rather than on each | 
 | 9810 |   type object. | 
 | 9811 |  | 
 | 9812 | - Issue #3663: Py_None was decref'd when printing SyntaxErrors. | 
 | 9813 |  | 
 | 9814 | - Issue #3651: Fix various memory leaks when using the buffer | 
 | 9815 |   interface, or when the "s#" code of PyArg_ParseTuple is given a | 
 | 9816 |   bytes object. | 
 | 9817 |  | 
 | 9818 | - Issue #3657: Fix uninitialized memory read when pickling longs. | 
 | 9819 |   Found by valgrind. | 
 | 9820 |  | 
 | 9821 | - Apply security patches from Apple. | 
 | 9822 |  | 
 | 9823 | - Fix crashes on memory allocation failure found with failmalloc. | 
 | 9824 |  | 
 | 9825 | - Fix memory leaks found with valgrind and update suppressions file. | 
 | 9826 |  | 
 | 9827 | - Fix compiler warnings in opt mode which would lead to invalid memory reads. | 
 | 9828 |  | 
 | 9829 | - Fix problem using wrong name in decimal module reported by pychecker. | 
 | 9830 |  | 
 | 9831 | - Issue #3650: Fixed a reference leak in bytes.split('x'). | 
 | 9832 |  | 
 | 9833 | - bytes(o) now tries to use o.__bytes__() before using fallbacks. | 
 | 9834 |  | 
 | 9835 | - Issue #1204: The configure script now tests for additional libraries | 
 | 9836 |   that may be required when linking against readline.  This fixes issues | 
 | 9837 |   with x86_64 builds on some platforms (a few Linux flavors and OpenBSD). | 
 | 9838 |  | 
 | 9839 | C API | 
 | 9840 | ----- | 
 | 9841 |  | 
 | 9842 | - PyObject_Bytes and PyBytes_FromObject were added. | 
 | 9843 |  | 
 | 9844 | Library | 
 | 9845 | ------- | 
 | 9846 |  | 
 | 9847 | - Issue #3756: make re.escape() handle bytes as well as str. | 
 | 9848 |  | 
 | 9849 | - Issue #3800: fix filter() related bug in formatter.py. | 
 | 9850 |  | 
 | 9851 | - Issue #874900: fix behaviour of threading module after a fork. | 
 | 9852 |  | 
 | 9853 | - Issue #3535: zipfile couldn't read some zip files larger than 2GB. | 
 | 9854 |  | 
 | 9855 | - Issue #3776: Deprecate the bsddb package for removal in 3.0. | 
 | 9856 |  | 
 | 9857 | - Issue #3762: platform.architecture() fails if python is lanched via | 
 | 9858 |   its symbolic link. | 
 | 9859 |  | 
 | 9860 | - Issue #3660: fix a memory leak in the C accelerator of the pickle module. | 
 | 9861 |  | 
 | 9862 | - Issue #3160: the "bdist_wininst" distutils command didn't work. | 
 | 9863 |  | 
 | 9864 | - Issue #1658: tkinter changes dict size during iteration in both | 
 | 9865 |     tkinter.BaseWidget and tkinter.scrolledtext.ScrolledText. | 
 | 9866 |  | 
 | 9867 | - The bsddb module (and therefore the dbm.bsd module) has been removed. | 
 | 9868 |   It is now maintained outside of the standard library at | 
 | 9869 |   http://www.jcea.es/programacion/pybsddb.htm. | 
 | 9870 |  | 
 | 9871 | - Issue 600362:  Relocated parse_qs() and parse_qsl(), from the cgi module | 
 | 9872 |   to the urlparse one.  Added a DeprecationWarning in the old module, it | 
 | 9873 |   will be deprecated in the future. | 
 | 9874 |  | 
 | 9875 | - Issue #3719: platform.architecture() fails if there are spaces in the | 
 | 9876 |   path to the Python binary. | 
 | 9877 |  | 
 | 9878 | - Issue 3602: As part of the merge of r66135, make the parameters on | 
 | 9879 |   warnings.catch_warnings() keyword-only. Also remove a DeprecationWarning. | 
 | 9880 |  | 
 | 9881 | - The deprecation warnings for the camelCase threading API names were removed. | 
 | 9882 |  | 
 | 9883 | - Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing  | 
 | 9884 |   SEM_VALUE_MAX. | 
 | 9885 |  | 
 | 9886 | Extension Modules | 
 | 9887 | ----------------- | 
 | 9888 |  | 
 | 9889 | - Issue #3782: os.write() must not accept unicode strings. | 
 | 9890 |  | 
 | 9891 | - Issue #2975: When compiling several extension modules with Visual Studio 2008 | 
 | 9892 |   from the same python interpreter, some environment variables would grow | 
 | 9893 |   without limit. | 
 | 9894 |  | 
 | 9895 | - Issue #3643: Added a few more checks to _testcapi to prevent segfaults by | 
 | 9896 |   exploitation of poor argument checking. | 
 | 9897 |  | 
 | 9898 | - bsddb code updated to version 4.7.3pre2. This code is the same than | 
 | 9899 |   Python 2.6 one, since the intention is to keep an unified 2.x/3.x codebase. | 
 | 9900 |   The Python code is automatically translated using "2to3". Please, do not | 
 | 9901 |   update this code in Python 3.0 by hand. Update the 2.6 one and then | 
 | 9902 |   do "2to3". | 
 | 9903 |  | 
 | 9904 | - The _bytesio and _stringio modules are now compiled into the python binary. | 
 | 9905 |  | 
 | 9906 | - Issue #3492 and #3790: Fixed the zlib module and zipimport module uses of | 
 | 9907 |   mutable bytearray objects where they should have been using immutable bytes. | 
 | 9908 |  | 
 | 9909 | - Issue #3797: Fixed the dbm, marshal, mmap, ossaudiodev, & winreg modules to | 
 | 9910 |   return bytes objects instead of bytearray objects. | 
 | 9911 |  | 
 | 9912 |  | 
 | 9913 | Tools/Demos | 
 | 9914 | ----------- | 
 | 9915 |  | 
 | 9916 | - Fix Misc/gdbinit so it works. | 
 | 9917 |  | 
 | 9918 |  | 
 | 9919 | Build | 
 | 9920 | ----- | 
 | 9921 |  | 
 | 9922 | - Issue #3812: Failed to build python if configure --without-threads. | 
 | 9923 |  | 
 | 9924 | - Issue #3791: Remove the bsddb module from the Windows installer, and the | 
 | 9925 |   core bsddb library from the Windows build files. | 
 | 9926 |  | 
 | 9927 |  | 
 | 9928 | What's new in Python 3.0b3? | 
 | 9929 | =========================== | 
 | 9930 |  | 
 | 9931 | *Release date: 20-Aug-2008* | 
 | 9932 |  | 
 | 9933 | Core and Builtins | 
 | 9934 | ----------------- | 
 | 9935 |  | 
 | 9936 | - Issue #3653: Fix a segfault when sys.excepthook was called with invalid | 
 | 9937 |   arguments. | 
 | 9938 |  | 
 | 9939 | - Issue #2394: implement more of the memoryview API, with the caveat that | 
 | 9940 |   only one-dimensional contiguous buffers are supported and exercised right | 
 | 9941 |   now. Slicing, slice assignment and comparison (equality and inequality) | 
 | 9942 |   have been added. Also, the tolist() method has been implemented, but only | 
| Georg Brandl | 98b52ef | 2009-05-25 22:20:44 +0000 | [diff] [blame] | 9943 |   for byte buffers. Finally, the API has been updated to return bytes objects | 
| Barry Warsaw | 97f005d | 2008-12-03 16:46:14 +0000 | [diff] [blame] | 9944 |   wherever it used to return bytearrays. | 
 | 9945 |  | 
 | 9946 | - Issue #3560: clean up the new C PyMemoryView API so that naming is | 
 | 9947 |   internally consistent; add macros PyMemoryView_GET_BASE() and | 
 | 9948 |   PyMemoryView_GET_BUFFER() to access useful properties of a memory views | 
 | 9949 |   without relying on a particular implementation; remove the ill-named | 
 | 9950 |   PyMemoryView() function (PyMemoryView_GET_BUFFER() can be used instead). | 
 | 9951 |  | 
 | 9952 | - ctypes function pointers that are COM methods have a boolean True | 
 | 9953 |   value again. | 
 | 9954 |  | 
 | 9955 | - Issue #1819: function calls with several named parameters are now on | 
 | 9956 |   average 35% faster (as measured by pybench). | 
 | 9957 |  | 
 | 9958 | - The undocumented C APIs PyUnicode_AsString() and | 
 | 9959 |   PyUnicode_AsStringAndSize() were made private to the interpreter, in | 
 | 9960 |   order to be able to refine their interfaces for Python 3.1. | 
 | 9961 |  | 
 | 9962 |   If you need to access the UTF-8 representation of a Unicode object | 
 | 9963 |   as bytes string, please use PyUnicode_AsUTF8String() instead. | 
 | 9964 |  | 
 | 9965 | - Issue #3460: PyUnicode_Join() implementation is 10% to 80% faster thanks | 
 | 9966 |   to Python 3.0's stricter semantics which allow to avoid successive | 
 | 9967 |   reallocations of the result string (this also affects str.join()). | 
 | 9968 |  | 
 | 9969 |  | 
 | 9970 | Library | 
 | 9971 | ------- | 
 | 9972 |  | 
 | 9973 | - Issue #1276: Added temporary aliases for CJK Mac encodings to resolve | 
 | 9974 |   a build problem on MacOS with CJK locales.  It adds four temporary | 
 | 9975 |   mappings to existing legacy codecs that are virtually compatible | 
 | 9976 |   with Mac encodings.  They will be replaced by codecs correctly | 
 | 9977 |   implemented in 3.1. | 
 | 9978 |  | 
 | 9979 | - Issue #3614: Corrected a typo in xmlrpc.client, leading to a NameError | 
 | 9980 |   "global name 'header' is not defined". | 
 | 9981 |  | 
 | 9982 | - Issue #2834: update the regular expression library to match the unicode | 
 | 9983 |   standards of py3k. In other words, mixing bytes and unicode strings | 
 | 9984 |   (be it as pattern, search string or replacement string) raises a TypeError. | 
 | 9985 |   Moreover, the re.UNICODE flag is enabled automatically for unicode patterns, | 
 | 9986 |   and can be disabled by specifying a new re.ASCII flag; as for bytes | 
 | 9987 |   patterns, ASCII matching is the only option and trying to specify re.UNICODE | 
 | 9988 |   for such patterns raises a ValueError. | 
 | 9989 |  | 
 | 9990 | - Issue #3300: make urllib.parse.[un]quote() default to UTF-8. | 
 | 9991 |   Code contributed by Matt Giuca.  quote() now encodes the input | 
 | 9992 |   before quoting, unquote() decodes after unquoting.  There are | 
 | 9993 |   new arguments to change the encoding and errors settings. | 
 | 9994 |   There are also new APIs to skip the encode/decode steps. | 
 | 9995 |   [un]quote_plus() are also affected. | 
 | 9996 |  | 
 | 9997 | - Issue #2235: numbers.Number now blocks inheritance of the default id() | 
 | 9998 |   based hash because that hash mechanism is not correct for numeric types. | 
 | 9999 |   All concrete numeric types that inherit from Number (rather than just | 
 | 10000 |   registering with it) must explicitly provide a hash implementation in | 
 | 10001 |   order for their instances to be hashable. | 
 | 10002 |  | 
 | 10003 | - Issue #2676: in the email package, content-type parsing was hanging on | 
 | 10004 |   pathological input because of quadratic or exponential behaviour of a | 
 | 10005 |   regular expression. | 
 | 10006 |  | 
 | 10007 | - Issue #3476: binary buffered reading through the new "io" library is now | 
 | 10008 |   thread-safe. | 
 | 10009 |  | 
 | 10010 | - Issue #1342811: Fix leak in Tkinter.Menu.delete. Commands associated to | 
 | 10011 |   menu entries were not deleted. | 
 | 10012 |  | 
 | 10013 | - Remove the TarFileCompat class from tarfile.py. | 
 | 10014 |  | 
 | 10015 | - Issue #2491: os.fdopen is now almost an alias for the built-in open(), and | 
 | 10016 |   accepts the same parameters.  It just checks that its first argument is an | 
 | 10017 |   integer. | 
 | 10018 |  | 
 | 10019 | - Issue #3394: zipfile.writestr sets external attributes when passed a | 
 | 10020 |   file name rather than a ZipInfo instance, so files are extracted with | 
 | 10021 |   mode 0600 rather than 000 under Unix. | 
 | 10022 |  | 
 | 10023 | - Issue #2523: Fix quadratic behaviour when read()ing a binary file without | 
 | 10024 |   asking for a specific length. | 
 | 10025 |  | 
 | 10026 | Extension Modules | 
 | 10027 | ----------------- | 
 | 10028 |  | 
 | 10029 | - Bug #3542: Support Unicode strings in _msi module. | 
 | 10030 |  | 
 | 10031 | What's new in Python 3.0b2? | 
 | 10032 | =========================== | 
 | 10033 |  | 
 | 10034 | *Release date: 17-Jul-2008* | 
 | 10035 |  | 
 | 10036 | Core and Builtins | 
 | 10037 | ----------------- | 
 | 10038 |  | 
 | 10039 | - Issue #3008: the float type has a new instance method 'float.hex' | 
 | 10040 |   and a new class method 'float.fromhex' to convert floating-point | 
 | 10041 |   numbers to and from hexadecimal strings, respectively. | 
 | 10042 |  | 
 | 10043 | - Issue #3083: Add alternate (#) formatting for bin, oct, hex output | 
 | 10044 |   for str.format().  This adds the prefix 0b, 0o, or 0x, respectively. | 
 | 10045 |  | 
 | 10046 | - Issue #3280: like chr(), the "%c" format now accepts unicode code points | 
 | 10047 |   beyond the Basic Multilingual Plane (above 0xffff) on all configurations. On | 
 | 10048 |   "narrow Unicode" builds, the result is a string of 2 code units, forming a | 
 | 10049 |   UTF-16 surrogate pair. | 
 | 10050 |  | 
 | 10051 | - Issue #3282: str.isprintable() should return False for undefined | 
 | 10052 |   Unicode characters. | 
 | 10053 |  | 
 | 10054 | - Issue #3236: Return small longs from PyLong_FromString. | 
 | 10055 |  | 
 | 10056 | - Exception tracebacks now support exception chaining. | 
 | 10057 |  | 
 | 10058 | Library | 
 | 10059 | ------- | 
 | 10060 |  | 
 | 10061 | - Removed the sunaudio module. Use sunau instead. | 
 | 10062 |  | 
 | 10063 | - Issue #3554: ctypes.string_at and ctypes.wstring_at did call Python | 
 | 10064 |   api functions without holding the GIL, which could lead to a fatal | 
 | 10065 |   error when they failed. | 
 | 10066 |  | 
 | 10067 | - Issue #799428: Fix Tkinter.Misc._nametowidget to unwrap Tcl command objects. | 
 | 10068 |  | 
 | 10069 | - Removed "ast" function aliases from the parser module. | 
 | 10070 |  | 
 | 10071 | - Issue #3313: Fixed a crash when a failed dlopen() call does not set | 
 | 10072 |   a valid dlerror() message. | 
 | 10073 |  | 
 | 10074 | - Issue #3258: Fixed a crash when a ctypes POINTER type to an | 
 | 10075 |   incomplete structure was created. | 
 | 10076 |  | 
 | 10077 | - Issue #2683: Fix inconsistency in subprocess.Popen.communicate(): the | 
 | 10078 |   argument now must be a bytes object in any case. | 
 | 10079 |  | 
 | 10080 | - Issue #3145: help("modules whatever") failed when trying to load the source | 
 | 10081 |   code of every single module of the standard library, including invalid files | 
 | 10082 |   used in the test suite. | 
 | 10083 |  | 
 | 10084 | - The gettext library now consistently uses Unicode strings for message ids | 
 | 10085 |   and message strings, and ``ugettext()`` and the like don't exist anymore. | 
 | 10086 |  | 
 | 10087 | - The traceback module has been expanded to handle chained exceptions. | 
 | 10088 |  | 
 | 10089 | C API | 
 | 10090 | ----- | 
 | 10091 |  | 
 | 10092 | - Issue #3247: the function Py_FindMethod was removed. Modern types should | 
 | 10093 |   use the tp_methods slot instead. | 
 | 10094 |  | 
 | 10095 | Tools/Demos | 
 | 10096 | ----------- | 
 | 10097 |  | 
 | 10098 | - The Mac/Demos directory has been removed. | 
 | 10099 |  | 
 | 10100 | - All of the Mac scripts have been removed (including BuildApplet.py). | 
 | 10101 |  | 
 | 10102 |  | 
 | 10103 | What's new in Python 3.0b1? | 
 | 10104 | =========================== | 
 | 10105 |  | 
 | 10106 | *Release date: 18-Jun-2008* | 
 | 10107 |  | 
 | 10108 | Core and Builtins | 
 | 10109 | ----------------- | 
 | 10110 |  | 
 | 10111 | - Issue #3211: warnings.warn_explicit() did not guard against its 'registry' | 
 | 10112 |   argument being anything other than a dict or None. Also fixed a bug in error | 
 | 10113 |   handling when 'message' and 'category' were both set to None, triggering a | 
 | 10114 |   bus error. | 
 | 10115 |  | 
 | 10116 | - Issue #3100: Corrected a crash on deallocation of a subclassed weakref which | 
 | 10117 |   holds the last (strong) reference to its referent. | 
 | 10118 |  | 
 | 10119 | - Issue #2630: implement PEP 3138. repr() now returns printable | 
 | 10120 |   Unicode characters unescaped, to get an ASCII-only representation | 
 | 10121 |   of an object use ascii(). | 
 | 10122 |  | 
 | 10123 | - Issue #1342: On windows, Python could not start when installed in a | 
 | 10124 |   directory with non-ascii characters. | 
 | 10125 |  | 
 | 10126 | - Implement PEP 3121: new module initialization and finalization API. | 
 | 10127 |  | 
 | 10128 | - Removed the already-defunct ``-t`` option. | 
 | 10129 |  | 
 | 10130 | - Issue #2957: Corrected a ValueError "recursion limit exceeded", when | 
 | 10131 |   unmarshalling many code objects, which happens when importing a | 
 | 10132 |   large .pyc file (~1000 functions). | 
 | 10133 |  | 
 | 10134 | - Issue #2963: fix merging oversight that disabled method cache for | 
 | 10135 |   all types. | 
 | 10136 |  | 
 | 10137 | - Issue #2964: fix a missing INCREF in instancemethod_descr_get. | 
 | 10138 |  | 
 | 10139 | - Issue #2895: Don't crash when given bytes objects as keyword names. | 
 | 10140 |  | 
 | 10141 | - Issue #2798: When parsing arguments with PyArg_ParseTuple, the "s" | 
 | 10142 |   code now allows any unicode string and returns a utf-8 encoded | 
 | 10143 |   buffer, just like the "s#" code already does.  The "z" code was | 
 | 10144 |   corrected as well. | 
 | 10145 |  | 
 | 10146 | - Issue #2863: generators now have a ``gen.__name__`` attribute that | 
 | 10147 |   equals ``gen.gi_code.co_name``, like ``func.__name___`` that equals | 
 | 10148 |   ``func.func_code.co_name``.  The repr() of a generator now also | 
 | 10149 |   contains this name. | 
 | 10150 |  | 
 | 10151 | - Issue #2831: enumerate() now has a ``start`` argument. | 
 | 10152 |  | 
 | 10153 | - Issue #2801: fix bug in the float.is_integer method where a | 
 | 10154 |   ValueError was sometimes incorrectly raised. | 
 | 10155 |  | 
 | 10156 | - The ``--with-toolbox-glue`` option (and the associated | 
 | 10157 |   pymactoolbox.h) have been removed. | 
 | 10158 |  | 
 | 10159 | - Issue #2196: hasattr() now lets exceptions which do not inherit | 
 | 10160 |   Exception (KeyboardInterrupt, and SystemExit) propagate instead of | 
 | 10161 |   ignoring them. | 
 | 10162 |  | 
 | 10163 | - #3021 Exception reraising sematics have been significantly improved.  However, | 
 | 10164 |   f_exc_type, f_exc_value, and f_exc_traceback cannot be accessed from Python | 
 | 10165 |   code anymore. | 
 | 10166 |  | 
 | 10167 | - Three of PyNumberMethods' members, nb_coerce, nb_hex, and nb_oct, have been | 
 | 10168 |   removed. | 
 | 10169 |  | 
 | 10170 | Extension Modules | 
 | 10171 | ----------------- | 
 | 10172 |  | 
 | 10173 | - Renamed ``_winreg`` module to ``winreg``. | 
 | 10174 |  | 
 | 10175 | - Support os.O_ASYNC and fcntl.FASYNC if the constants exist on the | 
 | 10176 |   platform. | 
 | 10177 |  | 
 | 10178 | - Support for Windows 9x has been removed from the winsound module. | 
 | 10179 |  | 
 | 10180 | - Issue #2870: cmathmodule.c compile error. | 
 | 10181 |  | 
 | 10182 | Library | 
 | 10183 | ------- | 
 | 10184 |  | 
 | 10185 | - The methods ``is_in_tuple()``, ``is_vararg()``, and ``is_keywordarg()`` of | 
 | 10186 |   symtable.Symbol have been removed. | 
 | 10187 |  | 
 | 10188 | - Patch #3133: http.server.CGIHTTPRequestHandler did not work on windows. | 
 | 10189 |  | 
 | 10190 | - a new ``urllib`` package was created.  It consists of code from | 
 | 10191 |   ``urllib``, ``urllib2``, ``urlparse``, and ``robotparser``.  The old | 
 | 10192 |   modules have all been removed.  The new package has five submodules: | 
 | 10193 |   ``urllib.parse``, ``urllib.request``, ``urllib.response``, | 
 | 10194 |   ``urllib.error``, and ``urllib.robotparser``.  The | 
 | 10195 |   ``urllib.request.urlopen()`` function uses the url opener from | 
 | 10196 |   ``urllib2``.  (Note that the unittests have not been renamed for the | 
 | 10197 |   beta, but they will be renamed in the future.) | 
 | 10198 |  | 
 | 10199 | - rfc822 has been removed in favor of the email package. | 
 | 10200 |  | 
 | 10201 | - mimetools has been removed in favor of the email package. | 
 | 10202 |  | 
 | 10203 | - Patch #2849: Remove use of rfc822 module from standard library. | 
 | 10204 |  | 
 | 10205 | - Added C optimized implementation of io.StringIO. | 
 | 10206 |  | 
 | 10207 | - The ``pickle`` module is now automatically use an optimized C | 
 | 10208 |   implementation of Pickler and Unpickler when available. The | 
 | 10209 |   ``cPickle`` module is no longer needed. | 
 | 10210 |  | 
 | 10211 | - Removed the ``htmllib`` and ``sgmllib`` modules. | 
 | 10212 |  | 
 | 10213 | - The deprecated ``SmartCookie`` and ``SimpleCookie`` classes have | 
 | 10214 |   been removed from ``http.cookies``. | 
 | 10215 |  | 
 | 10216 | - The ``commands`` module has been removed. Its getoutput() and | 
 | 10217 |   getstatusoutput() functions have been moved to the ``subprocess`` module. | 
 | 10218 |  | 
 | 10219 | - The ``http`` package was created; it contains the old ``httplib`` | 
 | 10220 |   as ``http.client``, ``Cookie`` as ``http.cookies``, ``cookielib`` | 
 | 10221 |   as ``http.cookiejar``, and the content of the three ``HTTPServer`` | 
 | 10222 |   modules as ``http.server``. | 
 | 10223 |  | 
 | 10224 | - The ``xmlrpc`` package was created; it contains the old | 
 | 10225 |   ``xmlrpclib`` module as ``xmlrpc.client`` and the content of | 
 | 10226 |   the old ``SimpleXMLRPCServer`` and ``DocXMLRPCServer`` modules | 
 | 10227 |   as ``xmlrpc.server``. | 
 | 10228 |  | 
 | 10229 | - The ``dbm`` package was created, containing the old modules | 
 | 10230 |   ``anydbm`` and ``whichdb`` in its ``__init__.py``, and having | 
 | 10231 |   ``dbm.gnu`` (was ``gdbm``), ``dbm.bsd`` (was ``dbhash``), | 
 | 10232 |   ``dbm.ndbm`` (was ``dbm``) and ``dbm.dumb`` (was ``dumbdbm``) | 
 | 10233 |   as submodules. | 
 | 10234 |  | 
 | 10235 | - The ``repr`` module has been renamed to ``reprlib``. | 
 | 10236 |  | 
 | 10237 | - The ``statvfs`` module has been removed. | 
 | 10238 |  | 
 | 10239 | - Issue #1713041: fix pprint's handling of maximum depth. | 
 | 10240 |  | 
 | 10241 | - Issue #2250: Exceptions raised during evaluation of names in | 
 | 10242 |   rlcompleter's ``Completer.complete()`` method are now caught and | 
 | 10243 |   ignored. | 
 | 10244 |  | 
 | 10245 | - Patch #2659: Added ``break_on_hyphens`` option to textwrap's | 
 | 10246 |   ``TextWrapper`` class. | 
 | 10247 |  | 
 | 10248 | - Issue #2487: change the semantics of math.ldexp(x, n) when n is too | 
 | 10249 |   large to fit in a C long.  ldexp(x, n) now returns a zero (with | 
 | 10250 |   suitable sign) if n is large and negative; previously, it raised | 
 | 10251 |   OverflowError. | 
 | 10252 |  | 
 | 10253 | - The ``ConfigParser`` module has been renamed to ``configparser``. | 
 | 10254 |  | 
 | 10255 | - Issue #2865: webbrowser.open() works again in a KDE environment. | 
 | 10256 |  | 
 | 10257 | - The ``multifile`` module has been removed. | 
 | 10258 |  | 
 | 10259 | - The ``SocketServer`` module has been renamed to ``socketserver``. | 
 | 10260 |  | 
 | 10261 | - Fixed the ``__all__`` setting on ``collections`` to include | 
 | 10262 |   ``UserList`` and ``UserString``. | 
 | 10263 |  | 
 | 10264 | - The sre module has been removed. | 
 | 10265 |  | 
 | 10266 | - The Queue module has been renamed to queue. | 
 | 10267 |  | 
 | 10268 | - The copy_reg module has been renamed to copyreg. | 
 | 10269 |  | 
 | 10270 | - The mhlib module has been removed. | 
 | 10271 |  | 
 | 10272 | - The ihooks module has been removed. | 
 | 10273 |  | 
 | 10274 | - The fpformat module has been removed. | 
 | 10275 |  | 
 | 10276 | - The dircache module has been removed. | 
 | 10277 |  | 
 | 10278 | - The Canvas module has been removed. | 
 | 10279 |  | 
 | 10280 | - The Decimal module gained the magic methods __round__, __ceil__, | 
 | 10281 |   __floor__ and __trunc__, to give support for round, math.ceil, | 
 | 10282 |   math.floor and math.trunc. | 
 | 10283 |  | 
 | 10284 | - The user module has been removed. | 
 | 10285 |  | 
 | 10286 | - The mutex module has been removed. | 
 | 10287 |  | 
 | 10288 | - The imputil module has been removed. | 
 | 10289 |  | 
 | 10290 | - os.path.walk has been removed in favor of os.walk. | 
 | 10291 |  | 
 | 10292 | - pdb gained the "until" command. | 
 | 10293 |  | 
 | 10294 | - The test.test_support module has been renamed to test.support. | 
 | 10295 |  | 
 | 10296 | - The threading module API was renamed to be PEP 8 compliant.  The | 
 | 10297 |   old names are still present, but will be removed in the near future. | 
 | 10298 |  | 
 | 10299 | Tools/Demos | 
 | 10300 | ----------- | 
 | 10301 |  | 
 | 10302 | - The bgen tool has been removed. | 
 | 10303 |  | 
 | 10304 | Build | 
 | 10305 | ----- | 
 | 10306 |  | 
 | 10307 |  | 
 | 10308 | What's New in Python 3.0a5? | 
 | 10309 | =========================== | 
 | 10310 |  | 
 | 10311 | *Release date: 08-May-2008* | 
 | 10312 |  | 
 | 10313 | Core and Builtins | 
 | 10314 | ----------------- | 
 | 10315 |  | 
 | 10316 | - Fixed misbehaviour of PyLong_FromSsize_t on systems where | 
 | 10317 |   sizeof(size_t) > sizeof(long). | 
 | 10318 |  | 
 | 10319 | - Issue #2221: Corrected a SystemError "error return without exception | 
 | 10320 |   set", when the code executed by exec() raises an exception, and | 
 | 10321 |   sys.stdout.flush() also raises an error. | 
 | 10322 |  | 
 | 10323 | - Bug #2565: The repr() of type objects now calls them 'class', not | 
 | 10324 |   'type' - whether they are builtin types or not. | 
 | 10325 |  | 
 | 10326 | - The command line processing was converted to pass Unicode strings | 
 | 10327 |   through as unmodified as possible; as a consequence, the C API | 
 | 10328 |   related to command line arguments was changed to use wchar_t. | 
 | 10329 |  | 
 | 10330 | - All backslashes in raw strings are interpreted literally.  This | 
 | 10331 |   means that '\u' and '\U' escapes are not treated specially. | 
 | 10332 |  | 
 | 10333 | Extension Modules | 
 | 10334 | ----------------- | 
 | 10335 |  | 
 | 10336 | Library | 
 | 10337 | ------- | 
 | 10338 |  | 
 | 10339 | - ctypes objects now support the PEP3118 buffer interface. | 
 | 10340 |  | 
 | 10341 | - Issue #2682: ctypes callback functions now longer contain a cyclic | 
 | 10342 |   reference to themselves. | 
 | 10343 |  | 
 | 10344 | - Issue #2058: Remove the buf attribute and add __slots__ to the | 
 | 10345 |   TarInfo class in order to reduce tarfile's memory usage. | 
 | 10346 |  | 
 | 10347 | - Bug #2606: Avoid calling .sort() on a dict_keys object. | 
 | 10348 |  | 
 | 10349 | - The bundled libffi copy is now in sync with the recently released | 
 | 10350 |   libffi3.0.5 version, apart from some small changes to | 
 | 10351 |   Modules/_ctypes/libffi/configure.ac. | 
 | 10352 |  | 
 | 10353 | Build | 
 | 10354 | ----- | 
 | 10355 |  | 
 | 10356 | - Issue #1496032: On alpha, use -mieee when gcc is the compiler. | 
 | 10357 |  | 
 | 10358 | - "make install" is now an alias for "make altinstall", to prevent | 
 | 10359 |   accidentally overwriting a Python 2.x installation.  Use "make | 
 | 10360 |   fullinstall" to force Python 3.0 to be installed as "python". | 
 | 10361 |  | 
 | 10362 | - Issue #2544: On HP-UX systems, use 'gcc -shared' for linking when | 
 | 10363 |   gcc is used as compiler. | 
 | 10364 |  | 
 | 10365 |  | 
 | 10366 | What's New in Python 3.0a4? | 
 | 10367 | =========================== | 
 | 10368 |  | 
 | 10369 | *Release date: 02-Apr-2008* | 
 | 10370 |  | 
 | 10371 | Core and Builtins | 
 | 10372 | ----------------- | 
 | 10373 |  | 
 | 10374 | - Bug #2301: Don't try decoding the source code into the original | 
 | 10375 |   encoding for syntax errors. | 
 | 10376 |  | 
 | 10377 | Extension Modules | 
 | 10378 | ----------------- | 
 | 10379 |  | 
 | 10380 | - The dl module was removed, use the ctypes module instead. | 
 | 10381 |  | 
 | 10382 | - Use wchar_t functions in _locale module. | 
 | 10383 |  | 
 | 10384 | Library | 
 | 10385 | ------- | 
 | 10386 |  | 
 | 10387 | - The class distutils.commands.build_py.build_py_2to3 can be used as a | 
 | 10388 |   build_py replacement to automatically run 2to3 on modules that are | 
 | 10389 |   going to be installed. | 
 | 10390 |  | 
 | 10391 | - A new pickle protocol (protocol 3) is added with explicit support | 
 | 10392 |   for bytes.  This is the default protocol.  It intentionally cannot | 
 | 10393 |   be unpickled by Python 2.x. | 
 | 10394 |  | 
 | 10395 | - When a pickle written by Python 2.x contains an (8-bit) str | 
 | 10396 |   instance, this is now decoded to a (Unicode) str instance.  The | 
 | 10397 |   encoding used to do this defaults to ASCII, but can be overridden | 
 | 10398 |   via two new keyword arguments to the Unpickler class.  Previously | 
 | 10399 |   this would create bytes instances, which is usually wrong: str | 
 | 10400 |   instances are often used to pickle attribute names etc., and text is | 
 | 10401 |   more common than binary data anyway. | 
 | 10402 |  | 
 | 10403 | - Default to ASCII as the locale.getpreferredencoding, if the POSIX | 
 | 10404 |   system doesn't support CODESET and LANG isn't set or doesn't allow | 
 | 10405 |   deduction of an encoding. | 
 | 10406 |  | 
 | 10407 | - Issue #1202: zlib.crc32 and zlib.adler32 now return an unsigned | 
 | 10408 |   value. | 
 | 10409 |  | 
 | 10410 | - Issue #719888: Updated tokenize to use a bytes API.  generate_tokens | 
 | 10411 |   has been renamed tokenize and now works with bytes rather than | 
 | 10412 |   strings.  A new detect_encoding function has been added for | 
 | 10413 |   determining source file encoding according to PEP-0263.  Token | 
 | 10414 |   sequences returned by tokenize always start with an ENCODING token | 
 | 10415 |   which specifies the encoding used to decode the file.  This token is | 
 | 10416 |   used to encode the output of untokenize back to bytes. | 
 | 10417 |  | 
 | 10418 |  | 
 | 10419 | What's New in Python 3.0a3? | 
 | 10420 | =========================== | 
 | 10421 |  | 
 | 10422 | *Release date: 29-Feb-2008* | 
 | 10423 |  | 
 | 10424 | Core and Builtins | 
 | 10425 | ----------------- | 
 | 10426 |  | 
 | 10427 | - Issue #2282: io.TextIOWrapper was not overriding seekable() from | 
 | 10428 |   io.IOBase. | 
 | 10429 |  | 
 | 10430 | - Issue #2115: Important speedup in setting __slot__ attributes.  Also | 
 | 10431 |   prevent a possible crash: an Abstract Base Class would try to access | 
 | 10432 |   a slot on a registered virtual subclass. | 
 | 10433 |  | 
 | 10434 | - Fixed repr() and str() of complex numbers with infinity or nan as | 
 | 10435 |   real or imaginary part. | 
 | 10436 |  | 
 | 10437 | - Clear all free list during a gc.collect() of the highest generation | 
 | 10438 |   in order to allow pymalloc to free more arenas. Python may give back | 
 | 10439 |   memory to the OS earlier. | 
 | 10440 |  | 
 | 10441 | - Issue #2045: Fix an infinite recursion triggered when printing a | 
 | 10442 |   subclass of collections.defaultdict, if its default_factory is set | 
 | 10443 |   to a bound method. | 
 | 10444 |  | 
 | 10445 | - Fixed a minor memory leak in dictobject.c. The content of the free | 
 | 10446 |   list was not freed on interpreter shutdown. | 
 | 10447 |  | 
 | 10448 | - Limit free list of method and builtin function objects to 256 | 
 | 10449 |   entries each. | 
 | 10450 |  | 
 | 10451 | - Patch #1953: Added ``sys._compact_freelists()`` and the C API | 
 | 10452 |   functions ``PyInt_CompactFreeList`` and ``PyFloat_CompactFreeList`` | 
 | 10453 |   to compact the internal free lists of pre-allocted ints and floats. | 
 | 10454 |  | 
 | 10455 | - Bug #1983: Fixed return type of fork(), fork1() and forkpty() calls. | 
 | 10456 |   Python expected the return type int but the fork familie returns | 
 | 10457 |   pi_t. | 
 | 10458 |  | 
 | 10459 | - Issue #1678380: Fix a bug that identifies 0j and -0j when they | 
 | 10460 |   appear in the same code unit. | 
 | 10461 |  | 
 | 10462 | - Issue #2025: Added tuple.count() and tuple.index() methods to comply | 
 | 10463 |   with the collections.Sequence API. | 
 | 10464 |  | 
 | 10465 | - Fixed multiple reinitialization of the Python interpreter. The small | 
 | 10466 |   int list in longobject.c has caused a seg fault during the third | 
 | 10467 |   finalization. | 
 | 10468 |  | 
 | 10469 | - Issue #1973: bytes.fromhex('') raised SystemError. | 
 | 10470 |  | 
 | 10471 | - Issue #1771: remove cmp parameter from sorted() and list.sort(). | 
 | 10472 |  | 
 | 10473 | - Issue #1969: split and rsplit in bytearray are inconsistent. | 
 | 10474 |  | 
 | 10475 | - map() no longer accepts None for the first argument.  Use zip() | 
 | 10476 |   instead. | 
 | 10477 |  | 
 | 10478 | - Issue #1769: Now int("- 1") is not allowed any more. | 
 | 10479 |  | 
 | 10480 | - Object/longobject.c: long(float('nan')) raises an OverflowError | 
 | 10481 |   instead of returning 0. | 
 | 10482 |  | 
 | 10483 | - Issue #1762972: __file__ points to the source file instead of the | 
 | 10484 |   pyc/pyo file if the py file exists. | 
 | 10485 |  | 
 | 10486 | - Issue #1393: object_richcompare() returns NotImplemented instead of | 
 | 10487 |   False if the objects aren't equal, to give the other side a chance. | 
 | 10488 |  | 
 | 10489 | - Issue #1692: Interpreter was not displaying location of SyntaxError. | 
 | 10490 |  | 
 | 10491 | - Improve some exception messages when Windows fails to load an | 
 | 10492 |   extension module.  Now we get for example '%1 is not a valid Win32 | 
 | 10493 |   application' instead of 'error code 193'.  Also use Unicode strings | 
 | 10494 |   to deal with non-English locales. | 
 | 10495 |  | 
 | 10496 | - Issue #1587: Added instancemethod wrapper for PyCFunctions. The | 
 | 10497 |   Python C API has gained a new type *PyInstanceMethod_Type* and the | 
 | 10498 |   functions *PyInstanceMethod_Check(o)*, *PyInstanceMethod_New(func)* | 
 | 10499 |   and *PyInstanceMethod_Function(im)*. | 
 | 10500 |  | 
 | 10501 | - Constants gc.DEBUG_OBJECT and gc.DEBUG_INSTANCE have been removed | 
 | 10502 |   from the gc module; gc.DEBUG_COLLECTABLE or gc.DEBUG_UNCOLLECTABLE | 
 | 10503 |   are now enough to print the corresponding list of objects considered | 
 | 10504 |   by the garbage collector. | 
 | 10505 |  | 
 | 10506 | - Issue #1573: Improper use of the keyword-only syntax makes the | 
 | 10507 |   parser crash. | 
 | 10508 |  | 
 | 10509 | - Issue #1564: The set implementation should special-case PyUnicode | 
 | 10510 |   instead of PyString. | 
 | 10511 |  | 
 | 10512 | - Patch #1031213: Decode source line in SyntaxErrors back to its | 
 | 10513 |   original source encoding. | 
 | 10514 |  | 
 | 10515 | - inspect.getsource() includes the decorators again. | 
 | 10516 |  | 
 | 10517 | - Bug #1713: posixpath.ismount() claims symlink to a mountpoint is a | 
 | 10518 |   mountpoint. | 
 | 10519 |  | 
 | 10520 | - Fix utf-8-sig incremental decoder, which didn't recognise a BOM when | 
 | 10521 |   the first chunk fed to the decoder started with a BOM, but was | 
 | 10522 |   longer than 3 bytes. | 
 | 10523 |  | 
 | 10524 | Extension Modules | 
 | 10525 | ----------------- | 
 | 10526 |  | 
 | 10527 | - Code for itertools ifilter(), imap(), and izip() moved to bultins | 
 | 10528 |   and renamed to filter(), map(), and zip().  Also, renamed | 
 | 10529 |   izip_longest() to zip_longest() and ifilterfalse() to filterfalse(). | 
 | 10530 |  | 
 | 10531 | - Issue #1762972: Readded the reload() function as imp.reload(). | 
 | 10532 |  | 
 | 10533 | - Bug #2111: mmap segfaults when trying to write a block opened with | 
 | 10534 |   PROT_READ. | 
 | 10535 |  | 
 | 10536 | - Issue #2063: correct order of utime and stime in os.times() result | 
 | 10537 |   on Windows. | 
 | 10538 |  | 
 | 10539 | Library | 
 | 10540 | ------- | 
 | 10541 |  | 
 | 10542 | - Weakref dictionaries now inherit from MutableMapping. | 
 | 10543 |  | 
 | 10544 | - Created new UserDict class in collections module.  This one inherits | 
 | 10545 |   from and complies with the MutableMapping ABC.  Also, moved | 
 | 10546 |   UserString and UserList to the collections module.  The | 
 | 10547 |   MutableUserString class was removed. | 
 | 10548 |  | 
 | 10549 | - Removed UserDict.DictMixin.  Replaced all its uses with | 
 | 10550 |   collections.MutableMapping. | 
 | 10551 |  | 
 | 10552 | - Issue #1703: getpass() should flush after writing prompt. | 
 | 10553 |  | 
 | 10554 | - Issue #1585: IDLE uses non-existent xrange() function. | 
 | 10555 |  | 
 | 10556 | - Issue #1578: Problems in win_getpass. | 
 | 10557 |  | 
 | 10558 | Build | 
 | 10559 | ----- | 
 | 10560 |  | 
 | 10561 | - Renamed --enable-unicode configure flag to --with-wide-unicode, | 
 | 10562 |   since Unicode strings can't be disabled anymore. | 
 | 10563 |  | 
 | 10564 | C API | 
 | 10565 | ----- | 
 | 10566 |  | 
 | 10567 | - Issue #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, | 
 | 10568 |   Py_TYPE and Py_REFCNT. | 
 | 10569 |  | 
 | 10570 | - New API PyImport_ImportModuleNoBlock(), works like | 
 | 10571 |   PyImport_ImportModule() but won't block on the import lock | 
 | 10572 |   (returning an error instead). | 
 | 10573 |  | 
 | 10574 |  | 
 | 10575 | What's New in Python 3.0a2? | 
 | 10576 | =========================== | 
 | 10577 |  | 
 | 10578 | *Release date: 07-Dec-2007* | 
 | 10579 |  | 
 | 10580 | (Note: this list is incomplete.) | 
 | 10581 |  | 
 | 10582 | Core and Builtins | 
 | 10583 | ----------------- | 
 | 10584 |  | 
 | 10585 | - str8 now has the same construction signature as bytes. | 
 | 10586 |  | 
 | 10587 | - Comparisons between str and str8 now return False/True for ==/!=. | 
 | 10588 |   sqlite3 returns str8 when recreating on object from it's __conform__ | 
 | 10589 |   value.  The struct module returns str8 for all string-related | 
 | 10590 |   formats.  This was true before this change, but becomes more | 
 | 10591 |   apparent thanks to string comparisons always being False. | 
 | 10592 |  | 
 | 10593 | - Replaced `PyFile_FromFile()` with `PyFile_FromFd(fd, name. mode, | 
 | 10594 |   buffer, encoding, newline)`. | 
 | 10595 |  | 
 | 10596 | - Fixed `imp.find_module()` to obey the -*- coding: -*- header. | 
 | 10597 |  | 
 | 10598 | - Changed `__file__` and `co_filename` to unicode. The path names are decoded | 
 | 10599 |   with `Py_FileSystemDefaultEncoding` and a new API method | 
 | 10600 |   `PyUnicode_DecodeFSDefault(char*)` was added. | 
 | 10601 |  | 
 | 10602 | - io.open() and _fileio.FileIO have grown a new argument closefd. A | 
 | 10603 |   false value disables the closing of the file descriptor. | 
 | 10604 |  | 
 | 10605 | - Added a new option -b to issues warnings (-bb for errors) about | 
 | 10606 |   certain operations between bytes/buffer and str like str(b'') and | 
 | 10607 |   comparison. | 
 | 10608 |  | 
 | 10609 | - The standards streams sys.stdin, stdout and stderr may be None when | 
 | 10610 |   the when the C runtime library returns an invalid file descriptor | 
 | 10611 |   for the streams (fileno(stdin) < 0). For now this happens only for | 
 | 10612 |   Windows GUI apps and scripts started with `pythonw.exe`. | 
 | 10613 |  | 
 | 10614 | - Added PCbuild9 directory for VS 2008. | 
 | 10615 |  | 
 | 10616 | - Renamed structmember.h WRITE_RESTRICTED to PY_WRITE_RESTRICTED to | 
 | 10617 |   work around a name clash with VS 2008 on Windows. | 
 | 10618 |  | 
 | 10619 | - Unbound methods are gone for good. ClassObject.method returns an | 
 | 10620 |   ordinary function object, instance.method still returns a bound | 
 | 10621 |   method object.  The API of bound methods is cleaned up, too. The | 
 | 10622 |   im_class attribute is removed and im_func + im_self are renamed to | 
 | 10623 |   __func__ and __self__. The factory PyMethod_New takes only func and | 
 | 10624 |   instance as argument. | 
 | 10625 |  | 
 | 10626 | - intobject.h is no longer included by Python.h. The remains were | 
 | 10627 |   moved to longobject.h. It still exists to define several aliases | 
 | 10628 |   from PyInt to PyLong functions. | 
 | 10629 |  | 
 | 10630 | - Removed sys.maxint, use sys.maxsize instead. | 
 | 10631 |  | 
 | 10632 | Extension Modules | 
 | 10633 | ----------------- | 
 | 10634 |  | 
 | 10635 | - The `hotshot` profiler has been removed; use `cProfile` instead. | 
 | 10636 |  | 
 | 10637 | Library | 
 | 10638 | ------- | 
 | 10639 |  | 
 | 10640 | - When loading an external file using testfile(), the passed-in | 
 | 10641 |   encoding argument was being ignored if __loader__ is defined and | 
 | 10642 |   forcing the source to be UTF-8. | 
 | 10643 |  | 
 | 10644 | - The methods `os.tmpnam()`, `os.tempnam()` and `os.tmpfile()` have | 
 | 10645 |   been removed in favor of the tempfile module. | 
 | 10646 |  | 
 | 10647 | - Removed the 'new' module. | 
 | 10648 |  | 
 | 10649 | - Removed all types from the 'types' module that are easily accessable | 
 | 10650 |   through builtins. | 
 | 10651 |  | 
 | 10652 |  | 
 | 10653 | What's New in Python 3.0a1? | 
 | 10654 | =========================== | 
 | 10655 |  | 
 | 10656 | *Release date: 31-Aug-2007* | 
 | 10657 |  | 
 | 10658 | Core and Builtins | 
 | 10659 | ----------------- | 
 | 10660 |  | 
 | 10661 | - PEP 3131: Support non-ASCII identifiers. | 
 | 10662 |  | 
 | 10663 | - PEP 3120: Change default encoding to UTF-8. | 
 | 10664 |  | 
 | 10665 | - PEP 3123: Use proper C inheritance for PyObject. | 
 | 10666 |  | 
 | 10667 | - Removed the __oct__ and __hex__ special methods and added a bin() | 
 | 10668 |   builtin function. | 
 | 10669 |  | 
 | 10670 | - PEP 3127: octal literals now start with "0o". Old-style octal | 
 | 10671 |   literals are invalid. There are binary literals with a prefix of | 
 | 10672 |   "0b".  This also affects int(x, 0). | 
 | 10673 |  | 
 | 10674 | - None, True, False are now keywords. | 
 | 10675 |  | 
 | 10676 | - PEP 3119: isinstance() and issubclass() can be overridden. | 
 | 10677 |  | 
 | 10678 | - Remove BaseException.message. | 
 | 10679 |  | 
 | 10680 | - Remove tuple parameter unpacking (PEP 3113). | 
 | 10681 |  | 
 | 10682 | - Remove the f_restricted attribute from frames.  This naturally leads | 
 | 10683 |   to the removal of PyEval_GetRestricted() and PyFrame_IsRestricted(). | 
 | 10684 |  | 
 | 10685 | - PEP 3132 was accepted. That means that you can do ``a, *b = | 
 | 10686 |   range(5)`` to assign 0 to a and [1, 2, 3, 4] to b. | 
 | 10687 |  | 
 | 10688 | - range() now returns an iterator rather than a list.  Floats are not | 
 | 10689 |   allowed.  xrange() is no longer defined. | 
 | 10690 |  | 
 | 10691 | - Patch #1660500: hide iteration variable in list comps, add set comps | 
 | 10692 |   and use common code to handle compilation of iterative expressions. | 
 | 10693 |  | 
 | 10694 | - By default, != returns the opposite of ==, unless the latter returns | 
 | 10695 |   NotImplemented. | 
 | 10696 |  | 
 | 10697 | - Patch #1680961: sys.exitfunc has been removed and replaced with a | 
 | 10698 |   private C-level API. | 
 | 10699 |  | 
 | 10700 | - PEP 3115: new metaclasses: the metaclass is now specified as a | 
 | 10701 |   keyword arg in the class statement, which can now use the full | 
 | 10702 |   syntax of a parameter list. Also, the metaclass can implement a | 
 | 10703 |   __prepare__ function which will be called to create the dictionary | 
 | 10704 |   for the new class namespace. | 
 | 10705 |  | 
 | 10706 | - The long-deprecated argument "pend" of PyFloat_FromString() has been | 
 | 10707 |   removed. | 
 | 10708 |  | 
 | 10709 | - The dir() function has been extended to call the __dir__() method on | 
 | 10710 |   its argument, if it exists. If not, it will work like before. This | 
 | 10711 |   allows customizing the output of dir() in the presence of a | 
 | 10712 |   __getattr__(). | 
 | 10713 |  | 
 | 10714 | - Removed support for __members__ and __methods__. | 
 | 10715 |  | 
 | 10716 | - Removed indexing/slicing on BaseException. | 
 | 10717 |  | 
 | 10718 | - input() became raw_input(): the name input() now implements the | 
 | 10719 |   functionality formerly known as raw_input(); the name raw_input() is | 
 | 10720 |   no longer defined. | 
 | 10721 |  | 
 | 10722 | - Classes listed in an 'except' clause must inherit from | 
 | 10723 |   BaseException. | 
 | 10724 |  | 
 | 10725 | - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone; | 
 | 10726 |   and .keys(), .items(), .values() return dict views, which behave | 
 | 10727 |   like sets. | 
 | 10728 |  | 
 | 10729 | - PEP 3105: print is now a function.  Also (not in the PEP) the | 
 | 10730 |   'softspace' attribute of files is now gone (since print() doesn't | 
 | 10731 |   use it).  A side effect of this change is that you can get | 
 | 10732 |   incomplete output lines in interactive sessions: | 
 | 10733 |  | 
 | 10734 |   >>> print(42, end="") | 
 | 10735 |   42>>> | 
 | 10736 |  | 
 | 10737 |   We may be able to fix this after the I/O library rewrite. | 
 | 10738 |  | 
 | 10739 | - PEP 3102: keyword-only arguments. | 
 | 10740 |  | 
 | 10741 | - Int/Long unification is complete.  The 'long' built-in type and | 
 | 10742 |   literals with trailing 'L' or 'l' have been removed.  Performance | 
 | 10743 |   may be sub-optimal (haven't really benchmarked). | 
 | 10744 |  | 
 | 10745 | - 'except E, V' must now be spelled as 'except E as V' and deletes V | 
 | 10746 |   at the end of the except clause; V must be a simple name. | 
 | 10747 |  | 
 | 10748 | - Added function annotations per PEP 3107. | 
 | 10749 |  | 
 | 10750 | - Added nonlocal declaration from PEP 3104: | 
 | 10751 |  | 
 | 10752 |   >>> def f(x): | 
 | 10753 |   ...     def inc(): | 
 | 10754 |   ...         nonlocal x | 
 | 10755 |   ...         x += 1 | 
 | 10756 |   ...         return x | 
 | 10757 |   ...     return inc | 
 | 10758 |   ... | 
 | 10759 |   >>> inc = f(0) | 
 | 10760 |   >>> inc() | 
 | 10761 |   1 | 
 | 10762 |   >>> inc() | 
 | 10763 |   2 | 
 | 10764 |  | 
 | 10765 | - Moved intern() to sys.intern(). | 
 | 10766 |  | 
 | 10767 | - exec is now a function. | 
 | 10768 |  | 
 | 10769 | - Renamed nb_nonzero to nb_bool and __nonzero__ to __bool__. | 
 | 10770 |  | 
 | 10771 | - Classic classes are a thing of the past.  All classes are new style. | 
 | 10772 |  | 
 | 10773 | - Exceptions *must* derive from BaseException. | 
 | 10774 |  | 
 | 10775 | - Integer division always returns a float.  The -Q option is no more. | 
 | 10776 |   All the following are gone: | 
 | 10777 |  | 
 | 10778 |   * PyNumber_Divide and PyNumber_InPlaceDivide | 
 | 10779 |   * __div__, __rdiv__, and __idiv__ | 
 | 10780 |   * nb_divide, nb_inplace_divide | 
 | 10781 |   * operator.div, operator.idiv, operator.__div__, operator.__idiv__ | 
 | 10782 |     (Only __truediv__ and __floordiv__ remain, not sure how to handle | 
 | 10783 |     them if we want to re-use __div__ and friends.  If we do, it will | 
 | 10784 |     make it harder to write code for both 2.x and 3.x.) | 
 | 10785 |  | 
 | 10786 | - 'as' and 'with' are keywords. | 
 | 10787 |  | 
 | 10788 | - Absolute import is the default behavior for 'import foo' etc. | 
 | 10789 |  | 
 | 10790 | - Removed support for syntax: backticks (ie, `x`), <>. | 
 | 10791 |  | 
 | 10792 | - Removed these Python builtins: apply(), callable(), coerce(), | 
 | 10793 |   execfile(), file(), reduce(), reload(). | 
 | 10794 |  | 
 | 10795 | - Removed these Python methods: {}.has_key. | 
 | 10796 |  | 
 | 10797 | - Removed these opcodes: BINARY_DIVIDE, INPLACE_DIVIDE, UNARY_CONVERT. | 
 | 10798 |  | 
 | 10799 | - Remove C API support for restricted execution. | 
 | 10800 |  | 
 | 10801 | - zip(), map() and filter() now return iterators, behaving like their | 
 | 10802 |   itertools counterparts.  This also affect map()'s behavior on | 
 | 10803 |   sequences of unequal length -- it now stops after the shortest one | 
 | 10804 |   is exhausted. | 
 | 10805 |  | 
 | 10806 | - Additions: set literals, set comprehensions, ellipsis literal. | 
 | 10807 |  | 
 | 10808 | - Added class decorators per PEP 3129. | 
 | 10809 |  | 
 | 10810 |  | 
 | 10811 | Extension Modules | 
 | 10812 | ----------------- | 
 | 10813 |  | 
 | 10814 | - Removed the imageop module.  Obsolete long with its unit tests | 
 | 10815 |   becoming useless from the removal of rgbimg and imgfile. | 
 | 10816 |  | 
 | 10817 | - Removed these attributes from the operator module: div, idiv, | 
 | 10818 |   __div__, __idiv__, isCallable, sequenceIncludes. | 
 | 10819 |  | 
 | 10820 | - Removed these attributes from the sys module: exc_clear(), exc_type, | 
 | 10821 |   exc_value, exc_traceback. | 
 | 10822 |  | 
 | 10823 |  | 
 | 10824 | Library | 
 | 10825 | ------- | 
 | 10826 |  | 
 | 10827 | - Removed the compiler package.  Use of the _ast module and (an | 
 | 10828 |   eventual) AST -> bytecode mechanism. | 
 | 10829 |  | 
 | 10830 | - Removed these modules: audiodev, Bastion, bsddb185, exceptions, | 
 | 10831 |   linuxaudiodev, md5, MimeWriter, mimify, popen2, rexec, sets, sha, | 
 | 10832 |   stringold, strop, sunaudiodev, timing, xmllib. | 
 | 10833 |  | 
 | 10834 | - Moved the toaiff module to Tools/Demos. | 
 | 10835 |  | 
 | 10836 | - Removed obsolete IRIX modules: al/AL, cd/CD, cddb, cdplayer, cl/CL, | 
 | 10837 |   DEVICE, ERRNO, FILE, fl/FL, flp, fm, GET, gl/GL, GLWS, IN, imgfile, | 
 | 10838 |   IOCTL, jpeg, panel, panelparser, readcd, sgi, sv/SV, torgb, WAIT. | 
 | 10839 |  | 
 | 10840 | - Removed obsolete functions: commands.getstatus(), os.popen*(). | 
 | 10841 |  | 
 | 10842 | - Removed functions in the string module that are also string methods; | 
 | 10843 |   Remove string.{letters, lowercase, uppercase}. | 
 | 10844 |  | 
 | 10845 | - Removed support for long obsolete platforms: plat-aix3, plat-irix5. | 
 | 10846 |  | 
 | 10847 | - Removed xmlrpclib.SlowParser.  It was based on xmllib. | 
 | 10848 |  | 
 | 10849 | - Patch #1680961: atexit has been reimplemented in C. | 
 | 10850 |  | 
 | 10851 | - Add new codecs for UTF-32, UTF-32-LE and UTF-32-BE. | 
 | 10852 |  | 
 | 10853 | Build | 
 | 10854 | ----- | 
 | 10855 |  | 
 | 10856 | C API | 
 | 10857 | ----- | 
 | 10858 |  | 
 | 10859 | - Removed these Python slots: __coerce__, __div__, __idiv__, __rdiv__. | 
 | 10860 |  | 
 | 10861 | - Removed these C APIs: PyNumber_Coerce(), PyNumber_CoerceEx(), | 
 | 10862 |   PyMember_Get, PyMember_Set. | 
 | 10863 |  | 
 | 10864 | - Removed these C slots/fields: nb_divide, nb_inplace_divide. | 
 | 10865 |  | 
 | 10866 | - Removed these macros: staticforward, statichere, PyArg_GetInt, | 
 | 10867 |   PyArg_NoArgs, _PyObject_Del. | 
 | 10868 |  | 
 | 10869 | - Removed these typedefs: intargfunc, intintargfunc, intobjargproc, | 
 | 10870 |   intintobjargproc, getreadbufferproc, getwritebufferproc, | 
 | 10871 |   getsegcountproc, getcharbufferproc, memberlist. | 
 | 10872 |  | 
 | 10873 | Tests | 
 | 10874 | ----- | 
 | 10875 |  | 
 | 10876 | - Removed test.testall as test.regrtest replaces it. | 
 | 10877 |  | 
 | 10878 | Documentation | 
 | 10879 | ------------- | 
 | 10880 |  | 
 | 10881 | Mac | 
 | 10882 | --- | 
 | 10883 |  | 
 | 10884 | - The cfmfile module was removed. | 
 | 10885 |  | 
 | 10886 | Platforms | 
 | 10887 | --------- | 
 | 10888 |  | 
 | 10889 | - Support for BeOS and AtheOS was removed (according to PEP 11). | 
 | 10890 |  | 
 | 10891 | - Support for RiscOS, Irix, Tru64 was removed (alledgedly). | 
 | 10892 |  | 
 | 10893 | Tools/Demos | 
 | 10894 | ----------- | 
 | 10895 |  | 
 | 10896 |  | 
| Christian Heimes | c3f30c4 | 2008-02-22 16:37:40 +0000 | [diff] [blame] | 10897 | What's New in Python 2.5 release candidate 1? | 
 | 10898 | ============================================= | 
 | 10899 |  | 
 | 10900 | *Release date: 17-AUG-2006* | 
 | 10901 |  | 
 | 10902 | Core and builtins | 
 | 10903 | ----------------- | 
 | 10904 |  | 
 | 10905 | - Unicode objects will no longer raise an exception when being | 
 | 10906 |   compared equal or unequal to a string and a UnicodeDecodeError | 
 | 10907 |   exception occurs, e.g. as result of a decoding failure. | 
 | 10908 |  | 
 | 10909 |   Instead, the equal (==) and unequal (!=) comparison operators will | 
 | 10910 |   now issue a UnicodeWarning and interpret the two objects as | 
 | 10911 |   unequal. The UnicodeWarning can be filtered as desired using | 
 | 10912 |   the warning framework, e.g. silenced completely, turned into an | 
 | 10913 |   exception, logged, etc. | 
 | 10914 |  | 
 | 10915 |   Note that compare operators other than equal and unequal will still | 
 | 10916 |   raise UnicodeDecodeError exceptions as they've always done. | 
 | 10917 |  | 
 | 10918 | - Fix segfault when doing string formatting on subclasses of long. | 
 | 10919 |  | 
 | 10920 | - Fix bug related to __len__ functions using values > 2**32 on 64-bit machines | 
 | 10921 |   with new-style classes. | 
 | 10922 |  | 
 | 10923 | - Fix bug related to __len__ functions returning negative values with | 
 | 10924 |   classic classes. | 
 | 10925 |  | 
 | 10926 | - Patch #1538606, Fix __index__() clipping.  There were some problems | 
 | 10927 |   discovered with the API and how integers that didn't fit into Py_ssize_t | 
 | 10928 |   were handled.  This patch attempts to provide enough alternatives | 
 | 10929 |   to effectively use __index__. | 
 | 10930 |  | 
 | 10931 | - Bug #1536021: __hash__ may now return long int; the final hash | 
 | 10932 |   value is obtained by invoking hash on the long int. | 
 | 10933 |  | 
 | 10934 | - Bug #1536786: buffer comparison could emit a RuntimeWarning. | 
 | 10935 |  | 
 | 10936 | - Bug #1535165: fixed a segfault in input() and raw_input() when | 
 | 10937 |   sys.stdin is closed. | 
 | 10938 |  | 
 | 10939 | - On Windows, the PyErr_Warn function is now exported from | 
 | 10940 |   the Python dll again. | 
 | 10941 |  | 
 | 10942 | - Bug #1191458: tracing over for loops now produces a line event | 
 | 10943 |   on each iteration.  Fixing this problem required changing the .pyc | 
 | 10944 |   magic number.  This means that .pyc files generated before 2.5c1 | 
 | 10945 |   will be regenerated. | 
 | 10946 |  | 
 | 10947 | - Bug #1333982: string/number constants were inappropriately stored | 
 | 10948 |   in the byte code and co_consts even if they were not used, ie | 
 | 10949 |   immediately popped off the stack. | 
 | 10950 |  | 
 | 10951 | - Fixed a reference-counting problem in property(). | 
 | 10952 |  | 
 | 10953 |  | 
 | 10954 | Library | 
 | 10955 | ------- | 
 | 10956 |  | 
 | 10957 | - Fix a bug in the ``compiler`` package that caused invalid code to be | 
 | 10958 |   generated for generator expressions. | 
 | 10959 |  | 
 | 10960 | - The distutils version has been changed to 2.5.0. The change to | 
 | 10961 |   keep it programmatically in sync with the Python version running | 
 | 10962 |   the code (introduced in 2.5b3) has been reverted. It will continue | 
 | 10963 |   to be maintained manually as static string literal. | 
 | 10964 |  | 
 | 10965 | - If the Python part of a ctypes callback function returns None, | 
 | 10966 |   and this cannot be converted to the required C type, an exception is | 
 | 10967 |   printed with PyErr_WriteUnraisable.  Before this change, the C | 
 | 10968 |   callback returned arbitrary values to the calling code. | 
 | 10969 |  | 
 | 10970 | - The __repr__ method of a NULL ctypes.py_object() no longer raises | 
 | 10971 |   an exception. | 
 | 10972 |  | 
 | 10973 | - uuid.UUID now has a bytes_le attribute. This returns the UUID in | 
 | 10974 |   little-endian byte order for Windows. In addition, uuid.py gained some | 
 | 10975 |   workarounds for clocks with low resolution, to stop the code yielding | 
 | 10976 |   duplicate UUIDs. | 
 | 10977 |  | 
 | 10978 | - Patch #1540892: site.py Quitter() class attempts to close sys.stdin | 
 | 10979 |   before raising SystemExit, allowing IDLE to honor quit() and exit(). | 
 | 10980 |  | 
 | 10981 | - Bug #1224621: make tabnanny recognize IndentationErrors raised by tokenize. | 
 | 10982 |  | 
 | 10983 | - Patch #1536071: trace.py should now find the full module name of a | 
 | 10984 |   file correctly even on Windows. | 
 | 10985 |  | 
 | 10986 | - logging's atexit hook now runs even if the rest of the module has | 
 | 10987 |   already been cleaned up. | 
 | 10988 |  | 
 | 10989 | - Bug #1112549, fix DoS attack on cgi.FieldStorage. | 
 | 10990 |  | 
 | 10991 | - Bug #1531405, format_exception no longer raises an exception if | 
 | 10992 |   str(exception) raised an exception. | 
 | 10993 |  | 
 | 10994 | - Fix a bug in the ``compiler`` package that caused invalid code to be | 
 | 10995 |   generated for nested functions. | 
 | 10996 |  | 
 | 10997 |  | 
 | 10998 | Extension Modules | 
 | 10999 | ----------------- | 
 | 11000 |  | 
 | 11001 | - Patch #1511317: don't crash on invalid hostname (alias) info. | 
 | 11002 |  | 
 | 11003 | - Patch #1535500: fix segfault in BZ2File.writelines and make sure it | 
 | 11004 |   raises the correct exceptions. | 
 | 11005 |  | 
 | 11006 | - Patch # 1536908: enable building ctypes on OpenBSD/AMD64.  The | 
 | 11007 |   '-no-stack-protector' compiler flag for OpenBSD has been removed. | 
 | 11008 |  | 
 | 11009 | - Patch #1532975 was applied, which fixes Bug #1533481: ctypes now | 
 | 11010 |   uses the _as_parameter_ attribute when objects are passed to foreign | 
 | 11011 |   function calls.  The ctypes version number was changed to 1.0.1. | 
 | 11012 |  | 
 | 11013 | - Bug #1530559, struct.pack raises TypeError where it used to convert. | 
 | 11014 |   Passing float arguments to struct.pack when integers are expected | 
 | 11015 |   now triggers a DeprecationWarning. | 
 | 11016 |  | 
 | 11017 |  | 
 | 11018 | Tests | 
 | 11019 | ----- | 
 | 11020 |  | 
 | 11021 | - test_socketserver should now work on cygwin and not fail sporadically | 
 | 11022 |   on other platforms. | 
 | 11023 |  | 
 | 11024 | - test_mailbox should now work on cygwin versions 2006-08-10 and later. | 
 | 11025 |  | 
 | 11026 | - Bug #1535182: really test the xreadlines() method of bz2 objects. | 
 | 11027 |  | 
 | 11028 | - test_threading now skips testing alternate thread stack sizes on | 
 | 11029 |   platforms that don't support changing thread stack size. | 
 | 11030 |  | 
 | 11031 |  | 
 | 11032 | Documentation | 
 | 11033 | ------------- | 
 | 11034 |  | 
 | 11035 | - Patch #1534922: unittest docs were corrected and enhanced. | 
 | 11036 |  | 
 | 11037 |  | 
 | 11038 | Build | 
 | 11039 | ----- | 
 | 11040 |  | 
 | 11041 | - Bug #1535502, build _hashlib on Windows, and use masm assembler | 
 | 11042 |   code in OpenSSL. | 
 | 11043 |  | 
 | 11044 | - Bug #1534738, win32 debug version of _msi should be _msi_d.pyd. | 
 | 11045 |  | 
 | 11046 | - Bug #1530448, ctypes build failure on Solaris 10 was fixed. | 
 | 11047 |  | 
 | 11048 |  | 
 | 11049 | C API | 
 | 11050 | ----- | 
 | 11051 |  | 
 | 11052 | - New API for Unicode rich comparisons: PyUnicode_RichCompare() | 
 | 11053 |  | 
 | 11054 | - Bug #1069160.  Internal correctness changes were made to | 
 | 11055 |   ``PyThreadState_SetAsyncExc()``.  A test case was added, and | 
 | 11056 |   the documentation was changed to state that the return value | 
 | 11057 |   is always 1 (normal) or 0 (if the specified thread wasn't found). | 
 | 11058 |  | 
 | 11059 |  | 
 | 11060 | What's New in Python 2.5 beta 3? | 
 | 11061 | ================================ | 
 | 11062 |  | 
 | 11063 | *Release date: 03-AUG-2006* | 
 | 11064 |  | 
 | 11065 | Core and builtins | 
 | 11066 | ----------------- | 
 | 11067 |  | 
 | 11068 | - _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t; it previously | 
 | 11069 |   returned a long (see PEP 353). | 
 | 11070 |  | 
 | 11071 | - Bug #1515471: string.replace() accepts character buffers again. | 
 | 11072 |  | 
 | 11073 | - Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn(). | 
 | 11074 |   This provides the proper warning for struct.pack(). | 
 | 11075 |   PyErr_Warn() is now deprecated in favor of PyErr_WarnEx(). | 
 | 11076 |  | 
 | 11077 | - Patch #1531113: Fix augmented assignment with yield expressions. | 
 | 11078 |   Also fix a SystemError when trying to assign to yield expressions. | 
 | 11079 |  | 
 | 11080 | - Bug #1529871: The speed enhancement patch #921466 broke Python's compliance | 
 | 11081 |   with PEP 302.  This was fixed by adding an ``imp.NullImporter`` type that is | 
 | 11082 |   used in ``sys.path_importer_cache`` to cache non-directory paths and avoid | 
 | 11083 |   excessive filesystem operations during imports. | 
 | 11084 |  | 
 | 11085 | - Bug #1521947: When checking for overflow, ``PyOS_strtol()`` used some | 
 | 11086 |   operations on signed longs that are formally undefined by C. | 
 | 11087 |   Unfortunately, at least one compiler now cares about that, so complicated | 
 | 11088 |   the code to make that compiler happy again. | 
 | 11089 |  | 
 | 11090 | - Bug #1524310: Properly report errors from FindNextFile in os.listdir. | 
 | 11091 |  | 
 | 11092 | - Patch #1232023: Stop including current directory in search | 
 | 11093 |   path on Windows. | 
 | 11094 |  | 
 | 11095 | - Fix some potential crashes found with failmalloc. | 
 | 11096 |  | 
 | 11097 | - Fix warnings reported by Klocwork's static analysis tool. | 
 | 11098 |  | 
 | 11099 | - Bug #1512814, Fix incorrect lineno's when code within a function | 
 | 11100 |   had more than 255 blank lines. | 
 | 11101 |  | 
 | 11102 | - Patch #1521179: Python now accepts the standard options ``--help`` and | 
 | 11103 |   ``--version`` as well as ``/?`` on Windows. | 
 | 11104 |  | 
 | 11105 | - Bug #1520864: unpacking singleton tuples in a 'for' loop (for x, in) works | 
 | 11106 |   again.  Fixing this problem required changing the .pyc magic number. | 
 | 11107 |   This means that .pyc files generated before 2.5b3 will be regenerated. | 
 | 11108 |  | 
 | 11109 | - Bug #1524317:  Compiling Python ``--without-threads`` failed. | 
 | 11110 |   The Python core compiles again, and, in a build without threads, the | 
 | 11111 |   new ``sys._current_frames()`` returns a dictionary with one entry, | 
 | 11112 |   mapping the faux "thread id" 0 to the current frame. | 
 | 11113 |  | 
 | 11114 | - Bug #1525447: build on MacOS X on a case-sensitive filesystem. | 
 | 11115 |  | 
 | 11116 |  | 
 | 11117 | Library | 
 | 11118 | ------- | 
 | 11119 |  | 
 | 11120 | - Fix #1693149.  Now you can pass several modules separated by | 
 | 11121 |   comma to trace.py in the same --ignore-module option. | 
 | 11122 |  | 
 | 11123 | - Correction of patch #1455898: In the mbcs decoder, set final=False | 
 | 11124 |   for stream decoder, but final=True for the decode function. | 
 | 11125 |  | 
 | 11126 | - os.urandom no longer masks unrelated exceptions like SystemExit or | 
 | 11127 |   KeyboardInterrupt. | 
 | 11128 |  | 
 | 11129 | - Bug #1525866: Don't copy directory stat times in | 
 | 11130 |   shutil.copytree on Windows | 
 | 11131 |  | 
 | 11132 | - Bug #1002398: The documentation for os.path.sameopenfile now correctly | 
 | 11133 |   refers to file descriptors, not file objects. | 
 | 11134 |  | 
 | 11135 | - The renaming of the xml package to xmlcore, and the import hackery done | 
 | 11136 |   to make it appear at both names, has been removed.  Bug #1511497, | 
 | 11137 |   #1513611, and probably others. | 
 | 11138 |  | 
 | 11139 | - Bug #1441397: The compiler module now recognizes module and function | 
 | 11140 |   docstrings correctly as it did in Python 2.4. | 
 | 11141 |  | 
 | 11142 | - Bug #1529297:  The rewrite of doctest for Python 2.4 unintentionally | 
 | 11143 |   lost that tests are sorted by name before being run.  This rarely | 
 | 11144 |   matters for well-written tests, but can create baffling symptoms if | 
 | 11145 |   side effects from one test to the next affect outcomes.  ``DocTestFinder`` | 
 | 11146 |   has been changed to sort the list of tests it returns. | 
 | 11147 |  | 
 | 11148 | - The distutils version has been changed to 2.5.0, and is now kept | 
 | 11149 |   in sync with sys.version_info[:3]. | 
 | 11150 |  | 
 | 11151 | - Bug #978833: Really close underlying socket in _socketobject.close. | 
 | 11152 |  | 
 | 11153 | - Bug #1459963: urllib and urllib2 now normalize HTTP header names with | 
 | 11154 |   title(). | 
 | 11155 |  | 
 | 11156 | - Patch #1525766: In pkgutil.walk_packages, correctly pass the onerror callback | 
 | 11157 |   to recursive calls and call it with the failing package name. | 
 | 11158 |  | 
 | 11159 | - Bug #1525817: Don't truncate short lines in IDLE's tool tips. | 
 | 11160 |  | 
 | 11161 | - Patch #1515343: Fix printing of deprecated string exceptions with a | 
 | 11162 |   value in the traceback module. | 
 | 11163 |  | 
 | 11164 | - Resync optparse with Optik 1.5.3: minor tweaks for/to tests. | 
 | 11165 |  | 
 | 11166 | - Patch #1524429: Use repr() instead of backticks in Tkinter again. | 
 | 11167 |  | 
 | 11168 | - Bug #1520914: Change time.strftime() to accept a zero for any position in its | 
 | 11169 |   argument tuple.  For arguments where zero is illegal, the value is forced to | 
 | 11170 |   the minimum value that is correct.  This is to support an undocumented but | 
 | 11171 |   common way people used  to fill in inconsequential information in the time | 
 | 11172 |   tuple pre-2.4. | 
 | 11173 |  | 
 | 11174 | - Patch #1220874: Update the binhex module for Mach-O. | 
 | 11175 |  | 
 | 11176 | - The email package has improved RFC 2231 support, specifically for | 
 | 11177 |   recognizing the difference between encoded (name*0*=<blah>) and non-encoded | 
 | 11178 |   (name*0=<blah>) parameter continuations.  This may change the types of | 
 | 11179 |   values returned from email.message.Message.get_param() and friends. | 
 | 11180 |   Specifically in some cases where non-encoded continuations were used, | 
 | 11181 |   get_param() used to return a 3-tuple of (None, None, string) whereas now it | 
 | 11182 |   will just return the string (since non-encoded continuations don't have | 
 | 11183 |   charset and language parts). | 
 | 11184 |  | 
 | 11185 |   Also, whereas % values were decoded in all parameter continuations, they are | 
 | 11186 |   now only decoded in encoded parameter parts. | 
 | 11187 |  | 
 | 11188 | - Bug #1517990: IDLE keybindings on MacOS X now work correctly | 
 | 11189 |  | 
 | 11190 | - Bug #1517996: IDLE now longer shows the default Tk menu when a | 
 | 11191 |   path browser, class browser or debugger is the frontmost window on MacOS X | 
 | 11192 |  | 
 | 11193 | - Patch #1520294: Support for getset and member descriptors in types.py, | 
 | 11194 |   inspect.py, and pydoc.py.  Specifically, this allows for querying the type | 
 | 11195 |   of an object against these built-in types and more importantly, for getting | 
 | 11196 |   their docstrings printed in the interactive interpreter's help() function. | 
 | 11197 |  | 
 | 11198 |  | 
 | 11199 | Extension Modules | 
 | 11200 | ----------------- | 
 | 11201 |  | 
 | 11202 | - Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs during | 
 | 11203 |   a socket operation on a socket with a timeout, the exception will be | 
 | 11204 |   caught correctly.  Previously, the exception was not caught. | 
 | 11205 |  | 
 | 11206 | - Patch #1529514: The _ctypes extension is now compiled on more | 
 | 11207 |   openbsd target platforms. | 
 | 11208 |  | 
 | 11209 | - The ``__reduce__()`` method of the new ``collections.defaultdict`` had | 
 | 11210 |   a memory leak, affecting pickles and deep copies. | 
 | 11211 |  | 
 | 11212 | - Bug #1471938: Fix curses module build problem on Solaris 8; patch by | 
 | 11213 |   Paul Eggert. | 
 | 11214 |  | 
 | 11215 | - Patch #1448199: Release interpreter lock in _winreg.ConnectRegistry. | 
 | 11216 |  | 
 | 11217 | - Patch #1521817: Index range checking on ctypes arrays containing | 
 | 11218 |   exactly one element enabled again.  This allows iterating over these | 
 | 11219 |   arrays, without the need to check the array size before. | 
 | 11220 |  | 
 | 11221 | - Bug #1521375: When the code in ctypes.util.find_library was | 
 | 11222 |   run with root privileges, it could overwrite or delete | 
 | 11223 |   /dev/null in certain cases; this is now fixed. | 
 | 11224 |  | 
 | 11225 | - Bug #1467450: On Mac OS X 10.3, RTLD_GLOBAL is now used as the | 
 | 11226 |   default mode for loading shared libraries in ctypes. | 
 | 11227 |  | 
 | 11228 | - Because of a misspelled preprocessor symbol, ctypes was always | 
 | 11229 |   compiled without thread support; this is now fixed. | 
 | 11230 |  | 
 | 11231 | - pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrename | 
 | 11232 |   methods now allow their database parameter to be None as the | 
 | 11233 |   sleepycat API allows. | 
 | 11234 |  | 
 | 11235 | - Bug #1526460: Fix socketmodule compile on NetBSD as it has a different | 
 | 11236 |   bluetooth API compared with Linux and FreeBSD. | 
 | 11237 |  | 
 | 11238 | Tests | 
 | 11239 | ----- | 
 | 11240 |  | 
 | 11241 | - Bug #1501330: Change test_ossaudiodev to be much more tolerant in terms of | 
 | 11242 |   how long the test file should take to play.  Now accepts taking 2.93 secs | 
 | 11243 |   (exact time) +/- 10% instead of the hard-coded 3.1 sec. | 
 | 11244 |  | 
 | 11245 | - Patch #1529686: The standard tests ``test_defaultdict``, ``test_iterlen``, | 
 | 11246 |   ``test_uuid`` and ``test_email_codecs`` didn't actually run any tests when | 
 | 11247 |   run via ``regrtest.py``. Now they do. | 
 | 11248 |  | 
 | 11249 | Build | 
 | 11250 | ----- | 
 | 11251 |  | 
 | 11252 | - Bug #1439538: Drop usage of test -e in configure as it is not portable. | 
 | 11253 |  | 
 | 11254 | Mac | 
 | 11255 | --- | 
 | 11256 |  | 
 | 11257 | - PythonLauncher now works correctly when the path to the script contains | 
 | 11258 |   characters that are treated specially by the shell (such as quotes). | 
 | 11259 |  | 
 | 11260 | - Bug #1527397: PythonLauncher now launches scripts with the working directory | 
 | 11261 |   set to the directory that contains the script instead of the user home | 
 | 11262 |   directory. That latter was an implementation accident and not what users | 
 | 11263 |   expect. | 
 | 11264 |  | 
 | 11265 |  | 
 | 11266 | What's New in Python 2.5 beta 2? | 
 | 11267 | ================================ | 
 | 11268 |  | 
 | 11269 | *Release date: 11-JUL-2006* | 
 | 11270 |  | 
 | 11271 | Core and builtins | 
 | 11272 | ----------------- | 
 | 11273 |  | 
 | 11274 | - Bug #1441486: The literal representation of -(sys.maxint - 1) | 
 | 11275 |   again evaluates to a int object, not a long. | 
 | 11276 |  | 
 | 11277 | - Bug #1501934: The scope of global variables that are locally assigned | 
 | 11278 |   using augmented assignment is now correctly determined. | 
 | 11279 |  | 
 | 11280 | - Bug #927248: Recursive method-wrapper objects can now safely | 
 | 11281 |   be released. | 
 | 11282 |  | 
 | 11283 | - Bug #1417699: Reject locale-specific decimal point in float() | 
 | 11284 |   and atof(). | 
 | 11285 |  | 
 | 11286 | - Bug #1511381: codec_getstreamcodec() in codec.c is corrected to | 
 | 11287 |   omit a default "error" argument for NULL pointer.  This allows | 
 | 11288 |   the parser to take a codec from cjkcodecs again. | 
 | 11289 |  | 
 | 11290 | - Bug #1519018: 'as' is now validated properly in import statements. | 
 | 11291 |  | 
 | 11292 | - On 64 bit systems, int literals that use less than 64 bits are | 
 | 11293 |   now ints rather than longs. | 
 | 11294 |  | 
 | 11295 | - Bug #1512814, Fix incorrect lineno's when code at module scope | 
 | 11296 |   started after line 256. | 
 | 11297 |  | 
 | 11298 | - New function ``sys._current_frames()`` returns a dict mapping thread | 
 | 11299 |   id to topmost thread stack frame.  This is for expert use, and is | 
 | 11300 |   especially useful for debugging application deadlocks.  The functionality | 
 | 11301 |   was previously available in Fazal Majid's ``threadframe`` extension | 
 | 11302 |   module, but it wasn't possible to do this in a wholly threadsafe way from | 
 | 11303 |   an extension. | 
 | 11304 |  | 
 | 11305 | Library | 
 | 11306 | ------- | 
 | 11307 |  | 
 | 11308 | - Bug #1257728: Mention Cygwin in distutils error message about a missing | 
 | 11309 |   VS 2003. | 
 | 11310 |  | 
 | 11311 | - Patch #1519566: Update turtle demo, make begin_fill idempotent. | 
 | 11312 |  | 
 | 11313 | - Bug #1508010: msvccompiler now requires the DISTUTILS_USE_SDK | 
 | 11314 |   environment variable to be set in order to the SDK environment | 
 | 11315 |   for finding the compiler, include files, etc. | 
 | 11316 |  | 
 | 11317 | - Bug #1515998: Properly generate logical ids for files in bdist_msi. | 
 | 11318 |  | 
 | 11319 | - warnings.py now ignores ImportWarning by default | 
 | 11320 |  | 
 | 11321 | - string.Template() now correctly handles tuple-values. Previously, | 
 | 11322 |   multi-value tuples would raise an exception and single-value tuples would | 
 | 11323 |   be treated as the value they contain, instead. | 
 | 11324 |  | 
 | 11325 | - Bug #822974: Honor timeout in telnetlib.{expect,read_until} | 
 | 11326 |   even if some data are received. | 
 | 11327 |  | 
 | 11328 | - Bug #1267547: Put proper recursive setup.py call into the | 
 | 11329 |   spec file generated by bdist_rpm. | 
 | 11330 |  | 
 | 11331 | - Bug #1514693: Update turtle's heading when switching between | 
 | 11332 |   degrees and radians. | 
 | 11333 |  | 
 | 11334 | - Reimplement turtle.circle using a polyline, to allow correct | 
 | 11335 |   filling of arcs. | 
 | 11336 |  | 
 | 11337 | - Bug #1514703: Only setup canvas window in turtle when the canvas | 
 | 11338 |   is created. | 
 | 11339 |  | 
 | 11340 | - Bug #1513223: .close() of a _socketobj now releases the underlying | 
 | 11341 |   socket again, which then gets closed as it becomes unreferenced. | 
 | 11342 |  | 
 | 11343 | - Bug #1504333: Make sgmllib support angle brackets in quoted | 
 | 11344 |   attribute values. | 
 | 11345 |  | 
 | 11346 | - Bug #853506: Fix IPv6 address parsing in unquoted attributes in | 
 | 11347 |   sgmllib ('[' and ']' were not accepted). | 
 | 11348 |  | 
 | 11349 | - Fix a bug in the turtle module's end_fill function. | 
 | 11350 |  | 
 | 11351 | - Bug #1510580: The 'warnings' module improperly required that a Warning | 
 | 11352 |   category be either a types.ClassType and a subclass of Warning.  The proper | 
 | 11353 |   check is just that it is a subclass with Warning as the documentation states. | 
 | 11354 |  | 
 | 11355 | - The compiler module now correctly compiles the new try-except-finally | 
 | 11356 |   statement (bug #1509132). | 
 | 11357 |  | 
 | 11358 | - The wsgiref package is now installed properly on Unix. | 
 | 11359 |  | 
 | 11360 | - A bug was fixed in logging.config.fileConfig() which caused a crash on | 
 | 11361 |   shutdown when fileConfig() was called multiple times. | 
 | 11362 |  | 
 | 11363 | - The sqlite3 module did cut off data from the SQLite database at the first | 
 | 11364 |   null character before sending it to a custom converter. This has been fixed | 
 | 11365 |   now. | 
 | 11366 |  | 
 | 11367 | Extension Modules | 
 | 11368 | ----------------- | 
 | 11369 |  | 
 | 11370 | - #1494314: Fix a regression with high-numbered sockets in 2.4.3. This | 
 | 11371 |   means that select() on sockets > FD_SETSIZE (typically 1024) work again. | 
 | 11372 |   The patch makes sockets use poll() internally where available. | 
 | 11373 |  | 
 | 11374 | - Assigning None to pointer type fields in ctypes structures possible | 
 | 11375 |   overwrote the wrong fields, this is fixed now. | 
 | 11376 |  | 
 | 11377 | - Fixed a segfault in _ctypes when ctypes.wintypes were imported | 
 | 11378 |   on non-Windows platforms. | 
 | 11379 |  | 
 | 11380 | - Bug #1518190: The ctypes.c_void_p constructor now accepts any | 
 | 11381 |   integer or long, without range checking. | 
 | 11382 |  | 
 | 11383 | - Patch #1517790: It is now possible to use custom objects in the ctypes | 
 | 11384 |   foreign function argtypes sequence as long as they provide a from_param | 
 | 11385 |   method, no longer is it required that the object is a ctypes type. | 
 | 11386 |  | 
 | 11387 | - The '_ctypes' extension module now works when Python is configured | 
 | 11388 |   with the --without-threads option. | 
 | 11389 |  | 
 | 11390 | - Bug #1513646: os.access on Windows now correctly determines write | 
 | 11391 |   access, again. | 
 | 11392 |  | 
 | 11393 | - Bug #1512695: cPickle.loads could crash if it was interrupted with | 
 | 11394 |   a KeyboardInterrupt. | 
 | 11395 |  | 
 | 11396 | - Bug #1296433: parsing XML with a non-default encoding and | 
 | 11397 |   a CharacterDataHandler could crash the interpreter in pyexpat. | 
 | 11398 |  | 
 | 11399 | - Patch #1516912: improve Modules support for OpenVMS. | 
 | 11400 |  | 
 | 11401 | Build | 
 | 11402 | ----- | 
 | 11403 |  | 
 | 11404 | - Automate Windows build process for the Win64 SSL module. | 
 | 11405 |  | 
 | 11406 | - 'configure' now detects the zlib library the same way as distutils. | 
 | 11407 |   Previously, the slight difference could cause compilation errors of the | 
 | 11408 |   'zlib' module on systems with more than one version of zlib. | 
 | 11409 |  | 
 | 11410 | - The MSI compileall step was fixed to also support a TARGETDIR | 
 | 11411 |   with spaces in it. | 
 | 11412 |  | 
 | 11413 | - Bug #1517388: sqlite3.dll is now installed on Windows independent | 
 | 11414 |   of Tcl/Tk. | 
 | 11415 |  | 
 | 11416 | - Bug #1513032: 'make install' failed on FreeBSD 5.3 due to lib-old | 
 | 11417 |   trying to be installed even though it's empty. | 
 | 11418 |  | 
 | 11419 | Tests | 
 | 11420 | ----- | 
 | 11421 |  | 
 | 11422 | - Call os.waitpid() at the end of tests that spawn child processes in order | 
 | 11423 |   to minimize resources (zombies). | 
 | 11424 |  | 
 | 11425 | Documentation | 
 | 11426 | ------------- | 
 | 11427 |  | 
 | 11428 | - Cover ImportWarning, PendingDeprecationWarning and simplefilter() in the | 
 | 11429 |   documentation for the warnings module. | 
 | 11430 |  | 
 | 11431 | - Patch #1509163: MS Toolkit Compiler no longer available. | 
 | 11432 |  | 
 | 11433 | - Patch #1504046: Add documentation for xml.etree. | 
 | 11434 |  | 
 | 11435 |  | 
 | 11436 | What's New in Python 2.5 beta 1? | 
 | 11437 | ================================ | 
 | 11438 |  | 
 | 11439 | *Release date: 20-JUN-2006* | 
 | 11440 |  | 
 | 11441 | Core and builtins | 
 | 11442 | ----------------- | 
 | 11443 |  | 
 | 11444 | - Patch #1507676: Error messages returned by invalid abstract object operations | 
 | 11445 |   (such as iterating over an integer) have been improved and now include the | 
 | 11446 |   type of the offending object to help with debugging. | 
 | 11447 |  | 
 | 11448 | - Bug #992017: A classic class that defined a __coerce__() method that returned | 
 | 11449 |   its arguments swapped would infinitely recurse and segfault the interpreter. | 
 | 11450 |  | 
 | 11451 | - Fix the socket tests so they can be run concurrently. | 
 | 11452 |  | 
 | 11453 | - Removed 5 integers from C frame objects (PyFrameObject). | 
 | 11454 |   f_nlocals, f_ncells, f_nfreevars, f_stack_size, f_restricted. | 
 | 11455 |  | 
 | 11456 | - Bug #532646: object.__call__() will continue looking for the __call__ | 
 | 11457 |   attribute on objects until one without one is found.  This leads to recursion | 
 | 11458 |   when you take a class and set its __call__ attribute to an instance of the | 
 | 11459 |   class.  Originally fixed for classic classes, but this fix is for new-style. | 
 | 11460 |   Removes the infinite_rec_3 crasher. | 
 | 11461 |  | 
 | 11462 | - The string and unicode methods startswith() and endswith() now accept | 
 | 11463 |   a tuple of prefixes/suffixes to look for. Implements RFE #1491485. | 
 | 11464 |  | 
 | 11465 | - Buffer objects, at the C level, never used the char buffer | 
 | 11466 |   implementation even when the char buffer for the wrapped object was | 
 | 11467 |   explicitly requested (originally returned the read or write buffer). | 
 | 11468 |   Now a TypeError is raised if the char buffer is not present but is | 
 | 11469 |   requested. | 
 | 11470 |  | 
 | 11471 | - Patch #1346214: Statements like "if 0: suite" are now again optimized | 
 | 11472 |   away like they were in Python 2.4. | 
 | 11473 |  | 
 | 11474 | - Builtin exceptions are now full-blown new-style classes instead of | 
 | 11475 |   instances pretending to be classes, which speeds up exception handling | 
 | 11476 |   by about 80% in comparison to 2.5a2. | 
 | 11477 |  | 
 | 11478 | - Patch #1494554: Update unicodedata.numeric and unicode.isnumeric to | 
 | 11479 |   Unicode 4.1. | 
 | 11480 |  | 
 | 11481 | - Patch #921466: sys.path_importer_cache is now used to cache valid and | 
 | 11482 |   invalid file paths for the built-in import machinery which leads to | 
 | 11483 |   fewer open calls on startup. | 
 | 11484 |  | 
 | 11485 | - Patch #1442927: ``long(str, base)`` is now up to 6x faster for non-power- | 
 | 11486 |   of-2 bases.  The largest speedup is for inputs with about 1000 decimal | 
 | 11487 |   digits.  Conversion from non-power-of-2 bases remains quadratic-time in | 
 | 11488 |   the number of input digits (it was and remains linear-time for bases | 
 | 11489 |   2, 4, 8, 16 and 32). | 
 | 11490 |  | 
 | 11491 | - Bug #1334662: ``int(string, base)`` could deliver a wrong answer | 
 | 11492 |   when ``base`` was not 2, 4, 8, 10, 16 or 32, and ``string`` represented | 
 | 11493 |   an integer close to ``sys.maxint``.  This was repaired by patch | 
 | 11494 |   #1335972, which also gives a nice speedup. | 
 | 11495 |  | 
 | 11496 | - Patch #1337051: reduced size of frame objects. | 
 | 11497 |  | 
 | 11498 | - PyErr_NewException now accepts a tuple of base classes as its | 
 | 11499 |   "base" parameter. | 
 | 11500 |  | 
 | 11501 | - Patch #876206: function call speedup by retaining allocated frame | 
 | 11502 |   objects. | 
 | 11503 |  | 
 | 11504 | - Bug #1462152: file() now checks more thoroughly for invalid mode | 
 | 11505 |   strings and removes a possible "U" before passing the mode to the | 
 | 11506 |   C library function. | 
 | 11507 |  | 
 | 11508 | - Patch #1488312, Fix memory alignment problem on SPARC in unicode | 
 | 11509 |  | 
 | 11510 | - Bug #1487966: Fix SystemError with conditional expression in assignment | 
 | 11511 |  | 
 | 11512 | - WindowsError now has two error code attributes: errno, which carries | 
 | 11513 |   the error values from errno.h, and winerror, which carries the error | 
 | 11514 |   values from winerror.h. Previous versions put the winerror.h values | 
 | 11515 |   (from GetLastError()) into the errno attribute. | 
 | 11516 |  | 
 | 11517 | - Patch #1475845: Raise IndentationError for unexpected indent. | 
 | 11518 |  | 
 | 11519 | - Patch #1479181: split open() and file() from being aliases for each other. | 
 | 11520 |  | 
 | 11521 | - Patch #1497053 & bug #1275608: Exceptions occurring in ``__eq__()`` | 
 | 11522 |   methods were always silently ignored by dictionaries when comparing keys. | 
 | 11523 |   They are now passed through (except when using the C API function | 
 | 11524 |   ``PyDict_GetItem()``, whose semantics did not change). | 
 | 11525 |  | 
 | 11526 | - Bug #1456209: In some obscure cases it was possible for a class with a | 
 | 11527 |   custom ``__eq__()`` method to confuse dict internals when class instances | 
 | 11528 |   were used as a dict's keys and the ``__eq__()`` method mutated the dict. | 
 | 11529 |   No, you don't have any code that did this ;-) | 
 | 11530 |  | 
 | 11531 | Extension Modules | 
 | 11532 | ----------------- | 
 | 11533 |  | 
 | 11534 | - Bug #1295808: expat symbols should be namespaced in pyexpat | 
 | 11535 |  | 
 | 11536 | - Patch #1462338: Upgrade pyexpat to expat 2.0.0 | 
 | 11537 |  | 
 | 11538 | - Change binascii.hexlify to accept a read-only buffer instead of only a char | 
 | 11539 |   buffer and actually follow its documentation. | 
 | 11540 |  | 
 | 11541 | - Fixed a potentially invalid memory access of CJKCodecs' shift-jis decoder. | 
 | 11542 |  | 
 | 11543 | - Patch #1478788 (modified version): The functional extension module has | 
 | 11544 |   been renamed to _functools and a functools Python wrapper module added. | 
 | 11545 |   This provides a home for additional function related utilities that are | 
 | 11546 |   not specifically about functional programming. See PEP 309. | 
 | 11547 |  | 
 | 11548 | - Patch #1493701: performance enhancements for struct module. | 
 | 11549 |  | 
 | 11550 | - Patch #1490224: time.altzone is now set correctly on Cygwin. | 
 | 11551 |  | 
 | 11552 | - Patch #1435422: zlib's compress and decompress objects now have a | 
 | 11553 |   copy() method. | 
 | 11554 |  | 
 | 11555 | - Patch #1454481: thread stack size is now tunable at runtime for thread | 
 | 11556 |   enabled builds on Windows and systems with Posix threads support. | 
 | 11557 |  | 
 | 11558 | - On Win32, os.listdir now supports arbitrarily-long Unicode path names | 
 | 11559 |   (up to the system limit of 32K characters). | 
 | 11560 |  | 
 | 11561 | - Use Win32 API to implement os.{access,chdir,chmod,mkdir,remove,rename,rmdir,utime}. | 
 | 11562 |   As a result, these functions now raise WindowsError instead of OSError. | 
 | 11563 |  | 
 | 11564 | - ``time.clock()`` on Win64 should use the high-performance Windows | 
 | 11565 |   ``QueryPerformanceCounter()`` now (as was already the case on 32-bit | 
 | 11566 |   Windows platforms). | 
 | 11567 |  | 
 | 11568 | - Calling Tk_Init twice is refused if the first call failed as that | 
 | 11569 |   may deadlock. | 
 | 11570 |  | 
 | 11571 | - bsddb: added the DB_ARCH_REMOVE flag and fixed db.DBEnv.log_archive() to | 
 | 11572 |   accept it without potentially using an uninitialized pointer. | 
 | 11573 |  | 
 | 11574 | - bsddb: added support for the DBEnv.log_stat() and DBEnv.lsn_reset() methods | 
 | 11575 |   assuming BerkeleyDB >= 4.0 and 4.4 respectively.  [pybsddb project SF | 
 | 11576 |   patch numbers 1494885 and 1494902] | 
 | 11577 |  | 
 | 11578 | - bsddb: added an interface for the BerkeleyDB >= 4.3 DBSequence class. | 
 | 11579 |   [pybsddb project SF patch number 1466734] | 
 | 11580 |  | 
 | 11581 | - bsddb: fix DBCursor.pget() bug with keyword argument names when no data | 
 | 11582 |   parameter is supplied.  [SF pybsddb bug #1477863] | 
 | 11583 |  | 
 | 11584 | - bsddb: the __len__ method of a DB object has been fixed to return correct | 
 | 11585 |   results.  It could previously incorrectly return 0 in some cases. | 
 | 11586 |   Fixes SF bug 1493322 (pybsddb bug 1184012). | 
 | 11587 |  | 
 | 11588 | - bsddb: the bsddb.dbtables Modify method now raises the proper error and | 
 | 11589 |   aborts the db transaction safely when a modifier callback fails. | 
 | 11590 |   Fixes SF python patch/bug #1408584. | 
 | 11591 |  | 
 | 11592 | - bsddb: multithreaded DB access using the simple bsddb module interface | 
 | 11593 |   now works reliably.  It has been updated to use automatic BerkeleyDB | 
 | 11594 |   deadlock detection and the bsddb.dbutils.DeadlockWrap wrapper to retry | 
 | 11595 |   database calls that would previously deadlock. [SF python bug #775414] | 
 | 11596 |  | 
 | 11597 | - Patch #1446489: add support for the ZIP64 extensions to zipfile. | 
 | 11598 |  | 
 | 11599 | - Patch #1506645: add Python wrappers for the curses functions | 
 | 11600 |   is_term_resized, resize_term and resizeterm. | 
 | 11601 |  | 
 | 11602 | Library | 
 | 11603 | ------- | 
 | 11604 |  | 
 | 11605 | - Patch #815924: Restore ability to pass type= and icon= in tkMessageBox | 
 | 11606 |   functions. | 
 | 11607 |  | 
 | 11608 | - Patch #812986: Update turtle output even if not tracing. | 
 | 11609 |  | 
 | 11610 | - Patch #1494750: Destroy master after deleting children in | 
 | 11611 |   Tkinter.BaseWidget. | 
 | 11612 |  | 
 | 11613 | - Patch #1096231: Add ``default`` argument to Tkinter.Wm.wm_iconbitmap. | 
 | 11614 |  | 
 | 11615 | - Patch #763580: Add name and value arguments to Tkinter variable | 
 | 11616 |   classes. | 
 | 11617 |  | 
 | 11618 | - Bug #1117556: SimpleHTTPServer now tries to find and use the system's | 
 | 11619 |   mime.types file for determining MIME types. | 
 | 11620 |  | 
 | 11621 | - Bug #1339007: Shelf objects now don't raise an exception in their | 
 | 11622 |   __del__ method when initialization failed. | 
 | 11623 |  | 
 | 11624 | - Patch #1455898: The MBCS codec now supports the incremental mode for | 
 | 11625 |   double-byte encodings. | 
 | 11626 |  | 
 | 11627 | - ``difflib``'s ``SequenceMatcher.get_matching_blocks()`` was changed to | 
 | 11628 |   guarantee that adjacent triples in the return list always describe | 
 | 11629 |   non-adjacent blocks.  Previously, a pair of matching blocks could end | 
 | 11630 |   up being described by multiple adjacent triples that formed a partition | 
 | 11631 |   of the matching pair. | 
 | 11632 |  | 
 | 11633 | - Bug #1498146: fix optparse to handle Unicode strings in option help, | 
 | 11634 |   description, and epilog. | 
 | 11635 |  | 
 | 11636 | - Bug #1366250: minor optparse documentation error. | 
 | 11637 |  | 
 | 11638 | - Bug #1361643: fix textwrap.dedent() so it handles tabs appropriately; | 
 | 11639 |   clarify docs. | 
 | 11640 |  | 
 | 11641 | - The wsgiref package has been added to the standard library. | 
 | 11642 |  | 
 | 11643 | - The functions update_wrapper() and wraps() have been added to the functools | 
 | 11644 |   module. These make it easier to copy relevant metadata from the original | 
 | 11645 |   function when writing wrapper functions. | 
 | 11646 |  | 
 | 11647 | - The optional ``isprivate`` argument to ``doctest.testmod()``, and the | 
 | 11648 |   ``doctest.is_private()`` function, both deprecated in 2.4, were removed. | 
 | 11649 |  | 
 | 11650 | - Patch #1359618: Speed up charmap encoder by using a trie structure | 
 | 11651 |   for lookup. | 
 | 11652 |  | 
 | 11653 | - The functions in the ``pprint`` module now sort dictionaries by key | 
 | 11654 |   before computing the display.  Before 2.5, ``pprint`` sorted a dictionary | 
 | 11655 |   if and only if its display required more than one line, although that | 
 | 11656 |   wasn't documented.  The new behavior increases predictability; e.g., | 
 | 11657 |   using ``pprint.pprint(a_dict)`` in a doctest is now reliable. | 
 | 11658 |  | 
 | 11659 | - Patch #1497027: try HTTP digest auth before basic auth in urllib2 | 
 | 11660 |   (thanks for J. J. Lee). | 
 | 11661 |  | 
 | 11662 | - Patch #1496206: improve urllib2 handling of passwords with respect to | 
 | 11663 |   default HTTP and HTTPS ports. | 
 | 11664 |  | 
 | 11665 | - Patch #1080727: add "encoding" parameter to doctest.DocFileSuite. | 
 | 11666 |  | 
 | 11667 | - Patch #1281707: speed up gzip.readline. | 
 | 11668 |  | 
 | 11669 | - Patch #1180296: Two new functions were added to the locale module: | 
 | 11670 |   format_string() to get the effect of  "format % items" but locale-aware, | 
 | 11671 |   and currency() to format a monetary number with currency sign. | 
 | 11672 |  | 
 | 11673 | - Patch #1486962: Several bugs in the turtle Tk demo module were fixed | 
 | 11674 |   and several features added, such as speed and geometry control. | 
 | 11675 |  | 
 | 11676 | - Patch #1488881: add support for external file objects in bz2 compressed | 
 | 11677 |   tarfiles. | 
 | 11678 |  | 
 | 11679 | - Patch #721464: pdb.Pdb instances can now be given explicit stdin and | 
 | 11680 |   stdout arguments, making it possible to redirect input and output | 
 | 11681 |   for remote debugging. | 
 | 11682 |  | 
 | 11683 | - Patch #1484695: Update the tarfile module to version 0.8. This fixes | 
 | 11684 |   a couple of issues, notably handling of long file names using the | 
 | 11685 |   GNU LONGNAME extension. | 
 | 11686 |  | 
 | 11687 | - Patch #1478292. ``doctest.register_optionflag(name)`` shouldn't create a | 
 | 11688 |   new flag when ``name`` is already the name of an option flag. | 
 | 11689 |  | 
 | 11690 | - Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler | 
 | 11691 |   package. | 
 | 11692 |  | 
 | 11693 | - Patch #1472854: make the rlcompleter.Completer class usable on non- | 
 | 11694 |   UNIX platforms. | 
 | 11695 |  | 
 | 11696 | - Patch #1470846: fix urllib2 ProxyBasicAuthHandler. | 
 | 11697 |  | 
 | 11698 | - Bug #1472827: correctly escape newlines and tabs in attribute values in | 
 | 11699 |   the saxutils.XMLGenerator class. | 
 | 11700 |  | 
 | 11701 |  | 
 | 11702 | Build | 
 | 11703 | ----- | 
 | 11704 |  | 
 | 11705 | - Bug #1502728: Correctly link against librt library on HP-UX. | 
 | 11706 |  | 
 | 11707 | - OpenBSD 3.9 is supported now. | 
 | 11708 |  | 
 | 11709 | - Patch #1492356: Port to Windows CE. | 
 | 11710 |  | 
 | 11711 | - Bug/Patch #1481770: Use .so extension for shared libraries on HP-UX for ia64. | 
 | 11712 |  | 
 | 11713 | - Patch #1471883: Add --enable-universalsdk. | 
 | 11714 |  | 
 | 11715 | C API | 
 | 11716 | ----- | 
 | 11717 |  | 
 | 11718 | Tests | 
 | 11719 | ----- | 
 | 11720 |  | 
 | 11721 | Tools | 
 | 11722 | ----- | 
 | 11723 |  | 
 | 11724 | Documentation | 
 | 11725 | ------------- | 
 | 11726 |  | 
 | 11727 |  | 
 | 11728 |  | 
 | 11729 | What's New in Python 2.5 alpha 2? | 
 | 11730 | ================================= | 
 | 11731 |  | 
 | 11732 | *Release date: 27-APR-2006* | 
 | 11733 |  | 
 | 11734 | Core and builtins | 
 | 11735 | ----------------- | 
 | 11736 |  | 
 | 11737 | - Bug #1465834: 'bdist_wininst preinstall script support' was fixed | 
 | 11738 |   by converting these apis from macros into exported functions again: | 
 | 11739 |  | 
 | 11740 |     PyParser_SimpleParseFile PyParser_SimpleParseString PyRun_AnyFile | 
 | 11741 |     PyRun_AnyFileEx PyRun_AnyFileFlags PyRun_File PyRun_FileEx | 
 | 11742 |     PyRun_FileFlags PyRun_InteractiveLoop PyRun_InteractiveOne | 
 | 11743 |     PyRun_SimpleFile PyRun_SimpleFileEx PyRun_SimpleString | 
 | 11744 |     PyRun_String Py_CompileString | 
 | 11745 |  | 
 | 11746 | - Under COUNT_ALLOCS, types are not necessarily immortal anymore. | 
 | 11747 |  | 
 | 11748 | - All uses of PyStructSequence_InitType have been changed to initialize | 
 | 11749 |   the type objects only once, even if the interpreter is initialized | 
 | 11750 |   multiple times. | 
 | 11751 |  | 
 | 11752 | - Bug #1454485, array.array('u') could crash the interpreter.  This was | 
 | 11753 |   due to PyArgs_ParseTuple(args, 'u#', ...) trying to convert buffers (strings) | 
 | 11754 |   to unicode when it didn't make sense.  'u#' now requires a unicode string. | 
 | 11755 |  | 
 | 11756 | - Py_UNICODE is unsigned.  It was always documented as unsigned, but | 
 | 11757 |   due to a bug had a signed value in previous versions. | 
 | 11758 |  | 
 | 11759 | - Patch #837242: ``id()`` of any Python object always gives a positive | 
 | 11760 |   number now, which might be a long integer. ``PyLong_FromVoidPtr`` and | 
 | 11761 |   ``PyLong_AsVoidPtr`` have been changed accordingly.  Note that it has | 
 | 11762 |   never been correct to implement a ``__hash()__`` method that returns the | 
 | 11763 |   ``id()`` of an object: | 
 | 11764 |  | 
 | 11765 |       def __hash__(self): | 
 | 11766 |           return id(self)  # WRONG | 
 | 11767 |  | 
 | 11768 |   because a hash result must be a (short) Python int but it was always | 
 | 11769 |   possible for ``id()`` to return a Python long.  However, because ``id()`` | 
 | 11770 |   could return negative values before, on a 32-bit box an ``id()`` result | 
 | 11771 |   was always usable as a hash value before this patch.  That's no longer | 
 | 11772 |   necessarily so. | 
 | 11773 |  | 
 | 11774 | - Python on OS X 10.3 and above now uses dlopen() (via dynload_shlib.c) | 
 | 11775 |   to load extension modules and now provides the dl module. As a result, | 
 | 11776 |   sys.setdlopenflags() now works correctly on these systems. (SF patch | 
 | 11777 |   #1454844) | 
 | 11778 |  | 
 | 11779 | - Patch #1463867: enhanced garbage collection to allow cleanup of cycles | 
 | 11780 |   involving generators that have paused outside of any ``try`` or ``with`` | 
 | 11781 |   blocks.  (In 2.5a1, a paused generator that was part of a reference | 
 | 11782 |   cycle could not be garbage collected, regardless of whether it was | 
 | 11783 |   paused in a ``try`` or ``with`` block.) | 
 | 11784 |  | 
 | 11785 | Extension Modules | 
 | 11786 | ----------------- | 
 | 11787 |  | 
 | 11788 | - Patch #1191065: Fix preprocessor problems on systems where recvfrom | 
 | 11789 |   is a macro. | 
 | 11790 |  | 
 | 11791 | - Bug #1467952: os.listdir() now correctly raises an error if readdir() | 
 | 11792 |   fails with an error condition. | 
 | 11793 |  | 
 | 11794 | - Fixed bsddb.db.DBError derived exceptions so they can be unpickled. | 
 | 11795 |  | 
 | 11796 | - Bug #1117761: bsddb.*open() no longer raises an exception when using | 
 | 11797 |   the cachesize parameter. | 
 | 11798 |  | 
 | 11799 | - Bug #1149413: bsddb.*open() no longer raises an exception when using | 
 | 11800 |   a temporary db (file=None) with the 'n' flag to truncate on open. | 
 | 11801 |  | 
 | 11802 | - Bug #1332852: bsddb module minimum BerkeleyDB version raised to 3.3 | 
 | 11803 |   as older versions cause excessive test failures. | 
 | 11804 |  | 
 | 11805 | - Patch #1062014: AF_UNIX sockets under Linux have a special | 
 | 11806 |   abstract namespace that is now fully supported. | 
 | 11807 |  | 
 | 11808 | Library | 
 | 11809 | ------- | 
 | 11810 |  | 
 | 11811 | - Bug #1223937: subprocess.CalledProcessError reports the exit status | 
 | 11812 |   of the process using the returncode attribute, instead of | 
 | 11813 |   abusing errno. | 
 | 11814 |  | 
 | 11815 | - Patch #1475231: ``doctest`` has a new ``SKIP`` option, which causes | 
 | 11816 |   a doctest to be skipped (the code is not run, and the expected output | 
 | 11817 |   or exception is ignored). | 
 | 11818 |  | 
 | 11819 | - Fixed contextlib.nested to cope with exceptions being raised and | 
 | 11820 |   caught inside exit handlers. | 
 | 11821 |  | 
 | 11822 | - Updated optparse module to Optik 1.5.1 (allow numeric constants in | 
 | 11823 |   hex, octal, or binary; add ``append_const`` action; keep going if | 
 | 11824 |   gettext cannot be imported; added ``OptionParser.destroy()`` method; | 
 | 11825 |   added ``epilog`` for better help generation). | 
 | 11826 |  | 
 | 11827 | - Bug #1473760: ``tempfile.TemporaryFile()`` could hang on Windows, when | 
 | 11828 |   called from a thread spawned as a side effect of importing a module. | 
 | 11829 |  | 
 | 11830 | - The pydoc module now supports documenting packages contained in | 
 | 11831 |   .zip or .egg files. | 
 | 11832 |  | 
 | 11833 | - The pkgutil module now has several new utility functions, such | 
 | 11834 |   as ``walk_packages()`` to support working with packages that are either | 
 | 11835 |   in the filesystem or zip files. | 
 | 11836 |  | 
 | 11837 | - The mailbox module can now modify and delete messages from | 
 | 11838 |   mailboxes, in addition to simply reading them.  Thanks to Gregory | 
 | 11839 |   K. Johnson for writing the code, and to the 2005 Google Summer of | 
 | 11840 |   Code for funding his work. | 
 | 11841 |  | 
 | 11842 | - The ``__del__`` method of class ``local`` in module ``_threading_local`` | 
 | 11843 |   returned before accomplishing any of its intended cleanup. | 
 | 11844 |  | 
 | 11845 | - Patch #790710: Add breakpoint command lists in pdb. | 
 | 11846 |  | 
 | 11847 | - Patch #1063914: Add Tkinter.Misc.clipboard_get(). | 
 | 11848 |  | 
 | 11849 | - Patch #1191700: Adjust column alignment in bdb breakpoint lists. | 
 | 11850 |  | 
 | 11851 | - SimpleXMLRPCServer relied on the fcntl module, which is unavailable on | 
 | 11852 |   Windows. Bug #1469163. | 
 | 11853 |  | 
 | 11854 | - The warnings, linecache, inspect, traceback, site, and doctest modules | 
 | 11855 |   were updated to work correctly with modules imported from zipfiles or | 
 | 11856 |   via other PEP 302 __loader__ objects. | 
 | 11857 |  | 
 | 11858 | - Patch #1467770: Reduce usage of subprocess._active to processes which | 
 | 11859 |   the application hasn't waited on. | 
 | 11860 |  | 
 | 11861 | - Patch #1462222: Fix Tix.Grid. | 
 | 11862 |  | 
 | 11863 | - Fix exception when doing glob.glob('anything*/') | 
 | 11864 |  | 
 | 11865 | - The pstats.Stats class accepts an optional stream keyword argument to | 
 | 11866 |   direct output to an alternate file-like object. | 
 | 11867 |  | 
 | 11868 | Build | 
 | 11869 | ----- | 
 | 11870 |  | 
 | 11871 | - The Makefile now has a reindent target, which runs reindent.py on | 
 | 11872 |   the library. | 
 | 11873 |  | 
 | 11874 | - Patch #1470875: Building Python with MS Free Compiler | 
 | 11875 |  | 
 | 11876 | - Patch #1161914: Add a python-config script. | 
 | 11877 |  | 
 | 11878 | - Patch #1324762:Remove ccpython.cc; replace --with-cxx with | 
 | 11879 |   --with-cxx-main. Link with C++ compiler only if --with-cxx-main was | 
 | 11880 |   specified. (Can be overridden by explicitly setting LINKCC.) Decouple | 
 | 11881 |   CXX from --with-cxx-main, see description in README. | 
 | 11882 |  | 
 | 11883 | - Patch #1429775: Link extension modules with the shared libpython. | 
 | 11884 |  | 
 | 11885 | - Fixed a libffi build problem on MIPS systems. | 
 | 11886 |  | 
 | 11887 | - ``PyString_FromFormat``, ``PyErr_Format``, and ``PyString_FromFormatV`` | 
 | 11888 |   now accept formats "%u" for unsigned ints, "%lu" for unsigned longs, | 
 | 11889 |   and "%zu" for unsigned integers of type ``size_t``. | 
 | 11890 |  | 
 | 11891 | Tests | 
 | 11892 | ----- | 
 | 11893 |  | 
 | 11894 | - test_contextlib now checks contextlib.nested can cope with exceptions | 
 | 11895 |   being raised and caught inside exit handlers. | 
 | 11896 |  | 
 | 11897 | - test_cmd_line now checks operation of the -m and -c command switches | 
 | 11898 |  | 
 | 11899 | - The test_contextlib test in 2.5a1 wasn't actually run unless you ran | 
 | 11900 |   it separately and by hand.  It also wasn't cleaning up its changes to | 
 | 11901 |   the current Decimal context. | 
 | 11902 |  | 
 | 11903 | - regrtest.py now has a -M option to run tests that test the new limits of | 
 | 11904 |   containers, on 64-bit architectures. Running these tests is only sensible | 
 | 11905 |   on 64-bit machines with more than two gigabytes of memory. The argument | 
 | 11906 |   passed is the maximum amount of memory for the tests to use. | 
 | 11907 |  | 
 | 11908 | Tools | 
 | 11909 | ----- | 
 | 11910 |  | 
 | 11911 | - Added the Python benchmark suite pybench to the Tools/ directory; | 
 | 11912 |   contributed by Marc-Andre Lemburg. | 
 | 11913 |  | 
 | 11914 | Documentation | 
 | 11915 | ------------- | 
 | 11916 |  | 
 | 11917 | - Patch #1473132: Improve docs for ``tp_clear`` and ``tp_traverse``. | 
 | 11918 |  | 
 | 11919 | - PEP 343: Added Context Types section to the library reference | 
 | 11920 |   and attempted to bring other PEP 343 related documentation into | 
 | 11921 |   line with the implementation and/or python-dev discussions. | 
 | 11922 |  | 
 | 11923 | - Bug #1337990: clarified that ``doctest`` does not support examples | 
 | 11924 |   requiring both expected output and an exception. | 
 | 11925 |  | 
 | 11926 |  | 
 | 11927 | What's New in Python 2.5 alpha 1? | 
 | 11928 | ================================= | 
 | 11929 |  | 
 | 11930 | *Release date: 05-APR-2006* | 
 | 11931 |  | 
 | 11932 | Core and builtins | 
 | 11933 | ----------------- | 
 | 11934 |  | 
 | 11935 | - PEP 338: -m command line switch now delegates to runpy.run_module | 
 | 11936 |   allowing it to support modules in packages and zipfiles | 
 | 11937 |  | 
 | 11938 | - On Windows, .DLL is not an accepted file name extension for | 
 | 11939 |   extension modules anymore; extensions are only found if they | 
 | 11940 |   end in .PYD. | 
 | 11941 |  | 
 | 11942 | - Bug #1421664: sys.stderr.encoding is now set to the same value as | 
 | 11943 |   sys.stdout.encoding. | 
 | 11944 |  | 
 | 11945 | - __import__ accepts keyword arguments. | 
 | 11946 |  | 
 | 11947 | - Patch #1460496: round() now accepts keyword arguments. | 
 | 11948 |  | 
 | 11949 | - Fixed bug #1459029 - unicode reprs were double-escaped. | 
 | 11950 |  | 
 | 11951 | - Patch #1396919: The system scope threads are reenabled on FreeBSD | 
 | 11952 |   5.4 and later versions. | 
 | 11953 |  | 
 | 11954 | - Bug #1115379: Compiling a Unicode string with an encoding declaration | 
 | 11955 |   now gives a SyntaxError. | 
 | 11956 |  | 
 | 11957 | - Previously, Python code had no easy way to access the contents of a | 
 | 11958 |   cell object. Now, a ``cell_contents`` attribute has been added | 
 | 11959 |   (closes patch #1170323). | 
 | 11960 |  | 
 | 11961 | - Patch #1123430: Python's small-object allocator now returns an arena to | 
 | 11962 |   the system ``free()`` when all memory within an arena becomes unused | 
 | 11963 |   again.  Prior to Python 2.5, arenas (256KB chunks of memory) were never | 
 | 11964 |   freed.  Some applications will see a drop in virtual memory size now, | 
 | 11965 |   especially long-running applications that, from time to time, temporarily | 
 | 11966 |   use a large number of small objects.  Note that when Python returns an | 
 | 11967 |   arena to the platform C's ``free()``, there's no guarantee that the | 
 | 11968 |   platform C library will in turn return that memory to the operating system. | 
 | 11969 |   The effect of the patch is to stop making that impossible, and in tests it | 
 | 11970 |   appears to be effective at least on Microsoft C and gcc-based systems. | 
 | 11971 |   Thanks to Evan Jones for hard work and patience. | 
 | 11972 |  | 
 | 11973 | - Patch #1434038: property() now uses the getter's docstring if there is | 
 | 11974 |   no "doc" argument given. This makes it possible to legitimately use | 
 | 11975 |   property() as a decorator to produce a read-only property. | 
 | 11976 |  | 
 | 11977 | - PEP 357, patch 1436368: add an __index__ method to int/long and a matching | 
 | 11978 |   nb_index slot to the PyNumberMethods struct.  The slot is consulted instead | 
 | 11979 |   of requiring an int or long in slicing and a few other contexts, enabling | 
 | 11980 |   other objects (e.g. Numeric Python's integers) to be used as slice indices. | 
 | 11981 |  | 
 | 11982 | - Fixed various bugs reported by Coverity's Prevent tool. | 
 | 11983 |  | 
 | 11984 | - PEP 352, patch #1104669: Make exceptions new-style objects.  Introduced the | 
 | 11985 |   new exception base class, BaseException, which has a new message attribute. | 
 | 11986 |   KeyboardInterrupt and SystemExit to directly inherit from BaseException now. | 
 | 11987 |   Raising a string exception now raises a DeprecationWarning. | 
 | 11988 |  | 
 | 11989 | - Patch #1438387, PEP 328: relative and absolute imports. Imports can now be | 
 | 11990 |   explicitly relative, using 'from .module import name' to mean 'from the same | 
 | 11991 |   package as this module is in. Imports without dots still default to the | 
 | 11992 |   old relative-then-absolute, unless 'from __future__ import | 
 | 11993 |   absolute_import' is used. | 
 | 11994 |  | 
 | 11995 | - Properly check if 'warnings' raises an exception (usually when a filter set | 
 | 11996 |   to "error" is triggered) when raising a warning for raising string | 
 | 11997 |   exceptions. | 
 | 11998 |  | 
 | 11999 | - CO_GENERATOR_ALLOWED is no longer defined. This behavior is the default. | 
 | 12000 |   The name was removed from Include/code.h. | 
 | 12001 |  | 
 | 12002 | - PEP 308: conditional expressions were added: (x if cond else y). | 
 | 12003 |  | 
 | 12004 | - Patch 1433928: | 
 | 12005 |   - The copy module now "copies" function objects (as atomic objects). | 
 | 12006 |   - dict.__getitem__ now looks for a __missing__ hook before raising | 
 | 12007 |     KeyError. | 
 | 12008 |  | 
 | 12009 | - PEP 343: with statement implemented. Needs ``from __future__ import | 
 | 12010 |   with_statement``. Use of 'with' as a variable will generate a warning. | 
 | 12011 |   Use of 'as' as a variable will also generate a warning (unless it's | 
 | 12012 |   part of an import statement). | 
 | 12013 |   The following objects have __context__ methods: | 
 | 12014 |   - The built-in file type. | 
 | 12015 |   - The thread.LockType type. | 
 | 12016 |   - The following types defined by the threading module: | 
 | 12017 |     Lock, RLock, Condition, Semaphore, BoundedSemaphore. | 
 | 12018 |   - The decimal.Context class. | 
 | 12019 |  | 
 | 12020 | - Fix the encodings package codec search function to only search | 
 | 12021 |   inside its own package. Fixes problem reported in patch #1433198. | 
 | 12022 |  | 
 | 12023 |   Note: Codec packages should implement and register their own | 
 | 12024 |   codec search function. PEP 100 has the details. | 
 | 12025 |  | 
 | 12026 | - PEP 353: Using ``Py_ssize_t`` as the index type. | 
 | 12027 |  | 
 | 12028 | - ``PYMALLOC_DEBUG`` builds now add ``4*sizeof(size_t)`` bytes of debugging | 
 | 12029 |   info to each allocated block, since the ``Py_ssize_t`` changes (PEP 353) | 
 | 12030 |   now allow Python to make use of memory blocks exceeding 2**32 bytes for | 
 | 12031 |   some purposes on 64-bit boxes.  A ``PYMALLOC_DEBUG`` build was limited | 
 | 12032 |   to 4-byte allocations before. | 
 | 12033 |  | 
 | 12034 | - Patch #1400181, fix unicode string formatting to not use the locale. | 
 | 12035 |   This is how string objects work.  u'%f' could use , instead of . | 
 | 12036 |   for the decimal point.  Now both strings and unicode always use periods. | 
 | 12037 |  | 
 | 12038 | - Bug #1244610, #1392915, fix build problem on OpenBSD 3.7 and 3.8. | 
 | 12039 |   configure would break checking curses.h. | 
 | 12040 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 12041 | - Bug #959576: The pwd module is now built in. This allows Python to be | 
| Christian Heimes | c3f30c4 | 2008-02-22 16:37:40 +0000 | [diff] [blame] | 12042 |   built on UNIX platforms without $HOME set. | 
 | 12043 |  | 
 | 12044 | - Bug #1072182, fix some potential problems if characters are signed. | 
 | 12045 |  | 
 | 12046 | - Bug #889500, fix line number on SyntaxWarning for global declarations. | 
 | 12047 |  | 
 | 12048 | - Bug #1378022, UTF-8 files with a leading BOM crashed the interpreter. | 
 | 12049 |  | 
 | 12050 | - Support for converting hex strings to floats no longer works. | 
 | 12051 |   This was not portable.  float('0x3') now raises a ValueError. | 
 | 12052 |  | 
 | 12053 | - Patch #1382163: Expose Subversion revision number to Python.  New C API | 
 | 12054 |   function Py_GetBuildNumber().  New attribute sys.subversion.  Build number | 
 | 12055 |   is now displayed in interactive prompt banner. | 
 | 12056 |  | 
 | 12057 | - Implementation of PEP 341 - Unification of try/except and try/finally. | 
 | 12058 |   "except" clauses can now be written together with a "finally" clause in | 
 | 12059 |   one try statement instead of two nested ones.  Patch #1355913. | 
 | 12060 |  | 
 | 12061 | - Bug #1379994: Builtin unicode_escape and raw_unicode_escape codec | 
 | 12062 |   now encodes backslash correctly. | 
 | 12063 |  | 
 | 12064 | - Patch #1350409: Work around signal handling bug in Visual Studio 2005. | 
 | 12065 |  | 
 | 12066 | - Bug #1281408: Py_BuildValue now works correctly even with unsigned longs | 
 | 12067 |   and long longs. | 
 | 12068 |  | 
 | 12069 | - SF Bug #1350188, "setdlopenflags" leads to crash upon "import" | 
 | 12070 |   It was possible for dlerror() to return a NULL pointer, so | 
 | 12071 |   it will now use a default error message in this case. | 
 | 12072 |  | 
 | 12073 | - Replaced most Unicode charmap codecs with new ones using the | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 12074 |   new Unicode translate string feature in the built-in charmap | 
| Christian Heimes | c3f30c4 | 2008-02-22 16:37:40 +0000 | [diff] [blame] | 12075 |   codec; the codecs were created from the mapping tables available | 
 | 12076 |   at ftp.unicode.org and contain a few updates (e.g. the Mac OS | 
 | 12077 |   encodings now include a mapping for the Apple logo) | 
 | 12078 |  | 
 | 12079 | - Added a few more codecs for Mac OS encodings | 
 | 12080 |  | 
 | 12081 | - Sped up some Unicode operations. | 
 | 12082 |  | 
 | 12083 | - A new AST parser implementation was completed. The abstract | 
 | 12084 |   syntax tree is available for read-only (non-compile) access | 
 | 12085 |   to Python code; an _ast module was added. | 
 | 12086 |  | 
 | 12087 | - SF bug #1167751: fix incorrect code being produced for generator expressions. | 
 | 12088 |   The following code now raises a SyntaxError:  foo(a = i for i in range(10)) | 
 | 12089 |  | 
 | 12090 | - SF Bug #976608: fix SystemError when mtime of an imported file is -1. | 
 | 12091 |  | 
 | 12092 | - SF Bug #887946: fix segfault when redirecting stdin from a directory. | 
 | 12093 |   Provide a warning when a directory is passed on the command line. | 
 | 12094 |  | 
 | 12095 | - Fix segfault with invalid coding. | 
 | 12096 |  | 
 | 12097 | - SF bug #772896: unknown encoding results in MemoryError. | 
 | 12098 |  | 
 | 12099 | - All iterators now have a Boolean value of True.  Formerly, some iterators | 
 | 12100 |   supported a __len__() method which evaluated to False when the iterator | 
 | 12101 |   was empty. | 
 | 12102 |  | 
 | 12103 | - On 64-bit platforms, when __len__() returns a value that cannot be | 
 | 12104 |   represented as a C int, raise OverflowError. | 
 | 12105 |  | 
 | 12106 | - test__locale is skipped on OS X < 10.4 (only partial locale support is | 
 | 12107 |   present). | 
 | 12108 |  | 
 | 12109 | - SF bug #893549: parsing keyword arguments was broken with a few format | 
 | 12110 |   codes. | 
 | 12111 |  | 
 | 12112 | - Changes donated by Elemental Security to make it work on AIX 5.3 | 
 | 12113 |   with IBM's 64-bit compiler (SF patch #1284289).  This also closes SF | 
 | 12114 |   bug #105470: test_pwd fails on 64bit system (Opteron). | 
 | 12115 |  | 
 | 12116 | - Changes donated by Elemental Security to make it work on HP-UX 11 on | 
 | 12117 |   Itanium2 with HP's 64-bit compiler (SF patch #1225212). | 
 | 12118 |  | 
 | 12119 | - Disallow keyword arguments for type constructors that don't use them | 
 | 12120 |   (fixes bug #1119418). | 
 | 12121 |  | 
 | 12122 | - Forward UnicodeDecodeError into SyntaxError for source encoding errors. | 
 | 12123 |  | 
 | 12124 | - SF bug #900092: When tracing (e.g. for hotshot), restore 'return' events for | 
 | 12125 |   exceptions that cause a function to exit. | 
 | 12126 |  | 
 | 12127 | - The implementation of set() and frozenset() was revised to use its | 
 | 12128 |   own internal data structure.  Memory consumption is reduced by 1/3 | 
 | 12129 |   and there are modest speed-ups as well.  The API is unchanged. | 
 | 12130 |  | 
 | 12131 | - SF bug #1238681:  freed pointer is used in longobject.c:long_pow(). | 
 | 12132 |  | 
 | 12133 | - SF bug #1229429: PyObject_CallMethod failed to decrement some | 
 | 12134 |   reference counts in some error exit cases. | 
 | 12135 |  | 
 | 12136 | - SF bug #1185883:  Python's small-object memory allocator took over | 
 | 12137 |   a block managed by the platform C library whenever a realloc specified | 
 | 12138 |   a small new size.  However, there's no portable way to know then how | 
 | 12139 |   much of the address space following the pointer is valid, so there's no | 
 | 12140 |   portable way to copy data from the C-managed block into Python's | 
 | 12141 |   small-object space without risking a memory fault.  Python's small-object | 
 | 12142 |   realloc now leaves such blocks under the control of the platform C | 
 | 12143 |   realloc. | 
 | 12144 |  | 
 | 12145 | - SF bug #1232517: An overflow error was not detected properly when | 
 | 12146 |   attempting to convert a large float to an int in os.utime(). | 
 | 12147 |  | 
 | 12148 | - SF bug #1224347: hex longs now print with lowercase letters just | 
 | 12149 |   like their int counterparts. | 
 | 12150 |  | 
 | 12151 | - SF bug #1163563: the original fix for bug #1010677 ("thread Module | 
 | 12152 |   Breaks PyGILState_Ensure()") broke badly in the case of multiple | 
 | 12153 |   interpreter states; back out that fix and do a better job (see | 
 | 12154 |   http://mail.python.org/pipermail/python-dev/2005-June/054258.html | 
 | 12155 |   for a longer write-up of the problem). | 
 | 12156 |  | 
 | 12157 | - SF patch #1180995: marshal now uses a binary format by default when | 
 | 12158 |   serializing floats. | 
 | 12159 |  | 
 | 12160 | - SF patch #1181301: on platforms that appear to use IEEE 754 floats, | 
 | 12161 |   the routines that promise to produce IEEE 754 binary representations | 
 | 12162 |   of floats now simply copy bytes around. | 
 | 12163 |  | 
 | 12164 | - bug #967182: disallow opening files with 'wU' or 'aU' as specified by PEP | 
 | 12165 |   278. | 
 | 12166 |  | 
 | 12167 | - patch #1109424: int, long, float, complex, and unicode now check for the | 
 | 12168 |   proper magic slot for type conversions when subclassed.  Previously the | 
 | 12169 |   magic slot was ignored during conversion.  Semantics now match the way | 
 | 12170 |   subclasses of str always behaved.  int/long/float, conversion of an instance | 
 | 12171 |   to the base class has been moved to the proper nb_* magic slot and out of | 
 | 12172 |   PyNumber_*(). | 
| Antoine Pitrou | fbd4f80 | 2012-08-11 16:51:50 +0200 | [diff] [blame] | 12173 |   Thanks Walter Dörwald. | 
| Christian Heimes | c3f30c4 | 2008-02-22 16:37:40 +0000 | [diff] [blame] | 12174 |  | 
 | 12175 | - Descriptors defined in C with a PyGetSetDef structure, where the setter is | 
 | 12176 |   NULL, now raise an AttributeError when attempting to set or delete the | 
 | 12177 |   attribute.  Previously a TypeError was raised, but this was inconsistent | 
 | 12178 |   with the equivalent pure-Python implementation. | 
 | 12179 |  | 
 | 12180 | - It is now safe to call PyGILState_Release() before | 
 | 12181 |   PyEval_InitThreads() (note that if there is reason to believe there | 
 | 12182 |   are multiple threads around you still must call PyEval_InitThreads() | 
 | 12183 |   before using the Python API; this fix is for extension modules that | 
 | 12184 |   have no way of knowing if Python is multi-threaded yet). | 
 | 12185 |  | 
 | 12186 | - Typing Ctrl-C whilst raw_input() was waiting in a build with threads | 
 | 12187 |   disabled caused a crash. | 
 | 12188 |  | 
 | 12189 | - Bug #1165306: instancemethod_new allowed the creation of a method | 
 | 12190 |   with im_class == im_self == NULL, which caused a crash when called. | 
 | 12191 |  | 
 | 12192 | - Move exception finalisation later in the shutdown process - this | 
 | 12193 |   fixes the crash seen in bug #1165761 | 
 | 12194 |  | 
 | 12195 | - Added two new builtins, any() and all(). | 
 | 12196 |  | 
 | 12197 | - Defining a class with empty parentheses is now allowed | 
 | 12198 |   (e.g., ``class C(): pass`` is no longer a syntax error). | 
 | 12199 |   Patch #1176012 added support to the 'parser' module and 'compiler' package | 
 | 12200 |   (thanks to logistix for that added support). | 
 | 12201 |  | 
 | 12202 | - Patch #1115086: Support PY_LONGLONG in structmember. | 
 | 12203 |  | 
 | 12204 | - Bug #1155938: new style classes did not check that __init__() was | 
 | 12205 |   returning None. | 
 | 12206 |  | 
 | 12207 | - Patch #802188: Report characters after line continuation character | 
 | 12208 |   ('\') with a specific error message. | 
 | 12209 |  | 
 | 12210 | - Bug #723201: Raise a TypeError for passing bad objects to 'L' format. | 
 | 12211 |  | 
 | 12212 | - Bug #1124295: the __name__ attribute of file objects was | 
 | 12213 |   inadvertently made inaccessible in restricted mode. | 
 | 12214 |  | 
 | 12215 | - Bug #1074011: closing sys.std{out,err} now causes a flush() and | 
 | 12216 |   an ferror() call. | 
 | 12217 |  | 
 | 12218 | - min() and max() now support key= arguments with the same meaning as in | 
 | 12219 |   list.sort(). | 
 | 12220 |  | 
 | 12221 | - The peephole optimizer now performs simple constant folding in expressions: | 
 | 12222 |       (2+3) --> (5). | 
 | 12223 |  | 
 | 12224 | - set and frozenset objects can now be marshalled.  SF #1098985. | 
 | 12225 |  | 
 | 12226 | - Bug #1077106: Poor argument checking could cause memory corruption | 
 | 12227 |   in calls to os.read(). | 
 | 12228 |  | 
 | 12229 | - The parser did not complain about future statements in illegal | 
 | 12230 |   positions.  It once again reports a syntax error if a future | 
 | 12231 |   statement occurs after anything other than a doc string. | 
 | 12232 |  | 
 | 12233 | - Change the %s format specifier for str objects so that it returns a | 
 | 12234 |   unicode instance if the argument is not an instance of basestring and | 
 | 12235 |   calling __str__ on the argument returns a unicode instance. | 
 | 12236 |  | 
 | 12237 | - Patch #1413181:  changed ``PyThreadState_Delete()`` to forget about the | 
 | 12238 |   current thread state when the auto-GIL-state machinery knows about | 
 | 12239 |   it (since the thread state is being deleted, continuing to remember it | 
 | 12240 |   can't help, but can hurt if another thread happens to get created with | 
 | 12241 |   the same thread id). | 
 | 12242 |  | 
 | 12243 | Extension Modules | 
 | 12244 | ----------------- | 
 | 12245 |  | 
 | 12246 | - Patch #1380952: fix SSL objects timing out on consecutive read()s | 
 | 12247 |  | 
 | 12248 | - Patch #1309579: wait3 and wait4 were added to the posix module. | 
 | 12249 |  | 
 | 12250 | - Patch #1231053: The audioop module now supports encoding/decoding of alaw. | 
 | 12251 |   In addition, the existing ulaw code was updated. | 
 | 12252 |  | 
 | 12253 | - RFE #567972: Socket objects' family, type and proto properties are | 
 | 12254 |   now exposed via new attributes. | 
 | 12255 |  | 
 | 12256 | - Everything under lib-old was removed.  This includes the following modules: | 
 | 12257 |     Para, addpack, cmp, cmpcache, codehack, dircmp, dump, find, fmt, grep, | 
 | 12258 |     lockfile, newdir, ni, packmail, poly, rand, statcache, tb, tzparse, | 
 | 12259 |     util, whatsound, whrandom, zmod | 
 | 12260 |  | 
 | 12261 | - The following modules were removed:  regsub, reconvert, regex, regex_syntax. | 
 | 12262 |  | 
 | 12263 | - re and sre were swapped, so help(re) provides full help.  importing sre | 
 | 12264 |   is deprecated.  The undocumented re.engine variable no longer exists. | 
 | 12265 |  | 
 | 12266 | - Bug #1448490: Fixed a bug that ISO-2022 codecs could not handle | 
 | 12267 |   SS2 (single-shift 2) escape sequences correctly. | 
 | 12268 |  | 
 | 12269 | - The unicodedata module was updated to the 4.1 version of the Unicode | 
 | 12270 |   database. The 3.2 version is still available as unicodedata.db_3_2_0 | 
 | 12271 |   for applications that require this specific version (such as IDNA). | 
 | 12272 |  | 
 | 12273 | - The timing module is no longer built by default.  It was deprecated | 
 | 12274 |   in PEP 4 in Python 2.0 or earlier. | 
 | 12275 |  | 
 | 12276 | - Patch 1433928: Added a new type, defaultdict, to the collections module. | 
 | 12277 |   This uses the new __missing__ hook behavior added to dict (see above). | 
 | 12278 |  | 
 | 12279 | - Bug #854823: socketmodule now builds on Sun platforms even when | 
 | 12280 |   INET_ADDRSTRLEN is not defined. | 
 | 12281 |  | 
 | 12282 | - Patch #1393157: os.startfile() now has an optional argument to specify | 
 | 12283 |   a "command verb" to invoke on the file. | 
 | 12284 |  | 
 | 12285 | - Bug #876637, prevent stack corruption when socket descriptor | 
 | 12286 |   is larger than FD_SETSIZE. | 
 | 12287 |  | 
 | 12288 | - Patch #1407135, bug #1424041: harmonize mmap behavior of anonymous memory. | 
 | 12289 |   mmap.mmap(-1, size) now returns anonymous memory in both Unix and Windows. | 
 | 12290 |   mmap.mmap(0, size) should not be used on Windows for anonymous memory. | 
 | 12291 |  | 
 | 12292 | - Patch #1422385: The nis module now supports access to domains other | 
 | 12293 |   than the system default domain. | 
 | 12294 |  | 
 | 12295 | - Use Win32 API to implement os.stat/fstat. As a result, subsecond timestamps | 
 | 12296 |   are reported, the limit on path name lengths is removed, and stat reports | 
 | 12297 |   WindowsError now (instead of OSError). | 
 | 12298 |  | 
 | 12299 | - Add bsddb.db.DBEnv.set_tx_timestamp allowing time based database recovery. | 
 | 12300 |  | 
 | 12301 | - Bug #1413192, fix seg fault in bsddb if a transaction was deleted | 
 | 12302 |   before the env. | 
 | 12303 |  | 
 | 12304 | - Patch #1103116: Basic AF_NETLINK support. | 
 | 12305 |  | 
 | 12306 | - Bug #1402308, (possible) segfault when using mmap.mmap(-1, ...) | 
 | 12307 |  | 
 | 12308 | - Bug #1400822, _curses over{lay,write} doesn't work when passing 6 ints. | 
 | 12309 |   Also fix ungetmouse() which did not accept arguments properly. | 
 | 12310 |   The code now conforms to the documented signature. | 
 | 12311 |  | 
 | 12312 | - Bug #1400115, Fix segfault when calling curses.panel.userptr() | 
 | 12313 |   without prior setting of the userptr. | 
 | 12314 |  | 
 | 12315 | - Fix 64-bit problems in bsddb. | 
 | 12316 |  | 
 | 12317 | - Patch #1365916: fix some unsafe 64-bit mmap methods. | 
 | 12318 |  | 
 | 12319 | - Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn build | 
 | 12320 |   problem on AIX. | 
 | 12321 |  | 
 | 12322 | - Bug #869197: os.setgroups rejects long integer arguments | 
 | 12323 |  | 
 | 12324 | - Bug #1346533, select.poll() doesn't raise an error if timeout > sys.maxint | 
 | 12325 |  | 
 | 12326 | - Bug #1344508, Fix UNIX mmap leaking file descriptors | 
 | 12327 |  | 
 | 12328 | - Patch #1338314, Bug #1336623: fix tarfile so it can extract | 
 | 12329 |   REGTYPE directories from tarfiles written by old programs. | 
 | 12330 |  | 
 | 12331 | - Patch #1407992, fixes broken bsddb module db associate when using | 
 | 12332 |   BerkeleyDB 3.3, 4.0 or 4.1. | 
 | 12333 |  | 
 | 12334 | - Get bsddb module to build with BerkeleyDB version 4.4 | 
 | 12335 |  | 
 | 12336 | - Get bsddb module to build with BerkeleyDB version 3.2 | 
 | 12337 |  | 
 | 12338 | - Patch #1309009, Fix segfault in pyexpat when the XML document is in latin_1, | 
 | 12339 |   but Python incorrectly assumes it is in UTF-8 format | 
 | 12340 |  | 
 | 12341 | - Fix parse errors in the readline module when compiling without threads. | 
 | 12342 |  | 
 | 12343 | - Patch #1288833: Removed thread lock from socket.getaddrinfo on | 
 | 12344 |   FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3). | 
 | 12345 |  | 
 | 12346 | - Patches #1298449 and #1298499: Add some missing checks for error | 
 | 12347 |   returns in cStringIO.c. | 
 | 12348 |  | 
 | 12349 | - Patch #1297028: fix segfault if call type on MultibyteCodec, | 
 | 12350 |   MultibyteStreamReader, or MultibyteStreamWriter | 
 | 12351 |  | 
 | 12352 | - Fix memory leak in posix.access(). | 
 | 12353 |  | 
 | 12354 | - Patch #1213831: Fix typo in unicodedata._getcode. | 
 | 12355 |  | 
 | 12356 | - Bug #1007046: os.startfile() did not accept unicode strings encoded in | 
 | 12357 |   the file system encoding. | 
 | 12358 |  | 
 | 12359 | - Patch #756021: Special-case socket.inet_aton('255.255.255.255') for | 
 | 12360 |   platforms that don't have inet_aton(). | 
 | 12361 |  | 
 | 12362 | - Bug #1215928: Fix bz2.BZ2File.seek() for 64-bit file offsets. | 
 | 12363 |  | 
 | 12364 | - Bug #1191043: Fix bz2.BZ2File.(x)readlines for files containing one | 
 | 12365 |   line without newlines. | 
 | 12366 |  | 
 | 12367 | - Bug #728515: mmap.resize() now resizes the file on Unix as it did | 
 | 12368 |   on Windows. | 
 | 12369 |  | 
 | 12370 | - Patch #1180695: Add nanosecond stat resolution, and st_gen, | 
 | 12371 |   st_birthtime for FreeBSD. | 
 | 12372 |  | 
 | 12373 | - Patch #1231069: The fcntl.ioctl function now uses the 'I' code for | 
 | 12374 |   the request code argument, which results in more C-like behaviour | 
 | 12375 |   for large or negative values. | 
 | 12376 |  | 
 | 12377 | - Bug #1234979: For the argument of thread.Lock.acquire, the Windows | 
 | 12378 |   implementation treated all integer values except 1 as false. | 
 | 12379 |  | 
 | 12380 | - Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly. | 
 | 12381 |  | 
 | 12382 | - Patch #1212117: os.stat().st_flags is now accessible as a attribute | 
 | 12383 |   if available on the platform. | 
 | 12384 |  | 
 | 12385 | - Patch #1103951: Expose O_SHLOCK and O_EXLOCK in the posix module if | 
 | 12386 |   available on the platform. | 
 | 12387 |  | 
 | 12388 | - Bug #1166660: The readline module could segfault if hook functions | 
 | 12389 |   were set in a different thread than that which called readline. | 
 | 12390 |  | 
 | 12391 | - collections.deque objects now support a remove() method. | 
 | 12392 |  | 
 | 12393 | - operator.itemgetter() and operator.attrgetter() now support retrieving | 
 | 12394 |   multiple fields.  This provides direct support for sorting on multiple | 
 | 12395 |   keys (primary, secondary, etc). | 
 | 12396 |  | 
 | 12397 | - os.access now supports Unicode path names on non-Win32 systems. | 
 | 12398 |  | 
 | 12399 | - Patches #925152, #1118602: Avoid reading after the end of the buffer | 
 | 12400 |   in pyexpat.GetInputContext. | 
 | 12401 |  | 
 | 12402 | - Patches #749830, #1144555: allow UNIX mmap size to default to current | 
 | 12403 |   file size. | 
 | 12404 |  | 
 | 12405 | - Added functional.partial().  See PEP309. | 
 | 12406 |  | 
 | 12407 | - Patch #1093585: raise a ValueError for negative history items in readline. | 
 | 12408 |   {remove_history,replace_history} | 
 | 12409 |  | 
 | 12410 | - The spwd module has been added, allowing access to the shadow password | 
 | 12411 |   database. | 
 | 12412 |  | 
 | 12413 | - stat_float_times is now True. | 
 | 12414 |  | 
 | 12415 | - array.array objects are now picklable. | 
 | 12416 |  | 
 | 12417 | - the cPickle module no longer accepts the deprecated None option in the | 
 | 12418 |   args tuple returned by __reduce__(). | 
 | 12419 |  | 
 | 12420 | - itertools.islice() now accepts None for the start and step arguments. | 
 | 12421 |   This allows islice() to work more readily with slices: | 
 | 12422 |       islice(s.start, s.stop, s.step) | 
 | 12423 |  | 
 | 12424 | - datetime.datetime() now has a strptime class method which can be used to | 
 | 12425 |   create datetime object using a string and format. | 
 | 12426 |  | 
 | 12427 | - Patch #1117961: Replace the MD5 implementation from RSA Data Security Inc | 
 | 12428 |   with the implementation from http://sourceforge.net/projects/libmd5-rfc/. | 
 | 12429 |  | 
 | 12430 | Library | 
 | 12431 | ------- | 
 | 12432 |  | 
 | 12433 | - Patch #1388073: Numerous __-prefixed attributes of unittest.TestCase have | 
 | 12434 |   been renamed to have only a single underscore prefix.  This was done to | 
 | 12435 |   make subclassing easier. | 
 | 12436 |  | 
 | 12437 | - PEP 338: new module runpy defines a run_module function to support | 
 | 12438 |   executing modules which provide access to source code or a code object | 
 | 12439 |   via the PEP 302 import mechanisms. | 
 | 12440 |  | 
 | 12441 | - The email module's parsedate_tz function now sets the daylight savings | 
 | 12442 |   flag to -1 (unknown) since it can't tell from the date whether it should | 
 | 12443 |   be set. | 
 | 12444 |  | 
 | 12445 | - Patch #624325: urlparse.urlparse() and urlparse.urlsplit() results | 
 | 12446 |   now sport attributes that provide access to the parts of the result. | 
 | 12447 |  | 
 | 12448 | - Patch #1462498: sgmllib now handles entity and character references | 
 | 12449 |   in attribute values. | 
 | 12450 |  | 
 | 12451 | - Added the sqlite3 package. This is based on pysqlite2.1.3, and provides | 
 | 12452 |   a DB-API interface in the standard library. You'll need sqlite 3.0.8 or | 
 | 12453 |   later to build this - if you have an earlier version, the C extension | 
 | 12454 |   module will not be built. | 
 | 12455 |  | 
 | 12456 | - Bug #1460340: ``random.sample(dict)`` failed in various ways.  Dicts | 
 | 12457 |   aren't officially supported here, and trying to use them will probably | 
 | 12458 |   raise an exception some day.  But dicts have been allowed, and "mostly | 
 | 12459 |   worked", so support for them won't go away without warning. | 
 | 12460 |  | 
 | 12461 | - Bug #1445068: getpass.getpass() can now be given an explicit stream | 
 | 12462 |   argument to specify where to write the prompt. | 
 | 12463 |  | 
 | 12464 | - Patch #1462313, bug #1443328: the pickle modules now can handle classes | 
 | 12465 |   that have __private names in their __slots__. | 
 | 12466 |  | 
 | 12467 | - Bug #1250170: mimetools now handles socket.gethostname() failures gracefully. | 
 | 12468 |  | 
 | 12469 | - patch #1457316: "setup.py upload" now supports --identity to select the | 
 | 12470 |   key to be used for signing the uploaded code. | 
 | 12471 |  | 
 | 12472 | - Queue.Queue objects now support .task_done() and .join() methods | 
 | 12473 |   to make it easier to monitor when daemon threads have completed | 
 | 12474 |   processing all enqueued tasks.  Patch #1455676. | 
 | 12475 |  | 
 | 12476 | - popen2.Popen objects now preserve the command in a .cmd attribute. | 
 | 12477 |  | 
 | 12478 | - Added the ctypes ffi package. | 
 | 12479 |  | 
 | 12480 | - email 4.0 package now integrated.  This is largely the same as the email 3.0 | 
 | 12481 |   package that was included in Python 2.3, except that PEP 8 module names are | 
 | 12482 |   now used (e.g. mail.message instead of email.Message).  The MIME classes | 
 | 12483 |   have been moved to a subpackage (e.g. email.mime.text instead of | 
 | 12484 |   email.MIMEText).  The old names are still supported for now.  Several | 
 | 12485 |   deprecated Message methods have been removed and lots of bugs have been | 
 | 12486 |   fixed.  More details can be found in the email package documentation. | 
 | 12487 |  | 
 | 12488 | - Patches #1436130/#1443155: codecs.lookup() now returns a CodecInfo object | 
 | 12489 |   (a subclass of tuple) that provides incremental decoders and encoders | 
 | 12490 |   (a way to use stateful codecs without the stream API). Python functions | 
 | 12491 |   codecs.getincrementaldecoder() and codecs.getincrementalencoder() as well | 
 | 12492 |   as C functions PyCodec_IncrementalEncoder() and PyCodec_IncrementalDecoder() | 
 | 12493 |   have been added. | 
 | 12494 |  | 
 | 12495 | - Patch #1359365: Calling next() on a closed StringIO.String object raises | 
 | 12496 |   a ValueError instead of a StopIteration now (like file and cString.String do). | 
 | 12497 |   cStringIO.StringIO.isatty() will raise a ValueError now if close() has been | 
 | 12498 |   called before (like file and StringIO.StringIO do). | 
 | 12499 |  | 
 | 12500 | - A regrtest option -w was added to re-run failed tests in verbose mode. | 
 | 12501 |  | 
 | 12502 | - Patch #1446372: quit and exit can now be called from the interactive | 
 | 12503 |   interpreter to exit. | 
 | 12504 |  | 
 | 12505 | - The function get_count() has been added to the gc module, and gc.collect() | 
 | 12506 |   grew an optional 'generation' argument. | 
 | 12507 |  | 
 | 12508 | - A library msilib to generate Windows Installer files, and a distutils | 
 | 12509 |   command bdist_msi have been added. | 
 | 12510 |  | 
 | 12511 | - PEP 343: new module contextlib.py defines decorator @contextmanager | 
 | 12512 |   and helpful context managers nested() and closing(). | 
 | 12513 |  | 
 | 12514 | - The compiler package now supports future imports after the module docstring. | 
 | 12515 |  | 
 | 12516 | - Bug #1413790: zipfile now sanitizes absolute archive names that are | 
 | 12517 |   not allowed by the specs. | 
 | 12518 |  | 
 | 12519 | - Patch #1215184: FileInput now can be given an opening hook which can | 
 | 12520 |   be used to control how files are opened. | 
 | 12521 |  | 
 | 12522 | - Patch #1212287: fileinput.input() now has a mode parameter for | 
 | 12523 |   specifying the file mode input files should be opened with. | 
 | 12524 |  | 
 | 12525 | - Patch #1215184: fileinput now has a fileno() function for getting the | 
 | 12526 |   current file number. | 
 | 12527 |  | 
 | 12528 | - Patch #1349274: gettext.install() now optionally installs additional | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 12529 |   translation functions other than _() in the builtins namespace. | 
| Christian Heimes | c3f30c4 | 2008-02-22 16:37:40 +0000 | [diff] [blame] | 12530 |  | 
 | 12531 | - Patch #1337756: fileinput now accepts Unicode filenames. | 
 | 12532 |  | 
 | 12533 | - Patch #1373643: The chunk module can now read chunks larger than | 
 | 12534 |   two gigabytes. | 
 | 12535 |  | 
 | 12536 | - Patch #1417555: SimpleHTTPServer now returns Last-Modified headers. | 
 | 12537 |  | 
 | 12538 | - Bug #1430298: It is now possible to send a mail with an empty | 
 | 12539 |   return address using smtplib. | 
 | 12540 |  | 
 | 12541 | - Bug #1432260: The names of lambda functions are now properly displayed | 
 | 12542 |   in pydoc. | 
 | 12543 |  | 
 | 12544 | - Patch #1412872: zipfile now sets the creator system to 3 (Unix) | 
 | 12545 |   unless the system is Win32. | 
 | 12546 |  | 
 | 12547 | - Patch #1349118: urllib now supports user:pass@ style proxy | 
 | 12548 |   specifications, raises IOErrors when proxies for unsupported protocols | 
 | 12549 |   are defined, and uses the https proxy on https redirections. | 
 | 12550 |  | 
 | 12551 | - Bug #902075: urllib2 now supports 'host:port' style proxy specifications. | 
 | 12552 |  | 
 | 12553 | - Bug #1407902: Add support for sftp:// URIs to urlparse. | 
 | 12554 |  | 
 | 12555 | - Bug #1371247: Update Windows locale identifiers in locale.py. | 
 | 12556 |  | 
 | 12557 | - Bug #1394565: SimpleHTTPServer now doesn't choke on query parameters | 
 | 12558 |   any more. | 
 | 12559 |  | 
 | 12560 | - Bug #1403410: The warnings module now doesn't get confused | 
 | 12561 |   when it can't find out the module name it generates a warning for. | 
 | 12562 |  | 
 | 12563 | - Patch #1177307: Added a new codec utf_8_sig for UTF-8 with a BOM signature. | 
 | 12564 |  | 
 | 12565 | - Patch #1157027: cookielib mishandles RFC 2109 cookies in Netscape mode | 
 | 12566 |  | 
 | 12567 | - Patch #1117398: cookielib.LWPCookieJar and .MozillaCookieJar now raise | 
 | 12568 |   LoadError as documented, instead of IOError.  For compatibility, | 
 | 12569 |   LoadError subclasses IOError. | 
 | 12570 |  | 
 | 12571 | - Added the hashlib module.  It provides secure hash functions for MD5 and | 
 | 12572 |   SHA1, 224, 256, 384, and 512.  Note that recent developments make the | 
 | 12573 |   historic MD5 and SHA1 unsuitable for cryptographic-strength applications. | 
 | 12574 |   In <http://mail.python.org/pipermail/python-dev/2005-December/058850.html> | 
 | 12575 |   Ronald L. Rivest offered this advice for Python: | 
 | 12576 |  | 
 | 12577 |       "The consensus of researchers in this area (at least as | 
 | 12578 |       expressed at the NIST Hash Function Workshop 10/31/05), | 
 | 12579 |       is that SHA-256 is a good choice for the time being, but | 
 | 12580 |       that research should continue, and other alternatives may | 
 | 12581 |       arise from this research.  The larger SHA's also seem OK." | 
 | 12582 |  | 
 | 12583 | - Added a subset of Fredrik Lundh's ElementTree package.  Available | 
 | 12584 |   modules are xml.etree.ElementTree, xml.etree.ElementPath, and | 
 | 12585 |   xml.etree.ElementInclude, from ElementTree 1.2.6. | 
 | 12586 |  | 
 | 12587 | - Patch #1162825: Support non-ASCII characters in IDLE window titles. | 
 | 12588 |  | 
 | 12589 | - Bug #1365984: urllib now opens "data:" URLs again. | 
 | 12590 |  | 
 | 12591 | - Patch #1314396: prevent deadlock for threading.Thread.join() when an exception | 
 | 12592 |   is raised within the method itself on a previous call (e.g., passing in an | 
 | 12593 |   illegal argument) | 
 | 12594 |  | 
 | 12595 | - Bug #1340337: change time.strptime() to always return ValueError when there | 
 | 12596 |   is an error in the format string. | 
 | 12597 |  | 
 | 12598 | - Patch #754022: Greatly enhanced webbrowser.py (by Oleg Broytmann). | 
 | 12599 |  | 
 | 12600 | - Bug #729103: pydoc.py: Fix docother() method to accept additional | 
 | 12601 |   "parent" argument. | 
 | 12602 |  | 
 | 12603 | - Patch #1300515: xdrlib.py: Fix pack_fstring() to really use null bytes | 
 | 12604 |   for padding. | 
 | 12605 |  | 
 | 12606 | - Bug #1296004: httplib.py: Limit maximal amount of data read from the | 
 | 12607 |   socket to avoid a MemoryError on Windows. | 
 | 12608 |  | 
 | 12609 | - Patch #1166948: locale.py: Prefer LC_ALL, LC_CTYPE and LANG over LANGUAGE | 
 | 12610 |   to get the correct encoding. | 
 | 12611 |  | 
 | 12612 | - Patch #1166938: locale.py: Parse LANGUAGE as a colon separated list of | 
 | 12613 |   languages. | 
 | 12614 |  | 
 | 12615 | - Patch #1268314: Cache lines in StreamReader.readlines for performance. | 
 | 12616 |  | 
 | 12617 | - Bug #1290505: Fix clearing the regex cache for time.strptime(). | 
 | 12618 |  | 
 | 12619 | - Bug #1167128: Fix size of a symlink in a tarfile to be 0. | 
 | 12620 |  | 
 | 12621 | - Patch #810023: Fix off-by-one bug in urllib.urlretrieve reporthook | 
 | 12622 |   functionality. | 
 | 12623 |  | 
 | 12624 | - Bug #1163178: Make IDNA return an empty string when the input is empty. | 
 | 12625 |  | 
 | 12626 | - Patch #848017: Make Cookie more RFC-compliant. Use CRLF as default output | 
 | 12627 |   separator and do not output trailing semicolon. | 
 | 12628 |  | 
 | 12629 | - Patch #1062060: urllib.urlretrieve() now raises a new exception, named | 
 | 12630 |   ContentTooShortException, when the actually downloaded size does not | 
 | 12631 |   match the Content-Length header. | 
 | 12632 |  | 
 | 12633 | - Bug #1121494: distutils.dir_utils.mkpath now accepts Unicode strings. | 
 | 12634 |  | 
 | 12635 | - Bug #1178484: Return complete lines from codec stream readers | 
 | 12636 |   even if there is an exception in later lines, resulting in | 
 | 12637 |   correct line numbers for decoding errors in source code. | 
 | 12638 |  | 
 | 12639 | - Bug #1192315: Disallow negative arguments to clear() in pdb. | 
 | 12640 |  | 
 | 12641 | - Patch #827386: Support absolute source paths in msvccompiler.py. | 
 | 12642 |  | 
 | 12643 | - Patch #1105730: Apply the new implementation of commonprefix in posixpath | 
 | 12644 |   to ntpath, macpath, os2emxpath and riscospath. | 
 | 12645 |  | 
 | 12646 | - Fix a problem in Tkinter introduced by SF patch #869468: delete bogus | 
 | 12647 |   __hasattr__ and __delattr__ methods on class Tk that were breaking | 
 | 12648 |   Tkdnd. | 
 | 12649 |  | 
 | 12650 | - Bug #1015140: disambiguated the term "article id" in nntplib docs and | 
 | 12651 |   docstrings to either "article number" or "message id". | 
 | 12652 |  | 
 | 12653 | - Bug #1238170: threading.Thread.__init__ no longer has "kwargs={}" as a | 
 | 12654 |   parameter, but uses the usual "kwargs=None". | 
 | 12655 |  | 
 | 12656 | - textwrap now processes text chunks at O(n) speed instead of O(n**2). | 
 | 12657 |   Patch #1209527 (Contributed by Connelly). | 
 | 12658 |  | 
 | 12659 | - urllib2 has now an attribute 'httpresponses' mapping from HTTP status code | 
 | 12660 |   to W3C name (404 -> 'Not Found'). RFE #1216944. | 
 | 12661 |  | 
 | 12662 | - Bug #1177468: Don't cache the /dev/urandom file descriptor for os.urandom, | 
 | 12663 |   as this can cause problems with apps closing all file descriptors. | 
 | 12664 |  | 
 | 12665 | - Bug #839151: Fix an attempt to access sys.argv in the warnings module; | 
 | 12666 |   it can be missing in embedded interpreters | 
 | 12667 |  | 
 | 12668 | - Bug #1155638: Fix a bug which affected HTTP 0.9 responses in httplib. | 
 | 12669 |  | 
 | 12670 | - Bug #1100201: Cross-site scripting was possible on BaseHTTPServer via | 
 | 12671 |   error messages. | 
 | 12672 |  | 
 | 12673 | - Bug #1108948: Cookie.py produced invalid JavaScript code. | 
 | 12674 |  | 
 | 12675 | - The tokenize module now detects and reports indentation errors. | 
 | 12676 |   Bug #1224621. | 
 | 12677 |  | 
 | 12678 | - The tokenize module has a new untokenize() function to support a full | 
 | 12679 |   roundtrip from lexed tokens back to Python source code.  In addition, | 
 | 12680 |   the generate_tokens() function now accepts a callable argument that | 
 | 12681 |   terminates by raising StopIteration. | 
 | 12682 |  | 
 | 12683 | - Bug #1196315: fix weakref.WeakValueDictionary constructor. | 
 | 12684 |  | 
 | 12685 | - Bug #1213894: os.path.realpath didn't resolve symlinks that were the first | 
 | 12686 |   component of the path. | 
 | 12687 |  | 
 | 12688 | - Patch #1120353: The xmlrpclib module provides better, more transparent, | 
 | 12689 |   support for datetime.{datetime,date,time} objects.  With use_datetime set | 
 | 12690 |   to True, applications shouldn't have to fiddle with the DateTime wrapper | 
 | 12691 |   class at all. | 
 | 12692 |  | 
 | 12693 | - distutils.commands.upload was added to support uploading distribution | 
 | 12694 |   files to PyPI. | 
 | 12695 |  | 
 | 12696 | - distutils.commands.register now encodes the data as UTF-8 before posting | 
 | 12697 |   them to PyPI. | 
 | 12698 |  | 
 | 12699 | - decimal operator and comparison methods now return NotImplemented | 
 | 12700 |   instead of raising a TypeError when interacting with other types.  This | 
 | 12701 |   allows other classes to implement __radd__ style methods and have them | 
 | 12702 |   work as expected. | 
 | 12703 |  | 
 | 12704 | - Bug #1163325:  Decimal infinities failed to hash.  Attempting to | 
 | 12705 |   hash a NaN raised an InvalidOperation instead of a TypeError. | 
 | 12706 |  | 
 | 12707 | - Patch #918101: Add tarfile open mode r|* for auto-detection of the | 
 | 12708 |   stream compression; add, for symmetry reasons, r:* as a synonym of r. | 
 | 12709 |  | 
 | 12710 | - Patch #1043890: Add extractall method to tarfile. | 
 | 12711 |  | 
 | 12712 | - Patch #1075887: Don't require MSVC in distutils if there is nothing | 
 | 12713 |   to build. | 
 | 12714 |  | 
 | 12715 | - Patch #1103407: Properly deal with tarfile iterators when untarring | 
 | 12716 |   symbolic links on Windows. | 
 | 12717 |  | 
 | 12718 | - Patch #645894: Use getrusage for computing the time consumption in | 
 | 12719 |   profile.py if available. | 
 | 12720 |  | 
 | 12721 | - Patch #1046831: Use get_python_version where appropriate in sysconfig.py. | 
 | 12722 |  | 
 | 12723 | - Patch #1117454: Remove code to special-case cookies without values | 
 | 12724 |   in LWPCookieJar. | 
 | 12725 |  | 
 | 12726 | - Patch #1117339: Add cookielib special name tests. | 
 | 12727 |  | 
 | 12728 | - Patch #1112812: Make bsddb/__init__.py more friendly for modulefinder. | 
 | 12729 |  | 
 | 12730 | - Patch #1110248: SYNC_FLUSH the zlib buffer for GZipFile.flush. | 
 | 12731 |  | 
 | 12732 | - Patch #1107973: Allow to iterate over the lines of a tarfile.ExFileObject. | 
 | 12733 |  | 
 | 12734 | - Patch #1104111: Alter setup.py --help and --help-commands. | 
 | 12735 |  | 
 | 12736 | - Patch #1121234: Properly cleanup _exit and tkerror commands. | 
 | 12737 |  | 
 | 12738 | - Patch #1049151: xdrlib now unpacks booleans as True or False. | 
 | 12739 |  | 
 | 12740 | - Fixed bug in a NameError bug in cookielib.  Patch #1116583. | 
 | 12741 |  | 
 | 12742 | - Applied a security fix to SimpleXMLRPCserver (PSF-2005-001).  This | 
 | 12743 |   disables recursive traversal through instance attributes, which can | 
 | 12744 |   be exploited in various ways. | 
 | 12745 |  | 
 | 12746 | - Bug #1222790: in SimpleXMLRPCServer, set the reuse-address and close-on-exec | 
 | 12747 |   flags on the HTTP listening socket. | 
 | 12748 |  | 
 | 12749 | - Bug #792570: SimpleXMLRPCServer had problems if the request grew too large. | 
 | 12750 |   Fixed by reading the HTTP body in chunks instead of one big socket.read(). | 
 | 12751 |  | 
 | 12752 | - Patches #893642, #1039083: add allow_none, encoding arguments to | 
 | 12753 |   constructors of SimpleXMLRPCServer and CGIXMLRPCRequestHandler. | 
 | 12754 |  | 
 | 12755 | - Bug #1110478: Revert os.environ.update to do putenv again. | 
 | 12756 |  | 
 | 12757 | - Bug #1103844: fix distutils.install.dump_dirs() with negated options. | 
 | 12758 |  | 
 | 12759 | - os.{SEEK_SET, SEEK_CUR, SEEK_END} have been added for convenience. | 
 | 12760 |  | 
 | 12761 | - Enhancements to the csv module: | 
 | 12762 |  | 
 | 12763 |   + Dialects are now validated by the underlying C code, better | 
 | 12764 |     reflecting its capabilities, and improving its compliance with | 
 | 12765 |     PEP 305. | 
 | 12766 |   + Dialect parameter parsing has been re-implemented to improve error | 
 | 12767 |     reporting. | 
 | 12768 |   + quotechar=None and quoting=QUOTE_NONE now work the way PEP 305 | 
 | 12769 |     dictates. | 
 | 12770 |   + the parser now removes the escapechar prefix from escaped characters. | 
 | 12771 |   + when quoting=QUOTE_NONNUMERIC, the writer now tests for numeric | 
 | 12772 |     types, rather than any object that can be represented as a numeric. | 
 | 12773 |   + when quoting=QUOTE_NONNUMERIC, the reader now casts unquoted fields | 
 | 12774 |     to floats. | 
 | 12775 |   + reader now allows \r characters to be quoted (previously it only allowed | 
 | 12776 |     \n to be quoted). | 
 | 12777 |   + writer doublequote handling improved. | 
 | 12778 |   + Dialect classes passed to the module are no longer instantiated by | 
 | 12779 |     the module before being parsed (the former validation scheme required | 
 | 12780 |     this, but the mechanism was unreliable). | 
 | 12781 |   + The dialect registry now contains instances of the internal | 
 | 12782 |     C-coded dialect type, rather than references to python objects. | 
 | 12783 |   + the internal c-coded dialect type is now immutable. | 
 | 12784 |   + register_dialect now accepts the same keyword dialect specifications | 
 | 12785 |     as the reader and writer, allowing the user to register dialects | 
 | 12786 |     without first creating a dialect class. | 
 | 12787 |   + a configurable limit to the size of parsed fields has been added - | 
 | 12788 |     previously, an unmatched quote character could result in the entire | 
 | 12789 |     file being read into the field buffer before an error was reported. | 
 | 12790 |   + A new module method csv.field_size_limit() has been added that sets | 
 | 12791 |     the parser field size limit (returning the former limit). The initial | 
 | 12792 |     limit is 128kB. | 
 | 12793 |   + A line_num attribute has been added to the reader object, which tracks | 
 | 12794 |     the number of lines read from the source iterator. This is not | 
 | 12795 |     the same as the number of records returned, as records can span | 
 | 12796 |     multiple lines. | 
 | 12797 |   + reader and writer objects were not being registered with the cyclic-GC. | 
 | 12798 |     This has been fixed. | 
 | 12799 |  | 
 | 12800 | - _DummyThread objects in the threading module now delete self.__block that is | 
 | 12801 |   inherited from _Thread since it uses up a lock allocated by 'thread'.  The | 
 | 12802 |   lock primitives tend to be limited in number and thus should not be wasted on | 
 | 12803 |   a _DummyThread object.  Fixes bug #1089632. | 
 | 12804 |  | 
 | 12805 | - The imghdr module now detects Exif files. | 
 | 12806 |  | 
 | 12807 | - StringIO.truncate() now correctly adjusts the size attribute. | 
 | 12808 |   (Bug #951915). | 
 | 12809 |  | 
 | 12810 | - locale.py now uses an updated locale alias table (built using | 
 | 12811 |   Tools/i18n/makelocalealias.py, a tool to parse the X11 locale | 
 | 12812 |   alias file); the encoding lookup was enhanced to use Python's | 
 | 12813 |   encoding alias table. | 
 | 12814 |  | 
 | 12815 | - moved deprecated modules to Lib/lib-old:  whrandom, tzparse, statcache. | 
 | 12816 |  | 
 | 12817 | - the pickle module no longer accepts the deprecated None option in the | 
 | 12818 |   args tuple returned by __reduce__(). | 
 | 12819 |  | 
 | 12820 | - optparse now optionally imports gettext.  This allows its use in setup.py. | 
 | 12821 |  | 
 | 12822 | - the pickle module no longer uses the deprecated bin parameter. | 
 | 12823 |  | 
 | 12824 | - the shelve module no longer uses the deprecated binary parameter. | 
 | 12825 |  | 
 | 12826 | - the pstats module no longer uses the deprecated ignore() method. | 
 | 12827 |  | 
 | 12828 | - the filecmp module no longer uses the deprecated use_statcache argument. | 
 | 12829 |  | 
 | 12830 | - unittest.TestCase.run() and unittest.TestSuite.run() can now be successfully | 
 | 12831 |   extended or overridden by subclasses.  Formerly, the subclassed method would | 
 | 12832 |   be ignored by the rest of the module.  (Bug #1078905). | 
 | 12833 |  | 
 | 12834 | - heapq.nsmallest() and heapq.nlargest() now support key= arguments with | 
 | 12835 |   the same meaning as in list.sort(). | 
 | 12836 |  | 
 | 12837 | - Bug #1076985: ``codecs.StreamReader.readline()`` now calls ``read()`` only | 
 | 12838 |   once when a size argument is given. This prevents a buffer overflow in the | 
 | 12839 |   tokenizer with very long source lines. | 
 | 12840 |  | 
 | 12841 | - Bug #1083110: ``zlib.decompress.flush()`` would segfault if called | 
 | 12842 |   immediately after creating the object, without any intervening | 
 | 12843 |   ``.decompress()`` calls. | 
 | 12844 |  | 
 | 12845 | - The reconvert.quote function can now emit triple-quoted strings.  The | 
 | 12846 |   reconvert module now has some simple documentation. | 
 | 12847 |  | 
 | 12848 | - ``UserString.MutableString`` now supports negative indices in | 
 | 12849 |   ``__setitem__`` and ``__delitem__`` | 
 | 12850 |  | 
 | 12851 | - Bug #1149508: ``textwrap`` now handles hyphenated numbers (eg. "2004-03-05") | 
 | 12852 |   correctly. | 
 | 12853 |  | 
 | 12854 | - Partial fixes for SF bugs #1163244 and #1175396: If a chunk read by | 
 | 12855 |   ``codecs.StreamReader.readline()`` has a trailing "\r", read one more | 
 | 12856 |   character even if the user has passed a size parameter to get a proper | 
 | 12857 |   line ending. Remove the special handling of a "\r\n" that has been split | 
 | 12858 |   between two lines. | 
 | 12859 |  | 
 | 12860 | - Bug #1251300: On UCS-4 builds the "unicode-internal" codec will now complain | 
 | 12861 |   about illegal code points. The codec now supports PEP 293 style error | 
 | 12862 |   handlers. | 
 | 12863 |  | 
 | 12864 | - Bug #1235646: ``codecs.StreamRecoder.next()`` now reencodes the data it reads | 
 | 12865 |   from the input stream, so that the output is a byte string in the correct | 
 | 12866 |   encoding instead of a unicode string. | 
 | 12867 |  | 
 | 12868 | - Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than | 
 | 12869 |   considering it exactly like a '*'. | 
 | 12870 |  | 
 | 12871 | - Bug #1245379: Add "unicode-1-1-utf-7" as an alias for "utf-7" to | 
 | 12872 |   ``encodings.aliases``. | 
 | 12873 |  | 
 | 12874 | - ` uu.encode()`` and ``uu.decode()`` now support unicode filenames. | 
 | 12875 |  | 
 | 12876 | - Patch #1413711: Certain patterns of differences were making difflib | 
 | 12877 |   touch the recursion limit. | 
 | 12878 |  | 
 | 12879 | - Bug #947906: An object oriented interface has been added to the calendar | 
 | 12880 |   module. It's possible to generate HTML calendar now and the module can be | 
 | 12881 |   called as a script (e.g. via ``python -mcalendar``). Localized month and | 
 | 12882 |   weekday names can be ouput (even if an exotic encoding is used) using | 
 | 12883 |   special classes that use unicode. | 
 | 12884 |  | 
 | 12885 | Build | 
 | 12886 | ----- | 
 | 12887 |  | 
 | 12888 | - Fix test_float, test_long, and test_struct failures on Tru64 with gcc | 
 | 12889 |   by using -mieee gcc option. | 
 | 12890 |  | 
 | 12891 | - Patch #1432345: Make python compile on DragonFly. | 
 | 12892 |  | 
 | 12893 | - Build support for Win64-AMD64 was added. | 
 | 12894 |  | 
 | 12895 | - Patch #1428494: Prefer linking against ncursesw over ncurses library. | 
 | 12896 |  | 
 | 12897 | - Patch #881820: look for openpty and forkpty also in libbsd. | 
 | 12898 |  | 
 | 12899 | - The sources of zlib are now part of the Python distribution (zlib 1.2.3). | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 12900 |   The zlib module is now built in on Windows. | 
| Christian Heimes | c3f30c4 | 2008-02-22 16:37:40 +0000 | [diff] [blame] | 12901 |  | 
 | 12902 | - Use -xcode=pic32 for CCSHARED on Solaris with SunPro. | 
 | 12903 |  | 
 | 12904 | - Bug #1189330: configure did not correctly determine the necessary | 
 | 12905 |   value of LINKCC if python was built with GCC 4.0. | 
 | 12906 |  | 
 | 12907 | - Upgrade Windows build to zlib 1.2.3 which eliminates a potential security | 
 | 12908 |   vulnerability in zlib 1.2.1 and 1.2.2. | 
 | 12909 |  | 
 | 12910 | - EXTRA_CFLAGS has been introduced as an environment variable to hold compiler | 
 | 12911 |   flags that change binary compatibility.  Changes were also made to | 
 | 12912 |   distutils.sysconfig to also use the environment variable when used during | 
 | 12913 |   compilation of the interpreter and of C extensions through distutils. | 
 | 12914 |  | 
 | 12915 | - SF patch 1171735: Darwin 8's headers are anal about POSIX compliance, | 
 | 12916 |   and linking has changed (prebinding is now deprecated, and libcc_dynamic | 
 | 12917 |   no longer exists). This configure patch makes things right. | 
 | 12918 |  | 
 | 12919 | - Bug #1158607: Build with --disable-unicode again. | 
 | 12920 |  | 
 | 12921 | - spwdmodule.c is built only if either HAVE_GETSPNAM or HAVE_HAVE_GETSPENT is | 
 | 12922 |   defined.  Discovered as a result of not being able to build on OS X. | 
 | 12923 |  | 
 | 12924 | - setup.py now uses the directories specified in LDFLAGS using the -L option | 
 | 12925 |   and in CPPFLAGS using the -I option for adding library and include | 
 | 12926 |   directories, respectively, for compiling extension modules against.  This has | 
 | 12927 |   led to the core being compiled using the values in CPPFLAGS.  It also removes | 
 | 12928 |   the need for the special-casing of both DarwinPorts and Fink for darwin since | 
 | 12929 |   the proper directories can be specified in LDFLAGS (``-L/sw/lib`` for Fink, | 
 | 12930 |   ``-L/opt/local/lib`` for DarwinPorts) and CPPFLAGS (``-I/sw/include`` for | 
 | 12931 |   Fink, ``-I/opt/local/include`` for DarwinPorts). | 
 | 12932 |  | 
 | 12933 | - Test in configure.in that checks for tzset no longer dependent on tm->tm_zone | 
 | 12934 |   to exist in the struct (not required by either ISO C nor the UNIX 2 spec). | 
 | 12935 |   Tests for sanity in tzname when HAVE_TZNAME defined were also defined. | 
 | 12936 |   Closes bug #1096244.  Thanks Gregory Bond. | 
 | 12937 |  | 
 | 12938 | C API | 
 | 12939 | ----- | 
 | 12940 |  | 
 | 12941 | - ``PyMem_{Del, DEL}`` and ``PyMem_{Free, FREE}`` no longer map to | 
 | 12942 |   ``PyObject_{Free, FREE}``.  They map to the system ``free()`` now.  If memory | 
 | 12943 |   is obtained via the ``PyObject_`` family, it must be released via the | 
 | 12944 |   ``PyObject_`` family, and likewise for the ``PyMem_`` family.  This has | 
 | 12945 |   always been officially true, but when Python's small-object allocator was | 
 | 12946 |   introduced, an attempt was made to cater to a few extension modules | 
 | 12947 |   discovered at the time that obtained memory via ``PyObject_New`` but | 
 | 12948 |   released it via ``PyMem_DEL``.  It's years later, and if such code still | 
 | 12949 |   exists it will fail now (probably with segfaults, but calling wrong | 
 | 12950 |   low-level memory management functions can yield many symptoms). | 
 | 12951 |  | 
 | 12952 | - Added a C API for set and frozenset objects. | 
 | 12953 |  | 
 | 12954 | - Removed PyRange_New(). | 
 | 12955 |  | 
 | 12956 | - Patch #1313939: PyUnicode_DecodeCharmap() accepts a unicode string as the | 
 | 12957 |   mapping argument now. This string is used as a mapping table. Byte values | 
 | 12958 |   greater than the length of the string and 0xFFFE are treated as undefined | 
 | 12959 |   mappings. | 
 | 12960 |  | 
 | 12961 |  | 
 | 12962 | Tests | 
 | 12963 | ----- | 
 | 12964 |  | 
 | 12965 | - In test_os, st_?time is now truncated before comparing it with ST_?TIME. | 
 | 12966 |  | 
 | 12967 | - Patch #1276356: New resource "urlfetch" is implemented.  This enables | 
 | 12968 |   even impatient people to run tests that require remote files. | 
 | 12969 |  | 
 | 12970 |  | 
 | 12971 | Documentation | 
 | 12972 | ------------- | 
 | 12973 |  | 
 | 12974 | - Bug #1402224: Add warning to dl docs about crashes. | 
 | 12975 |  | 
 | 12976 | - Bug #1396471: Document that Windows' ftell() can return invalid | 
 | 12977 |   values for text files with UNIX-style line endings. | 
 | 12978 |  | 
 | 12979 | - Bug #1274828: Document os.path.splitunc(). | 
 | 12980 |  | 
 | 12981 | - Bug #1190204: Clarify which directories are searched by site.py. | 
 | 12982 |  | 
 | 12983 | - Bug #1193849: Clarify os.path.expanduser() documentation. | 
 | 12984 |  | 
 | 12985 | - Bug #1243192: re.UNICODE and re.LOCALE affect \d, \D, \s and \S. | 
 | 12986 |  | 
 | 12987 | - Bug #755617: Document the effects of os.chown() on Windows. | 
 | 12988 |  | 
 | 12989 | - Patch #1180012: The documentation for modulefinder is now in the library reference. | 
 | 12990 |  | 
 | 12991 | - Patch #1213031: Document that os.chown() accepts argument values of -1. | 
 | 12992 |  | 
 | 12993 | - Bug #1190563: Document os.waitpid() return value with WNOHANG flag. | 
 | 12994 |  | 
 | 12995 | - Bug #1175022: Correct the example code for property(). | 
 | 12996 |  | 
 | 12997 | - Document the IterableUserDict class in the UserDict module. | 
 | 12998 |   Closes bug #1166582. | 
 | 12999 |  | 
 | 13000 | - Remove all latent references for "Macintosh" that referred to semantics for | 
 | 13001 |   Mac OS 9 and change to reflect the state for OS X. | 
 | 13002 |   Closes patch #1095802.  Thanks Jack Jansen. | 
 | 13003 |  | 
 | 13004 | Mac | 
 | 13005 | --- | 
 | 13006 |  | 
 | 13007 |  | 
 | 13008 | New platforms | 
 | 13009 | ------------- | 
 | 13010 |  | 
 | 13011 | - FreeBSD 7 support is added. | 
 | 13012 |  | 
 | 13013 |  | 
 | 13014 | Tools/Demos | 
 | 13015 | ----------- | 
 | 13016 |  | 
 | 13017 | - Created Misc/Vim/vim_syntax.py to auto-generate a python.vim file in that | 
 | 13018 |   directory for syntax highlighting in Vim.  Vim directory was added and placed | 
 | 13019 |   vimrc to it (was previous up a level). | 
 | 13020 |  | 
 | 13021 | - Added two new files to Tools/scripts: pysource.py, which recursively | 
 | 13022 |   finds Python source files, and findnocoding.py, which finds Python | 
 | 13023 |   source files that need an encoding declaration. | 
 | 13024 |   Patch #784089, credits to Oleg Broytmann. | 
 | 13025 |  | 
 | 13026 | - Bug #1072853: pindent.py used an uninitialized variable. | 
 | 13027 |  | 
 | 13028 | - Patch #1177597: Correct Complex.__init__. | 
 | 13029 |  | 
 | 13030 | - Fixed a display glitch in Pynche, which could cause the right arrow to | 
 | 13031 |   wiggle over by a pixel. | 
 | 13032 |  | 
 | 13033 |  | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 13034 | What's New in Python 2.4 final? | 
 | 13035 | =============================== | 
 | 13036 |  | 
 | 13037 | *Release date: 30-NOV-2004* | 
 | 13038 |  | 
 | 13039 | Core and builtins | 
 | 13040 | ----------------- | 
 | 13041 |  | 
 | 13042 | - Bug 875692: Improve signal handling, especially when using threads, by | 
 | 13043 |   forcing an early re-execution of PyEval_EvalFrame() "periodic" code when | 
 | 13044 |   things_to_do is not cleared by Py_MakePendingCalls(). | 
 | 13045 |  | 
 | 13046 |  | 
 | 13047 | What's New in Python 2.4 (release candidate 1) | 
 | 13048 | ============================================== | 
 | 13049 |  | 
 | 13050 | *Release date: 18-NOV-2004* | 
 | 13051 |  | 
 | 13052 | Core and builtins | 
 | 13053 | ----------------- | 
 | 13054 |  | 
 | 13055 | - Bug 1061968:  Fixes in 2.4a3 to address thread bug 1010677 reintroduced | 
 | 13056 |   the years-old thread shutdown race bug 225673.  Numeric history lesson | 
 | 13057 |   aside, all bugs in all three reports are fixed now. | 
 | 13058 |  | 
 | 13059 |  | 
 | 13060 | Library | 
 | 13061 | ------- | 
 | 13062 |  | 
 | 13063 | - Bug 1052242: If exceptions are raised by an atexit handler function an | 
 | 13064 |   attempt is made to execute the remaining handlers.  The last exception | 
 | 13065 |   raised is re-raised. | 
 | 13066 |  | 
 | 13067 | - ``doctest``'s new support for adding ``pdb.set_trace()`` calls to | 
 | 13068 |   doctests was broken in a dramatic but shallow way.  Fixed. | 
 | 13069 |  | 
 | 13070 | - Bug 1065388:  ``calendar``'s ``day_name``, ``day_abbr``, ``month_name``, | 
 | 13071 |   and ``month_abbr`` attributes emulate sequences of locale-correct | 
 | 13072 |   spellings of month and day names.  Because the locale can change at | 
 | 13073 |   any time, the correct spelling is recomputed whenever one of these is | 
 | 13074 |   indexed.  In the worst case, the index may be a slice object, so these | 
 | 13075 |   recomputed every day or month name each time they were indexed.  This is | 
 | 13076 |   much slower than necessary in the usual case, when the index is just an | 
 | 13077 |   integer.  In that case, only the single spelling needed is recomputed | 
 | 13078 |   now; and, when the index is a slice object, only the spellings needed | 
 | 13079 |   by the slice are recomputed now. | 
 | 13080 |  | 
 | 13081 | - Patch 1061679: Added ``__all__`` to pickletools.py. | 
 | 13082 |  | 
 | 13083 | Build | 
 | 13084 | ----- | 
 | 13085 |  | 
 | 13086 | - Bug 1034277 / Patch 1035255: Remove compilation of core against CoreServices | 
 | 13087 |   and CoreFoundation on OS X.  Involved removing PyMac_GetAppletScriptFile() | 
 | 13088 |   which has no known users.  Thanks Bob Ippolito. | 
 | 13089 |  | 
 | 13090 | C API | 
 | 13091 | ----- | 
 | 13092 |  | 
 | 13093 | - The PyRange_New() function is deprecated. | 
 | 13094 |  | 
 | 13095 |  | 
 | 13096 | What's New in Python 2.4 beta 2? | 
 | 13097 | ================================ | 
 | 13098 |  | 
 | 13099 | *Release date: 03-NOV-2004* | 
 | 13100 |  | 
 | 13101 | License | 
 | 13102 | ------- | 
 | 13103 |  | 
 | 13104 | The Python Software Foundation changed the license under which Python | 
 | 13105 | is released, to remove Python version numbers.  There were no other | 
 | 13106 | changes to the license.  So, for example, wherever the license for | 
 | 13107 | Python 2.3 said "Python 2.3", the new license says "Python".  The | 
 | 13108 | intent is to make it possible to refer to the PSF license in a more | 
 | 13109 | durable way.  For example, some people say they're confused by that | 
 | 13110 | the Open Source Initiative's entry for the Python Software Foundation | 
 | 13111 | License:: | 
 | 13112 |  | 
 | 13113 |       http://www.opensource.org/licenses/PythonSoftFoundation.php | 
 | 13114 |  | 
 | 13115 | says "Python 2.1.1" all over it, wondering whether it applies only | 
 | 13116 | to Python 2.1.1. | 
 | 13117 |  | 
 | 13118 | The official name of the new license is the Python Software Foundation | 
 | 13119 | License Version 2. | 
 | 13120 |  | 
 | 13121 | Core and builtins | 
 | 13122 | ----------------- | 
 | 13123 |  | 
 | 13124 | - Bug #1055820 Cyclic garbage collection was not protecting against that | 
 | 13125 |   calling a live weakref to a piece of cyclic trash could resurrect an | 
 | 13126 |   insane mutation of the trash if any Python code ran during gc (via | 
 | 13127 |   running a dead object's __del__ method, running another callback on a | 
 | 13128 |   weakref to a dead object, or via any Python code run in any other thread | 
 | 13129 |   that managed to obtain the GIL while a __del__ or callback was running | 
 | 13130 |   in the thread doing gc).  The most likely symptom was "impossible" | 
 | 13131 |   ``AttributeError`` exceptions, appearing seemingly at random, on weakly | 
 | 13132 |   referenced objects.  The cure was to clear all weakrefs to unreachable | 
 | 13133 |   objects before allowing any callbacks to run. | 
 | 13134 |  | 
 | 13135 | - Bug #1054139 _PyString_Resize() now invalidates its cached hash value. | 
 | 13136 |  | 
 | 13137 | Extension Modules | 
 | 13138 | ----------------- | 
 | 13139 |  | 
 | 13140 | - Bug #1048870:  the compiler now generates distinct code objects for | 
 | 13141 |   functions with identical bodies.  This was producing confusing | 
 | 13142 |   traceback messages which pointed to the function where the code | 
 | 13143 |   object was first defined rather than the function being executed. | 
 | 13144 |  | 
 | 13145 | Library | 
 | 13146 | ------- | 
 | 13147 |  | 
 | 13148 | - Patch #1056967 changes the semantics of Template.safe_substitute() so that | 
 | 13149 |   no ValueError is raised on an 'invalid' match group.  Now the delimiter is | 
 | 13150 |   returned. | 
 | 13151 |  | 
 | 13152 | - Bug #1052503 pdb.runcall() was not passing along keyword arguments. | 
 | 13153 |  | 
 | 13154 | - Bug #902037: XML.sax.saxutils.prepare_input_source() now combines relative | 
 | 13155 |   paths with a base path before checking os.path.isfile(). | 
 | 13156 |  | 
 | 13157 | - The whichdb module can now be run from the command line. | 
 | 13158 |  | 
 | 13159 | - Bug #1045381: time.strptime() can now infer the date using %U or %W (week of | 
 | 13160 |   the year) when the day of the week and year are also specified. | 
 | 13161 |  | 
 | 13162 | - Bug #1048816: fix bug in Ctrl-K at start of line in curses.textpad.Textbox | 
 | 13163 |  | 
 | 13164 | - Bug #1017553: fix bug in tarfile.filemode() | 
 | 13165 |  | 
 | 13166 | - Patch #737473: fix bug that old source code is shown in tracebacks even if | 
 | 13167 |   the source code is updated and reloaded. | 
 | 13168 |  | 
 | 13169 | Build | 
 | 13170 | ----- | 
 | 13171 |  | 
 | 13172 | - Patch #1044395: --enable-shared is allowed in FreeBSD also. | 
 | 13173 |  | 
 | 13174 | What's New in Python 2.4 beta 1? | 
 | 13175 | ================================ | 
 | 13176 |  | 
 | 13177 | *Release date: 15-OCT-2004* | 
 | 13178 |  | 
 | 13179 | Core and builtins | 
 | 13180 | ----------------- | 
 | 13181 |  | 
 | 13182 | - Patch #975056: Restartable signals were not correctly disabled on | 
 | 13183 |   BSD systems. Consistently use PyOS_setsig() instead of signal(). | 
 | 13184 |  | 
 | 13185 | - The internal portable implementation of thread-local storage (TLS), used | 
 | 13186 |   by the ``PyGILState_Ensure()``/``PyGILState_Release()`` API, was not | 
 | 13187 |   thread-correct.  This could lead to a variety of problems, up to and | 
 | 13188 |   including segfaults.  See bug 1041645 for an example. | 
 | 13189 |  | 
 | 13190 | - Added a command line option, -m module, which searches sys.path for the | 
 | 13191 |   module and then runs it.  (Contributed by Nick Coghlan.) | 
 | 13192 |  | 
 | 13193 | - The bytecode optimizer now folds tuples of constants into a single | 
 | 13194 |   constant. | 
 | 13195 |  | 
 | 13196 | - SF bug #513866:  Float/long comparison anomaly.  Prior to 2.4b1, when | 
 | 13197 |   an integer was compared to a float, the integer was coerced to a float. | 
 | 13198 |   That could yield spurious overflow errors (if the integer was very | 
 | 13199 |   large), and to anomalies such as | 
 | 13200 |   ``long(1e200)+1 == 1e200 == long(1e200)-1``.  Coercion to float is no | 
 | 13201 |   longer performed, and cases like ``long(1e200)-1 < 1e200``, | 
 | 13202 |   ``long(1e200)+1 > 1e200`` and ``(1 << 20000) > 1e200`` are computed | 
 | 13203 |   correctly now. | 
 | 13204 |  | 
 | 13205 | Extension modules | 
 | 13206 | ----------------- | 
 | 13207 |  | 
 | 13208 | - ``collections.deque`` objects didn't play quite right with garbage | 
 | 13209 |   collection, which could lead to a segfault in a release build, or | 
 | 13210 |   an assert failure in a debug build.  Also, added overflow checks, | 
 | 13211 |   better detection of mutation during iteration, and shielded deque | 
 | 13212 |   comparisons from unusual subclass overrides of the __iter__() method. | 
 | 13213 |  | 
 | 13214 | Library | 
 | 13215 | ------- | 
 | 13216 |  | 
 | 13217 | - Patch 1046644: distutils build_ext grew two new options - --swig for | 
 | 13218 |   specifying the swig executable to use, and --swig-opts to specify | 
 | 13219 |   options to pass to swig. --swig-opts="-c++" is the new way to spell | 
 | 13220 |   --swig-cpp. | 
 | 13221 |  | 
 | 13222 | - Patch 983206: distutils now obeys environment variable LDSHARED, if | 
 | 13223 |   it is set. | 
 | 13224 |  | 
 | 13225 | - Added Peter Astrand's subprocess.py module.  See PEP 324 for details. | 
 | 13226 |  | 
 | 13227 | - time.strptime() now properly escapes timezones and all other locale-specific | 
 | 13228 |   strings for regex-specific symbols.  Was breaking under Japanese Windows when | 
 | 13229 |   the timezone was specified as "Tokyo (standard time)". | 
 | 13230 |   Closes bug #1039270. | 
 | 13231 |  | 
 | 13232 | - Updates for the email package: | 
 | 13233 |  | 
 | 13234 |   + email.Utils.formatdate() grew a 'usegmt' argument for HTTP support. | 
 | 13235 |   + All deprecated APIs that in email 2.x issued warnings have been removed: | 
 | 13236 |     _encoder argument to the MIMEText constructor, Message.add_payload(), | 
 | 13237 |     Utils.dump_address_pair(), Utils.decode(), Utils.encode() | 
 | 13238 |   + New deprecations: Generator.__call__(), Message.get_type(), | 
 | 13239 |     Message.get_main_type(), Message.get_subtype(), the 'strict' argument to | 
 | 13240 |     the Parser constructor.  These will be removed in email 3.1. | 
 | 13241 |   + Support for Python earlier than 2.3 has been removed (see PEP 291). | 
 | 13242 |   + All defect classes have been renamed to end in 'Defect'. | 
 | 13243 |   + Some FeedParser fixes; also a MultipartInvariantViolationDefect will be | 
 | 13244 |     added to messages that claim to be multipart but really aren't. | 
 | 13245 |   + Updates to documentation. | 
 | 13246 |  | 
 | 13247 | - re's findall() and finditer() functions now take an optional flags argument | 
 | 13248 |   just like the compile(), search(), and match() functions.  Also, documented | 
 | 13249 |   the previously existing start and stop parameters for the findall() and | 
 | 13250 |   finditer() methods of regular expression objects. | 
 | 13251 |  | 
 | 13252 | - rfc822 Messages now support iterating over the headers. | 
 | 13253 |  | 
 | 13254 | - The (undocumented) tarfile.Tarfile.membernames has been removed; | 
 | 13255 |   applications should use the getmember function. | 
 | 13256 |  | 
 | 13257 | - httplib now offers symbolic constants for the HTTP status codes. | 
 | 13258 |  | 
 | 13259 | - SF bug #1028306:  Trying to compare a ``datetime.date`` to a | 
 | 13260 |   ``datetime.datetime`` mistakenly compared only the year, month and day. | 
 | 13261 |   Now it acts like a mixed-type comparison:  ``False`` for ``==``, | 
 | 13262 |   ``True`` for ``!=``, and raises ``TypeError`` for other comparison | 
 | 13263 |   operators.  Because datetime is a subclass of date, comparing only the | 
 | 13264 |   base class (date) members can still be done, if that's desired, by | 
 | 13265 |   forcing using of the approprate date method; e.g., | 
 | 13266 |   ``a_date.__eq__(a_datetime)`` is true if and only if the year, month | 
 | 13267 |   and day members of ``a_date`` and ``a_datetime`` are equal. | 
 | 13268 |  | 
 | 13269 | - bdist_rpm now supports command line options --force-arch, | 
 | 13270 |   {pre,post}-install,  {pre,post}-uninstall, and | 
 | 13271 |   {prep,build,install,clean,verify}-script. | 
 | 13272 |  | 
 | 13273 | - SF patch #998993: The UTF-8 and the UTF-16 stateful decoders now support | 
 | 13274 |   decoding incomplete input (when the input stream is temporarily exhausted). | 
 | 13275 |   ``codecs.StreamReader`` now implements buffering, which enables proper | 
 | 13276 |   readline support for the UTF-16 decoders. ``codecs.StreamReader.read()`` | 
 | 13277 |   has a new argument ``chars`` which specifies the number of characters to | 
 | 13278 |   return. ``codecs.StreamReader.readline()`` and | 
 | 13279 |   ``codecs.StreamReader.readlines()`` have a new argument ``keepends``. | 
 | 13280 |   Trailing "\n"s will be stripped from the lines if ``keepends`` is false. | 
 | 13281 |  | 
 | 13282 | - The documentation for doctest is greatly expanded, and now covers all | 
 | 13283 |   the new public features (of which there are many). | 
 | 13284 |  | 
 | 13285 | - ``doctest.master`` was put back in, and ``doctest.testmod()`` once again | 
 | 13286 |   updates it.  This isn't good, because every ``testmod()`` call | 
 | 13287 |   contributes to bloating the "hidden" state of ``doctest.master``, but | 
 | 13288 |   some old code apparently relies on it.  For now, all we can do is | 
 | 13289 |   encourage people to stitch doctests together via doctest's unittest | 
 | 13290 |   integration features instead. | 
 | 13291 |  | 
 | 13292 | - httplib now handles ipv6 address/port pairs. | 
 | 13293 |  | 
 | 13294 | - SF bug #1017864: ConfigParser now correctly handles default keys, | 
 | 13295 |   processing them with ``ConfigParser.optionxform`` when supplied, | 
 | 13296 |   consistent with the handling of config file entries and runtime-set | 
 | 13297 |   options. | 
 | 13298 |  | 
 | 13299 | - SF bug #997050: Document, test, & check for non-string values in | 
 | 13300 |   ConfigParser.  Moved the new string-only restriction added in | 
 | 13301 |   rev. 1.65 to the SafeConfigParser class, leaving existing | 
 | 13302 |   ConfigParser & RawConfigParser behavior alone, and documented the | 
 | 13303 |   conditions under which non-string values work. | 
 | 13304 |  | 
 | 13305 | Build | 
 | 13306 | ----- | 
 | 13307 |  | 
 | 13308 | - Building on darwin now includes /opt/local/include and /opt/local/lib for | 
 | 13309 |   building extension modules.  This is so as to include software installed as | 
 | 13310 |   a DarwinPorts port <http://darwinports.opendarwin.org/> | 
 | 13311 |  | 
 | 13312 | - pyport.h now defines a Py_IS_NAN macro.  It works as-is when the | 
 | 13313 |   platform C computes true for ``x != x`` if and only if X is a NaN. | 
 | 13314 |   Other platforms can override the default definition with a platform- | 
 | 13315 |   specific spelling in that platform's pyconfig.h.  You can also override | 
 | 13316 |   pyport.h's default Py_IS_INFINITY definition now. | 
 | 13317 |  | 
 | 13318 | C API | 
 | 13319 | ----- | 
 | 13320 |  | 
 | 13321 | - SF patch 1044089:  New function ``PyEval_ThreadsInitialized()`` returns | 
 | 13322 |   non-zero if PyEval_InitThreads() has been called. | 
 | 13323 |  | 
 | 13324 | - The undocumented and unused extern int ``_PyThread_Started`` was removed. | 
 | 13325 |  | 
 | 13326 | - The C API calls ``PyInterpreterState_New()`` and ``PyThreadState_New()`` | 
 | 13327 |   are two of the very few advertised as being safe to call without holding | 
 | 13328 |   the GIL.  However, this wasn't true in a debug build, as bug 1041645 | 
 | 13329 |   demonstrated.  In a debug build, Python redirects the ``PyMem`` family | 
 | 13330 |   of calls to Python's small-object allocator, to get the benefit of | 
 | 13331 |   its extra debugging capabilities.  But Python's small-object allocator | 
 | 13332 |   isn't threadsafe, relying on the GIL to avoid the expense of doing its | 
 | 13333 |   own locking.  ``PyInterpreterState_New()`` and ``PyThreadState_New()`` | 
 | 13334 |   call the platform ``malloc()`` directly now, regardless of build type. | 
 | 13335 |  | 
 | 13336 | - PyLong_AsUnsignedLong[Mask] now support int objects as well. | 
 | 13337 |  | 
 | 13338 | - SF patch #998993: ``PyUnicode_DecodeUTF8Stateful`` and | 
 | 13339 |   ``PyUnicode_DecodeUTF16Stateful`` have been added, which implement stateful | 
 | 13340 |   decoding. | 
 | 13341 |  | 
 | 13342 | Tests | 
 | 13343 | ----- | 
 | 13344 |  | 
 | 13345 | - test__locale ported to unittest | 
 | 13346 |  | 
 | 13347 | Mac | 
 | 13348 | --- | 
 | 13349 |  | 
 | 13350 | - ``plistlib`` now supports non-dict root objects.  There is also a new | 
 | 13351 |   interface for reading and writing plist files: ``readPlist(pathOrFile)`` | 
 | 13352 |   and ``writePlist(rootObject, pathOrFile)`` | 
 | 13353 |  | 
 | 13354 | Tools/Demos | 
 | 13355 | ----------- | 
 | 13356 |  | 
 | 13357 | - The text file comparison scripts ``ndiff.py`` and ``diff.py`` now | 
 | 13358 |   read the input files in universal-newline mode.  This spares them | 
 | 13359 |   from consuming a great deal of time to deduce the useless result that, | 
 | 13360 |   e.g., a file with Windows line ends and a file with Linux line ends | 
 | 13361 |   have no lines in common. | 
 | 13362 |  | 
 | 13363 |  | 
 | 13364 | What's New in Python 2.4 alpha 3? | 
 | 13365 | ================================= | 
 | 13366 |  | 
 | 13367 | *Release date: 02-SEP-2004* | 
 | 13368 |  | 
 | 13369 | Core and builtins | 
 | 13370 | ----------------- | 
 | 13371 |  | 
 | 13372 | - SF patch #1007189: ``from ... import ...`` statements now allow the name | 
 | 13373 |   list to be surrounded by parentheses. | 
 | 13374 |  | 
 | 13375 | - Some speedups for long arithmetic, thanks to Trevor Perrin.  Gradeschool | 
 | 13376 |   multiplication was sped a little by optimizing the C code.  Gradeschool | 
 | 13377 |   squaring was sped by about a factor of 2, by exploiting that about half | 
 | 13378 |   the digit products are duplicates in a square.  Because exponentiation | 
 | 13379 |   uses squaring often, this also speeds long power.  For example, the time | 
 | 13380 |   to compute 17**1000000 dropped from about 14 seconds to 9 on my box due | 
 | 13381 |   to this much.  The cutoff for Karatsuba multiplication was raised, | 
 | 13382 |   since gradeschool multiplication got quicker, and the cutoff was | 
 | 13383 |   aggressively small regardless.  The exponentiation algorithm was switched | 
 | 13384 |   from right-to-left to left-to-right, which is more efficient for small | 
 | 13385 |   bases.  In addition, if the exponent is large, the algorithm now does | 
 | 13386 |   5 bits (instead of 1 bit) at a time.  That cut the time to compute | 
 | 13387 |   17**1000000 on my box in half again, down to about 4.5 seconds. | 
 | 13388 |  | 
 | 13389 | - OverflowWarning is no longer generated.  PEP 237 scheduled this to | 
 | 13390 |   occur in Python 2.3, but since OverflowWarning was disabled by default, | 
 | 13391 |   nobody realized it was still being generated.  On the chance that user | 
 | 13392 |   code is still using them, the Python builtin OverflowWarning, and | 
 | 13393 |   corresponding C API PyExc_OverflowWarning, will exist until Python 2.5. | 
 | 13394 |  | 
 | 13395 | - Py_InitializeEx has been added. | 
 | 13396 |  | 
 | 13397 | - Fix the order of application of decorators.  The proper order is bottom-up; | 
 | 13398 |   the first decorator listed is the last one called. | 
 | 13399 |  | 
 | 13400 | - SF patch #1005778.  Fix a seg fault if the list size changed while | 
 | 13401 |   calling list.index().  This could happen if a rich comparison function | 
 | 13402 |   modified the list. | 
 | 13403 |  | 
 | 13404 | - The ``func_name`` (a.k.a. ``__name__``) attribute of user-defined | 
 | 13405 |   functions is now writable. | 
 | 13406 |  | 
 | 13407 | - code_new (a.k.a new.code()) now checks its arguments sufficiently | 
 | 13408 |   carefully that passing them on to PyCode_New() won't trigger calls | 
 | 13409 |   to Py_FatalError() or PyErr_BadInternalCall().  It is still the case | 
 | 13410 |   that the returned code object might be entirely insane. | 
 | 13411 |  | 
 | 13412 | - Subclasses of string can no longer be interned.  The semantics of | 
 | 13413 |   interning were not clear here -- a subclass could be mutable, for | 
 | 13414 |   example -- and had bugs.  Explicitly interning a subclass of string | 
 | 13415 |   via intern() will raise a TypeError.  Internal operations that attempt | 
 | 13416 |   to intern a string subclass will have no effect. | 
 | 13417 |  | 
 | 13418 | - Bug 1003935:  xrange() could report bogus OverflowErrors.  Documented | 
 | 13419 |   what xrange() intends, and repaired tests accordingly. | 
 | 13420 |  | 
 | 13421 | Extension modules | 
 | 13422 | ----------------- | 
 | 13423 |  | 
 | 13424 | - difflib now supports HTML side-by-side diff. | 
 | 13425 |  | 
 | 13426 | - os.urandom has been added for systems that support sources of random | 
 | 13427 |   data. | 
 | 13428 |  | 
| Sean Reifscheider | 54cf12b | 2007-09-17 17:55:36 +0000 | [diff] [blame] | 13429 | - Patch 1012740:  truncate() on a writable cStringIO now resets the | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 13430 |   position to the end of the stream.  This is consistent with the original | 
 | 13431 |   StringIO module and avoids inadvertently resurrecting data that was | 
 | 13432 |   supposed to have been truncated away. | 
 | 13433 |  | 
 | 13434 | - Added socket.socketpair(). | 
 | 13435 |  | 
 | 13436 | - Added CurrentByteIndex, CurrentColumnNumber, CurrentLineNumber | 
 | 13437 |   members to xml.parsers.expat.XMLParser object. | 
 | 13438 |  | 
 | 13439 | - The mpz, rotor, and xreadlines modules, all deprecated in earlier | 
 | 13440 |   versions of Python, have now been removed. | 
 | 13441 |  | 
 | 13442 | Library | 
 | 13443 | ------- | 
 | 13444 |  | 
 | 13445 | - Patch #934356: if a module defines __all__, believe that rather than using | 
 | 13446 |   heuristics for filtering out imported names. | 
 | 13447 |  | 
 | 13448 | - Patch #941486: added os.path.lexists(), which returns True for broken | 
 | 13449 |   symlinks, unlike os.path.exists(). | 
 | 13450 |  | 
 | 13451 | - the random module now uses os.urandom() for seeding if it is available. | 
 | 13452 |   Added a new generator based on os.urandom(). | 
 | 13453 |  | 
 | 13454 | - difflib and diff.py can now generate HTML. | 
 | 13455 |  | 
 | 13456 | - bdist_rpm now includes version and release in the BuildRoot, and | 
 | 13457 |   replaces - by ``_`` in version and release. | 
 | 13458 |  | 
 | 13459 | - distutils build/build_scripts now has an -e option to specify the | 
 | 13460 |   path to the Python interpreter for installed scripts. | 
 | 13461 |  | 
 | 13462 | - PEP 292 classes Template and SafeTemplate are added to the string module. | 
 | 13463 |  | 
 | 13464 | - tarfile now generates GNU tar files by default. | 
 | 13465 |  | 
 | 13466 | - HTTPResponse has now a getheaders method. | 
 | 13467 |  | 
 | 13468 | - Patch #1006219: let inspect.getsource handle '@' decorators. Thanks Simon | 
 | 13469 |   Percivall. | 
 | 13470 |  | 
 | 13471 | - logging.handlers.SMTPHandler.date_time has been removed; | 
 | 13472 |   the class now uses email.Utils.formatdate to generate the time stamp. | 
 | 13473 |  | 
 | 13474 | - A new function tkFont.nametofont was added to return an existing | 
 | 13475 |   font. The Font class constructor now has an additional exists argument | 
 | 13476 |   which, if True, requests to return/configure an existing font, rather | 
 | 13477 |   than creating a new one. | 
 | 13478 |  | 
 | 13479 | - Updated the decimal package's min() and max() methods to match the | 
 | 13480 |   latest revision of the General Decimal Arithmetic Specification. | 
 | 13481 |   Quiet NaNs are ignored and equal values are sorted based on sign | 
 | 13482 |   and exponent. | 
 | 13483 |  | 
 | 13484 | - The decimal package's Context.copy() method now returns deep copies. | 
 | 13485 |  | 
 | 13486 | - Deprecated sys.exitfunc in favor of the atexit module.  The sys.exitfunc | 
 | 13487 |   attribute will be kept around for backwards compatibility and atexit | 
 | 13488 |   will just become the one preferred way to do it. | 
 | 13489 |  | 
 | 13490 | - patch #675551: Add get_history_item and replace_history_item functions | 
 | 13491 |   to the readline module. | 
 | 13492 |  | 
 | 13493 | - bug #989672: pdb.doc and the help messages for the help_d and help_u methods | 
 | 13494 |   of the pdb.Pdb class gives have been corrected. d(own) goes to a newer | 
 | 13495 |   frame, u(p) to an older frame, not the other way around. | 
 | 13496 |  | 
 | 13497 | - bug #990669: os.path.realpath() will resolve symlinks before normalizing the | 
 | 13498 |   path, as normalizing the path may alter the meaning of the path if it | 
 | 13499 |   contains symlinks. | 
 | 13500 |  | 
 | 13501 | - bug #851123: shutil.copyfile will raise an exception when trying to copy a | 
 | 13502 |   file onto a link to itself. Thanks Gregory Ball. | 
 | 13503 |  | 
 | 13504 | - bug #570300: Fix inspect to resolve file locations using os.path.realpath() | 
 | 13505 |   so as to properly list all functions in a module when the module itself is | 
 | 13506 |   reached through a symlink.  Thanks Johannes Gijsbers. | 
 | 13507 |  | 
 | 13508 | - doctest refactoring continued.  See the docs for details.  As part of | 
 | 13509 |   this effort, some old and little- (never?) used features are now | 
 | 13510 |   deprecated:  the Tester class, the module is_private() function, and the | 
 | 13511 |   isprivate argument to testmod().  The Tester class supplied a feeble | 
 | 13512 |   "by hand" way to combine multiple doctests, if you knew exactly what | 
 | 13513 |   you were doing.  The newer doctest features for unittest integration | 
 | 13514 |   already did a better job of that, are stronger now than ever, and the | 
 | 13515 |   new DocTestRunner class is a saner foundation if you want to do it by | 
 | 13516 |   hand.  The "private name" filtering gimmick was a mistake from the | 
 | 13517 |   start, and testmod() changed long ago to ignore it by default.  If | 
 | 13518 |   you want to filter out tests, the new DocTestFinder class can be used | 
 | 13519 |   to return a list of all doctests, and you can filter that list by | 
 | 13520 |   any computable criteria before passing it to a DocTestRunner instance. | 
 | 13521 |  | 
 | 13522 | - Bug #891637, patch #1005466: fix inspect.getargs() crash on def foo((bar)). | 
 | 13523 |  | 
 | 13524 | Tools/Demos | 
 | 13525 | ----------- | 
 | 13526 |  | 
 | 13527 | - IDLE's shortcut keys for windows are now case insensitive so that | 
 | 13528 |   Control-V works the same as Control-v. | 
 | 13529 |  | 
 | 13530 | - pygettext.py: Generate POT-Creation-Date header in ISO format. | 
 | 13531 |  | 
 | 13532 | Build | 
 | 13533 | ----- | 
 | 13534 |  | 
 | 13535 | - Backward incompatibility:  longintrepr.h now triggers a compile-time | 
 | 13536 |   error if SHIFT (the number of bits in a Python long "digit") isn't | 
 | 13537 |   divisible by 5.  This new requirement allows simple code for the new | 
 | 13538 |   5-bits-at-a-time long_pow() implementation.  If necessary, the | 
 | 13539 |   restriction could be removed (by complicating long_pow(), or by | 
 | 13540 |   falling back to the 1-bit-at-a-time algorithm), but there are no | 
 | 13541 |   plans to do so. | 
 | 13542 |  | 
 | 13543 | - bug #991962: When building with --disable-toolbox-glue on Darwin no | 
 | 13544 |   attempt to build Mac-specific modules occurs. | 
 | 13545 |  | 
 | 13546 | - The --with-tsc flag to configure to enable VM profiling with the | 
 | 13547 |   processor's timestamp counter now works on PPC platforms. | 
 | 13548 |  | 
 | 13549 | - patch #1006629: Define _XOPEN_SOURCE to 500 on Solaris 8/9 to match | 
 | 13550 |   GCC's definition and avoid redefinition warnings. | 
 | 13551 |  | 
 | 13552 | - Detect pthreads support (provided by gnu pth pthread emulation) on | 
 | 13553 |   GNU/k*BSD systems. | 
 | 13554 |  | 
 | 13555 | - bug #1005737, #1007249: Fixed several build problems and warnings | 
 | 13556 |   found on old/legacy C compilers of HP-UX, IRIX and Tru64. | 
 | 13557 |  | 
 | 13558 | C API | 
 | 13559 | ----- | 
 | 13560 |  | 
 | 13561 | .. | 
 | 13562 |  | 
 | 13563 | Documentation | 
 | 13564 | ------------- | 
 | 13565 |  | 
 | 13566 | - patch #1005936, bug #1009373: fix index entries which contain | 
 | 13567 |   an underscore when viewed with Acrobat. | 
 | 13568 |  | 
 | 13569 | - bug #990669: os.path.normpath may alter the meaning of a path if | 
 | 13570 |   it contains symbolic links. This has been documented in a comment | 
 | 13571 |   since 1992, but is now in the library reference as well. | 
 | 13572 |  | 
 | 13573 | New platforms | 
 | 13574 | ------------- | 
 | 13575 |  | 
 | 13576 | - FreeBSD 6 is now supported. | 
 | 13577 |  | 
 | 13578 | Tests | 
 | 13579 | ----- | 
 | 13580 |  | 
 | 13581 | .. | 
 | 13582 |  | 
 | 13583 | Windows | 
 | 13584 | ------- | 
 | 13585 |  | 
 | 13586 | - Boosted the stack reservation for python.exe and pythonw.exe from | 
 | 13587 |   the default 1MB to 2MB.  Stack frames under VC 7.1 for 2.4 are enough | 
 | 13588 |   bigger than under VC 6.0 for 2.3.4 that deeply recursive progams | 
 | 13589 |   within the default sys.getrecursionlimit() default value of 1000 were | 
 | 13590 |   able to suffer undetected C stack overflows.  The standard test program | 
 | 13591 |   test_compiler was one such program.  If a Python process on Windows | 
 | 13592 |   "just vanishes" without a trace, and without an error message of any | 
 | 13593 |   kind, but with an exit code of 128, undetected stack overflow may be | 
 | 13594 |   the problem. | 
 | 13595 |  | 
 | 13596 | Mac | 
 | 13597 | --- | 
 | 13598 |  | 
 | 13599 | .. | 
 | 13600 |  | 
 | 13601 |  | 
 | 13602 | What's New in Python 2.4 alpha 2? | 
 | 13603 | ================================= | 
 | 13604 |  | 
 | 13605 | *Release date: 05-AUG-2004* | 
 | 13606 |  | 
 | 13607 | Core and builtins | 
 | 13608 | ----------------- | 
 | 13609 |  | 
 | 13610 | - Patch #980695:  Implements efficient string concatenation for statements | 
 | 13611 |   of the form s=s+t and s+=t.  This will vary across implementations. | 
 | 13612 |   Accordingly, the str.join() method is strongly preferred for performance | 
 | 13613 |   sensitive code. | 
 | 13614 |  | 
 | 13615 | - PEP-0318, Function Decorators have been added to the language. These are | 
 | 13616 |   implemented using the Java-style @decorator syntax, like so:: | 
 | 13617 |  | 
 | 13618 |      @staticmethod | 
 | 13619 |      def foo(bar): | 
 | 13620 |  | 
 | 13621 |   (The PEP needs to be updated to reflect the current state) | 
 | 13622 |  | 
 | 13623 | - When importing a module M raises an exception, Python no longer leaves M | 
 | 13624 |   in sys.modules.  Before 2.4a2 it did, and a subsequent import of M would | 
 | 13625 |   succeed, picking up a module object from sys.modules reflecting as much | 
 | 13626 |   of the initialization of M as completed before the exception was raised. | 
 | 13627 |   Subsequent imports got no indication that M was in a partially- | 
 | 13628 |   initialized state, and the importers could get into arbitrarily bad | 
 | 13629 |   trouble as a result (the M they got was in an unintended state, | 
 | 13630 |   arbitrarily far removed from M's author's intent).  Now subsequent | 
 | 13631 |   imports of M will continue raising exceptions (but if, for example, the | 
 | 13632 |   source code for M is edited between import attempts, then perhaps later | 
 | 13633 |   attempts will succeed, or raise a different exception). | 
 | 13634 |  | 
 | 13635 |   This can break existing code, but in such cases the code was probably | 
 | 13636 |   working before by accident.  In the Python source, the only case of | 
 | 13637 |   breakage discovered was in a test accidentally relying on a damaged | 
 | 13638 |   module remaining in sys.modules.  Cases are also known where tests | 
 | 13639 |   deliberately provoking import errors remove damaged modules from | 
 | 13640 |   sys.modules themselves, and such tests will break now if they do an | 
 | 13641 |   unconditional del sys.modules[M]. | 
 | 13642 |  | 
 | 13643 | - u'%s' % obj will now try obj.__unicode__() first and fallback to | 
 | 13644 |   obj.__str__() if no __unicode__ method can be found. | 
 | 13645 |  | 
 | 13646 | - Patch #550732: Add PyArg_VaParseTupleAndKeywords().  Analogous to | 
 | 13647 |   PyArg_VaParse().  Both are now documented.  Thanks Greg Chapman. | 
 | 13648 |  | 
 | 13649 | - Allow string and unicode return types from .encode()/.decode() | 
 | 13650 |   methods on string and unicode objects.  Added unicode.decode() | 
 | 13651 |   which was missing for no apparent reason. | 
 | 13652 |  | 
 | 13653 | - An attempt to fix the mess that is Python's behaviour with | 
 | 13654 |   signal handlers and threads, complicated by readline's behaviour. | 
 | 13655 |   It's quite possible that there are still bugs here. | 
 | 13656 |  | 
 | 13657 | - Added C macros Py_CLEAR and Py_VISIT to ease the implementation of | 
 | 13658 |   types that support garbage collection. | 
 | 13659 |  | 
 | 13660 | - Compiler now treats None as a constant. | 
 | 13661 |  | 
 | 13662 | - The type of values returned by __int__, __float__, __long__, | 
 | 13663 |   __oct__, and __hex__ are now checked.  Returning an invalid type | 
 | 13664 |   will cause a TypeError to be raised.  This matches the behavior of | 
 | 13665 |   Jython. | 
 | 13666 |  | 
 | 13667 | - Implemented bind_textdomain_codeset() in locale module. | 
 | 13668 |  | 
 | 13669 | - Added a workaround for proper string operations in BSDs.  str.split | 
 | 13670 |   and str.is* methods can now work correctly with UTF-8 locales. | 
 | 13671 |  | 
 | 13672 | - Bug #989185: unicode.iswide() and unicode.width() is dropped and | 
 | 13673 |   the East Asian Width support is moved to unicodedata extension | 
 | 13674 |   module. | 
 | 13675 |  | 
 | 13676 | - Patch #941229: The source code encoding in interactive mode | 
 | 13677 |   now refers sys.stdin.encoding not just ISO-8859-1 anymore.  This | 
 | 13678 |   allows for non-latin-1 users to write unicode strings directly. | 
 | 13679 |  | 
 | 13680 | Extension modules | 
 | 13681 | ----------------- | 
 | 13682 |  | 
 | 13683 | - cpickle now supports the same keyword arguments as pickle. | 
 | 13684 |  | 
 | 13685 | Library | 
 | 13686 | ------- | 
 | 13687 |  | 
 | 13688 | - Added new codecs and aliases for ISO_8859-11, ISO_8859-16 and | 
 | 13689 |   TIS-620 | 
 | 13690 |  | 
 | 13691 | - Thanks to Edward Loper, doctest has been massively refactored, and | 
 | 13692 |   many new features were added.  Full docs will appear later.  For now | 
 | 13693 |   the doctest module comments and new test cases give good coverage. | 
 | 13694 |   The refactoring provides many hook points for customizing behavior | 
 | 13695 |   (such as how to report errors, and how to compare expected to actual | 
 | 13696 |   output).  New features include a <BLANKLINE> marker for expected | 
 | 13697 |   output containing blank lines, options to produce unified or context | 
 | 13698 |   diffs when actual output doesn't match expectations, an option to | 
 | 13699 |   normalize whitespace before comparing, and an option to use an | 
 | 13700 |   ellipsis to signify "don't care" regions of output. | 
 | 13701 |  | 
 | 13702 | - Tkinter now supports the wish -sync and -use options. | 
 | 13703 |  | 
 | 13704 | - The following methods in time support passing of None: ctime(), gmtime(), | 
 | 13705 |   and localtime().  If None is provided, the current time is used (the | 
 | 13706 |   same as when the argument is omitted). | 
 | 13707 |   [SF bug 658254, patch 663482] | 
 | 13708 |  | 
 | 13709 | - nntplib does now allow to ignore a .netrc file. | 
 | 13710 |  | 
 | 13711 | - urllib2 now recognizes Basic authentication even if other authentication | 
 | 13712 |   schemes are offered. | 
 | 13713 |  | 
 | 13714 | - Bug #1001053.  wave.open() now accepts unicode filenames. | 
 | 13715 |  | 
 | 13716 | - gzip.GzipFile has a new fileno() method, to retrieve the handle of the | 
 | 13717 |   underlying file object (provided it has a fileno() method).  This is | 
 | 13718 |   needed if you want to use os.fsync() on a GzipFile. | 
 | 13719 |  | 
 | 13720 | - imaplib has two new methods: deleteacl and myrights. | 
 | 13721 |  | 
 | 13722 | - nntplib has two new methods: description and descriptions. They | 
 | 13723 |   use a more RFC-compliant way of getting a newsgroup description. | 
 | 13724 |  | 
 | 13725 | - Bug #993394.  Fix a possible red herring of KeyError in 'threading' being | 
 | 13726 |   raised during interpreter shutdown from a registered function with atexit | 
 | 13727 |   when dummy_threading is being used. | 
 | 13728 |  | 
 | 13729 | - Bug #857297/Patch #916874.  Fix an error when extracting a hard link | 
 | 13730 |   from a tarfile. | 
 | 13731 |  | 
 | 13732 | - Patch #846659.  Fix an error in tarfile.py when using | 
 | 13733 |   GNU longname/longlink creation. | 
 | 13734 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 13735 | - The obsolete FCNTL.py has been deleted.  The built-in fcntl module | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 13736 |   has been available (on platforms that support fcntl) since Python | 
 | 13737 |   1.5a3, and all FCNTL.py did is export fcntl's names, after generating | 
 | 13738 |   a deprecation warning telling you to use fcntl directly. | 
 | 13739 |  | 
 | 13740 | - Several new unicode codecs are added: big5hkscs, euc_jis_2004, | 
 | 13741 |   iso2022_jp_2004, shift_jis_2004. | 
 | 13742 |  | 
 | 13743 | - Bug #788520.  Queue.{get, get_nowait, put, put_nowait} have new | 
 | 13744 |   implementations, exploiting Conditions (which didn't exist at the time | 
 | 13745 |   Queue was introduced).  A minor semantic change is that the Full and | 
 | 13746 |   Empty exceptions raised by non-blocking calls now occur only if the | 
 | 13747 |   queue truly was full or empty at the instant the queue was checked (of | 
 | 13748 |   course the Queue may no longer be full or empty by the time a calling | 
 | 13749 |   thread sees those exceptions, though).  Before, the exceptions could | 
 | 13750 |   also be raised if it was "merely inconvenient" for the implementation | 
 | 13751 |   to determine the true state of the Queue (because the Queue was locked | 
 | 13752 |   by some other method in progress). | 
 | 13753 |  | 
 | 13754 | - Bugs #979794 and #980117: difflib.get_grouped_opcodes() now handles the | 
 | 13755 |   case of comparing two empty lists.  This affected both context_diff() and | 
 | 13756 |   unified_diff(), | 
 | 13757 |  | 
 | 13758 | - Bug #980938: smtplib now prints debug output to sys.stderr. | 
 | 13759 |  | 
 | 13760 | - Bug #930024: posixpath.realpath() now handles infinite loops in symlinks by | 
 | 13761 |   returning the last point in the path that was not part of any loop.  Thanks | 
 | 13762 |   AM Kuchling. | 
 | 13763 |  | 
 | 13764 | - Bug #980327: ntpath not handles compressing erroneous slashes between the | 
 | 13765 |   drive letter and the rest of the path.  Also clearly handles UNC addresses now | 
 | 13766 |   as well.  Thanks Paul Moore. | 
 | 13767 |  | 
 | 13768 | - bug #679953: zipfile.py should now work for files over 2 GB.  The packed data | 
 | 13769 |   for file sizes (compressed and uncompressed) was being stored as signed | 
 | 13770 |   instead of unsigned. | 
 | 13771 |  | 
 | 13772 | - decimal.py now only uses signals in the IBM spec.  The other conditions are | 
 | 13773 |   no longer part of the public API. | 
 | 13774 |  | 
 | 13775 | - codecs module now has two new generic APIs: encode() and decode() | 
 | 13776 |   which don't restrict the return types (unlike the unicode and | 
 | 13777 |   string methods of the same name). | 
 | 13778 |  | 
 | 13779 | - Non-blocking SSL sockets work again; they were broken in Python 2.3. | 
 | 13780 |   SF patch 945642. | 
 | 13781 |  | 
 | 13782 | - doctest unittest integration improvements: | 
 | 13783 |  | 
 | 13784 |   o Improved the unitest test output for doctest-based unit tests | 
 | 13785 |  | 
 | 13786 |   o Can now pass setUp and tearDown functions when creating | 
 | 13787 |     DocTestSuites. | 
 | 13788 |  | 
 | 13789 | - The threading module has a new class, local, for creating objects | 
 | 13790 |   that provide thread-local data. | 
 | 13791 |  | 
 | 13792 | - Bug #990307: when keep_empty_values is True, cgi.parse_qsl() | 
 | 13793 |   no longer returns spurious empty fields. | 
 | 13794 |  | 
 | 13795 | - Implemented bind_textdomain_codeset() in gettext module. | 
 | 13796 |  | 
 | 13797 | - Introduced in gettext module the l*gettext() family of functions, | 
 | 13798 |   which return translation strings encoded in the preferred encoding, | 
 | 13799 |   as informed by locale module's getpreferredencoding(). | 
 | 13800 |  | 
 | 13801 | - optparse module (and tests) upgraded to Optik 1.5a1.  Changes: | 
 | 13802 |  | 
 | 13803 |   - Add expansion of default values in help text: the string | 
 | 13804 |     "%default" in an option's help string is expanded to str() of | 
 | 13805 |     that option's default value, or "none" if no default value. | 
 | 13806 |  | 
 | 13807 |   - Bug #955889: option default values that happen to be strings are | 
 | 13808 |     now processed in the same way as values from the command line; this | 
 | 13809 |     allows generation of nicer help when using custom types.  Can | 
 | 13810 |     be disabled with parser.set_process_default_values(False). | 
 | 13811 |  | 
 | 13812 |   - Bug #960515: don't crash when generating help for callback | 
 | 13813 |     options that specify 'type', but not 'dest' or 'metavar'. | 
 | 13814 |  | 
 | 13815 |   - Feature #815264: change the default help format for short options | 
 | 13816 |     that take an argument from e.g. "-oARG" to "-o ARG"; add | 
 | 13817 |     set_short_opt_delimiter() and set_long_opt_delimiter() methods to | 
 | 13818 |     HelpFormatter to allow (slight) customization of the formatting. | 
 | 13819 |  | 
 | 13820 |   - Patch #736940: internationalize Optik: all built-in user- | 
 | 13821 |     targeted literal strings are passed through gettext.gettext().  (If | 
 | 13822 |     you want translations (.po files), they're not included with Python | 
 | 13823 |     -- you'll find them in the Optik source distribution from | 
 | 13824 |     http://optik.sourceforge.net/ .) | 
 | 13825 |  | 
 | 13826 |   - Bug #878453: respect $COLUMNS environment variable for | 
 | 13827 |     wrapping help output. | 
 | 13828 |  | 
 | 13829 |   - Feature #988122: expand "%prog" in the 'description' passed | 
 | 13830 |     to OptionParser, just like in the 'usage' and 'version' strings. | 
 | 13831 |     (This is *not* done in the 'description' passed to OptionGroup.) | 
 | 13832 |  | 
 | 13833 | C API | 
 | 13834 | ----- | 
 | 13835 |  | 
 | 13836 | - PyImport_ExecCodeModule() and PyImport_ExecCodeModuleEx():  if an | 
 | 13837 |   error occurs while loading the module, these now delete the module's | 
 | 13838 |   entry from sys.modules.  All ways of loading modules eventually call | 
 | 13839 |   one of these, so this is an error-case change in semantics for all | 
 | 13840 |   ways of loading modules.  In rare cases, a module loader may wish | 
 | 13841 |   to keep a module object in sys.modules despite that the module's | 
 | 13842 |   code cannot be executed.  In such cases, the module loader must | 
 | 13843 |   arrange to reinsert the name and module object in sys.modules. | 
 | 13844 |   PyImport_ReloadModule() has been changed to reinsert the original | 
 | 13845 |   module object into sys.modules if the module reload fails, so that | 
 | 13846 |   its visible semantics have not changed. | 
 | 13847 |  | 
 | 13848 | - A large pile of datetime field-extraction macros is now documented, | 
 | 13849 |   thanks to Anthony Tuininga (patch #986010). | 
 | 13850 |  | 
 | 13851 | Documentation | 
 | 13852 | ------------- | 
 | 13853 |  | 
 | 13854 | - Improved the tutorial on creating types in C. | 
 | 13855 |  | 
 | 13856 |   - point out the importance of reassigning data members before | 
 | 13857 |     assigning their values | 
 | 13858 |  | 
 | 13859 |   - correct my misconception about return values from visitprocs. Sigh. | 
 | 13860 |  | 
 | 13861 |   - mention the labor saving Py_VISIT and Py_CLEAR macros. | 
 | 13862 |  | 
 | 13863 | - Major rewrite of the math module docs, to address common confusions. | 
 | 13864 |  | 
 | 13865 | Tests | 
 | 13866 | ----- | 
 | 13867 |  | 
 | 13868 | - The test data files for the decimal test suite are now installed on | 
 | 13869 |   platforms that use the Makefile. | 
 | 13870 |  | 
 | 13871 | - SF patch 995225:  The test file testtar.tar accidentally contained | 
 | 13872 |   CVS keywords (like $Id$), which could cause spurious failures in | 
 | 13873 |   test_tarfile.py depending on how the test file was checked out. | 
 | 13874 |  | 
 | 13875 |  | 
 | 13876 | What's New in Python 2.4 alpha 1? | 
 | 13877 | ================================= | 
 | 13878 |  | 
 | 13879 | *Release date: 08-JUL-2004* | 
 | 13880 |  | 
 | 13881 | Core and builtins | 
 | 13882 | ----------------- | 
 | 13883 |  | 
 | 13884 | - weakref.ref is now the type object also known as | 
 | 13885 |   weakref.ReferenceType; it can be subclassed like any other new-style | 
 | 13886 |   class.  There's less per-entry overhead in WeakValueDictionary | 
 | 13887 |   objects now (one object instead of three). | 
 | 13888 |  | 
 | 13889 | - Bug #951851: Python crashed when reading import table of certain | 
 | 13890 |   Windows DLLs. | 
 | 13891 |  | 
 | 13892 | - Bug #215126.  The locals argument to eval(), execfile(), and exec now | 
 | 13893 |   accept any mapping type. | 
 | 13894 |  | 
 | 13895 | - marshal now shares interned strings. This change introduces | 
 | 13896 |   a new .pyc magic. | 
 | 13897 |  | 
 | 13898 | - Bug #966623. classes created with type() in an exec(, {}) don't | 
 | 13899 |   have a __module__, but code in typeobject assumed it would always | 
 | 13900 |   be there. | 
 | 13901 |  | 
 | 13902 | - Python no longer relies on the LC_NUMERIC locale setting to be | 
 | 13903 |   the "C" locale; as a result, it no longer tries to prevent changing | 
 | 13904 |   the LC_NUMERIC category. | 
 | 13905 |  | 
 | 13906 | - Bug #952807:  Unpickling pickled instances of subclasses of | 
 | 13907 |   datetime.date, datetime.datetime and datetime.time could yield insane | 
 | 13908 |   objects.  Thanks to Jiwon Seo for a fix. | 
 | 13909 |  | 
 | 13910 | - Bug #845802: Python crashes when __init__.py is a directory. | 
 | 13911 |  | 
 | 13912 | - Unicode objects received two new methods: iswide() and width(). | 
 | 13913 |   These query East Asian width information, as specified in Unicode | 
 | 13914 |   TR11. | 
 | 13915 |  | 
 | 13916 | - Improved the tuple hashing algorithm to give fewer collisions in | 
 | 13917 |   common cases.  Fixes bug  #942952. | 
 | 13918 |  | 
 | 13919 | - Implemented generator expressions (PEP 289).  Coded by Jiwon Seo. | 
 | 13920 |  | 
 | 13921 | - Enabled the profiling of C extension functions (and builtins) - check | 
 | 13922 |   new documentation and modified profile and bdb modules for more details | 
 | 13923 |  | 
 | 13924 | - Set file.name to the object passed to open (instead of a new string) | 
 | 13925 |  | 
 | 13926 | - Moved tracebackobject into traceback.h and renamed to PyTracebackObject | 
 | 13927 |  | 
 | 13928 | - Optimized the byte coding for multiple assignments like "a,b=b,a" and | 
 | 13929 |   "a,b,c=1,2,3".  Improves their speed by 25% to 30%. | 
 | 13930 |  | 
 | 13931 | - Limit the nested depth of a tuple for the second argument to isinstance() | 
 | 13932 |   and issubclass() to the recursion limit of the interpreter. | 
 | 13933 |   Fixes bug  #858016 . | 
 | 13934 |  | 
 | 13935 | - Optimized dict iterators, creating separate types for each | 
 | 13936 |   and having them reveal their length.  Also optimized the | 
 | 13937 |   methods:  keys(), values(), and items(). | 
 | 13938 |  | 
 | 13939 | - Implemented a newcode opcode, LIST_APPEND, that simplifies | 
 | 13940 |   the generated bytecode for list comprehensions and further | 
 | 13941 |   improves their performance (about 35%). | 
 | 13942 |  | 
 | 13943 | - Implemented rich comparisons for floats, which seems to make | 
 | 13944 |   comparisons involving NaNs somewhat less surprising when the | 
 | 13945 |   underlying C compiler actually implements C99 semantics. | 
 | 13946 |  | 
 | 13947 | - Optimized list.extend() to save memory and no longer create | 
 | 13948 |   intermediate sequences.  Also, extend() now pre-allocates the | 
 | 13949 |   needed memory whenever the length of the iterable is known in | 
 | 13950 |   advance -- this halves the time to extend the list. | 
 | 13951 |  | 
 | 13952 | - Optimized list resize operations to make fewer calls to the system | 
 | 13953 |   realloc().  Significantly speeds up list appends, list pops, | 
 | 13954 |   list comprehensions, and the list constructor (when the input iterable | 
 | 13955 |   length is not known). | 
 | 13956 |  | 
 | 13957 | - Changed the internal list over-allocation scheme.  For larger lists, | 
 | 13958 |   overallocation ranged between 3% and 25%.  Now, it is a constant 12%. | 
 | 13959 |   For smaller lists (n<8), overallocation was upto eight elements.  Now, | 
 | 13960 |   the overallocation is no more than three elements -- this improves space | 
 | 13961 |   utilization for applications that have large numbers of small lists. | 
 | 13962 |  | 
 | 13963 | - Most list bodies now get re-used rather than freed.  Speeds up list | 
 | 13964 |   instantiation and deletion by saving calls to malloc() and free(). | 
 | 13965 |  | 
 | 13966 | - The dict.update() method now accepts all the same argument forms | 
 | 13967 |   as the dict() constructor.  This now includes item lists and/or | 
 | 13968 |   keyword arguments. | 
 | 13969 |  | 
 | 13970 | - Support for arbitrary objects supporting the read-only buffer | 
 | 13971 |   interface as the co_code field of code objects (something that was | 
 | 13972 |   only possible to create from C code) has been removed. | 
 | 13973 |  | 
 | 13974 | - Made omitted callback and None equivalent for weakref.ref() and | 
 | 13975 |   weakref.proxy(); the None case wasn't handled correctly in all | 
 | 13976 |   cases. | 
 | 13977 |  | 
 | 13978 | - Fixed problem where PyWeakref_NewRef() and PyWeakref_NewProxy() | 
 | 13979 |   assumed that initial existing entries in an object's weakref list | 
 | 13980 |   would not be removed while allocating a new weakref object.  Since | 
 | 13981 |   GC could be invoked at that time, however, that assumption was | 
 | 13982 |   invalid.  In a truly obscure case of GC being triggered during | 
 | 13983 |   creation for a new weakref object for an referent which already | 
 | 13984 |   has a weakref without a callback which is only referenced from | 
 | 13985 |   cyclic trash, a memory error can occur.  This consistently created a | 
 | 13986 |   segfault in a debug build, but provided less predictable behavior in | 
 | 13987 |   a release build. | 
 | 13988 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 13989 | - input() built-in function now respects compiler flags such as | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 13990 |   __future__ statements.  SF patch 876178. | 
 | 13991 |  | 
 | 13992 | - Removed PendingDeprecationWarning from apply().  apply() remains | 
 | 13993 |   deprecated, but the nuisance warning will not be issued. | 
 | 13994 |  | 
 | 13995 | - At Python shutdown time (Py_Finalize()), 2.3 called cyclic garbage | 
 | 13996 |   collection twice, both before and after tearing down modules.  The | 
 | 13997 |   call after tearing down modules has been disabled, because too much | 
 | 13998 |   of Python has been torn down then for __del__ methods and weakref | 
 | 13999 |   callbacks to execute sanely.  The most common symptom was a sequence | 
 | 14000 |   of uninformative messages on stderr when Python shut down, produced | 
 | 14001 |   by threads trying to raise exceptions, but unable to report the nature | 
 | 14002 |   of their problems because too much of the sys module had already been | 
 | 14003 |   destroyed. | 
 | 14004 |  | 
 | 14005 | - Removed FutureWarnings related to hex/oct literals and conversions | 
 | 14006 |   and left shifts.  (Thanks to Kalle Svensson for SF patch 849227.) | 
 | 14007 |   This addresses most of the remaining semantic changes promised by | 
 | 14008 |   PEP 237, except for repr() of a long, which still shows the trailing | 
 | 14009 |   'L'.  The PEP appears to promise warnings for operations that | 
 | 14010 |   changed semantics compared to Python 2.3, but this is not | 
 | 14011 |   implemented; we've suffered through enough warnings related to | 
 | 14012 |   hex/oct literals and I think it's best to be silent now. | 
 | 14013 |  | 
 | 14014 | - For str and unicode objects, the ljust(), center(), and rjust() | 
 | 14015 |   methods now accept an optional argument specifying a fill | 
 | 14016 |   character other than a space. | 
 | 14017 |  | 
 | 14018 | - When method objects have an attribute that can be satisfied either | 
 | 14019 |   by the function object or by the method object, the function | 
 | 14020 |   object's attribute usually wins.  Christian Tismer pointed out that | 
 | 14021 |   that this is really a mistake, because this only happens for special | 
 | 14022 |   methods (like __reduce__) where the method object's version is | 
 | 14023 |   really more appropriate than the function's attribute.  So from now | 
 | 14024 |   on, all method attributes will have precedence over function | 
 | 14025 |   attributes with the same name. | 
 | 14026 |  | 
 | 14027 | - Critical bugfix, for SF bug 839548:  if a weakref with a callback, | 
 | 14028 |   its callback, and its weakly referenced object, all became part of | 
 | 14029 |   cyclic garbage during a single run of garbage collection, the order | 
 | 14030 |   in which they were torn down was unpredictable.  It was possible for | 
 | 14031 |   the callback to see partially-torn-down objects, leading to immediate | 
 | 14032 |   segfaults, or, if the callback resurrected garbage objects, to | 
 | 14033 |   resurrect insane objects that caused segfaults (or other surprises) | 
 | 14034 |   later.  In one sense this wasn't surprising, because Python's cyclic gc | 
 | 14035 |   had no knowledge of Python's weakref objects.  It does now.  When | 
 | 14036 |   weakrefs with callbacks become part of cyclic garbage now, those | 
 | 14037 |   weakrefs are cleared first.  The callbacks don't trigger then, | 
 | 14038 |   preventing the problems.  If you need callbacks to trigger, then just | 
 | 14039 |   as when cyclic gc is not involved, you need to write your code so | 
 | 14040 |   that weakref objects outlive the objects they weakly reference. | 
 | 14041 |  | 
 | 14042 | - Critical bugfix, for SF bug 840829:  if cyclic garbage collection | 
 | 14043 |   happened to occur during a weakref callback for a new-style class | 
 | 14044 |   instance, subtle memory corruption was the result (in a release build; | 
 | 14045 |   in a debug build, a segfault occurred reliably very soon after). | 
 | 14046 |   This has been repaired. | 
 | 14047 |  | 
 | 14048 | - Compiler flags set in PYTHONSTARTUP are now active in __main__. | 
 | 14049 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 14050 | - Added two built-in types, set() and frozenset(). | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 14051 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 14052 | - Added a reversed() built-in function that returns a reverse iterator | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 14053 |   over a sequence. | 
 | 14054 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 14055 | - Added a sorted() built-in function that returns a new sorted list | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 14056 |   from any iterable. | 
 | 14057 |  | 
 | 14058 | - CObjects are now mutable (on the C level) through PyCObject_SetVoidPtr. | 
 | 14059 |  | 
 | 14060 | - list.sort() now supports three keyword arguments:  cmp, key, and reverse. | 
 | 14061 |   The key argument can be a function of one argument that extracts a | 
 | 14062 |   comparison key from the original record:  mylist.sort(key=str.lower). | 
 | 14063 |   The reverse argument is a boolean value and if True will change the | 
 | 14064 |   sort order as if the comparison arguments were reversed.  In addition, | 
 | 14065 |   the documentation has been amended to provide a guarantee that all sorts | 
 | 14066 |   starting with Py2.3 are guaranteed to be stable (the relative order of | 
 | 14067 |   records with equal keys is unchanged). | 
 | 14068 |  | 
 | 14069 | - Added test whether wchar_t is signed or not. A signed wchar_t is not | 
 | 14070 |   usable as internal unicode type base for Py_UNICODE since the | 
 | 14071 |   unicode implementation assumes an unsigned type. | 
 | 14072 |  | 
 | 14073 | - Fixed a bug in the cache of length-one Unicode strings that could | 
 | 14074 |   lead to a seg fault.  The specific problem occurred when an earlier, | 
 | 14075 |   non-fatal error left an uninitialized Unicode object in the | 
 | 14076 |   freelist. | 
 | 14077 |  | 
 | 14078 | - The % formatting operator now supports '%F' which is equivalent to | 
 | 14079 |   '%f'.  This has always been documented but never implemented. | 
 | 14080 |  | 
 | 14081 | - complex(obj) could leak a little memory if obj wasn't a string or | 
 | 14082 |   number. | 
 | 14083 |  | 
 | 14084 | - zip() with no arguments now returns an empty list instead of raising | 
 | 14085 |   a TypeError exception. | 
 | 14086 |  | 
 | 14087 | - obj.__contains__() now returns True/False instead of 1/0.  SF patch | 
 | 14088 |   820195. | 
 | 14089 |  | 
 | 14090 | - Python no longer tries to be smart about recursive comparisons. | 
 | 14091 |   When comparing containers with cyclic references to themselves it | 
 | 14092 |   will now just hit the recursion limit.  See SF patch 825639. | 
 | 14093 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 14094 | - str and unicode built-in types now have an rsplit() method that is | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 14095 |   same as split() except that it scans the string from the end | 
 | 14096 |   working towards the beginning.  See SF feature request 801847. | 
 | 14097 |  | 
 | 14098 | - Fixed a bug in object.__reduce_ex__ when using protocol 2.  Failure | 
 | 14099 |   to clear the error when attempts to get the __getstate__ attribute | 
 | 14100 |   fail caused intermittent errors and odd behavior. | 
 | 14101 |  | 
 | 14102 | - buffer objects based on other objects no longer cache a pointer to | 
 | 14103 |   the data and the data length.  Instead, the appropriate tp_as_buffer | 
 | 14104 |   method is called as necessary. | 
 | 14105 |  | 
 | 14106 | - fixed: if a file is opened with an explicit buffer size >= 1, repeated | 
 | 14107 |   close() calls would attempt to free() the buffer already free()ed on | 
 | 14108 |   the first call. | 
 | 14109 |  | 
 | 14110 |  | 
 | 14111 | Extension modules | 
 | 14112 | ----------------- | 
 | 14113 |  | 
 | 14114 | - Added socket.getservbyport(), and make the second argument in | 
 | 14115 |   getservbyname() and getservbyport() optional. | 
 | 14116 |  | 
 | 14117 | - time module code that deals with input POSIX timestamps will now raise | 
 | 14118 |   ValueError if more than a second is lost in precision when the | 
 | 14119 |   timestamp is cast to the platform C time_t type.  There's no chance | 
 | 14120 |   that the platform will do anything sensible with the result in such | 
 | 14121 |   cases.  This includes ctime(), localtime() and gmtime().  Assorted | 
 | 14122 |   fromtimestamp() and utcfromtimestamp() methods in the datetime module | 
 | 14123 |   were also protected.  Closes bugs #919012 and 975996. | 
 | 14124 |  | 
 | 14125 | - fcntl.ioctl now warns if the mutate flag is not specified. | 
 | 14126 |  | 
 | 14127 | - nt now properly allows to refer to UNC roots, e.g. in nt.stat(). | 
 | 14128 |  | 
 | 14129 | - the weakref module now supports additional objects:  array.array, | 
 | 14130 |   sre.pattern_objects, file objects, and sockets. | 
 | 14131 |  | 
 | 14132 | - operator.isMappingType() and operator.isSequenceType() now give | 
 | 14133 |   fewer false positives. | 
 | 14134 |  | 
 | 14135 | - socket.sslerror is now a subclass of socket.error .  Also added | 
 | 14136 |   socket.error to the socket module's C API. | 
 | 14137 |  | 
 | 14138 | - Bug #920575: A problem where the _locale module segfaults on | 
 | 14139 |   nl_langinfo(ERA) caused by GNU libc's illegal NULL return is fixed. | 
 | 14140 |  | 
 | 14141 | - array objects now support the copy module.  Also, their resizing | 
 | 14142 |   scheme has been updated to match that used for list objects.  This improves | 
 | 14143 |   the performance (speed and memory usage) of append() operations. | 
 | 14144 |   Also, array.array() and array.extend() now accept any iterable argument | 
 | 14145 |   for repeated appends without needing to create another temporary array. | 
 | 14146 |  | 
 | 14147 | - cStringIO.writelines() now accepts any iterable argument and writes | 
 | 14148 |   the lines one at a time rather than joining them and writing once. | 
 | 14149 |   Made a parallel change to StringIO.writelines().  Saves memory and | 
 | 14150 |   makes suitable for use with generator expressions. | 
 | 14151 |  | 
 | 14152 | - time.strftime() now checks that the values in its time tuple argument | 
 | 14153 |   are within the proper boundaries to prevent possible crashes from the | 
 | 14154 |   platform's C library implementation of strftime().  Can possibly | 
 | 14155 |   break code that uses values outside the range that didn't cause | 
 | 14156 |   problems previously (such as sitting day of year to 0).  Fixes bug | 
 | 14157 |   #897625. | 
 | 14158 |  | 
 | 14159 | - The socket module now supports Bluetooth sockets, if the | 
 | 14160 |   system has <bluetooth/bluetooth.h> | 
 | 14161 |  | 
 | 14162 | - Added a collections module containing a new datatype, deque(), | 
 | 14163 |   offering high-performance, thread-safe, memory friendly appends | 
 | 14164 |   and pops on either side of the deque. | 
 | 14165 |  | 
 | 14166 | - Several modules now take advantage of collections.deque() for | 
 | 14167 |   improved performance:  Queue, mutex, shlex, threading, and pydoc. | 
 | 14168 |  | 
 | 14169 | - The operator module has two new functions, attrgetter() and | 
 | 14170 |   itemgetter() which are useful for creating fast data extractor | 
 | 14171 |   functions for map(), list.sort(), itertools.groupby(), and | 
 | 14172 |   other functions that expect a function argument. | 
 | 14173 |  | 
 | 14174 | - socket.SHUT_{RD,WR,RDWR} was added. | 
 | 14175 |  | 
 | 14176 | - os.getsid was added. | 
 | 14177 |  | 
 | 14178 | - The pwd module incorrectly advertised its struct type as | 
 | 14179 |   struct_pwent; this has been renamed to struct_passwd.  (The old name | 
 | 14180 |   is still supported for backwards compatibility.) | 
 | 14181 |  | 
 | 14182 | - The xml.parsers.expat module now provides Expat 1.95.7. | 
 | 14183 |  | 
 | 14184 | - socket.IPPROTO_IPV6 was added. | 
 | 14185 |  | 
 | 14186 | - readline.clear_history was added. | 
 | 14187 |  | 
 | 14188 | - select.select() now accepts sequences for its first three arguments. | 
 | 14189 |  | 
 | 14190 | - cStringIO now supports the f.closed attribute. | 
 | 14191 |  | 
 | 14192 | - The signal module now exposes SIGRTMIN and SIGRTMAX (if available). | 
 | 14193 |  | 
 | 14194 | - curses module now supports use_default_colors().  [patch #739124] | 
 | 14195 |  | 
 | 14196 | - Bug #811028: ncurses.h breakage on FreeBSD/MacOS X | 
 | 14197 |  | 
 | 14198 | - Bug #814613: INET_ADDRSTRLEN fix needed for all compilers on SGI | 
 | 14199 |  | 
 | 14200 | - Implemented non-recursive SRE matching scheme (#757624). | 
 | 14201 |  | 
 | 14202 | - Implemented (?(id/name)yes|no) support in SRE (#572936). | 
 | 14203 |  | 
 | 14204 | - random.seed() with no arguments or None uses time.time() as a default | 
 | 14205 |   seed.  Modified to match Py2.2 behavior and use fractional seconds so | 
 | 14206 |   that successive runs are more likely to produce different sequences. | 
 | 14207 |  | 
 | 14208 | - random.Random has a new method, getrandbits(k), which returns an int | 
 | 14209 |   with k random bits.  This method is now an optional part of the API | 
 | 14210 |   for user defined generators.  Any generator that defines genrandbits() | 
 | 14211 |   can now use randrange() for ranges with a length >= 2**53.  Formerly, | 
 | 14212 |   randrange would return only even numbers for ranges that large (see | 
 | 14213 |   SF bug #812202).  Generators that do not define genrandbits() now | 
 | 14214 |   issue a warning when randrange() is called with a range that large. | 
 | 14215 |  | 
 | 14216 | - itertools has a new function, groupby() for aggregating iterables | 
 | 14217 |   into groups sharing the same key (as determined by a key function). | 
 | 14218 |   It offers some of functionality of SQL's groupby keyword and of | 
 | 14219 |   the Unix uniq filter. | 
 | 14220 |  | 
 | 14221 | - itertools now has a new tee() function which produces two independent | 
 | 14222 |   iterators from a single iterable. | 
 | 14223 |  | 
 | 14224 | - itertools.izip() with no arguments now returns an empty iterator instead | 
 | 14225 |   of raising a TypeError exception. | 
 | 14226 |  | 
 | 14227 | - Fixed #853061: allow BZ2Compressor.compress() to receive an empty string | 
 | 14228 |   as parameter. | 
 | 14229 |  | 
 | 14230 | Library | 
 | 14231 | ------- | 
 | 14232 |  | 
 | 14233 | - Added a new module: cProfile, a C profiler with the same interface as the | 
 | 14234 |   profile module.  cProfile avoids some of the drawbacks of the hotshot | 
 | 14235 |   profiler and provides a bit more information than the other two profilers. | 
 | 14236 |   Based on "lsprof" (patch #1212837). | 
 | 14237 |  | 
 | 14238 | - Bug #1266283: The new function "lexists" is now in os.path.__all__. | 
 | 14239 |  | 
 | 14240 | - Bug #981530: Fix UnboundLocalError in shutil.rmtree().  This affects | 
 | 14241 |   the documented behavior: the function passed to the onerror() | 
 | 14242 |   handler can now also be os.listdir. | 
 | 14243 |  | 
 | 14244 | - Bug #754449: threading.Thread objects no longer mask exceptions raised during | 
 | 14245 |   interpreter shutdown with another exception from attempting to handle the | 
 | 14246 |   original exception. | 
 | 14247 |  | 
 | 14248 | - Added decimal.py per PEP 327. | 
 | 14249 |  | 
 | 14250 | - Bug #981299: rsync is now a recognized protocol in urlparse that uses a | 
 | 14251 |   "netloc" portion of a URL. | 
 | 14252 |  | 
 | 14253 | - Bug #919012: shutil.move() will not try to move a directory into itself. | 
 | 14254 |   Thanks Johannes Gijsbers. | 
 | 14255 |  | 
 | 14256 | - Bug #934282: pydoc.stripid() is now case-insensitive.  Thanks Robin Becker. | 
 | 14257 |  | 
 | 14258 | - Bug #823209:  cmath.log() now takes an optional base argument so that its | 
 | 14259 |   API matches math.log(). | 
 | 14260 |  | 
 | 14261 | - Bug #957381: distutils bdist_rpm no longer fails on recent RPM versions | 
 | 14262 |   that generate a -debuginfo.rpm | 
 | 14263 |  | 
 | 14264 | - os.path.devnull has been added for all supported platforms. | 
 | 14265 |  | 
 | 14266 | - Fixed #877165: distutils now picks the right C++ compiler command | 
 | 14267 |   on cygwin and mingw32. | 
 | 14268 |  | 
 | 14269 | - urllib.urlopen().readline() now handles HTTP/0.9 correctly. | 
 | 14270 |  | 
 | 14271 | - refactored site.py into functions.  Also wrote regression tests for the | 
 | 14272 |   module. | 
 | 14273 |  | 
 | 14274 | - The distutils install command now supports the --home option and | 
 | 14275 |   installation scheme for all platforms. | 
 | 14276 |  | 
 | 14277 | - asyncore.loop now has a repeat count parameter that defaults to | 
 | 14278 |   looping forever. | 
 | 14279 |  | 
 | 14280 | - The distutils sdist command now ignores all .svn directories, in | 
 | 14281 |   addition to CVS and RCS directories.  .svn directories hold | 
 | 14282 |   administrative files for the Subversion source control system. | 
 | 14283 |  | 
 | 14284 | - Added a new module: cookielib.  Automatic cookie handling for HTTP | 
 | 14285 |   clients.  Also, support for cookielib has been added to urllib2, so | 
 | 14286 |   urllib2.urlopen() can transparently handle cookies. | 
 | 14287 |  | 
 | 14288 | - stringprep.py now uses built-in set() instead of sets.Set(). | 
 | 14289 |  | 
 | 14290 | - Bug #876278: Unbounded recursion in modulefinder | 
 | 14291 |  | 
 | 14292 | - Bug #780300: Swap public and system ID in LexicalHandler.startDTD. | 
 | 14293 |   Applications relying on the wrong order need to be corrected. | 
 | 14294 |  | 
 | 14295 | - Bug #926075: Fixed a bug that returns a wrong pattern object | 
 | 14296 |   for a string or unicode object in sre.compile() when a different | 
 | 14297 |   type pattern with the same value exists. | 
 | 14298 |  | 
 | 14299 | - Added countcallers arg to trace.Trace class (--trackcalls command line arg | 
 | 14300 |   when run from the command prompt). | 
 | 14301 |  | 
 | 14302 | - Fixed a caching bug in platform.platform() where the argument of 'terse' was | 
 | 14303 |   not taken into consideration when caching value. | 
 | 14304 |  | 
 | 14305 | - Added two new command-line arguments for profile (output file and | 
 | 14306 |   default sort). | 
 | 14307 |  | 
 | 14308 | - Added global runctx function to profile module | 
 | 14309 |  | 
 | 14310 | - Add hlist missing entryconfigure and entrycget methods. | 
 | 14311 |  | 
 | 14312 | - The ptcp154 codec was added for Kazakh character set support. | 
 | 14313 |  | 
 | 14314 | - Support non-anonymous ftp URLs in urllib2. | 
 | 14315 |  | 
 | 14316 | - The encodings package will now apply codec name aliases | 
 | 14317 |   first before starting to try the import of the codec module. | 
 | 14318 |   This simplifies overriding built-in codecs with external | 
 | 14319 |   packages, e.g. the included CJK codecs with the JapaneseCodecs | 
 | 14320 |   package, by adjusting the aliases dictionary in encodings.aliases | 
 | 14321 |   accordingly. | 
 | 14322 |  | 
 | 14323 | - base64 now supports RFC 3548 Base16, Base32, and Base64 encoding and | 
 | 14324 |   decoding standards. | 
 | 14325 |  | 
 | 14326 | - urllib2 now supports processors.  A processor is a handler that | 
 | 14327 |   implements an xxx_request or xxx_response method.  These methods are | 
 | 14328 |   called for all requests. | 
 | 14329 |  | 
 | 14330 | - distutils compilers now compile source files in the same order as | 
 | 14331 |   they are passed to the compiler. | 
 | 14332 |  | 
 | 14333 | - pprint.pprint() and pprint.pformat() now have additional parameters | 
 | 14334 |   indent, width and depth. | 
 | 14335 |  | 
 | 14336 | - Patch #750542: pprint now will pretty print subclasses of list, tuple | 
 | 14337 |   and dict too, as long as they don't overwrite __repr__(). | 
 | 14338 |  | 
 | 14339 | - Bug #848614: distutils' msvccompiler fails to find the MSVC6 | 
 | 14340 |   compiler because of incomplete registry entries. | 
 | 14341 |  | 
 | 14342 | - httplib.HTTP.putrequest now offers to omit the implicit Accept-Encoding. | 
 | 14343 |  | 
 | 14344 | - Patch #841977: modulefinder didn't find extension modules in packages | 
 | 14345 |  | 
 | 14346 | - imaplib.IMAP4.thread was added. | 
 | 14347 |  | 
 | 14348 | - Plugged a minor hole in tempfile.mktemp() due to the use of | 
 | 14349 |   os.path.exists(), switched to using os.lstat() directly if possible. | 
 | 14350 |  | 
 | 14351 | - bisect.py and heapq.py now have underlying C implementations | 
 | 14352 |   for better performance. | 
 | 14353 |  | 
 | 14354 | - heapq.py has two new functions, nsmallest() and nlargest(). | 
 | 14355 |  | 
 | 14356 | - traceback.format_exc has been added (similar to print_exc but it returns | 
 | 14357 |   a string). | 
 | 14358 |  | 
 | 14359 | - xmlrpclib.MultiCall has been added. | 
 | 14360 |  | 
 | 14361 | - poplib.POP3_SSL has been added. | 
 | 14362 |  | 
 | 14363 | - tmpfile.mkstemp now returns an absolute path even if dir is relative. | 
 | 14364 |  | 
 | 14365 | - urlparse is RFC 2396 compliant. | 
 | 14366 |  | 
 | 14367 | - The fieldnames argument to the csv module's DictReader constructor is now | 
 | 14368 |   optional.  If omitted, the first row of the file will be used as the | 
 | 14369 |   list of fieldnames. | 
 | 14370 |  | 
 | 14371 | - encodings.bz2_codec was added for access to bz2 compression | 
 | 14372 |   using "a long string".encode('bz2') | 
 | 14373 |  | 
 | 14374 | - Various improvements to unittest.py, realigned with PyUnit CVS. | 
 | 14375 |  | 
 | 14376 | - dircache now passes exceptions to the caller, instead of returning | 
 | 14377 |   empty lists. | 
 | 14378 |  | 
 | 14379 | - The bsddb module and dbhash module now support the iterator and | 
 | 14380 |   mapping protocols which make them more substitutable for dictionaries | 
 | 14381 |   and shelves. | 
 | 14382 |  | 
 | 14383 | - The csv module's DictReader and DictWriter classes now accept keyword | 
 | 14384 |   arguments.  This was an omission in the initial implementation. | 
 | 14385 |  | 
 | 14386 | - The email package handles some RFC 2231 parameters with missing | 
 | 14387 |   CHARSET fields better.  It also includes a patch to parameter | 
 | 14388 |   parsing when semicolons appear inside quotes. | 
 | 14389 |  | 
 | 14390 | - sets.py now runs under Py2.2.  In addition, the argument restrictions | 
 | 14391 |   for most set methods (but not the operators) have been relaxed to | 
 | 14392 |   allow any iterable. | 
 | 14393 |  | 
 | 14394 | - _strptime.py now has a behind-the-scenes caching mechanism for the most | 
 | 14395 |   recent TimeRE instance used along with the last five unique directive | 
 | 14396 |   patterns.  The overall module was also made more thread-safe. | 
 | 14397 |  | 
 | 14398 | - random.cunifvariate() and random.stdgamma() were deprecated in Py2.3 | 
 | 14399 |   and removed in Py2.4. | 
 | 14400 |  | 
 | 14401 | - Bug #823328: urllib2.py's HTTP Digest Auth support works again. | 
 | 14402 |  | 
 | 14403 | - Patch #873597: CJK codecs are imported into rank of default codecs. | 
 | 14404 |  | 
 | 14405 | Tools/Demos | 
 | 14406 | ----------- | 
 | 14407 |  | 
 | 14408 | - A hotshotmain script was added to the Tools/scripts directory that | 
 | 14409 |   makes it easy to run a script under control of the hotshot profiler. | 
 | 14410 |  | 
 | 14411 | - The db2pickle and pickle2db scripts can now dump/load gdbm files. | 
 | 14412 |  | 
 | 14413 | - The file order on the command line of the pickle2db script was reversed. | 
 | 14414 |   It is now [ picklefile ] dbfile.  This provides better symmetry with | 
 | 14415 |   db2pickle.  The file arguments to both scripts are now source followed by | 
 | 14416 |   destination in situations where both files are given. | 
 | 14417 |  | 
 | 14418 | - The pydoc script will display a link to the module documentation for | 
 | 14419 |   modules determined to be part of the core distribution.  The documentation | 
 | 14420 |   base directory defaults to http://www.python.org/doc/current/lib/ but can | 
 | 14421 |   be changed by setting the PYTHONDOCS environment variable. | 
 | 14422 |  | 
 | 14423 | - texcheck.py now detects double word errors. | 
 | 14424 |  | 
 | 14425 | - md5sum.py mistakenly opened input files in text mode by default, a | 
 | 14426 |   silent and dangerous change from previous releases.  It once again | 
 | 14427 |   opens input files in binary mode by default.  The -t and -b flags | 
 | 14428 |   remain for compatibility with the 2.3 release, but -b is the default | 
 | 14429 |   now. | 
 | 14430 |  | 
 | 14431 | - py-electric-colon now works when pending-delete/delete-selection mode is | 
 | 14432 |   in effect | 
 | 14433 |  | 
 | 14434 | - py-help-at-point is no longer bound to the F1 key - it's still bound to | 
 | 14435 |   C-c C-h | 
 | 14436 |  | 
 | 14437 | - Pynche was fixed to not crash when there is no ~/.pynche file and no | 
 | 14438 |   -d option was given. | 
 | 14439 |  | 
 | 14440 | Build | 
 | 14441 | ----- | 
 | 14442 |  | 
 | 14443 | - Bug #978645: Modules/getpath.c now builds properly in --disable-framework | 
 | 14444 |   build under OS X. | 
 | 14445 |  | 
 | 14446 | - Profiling using gprof is now available if Python is configured with | 
 | 14447 |   --enable-profiling. | 
 | 14448 |  | 
 | 14449 | - Profiling the VM using the Pentium TSC is now possible if Python | 
 | 14450 |   is configured --with-tsc. | 
 | 14451 |  | 
 | 14452 | - In order to find libraries, setup.py now also looks in /lib64, for use | 
 | 14453 |   on AMD64. | 
 | 14454 |  | 
 | 14455 | - Bug #934635: Fixed a bug where the configure script couldn't detect | 
 | 14456 |   getaddrinfo() properly if the KAME stack had SCTP support. | 
 | 14457 |  | 
 | 14458 | - Support for missing ANSI C header files (limits.h, stddef.h, etc) was | 
 | 14459 |   removed. | 
 | 14460 |  | 
 | 14461 | - Systems requiring the D4, D6 or D7 variants of pthreads are no longer | 
 | 14462 |   supported (see PEP 11). | 
 | 14463 |  | 
 | 14464 | - Universal newline support can no longer be disabled (see PEP 11). | 
 | 14465 |  | 
 | 14466 | - Support for DGUX, SunOS 4, IRIX 4 and Minix was removed (see PEP 11). | 
 | 14467 |  | 
 | 14468 | - Support for systems requiring --with-dl-dld or --with-sgi-dl was removed | 
 | 14469 |   (see PEP 11). | 
 | 14470 |  | 
 | 14471 | - Tests for sizeof(char) were removed since ANSI C mandates that | 
 | 14472 |   sizeof(char) must be 1. | 
 | 14473 |  | 
 | 14474 | C API | 
 | 14475 | ----- | 
 | 14476 |  | 
 | 14477 | - Thanks to Anthony Tuininga, the datetime module now supplies a C API | 
 | 14478 |   containing type-check macros and constructors.  See new docs in the | 
 | 14479 |   Python/C API Reference Manual for details. | 
 | 14480 |  | 
 | 14481 | - Private function _PyTime_DoubleToTimet added, to convert a Python | 
 | 14482 |   timestamp (C double) to platform time_t with some out-of-bounds | 
 | 14483 |   checking.  Declared in new header file timefuncs.h.  It would be | 
 | 14484 |   good to expose some other internal timemodule.c functions there. | 
 | 14485 |  | 
 | 14486 | - New public functions PyEval_EvaluateFrame and PyGen_New to expose | 
 | 14487 |   generator objects. | 
 | 14488 |  | 
 | 14489 | - New public functions Py_IncRef() and Py_DecRef(), exposing the | 
 | 14490 |   functionality of the Py_XINCREF() and Py_XDECREF macros. Useful for | 
 | 14491 |   runtime dynamic embedding of Python.  See patch #938302, by Bob | 
 | 14492 |   Ippolito. | 
 | 14493 |  | 
 | 14494 | - Added a new macro, PySequence_Fast_ITEMS, which retrieves a fast sequence's | 
 | 14495 |   underlying array of PyObject pointers.  Useful for high speed looping. | 
 | 14496 |  | 
 | 14497 | - Created a new method flag, METH_COEXIST, which causes a method to be loaded | 
 | 14498 |   even if already defined by a slot wrapper.  This allows a __contains__ | 
 | 14499 |   method, for example, to co-exist with a defined sq_contains slot.  This | 
 | 14500 |   is helpful because the PyCFunction can take advantage of optimized calls | 
 | 14501 |   whenever METH_O or METH_NOARGS flags are defined. | 
 | 14502 |  | 
 | 14503 | - Added a new function, PyDict_Contains(d, k) which is like | 
 | 14504 |   PySequence_Contains() but is specific to dictionaries and executes | 
 | 14505 |   about 10% faster. | 
 | 14506 |  | 
 | 14507 | - Added three new macros: Py_RETURN_NONE, Py_RETURN_TRUE, and Py_RETURN_FALSE. | 
 | 14508 |   Each return the singleton they mention after Py_INCREF()ing them. | 
 | 14509 |  | 
 | 14510 | - Added a new function, PyTuple_Pack(n, ...) for constructing tuples from a | 
 | 14511 |   variable length argument list of Python objects without having to invoke | 
 | 14512 |   the more complex machinery of Py_BuildValue().  PyTuple_Pack(3, a, b, c) | 
 | 14513 |   is equivalent to Py_BuildValue("(OOO)", a, b, c). | 
 | 14514 |  | 
 | 14515 | Windows | 
 | 14516 | ------- | 
 | 14517 |  | 
 | 14518 | - The _winreg module could segfault when reading very large registry | 
 | 14519 |   values, due to unchecked alloca() calls (SF bug 851056).  The fix is | 
 | 14520 |   uses either PyMem_Malloc(n) or PyString_FromStringAndSize(NULL, n), | 
 | 14521 |   as appropriate, followed by a size check. | 
 | 14522 |  | 
 | 14523 | - file.truncate() could misbehave if the file was open for update | 
 | 14524 |   (modes r+, rb+, w+, wb+), and the most recent file operation before | 
 | 14525 |   the truncate() call was an input operation.  SF bug 801631. | 
 | 14526 |  | 
 | 14527 |  | 
 | 14528 | What's New in Python 2.3 final? | 
 | 14529 | =============================== | 
 | 14530 |  | 
 | 14531 | *Release date: 29-Jul-2003* | 
 | 14532 |  | 
 | 14533 | IDLE | 
 | 14534 | ---- | 
 | 14535 |  | 
 | 14536 | - Bug 778400:  IDLE hangs when selecting "Edit with IDLE" from explorer. | 
 | 14537 |   This was unique to Windows, and was fixed by adding an -n switch to | 
 | 14538 |   the command the Windows installer creates to execute "Edit with IDLE" | 
 | 14539 |   context-menu actions. | 
 | 14540 |  | 
 | 14541 | - IDLE displays a new message upon startup:  some "personal firewall" | 
 | 14542 |   kinds of programs (for example, ZoneAlarm) open a dialog of their | 
 | 14543 |   own when any program opens a socket.  IDLE does use sockets, talking | 
 | 14544 |   on the computer's internal loopback interface.  This connection is not | 
 | 14545 |   visible on any external interface and no data is sent to or received | 
 | 14546 |   from the Internet.  So, if you get such a dialog when opening IDLE, | 
 | 14547 |   asking whether to let pythonw.exe talk to address 127.0.0.1, say yes, | 
 | 14548 |   and rest assured no communication external to your machine is taking | 
 | 14549 |   place.  If you don't allow it, IDLE won't be able to start. | 
 | 14550 |  | 
 | 14551 |  | 
 | 14552 | What's New in Python 2.3 release candidate 2? | 
 | 14553 | ============================================= | 
 | 14554 |  | 
 | 14555 | *Release date: 24-Jul-2003* | 
 | 14556 |  | 
 | 14557 | Core and builtins | 
 | 14558 | ----------------- | 
 | 14559 |  | 
 | 14560 | - It is now possible to import from zipfiles containing additional | 
 | 14561 |   data bytes before the zip compatible archive.  Zipfiles containing a | 
 | 14562 |   comment at the end are still unsupported. | 
 | 14563 |  | 
 | 14564 | Extension modules | 
 | 14565 | ----------------- | 
 | 14566 |  | 
 | 14567 | - A longstanding bug in the parser module's initialization could cause | 
 | 14568 |   fatal internal refcount confusion when the module got initialized more | 
 | 14569 |   than once.  This has been fixed. | 
 | 14570 |  | 
 | 14571 | - Fixed memory leak in pyexpat; using the parser's ParseFile() method | 
 | 14572 |   with open files that aren't instances of the standard file type | 
 | 14573 |   caused an instance of the bound .read() method to be leaked on every | 
 | 14574 |   call. | 
 | 14575 |  | 
 | 14576 | - Fixed some leaks in the locale module. | 
 | 14577 |  | 
 | 14578 | Library | 
 | 14579 | ------- | 
 | 14580 |  | 
 | 14581 | - Lib/encodings/rot_13.py when used as a script, now more properly | 
 | 14582 |   uses the first Python interpreter on your path. | 
 | 14583 |  | 
 | 14584 | - Removed caching of TimeRE (and thus LocaleTime) in _strptime.py to | 
 | 14585 |   fix a locale related bug in the test suite.  Although another patch | 
 | 14586 |   was needed to actually fix the problem, the cache code was not | 
 | 14587 |   restored. | 
 | 14588 |  | 
 | 14589 | IDLE | 
 | 14590 | ---- | 
 | 14591 |  | 
 | 14592 | - Calltips patches. | 
 | 14593 |  | 
 | 14594 | Build | 
 | 14595 | ----- | 
 | 14596 |  | 
 | 14597 | - For MacOSX, added -mno-fused-madd to BASECFLAGS to fix test_coercion | 
 | 14598 |   on Panther (OSX 10.3). | 
 | 14599 |  | 
 | 14600 | C API | 
 | 14601 | ----- | 
 | 14602 |  | 
 | 14603 | Windows | 
 | 14604 | ------- | 
 | 14605 |  | 
 | 14606 | - The tempfile module could do insane imports on Windows if PYTHONCASEOK | 
 | 14607 |   was set, making temp file creation impossible.  Repaired. | 
 | 14608 |  | 
 | 14609 | - Add a patch to workaround pthread_sigmask() bugs in Cygwin. | 
 | 14610 |  | 
 | 14611 | Mac | 
 | 14612 | --- | 
 | 14613 |  | 
 | 14614 | - Various fixes to pimp. | 
 | 14615 |  | 
 | 14616 | - Scripts runs with pythonw no longer had full window manager access. | 
 | 14617 |  | 
 | 14618 | - Don't force boot-disk-only install, for reasons unknown it causes | 
 | 14619 |   more problems than it solves. | 
 | 14620 |  | 
 | 14621 |  | 
 | 14622 | What's New in Python 2.3 release candidate 1? | 
 | 14623 | ============================================= | 
 | 14624 |  | 
 | 14625 | *Release date: 18-Jul-2003* | 
 | 14626 |  | 
 | 14627 | Core and builtins | 
 | 14628 | ----------------- | 
 | 14629 |  | 
 | 14630 | - The new function sys.getcheckinterval() returns the last value set | 
 | 14631 |   by sys.setcheckinterval(). | 
 | 14632 |  | 
 | 14633 | - Several bugs in the symbol table phase of the compiler have been | 
 | 14634 |   fixed.  Errors could be lost and compilation could fail without | 
 | 14635 |   reporting an error.  SF patch 763201. | 
 | 14636 |  | 
 | 14637 | - The interpreter is now more robust about importing the warnings | 
 | 14638 |   module.  In an executable generated by freeze or similar programs, | 
 | 14639 |   earlier versions of 2.3 would fail if the warnings module could | 
 | 14640 |   not be found on the file system.  Fixes SF bug 771097. | 
 | 14641 |  | 
 | 14642 | - A warning about assignments to module attributes that shadow | 
 | 14643 |   builtins, present in earlier releases of 2.3, has been removed. | 
 | 14644 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 14645 | - It is not possible to create subclasses of built-in types like str | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 14646 |   and tuple that define an itemsize.  Earlier releases of Python 2.3 | 
 | 14647 |   allowed this by mistake, leading to crashes and other problems. | 
 | 14648 |  | 
 | 14649 | - The thread_id is now initialized to 0 in a non-thread build.  SF bug | 
 | 14650 |   770247. | 
 | 14651 |  | 
 | 14652 | - SF bug 762891: "del p[key]" on proxy object no longer raises SystemError. | 
 | 14653 |  | 
 | 14654 | Extension modules | 
 | 14655 | ----------------- | 
 | 14656 |  | 
 | 14657 | - weakref.proxy() can now handle "del obj[i]" for proxy objects | 
 | 14658 |   defining __delitem__.  Formerly, it generated a SystemError. | 
 | 14659 |  | 
 | 14660 | - SSL no longer crashes the interpreter when the remote side disconnects. | 
 | 14661 |  | 
 | 14662 | - On Unix the mmap module can again be used to map device files. | 
 | 14663 |  | 
 | 14664 | - time.strptime now exclusively uses the Python implementation | 
 | 14665 |   contained within the _strptime module. | 
 | 14666 |  | 
 | 14667 | - The print slot of weakref proxy objects was removed, because it was | 
 | 14668 |   not consistent with the object's repr slot. | 
 | 14669 |  | 
 | 14670 | - The mmap module only checks file size for regular files, not | 
 | 14671 |   character or block devices.  SF patch 708374. | 
 | 14672 |  | 
 | 14673 | - The cPickle Pickler garbage collection support was fixed to traverse | 
 | 14674 |   the find_class attribute, if present. | 
 | 14675 |  | 
 | 14676 | - There are several fixes for the bsddb3 wrapper module. | 
 | 14677 |  | 
 | 14678 |   bsddb3 no longer crashes if an environment is closed before a cursor | 
 | 14679 |   (SF bug 763298). | 
 | 14680 |  | 
 | 14681 |   The DB and DBEnv set_get_returns_none function was extended to take | 
 | 14682 |   a level instead of a boolean flag.  The new level 2 means that in | 
 | 14683 |   addition, cursor.set()/.get() methods return None instead of raising | 
 | 14684 |   an exception. | 
 | 14685 |  | 
 | 14686 |   A typo was fixed in DBCursor.join_item(), preventing a crash. | 
 | 14687 |  | 
 | 14688 | Library | 
 | 14689 | ------- | 
 | 14690 |  | 
 | 14691 | - distutils now supports MSVC 7.1 | 
 | 14692 |  | 
 | 14693 | - doctest now examines all docstrings by default.  Previously, it would | 
 | 14694 |   skip over functions with private names (as indicated by the underscore | 
 | 14695 |   naming convention).  The old default created too much of a risk that | 
 | 14696 |   user tests were being skipped inadvertently.  Note, this change could | 
 | 14697 |   break code in the unlikely case that someone had intentionally put | 
 | 14698 |   failing tests in the docstrings of private functions.  The breakage | 
 | 14699 |   is easily fixable by specifying the old behavior when calling testmod() | 
 | 14700 |   or Tester(). | 
 | 14701 |  | 
 | 14702 | - There were several fixes to the way dumbdbms are closed.  It's vital | 
 | 14703 |   that a dumbdbm database be closed properly, else the on-disk data | 
 | 14704 |   and directory files can be left in mutually inconsistent states. | 
 | 14705 |   dumbdbm.py's _Database.__del__() method attempted to close the | 
 | 14706 |   database properly, but a shutdown race in _Database._commit() could | 
 | 14707 |   prevent this from working, so that a program trusting __del__() to | 
 | 14708 |   get the on-disk files in synch could be badly surprised.  The race | 
 | 14709 |   has been repaired.  A sync() method was also added so that shelve | 
 | 14710 |   can guarantee data is written to disk. | 
 | 14711 |  | 
 | 14712 |   The close() method can now be called more than once without complaint. | 
 | 14713 |  | 
 | 14714 | - The classes in threading.py are now new-style classes.  That they | 
 | 14715 |   weren't before was an oversight. | 
 | 14716 |  | 
 | 14717 | - The urllib2 digest authentication handlers now define the correct | 
 | 14718 |   auth_header.  The earlier versions would fail at runtime. | 
 | 14719 |  | 
 | 14720 | - SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods | 
 | 14721 |   when there are no lines. | 
 | 14722 |  | 
 | 14723 | - SF bug 763637: fix exception in Tkinter with after_cancel | 
 | 14724 |   which could occur with Tk 8.4 | 
 | 14725 |  | 
 | 14726 | - SF bug 770601: CGIHTTPServer.py now passes the entire environment | 
 | 14727 |   to child processes. | 
 | 14728 |  | 
 | 14729 | - SF bug 765238: add filter to fnmatch's __all__. | 
 | 14730 |  | 
 | 14731 | - SF bug 748201: make time.strptime() error messages more helpful. | 
 | 14732 |  | 
 | 14733 | - SF patch 764470: Do not dump the args attribute of a Fault object in | 
 | 14734 |   xmlrpclib. | 
 | 14735 |  | 
 | 14736 | - SF patch 549151: urllib and urllib2 now redirect POSTs on 301 | 
 | 14737 |   responses. | 
 | 14738 |  | 
 | 14739 | - SF patch 766650: The whichdb module was fixed to recognize dbm files | 
 | 14740 |   generated by gdbm on OS/2 EMX. | 
 | 14741 |  | 
 | 14742 | - SF bugs 763047 and 763052: fixes bug of timezone value being left as | 
 | 14743 |   -1 when ``time.tzname[0] == time.tzname[1] and not time.daylight`` | 
 | 14744 |   is true when it should only when time.daylight is true. | 
 | 14745 |  | 
 | 14746 | - SF bug 764548: re now allows subclasses of str and unicode to be | 
 | 14747 |   used as patterns. | 
 | 14748 |  | 
 | 14749 | - SF bug 763637: In Tkinter, change after_cancel() to handle tuples | 
 | 14750 |   of varying sizes.  Tk 8.4 returns a different number of values | 
 | 14751 |   than Tk 8.3. | 
 | 14752 |  | 
 | 14753 | - SF bug 763023: difflib.ratio() did not catch zero division. | 
 | 14754 |  | 
 | 14755 | - The Queue module now has an __all__ attribute. | 
 | 14756 |  | 
 | 14757 | Tools/Demos | 
 | 14758 | ----------- | 
 | 14759 |  | 
 | 14760 | - See Lib/idlelib/NEWS.txt for IDLE news. | 
 | 14761 |  | 
 | 14762 | - SF bug 753592: webchecker/wsgui now handles user supplied directories. | 
 | 14763 |  | 
 | 14764 | - The trace.py script has been removed.  It is now in the standard library. | 
 | 14765 |  | 
 | 14766 | Build | 
 | 14767 | ----- | 
 | 14768 |  | 
 | 14769 | - Python now compiles with -fno-strict-aliasing if possible (SF bug 766696). | 
 | 14770 |  | 
 | 14771 | - The socket module compiles on IRIX 6.5.10. | 
 | 14772 |  | 
 | 14773 | - An irix64 system is treated the same way as an irix6 system (SF | 
 | 14774 |   patch 764560). | 
 | 14775 |  | 
 | 14776 | - Several definitions were missing on FreeBSD 5.x unless the | 
 | 14777 |   __BSD_VISIBLE symbol was defined.  configure now defines it as | 
 | 14778 |   needed. | 
 | 14779 |  | 
 | 14780 | C API | 
 | 14781 | ----- | 
 | 14782 |  | 
 | 14783 | - Unicode objects now support mbcs as a built-in encoding, so the C | 
 | 14784 |   API can use it without deferring to the encodings package. | 
 | 14785 |  | 
 | 14786 | Windows | 
 | 14787 | ------- | 
 | 14788 |  | 
 | 14789 | - The Windows implementation of PyThread_start_new_thread() never | 
 | 14790 |   checked error returns from Windows functions correctly.  As a result, | 
 | 14791 |   it could claim to start a new thread even when the Microsoft | 
 | 14792 |   _beginthread() function failed (due to "too many threads" -- this is | 
 | 14793 |   on the order of thousands when it happens).  In these cases, the | 
 | 14794 |   Python exception :: | 
 | 14795 |  | 
 | 14796 |       thread.error: can't start new thread | 
 | 14797 |  | 
 | 14798 |   is raised now. | 
 | 14799 |  | 
 | 14800 | - SF bug 766669: Prevent a GPF on interpreter exit when sockets are in | 
 | 14801 |   use.  The interpreter now calls WSACleanup() from Py_Finalize() | 
 | 14802 |   instead of from DLL teardown. | 
 | 14803 |  | 
 | 14804 | Mac | 
 | 14805 | --- | 
 | 14806 |  | 
 | 14807 | - Bundlebuilder now inherits default values in the right way.  It was | 
 | 14808 |   previously possible for app bundles to get a type of "BNDL" instead | 
 | 14809 |   of "APPL."  Other improvements include, a --build-id option to | 
 | 14810 |   specify the CFBundleIdentifier and using the --python option to set | 
 | 14811 |   the executable in the bundle. | 
 | 14812 |  | 
 | 14813 | - Fixed two bugs in MacOSX framework handling. | 
 | 14814 |  | 
 | 14815 | - pythonw did not allow user interaction in 2.3rc1, this has been fixed. | 
 | 14816 |  | 
 | 14817 | - Python is now compiled with -mno-fused-madd, making all tests pass | 
 | 14818 |   on Panther. | 
 | 14819 |  | 
 | 14820 | What's New in Python 2.3 beta 2? | 
 | 14821 | ================================ | 
 | 14822 |  | 
 | 14823 | *Release date: 29-Jun-2003* | 
 | 14824 |  | 
 | 14825 | Core and builtins | 
 | 14826 | ----------------- | 
 | 14827 |  | 
 | 14828 | - A program can now set the environment variable PYTHONINSPECT to some | 
 | 14829 |   string value in Python, and cause the interpreter to enter the | 
 | 14830 |   interactive prompt at program exit, as if Python had been invoked | 
 | 14831 |   with the -i option. | 
 | 14832 |  | 
 | 14833 | - list.index() now accepts optional start and stop arguments.  Similar | 
 | 14834 |   changes were made to UserList.index(). SF feature request 754014. | 
 | 14835 |  | 
 | 14836 | - SF patch 751998 fixes an unwanted side effect of the previous fix | 
 | 14837 |   for SF bug 742860 (the next item). | 
 | 14838 |  | 
 | 14839 | - SF bug 742860: "WeakKeyDictionary __delitem__ uses iterkeys".  This | 
 | 14840 |   wasn't threadsafe, was very inefficient (expected time O(len(dict)) | 
 | 14841 |   instead of O(1)), and could raise a spurious RuntimeError if another | 
 | 14842 |   thread mutated the dict during __delitem__, or if a comparison function | 
 | 14843 |   mutated it.  It also neglected to raise KeyError when the key wasn't | 
 | 14844 |   present; didn't raise TypeError when the key wasn't of a weakly | 
 | 14845 |   referencable type; and broke various more-or-less obscure dict | 
 | 14846 |   invariants by using a sequence of equality comparisons over the whole | 
 | 14847 |   set of dict keys instead of computing the key's hash code to narrow | 
 | 14848 |   the search to those keys with the same hash code.  All of these are | 
 | 14849 |   considered to be bugs.  A new implementation of __delitem__ repairs all | 
 | 14850 |   that, but note that fixing these bugs may change visible behavior in | 
 | 14851 |   code relying (whether intentionally or accidentally) on old behavior. | 
 | 14852 |  | 
 | 14853 | - SF bug 734869: Fixed a compiler bug that caused a fatal error when | 
 | 14854 |   compiling a list comprehension that contained another list comprehension | 
 | 14855 |   embedded in a lambda expression. | 
 | 14856 |  | 
 | 14857 | - SF bug 705231:  builtin pow() no longer lets the platform C pow() | 
 | 14858 |   raise -1.0 to integer powers, because (at least) glibc gets it wrong | 
 | 14859 |   in some cases.  The result should be -1.0 if the power is odd and 1.0 | 
 | 14860 |   if the power is even, and any float with a sufficiently large exponent | 
 | 14861 |   is (mathematically) an exact even integer. | 
 | 14862 |  | 
 | 14863 | - SF bug 759227: A new-style class that implements __nonzero__() must | 
 | 14864 |   return a bool or int (but not an int subclass) from that method.  This | 
 | 14865 |   matches the restriction on classic classes. | 
 | 14866 |  | 
 | 14867 | - The encoding attribute has been added for file objects, and set to | 
 | 14868 |   the terminal encoding on Unix and Windows. | 
 | 14869 |  | 
 | 14870 | - The softspace attribute of file objects became read-only by oversight. | 
 | 14871 |   It's writable again. | 
 | 14872 |  | 
 | 14873 | - Reverted a 2.3 beta 1 change to iterators for subclasses of list and | 
 | 14874 |   tuple.  By default, the iterators now access data elements directly | 
 | 14875 |   instead of going through __getitem__.  If __getitem__ access is | 
 | 14876 |   preferred, then __iter__ can be overridden. | 
 | 14877 |  | 
 | 14878 | - SF bug 735247: The staticmethod and super types participate in | 
 | 14879 |   garbage collection. Before this change, it was possible for leaks to | 
 | 14880 |   occur in functions with non-global free variables that used these types. | 
 | 14881 |  | 
 | 14882 | Extension modules | 
 | 14883 | ----------------- | 
 | 14884 |  | 
 | 14885 | - the socket module has a new exception, socket.timeout, to allow | 
 | 14886 |   timeouts to be handled separately from other socket errors. | 
 | 14887 |  | 
 | 14888 | - SF bug 751276: cPickle has fixed to propagate exceptions raised in | 
 | 14889 |   user code.  In earlier versions, cPickle caught and ignored any | 
 | 14890 |   exception when it performed operations that it expected to raise | 
 | 14891 |   specific exceptions like AttributeError. | 
 | 14892 |  | 
 | 14893 | - cPickle Pickler and Unpickler objects now participate in garbage | 
 | 14894 |   collection. | 
 | 14895 |  | 
 | 14896 | - mimetools.choose_boundary() could return duplicate strings at times, | 
 | 14897 |   especially likely on Windows.  The strings returned are now guaranteed | 
 | 14898 |   unique within a single program run. | 
 | 14899 |  | 
 | 14900 | - thread.interrupt_main() raises KeyboardInterrupt in the main thread. | 
 | 14901 |   dummy_thread has also been modified to try to simulate the behavior. | 
 | 14902 |  | 
 | 14903 | - array.array.insert() now treats negative indices as being relative | 
 | 14904 |   to the end of the array, just like list.insert() does. (SF bug #739313) | 
 | 14905 |  | 
 | 14906 | - The datetime module classes datetime, time, and timedelta are now | 
 | 14907 |   properly subclassable. | 
 | 14908 |  | 
 | 14909 | - _tkinter.{get|set}busywaitinterval was added. | 
 | 14910 |  | 
 | 14911 | - itertools.islice() now accepts stop=None as documented. | 
 | 14912 |   Fixes SF bug #730685. | 
 | 14913 |  | 
 | 14914 | - the bsddb185 module is built in one restricted instance - | 
 | 14915 |   /usr/include/db.h exists and defines HASHVERSION to be 2.  This is true | 
 | 14916 |   for many BSD-derived systems. | 
 | 14917 |  | 
 | 14918 |  | 
 | 14919 | Library | 
 | 14920 | ------- | 
 | 14921 |  | 
 | 14922 | - Some happy doctest extensions from Jim Fulton have been added to | 
 | 14923 |   doctest.py.  These are already being used in Zope3.  The two | 
 | 14924 |   primary ones: | 
 | 14925 |  | 
 | 14926 |   doctest.debug(module, name) extracts the doctests from the named object | 
 | 14927 |   in the given module, puts them in a temp file, and starts pdb running | 
 | 14928 |   on that file.  This is great when a doctest fails. | 
 | 14929 |  | 
 | 14930 |   doctest.DocTestSuite(module=None) returns a synthesized unittest | 
 | 14931 |   TestSuite instance, to be run by the unittest framework, which | 
 | 14932 |   runs all the doctests in the module.  This allows writing tests in | 
 | 14933 |   doctest style (which can be clearer and shorter than writing tests | 
 | 14934 |   in unittest style), without losing unittest's powerful testing | 
 | 14935 |   framework features (which doctest lacks). | 
 | 14936 |  | 
 | 14937 | - For compatibility with doctests created before 2.3, if an expected | 
 | 14938 |   output block consists solely of "1" and the actual output block | 
 | 14939 |   consists solely of "True", it's accepted as a match; similarly | 
 | 14940 |   for "0" and "False".  This is quite un-doctest-like, but is practical. | 
 | 14941 |   The behavior can be disabled by passing the new doctest module | 
 | 14942 |   constant DONT_ACCEPT_TRUE_FOR_1 to the new optionflags optional | 
 | 14943 |   argument. | 
 | 14944 |  | 
 | 14945 | - ZipFile.testzip() now only traps BadZipfile exceptions.  Previously, | 
 | 14946 |   a bare except caught to much and reported all errors as a problem | 
 | 14947 |   in the archive. | 
 | 14948 |  | 
 | 14949 | - The logging module now has a new function, makeLogRecord() making | 
 | 14950 |   LogHandler easier to interact with DatagramHandler and SocketHandler. | 
 | 14951 |  | 
 | 14952 | - The cgitb module has been extended to support plain text display (SF patch | 
 | 14953 |   569574). | 
 | 14954 |  | 
 | 14955 | - A brand new version of IDLE (from the IDLEfork project at | 
 | 14956 |   SourceForge) is now included as Lib/idlelib.  The old Tools/idle is | 
 | 14957 |   no more. | 
 | 14958 |  | 
 | 14959 | - Added a new module: trace (documentation missing).  This module used | 
 | 14960 |   to be distributed in Tools/scripts.  It uses sys.settrace() to trace | 
 | 14961 |   code execution -- either function calls or individual lines.  It can | 
 | 14962 |   generate tracing output during execution or a post-mortem report of | 
 | 14963 |   code coverage. | 
 | 14964 |  | 
 | 14965 | - The threading module has new functions settrace() and setprofile() | 
 | 14966 |   that cooperate with the functions of the same name in the sys | 
 | 14967 |   module.  A function registered with the threading module will | 
 | 14968 |   be used for all threads it creates.  The new trace module uses this | 
 | 14969 |   to provide tracing for code running in threads. | 
 | 14970 |  | 
 | 14971 | - copy.py: applied SF patch 707900, fixing bug 702858, by Steven | 
 | 14972 |   Taschuk.  Copying a new-style class that had a reference to itself | 
 | 14973 |   didn't work.  (The same thing worked fine for old-style classes.) | 
 | 14974 |   Builtin functions are now treated as atomic, fixing bug #746304. | 
 | 14975 |  | 
 | 14976 | - difflib.py has two new functions:  context_diff() and unified_diff(). | 
 | 14977 |  | 
 | 14978 | - More fixes to urllib (SF 549151): (a) When redirecting, always use | 
 | 14979 |   GET.  This is common practice and more-or-less sanctioned by the | 
 | 14980 |   HTTP standard. (b) Add a handler for 307 redirection, which becomes | 
 | 14981 |   an error for POST, but a regular redirect for GET and HEAD | 
 | 14982 |  | 
 | 14983 | - Added optional 'onerror' argument to os.walk(), to control error | 
 | 14984 |   handling. | 
 | 14985 |  | 
 | 14986 | - inspect.is{method|data}descriptor was added, to allow pydoc display | 
 | 14987 |   __doc__ of data descriptors. | 
 | 14988 |  | 
 | 14989 | - Fixed socket speed loss caused by use of the _socketobject wrapper class | 
 | 14990 |   in socket.py. | 
 | 14991 |  | 
 | 14992 | - timeit.py now checks the current directory for imports. | 
 | 14993 |  | 
 | 14994 | - urllib2.py now knows how to order proxy classes, so the user doesn't | 
 | 14995 |   have to insert it in front of other classes, nor do dirty tricks like | 
 | 14996 |   inserting a "dummy" HTTPHandler after a ProxyHandler when building an | 
 | 14997 |   opener with proxy support. | 
 | 14998 |  | 
 | 14999 | - Iterators have been added for dbm keys. | 
 | 15000 |  | 
 | 15001 | - random.Random objects can now be pickled. | 
 | 15002 |  | 
 | 15003 | Tools/Demos | 
 | 15004 | ----------- | 
 | 15005 |  | 
 | 15006 | - pydoc now offers help on keywords and topics. | 
 | 15007 |  | 
 | 15008 | - Tools/idle is gone; long live Lib/idlelib. | 
 | 15009 |  | 
 | 15010 | - diff.py prints file diffs in context, unified, or ndiff formats, | 
 | 15011 |   providing a command line interface to difflib.py. | 
 | 15012 |  | 
 | 15013 | - texcheck.py is a new script for making a rough validation of Python LaTeX | 
 | 15014 |   files. | 
 | 15015 |  | 
 | 15016 | Build | 
 | 15017 | ----- | 
 | 15018 |  | 
 | 15019 | - Setting DESTDIR during 'make install' now allows specifying a | 
 | 15020 |   different root directory. | 
 | 15021 |  | 
 | 15022 | C API | 
 | 15023 | ----- | 
 | 15024 |  | 
 | 15025 | - PyType_Ready():  If a type declares that it participates in gc | 
 | 15026 |   (Py_TPFLAGS_HAVE_GC), and its base class does not, and its base class's | 
 | 15027 |   tp_free slot is the default _PyObject_Del, and type does not define | 
 | 15028 |   a tp_free slot itself, _PyObject_GC_Del is assigned to type->tp_free. | 
 | 15029 |   Previously _PyObject_Del was inherited, which could at best lead to a | 
 | 15030 |   segfault.  In addition, if even after this magic the type's tp_free | 
 | 15031 |   slot is _PyObject_Del or NULL, and the type is a base type | 
 | 15032 |   (Py_TPFLAGS_BASETYPE), TypeError is raised:  since the type is a base | 
 | 15033 |   type, its dealloc function must call type->tp_free, and since the type | 
 | 15034 |   is gc'able, tp_free must not be NULL or _PyObject_Del. | 
 | 15035 |  | 
 | 15036 | - PyThreadState_SetAsyncExc(): A new API (deliberately accessible only | 
 | 15037 |   from C) to interrupt a thread by sending it an exception.  It is | 
 | 15038 |   intentional that you have to write your own C extension to call it | 
 | 15039 |   from Python. | 
 | 15040 |  | 
 | 15041 |  | 
 | 15042 | New platforms | 
 | 15043 | ------------- | 
 | 15044 |  | 
 | 15045 | None this time. | 
 | 15046 |  | 
 | 15047 | Tests | 
 | 15048 | ----- | 
 | 15049 |  | 
 | 15050 | - test_imp rewritten so that it doesn't raise RuntimeError if run as a | 
 | 15051 |   side effect of being imported ("import test.autotest"). | 
 | 15052 |  | 
 | 15053 | Windows | 
 | 15054 | ------- | 
 | 15055 |  | 
 | 15056 | - The Windows installer ships with Tcl/Tk 8.4.3 (upgraded from 8.4.1). | 
 | 15057 |  | 
 | 15058 | - The installer always suggested that Python be installed on the C: | 
 | 15059 |   drive, due to a hardcoded "C:" generated by the Wise installation | 
 | 15060 |   wizard.  People with machines where C: is not the system drive | 
 | 15061 |   usually want Python installed on whichever drive is their system drive | 
 | 15062 |   instead.  We removed the hardcoded "C:", and two testers on machines | 
 | 15063 |   where C: is not the system drive report that the installer now | 
 | 15064 |   suggests their system drive.  Note that you can always select the | 
 | 15065 |   directory you want in the "Select Destination Directory" dialog -- | 
 | 15066 |   that's what it's for. | 
 | 15067 |  | 
 | 15068 | Mac | 
 | 15069 | --- | 
 | 15070 |  | 
 | 15071 | - There's a new module called "autoGIL", which offers a mechanism to | 
 | 15072 |   automatically release the Global Interpreter Lock when an event loop | 
 | 15073 |   goes to sleep, allowing other threads to run. It's currently only | 
 | 15074 |   supported on OSX, in the Mach-O version. | 
 | 15075 | - The OSA modules now allow direct access to properties of the | 
 | 15076 |   toplevel application class (in AppleScript terminology). | 
 | 15077 | - The Package Manager can now update itself. | 
 | 15078 |  | 
 | 15079 | SourceForge Bugs and Patches Applied | 
 | 15080 | ------------------------------------ | 
 | 15081 |  | 
 | 15082 | 430160, 471893, 501716, 542562, 549151, 569574, 595837, 596434, | 
 | 15083 | 598163, 604210, 604716, 610332, 612627, 614770, 620190, 621891, | 
 | 15084 | 622042, 639139, 640236, 644345, 649742, 649742, 658233, 660022, | 
 | 15085 | 661318, 661676, 662807, 662923, 666219, 672855, 678325, 682347, | 
 | 15086 | 683486, 684981, 685773, 686254, 692776, 692959, 693094, 696777, | 
 | 15087 | 697989, 700827, 703666, 708495, 708604, 708901, 710733, 711902, | 
 | 15088 | 713722, 715782, 718286, 719359, 719367, 723136, 723831, 723962, | 
 | 15089 | 724588, 724767, 724767, 725942, 726150, 726446, 726869, 727051, | 
 | 15090 | 727719, 727719, 727805, 728277, 728563, 728656, 729096, 729103, | 
 | 15091 | 729293, 729297, 729300, 729317, 729395, 729622, 729817, 730170, | 
 | 15092 | 730296, 730594, 730685, 730826, 730963, 731209, 731403, 731504, | 
 | 15093 | 731514, 731626, 731635, 731643, 731644, 731644, 731689, 732124, | 
 | 15094 | 732143, 732234, 732284, 732284, 732479, 732761, 732783, 732951, | 
 | 15095 | 733667, 733781, 734118, 734231, 734869, 735051, 735293, 735527, | 
 | 15096 | 735613, 735694, 736962, 736962, 737970, 738066, 739313, 740055, | 
 | 15097 | 740234, 740301, 741806, 742126, 742741, 742860, 742860, 742911, | 
 | 15098 | 744041, 744104, 744238, 744687, 744877, 745055, 745478, 745525, | 
 | 15099 | 745620, 746012, 746304, 746366, 746801, 746953, 747348, 747667, | 
 | 15100 | 747954, 748846, 748849, 748973, 748975, 749191, 749210, 749759, | 
 | 15101 | 749831, 749911, 750008, 750092, 750542, 750595, 751038, 751107, | 
 | 15102 | 751276, 751451, 751916, 751941, 751956, 751998, 752671, 753451, | 
 | 15103 | 753602, 753617, 753845, 753925, 754014, 754340, 754447, 755031, | 
 | 15104 | 755087, 755147, 755245, 755683, 755987, 756032, 756996, 757058, | 
 | 15105 | 757229, 757818, 757821, 757822, 758112, 758910, 759227, 759889, | 
 | 15106 | 760257, 760703, 760792, 761104, 761337, 761519, 761830, 762455 | 
 | 15107 |  | 
 | 15108 |  | 
 | 15109 | What's New in Python 2.3 beta 1? | 
 | 15110 | ================================ | 
 | 15111 |  | 
 | 15112 | *Release date: 25-Apr-2003* | 
 | 15113 |  | 
 | 15114 | Core and builtins | 
 | 15115 | ----------------- | 
 | 15116 |  | 
 | 15117 | - New format codes B, H, I, k and K have been implemented for | 
 | 15118 |   PyArg_ParseTuple and PyBuild_Value. | 
 | 15119 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 15120 | - New built-in function sum(seq, start=0) returns the sum of all the | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 15121 |   items in iterable object seq, plus start (items are normally numbers, | 
 | 15122 |   and cannot be strings). | 
 | 15123 |  | 
 | 15124 | - bool() called without arguments now returns False rather than | 
 | 15125 |   raising an exception.  This is consistent with calling the | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 15126 |   constructors for the other built-in types -- called without argument | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 15127 |   they all return the false value of that type.  (SF patch #724135) | 
 | 15128 |  | 
 | 15129 | - In support of PEP 269 (making the pgen parser generator accessible | 
 | 15130 |   from Python), some changes to the pgen code structure were made; a | 
 | 15131 |   few files that used to be linked only with pgen are now linked with | 
 | 15132 |   Python itself. | 
 | 15133 |  | 
 | 15134 | - The repr() of a weakref object now shows the __name__ attribute of | 
 | 15135 |   the referenced object, if it has one. | 
 | 15136 |  | 
 | 15137 | - super() no longer ignores data descriptors, except __class__.  See | 
 | 15138 |   the thread started at | 
 | 15139 |   http://mail.python.org/pipermail/python-dev/2003-April/034338.html | 
 | 15140 |  | 
 | 15141 | - list.insert(i, x) now interprets negative i as it would be | 
 | 15142 |   interpreted by slicing, so negative values count from the end of the | 
 | 15143 |   list.  This was the only place where such an interpretation was not | 
 | 15144 |   placed on a list index. | 
 | 15145 |  | 
 | 15146 | - range() now works even if the arguments are longs with magnitude | 
 | 15147 |   larger than sys.maxint, as long as the total length of the sequence | 
 | 15148 |   fits.  E.g., range(2**100, 2**101, 2**100) is the following list: | 
 | 15149 |   [1267650600228229401496703205376L].  (SF patch #707427.) | 
 | 15150 |  | 
 | 15151 | - Some horridly obscure problems were fixed involving interaction | 
 | 15152 |   between garbage collection and old-style classes with "ambitious" | 
 | 15153 |   getattr hooks.  If an old-style instance didn't have a __del__ method, | 
 | 15154 |   but did have a __getattr__ hook, and the instance became reachable | 
 | 15155 |   only from an unreachable cycle, and the hook resurrected or deleted | 
 | 15156 |   unreachable objects when asked to resolve "__del__", anything up to | 
 | 15157 |   a segfault could happen.  That's been repaired. | 
 | 15158 |  | 
 | 15159 | - dict.pop now takes an optional argument specifying a default | 
 | 15160 |   value to return if the key is not in the dict.  If a default is not | 
 | 15161 |   given and the key is not found, a KeyError will still be raised. | 
 | 15162 |   Parallel changes were made to UserDict.UserDict and UserDict.DictMixin. | 
 | 15163 |   [SF patch #693753] (contributed by Michael Stone.) | 
 | 15164 |  | 
 | 15165 | - sys.getfilesystemencoding() was added to expose | 
 | 15166 |   Py_FileSystemDefaultEncoding. | 
 | 15167 |  | 
 | 15168 | - New function sys.exc_clear() clears the current exception.  This is | 
 | 15169 |   rarely needed, but can sometimes be useful to release objects | 
 | 15170 |   referenced by the traceback held in sys.exc_info()[2].  (SF patch | 
 | 15171 |   #693195.) | 
 | 15172 |  | 
 | 15173 | - On 64-bit systems, a dictionary could contain duplicate long/int keys | 
 | 15174 |   if the key value was larger than 2**32.  See SF bug #689659. | 
 | 15175 |  | 
 | 15176 | - Fixed SF bug #663074. The codec system was using global static | 
 | 15177 |   variables to store internal data. As a result, any attempts to use the | 
 | 15178 |   unicode system with multiple active interpreters, or successive | 
 | 15179 |   interpreter executions, would fail. | 
 | 15180 |  | 
 | 15181 | - "%c" % u"a" now returns a unicode string instead of raising a | 
 | 15182 |   TypeError. u"%c" % 0xffffffff now raises a OverflowError instead | 
 | 15183 |   of a ValueError to be consistent with "%c" % 256. See SF patch #710127. | 
 | 15184 |  | 
 | 15185 | Extension modules | 
 | 15186 | ----------------- | 
 | 15187 |  | 
 | 15188 | - The socket module now provides the functions inet_pton and inet_ntop | 
 | 15189 |   for converting between string and packed representation of IP | 
 | 15190 |   addresses.  There is also a new module variable, has_ipv6, which is | 
 | 15191 |   True iff the current Python has IPv6 support.  See SF patch #658327. | 
 | 15192 |  | 
 | 15193 | - Tkinter wrappers around Tcl variables now pass objects directly | 
 | 15194 |   to Tcl, instead of first converting them to strings. | 
 | 15195 |  | 
 | 15196 | - The .*? pattern in the re module is now special-cased to avoid the | 
 | 15197 |   recursion limit.  (SF patch #720991 -- many thanks to Gary Herron | 
 | 15198 |   and Greg Chapman.) | 
 | 15199 |  | 
 | 15200 | - New function sys.call_tracing() allows pdb to debug code | 
 | 15201 |   recursively. | 
 | 15202 |  | 
 | 15203 | - New function gc.get_referents(obj) returns a list of objects | 
 | 15204 |   directly referenced by obj.  In effect, it exposes what the object's | 
 | 15205 |   tp_traverse slot does, and can be helpful when debugging memory | 
 | 15206 |   leaks. | 
 | 15207 |  | 
 | 15208 | - The iconv module has been removed from this release. | 
 | 15209 |  | 
 | 15210 | - The platform-independent routines for packing floats in IEEE formats | 
 | 15211 |   (struct.pack's <f, >f, <d, and >d codes; pickle and cPickle's protocol 1 | 
 | 15212 |   pickling of floats) ignored that rounding can cause a carry to | 
 | 15213 |   propagate.  The worst consequence was that, in rare cases, <f and >f | 
 | 15214 |   could produce strings that, when unpacked again, were a factor of 2 | 
 | 15215 |   away from the original float.  This has been fixed.  See SF bug | 
 | 15216 |   #705836. | 
 | 15217 |  | 
 | 15218 | - New function time.tzset() provides access to the C library tzset() | 
 | 15219 |   function, if supported.  (SF patch #675422.) | 
 | 15220 |  | 
 | 15221 | - Using createfilehandler, deletefilehandler, createtimerhandler functions | 
 | 15222 |   on Tkinter.tkinter (_tkinter module) no longer crashes the interpreter. | 
 | 15223 |   See SF bug #692416. | 
 | 15224 |  | 
 | 15225 | - Modified the fcntl.ioctl() function to allow modification of a passed | 
 | 15226 |   mutable buffer (for details see the reference documentation). | 
 | 15227 |  | 
 | 15228 | - Made user requested changes to the itertools module. | 
 | 15229 |   Subsumed the times() function into repeat(). | 
 | 15230 |   Added chain() and cycle(). | 
 | 15231 |  | 
 | 15232 | - The rotor module is now deprecated; the encryption algorithm it uses | 
 | 15233 |   is not believed to be secure, and including crypto code with Python | 
 | 15234 |   has implications for exporting and importing it in various countries. | 
 | 15235 |  | 
 | 15236 | - The socket module now always uses the _socketobject wrapper class, even on | 
 | 15237 |   platforms which have dup(2).  The makefile() method is built directly | 
 | 15238 |   on top of the socket without duplicating the file descriptor, allowing | 
 | 15239 |   timeouts to work properly. | 
 | 15240 |  | 
 | 15241 | Library | 
 | 15242 | ------- | 
 | 15243 |  | 
 | 15244 | - New generator function os.walk() is an easy-to-use alternative to | 
 | 15245 |   os.path.walk().  See os module docs for details.  os.path.walk() | 
 | 15246 |   isn't deprecated at this time, but may become deprecated in a | 
 | 15247 |   future release. | 
 | 15248 |  | 
 | 15249 | - Added new module "platform" which provides a wide range of tools | 
 | 15250 |   for querying platform dependent features. | 
 | 15251 |  | 
 | 15252 | - netrc now allows ASCII punctuation characters in passwords. | 
 | 15253 |  | 
 | 15254 | - shelve now supports the optional writeback argument, and exposes | 
 | 15255 |   pickle protocol versions. | 
 | 15256 |  | 
 | 15257 | - Several methods of nntplib.NNTP have grown an optional file argument | 
 | 15258 |   which specifies a file where to divert the command's output | 
 | 15259 |   (already supported by the body() method).  (SF patch #720468) | 
 | 15260 |  | 
 | 15261 | - The self-documenting XML server library DocXMLRPCServer was added. | 
 | 15262 |  | 
 | 15263 | - Support for internationalized domain names has been added through | 
 | 15264 |   the 'idna' and 'punycode' encodings, the 'stringprep' module, the | 
 | 15265 |   'mkstringprep' tool, and enhancements to the socket and httplib | 
 | 15266 |   modules. | 
 | 15267 |  | 
 | 15268 | - htmlentitydefs has two new dictionaries: name2codepoint maps | 
 | 15269 |   HTML entity names to Unicode codepoints (as integers). | 
 | 15270 |   codepoint2name is the reverse mapping. See SF patch #722017. | 
 | 15271 |  | 
 | 15272 | - pdb has a new command, "debug", which lets you step through | 
 | 15273 |   arbitrary code from the debugger's (pdb) prompt. | 
 | 15274 |  | 
 | 15275 | - unittest.failUnlessEqual and its equivalent unittest.assertEqual now | 
 | 15276 |   return 'not a == b' rather than 'a != b'.  This gives the desired | 
 | 15277 |   result for classes that define __eq__ without defining __ne__. | 
 | 15278 |  | 
 | 15279 | - sgmllib now supports SGML marked sections, in particular the | 
 | 15280 |   MS Office extensions. | 
 | 15281 |  | 
 | 15282 | - The urllib module now offers support for the iterator protocol. | 
 | 15283 |   SF patch 698520 contributed by Brett Cannon. | 
 | 15284 |  | 
 | 15285 | - New module timeit provides a simple framework for timing the | 
 | 15286 |   execution speed of expressions and statements. | 
 | 15287 |  | 
 | 15288 | - sets.Set objects now support mixed-type __eq__ and __ne__, instead | 
 | 15289 |   of raising TypeError.  If x is a Set object and y is a non-Set object, | 
 | 15290 |   x == y is False, and x != y is True.  This is akin to the change made | 
 | 15291 |   for mixed-type comparisons of datetime objects in 2.3a2; more info | 
 | 15292 |   about the rationale is in the NEWS entry for that.  See also SF bug | 
 | 15293 |   report <http://www.python.org/sf/693121>. | 
 | 15294 |  | 
 | 15295 | - On Unix platforms, if os.listdir() is called with a Unicode argument, | 
 | 15296 |   it now returns Unicode strings.  (This behavior was added earlier | 
 | 15297 |   to the Windows NT/2k/XP version of os.listdir().) | 
 | 15298 |  | 
 | 15299 | - Distutils: both 'py_modules' and 'packages' keywords can now be specified | 
 | 15300 |   in core.setup().  Previously you could supply one or the other, but | 
 | 15301 |   not both of them.  (SF patch #695090 from Bernhard Herzog) | 
 | 15302 |  | 
 | 15303 | - New csv package makes it easy to read/write CSV files. | 
 | 15304 |  | 
 | 15305 | - Module shlex has been extended to allow posix-like shell parsings, | 
 | 15306 |   including a split() function for easy spliting of quoted strings and | 
 | 15307 |   commands. An iterator interface was also implemented. | 
 | 15308 |  | 
 | 15309 | Tools/Demos | 
 | 15310 | ----------- | 
 | 15311 |  | 
 | 15312 | - New script combinerefs.py helps analyze new PYTHONDUMPREFS output. | 
 | 15313 |   See the module docstring for details. | 
 | 15314 |  | 
 | 15315 | Build | 
 | 15316 | ----- | 
 | 15317 |  | 
 | 15318 | - Fix problem building on OSF1 because the compiler only accepted | 
 | 15319 |   preprocessor directives that start in column 1.  (SF bug #691793.) | 
 | 15320 |  | 
 | 15321 | C API | 
 | 15322 | ----- | 
 | 15323 |  | 
 | 15324 | - Added PyGC_Collect(), equivalent to calling gc.collect(). | 
 | 15325 |  | 
 | 15326 | - PyThreadState_GetDict() was changed not to raise an exception or | 
 | 15327 |   issue a fatal error when no current thread state is available.  This | 
 | 15328 |   makes it possible to print dictionaries when no thread is active. | 
 | 15329 |  | 
 | 15330 | - LONG_LONG was renamed to PY_LONG_LONG.  Extensions that use this and | 
 | 15331 |   need compatibility with previous versions can use this: | 
 | 15332 |  | 
 | 15333 |     #ifndef  PY_LONG_LONG | 
 | 15334 |     #define  PY_LONG_LONG  LONG_LONG | 
 | 15335 |     #endif | 
 | 15336 |  | 
 | 15337 | - Added PyObject_SelfIter() to fill the tp_iter slot for the | 
 | 15338 |   typical case where the method returns its self argument. | 
 | 15339 |  | 
 | 15340 | - The extended type structure used for heap types (new-style | 
 | 15341 |   classes defined by Python code using a class statement) is now | 
 | 15342 |   exported from object.h as PyHeapTypeObject.  (SF patch #696193.) | 
 | 15343 |  | 
 | 15344 | New platforms | 
 | 15345 | ------------- | 
 | 15346 |  | 
 | 15347 | None this time. | 
 | 15348 |  | 
 | 15349 | Tests | 
 | 15350 | ----- | 
 | 15351 |  | 
 | 15352 | - test_timeout now requires -u network to be passed to regrtest to run. | 
 | 15353 |   See SF bug #692988. | 
 | 15354 |  | 
 | 15355 | Windows | 
 | 15356 | ------- | 
 | 15357 |  | 
 | 15358 | - os.fsync() now exists on Windows, and calls the Microsoft _commit() | 
 | 15359 |   function. | 
 | 15360 |  | 
 | 15361 | - New function winsound.MessageBeep() wraps the Win32 API | 
 | 15362 |   MessageBeep(). | 
 | 15363 |  | 
 | 15364 | Mac | 
 | 15365 | --- | 
 | 15366 |  | 
 | 15367 | - os.listdir() now returns Unicode strings on MacOS X when called with | 
 | 15368 |   a Unicode argument. See the general news item under "Library". | 
 | 15369 |  | 
 | 15370 | - A new method MacOS.WMAvailable() returns true if it is safe to access | 
 | 15371 |   the window manager, false otherwise. | 
 | 15372 |  | 
 | 15373 | - EasyDialogs dialogs are now movable-modal, and if the application is | 
 | 15374 |   currently in the background they will ask to be moved to the foreground | 
 | 15375 |   before displaying. | 
 | 15376 |  | 
 | 15377 | - OSA Scripting support has improved a lot, and gensuitemodule.py can now | 
 | 15378 |   be used by mere mortals. The documentation is now also more or less | 
 | 15379 |   complete. | 
 | 15380 |  | 
 | 15381 | - The IDE (in a framework build) now includes introductory documentation | 
 | 15382 |   in Apple Help Viewer format. | 
 | 15383 |  | 
 | 15384 |  | 
 | 15385 | What's New in Python 2.3 alpha 2? | 
 | 15386 | ================================= | 
 | 15387 |  | 
 | 15388 | *Release date: 19-Feb-2003* | 
 | 15389 |  | 
 | 15390 | Core and builtins | 
 | 15391 | ----------------- | 
 | 15392 |  | 
 | 15393 | - Negative positions returned from PEP 293 error callbacks are now | 
 | 15394 |   treated as being relative to the end of the input string. Positions | 
 | 15395 |   that are out of bounds raise an IndexError. | 
 | 15396 |  | 
 | 15397 | - sys.path[0] (the directory from which the script is loaded) is now | 
 | 15398 |   turned into an absolute pathname, unless it is the empty string. | 
 | 15399 |   (SF patch #664376.) | 
 | 15400 |  | 
 | 15401 | - Finally fixed the bug in compile() and exec where a string ending | 
 | 15402 |   with an indented code block but no newline would raise SyntaxError. | 
 | 15403 |   This would have been a four-line change in parsetok.c...  Except | 
 | 15404 |   codeop.py depends on this behavior, so a compilation flag had to be | 
 | 15405 |   invented that causes the tokenizer to revert to the old behavior; | 
 | 15406 |   this required extra changes to 2 .h files, 2 .c files, and 2 .py | 
 | 15407 |   files.  (Fixes SF bug #501622.) | 
 | 15408 |  | 
 | 15409 | - If a new-style class defines neither __new__ nor __init__, its | 
 | 15410 |   constructor would ignore all arguments.  This is changed now: the | 
 | 15411 |   constructor refuses arguments in this case.  This might break code | 
 | 15412 |   that worked under Python 2.2.  The simplest fix is to add a no-op | 
 | 15413 |   __init__: ``def __init__(self, *args, **kw): pass``. | 
 | 15414 |  | 
 | 15415 | - Through a bytecode optimizer bug (and I bet you didn't even know | 
 | 15416 |   Python *had* a bytecode optimizer :-), "unsigned" hex/oct constants | 
 | 15417 |   with a leading minus sign would come out with the wrong sign. | 
 | 15418 |   ("Unsigned" hex/oct constants are those with a face value in the | 
 | 15419 |   range sys.maxint+1 through sys.maxint*2+1, inclusive; these have | 
 | 15420 |   always been interpreted as negative numbers through sign folding.) | 
 | 15421 |   E.g. 0xffffffff is -1, and -(0xffffffff) is 1, but -0xffffffff would | 
 | 15422 |   come out as -4294967295.  This was the case in Python 2.2 through | 
 | 15423 |   2.2.2 and 2.3a1, and in Python 2.4 it will once again have that | 
 | 15424 |   value, but according to PEP 237 it really needs to be 1 now.  This | 
 | 15425 |   will be backported to Python 2.2.3 a well.  (SF #660455) | 
 | 15426 |  | 
 | 15427 | - int(s, base) sometimes sign-folds hex and oct constants; it only | 
 | 15428 |   does this when base is 0 and s.strip() starts with a '0'.  When the | 
 | 15429 |   sign is actually folded, as in int("0xffffffff", 0) on a 32-bit | 
 | 15430 |   machine, which returns -1, a FutureWarning is now issued; in Python | 
 | 15431 |   2.4, this will return 4294967295L, as do int("+0xffffffff", 0) and | 
 | 15432 |   int("0xffffffff", 16) right now.  (PEP 347) | 
 | 15433 |  | 
 | 15434 | - super(X, x): x may now be a proxy for an X instance, i.e. | 
 | 15435 |   issubclass(x.__class__, X) but not issubclass(type(x), X). | 
 | 15436 |  | 
 | 15437 | - isinstance(x, X): if X is a new-style class, this is now equivalent | 
 | 15438 |   to issubclass(type(x), X) or issubclass(x.__class__, X).  Previously | 
 | 15439 |   only type(x) was tested.  (For classic classes this was already the | 
 | 15440 |   case.) | 
 | 15441 |  | 
 | 15442 | - compile(), eval() and the exec statement now fully support source code | 
 | 15443 |   passed as unicode strings. | 
 | 15444 |  | 
 | 15445 | - int subclasses can be initialized with longs if the value fits in an int. | 
 | 15446 |   See SF bug #683467. | 
 | 15447 |  | 
 | 15448 | - long(string, base) takes time linear in len(string) when base is a power | 
 | 15449 |   of 2 now.  It used to take time quadratic in len(string). | 
 | 15450 |  | 
 | 15451 | - filter returns now Unicode results for Unicode arguments. | 
 | 15452 |  | 
 | 15453 | - raw_input can now return Unicode objects. | 
 | 15454 |  | 
 | 15455 | - List objects' sort() method now accepts None as the comparison function. | 
 | 15456 |   Passing None is semantically identical to calling sort() with no | 
 | 15457 |   arguments. | 
 | 15458 |  | 
 | 15459 | - Fixed crash when printing a subclass of str and __str__ returned self. | 
 | 15460 |   See SF bug #667147. | 
 | 15461 |  | 
 | 15462 | - Fixed an invalid RuntimeWarning and an undetected error when trying | 
 | 15463 |   to convert a long integer into a float which couldn't fit. | 
 | 15464 |   See SF bug #676155. | 
 | 15465 |  | 
 | 15466 | - Function objects now have a __module__ attribute that is bound to | 
 | 15467 |   the name of the module in which the function was defined.  This | 
 | 15468 |   applies for C functions and methods as well as functions and methods | 
 | 15469 |   defined in Python.  This attribute is used by pickle.whichmodule(), | 
 | 15470 |   which changes the behavior of whichmodule slightly.  In Python 2.2 | 
 | 15471 |   whichmodule() returns "__main__" for functions that are not defined | 
 | 15472 |   at the top-level of a module (examples: methods, nested functions). | 
 | 15473 |   Now whichmodule() will return the proper module name. | 
 | 15474 |  | 
 | 15475 | Extension modules | 
 | 15476 | ----------------- | 
 | 15477 |  | 
 | 15478 | - operator.isNumberType() now checks that the object has a nb_int or | 
 | 15479 |   nb_float slot, rather than simply checking whether it has a non-NULL | 
 | 15480 |   tp_as_number pointer. | 
 | 15481 |  | 
 | 15482 | - The imp module now has ways to acquire and release the "import | 
 | 15483 |   lock": imp.acquire_lock() and imp.release_lock().  Note: this is a | 
 | 15484 |   reentrant lock, so releasing the lock only truly releases it when | 
 | 15485 |   this is the last release_lock() call.  You can check with | 
 | 15486 |   imp.lock_held().  (SF bug #580952 and patch #683257.) | 
 | 15487 |  | 
 | 15488 | - Change to cPickle to match pickle.py (see below and PEP 307). | 
 | 15489 |  | 
 | 15490 | - Fix some bugs in the parser module.  SF bug #678518. | 
 | 15491 |  | 
 | 15492 | - Thanks to Scott David Daniels, a subtle bug in how the zlib | 
 | 15493 |   extension implemented flush() was fixed.  Scott also rewrote the | 
 | 15494 |   zlib test suite using the unittest module.  (SF bug #640230 and | 
 | 15495 |   patch #678531.) | 
 | 15496 |  | 
 | 15497 | - Added an itertools module containing high speed, memory efficient | 
 | 15498 |   looping constructs inspired by tools from Haskell and SML. | 
 | 15499 |  | 
 | 15500 | - The SSL module now handles sockets with a timeout set correctly (SF | 
 | 15501 |   patch #675750, fixing SF bug #675552). | 
 | 15502 |  | 
 | 15503 | - os/posixmodule has grown the sysexits.h constants (EX_OK and friends). | 
 | 15504 |  | 
 | 15505 | - Fixed broken threadstate swap in readline that could cause fatal | 
 | 15506 |   errors when a readline hook was being invoked while a background | 
 | 15507 |   thread was active.  (SF bugs #660476 and #513033.) | 
 | 15508 |  | 
 | 15509 | - fcntl now exposes the strops.h I_* constants. | 
 | 15510 |  | 
 | 15511 | - Fix a crash on Solaris that occurred when calling close() on | 
 | 15512 |   an mmap'ed file which was already closed.  (SF patch #665913) | 
 | 15513 |  | 
 | 15514 | - Fixed several serious bugs in the zipimport implementation. | 
 | 15515 |  | 
 | 15516 | - datetime changes: | 
 | 15517 |  | 
 | 15518 |   The date class is now properly subclassable.  (SF bug #720908) | 
 | 15519 |  | 
 | 15520 |   The datetime and datetimetz classes have been collapsed into a single | 
 | 15521 |   datetime class, and likewise the time and timetz classes into a single | 
 | 15522 |   time class.  Previously, a datetimetz object with tzinfo=None acted | 
 | 15523 |   exactly like a datetime object, and similarly for timetz.  This wasn't | 
 | 15524 |   enough of a difference to justify distinct classes, and life is simpler | 
 | 15525 |   now. | 
 | 15526 |  | 
 | 15527 |   today() and now() now round system timestamps to the closest | 
 | 15528 |   microsecond <http://www.python.org/sf/661086>.  This repairs an | 
 | 15529 |   irritation most likely seen on Windows systems. | 
 | 15530 |  | 
 | 15531 |   In dt.astimezone(tz), if tz.utcoffset(dt) returns a duration, | 
 | 15532 |   ValueError is raised if tz.dst(dt) returns None (2.3a1 treated it | 
 | 15533 |   as 0 instead, but a tzinfo subclass wishing to participate in | 
 | 15534 |   time zone conversion has to take a stand on whether it supports | 
 | 15535 |   DST; if you don't care about DST, then code dst() to return 0 minutes, | 
 | 15536 |   meaning that DST is never in effect). | 
 | 15537 |  | 
 | 15538 |   The tzinfo methods utcoffset() and dst() must return a timedelta object | 
 | 15539 |   (or None) now.  In 2.3a1 they could also return an int or long, but that | 
 | 15540 |   was an unhelpfully redundant leftover from an earlier version wherein | 
 | 15541 |   they couldn't return a timedelta.  TOOWTDI. | 
 | 15542 |  | 
 | 15543 |   The example tzinfo class for local time had a bug.  It was replaced | 
 | 15544 |   by a later example coded by Guido. | 
 | 15545 |  | 
 | 15546 |   datetime.astimezone(tz) no longer raises an exception when the | 
 | 15547 |   input datetime has no UTC equivalent in tz.  For typical "hybrid" time | 
 | 15548 |   zones (a single tzinfo subclass modeling both standard and daylight | 
 | 15549 |   time), this case can arise one hour per year, at the hour daylight time | 
 | 15550 |   ends.  See new docs for details.  In short, the new behavior mimics | 
 | 15551 |   the local wall clock's behavior of repeating an hour in local time. | 
 | 15552 |  | 
 | 15553 |   dt.astimezone() can no longer be used to convert between naive and aware | 
 | 15554 |   datetime objects.  If you merely want to attach, or remove, a tzinfo | 
 | 15555 |   object, without any conversion of date and time members, use | 
 | 15556 |   dt.replace(tzinfo=whatever) instead, where "whatever" is None or a | 
 | 15557 |   tzinfo subclass instance. | 
 | 15558 |  | 
 | 15559 |   A new method tzinfo.fromutc(dt) can be overridden in tzinfo subclasses | 
 | 15560 |   to give complete control over how a UTC time is to be converted to | 
 | 15561 |   a local time.  The default astimezone() implementation calls fromutc() | 
 | 15562 |   as its last step, so a tzinfo subclass can affect that too by overriding | 
 | 15563 |   fromutc().  It's expected that the default fromutc() implementation will | 
 | 15564 |   be suitable as-is for "almost all" time zone subclasses, but the | 
 | 15565 |   creativity of political time zone fiddling appears unbounded -- fromutc() | 
 | 15566 |   allows the highly motivated to emulate any scheme expressible in Python. | 
 | 15567 |  | 
 | 15568 |   datetime.now():  The optional tzinfo argument was undocumented (that's | 
 | 15569 |   repaired), and its name was changed to tz ("tzinfo" is overloaded enough | 
 | 15570 |   already).  With a tz argument, now(tz) used to return the local date | 
 | 15571 |   and time, and attach tz to it, without any conversion of date and time | 
 | 15572 |   members.  This was less than useful.  Now now(tz) returns the current | 
 | 15573 |   date and time as local time in tz's time zone, akin to :: | 
 | 15574 |  | 
 | 15575 |       tz.fromutc(datetime.utcnow().replace(tzinfo=utc)) | 
 | 15576 |  | 
 | 15577 |   where "utc" is an instance of a tzinfo subclass modeling UTC.  Without | 
 | 15578 |   a tz argument, now() continues to return the current local date and time, | 
 | 15579 |   as a naive datetime object. | 
 | 15580 |  | 
 | 15581 |   datetime.fromtimestamp():  Like datetime.now() above, this had less than | 
 | 15582 |   useful behavior when the optional tinzo argument was specified.  See | 
 | 15583 |   also SF bug report <http://www.python.org/sf/660872>. | 
 | 15584 |  | 
 | 15585 |   date and datetime comparison:  In order to prevent comparison from | 
 | 15586 |   falling back to the default compare-object-addresses strategy, these | 
 | 15587 |   raised TypeError whenever they didn't understand the other object type. | 
 | 15588 |   They still do, except when the other object has a "timetuple" attribute, | 
 | 15589 |   in which case they return NotImplemented now.  This gives other | 
 | 15590 |   datetime objects (e.g., mxDateTime) a chance to intercept the | 
 | 15591 |   comparison. | 
 | 15592 |  | 
 | 15593 |   date, time, datetime and timedelta comparison:  When the exception | 
 | 15594 |   for mixed-type comparisons in the last paragraph doesn't apply, if | 
 | 15595 |   the comparison is == then False is returned, and if the comparison is | 
 | 15596 |   != then True is returned.  Because dict lookup and the "in" operator | 
 | 15597 |   only invoke __eq__, this allows, for example, :: | 
 | 15598 |  | 
 | 15599 |       if some_datetime in some_sequence: | 
 | 15600 |  | 
 | 15601 |   and :: | 
 | 15602 |  | 
 | 15603 |       some_dict[some_timedelta] = whatever | 
 | 15604 |  | 
 | 15605 |   to work as expected, without raising TypeError just because the | 
 | 15606 |   sequence is heterogeneous, or the dict has mixed-type keys.  [This | 
 | 15607 |   seems like a good idea to implement for all mixed-type comparisons | 
 | 15608 |   that don't want to allow falling back to address comparison.] | 
 | 15609 |  | 
 | 15610 |   The constructors building a datetime from a timestamp could raise | 
 | 15611 |   ValueError if the platform C localtime()/gmtime() inserted "leap | 
 | 15612 |   seconds".  Leap seconds are ignored now.  On such platforms, it's | 
 | 15613 |   possible to have timestamps that differ by a second, yet where | 
 | 15614 |   datetimes constructed from them are equal. | 
 | 15615 |  | 
 | 15616 |   The pickle format of date, time and datetime objects has changed | 
 | 15617 |   completely.  The undocumented pickler and unpickler functions no | 
 | 15618 |   longer exist.  The undocumented __setstate__() and __getstate__() | 
 | 15619 |   methods no longer exist either. | 
 | 15620 |  | 
 | 15621 | Library | 
 | 15622 | ------- | 
 | 15623 |  | 
 | 15624 | - The logging module was updated slightly; the WARN level was renamed | 
 | 15625 |   to WARNING, and the matching function/method warn() to warning(). | 
 | 15626 |  | 
 | 15627 | - The pickle and cPickle modules were updated with a new pickling | 
 | 15628 |   protocol (documented by pickletools.py, see below) and several | 
 | 15629 |   extensions to the pickle customization API (__reduce__, __setstate__ | 
 | 15630 |   etc.).  The copy module now uses more of the pickle customization | 
 | 15631 |   API to copy objects that don't implement __copy__ or __deepcopy__. | 
 | 15632 |   See PEP 307 for details. | 
 | 15633 |  | 
 | 15634 | - The distutils "register" command now uses http://www.python.org/pypi | 
 | 15635 |   as the default repository.  (See PEP 301.) | 
 | 15636 |  | 
| Skip Montanaro | 7a98be2 | 2007-08-16 14:35:24 +0000 | [diff] [blame] | 15637 | - the platform dependent path related variables sep, altsep, | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 15638 |   pathsep, curdir, pardir and defpath are now defined in the platform | 
 | 15639 |   dependent path modules (e.g. ntpath.py) rather than os.py, so these | 
 | 15640 |   variables are now available via os.path.  They continue to be | 
 | 15641 |   available from the os module. | 
 | 15642 |   (see <http://www.python.org/sf/680789>). | 
 | 15643 |  | 
 | 15644 | - array.array was added to the types repr.py knows about (see | 
 | 15645 |   <http://www.python.org/sf/680789>). | 
 | 15646 |  | 
 | 15647 | - The new pickletools.py contains lots of documentation about pickle | 
 | 15648 |   internals, and supplies some helpers for working with pickles, such as | 
 | 15649 |   a symbolic pickle disassembler. | 
 | 15650 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 15651 | - xmlrpclib.py now supports the built-in boolean type. | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 15652 |  | 
 | 15653 | - py_compile has a new 'doraise' flag and a new PyCompileError | 
 | 15654 |   exception. | 
 | 15655 |  | 
 | 15656 | - SimpleXMLRPCServer now supports CGI through the CGIXMLRPCRequestHandler | 
 | 15657 |   class. | 
 | 15658 |  | 
 | 15659 | - The sets module now raises TypeError in __cmp__, to clarify that | 
 | 15660 |   sets are not intended to be three-way-compared; the comparison | 
 | 15661 |   operators are overloaded as subset/superset tests. | 
 | 15662 |  | 
 | 15663 | - Bastion.py and rexec.py are disabled.  These modules are not safe in | 
 | 15664 |   Python 2.2. or 2.3. | 
 | 15665 |  | 
 | 15666 | - realpath is now exported when doing ``from poxixpath import *``. | 
 | 15667 |   It is also exported for ntpath, macpath, and os2emxpath. | 
 | 15668 |   See SF bug #659228. | 
 | 15669 |  | 
 | 15670 | - New module tarfile from Lars Gustäbel provides a comprehensive interface | 
 | 15671 |   to tar archive files with transparent gzip and bzip2 compression. | 
 | 15672 |   See SF patch #651082. | 
 | 15673 |  | 
 | 15674 | - urlparse can now parse imap:// URLs.  See SF feature request #618024. | 
 | 15675 |  | 
 | 15676 | - Tkinter.Canvas.scan_dragto() provides an optional parameter to support | 
 | 15677 |   the gain value which is passed to Tk.  SF bug# 602259. | 
 | 15678 |  | 
 | 15679 | - Fix logging.handlers.SysLogHandler protocol when using UNIX domain sockets. | 
 | 15680 |   See SF patch #642974. | 
 | 15681 |  | 
 | 15682 | - The dospath module was deleted.  Use the ntpath module when manipulating | 
 | 15683 |   DOS paths from other platforms. | 
 | 15684 |  | 
 | 15685 | Tools/Demos | 
 | 15686 | ----------- | 
 | 15687 |  | 
 | 15688 | - Two new scripts (db2pickle.py and pickle2db.py) were added to the | 
 | 15689 |   Tools/scripts directory to facilitate conversion from the old bsddb module | 
 | 15690 |   to the new one.  While the user-visible API of the new module is | 
 | 15691 |   compatible with the old one, it's likely that the version of the | 
 | 15692 |   underlying database library has changed.  To convert from the old library, | 
 | 15693 |   run the db2pickle.py script using the old version of Python to convert it | 
 | 15694 |   to a pickle file.  After upgrading Python, run the pickle2db.py script | 
 | 15695 |   using the new version of Python to reconstitute your database.  For | 
 | 15696 |   example: | 
 | 15697 |  | 
 | 15698 |     % python2.2 db2pickle.py -h some.db > some.pickle | 
 | 15699 |     % python2.3 pickle2db.py -h some.db.new < some.pickle | 
 | 15700 |  | 
 | 15701 |   Run the scripts without any args to get a usage message. | 
 | 15702 |  | 
 | 15703 |  | 
 | 15704 | Build | 
 | 15705 | ----- | 
 | 15706 |  | 
 | 15707 | - The audio driver tests (test_ossaudiodev.py and | 
 | 15708 |   test_linuxaudiodev.py) are no longer run by default.  This is | 
 | 15709 |   because they don't always work, depending on your hardware and | 
 | 15710 |   software.  To run these tests, you must use an invocation like :: | 
 | 15711 |  | 
 | 15712 |     ./python Lib/test/regrtest.py -u audio test_ossaudiodev | 
 | 15713 |  | 
 | 15714 | - On systems which build using the configure script, compiler flags which | 
 | 15715 |   used to be lumped together using the OPT flag have been split into two | 
 | 15716 |   groups, OPT and BASECFLAGS.  OPT is meant to carry just optimization- and | 
 | 15717 |   debug-related flags like "-g" and "-O3".  BASECFLAGS is meant to carry | 
 | 15718 |   compiler flags that are required to get a clean compile.  On some | 
 | 15719 |   platforms (many Linux flavors in particular) BASECFLAGS will be empty by | 
 | 15720 |   default.  On others, such as Mac OS X and SCO, it will contain required | 
 | 15721 |   flags.  This change allows people building Python to override OPT without | 
 | 15722 |   fear of clobbering compiler flags which are required to get a clean build. | 
 | 15723 |  | 
 | 15724 | - On Darwin/Mac OS X platforms, /sw/lib and /sw/include are added to the | 
 | 15725 |   relevant search lists in setup.py.  This allows users building Python to | 
 | 15726 |   take advantage of the many packages available from the fink project | 
 | 15727 |   <http://fink.sf.net/>. | 
 | 15728 |  | 
 | 15729 | - A new Makefile target, scriptsinstall, installs a number of useful scripts | 
 | 15730 |   from the Tools/scripts directory. | 
 | 15731 |  | 
 | 15732 | C API | 
 | 15733 | ----- | 
 | 15734 |  | 
 | 15735 | - PyEval_GetFrame() is now declared to return a ``PyFrameObject *`` | 
 | 15736 |   instead of a plain ``PyObject *``.  (SF patch #686601.) | 
 | 15737 |  | 
 | 15738 | - PyNumber_Check() now checks that the object has a nb_int or nb_float | 
 | 15739 |   slot, rather than simply checking whether it has a non-NULL | 
 | 15740 |   tp_as_number pointer. | 
 | 15741 |  | 
 | 15742 | - A C type that inherits from a base type that defines tp_as_buffer | 
 | 15743 |   will now inherit the tp_as_buffer pointer if it doesn't define one. | 
 | 15744 |   (SF #681367) | 
 | 15745 |  | 
 | 15746 | - The PyArg_Parse functions now issue a DeprecationWarning if a float | 
 | 15747 |   argument is provided when an integer is specified (this affects the 'b', | 
 | 15748 |   'B', 'h', 'H', 'i', and 'l' codes).  Future versions of Python will | 
 | 15749 |   raise a TypeError. | 
 | 15750 |  | 
 | 15751 | Tests | 
 | 15752 | ----- | 
 | 15753 |  | 
 | 15754 | - Several tests weren't being run from regrtest.py (test_timeout.py, | 
 | 15755 |   test_tarfile.py, test_netrc.py, test_multifile.py, | 
 | 15756 |   test_importhooks.py and test_imp.py).  Now they are.  (Note to | 
 | 15757 |   developers: please read Lib/test/README when creating a new test, to | 
 | 15758 |   make sure to do it right!  All tests need to use either unittest or | 
 | 15759 |   pydoc.) | 
 | 15760 |  | 
 | 15761 | - Added test_posix.py, a test suite for the posix module. | 
 | 15762 |  | 
 | 15763 | - Added test_hexoct.py, a test suite for hex/oct constant folding. | 
 | 15764 |  | 
 | 15765 | Windows | 
 | 15766 | ------- | 
 | 15767 |  | 
 | 15768 | - The timeout code for socket connect() didn't work right; this has | 
 | 15769 |   now been fixed.  test_timeout.py should pass (at least most of the | 
 | 15770 |   time). | 
 | 15771 |  | 
 | 15772 | - distutils' msvccompiler class now passes the preprocessor options to | 
 | 15773 |   the resource compiler.  See SF patch #669198. | 
 | 15774 |  | 
 | 15775 | - The bsddb module now ships with Sleepycat's 4.1.25.NC, the latest | 
 | 15776 |   release without strong cryptography. | 
 | 15777 |  | 
 | 15778 | - sys.path[0], if it contains a directory name, is now always an | 
 | 15779 |   absolute pathname. (SF patch #664376.) | 
 | 15780 |  | 
 | 15781 | - The new logging package is now installed by the Windows installer.  It | 
 | 15782 |   wasn't in 2.3a1 due to oversight. | 
 | 15783 |  | 
 | 15784 | Mac | 
 | 15785 | --- | 
 | 15786 |  | 
 | 15787 | - There are new dialogs EasyDialogs.AskFileForOpen, AskFileForSave | 
 | 15788 |   and AskFolder. The old macfs.StandardGetFile and friends are deprecated. | 
 | 15789 |  | 
 | 15790 | - Most of the standard library now uses pathnames or FSRefs in preference | 
 | 15791 |   of FSSpecs, and use the underlying Carbon.File and Carbon.Folder modules | 
 | 15792 |   in stead of macfs. macfs will probably be deprecated in the future. | 
 | 15793 |  | 
 | 15794 | - Type Carbon.File.FSCatalogInfo and supporting methods have been implemented. | 
 | 15795 |   This also makes macfs.FSSpec.SetDates() work again. | 
 | 15796 |  | 
 | 15797 | - There is a new module pimp, the package install manager for Python, and | 
 | 15798 |   accompanying applet PackageManager. These allow you to easily download | 
 | 15799 |   and install pretested extension packages either in source or binary | 
 | 15800 |   form. Only in MacPython-OSX. | 
 | 15801 |  | 
 | 15802 | - Applets are now built with bundlebuilder in MacPython-OSX, which should make | 
 | 15803 |   them more robust and also provides a path towards BuildApplication. The | 
 | 15804 |   downside of this change is that applets can no longer be run from the | 
 | 15805 |   Terminal window, this will hopefully be fixed in the 2.3b1. | 
 | 15806 |  | 
 | 15807 |  | 
 | 15808 | What's New in Python 2.3 alpha 1? | 
 | 15809 | ================================= | 
 | 15810 |  | 
 | 15811 | *Release date: 31-Dec-2002* | 
 | 15812 |  | 
 | 15813 | Type/class unification and new-style classes | 
 | 15814 | -------------------------------------------- | 
 | 15815 |  | 
 | 15816 | - One can now assign to __bases__ and __name__ of new-style classes. | 
 | 15817 |  | 
 | 15818 | - dict() now accepts keyword arguments so that dict(one=1, two=2) | 
 | 15819 |   is the equivalent of {"one": 1, "two": 2}.  Accordingly, | 
 | 15820 |   the existing (but undocumented) 'items' keyword argument has | 
 | 15821 |   been eliminated.  This means that dict(items=someMapping) now has | 
 | 15822 |   a different meaning than before. | 
 | 15823 |  | 
 | 15824 | - int() now returns a long object if the argument is outside the | 
 | 15825 |   integer range, so int("4" * 1000), int(1e200) and int(1L<<1000) will | 
 | 15826 |   all return long objects instead of raising an OverflowError. | 
 | 15827 |  | 
 | 15828 | - Assignment to __class__ is disallowed if either the old or the new | 
 | 15829 |   class is a statically allocated type object (such as defined by an | 
 | 15830 |   extension module).  This prevents anomalies like 2.__class__ = bool. | 
 | 15831 |  | 
 | 15832 | - New-style object creation and deallocation have been sped up | 
 | 15833 |   significantly; they are now faster than classic instance creation | 
 | 15834 |   and deallocation. | 
 | 15835 |  | 
 | 15836 | - The __slots__ variable can now mention "private" names, and the | 
 | 15837 |   right thing will happen (e.g. __slots__ = ["__foo"]). | 
 | 15838 |  | 
 | 15839 | - The built-ins slice() and buffer() are now callable types.  The | 
 | 15840 |   types classobj (formerly class), code, function, instance, and | 
 | 15841 |   instancemethod (formerly instance-method), which have no built-in | 
 | 15842 |   names but are accessible through the types module, are now also | 
 | 15843 |   callable.  The type dict-proxy is renamed to dictproxy. | 
 | 15844 |  | 
 | 15845 | - Cycles going through the __class__ link of a new-style instance are | 
 | 15846 |   now detected by the garbage collector. | 
 | 15847 |  | 
 | 15848 | - Classes using __slots__ are now properly garbage collected. | 
 | 15849 |   [SF bug 519621] | 
 | 15850 |  | 
 | 15851 | - Tightened the __slots__ rules: a slot name must be a valid Python | 
 | 15852 |   identifier. | 
 | 15853 |  | 
 | 15854 | - The constructor for the module type now requires a name argument and | 
 | 15855 |   takes an optional docstring argument.  Previously, this constructor | 
 | 15856 |   ignored its arguments.  As a consequence, deriving a class from a | 
 | 15857 |   module (not from the module type) is now illegal; previously this | 
 | 15858 |   created an unnamed module, just like invoking the module type did. | 
 | 15859 |   [SF bug 563060] | 
 | 15860 |  | 
 | 15861 | - A new type object, 'basestring', is added.  This is a common base type | 
 | 15862 |   for 'str' and 'unicode', and can be used instead of | 
 | 15863 |   types.StringTypes, e.g. to test whether something is "a string": | 
 | 15864 |   isinstance(x, basestring) is True for Unicode and 8-bit strings.  This | 
 | 15865 |   is an abstract base class and cannot be instantiated directly. | 
 | 15866 |  | 
 | 15867 | - Changed new-style class instantiation so that when C's __new__ | 
 | 15868 |   method returns something that's not a C instance, its __init__ is | 
 | 15869 |   not called.  [SF bug #537450] | 
 | 15870 |  | 
 | 15871 | - Fixed super() to work correctly with class methods.  [SF bug #535444] | 
 | 15872 |  | 
 | 15873 | - If you try to pickle an instance of a class that has __slots__ but | 
 | 15874 |   doesn't define or override __getstate__, a TypeError is now raised. | 
 | 15875 |   This is done by adding a bozo __getstate__ to the class that always | 
 | 15876 |   raises TypeError.  (Before, this would appear to be pickled, but the | 
 | 15877 |   state of the slots would be lost.) | 
 | 15878 |  | 
 | 15879 | Core and builtins | 
 | 15880 | ----------------- | 
 | 15881 |  | 
 | 15882 | - Import from zipfiles is now supported.  The name of a zipfile placed | 
 | 15883 |   on sys.path causes the import statement to look for importable Python | 
 | 15884 |   modules (with .py, pyc and .pyo extensions) and packages inside the | 
 | 15885 |   zipfile.  The zipfile import follows the specification (though not | 
 | 15886 |   the sample implementation) of PEP 273.  The semantics of __path__ are | 
 | 15887 |   compatible with those that have been implemented in Jython since | 
 | 15888 |   Jython 2.1. | 
 | 15889 |  | 
 | 15890 | - PEP 302 has been accepted.  Although it was initially developed to | 
 | 15891 |   support zipimport, it offers a new, general import hook mechanism. | 
 | 15892 |   Several new variables have been added to the sys module: | 
 | 15893 |   sys.meta_path, sys.path_hooks, and sys.path_importer_cache; these | 
 | 15894 |   make extending the import statement much more convenient than | 
 | 15895 |   overriding the __import__ built-in function.  For a description of | 
 | 15896 |   these, see PEP 302. | 
 | 15897 |  | 
 | 15898 | - A frame object's f_lineno attribute can now be written to from a | 
 | 15899 |   trace function to change which line will execute next.  A command to | 
 | 15900 |   exploit this from pdb has been added.  [SF patch #643835] | 
 | 15901 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 15902 | - The _codecs support module for codecs.py was turned into a built-in | 
 | 15903 |   module to assure that at least the built-in codecs are available | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 15904 |   to the Python parser for source code decoding according to PEP 263. | 
 | 15905 |  | 
 | 15906 | - issubclass now supports a tuple as the second argument, just like | 
 | 15907 |   isinstance does. ``issubclass(X, (A, B))`` is equivalent to | 
 | 15908 |   ``issubclass(X, A) or issubclass(X, B)``. | 
 | 15909 |  | 
 | 15910 | - Thanks to Armin Rigo, the last known way to provoke a system crash | 
 | 15911 |   by cleverly arranging for a comparison function to mutate a list | 
 | 15912 |   during a list.sort() operation has been fixed.  The effect of | 
 | 15913 |   attempting to mutate a list, or even to inspect its contents or | 
 | 15914 |   length, while a sort is in progress, is not defined by the language. | 
 | 15915 |   The C implementation of Python 2.3 attempts to detect mutations, | 
 | 15916 |   and raise ValueError if one occurs, but there's no guarantee that | 
 | 15917 |   all mutations will be caught, or that any will be caught across | 
 | 15918 |   releases or implementations. | 
 | 15919 |  | 
 | 15920 | - Unicode file name processing for Windows (PEP 277) is implemented. | 
 | 15921 |   All platforms now have an os.path.supports_unicode_filenames attribute, | 
 | 15922 |   which is set to True on Windows NT/2000/XP, and False elsewhere. | 
 | 15923 |  | 
 | 15924 | - Codec error handling callbacks (PEP 293) are implemented. | 
 | 15925 |   Error handling in unicode.encode or str.decode can now be customized. | 
 | 15926 |  | 
 | 15927 | - A subtle change to the semantics of the built-in function intern(): | 
 | 15928 |   interned strings are no longer immortal.  You must keep a reference | 
 | 15929 |   to the return value intern() around to get the benefit. | 
 | 15930 |  | 
 | 15931 | - Use of 'None' as a variable, argument or attribute name now | 
 | 15932 |   issues a SyntaxWarning.  In the future, None may become a keyword. | 
 | 15933 |  | 
 | 15934 | - SET_LINENO is gone.  co_lnotab is now consulted to determine when to | 
 | 15935 |   call the trace function.  C code that accessed f_lineno should call | 
 | 15936 |   PyCode_Addr2Line instead (f_lineno is still there, but only kept up | 
 | 15937 |   to date when there is a trace function set). | 
 | 15938 |  | 
 | 15939 | - There's a new warning category, FutureWarning.  This is used to warn | 
 | 15940 |   about a number of situations where the value or sign of an integer | 
 | 15941 |   result will change in Python 2.4 as a result of PEP 237 (integer | 
 | 15942 |   unification).  The warnings implement stage B0 mentioned in that | 
 | 15943 |   PEP.  The warnings are about the following situations: | 
 | 15944 |  | 
 | 15945 |     - Octal and hex literals without 'L' prefix in the inclusive range | 
 | 15946 |       [0x80000000..0xffffffff]; these are currently negative ints, but | 
 | 15947 |       in Python 2.4 they will be positive longs with the same bit | 
 | 15948 |       pattern. | 
 | 15949 |  | 
 | 15950 |     - Left shifts on integer values that cause the outcome to lose | 
 | 15951 |       bits or have a different sign than the left operand.  To be | 
 | 15952 |       precise: x<<n where this currently doesn't yield the same value | 
 | 15953 |       as long(x)<<n; in Python 2.4, the outcome will be long(x)<<n. | 
 | 15954 |  | 
 | 15955 |     - Conversions from ints to string that show negative values as | 
 | 15956 |       unsigned ints in the inclusive range [0x80000000..0xffffffff]; | 
 | 15957 |       this affects the functions hex() and oct(), and the string | 
 | 15958 |       formatting codes %u, %o, %x, and %X.  In Python 2.4, these will | 
 | 15959 |       show signed values (e.g. hex(-1) currently returns "0xffffffff"; | 
 | 15960 |       in Python 2.4 it will return "-0x1"). | 
 | 15961 |  | 
 | 15962 | - The bits manipulated under the cover by sys.setcheckinterval() have | 
 | 15963 |   been changed.  Both the check interval and the ticker used to be | 
 | 15964 |   per-thread values.  They are now just a pair of global variables. | 
 | 15965 |   In addition, the default check interval was boosted from 10 to 100 | 
 | 15966 |   bytecode instructions.  This may have some effect on systems that | 
 | 15967 |   relied on the old default value.  In particular, in multi-threaded | 
 | 15968 |   applications which try to be highly responsive, response time will | 
 | 15969 |   increase by some (perhaps imperceptible) amount. | 
 | 15970 |  | 
 | 15971 | - When multiplying very large integers, a version of the so-called | 
 | 15972 |   Karatsuba algorithm is now used.  This is most effective if the | 
 | 15973 |   inputs have roughly the same size.  If they both have about N digits, | 
 | 15974 |   Karatsuba multiplication has O(N**1.58) runtime (the exponent is | 
 | 15975 |   log_base_2(3)) instead of the previous O(N**2).  Measured results may | 
 | 15976 |   be better or worse than that, depending on platform quirks.  Besides | 
 | 15977 |   the O() improvement in raw instruction count, the Karatsuba algorithm | 
 | 15978 |   appears to have much better cache behavior on extremely large integers | 
 | 15979 |   (starting in the ballpark of a million bits).  Note that this is a | 
 | 15980 |   simple implementation, and there's no intent here to compete with, | 
 | 15981 |   e.g., GMP.  It gives a very nice speedup when it applies, but a package | 
 | 15982 |   devoted to fast large-integer arithmetic should run circles around it. | 
 | 15983 |  | 
 | 15984 | - u'%c' will now raise a ValueError in case the argument is an | 
 | 15985 |   integer outside the valid range of Unicode code point ordinals. | 
 | 15986 |  | 
 | 15987 | - The tempfile module has been overhauled for enhanced security.  The | 
 | 15988 |   mktemp() function is now deprecated; new, safe replacements are | 
 | 15989 |   mkstemp() (for files) and mkdtemp() (for directories), and the | 
 | 15990 |   higher-level functions NamedTemporaryFile() and TemporaryFile(). | 
 | 15991 |   Use of some global variables in this module is also deprecated; the | 
 | 15992 |   new functions have keyword arguments to provide the same | 
 | 15993 |   functionality.  All Lib, Tools and Demo modules that used the unsafe | 
 | 15994 |   interfaces have been updated to use the safe replacements.  Thanks | 
 | 15995 |   to Zack Weinberg! | 
 | 15996 |  | 
 | 15997 | - When x is an object whose class implements __mul__ and __rmul__, | 
 | 15998 |   1.0*x would correctly invoke __rmul__, but 1*x would erroneously | 
 | 15999 |   invoke __mul__.  This was due to the sequence-repeat code in the int | 
 | 16000 |   type.  This has been fixed now. | 
 | 16001 |  | 
 | 16002 | - Previously, "str1 in str2" required str1 to be a string of length 1. | 
 | 16003 |   This restriction has been relaxed to allow str1 to be a string of | 
 | 16004 |   any length.  Thus "'el' in 'hello world'" returns True now. | 
 | 16005 |  | 
 | 16006 | - File objects are now their own iterators.  For a file f, iter(f) now | 
 | 16007 |   returns f (unless f is closed), and f.next() is similar to | 
 | 16008 |   f.readline() when EOF is not reached; however, f.next() uses a | 
 | 16009 |   readahead buffer that messes up the file position, so mixing | 
 | 16010 |   f.next() and f.readline() (or other methods) doesn't work right. | 
 | 16011 |   Calling f.seek() drops the readahead buffer, but other operations | 
 | 16012 |   don't.  It so happens that this gives a nice additional speed boost | 
 | 16013 |   to "for line in file:"; the xreadlines method and corresponding | 
 | 16014 |   module are now obsolete.  Thanks to Oren Tirosh! | 
 | 16015 |  | 
 | 16016 | - Encoding declarations (PEP 263, phase 1) have been implemented.  A | 
 | 16017 |   comment of the form "# -*- coding: <encodingname> -*-" in the first | 
 | 16018 |   or second line of a Python source file indicates the encoding. | 
 | 16019 |  | 
 | 16020 | - list.sort() has a new implementation.  While cross-platform results | 
 | 16021 |   may vary, and in data-dependent ways, this is much faster on many | 
 | 16022 |   kinds of partially ordered lists than the previous implementation, | 
 | 16023 |   and reported to be just as fast on randomly ordered lists on | 
 | 16024 |   several major platforms.  This sort is also stable (if A==B and A | 
 | 16025 |   precedes B in the list at the start, A precedes B after the sort too), | 
 | 16026 |   although the language definition does not guarantee stability.  A | 
 | 16027 |   potential drawback is that list.sort() may require temp space of | 
 | 16028 |   len(list)*2 bytes (``*4`` on a 64-bit machine).  It's therefore possible | 
 | 16029 |   for list.sort() to raise MemoryError now, even if a comparison function | 
 | 16030 |   does not.  See <http://www.python.org/sf/587076> for full details. | 
 | 16031 |  | 
 | 16032 | - All standard iterators now ensure that, once StopIteration has been | 
 | 16033 |   raised, all future calls to next() on the same iterator will also | 
 | 16034 |   raise StopIteration.  There used to be various counterexamples to | 
 | 16035 |   this behavior, which could caused confusion or subtle program | 
 | 16036 |   breakage, without any benefits.  (Note that this is still an | 
 | 16037 |   iterator's responsibility; the iterator framework does not enforce | 
 | 16038 |   this.) | 
 | 16039 |  | 
 | 16040 | - Ctrl+C handling on Windows has been made more consistent with | 
 | 16041 |   other platforms.  KeyboardInterrupt can now reliably be caught, | 
 | 16042 |   and Ctrl+C at an interactive prompt no longer terminates the | 
 | 16043 |   process under NT/2k/XP (it never did under Win9x).  Ctrl+C will | 
 | 16044 |   interrupt time.sleep() in the main thread, and any child processes | 
 | 16045 |   created via the popen family (on win2k; we can't make win9x work | 
 | 16046 |   reliably) are also interrupted (as generally happens on for Linux/Unix.) | 
 | 16047 |   [SF bugs 231273, 439992 and 581232] | 
 | 16048 |  | 
 | 16049 | - sys.getwindowsversion() has been added on Windows.  This | 
 | 16050 |   returns a tuple with information about the version of Windows | 
 | 16051 |   currently running. | 
 | 16052 |  | 
 | 16053 | - Slices and repetitions of buffer objects now consistently return | 
 | 16054 |   a string.  Formerly, strings would be returned most of the time, | 
 | 16055 |   but a buffer object would be returned when the repetition count | 
 | 16056 |   was one or when the slice range was all inclusive. | 
 | 16057 |  | 
 | 16058 | - Unicode objects in sys.path are no longer ignored but treated | 
 | 16059 |   as directory names. | 
 | 16060 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 16061 | - Fixed string.startswith and string.endswith built-in methods | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 16062 |   so they accept negative indices.  [SF bug 493951] | 
 | 16063 |  | 
 | 16064 | - Fixed a bug with a continue inside a try block and a yield in the | 
 | 16065 |   finally clause.  [SF bug 567538] | 
 | 16066 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 16067 | - Most built-in sequences now support "extended slices", i.e. slices | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 16068 |   with a third "stride" parameter.  For example, "hello world"[::-1] | 
 | 16069 |   gives "dlrow olleh". | 
 | 16070 |  | 
 | 16071 | - A new warning PendingDeprecationWarning was added to provide | 
 | 16072 |   direction on features which are in the process of being deprecated. | 
 | 16073 |   The warning will not be printed by default.  To see the pending | 
 | 16074 |   deprecations, use -Walways::PendingDeprecationWarning:: | 
 | 16075 |   as a command line option or warnings.filterwarnings() in code. | 
 | 16076 |  | 
 | 16077 | - Deprecated features of xrange objects have been removed as | 
 | 16078 |   promised.  The start, stop, and step attributes and the tolist() | 
 | 16079 |   method no longer exist.  xrange repetition and slicing have been | 
 | 16080 |   removed. | 
 | 16081 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 16082 | - New built-in function enumerate(x), from PEP 279.  Example: | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 16083 |   enumerate("abc") is an iterator returning (0,"a"), (1,"b"), (2,"c"). | 
 | 16084 |   The argument can be an arbitrary iterable object. | 
 | 16085 |  | 
 | 16086 | - The assert statement no longer tests __debug__ at runtime.  This means | 
 | 16087 |   that assert statements cannot be disabled by assigning a false value | 
 | 16088 |   to __debug__. | 
 | 16089 |  | 
 | 16090 | - A method zfill() was added to str and unicode, that fills a numeric | 
 | 16091 |   string to the left with zeros.  For example, | 
 | 16092 |   "+123".zfill(6) -> "+00123". | 
 | 16093 |  | 
 | 16094 | - Complex numbers supported divmod() and the // and % operators, but | 
 | 16095 |   these make no sense.  Since this was documented, they're being | 
 | 16096 |   deprecated now. | 
 | 16097 |  | 
 | 16098 | - String and unicode methods lstrip(), rstrip() and strip() now take | 
 | 16099 |   an optional argument that specifies the characters to strip.  For | 
 | 16100 |   example, "Foo!!!?!?!?".rstrip("?!") -> "Foo". | 
 | 16101 |  | 
 | 16102 | - There's a new dictionary constructor (a class method of the dict | 
 | 16103 |   class), dict.fromkeys(iterable, value=None).  It constructs a | 
 | 16104 |   dictionary with keys taken from the iterable and all values set to a | 
 | 16105 |   single value.  It can be used for building sets and for removing | 
 | 16106 |   duplicates from sequences. | 
 | 16107 |  | 
 | 16108 | - Added a new dict method pop(key).  This removes and returns the | 
 | 16109 |   value corresponding to key.  [SF patch #539949] | 
 | 16110 |  | 
 | 16111 | - A new built-in type, bool, has been added, as well as built-in | 
 | 16112 |   names for its two values, True and False.  Comparisons and sundry | 
 | 16113 |   other operations that return a truth value have been changed to | 
 | 16114 |   return a bool instead.  Read PEP 285 for an explanation of why this | 
 | 16115 |   is backward compatible. | 
 | 16116 |  | 
 | 16117 | - Fixed two bugs reported as SF #535905: under certain conditions, | 
 | 16118 |   deallocating a deeply nested structure could cause a segfault in the | 
 | 16119 |   garbage collector, due to interaction with the "trashcan" code; | 
 | 16120 |   access to the current frame during destruction of a local variable | 
 | 16121 |   could access a pointer to freed memory. | 
 | 16122 |  | 
 | 16123 | - The optional object allocator ("pymalloc") has been enabled by | 
 | 16124 |   default.  The recommended practice for memory allocation and | 
 | 16125 |   deallocation has been streamlined.  A header file is included, | 
 | 16126 |   Misc/pymemcompat.h, which can be bundled with 3rd party extensions | 
 | 16127 |   and lets them use the same API with Python versions from 1.5.2 | 
 | 16128 |   onwards. | 
 | 16129 |  | 
 | 16130 | - PyErr_Display will provide file and line information for all exceptions | 
 | 16131 |   that have an attribute print_file_and_line, not just SyntaxErrors. | 
 | 16132 |  | 
 | 16133 | - The UTF-8 codec will now encode and decode Unicode surrogates | 
 | 16134 |   correctly and without raising exceptions for unpaired ones. | 
 | 16135 |  | 
 | 16136 | - Universal newlines (PEP 278) is implemented.  Briefly, using 'U' | 
 | 16137 |   instead of 'r' when opening a text file for reading changes the line | 
 | 16138 |   ending convention so that any of '\r', '\r\n', and '\n' is | 
 | 16139 |   recognized (even mixed in one file); all three are converted to | 
 | 16140 |   '\n', the standard Python line end character. | 
 | 16141 |  | 
 | 16142 | - file.xreadlines() now raises a ValueError if the file is closed: | 
 | 16143 |   Previously, an xreadlines object was returned which would raise | 
 | 16144 |   a ValueError when the xreadlines.next() method was called. | 
 | 16145 |  | 
 | 16146 | - sys.exit() inadvertently allowed more than one argument. | 
 | 16147 |   An exception will now be raised if more than one argument is used. | 
 | 16148 |  | 
 | 16149 | - Changed evaluation order of dictionary literals to conform to the | 
 | 16150 |   general left to right evaluation order rule. Now {f1(): f2()} will | 
 | 16151 |   evaluate f1 first. | 
 | 16152 |  | 
 | 16153 | - Fixed bug #521782: when a file was in non-blocking mode, file.read() | 
 | 16154 |   could silently lose data or wrongly throw an unknown error. | 
 | 16155 |  | 
 | 16156 | - The sq_repeat, sq_inplace_repeat, sq_concat and sq_inplace_concat | 
 | 16157 |   slots are now always tried after trying the corresponding nb_* slots. | 
 | 16158 |   This fixes a number of minor bugs (see bug #624807). | 
 | 16159 |  | 
 | 16160 | - Fix problem with dynamic loading on 64-bit AIX (see bug #639945). | 
 | 16161 |  | 
 | 16162 | Extension modules | 
 | 16163 | ----------------- | 
 | 16164 |  | 
 | 16165 | - Added three operators to the operator module: | 
 | 16166 |     operator.pow(a,b) which is equivalent to:  a**b. | 
 | 16167 |     operator.is_(a,b) which is equivalent to:  a is b. | 
 | 16168 |     operator.is_not(a,b) which is equivalent to:  a is not b. | 
 | 16169 |  | 
 | 16170 | - posix.openpty now works on all systems that have /dev/ptmx. | 
 | 16171 |  | 
 | 16172 | - A module zipimport exists to support importing code from zip | 
 | 16173 |   archives. | 
 | 16174 |  | 
 | 16175 | - The new datetime module supplies classes for manipulating dates and | 
 | 16176 |   times.  The basic design came from the Zope "fishbowl process", and | 
 | 16177 |   favors practical commercial applications over calendar esoterica.  See | 
 | 16178 |  | 
 | 16179 |       http://www.zope.org/Members/fdrake/DateTimeWiki/FrontPage | 
 | 16180 |  | 
 | 16181 | - _tkinter now returns Tcl objects, instead of strings. Objects which | 
 | 16182 |   have Python equivalents are converted to Python objects, other objects | 
 | 16183 |   are wrapped. This can be configured through the wantobjects method, | 
 | 16184 |   or Tkinter.wantobjects. | 
 | 16185 |  | 
 | 16186 | - The PyBSDDB wrapper around the Sleepycat Berkeley DB library has | 
 | 16187 |   been added as the package bsddb.  The traditional bsddb module is | 
 | 16188 |   still available in source code, but not built automatically anymore, | 
 | 16189 |   and is now named bsddb185.  This supports Berkeley DB versions from | 
 | 16190 |   3.0 to 4.1.  For help converting your databases from the old module (which | 
 | 16191 |   probably used an obsolete version of Berkeley DB) to the new module, see | 
 | 16192 |   the db2pickle.py and pickle2db.py scripts described in the Tools/Demos | 
 | 16193 |   section above. | 
 | 16194 |  | 
 | 16195 | - unicodedata was updated to Unicode 3.2. It supports normalization | 
 | 16196 |   and names for Hangul syllables and CJK unified ideographs. | 
 | 16197 |  | 
 | 16198 | - resource.getrlimit() now returns longs instead of ints. | 
 | 16199 |  | 
 | 16200 | - readline now dynamically adjusts its input/output stream if | 
 | 16201 |   sys.stdin/stdout changes. | 
 | 16202 |  | 
 | 16203 | - The _tkinter module (and hence Tkinter) has dropped support for | 
 | 16204 |   Tcl/Tk 8.0 and 8.1.  Only Tcl/Tk versions 8.2, 8.3 and 8.4 are | 
 | 16205 |   supported. | 
 | 16206 |  | 
 | 16207 | - cPickle.BadPickleGet is now a class. | 
 | 16208 |  | 
 | 16209 | - The time stamps in os.stat_result are floating point numbers | 
 | 16210 |   after stat_float_times has been called. | 
 | 16211 |  | 
 | 16212 | - If the size passed to mmap.mmap() is larger than the length of the | 
 | 16213 |   file on non-Windows platforms, a ValueError is raised. [SF bug 585792] | 
 | 16214 |  | 
 | 16215 | - The xreadlines module is slated for obsolescence. | 
 | 16216 |  | 
 | 16217 | - The strptime function in the time module is now always available (a | 
 | 16218 |   Python implementation is used when the C library doesn't define it). | 
 | 16219 |  | 
 | 16220 | - The 'new' module is no longer an extension, but a Python module that | 
 | 16221 |   only exists for backwards compatibility.  Its contents are no longer | 
 | 16222 |   functions but callable type objects. | 
 | 16223 |  | 
 | 16224 | - The bsddb.*open functions can now take 'None' as a filename. | 
 | 16225 |   This will create a temporary in-memory bsddb that won't be | 
 | 16226 |   written to disk. | 
 | 16227 |  | 
 | 16228 | - posix.getloadavg, posix.lchown, posix.killpg, posix.mknod, and | 
 | 16229 |   posix.getpgid have been added where available. | 
 | 16230 |  | 
 | 16231 | - The locale module now exposes the C library's gettext interface. It | 
 | 16232 |   also has a new function getpreferredencoding. | 
 | 16233 |  | 
 | 16234 | - A security hole ("double free") was found in zlib-1.1.3, a popular | 
 | 16235 |   third party compression library used by some Python modules.  The | 
 | 16236 |   hole was quickly plugged in zlib-1.1.4, and the Windows build of | 
 | 16237 |   Python now ships with zlib-1.1.4. | 
 | 16238 |  | 
 | 16239 | - pwd, grp, and resource return enhanced tuples now, with symbolic | 
 | 16240 |   field names. | 
 | 16241 |  | 
 | 16242 | - array.array is now a type object. A new format character | 
 | 16243 |   'u' indicates Py_UNICODE arrays. For those, .tounicode and | 
 | 16244 |   .fromunicode methods are available. Arrays now support __iadd__ | 
 | 16245 |   and __imul__. | 
 | 16246 |  | 
 | 16247 | - dl now builds on every system that has dlfcn.h.  Failure in case | 
 | 16248 |   of sizeof(int)!=sizeof(long)!=sizeof(void*) is delayed until dl.open | 
 | 16249 |   is called. | 
 | 16250 |  | 
 | 16251 | - The sys module acquired a new attribute, api_version, which evaluates | 
 | 16252 |   to the value of the PYTHON_API_VERSION macro with which the | 
 | 16253 |   interpreter was compiled. | 
 | 16254 |  | 
 | 16255 | - Fixed bug #470582: sre module would return a tuple (None, 'a', 'ab') | 
 | 16256 |   when applying the regular expression '^((a)c)?(ab)$' on 'ab'. It now | 
 | 16257 |   returns (None, None, 'ab'), as expected. Also fixed handling of | 
 | 16258 |   lastindex/lastgroup match attributes in similar cases. For example, | 
 | 16259 |   when running the expression r'(a)(b)?b' over 'ab', lastindex must be | 
 | 16260 |   1, not 2. | 
 | 16261 |  | 
 | 16262 | - Fixed bug #581080: sre scanner was not checking the buffer limit | 
 | 16263 |   before increasing the current pointer. This was creating an infinite | 
 | 16264 |   loop in the search function, once the pointer exceeded the buffer | 
 | 16265 |   limit. | 
 | 16266 |  | 
 | 16267 | - The os.fdopen function now enforces a file mode starting with the | 
 | 16268 |   letter 'r', 'w' or 'a', otherwise a ValueError is raised. This fixes | 
 | 16269 |   bug #623464. | 
 | 16270 |  | 
 | 16271 | - The linuxaudiodev module is now deprecated; it is being replaced by | 
 | 16272 |   ossaudiodev.  The interface has been extended to cover a lot more of | 
 | 16273 |   OSS (see www.opensound.com), including most DSP ioctls and the | 
 | 16274 |   OSS mixer API.  Documentation forthcoming in 2.3a2. | 
 | 16275 |  | 
 | 16276 | Library | 
 | 16277 | ------- | 
 | 16278 |  | 
 | 16279 | - imaplib.py now supports SSL (Tino Lange and Piers Lauder). | 
 | 16280 |  | 
 | 16281 | - Freeze's modulefinder.py has been moved to the standard library; | 
 | 16282 |   slightly improved so it will issue less false missing submodule | 
 | 16283 |   reports (see sf path #643711 for details).  Documentation will follow | 
 | 16284 |   with Python 2.3a2. | 
 | 16285 |  | 
 | 16286 | - os.path exposes getctime. | 
 | 16287 |  | 
 | 16288 | - unittest.py now has two additional methods called assertAlmostEqual() | 
 | 16289 |   and failIfAlmostEqual().  They implement an approximate comparison | 
 | 16290 |   by rounding the difference between the two arguments and comparing | 
 | 16291 |   the result to zero.  Approximate comparison is essential for | 
 | 16292 |   unit tests of floating point results. | 
 | 16293 |  | 
 | 16294 | - calendar.py now depends on the new datetime module rather than | 
 | 16295 |   the time module.  As a result, the range of allowable dates | 
 | 16296 |   has been increased. | 
 | 16297 |  | 
 | 16298 | - pdb has a new 'j(ump)' command to select the next line to be | 
 | 16299 |   executed. | 
 | 16300 |  | 
 | 16301 | - The distutils created windows installers now can run a | 
 | 16302 |   postinstallation script. | 
 | 16303 |  | 
 | 16304 | - doctest.testmod can now be called without argument, which means to | 
 | 16305 |   test the current module. | 
 | 16306 |  | 
 | 16307 | - When canceling a server that implemented threading with a keyboard | 
 | 16308 |   interrupt, the server would shut down but not terminate (waiting on | 
 | 16309 |   client threads). A new member variable, daemon_threads, was added to | 
 | 16310 |   the ThreadingMixIn class in SocketServer.py to make it explicit that | 
 | 16311 |   this behavior needs to be controlled. | 
 | 16312 |  | 
 | 16313 | - A new module, optparse, provides a fancy alternative to getopt for | 
 | 16314 |   command line parsing.  It is a slightly modified version of Greg | 
 | 16315 |   Ward's Optik package. | 
 | 16316 |  | 
 | 16317 | - UserDict.py now defines a DictMixin class which defines all dictionary | 
 | 16318 |   methods for classes that already have a minimum mapping interface. | 
 | 16319 |   This greatly simplifies writing classes that need to be substitutable | 
 | 16320 |   for dictionaries (such as the shelve module). | 
 | 16321 |  | 
 | 16322 | - shelve.py now subclasses from UserDict.DictMixin.  Now shelve supports | 
 | 16323 |   all dictionary methods.  This eases the transition to persistent | 
 | 16324 |   storage for scripts originally written with dictionaries in mind. | 
 | 16325 |  | 
 | 16326 | - shelve.open and the various classes in shelve.py now accept an optional | 
 | 16327 |   binary flag, which defaults to False.  If True, the values stored in the | 
 | 16328 |   shelf are binary pickles. | 
 | 16329 |  | 
 | 16330 | - A new package, logging, implements the logging API defined by PEP | 
 | 16331 |   282.  The code is written by Vinay Sajip. | 
 | 16332 |  | 
 | 16333 | - StreamReader, StreamReaderWriter and StreamRecoder in the codecs | 
 | 16334 |   modules are iterators now. | 
 | 16335 |  | 
 | 16336 | - gzip.py now handles files exceeding 2GB.  Files over 4GB also work | 
 | 16337 |   now (provided the OS supports it, and Python is configured with large | 
 | 16338 |   file support), but in that case the underlying gzip file format can | 
 | 16339 |   record only the least-significant 32 bits of the file size, so that | 
 | 16340 |   some tools working with gzipped files may report an incorrect file | 
 | 16341 |   size. | 
 | 16342 |  | 
 | 16343 | - xml.sax.saxutils.unescape has been added, to replace entity references | 
 | 16344 |   with their entity value. | 
 | 16345 |  | 
 | 16346 | - Queue.Queue.{put,get} now support an optional timeout argument. | 
 | 16347 |  | 
 | 16348 | - Various features of Tk 8.4 are exposed in Tkinter.py. The multiple | 
 | 16349 |   option of tkFileDialog is exposed as function askopenfile{,name}s. | 
 | 16350 |  | 
 | 16351 | - Various configure methods of Tkinter have been stream-lined, so that | 
 | 16352 |   tag_configure, image_configure, window_configure now return a | 
 | 16353 |   dictionary when invoked with no argument. | 
 | 16354 |  | 
 | 16355 | - Importing the readline module now no longer has the side effect of | 
 | 16356 |   calling setlocale(LC_CTYPE, "").  The initial "C" locale, or | 
 | 16357 |   whatever locale is explicitly set by the user, is preserved.  If you | 
 | 16358 |   want repr() of 8-bit strings in your preferred encoding to preserve | 
 | 16359 |   all printable characters of that encoding, you have to add the | 
 | 16360 |   following code to your $PYTHONSTARTUP file or to your application's | 
 | 16361 |   main(): | 
 | 16362 |  | 
 | 16363 |     import locale | 
 | 16364 |     locale.setlocale(locale.LC_CTYPE, "") | 
 | 16365 |  | 
 | 16366 | - shutil.move was added. shutil.copytree now reports errors as an | 
 | 16367 |   exception at the end, instead of printing error messages. | 
 | 16368 |  | 
 | 16369 | - Encoding name normalization was generalized to not only | 
 | 16370 |   replace hyphens with underscores, but also all other non-alphanumeric | 
 | 16371 |   characters (with the exception of the dot which is used for Python | 
 | 16372 |   package names during lookup). The aliases.py mapping was updated | 
 | 16373 |   to the new standard. | 
 | 16374 |  | 
 | 16375 | - mimetypes has two new functions: guess_all_extensions() which | 
 | 16376 |   returns a list of all known extensions for a mime type, and | 
 | 16377 |   add_type() which adds one mapping between a mime type and | 
 | 16378 |   an extension to the database. | 
 | 16379 |  | 
 | 16380 | - New module: sets, defines the class Set that implements a mutable | 
 | 16381 |   set type using the keys of a dict to represent the set.  There's | 
 | 16382 |   also a class ImmutableSet which is useful when you need sets of sets | 
 | 16383 |   or when you need to use sets as dict keys, and a class BaseSet which | 
 | 16384 |   is the base class of the two. | 
 | 16385 |  | 
 | 16386 | - Added random.sample(population,k) for random sampling without replacement. | 
 | 16387 |   Returns a k length list of unique elements chosen from the population. | 
 | 16388 |  | 
 | 16389 | - random.randrange(-sys.maxint-1, sys.maxint) no longer raises | 
 | 16390 |   OverflowError.  That is, it now accepts any combination of 'start' | 
 | 16391 |   and 'stop' arguments so long as each is in the range of Python's | 
 | 16392 |   bounded integers. | 
 | 16393 |  | 
 | 16394 | - Thanks to Raymond Hettinger, random.random() now uses a new core | 
 | 16395 |   generator.  The Mersenne Twister algorithm is implemented in C, | 
 | 16396 |   threadsafe, faster than the previous generator, has an astronomically | 
 | 16397 |   large period (2**19937-1), creates random floats to full 53-bit | 
 | 16398 |   precision, and may be the most widely tested random number generator | 
 | 16399 |   in existence. | 
 | 16400 |  | 
 | 16401 |   The random.jumpahead(n) method has different semantics for the new | 
 | 16402 |   generator.  Instead of jumping n steps ahead, it uses n and the | 
 | 16403 |   existing state to create a new state.  This means that jumpahead() | 
 | 16404 |   continues to support multi-threaded code needing generators of | 
 | 16405 |   non-overlapping sequences.  However, it will break code which relies | 
 | 16406 |   on jumpahead moving a specific number of steps forward. | 
 | 16407 |  | 
 | 16408 |   The attributes random.whseed and random.__whseed have no meaning for | 
 | 16409 |   the new generator.  Code using these attributes should switch to a | 
 | 16410 |   new class, random.WichmannHill which is provided for backward | 
 | 16411 |   compatibility and to make an alternate generator available. | 
 | 16412 |  | 
 | 16413 | - New "algorithms" module: heapq, implements a heap queue.  Thanks to | 
 | 16414 |   Kevin O'Connor for the code and François Pinard for an entertaining | 
 | 16415 |   write-up explaining the theory and practical uses of heaps. | 
 | 16416 |  | 
 | 16417 | - New encoding for the Palm OS character set: palmos. | 
 | 16418 |  | 
 | 16419 | - binascii.crc32() and the zipfile module had problems on some 64-bit | 
 | 16420 |   platforms.  These have been fixed.  On a platform with 8-byte C longs, | 
 | 16421 |   crc32() now returns a signed-extended 4-byte result, so that its value | 
 | 16422 |   as a Python int is equal to the value computed a 32-bit platform. | 
 | 16423 |  | 
 | 16424 | - xml.dom.minidom.toxml and toprettyxml now take an optional encoding | 
 | 16425 |   argument. | 
 | 16426 |  | 
 | 16427 | - Some fixes in the copy module: when an object is copied through its | 
 | 16428 |   __reduce__ method, there was no check for a __setstate__ method on | 
 | 16429 |   the result [SF patch 565085]; deepcopy should treat instances of | 
 | 16430 |   custom metaclasses the same way it treats instances of type 'type' | 
 | 16431 |   [SF patch 560794]. | 
 | 16432 |  | 
 | 16433 | - Sockets now support timeout mode.  After s.settimeout(T), where T is | 
 | 16434 |   a float expressing seconds, subsequent operations raise an exception | 
 | 16435 |   if they cannot be completed within T seconds.  To disable timeout | 
 | 16436 |   mode, use s.settimeout(None).  There's also a module function, | 
 | 16437 |   socket.setdefaulttimeout(T), which sets the default for all sockets | 
 | 16438 |   created henceforth. | 
 | 16439 |  | 
 | 16440 | - getopt.gnu_getopt was added.  This supports GNU-style option | 
 | 16441 |   processing, where options can be mixed with non-option arguments. | 
 | 16442 |  | 
 | 16443 | - Stop using strings for exceptions.  String objects used for | 
 | 16444 |   exceptions are now classes deriving from Exception.  The objects | 
 | 16445 |   changed were: Tkinter.TclError, bdb.BdbQuit, macpath.norm_error, | 
 | 16446 |   tabnanny.NannyNag, and xdrlib.Error. | 
 | 16447 |  | 
 | 16448 | - Constants BOM_UTF8, BOM_UTF16, BOM_UTF16_LE, BOM_UTF16_BE, | 
 | 16449 |   BOM_UTF32, BOM_UTF32_LE and BOM_UTF32_BE that represent the Byte | 
 | 16450 |   Order Mark in UTF-8, UTF-16 and UTF-32 encodings for little and | 
 | 16451 |   big endian systems were added to the codecs module. The old names | 
 | 16452 |   BOM32_* and BOM64_* were off by a factor of 2. | 
 | 16453 |  | 
 | 16454 | - Added conversion functions math.degrees() and math.radians(). | 
 | 16455 |  | 
 | 16456 | - math.log() now takes an optional argument:  math.log(x[, base]). | 
 | 16457 |  | 
 | 16458 | - ftplib.retrlines() now tests for callback is None rather than testing | 
 | 16459 |   for False.  Was causing an error when given a callback object which | 
 | 16460 |   was callable but also returned len() as zero.  The change may | 
 | 16461 |   create new breakage if the caller relied on the undocumented behavior | 
 | 16462 |   and called with callback set to [] or some other False value not | 
 | 16463 |   identical to None. | 
 | 16464 |  | 
 | 16465 | - random.gauss() uses a piece of hidden state used by nothing else, | 
 | 16466 |   and the .seed() and .whseed() methods failed to reset it.  In other | 
 | 16467 |   words, setting the seed didn't completely determine the sequence of | 
 | 16468 |   results produced by random.gauss().  It does now.  Programs repeatedly | 
 | 16469 |   mixing calls to a seed method with calls to gauss() may see different | 
 | 16470 |   results now. | 
 | 16471 |  | 
 | 16472 | - The pickle.Pickler class grew a clear_memo() method to mimic that | 
 | 16473 |   provided by cPickle.Pickler. | 
 | 16474 |  | 
 | 16475 | - difflib's SequenceMatcher class now does a dynamic analysis of | 
 | 16476 |   which elements are so frequent as to constitute noise.  For | 
 | 16477 |   comparing files as sequences of lines, this generally works better | 
 | 16478 |   than the IS_LINE_JUNK function, and function ndiff's linejunk | 
 | 16479 |   argument defaults to None now as a result.  A happy benefit is | 
 | 16480 |   that SequenceMatcher may run much faster now when applied | 
 | 16481 |   to large files with many duplicate lines (for example, C program | 
 | 16482 |   text with lots of repeated "}" and "return NULL;" lines). | 
 | 16483 |  | 
 | 16484 | - New Text.dump() method in Tkinter module. | 
 | 16485 |  | 
 | 16486 | - New distutils commands for building packagers were added to | 
 | 16487 |   support pkgtool on Solaris and swinstall on HP-UX. | 
 | 16488 |  | 
 | 16489 | - distutils now has a new abstract binary packager base class | 
 | 16490 |   command/bdist_packager, which simplifies writing packagers. | 
 | 16491 |   This will hopefully provide the missing bits to encourage | 
 | 16492 |   people to submit more packagers, e.g. for Debian, FreeBSD | 
 | 16493 |   and other systems. | 
 | 16494 |  | 
 | 16495 | - The UTF-16, -LE and -BE stream readers now raise a | 
 | 16496 |   NotImplementedError for all calls to .readline(). Previously, they | 
 | 16497 |   used to just produce garbage or fail with an encoding error -- | 
 | 16498 |   UTF-16 is a 2-byte encoding and the C lib's line reading APIs don't | 
 | 16499 |   work well with these. | 
 | 16500 |  | 
 | 16501 | - compileall now supports quiet operation. | 
 | 16502 |  | 
 | 16503 | - The BaseHTTPServer now implements optional HTTP/1.1 persistent | 
 | 16504 |   connections. | 
 | 16505 |  | 
 | 16506 | - socket module: the SSL support was broken out of the main | 
 | 16507 |   _socket module C helper and placed into a new _ssl helper | 
 | 16508 |   which now gets imported by socket.py if available and working. | 
 | 16509 |  | 
 | 16510 | - encodings package: added aliases for all supported IANA character | 
 | 16511 |   sets | 
 | 16512 |  | 
 | 16513 | - ftplib: to safeguard the user's privacy, anonymous login will use | 
 | 16514 |   "anonymous@" as default password, rather than the real user and host | 
 | 16515 |   name. | 
 | 16516 |  | 
 | 16517 | - webbrowser: tightened up the command passed to os.system() so that | 
 | 16518 |   arbitrary shell code can't be executed because a bogus URL was | 
 | 16519 |   passed in. | 
 | 16520 |  | 
 | 16521 | - gettext.translation has an optional fallback argument, and | 
 | 16522 |   gettext.find an optional all argument. Translations will now fallback | 
 | 16523 |   on a per-message basis. The module supports plural forms, by means | 
 | 16524 |   of gettext.[d]ngettext and Translation.[u]ngettext. | 
 | 16525 |  | 
 | 16526 | - distutils bdist commands now offer a --skip-build option. | 
 | 16527 |  | 
 | 16528 | - warnings.warn now accepts a Warning instance as first argument. | 
 | 16529 |  | 
 | 16530 | - The xml.sax.expatreader.ExpatParser class will no longer create | 
 | 16531 |   circular references by using itself as the locator that gets passed | 
 | 16532 |   to the content handler implementation.  [SF bug #535474] | 
 | 16533 |  | 
 | 16534 | - The email.Parser.Parser class now properly parses strings regardless | 
 | 16535 |   of their line endings, which can be any of \r, \n, or \r\n (CR, LF, | 
 | 16536 |   or CRLF).  Also, the Header class's constructor default arguments | 
 | 16537 |   has changed slightly so that an explicit maxlinelen value is always | 
 | 16538 |   honored, and so unicode conversion error handling can be specified. | 
 | 16539 |  | 
 | 16540 | - distutils' build_ext command now links C++ extensions with the C++ | 
 | 16541 |   compiler available in the Makefile or CXX environment variable, if | 
 | 16542 |   running under \*nix. | 
 | 16543 |  | 
 | 16544 | - New module bz2: provides a comprehensive interface for the bz2 compression | 
 | 16545 |   library.  It implements a complete file interface, one-shot (de)compression | 
 | 16546 |   functions, and types for sequential (de)compression. | 
 | 16547 |  | 
 | 16548 | - New pdb command 'pp' which is like 'p' except that it pretty-prints | 
 | 16549 |   the value of its expression argument. | 
 | 16550 |  | 
 | 16551 | - Now bdist_rpm distutils command understands a verify_script option in | 
 | 16552 |   the config file, including the contents of the referred filename in | 
 | 16553 |   the "%verifyscript" section of the rpm spec file. | 
 | 16554 |  | 
 | 16555 | - Fixed bug #495695: webbrowser module would run graphic browsers in a | 
 | 16556 |   unix environment even if DISPLAY was not set. Also, support for | 
 | 16557 |   skipstone browser was included. | 
 | 16558 |  | 
 | 16559 | - Fixed bug #636769: rexec would run unallowed code if subclasses of | 
 | 16560 |   strings were used as parameters for certain functions. | 
 | 16561 |  | 
 | 16562 | Tools/Demos | 
 | 16563 | ----------- | 
 | 16564 |  | 
 | 16565 | - pygettext.py now supports globbing on Windows, and accepts module | 
 | 16566 |   names in addition to accepting file names. | 
 | 16567 |  | 
 | 16568 | - The SGI demos (Demo/sgi) have been removed.  Nobody thought they | 
 | 16569 |   were interesting any more.  (The SGI library modules and extensions | 
 | 16570 |   are still there; it is believed that at least some of these are | 
 | 16571 |   still used and useful.) | 
 | 16572 |  | 
 | 16573 | - IDLE supports the new encoding declarations (PEP 263); it can also | 
 | 16574 |   deal with legacy 8-bit files if they use the locale's encoding. It | 
 | 16575 |   allows non-ASCII strings in the interactive shell and executes them | 
 | 16576 |   in the locale's encoding. | 
 | 16577 |  | 
 | 16578 | - freeze.py now produces binaries which can import shared modules, | 
 | 16579 |   unlike before when this failed due to missing symbol exports in | 
 | 16580 |   the generated binary. | 
 | 16581 |  | 
 | 16582 | Build | 
 | 16583 | ----- | 
 | 16584 |  | 
 | 16585 | - On Unix, IDLE is now installed automatically. | 
 | 16586 |  | 
 | 16587 | - The fpectl module is not built by default; it's dangerous or useless | 
 | 16588 |   except in the hands of experts. | 
 | 16589 |  | 
 | 16590 | - The public Python C API will generally be declared using PyAPI_FUNC | 
 | 16591 |   and PyAPI_DATA macros, while Python extension module init functions | 
 | 16592 |   will be declared with PyMODINIT_FUNC.  DL_EXPORT/DL_IMPORT macros | 
 | 16593 |   are deprecated. | 
 | 16594 |  | 
 | 16595 | - A bug was fixed that could cause COUNT_ALLOCS builds to segfault, or | 
 | 16596 |   get into infinite loops, when a new-style class got garbage-collected. | 
 | 16597 |   Unfortunately, to avoid this, the way COUNT_ALLOCS works requires | 
 | 16598 |   that new-style classes be immortal in COUNT_ALLOCS builds.  Note that | 
 | 16599 |   COUNT_ALLOCS is not enabled by default, in either release or debug | 
 | 16600 |   builds, and that new-style classes are immortal only in COUNT_ALLOCS | 
 | 16601 |   builds. | 
 | 16602 |  | 
 | 16603 | - Compiling out the cyclic garbage collector is no longer an option. | 
 | 16604 |   The old symbol WITH_CYCLE_GC is now ignored, and Python.h arranges | 
 | 16605 |   that it's always defined (for the benefit of any extension modules | 
 | 16606 |   that may be conditionalizing on it).  A bonus is that any extension | 
 | 16607 |   type participating in cyclic gc can choose to participate in the | 
 | 16608 |   Py_TRASHCAN mechanism now too; in the absence of cyclic gc, this used | 
 | 16609 |   to require editing the core to teach the trashcan mechanism about the | 
 | 16610 |   new type. | 
 | 16611 |  | 
 | 16612 | - According to Annex F of the current C standard, | 
 | 16613 |  | 
 | 16614 |     The Standard C macro HUGE_VAL and its float and long double analogs, | 
 | 16615 |     HUGE_VALF and HUGE_VALL, expand to expressions whose values are | 
 | 16616 |     positive infinities. | 
 | 16617 |  | 
 | 16618 |   Python only uses the double HUGE_VAL, and only to #define its own symbol | 
 | 16619 |   Py_HUGE_VAL.  Some platforms have incorrect definitions for HUGE_VAL. | 
 | 16620 |   pyport.h used to try to worm around that, but the workarounds triggered | 
 | 16621 |   other bugs on other platforms, so we gave up.  If your platform defines | 
 | 16622 |   HUGE_VAL incorrectly, you'll need to #define Py_HUGE_VAL to something | 
 | 16623 |   that works on your platform.  The only instance of this I'm sure about | 
 | 16624 |   is on an unknown subset of Cray systems, described here: | 
 | 16625 |  | 
 | 16626 |   http://www.cray.com/swpubs/manuals/SN-2194_2.0/html-SN-2194_2.0/x3138.htm | 
 | 16627 |  | 
 | 16628 |   Presumably 2.3a1 breaks such systems.  If anyone uses such a system, help! | 
 | 16629 |  | 
 | 16630 | - The configure option --without-doc-strings can be used to remove the | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 16631 |   doc strings from the built-in functions and modules; this reduces the | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 16632 |   size of the executable. | 
 | 16633 |  | 
 | 16634 | - The universal newlines option (PEP 278) is on by default.  On Unix | 
 | 16635 |   it can be disabled by passing --without-universal-newlines to the | 
 | 16636 |   configure script.  On other platforms, remove | 
 | 16637 |   WITH_UNIVERSAL_NEWLINES from pyconfig.h. | 
 | 16638 |  | 
 | 16639 | - On Unix, a shared libpython2.3.so can be created with --enable-shared. | 
 | 16640 |  | 
 | 16641 | - All uses of the CACHE_HASH, INTERN_STRINGS, and DONT_SHARE_SHORT_STRINGS | 
 | 16642 |   preprocessor symbols were eliminated.  The internal decisions they | 
 | 16643 |   controlled stopped being experimental long ago. | 
 | 16644 |  | 
 | 16645 | - The tools used to build the documentation now work under Cygwin as | 
 | 16646 |   well as Unix. | 
 | 16647 |  | 
 | 16648 | - The bsddb and dbm module builds have been changed to try and avoid version | 
 | 16649 |   skew problems and disable linkage with Berkeley DB 1.85 unless the | 
 | 16650 |   installer knows what s/he's doing.  See the section on building these | 
 | 16651 |   modules in the README file for details. | 
 | 16652 |  | 
 | 16653 | C API | 
 | 16654 | ----- | 
 | 16655 |  | 
 | 16656 | - PyNumber_Check() now returns true for string and unicode objects. | 
 | 16657 |   This is a result of these types having a partially defined | 
 | 16658 |   tp_as_number slot.  (This is not a feature, but an indication that | 
 | 16659 |   PyNumber_Check() is not very useful to determine numeric behavior. | 
 | 16660 |   It may be deprecated.) | 
 | 16661 |  | 
 | 16662 | - The string object's layout has changed: the pointer member | 
 | 16663 |   ob_sinterned has been replaced by an int member ob_sstate.  On some | 
 | 16664 |   platforms (e.g. most 64-bit systems) this may change the offset of | 
 | 16665 |   the ob_sval member, so as a precaution the API_VERSION has been | 
 | 16666 |   incremented.  The apparently unused feature of "indirect interned | 
 | 16667 |   strings", supported by the ob_sinterned member, is gone.  Interned | 
 | 16668 |   strings are now usually mortal; there is a new API, | 
 | 16669 |   PyString_InternImmortal() that creates immortal interned strings. | 
 | 16670 |   (The ob_sstate member can only take three values; however, while | 
 | 16671 |   making it a char saves a few bytes per string object on average, in | 
 | 16672 |   it also slowed things down a bit because ob_sval was no longer | 
 | 16673 |   aligned.) | 
 | 16674 |  | 
 | 16675 | - The Py_InitModule*() functions now accept NULL for the 'methods' | 
 | 16676 |   argument.  Modules without global functions are becoming more common | 
 | 16677 |   now that factories can be types rather than functions. | 
 | 16678 |  | 
 | 16679 | - New C API PyUnicode_FromOrdinal() which exposes unichr() at C | 
 | 16680 |   level. | 
 | 16681 |  | 
 | 16682 | - New functions PyErr_SetExcFromWindowsErr() and | 
 | 16683 |   PyErr_SetExcFromWindowsErrWithFilename(). Similar to | 
 | 16684 |   PyErr_SetFromWindowsErrWithFilename() and | 
 | 16685 |   PyErr_SetFromWindowsErr(), but they allow to specify | 
 | 16686 |   the exception type to raise. Available on Windows. | 
 | 16687 |  | 
 | 16688 | - Py_FatalError() is now declared as taking a const char* argument.  It | 
 | 16689 |   was previously declared without const.  This should not affect working | 
 | 16690 |   code. | 
 | 16691 |  | 
 | 16692 | - Added new macro PySequence_ITEM(o, i) that directly calls | 
 | 16693 |   sq_item without rechecking that o is a sequence and without | 
 | 16694 |   adjusting for negative indices. | 
 | 16695 |  | 
 | 16696 | - PyRange_New() now raises ValueError if the fourth argument is not 1. | 
 | 16697 |   This is part of the removal of deprecated features of the xrange | 
 | 16698 |   object. | 
 | 16699 |  | 
 | 16700 | - PyNumber_Coerce() and PyNumber_CoerceEx() now also invoke the type's | 
 | 16701 |   coercion if both arguments have the same type but this type has the | 
 | 16702 |   CHECKTYPES flag set.  This is to better support proxies. | 
 | 16703 |  | 
 | 16704 | - The type of tp_free has been changed from "``void (*)(PyObject *)``" to | 
 | 16705 |   "``void (*)(void *)``". | 
 | 16706 |  | 
 | 16707 | - PyObject_Del, PyObject_GC_Del are now functions instead of macros. | 
 | 16708 |  | 
 | 16709 | - A type can now inherit its metatype from its base type.  Previously, | 
 | 16710 |   when PyType_Ready() was called, if ob_type was found to be NULL, it | 
 | 16711 |   was always set to &PyType_Type; now it is set to base->ob_type, | 
 | 16712 |   where base is tp_base, defaulting to &PyObject_Type. | 
 | 16713 |  | 
 | 16714 | - PyType_Ready() accidentally did not inherit tp_is_gc; now it does. | 
 | 16715 |  | 
 | 16716 | - The PyCore_* family of APIs have been removed. | 
 | 16717 |  | 
 | 16718 | - The "u#" parser marker will now pass through Unicode objects as-is | 
 | 16719 |   without going through the buffer API. | 
 | 16720 |  | 
 | 16721 | - The enumerators of cmp_op have been renamed to use the prefix ``PyCmp_``. | 
 | 16722 |  | 
 | 16723 | - An old #define of ANY as void has been removed from pyport.h.  This | 
 | 16724 |   hasn't been used since Python's pre-ANSI days, and the #define has | 
 | 16725 |   been marked as obsolete since then.  SF bug 495548 says it created | 
 | 16726 |   conflicts with other packages, so keeping it around wasn't harmless. | 
 | 16727 |  | 
 | 16728 | - Because Python's magic number scheme broke on January 1st, we decided | 
 | 16729 |   to stop Python development.  Thanks for all the fish! | 
 | 16730 |  | 
 | 16731 | - Some of us don't like fish, so we changed Python's magic number | 
 | 16732 |   scheme to a new one. See Python/import.c for details. | 
 | 16733 |  | 
 | 16734 | New platforms | 
 | 16735 | ------------- | 
 | 16736 |  | 
 | 16737 | - OpenVMS is now supported. | 
 | 16738 |  | 
 | 16739 | - AtheOS is now supported. | 
 | 16740 |  | 
 | 16741 | - the EMX runtime environment on OS/2 is now supported. | 
 | 16742 |  | 
 | 16743 | - GNU/Hurd is now supported. | 
 | 16744 |  | 
 | 16745 | Tests | 
 | 16746 | ----- | 
 | 16747 |  | 
 | 16748 | - The regrtest.py script's -u option now provides a way to say "allow | 
 | 16749 |   all resources except this one."  For example, to allow everything | 
 | 16750 |   except bsddb, give the option '-uall,-bsddb'. | 
 | 16751 |  | 
 | 16752 | Windows | 
 | 16753 | ------- | 
 | 16754 |  | 
 | 16755 | - The Windows distribution now ships with version 4.0.14 of the | 
 | 16756 |   Sleepycat Berkeley database library.  This should be a huge | 
 | 16757 |   improvement over the previous Berkeley DB 1.85, which had many | 
 | 16758 |   bugs. | 
 | 16759 |   XXX What are the licensing issues here? | 
 | 16760 |   XXX If a user has a database created with a previous version of | 
 | 16761 |   XXX     Python, what must they do to convert it? | 
 | 16762 |   XXX I'm still not sure how to link this thing (see PCbuild/readme.txt). | 
 | 16763 |   XXX The version # is likely to change before 2.3a1. | 
 | 16764 |  | 
 | 16765 | - The Windows distribution now ships with a Secure Sockets Library (SLL) | 
 | 16766 |    module (_ssl.pyd) | 
 | 16767 |  | 
 | 16768 | - The Windows distribution now ships with Tcl/Tk version 8.4.1 (it | 
 | 16769 |   previously shipped with Tcl/Tk 8.3.2). | 
 | 16770 |  | 
 | 16771 | - When Python is built under a Microsoft compiler, sys.version now | 
 | 16772 |   includes the compiler version number (_MSC_VER).  For example, under | 
 | 16773 |   MSVC 6, sys.version contains the substring "MSC v.1200 ".  1200 is | 
 | 16774 |   the value of _MSC_VER under MSVC 6. | 
 | 16775 |  | 
 | 16776 | - Sometimes the uninstall executable (UNWISE.EXE) vanishes.  One cause | 
 | 16777 |   of that has been fixed in the installer (disabled Wise's "delete in- | 
 | 16778 |   use files" uninstall option). | 
 | 16779 |  | 
 | 16780 | - Fixed a bug in urllib's proxy handling in Windows.  [SF bug #503031] | 
 | 16781 |  | 
 | 16782 | - The installer now installs Start menu shortcuts under (the local | 
 | 16783 |   equivalent of) "All Users" when doing an Admin install. | 
 | 16784 |  | 
 | 16785 | - file.truncate([newsize]) now works on Windows for all newsize values. | 
 | 16786 |   It used to fail if newsize didn't fit in 32 bits, reflecting a | 
 | 16787 |   limitation of MS _chsize (which is no longer used). | 
 | 16788 |  | 
 | 16789 | - os.waitpid() is now implemented for Windows, and can be used to block | 
 | 16790 |   until a specified process exits.  This is similar to, but not exactly | 
 | 16791 |   the same as, os.waitpid() on POSIX systems.  If you're waiting for | 
 | 16792 |   a specific process whose pid was obtained from one of the spawn() | 
 | 16793 |   functions, the same Python os.waitpid() code works across platforms. | 
 | 16794 |   See the docs for details.  The docs were changed to clarify that | 
 | 16795 |   spawn functions return, and waitpid requires, a process handle on | 
 | 16796 |   Windows (not the same thing as a Windows process id). | 
 | 16797 |  | 
 | 16798 | - New tempfile.TemporaryFile implementation for Windows:  this doesn't | 
 | 16799 |   need a TemporaryFileWrapper wrapper anymore, and should be immune | 
 | 16800 |   to a nasty problem:  before 2.3, if you got a temp file on Windows, it | 
 | 16801 |   got wrapped in an object whose close() method first closed the | 
 | 16802 |   underlying file, then deleted the file.  This usually worked fine. | 
 | 16803 |   However, the spawn family of functions on Windows create (at a low C | 
 | 16804 |   level) the same set of open files in the spawned process Q as were | 
 | 16805 |   open in the spawning process P.  If a temp file f was among them, then | 
 | 16806 |   doing f.close() in P first closed P's C-level file handle on f, but Q's | 
 | 16807 |   C-level file handle on f remained open, so the attempt in P to delete f | 
 | 16808 |   blew up with a "Permission denied" error (Windows doesn't allow | 
 | 16809 |   deleting open files).  This was surprising, subtle, and difficult to | 
 | 16810 |   work around. | 
 | 16811 |  | 
 | 16812 | - The os module now exports all the symbolic constants usable with the | 
 | 16813 |   low-level os.open() on Windows:  the new constants in 2.3 are | 
 | 16814 |   O_NOINHERIT, O_SHORT_LIVED, O_TEMPORARY, O_RANDOM and O_SEQUENTIAL. | 
 | 16815 |   The others were also available in 2.2:  O_APPEND, O_BINARY, O_CREAT, | 
 | 16816 |   O_EXCL, O_RDONLY, O_RDWR, O_TEXT, O_TRUNC and O_WRONLY.  Contrary | 
 | 16817 |   to Microsoft docs, O_SHORT_LIVED does not seem to imply O_TEMPORARY | 
 | 16818 |   (so specify both if you want both; note that neither is useful unless | 
 | 16819 |   specified with O_CREAT too). | 
 | 16820 |  | 
 | 16821 | Mac | 
 | 16822 | ---- | 
 | 16823 |  | 
 | 16824 | - Mac/Relnotes is gone, the release notes are now here. | 
 | 16825 |  | 
 | 16826 | - Python (the OSX-only, unix-based version, not the OS9-compatible CFM | 
 | 16827 |   version) now fully supports unicode strings as arguments to various file | 
 | 16828 |   system calls, eg. open(), file(), os.stat() and os.listdir(). | 
 | 16829 |  | 
 | 16830 | - The current naming convention for Python on the Macintosh is that MacPython | 
 | 16831 |   refers to the unix-based OSX-only version, and MacPython-OS9 refers to the | 
 | 16832 |   CFM-based version that runs on both OS9 and OSX. | 
 | 16833 |  | 
 | 16834 | - All MacPython-OS9 functionality is now available in an OSX unix build, | 
 | 16835 |   including the Carbon modules, the IDE, OSA support, etc. A lot of this | 
 | 16836 |   will only work correctly in a framework build, though, because you cannot | 
 | 16837 |   talk to the window manager unless your application is run from a .app | 
 | 16838 |   bundle. There is a command line tool "pythonw" that runs your script | 
 | 16839 |   with an interpreter living in such a .app bundle, this interpreter should | 
 | 16840 |   be used to run any Python script using the window manager (including | 
 | 16841 |   Tkinter or wxPython scripts). | 
 | 16842 |  | 
 | 16843 | - Most of Mac/Lib has moved to Lib/plat-mac, which is again used both in | 
 | 16844 |   MacPython-OSX and MacPython-OS9. The only modules remaining in Mac/Lib | 
 | 16845 |   are specifically for MacPython-OS9 (CFM support, preference resources, etc). | 
 | 16846 |  | 
 | 16847 | - A new utility PythonLauncher will start a Python interpreter when a .py or | 
 | 16848 |   .pyw script is double-clicked in the Finder. By default .py scripts are | 
 | 16849 |   run with a normal Python interpreter in a Terminal window and .pyw | 
 | 16850 |   files are run with a window-aware pythonw interpreter without a Terminal | 
 | 16851 |   window, but all this can be customized. | 
 | 16852 |  | 
 | 16853 | - MacPython-OS9 is now Carbon-only, so it runs on Mac OS 9 or Mac OS X and | 
 | 16854 |   possibly on Mac OS 8.6 with the right CarbonLib installed, but not on earlier | 
 | 16855 |   releases. | 
 | 16856 |  | 
 | 16857 | - Many tools such as BuildApplet.py and gensuitemodule.py now support a command | 
 | 16858 |   line interface too. | 
 | 16859 |  | 
 | 16860 | - All the Carbon classes are now PEP253 compliant, meaning that you can | 
 | 16861 |   subclass them from Python. Most of the attributes have gone, you should | 
 | 16862 |   now use the accessor function call API, which is also what Apple's | 
 | 16863 |   documentation uses. Some attributes such as grafport.visRgn are still | 
 | 16864 |   available for convenience. | 
 | 16865 |  | 
 | 16866 | - New Carbon modules File (implementing the APIs in Files.h and Aliases.h) | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 16867 |   and Folder (APIs from Folders.h). The old macfs built-in module is | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 16868 |   gone, and replaced by a Python wrapper around the new modules. | 
 | 16869 |  | 
 | 16870 | - Pathname handling should now be fully consistent: MacPython-OSX always uses | 
 | 16871 |   unix pathnames and MacPython-OS9 always uses colon-separated Mac pathnames | 
 | 16872 |   (also when running on Mac OS X). | 
 | 16873 |  | 
 | 16874 | - New Carbon modules Help and AH give access to the Carbon Help Manager. | 
 | 16875 |   There are hooks in the IDE to allow accessing the Python documentation | 
 | 16876 |   (and Apple's Carbon and Cocoa documentation) through the Help Viewer. | 
 | 16877 |   See Mac/OSX/README for converting the Python documentation to a | 
 | 16878 |   Help Viewer compatible form and installing it. | 
 | 16879 |  | 
 | 16880 | - OSA support has been redesigned and the generated Python classes now | 
 | 16881 |   mirror the inheritance defined by the underlying OSA classes. | 
 | 16882 |  | 
 | 16883 | - MacPython no longer maps both \r and \n to \n on input for any text file. | 
 | 16884 |   This feature has been replaced by universal newline support (PEP278). | 
 | 16885 |  | 
 | 16886 | - The default encoding for Python sourcefiles in MacPython-OS9 is no longer | 
 | 16887 |   mac-roman (or whatever your local Mac encoding was) but "ascii", like on | 
 | 16888 |   other platforms. If you really need sourcefiles with Mac characters in them | 
 | 16889 |   you can change this in site.py. | 
 | 16890 |  | 
 | 16891 |  | 
 | 16892 | What's New in Python 2.2 final? | 
 | 16893 | =============================== | 
 | 16894 |  | 
 | 16895 | *Release date: 21-Dec-2001* | 
 | 16896 |  | 
 | 16897 | Type/class unification and new-style classes | 
 | 16898 | -------------------------------------------- | 
 | 16899 |  | 
 | 16900 | - pickle.py, cPickle: allow pickling instances of new-style classes | 
 | 16901 |   with a custom metaclass. | 
 | 16902 |  | 
 | 16903 | Core and builtins | 
 | 16904 | ----------------- | 
 | 16905 |  | 
 | 16906 | - weakref proxy object: when comparing, unwrap both arguments if both | 
 | 16907 |   are proxies. | 
 | 16908 |  | 
 | 16909 | Extension modules | 
 | 16910 | ----------------- | 
 | 16911 |  | 
 | 16912 | - binascii.b2a_base64(): fix a potential buffer overrun when encoding | 
 | 16913 |   very short strings. | 
 | 16914 |  | 
 | 16915 | - cPickle: the obscure "fast" mode was suspected of causing stack | 
 | 16916 |   overflows on the Mac.  Hopefully fixed this by setting the recursion | 
 | 16917 |   limit much smaller.  If the limit is too low (it only affects | 
 | 16918 |   performance), you can change it by defining PY_CPICKLE_FAST_LIMIT | 
 | 16919 |   when compiling cPickle.c (or in pyconfig.h). | 
 | 16920 |  | 
 | 16921 | Library | 
 | 16922 | ------- | 
 | 16923 |  | 
 | 16924 | - dumbdbm.py: fixed a dumb old bug (the file didn't get synched at | 
 | 16925 |   close or delete time). | 
 | 16926 |  | 
 | 16927 | - rfc822.py: fixed a bug where the address '<>' was converted to None | 
 | 16928 |   instead of an empty string (also fixes the email.Utils module). | 
 | 16929 |  | 
 | 16930 | - xmlrpclib.py: version 1.0.0; uses precision for doubles. | 
 | 16931 |  | 
 | 16932 | - test suite: the pickle and cPickle tests were not executing any code | 
 | 16933 |   when run from the standard regression test. | 
 | 16934 |  | 
 | 16935 | Tools/Demos | 
 | 16936 | ----------- | 
 | 16937 |  | 
 | 16938 | Build | 
 | 16939 | ----- | 
 | 16940 |  | 
 | 16941 | C API | 
 | 16942 | ----- | 
 | 16943 |  | 
 | 16944 | New platforms | 
 | 16945 | ------------- | 
 | 16946 |  | 
 | 16947 | Tests | 
 | 16948 | ----- | 
 | 16949 |  | 
 | 16950 | Windows | 
 | 16951 | ------- | 
 | 16952 |  | 
 | 16953 | - distutils package: fixed broken Windows installers (bdist_wininst). | 
 | 16954 |  | 
 | 16955 | - tempfile.py: prevent mysterious warnings when TemporaryFileWrapper | 
 | 16956 |   instances are deleted at process exit time. | 
 | 16957 |  | 
 | 16958 | - socket.py: prevent mysterious warnings when socket instances are | 
 | 16959 |   deleted at process exit time. | 
 | 16960 |  | 
 | 16961 | - posixmodule.c: fix a Windows crash with stat() of a filename ending | 
 | 16962 |   in backslash. | 
 | 16963 |  | 
 | 16964 | Mac | 
 | 16965 | ---- | 
 | 16966 |  | 
 | 16967 | - The Carbon toolbox modules have been upgraded to Universal Headers | 
 | 16968 |   3.4, and experimental CoreGraphics and CarbonEvents modules have | 
 | 16969 |   been added.  All only for framework-enabled MacOSX. | 
 | 16970 |  | 
 | 16971 |  | 
 | 16972 | What's New in Python 2.2c1? | 
 | 16973 | =========================== | 
 | 16974 |  | 
 | 16975 | *Release date: 14-Dec-2001* | 
 | 16976 |  | 
 | 16977 | Type/class unification and new-style classes | 
 | 16978 | -------------------------------------------- | 
 | 16979 |  | 
 | 16980 | - Guido's tutorial introduction to the new type/class features has | 
 | 16981 |   been extensively updated.  See | 
 | 16982 |  | 
 | 16983 |       http://www.python.org/2.2/descrintro.html | 
 | 16984 |  | 
 | 16985 |   That remains the primary documentation in this area. | 
 | 16986 |  | 
 | 16987 | - Fixed a leak: instance variables declared with __slots__ were never | 
 | 16988 |   deleted! | 
 | 16989 |  | 
 | 16990 | - The "delete attribute" method of descriptor objects is called | 
 | 16991 |   __delete__, not __del__.  In previous releases, it was mistakenly | 
 | 16992 |   called __del__, which created an unfortunate overloading condition | 
 | 16993 |   with finalizers.  (The "get attribute" and "set attribute" methods | 
 | 16994 |   are still called __get__ and __set__, respectively.) | 
 | 16995 |  | 
 | 16996 | - Some subtle issues with the super built-in were fixed: | 
 | 16997 |  | 
 | 16998 |   (a) When super itself is subclassed, its __get__ method would still | 
 | 16999 |       return an instance of the base class (i.e., of super). | 
 | 17000 |  | 
 | 17001 |   (b) super(C, C()).__class__ would return C rather than super.  This | 
 | 17002 |       is confusing.  To fix this, I decided to change the semantics of | 
 | 17003 |       super so that it only applies to code attributes, not to data | 
 | 17004 |       attributes.  After all, overriding data attributes is not | 
 | 17005 |       supported anyway. | 
 | 17006 |  | 
 | 17007 |   (c) The __get__ method didn't check whether the argument was an | 
 | 17008 |       instance of the type used in creation of the super instance. | 
 | 17009 |  | 
 | 17010 | - Previously, hash() of an instance of a subclass of a mutable type | 
 | 17011 |   (list or dictionary) would return some value, rather than raising | 
 | 17012 |   TypeError.  This has been fixed.  Also, directly calling | 
 | 17013 |   dict.__hash__ and list.__hash__ now raises the same TypeError | 
 | 17014 |   (previously, these were the same as object.__hash__). | 
 | 17015 |  | 
 | 17016 | - New-style objects now support deleting their __dict__.  This is for | 
 | 17017 |   all intents and purposes equivalent to assigning a brand new empty | 
 | 17018 |   dictionary, but saves space if the object is not used further. | 
 | 17019 |  | 
 | 17020 | Core and builtins | 
 | 17021 | ----------------- | 
 | 17022 |  | 
 | 17023 | - -Qnew now works as documented in PEP 238:  when -Qnew is passed on | 
 | 17024 |   the command line, all occurrences of "/" use true division instead | 
 | 17025 |   of classic division.  See the PEP for details.  Note that "all" | 
 | 17026 |   means all instances in library and 3rd-party modules, as well as in | 
 | 17027 |   your own code.  As the PEP says, -Qnew is intended for use only in | 
 | 17028 |   educational environments with control over the libraries in use. | 
 | 17029 |   Note that test_coercion.py in the standard Python test suite fails | 
 | 17030 |   under -Qnew; this is expected, and won't be repaired until true | 
 | 17031 |   division becomes the default (in the meantime, test_coercion is | 
 | 17032 |   testing the current rules). | 
 | 17033 |  | 
 | 17034 | - complex() now only allows the first argument to be a string | 
 | 17035 |   argument, and raises TypeError if either the second arg is a string | 
 | 17036 |   or if the second arg is specified when the first is a string. | 
 | 17037 |  | 
 | 17038 | Extension modules | 
 | 17039 | ----------------- | 
 | 17040 |  | 
 | 17041 | - gc.get_referents was renamed to gc.get_referrers. | 
 | 17042 |  | 
 | 17043 | Library | 
 | 17044 | ------- | 
 | 17045 |  | 
 | 17046 | - Functions in the os.spawn() family now release the global interpreter | 
 | 17047 |   lock around calling the platform spawn.  They should always have done | 
 | 17048 |   this, but did not before 2.2c1.  Multithreaded programs calling | 
 | 17049 |   an os.spawn function with P_WAIT will no longer block all Python threads | 
 | 17050 |   until the spawned program completes.  It's possible that some programs | 
 | 17051 |   relies on blocking, although more likely by accident than by design. | 
 | 17052 |  | 
 | 17053 | - webbrowser defaults to netscape.exe on OS/2 now. | 
 | 17054 |  | 
 | 17055 | - Tix.ResizeHandle exposes detach_widget, hide, and show. | 
 | 17056 |  | 
 | 17057 | - The charset alias windows_1252 has been added. | 
 | 17058 |  | 
 | 17059 | - types.StringTypes is a tuple containing the defined string types; | 
 | 17060 |   usually this will be (str, unicode), but if Python was compiled | 
 | 17061 |   without Unicode support it will be just (str,). | 
 | 17062 |  | 
 | 17063 | - The pulldom and minidom modules were synchronized to PyXML. | 
 | 17064 |  | 
 | 17065 | Tools/Demos | 
 | 17066 | ----------- | 
 | 17067 |  | 
 | 17068 | - A new script called Tools/scripts/google.py was added, which fires | 
 | 17069 |   off a search on Google. | 
 | 17070 |  | 
 | 17071 | Build | 
 | 17072 | ----- | 
 | 17073 |  | 
 | 17074 | - Note that release builds of Python should arrange to define the | 
 | 17075 |   preprocessor symbol NDEBUG on the command line (or equivalent). | 
 | 17076 |   In the 2.2 pre-release series we tried to define this by magic in | 
 | 17077 |   Python.h instead, but it proved to cause problems for extension | 
 | 17078 |   authors.  The Unix, Windows and Mac builds now all define NDEBUG in | 
 | 17079 |   release builds via cmdline (or equivalent) instead.  Ports to | 
 | 17080 |   other platforms should do likewise. | 
 | 17081 |  | 
 | 17082 | - It is no longer necessary to use --with-suffix when building on a | 
 | 17083 |   case-insensitive file system (such as Mac OS X HFS+). In the build | 
 | 17084 |   directory an extension is used, but not in the installed python. | 
 | 17085 |  | 
 | 17086 | C API | 
 | 17087 | ----- | 
 | 17088 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 17089 | - New function PyDict_MergeFromSeq2() exposes the built-in dict | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 17090 |   constructor's logic for updating a dictionary from an iterable object | 
 | 17091 |   producing key-value pairs. | 
 | 17092 |  | 
 | 17093 | - PyArg_ParseTupleAndKeywords() requires that the number of entries in | 
 | 17094 |   the keyword list equal the number of argument specifiers.  This | 
 | 17095 |   wasn't checked correctly, and PyArg_ParseTupleAndKeywords could even | 
 | 17096 |   dump core in some bad cases.  This has been repaired.  As a result, | 
 | 17097 |   PyArg_ParseTupleAndKeywords may raise RuntimeError in bad cases that | 
 | 17098 |   previously went unchallenged. | 
 | 17099 |  | 
 | 17100 | New platforms | 
 | 17101 | ------------- | 
 | 17102 |  | 
 | 17103 | Tests | 
 | 17104 | ----- | 
 | 17105 |  | 
 | 17106 | Windows | 
 | 17107 | ------- | 
 | 17108 |  | 
 | 17109 | Mac | 
 | 17110 | ---- | 
 | 17111 |  | 
 | 17112 | - In unix-Python on Mac OS X (and darwin) sys.platform is now "darwin", | 
 | 17113 |   without any trailing digits. | 
 | 17114 |  | 
 | 17115 | - Changed logic for finding python home in Mac OS X framework Pythons. | 
 | 17116 |   Now sys.executable points to the executable again, in stead of to | 
 | 17117 |   the shared library. The latter is used only for locating the python | 
 | 17118 |   home. | 
 | 17119 |  | 
 | 17120 |  | 
 | 17121 | What's New in Python 2.2b2? | 
 | 17122 | =========================== | 
 | 17123 |  | 
 | 17124 | *Release date: 16-Nov-2001* | 
 | 17125 |  | 
 | 17126 | Type/class unification and new-style classes | 
 | 17127 | -------------------------------------------- | 
 | 17128 |  | 
 | 17129 | - Multiple inheritance mixing new-style and classic classes in the | 
 | 17130 |   list of base classes is now allowed, so this works now: | 
 | 17131 |  | 
 | 17132 |       class Classic: pass | 
 | 17133 |       class Mixed(Classic, object): pass | 
 | 17134 |  | 
 | 17135 |   The MRO (method resolution order) for each base class is respected | 
 | 17136 |   according to its kind, but the MRO for the derived class is computed | 
 | 17137 |   using new-style MRO rules if any base class is a new-style class. | 
 | 17138 |   This needs to be documented. | 
 | 17139 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 17140 | - The new built-in dictionary() constructor, and dictionary type, have | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 17141 |   been renamed to dict.  This reflects a decade of common usage. | 
 | 17142 |  | 
 | 17143 | - dict() now accepts an iterable object producing 2-sequences.  For | 
 | 17144 |   example, dict(d.items()) == d for any dictionary d.  The argument, | 
 | 17145 |   and the elements of the argument, can be any iterable objects. | 
 | 17146 |  | 
 | 17147 | - New-style classes can now have a __del__ method, which is called | 
 | 17148 |   when the instance is deleted (just like for classic classes). | 
 | 17149 |  | 
 | 17150 | - Assignment to object.__dict__ is now possible, for objects that are | 
 | 17151 |   instances of new-style classes that have a __dict__ (unless the base | 
 | 17152 |   class forbids it). | 
 | 17153 |  | 
 | 17154 | - Methods of built-in types now properly check for keyword arguments | 
 | 17155 |   (formerly these were silently ignored).  The only built-in methods | 
 | 17156 |   that take keyword arguments are __call__, __init__ and __new__. | 
 | 17157 |  | 
 | 17158 | - The socket function has been converted to a type; see below. | 
 | 17159 |  | 
 | 17160 | Core and builtins | 
 | 17161 | ----------------- | 
 | 17162 |  | 
 | 17163 | - Assignment to __debug__ raises SyntaxError at compile-time.  This | 
 | 17164 |   was promised when 2.1c1 was released as "What's New in Python 2.1c1" | 
 | 17165 |   (see below) says. | 
 | 17166 |  | 
 | 17167 | - Clarified the error messages for unsupported operands to an operator | 
 | 17168 |   (like 1 + ''). | 
 | 17169 |  | 
 | 17170 | Extension modules | 
 | 17171 | ----------------- | 
 | 17172 |  | 
 | 17173 | - mmap has a new keyword argument, "access", allowing a uniform way for | 
 | 17174 |   both Windows and Unix users to create read-only, write-through and | 
 | 17175 |   copy-on-write memory mappings.  This was previously possible only on | 
 | 17176 |   Unix.  A new keyword argument was required to support this in a | 
 | 17177 |   uniform way because the mmap() signatures had diverged across | 
 | 17178 |   platforms.  Thanks to Jay T Miller for repairing this! | 
 | 17179 |  | 
 | 17180 | - By default, the gc.garbage list now contains only those instances in | 
 | 17181 |   unreachable cycles that have __del__ methods; in 2.1 it contained all | 
 | 17182 |   instances in unreachable cycles.  "Instances" here has been generalized | 
 | 17183 |   to include instances of both new-style and old-style classes. | 
 | 17184 |  | 
 | 17185 | - The socket module defines a new method for socket objects, | 
 | 17186 |   sendall().  This is like send() but may make multiple calls to | 
 | 17187 |   send() until all data has been sent.  Also, the socket function has | 
 | 17188 |   been converted to a subclassable type, like list and tuple (etc.) | 
 | 17189 |   before it; socket and SocketType are now the same thing. | 
 | 17190 |  | 
 | 17191 | - Various bugfixes to the curses module.  There is now a test suite | 
 | 17192 |   for the curses module (you have to run it manually). | 
 | 17193 |  | 
 | 17194 | - binascii.b2a_base64 no longer places an arbitrary restriction of 57 | 
 | 17195 |   bytes on its input. | 
 | 17196 |  | 
 | 17197 | Library | 
 | 17198 | ------- | 
 | 17199 |  | 
 | 17200 | - tkFileDialog exposes a Directory class and askdirectory | 
 | 17201 |   convenience function. | 
 | 17202 |  | 
 | 17203 | - Symbolic group names in regular expressions must be unique.  For | 
 | 17204 |   example, the regexp r'(?P<abc>)(?P<abc>)' is not allowed, because a | 
 | 17205 |   single name can't mean both "group 1" and "group 2" simultaneously. | 
 | 17206 |   Python 2.2 detects this error at regexp compilation time; | 
 | 17207 |   previously, the error went undetected, and results were | 
 | 17208 |   unpredictable.  Also in sre, the pattern.split(), pattern.sub(), and | 
 | 17209 |   pattern.subn() methods have been rewritten in C.  Also, an | 
 | 17210 |   experimental function/method finditer() has been added, which works | 
 | 17211 |   like findall() but returns an iterator. | 
 | 17212 |  | 
 | 17213 | - Tix exposes more commands through the classes DirSelectBox, | 
 | 17214 |   DirSelectDialog, ListNoteBook, Meter, CheckList, and the | 
 | 17215 |   methods tix_addbitmapdir, tix_cget, tix_configure, tix_filedialog, | 
 | 17216 |   tix_getbitmap, tix_getimage, tix_option_get, and tix_resetoptions. | 
 | 17217 |  | 
 | 17218 | - Traceback objects are now scanned by cyclic garbage collection, so | 
 | 17219 |   cycles created by casual use of sys.exc_info() no longer cause | 
 | 17220 |   permanent memory leaks (provided garbage collection is enabled). | 
 | 17221 |  | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 17222 | - mimetypes.py has optional support for non-standard, but commonly | 
 | 17223 |   found types.  guess_type() and guess_extension() now accept an | 
 | 17224 |   optional 'strict' flag, defaulting to true, which controls whether | 
 | 17225 |   recognize non-standard types or not.  A few non-standard types we | 
 | 17226 |   know about have been added.  Also, when run as a script, there are | 
 | 17227 |   new -l and -e options. | 
 | 17228 |  | 
 | 17229 | - statcache is now deprecated. | 
 | 17230 |  | 
 | 17231 | - email.Utils.formatdate() now produces the preferred RFC 2822 style | 
 | 17232 |   dates with numeric timezones (it used to produce obsolete dates | 
 | 17233 |   hard coded to "GMT" timezone).  An optional 'localtime' flag is | 
 | 17234 |   added to produce dates in the local timezone, with daylight savings | 
 | 17235 |   time properly taken into account. | 
 | 17236 |  | 
 | 17237 | - In pickle and cPickle, instead of masking errors in load() by | 
 | 17238 |   transforming them into SystemError, we let the original exception | 
 | 17239 |   propagate out.  Also, implement support for __safe_for_unpickling__ | 
 | 17240 |   in pickle, as it already was supported in cPickle. | 
 | 17241 |  | 
 | 17242 | Tools/Demos | 
 | 17243 | ----------- | 
 | 17244 |  | 
 | 17245 | Build | 
 | 17246 | ----- | 
 | 17247 |  | 
 | 17248 | - The dbm module is built using libdb1 if available.  The bsddb module | 
 | 17249 |   is built with libdb3 if available. | 
 | 17250 |  | 
 | 17251 | - Misc/Makefile.pre.in has been removed by BDFL pronouncement. | 
 | 17252 |  | 
 | 17253 | C API | 
 | 17254 | ----- | 
 | 17255 |  | 
 | 17256 | - New function PySequence_Fast_GET_SIZE() returns the size of a non- | 
 | 17257 |   NULL result from PySequence_Fast(), more quickly than calling | 
 | 17258 |   PySequence_Size(). | 
 | 17259 |  | 
 | 17260 | - New argument unpacking function PyArg_UnpackTuple() added. | 
 | 17261 |  | 
 | 17262 | - New functions PyObject_CallFunctionObjArgs() and | 
 | 17263 |   PyObject_CallMethodObjArgs() have been added to make it more | 
 | 17264 |   convenient and efficient to call functions and methods from C. | 
 | 17265 |  | 
 | 17266 | - PyArg_ParseTupleAndKeywords() no longer masks errors, so it's | 
 | 17267 |   possible that this will propagate errors it didn't before. | 
 | 17268 |  | 
 | 17269 | - New function PyObject_CheckReadBuffer(), which returns true if its | 
 | 17270 |   argument supports the single-segment readable buffer interface. | 
 | 17271 |  | 
 | 17272 | New platforms | 
 | 17273 | ------------- | 
 | 17274 |  | 
 | 17275 | - We've finally confirmed that this release builds on HP-UX 11.00, | 
 | 17276 |   *with* threads, and passes the test suite. | 
 | 17277 |  | 
 | 17278 | - Thanks to a series of patches from Michael Muller, Python may build | 
 | 17279 |   again under OS/2 Visual Age C++. | 
 | 17280 |  | 
 | 17281 | - Updated RISCOS port by Dietmar Schwertberger. | 
 | 17282 |  | 
 | 17283 | Tests | 
 | 17284 | ----- | 
 | 17285 |  | 
 | 17286 | - Added a test script for the curses module.  It isn't run automatically; | 
 | 17287 |   regrtest.py must be run with '-u curses' to enable it. | 
 | 17288 |  | 
 | 17289 | Windows | 
 | 17290 | ------- | 
 | 17291 |  | 
 | 17292 | Mac | 
 | 17293 | ---- | 
 | 17294 |  | 
 | 17295 | - PythonScript has been moved to unsupported and is slated to be | 
 | 17296 |   removed completely in the next release. | 
 | 17297 |  | 
 | 17298 | - It should now be possible to build applets that work on both OS9 and | 
 | 17299 |   OSX. | 
 | 17300 |  | 
 | 17301 | - The core is now linked with CoreServices not Carbon; as a side | 
 | 17302 |   result, default 8bit encoding on OSX is now ASCII. | 
 | 17303 |  | 
 | 17304 | - Python should now build on OSX 10.1.1 | 
 | 17305 |  | 
 | 17306 |  | 
 | 17307 | What's New in Python 2.2b1? | 
 | 17308 | =========================== | 
 | 17309 |  | 
 | 17310 | *Release date: 19-Oct-2001* | 
 | 17311 |  | 
 | 17312 | Type/class unification and new-style classes | 
 | 17313 | -------------------------------------------- | 
 | 17314 |  | 
 | 17315 | - New-style classes are now always dynamic (except for built-in and | 
 | 17316 |   extension types).  There is no longer a performance penalty, and I | 
 | 17317 |   no longer see another reason to keep this baggage around.  One relic | 
 | 17318 |   remains: the __dict__ of a new-style class is a read-only proxy; you | 
 | 17319 |   must set the class's attribute to modify it.  As a consequence, the | 
 | 17320 |   __defined__ attribute of new-style types no longer exists, for lack | 
 | 17321 |   of need: there is once again only one __dict__ (although in the | 
 | 17322 |   future a __cache__ may be resurrected with a similar function, if I | 
 | 17323 |   can prove that it actually speeds things up). | 
 | 17324 |  | 
 | 17325 | - C.__doc__ now works as expected for new-style classes (in 2.2a4 it | 
 | 17326 |   always returned None, even when there was a class docstring). | 
 | 17327 |  | 
 | 17328 | - doctest now finds and runs docstrings attached to new-style classes, | 
 | 17329 |   class methods, static methods, and properties. | 
 | 17330 |  | 
 | 17331 | Core and builtins | 
 | 17332 | ----------------- | 
 | 17333 |  | 
 | 17334 | - A very subtle syntactical pitfall in list comprehensions was fixed. | 
 | 17335 |   For example: [a+b for a in 'abc', for b in 'def'].  The comma in | 
 | 17336 |   this example is a mistake.  Previously, this would silently let 'a' | 
 | 17337 |   iterate over the singleton tuple ('abc',), yielding ['abcd', 'abce', | 
 | 17338 |   'abcf'] rather than the intended ['ad', 'ae', 'af', 'bd', 'be', | 
 | 17339 |   'bf', 'cd', 'ce', 'cf'].  Now, this is flagged as a syntax error. | 
 | 17340 |   Note that [a for a in <singleton>] is a convoluted way to say | 
 | 17341 |   [<singleton>] anyway, so it's not like any expressiveness is lost. | 
 | 17342 |  | 
 | 17343 | - getattr(obj, name, default) now only catches AttributeError, as | 
 | 17344 |   documented, rather than returning the default value for all | 
 | 17345 |   exceptions (which could mask bugs in a __getattr__ hook, for | 
 | 17346 |   example). | 
 | 17347 |  | 
 | 17348 | - Weak reference objects are now part of the core and offer a C API. | 
 | 17349 |   A bug which could allow a core dump when binary operations involved | 
 | 17350 |   proxy reference has been fixed.  weakref.ReferenceError is now a | 
 | 17351 |   built-in exception. | 
 | 17352 |  | 
 | 17353 | - unicode(obj) now behaves more like str(obj), accepting arbitrary | 
 | 17354 |   objects, and calling a __unicode__ method if it exists. | 
 | 17355 |   unicode(obj, encoding) and unicode(obj, encoding, errors) still | 
 | 17356 |   require an 8-bit string or character buffer argument. | 
 | 17357 |  | 
 | 17358 | - isinstance() now allows any object as the first argument and a | 
 | 17359 |   class, a type or something with a __bases__ tuple attribute for the | 
 | 17360 |   second argument.  The second argument may also be a tuple of a | 
 | 17361 |   class, type, or something with __bases__, in which case isinstance() | 
 | 17362 |   will return true if the first argument is an instance of any of the | 
 | 17363 |   things contained in the second argument tuple.  E.g. | 
 | 17364 |  | 
 | 17365 |   isinstance(x, (A, B)) | 
 | 17366 |  | 
 | 17367 |   returns true if x is an instance of A or B. | 
 | 17368 |  | 
 | 17369 | Extension modules | 
 | 17370 | ----------------- | 
 | 17371 |  | 
 | 17372 | - thread.start_new_thread() now returns the thread ID (previously None). | 
 | 17373 |  | 
 | 17374 | - binascii has now two quopri support functions, a2b_qp and b2a_qp. | 
 | 17375 |  | 
 | 17376 | - readline now supports setting the startup_hook and the | 
 | 17377 |   pre_event_hook, and adds the add_history() function. | 
 | 17378 |  | 
 | 17379 | - os and posix supports chroot(), setgroups() and unsetenv() where | 
 | 17380 |   available.  The stat(), fstat(), statvfs() and fstatvfs() functions | 
 | 17381 |   now return "pseudo-sequences" -- the various fields can now be | 
 | 17382 |   accessed as attributes (e.g. os.stat("/").st_mtime) but for | 
 | 17383 |   backwards compatibility they also behave as a fixed-length sequence. | 
 | 17384 |   Some platform-specific fields (e.g. st_rdev) are only accessible as | 
 | 17385 |   attributes. | 
 | 17386 |  | 
 | 17387 | - time: localtime(), gmtime() and strptime() now return a | 
 | 17388 |   pseudo-sequence similar to the os.stat() return value, with | 
 | 17389 |   attributes like tm_year etc. | 
 | 17390 |  | 
 | 17391 | - Decompression objects in the zlib module now accept an optional | 
 | 17392 |   second parameter to decompress() that specifies the maximum amount | 
 | 17393 |   of memory to use for the uncompressed data. | 
 | 17394 |  | 
 | 17395 | - optional SSL support in the socket module now exports OpenSSL | 
 | 17396 |   functions RAND_add(), RAND_egd(), and RAND_status().  These calls | 
 | 17397 |   are useful on platforms like Solaris where OpenSSL does not | 
 | 17398 |   automatically seed its PRNG.  Also, the keyfile and certfile | 
 | 17399 |   arguments to socket.ssl() are now optional. | 
 | 17400 |  | 
 | 17401 | - posixmodule (and by extension, the os module on POSIX platforms) now | 
 | 17402 |   exports O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW. | 
 | 17403 |  | 
 | 17404 | Library | 
 | 17405 | ------- | 
 | 17406 |  | 
 | 17407 | - doctest now excludes functions and classes not defined by the module | 
 | 17408 |   being tested, thanks to Tim Hochberg. | 
 | 17409 |  | 
 | 17410 | - HotShot, a new profiler implemented using a C-based callback, has | 
 | 17411 |   been added.  This substantially reduces the overhead of profiling, | 
 | 17412 |   but it is still quite preliminary.  Support modules and | 
 | 17413 |   documentation will be added in upcoming releases (before 2.2 final). | 
 | 17414 |  | 
 | 17415 | - profile now produces correct output in situations where an exception | 
 | 17416 |   raised in Python is cleared by C code (e.g. hasattr()).  This used | 
 | 17417 |   to cause wrong output, including spurious claims of recursive | 
 | 17418 |   functions and attribution of time spent to the wrong function. | 
 | 17419 |  | 
 | 17420 |   The code and documentation for the derived OldProfile and HotProfile | 
 | 17421 |   profiling classes was removed.  The code hasn't worked for years (if | 
 | 17422 |   you tried to use them, they raised exceptions).  OldProfile | 
 | 17423 |   intended to reproduce the behavior of the profiler Python used more | 
 | 17424 |   than 7 years ago, and isn't interesting anymore.  HotProfile intended | 
 | 17425 |   to provide a faster profiler (but producing less information), and | 
 | 17426 |   that's a worthy goal we intend to meet via a different approach (but | 
 | 17427 |   without losing information). | 
 | 17428 |  | 
 | 17429 | - Profile.calibrate() has a new implementation that should deliver | 
 | 17430 |   a much better system-specific calibration constant.  The constant can | 
 | 17431 |   now be specified in an instance constructor, or as a Profile class or | 
 | 17432 |   instance variable, instead of by editing profile.py's source code. | 
 | 17433 |   Calibration must still be done manually (see the docs for the profile | 
 | 17434 |   module). | 
 | 17435 |  | 
 | 17436 |   Note that Profile.calibrate() must be overridden by subclasses. | 
 | 17437 |   Improving the accuracy required exploiting detailed knowledge of | 
 | 17438 |   profiler internals; the earlier method abstracted away the details | 
 | 17439 |   and measured a simplified model instead, but consequently computed | 
 | 17440 |   a constant too small by a factor of 2 on some modern machines. | 
 | 17441 |  | 
 | 17442 | - quopri's encode and decode methods take an optional header parameter, | 
 | 17443 |   which indicates whether output is intended for the header 'Q' | 
 | 17444 |   encoding. | 
 | 17445 |  | 
 | 17446 | - The SocketServer.ThreadingMixIn class now closes the request after | 
 | 17447 |   finish_request() returns.  (Not when it errors out though.) | 
 | 17448 |  | 
 | 17449 | - The nntplib module's NNTP.body() method has grown a 'file' argument | 
 | 17450 |   to allow saving the message body to a file. | 
 | 17451 |  | 
 | 17452 | - The email package has added a class email.Parser.HeaderParser which | 
 | 17453 |   only parses headers and does not recurse into the message's body. | 
 | 17454 |   Also, the module/class MIMEAudio has been added for representing | 
 | 17455 |   audio data (contributed by Anthony Baxter). | 
 | 17456 |  | 
 | 17457 | - ftplib should be able to handle files > 2GB. | 
 | 17458 |  | 
 | 17459 | - ConfigParser.getboolean() now also interprets TRUE, FALSE, YES, NO, | 
 | 17460 |   ON, and OFF. | 
 | 17461 |  | 
 | 17462 | - xml.dom.minidom NodeList objects now support the length attribute | 
 | 17463 |   and item() method as required by the DOM specifications. | 
 | 17464 |  | 
 | 17465 | Tools/Demos | 
 | 17466 | ----------- | 
 | 17467 |  | 
 | 17468 | - Demo/dns was removed.  It no longer serves any purpose; a package | 
 | 17469 |   derived from it is now maintained by Anthony Baxter, see | 
 | 17470 |   http://PyDNS.SourceForge.net. | 
 | 17471 |  | 
 | 17472 | - The freeze tool has been made more robust, and two new options have | 
 | 17473 |   been added: -X and -E. | 
 | 17474 |  | 
 | 17475 | Build | 
 | 17476 | ----- | 
 | 17477 |  | 
 | 17478 | - configure will use CXX in LINKCC if CXX is used to build main() and | 
 | 17479 |   the system requires to link a C++ main using the C++ compiler. | 
 | 17480 |  | 
 | 17481 | C API | 
 | 17482 | ----- | 
 | 17483 |  | 
 | 17484 | - The documentation for the tp_compare slot is updated to require that | 
 | 17485 |   the return value must be -1, 0, 1; an arbitrary number <0 or >0 is | 
 | 17486 |   not correct.  This is not yet enforced but will be enforced in | 
 | 17487 |   Python 2.3; even later, we may use -2 to indicate errors and +2 for | 
 | 17488 |   "NotImplemented".  Right now, -1 should be used for an error return. | 
 | 17489 |  | 
 | 17490 | - PyLong_AsLongLong() now accepts int (as well as long) arguments. | 
 | 17491 |   Consequently, PyArg_ParseTuple's 'L' code also accepts int (as well | 
 | 17492 |   as long) arguments. | 
 | 17493 |  | 
 | 17494 | - PyThread_start_new_thread() now returns a long int giving the thread | 
 | 17495 |   ID, if one can be calculated; it returns -1 for error, 0 if no | 
 | 17496 |   thread ID is calculated (this is an incompatible change, but only | 
 | 17497 |   the thread module used this API).  This code has only really been | 
 | 17498 |   tested on Linux and Windows; other platforms please beware (and | 
 | 17499 |   report any bugs or strange behavior). | 
 | 17500 |  | 
 | 17501 | - PyUnicode_FromEncodedObject() no longer accepts Unicode objects as | 
 | 17502 |   input. | 
 | 17503 |  | 
 | 17504 | New platforms | 
 | 17505 | ------------- | 
 | 17506 |  | 
 | 17507 | Tests | 
 | 17508 | ----- | 
 | 17509 |  | 
 | 17510 | Windows | 
 | 17511 | ------- | 
 | 17512 |  | 
 | 17513 | - Installer:  If you install IDLE, and don't disable file-extension | 
 | 17514 |   registration, a new "Edit with IDLE" context (right-click) menu entry | 
 | 17515 |   is created for .py and .pyw files. | 
 | 17516 |  | 
 | 17517 | - The signal module now supports SIGBREAK on Windows, thanks to Steven | 
 | 17518 |   Scott.  Note that SIGBREAK is unique to Windows.  The default SIGBREAK | 
 | 17519 |   action remains to call Win32 ExitProcess().  This can be changed via | 
 | 17520 |   signal.signal().  For example:: | 
 | 17521 |  | 
 | 17522 |       # Make Ctrl+Break raise KeyboardInterrupt, like Python's default Ctrl+C | 
 | 17523 |       # (SIGINT) behavior. | 
 | 17524 |       import signal | 
 | 17525 |       signal.signal(signal.SIGBREAK, signal.default_int_handler) | 
 | 17526 |  | 
 | 17527 |       try: | 
 | 17528 |           while 1: | 
 | 17529 |               pass | 
 | 17530 |       except KeyboardInterrupt: | 
 | 17531 |           # We get here on Ctrl+C or Ctrl+Break now; if we had not changed | 
 | 17532 |           # SIGBREAK, only on Ctrl+C (and Ctrl+Break would terminate the | 
 | 17533 |           # program without the possibility for any Python-level cleanup). | 
 | 17534 |           print "Clean exit" | 
 | 17535 |  | 
 | 17536 |  | 
 | 17537 | What's New in Python 2.2a4? | 
 | 17538 | =========================== | 
 | 17539 |  | 
 | 17540 | *Release date: 28-Sep-2001* | 
 | 17541 |  | 
 | 17542 | Type/class unification and new-style classes | 
 | 17543 | -------------------------------------------- | 
 | 17544 |  | 
 | 17545 | - pydoc and inspect are now aware of new-style classes; | 
 | 17546 |   e.g. help(list) at the interactive prompt now shows proper | 
 | 17547 |   documentation for all operations on list objects. | 
 | 17548 |  | 
 | 17549 | - Applications using Jim Fulton's ExtensionClass module can now safely | 
 | 17550 |   be used with Python 2.2.  In particular, Zope 2.4.1 now works with | 
 | 17551 |   Python 2.2 (as well as with Python 2.1.1).  The Demo/metaclass | 
 | 17552 |   examples also work again.  It is hoped that Gtk and Boost also work | 
 | 17553 |   with 2.2a4 and beyond.  (If you can confirm this, please write | 
 | 17554 |   webmaster@python.org; if there are still problems, please open a bug | 
 | 17555 |   report on SourceForge.) | 
 | 17556 |  | 
 | 17557 | - property() now takes 4 keyword arguments:  fget, fset, fdel and doc. | 
 | 17558 |   These map to read-only attributes 'fget', 'fset', 'fdel', and '__doc__' | 
 | 17559 |   in the constructed property object.  fget, fset and fdel weren't | 
 | 17560 |   discoverable from Python in 2.2a3.  __doc__ is new, and allows to | 
 | 17561 |   associate a docstring with a property. | 
 | 17562 |  | 
 | 17563 | - Comparison overloading is now more completely implemented.  For | 
 | 17564 |   example, a str subclass instance can properly be compared to a str | 
 | 17565 |   instance, and it can properly overload comparison.  Ditto for most | 
 | 17566 |   other built-in object types. | 
 | 17567 |  | 
 | 17568 | - The repr() of new-style classes has changed; instead of <type | 
 | 17569 |   'M.Foo'> a new-style class is now rendered as <class 'M.Foo'>, | 
 | 17570 |   *except* for built-in types, which are still rendered as <type | 
 | 17571 |   'Foo'> (to avoid upsetting existing code that might parse or | 
 | 17572 |   otherwise rely on repr() of certain type objects). | 
 | 17573 |  | 
 | 17574 | - The repr() of new-style objects is now always <Foo object at XXX>; | 
 | 17575 |   previously, it was sometimes <Foo instance at XXX>. | 
 | 17576 |  | 
 | 17577 | - For new-style classes, what was previously called __getattr__ is now | 
 | 17578 |   called __getattribute__.  This method, if defined, is called for | 
 | 17579 |   *every* attribute access.  A new __getattr__ hook more similar to the | 
 | 17580 |   one in classic classes is defined which is called only if regular | 
 | 17581 |   attribute access raises AttributeError; to catch *all* attribute | 
 | 17582 |   access, you can use __getattribute__ (for new-style classes).  If | 
 | 17583 |   both are defined, __getattribute__ is called first, and if it raises | 
 | 17584 |   AttributeError, __getattr__ is called. | 
 | 17585 |  | 
 | 17586 | - The __class__ attribute of new-style objects can be assigned to. | 
 | 17587 |   The new class must have the same C-level object layout as the old | 
 | 17588 |   class. | 
 | 17589 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 17590 | - The built-in file type can be subclassed now.  In the usual pattern, | 
 | 17591 |   "file" is the name of the built-in type, and file() is a new built-in | 
 | 17592 |   constructor, with the same signature as the built-in open() function. | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 17593 |   file() is now the preferred way to open a file. | 
 | 17594 |  | 
 | 17595 | - Previously, __new__ would only see sequential arguments passed to | 
 | 17596 |   the type in a constructor call; __init__ would see both sequential | 
 | 17597 |   and keyword arguments.  This made no sense whatsoever any more, so | 
 | 17598 |   now both __new__ and __init__ see all arguments. | 
 | 17599 |  | 
 | 17600 | - Previously, hash() applied to an instance of a subclass of str or | 
 | 17601 |   unicode always returned 0.  This has been repaired. | 
 | 17602 |  | 
 | 17603 | - Previously, an operation on an instance of a subclass of an | 
 | 17604 |   immutable type (int, long, float, complex, tuple, str, unicode), | 
 | 17605 |   where the subtype didn't override the operation (and so the | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 17606 |   operation was handled by the built-in type), could return that | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 17607 |   instance instead a value of the base type.  For example, if s was of | 
 | 17608 |   a str subclass type, s[:] returned s as-is.  Now it returns a str | 
 | 17609 |   with the same value as s. | 
 | 17610 |  | 
 | 17611 | - Provisional support for pickling new-style objects has been added. | 
 | 17612 |  | 
 | 17613 | Core | 
 | 17614 | ---- | 
 | 17615 |  | 
 | 17616 | - file.writelines() now accepts any iterable object producing strings. | 
 | 17617 |  | 
 | 17618 | - PyUnicode_FromEncodedObject() now works very much like | 
 | 17619 |   PyObject_Str(obj) in that it tries to use __str__/tp_str | 
 | 17620 |   on the object if the object is not a string or buffer. This | 
 | 17621 |   makes unicode() behave like str() when applied to non-string/buffer | 
 | 17622 |   objects. | 
 | 17623 |  | 
 | 17624 | - PyFile_WriteObject now passes Unicode objects to the file's write | 
 | 17625 |   method. As a result, all file-like objects which may be the target | 
 | 17626 |   of a print statement must support Unicode objects, i.e. they must | 
 | 17627 |   at least convert them into ASCII strings. | 
 | 17628 |  | 
 | 17629 | - Thread scheduling on Solaris should be improved; it is no longer | 
 | 17630 |   necessary to insert a small sleep at the start of a thread in order | 
 | 17631 |   to let other runnable threads be scheduled. | 
 | 17632 |  | 
 | 17633 | Library | 
 | 17634 | ------- | 
 | 17635 |  | 
 | 17636 | - StringIO.StringIO instances and cStringIO.StringIO instances support | 
 | 17637 |   read character buffer compatible objects for their .write() methods. | 
 | 17638 |   These objects are converted to strings and then handled as such | 
 | 17639 |   by the instances. | 
 | 17640 |  | 
 | 17641 | - The "email" package has been added.  This is basically a port of the | 
 | 17642 |   mimelib package <http://sf.net/projects/mimelib> with API changes | 
 | 17643 |   and some implementations updated to use iterators and generators. | 
 | 17644 |  | 
 | 17645 | - difflib.ndiff() and difflib.Differ.compare() are generators now.  This | 
 | 17646 |   restores the ability of Tools/scripts/ndiff.py to start producing output | 
 | 17647 |   before the entire comparison is complete. | 
 | 17648 |  | 
 | 17649 | - StringIO.StringIO instances and cStringIO.StringIO instances support | 
 | 17650 |   iteration just like file objects (i.e. their .readline() method is | 
 | 17651 |   called for each iteration until it returns an empty string). | 
 | 17652 |  | 
 | 17653 | - The codecs module has grown four new helper APIs to access | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 17654 |   built-in codecs: getencoder(), getdecoder(), getreader(), | 
| Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 17655 |   getwriter(). | 
 | 17656 |  | 
 | 17657 | - SimpleXMLRPCServer: a new module (based upon SimpleHTMLServer) | 
 | 17658 |   simplifies writing XML RPC servers. | 
 | 17659 |  | 
 | 17660 | - os.path.realpath(): a new function that returns the absolute pathname | 
 | 17661 |   after interpretation of symbolic links.  On non-Unix systems, this | 
 | 17662 |   is an alias for os.path.abspath(). | 
 | 17663 |  | 
 | 17664 | - operator.indexOf() (PySequence_Index() in the C API) now works with any | 
 | 17665 |   iterable object. | 
 | 17666 |  | 
 | 17667 | - smtplib now supports various authentication and security features of | 
 | 17668 |   the SMTP protocol through the new login() and starttls() methods. | 
 | 17669 |  | 
 | 17670 | - hmac: a new module implementing keyed hashing for message | 
 | 17671 |   authentication. | 
 | 17672 |  | 
 | 17673 | - mimetypes now recognizes more extensions and file types.  At the | 
 | 17674 |   same time, some mappings not sanctioned by IANA were removed. | 
 | 17675 |  | 
 | 17676 | - The "compiler" package has been brought up to date to the state of | 
 | 17677 |   Python 2.2 bytecode generation.  It has also been promoted from a | 
 | 17678 |   Tool to a standard library package.  (Tools/compiler still exists as | 
 | 17679 |   a sample driver.) | 
 | 17680 |  | 
 | 17681 | Build | 
 | 17682 | ----- | 
 | 17683 |  | 
 | 17684 | - Large file support (LFS) is now automatic when the platform supports | 
 | 17685 |   it; no more manual configuration tweaks are needed.  On Linux, at | 
 | 17686 |   least, it's possible to have a system whose C library supports large | 
 | 17687 |   files but whose kernel doesn't; in this case, large file support is | 
 | 17688 |   still enabled but doesn't do you any good unless you upgrade your | 
 | 17689 |   kernel or share your Python executable with another system whose | 
 | 17690 |   kernel has large file support. | 
 | 17691 |  | 
 | 17692 | - The configure script now supplies plausible defaults in a | 
 | 17693 |   cross-compilation environment.  This doesn't mean that the supplied | 
 | 17694 |   values are always correct, or that cross-compilation now works | 
 | 17695 |   flawlessly -- but it's a first step (and it shuts up most of | 
 | 17696 |   autoconf's warnings about AC_TRY_RUN). | 
 | 17697 |  | 
 | 17698 | - The Unix build is now a bit less chatty, courtesy of the parser | 
 | 17699 |   generator.  The build is completely silent (except for errors) when | 
 | 17700 |   using "make -s", thanks to a -q option to setup.py. | 
 | 17701 |  | 
 | 17702 | C API | 
 | 17703 | ----- | 
 | 17704 |  | 
 | 17705 | - The "structmember" API now supports some new flag bits to deny read | 
 | 17706 |   and/or write access to attributes in restricted execution mode. | 
 | 17707 |  | 
 | 17708 | New platforms | 
 | 17709 | ------------- | 
 | 17710 |  | 
 | 17711 | - Compaq's iPAQ handheld, running the "familiar" Linux distribution | 
 | 17712 |   (http://familiar.handhelds.org). | 
 | 17713 |  | 
 | 17714 | Tests | 
 | 17715 | ----- | 
 | 17716 |  | 
 | 17717 | - The "classic" standard tests, which work by comparing stdout to | 
 | 17718 |   an expected-output file under Lib/test/output/, no longer stop at | 
 | 17719 |   the first mismatch.  Instead the test is run to completion, and a | 
 | 17720 |   variant of ndiff-style comparison is used to report all differences. | 
 | 17721 |   This is much easier to understand than the previous style of reporting. | 
 | 17722 |  | 
 | 17723 | - The unittest-based standard tests now use regrtest's test_main() | 
 | 17724 |   convention, instead of running as a side-effect of merely being | 
 | 17725 |   imported.  This allows these tests to be run in more natural and | 
 | 17726 |   flexible ways as unittests, outside the regrtest framework. | 
 | 17727 |  | 
 | 17728 | - regrtest.py is much better integrated with unittest and doctest now, | 
 | 17729 |   especially in regard to reporting errors. | 
 | 17730 |  | 
 | 17731 | Windows | 
 | 17732 | ------- | 
 | 17733 |  | 
 | 17734 | - Large file support now also works for files > 4GB, on filesystems | 
 | 17735 |   that support it (NTFS under Windows 2000).  See "What's New in | 
 | 17736 |   Python 2.2a3" for more detail. | 
 | 17737 |  | 
 | 17738 |  | 
 | 17739 | What's New in Python 2.2a3? | 
 | 17740 | =========================== | 
 | 17741 |  | 
 | 17742 | *Release Date: 07-Sep-2001* | 
 | 17743 |  | 
 | 17744 | Core | 
 | 17745 | ---- | 
 | 17746 |  | 
 | 17747 | - Conversion of long to float now raises OverflowError if the long is too | 
 | 17748 |   big to represent as a C double. | 
 | 17749 |  | 
 | 17750 | - The 3-argument builtin pow() no longer allows a third non-None argument | 
 | 17751 |   if either of the first two arguments is a float, or if both are of | 
 | 17752 |   integer types and the second argument is negative (in which latter case | 
 | 17753 |   the arguments are converted to float, so this is really the same | 
 | 17754 |   restriction). | 
 | 17755 |  | 
 | 17756 | - The builtin dir() now returns more information, and sometimes much | 
 | 17757 |   more, generally naming all attributes of an object, and all attributes | 
 | 17758 |   reachable from the object via its class, and from its class's base | 
 | 17759 |   classes, and so on from them too.  Example:  in 2.2a2, dir([]) returned | 
 | 17760 |   an empty list.  In 2.2a3, | 
 | 17761 |  | 
 | 17762 |   >>> dir([]) | 
 | 17763 |   ['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', | 
 | 17764 |    '__eq__', '__ge__', '__getattr__', '__getitem__', '__getslice__', | 
 | 17765 |    '__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__le__', | 
 | 17766 |    '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__repr__', | 
 | 17767 |    '__rmul__', '__setattr__', '__setitem__', '__setslice__', '__str__', | 
 | 17768 |    'append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', | 
 | 17769 |    'reverse', 'sort'] | 
 | 17770 |  | 
 | 17771 |   dir(module) continues to return only the module's attributes, though. | 
 | 17772 |  | 
 | 17773 | - Overflowing operations on plain ints now return a long int rather | 
 | 17774 |   than raising OverflowError.  This is a partial implementation of PEP | 
 | 17775 |   237.  You can use -Wdefault::OverflowWarning to enable a warning for | 
 | 17776 |   this situation, and -Werror::OverflowWarning to revert to the old | 
 | 17777 |   OverflowError exception. | 
 | 17778 |  | 
 | 17779 | - A new command line option, -Q<arg>, is added to control run-time | 
 | 17780 |   warnings for the use of classic division.  (See PEP 238.)  Possible | 
 | 17781 |   values are -Qold, -Qwarn, -Qwarnall, and -Qnew.  The default is | 
 | 17782 |   -Qold, meaning the / operator has its classic meaning and no | 
 | 17783 |   warnings are issued.  Using -Qwarn issues a run-time warning about | 
 | 17784 |   all uses of classic division for int and long arguments; -Qwarnall | 
 | 17785 |   also warns about classic division for float and complex arguments | 
 | 17786 |   (for use with fixdiv.py). | 
 | 17787 |   [Note:  the remainder of this item (preserved below) became | 
 | 17788 |   obsolete in 2.2c1 -- -Qnew has global effect in 2.2] :: | 
 | 17789 |  | 
 | 17790 |     Using -Qnew is questionable; it turns on new division by default, but | 
 | 17791 |     only in the __main__ module.  You can usefully combine -Qwarn or | 
 | 17792 |     -Qwarnall and -Qnew: this gives the __main__ module new division, and | 
 | 17793 |     warns about classic division everywhere else. | 
 | 17794 |  | 
 | 17795 | - Many built-in types can now be subclassed.  This applies to int, | 
 | 17796 |   long, float, str, unicode, and tuple.  (The types complex, list and | 
 | 17797 |   dictionary can also be subclassed; this was introduced earlier.) | 
 | 17798 |   Note that restrictions apply when subclassing immutable built-in | 
 | 17799 |   types: you can only affect the value of the instance by overloading | 
 | 17800 |   __new__.  You can add mutable attributes, and the subclass instances | 
 | 17801 |   will have a __dict__ attribute, but you cannot change the "value" | 
 | 17802 |   (as implemented by the base class) of an immutable subclass instance | 
 | 17803 |   once it is created. | 
 | 17804 |  | 
 | 17805 | - The dictionary constructor now takes an optional argument, a | 
 | 17806 |   mapping-like object, and initializes the dictionary from its | 
 | 17807 |   (key, value) pairs. | 
 | 17808 |  | 
 | 17809 | - A new built-in type, super, has been added.  This facilitates making | 
 | 17810 |   "cooperative super calls" in a multiple inheritance setting.  For an | 
 | 17811 |   explanation, see http://www.python.org/2.2/descrintro.html#cooperation | 
 | 17812 |  | 
 | 17813 | - A new built-in type, property, has been added.  This enables the | 
 | 17814 |   creation of "properties".  These are attributes implemented by | 
 | 17815 |   getter and setter functions (or only one of these for read-only or | 
 | 17816 |   write-only attributes), without the need to override __getattr__. | 
 | 17817 |   See http://www.python.org/2.2/descrintro.html#property | 
 | 17818 |  | 
 | 17819 | - The syntax of floating-point and imaginary literals has been | 
 | 17820 |   liberalized, to allow leading zeroes.  Examples of literals now | 
 | 17821 |   legal that were SyntaxErrors before: | 
 | 17822 |  | 
 | 17823 |       00.0    0e3   0100j   07.5   00000000000000000008. | 
 | 17824 |  | 
 | 17825 | - An old tokenizer bug allowed floating point literals with an incomplete | 
 | 17826 |   exponent, such as 1e and 3.1e-.  Such literals now raise SyntaxError. | 
 | 17827 |  | 
 | 17828 | Library | 
 | 17829 | ------- | 
 | 17830 |  | 
 | 17831 | - telnetlib includes symbolic names for the options, and support for | 
 | 17832 |   setting an option negotiation callback. It also supports processing | 
 | 17833 |   of suboptions. | 
 | 17834 |  | 
 | 17835 | - The new C standard no longer requires that math libraries set errno to | 
 | 17836 |   ERANGE on overflow.  For platform libraries that exploit this new | 
 | 17837 |   freedom, Python's overflow-checking was wholly broken.  A new overflow- | 
 | 17838 |   checking scheme attempts to repair that, but may not be reliable on all | 
 | 17839 |   platforms (C doesn't seem to provide anything both useful and portable | 
 | 17840 |   in this area anymore). | 
 | 17841 |  | 
 | 17842 | - Asynchronous timeout actions are available through the new class | 
 | 17843 |   threading.Timer. | 
 | 17844 |  | 
 | 17845 | - math.log and math.log10 now return sensible results for even huge | 
 | 17846 |   long arguments.  For example, math.log10(10 ** 10000) ~= 10000.0. | 
 | 17847 |  | 
 | 17848 | - A new function, imp.lock_held(), returns 1 when the import lock is | 
 | 17849 |   currently held.  See the docs for the imp module. | 
 | 17850 |  | 
 | 17851 | - pickle, cPickle and marshal on 32-bit platforms can now correctly read | 
 | 17852 |   dumps containing ints written on platforms where Python ints are 8 bytes. | 
 | 17853 |   When read on a box where Python ints are 4 bytes, such values are | 
 | 17854 |   converted to Python longs. | 
 | 17855 |  | 
 | 17856 | - In restricted execution mode (using the rexec module), unmarshalling | 
 | 17857 |   code objects is no longer allowed.  This plugs a security hole. | 
 | 17858 |  | 
 | 17859 | - unittest.TestResult instances no longer store references to tracebacks | 
 | 17860 |   generated by test failures. This prevents unexpected dangling references | 
 | 17861 |   to objects that should be garbage collected between tests. | 
 | 17862 |  | 
 | 17863 | Tools | 
 | 17864 | ----- | 
 | 17865 |  | 
 | 17866 | - Tools/scripts/fixdiv.py has been added which can be used to fix | 
 | 17867 |   division operators as per PEP 238. | 
 | 17868 |  | 
 | 17869 | Build | 
 | 17870 | ----- | 
 | 17871 |  | 
 | 17872 | - If you are an adventurous person using Mac OS X you may want to look at | 
 | 17873 |   Mac/OSX. There is a Makefile there that will build Python as a real Mac | 
 | 17874 |   application, which can be used for experimenting with Carbon or Cocoa. | 
 | 17875 |   Discussion of this on pythonmac-sig, please. | 
 | 17876 |  | 
 | 17877 | C API | 
 | 17878 | ----- | 
 | 17879 |  | 
 | 17880 | - New function PyObject_Dir(obj), like Python __builtin__.dir(obj). | 
 | 17881 |  | 
 | 17882 | - Note that PyLong_AsDouble can fail!  This has always been true, but no | 
 | 17883 |   callers checked for it.  It's more likely to fail now, because overflow | 
 | 17884 |   errors are properly detected now.  The proper way to check:: | 
 | 17885 |  | 
 | 17886 |       double x = PyLong_AsDouble(some_long_object); | 
 | 17887 |       if (x == -1.0 && PyErr_Occurred()) { | 
 | 17888 |               /* The conversion failed. */ | 
 | 17889 |       } | 
 | 17890 |  | 
 | 17891 | - The GC API has been changed.  Extensions that use the old API will still | 
 | 17892 |   compile but will not participate in GC.  To upgrade an extension | 
 | 17893 |   module: | 
 | 17894 |  | 
 | 17895 |     - rename Py_TPFLAGS_GC to PyTPFLAGS_HAVE_GC | 
 | 17896 |  | 
 | 17897 |     - use PyObject_GC_New or PyObject_GC_NewVar to allocate objects and | 
 | 17898 |       PyObject_GC_Del to deallocate them | 
 | 17899 |  | 
 | 17900 |     - rename PyObject_GC_Init to PyObject_GC_Track and PyObject_GC_Fini | 
 | 17901 |       to PyObject_GC_UnTrack | 
 | 17902 |  | 
 | 17903 |     - remove PyGC_HEAD_SIZE from object size calculations | 
 | 17904 |  | 
 | 17905 |     - remove calls to PyObject_AS_GC and PyObject_FROM_GC | 
 | 17906 |  | 
 | 17907 | - Two new functions: PyString_FromFormat() and PyString_FromFormatV(). | 
 | 17908 |   These can be used safely to construct string objects from a | 
 | 17909 |   sprintf-style format string (similar to the format string supported | 
 | 17910 |   by PyErr_Format()). | 
 | 17911 |  | 
 | 17912 | New platforms | 
 | 17913 | ------------- | 
 | 17914 |  | 
 | 17915 | - Stephen Hansen contributed patches sufficient to get a clean compile | 
 | 17916 |   under Borland C (Windows), but he reports problems running it and ran | 
 | 17917 |   out of time to complete the port.  Volunteers?  Expect a MemoryError | 
 | 17918 |   when importing the types module; this is probably shallow, and | 
 | 17919 |   causing later failures too. | 
 | 17920 |  | 
 | 17921 | Tests | 
 | 17922 | ----- | 
 | 17923 |  | 
 | 17924 | Windows | 
 | 17925 | ------- | 
 | 17926 |  | 
 | 17927 | - Large file support is now enabled on Win32 platforms as well as on | 
 | 17928 |   Win64.  This means that, for example, you can use f.tell() and f.seek() | 
 | 17929 |   to manipulate files larger than 2 gigabytes (provided you have enough | 
 | 17930 |   disk space, and are using a Windows filesystem that supports large | 
 | 17931 |   partitions).  Windows filesystem limits:  FAT has a 2GB (gigabyte) | 
 | 17932 |   filesize limit, and large file support makes no difference there. | 
 | 17933 |   FAT32's limit is 4GB, and files >= 2GB are easier to use from Python now. | 
 | 17934 |   NTFS has no practical limit on file size, and files of any size can be | 
 | 17935 |   used from Python now. | 
 | 17936 |  | 
 | 17937 | - The w9xpopen hack is now used on Windows NT and 2000 too when COMPSPEC | 
 | 17938 |   points to command.com (patch from Brian Quinlan). | 
 | 17939 |  | 
 | 17940 |  | 
 | 17941 | What's New in Python 2.2a2? | 
 | 17942 | =========================== | 
 | 17943 |  | 
 | 17944 | *Release Date: 22-Aug-2001* | 
 | 17945 |  | 
 | 17946 | Build | 
 | 17947 | ----- | 
 | 17948 |  | 
 | 17949 | - Tim Peters developed a brand new Windows installer using Wise 8.1, | 
 | 17950 |   generously donated to us by Wise Solutions. | 
 | 17951 |  | 
 | 17952 | - configure supports a new option --enable-unicode, with the values | 
 | 17953 |   ucs2 and ucs4 (new in 2.2a1). With --disable-unicode, the Unicode | 
 | 17954 |   type and supporting code is completely removed from the interpreter. | 
 | 17955 |  | 
 | 17956 | - A new configure option --enable-framework builds a Mac OS X framework, | 
 | 17957 |   which "make frameworkinstall" will install. This provides a starting | 
 | 17958 |   point for more mac-like functionality, join pythonmac-sig@python.org | 
 | 17959 |   if you are interested in helping. | 
 | 17960 |  | 
 | 17961 | - The NeXT platform is no longer supported. | 
 | 17962 |  | 
 | 17963 | - The 'new' module is now statically linked. | 
 | 17964 |  | 
 | 17965 | Tools | 
 | 17966 | ----- | 
 | 17967 |  | 
 | 17968 | - The new Tools/scripts/cleanfuture.py can be used to automatically | 
 | 17969 |   edit out obsolete future statements from Python source code.  See | 
 | 17970 |   the module docstring for details. | 
 | 17971 |  | 
 | 17972 | Tests | 
 | 17973 | ----- | 
 | 17974 |  | 
 | 17975 | - regrtest.py now knows which tests are expected to be skipped on some | 
 | 17976 |   platforms, allowing to give clearer test result output.  regrtest | 
 | 17977 |   also has optional --use/-u switch to run normally disabled tests | 
 | 17978 |   which require network access or consume significant disk resources. | 
 | 17979 |  | 
 | 17980 | - Several new tests in the standard test suite, with special thanks to | 
 | 17981 |   Nick Mathewson. | 
 | 17982 |  | 
 | 17983 | Core | 
 | 17984 | ---- | 
 | 17985 |  | 
 | 17986 | - The floor division operator // has been added as outlined in PEP | 
 | 17987 |   238.  The / operator still provides classic division (and will until | 
 | 17988 |   Python 3.0) unless "from __future__ import division" is included, in | 
 | 17989 |   which case the / operator will provide true division.  The operator | 
 | 17990 |   module provides truediv() and floordiv() functions.  Augmented | 
 | 17991 |   assignment variants are included, as are the equivalent overloadable | 
 | 17992 |   methods and C API methods.  See the PEP for a full discussion: | 
 | 17993 |   <http://python.sf.net/peps/pep-0238.html> | 
 | 17994 |  | 
 | 17995 | - Future statements are now effective in simulated interactive shells | 
 | 17996 |   (like IDLE).  This should "just work" by magic, but read Michael | 
 | 17997 |   Hudson's "Future statements in simulated shells" PEP 264 for full | 
 | 17998 |   details:  <http://python.sf.net/peps/pep-0264.html>. | 
 | 17999 |  | 
 | 18000 | - The type/class unification (PEP 252-253) was integrated into the | 
 | 18001 |   trunk and is not so tentative any more (the exact specification of | 
 | 18002 |   some features is still tentative).  A lot of work has done on fixing | 
 | 18003 |   bugs and adding robustness and features (performance still has to | 
 | 18004 |   come a long way). | 
 | 18005 |  | 
 | 18006 | - Warnings about a mismatch in the Python API during extension import | 
 | 18007 |   now use the Python warning framework (which makes it possible to | 
 | 18008 |   write filters for these warnings). | 
 | 18009 |  | 
 | 18010 | - A function's __dict__ (aka func_dict) will now always be a | 
 | 18011 |   dictionary.  It used to be possible to delete it or set it to None, | 
 | 18012 |   but now both actions raise TypeErrors.  It is still legal to set it | 
 | 18013 |   to a dictionary object.  Getting func.__dict__ before any attributes | 
 | 18014 |   have been assigned now returns an empty dictionary instead of None. | 
 | 18015 |  | 
 | 18016 | - A new command line option, -E, was added which disables the use of | 
 | 18017 |   all environment variables, or at least those that are specifically | 
 | 18018 |   significant to Python.  Usually those have a name starting with | 
 | 18019 |   "PYTHON".  This was used to fix a problem where the tests fail if | 
 | 18020 |   the user happens to have PYTHONHOME or PYTHONPATH pointing to an | 
 | 18021 |   older distribution. | 
 | 18022 |  | 
 | 18023 | Library | 
 | 18024 | ------- | 
 | 18025 |  | 
 | 18026 | - New class Differ and new functions ndiff() and restore() in difflib.py. | 
 | 18027 |   These package the algorithms used by the popular Tools/scripts/ndiff.py, | 
 | 18028 |   for programmatic reuse. | 
 | 18029 |  | 
 | 18030 | - New function xml.sax.saxutils.quoteattr():  Quote an XML attribute | 
 | 18031 |   value using the minimal quoting required for the value; more | 
 | 18032 |   reliable than using xml.sax.saxutils.escape() for attribute values. | 
 | 18033 |  | 
 | 18034 | - Readline completion support for cmd.Cmd was added. | 
 | 18035 |  | 
 | 18036 | - Calling os.tempnam() or os.tmpnam() generate RuntimeWarnings. | 
 | 18037 |  | 
 | 18038 | - Added function threading.BoundedSemaphore() | 
 | 18039 |  | 
 | 18040 | - Added Ka-Ping Yee's cgitb.py module. | 
 | 18041 |  | 
 | 18042 | - The 'new' module now exposes the CO_xxx flags. | 
 | 18043 |  | 
 | 18044 | - The gc module offers the get_referents function. | 
 | 18045 |  | 
 | 18046 | New platforms | 
 | 18047 | ------------- | 
 | 18048 |  | 
 | 18049 | C API | 
 | 18050 | ----- | 
 | 18051 |  | 
 | 18052 | - Two new APIs PyOS_snprintf() and PyOS_vsnprintf() were added | 
 | 18053 |   which provide a cross-platform implementations for the | 
 | 18054 |   relatively new snprintf()/vsnprintf() C lib APIs. In contrast to | 
 | 18055 |   the standard sprintf() and vsprintf() C lib APIs, these versions | 
 | 18056 |   apply bounds checking on the used buffer which enhances protection | 
 | 18057 |   against buffer overruns. | 
 | 18058 |  | 
 | 18059 | - Unicode APIs now use name mangling to assure that mixing interpreters | 
 | 18060 |   and extensions using different Unicode widths is rendered next to | 
 | 18061 |   impossible. Trying to import an incompatible Unicode-aware extension | 
 | 18062 |   will result in an ImportError.  Unicode extensions writers must make | 
 | 18063 |   sure to check the Unicode width compatibility in their extensions by | 
 | 18064 |   using at least one of the mangled Unicode APIs in the extension. | 
 | 18065 |  | 
 | 18066 | - Two new flags METH_NOARGS and METH_O are available in method definition | 
 | 18067 |   tables to simplify implementation of methods with no arguments and a | 
 | 18068 |   single untyped argument. Calling such methods is more efficient than | 
 | 18069 |   calling corresponding METH_VARARGS methods. METH_OLDARGS is now | 
 | 18070 |   deprecated. | 
 | 18071 |  | 
 | 18072 | Windows | 
 | 18073 | ------- | 
 | 18074 |  | 
 | 18075 | - "import module" now compiles module.pyw if it exists and nothing else | 
 | 18076 |   relevant is found. | 
 | 18077 |  | 
 | 18078 |  | 
 | 18079 | What's New in Python 2.2a1? | 
 | 18080 | =========================== | 
 | 18081 |  | 
 | 18082 | *Release date: 18-Jul-2001* | 
 | 18083 |  | 
 | 18084 | Core | 
 | 18085 | ---- | 
 | 18086 |  | 
 | 18087 | - TENTATIVELY, a large amount of code implementing much of what's | 
 | 18088 |   described in PEP 252 (Making Types Look More Like Classes) and PEP | 
 | 18089 |   253 (Subtyping Built-in Types) was added.  This will be released | 
 | 18090 |   with Python 2.2a1.  Documentation will be provided separately | 
 | 18091 |   through http://www.python.org/2.2/.  The purpose of releasing this | 
 | 18092 |   with Python 2.2a1 is to test backwards compatibility.  It is | 
 | 18093 |   possible, though not likely, that a decision is made not to release | 
 | 18094 |   this code as part of 2.2 final, if any serious backwards | 
 | 18095 |   incompatibilities are found during alpha testing that cannot be | 
 | 18096 |   repaired. | 
 | 18097 |  | 
 | 18098 | - Generators were added; this is a new way to create an iterator (see | 
 | 18099 |   below) using what looks like a simple function containing one or | 
 | 18100 |   more 'yield' statements.  See PEP 255.  Since this adds a new | 
 | 18101 |   keyword to the language, this feature must be enabled by including a | 
 | 18102 |   future statement: "from __future__ import generators" (see PEP 236). | 
 | 18103 |   Generators will become a standard feature in a future release | 
 | 18104 |   (probably 2.3).  Without this future statement, 'yield' remains an | 
 | 18105 |   ordinary identifier, but a warning is issued each time it is used. | 
 | 18106 |   (These warnings currently don't conform to the warnings framework of | 
 | 18107 |   PEP 230; we intend to fix this in 2.2a2.) | 
 | 18108 |  | 
 | 18109 | - The UTF-16 codec was modified to be more RFC compliant. It will now | 
 | 18110 |   only remove BOM characters at the start of the string and then | 
 | 18111 |   only if running in native mode (UTF-16-LE and -BE won't remove a | 
 | 18112 |   leading BMO character). | 
 | 18113 |  | 
 | 18114 | - Strings now have a new method .decode() to complement the already | 
 | 18115 |   existing .encode() method. These two methods provide direct access | 
 | 18116 |   to the corresponding decoders and encoders of the registered codecs. | 
 | 18117 |  | 
 | 18118 |   To enhance the usability of the .encode() method, the special | 
 | 18119 |   casing of Unicode object return values was dropped (Unicode objects | 
 | 18120 |   were auto-magically converted to string using the default encoding). | 
 | 18121 |  | 
 | 18122 |   Both methods will now return whatever the codec in charge of the | 
 | 18123 |   requested encoding returns as object, e.g. Unicode codecs will | 
 | 18124 |   return Unicode objects when decoding is requested ("äöü".decode("latin-1") | 
 | 18125 |   will return u"äöü"). This enables codec writer to create codecs | 
 | 18126 |   for various simple to use conversions. | 
 | 18127 |  | 
 | 18128 |   New codecs were added to demonstrate these new features (the .encode() | 
 | 18129 |   and .decode() columns indicate the type of the returned objects): | 
 | 18130 |  | 
 | 18131 |   +---------+-----------+-----------+-----------------------------+ | 
 | 18132 |   |Name     | .encode() | .decode() | Description                 | | 
 | 18133 |   +=========+===========+===========+=============================+ | 
 | 18134 |   |uu       | string    | string    | UU codec (e.g. for email)   | | 
 | 18135 |   +---------+-----------+-----------+-----------------------------+ | 
 | 18136 |   |base64   | string    | string    | base64 codec                | | 
 | 18137 |   +---------+-----------+-----------+-----------------------------+ | 
 | 18138 |   |quopri   | string    | string    | quoted-printable codec      | | 
 | 18139 |   +---------+-----------+-----------+-----------------------------+ | 
 | 18140 |   |zlib     | string    | string    | zlib compression            | | 
 | 18141 |   +---------+-----------+-----------+-----------------------------+ | 
 | 18142 |   |hex      | string    | string    | 2-byte hex codec            | | 
 | 18143 |   +---------+-----------+-----------+-----------------------------+ | 
 | 18144 |   |rot-13   | string    | Unicode   | ROT-13 Unicode charmap codec| | 
 | 18145 |   +---------+-----------+-----------+-----------------------------+ | 
 | 18146 |  | 
 | 18147 | - Some operating systems now support the concept of a default Unicode | 
 | 18148 |   encoding for file system operations.  Notably, Windows supports 'mbcs' | 
 | 18149 |   as the default.  The Macintosh will also adopt this concept in the medium | 
 | 18150 |   term, although the default encoding for that platform will be other than | 
 | 18151 |   'mbcs'. | 
 | 18152 |  | 
 | 18153 |   On operating system that support non-ASCII filenames, it is common for | 
 | 18154 |   functions that return filenames (such as os.listdir()) to return Python | 
 | 18155 |   string objects pre-encoded using the default file system encoding for | 
 | 18156 |   the platform.  As this encoding is likely to be different from Python's | 
 | 18157 |   default encoding, converting this name to a Unicode object before passing | 
 | 18158 |   it back to the Operating System would result in a Unicode error, as Python | 
 | 18159 |   would attempt to use its default encoding (generally ASCII) rather than | 
 | 18160 |   the default encoding for the file system. | 
 | 18161 |  | 
 | 18162 |   In general, this change simply removes surprises when working with | 
 | 18163 |   Unicode and the file system, making these operations work as you expect, | 
 | 18164 |   increasing the transparency of Unicode objects in this context. | 
 | 18165 |   See [????] for more details, including examples. | 
 | 18166 |  | 
 | 18167 | - Float (and complex) literals in source code were evaluated to full | 
 | 18168 |   precision only when running from a .py file; the same code loaded from a | 
 | 18169 |   .pyc (or .pyo) file could suffer numeric differences starting at about the | 
 | 18170 |   12th significant decimal digit.  For example, on a machine with IEEE-754 | 
 | 18171 |   floating arithmetic, | 
 | 18172 |  | 
 | 18173 |       x = 9007199254740992.0 | 
 | 18174 |       print long(x) | 
 | 18175 |  | 
 | 18176 |   printed 9007199254740992 if run directly from .py, but 9007199254740000 | 
 | 18177 |   if from a compiled (.pyc or .pyo) file.  This was due to marshal using | 
 | 18178 |   str(float) instead of repr(float) when building code objects.  marshal | 
 | 18179 |   now uses repr(float) instead, which should reproduce floats to full | 
 | 18180 |   machine precision (assuming the platform C float<->string I/O conversion | 
 | 18181 |   functions are of good quality). | 
 | 18182 |  | 
 | 18183 |   This may cause floating-point results to change in some cases, and | 
 | 18184 |   usually for the better, but may also cause numerically unstable | 
 | 18185 |   algorithms to break. | 
 | 18186 |  | 
 | 18187 | - The implementation of dicts suffers fewer collisions, which has speed | 
 | 18188 |   benefits.  However, the order in which dict entries appear in dict.keys(), | 
 | 18189 |   dict.values() and dict.items() may differ from previous releases for a | 
 | 18190 |   given dict.  Nothing is defined about this order, so no program should | 
 | 18191 |   rely on it.  Nevertheless, it's easy to write test cases that rely on the | 
 | 18192 |   order by accident, typically because of printing the str() or repr() of a | 
 | 18193 |   dict to an "expected results" file.  See Lib/test/test_support.py's new | 
 | 18194 |   sortdict(dict) function for a simple way to display a dict in sorted | 
 | 18195 |   order. | 
 | 18196 |  | 
 | 18197 | - Many other small changes to dicts were made, resulting in faster | 
 | 18198 |   operation along the most common code paths. | 
 | 18199 |  | 
 | 18200 | - Dictionary objects now support the "in" operator: "x in dict" means | 
 | 18201 |   the same as dict.has_key(x). | 
 | 18202 |  | 
 | 18203 | - The update() method of dictionaries now accepts generic mapping | 
 | 18204 |   objects.  Specifically the argument object must support the .keys() | 
 | 18205 |   and __getitem__() methods.  This allows you to say, for example, | 
 | 18206 |   {}.update(UserDict()) | 
 | 18207 |  | 
 | 18208 | - Iterators were added; this is a generalized way of providing values | 
 | 18209 |   to a for loop.  See PEP 234.  There's a new built-in function iter() | 
 | 18210 |   to return an iterator.  There's a new protocol to get the next value | 
 | 18211 |   from an iterator using the next() method (in Python) or the | 
 | 18212 |   tp_iternext slot (in C).  There's a new protocol to get iterators | 
 | 18213 |   using the __iter__() method (in Python) or the tp_iter slot (in C). | 
 | 18214 |   Iterating (i.e. a for loop) over a dictionary generates its keys. | 
 | 18215 |   Iterating over a file generates its lines. | 
 | 18216 |  | 
 | 18217 | - The following functions were generalized to work nicely with iterator | 
 | 18218 |   arguments:: | 
 | 18219 |  | 
 | 18220 |     map(), filter(), reduce(), zip() | 
 | 18221 |     list(), tuple() (PySequence_Tuple() and PySequence_Fast() in C API) | 
 | 18222 |     max(), min() | 
 | 18223 |     join() method of strings | 
 | 18224 |     extend() method of lists | 
 | 18225 |     'x in y' and 'x not in y' (PySequence_Contains() in C API) | 
 | 18226 |     operator.countOf() (PySequence_Count() in C API) | 
 | 18227 |     right-hand side of assignment statements with multiple targets, such as :: | 
 | 18228 |         x, y, z = some_iterable_object_returning_exactly_3_values | 
 | 18229 |  | 
 | 18230 | - Accessing module attributes is significantly faster (for example, | 
 | 18231 |   random.random or os.path or yourPythonModule.yourAttribute). | 
 | 18232 |  | 
 | 18233 | - Comparing dictionary objects via == and != is faster, and now works even | 
 | 18234 |   if the keys and values don't support comparisons other than ==. | 
 | 18235 |  | 
 | 18236 | - Comparing dictionaries in ways other than == and != is slower:  there were | 
 | 18237 |   insecurities in the dict comparison implementation that could cause Python | 
 | 18238 |   to crash if the element comparison routines for the dict keys and/or | 
 | 18239 |   values mutated the dicts.  Making the code bulletproof slowed it down. | 
 | 18240 |  | 
 | 18241 | - Collisions in dicts are resolved via a new approach, which can help | 
 | 18242 |   dramatically in bad cases.  For example, looking up every key in a dict | 
 | 18243 |   d with d.keys() == [i << 16 for i in range(20000)] is approximately 500x | 
 | 18244 |   faster now.  Thanks to Christian Tismer for pointing out the cause and | 
 | 18245 |   the nature of an effective cure (last December! better late than never). | 
 | 18246 |  | 
 | 18247 | - repr() is much faster for large containers (dict, list, tuple). | 
 | 18248 |  | 
 | 18249 |  | 
 | 18250 | Library | 
 | 18251 | ------- | 
 | 18252 |  | 
 | 18253 | - The constants ascii_letters, ascii_lowercase. and ascii_uppercase | 
 | 18254 |   were added to the string module.  These a locale-independent | 
 | 18255 |   constants, unlike letters, lowercase, and uppercase.  These are now | 
 | 18256 |   use in appropriate locations in the standard library. | 
 | 18257 |  | 
 | 18258 | - The flags used in dlopen calls can now be configured using | 
 | 18259 |   sys.setdlopenflags and queried using sys.getdlopenflags. | 
 | 18260 |  | 
 | 18261 | - Fredrik Lundh's xmlrpclib is now a standard library module.  This | 
 | 18262 |   provides full client-side XML-RPC support.  In addition, | 
 | 18263 |   Demo/xmlrpc/ contains two server frameworks (one SocketServer-based, | 
 | 18264 |   one asyncore-based).  Thanks to Eric Raymond for the documentation. | 
 | 18265 |  | 
 | 18266 | - The xrange() object is simplified: it no longer supports slicing, | 
 | 18267 |   repetition, comparisons, efficient 'in' checking, the tolist() | 
 | 18268 |   method, or the start, stop and step attributes.  See PEP 260. | 
 | 18269 |  | 
 | 18270 | - A new function fnmatch.filter to filter lists of file names was added. | 
 | 18271 |  | 
 | 18272 | - calendar.py uses month and day names based on the current locale. | 
 | 18273 |  | 
 | 18274 | - strop is now *really* obsolete (this was announced before with 1.6), | 
 | 18275 |   and issues DeprecationWarning when used (except for the four items | 
 | 18276 |   that are still imported into string.py). | 
 | 18277 |  | 
 | 18278 | - Cookie.py now sorts key+value pairs by key in output strings. | 
 | 18279 |  | 
 | 18280 | - pprint.isrecursive(object) didn't correctly identify recursive objects. | 
 | 18281 |   Now it does. | 
 | 18282 |  | 
 | 18283 | - pprint functions now much faster for large containers (tuple, list, dict). | 
 | 18284 |  | 
 | 18285 | - New 'q' and 'Q' format codes in the struct module, corresponding to C | 
 | 18286 |   types "long long" and "unsigned long long" (on Windows, __int64).  In | 
 | 18287 |   native mode, these can be used only when the platform C compiler supports | 
 | 18288 |   these types (when HAVE_LONG_LONG is #define'd by the Python config | 
 | 18289 |   process), and then they inherit the sizes and alignments of the C types. | 
 | 18290 |   In standard mode, 'q' and 'Q' are supported on all platforms, and are | 
 | 18291 |   8-byte integral types. | 
 | 18292 |  | 
 | 18293 | - The site module installs a new built-in function 'help' that invokes | 
 | 18294 |   pydoc.help.  It must be invoked as 'help()'; when invoked as 'help', | 
 | 18295 |   it displays a message reminding the user to use 'help()' or | 
 | 18296 |   'help(object)'. | 
 | 18297 |  | 
 | 18298 | Tests | 
 | 18299 | ----- | 
 | 18300 |  | 
 | 18301 | - New test_mutants.py runs dict comparisons where the key and value | 
 | 18302 |   comparison operators mutate the dicts randomly during comparison.  This | 
 | 18303 |   rapidly causes Python to crash under earlier releases (not for the faint | 
 | 18304 |   of heart:  it can also cause Win9x to freeze or reboot!). | 
 | 18305 |  | 
 | 18306 | - New test_pprint.py verifies that pprint.isrecursive() and | 
 | 18307 |   pprint.isreadable() return sensible results.  Also verifies that simple | 
 | 18308 |   cases produce correct output. | 
 | 18309 |  | 
 | 18310 | C API | 
 | 18311 | ----- | 
 | 18312 |  | 
 | 18313 | - Removed the unused last_is_sticky argument from the internal | 
 | 18314 |   _PyTuple_Resize().  If this affects you, you were cheating. | 
 | 18315 |  | 
| Skip Montanaro | 4cb2204 | 2002-09-17 20:55:31 +0000 | [diff] [blame] | 18316 | What's New in Python 2.1 (final)? | 
 | 18317 | ================================= | 
 | 18318 |  | 
 | 18319 | We only changed a few things since the last release candidate, all in | 
 | 18320 | Python library code: | 
 | 18321 |  | 
 | 18322 | - A bug in the locale module was fixed that affected locales which | 
 | 18323 |   define no grouping for numeric formatting. | 
 | 18324 |  | 
 | 18325 | - A few bugs in the weakref module's implementations of weak | 
 | 18326 |   dictionaries (WeakValueDictionary and WeakKeyDictionary) were fixed, | 
 | 18327 |   and the test suite was updated to check for these bugs. | 
 | 18328 |  | 
 | 18329 | - An old bug in the os.path.walk() function (introduced in Python | 
 | 18330 |   2.0!) was fixed: a non-existent file would cause an exception | 
 | 18331 |   instead of being ignored. | 
 | 18332 |  | 
 | 18333 | - Fixed a few bugs in the new symtable module found by Neil Norwitz's | 
 | 18334 |   PyChecker. | 
 | 18335 |  | 
 | 18336 |  | 
 | 18337 | What's New in Python 2.1c2? | 
 | 18338 | =========================== | 
 | 18339 |  | 
 | 18340 | A flurry of small changes, and one showstopper fixed in the nick of | 
 | 18341 | time made it necessary to release another release candidate.  The list | 
 | 18342 | here is the *complete* list of patches (except version updates): | 
 | 18343 |  | 
 | 18344 | Core | 
 | 18345 |  | 
 | 18346 | - Tim discovered a nasty bug in the dictionary code, caused by | 
 | 18347 |   PyDict_Next() calling dict_resize(), and the GC code's use of | 
 | 18348 |   PyDict_Next() violating an assumption in dict_items().  This was | 
 | 18349 |   fixed with considerable amounts of band-aid, but the net effect is a | 
 | 18350 |   saner and more robust implementation. | 
 | 18351 |  | 
 | 18352 | - Made a bunch of symbols static that were accidentally global. | 
 | 18353 |  | 
 | 18354 | Build and Ports | 
 | 18355 |  | 
 | 18356 | - The setup.py script didn't check for a new enough version of zlib | 
 | 18357 |   (1.1.3 is needed).  Now it does. | 
 | 18358 |  | 
 | 18359 | - Changed "make clean" target to also remove shared libraries. | 
 | 18360 |  | 
 | 18361 | - Added a more general warning about the SGI Irix optimizer to README. | 
 | 18362 |  | 
 | 18363 | Library | 
 | 18364 |  | 
 | 18365 | - Fix a bug in urllib.basejoin("http://host", "../file.html") which | 
 | 18366 |   omitted the slash between host and file.html. | 
 | 18367 |  | 
 | 18368 | - The mailbox module's _Mailbox class contained a completely broken | 
 | 18369 |   and undocumented seek() method.  Ripped it out. | 
 | 18370 |  | 
 | 18371 | - Fixed a bunch of typos in various library modules (urllib2, smtpd, | 
 | 18372 |   sgmllib, netrc, chunk) found by Neil Norwitz's PyChecker. | 
 | 18373 |  | 
 | 18374 | - Fixed a few last-minute bugs in unittest. | 
 | 18375 |  | 
 | 18376 | Extensions | 
 | 18377 |  | 
 | 18378 | - Reverted the patch to the OpenSSL code in socketmodule.c to support | 
 | 18379 |   RAND_status() and the EGD, and the subsequent patch that tried to | 
 | 18380 |   fix it for pre-0.9.5 versions; the problem with the patch is that on | 
 | 18381 |   some systems it issues a warning whenever socket is imported, and | 
 | 18382 |   that's unacceptable. | 
 | 18383 |  | 
 | 18384 | Tests | 
 | 18385 |  | 
 | 18386 | - Fixed the pickle tests to work with "import test.test_pickle". | 
 | 18387 |  | 
 | 18388 | - Tweaked test_locale.py to actually run the test Windows. | 
 | 18389 |  | 
 | 18390 | - In distutils/archive_util.py, call zipfile.ZipFile() with mode "w", | 
 | 18391 |   not "wb" (which is not a valid mode at all). | 
 | 18392 |  | 
 | 18393 | - Fix pstats browser crashes.  Import readline if it exists to make | 
 | 18394 |   the user interface nicer. | 
 | 18395 |  | 
 | 18396 | - Add "import thread" to the top of test modules that import the | 
 | 18397 |   threading module (test_asynchat and test_threadedtempfile).  This | 
 | 18398 |   prevents test failures caused by a broken threading module resulting | 
 | 18399 |   from a previously caught failed import. | 
 | 18400 |  | 
 | 18401 | - Changed test_asynchat.py to set the SO_REUSEADDR option; this was | 
 | 18402 |   needed on some platforms (e.g. Solaris 8) when the tests are run | 
 | 18403 |   twice in succession. | 
 | 18404 |  | 
 | 18405 | - Skip rather than fail test_sunaudiodev if no audio device is found. | 
 | 18406 |  | 
 | 18407 |  | 
 | 18408 | What's New in Python 2.1c1? | 
 | 18409 | =========================== | 
 | 18410 |  | 
 | 18411 | This list was significantly updated when 2.1c2 was released; the 2.1c1 | 
 | 18412 | release didn't mention most changes that were actually part of 2.1c1: | 
 | 18413 |  | 
 | 18414 | Legal | 
 | 18415 |  | 
 | 18416 | - Copyright was assigned to the Python Software Foundation (PSF) and a | 
 | 18417 |   PSF license (very similar to the CNRI license) was added. | 
 | 18418 |  | 
 | 18419 | - The CNRI copyright notice was updated to include 2001. | 
 | 18420 |  | 
 | 18421 | Core | 
 | 18422 |  | 
 | 18423 | - After a public outcry, assignment to __debug__ is no longer illegal; | 
 | 18424 |   instead, a warning is issued.  It will become illegal in 2.2. | 
 | 18425 |  | 
 | 18426 | - Fixed a core dump with "%#x" % 0, and changed the semantics so that | 
 | 18427 |   "%#x" now always prepends "0x", even if the value is zero. | 
 | 18428 |  | 
 | 18429 | - Fixed some nits in the bytecode compiler. | 
 | 18430 |  | 
 | 18431 | - Fixed core dumps when calling certain kinds of non-functions. | 
 | 18432 |  | 
 | 18433 | - Fixed various core dumps caused by reference count bugs. | 
 | 18434 |  | 
 | 18435 | Build and Ports | 
 | 18436 |  | 
 | 18437 | - Use INSTALL_SCRIPT to install script files. | 
 | 18438 |  | 
 | 18439 | - New port: SCO Unixware 7, by Billy G. Allie. | 
 | 18440 |  | 
 | 18441 | - Updated RISCOS port. | 
 | 18442 |  | 
 | 18443 | - Updated BeOS port and notes. | 
 | 18444 |  | 
 | 18445 | - Various other porting problems resolved. | 
 | 18446 |  | 
 | 18447 | Library | 
 | 18448 |  | 
 | 18449 | - The TERMIOS and SOCKET modules are now truly obsolete and | 
 | 18450 |   unnecessary.  Their symbols are incorporated in the termios and | 
 | 18451 |   socket modules. | 
 | 18452 |  | 
 | 18453 | - Fixed some 64-bit bugs in pickle, cPickle, and struct, and added | 
 | 18454 |   better tests for pickling. | 
 | 18455 |  | 
 | 18456 | - threading: make Condition.wait() robust against KeyboardInterrupt. | 
 | 18457 |  | 
 | 18458 | - zipfile: add support to zipfile to support opening an archive | 
 | 18459 |   represented by an open file rather than a file name.  Fix bug where | 
 | 18460 |   the archive was not properly closed.  Fixed a bug in this bugfix | 
 | 18461 |   where flush() was called for a read-only file. | 
 | 18462 |  | 
 | 18463 | - imputil: added an uninstall() method to the ImportManager. | 
 | 18464 |  | 
 | 18465 | - Canvas: fixed bugs in lower() and tkraise() methods. | 
 | 18466 |  | 
 | 18467 | - SocketServer: API change (added overridable close_request() method) | 
 | 18468 |   so that the TCP server can explicitly close the request. | 
 | 18469 |  | 
 | 18470 | - pstats: Eric Raymond added a simple interactive statistics browser, | 
 | 18471 |   invoked when the module is run as a script. | 
 | 18472 |  | 
 | 18473 | - locale: fixed a problem in format(). | 
 | 18474 |  | 
 | 18475 | - webbrowser: made it work when the BROWSER environment variable has a | 
 | 18476 |   value like "/usr/bin/netscape".  Made it auto-detect Konqueror for | 
 | 18477 |   KDE 2.  Fixed some other nits. | 
 | 18478 |  | 
 | 18479 | - unittest: changes to allow using a different exception than | 
 | 18480 |   AssertionError, and added a few more function aliases.  Some other | 
 | 18481 |   small changes. | 
 | 18482 |  | 
 | 18483 | - urllib, urllib2: fixed redirect problems and a coupleof other nits. | 
 | 18484 |  | 
 | 18485 | - asynchat: fixed a critical bug in asynchat that slipped through the | 
 | 18486 |   2.1b2 release.  Fixed another rare bug. | 
 | 18487 |  | 
 | 18488 | - Fix some unqualified except: clauses (always a bad code example). | 
 | 18489 |  | 
 | 18490 | XML | 
 | 18491 |  | 
 | 18492 | - pyexpat: new API get_version_string(). | 
 | 18493 |  | 
 | 18494 | - Fixed some minidom bugs. | 
 | 18495 |  | 
 | 18496 | Extensions | 
 | 18497 |  | 
 | 18498 | - Fixed a core dump in _weakref.  Removed the weakref.mapping() | 
 | 18499 |   function (it adds nothing to the API). | 
 | 18500 |  | 
 | 18501 | - Rationalized the use of header files in the readline module, to make | 
 | 18502 |   it compile (albeit with some warnings) with the very recent readline | 
 | 18503 |   4.2, without breaking for earlier versions. | 
 | 18504 |  | 
 | 18505 | - Hopefully fixed a buffering problem in linuxaudiodev. | 
 | 18506 |  | 
 | 18507 | - Attempted a fix to make the OpenSSL support in the socket module | 
 | 18508 |   work again with pre-0.9.5 versions of OpenSSL. | 
 | 18509 |  | 
 | 18510 | Tests | 
 | 18511 |  | 
 | 18512 | - Added a test case for asynchat and asyncore. | 
 | 18513 |  | 
 | 18514 | - Removed coupling between tests where one test failing could break | 
 | 18515 |   another. | 
 | 18516 |  | 
 | 18517 | Tools | 
 | 18518 |  | 
 | 18519 | - Ping added an interactive help browser to pydoc, fixed some nits | 
 | 18520 |   in the rest of the pydoc code, and added some features to his | 
 | 18521 |   inspect module. | 
 | 18522 |  | 
 | 18523 | - An updated python-mode.el version 4.1 which integrates Ken | 
 | 18524 |   Manheimer's pdbtrack.el.  This makes debugging Python code via pdb | 
 | 18525 |   much nicer in XEmacs and Emacs.  When stepping through your program | 
 | 18526 |   with pdb, in either the shell window or the *Python* window, the | 
 | 18527 |   source file and line will be tracked by an arrow.  Very cool! | 
 | 18528 |  | 
 | 18529 | - IDLE: syntax warnings in interactive mode are changed into errors. | 
 | 18530 |  | 
 | 18531 | - Some improvements to Tools/webchecker (ignore some more URL types, | 
 | 18532 |   follow some more links). | 
 | 18533 |  | 
 | 18534 | - Brought the Tools/compiler package up to date. | 
 | 18535 |  | 
 | 18536 |  | 
 | 18537 | What's New in Python 2.1 beta 2? | 
 | 18538 | ================================ | 
 | 18539 |  | 
 | 18540 | (Unlisted are many fixed bugs, more documentation, etc.) | 
 | 18541 |  | 
 | 18542 | Core language, builtins, and interpreter | 
 | 18543 |  | 
 | 18544 | - The nested scopes work (enabled by "from __future__ import | 
 | 18545 |   nested_scopes") is completed; in particular, the future now extends | 
 | 18546 |   into code executed through exec, eval() and execfile(), and into the | 
 | 18547 |   interactive interpreter. | 
 | 18548 |  | 
 | 18549 | - When calling a base class method (e.g. BaseClass.__init__(self)), | 
 | 18550 |   this is now allowed even if self is not strictly spoken a class | 
 | 18551 |   instance (e.g. when using metaclasses or the Don Beaudry hook). | 
 | 18552 |  | 
 | 18553 | - Slice objects are now comparable but not hashable; this prevents | 
 | 18554 |   dict[:] from being accepted but meaningless. | 
 | 18555 |  | 
 | 18556 | - Complex division is now calculated using less braindead algorithms. | 
 | 18557 |   This doesn't change semantics except it's more likely to give useful | 
 | 18558 |   results in extreme cases.  Complex repr() now uses full precision | 
 | 18559 |   like float repr(). | 
 | 18560 |  | 
 | 18561 | - sgmllib.py now calls handle_decl() for simple <!...> declarations. | 
 | 18562 |  | 
 | 18563 | - It is illegal to assign to the name __debug__, which is set when the | 
 | 18564 |   interpreter starts.  It is effectively a compile-time constant. | 
 | 18565 |  | 
 | 18566 | - A warning will be issued if a global statement for a variable | 
 | 18567 |   follows a use or assignment of that variable. | 
 | 18568 |  | 
 | 18569 | Standard library | 
 | 18570 |  | 
 | 18571 | - unittest.py, a unit testing framework by Steve Purcell (PyUNIT, | 
 | 18572 |   inspired by JUnit), is now part of the standard library.  You now | 
 | 18573 |   have a choice of two testing frameworks: unittest requires you to | 
 | 18574 |   write testcases as separate code, doctest gathers them from | 
 | 18575 |   docstrings.  Both approaches have their advantages and | 
 | 18576 |   disadvantages. | 
 | 18577 |  | 
 | 18578 | - A new module Tix was added, which wraps the Tix extension library | 
 | 18579 |   for Tk.  With that module, it is not necessary to statically link | 
 | 18580 |   Tix with _tkinter, since Tix will be loaded with Tcl's "package | 
 | 18581 |   require" command.  See Demo/tix/. | 
 | 18582 |  | 
 | 18583 | - tzparse.py is now obsolete. | 
 | 18584 |  | 
 | 18585 | - In gzip.py, the seek() and tell() methods are removed -- they were | 
 | 18586 |   non-functional anyway, and it's better if callers can test for their | 
 | 18587 |   existence with hasattr(). | 
 | 18588 |  | 
 | 18589 | Python/C API | 
 | 18590 |  | 
 | 18591 | - PyDict_Next(): it is now safe to call PyDict_SetItem() with a key | 
 | 18592 |   that's already in the dictionary during a PyDict_Next() iteration. | 
 | 18593 |   This used to fail occasionally when a dictionary resize operation | 
 | 18594 |   could be triggered that would rehash all the keys.  All other | 
 | 18595 |   modifications to the dictionary are still off-limits during a | 
 | 18596 |   PyDict_Next() iteration! | 
 | 18597 |  | 
 | 18598 | - New extended APIs related to passing compiler variables around. | 
 | 18599 |  | 
 | 18600 | - New abstract APIs PyObject_IsInstance(), PyObject_IsSubclass() | 
 | 18601 |   implement isinstance() and issubclass(). | 
 | 18602 |  | 
 | 18603 | - Py_BuildValue() now has a "D" conversion to create a Python complex | 
 | 18604 |   number from a Py_complex C value. | 
 | 18605 |  | 
 | 18606 | - Extensions types which support weak references must now set the | 
 | 18607 |   field allocated for the weak reference machinery to NULL themselves; | 
 | 18608 |   this is done to avoid the cost of checking each object for having a | 
 | 18609 |   weakly referencable type in PyObject_INIT(), since most types are | 
 | 18610 |   not weakly referencable. | 
 | 18611 |  | 
 | 18612 | - PyFrame_FastToLocals() and PyFrame_LocalsToFast() copy bindings for | 
 | 18613 |   free variables and cell variables to and from the frame's f_locals. | 
 | 18614 |  | 
 | 18615 | - Variants of several functions defined in pythonrun.h have been added | 
 | 18616 |   to support the nested_scopes future statement.  The variants all end | 
 | 18617 |   in Flags and take an extra argument, a PyCompilerFlags *; examples: | 
 | 18618 |   PyRun_AnyFileExFlags(), PyRun_InteractiveLoopFlags().  These | 
 | 18619 |   variants may be removed in Python 2.2, when nested scopes are | 
 | 18620 |   mandatory. | 
 | 18621 |  | 
 | 18622 | Distutils | 
 | 18623 |  | 
 | 18624 | - the sdist command now writes a PKG-INFO file, as described in PEP 241, | 
 | 18625 |   into the release tree. | 
 | 18626 |  | 
 | 18627 | - several enhancements to the bdist_wininst command from Thomas Heller | 
 | 18628 |   (an uninstaller, more customization of the installer's display) | 
 | 18629 |  | 
 | 18630 | - from Jack Jansen: added Mac-specific code to generate a dialog for | 
 | 18631 |   users to specify the command-line (because providing a command-line with | 
 | 18632 |   MacPython is awkward).  Jack also made various fixes for the Mac | 
 | 18633 |   and the Metrowerks compiler. | 
 | 18634 |  | 
 | 18635 | - added 'platforms' and 'keywords' to the set of metadata that can be | 
 | 18636 |   specified for a distribution. | 
 | 18637 |  | 
 | 18638 | - applied patches from Jason Tishler to make the compiler class work with | 
 | 18639 |   Cygwin. | 
 | 18640 |  | 
 | 18641 |  | 
 | 18642 | What's New in Python 2.1 beta 1? | 
 | 18643 | ================================ | 
 | 18644 |  | 
 | 18645 | Core language, builtins, and interpreter | 
 | 18646 |  | 
 | 18647 | - Following an outcry from the community about the amount of code | 
 | 18648 |   broken by the nested scopes feature introduced in 2.1a2, we decided | 
 | 18649 |   to make this feature optional, and to wait until Python 2.2 (or at | 
 | 18650 |   least 6 months) to make it standard.  The option can be enabled on a | 
 | 18651 |   per-module basis by adding "from __future__ import nested_scopes" at | 
 | 18652 |   the beginning of a module (before any other statements, but after | 
 | 18653 |   comments and an optional docstring).  See PEP 236 (Back to the | 
 | 18654 |   __future__) for a description of the __future__ statement.  PEP 227 | 
 | 18655 |   (Statically Nested Scopes) has been updated to reflect this change, | 
 | 18656 |   and to clarify the semantics in a number of endcases. | 
 | 18657 |  | 
 | 18658 | - The nested scopes code, when enabled, has been hardened, and most | 
 | 18659 |   bugs and memory leaks in it have been fixed. | 
 | 18660 |  | 
 | 18661 | - Compile-time warnings are now generated for a number of conditions | 
 | 18662 |   that will break or change in meaning when nested scopes are enabled: | 
 | 18663 |  | 
 | 18664 |   - Using "from...import *" or "exec" without in-clause in a function | 
 | 18665 |     scope that also defines a lambda or nested function with one or | 
 | 18666 |     more free (non-local) variables.  The presence of the import* or | 
 | 18667 |     bare exec makes it impossible for the compiler to determine the | 
 | 18668 |     exact set of local variables in the outer scope, which makes it | 
 | 18669 |     impossible to determine the bindings for free variables in the | 
 | 18670 |     inner scope.  To avoid the warning about import *, change it into | 
 | 18671 |     an import of explicitly name object, or move the import* statement | 
 | 18672 |     to the global scope; to avoid the warning about bare exec, use | 
 | 18673 |     exec...in... (a good idea anyway -- there's a possibility that | 
 | 18674 |     bare exec will be deprecated in the future). | 
 | 18675 |  | 
 | 18676 |   - Use of a global variable in a nested scope with the same name as a | 
 | 18677 |     local variable in a surrounding scope.  This will change in | 
 | 18678 |     meaning with nested scopes: the name in the inner scope will | 
 | 18679 |     reference the variable in the outer scope rather than the global | 
 | 18680 |     of the same name.  To avoid the warning, either rename the outer | 
 | 18681 |     variable, or use a global statement in the inner function. | 
 | 18682 |  | 
 | 18683 | - An optional object allocator has been included.  This allocator is | 
 | 18684 |   optimized for Python objects and should be faster and use less memory | 
 | 18685 |   than the standard system allocator.  It is not enabled by default | 
 | 18686 |   because of possible thread safety problems.  The allocator is only | 
 | 18687 |   protected by the Python interpreter lock and it is possible that some | 
 | 18688 |   extension modules require a thread safe allocator.  The object | 
 | 18689 |   allocator can be enabled by providing the "--with-pymalloc" option to | 
 | 18690 |   configure. | 
 | 18691 |  | 
 | 18692 | Standard library | 
 | 18693 |  | 
 | 18694 | - pyexpat now detects the expat version if expat.h defines it. A | 
 | 18695 |   number of additional handlers are provided, which are only available | 
 | 18696 |   since expat 1.95. In addition, the methods SetParamEntityParsing and | 
 | 18697 |   GetInputContext of Parser objects are available with 1.95.x | 
 | 18698 |   only. Parser objects now provide the ordered_attributes and | 
 | 18699 |   specified_attributes attributes. A new module expat.model was added, | 
 | 18700 |   which offers a number of additional constants if 1.95.x is used. | 
 | 18701 |  | 
 | 18702 | - xml.dom offers the new functions registerDOMImplementation and | 
 | 18703 |   getDOMImplementation. | 
 | 18704 |  | 
 | 18705 | - xml.dom.minidom offers a toprettyxml method. A number of DOM | 
 | 18706 |   conformance issues have been resolved. In particular, Element now | 
 | 18707 |   has an hasAttributes method, and the handling of namespaces was | 
 | 18708 |   improved. | 
 | 18709 |  | 
 | 18710 | - Ka-Ping Yee contributed two new modules: inspect.py, a module for | 
 | 18711 |   getting information about live Python code, and pydoc.py, a module | 
 | 18712 |   for interactively converting docstrings to HTML or text. | 
 | 18713 |   Tools/scripts/pydoc, which is now automatically installed into | 
 | 18714 |   <prefix>/bin, uses pydoc.py to display documentation; try running | 
 | 18715 |   "pydoc -h" for instructions.  "pydoc -g" pops up a small GUI that | 
 | 18716 |   lets you browse the module docstrings using a web browser. | 
 | 18717 |  | 
 | 18718 | - New library module difflib.py, primarily packaging the SequenceMatcher | 
 | 18719 |   class at the heart of the popular ndiff.py file-comparison tool. | 
 | 18720 |  | 
 | 18721 | - doctest.py (a framework for verifying Python code examples in docstrings) | 
 | 18722 |   is now part of the std library. | 
 | 18723 |  | 
 | 18724 | Windows changes | 
 | 18725 |  | 
 | 18726 | - A new entry in the Start menu, "Module Docs", runs "pydoc -g" -- a | 
 | 18727 |   small GUI that lets you browse the module docstrings using your | 
 | 18728 |   default web browser. | 
 | 18729 |  | 
 | 18730 | - Import is now case-sensitive.  PEP 235 (Import on Case-Insensitive | 
 | 18731 |   Platforms) is implemented.  See | 
 | 18732 |  | 
 | 18733 |       http://python.sourceforge.net/peps/pep-0235.html | 
 | 18734 |  | 
 | 18735 |   for full details, especially the "Current Lower-Left Semantics" section. | 
 | 18736 |   The new Windows import rules are simpler than before: | 
 | 18737 |  | 
 | 18738 |   A. If the PYTHONCASEOK environment variable exists, same as | 
 | 18739 |      before:  silently accept the first case-insensitive match of any | 
 | 18740 |      kind; raise ImportError if none found. | 
 | 18741 |  | 
 | 18742 |   B. Else search sys.path for the first case-sensitive match; raise | 
 | 18743 |      ImportError if none found. | 
 | 18744 |  | 
 | 18745 |   The same rules have been implemented on other platforms with case- | 
 | 18746 |   insensitive but case-preserving filesystems too (including Cygwin, and | 
 | 18747 |   several flavors of Macintosh operating systems). | 
 | 18748 |  | 
 | 18749 | - winsound module:  Under Win9x, winsound.Beep() now attempts to simulate | 
 | 18750 |   what it's supposed to do (and does do under NT and 2000) via direct | 
 | 18751 |   port manipulation.  It's unknown whether this will work on all systems, | 
 | 18752 |   but it does work on my Win98SE systems now and was known to be useless on | 
 | 18753 |   all Win9x systems before. | 
 | 18754 |  | 
 | 18755 | - Build:  Subproject _test (effectively) renamed to _testcapi. | 
 | 18756 |  | 
 | 18757 | New platforms | 
 | 18758 |  | 
 | 18759 | - 2.1 should compile and run out of the box under MacOS X, even using HFS+. | 
 | 18760 |   Thanks to Steven Majewski! | 
 | 18761 |  | 
 | 18762 | - 2.1 should compile and run out of the box on Cygwin.  Thanks to Jason | 
 | 18763 |   Tishler! | 
 | 18764 |  | 
 | 18765 | - 2.1 contains new files and patches for RISCOS, thanks to Dietmar | 
 | 18766 |   Schwertberger!  See RISCOS/README for more information -- it seems | 
 | 18767 |   that because of the bizarre filename conventions on RISCOS, no port | 
 | 18768 |   to that platform is easy. | 
 | 18769 |  | 
 | 18770 |  | 
 | 18771 | What's New in Python 2.1 alpha 2? | 
 | 18772 | ================================= | 
 | 18773 |  | 
 | 18774 | Core language, builtins, and interpreter | 
 | 18775 |  | 
 | 18776 | - Scopes nest.  If a name is used in a function or class, but is not | 
 | 18777 |   local, the definition in the nearest enclosing function scope will | 
 | 18778 |   be used.  One consequence of this change is that lambda statements | 
 | 18779 |   could reference variables in the namespaces where the lambda is | 
 | 18780 |   defined.  In some unusual cases, this change will break code. | 
 | 18781 |  | 
 | 18782 |   In all previous version of Python, names were resolved in exactly | 
 | 18783 |   three namespaces -- the local namespace, the global namespace, and | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 18784 |   the builtins namespace.  According to this old definition, if a | 
| Skip Montanaro | 4cb2204 | 2002-09-17 20:55:31 +0000 | [diff] [blame] | 18785 |   function A is defined within a function B, the names bound in B are | 
 | 18786 |   not visible in A.  The new rules make names bound in B visible in A, | 
 | 18787 |   unless A contains a name binding that hides the binding in B. | 
 | 18788 |  | 
 | 18789 |   Section 4.1 of the reference manual describes the new scoping rules | 
 | 18790 |   in detail.  The test script in Lib/test/test_scope.py demonstrates | 
 | 18791 |   some of the effects of the change. | 
 | 18792 |  | 
 | 18793 |   The new rules will cause existing code to break if it defines nested | 
 | 18794 |   functions where an outer function has local variables with the same | 
 | 18795 |   name as globals or builtins used by the inner function.  Example: | 
 | 18796 |  | 
 | 18797 |     def munge(str): | 
 | 18798 |         def helper(x): | 
 | 18799 |             return str(x) | 
 | 18800 |         if type(str) != type(''): | 
 | 18801 |             str = helper(str) | 
 | 18802 |         return str.strip() | 
 | 18803 |  | 
 | 18804 |   Under the old rules, the name str in helper() is bound to the | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 18805 |   built-in function str().  Under the new rules, it will be bound to | 
| Skip Montanaro | 4cb2204 | 2002-09-17 20:55:31 +0000 | [diff] [blame] | 18806 |   the argument named str and an error will occur when helper() is | 
 | 18807 |   called. | 
 | 18808 |  | 
 | 18809 | - The compiler will report a SyntaxError if "from ... import *" occurs | 
 | 18810 |   in a function or class scope.  The language reference has documented | 
 | 18811 |   that this case is illegal, but the compiler never checked for it. | 
 | 18812 |   The recent introduction of nested scope makes the meaning of this | 
 | 18813 |   form of name binding ambiguous.  In a future release, the compiler | 
 | 18814 |   may allow this form when there is no possibility of ambiguity. | 
 | 18815 |  | 
 | 18816 | - repr(string) is easier to read, now using hex escapes instead of octal, | 
 | 18817 |   and using \t, \n and \r instead of \011, \012 and \015 (respectively): | 
 | 18818 |  | 
 | 18819 |   >>> "\texample \r\n" + chr(0) + chr(255) | 
 | 18820 |   '\texample \r\n\x00\xff'         # in 2.1 | 
 | 18821 |   '\011example \015\012\000\377'   # in 2.0 | 
 | 18822 |  | 
 | 18823 | - Functions are now compared and hashed by identity, not by value, since | 
 | 18824 |   the func_code attribute is writable. | 
 | 18825 |  | 
 | 18826 | - Weak references (PEP 205) have been added.  This involves a few | 
 | 18827 |   changes in the core, an extension module (_weakref), and a Python | 
 | 18828 |   module (weakref).  The weakref module is the public interface.  It | 
 | 18829 |   includes support for "explicit" weak references, proxy objects, and | 
 | 18830 |   mappings with weakly held values. | 
 | 18831 |  | 
 | 18832 | - A 'continue' statement can now appear in a try block within the body | 
 | 18833 |   of a loop.  It is still not possible to use continue in a finally | 
 | 18834 |   clause. | 
 | 18835 |  | 
 | 18836 | Standard library | 
 | 18837 |  | 
 | 18838 | - mailbox.py now has a new class, PortableUnixMailbox which is | 
 | 18839 |   identical to UnixMailbox but uses a more portable scheme for | 
 | 18840 |   determining From_ separators.  Also, the constructors for all the | 
 | 18841 |   classes in this module have a new optional `factory' argument, which | 
 | 18842 |   is a callable used when new message classes must be instantiated by | 
 | 18843 |   the next() method. | 
 | 18844 |  | 
 | 18845 | - random.py is now self-contained, and offers all the functionality of | 
 | 18846 |   the now-deprecated whrandom.py.  See the docs for details.  random.py | 
 | 18847 |   also supports new functions getstate() and setstate(), for saving | 
 | 18848 |   and restoring the internal state of the generator; and jumpahead(n), | 
 | 18849 |   for quickly forcing the internal state to be the same as if n calls to | 
 | 18850 |   random() had been made.  The latter is particularly useful for multi- | 
 | 18851 |   threaded programs, creating one instance of the random.Random() class for | 
 | 18852 |   each thread, then using .jumpahead() to force each instance to use a | 
 | 18853 |   non-overlapping segment of the full period. | 
 | 18854 |  | 
 | 18855 | - random.py's seed() function is new.  For bit-for-bit compatibility with | 
 | 18856 |   prior releases, use the whseed function instead.  The new seed function | 
 | 18857 |   addresses two problems:  (1) The old function couldn't produce more than | 
 | 18858 |   about 2**24 distinct internal states; the new one about 2**45 (the best | 
 | 18859 |   that can be done in the Wichmann-Hill generator).  (2) The old function | 
 | 18860 |   sometimes produced identical internal states when passed distinct | 
 | 18861 |   integers, and there was no simple way to predict when that would happen; | 
 | 18862 |   the new one guarantees to produce distinct internal states for all | 
 | 18863 |   arguments in [0, 27814431486576L). | 
 | 18864 |  | 
 | 18865 | - The socket module now supports raw packets on Linux.  The socket | 
 | 18866 |   family is AF_PACKET. | 
 | 18867 |  | 
 | 18868 | - test_capi.py is a start at running tests of the Python C API.  The tests | 
 | 18869 |   are implemented by the new Modules/_testmodule.c. | 
 | 18870 |  | 
 | 18871 | - A new extension module, _symtable, provides provisional access to the | 
 | 18872 |   internal symbol table used by the Python compiler.  A higher-level | 
 | 18873 |   interface will be added on top of _symtable in a future release. | 
 | 18874 |  | 
 | 18875 | - Removed the obsolete soundex module. | 
 | 18876 |  | 
 | 18877 | - xml.dom.minidom now uses the standard DOM exceptions. Node supports | 
 | 18878 |   the isSameNode method; NamedNodeMap the get method. | 
 | 18879 |  | 
 | 18880 | - xml.sax.expatreader supports the lexical handler property; it | 
 | 18881 |   generates comment, startCDATA, and endCDATA events. | 
 | 18882 |  | 
 | 18883 | Windows changes | 
 | 18884 |  | 
 | 18885 | - Build procedure:  the zlib project is built in a different way that | 
 | 18886 |   ensures the zlib header files used can no longer get out of synch with | 
 | 18887 |   the zlib binary used.  See PCbuild\readme.txt for details.  Your old | 
 | 18888 |   zlib-related directories can be deleted; you'll need to download fresh | 
 | 18889 |   source for zlib and unpack it into a new directory. | 
 | 18890 |  | 
 | 18891 | - Build:  New subproject _test for the benefit of test_capi.py (see above). | 
 | 18892 |  | 
 | 18893 | - Build:  New subproject _symtable, for new DLL _symtable.pyd (a nascent | 
 | 18894 |   interface to some Python compiler internals). | 
 | 18895 |  | 
 | 18896 | - Build:  Subproject ucnhash is gone, since the code was folded into the | 
 | 18897 |   unicodedata subproject. | 
 | 18898 |  | 
 | 18899 | What's New in Python 2.1 alpha 1? | 
 | 18900 | ================================= | 
 | 18901 |  | 
 | 18902 | Core language, builtins, and interpreter | 
 | 18903 |  | 
 | 18904 | - There is a new Unicode companion to the PyObject_Str() API | 
 | 18905 |   called PyObject_Unicode(). It behaves in the same way as the | 
 | 18906 |   former, but assures that the returned value is an Unicode object | 
 | 18907 |   (applying the usual coercion if necessary). | 
 | 18908 |  | 
 | 18909 | - The comparison operators support "rich comparison overloading" (PEP | 
 | 18910 |   207).  C extension types can provide a rich comparison function in | 
 | 18911 |   the new tp_richcompare slot in the type object.  The cmp() function | 
 | 18912 |   and the C function PyObject_Compare() first try the new rich | 
 | 18913 |   comparison operators before trying the old 3-way comparison.  There | 
 | 18914 |   is also a new C API PyObject_RichCompare() (which also falls back on | 
 | 18915 |   the old 3-way comparison, but does not constrain the outcome of the | 
 | 18916 |   rich comparison to a Boolean result). | 
 | 18917 |  | 
 | 18918 |   The rich comparison function takes two objects (at least one of | 
 | 18919 |   which is guaranteed to have the type that provided the function) and | 
 | 18920 |   an integer indicating the opcode, which can be Py_LT, Py_LE, Py_EQ, | 
 | 18921 |   Py_NE, Py_GT, Py_GE (for <, <=, ==, !=, >, >=), and returns a Python | 
 | 18922 |   object, which may be NotImplemented (in which case the tp_compare | 
 | 18923 |   slot function is used as a fallback, if defined). | 
 | 18924 |  | 
 | 18925 |   Classes can overload individual comparison operators by defining one | 
 | 18926 |   or more of the methods__lt__, __le__, __eq__, __ne__, __gt__, | 
 | 18927 |   __ge__.  There are no explicit "reflected argument" versions of | 
 | 18928 |   these; instead, __lt__ and __gt__ are each other's reflection, | 
 | 18929 |   likewise for__le__ and __ge__; __eq__ and __ne__ are their own | 
 | 18930 |   reflection (similar at the C level).  No other implications are | 
 | 18931 |   made; in particular, Python does not assume that == is the Boolean | 
 | 18932 |   inverse of !=, or that < is the Boolean inverse of >=.  This makes | 
 | 18933 |   it possible to define types with partial orderings. | 
 | 18934 |  | 
 | 18935 |   Classes or types that want to implement (in)equality tests but not | 
 | 18936 |   the ordering operators (i.e. unordered types) should implement == | 
 | 18937 |   and !=, and raise an error for the ordering operators. | 
 | 18938 |  | 
 | 18939 |   It is possible to define types whose rich comparison results are not | 
 | 18940 |   Boolean; e.g. a matrix type might want to return a matrix of bits | 
 | 18941 |   for A < B, giving elementwise comparisons.  Such types should ensure | 
 | 18942 |   that any interpretation of their value in a Boolean context raises | 
 | 18943 |   an exception, e.g. by defining __nonzero__ (or the tp_nonzero slot | 
 | 18944 |   at the C level) to always raise an exception. | 
 | 18945 |  | 
 | 18946 | - Complex numbers use rich comparisons to define == and != but raise | 
 | 18947 |   an exception for <, <=, > and >=.  Unfortunately, this also means | 
 | 18948 |   that cmp() of two complex numbers raises an exception when the two | 
 | 18949 |   numbers differ.  Since it is not mathematically meaningful to compare | 
 | 18950 |   complex numbers except for equality, I hope that this doesn't break | 
 | 18951 |   too much code. | 
 | 18952 |  | 
 | 18953 | - The outcome of comparing non-numeric objects of different types is | 
 | 18954 |   not defined by the language, other than that it's arbitrary but | 
 | 18955 |   consistent (see the Reference Manual).  An implementation detail changed | 
 | 18956 |   in 2.1a1 such that None now compares less than any other object.  Code | 
 | 18957 |   relying on this new behavior (like code that relied on the previous | 
 | 18958 |   behavior) does so at its own risk. | 
 | 18959 |  | 
 | 18960 | - Functions and methods now support getting and setting arbitrarily | 
 | 18961 |   named attributes (PEP 232).  Functions have a new __dict__ | 
 | 18962 |   (a.k.a. func_dict) which hold the function attributes.  Methods get | 
 | 18963 |   and set attributes on their underlying im_func.  It is a TypeError | 
 | 18964 |   to set an attribute on a bound method. | 
 | 18965 |  | 
 | 18966 | - The xrange() object implementation has been improved so that | 
 | 18967 |   xrange(sys.maxint) can be used on 64-bit platforms.  There's still a | 
 | 18968 |   limitation that in this case len(xrange(sys.maxint)) can't be | 
 | 18969 |   calculated, but the common idiom "for i in xrange(sys.maxint)" will | 
 | 18970 |   work fine as long as the index i doesn't actually reach 2**31. | 
 | 18971 |   (Python uses regular ints for sequence and string indices; fixing | 
 | 18972 |   that is much more work.) | 
 | 18973 |  | 
 | 18974 | - Two changes to from...import: | 
 | 18975 |  | 
 | 18976 |   1) "from M import X" now works even if (after loading module M) | 
 | 18977 |      sys.modules['M'] is not a real module; it's basically a getattr() | 
 | 18978 |      operation with AttributeError exceptions changed into ImportError. | 
 | 18979 |  | 
 | 18980 |   2) "from M import *" now looks for M.__all__ to decide which names to | 
 | 18981 |      import; if M.__all__ doesn't exist, it uses M.__dict__.keys() but | 
 | 18982 |      filters out names starting with '_' as before.  Whether or not | 
 | 18983 |      __all__ exists, there's no restriction on the type of M. | 
 | 18984 |  | 
 | 18985 | - File objects have a new method, xreadlines().  This is the fastest | 
 | 18986 |   way to iterate over all lines in a file: | 
 | 18987 |  | 
 | 18988 |   for line in file.xreadlines(): | 
 | 18989 |       ...do something to line... | 
 | 18990 |  | 
 | 18991 |   See the xreadlines module (mentioned below) for how to do this for | 
 | 18992 |   other file-like objects. | 
 | 18993 |  | 
 | 18994 | - Even if you don't use file.xreadlines(), you may expect a speedup on | 
 | 18995 |   line-by-line input.  The file.readline() method has been optimized | 
 | 18996 |   quite a bit in platform-specific ways:  on systems (like Linux) that | 
 | 18997 |   support flockfile(), getc_unlocked(), and funlockfile(), those are | 
 | 18998 |   used by default.  On systems (like Windows) without getc_unlocked(), | 
 | 18999 |   a complicated (but still thread-safe) method using fgets() is used by | 
 | 19000 |   default. | 
 | 19001 |  | 
 | 19002 |   You can force use of the fgets() method by #define'ing | 
 | 19003 |   USE_FGETS_IN_GETLINE at build time (it may be faster than | 
 | 19004 |   getc_unlocked()). | 
 | 19005 |  | 
 | 19006 |   You can force fgets() not to be used by #define'ing | 
 | 19007 |   DONT_USE_FGETS_IN_GETLINE (this is the first thing to try if std test | 
 | 19008 |   test_bufio.py fails -- and let us know if it does!). | 
 | 19009 |  | 
 | 19010 | - In addition, the fileinput module, while still slower than the other | 
 | 19011 |   methods on most platforms, has been sped up too, by using | 
 | 19012 |   file.readlines(sizehint). | 
 | 19013 |  | 
 | 19014 | - Support for run-time warnings has been added, including a new | 
 | 19015 |   command line option (-W) to specify the disposition of warnings. | 
 | 19016 |   See the description of the warnings module below. | 
 | 19017 |  | 
 | 19018 | - Extensive changes have been made to the coercion code.  This mostly | 
 | 19019 |   affects extension modules (which can now implement mixed-type | 
 | 19020 |   numerical operators without having to use coercion), but | 
 | 19021 |   occasionally, in boundary cases the coercion semantics have changed | 
 | 19022 |   subtly.  Since this was a terrible gray area of the language, this | 
 | 19023 |   is considered an improvement.  Also note that __rcmp__ is no longer | 
 | 19024 |   supported -- instead of calling __rcmp__, __cmp__ is called with | 
 | 19025 |   reflected arguments. | 
 | 19026 |  | 
 | 19027 | - In connection with the coercion changes, a new built-in singleton | 
 | 19028 |   object, NotImplemented is defined.  This can be returned for | 
 | 19029 |   operations that wish to indicate they are not implemented for a | 
 | 19030 |   particular combination of arguments.  From C, this is | 
 | 19031 |   Py_NotImplemented. | 
 | 19032 |  | 
 | 19033 | - The interpreter accepts now bytecode files on the command line even | 
 | 19034 |   if they do not have a .pyc or .pyo extension. On Linux, after executing | 
 | 19035 |  | 
 | 19036 | import imp,sys,string | 
 | 19037 | magic = string.join(["\\x%.2x" % ord(c) for c in imp.get_magic()],"") | 
 | 19038 | reg = ':pyc:M::%s::%s:' % (magic, sys.executable) | 
 | 19039 | open("/proc/sys/fs/binfmt_misc/register","wb").write(reg) | 
 | 19040 |  | 
 | 19041 |   any byte code file can be used as an executable (i.e. as an argument | 
 | 19042 |   to execve(2)). | 
 | 19043 |  | 
 | 19044 | - %[xXo] formats of negative Python longs now produce a sign | 
 | 19045 |   character.  In 1.6 and earlier, they never produced a sign, | 
 | 19046 |   and raised an error if the value of the long was too large | 
 | 19047 |   to fit in a Python int.  In 2.0, they produced a sign if and | 
 | 19048 |   only if too large to fit in an int.  This was inconsistent | 
 | 19049 |   across platforms (because the size of an int varies across | 
 | 19050 |   platforms), and inconsistent with hex() and oct().  Example: | 
 | 19051 |  | 
 | 19052 |   >>> "%x" % -0x42L | 
 | 19053 |   '-42'      # in 2.1 | 
 | 19054 |   'ffffffbe' # in 2.0 and before, on 32-bit machines | 
 | 19055 |   >>> hex(-0x42L) | 
 | 19056 |   '-0x42L'   # in all versions of Python | 
 | 19057 |  | 
 | 19058 |   The behavior of %d formats for negative Python longs remains | 
 | 19059 |   the same as in 2.0 (although in 1.6 and before, they raised | 
 | 19060 |   an error if the long didn't fit in a Python int). | 
 | 19061 |  | 
 | 19062 |   %u formats don't make sense for Python longs, but are allowed | 
 | 19063 |   and treated the same as %d in 2.1.  In 2.0, a negative long | 
 | 19064 |   formatted via %u produced a sign if and only if too large to | 
 | 19065 |   fit in an int.  In 1.6 and earlier, a negative long formatted | 
 | 19066 |   via %u raised an error if it was too big to fit in an int. | 
 | 19067 |  | 
 | 19068 | - Dictionary objects have an odd new method, popitem().  This removes | 
 | 19069 |   an arbitrary item from the dictionary and returns it (in the form of | 
 | 19070 |   a (key, value) pair).  This can be useful for algorithms that use a | 
 | 19071 |   dictionary as a bag of "to do" items and repeatedly need to pick one | 
 | 19072 |   item.  Such algorithms normally end up running in quadratic time; | 
 | 19073 |   using popitem() they can usually be made to run in linear time. | 
 | 19074 |  | 
 | 19075 | Standard library | 
 | 19076 |  | 
 | 19077 | - In the time module, the time argument to the functions strftime, | 
 | 19078 |   localtime, gmtime, asctime and ctime is now optional, defaulting to | 
 | 19079 |   the current time (in the local timezone). | 
 | 19080 |  | 
 | 19081 | - The ftplib module now defaults to passive mode, which is deemed a | 
 | 19082 |   more useful default given that clients are often inside firewalls | 
 | 19083 |   these days.  Note that this could break if ftplib is used to connect | 
 | 19084 |   to a *server* that is inside a firewall, from outside; this is | 
 | 19085 |   expected to be a very rare situation.  To fix that, you can call | 
 | 19086 |   ftp.set_pasv(0). | 
 | 19087 |  | 
 | 19088 | - The module site now treats .pth files not only for path configuration, | 
 | 19089 |   but also supports extensions to the initialization code: Lines starting | 
 | 19090 |   with import are executed. | 
 | 19091 |  | 
 | 19092 | - There's a new module, warnings, which implements a mechanism for | 
 | 19093 |   issuing and filtering warnings.  There are some new built-in | 
 | 19094 |   exceptions that serve as warning categories, and a new command line | 
 | 19095 |   option, -W, to control warnings (e.g. -Wi ignores all warnings, -We | 
 | 19096 |   turns warnings into errors).  warnings.warn(message[, category]) | 
 | 19097 |   issues a warning message; this can also be called from C as | 
 | 19098 |   PyErr_Warn(category, message). | 
 | 19099 |  | 
 | 19100 | - A new module xreadlines was added.  This exports a single factory | 
 | 19101 |   function, xreadlines().  The intention is that this code is the | 
 | 19102 |   absolutely fastest way to iterate over all lines in an open | 
 | 19103 |   file(-like) object: | 
 | 19104 |  | 
 | 19105 |   import xreadlines | 
 | 19106 |   for line in xreadlines.xreadlines(file): | 
 | 19107 |       ...do something to line... | 
 | 19108 |  | 
 | 19109 |   This is equivalent to the previous the speed record holder using | 
 | 19110 |   file.readlines(sizehint).  Note that if file is a real file object | 
 | 19111 |   (as opposed to a file-like object), this is equivalent: | 
 | 19112 |  | 
 | 19113 |   for line in file.xreadlines(): | 
 | 19114 |       ...do something to line... | 
 | 19115 |  | 
 | 19116 | - The bisect module has new functions bisect_left, insort_left, | 
 | 19117 |   bisect_right and insort_right.  The old names bisect and insort | 
 | 19118 |   are now aliases for bisect_right and insort_right.  XXX_right | 
 | 19119 |   and XXX_left methods differ in what happens when the new element | 
 | 19120 |   compares equal to one or more elements already in the list:  the | 
 | 19121 |   XXX_left methods insert to the left, the XXX_right methods to the | 
 | 19122 |   right.  Code that doesn't care where equal elements end up should | 
 | 19123 |   continue to use the old, short names ("bisect" and "insort"). | 
 | 19124 |  | 
 | 19125 | - The new curses.panel module wraps the panel library that forms part | 
 | 19126 |   of SYSV curses and ncurses.  Contributed by Thomas Gellekum. | 
 | 19127 |  | 
 | 19128 | - The SocketServer module now sets the allow_reuse_address flag by | 
 | 19129 |   default in the TCPServer class. | 
 | 19130 |  | 
 | 19131 | - A new function, sys._getframe(), returns the stack frame pointer of | 
 | 19132 |   the caller.  This is intended only as a building block for | 
 | 19133 |   higher-level mechanisms such as string interpolation. | 
 | 19134 |  | 
 | 19135 | - The pyexpat module supports a number of new handlers, which are | 
 | 19136 |   available only in expat 1.2. If invocation of a callback fails, it | 
 | 19137 |   will report an additional frame in the traceback. Parser objects | 
 | 19138 |   participate now in garbage collection. If expat reports an unknown | 
 | 19139 |   encoding, pyexpat will try to use a Python codec; that works only | 
 | 19140 |   for single-byte charsets. The parser type objects is exposed as | 
 | 19141 |   XMLParserObject. | 
 | 19142 |  | 
 | 19143 | - xml.dom now offers standard definitions for symbolic node type and | 
 | 19144 |   exception code constants, and a hierarchy of DOM exceptions. minidom | 
 | 19145 |   was adjusted to use them. | 
 | 19146 |  | 
 | 19147 | - The conformance of xml.dom.minidom to the DOM specification was | 
 | 19148 |   improved. It detects a number of additional error cases; the | 
 | 19149 |   previous/next relationship works even when the tree is modified; | 
 | 19150 |   Node supports the normalize() method; NamedNodeMap, DocumentType and | 
 | 19151 |   DOMImplementation classes were added; Element supports the | 
 | 19152 |   hasAttribute and hasAttributeNS methods; and Text supports the splitText | 
 | 19153 |   method. | 
 | 19154 |  | 
 | 19155 | Build issues | 
 | 19156 |  | 
 | 19157 | - For Unix (and Unix-compatible) builds, configuration and building of | 
 | 19158 |   extension modules is now greatly automated.  Rather than having to | 
 | 19159 |   edit the Modules/Setup file to indicate which modules should be | 
 | 19160 |   built and where their include files and libraries are, a | 
 | 19161 |   distutils-based setup.py script now takes care of building most | 
 | 19162 |   extension modules.  All extension modules built this way are built | 
 | 19163 |   as shared libraries.  Only a few modules that must be linked | 
 | 19164 |   statically are still listed in the Setup file; you won't need to | 
 | 19165 |   edit their configuration. | 
 | 19166 |  | 
 | 19167 | - Python should now build out of the box on Cygwin.  If it doesn't, | 
 | 19168 |   mail to Jason Tishler (jlt63 at users.sourceforge.net). | 
 | 19169 |  | 
 | 19170 | - Python now always uses its own (renamed) implementation of getopt() | 
 | 19171 |   -- there's too much variation among C library getopt() | 
 | 19172 |   implementations. | 
 | 19173 |  | 
 | 19174 | - C++ compilers are better supported; the CXX macro is always set to a | 
 | 19175 |   C++ compiler if one is found. | 
 | 19176 |  | 
 | 19177 | Windows changes | 
 | 19178 |  | 
 | 19179 | - select module:  By default under Windows, a select() call | 
 | 19180 |   can specify no more than 64 sockets.  Python now boosts | 
 | 19181 |   this Microsoft default to 512.  If you need even more than | 
 | 19182 |   that, see the MS docs (you'll need to #define FD_SETSIZE | 
 | 19183 |   and recompile Python from source). | 
 | 19184 |  | 
 | 19185 | - Support for Windows 3.1, DOS and OS/2 is gone.  The Lib/dos-8x3 | 
 | 19186 |   subdirectory is no more! | 
 | 19187 |  | 
 | 19188 |  | 
 | 19189 | What's New in Python 2.0? | 
 | 19190 | ========================= | 
 | 19191 |  | 
 | 19192 | Below is a list of all relevant changes since release 1.6.  Older | 
 | 19193 | changes are in the file HISTORY.  If you are making the jump directly | 
 | 19194 | from Python 1.5.2 to 2.0, make sure to read the section for 1.6 in the | 
 | 19195 | HISTORY file!  Many important changes listed there. | 
 | 19196 |  | 
 | 19197 | Alternatively, a good overview of the changes between 1.5.2 and 2.0 is | 
 | 19198 | the document "What's New in Python 2.0" by Kuchling and Moshe Zadka: | 
| Andrew M. Kuchling | e240d9b | 2004-03-21 18:48:22 +0000 | [diff] [blame] | 19199 | http://www.amk.ca/python/2.0/. | 
| Skip Montanaro | 4cb2204 | 2002-09-17 20:55:31 +0000 | [diff] [blame] | 19200 |  | 
 | 19201 | --Guido van Rossum (home page: http://www.pythonlabs.com/~guido/) | 
 | 19202 |  | 
 | 19203 | ====================================================================== | 
 | 19204 |  | 
 | 19205 | What's new in 2.0 (since release candidate 1)? | 
 | 19206 | ============================================== | 
 | 19207 |  | 
 | 19208 | Standard library | 
 | 19209 |  | 
 | 19210 | - The copy_reg module was modified to clarify its intended use: to | 
 | 19211 |   register pickle support for extension types, not for classes. | 
 | 19212 |   pickle() will raise a TypeError if it is passed a class. | 
 | 19213 |  | 
 | 19214 | - Fixed a bug in gettext's "normalize and expand" code that prevented | 
 | 19215 |   it from finding an existing .mo file. | 
 | 19216 |  | 
 | 19217 | - Restored support for HTTP/0.9 servers in httplib. | 
 | 19218 |  | 
 | 19219 | - The math module was changed to stop raising OverflowError in case of | 
 | 19220 |   underflow, and return 0 instead in underflow cases.  Whether Python | 
 | 19221 |   used to raise OverflowError in case of underflow was platform- | 
 | 19222 |   dependent (it did when the platform math library set errno to ERANGE | 
 | 19223 |   on underflow). | 
 | 19224 |  | 
 | 19225 | - Fixed a bug in StringIO that occurred when the file position was not | 
 | 19226 |   at the end of the file and write() was called with enough data to | 
 | 19227 |   extend past the end of the file. | 
 | 19228 |  | 
 | 19229 | - Fixed a bug that caused Tkinter error messages to get lost on | 
 | 19230 |   Windows.  The bug was fixed by replacing direct use of | 
 | 19231 |   interp->result with Tcl_GetStringResult(interp). | 
 | 19232 |  | 
 | 19233 | - Fixed bug in urllib2 that caused it to fail when it received an HTTP | 
 | 19234 |   redirect response. | 
 | 19235 |  | 
 | 19236 | - Several changes were made to distutils: Some debugging code was | 
 | 19237 |   removed from util.  Fixed the installer used when an external zip | 
 | 19238 |   program (like WinZip) is not found; the source code for this | 
 | 19239 |   installer is in Misc/distutils.  check_lib() was modified to behave | 
 | 19240 |   more like AC_CHECK_LIB by add other_libraries() as a parameter.  The | 
 | 19241 |   test for whether installed modules are on sys.path was changed to | 
 | 19242 |   use both normcase() and normpath(). | 
 | 19243 |  | 
 | 19244 | - Several minor bugs were fixed in the xml package (the minidom, | 
 | 19245 |   pulldom, expatreader, and saxutils modules). | 
 | 19246 |  | 
 | 19247 | - The regression test driver (regrtest.py) behavior when invoked with | 
 | 19248 |   -l changed: It now reports a count of objects that are recognized as | 
 | 19249 |   garbage but not freed by the garbage collector. | 
 | 19250 |  | 
 | 19251 | - The regression test for the math module was changed to test | 
 | 19252 |   exceptional behavior when the test is run in verbose mode.  Python | 
 | 19253 |   cannot yet guarantee consistent exception behavior across platforms, | 
 | 19254 |   so the exception part of test_math is run only in verbose mode, and | 
 | 19255 |   may fail on your platform. | 
 | 19256 |  | 
 | 19257 | Internals | 
 | 19258 |  | 
 | 19259 | - PyOS_CheckStack() has been disabled on Win64, where it caused | 
 | 19260 |   test_sre to fail. | 
 | 19261 |  | 
 | 19262 | Build issues | 
 | 19263 |  | 
 | 19264 | - Changed compiler flags, so that gcc is always invoked with -Wall and | 
 | 19265 |   -Wstrict-prototypes.  Users compiling Python with GCC should see | 
 | 19266 |   exactly one warning, except if they have passed configure the | 
 | 19267 |   --with-pydebug flag.  The expected warning is for getopt() in | 
 | 19268 |   Modules/main.c.  This warning will be fixed for Python 2.1. | 
 | 19269 |  | 
 | 19270 | - Fixed configure to add -threads argument during linking on OSF1. | 
 | 19271 |  | 
 | 19272 | Tools and other miscellany | 
 | 19273 |  | 
 | 19274 | - The compiler in Tools/compiler was updated to support the new | 
 | 19275 |   language features introduced in 2.0: extended print statement, list | 
 | 19276 |   comprehensions, and augmented assignments.  The new compiler should | 
 | 19277 |   also be backwards compatible with Python 1.5.2; the compiler will | 
 | 19278 |   always generate code for the version of the interpreter it runs | 
 | 19279 |   under. | 
 | 19280 |  | 
 | 19281 | What's new in 2.0 release candidate 1 (since beta 2)? | 
 | 19282 | ===================================================== | 
 | 19283 |  | 
 | 19284 | What is release candidate 1? | 
 | 19285 |  | 
 | 19286 | We believe that release candidate 1 will fix all known bugs that we | 
 | 19287 | intend to fix for the 2.0 final release.  This release should be a bit | 
 | 19288 | more stable than the previous betas.  We would like to see even more | 
 | 19289 | widespread testing before the final release, so we are producing this | 
 | 19290 | release candidate.  The final release will be exactly the same unless | 
 | 19291 | any show-stopping (or brown bag) bugs are found by testers of the | 
 | 19292 | release candidate. | 
 | 19293 |  | 
 | 19294 | All the changes since the last beta release are bug fixes or changes | 
 | 19295 | to support building Python for specific platforms. | 
 | 19296 |  | 
 | 19297 | Core language, builtins, and interpreter | 
 | 19298 |  | 
 | 19299 | - A bug that caused crashes when __coerce__ was used with augmented | 
 | 19300 |   assignment, e.g. +=, was fixed. | 
 | 19301 |  | 
 | 19302 | - Raise ZeroDivisionError when raising zero to a negative number, | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 19303 |   e.g. 0.0 ** -2.0.  Note that math.pow is unrelated to the built-in | 
| Skip Montanaro | 4cb2204 | 2002-09-17 20:55:31 +0000 | [diff] [blame] | 19304 |   power operator and the result of math.pow(0.0, -2.0) will vary by | 
 | 19305 |   platform.  On Linux, it raises a ValueError. | 
 | 19306 |  | 
 | 19307 | - A bug in Unicode string interpolation was fixed that occasionally | 
 | 19308 |   caused errors with formats including "%%".  For example, the | 
 | 19309 |   following expression "%% %s" % u"abc" no longer raises a TypeError. | 
 | 19310 |  | 
 | 19311 | - Compilation of deeply nested expressions raises MemoryError instead | 
 | 19312 |   of SyntaxError, e.g. eval("[" * 50 + "]" * 50). | 
 | 19313 |  | 
 | 19314 | - In 2.0b2 on Windows, the interpreter wrote .pyc files in text mode, | 
 | 19315 |   rendering them useless.  They are now written in binary mode again. | 
 | 19316 |  | 
 | 19317 | Standard library | 
 | 19318 |  | 
 | 19319 | - Keyword arguments are now accepted for most pattern and match object | 
 | 19320 |   methods in SRE, the standard regular expression engine. | 
 | 19321 |  | 
 | 19322 | - In SRE, fixed error with negative lookahead and lookbehind that | 
 | 19323 |   manifested itself as a runtime error in patterns like "(?<!abc)(def)". | 
 | 19324 |  | 
 | 19325 | - Several bugs in the Unicode handling and error handling in _tkinter | 
 | 19326 |   were fixed. | 
 | 19327 |  | 
 | 19328 | - Fix memory management errors in Merge() and Tkapp_Call() routines. | 
 | 19329 |  | 
 | 19330 | - Several changes were made to cStringIO to make it compatible with | 
 | 19331 |   the file-like object interface and with StringIO.  If operations are | 
 | 19332 |   performed on a closed object, an exception is raised.  The truncate | 
 | 19333 |   method now accepts a position argument and readline accepts a size | 
 | 19334 |   argument. | 
 | 19335 |  | 
 | 19336 | - There were many changes made to the linuxaudiodev module and its | 
 | 19337 |   test suite; as a result, a short, unexpected audio sample should now | 
 | 19338 |   play when the regression test is run. | 
 | 19339 |  | 
 | 19340 |   Note that this module is named poorly, because it should work | 
 | 19341 |   correctly on any platform that supports the Open Sound System | 
 | 19342 |   (OSS). | 
 | 19343 |  | 
 | 19344 |   The module now raises exceptions when errors occur instead of | 
 | 19345 |   crashing.  It also defines the AFMT_A_LAW format (logarithmic A-law | 
 | 19346 |   audio) and defines a getptr() method that calls the | 
 | 19347 |   SNDCTL_DSP_GETxPTR ioctl defined in the OSS Programmer's Guide. | 
 | 19348 |  | 
 | 19349 | - The library_version attribute, introduced in an earlier beta, was | 
 | 19350 |   removed because it can not be supported with early versions of the C | 
 | 19351 |   readline library, which provides no way to determine the version at | 
 | 19352 |   compile-time. | 
 | 19353 |  | 
 | 19354 | - The binascii module is now enabled on Win64. | 
 | 19355 |  | 
 | 19356 | - tokenize.py no longer suffers "recursion depth" errors when parsing | 
 | 19357 |   programs with very long string literals. | 
 | 19358 |  | 
 | 19359 | Internals | 
 | 19360 |  | 
 | 19361 | - Fixed several buffer overflow vulnerabilities in calculate_path(), | 
 | 19362 |   which is called when the interpreter starts up to determine where | 
 | 19363 |   the standard library is installed.  These vulnerabilities affect all | 
 | 19364 |   previous versions of Python and can be exploited by setting very | 
 | 19365 |   long values for PYTHONHOME or argv[0].  The risk is greatest for a | 
 | 19366 |   setuid Python script, although use of the wrapper in | 
 | 19367 |   Misc/setuid-prog.c will eliminate the vulnerability. | 
 | 19368 |  | 
 | 19369 | - Fixed garbage collection bugs in instance creation that were | 
 | 19370 |   triggered when errors occurred during initialization.  The solution, | 
 | 19371 |   applied in cPickle and in PyInstance_New(), is to call | 
 | 19372 |   PyObject_GC_Init() after the initialization of the object's | 
 | 19373 |   container attributes is complete. | 
 | 19374 |  | 
 | 19375 | - pyexpat adds definitions of PyModule_AddStringConstant and | 
 | 19376 |   PyModule_AddObject if the Python version is less than 2.0, which | 
 | 19377 |   provides compatibility with PyXML on Python 1.5.2. | 
 | 19378 |  | 
 | 19379 | - If the platform has a bogus definition for LONG_BIT (the number of | 
 | 19380 |   bits in a long), an error will be reported at compile time. | 
 | 19381 |  | 
 | 19382 | - Fix bugs in _PyTuple_Resize() which caused hard-to-interpret garbage | 
 | 19383 |   collection crashes and possibly other, unreported crashes. | 
 | 19384 |  | 
 | 19385 | - Fixed a memory leak in _PyUnicode_Fini(). | 
 | 19386 |  | 
 | 19387 | Build issues | 
 | 19388 |  | 
 | 19389 | - configure now accepts a --with-suffix option that specifies the | 
 | 19390 |   executable suffix.  This is useful for builds on Cygwin and Mac OS | 
 | 19391 |   X, for example. | 
 | 19392 |  | 
 | 19393 | - The mmap.PAGESIZE constant is now initialized using sysconf when | 
 | 19394 |   possible, which eliminates a dependency on -lucb for Reliant UNIX. | 
 | 19395 |  | 
 | 19396 | - The md5 file should now compile on all platforms. | 
 | 19397 |  | 
 | 19398 | - The select module now compiles on platforms that do not define | 
 | 19399 |   POLLRDNORM and related constants. | 
 | 19400 |  | 
 | 19401 | - Darwin (Mac OS X):  Initial support for static builds on this | 
 | 19402 |   platform. | 
 | 19403 |  | 
 | 19404 | - BeOS: A number of changes were made to the build and installation | 
 | 19405 |   process.  ar-fake now operates on a directory of object files. | 
 | 19406 |   dl_export.h is gone, and its macros now appear on the mwcc command | 
 | 19407 |   line during build on PPC BeOS. | 
 | 19408 |  | 
 | 19409 | - Platform directory in lib/python2.0 is "plat-beos5" (or | 
 | 19410 |   "plat-beos4", if building on BeOS 4.5), rather than "plat-beos". | 
 | 19411 |  | 
 | 19412 | - Cygwin: Support for shared libraries, Tkinter, and sockets. | 
 | 19413 |  | 
 | 19414 | - SunOS 4.1.4_JL: Fix test for directory existence in configure. | 
 | 19415 |  | 
 | 19416 | Tools and other miscellany | 
 | 19417 |  | 
 | 19418 | - Removed debugging prints from main used with freeze. | 
 | 19419 |  | 
 | 19420 | - IDLE auto-indent no longer crashes when it encounters Unicode | 
 | 19421 |   characters. | 
 | 19422 |  | 
 | 19423 | What's new in 2.0 beta 2 (since beta 1)? | 
 | 19424 | ======================================== | 
 | 19425 |  | 
 | 19426 | Core language, builtins, and interpreter | 
 | 19427 |  | 
 | 19428 | - Add support for unbounded ints in %d,i,u,x,X,o formats; for example | 
 | 19429 |   "%d" % 2L**64 == "18446744073709551616". | 
 | 19430 |  | 
 | 19431 | - Add -h and -V command line options to print the usage message and | 
 | 19432 |   Python version number and exit immediately. | 
 | 19433 |  | 
 | 19434 | - eval() and exec accept Unicode objects as code parameters. | 
 | 19435 |  | 
 | 19436 | - getattr() and setattr() now also accept Unicode objects for the | 
 | 19437 |   attribute name, which are converted to strings using the default | 
 | 19438 |   encoding before lookup. | 
 | 19439 |  | 
 | 19440 | - Multiplication on string and Unicode now does proper bounds | 
 | 19441 |   checking; e.g. 'a' * 65536 * 65536 will raise ValueError, "repeated | 
 | 19442 |   string is too long." | 
 | 19443 |  | 
 | 19444 | - Better error message when continue is found in try statement in a | 
 | 19445 |   loop. | 
 | 19446 |  | 
 | 19447 |  | 
 | 19448 | Standard library and extensions | 
 | 19449 |  | 
 | 19450 | - socket module: the OpenSSL code now adds support for RAND_status() | 
 | 19451 |   and EGD (Entropy Gathering Device). | 
 | 19452 |  | 
 | 19453 | - array: reverse() method of array now works.  buffer_info() now does | 
 | 19454 |   argument checking; it still takes no arguments. | 
 | 19455 |  | 
 | 19456 | - asyncore/asynchat: Included most recent version from Sam Rushing. | 
 | 19457 |  | 
 | 19458 | - cgi: Accept '&' or ';' as separator characters when parsing form data. | 
 | 19459 |  | 
 | 19460 | - CGIHTTPServer: Now works on Windows (and perhaps even Mac). | 
 | 19461 |  | 
 | 19462 | - ConfigParser: When reading the file, options spelled in upper case | 
 | 19463 |   letters are now correctly converted to lowercase. | 
 | 19464 |  | 
 | 19465 | - copy: Copy Unicode objects atomically. | 
 | 19466 |  | 
 | 19467 | - cPickle: Fail gracefully when copy_reg can't be imported. | 
 | 19468 |  | 
 | 19469 | - cStringIO: Implemented readlines() method. | 
 | 19470 |  | 
 | 19471 | - dbm: Add get() and setdefault() methods to dbm object.  Add constant | 
 | 19472 |   `library' to module that names the library used.  Added doc strings | 
 | 19473 |   and method names to error messages.  Uses configure to determine | 
 | 19474 |   which ndbm.h file to include; Berkeley DB's nbdm and GDBM's ndbm is | 
 | 19475 |   now available options. | 
 | 19476 |  | 
 | 19477 | - distutils: Update to version 0.9.3. | 
 | 19478 |  | 
 | 19479 | - dl: Add several dl.RTLD_ constants. | 
 | 19480 |  | 
 | 19481 | - fpectl: Now supported on FreeBSD. | 
 | 19482 |  | 
 | 19483 | - gc: Add DEBUG_SAVEALL option.  When enabled all garbage objects | 
 | 19484 |   found by the collector will be saved in gc.garbage.  This is useful | 
 | 19485 |   for debugging a program that creates reference cycles. | 
 | 19486 |  | 
 | 19487 | - httplib: Three changes: Restore support for set_debuglevel feature | 
 | 19488 |   of HTTP class.  Do not close socket on zero-length response.  Do not | 
 | 19489 |   crash when server sends invalid content-length header. | 
 | 19490 |  | 
 | 19491 | - mailbox: Mailbox class conforms better to qmail specifications. | 
 | 19492 |  | 
 | 19493 | - marshal: When reading a short, sign-extend on platforms where shorts | 
 | 19494 |   are bigger than 16 bits.  When reading a long, repair the unportable | 
 | 19495 |   sign extension that was being done for 64-bit machines.  (It assumed | 
 | 19496 |   that signed right shift sign-extends.) | 
 | 19497 |  | 
 | 19498 | - operator: Add contains(), invert(), __invert__() as aliases for | 
 | 19499 |   __contains__(), inv(), and __inv__() respectively. | 
 | 19500 |  | 
 | 19501 | - os: Add support for popen2() and popen3() on all platforms where | 
 | 19502 |   fork() exists.  (popen4() is still in the works.) | 
 | 19503 |  | 
 | 19504 | - os: (Windows only:) Add startfile() function that acts like double- | 
 | 19505 |   clicking on a file in Explorer (or passing the file name to the | 
 | 19506 |   DOS "start" command). | 
 | 19507 |  | 
 | 19508 | - os.path: (Windows, DOS:) Treat trailing colon correctly in | 
 | 19509 |   os.path.join.  os.path.join("a:", "b") yields "a:b". | 
 | 19510 |  | 
 | 19511 | - pickle: Now raises ValueError when an invalid pickle that contains | 
 | 19512 |   a non-string repr where a string repr was expected.  This behavior | 
 | 19513 |   matches cPickle. | 
 | 19514 |  | 
 | 19515 | - posixfile: Remove broken __del__() method. | 
 | 19516 |  | 
 | 19517 | - py_compile: support CR+LF line terminators in source file. | 
 | 19518 |  | 
 | 19519 | - readline: Does not immediately exit when ^C is hit when readline and | 
 | 19520 |   threads are configured.  Adds definition of rl_library_version.  (The | 
 | 19521 |   latter addition requires GNU readline 2.2 or later.) | 
 | 19522 |  | 
 | 19523 | - rfc822: Domain literals returned by AddrlistClass method | 
 | 19524 |   getdomainliteral() are now properly wrapped in brackets. | 
 | 19525 |  | 
 | 19526 | - site: sys.setdefaultencoding() should only be called in case the | 
 | 19527 |   standard default encoding ("ascii") is changed. This saves quite a | 
 | 19528 |   few cycles during startup since the first call to | 
 | 19529 |   setdefaultencoding() will initialize the codec registry and the | 
 | 19530 |   encodings package. | 
 | 19531 |  | 
 | 19532 | - socket: Support for size hint in readlines() method of object returned | 
 | 19533 |   by makefile(). | 
 | 19534 |  | 
 | 19535 | - sre: Added experimental expand() method to match objects.  Does not | 
 | 19536 |   use buffer interface on Unicode strings.  Does not hang if group id | 
 | 19537 |   is followed by whitespace. | 
 | 19538 |  | 
 | 19539 | - StringIO: Size hint in readlines() is now supported as documented. | 
 | 19540 |  | 
 | 19541 | - struct: Check ranges for bytes and shorts. | 
 | 19542 |  | 
 | 19543 | - urllib: Improved handling of win32 proxy settings. Fixed quote and | 
 | 19544 |   quote_plus functions so that the always encode a comma. | 
 | 19545 |  | 
 | 19546 | - Tkinter: Image objects are now guaranteed to have unique ids.  Set | 
 | 19547 |   event.delta to zero if Tk version doesn't support mousewheel. | 
 | 19548 |   Removed some debugging prints. | 
 | 19549 |  | 
 | 19550 | - UserList: now implements __contains__(). | 
 | 19551 |  | 
 | 19552 | - webbrowser: On Windows, use os.startfile() instead of os.popen(), | 
 | 19553 |   which works around a bug in Norton AntiVirus 2000 that leads directly | 
 | 19554 |   to a Blue Screen freeze. | 
 | 19555 |  | 
 | 19556 | - xml: New version detection code allows PyXML to override standard | 
 | 19557 |   XML package if PyXML version is greater than 0.6.1. | 
 | 19558 |  | 
 | 19559 | - xml.dom: DOM level 1 support for basic XML.  Includes xml.dom.minidom | 
 | 19560 |   (conventional DOM), and xml.dom.pulldom, which allows building the DOM | 
 | 19561 |   tree only for nodes which are sufficiently interesting to a specific | 
 | 19562 |   application.  Does not provide the HTML-specific extensions.  Still | 
 | 19563 |   undocumented. | 
 | 19564 |  | 
 | 19565 | - xml.sax: SAX 2 support for Python, including all the handler | 
 | 19566 |   interfaces needed to process XML 1.0 compliant XML.  Some | 
 | 19567 |   documentation is already available. | 
 | 19568 |  | 
 | 19569 | - pyexpat: Renamed to xml.parsers.expat since this is part of the new, | 
 | 19570 |   packagized XML support. | 
 | 19571 |  | 
 | 19572 |  | 
 | 19573 | C API | 
 | 19574 |  | 
 | 19575 | - Add three new convenience functions for module initialization -- | 
 | 19576 |   PyModule_AddObject(), PyModule_AddIntConstant(), and | 
 | 19577 |   PyModule_AddStringConstant(). | 
 | 19578 |  | 
 | 19579 | - Cleaned up definition of NULL in C source code; all definitions were | 
 | 19580 |   removed and add #error to Python.h if NULL isn't defined after | 
 | 19581 |   #include of stdio.h. | 
 | 19582 |  | 
 | 19583 | - Py_PROTO() macros that were removed in 2.0b1 have been restored for | 
 | 19584 |   backwards compatibility (at the source level) with old extensions. | 
 | 19585 |  | 
 | 19586 | - A wrapper API was added for signal() and sigaction().  Instead of | 
 | 19587 |   either function, always use PyOS_getsig() to get a signal handler | 
 | 19588 |   and PyOS_setsig() to set one.  A new convenience typedef | 
 | 19589 |   PyOS_sighandler_t is defined for the type of signal handlers. | 
 | 19590 |  | 
 | 19591 | - Add PyString_AsStringAndSize() function that provides access to the | 
 | 19592 |   internal data buffer and size of a string object -- or the default | 
 | 19593 |   encoded version of a Unicode object. | 
 | 19594 |  | 
 | 19595 | - PyString_Size() and PyString_AsString() accept Unicode objects. | 
 | 19596 |  | 
 | 19597 | - The standard header <limits.h> is now included by Python.h (if it | 
 | 19598 |   exists).  INT_MAX and LONG_MAX will always be defined, even if | 
 | 19599 |   <limits.h> is not available. | 
 | 19600 |  | 
 | 19601 | - PyFloat_FromString takes a second argument, pend, that was | 
 | 19602 |   effectively useless.  It is now officially useless but preserved for | 
 | 19603 |   backwards compatibility.  If the pend argument is not NULL, *pend is | 
 | 19604 |   set to NULL. | 
 | 19605 |  | 
 | 19606 | - PyObject_GetAttr() and PyObject_SetAttr() now accept Unicode objects | 
 | 19607 |   for the attribute name.  See note on getattr() above. | 
 | 19608 |  | 
 | 19609 | - A few bug fixes to argument processing for Unicode. | 
 | 19610 |   PyArg_ParseTupleAndKeywords() now accepts "es#" and "es". | 
 | 19611 |   PyArg_Parse() special cases "s#" for Unicode objects; it returns a | 
 | 19612 |   pointer to the default encoded string data instead of to the raw | 
 | 19613 |   UTF-16. | 
 | 19614 |  | 
 | 19615 | - Py_BuildValue accepts B format (for bgen-generated code). | 
 | 19616 |  | 
 | 19617 |  | 
 | 19618 | Internals | 
 | 19619 |  | 
 | 19620 | - On Unix, fix code for finding Python installation directory so that | 
 | 19621 |   it works when argv[0] is a relative path. | 
 | 19622 |  | 
 | 19623 | - Added a true unicode_internal_encode() function and fixed the | 
 | 19624 |   unicode_internal_decode function() to support Unicode objects directly | 
 | 19625 |   rather than by generating a copy of the object. | 
 | 19626 |  | 
 | 19627 | - Several of the internal Unicode tables are much smaller now, and | 
 | 19628 |   the source code should be much friendlier to weaker compilers. | 
 | 19629 |  | 
 | 19630 | - In the garbage collector: Fixed bug in collection of tuples.  Fixed | 
 | 19631 |   bug that caused some instances to be removed from the container set | 
 | 19632 |   while they were still live.  Fixed parsing in gc.set_debug() for | 
 | 19633 |   platforms where sizeof(long) > sizeof(int). | 
 | 19634 |  | 
 | 19635 | - Fixed refcount problem in instance deallocation that only occurred | 
 | 19636 |   when Py_REF_DEBUG was defined and Py_TRACE_REFS was not. | 
 | 19637 |  | 
 | 19638 | - On Windows, getpythonregpath is now protected against null data in | 
 | 19639 |   registry key. | 
 | 19640 |  | 
 | 19641 | - On Unix, create .pyc/.pyo files with O_EXCL flag to avoid a race | 
 | 19642 |   condition. | 
 | 19643 |  | 
 | 19644 |  | 
 | 19645 | Build and platform-specific issues | 
 | 19646 |  | 
 | 19647 | - Better support of GNU Pth via --with-pth configure option. | 
 | 19648 |  | 
 | 19649 | - Python/C API now properly exposed to dynamically-loaded extension | 
 | 19650 |   modules on Reliant UNIX. | 
 | 19651 |  | 
 | 19652 | - Changes for the benefit of SunOS 4.1.4 (really!).  mmapmodule.c: | 
 | 19653 |   Don't define MS_SYNC to be zero when it is undefined.  Added missing | 
 | 19654 |   prototypes in posixmodule.c. | 
 | 19655 |  | 
 | 19656 | - Improved support for HP-UX build.  Threads should now be correctly | 
 | 19657 |   configured (on HP-UX 10.20 and 11.00). | 
 | 19658 |  | 
 | 19659 | - Fix largefile support on older NetBSD systems and OpenBSD by adding | 
 | 19660 |   define for TELL64. | 
 | 19661 |  | 
 | 19662 |  | 
 | 19663 | Tools and other miscellany | 
 | 19664 |  | 
 | 19665 | - ftpmirror: Call to main() is wrapped in if __name__ == "__main__". | 
 | 19666 |  | 
 | 19667 | - freeze: The modulefinder now works with 2.0 opcodes. | 
 | 19668 |  | 
 | 19669 | - IDLE: | 
 | 19670 |   Move hackery of sys.argv until after the Tk instance has been | 
 | 19671 |   created, which allows the application-specific Tkinter | 
 | 19672 |   initialization to be executed if present; also pass an explicit | 
 | 19673 |   className parameter to the Tk() constructor. | 
 | 19674 |  | 
 | 19675 |  | 
 | 19676 | What's new in 2.0 beta 1? | 
 | 19677 | ========================= | 
 | 19678 |  | 
 | 19679 | Source Incompatibilities | 
 | 19680 | ------------------------ | 
 | 19681 |  | 
 | 19682 | None.  Note that 1.6 introduced several incompatibilities with 1.5.2, | 
 | 19683 | such as single-argument append(), connect() and bind(), and changes to | 
 | 19684 | str(long) and repr(float). | 
 | 19685 |  | 
 | 19686 |  | 
 | 19687 | Binary Incompatibilities | 
 | 19688 | ------------------------ | 
 | 19689 |  | 
 | 19690 | - Third party extensions built for Python 1.5.x or 1.6 cannot be used | 
 | 19691 | with Python 2.0; these extensions will have to be rebuilt for Python | 
 | 19692 | 2.0. | 
 | 19693 |  | 
 | 19694 | - On Windows, attempting to import a third party extension built for | 
 | 19695 | Python 1.5.x or 1.6 results in an immediate crash; there's not much we | 
 | 19696 | can do about this.  Check your PYTHONPATH environment variable! | 
 | 19697 |  | 
 | 19698 | - Python bytecode files (*.pyc and *.pyo) are not compatible between | 
 | 19699 | releases. | 
 | 19700 |  | 
 | 19701 |  | 
 | 19702 | Overview of Changes Since 1.6 | 
 | 19703 | ----------------------------- | 
 | 19704 |  | 
 | 19705 | There are many new modules (including brand new XML support through | 
 | 19706 | the xml package, and i18n support through the gettext module); a list | 
 | 19707 | of all new modules is included below.  Lots of bugs have been fixed. | 
 | 19708 |  | 
 | 19709 | The process for making major new changes to the language has changed | 
 | 19710 | since Python 1.6.  Enhancements must now be documented by a Python | 
 | 19711 | Enhancement Proposal (PEP) before they can be accepted. | 
 | 19712 |  | 
 | 19713 | There are several important syntax enhancements, described in more | 
 | 19714 | detail below: | 
 | 19715 |  | 
 | 19716 |   - Augmented assignment, e.g. x += 1 | 
 | 19717 |  | 
 | 19718 |   - List comprehensions, e.g. [x**2 for x in range(10)] | 
 | 19719 |  | 
 | 19720 |   - Extended import statement, e.g. import Module as Name | 
 | 19721 |  | 
 | 19722 |   - Extended print statement, e.g. print >> file, "Hello" | 
 | 19723 |  | 
 | 19724 | Other important changes: | 
 | 19725 |  | 
 | 19726 |   - Optional collection of cyclical garbage | 
 | 19727 |  | 
 | 19728 | Python Enhancement Proposal (PEP) | 
 | 19729 | --------------------------------- | 
 | 19730 |  | 
 | 19731 | PEP stands for Python Enhancement Proposal.  A PEP is a design | 
 | 19732 | document providing information to the Python community, or describing | 
 | 19733 | a new feature for Python.  The PEP should provide a concise technical | 
 | 19734 | specification of the feature and a rationale for the feature. | 
 | 19735 |  | 
 | 19736 | We intend PEPs to be the primary mechanisms for proposing new | 
 | 19737 | features, for collecting community input on an issue, and for | 
 | 19738 | documenting the design decisions that have gone into Python.  The PEP | 
 | 19739 | author is responsible for building consensus within the community and | 
 | 19740 | documenting dissenting opinions. | 
 | 19741 |  | 
 | 19742 | The PEPs are available at http://python.sourceforge.net/peps/. | 
 | 19743 |  | 
 | 19744 | Augmented Assignment | 
 | 19745 | -------------------- | 
 | 19746 |  | 
 | 19747 | This must have been the most-requested feature of the past years! | 
 | 19748 | Eleven new assignment operators were added: | 
 | 19749 |  | 
 | 19750 |     += -= *= /= %= **= <<= >>= &= ^= |= | 
 | 19751 |  | 
 | 19752 | For example, | 
 | 19753 |  | 
 | 19754 |     A += B | 
 | 19755 |  | 
 | 19756 | is similar to | 
 | 19757 |  | 
 | 19758 |     A = A + B | 
 | 19759 |  | 
 | 19760 | except that A is evaluated only once (relevant when A is something | 
 | 19761 | like dict[index].attr). | 
 | 19762 |  | 
 | 19763 | However, if A is a mutable object, A may be modified in place.  Thus, | 
 | 19764 | if A is a number or a string, A += B has the same effect as A = A+B | 
 | 19765 | (except A is only evaluated once); but if a is a list, A += B has the | 
 | 19766 | same effect as A.extend(B)! | 
 | 19767 |  | 
 | 19768 | Classes and built-in object types can override the new operators in | 
 | 19769 | order to implement the in-place behavior; the not-in-place behavior is | 
 | 19770 | used automatically as a fallback when an object doesn't implement the | 
 | 19771 | in-place behavior.  For classes, the method name is derived from the | 
 | 19772 | method name for the corresponding not-in-place operator by inserting | 
 | 19773 | an 'i' in front of the name, e.g. __iadd__ implements in-place | 
 | 19774 | __add__. | 
 | 19775 |  | 
 | 19776 | Augmented assignment was implemented by Thomas Wouters. | 
 | 19777 |  | 
 | 19778 |  | 
 | 19779 | List Comprehensions | 
 | 19780 | ------------------- | 
 | 19781 |  | 
 | 19782 | This is a flexible new notation for lists whose elements are computed | 
 | 19783 | from another list (or lists).  The simplest form is: | 
 | 19784 |  | 
 | 19785 |     [<expression> for <variable> in <sequence>] | 
 | 19786 |  | 
 | 19787 | For example, [i**2 for i in range(4)] yields the list [0, 1, 4, 9]. | 
 | 19788 | This is more efficient than a for loop with a list.append() call. | 
 | 19789 |  | 
 | 19790 | You can also add a condition: | 
 | 19791 |  | 
 | 19792 |     [<expression> for <variable> in <sequence> if <condition>] | 
 | 19793 |  | 
 | 19794 | For example, [w for w in words if w == w.lower()] would yield the list | 
 | 19795 | of words that contain no uppercase characters.  This is more efficient | 
 | 19796 | than a for loop with an if statement and a list.append() call. | 
 | 19797 |  | 
 | 19798 | You can also have nested for loops and more than one 'if' clause.  For | 
 | 19799 | example, here's a function that flattens a sequence of sequences:: | 
 | 19800 |  | 
 | 19801 |     def flatten(seq): | 
 | 19802 |         return [x for subseq in seq for x in subseq] | 
 | 19803 |  | 
 | 19804 |     flatten([[0], [1,2,3], [4,5], [6,7,8,9], []]) | 
 | 19805 |  | 
 | 19806 | This prints | 
 | 19807 |  | 
 | 19808 |     [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | 
 | 19809 |  | 
 | 19810 | List comprehensions originated as a patch set from Greg Ewing; Skip | 
 | 19811 | Montanaro and Thomas Wouters also contributed.  Described by PEP 202. | 
 | 19812 |  | 
 | 19813 |  | 
 | 19814 | Extended Import Statement | 
 | 19815 | ------------------------- | 
 | 19816 |  | 
 | 19817 | Many people have asked for a way to import a module under a different | 
 | 19818 | name.  This can be accomplished like this: | 
 | 19819 |  | 
 | 19820 |     import foo | 
 | 19821 |     bar = foo | 
 | 19822 |     del foo | 
 | 19823 |  | 
 | 19824 | but this common idiom gets old quickly.  A simple extension of the | 
 | 19825 | import statement now allows this to be written as follows: | 
 | 19826 |  | 
 | 19827 |     import foo as bar | 
 | 19828 |  | 
 | 19829 | There's also a variant for 'from ... import': | 
 | 19830 |  | 
 | 19831 |     from foo import bar as spam | 
 | 19832 |  | 
 | 19833 | This also works with packages; e.g. you can write this: | 
 | 19834 |  | 
 | 19835 |     import test.regrtest as regrtest | 
 | 19836 |  | 
 | 19837 | Note that 'as' is not a new keyword -- it is recognized only in this | 
 | 19838 | context (this is only possible because the syntax for the import | 
 | 19839 | statement doesn't involve expressions). | 
 | 19840 |  | 
 | 19841 | Implemented by Thomas Wouters.  Described by PEP 221. | 
 | 19842 |  | 
 | 19843 |  | 
 | 19844 | Extended Print Statement | 
 | 19845 | ------------------------ | 
 | 19846 |  | 
 | 19847 | Easily the most controversial new feature, this extension to the print | 
 | 19848 | statement adds an option to make the output go to a different file | 
 | 19849 | than the default sys.stdout. | 
 | 19850 |  | 
 | 19851 | For example, to write an error message to sys.stderr, you can now | 
 | 19852 | write: | 
 | 19853 |  | 
 | 19854 |     print >> sys.stderr, "Error: bad dog!" | 
 | 19855 |  | 
 | 19856 | As a special feature, if the expression used to indicate the file | 
 | 19857 | evaluates to None, the current value of sys.stdout is used.  Thus: | 
 | 19858 |  | 
 | 19859 |     print >> None, "Hello world" | 
 | 19860 |  | 
 | 19861 | is equivalent to | 
 | 19862 |  | 
 | 19863 |     print "Hello world" | 
 | 19864 |  | 
 | 19865 | Design and implementation by Barry Warsaw.  Described by PEP 214. | 
 | 19866 |  | 
 | 19867 |  | 
 | 19868 | Optional Collection of Cyclical Garbage | 
 | 19869 | --------------------------------------- | 
 | 19870 |  | 
 | 19871 | Python is now equipped with a garbage collector that can hunt down | 
 | 19872 | cyclical references between Python objects.  It's no replacement for | 
 | 19873 | reference counting; in fact, it depends on the reference counts being | 
 | 19874 | correct, and decides that a set of objects belong to a cycle if all | 
 | 19875 | their reference counts can be accounted for from their references to | 
 | 19876 | each other.  This devious scheme was first proposed by Eric Tiedemann, | 
 | 19877 | and brought to implementation by Neil Schemenauer. | 
 | 19878 |  | 
 | 19879 | There's a module "gc" that lets you control some parameters of the | 
 | 19880 | garbage collection.  There's also an option to the configure script | 
 | 19881 | that lets you enable or disable the garbage collection.  In 2.0b1, | 
 | 19882 | it's on by default, so that we (hopefully) can collect decent user | 
 | 19883 | experience with this new feature.  There are some questions about its | 
 | 19884 | performance.  If it proves to be too much of a problem, we'll turn it | 
 | 19885 | off by default in the final 2.0 release. | 
 | 19886 |  | 
 | 19887 |  | 
 | 19888 | Smaller Changes | 
 | 19889 | --------------- | 
 | 19890 |  | 
 | 19891 | A new function zip() was added.  zip(seq1, seq2, ...) is equivalent to | 
 | 19892 | map(None, seq1, seq2, ...) when the sequences have the same length; | 
 | 19893 | i.e. zip([1,2,3], [10,20,30]) returns [(1,10), (2,20), (3,30)].  When | 
 | 19894 | the lists are not all the same length, the shortest list wins: | 
 | 19895 | zip([1,2,3], [10,20]) returns [(1,10), (2,20)].  See PEP 201. | 
 | 19896 |  | 
 | 19897 | sys.version_info is a tuple (major, minor, micro, level, serial). | 
 | 19898 |  | 
 | 19899 | Dictionaries have an odd new method, setdefault(key, default). | 
 | 19900 | dict.setdefault(key, default) returns dict[key] if it exists; if not, | 
 | 19901 | it sets dict[key] to default and returns that value.  Thus: | 
 | 19902 |  | 
 | 19903 |     dict.setdefault(key, []).append(item) | 
 | 19904 |  | 
 | 19905 | does the same work as this common idiom: | 
 | 19906 |  | 
 | 19907 |     if not dict.has_key(key): | 
 | 19908 |         dict[key] = [] | 
 | 19909 |     dict[key].append(item) | 
 | 19910 |  | 
 | 19911 | There are two new variants of SyntaxError that are raised for | 
 | 19912 | indentation-related errors: IndentationError and TabError. | 
 | 19913 |  | 
 | 19914 | Changed \x to consume exactly two hex digits; see PEP 223.  Added \U | 
 | 19915 | escape that consumes exactly eight hex digits. | 
 | 19916 |  | 
 | 19917 | The limits on the size of expressions and file in Python source code | 
 | 19918 | have been raised from 2**16 to 2**32.  Previous versions of Python | 
 | 19919 | were limited because the maximum argument size the Python VM accepted | 
 | 19920 | was 2**16.  This limited the size of object constructor expressions, | 
 | 19921 | e.g. [1,2,3] or {'a':1, 'b':2}, and the size of source files.  This | 
 | 19922 | limit was raised thanks to a patch by Charles Waldman that effectively | 
 | 19923 | fixes the problem.  It is now much more likely that you will be | 
 | 19924 | limited by available memory than by an arbitrary limit in Python. | 
 | 19925 |  | 
 | 19926 | The interpreter's maximum recursion depth can be modified by Python | 
 | 19927 | programs using sys.getrecursionlimit and sys.setrecursionlimit.  This | 
 | 19928 | limit is the maximum number of recursive calls that can be made by | 
 | 19929 | Python code.  The limit exists to prevent infinite recursion from | 
 | 19930 | overflowing the C stack and causing a core dump.  The default value is | 
 | 19931 | 1000.  The maximum safe value for a particular platform can be found | 
| Georg Brandl | 93d15cd | 2009-10-11 21:24:34 +0000 | [diff] [blame] | 19932 | by running Tools/scripts/find_recursionlimit.py. | 
| Skip Montanaro | 4cb2204 | 2002-09-17 20:55:31 +0000 | [diff] [blame] | 19933 |  | 
 | 19934 | New Modules and Packages | 
 | 19935 | ------------------------ | 
 | 19936 |  | 
 | 19937 | atexit - for registering functions to be called when Python exits. | 
 | 19938 |  | 
 | 19939 | imputil - Greg Stein's alternative API for writing custom import | 
 | 19940 | hooks. | 
 | 19941 |  | 
 | 19942 | pyexpat - an interface to the Expat XML parser, contributed by Paul | 
 | 19943 | Prescod. | 
 | 19944 |  | 
 | 19945 | xml - a new package with XML support code organized (so far) in three | 
 | 19946 | subpackages: xml.dom, xml.sax, and xml.parsers.  Describing these | 
 | 19947 | would fill a volume.  There's a special feature whereby a | 
 | 19948 | user-installed package named _xmlplus overrides the standard | 
 | 19949 | xmlpackage; this is intended to give the XML SIG a hook to distribute | 
 | 19950 | backwards-compatible updates to the standard xml package. | 
 | 19951 |  | 
 | 19952 | webbrowser - a platform-independent API to launch a web browser. | 
 | 19953 |  | 
 | 19954 |  | 
 | 19955 | Changed Modules | 
 | 19956 | --------------- | 
 | 19957 |  | 
 | 19958 | array -- new methods for array objects: count, extend, index, pop, and | 
 | 19959 | remove | 
 | 19960 |  | 
 | 19961 | binascii -- new functions b2a_hex and a2b_hex that convert between | 
 | 19962 | binary data and its hex representation | 
 | 19963 |  | 
 | 19964 | calendar -- Many new functions that support features including control | 
 | 19965 | over which day of the week is the first day, returning strings instead | 
 | 19966 | of printing them.  Also new symbolic constants for days of week, | 
 | 19967 | e.g. MONDAY, ..., SUNDAY. | 
 | 19968 |  | 
 | 19969 | cgi -- FieldStorage objects have a getvalue method that works like a | 
 | 19970 | dictionary's get method and returns the value attribute of the object. | 
 | 19971 |  | 
 | 19972 | ConfigParser -- The parser object has new methods has_option, | 
 | 19973 | remove_section, remove_option, set, and write.  They allow the module | 
 | 19974 | to be used for writing config files as well as reading them. | 
 | 19975 |  | 
 | 19976 | ftplib -- ntransfercmd(), transfercmd(), and retrbinary() all now | 
 | 19977 | optionally support the RFC 959 REST command. | 
 | 19978 |  | 
 | 19979 | gzip -- readline and readlines now accept optional size arguments | 
 | 19980 |  | 
 | 19981 | httplib -- New interfaces and support for HTTP/1.1 by Greg Stein.  See | 
 | 19982 | the module doc strings for details. | 
 | 19983 |  | 
 | 19984 | locale -- implement getdefaultlocale for Win32 and Macintosh | 
 | 19985 |  | 
 | 19986 | marshal -- no longer dumps core when marshaling deeply nested or | 
 | 19987 | recursive data structures | 
 | 19988 |  | 
 | 19989 | os -- new functions isatty, seteuid, setegid, setreuid, setregid | 
 | 19990 |  | 
 | 19991 | os/popen2 -- popen2/popen3/popen4 support under Windows.  popen2/popen3 | 
 | 19992 | support under Unix. | 
 | 19993 |  | 
 | 19994 | os/pty -- support for openpty and forkpty | 
 | 19995 |  | 
 | 19996 | os.path -- fix semantics of os.path.commonprefix | 
 | 19997 |  | 
 | 19998 | smtplib -- support for sending very long messages | 
 | 19999 |  | 
 | 20000 | socket -- new function getfqdn() | 
 | 20001 |  | 
 | 20002 | readline -- new functions to read, write and truncate history files. | 
 | 20003 | The readline section of the library reference manual contains an | 
 | 20004 | example. | 
 | 20005 |  | 
 | 20006 | select -- add interface to poll system call | 
 | 20007 |  | 
 | 20008 | shutil -- new copyfileobj function | 
 | 20009 |  | 
 | 20010 | SimpleHTTPServer, CGIHTTPServer -- Fix problems with buffering in the | 
 | 20011 | HTTP server. | 
 | 20012 |  | 
 | 20013 | Tkinter -- optimization of function flatten | 
 | 20014 |  | 
 | 20015 | urllib -- scans environment variables for proxy configuration, | 
 | 20016 | e.g. http_proxy. | 
 | 20017 |  | 
 | 20018 | whichdb -- recognizes dumbdbm format | 
 | 20019 |  | 
 | 20020 |  | 
 | 20021 | Obsolete Modules | 
 | 20022 | ---------------- | 
 | 20023 |  | 
 | 20024 | None.  However note that 1.6 made a whole slew of modules obsolete: | 
 | 20025 | stdwin, soundex, cml, cmpcache, dircache, dump, find, grep, packmail, | 
 | 20026 | poly, zmod, strop, util, whatsound. | 
 | 20027 |  | 
 | 20028 |  | 
 | 20029 | Changed, New, Obsolete Tools | 
 | 20030 | ---------------------------- | 
 | 20031 |  | 
 | 20032 | None. | 
 | 20033 |  | 
 | 20034 |  | 
 | 20035 | C-level Changes | 
 | 20036 | --------------- | 
 | 20037 |  | 
 | 20038 | Several cleanup jobs were carried out throughout the source code. | 
 | 20039 |  | 
 | 20040 | All C code was converted to ANSI C; we got rid of all uses of the | 
 | 20041 | Py_PROTO() macro, which makes the header files a lot more readable. | 
 | 20042 |  | 
 | 20043 | Most of the portability hacks were moved to a new header file, | 
 | 20044 | pyport.h; several other new header files were added and some old | 
 | 20045 | header files were removed, in an attempt to create a more rational set | 
 | 20046 | of header files.  (Few of these ever need to be included explicitly; | 
 | 20047 | they are all included by Python.h.) | 
 | 20048 |  | 
 | 20049 | Trent Mick ensured portability to 64-bit platforms, under both Linux | 
 | 20050 | and Win64, especially for the new Intel Itanium processor.  Mick also | 
 | 20051 | added large file support for Linux64 and Win64. | 
 | 20052 |  | 
 | 20053 | The C APIs to return an object's size have been update to consistently | 
 | 20054 | use the form PyXXX_Size, e.g. PySequence_Size and PyDict_Size.  In | 
 | 20055 | previous versions, the abstract interfaces used PyXXX_Length and the | 
 | 20056 | concrete interfaces used PyXXX_Size.  The old names, | 
 | 20057 | e.g. PyObject_Length, are still available for backwards compatibility | 
 | 20058 | at the API level, but are deprecated. | 
 | 20059 |  | 
 | 20060 | The PyOS_CheckStack function has been implemented on Windows by | 
 | 20061 | Fredrik Lundh.  It prevents Python from failing with a stack overflow | 
 | 20062 | on Windows. | 
 | 20063 |  | 
 | 20064 | The GC changes resulted in creation of two new slots on object, | 
 | 20065 | tp_traverse and tp_clear.  The augmented assignment changes result in | 
 | 20066 | the creation of a new slot for each in-place operator. | 
 | 20067 |  | 
 | 20068 | The GC API creates new requirements for container types implemented in | 
 | 20069 | C extension modules.  See Include/objimpl.h for details. | 
 | 20070 |  | 
 | 20071 | PyErr_Format has been updated to automatically calculate the size of | 
 | 20072 | the buffer needed to hold the formatted result string.  This change | 
 | 20073 | prevents crashes caused by programmer error. | 
 | 20074 |  | 
 | 20075 | New C API calls: PyObject_AsFileDescriptor, PyErr_WriteUnraisable. | 
 | 20076 |  | 
 | 20077 | PyRun_AnyFileEx, PyRun_SimpleFileEx, PyRun_FileEx -- New functions | 
 | 20078 | that are the same as their non-Ex counterparts except they take an | 
 | 20079 | extra flag argument that tells them to close the file when done. | 
 | 20080 |  | 
 | 20081 | XXX There were other API changes that should be fleshed out here. | 
 | 20082 |  | 
 | 20083 |  | 
 | 20084 | Windows Changes | 
 | 20085 | --------------- | 
 | 20086 |  | 
 | 20087 | New popen2/popen3/peopen4 in os module (see Changed Modules above). | 
 | 20088 |  | 
 | 20089 | os.popen is much more usable on Windows 95 and 98.  See Microsoft | 
 | 20090 | Knowledge Base article Q150956.  The Win9x workaround described there | 
 | 20091 | is implemented by the new w9xpopen.exe helper in the root of your | 
 | 20092 | Python installation.  Note that Python uses this internally; it is not | 
 | 20093 | a standalone program. | 
 | 20094 |  | 
 | 20095 | Administrator privileges are no longer required to install Python | 
 | 20096 | on Windows NT or Windows 2000.  If you have administrator privileges, | 
 | 20097 | Python's registry info will be written under HKEY_LOCAL_MACHINE. | 
 | 20098 | Otherwise the installer backs off to writing Python's registry info | 
 | 20099 | under HKEY_CURRENT_USER.  The latter is sufficient for all "normal" | 
 | 20100 | uses of Python, but will prevent some advanced uses from working | 
 | 20101 | (for example, running a Python script as an NT service, or possibly | 
 | 20102 | from CGI). | 
 | 20103 |  | 
 | 20104 | [This was new in 1.6] The installer no longer runs a separate Tcl/Tk | 
 | 20105 | installer; instead, it installs the needed Tcl/Tk files directly in the | 
 | 20106 | Python directory.  If you already have a Tcl/Tk installation, this | 
 | 20107 | wastes some disk space (about 4 Megs) but avoids problems with | 
 | 20108 | conflicting Tcl/Tk installations, and makes it much easier for Python | 
 | 20109 | to ensure that Tcl/Tk can find all its files. | 
 | 20110 |  | 
 | 20111 | [This was new in 1.6] The Windows installer now installs by default in | 
 | 20112 | \Python20\ on the default volume, instead of \Program Files\Python-2.0\. | 
 | 20113 |  | 
 | 20114 |  | 
 | 20115 | Updates to the changes between 1.5.2 and 1.6 | 
 | 20116 | -------------------------------------------- | 
 | 20117 |  | 
 | 20118 | The 1.6 NEWS file can't be changed after the release is done, so here | 
 | 20119 | is some late-breaking news: | 
 | 20120 |  | 
 | 20121 | New APIs in locale.py: normalize(), getdefaultlocale(), resetlocale(), | 
 | 20122 | and changes to getlocale() and setlocale(). | 
 | 20123 |  | 
 | 20124 | The new module is now enabled per default. | 
 | 20125 |  | 
 | 20126 | It is not true that the encodings codecs cannot be used for normal | 
 | 20127 | strings: the string.encode() (which is also present on 8-bit strings | 
 | 20128 | !) allows using them for 8-bit strings too, e.g. to convert files from | 
 | 20129 | cp1252 (Windows) to latin-1 or vice-versa. | 
 | 20130 |  | 
 | 20131 | Japanese codecs are available from Tamito KAJIYAMA: | 
 | 20132 | http://pseudo.grad.sccs.chukyo-u.ac.jp/~kajiyama/python/ | 
 | 20133 |  | 
 | 20134 |  | 
 | 20135 | ====================================================================== | 
 | 20136 |  | 
 | 20137 |  | 
| Guido van Rossum | f2eac99 | 2000-09-04 17:24:24 +0000 | [diff] [blame] | 20138 | ======================================= | 
 | 20139 | ==> Release 1.6 (September 5, 2000) <== | 
 | 20140 | ======================================= | 
 | 20141 |  | 
| Guido van Rossum | a598c93 | 2000-09-04 16:26:03 +0000 | [diff] [blame] | 20142 | What's new in release 1.6? | 
 | 20143 | ========================== | 
 | 20144 |  | 
 | 20145 | Below is a list of all relevant changes since release 1.5.2. | 
 | 20146 |  | 
 | 20147 |  | 
 | 20148 | Source Incompatibilities | 
 | 20149 | ------------------------ | 
 | 20150 |  | 
 | 20151 | Several small incompatible library changes may trip you up: | 
 | 20152 |  | 
 | 20153 |   - The append() method for lists can no longer be invoked with more | 
 | 20154 |   than one argument.  This used to append a single tuple made out of | 
 | 20155 |   all arguments, but was undocumented.  To append a tuple, use | 
 | 20156 |   e.g. l.append((a, b, c)). | 
 | 20157 |  | 
 | 20158 |   - The connect(), connect_ex() and bind() methods for sockets require | 
 | 20159 |   exactly one argument.  Previously, you could call s.connect(host, | 
 | 20160 |   port), but this was undocumented. You must now write | 
 | 20161 |   s.connect((host, port)). | 
 | 20162 |  | 
 | 20163 |   - The str() and repr() functions are now different more often.  For | 
 | 20164 |   long integers, str() no longer appends a 'L'.  Thus, str(1L) == '1', | 
 | 20165 |   which used to be '1L'; repr(1L) is unchanged and still returns '1L'. | 
 | 20166 |   For floats, repr() now gives 17 digits of precision, to ensure no | 
 | 20167 |   precision is lost (on all current hardware). | 
 | 20168 |  | 
 | 20169 |   - The -X option is gone.  Built-in exceptions are now always | 
 | 20170 |   classes.  Many more library modules also have been converted to | 
 | 20171 |   class-based exceptions. | 
 | 20172 |  | 
 | 20173 |  | 
 | 20174 | Binary Incompatibilities | 
 | 20175 | ------------------------ | 
 | 20176 |  | 
 | 20177 | - Third party extensions built for Python 1.5.x cannot be used with | 
 | 20178 | Python 1.6; these extensions will have to be rebuilt for Python 1.6. | 
 | 20179 |  | 
 | 20180 | - On Windows, attempting to import a third party extension built for | 
 | 20181 | Python 1.5.x results in an immediate crash; there's not much we can do | 
 | 20182 | about this.  Check your PYTHONPATH environment variable! | 
 | 20183 |  | 
 | 20184 |  | 
 | 20185 | Overview of Changes since 1.5.2 | 
 | 20186 | ------------------------------- | 
 | 20187 |  | 
 | 20188 | For this overview, I have borrowed from the document "What's New in | 
 | 20189 | Python 2.0" by Andrew Kuchling and Moshe Zadka: | 
| Andrew M. Kuchling | e240d9b | 2004-03-21 18:48:22 +0000 | [diff] [blame] | 20190 | http://www.amk.ca/python/2.0/ . | 
| Guido van Rossum | a598c93 | 2000-09-04 16:26:03 +0000 | [diff] [blame] | 20191 |  | 
 | 20192 | There are lots of new modules and lots of bugs have been fixed.  A | 
 | 20193 | list of all new modules is included below. | 
 | 20194 |  | 
 | 20195 | Probably the most pervasive change is the addition of Unicode support. | 
 | 20196 | We've added a new fundamental datatype, the Unicode string, a new | 
 | 20197 | build-in function unicode(), an numerous C APIs to deal with Unicode | 
 | 20198 | and encodings.  See the file Misc/unicode.txt for details, or | 
 | 20199 | http://starship.python.net/crew/lemburg/unicode-proposal.txt. | 
 | 20200 |  | 
 | 20201 | Two other big changes, related to the Unicode support, are the | 
 | 20202 | addition of string methods and (yet another) new regular expression | 
 | 20203 | engine. | 
 | 20204 |  | 
 | 20205 |   - String methods mean that you can now say s.lower() etc. instead of | 
 | 20206 |   importing the string module and saying string.lower(s) etc.  One | 
 | 20207 |   peculiarity is that the equivalent of string.join(sequence, | 
 | 20208 |   delimiter) is delimiter.join(sequence).  Use " ".join(sequence) for | 
 | 20209 |   the effect of string.join(sequence); to make this more readable, try | 
 | 20210 |   space=" " first.  Note that the maxsplit argument defaults in | 
 | 20211 |   split() and replace() have changed from 0 to -1. | 
 | 20212 |  | 
 | 20213 |   - The new regular expression engine, SRE by Fredrik Lundh, is fully | 
 | 20214 |   backwards compatible with the old engine, and is in fact invoked | 
 | 20215 |   using the same interface (the "re" module).  You can explicitly | 
 | 20216 |   invoke the old engine by import pre, or the SRE engine by importing | 
 | 20217 |   sre.  SRE is faster than pre, and supports Unicode (which was the | 
 | 20218 |   main reason to put effort in yet another new regular expression | 
 | 20219 |   engine -- this is at least the fourth!). | 
 | 20220 |  | 
 | 20221 |  | 
 | 20222 | Other Changes | 
 | 20223 | ------------- | 
 | 20224 |  | 
 | 20225 | Other changes that won't break code but are nice to know about: | 
 | 20226 |  | 
 | 20227 | Deleting objects is now safe even for deeply nested data structures. | 
 | 20228 |  | 
 | 20229 | Long/int unifications: long integers can be used in seek() calls, as | 
 | 20230 | slice indexes. | 
 | 20231 |  | 
 | 20232 | String formatting (s % args) has a new formatting option, '%r', which | 
 | 20233 | acts like '%s' but inserts repr(arg) instead of str(arg). (Not yet in | 
 | 20234 | alpha 1.) | 
 | 20235 |  | 
 | 20236 | Greg Ward's "distutils" package is included: this will make | 
 | 20237 | installing, building and distributing third party packages much | 
 | 20238 | simpler. | 
 | 20239 |  | 
 | 20240 | There's now special syntax that you can use instead of the apply() | 
 | 20241 | function.  f(*args, **kwds) is equivalent to apply(f, args, kwds). | 
 | 20242 | You can also use variations f(a1, a2, *args, **kwds) and you can leave | 
 | 20243 | one or the other out: f(*args), f(**kwds). | 
 | 20244 |  | 
 | 20245 | The built-ins int() and long() take an optional second argument to | 
 | 20246 | indicate the conversion base -- of course only if the first argument | 
 | 20247 | is a string.  This makes string.atoi() and string.atol() obsolete. | 
 | 20248 | (string.atof() was already obsolete). | 
 | 20249 |  | 
 | 20250 | When a local variable is known to the compiler but undefined when | 
 | 20251 | used, a new exception UnboundLocalError is raised.  This is a class | 
 | 20252 | derived from NameError so code catching NameError should still work. | 
 | 20253 | The purpose is to provide better diagnostics in the following example: | 
 | 20254 |   x = 1 | 
 | 20255 |   def f(): | 
 | 20256 |       print x | 
 | 20257 |       x = x+1 | 
 | 20258 | This used to raise a NameError on the print statement, which confused | 
 | 20259 | even experienced Python programmers (especially if there are several | 
 | 20260 | hundreds of lines of code between the reference and the assignment to | 
 | 20261 | x :-). | 
 | 20262 |  | 
 | 20263 | You can now override the 'in' operator by defining a __contains__ | 
 | 20264 | method.  Note that it has its arguments backwards: x in a causes | 
 | 20265 | a.__contains__(x) to be called.  That's why the name isn't __in__. | 
 | 20266 |  | 
 | 20267 | The exception AttributeError will have a more friendly error message, | 
 | 20268 | e.g.: <code>'Spam' instance has no attribute 'eggs'</code>.  This may | 
 | 20269 | <b>break code</b> that expects the message to be exactly the attribute | 
 | 20270 | name. | 
 | 20271 |  | 
 | 20272 |  | 
 | 20273 | New Modules in 1.6 | 
 | 20274 | ------------------ | 
 | 20275 |  | 
 | 20276 | UserString - base class for deriving from the string type. | 
 | 20277 |  | 
 | 20278 | distutils - tools for distributing Python modules. | 
 | 20279 |  | 
 | 20280 | robotparser - parse a robots.txt file, for writing web spiders. | 
 | 20281 | (Moved from Tools/webchecker/.) | 
 | 20282 |  | 
 | 20283 | linuxaudiodev - audio for Linux. | 
 | 20284 |  | 
 | 20285 | mmap - treat a file as a memory buffer.  (Windows and Unix.) | 
 | 20286 |  | 
 | 20287 | sre - regular expressions (fast, supports unicode).  Currently, this | 
 | 20288 | code is very rough.  Eventually, the re module will be reimplemented | 
 | 20289 | using sre (without changes to the re API). | 
 | 20290 |  | 
 | 20291 | filecmp - supersedes the old cmp.py and dircmp.py modules. | 
 | 20292 |  | 
 | 20293 | tabnanny - check Python sources for tab-width dependance.  (Moved from | 
 | 20294 | Tools/scripts/.) | 
 | 20295 |  | 
 | 20296 | urllib2 - new and improved but incompatible version of urllib (still | 
 | 20297 | experimental). | 
 | 20298 |  | 
 | 20299 | zipfile - read and write zip archives. | 
 | 20300 |  | 
 | 20301 | codecs - support for Unicode encoders/decoders. | 
 | 20302 |  | 
 | 20303 | unicodedata - provides access to the Unicode 3.0 database. | 
 | 20304 |  | 
 | 20305 | _winreg - Windows registry access. | 
 | 20306 |  | 
 | 20307 | encodings - package which provides a large set of standard codecs -- | 
 | 20308 | currently only for the new Unicode support. It has a drop-in extension | 
 | 20309 | mechanism which allows you to add new codecs by simply copying them | 
 | 20310 | into the encodings package directory. Asian codec support will | 
 | 20311 | probably be made available as separate distribution package built upon | 
 | 20312 | this technique and the new distutils package. | 
 | 20313 |  | 
 | 20314 |  | 
 | 20315 | Changed Modules | 
 | 20316 | --------------- | 
 | 20317 |  | 
 | 20318 | readline, ConfigParser, cgi, calendar, posix, readline, xmllib, aifc, | 
 | 20319 | chunk, wave, random, shelve, nntplib - minor enhancements. | 
 | 20320 |  | 
 | 20321 | socket, httplib, urllib - optional OpenSSL support (Unix only). | 
 | 20322 |  | 
 | 20323 | _tkinter - support for 8.0 up to 8.3.  Support for versions older than | 
 | 20324 | 8.0 has been dropped. | 
 | 20325 |  | 
 | 20326 | string - most of this module is deprecated now that strings have | 
 | 20327 | methods.  This no longer uses the built-in strop module, but takes | 
 | 20328 | advantage of the new string methods to provide transparent support for | 
 | 20329 | both Unicode and ordinary strings. | 
 | 20330 |  | 
 | 20331 |  | 
 | 20332 | Changes on Windows | 
 | 20333 | ------------------ | 
 | 20334 |  | 
 | 20335 | The installer no longer runs a separate Tcl/Tk installer; instead, it | 
 | 20336 | installs the needed Tcl/Tk files directly in the Python directory.  If | 
 | 20337 | you already have a Tcl/Tk installation, this wastes some disk space | 
 | 20338 | (about 4 Megs) but avoids problems with conflincting Tcl/Tk | 
 | 20339 | installations, and makes it much easier for Python to ensure that | 
 | 20340 | Tcl/Tk can find all its files.  Note: the alpha installers don't | 
 | 20341 | include the documentation. | 
 | 20342 |  | 
 | 20343 | The Windows installer now installs by default in \Python16\ on the | 
 | 20344 | default volume, instead of \Program Files\Python-1.6\. | 
 | 20345 |  | 
 | 20346 |  | 
 | 20347 | Changed Tools | 
 | 20348 | ------------- | 
 | 20349 |  | 
 | 20350 | IDLE - complete overhaul.  See the <a href="../idle/">IDLE home | 
 | 20351 | page</a> for more information.  (Python 1.6 alpha 1 will come with | 
 | 20352 | IDLE 0.6.) | 
 | 20353 |  | 
 | 20354 | Tools/i18n/pygettext.py - Python equivalent of xgettext(1).  A message | 
 | 20355 | text extraction tool used for internationalizing applications written | 
 | 20356 | in Python. | 
 | 20357 |  | 
 | 20358 |  | 
 | 20359 | Obsolete Modules | 
 | 20360 | ---------------- | 
 | 20361 |  | 
 | 20362 | stdwin and everything that uses it.  (Get Python 1.5.2 if you need | 
 | 20363 | it. :-) | 
 | 20364 |  | 
 | 20365 | soundex.  (Skip Montanaro has a version in Python but it won't be | 
 | 20366 | included in the Python release.) | 
 | 20367 |  | 
 | 20368 | cmp, cmpcache, dircmp.  (Replaced by filecmp.) | 
 | 20369 |  | 
 | 20370 | dump.  (Use pickle.) | 
 | 20371 |  | 
 | 20372 | find.  (Easily coded using os.walk().) | 
 | 20373 |  | 
 | 20374 | grep.  (Not very useful as a library module.) | 
 | 20375 |  | 
 | 20376 | packmail.  (No longer has any use.) | 
 | 20377 |  | 
 | 20378 | poly, zmod.  (These were poor examples at best.) | 
 | 20379 |  | 
 | 20380 | strop.  (No longer needed by the string module.) | 
 | 20381 |  | 
 | 20382 | util.  (This functionality was long ago built in elsewhere). | 
 | 20383 |  | 
 | 20384 | whatsound.  (Use sndhdr.) | 
 | 20385 |  | 
 | 20386 |  | 
 | 20387 | Detailed Changes from 1.6b1 to 1.6 | 
 | 20388 | ---------------------------------- | 
 | 20389 |  | 
 | 20390 | - Slight changes to the CNRI license.  A copyright notice has been | 
 | 20391 | added; the requirement to indicate the nature of modifications now | 
 | 20392 | applies when making a derivative work available "to others" instead of | 
 | 20393 | just "to the public"; the version and date are updated.  The new | 
 | 20394 | license has a new handle. | 
 | 20395 |  | 
 | 20396 | - Added the Tools/compiler package.  This is a project led by Jeremy | 
 | 20397 | Hylton to write the Python bytecode generator in Python. | 
 | 20398 |  | 
 | 20399 | - The function math.rint() is removed. | 
 | 20400 |  | 
 | 20401 | - In Python.h, "#define _GNU_SOURCE 1" was added. | 
 | 20402 |  | 
 | 20403 | - Version 0.9.1 of Greg Ward's distutils is included (instead of | 
 | 20404 | version 0.9). | 
 | 20405 |  | 
 | 20406 | - A new version of SRE is included.  It is more stable, and more | 
 | 20407 | compatible with the old RE module.  Non-matching ranges are indicated | 
 | 20408 | by -1, not None.  (The documentation said None, but the PRE | 
 | 20409 | implementation used -1; changing to None would break existing code.) | 
 | 20410 |  | 
 | 20411 | - The winreg module has been renamed to _winreg.  (There are plans for | 
 | 20412 | a higher-level API called winreg, but this has not yet materialized in | 
 | 20413 | a form that is acceptable to the experts.) | 
 | 20414 |  | 
 | 20415 | - The _locale module is enabled by default. | 
 | 20416 |  | 
 | 20417 | - Fixed the configuration line for the _curses module. | 
 | 20418 |  | 
 | 20419 | - A few crashes have been fixed, notably <file>.writelines() with a | 
 | 20420 | list containing non-string objects would crash, and there were | 
 | 20421 | situations where a lost SyntaxError could dump core. | 
 | 20422 |  | 
 | 20423 | - The <list>.extend() method now accepts an arbitrary sequence | 
 | 20424 | argument. | 
 | 20425 |  | 
 | 20426 | - If __str__() or __repr__() returns a Unicode object, this is | 
 | 20427 | converted to an 8-bit string. | 
 | 20428 |  | 
 | 20429 | - Unicode string comparisons is no longer aware of UTF-16 | 
 | 20430 | encoding peculiarities; it's a straight 16-bit compare. | 
 | 20431 |  | 
 | 20432 | - The Windows installer now installs the LICENSE file and no longer | 
 | 20433 | registers the Python DLL version in the registry (this is no longer | 
 | 20434 | needed).  It now uses Tcl/Tk 8.3.2. | 
 | 20435 |  | 
 | 20436 | - A few portability problems have been fixed, in particular a | 
 | 20437 | compilation error involving socklen_t. | 
 | 20438 |  | 
 | 20439 | - The PC configuration is slightly friendlier to non-Microsoft | 
 | 20440 | compilers. | 
 | 20441 |  | 
 | 20442 |  | 
 | 20443 | ====================================================================== | 
 | 20444 |  | 
 | 20445 |  | 
| Guido van Rossum | f2eac99 | 2000-09-04 17:24:24 +0000 | [diff] [blame] | 20446 | ====================================== | 
 | 20447 | ==> Release 1.5.2 (April 13, 1999) <== | 
 | 20448 | ====================================== | 
 | 20449 |  | 
| Guido van Rossum | 2001da4 | 2000-09-01 22:26:44 +0000 | [diff] [blame] | 20450 | From 1.5.2c1 to 1.5.2 (final) | 
 | 20451 | ============================= | 
 | 20452 |  | 
 | 20453 | Tue Apr 13 15:44:49 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20454 |  | 
 | 20455 | 	* PCbuild/python15.wse: Bump version to 1.5.2 (final) | 
 | 20456 |  | 
 | 20457 | 	* PCbuild/python15.dsp: Added shamodule.c | 
 | 20458 |  | 
 | 20459 | 	* PC/config.c: Added sha module! | 
 | 20460 |  | 
 | 20461 | 	* README, Include/patchlevel.h: Prepare for final release. | 
 | 20462 |  | 
 | 20463 | 	* Misc/ACKS: | 
 | 20464 | 	More (Cameron Laird is honorary; the others are 1.5.2c1 testers). | 
 | 20465 |  | 
 | 20466 | 	* Python/thread_solaris.h: | 
 | 20467 | 	While I can't really test this thoroughly, Pat Knight and the Solaris | 
 | 20468 | 	man pages suggest that the proper thing to do is to add THR_NEW_LWP to | 
 | 20469 | 	the flags on thr_create(), and that there really isn't a downside, so | 
 | 20470 | 	I'll do that. | 
 | 20471 |  | 
 | 20472 | 	* Misc/ACKS: | 
 | 20473 | 	Bunch of new names who helped iron out the last wrinkles of 1.5.2. | 
 | 20474 |  | 
 | 20475 | 	* PC/python_nt.rc: | 
 | 20476 | 	Bump the myusterious M$ version number from 1,5,2,1 to 1,5,2,3. | 
 | 20477 | 	(I can't even display this on NT, maybe Win/98 can?) | 
 | 20478 |  | 
 | 20479 | 	* Lib/pstats.py: | 
 | 20480 | 	Fix mysterious references to jprofile that were in the source since | 
 | 20481 | 	its creation.  I'm assuming these were once valid references to "Jim | 
 | 20482 | 	Roskind's profile"... | 
 | 20483 |  | 
 | 20484 | 	* Lib/Attic/threading_api.py: | 
 | 20485 | 	Removed; since long subsumed in Doc/lib/libthreading.tex | 
 | 20486 |  | 
 | 20487 | 	* Modules/socketmodule.c: | 
 | 20488 | 	Put back __osf__ support for gethostbyname_r(); the real bug was that | 
 | 20489 | 	it was being used even without threads.  This of course might be an | 
 | 20490 | 	all-platform problem so now we only use the _r variant when we are | 
 | 20491 | 	using threads. | 
 | 20492 |  | 
 | 20493 | Mon Apr 12 22:51:20 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20494 |  | 
 | 20495 | 	* Modules/cPickle.c: | 
 | 20496 | 	Fix accidentally reversed NULL test in load_mark().  Suggested by | 
 | 20497 | 	Tamito Kajiyama.  (This caused a bug only on platforms where malloc(0) | 
 | 20498 | 	returns NULL.) | 
 | 20499 |  | 
 | 20500 | 	* README: | 
 | 20501 | 	Add note about popen2 problem on Linux noticed by Pablo Bleyer. | 
 | 20502 |  | 
 | 20503 | 	* README: Add note about -D_REENTRANT for HP-UX 10.20. | 
 | 20504 |  | 
 | 20505 | 	* Modules/Makefile.pre.in: 'clean' target should remove hassignal. | 
 | 20506 |  | 
 | 20507 | 	* PC/Attic/vc40.mak, PC/readme.txt: | 
 | 20508 | 	Remove all VC++ info (except VC 1.5) from readme.txt; | 
 | 20509 | 	remove the VC++ 4.0 project file; remove the unused _tkinter extern defs. | 
 | 20510 |  | 
 | 20511 | 	* README: Clarify PC build instructions (point to PCbuild). | 
 | 20512 |  | 
 | 20513 | 	* Modules/zlibmodule.c: Cast added by Jack Jansen (for Mac port). | 
 | 20514 |  | 
 | 20515 | 	* Lib/plat-sunos5/CDIO.py, Lib/plat-linux2/CDROM.py: | 
 | 20516 | 	Forgot to add this file.  CDROM device parameters. | 
 | 20517 |  | 
 | 20518 | 	* Lib/gzip.py: Two different changes. | 
 | 20519 |  | 
 | 20520 | 	1. Jack Jansen reports that on the Mac, the time may be negative, and | 
 | 20521 | 	solves this by adding a write32u() function that writes an unsigned | 
 | 20522 | 	long. | 
 | 20523 |  | 
 | 20524 | 	2. On 64-bit platforms the CRC comparison fails; I've fixed this by | 
 | 20525 | 	casting both values to be compared to "unsigned long" i.e. modulo | 
 | 20526 | 	0x100000000L. | 
 | 20527 |  | 
 | 20528 | Sat Apr 10 18:42:02 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20529 |  | 
 | 20530 | 	* PC/Attic/_tkinter.def: No longer needed. | 
 | 20531 |  | 
 | 20532 | 	* Misc/ACKS: Correct missed character in Andrew Dalke's name. | 
 | 20533 |  | 
 | 20534 | 	* README: Add DEC Ultrix notes (from Donn Cave's email). | 
 | 20535 |  | 
 | 20536 | 	* configure: The usual | 
 | 20537 |  | 
 | 20538 | 	* configure.in: | 
 | 20539 | 	Quote a bunch of shell variables used in test, related to long-long. | 
 | 20540 |  | 
 | 20541 | 	* Objects/fileobject.c, Modules/shamodule.c, Modules/regexpr.c: | 
 | 20542 | 	casts for picky compilers. | 
 | 20543 |  | 
 | 20544 | 	* Modules/socketmodule.c: | 
 | 20545 | 	3-arg gethostbyname_r doesn't really work on OSF/1. | 
 | 20546 |  | 
 | 20547 | 	* PC/vc15_w31/_.c, PC/vc15_lib/_.c, Tools/pynche/__init__.py: | 
 | 20548 | 	Avoid totally empty files. | 
 | 20549 |  | 
 | 20550 | Fri Apr  9 14:56:35 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20551 |  | 
 | 20552 | 	* Tools/scripts/fixps.py: Use re instead of regex. | 
 | 20553 | 	Don't rewrite the file in place. | 
 | 20554 | 	(Reported by Andy Dustman.) | 
 | 20555 |  | 
 | 20556 | 	* Lib/netrc.py, Lib/shlex.py: Get rid of #! line | 
 | 20557 |  | 
 | 20558 | Thu Apr  8 23:13:37 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20559 |  | 
 | 20560 | 	* PCbuild/python15.wse: Use the Tcl 8.0.5 installer. | 
 | 20561 | 	Add a variable %_TCL_% that makes it easier to switch to a different version. | 
 | 20562 |  | 
 | 20563 |  | 
 | 20564 | ====================================================================== | 
 | 20565 |  | 
 | 20566 |  | 
 | 20567 | From 1.5.2b2 to 1.5.2c1 | 
 | 20568 | ======================= | 
 | 20569 |  | 
 | 20570 | Thu Apr  8 23:13:37 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20571 |  | 
 | 20572 | 	* PCbuild/python15.wse: | 
 | 20573 | 	Release 1.5.2c1.  Add IDLE and Uninstall to program group. | 
 | 20574 | 	Don't distribute zlib.dll.  Tweak some comments. | 
 | 20575 |  | 
 | 20576 | 	* PCbuild/zlib.dsp: Now using static zlib 1.1.3 | 
 | 20577 |  | 
 | 20578 | 	* Lib/dos-8x3/userdict.py, Lib/dos-8x3/userlist.py, Lib/dos-8x3/test_zli.py, Lib/dos-8x3/test_use.py, Lib/dos-8x3/test_pop.py, Lib/dos-8x3/test_pic.py, Lib/dos-8x3/test_ntp.py, Lib/dos-8x3/test_gzi.py, Lib/dos-8x3/test_fcn.py, Lib/dos-8x3/test_cpi.py, Lib/dos-8x3/test_bsd.py, Lib/dos-8x3/posixfil.py, Lib/dos-8x3/mimetype.py, Lib/dos-8x3/nturl2pa.py, Lib/dos-8x3/compilea.py, Lib/dos-8x3/exceptio.py, Lib/dos-8x3/basehttp.py: | 
 | 20579 | 	The usual | 
 | 20580 |  | 
 | 20581 | 	* Include/patchlevel.h: Release 1.5.2c1 | 
 | 20582 |  | 
 | 20583 | 	* README: Release 1.5.2c1. | 
 | 20584 |  | 
 | 20585 | 	* Misc/NEWS: News for the 1.5.2c1 release. | 
 | 20586 |  | 
 | 20587 | 	* Lib/test/test_strftime.py: | 
 | 20588 | 	On Windows, we suddenly find, strftime() may return "" for an | 
 | 20589 | 	unsupported format string.  (I guess this is because the logic for | 
 | 20590 | 	deciding whether to reallocate the buffer or not has been improved.) | 
 | 20591 | 	This caused the test code to crash on result[0].  Fix this by assuming | 
 | 20592 | 	an empty result also means the format is not supported. | 
 | 20593 |  | 
 | 20594 | 	* Demo/tkinter/matt/window-creation-w-location.py: | 
 | 20595 | 	This demo imported some private code from Matt.  Make it cripple along. | 
 | 20596 |  | 
 | 20597 | 	* Lib/lib-tk/Tkinter.py: | 
 | 20598 | 	Delete an accidentally checked-in feature that actually broke more | 
 | 20599 | 	than was worth it: when deleting a canvas item, it would try to | 
 | 20600 | 	automatically delete the bindings for that item.  Since there's | 
 | 20601 | 	nothing that says you can't reuse the tag and still have the bindings, | 
 | 20602 | 	this is not correct.  Also, it broke at least one demo | 
 | 20603 | 	(Demo/tkinter/matt/rubber-band-box-demo-1.py). | 
 | 20604 |  | 
 | 20605 | 	* Python/thread_wince.h: Win/CE thread support by Mark Hammond. | 
 | 20606 |  | 
 | 20607 | Wed Apr  7 20:23:17 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20608 |  | 
 | 20609 | 	* Modules/zlibmodule.c: | 
 | 20610 | 	Patch by Andrew Kuchling to unflush() (flush() for deflating). | 
 | 20611 | 	Without this, if inflate() returned Z_BUF_ERROR asking for more output | 
 | 20612 | 	space, we would report the error; now, we increase the buffer size and | 
 | 20613 | 	try again, just as for Z_OK. | 
 | 20614 |  | 
 | 20615 | 	* Lib/test/test_gzip.py: Use binary mode for all gzip files we open. | 
 | 20616 |  | 
 | 20617 | 	* Tools/idle/ChangeLog: New change log. | 
 | 20618 |  | 
 | 20619 | 	* Tools/idle/README.txt, Tools/idle/NEWS.txt: New version. | 
 | 20620 |  | 
 | 20621 | 	* Python/pythonrun.c: | 
 | 20622 | 	Alas, get rid of the Win specific hack to ask the user to press Return | 
 | 20623 | 	before exiting when an error happened.  This didn't work right when | 
 | 20624 | 	Python is invoked from a daemon. | 
 | 20625 |  | 
 | 20626 | 	* Tools/idle/idlever.py: Version bump awaiting impending new release. | 
 | 20627 | 	(Not much has changed :-( ) | 
 | 20628 |  | 
 | 20629 | 	* Lib/lib-tk/Tkinter.py: | 
 | 20630 | 	lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift, | 
 | 20631 | 	so the preferred name for them is tag_lower, tag_raise | 
 | 20632 | 	(similar to tag_bind, and similar to the Text widget); | 
 | 20633 | 	unfortunately can't delete the old ones yet (maybe in 1.6) | 
 | 20634 |  | 
 | 20635 | 	* Python/thread.c, Python/strtod.c, Python/mystrtoul.c, Python/import.c, Python/ceval.c: | 
 | 20636 | 	Changes by Mark Hammond for Windows CE.  Mostly of the form | 
 | 20637 | 	  #ifdef DONT_HAVE_header_H ... #endif around #include <header.h>. | 
 | 20638 |  | 
 | 20639 | 	* Python/bltinmodule.c: | 
 | 20640 | 	Remove unused variable from complex_from_string() code. | 
 | 20641 |  | 
 | 20642 | 	* Include/patchlevel.h: | 
 | 20643 | 	Add the possibility of a gamma release (release candidate). | 
 | 20644 | 	Add '+' to string version number to indicate we're beyond b2 now. | 
 | 20645 |  | 
 | 20646 | 	* Modules/posixmodule.c: Add extern decl for fsync() for SunOS 4.x. | 
 | 20647 |  | 
 | 20648 | 	* Lib/smtplib.py: Changes by Per Cederquist and The Dragon. | 
 | 20649 |  | 
 | 20650 | 	Per writes: | 
 | 20651 |  | 
 | 20652 | 	""" | 
 | 20653 | 	The application where Signum Support uses smtplib needs to be able to | 
 | 20654 | 	report good error messages to the user when sending email fails.  To | 
 | 20655 | 	help in diagnosing problems it is useful to be able to report the | 
 | 20656 | 	entire message sent by the server, not only the SMTP error code of the | 
 | 20657 | 	offending command. | 
 | 20658 |  | 
 | 20659 | 	A lot of the functions in sendmail.py unfortunately discards the | 
 | 20660 | 	message, leaving only the code.  The enclosed patch fixes that | 
 | 20661 | 	problem. | 
 | 20662 |  | 
 | 20663 | 	The enclosed patch also introduces a base class for exceptions that | 
 | 20664 | 	include an SMTP error code and error message, and make the code and | 
 | 20665 | 	message available on separate attributes, so that surrounding code can | 
 | 20666 | 	deal with them in whatever way it sees fit.  I've also added some | 
 | 20667 | 	documentation to the exception classes. | 
 | 20668 |  | 
 | 20669 | 	The constructor will now raise an exception if it cannot connect to | 
 | 20670 | 	the SMTP server. | 
 | 20671 |  | 
 | 20672 | 	The data() method will raise an SMTPDataError if it doesn't receive | 
 | 20673 | 	the expected 354 code in the middle of the exchange. | 
 | 20674 |  | 
 | 20675 | 	According to section 5.2.10 of RFC 1123 a smtp client must accept "any | 
 | 20676 | 	text, including no text at all" after the error code.  If the response | 
 | 20677 | 	of a HELO command contains no text self.helo_resp will be set to the | 
 | 20678 | 	empty string ("").  The patch fixes the test in the sendmail() method | 
 | 20679 | 	so that helo_resp is tested against None; if it has the empty string | 
 | 20680 | 	as value the sendmail() method would invoke the helo() method again. | 
 | 20681 |  | 
 | 20682 | 	The code no longer accepts a -1 reply from the ehlo() method in | 
 | 20683 | 	sendmail(). | 
 | 20684 |  | 
 | 20685 | 	[Text about removing SMTPRecipientsRefused deleted --GvR] | 
 | 20686 | 	""" | 
 | 20687 |  | 
 | 20688 | 	and also: | 
 | 20689 |  | 
 | 20690 | 	""" | 
 | 20691 | 	smtplib.py appends an extra blank line to the outgoing mail if the | 
 | 20692 | 	`msg' argument to the sendmail method already contains a trailing | 
 | 20693 | 	newline.  This patch should fix the problem. | 
 | 20694 | 	""" | 
 | 20695 |  | 
 | 20696 | 	The Dragon writes: | 
 | 20697 |  | 
 | 20698 | 	""" | 
 | 20699 | 		Mostly I just re-added the SMTPRecipientsRefused exception | 
 | 20700 | 	(the exeption object now has the appropriate info in it ) [Per had | 
 | 20701 | 	removed this in his patch --GvR] and tweaked the behavior of the | 
 | 20702 | 	sendmail method whence it throws the newly added SMTPHeloException (it | 
 | 20703 | 	was closing the connection, which it shouldn't.  whatever catches the | 
 | 20704 | 	exception should do that. ) | 
 | 20705 |  | 
 | 20706 | 		I pondered the change of the return values to tuples all around, | 
 | 20707 | 	and after some thinking I decided that regularizing the return values was | 
 | 20708 | 	too much of the Right Thing (tm) to not do. | 
 | 20709 |  | 
 | 20710 | 		My one concern is that code expecting an integer & getting a tuple | 
 | 20711 | 	may fail silently. | 
 | 20712 |  | 
 | 20713 | 	(i.e. if it's doing : | 
 | 20714 |  | 
 | 20715 | 	      x.somemethod() >= 400: | 
 | 20716 | 	expecting an integer, the expression will always be true if it gets a | 
 | 20717 | 	tuple instead. ) | 
 | 20718 |  | 
 | 20719 | 		However, most smtplib code I've seen only really uses the | 
 | 20720 | 	sendmail() method, so this wouldn't bother it.  Usually code I've seen | 
 | 20721 | 	that calls the other methods usually only calls helo() and ehlo() for | 
 | 20722 | 	doing ESMTP, a feature which was not in the smtplib included with 1.5.1, | 
 | 20723 | 	and thus I would think not much code uses it yet. | 
 | 20724 | 	""" | 
 | 20725 |  | 
 | 20726 | Tue Apr  6 19:38:18 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20727 |  | 
 | 20728 | 	* Lib/test/test_ntpath.py: | 
 | 20729 | 	Fix the tests now that splitdrive() no longer treats UNC paths special. | 
 | 20730 | 	(Some tests converted to splitunc() tests.) | 
 | 20731 |  | 
 | 20732 | 	* Lib/ntpath.py: | 
 | 20733 | 	Withdraw the UNC support from splitdrive().  Instead, a new function | 
 | 20734 | 	splitunc() parses UNC paths.  The contributor of the UNC parsing in | 
 | 20735 | 	splitdrive() doesn't like it, but I haven't heard a good reason to | 
 | 20736 | 	keep it, and it causes some problems.  (I think there's a | 
 | 20737 | 	philosophical problem -- to me, the split*() functions are purely | 
 | 20738 | 	syntactical, and the fact that \\foo is not a valid path doesn't mean | 
 | 20739 | 	that it shouldn't be considered an absolute path.) | 
 | 20740 |  | 
 | 20741 | 	Also (quite separately, but strangely related to the philosophical | 
 | 20742 | 	issue above) fix abspath() so that if win32api exists, it doesn't fail | 
 | 20743 | 	when the path doesn't actually exist -- if GetFullPathName() fails, | 
| Mark Dickinson | 934896d | 2009-02-21 20:59:32 +0000 | [diff] [blame] | 20744 | 	fall back on the old strategy (join with getcwd() if necessary, and | 
| Guido van Rossum | 2001da4 | 2000-09-01 22:26:44 +0000 | [diff] [blame] | 20745 | 	then use normpath()). | 
 | 20746 |  | 
 | 20747 | 	* configure.in, configure, config.h.in, acconfig.h: | 
 | 20748 | 	For BeOS PowerPC.  Chris Herborth. | 
 | 20749 |  | 
 | 20750 | Mon Apr  5 21:54:14 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20751 |  | 
 | 20752 | 	* Modules/timemodule.c: | 
 | 20753 | 	Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on | 
 | 20754 | 	#else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef. | 
 | 20755 |  | 
 | 20756 | 	* Misc/ACKS: | 
 | 20757 | 	Bunch of new contributors, including 9 who contributed to the Docs, | 
 | 20758 | 	reported by Fred. | 
 | 20759 |  | 
 | 20760 | Mon Apr  5 18:37:59 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 20761 |  | 
 | 20762 | 	* Lib/gzip.py: | 
 | 20763 | 	Oops, missed mode parameter to open(). | 
 | 20764 |  | 
 | 20765 | 	* Lib/gzip.py: | 
 | 20766 | 	Made the default mode 'rb' instead of 'r', for better cross-platform | 
 | 20767 | 	support.  (Based on comment on the documentation by Bernhard Reiter | 
 | 20768 | 	<bernhard@csd.uwm.edu>). | 
 | 20769 |  | 
 | 20770 | Fri Apr  2 22:18:25 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20771 |  | 
 | 20772 | 	* Tools/scripts/dutree.py: | 
 | 20773 | 	For reasons I dare not explain, this script should always execute | 
 | 20774 | 	main() when imported (in other words, it is not usable as a module). | 
 | 20775 |  | 
 | 20776 | Thu Apr  1 15:32:30 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20777 |  | 
 | 20778 | 	* Lib/test/test_cpickle.py: Jonathan Giddy write: | 
 | 20779 |  | 
 | 20780 | 	In test_cpickle.py, the module os got imported, but the line to remove | 
 | 20781 | 	the temp file has gone missing. | 
 | 20782 |  | 
 | 20783 | Tue Mar 30 20:17:31 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20784 |  | 
 | 20785 | 	* Lib/BaseHTTPServer.py: Per Cederqvist writes: | 
 | 20786 |  | 
 | 20787 | 	If you send something like "PUT / HTTP/1.0" to something derived from | 
 | 20788 | 	BaseHTTPServer that doesn't define do_PUT, you will get a response | 
 | 20789 | 	that begins like this: | 
 | 20790 |  | 
 | 20791 | 		HTTP/1.0 501 Unsupported method ('do_PUT') | 
 | 20792 | 		Server: SimpleHTTP/0.3 Python/1.5 | 
 | 20793 | 		Date: Tue, 30 Mar 1999 18:53:53 GMT | 
 | 20794 |  | 
 | 20795 | 	The server should complain about 'PUT' instead of 'do_PUT'.  This | 
 | 20796 | 	patch should fix the problem. | 
 | 20797 |  | 
 | 20798 | Mon Mar 29 20:33:21 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20799 |  | 
 | 20800 | 	* Lib/smtplib.py: Patch by Per Cederqvist, who writes: | 
 | 20801 |  | 
 | 20802 | 	""" | 
 | 20803 | 	 - It needlessly used the makefile() method for each response that is | 
 | 20804 | 	   read from the SMTP server. | 
 | 20805 |  | 
 | 20806 | 	 - If the remote SMTP server closes the connection unexpectedly the | 
 | 20807 | 	   code raised an IndexError.  It now raises an SMTPServerDisconnected | 
 | 20808 | 	   exception instead. | 
 | 20809 |  | 
 | 20810 | 	 - The code now checks that all lines in a multiline response actually | 
 | 20811 | 	   contains an error code. | 
 | 20812 | 	""" | 
 | 20813 |  | 
 | 20814 | 	The Dragon approves. | 
 | 20815 |  | 
 | 20816 | Mon Mar 29 20:25:40 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 20817 |  | 
 | 20818 | 	* Lib/compileall.py: | 
 | 20819 | 	When run as a script, report failures in the exit code as well. | 
 | 20820 | 	Patch largely based on changes by Andrew Dalke, as discussed in the | 
 | 20821 | 	distutils-sig. | 
 | 20822 |  | 
 | 20823 | Mon Mar 29 20:23:41 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20824 |  | 
 | 20825 | 	* Lib/urllib.py: | 
 | 20826 | 	Hack so that if a 302 or 301 redirect contains a relative URL, the | 
 | 20827 | 	right thing "just happens" (basejoin() with old URL). | 
 | 20828 |  | 
 | 20829 | 	* Modules/cPickle.c: | 
 | 20830 | 	Protection against picling to/from closed (real) file. | 
 | 20831 | 	The problem was reported by Moshe Zadka. | 
 | 20832 |  | 
 | 20833 | 	* Lib/test/test_cpickle.py: | 
 | 20834 | 	Test protection against picling to/from closed (real) file. | 
 | 20835 |  | 
 | 20836 | 	* Modules/timemodule.c: Chris Lawrence writes: | 
 | 20837 |  | 
 | 20838 | 	""" | 
 | 20839 | 	The GNU folks, in their infinite wisdom, have decided not to implement | 
 | 20840 | 	altzone in libc6; this would not be horrible, except that timezone | 
 | 20841 | 	(which is implemented) includes the current DST setting (i.e. timezone | 
 | 20842 | 	for Central is 18000 in summer and 21600 in winter).  So Python's | 
 | 20843 | 	timezone and altzone variables aren't set correctly during DST. | 
 | 20844 |  | 
 | 20845 | 	Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone | 
 | 20846 | 	show the "right" thing on Linux (by using the tm_gmtoff stuff | 
 | 20847 | 	available in BSD, which is how the GLIBC manual claims things should | 
 | 20848 | 	be done) and (b) should cope with the southern hemisphere.  In pursuit | 
 | 20849 | 	of (b), I also took the liberty of renaming the "summer" and "winter" | 
 | 20850 | 	variables to "july" and "jan".  This patch should also make certain | 
 | 20851 | 	time calculations on Linux actually work right (like the tz-aware | 
 | 20852 | 	functions in the rfc822 module). | 
 | 20853 |  | 
 | 20854 | 	(It's hard to find DST that's currently being used in the southern | 
 | 20855 | 	hemisphere; I tested using Africa/Windhoek.) | 
 | 20856 | 	""" | 
 | 20857 |  | 
 | 20858 | 	* Lib/test/output/test_gzip: | 
 | 20859 | 	Jonathan Giddy discovered this file was missing. | 
 | 20860 |  | 
 | 20861 | 	* Modules/shamodule.c: | 
 | 20862 | 	Avoid warnings from AIX compiler.  Reported by Vladimir (AIX is my | 
 | 20863 | 	middlename) Marangozov, patch coded by Greg Stein. | 
 | 20864 |  | 
 | 20865 | 	* Tools/idle/ScriptBinding.py, Tools/idle/PyShell.py: | 
 | 20866 | 	At Tim Peters' recommendation, add a dummy flush() method to PseudoFile. | 
 | 20867 |  | 
 | 20868 | Sun Mar 28 17:55:32 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20869 |  | 
 | 20870 | 	* Tools/scripts/ndiff.py: Tim Peters writes: | 
 | 20871 |  | 
 | 20872 | 	I should have waited overnight <wink/sigh>.  Nothing wrong with the one I | 
 | 20873 | 	sent, but I couldn't resist going on to add new -r1 / -r2 cmdline options | 
 | 20874 | 	for recreating the original files from ndiff's output.  That's attached, if | 
 | 20875 | 	you're game!  Us Windows guys don't usually have a sed sitting around | 
 | 20876 | 	<wink>. | 
 | 20877 |  | 
 | 20878 | Sat Mar 27 13:34:01 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20879 |  | 
 | 20880 | 	* Tools/scripts/ndiff.py: Tim Peters writes: | 
 | 20881 |  | 
 | 20882 | 	Attached is a cleaned-up version of ndiff (added useful module | 
 | 20883 | 	docstring, now echo'ed in case of cmd line mistake); added -q option | 
 | 20884 | 	to suppress initial file identification lines; + other minor cleanups, | 
 | 20885 | 	& a slightly faster match engine. | 
 | 20886 |  | 
 | 20887 | Fri Mar 26 22:36:00 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 20888 |  | 
 | 20889 | 	* Tools/scripts/dutree.py: | 
 | 20890 | 	During display, if EPIPE is raised, it's probably because a pager was | 
 | 20891 | 	killed.  Discard the error in that case, but propogate it otherwise. | 
 | 20892 |  | 
 | 20893 | Fri Mar 26 16:20:45 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20894 |  | 
 | 20895 | 	* Lib/test/output/test_userlist, Lib/test/test_userlist.py: | 
 | 20896 | 	Test suite for UserList. | 
 | 20897 |  | 
 | 20898 | 	* Lib/UserList.py: Use isinstance() where appropriate. | 
 | 20899 | 	Reformatted with 4-space indent. | 
 | 20900 |  | 
 | 20901 | Fri Mar 26 16:11:40 1999  Barry Warsaw  <bwarsaw@eric.cnri.reston.va.us> | 
 | 20902 |  | 
 | 20903 | 	* Tools/pynche/PyncheWidget.py: | 
 | 20904 | 	Helpwin.__init__(): The text widget should get focus. | 
 | 20905 |  | 
 | 20906 | 	* Tools/pynche/pyColorChooser.py: | 
 | 20907 | 	Removed unnecessary import `from PyncheWidget import PyncheWidget' | 
 | 20908 |  | 
 | 20909 | Fri Mar 26 15:32:05 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20910 |  | 
 | 20911 | 	* Lib/test/output/test_userdict, Lib/test/test_userdict.py: | 
 | 20912 | 	Test suite for UserDict | 
 | 20913 |  | 
 | 20914 | 	* Lib/UserDict.py: Improved a bunch of things. | 
 | 20915 | 	The constructor now takes an optional dictionary. | 
 | 20916 | 	Use isinstance() where appropriate. | 
 | 20917 |  | 
 | 20918 | Thu Mar 25 22:38:49 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20919 |  | 
 | 20920 | 	* Lib/test/output/test_pickle, Lib/test/output/test_cpickle, Lib/test/test_pickle.py, Lib/test/test_cpickle.py: | 
 | 20921 | 	Basic regr tests for pickle/cPickle | 
 | 20922 |  | 
 | 20923 | 	* Lib/pickle.py: | 
 | 20924 | 	Don't use "exec" in find_class().  It's slow, unnecessary, and (as AMK | 
 | 20925 | 	points out) it doesn't work in JPython Applets. | 
 | 20926 |  | 
 | 20927 | Thu Mar 25 21:50:27 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us> | 
 | 20928 |  | 
 | 20929 | 	* Lib/test/test_gzip.py: | 
 | 20930 | 	Added a simple test suite for gzip.  It simply opens a temp file, | 
 | 20931 | 	writes a chunk of compressed data, closes it, writes another chunk, and | 
 | 20932 | 	reads the contents back to verify that they are the same. | 
 | 20933 |  | 
 | 20934 | 	* Lib/gzip.py: | 
 | 20935 | 	Based on a suggestion from bruce@hams.com, make a trivial change to | 
 | 20936 | 	allow using the 'a' flag as a mode for opening a GzipFile.  gzip | 
 | 20937 | 	files, surprisingly enough, can be concatenated and then decompressed; | 
 | 20938 | 	the effect is to concatenate the two chunks of data. | 
 | 20939 |  | 
 | 20940 | 	If we support it on writing, it should also be supported on reading. | 
 | 20941 | 	This *wasn't* trivial, and required rearranging the code in the | 
 | 20942 | 	reading path, particularly the _read() method. | 
 | 20943 |  | 
 | 20944 | 	Raise IOError instead of RuntimeError in two cases, 'Not a gzipped file' | 
 | 20945 | 	and 'Unknown compression method' | 
 | 20946 |  | 
 | 20947 | Thu Mar 25 21:25:01 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20948 |  | 
 | 20949 | 	* Lib/test/test_b1.py: | 
 | 20950 | 	Add tests for float() and complex() with string args (Nick/Stephanie | 
 | 20951 | 	Lockwood). | 
 | 20952 |  | 
 | 20953 | Thu Mar 25 21:21:08 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us> | 
 | 20954 |  | 
 | 20955 | 	* Modules/zlibmodule.c: | 
 | 20956 | 	Add an .unused_data attribute to decompressor objects.  If .unused_data | 
 | 20957 | 	is not an empty string, this means that you have arrived at the | 
 | 20958 | 	end of the stream of compressed data, and the contents of .unused_data are | 
 | 20959 | 	whatever follows the compressed stream. | 
 | 20960 |  | 
 | 20961 | Thu Mar 25 21:16:07 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20962 |  | 
 | 20963 | 	* Python/bltinmodule.c: | 
 | 20964 | 	Patch by Nick and Stephanie Lockwood to implement complex() with a string | 
 | 20965 | 	argument.  This closes TODO item 2.19. | 
 | 20966 |  | 
 | 20967 | Wed Mar 24 19:09:00 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 20968 |  | 
 | 20969 | 	* Tools/webchecker/wcnew.py: Added Samuel Bayer's new webchecker. | 
 | 20970 | 	Unfortunately his code breaks wcgui.py in a way that's not easy | 
 | 20971 | 	to fix.  I expect that this is a temporary situation -- | 
 | 20972 | 	eventually Sam's changes will be merged back in. | 
 | 20973 | 	(The changes add a -t option to specify exceptions to the -x | 
 | 20974 | 	option, and explicit checking for #foo style fragment ids.) | 
 | 20975 |  | 
 | 20976 | 	* Objects/dictobject.c: | 
 | 20977 | 	Vladimir Marangozov contributed updated comments. | 
 | 20978 |  | 
 | 20979 | 	* Objects/bufferobject.c: Folded long lines. | 
 | 20980 |  | 
 | 20981 | 	* Lib/test/output/test_sha, Lib/test/test_sha.py: | 
 | 20982 | 	Added Jeremy's test code for the sha module. | 
 | 20983 |  | 
 | 20984 | 	* Modules/shamodule.c, Modules/Setup.in: | 
 | 20985 | 	Added Greg Stein and Andrew Kuchling's sha module. | 
 | 20986 | 	Fix comments about zlib version and URL. | 
 | 20987 |  | 
 | 20988 | 	* Lib/test/test_bsddb.py: Remove the temp file when we're done. | 
 | 20989 |  | 
 | 20990 | 	* Include/pythread.h: Conform to standard boilerplate. | 
 | 20991 |  | 
 | 20992 | 	* configure.in, configure, BeOS/linkmodule, BeOS/ar-fake: | 
 | 20993 | 	Chris Herborth: the new compiler in R4.1 needs some new options to work... | 
 | 20994 |  | 
 | 20995 | 	* Modules/socketmodule.c: | 
 | 20996 | 	Implement two suggestions by Jonathan Giddy: (1) in AIX, clear the | 
 | 20997 | 	data struct before calling gethostby{name,addr}_r(); (2) ignore the | 
 | 20998 | 	3/5/6 args determinations made by the configure script and switch on | 
 | 20999 | 	platform identifiers instead: | 
 | 21000 |  | 
 | 21001 | 	AIX, OSF have 3 args | 
 | 21002 | 	Sun, SGI have 5 args | 
 | 21003 | 	Linux has 6 args | 
 | 21004 |  | 
 | 21005 | 	On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether. | 
 | 21006 |  | 
 | 21007 | 	* Modules/socketmodule.c: | 
 | 21008 | 	Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code. | 
 | 21009 |  | 
 | 21010 | 	* Lib/mailbox.py: | 
 | 21011 | 	Add readlines() to _Subfile class.  Not clear who would need it, but | 
 | 21012 | 	Chris Lawrence sent me a broken version; this one is a tad simpler and | 
 | 21013 | 	more conforming to the standard. | 
 | 21014 |  | 
 | 21015 | Tue Mar 23 23:05:34 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us> | 
 | 21016 |  | 
 | 21017 | 	* Lib/gzip.py: use struct instead of bit-manipulate in Python | 
 | 21018 |  | 
 | 21019 | Tue Mar 23 19:00:55 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21020 |  | 
 | 21021 | 	* Modules/Makefile.pre.in: | 
 | 21022 | 	Add $(EXE) to various occurrences of python so it will work on Cygwin | 
 | 21023 | 	with egcs (after setting EXE=.exe).  Patch by Norman Vine. | 
 | 21024 |  | 
 | 21025 | 	* configure, configure.in: | 
 | 21026 | 	Ack!  It never defined HAVE_GETHOSTBYNAME_R so that code was never tested! | 
 | 21027 |  | 
 | 21028 | Mon Mar 22 22:25:39 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21029 |  | 
 | 21030 | 	* Include/thread.h: | 
 | 21031 | 	Adding thread.h -- unused but for b/w compatibility. | 
 | 21032 | 	As requested by Bill Janssen. | 
 | 21033 |  | 
 | 21034 | 	* configure.in, configure: | 
 | 21035 | 	Add code to test for all sorts of gethostbyname_r variants, | 
 | 21036 | 	donated by David Arnold. | 
 | 21037 |  | 
 | 21038 | 	* config.h.in, acconfig.h: | 
 | 21039 | 	Add symbols for gethostbyname_r variants (sigh). | 
 | 21040 |  | 
 | 21041 | 	* Modules/socketmodule.c: Clean up pass for the previous patches. | 
 | 21042 |  | 
 | 21043 | 	- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and | 
 | 21044 | 	glibc2. | 
 | 21045 |  | 
 | 21046 | 	- If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R -- | 
 | 21047 | 	don't know what code should be used. | 
 | 21048 |  | 
 | 21049 | 	- New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used. | 
 | 21050 |  | 
 | 21051 | 	- Modify the gethostbyaddr() code to also hold on to the lock until | 
 | 21052 | 	after it is safe to release, overlapping with the Python lock. | 
 | 21053 |  | 
 | 21054 | 	(Note: I think that it could in theory be possible that Python code | 
 | 21055 | 	executed while gethostbyname_lock is held could attempt to reacquire | 
 | 21056 | 	the lock -- e.g. in a signal handler or destructor.  I will simply say | 
 | 21057 | 	"don't do that then.") | 
 | 21058 |  | 
 | 21059 | 	* Modules/socketmodule.c: Jonathan Giddy writes: | 
 | 21060 |  | 
 | 21061 | 	Here's a patch to fix the race condition, which wasn't fixed by Rob's | 
 | 21062 | 	patch.  It holds the gethostbyname lock until the results are copied out, | 
 | 21063 | 	which means that this lock and the Python global lock are held at the same | 
 | 21064 | 	time.  This shouldn't be a problem as long as the gethostbyname lock is | 
 | 21065 | 	always acquired when the global lock is not held. | 
 | 21066 |  | 
 | 21067 | Mon Mar 22 19:25:30 1999  Andrew Kuchling  <akuchlin@eric.cnri.reston.va.us> | 
 | 21068 |  | 
 | 21069 | 	* Modules/zlibmodule.c: | 
 | 21070 | 	Fixed the flush() method of compression objects; the test for | 
 | 21071 | 	    the end of loop was incorrect, and failed when the flushmode != Z_FINISH. | 
 | 21072 | 	    Logic cleaned up and commented. | 
 | 21073 |  | 
 | 21074 | 	* Lib/test/test_zlib.py: | 
 | 21075 | 	Added simple test for the flush() method of compression objects, trying the | 
 | 21076 | 	    different flush values Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FULL_FLUSH. | 
 | 21077 |  | 
 | 21078 | Mon Mar 22 15:28:08 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21079 |  | 
 | 21080 | 	* Lib/shlex.py: | 
 | 21081 | 	Bug reported by Tobias Thelen: missing "self." in assignment target. | 
 | 21082 |  | 
 | 21083 | Fri Mar 19 21:50:11 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21084 |  | 
 | 21085 | 	* Modules/arraymodule.c: | 
 | 21086 | 	Use an unsigned cast to avoid a warning in VC++. | 
 | 21087 |  | 
 | 21088 | 	* Lib/dospath.py, Lib/ntpath.py: | 
 | 21089 | 	New code for split() by Tim Peters, behaves more like posixpath.split(). | 
 | 21090 |  | 
 | 21091 | 	* Objects/floatobject.c: | 
 | 21092 | 	Fix a problem with Vladimir's PyFloat_Fini code: clear the free list; if | 
 | 21093 | 	a block cannot be freed, add its free items back to the free list. | 
 | 21094 | 	This is necessary to avoid leaking when Python is reinitialized later. | 
 | 21095 |  | 
 | 21096 | 	* Objects/intobject.c: | 
 | 21097 | 	Fix a problem with Vladimir's PyInt_Fini code: clear the free list; if | 
 | 21098 | 	a block cannot be freed, add its free items back to the free list, and | 
 | 21099 | 	add its valid ints back to the small_ints array if they are in range. | 
 | 21100 | 	This is necessary to avoid leaking when Python is reinitialized later. | 
 | 21101 |  | 
 | 21102 | 	* Lib/types.py: | 
 | 21103 | 	Added BufferType, the type returned by the new builtin buffer().  Greg Stein. | 
 | 21104 |  | 
 | 21105 | 	* Python/bltinmodule.c: | 
 | 21106 | 	New builtin buffer() creates a derived read-only buffer from any | 
 | 21107 | 	object that supports the buffer interface (e.g. strings, arrays). | 
 | 21108 |  | 
 | 21109 | 	* Objects/bufferobject.c: | 
 | 21110 | 	Added check for negative offset for PyBuffer_FromObject and check for | 
 | 21111 | 	negative size for PyBuffer_FromMemory.  Greg Stein. | 
 | 21112 |  | 
 | 21113 | Thu Mar 18 15:10:44 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21114 |  | 
 | 21115 | 	* Lib/urlparse.py: Sjoerd Mullender writes: | 
 | 21116 |  | 
 | 21117 | 	If a filename on Windows starts with \\, it is converted to a URL | 
 | 21118 | 	which starts with ////.  If this URL is passed to urlparse.urlparse | 
 | 21119 | 	you get a path that starts with // (and an empty netloc).  If you pass | 
 | 21120 | 	the result back to urlparse.urlunparse, you get a URL that starts with | 
 | 21121 | 	//, which is parsed differently by urlparse.urlparse.  The fix is to | 
 | 21122 | 	add the (empty) netloc with accompanying slashes if the path in | 
 | 21123 | 	urlunparse starts with //.  Do this for all schemes that use a netloc. | 
 | 21124 |  | 
 | 21125 | 	* Lib/nturl2path.py: Sjoerd Mullender writes: | 
 | 21126 |  | 
 | 21127 | 	Pathnames of files on other hosts in the same domain | 
 | 21128 | 	(\\host\path\to\file) are not translated correctly to URLs and back. | 
 | 21129 | 	The URL should be something like file:////host/path/to/file. | 
 | 21130 | 	Note that a combination of drive letter and remote host is not | 
 | 21131 | 	possible. | 
 | 21132 |  | 
 | 21133 | Wed Mar 17 22:30:10 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21134 |  | 
 | 21135 | 	* Lib/urlparse.py: | 
 | 21136 | 	Delete non-standard-conforming code in urljoin() that would use the | 
 | 21137 | 	netloc from the base url as the default netloc for the resulting url | 
 | 21138 | 	even if the schemes differ. | 
 | 21139 |  | 
 | 21140 | 	Once upon a time, when the web was wild, this was a valuable hack | 
 | 21141 | 	because some people had a URL referencing an ftp server colocated with | 
 | 21142 | 	an http server without having the host in the ftp URL (so they could | 
 | 21143 | 	replicate it or change the hostname easily). | 
 | 21144 |  | 
 | 21145 | 	More recently, after the file: scheme got added back to the list of | 
 | 21146 | 	schemes that accept a netloc, it turns out that this caused weirdness | 
 | 21147 | 	when joining an http: URL with a file: URL -- the resulting file: URL | 
 | 21148 | 	would always inherit the host from the http: URL because the file: | 
 | 21149 | 	scheme supports a netloc but in practice never has one. | 
 | 21150 |  | 
 | 21151 | 	There are two reasons to get rid of the old, once-valuable hack, | 
 | 21152 | 	instead of removing the file: scheme from the uses_netloc list.  One, | 
 | 21153 | 	the RFC says that file: uses the netloc syntax, and does not endorse | 
 | 21154 | 	the old hack.  Two, neither netscape 4.5 nor IE 4.0 support the old | 
 | 21155 | 	hack. | 
 | 21156 |  | 
 | 21157 | 	* Include/ceval.h, Include/abstract.h: | 
 | 21158 | 	Add DLL level b/w compat for PySequence_In and PyEval_CallObject | 
 | 21159 |  | 
 | 21160 | Tue Mar 16 21:54:50 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21161 |  | 
 | 21162 | 	* Lib/lib-tk/Tkinter.py: Bug reported by Jim Robinson: | 
 | 21163 |  | 
 | 21164 | 	An attempt to execute grid_slaves with arguments (0,0) results in | 
 | 21165 | 	*all* of the slaves being returned, not just the slave associated with | 
 | 21166 | 	row 0, column 0.  This is because the test for arguments in the method | 
 | 21167 | 	does not test to see if row (and column) does not equal None, but | 
 | 21168 | 	rather just whether is evaluates to non-false.  A value of 0 fails | 
 | 21169 | 	this test. | 
 | 21170 |  | 
 | 21171 | Tue Mar 16 14:17:48 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 21172 |  | 
 | 21173 | 	* Modules/cmathmodule.c: | 
 | 21174 | 	Docstring fix:  acosh() returns the hyperbolic arccosine, not the | 
 | 21175 | 	hyperbolic cosine.  Problem report via David Ascher by one of his | 
 | 21176 | 	students. | 
 | 21177 |  | 
 | 21178 | Mon Mar 15 21:40:59 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21179 |  | 
 | 21180 | 	* configure.in: | 
 | 21181 | 	Should test for gethost*by*name_r, not for gethostname_r (which | 
 | 21182 | 	doesn't exist and doesn't make sense). | 
 | 21183 |  | 
 | 21184 | 	* Modules/socketmodule.c: | 
 | 21185 | 	Patch by Rob Riggs for Linux -- glibc2 has a different argument | 
 | 21186 | 	converntion for gethostbyname_r() etc. than Solaris! | 
 | 21187 |  | 
 | 21188 | 	* Python/thread_pthread.h: Rob Riggs wrote: | 
 | 21189 |  | 
 | 21190 | 	""" | 
 | 21191 | 	Spec says that on success pthread_create returns 0. It does not say | 
 | 21192 | 	that an error code will be < 0. Linux glibc2 pthread_create() returns | 
 | 21193 | 	ENOMEM (12) when one exceed process limits. (It looks like it should | 
 | 21194 | 	return EAGAIN, but that's another story.) | 
 | 21195 |  | 
 | 21196 | 	For reference, see: | 
 | 21197 | 	http://www.opengroup.org/onlinepubs/7908799/xsh/pthread_create.html | 
 | 21198 | 	""" | 
 | 21199 |  | 
 | 21200 | 	[I have a feeling that similar bugs were fixed before; perhaps someone | 
 | 21201 | 	could check that all error checks no check for != 0?] | 
 | 21202 |  | 
 | 21203 | 	* Tools/bgen/bgen/bgenObjectDefinition.py: | 
 | 21204 | 	New mixin class that defines cmp and hash that use | 
 | 21205 | 	the ob_itself pointer.  This allows (when using the mixin) | 
 | 21206 | 	different Python objects pointing to the same C object and | 
 | 21207 | 	behaving well as dictionary keys. | 
 | 21208 |  | 
 | 21209 | 	Or so sez Jack Jansen... | 
 | 21210 |  | 
 | 21211 | 	* Lib/urllib.py: Yet another patch by Sjoerd Mullender: | 
 | 21212 |  | 
 | 21213 | 	Don't convert URLs to URLs using pathname2url. | 
 | 21214 |  | 
 | 21215 | Fri Mar 12 22:15:43 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21216 |  | 
 | 21217 | 	* Lib/cmd.py: Patch by Michael Scharf.  He writes: | 
 | 21218 |  | 
 | 21219 | 	    The module cmd requires for each do_xxx command a help_xxx | 
 | 21220 | 	    function. I think this is a little old fashioned. | 
 | 21221 |  | 
 | 21222 | 	    Here is a patch: use the docstring as help if no help_xxx | 
 | 21223 | 	    function can be found. | 
 | 21224 |  | 
 | 21225 | 	[I'm tempted to rip out all the help_* functions from pdb, but I'll | 
 | 21226 | 	resist it.  Any takers?  --Guido] | 
 | 21227 |  | 
 | 21228 | 	* Tools/freeze/freeze.py: Bug submitted by Wayne Knowles, who writes: | 
 | 21229 |  | 
 | 21230 | 	   Under Windows, python freeze.py -o hello hello.py | 
 | 21231 | 	   creates all the correct files in the hello subdirectory, but the | 
 | 21232 | 	   Makefile has the directory prefix in it for frozen_extensions.c | 
 | 21233 | 	   nmake fails because it tries to locate hello/frozen_extensions.c | 
 | 21234 |  | 
 | 21235 | 	(His fix adds a call to os.path.basename() in the appropriate place.) | 
 | 21236 |  | 
 | 21237 | 	* Objects/floatobject.c, Objects/intobject.c: | 
 | 21238 | 	Vladimir has restructured his code somewhat so that the blocks are now | 
 | 21239 | 	represented by an explicit structure.  (There are still too many casts | 
 | 21240 | 	in the code, but that may be unavoidable.) | 
 | 21241 |  | 
 | 21242 | 	Also added code so that with -vv it is very chatty about what it does. | 
 | 21243 |  | 
 | 21244 | 	* Demo/zlib/zlibdemo.py, Demo/zlib/minigzip.py: | 
 | 21245 | 	Change #! line to modern usage; also chmod +x | 
 | 21246 |  | 
 | 21247 | 	* Demo/pdist/rrcs, Demo/pdist/rcvs, Demo/pdist/rcsbump: | 
 | 21248 | 	Change #! line to modern usage | 
 | 21249 |  | 
 | 21250 | 	* Lib/nturl2path.py, Lib/urllib.py: From: Sjoerd Mullender | 
 | 21251 |  | 
 | 21252 | 	The filename to URL conversion didn't properly quote special | 
 | 21253 | 	characters. | 
 | 21254 | 	The URL to filename didn't properly unquote special chatacters. | 
 | 21255 |  | 
 | 21256 | 	* Objects/floatobject.c: | 
 | 21257 | 	OK, try again.  Vladimir gave me a fix for the alignment bus error, | 
 | 21258 | 	so here's his patch again.  This time it works (at least on Solaris, | 
 | 21259 | 	Linux and Irix). | 
 | 21260 |  | 
 | 21261 | Thu Mar 11 23:21:23 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21262 |  | 
 | 21263 | 	* Tools/idle/PathBrowser.py: | 
 | 21264 | 	Don't crash when sys.path contains an empty string. | 
 | 21265 |  | 
 | 21266 | 	* Tools/idle/PathBrowser.py: | 
 | 21267 | 	- Don't crash in the case where a superclass is a string instead of a | 
 | 21268 | 	pyclbr.Class object; this can happen when the superclass is | 
 | 21269 | 	unrecognizable (to pyclbr), e.g. when module renaming is used. | 
 | 21270 |  | 
 | 21271 | 	- Show a watch cursor when calling pyclbr (since it may take a while | 
 | 21272 | 	recursively parsing imported modules!). | 
 | 21273 |  | 
 | 21274 | Thu Mar 11 16:04:04 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 21275 |  | 
 | 21276 | 	* Lib/mimetypes.py: | 
 | 21277 | 	Added .rdf and .xsl as application/xml types.  (.rdf is for the | 
 | 21278 | 	Resource Description Framework, a metadata encoding, and .xsl is for | 
 | 21279 | 	the Extensible Stylesheet Language.) | 
 | 21280 |  | 
 | 21281 | Thu Mar 11 13:26:23 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21282 |  | 
 | 21283 | 	* Lib/test/output/test_popen2, Lib/test/test_popen2.py: | 
 | 21284 | 	Test for popen2 module, by Chris Tismer. | 
 | 21285 |  | 
 | 21286 | 	* Objects/floatobject.c: | 
 | 21287 | 	Alas, Vladimir's patch caused a bus error (probably double | 
 | 21288 | 	alignment?), and I didn't test it.  Withdrawing it for now. | 
 | 21289 |  | 
 | 21290 | Wed Mar 10 22:55:47 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21291 |  | 
 | 21292 | 	* Objects/floatobject.c: | 
 | 21293 | 	Patch by Vladimir Marangoz to allow freeing of the allocated blocks of | 
 | 21294 | 	floats on finalization. | 
 | 21295 |  | 
 | 21296 | 	* Objects/intobject.c: | 
 | 21297 | 	Patch by Vladimir Marangoz to allow freeing of the allocated blocks of | 
 | 21298 | 	integers on finalization. | 
 | 21299 |  | 
 | 21300 | 	* Tools/idle/EditorWindow.py, Tools/idle/Bindings.py: | 
 | 21301 | 	Add PathBrowser to File module | 
 | 21302 |  | 
 | 21303 | 	* Tools/idle/PathBrowser.py: | 
 | 21304 | 	"Path browser" - 4 scrolled lists displaying: | 
 | 21305 | 	    directories on sys.path | 
 | 21306 | 	    modules in selected directory | 
 | 21307 | 	    classes in selected module | 
 | 21308 | 	    methods of selected class | 
 | 21309 |  | 
 | 21310 | 	Sinlge clicking in a directory, module or class item updates the next | 
 | 21311 | 	column with info about the selected item.  Double clicking in a | 
 | 21312 | 	module, class or method item opens the file (and selects the clicked | 
 | 21313 | 	item if it is a class or method). | 
 | 21314 |  | 
 | 21315 | 	I guess eventually I should be using a tree widget for this, but the | 
 | 21316 | 	ones I've seen don't work well enough, so for now I use the old | 
 | 21317 | 	Smalltalk or NeXT style multi-column hierarchical browser. | 
 | 21318 |  | 
 | 21319 | 	* Tools/idle/MultiScrolledLists.py: | 
 | 21320 | 	New utility: multiple scrolled lists in parallel | 
 | 21321 |  | 
 | 21322 | 	* Tools/idle/ScrolledList.py: - White background. | 
 | 21323 | 	- Display "(None)" (or text of your choosing) when empty. | 
 | 21324 | 	- Don't set the focus. | 
 | 21325 |  | 
 | 21326 | Tue Mar  9 19:31:21 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21327 |  | 
 | 21328 | 	* Lib/urllib.py: | 
 | 21329 | 	open_http also had the 'data is None' test backwards.  don't call with the | 
 | 21330 | 	extra argument if data is None. | 
 | 21331 |  | 
 | 21332 | 	* Demo/embed/demo.c: | 
 | 21333 | 	Call Py_SetProgramName() instead of redefining getprogramname(), | 
 | 21334 | 	reflecting changes in the runtime around 1.5 or earlier. | 
 | 21335 |  | 
 | 21336 | 	* Python/ceval.c: | 
 | 21337 | 	Always test for an error return (usually NULL or -1) without setting | 
 | 21338 | 	an exception. | 
 | 21339 |  | 
 | 21340 | 	* Modules/timemodule.c: Patch by Chris Herborth for BeOS code. | 
 | 21341 | 	He writes: | 
 | 21342 |  | 
 | 21343 | 	I had an off-by-1000 error in floatsleep(), | 
 | 21344 | 	and the problem with time.clock() is that it's not implemented properly | 
 | 21345 | 	on QNX... ANSI says it's supposed to return _CPU_ time used by the | 
 | 21346 | 	process, but on QNX it returns the amount of real time used... so I was | 
 | 21347 | 	confused. | 
 | 21348 |  | 
 | 21349 | 	* Tools/bgen/bgen/macsupport.py: Small change by Jack Jansen. | 
 | 21350 | 	Test for self.returntype behaving like OSErr rather than being it. | 
 | 21351 |  | 
 | 21352 | Thu Feb 25 16:14:58 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us> | 
 | 21353 |  | 
 | 21354 | 	* Lib/urllib.py: | 
 | 21355 | 	http_error had the 'data is None' test backwards.  don't call with the | 
 | 21356 | 	extra argument if data is None. | 
 | 21357 |  | 
 | 21358 | 	* Lib/urllib.py: change indentation from 8 spaces to 4 spaces | 
 | 21359 |  | 
 | 21360 | 	* Lib/urllib.py: pleasing the tabnanny | 
 | 21361 |  | 
 | 21362 | Thu Feb 25 14:26:02 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 21363 |  | 
 | 21364 | 	* Lib/colorsys.py: | 
 | 21365 | 	Oops, one more "x, y, z" to convert... | 
 | 21366 |  | 
 | 21367 | 	* Lib/colorsys.py: | 
 | 21368 | 	Adjusted comment at the top to be less confusing, following Fredrik | 
 | 21369 | 	Lundh's example. | 
 | 21370 |  | 
 | 21371 | 	Converted comment to docstring. | 
 | 21372 |  | 
 | 21373 | Wed Feb 24 18:49:15 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 21374 |  | 
 | 21375 | 	* Lib/toaiff.py: | 
 | 21376 | 	Use sndhdr instead of the obsolete whatsound module. | 
 | 21377 |  | 
 | 21378 | Wed Feb 24 18:42:38 1999  Jeremy Hylton  <jhylton@eric.cnri.reston.va.us> | 
 | 21379 |  | 
 | 21380 | 	* Lib/urllib.py: | 
 | 21381 | 	When performing a POST request, i.e. when the second argument to | 
 | 21382 | 	urlopen is used to specify form data, make sure the second argument is | 
 | 21383 | 	threaded through all of the http_error_NNN calls.  This allows error | 
 | 21384 | 	handlers like the redirect and authorization handlers to properly | 
 | 21385 | 	re-start the connection. | 
 | 21386 |  | 
 | 21387 | Wed Feb 24 16:25:17 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21388 |  | 
 | 21389 | 	* Lib/mhlib.py: Patch by Lars Wirzenius: | 
 | 21390 |  | 
 | 21391 | 		o the initial comment is wrong: creating messages is already | 
 | 21392 | 		  implemented | 
 | 21393 |  | 
 | 21394 | 		o Message.getbodytext: if the mail or it's part contains an | 
 | 21395 | 		  empty content-transfer-encoding header, the code used to | 
 | 21396 | 		  break; the change below treats an empty encoding value the same | 
 | 21397 | 		  as the other types that do not need decoding | 
 | 21398 |  | 
 | 21399 | 		o SubMessage.getbodytext was missing the decode argument; the | 
 | 21400 | 		  change below adds it; I also made it unconditionally return | 
 | 21401 | 		  the raw text if decoding was not desired, because my own | 
 | 21402 | 		  routines needed that (and it was easier than rewriting my | 
 | 21403 | 		  own routines ;-) | 
 | 21404 |  | 
 | 21405 | Wed Feb 24 00:35:43 1999  Barry Warsaw  <bwarsaw@eric.cnri.reston.va.us> | 
 | 21406 |  | 
 | 21407 | 	* Python/bltinmodule.c (initerrors): | 
 | 21408 | 	Make sure that the exception tuples ("base-classes" when | 
 | 21409 | 	string-based exceptions are used) reflect the real class hierarchy, | 
 | 21410 | 	i.e. that SystemExit derives from Exception not StandardError. | 
 | 21411 |  | 
 | 21412 | 	* Lib/exceptions.py: | 
 | 21413 | 	Document the correct class hierarchy for SystemExit.  It is not an | 
 | 21414 | 	error and so it derives from Exception and not SystemError.  The | 
 | 21415 | 	docstring was incorrect but the implementation was fine. | 
 | 21416 |  | 
 | 21417 | Tue Feb 23 23:07:51 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21418 |  | 
 | 21419 | 	* Lib/shutil.py: | 
 | 21420 | 	Add import sys, needed by reference to sys.exc_info() in rmtree(). | 
 | 21421 | 	Discovered by Mitch Chapman. | 
 | 21422 |  | 
 | 21423 | 	* config.h.in: | 
 | 21424 | 	Now that we don't have AC_CHECK_LIB(m, pow), the HAVE_LIBM symbol | 
 | 21425 | 	disappears.  It wasn't used anywhere anyway... | 
 | 21426 |  | 
 | 21427 | 	* Modules/arraymodule.c: | 
 | 21428 | 	Carefully check for overflow when allocating the memory for fromfile | 
 | 21429 | 	-- someone tried to pass in sys.maxint and got bitten by the bogus | 
 | 21430 | 	calculations. | 
 | 21431 |  | 
 | 21432 | 	* configure.in: | 
 | 21433 | 	Get rid of AC_CHECK_LIB(m, pow) since this is taken care of later with | 
 | 21434 | 	LIBM (from --with-libm=...); this actually broke the customizability | 
 | 21435 | 	offered by the latter option.  Thanks go to Clay Spence for reporting | 
 | 21436 | 	this. | 
 | 21437 |  | 
 | 21438 | 	* Lib/test/test_dl.py: | 
 | 21439 | 	1. Print the error message (carefully) when a dl.open() fails in verbose mode. | 
 | 21440 | 	2. When no test case worked, raise ImportError instead of failing. | 
 | 21441 |  | 
 | 21442 | 	* Python/bltinmodule.c: | 
 | 21443 | 	Patch by Tim Peters to improve the range checks for range() and | 
 | 21444 | 	xrange(), especially for platforms where int and long are different | 
 | 21445 | 	sizes (so sys.maxint isn't actually the theoretical limit for the | 
 | 21446 | 	length of a list, but the largest C int is -- sys.maxint is the | 
 | 21447 | 	largest Python int, which is actually a C long). | 
 | 21448 |  | 
 | 21449 | 	* Makefile.in: | 
 | 21450 | 	1. Augment the DG/UX rule so it doesn't break the BeOS build. | 
 | 21451 | 	2. Add $(EXE) to various occurrences of python so it will work on | 
 | 21452 | 	   Cygwin with egcs (after setting EXE=.exe).  These patches by | 
 | 21453 | 	   Norman Vine. | 
 | 21454 |  | 
 | 21455 | 	* Lib/posixfile.py: | 
 | 21456 | 	According to Jeffrey Honig, bsd/os 2.0 - 4.0 should be added to the | 
 | 21457 | 	list (of bsd variants that have a different lock structure). | 
 | 21458 |  | 
 | 21459 | 	* Lib/test/test_fcntl.py: | 
 | 21460 | 	According to Jeffrey Honig, bsd/os 4.0 should be added to the list. | 
 | 21461 |  | 
 | 21462 | 	* Modules/timemodule.c: | 
 | 21463 | 	Patch by Tadayoshi Funaba (with some changes) to be smarter about | 
 | 21464 | 	guessing what happened when strftime() returns 0.  Is it buffer | 
 | 21465 | 	overflow or was the result simply 0 bytes long?  (This happens for an | 
 | 21466 | 	empty format string, or when the format string is a single %Z and the | 
 | 21467 | 	timezone is unknown.)  if the buffer is at least 256 times as long as | 
 | 21468 | 	the format, assume the latter. | 
 | 21469 |  | 
 | 21470 | Mon Feb 22 19:01:42 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21471 |  | 
 | 21472 | 	* Lib/urllib.py: | 
 | 21473 | 	As Des Barry points out, we need to call pathname2url(file) in two | 
 | 21474 | 	calls to addinfourl() in open_file(). | 
 | 21475 |  | 
 | 21476 | 	* Modules/Setup.in: Document *static* -- in two places! | 
 | 21477 |  | 
 | 21478 | 	* Modules/timemodule.c: | 
 | 21479 | 	We don't support leap seconds, so the seconds field of a time 9-tuple | 
 | 21480 | 	should be in the range [0-59].  Noted by Tadayoshi Funaba. | 
 | 21481 |  | 
 | 21482 | 	* Modules/stropmodule.c: | 
 | 21483 | 	In atoi(), don't use isxdigit() to test whether the last character | 
 | 21484 | 	converted was a "digit" -- use isalnum().  This test is there only to | 
 | 21485 | 	guard against "+" or "-" being interpreted as a valid int literal. | 
 | 21486 | 	Reported by Takahiro Nakayama. | 
 | 21487 |  | 
 | 21488 | 	* Lib/os.py: | 
 | 21489 | 	As Finn Bock points out, _P_WAIT etc. don't have a leading underscore | 
 | 21490 | 	so they don't need to be treated specially here. | 
 | 21491 |  | 
 | 21492 | Mon Feb 22 15:38:58 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 21493 |  | 
 | 21494 | 	* Misc/NEWS: | 
 | 21495 | 	Typo:  "apparentlt" --> "apparently" | 
 | 21496 |  | 
 | 21497 | Mon Feb 22 15:38:46 1999  Guido van Rossum  <guido@eric.cnri.reston.va.us> | 
 | 21498 |  | 
 | 21499 | 	* Lib/urlparse.py: Steve Clift pointed out that 'file' allows a netloc. | 
 | 21500 |  | 
 | 21501 | 	* Modules/posixmodule.c: | 
 | 21502 | 	The docstring for ttyname(..) claims a second "mode" argument. The | 
 | 21503 | 	actual code does not allow such an argument.  (Finn Bock.) | 
 | 21504 |  | 
 | 21505 | 	* Lib/lib-old/poly.py: | 
 | 21506 | 	Dang.  Even though this is obsolete code, somebody found a bug, and I | 
 | 21507 | 	fix it.  Oh well. | 
 | 21508 |  | 
 | 21509 | Thu Feb 18 20:51:50 1999  Fred Drake  <fdrake@eric.cnri.reston.va.us> | 
 | 21510 |  | 
 | 21511 | 	* Lib/pyclbr.py: | 
 | 21512 | 	Bow to font-lock at the end of the docstring, since it throws stuff | 
 | 21513 | 	off. | 
 | 21514 |  | 
 | 21515 | 	Make sure the path paramter to readmodule() is a list before adding it | 
 | 21516 | 	with sys.path, or the addition could fail. | 
 | 21517 |  | 
 | 21518 |  | 
 | 21519 | ====================================================================== | 
 | 21520 |  | 
 | 21521 |  | 
 | 21522 | From 1.5.2b1 to 1.5.2b2 | 
 | 21523 | ======================= | 
 | 21524 |  | 
 | 21525 | General | 
 | 21526 | ------- | 
 | 21527 |  | 
 | 21528 | - Many memory leaks fixed. | 
 | 21529 |  | 
 | 21530 | - Many small bugs fixed. | 
 | 21531 |  | 
 | 21532 | - Command line option -OO (or -O -O) suppresses inclusion of doc | 
 | 21533 | strings in resulting bytecode. | 
 | 21534 |  | 
 | 21535 | Windows-specific changes | 
 | 21536 | ------------------------ | 
 | 21537 |  | 
 | 21538 | - New built-in module winsound provides an interface to the Win32 | 
 | 21539 | PlaySound() call. | 
 | 21540 |  | 
 | 21541 | - Re-enable the audioop module in the config.c file. | 
 | 21542 |  | 
 | 21543 | - On Windows, support spawnv() and associated P_* symbols. | 
 | 21544 |  | 
 | 21545 | - Fixed the conversion of times() return values on Windows. | 
 | 21546 |  | 
 | 21547 | - Removed freeze from the installer -- it doesn't work without the | 
 | 21548 | source tree.  (See FAQ 8.11.) | 
 | 21549 |  | 
 | 21550 | - On Windows 95/98, the Tkinter module now is smart enough to find | 
 | 21551 | Tcl/Tk even when the PATH environment variable hasn't been set -- when | 
 | 21552 | the import of _tkinter fails, it searches in a standard locations, | 
 | 21553 | patches os.environ["PATH"], and tries again.  When it still fails, a | 
 | 21554 | clearer error message is produced.  This should avoid most | 
 | 21555 | installation problems with Tkinter use (e.g. in IDLE). | 
 | 21556 |  | 
 | 21557 | - The -i option doesn't make any calls to set[v]buf() for stdin -- | 
 | 21558 | this apparently screwed up _kbhit() and the _tkinter main loop. | 
 | 21559 |  | 
 | 21560 | - The ntpath module (and hence, os.path on Windows) now parses out UNC | 
 | 21561 | paths (e.g. \\host\mountpoint\dir\file) as "drive letters", so that | 
 | 21562 | splitdrive() will \\host\mountpoint as the drive and \dir\file as the | 
 | 21563 | path.  ** EXPERIMENTAL ** | 
 | 21564 |  | 
 | 21565 | - Added a hack to the exit code so that if (1) the exit status is | 
 | 21566 | nonzero and (2) we think we have our own DOS box (i.e. we're not | 
 | 21567 | started from a command line shell), we print a message and wait for | 
 | 21568 | the user to hit a key before the DOS box is closed. | 
 | 21569 |  | 
 | 21570 | - Updated the installer to WISE 5.0g.  Added a dialog warning about | 
 | 21571 | the imminent Tcl installation.  Added a dialog to specify the program | 
 | 21572 | group name in the start menu.  Upgraded the Tcl installer to Tcl | 
 | 21573 | 8.0.4. | 
 | 21574 |  | 
 | 21575 | Changes to intrinsics | 
 | 21576 | --------------------- | 
 | 21577 |  | 
 | 21578 | - The repr() or str() of a module object now shows the __file__ | 
 | 21579 | attribute (i.e., the file which it was loaded), or the string | 
 | 21580 | "(built-in)" if there is no __file__ attribute. | 
 | 21581 |  | 
 | 21582 | - The range() function now avoids overflow during its calculations (if | 
 | 21583 | at all possible). | 
 | 21584 |  | 
 | 21585 | - New info string sys.hexversion, which is an integer encoding the | 
 | 21586 | version in hexadecimal.  In other words, hex(sys.hexversion) == | 
 | 21587 | 0x010502b2 for Python 1.5.2b2. | 
 | 21588 |  | 
 | 21589 | New or improved ports | 
 | 21590 | --------------------- | 
 | 21591 |  | 
 | 21592 | - Support for Nextstep descendants (future Mac systems). | 
 | 21593 |  | 
 | 21594 | - Improved BeOS support. | 
 | 21595 |  | 
 | 21596 | - Support dynamic loading of shared libraries on NetBSD platforms that  | 
 | 21597 | use ELF (i.e., MIPS and Alpha systems). | 
 | 21598 |  | 
 | 21599 | Configuration/build changes | 
 | 21600 | --------------------------- | 
 | 21601 |  | 
 | 21602 | - The Lib/test directory is no longer included in the default module | 
 | 21603 | search path (sys.path) -- "test" has been a package ever since 1.5. | 
 | 21604 |  | 
 | 21605 | - Now using autoconf 2.13. | 
 | 21606 |  | 
 | 21607 | New library modules | 
 | 21608 | ------------------- | 
 | 21609 |  | 
 | 21610 | - New library modules asyncore and asynchat: these form Sam Rushing's | 
 | 21611 | famous asynchronous socket library.  Sam has gracefully allowed me to | 
 | 21612 | incorporate these in the standard Python library. | 
 | 21613 |  | 
 | 21614 | - New module statvfs contains indexing constants for [f]statvfs() | 
 | 21615 | return tuple. | 
 | 21616 |  | 
 | 21617 | Changes to the library | 
 | 21618 | ---------------------- | 
 | 21619 |  | 
 | 21620 | - The wave module (platform-independent support for Windows sound | 
 | 21621 | files) has been fixed to actually make it work. | 
 | 21622 |  | 
 | 21623 | - The sunau module (platform-independent support for Sun/NeXT sound | 
 | 21624 | files) has been fixed to work across platforms.  Also, a weird | 
 | 21625 | encoding bug in the header of the audio test data file has been | 
 | 21626 | corrected. | 
 | 21627 |  | 
 | 21628 | - Fix a bug in the urllib module that occasionally tripped up | 
 | 21629 | webchecker and other ftp retrieves. | 
 | 21630 |  | 
 | 21631 | - ConfigParser's get() method now accepts an optional keyword argument | 
 | 21632 | (vars) that is substituted on top of the defaults that were setup in | 
 | 21633 | __init__.  You can now also have recusive references in your | 
 | 21634 | configuration file. | 
 | 21635 |  | 
 | 21636 | - Some improvements to the Queue module, including a put_nowait() | 
 | 21637 | module and an optional "block" second argument, to get() and put(), | 
 | 21638 | defaulting to 1. | 
 | 21639 |  | 
 | 21640 | - The updated xmllib module is once again compatible with the version | 
 | 21641 | present in Python 1.5.1 (this was accidentally broken in 1.5.2b1). | 
 | 21642 |  | 
 | 21643 | - The bdb module (base class for the debugger) now supports | 
 | 21644 | canonicalizing pathnames used in breakpoints.  The derived class must | 
 | 21645 | override the new canonical() method for this to work.  Also changed | 
 | 21646 | clear_break() to the backwards compatible old signature, and added | 
 | 21647 | clear_bpbynumber() for the new functionality. | 
 | 21648 |  | 
 | 21649 | - In sgmllib (and hence htmllib), recognize attributes even if they | 
 | 21650 | don't have space in front of them.  I.e.  '<a | 
 | 21651 | name="foo"href="bar.html">' will now have two attributes recognized. | 
 | 21652 |  | 
 | 21653 | - In the debugger (pdb), change clear syntax to support three | 
 | 21654 | alternatives: clear; clear file:line; clear bpno bpno ... | 
 | 21655 |  | 
 | 21656 | - The os.path module now pretends to be a submodule within the os | 
 | 21657 | "package", so you can do things like "from os.path import exists". | 
 | 21658 |  | 
 | 21659 | - The standard exceptions now have doc strings. | 
 | 21660 |  | 
 | 21661 | - In the smtplib module, exceptions are now classes.  Also avoid | 
 | 21662 | inserting a non-standard space after "TO" in rcpt() command. | 
 | 21663 |  | 
 | 21664 | - The rfc822 module's getaddrlist() method now uses all occurrences of | 
 | 21665 | the specified header instead of just the first.  Some other bugfixes | 
 | 21666 | too (to handle more weird addresses found in a very large test set, | 
 | 21667 | and to avoid crashes on certain invalid dates), and a small test | 
 | 21668 | module has been added. | 
 | 21669 |  | 
 | 21670 | - Fixed bug in urlparse in the common-case code for HTTP URLs; it | 
 | 21671 | would lose the query, fragment, and/or parameter information. | 
 | 21672 |  | 
 | 21673 | - The sndhdr module no longer supports whatraw() -- it depended on a | 
 | 21674 | rare extenral program. | 
 | 21675 |  | 
 | 21676 | - The UserList module/class now supports the extend() method, like | 
 | 21677 | real list objects. | 
 | 21678 |  | 
 | 21679 | - The uu module now deals better with trailing garbage generated by | 
 | 21680 | some broke uuencoders. | 
 | 21681 |  | 
 | 21682 | - The telnet module now has an my_interact() method which uses threads | 
 | 21683 | instead of select.  The interact() method uses this by default on | 
 | 21684 | Windows (where the single-threaded version doesn't work). | 
 | 21685 |  | 
 | 21686 | - Add a class to mailbox.py for dealing with qmail directory | 
 | 21687 | mailboxes.  The test code was extended to notice these being used as | 
 | 21688 | well. | 
 | 21689 |  | 
 | 21690 | Changes to extension modules | 
 | 21691 | ---------------------------- | 
 | 21692 |  | 
 | 21693 | - Support for the [f]statvfs() system call, where it exists. | 
 | 21694 |  | 
 | 21695 | - Fixed some bugs in cPickle where bad input could cause it to dump | 
 | 21696 | core. | 
 | 21697 |  | 
 | 21698 | - Fixed cStringIO to make the writelines() function actually work. | 
 | 21699 |  | 
 | 21700 | - Added strop.expandtabs() so string.expandtabs() is now much faster. | 
 | 21701 |  | 
 | 21702 | - Added fsync() and fdatasync(), if they appear to exist. | 
 | 21703 |  | 
 | 21704 | - Support for "long files" (64-bit seek pointers). | 
 | 21705 |  | 
 | 21706 | - Fixed a bug in the zlib module's flush() function. | 
 | 21707 |  | 
 | 21708 | - Added access() system call.  It returns 1 if access granted, 0 if | 
 | 21709 | not. | 
 | 21710 |  | 
 | 21711 | - The curses module implements an optional nlines argument to | 
 | 21712 | w.scroll().  (It then calls wscrl(win, nlines) instead of scoll(win).) | 
 | 21713 |  | 
 | 21714 | Changes to tools | 
 | 21715 | ---------------- | 
 | 21716 |  | 
 | 21717 | - Some changes to IDLE; see Tools/idle/NEWS.txt. | 
 | 21718 |  | 
 | 21719 | - Latest version of Misc/python-mode.el included. | 
 | 21720 |  | 
 | 21721 | Changes to Tkinter | 
 | 21722 | ------------------ | 
 | 21723 |  | 
 | 21724 | - Avoid tracebacks when an image is deleted after its root has been | 
 | 21725 | destroyed. | 
 | 21726 |  | 
 | 21727 | Changes to the Python/C API | 
 | 21728 | --------------------------- | 
 | 21729 |  | 
 | 21730 | - When parentheses are used in a PyArg_Parse[Tuple]() call, any | 
 | 21731 | sequence is now accepted, instead of requiring a tuple.  This is in | 
 | 21732 | line with the general trend towards accepting arbitrary sequences. | 
 | 21733 |  | 
 | 21734 | - Added PyModule_GetFilename(). | 
 | 21735 |  | 
 | 21736 | - In PyNumber_Power(), remove unneeded and even harmful test for float | 
 | 21737 | to the negative power (which is already and better done in | 
 | 21738 | floatobject.c). | 
 | 21739 |  | 
 | 21740 | - New version identification symbols; read patchlevel.h for info.  The | 
 | 21741 | version numbers are now exported by Python.h. | 
 | 21742 |  | 
 | 21743 | - Rolled back the API version change -- it's back to 1007! | 
 | 21744 |  | 
 | 21745 | - The frozenmain.c function calls PyInitFrozenExtensions(). | 
 | 21746 |  | 
 | 21747 | - Added 'N' format character to Py_BuildValue -- like 'O' but doesn't | 
 | 21748 | INCREF. | 
 | 21749 |  | 
 | 21750 |  | 
 | 21751 | ====================================================================== | 
 | 21752 |  | 
 | 21753 |  | 
 | 21754 | From 1.5.2a2 to 1.5.2b1 | 
 | 21755 | ======================= | 
 | 21756 |  | 
 | 21757 | Changes to intrinsics | 
 | 21758 | --------------------- | 
 | 21759 |  | 
 | 21760 | - New extension NotImplementedError, derived from RuntimeError.  Not | 
 | 21761 | used, but recommended use is for "abstract" methods to raise this. | 
 | 21762 |  | 
 | 21763 | - The parser will now spit out a warning or error when -t or -tt is | 
 | 21764 | used for parser input coming from a string, too. | 
 | 21765 |  | 
 | 21766 | - The code generator now inserts extra SET_LINENO opcodes when | 
 | 21767 | compiling multi-line argument lists. | 
 | 21768 |  | 
 | 21769 | - When comparing bound methods, use identity test on the objects, not | 
 | 21770 | equality test. | 
 | 21771 |  | 
 | 21772 | New or improved ports | 
 | 21773 | --------------------- | 
 | 21774 |  | 
 | 21775 | - Chris Herborth has redone his BeOS port; it now works on PowerPC | 
 | 21776 | (R3/R4) and x86 (R4 only).  Threads work too in this port. | 
 | 21777 |  | 
 | 21778 | Renaming | 
 | 21779 | -------- | 
 | 21780 |  | 
 | 21781 | - Thanks to Chris Herborth, the thread primitives now have proper Py* | 
 | 21782 | names in the source code (they already had those for the linker, | 
 | 21783 | through some smart macros; but the source still had the old, un-Py | 
 | 21784 | names). | 
 | 21785 |  | 
 | 21786 | Configuration/build changes | 
 | 21787 | --------------------------- | 
 | 21788 |  | 
 | 21789 | - Improved support for FreeBSD/3. | 
 | 21790 |  | 
 | 21791 | - Check for pthread_detach instead of pthread_create in libc. | 
 | 21792 |  | 
 | 21793 | - The makesetup script now searches EXECINCLUDEPY before INCLUDEPY. | 
 | 21794 |  | 
 | 21795 | - Misc/Makefile.pre.in now also looks at Setup.thread and Setup.local. | 
 | 21796 | Otherwise modules such as thread didn't get incorporated in extensions. | 
 | 21797 |  | 
 | 21798 | New library modules | 
 | 21799 | ------------------- | 
 | 21800 |  | 
 | 21801 | - shlex.py by Eric Raymond provides a lexical analyzer class for | 
 | 21802 | simple shell-like syntaxes. | 
 | 21803 |  | 
 | 21804 | - netrc.py by Eric Raymond provides a parser for .netrc files.  (The | 
 | 21805 | undocumented Netrc class in ftplib.py is now obsolete.) | 
 | 21806 |  | 
 | 21807 | - codeop.py is a new module that contains the compile_command() | 
 | 21808 | function that was previously in code.py.  This is so that JPython can | 
 | 21809 | provide its own version of this function, while still sharing the | 
 | 21810 | higher-level classes in code.py. | 
 | 21811 |  | 
 | 21812 | - turtle.py is a new module for simple turtle graphics.  I'm still | 
 | 21813 | working on it; let me know if you use this to teach Python to children  | 
 | 21814 | or other novices without prior programming experience. | 
 | 21815 |  | 
 | 21816 | Obsoleted library modules | 
 | 21817 | ------------------------- | 
 | 21818 |  | 
 | 21819 | - poly.py and zmod.py have been moved to Lib/lib-old to emphasize | 
 | 21820 | their status of obsoleteness.  They don't do a particularly good job | 
 | 21821 | and don't seem particularly relevant to the Python core. | 
 | 21822 |  | 
 | 21823 | New tools | 
 | 21824 | --------- | 
 | 21825 |  | 
 | 21826 | - I've added IDLE: my Integrated DeveLopment Environment for Python. | 
 | 21827 | Requires Tcl/Tk (and Tkinter).  Works on Windows and Unix (and should | 
 | 21828 | work on Macintosh, but I haven't been able to test it there; it does | 
 | 21829 | depend on new features in 1.5.2 and perhaps even new features in | 
 | 21830 | 1.5.2b1, especially the new code module).  This is very much a work in | 
 | 21831 | progress.  I'd like to hear how people like it compared to PTUI (or | 
 | 21832 | any other IDE they are familiar with). | 
 | 21833 |  | 
 | 21834 | - New tools by Barry Warsaw: | 
 | 21835 |  | 
 | 21836 |   = audiopy: controls the Solaris Audio device | 
 | 21837 |   = pynche:  The PYthonically Natural Color and Hue Editor | 
 | 21838 |   = world:   Print mappings between country names and DNS country codes | 
 | 21839 |  | 
 | 21840 | New demos | 
 | 21841 | --------- | 
 | 21842 |  | 
 | 21843 | - Demo/scripts/beer.py prints the lyrics to an arithmetic drinking | 
 | 21844 | song. | 
 | 21845 |  | 
 | 21846 | - Demo/tkinter/guido/optionmenu.py shows how to do an option menu in | 
 | 21847 | Tkinter.  (By Fredrik Lundh -- not by me!) | 
 | 21848 |  | 
 | 21849 | Changes to the library | 
 | 21850 | ---------------------- | 
 | 21851 |  | 
 | 21852 | - compileall.py now avoids recompiling .py files that haven't changed; | 
 | 21853 | it adds a -f option to force recompilation. | 
 | 21854 |  | 
 | 21855 | - New version of xmllib.py by Sjoerd Mullender (0.2 with latest | 
 | 21856 | patches). | 
 | 21857 |  | 
 | 21858 | - nntplib.py: statparse() no longer lowercases the message-id. | 
 | 21859 |  | 
 | 21860 | - types.py: use type(__stdin__) for FileType. | 
 | 21861 |  | 
 | 21862 | - urllib.py: fix translations for filenames with "funny" characters. | 
 | 21863 | Patch by Sjoerd Mullender.  Note that if you subclass one of the | 
 | 21864 | URLopener classes, and you have copied code from the old urllib.py, | 
 | 21865 | your subclass may stop working.  A long-term solution is to provide | 
 | 21866 | more methods so that you don't have to copy code. | 
 | 21867 |  | 
 | 21868 | - cgi.py: In read_multi, allow a subclass to override the class we | 
 | 21869 | instantiate when we create a recursive instance, by setting the class | 
 | 21870 | variable 'FieldStorageClass' to the desired class.  By default, this | 
 | 21871 | is set to None, in which case we use self.__class__ (as before). | 
 | 21872 | Also, a patch by Jim Fulton to pass additional arguments to recursive | 
 | 21873 | calls to the FieldStorage constructor from its read_multi method. | 
 | 21874 |  | 
 | 21875 | - UserList.py: In __getslice__, use self.__class__ instead of | 
 | 21876 | UserList. | 
 | 21877 |  | 
 | 21878 | - In SimpleHTTPServer.py, the server specified in test() should be | 
 | 21879 | BaseHTTPServer.HTTPServer, in case the request handler should want to | 
 | 21880 | reference the two attributes added by BaseHTTPServer.server_bind.  (By | 
 | 21881 | Jeff Rush, for Bobo).  Also open the file in binary mode, so serving | 
 | 21882 | images from a Windows box might actually work. | 
 | 21883 |  | 
 | 21884 | - In CGIHTTPServer.py, the list of acceptable formats is -split- | 
 | 21885 | on spaces but -joined- on commas, resulting in double commas | 
 | 21886 | in the joined text.  (By Jeff Rush.) | 
 | 21887 |  | 
 | 21888 | - SocketServer.py, patch by Jeff Bauer: a minor change to declare two | 
 | 21889 | new threaded versions of Unix Server classes, using the ThreadingMixIn | 
 | 21890 | class: ThreadingUnixStreamServer, ThreadingUnixDatagramServer. | 
 | 21891 |  | 
 | 21892 | - bdb.py: fix bomb on deleting a temporary breakpoint: there's no | 
 | 21893 | method do_delete(); do_clear() was meant.  By Greg Ward. | 
 | 21894 |  | 
 | 21895 | - getopt.py: accept a non-list sequence for the long options (request | 
 | 21896 | by Jack Jansen).  Because it might be a common mistake to pass a | 
 | 21897 | single string, this situation is treated separately.  Also added | 
 | 21898 | docstrings (copied from the library manual) and removed the (now | 
 | 21899 | redundant) module comments. | 
 | 21900 |  | 
 | 21901 | - tempfile.py: improvements to avoid security leaks. | 
 | 21902 |  | 
 | 21903 | - code.py: moved compile_command() to new module codeop.py. | 
 | 21904 |  | 
 | 21905 | - pickle.py: support pickle format 1.3 (binary float added).  By Jim | 
 | 21906 | Fulton. Also get rid of the undocumented obsolete Pickler dump_special | 
 | 21907 | method. | 
 | 21908 |  | 
 | 21909 | - uu.py: Move 'import sys' to top of module, as noted by Tim Peters. | 
 | 21910 |  | 
 | 21911 | - imaplib.py: fix problem with some versions of IMAP4 servers that | 
 | 21912 | choose to mix the case in their CAPABILITIES response. | 
 | 21913 |  | 
 | 21914 | - cmp.py: use (f1, f2) as cache key instead of f1 + ' ' + f2.  Noted | 
 | 21915 | by Fredrik Lundh. | 
 | 21916 |  | 
 | 21917 | Changes to extension modules | 
 | 21918 | ---------------------------- | 
 | 21919 |  | 
 | 21920 | - More doc strings for several modules were contributed by Chris | 
 | 21921 | Petrilli: math, cmath, fcntl. | 
 | 21922 |  | 
 | 21923 | - Fixed a bug in zlibmodule.c that could cause core dumps on | 
 | 21924 | decompression of rarely occurring input. | 
 | 21925 |  | 
 | 21926 | - cPickle.c: new version from Jim Fulton, with Open Source copyright | 
 | 21927 | notice.  Also, initialize self->safe_constructors early on to prevent | 
 | 21928 | crash in early dealloc. | 
 | 21929 |  | 
 | 21930 | - cStringIO.c: new version from Jim Fulton, with Open Source copyright | 
 | 21931 | notice.  Also fixed a core dump in cStringIO.c when doing seeks. | 
 | 21932 |  | 
 | 21933 | - mpzmodule.c: fix signed character usage in mpz.mpz(stringobjecty). | 
 | 21934 |  | 
 | 21935 | - readline.c: Bernard Herzog pointed out that rl_parse_and_bind | 
 | 21936 | modifies its argument string (bad function!), so we make a temporary | 
 | 21937 | copy. | 
 | 21938 |  | 
 | 21939 | - sunaudiodev.c: Barry Warsaw added more smarts to get the device and | 
 | 21940 | control pseudo-device, per audio(7I). | 
 | 21941 |  | 
 | 21942 | Changes to tools | 
 | 21943 | ---------------- | 
 | 21944 |  | 
 | 21945 | - New, improved version of Barry Warsaw's Misc/python-mode.el (editing  | 
 | 21946 | support for Emacs). | 
 | 21947 |  | 
 | 21948 | - tabnanny.py: added a -q ('quiet') option to tabnanny, which causes | 
 | 21949 | only the names of offending files to be printed. | 
 | 21950 |  | 
 | 21951 | - freeze: when printing missing modules, also print the module they | 
 | 21952 | were imported from. | 
 | 21953 |  | 
 | 21954 | - untabify.py: patch by Detlef Lannert to implement -t option | 
 | 21955 | (set tab size). | 
 | 21956 |  | 
 | 21957 | Changes to Tkinter | 
 | 21958 | ------------------ | 
 | 21959 |  | 
 | 21960 | - grid_bbox(): support new Tk API: grid bbox ?column row? ?column2 | 
 | 21961 | row2? | 
 | 21962 |  | 
 | 21963 | - _tkinter.c: RajGopal Srinivasan noted that the latest code (1.5.2a2) | 
 | 21964 | doesn't work when running in a non-threaded environment.  He added | 
 | 21965 | some #ifdefs that fix this. | 
 | 21966 |  | 
 | 21967 | Changes to the Python/C API | 
 | 21968 | --------------------------- | 
 | 21969 |  | 
 | 21970 | - Bumped API version number to 1008 -- enough things have changed! | 
 | 21971 |  | 
 | 21972 | - There's a new macro, PyThreadState_GET(), which does the same work | 
 | 21973 | as PyThreadState_Get() without the overhead of a function call (it | 
 | 21974 | also avoids the error check).  The two top calling locations of | 
 | 21975 | PyThreadState_Get() have been changed to use this macro. | 
 | 21976 |  | 
 | 21977 | - All symbols intended for export from a DLL or shared library are now | 
 | 21978 | marked as such (with the DL_IMPORT() macro) in the header file that | 
 | 21979 | declares them.  This was needed for the BeOS port, and should also | 
 | 21980 | make some other ports easier.  The PC port no longer needs the file | 
 | 21981 | with exported symbols (PC/python_nt.def).  There's also a DL_EXPORT | 
 | 21982 | macro which is only used for init methods in extension modules, and | 
 | 21983 | for Py_Main(). | 
 | 21984 |  | 
 | 21985 | Invisible changes to internals | 
 | 21986 | ------------------------------ | 
 | 21987 |  | 
 | 21988 | - Fixed a bug in new_buffersize() in fileobject.c which could | 
 | 21989 | return a buffer size that was way too large. | 
 | 21990 |  | 
 | 21991 | - Use PySys_WriteStderr instead of fprintf in most places. | 
 | 21992 |  | 
 | 21993 | - dictobject.c: remove dead code discovered by Vladimir Marangozov. | 
 | 21994 |  | 
 | 21995 | - tupleobject.c: make tuples less hungry -- an extra item was | 
 | 21996 | allocated but never used.  Tip by Vladimir Marangozov. | 
 | 21997 |  | 
 | 21998 | - mymath.h: Metrowerks PRO4 finally fixes the hypot snafu.  (Jack | 
 | 21999 | Jansen) | 
 | 22000 |  | 
 | 22001 | - import.c: Jim Fulton fixes a reference count bug in | 
 | 22002 | PyEval_GetGlobals. | 
 | 22003 |  | 
 | 22004 | - glmodule.c: check in the changed version after running the stubber | 
 | 22005 | again -- this solves the conflict with curses over the 'clear' entry | 
 | 22006 | point much nicer.  (Jack Jansen had checked in the changes to cstubs | 
 | 22007 | eons ago, but I never regenrated glmodule.c :-( ) | 
 | 22008 |  | 
 | 22009 | - frameobject.c: fix reference count bug in PyFrame_New.  Vladimir | 
 | 22010 | Marangozov. | 
 | 22011 |  | 
 | 22012 | - stropmodule.c: add a missing DECREF in an error exit.  Submitted by | 
 | 22013 | Jonathan Giddy. | 
 | 22014 |  | 
 | 22015 |  | 
 | 22016 | ====================================================================== | 
 | 22017 |  | 
 | 22018 |  | 
 | 22019 | From 1.5.2a1 to 1.5.2a2 | 
 | 22020 | ======================= | 
 | 22021 |  | 
 | 22022 | General | 
 | 22023 | ------- | 
 | 22024 |  | 
 | 22025 | - It is now a syntax error to have a function argument without a | 
 | 22026 | default following one with a default. | 
 | 22027 |  | 
 | 22028 | - __file__ is now set to the .py file if it was parsed (it used to | 
 | 22029 | always be the .pyc/.pyo file). | 
 | 22030 |  | 
 | 22031 | - Don't exit with a fatal error during initialization when there's a | 
 | 22032 | problem with the exceptions.py module. | 
 | 22033 |  | 
 | 22034 | - New environment variable PYTHONOPTIMIZE can be used to set -O. | 
 | 22035 |  | 
 | 22036 | - New version of python-mode.el for Emacs. | 
 | 22037 |  | 
 | 22038 | Miscellaneous fixed bugs | 
 | 22039 | ------------------------ | 
 | 22040 |  | 
 | 22041 | - No longer print the (confusing) error message about stack underflow | 
 | 22042 | while compiling. | 
 | 22043 |  | 
 | 22044 | - Some threading and locking bugs fixed. | 
 | 22045 |  | 
 | 22046 | - When errno is zero, report "Error", not "Success". | 
 | 22047 |  | 
 | 22048 | Documentation | 
 | 22049 | ------------- | 
 | 22050 |  | 
 | 22051 | - Documentation will be released separately. | 
 | 22052 |  | 
 | 22053 | - Doc strings added to array and md5 modules by Chris Petrilli. | 
 | 22054 |  | 
 | 22055 | Ports and build procedure | 
 | 22056 | ------------------------- | 
 | 22057 |  | 
 | 22058 | - Stop installing when a move or copy fails. | 
 | 22059 |  | 
 | 22060 | - New version of the OS/2 port code by Jeff Rush. | 
 | 22061 |  | 
 | 22062 | - The makesetup script handles absolute filenames better. | 
 | 22063 |  | 
 | 22064 | - The 'new' module is now enabled by default in the Setup file. | 
 | 22065 |  | 
 | 22066 | - I *think* I've solved the problem with the Linux build blowing up | 
 | 22067 | sometimes due to a conflict between sigcheck/intrcheck and | 
 | 22068 | signalmodule. | 
 | 22069 |  | 
 | 22070 | Built-in functions | 
 | 22071 | ------------------ | 
 | 22072 |  | 
 | 22073 | - The second argument to apply() can now be any sequence, not just a | 
 | 22074 | tuple. | 
 | 22075 |  | 
 | 22076 | Built-in types | 
 | 22077 | -------------- | 
 | 22078 |  | 
 | 22079 | - Lists have a new method: L1.extend(L2) is equivalent to the common | 
 | 22080 | idiom L1[len(L1):] = L2. | 
 | 22081 |  | 
 | 22082 | - Better error messages when a sequence is indexed with a non-integer. | 
 | 22083 |  | 
 | 22084 | - Bettter error message when calling a non-callable object (include | 
 | 22085 | the type in the message). | 
 | 22086 |  | 
 | 22087 | Python services | 
 | 22088 | --------------- | 
 | 22089 |  | 
 | 22090 | - New version of cPickle.c fixes some bugs. | 
 | 22091 |  | 
 | 22092 | - pickle.py: improved instantiation error handling. | 
 | 22093 |  | 
 | 22094 | - code.py: reworked quite a bit.  New base class | 
 | 22095 | InteractiveInterpreter and derived class InteractiveConsole.  Fixed | 
 | 22096 | several problems in compile_command(). | 
 | 22097 |  | 
 | 22098 | - py_compile.py: print error message and continue on syntax errors. | 
 | 22099 | Also fixed an old bug with the fstat code (it was never used). | 
 | 22100 |  | 
 | 22101 | - pyclbr.py: support submodules of packages. | 
 | 22102 |  | 
 | 22103 | String Services | 
 | 22104 | --------------- | 
 | 22105 |  | 
 | 22106 | - StringIO.py: raise the right exception (ValueError) for attempted | 
 | 22107 | I/O on closed StringIO objects. | 
 | 22108 |  | 
 | 22109 | - re.py: fixed a bug in subn(), which caused .groups() to fail inside | 
 | 22110 | the replacement function called by sub(). | 
 | 22111 |  | 
 | 22112 | - The struct module has a new format 'P': void * in native mode. | 
 | 22113 |  | 
 | 22114 | Generic OS Services | 
 | 22115 | ------------------- | 
 | 22116 |  | 
 | 22117 | - Module time: Y2K robustness.  2-digit year acceptance depends on | 
 | 22118 | value of time.accept2dyear, initialized from env var PYTHONY2K, | 
 | 22119 | default 0.  Years 00-68 mean 2000-2068, while 69-99 mean 1969-1999 | 
 | 22120 | (POSIX or X/Open recommendation). | 
 | 22121 |  | 
 | 22122 | - os.path: normpath(".//x") should return "x", not "/x". | 
 | 22123 |  | 
 | 22124 | - getpass.py: fall back on default_getpass() when sys.stdin.fileno() | 
 | 22125 | doesn't work. | 
 | 22126 |  | 
 | 22127 | - tempfile.py: regenerate the template after a fork() call. | 
 | 22128 |  | 
 | 22129 | Optional OS Services | 
 | 22130 | -------------------- | 
 | 22131 |  | 
 | 22132 | - In the signal module, disable restarting interrupted system calls | 
 | 22133 | when we have siginterrupt(). | 
 | 22134 |  | 
 | 22135 | Debugger | 
 | 22136 | -------- | 
 | 22137 |  | 
 | 22138 | - No longer set __args__; this feature is no longer supported and can | 
 | 22139 | affect the debugged code. | 
 | 22140 |  | 
 | 22141 | - cmd.py, pdb.py and bdb.py have been overhauled by Richard Wolff, who | 
 | 22142 | added aliases and some other useful new features, e.g. much better | 
 | 22143 | breakpoint support: temporary breakpoint, disabled breakpoints, | 
 | 22144 | breakpoints with ignore counts, and conditions; breakpoints can be set | 
 | 22145 | on a file before it is loaded. | 
 | 22146 |  | 
 | 22147 | Profiler | 
 | 22148 | -------- | 
 | 22149 |  | 
 | 22150 | - Changes so that JPython can use it.  Also fix the calibration code | 
 | 22151 | so it actually works again | 
 | 22152 | . | 
 | 22153 | Internet Protocols and Support | 
 | 22154 | ------------------------------ | 
 | 22155 |  | 
 | 22156 | - imaplib.py: new version from Piers Lauder. | 
 | 22157 |  | 
 | 22158 | - smtplib.py: change sendmail() method to accept a single string or a | 
 | 22159 | list or strings as the destination (commom newbie mistake). | 
 | 22160 |  | 
 | 22161 | - poplib.py: LIST with a msg argument fixed. | 
 | 22162 |  | 
 | 22163 | - urlparse.py: some optimizations for common case (http). | 
 | 22164 |  | 
 | 22165 | - urllib.py: support content-length in info() for ftp protocol; | 
 | 22166 | support for a progress meter through a third argument to | 
 | 22167 | urlretrieve(); commented out gopher test (the test site is dead). | 
 | 22168 |  | 
 | 22169 | Internet Data handling | 
 | 22170 | ---------------------- | 
 | 22171 |  | 
 | 22172 | - sgmllib.py: support tags with - or . in their name. | 
 | 22173 |  | 
 | 22174 | - mimetypes.py: guess_type() understands 'data' URLs. | 
 | 22175 |  | 
 | 22176 | Restricted Execution | 
 | 22177 | -------------------- | 
 | 22178 |  | 
 | 22179 | - The classes rexec.RModuleLoader and rexec.RModuleImporter no | 
 | 22180 | longer exist. | 
 | 22181 |  | 
 | 22182 | Tkinter | 
 | 22183 | ------- | 
 | 22184 |  | 
 | 22185 | - When reporting an exception, store its info in sys.last_*.  Also, | 
 | 22186 | write all of it to stderr. | 
 | 22187 |  | 
 | 22188 | - Added NS, EW, and NSEW constants, for grid's sticky option. | 
 | 22189 |  | 
 | 22190 | - Fixed last-minute bug in 1.5.2a1 release: need to include "mytime.h". | 
 | 22191 |  | 
 | 22192 | - Make bind variants without a sequence return a tuple of sequences | 
 | 22193 | (formerly it returned a string, which wasn't very convenient). | 
 | 22194 |  | 
 | 22195 | - Add image commands to the Text widget (these are new in Tk 8.0). | 
 | 22196 |  | 
 | 22197 | - Added new listbox and canvas methods: {xview,yview}_{scroll,moveto}.) | 
 | 22198 |  | 
 | 22199 | - Improved the thread code (but you still can't call update() from | 
 | 22200 | another thread on Windows). | 
 | 22201 |  | 
 | 22202 | - Fixed unnecessary references to _default_root in the new dialog | 
 | 22203 | modules. | 
 | 22204 |  | 
 | 22205 | - Miscellaneous problems fixed. | 
 | 22206 |  | 
 | 22207 |  | 
 | 22208 | Windows General | 
 | 22209 | --------------- | 
 | 22210 |  | 
 | 22211 | - Call LoadLibraryEx(..., ..., LOAD_WITH_ALTERED_SEARCH_PATH) to | 
 | 22212 | search for dependent dlls in the directory containing the .pyd. | 
 | 22213 |  | 
 | 22214 | - In debugging mode, call DebugBreak() in Py_FatalError(). | 
 | 22215 |  | 
 | 22216 | Windows Installer | 
 | 22217 | ----------------- | 
 | 22218 |  | 
 | 22219 | - Install zlib.dll in the DLLs directory instead of in the win32 | 
 | 22220 | system directory, to avoid conflicts with other applications that have  | 
 | 22221 | their own zlib.dll. | 
 | 22222 |  | 
 | 22223 | Test Suite | 
 | 22224 | ---------- | 
 | 22225 |  | 
 | 22226 | - test_long.py: new test for long integers, by Tim Peters. | 
 | 22227 |  | 
 | 22228 | - regrtest.py: improved so it can be used for other test suites as | 
 | 22229 | well. | 
 | 22230 |  | 
 | 22231 | - test_strftime.py: use re to compare test results, to support legal | 
 | 22232 | variants (e.g. on Linux). | 
 | 22233 |  | 
 | 22234 | Tools and Demos | 
 | 22235 | --------------- | 
 | 22236 |  | 
 | 22237 | - Four new scripts in Tools/scripts: crlf.py and lfcr.py (to | 
 | 22238 | remove/add Windows style '\r\n' line endings), untabify.py (to remove | 
 | 22239 | tabs), and rgrep.yp (reverse grep). | 
 | 22240 |  | 
 | 22241 | - Improvements to Tools/freeze/.  Each Python module is now written to | 
 | 22242 | its own C file.  This prevents some compilers or assemblers from | 
 | 22243 | blowing up on large frozen programs, and saves recompilation time if | 
 | 22244 | only a few modules are changed.  Other changes too, e.g. new command | 
 | 22245 | line options -x and -i. | 
 | 22246 |  | 
 | 22247 | - Much improved (and smaller!) version of Tools/scripts/mailerdaemon.py. | 
 | 22248 |  | 
 | 22249 | Python/C API | 
 | 22250 | ------------ | 
 | 22251 |  | 
 | 22252 | - New mechanism to support extensions of the type object while | 
 | 22253 | remaining backward compatible with extensions compiled for previous | 
 | 22254 | versions of Python 1.5.  A flags field indicates presence of certain | 
 | 22255 | fields. | 
 | 22256 |  | 
 | 22257 | - Addition to the buffer API to differentiate access to bytes and | 
 | 22258 | 8-bit characters (in anticipation of Unicode characters). | 
 | 22259 |  | 
 | 22260 | - New argument parsing format t# ("text") to indicate 8-bit | 
 | 22261 | characters; s# simply means 8-bit bytes, for backwards compatibility. | 
 | 22262 |  | 
 | 22263 | - New object type, bufferobject.c is an example and can be used to | 
 | 22264 | create buffers from memory. | 
 | 22265 |  | 
 | 22266 | - Some support for 64-bit longs, including some MS platforms. | 
 | 22267 |  | 
 | 22268 | - Many calls to fprintf(stderr, ...) have been replaced with calls to | 
 | 22269 | PySys_WriteStderr(...). | 
 | 22270 |  | 
 | 22271 | - The calling context for PyOS_Readline() has changed: it must now be | 
 | 22272 | called with the interpreter lock held!  It releases the lock around | 
 | 22273 | the call to the function pointed to by PyOS_ReadlineFunctionPointer | 
 | 22274 | (default PyOS_StdioReadline()). | 
 | 22275 |  | 
 | 22276 | - New APIs PyLong_FromVoidPtr() and PyLong_AsVoidPtr(). | 
 | 22277 |  | 
 | 22278 | - Renamed header file "thread.h" to "pythread.h". | 
 | 22279 |  | 
 | 22280 | - The code string of code objects may now be anything that supports the | 
 | 22281 | buffer API. | 
 | 22282 |  | 
 | 22283 |  | 
 | 22284 | ====================================================================== | 
 | 22285 |  | 
 | 22286 |  | 
 | 22287 | From 1.5.1 to 1.5.2a1 | 
 | 22288 | ===================== | 
 | 22289 |  | 
 | 22290 | General | 
 | 22291 | ------- | 
 | 22292 |  | 
 | 22293 | - When searching for the library, a landmark that is a compiled module | 
 | 22294 | (string.pyc or string.pyo) is also accepted. | 
 | 22295 |  | 
 | 22296 | - When following symbolic links to the python executable, use a loop | 
 | 22297 | so that a symlink to a symlink can work. | 
 | 22298 |  | 
 | 22299 | - Added a hack so that when you type 'quit' or 'exit' at the | 
 | 22300 | interpreter, you get a friendly explanation of how to press Ctrl-D (or  | 
 | 22301 | Ctrl-Z) to exit. | 
 | 22302 |  | 
 | 22303 | - New and improved Misc/python-mode.el (Python mode for Emacs). | 
 | 22304 |  | 
 | 22305 | - Revert a new feature in Unix dynamic loading: for one or two | 
 | 22306 | revisions, modules were loaded using the RTLD_GLOBAL flag.  It turned | 
 | 22307 | out to be a bad idea. | 
 | 22308 |  | 
 | 22309 | Miscellaneous fixed bugs | 
 | 22310 | ------------------------ | 
 | 22311 |  | 
 | 22312 | - All patches on the patch page have been integrated.  (But much more | 
 | 22313 | has been done!) | 
 | 22314 |  | 
 | 22315 | - Several memory leaks plugged (e.g. the one for classes with a | 
 | 22316 | __getattr__ method). | 
 | 22317 |  | 
 | 22318 | - Removed the only use of calloc().  This triggered an obscure bug on | 
 | 22319 | multiprocessor Sparc Solaris 2.6. | 
 | 22320 |  | 
 | 22321 | - Fix a peculiar bug that would allow "import sys.time" to succeed | 
 | 22322 | (believing the built-in time module to be a part of the sys package). | 
 | 22323 |  | 
 | 22324 | - Fix a bug in the overflow checking when converting a Python long to | 
 | 22325 | a C long (failed to convert -2147483648L, and some other cases). | 
 | 22326 |  | 
 | 22327 | Documentation | 
 | 22328 | ------------- | 
 | 22329 |  | 
 | 22330 | - Doc strings have been added to many extension modules: __builtin__, | 
 | 22331 | errno, select, signal, socket, sys, thread, time.  Also to methods of | 
 | 22332 | list objects (try [].append.__doc__).  A doc string on a type will now | 
 | 22333 | automatically be propagated to an instance if the instance has methods | 
 | 22334 | that are accessed in the usual way. | 
 | 22335 |  | 
 | 22336 | - The documentation has been expanded and the formatting improved. | 
 | 22337 | (Remember that the documentation is now unbundled and has its own | 
 | 22338 | release cycle though; see http://www.python.org/doc/.) | 
 | 22339 |  | 
 | 22340 | - Added Misc/Porting -- a mini-FAQ on porting to a new platform. | 
 | 22341 |  | 
 | 22342 | Ports and build procedure | 
 | 22343 | ------------------------- | 
 | 22344 |  | 
 | 22345 | - The BeOS port is now integrated.  Courtesy Chris Herborth. | 
 | 22346 |  | 
 | 22347 | - Symbol files for FreeBSD 2.x and 3.x have been contributed | 
 | 22348 | (Lib/plat-freebsd[23]/*). | 
 | 22349 |  | 
 | 22350 | - Support HPUX 10.20 DCE threads. | 
 | 22351 |  | 
 | 22352 | - Finally fixed the configure script so that (on SGI) if -OPT:Olimit=0 | 
 | 22353 | works, it won't also use -Olimit 1500 (which gives a warning for every | 
 | 22354 | file).  Also support the SGI_ABI environment variable better. | 
 | 22355 |  | 
 | 22356 | - The makesetup script now understands absolute pathnames ending in .o | 
 | 22357 | in the module -- it assumes it's a file for which we have no source. | 
 | 22358 |  | 
 | 22359 | - Other miscellaneous improvements to the configure script and | 
 | 22360 | Makefiles. | 
 | 22361 |  | 
 | 22362 | - The test suite now uses a different sound sample. | 
 | 22363 |  | 
 | 22364 | Built-in functions | 
 | 22365 | ------------------ | 
 | 22366 |  | 
 | 22367 | - Better checks for invalid input to int(), long(), string.atoi(), | 
 | 22368 | string.atol().  (Formerly, a sign without digits would be accepted as | 
 | 22369 | a legal ways to spell zero.) | 
 | 22370 |  | 
 | 22371 | - Changes to map() and filter() to use the length of a sequence only | 
 | 22372 | as a hint -- if an IndexError happens earlier, take that.  (Formerly, | 
 | 22373 | this was considered an error.) | 
 | 22374 |  | 
 | 22375 | - Experimental feature in getattr(): a third argument can specify a | 
 | 22376 | default (instead of raising AttributeError). | 
 | 22377 |  | 
 | 22378 | - Implement round() slightly different, so that for negative ndigits | 
 | 22379 | no additional errors happen in the last step. | 
 | 22380 |  | 
 | 22381 | - The open() function now adds the filename to the exception when it | 
 | 22382 | fails. | 
 | 22383 |  | 
 | 22384 | Built-in exceptions | 
 | 22385 | ------------------- | 
 | 22386 |  | 
 | 22387 | - New standard exceptions EnvironmentError and PosixError. | 
 | 22388 | EnvironmentError is the base class for IOError and PosixError; | 
 | 22389 | PosixError is the same as os.error.  All this so that either exception | 
 | 22390 | class can be instantiated with a third argument indicating a filename. | 
 | 22391 | The built-in function open() and most os/posix functions that take a | 
 | 22392 | filename argument now use this. | 
 | 22393 |  | 
 | 22394 | Built-in types | 
 | 22395 | -------------- | 
 | 22396 |  | 
 | 22397 | - List objects now have an experimental pop() method; l.pop() returns | 
 | 22398 | and removes the last item; l.pop(i) returns and removes the item at | 
 | 22399 | i.  Also, the sort() method is faster again.  Sorting is now also | 
 | 22400 | safer: it is impossible for the sorting function to modify the list | 
 | 22401 | while the sort is going on (which could cause core dumps). | 
 | 22402 |  | 
 | 22403 | - Changes to comparisons: numbers are now smaller than any other type. | 
 | 22404 | This is done to prevent the circularity where [] < 0L < 1 < [] is | 
 | 22405 | true.  As a side effect, cmp(None, 0) is now positive instead of | 
 | 22406 | negative.  This *shouldn't* affect any working code, but I've found | 
 | 22407 | that the change caused several "sleeping" bugs to become active, so | 
 | 22408 | beware! | 
 | 22409 |  | 
 | 22410 | - Instance methods may now have other callable objects than just | 
 | 22411 | Python functions as their im_func.  Use new.instancemethod() or write | 
 | 22412 | your own C code to create them; new.instancemethod() may be called | 
 | 22413 | with None for the instance to create an unbound method. | 
 | 22414 |  | 
 | 22415 | - Assignment to __name__, __dict__ or __bases__ of a class object is | 
 | 22416 | now allowed (with stringent type checks); also allow assignment to | 
 | 22417 | __getattr__ etc.  The cached values for __getattr__ etc. are | 
 | 22418 | recomputed after such assignments (but not for derived classes :-( ). | 
 | 22419 |  | 
 | 22420 | - Allow assignment to some attributes of function objects: func_code, | 
 | 22421 | func_defaults and func_doc / __doc__.  (With type checks except for | 
 | 22422 | __doc__ / func_doc .) | 
 | 22423 |  | 
 | 22424 | Python services | 
 | 22425 | --------------- | 
 | 22426 |  | 
 | 22427 | - New tests (in Lib/test): reperf.py (regular expression benchmark), | 
 | 22428 | sortperf.py (list sorting benchmark), test_MimeWriter.py (test case | 
 | 22429 | for the MimeWriter module). | 
 | 22430 |  | 
 | 22431 | - Generalized test/regrtest.py so that it is useful for testing other | 
 | 22432 | packages. | 
 | 22433 |  | 
 | 22434 | - The ihooks.py module now understands package imports. | 
 | 22435 |  | 
 | 22436 | - In code.py, add a class that subsumes Fredrik Lundh's | 
 | 22437 | PythonInterpreter class.  The interact() function now uses this. | 
 | 22438 |  | 
 | 22439 | - In rlcompleter.py, in completer(), return None instead of raising an | 
 | 22440 | IndexError when there are no more completions left. | 
 | 22441 |  | 
 | 22442 | - Fixed the marshal module to test for certain common kinds of invalid | 
 | 22443 | input.  (It's still not foolproof!) | 
 | 22444 |  | 
 | 22445 | - In the operator module, add an alias (now the preferred name) | 
 | 22446 | "contains" for "sequenceincludes". | 
 | 22447 |  | 
 | 22448 | String Services | 
 | 22449 | --------------- | 
 | 22450 |  | 
 | 22451 | - In the string and strop modules, in the replace() function, treat an | 
 | 22452 | empty pattern as an error (since it's not clear what was meant!). | 
 | 22453 |  | 
 | 22454 | - Some speedups to re.py, especially the string substitution and split | 
 | 22455 | functions.  Also added new function/method findall(), to find all | 
 | 22456 | occurrences of a given substring. | 
 | 22457 |  | 
 | 22458 | - In cStringIO, add better argument type checking and support the | 
 | 22459 | readonly 'closed' attribute (like regular files). | 
 | 22460 |  | 
 | 22461 | - In the struct module, unsigned 1-2 byte sized formats no longer | 
 | 22462 | result in long integer values. | 
 | 22463 |  | 
 | 22464 | Miscellaneous services | 
 | 22465 | ---------------------- | 
 | 22466 |  | 
 | 22467 | - In whrandom.py, added new method and function randrange(), same as | 
 | 22468 | choice(range(start, stop, step)) but faster.  This addresses the | 
 | 22469 | problem that randint() was accidentally defined as taking an inclusive | 
 | 22470 | range.  Also, randint(a, b) is now redefined as randrange(a, b+1), | 
 | 22471 | adding extra range and type checking to its arguments! | 
 | 22472 |  | 
 | 22473 | - Add some semi-thread-safety to random.gauss() (it used to be able to  | 
 | 22474 | crash when invoked from separate threads; now the worst it can do is | 
 | 22475 | give a duplicate result occasionally). | 
 | 22476 |  | 
 | 22477 | - Some restructuring and generalization done to cmd.py. | 
 | 22478 |  | 
 | 22479 | - Major upgrade to ConfigParser.py; converted to using 're', added new  | 
 | 22480 | exceptions, support underscore in section header and option name.  No | 
 | 22481 | longer add 'name' option to every section; instead, add '__name__'. | 
 | 22482 |  | 
 | 22483 | - In getpass.py, don't use raw_input() to ask for the password -- we | 
 | 22484 | don't want it to show up in the readline history!  Also don't catch | 
 | 22485 | interrupts (the try-finally already does all necessary cleanup). | 
 | 22486 |  | 
 | 22487 | Generic OS Services | 
 | 22488 | ------------------- | 
 | 22489 |  | 
 | 22490 | - New functions in os.py: makedirs(), removedirs(), renames().  New | 
 | 22491 | variable: linesep (the line separator as found in binary files, | 
 | 22492 | i.e. '\n' on Unix, '\r\n' on DOS/Windows, '\r' on Mac.  Do *not* use | 
 | 22493 | this with files opened in (default) text mode; the line separator used | 
 | 22494 | will always be '\n'! | 
 | 22495 |  | 
 | 22496 | - Changes to the 'os.path' submodule of os.py: added getsize(), | 
 | 22497 | getmtime(), getatime() -- these fetch the most popular items from the | 
 | 22498 | stat return tuple. | 
 | 22499 |  | 
 | 22500 | - In the time module, add strptime(), if it exists.  (This parses a | 
 | 22501 | time according to a format -- the inverse of strftime().)  Also, | 
 | 22502 | remove the call to mktime() from strftime() -- it messed up the | 
 | 22503 | formatting of some non-local times. | 
 | 22504 |  | 
 | 22505 | - In the socket module, added a new function gethostbyname_ex(). | 
 | 22506 | Also, don't use #ifdef to test for some symbols that are enums on some | 
 | 22507 | platforms (and should exist everywhere). | 
 | 22508 |  | 
 | 22509 | Optional OS Services | 
 | 22510 | -------------------- | 
 | 22511 |  | 
 | 22512 | - Some fixes to gzip.py.  In particular, the readlines() method now | 
 | 22513 | returns the lines *with* trailing newline characters, like readlines() | 
 | 22514 | of regular file objects.  Also, it didn't work together with cPickle; | 
 | 22515 | fixed that. | 
 | 22516 |  | 
 | 22517 | - In whichdb.py, support byte-swapped dbhash (bsddb) files. | 
 | 22518 |  | 
 | 22519 | - In anydbm.py, look at the type of an existing database to determine | 
 | 22520 | which module to use to open it.  (The anydbm.error exception is now a | 
 | 22521 | tuple.) | 
 | 22522 |  | 
 | 22523 | Unix Services | 
 | 22524 | ------------- | 
 | 22525 |  | 
 | 22526 | - In the termios module, in tcsetattr(), initialize the structure vy | 
 | 22527 | calling tcgetattr(). | 
 | 22528 |  | 
 | 22529 | - Added some of the "wait status inspection" macros as functions to | 
 | 22530 | the posix module (and thus to the os module): WEXITSTATUS(), | 
 | 22531 | WIFEXITED(), WIFSIGNALED(), WIFSTOPPED(), WSTOPSIG(), WTERMSIG(). | 
 | 22532 |  | 
 | 22533 | - In the syslog module, make the default facility more intuitive | 
 | 22534 | (matching the docs). | 
 | 22535 |  | 
 | 22536 | Debugger | 
 | 22537 | -------- | 
 | 22538 |  | 
 | 22539 | - In pdb.py, support for setting breaks on files/modules that haven't | 
 | 22540 | been loaded yet. | 
 | 22541 |  | 
 | 22542 | Internet Protocols and Support | 
 | 22543 | ------------------------------ | 
 | 22544 |  | 
 | 22545 | - Changes in urllib.py; sped up unquote() and quote().  Fixed an | 
 | 22546 | obscure bug in quote_plus().  Added urlencode(dict) -- convenience | 
 | 22547 | function for sending a POST request with urlopen().  Use the getpass | 
 | 22548 | module to ask for a password.  Rewrote the (test) main program so that | 
 | 22549 | when used as a script, it can retrieve one or more URLs to stdout. | 
 | 22550 | Use -t to run the self-test.  Made the proxy code work again. | 
 | 22551 |  | 
 | 22552 | - In cgi.py, treat "HEAD" the same as "GET", so that CGI scripts don't | 
 | 22553 | fail when someone asks for their HEAD.  Also, for POST, set the | 
 | 22554 | default content-type to application/x-www-form-urlencoded.  Also, in | 
 | 22555 | FieldStorage.__init__(), when method='GET', always get the query | 
 | 22556 | string from environ['QUERY_STRING'] or sys.argv[1] -- ignore an | 
 | 22557 | explicitly passed in fp. | 
 | 22558 |  | 
 | 22559 | - The smtplib.py module now supports ESMTP and has improved standard | 
 | 22560 | compliance, for picky servers. | 
 | 22561 |  | 
 | 22562 | - Improved imaplib.py. | 
 | 22563 |  | 
 | 22564 | - Fixed UDP support in SocketServer.py (it never worked). | 
 | 22565 |  | 
 | 22566 | - Fixed a small bug in CGIHTTPServer.py. | 
 | 22567 |  | 
 | 22568 | Internet Data handling | 
 | 22569 | ---------------------- | 
 | 22570 |  | 
 | 22571 | - In rfc822.py, add a new class AddressList.  Also support a new | 
 | 22572 | overridable method, isheader().  Also add a get() method similar to | 
 | 22573 | dictionaries (and make getheader() an alias for it).  Also, be smarter | 
 | 22574 | about seekable (test whether fp.tell() works) and test for presence of | 
 | 22575 | unread() method before trying seeks. | 
 | 22576 |  | 
 | 22577 | - In sgmllib.py, restore the call to report_unbalanced() that was lost | 
 | 22578 | long ago.  Also some other improvements: handle <? processing | 
 | 22579 | instructions >, allow . and - in entity names, and allow \r\n as line | 
 | 22580 | separator. | 
 | 22581 |  | 
 | 22582 | - Some restructuring and generalization done to multifile.py; support | 
 | 22583 | a 'seekable' flag. | 
 | 22584 |  | 
 | 22585 | Restricted Execution | 
 | 22586 | -------------------- | 
 | 22587 |  | 
 | 22588 | - Improvements to rexec.py: package support; support a (minimal) | 
 | 22589 | sys.exc_info().  Also made the (test) main program a bit fancier (you | 
 | 22590 | can now use it to run arbitrary Python scripts in restricted mode). | 
 | 22591 |  | 
 | 22592 | Tkinter | 
 | 22593 | ------- | 
 | 22594 |  | 
 | 22595 | - On Unix, Tkinter can now safely be used from a multi-threaded | 
 | 22596 | application.  (Formerly, no threads would make progress while | 
 | 22597 | Tkinter's mainloop() was active, because it didn't release the Python | 
 | 22598 | interpreter lock.)  Unfortunately, on Windows, threads other than the | 
 | 22599 | main thread should not call update() or update_idletasks() because | 
 | 22600 | this will deadlock the application. | 
 | 22601 |  | 
 | 22602 | - An interactive interpreter that uses readline and Tkinter no longer | 
 | 22603 | uses up all available CPU time. | 
 | 22604 |  | 
 | 22605 | - Even if readline is not used, Tk windows created in an interactive | 
 | 22606 | interpreter now get continuously updated.  (This even works in Windows | 
 | 22607 | as long as you don't hit a key.) | 
 | 22608 |  | 
 | 22609 | - New demos in Demo/tkinter/guido/: brownian.py, redemo.py, switch.py. | 
 | 22610 |  | 
 | 22611 | - No longer register Tcl_finalize() as a low-level exit handler.  It | 
 | 22612 | may call back into Python, and that's a bad idea. | 
 | 22613 |  | 
 | 22614 | - Allow binding of Tcl commands (given as a string). | 
 | 22615 |  | 
 | 22616 | - Some minor speedups; replace explicitly coded getint() with int() in | 
 | 22617 | most places. | 
 | 22618 |  | 
 | 22619 | - In FileDialog.py, remember the directory of the selected file, if | 
 | 22620 | given. | 
 | 22621 |  | 
 | 22622 | - Change the names of all methods in the Wm class: they are now | 
 | 22623 | wm_title(), etc.  The old names (title() etc.) are still defined as | 
 | 22624 | aliases. | 
 | 22625 |  | 
 | 22626 | - Add a new method of interpreter objects, interpaddr().  This returns | 
 | 22627 | the address of the Tcl interpreter object, as an integer.  Not very | 
 | 22628 | useful for the Python programmer, but this can be called by another C | 
 | 22629 | extension that needs to make calls into the Tcl/Tk C API and needs to | 
 | 22630 | get the address of the Tcl interpreter object.  A simple cast of the | 
 | 22631 | return value to (Tcl_Interp *) will do the trick. | 
 | 22632 |  | 
 | 22633 | Windows General | 
 | 22634 | --------------- | 
 | 22635 |  | 
 | 22636 | - Don't insist on proper case for module source files if the filename | 
 | 22637 | is all uppercase (e.g. FOO.PY now matches foo; but FOO.py still | 
 | 22638 | doesn't).  This should address problems with this feature on | 
 | 22639 | oldfashioned filesystems (Novell servers?). | 
 | 22640 |  | 
 | 22641 | Windows Library | 
 | 22642 | --------------- | 
 | 22643 |  | 
 | 22644 | - os.environ is now all uppercase, but accesses are case insensitive, | 
 | 22645 | and the putenv() calls made as a side effect of changing os.environ | 
 | 22646 | are case preserving. | 
 | 22647 |  | 
 | 22648 | - Removed samefile(), sameopenfile(), samestat() from os.path (aka | 
 | 22649 | ntpath.py) -- these cannot be made to work reliably (at least I | 
 | 22650 | wouldn't know how). | 
 | 22651 |  | 
 | 22652 | - Fixed os.pipe() so that it returns file descriptors acceptable to | 
 | 22653 | os.read() and os.write() (like it does on Unix), rather than Windows | 
 | 22654 | file handles. | 
 | 22655 |  | 
 | 22656 | - Added a table of WSA error codes to socket.py. | 
 | 22657 |  | 
 | 22658 | - In the select module, put the (huge) file descriptor arrays on the | 
 | 22659 | heap. | 
 | 22660 |  | 
 | 22661 | - The getpass module now raises KeyboardInterrupt when it sees ^C. | 
 | 22662 |  | 
 | 22663 | - In mailbox.py, fix tell/seek when using files opened in text mode. | 
 | 22664 |  | 
 | 22665 | - In rfc822.py, fix tell/seek when using files opened in text mode. | 
 | 22666 |  | 
 | 22667 | - In the msvcrt extension module, release the interpreter lock for | 
 | 22668 | calls that may block: _locking(), _getch(), _getche().  Also fix a | 
 | 22669 | bogus error return when open_osfhandle() doesn't have the right | 
 | 22670 | argument list. | 
 | 22671 |  | 
 | 22672 | Windows Installer | 
 | 22673 | ----------------- | 
 | 22674 |  | 
 | 22675 | - The registry key used is now "1.5" instead of "1.5.x" -- so future | 
 | 22676 | versions of 1.5 and Mark Hammond's win32all installer don't need to be  | 
 | 22677 | resynchronized. | 
 | 22678 |  | 
 | 22679 | Windows Tools | 
 | 22680 | ------------- | 
 | 22681 |  | 
 | 22682 | - Several improvements to freeze specifically for Windows. | 
 | 22683 |  | 
 | 22684 | Windows Build Procedure | 
 | 22685 | ----------------------- | 
 | 22686 |  | 
 | 22687 | - The VC++ project files and the WISE installer have been moved to the | 
 | 22688 | PCbuild subdirectory, so they are distributed in the same subdirectory | 
 | 22689 | where they must be used.  This avoids confusion. | 
 | 22690 |  | 
 | 22691 | - New project files for Windows 3.1 port by Jim Ahlstrom. | 
 | 22692 |  | 
 | 22693 | - Got rid of the obsolete subdirectory PC/setup_nt/. | 
 | 22694 |  | 
 | 22695 | - The projects now use distinct filenames for the .exe, .dll, .lib and | 
 | 22696 | .pyd files built in debug mode (by appending "_d" to the base name, | 
 | 22697 | before the extension).  This makes it easier to switch between the two | 
 | 22698 | and get the right versions.  There's a pragma in config.h that directs | 
 | 22699 | the linker to include the appropriate .lib file (so python15.lib no | 
 | 22700 | longer needs to be explicit in your project). | 
 | 22701 |  | 
 | 22702 | - The installer now installs more files (e.g. config.h).  The idea is | 
 | 22703 | that you shouldn't need the source distribution if you want build your | 
 | 22704 | own extensions in C or C++. | 
 | 22705 |  | 
 | 22706 | Tools and Demos | 
 | 22707 | --------------- | 
 | 22708 |  | 
 | 22709 | - New script nm2def.py by Marc-Andre Lemburg, to construct | 
 | 22710 | PC/python_nt.def automatically (some hand editing still required). | 
 | 22711 |  | 
 | 22712 | - New tool ndiff.py: Tim Peters' text diffing tool. | 
 | 22713 |  | 
 | 22714 | - Various and sundry improvements to the freeze script. | 
 | 22715 |  | 
 | 22716 | - The script texi2html.py (which was part of the Doc tree but is no | 
 | 22717 | longer used there) has been moved to the Tools/scripts subdirectory. | 
 | 22718 |  | 
 | 22719 | - Some generalizations in the webchecker code.  There's now a | 
 | 22720 | primnitive gui for websucker.py: wsgui.py.  (In Tools/webchecker/.) | 
 | 22721 |  | 
 | 22722 | - The ftpmirror.py script now handles symbolic links properly, and | 
 | 22723 | also files with multiple spaces in their names. | 
 | 22724 |  | 
 | 22725 | - The 1.5.1 tabnanny.py suffers an assert error if fed a script whose | 
 | 22726 | last line is both indented and lacks a newline.  This is now fixed. | 
 | 22727 |  | 
 | 22728 | Python/C API | 
 | 22729 | ------------ | 
 | 22730 |  | 
 | 22731 | - Added missing prototypes for PyEval_CallFunction() and | 
 | 22732 | PyEval_CallMethod(). | 
 | 22733 |  | 
 | 22734 | - New macro PyList_SET_ITEM(). | 
 | 22735 |  | 
 | 22736 | - New macros to access object members for PyFunction, PyCFunction | 
 | 22737 | objects. | 
 | 22738 |  | 
 | 22739 | - New APIs PyImport_AppendInittab() an PyImport_ExtendInittab() to | 
 | 22740 | dynamically add one or many entries to the table of built-in modules. | 
 | 22741 |  | 
 | 22742 | - New macro Py_InitModule3(name, methods, doc) which calls | 
 | 22743 | Py_InitModule4() with appropriate arguments.  (The -4 variant requires  | 
 | 22744 | you to pass an obscure version number constant which is always the same.) | 
 | 22745 |  | 
 | 22746 | - New APIs PySys_WriteStdout() and PySys_WriteStderr() to write to | 
 | 22747 | sys.stdout or sys.stderr using a printf-like interface.  (Used in | 
 | 22748 | _tkinter.c, for example.) | 
 | 22749 |  | 
 | 22750 | - New APIs for conversion between Python longs and C 'long long' if | 
 | 22751 | your compiler supports it. | 
 | 22752 |  | 
 | 22753 | - PySequence_In() is now called PySequence_Contains(). | 
 | 22754 | (PySequence_In() is still supported for b/w compatibility; it is | 
 | 22755 | declared obsolete because its argument order is confusing.) | 
 | 22756 |  | 
 | 22757 | - PyDict_GetItem() and PyDict_GetItemString() are changed so that they | 
 | 22758 | *never* raise an exception -- (even if the hash() fails, simply clear | 
 | 22759 | the error).  This was necessary because there is lots of code out | 
 | 22760 | there that already assumes this. | 
 | 22761 |  | 
 | 22762 | - Changes to PySequence_Tuple() and PySequence_List() to use the | 
 | 22763 | length of a sequence only as a hint -- if an IndexError happens | 
 | 22764 | earlier, take that.  (Formerly, this was considered an error.) | 
 | 22765 |  | 
 | 22766 | - Reformatted abstract.c to give it a more familiar "look" and fixed | 
 | 22767 | many error checking bugs. | 
 | 22768 |  | 
 | 22769 | - Add NULL pointer checks to all calls of a C function through a type | 
 | 22770 | object and extensions (e.g. nb_add). | 
 | 22771 |  | 
 | 22772 | - The code that initializes sys.path now calls Py_GetPythonHome() | 
 | 22773 | instead of getenv("PYTHONHOME").  This, together with the new API | 
 | 22774 | Py_SetPythonHome(), makes it easier for embedding applications to | 
 | 22775 | change the notion of Python's "home" directory (where the libraries | 
 | 22776 | etc. are sought). | 
 | 22777 |  | 
 | 22778 | - Fixed a very old bug in the parsing of "O?" format specifiers. | 
 | 22779 |  | 
 | 22780 |  | 
 | 22781 | ====================================================================== | 
 | 22782 |  | 
 | 22783 |  | 
| Guido van Rossum | f2eac99 | 2000-09-04 17:24:24 +0000 | [diff] [blame] | 22784 | ======================================== | 
 | 22785 | ==> Release 1.5.1 (October 31, 1998) <== | 
 | 22786 | ======================================== | 
 | 22787 |  | 
| Guido van Rossum | 439d1fa | 1998-12-21 21:41:14 +0000 | [diff] [blame] | 22788 | From 1.5 to 1.5.1 | 
 | 22789 | ================= | 
 | 22790 |  | 
 | 22791 | General | 
 | 22792 | ------- | 
 | 22793 |  | 
 | 22794 | - The documentation is now unbundled.  It has also been extensively | 
 | 22795 | modified (mostly to implement a new and more uniform formatting | 
 | 22796 | style).  We figure that most people will prefer to download one of the | 
 | 22797 | preformatted documentation sets (HTML, PostScript or PDF) and that | 
 | 22798 | only a minority have a need for the LaTeX or FrameMaker sources.  Of | 
 | 22799 | course, the unbundled documentation sources still released -- just not | 
 | 22800 | in the same archive file, and perhaps not on the same date. | 
 | 22801 |  | 
 | 22802 | - All bugs noted on the errors page (and many unnoted) are fixed.  All | 
 | 22803 | new bugs take their places. | 
 | 22804 |  | 
 | 22805 | - No longer a core dump when attempting to print (or repr(), or str()) | 
 | 22806 | a list or dictionary that contains an instance of itself; instead, the | 
 | 22807 | recursive entry is printed as [...] or {...}.  See Py_ReprEnter() and | 
 | 22808 | Py_ReprLeave() below.  Comparisons of such objects still go beserk, | 
 | 22809 | since this requires a different kind of fix; fortunately, this is a | 
 | 22810 | less common scenario in practice. | 
 | 22811 |  | 
 | 22812 | Syntax change | 
 | 22813 | ------------- | 
 | 22814 |  | 
 | 22815 | - The raise statement can now be used without arguments, to re-raise  | 
 | 22816 | a previously set exception.  This should be used after catching an | 
 | 22817 | exception with an except clause only, either in the except clause or | 
 | 22818 | later in the same function. | 
 | 22819 |  | 
 | 22820 | Import and module handling | 
 | 22821 | -------------------------- | 
 | 22822 |  | 
 | 22823 | - The implementation of import has changed to use a mutex (when | 
 | 22824 | threading is supported).  This means that when two threads | 
 | 22825 | simultaneously import the same module, the import statements are | 
 | 22826 | serialized.  Recursive imports are not affected. | 
 | 22827 |  | 
 | 22828 | - Rewrote the finalization code almost completely, to be much more | 
 | 22829 | careful with the order in which modules are destroyed.  Destructors | 
 | 22830 | will now generally be able to reference built-in names such as None | 
 | 22831 | without trouble. | 
 | 22832 |  | 
 | 22833 | - Case-insensitive platforms such as Mac and Windows require the case | 
 | 22834 | of a module's filename to match the case of the module name as | 
 | 22835 | specified in the import statement (see below). | 
 | 22836 |  | 
 | 22837 | - The code for figuring out the default path now distinguishes between | 
 | 22838 | files, modules, executable files, and directories.  When expecting a | 
 | 22839 | module, we also look for the .pyc or .pyo file. | 
 | 22840 |  | 
 | 22841 | Parser/tokenizer changes | 
 | 22842 | ------------------------ | 
 | 22843 |  | 
 | 22844 | - The tokenizer can now warn you when your source code mixes tabs and | 
 | 22845 | spaces for indentation in a manner that depends on how much a tab is | 
 | 22846 | worth in spaces.  Use "python -t" or "python -v" to enable this | 
 | 22847 | option.  Use "python -tt" to turn the warnings into errors.  (See also | 
 | 22848 | tabnanny.py and tabpolice.py below.) | 
 | 22849 |  | 
 | 22850 | - Return unsigned characters from tok_nextc(), so '\377' isn't | 
 | 22851 | mistaken for an EOF character. | 
 | 22852 |  | 
 | 22853 | - Fixed two pernicious bugs in the tokenizer that only affected AIX. | 
 | 22854 | One was actually a general bug that was triggered by AIX's smaller I/O | 
 | 22855 | buffer size.  The other was a bug in the AIX optimizer's loop | 
 | 22856 | unrolling code; swapping two statements made the problem go away. | 
 | 22857 |  | 
 | 22858 | Tools, demos and miscellaneous files | 
 | 22859 | ------------------------------------ | 
 | 22860 |  | 
 | 22861 | - There's a new version of Misc/python-mode.el (the Emacs mode for | 
 | 22862 | Python) which is much smarter about guessing the indentation style | 
 | 22863 | used in a particular file.  Lots of other cool features too! | 
 | 22864 |  | 
 | 22865 | - There are two new tools in Tools/scripts: tabnanny.py and | 
 | 22866 | tabpolice.py, implementing two different ways of checking whether a | 
 | 22867 | file uses indentation in a way that is sensitive to the interpretation | 
 | 22868 | of a tab.  The preferred module is tabnanny.py (by Tim Peters). | 
 | 22869 |  | 
 | 22870 | - Some new demo programs: | 
 | 22871 |  | 
 | 22872 | 	Demo/tkinter/guido/paint.py -- Dave Mitchell | 
 | 22873 | 	Demo/sockets/unixserver.py -- Piet van Oostrum | 
 | 22874 | 	 | 
 | 22875 |  | 
 | 22876 | - Much better freeze support.  The freeze script can now freeze | 
 | 22877 | hierarchical module names (with a corresponding change to import.c), | 
 | 22878 | and has a few extra options (e.g. to suppress freezing specific | 
 | 22879 | modules).  It also does much more on Windows NT. | 
 | 22880 |  | 
 | 22881 | - Version 1.0 of the faq wizard is included (only very small changes | 
 | 22882 | since version 0.9.0). | 
 | 22883 |  | 
 | 22884 | - New feature for the ftpmirror script: when removing local files | 
 | 22885 | (i.e., only when -r is used), do a recursive delete. | 
 | 22886 |  | 
 | 22887 | Configuring and building Python | 
 | 22888 | ------------------------------- | 
 | 22889 |  | 
 | 22890 | - Get rid of the check for -linet -- recent Sequent Dynix systems don't | 
 | 22891 | need this any more and apparently it screws up their configuration. | 
 | 22892 |  | 
 | 22893 | - Some changes because gcc on SGI doesn't support '-all'. | 
 | 22894 |  | 
 | 22895 | - Changed the build rules to use $(LIBRARY) instead of | 
 | 22896 |   -L.. -lpython$(VERSION) | 
 | 22897 | since the latter trips up the SunOS 4.1.x linker (sigh). | 
 | 22898 |  | 
 | 22899 | - Fix the bug where the '# dgux is broken' comment in the Makefile | 
 | 22900 | tripped over Make on some platforms. | 
 | 22901 |  | 
 | 22902 | - Changes for AIX: install the python.exp file; properly use | 
 | 22903 | $(srcdir); the makexp_aix script now removes C++ entries of the form | 
 | 22904 | Class::method. | 
 | 22905 |  | 
 | 22906 | - Deleted some Makefile targets only used by the (long obsolete) | 
 | 22907 | gMakefile hacks. | 
 | 22908 |  | 
 | 22909 | Extension modules | 
 | 22910 | ----------------- | 
 | 22911 |  | 
 | 22912 | - Performance and threading improvements to the socket and bsddb | 
 | 22913 | modules, by Christopher Lindblad of Infoseek. | 
 | 22914 |  | 
 | 22915 | - Added operator.__not__ and operator.not_. | 
 | 22916 |  | 
 | 22917 | - In the thread module, when a thread exits due to an unhandled | 
 | 22918 | exception, don't store the exception information in sys.last_*; it | 
 | 22919 | prevents proper calling of destructors of local variables. | 
 | 22920 |  | 
 | 22921 | - Fixed a number of small bugs in the cPickle module. | 
 | 22922 |  | 
 | 22923 | - Changed find() and rfind() in the strop module so that | 
 | 22924 | find("x","",2) returns -1, matching the implementation in string.py. | 
 | 22925 |  | 
 | 22926 | - In the time module, be more careful with the result of ctime(), and | 
 | 22927 | test for HAVE_MKTIME before usinmg mktime(). | 
 | 22928 |  | 
 | 22929 | - Doc strings contributed by Mitch Chapman to the termios, pwd, gdbm | 
 | 22930 | modules. | 
 | 22931 |  | 
 | 22932 | - Added the LOG_SYSLOG constant to the syslog module, if defined. | 
 | 22933 |  | 
 | 22934 | Standard library modules | 
 | 22935 | ------------------------ | 
 | 22936 |  | 
 | 22937 | - All standard library modules have been converted to an indentation | 
 | 22938 | style using either only tabs or only spaces -- never a mixture -- if | 
 | 22939 | they weren't already consistent according to tabnanny.  This means | 
 | 22940 | that the new -t option (see above) won't complain about standard | 
 | 22941 | library modules. | 
 | 22942 |  | 
 | 22943 | - New standard library modules: | 
 | 22944 |  | 
 | 22945 | 	threading -- GvR and the thread-sig | 
 | 22946 | 		Java style thread objects -- USE THIS!!! | 
 | 22947 |  | 
 | 22948 | 	getpass -- Piers Lauder | 
 | 22949 | 		simple utilities to prompt for a password and to | 
 | 22950 | 		retrieve the current username | 
 | 22951 |  | 
 | 22952 | 	imaplib -- Piers Lauder | 
 | 22953 | 		interface for the IMAP4 protocol | 
 | 22954 |  | 
 | 22955 | 	poplib -- David Ascher, Piers Lauder | 
 | 22956 | 		interface for the POP3 protocol | 
 | 22957 |  | 
 | 22958 | 	smtplib -- Dragon De Monsyne | 
 | 22959 | 		interface for the SMTP protocol | 
 | 22960 |  | 
 | 22961 | - Some obsolete modules moved to a separate directory (Lib/lib-old) | 
 | 22962 | which is *not* in the default module search path: | 
 | 22963 |  | 
 | 22964 | 	Para | 
 | 22965 | 	addpack | 
 | 22966 | 	codehack | 
 | 22967 | 	fmt | 
 | 22968 | 	lockfile | 
 | 22969 | 	newdir | 
 | 22970 | 	ni | 
 | 22971 | 	rand | 
 | 22972 | 	tb | 
 | 22973 |  | 
 | 22974 | - New version of the PCRE code (Perl Compatible Regular Expressions -- | 
 | 22975 | the re module and the supporting pcre extension) by Andrew Kuchling. | 
 | 22976 | Incompatible new feature in re.sub(): the handling of escapes in the | 
 | 22977 | replacement string has changed. | 
 | 22978 |  | 
 | 22979 | - Interface change in the copy module: a __deepcopy__ method is now | 
 | 22980 | called with the memo dictionary as an argument. | 
 | 22981 |  | 
 | 22982 | - Feature change in the tokenize module: differentiate between NEWLINE | 
 | 22983 | token (an official newline) and NL token (a newline that the grammar | 
 | 22984 | ignores). | 
 | 22985 |  | 
 | 22986 | - Several bugfixes to the urllib module.  It is now truly thread-safe, | 
 | 22987 | and several bugs and a portability problem have been fixed.  New | 
 | 22988 | features, all due to Sjoerd Mullender: When creating a temporary file, | 
 | 22989 | it gives it an appropriate suffix.  Support the "data:" URL scheme. | 
 | 22990 | The open() method uses the tempcache. | 
 | 22991 |  | 
 | 22992 | - New version of the xmllib module (this time with a test suite!) by | 
 | 22993 | Sjoerd Mullender. | 
 | 22994 |  | 
 | 22995 | - Added debugging code to the telnetlib module, to be able to trace | 
 | 22996 | the actual traffic. | 
 | 22997 |  | 
 | 22998 | - In the rfc822 module, added support for deleting a header (still no | 
 | 22999 | support for adding headers, though).  Also fixed a bug where an | 
 | 23000 | illegal address would cause a crash in getrouteaddr(), fixed a | 
 | 23001 | sign reversal in mktime_tz(), and use the local timezone by default | 
 | 23002 | (the latter two due to Bill van Melle). | 
 | 23003 |  | 
 | 23004 | - The normpath() function in the dospath and ntpath modules no longer | 
 | 23005 | does case normalization -- for that, use the separate function | 
 | 23006 | normcase() (which always existed); normcase() has been sped up and | 
 | 23007 | fixed (it was the cause of a crash in Mark Hammond's installer in | 
 | 23008 | certain locales). | 
 | 23009 |  | 
 | 23010 | - New command supported by the ftplib module: rmd(); also fixed some | 
 | 23011 | minor bugs. | 
 | 23012 |  | 
 | 23013 | - The profile module now uses a different timer function by default --  | 
 | 23014 | time.clock() is generally better than os.times().  This makes it work | 
 | 23015 | better on Windows NT, too. | 
 | 23016 |  | 
 | 23017 | - The tempfile module now recovers when os.getcwd() raises an | 
 | 23018 | exception. | 
 | 23019 |  | 
 | 23020 | - Fixed some bugs in the random module; gauss() was subtly wrong, and | 
 | 23021 | vonmisesvariate() should return a full circle.  Courtesy Mike Miller, | 
 | 23022 | Lambert Meertens (gauss()), and Magnus Kessler (vonmisesvariate()). | 
 | 23023 |  | 
 | 23024 | - Better default seed in the whrandom module, courtesy Andrew Kuchling. | 
 | 23025 |  | 
 | 23026 | - Fix slow close() in shelve module. | 
 | 23027 |  | 
 | 23028 | - The Unix mailbox class in the mailbox module is now more robust when | 
 | 23029 | a line begins with the string "From " but is definitely not the start | 
 | 23030 | of a new message.  The pattern used can be changed by overriding a | 
 | 23031 | method or class variable. | 
 | 23032 |  | 
 | 23033 | - Added a rmtree() function to the copy module. | 
 | 23034 |  | 
 | 23035 | - Fixed several typos in the pickle module.  Also fixed problems when | 
 | 23036 | unpickling in restricted execution environments. | 
 | 23037 |  | 
 | 23038 | - Added docstrings and fixed a typo in the py_compile and compileall | 
 | 23039 | modules.  At Mark Hammond's repeated request, py_compile now append a | 
 | 23040 | newline to the source if it needs one.  Both modules support an extra | 
 | 23041 | parameter to specify the purported source filename (to be used in | 
 | 23042 | error messages). | 
 | 23043 |  | 
 | 23044 | - Some performance tweaks by Jeremy Hylton to the gzip module. | 
 | 23045 |  | 
 | 23046 | - Fixed a bug in the merge order of dictionaries in the ConfigParser | 
 | 23047 | module.  Courtesy Barry Warsaw. | 
 | 23048 |  | 
 | 23049 | - In the multifile module, support the optional second parameter to | 
 | 23050 | seek() when possible. | 
 | 23051 |  | 
 | 23052 | - Several fixes to the gopherlib module by Lars Marius Garshol.  Also,  | 
 | 23053 | urlparse now correctly handles Gopher URLs with query strings. | 
 | 23054 |  | 
 | 23055 | - Fixed a tiny bug in format_exception() in the traceback module. | 
 | 23056 | Also rewrite tb_lineno() to be compatible with JPython (and not | 
 | 23057 | disturb the current exception!); by Jim Hugunin. | 
 | 23058 |  | 
 | 23059 | - The httplib module is more robust when servers send a short response  | 
 | 23060 | -- courtesy Tim O'Malley. | 
 | 23061 |  | 
 | 23062 | Tkinter and friends | 
 | 23063 | ------------------- | 
 | 23064 |  | 
 | 23065 | - Various typos and bugs fixed. | 
 | 23066 |  | 
 | 23067 | - New module Tkdnd implements a drag-and-drop protocol (within one | 
 | 23068 | application only). | 
 | 23069 |  | 
 | 23070 | - The event_*() widget methods have been restructured slightly -- they | 
 | 23071 | no longer use the default root. | 
 | 23072 |  | 
 | 23073 | - The interfaces for the bind*() and unbind() widget methods have been | 
 | 23074 | redesigned; the bind*() methods now return the name of the Tcl command  | 
 | 23075 | created for the callback, and this can be passed as a optional | 
 | 23076 | argument to unbind() in order to delete the command (normally, such | 
 | 23077 | commands are automatically unbound when the widget is destroyed, but | 
 | 23078 | for some applications this isn't enough). | 
 | 23079 |  | 
 | 23080 | - Variable objects now have trace methods to interface to Tcl's | 
 | 23081 | variable tracing facilities. | 
 | 23082 |  | 
 | 23083 | - Image objects now have an optional keyword argument, 'master', to | 
 | 23084 | specify a widget (tree) to which they belong.  The image_names() and | 
 | 23085 | image_types() calls are now also widget methods. | 
 | 23086 |  | 
 | 23087 | - There's a new global call, Tkinter.NoDefaultRoot(), which disables | 
 | 23088 | all use of the default root by the Tkinter library.  This is useful to | 
 | 23089 | debug applications that are in the process of being converted from | 
 | 23090 | relying on the default root to explicit specification of the root | 
 | 23091 | widget. | 
 | 23092 |  | 
 | 23093 | - The 'exit' command is deleted from the Tcl interpreter, since it | 
 | 23094 | provided a loophole by which one could (accidentally) exit the Python | 
 | 23095 | interpreter without invoking any cleanup code. | 
 | 23096 |  | 
 | 23097 | - Tcl_Finalize() is now registered as a Python low-level exit handle, | 
 | 23098 | so Tcl will be finalized when Python exits. | 
 | 23099 |  | 
 | 23100 | The Python/C API | 
 | 23101 | ---------------- | 
 | 23102 |  | 
 | 23103 | - New function PyThreadState_GetDict() returns a per-thread dictionary | 
 | 23104 | intended for storing thread-local global variables. | 
 | 23105 |  | 
 | 23106 | - New functions Py_ReprEnter() and Py_ReprLeave() use the per-thread | 
 | 23107 | dictionary to allow recursive container types to detect recursion in | 
 | 23108 | their repr(), str() and print implementations. | 
 | 23109 |  | 
 | 23110 | - New function PyObject_Not(x) calculates (not x) according to Python's  | 
 | 23111 | standard rules (basically, it negates the outcome PyObject_IsTrue(x). | 
 | 23112 |  | 
 | 23113 | - New function _PyModule_Clear(), which clears a module's dictionary | 
 | 23114 | carefully without removing the __builtins__ entry.  This is implied | 
 | 23115 | when a module object is deallocated (this used to clear the dictionary | 
 | 23116 | completely). | 
 | 23117 |  | 
 | 23118 | - New function PyImport_ExecCodeModuleEx(), which extends | 
 | 23119 | PyImport_ExecCodeModule() by adding an extra parameter to pass it the | 
 | 23120 | true file. | 
 | 23121 |  | 
 | 23122 | - New functions Py_GetPythonHome() and Py_SetPythonHome(), intended to | 
 | 23123 | allow embedded applications to force a different value for PYTHONHOME. | 
 | 23124 |  | 
 | 23125 | - New global flag Py_FrozenFlag is set when this is a "frozen" Python | 
 | 23126 | binary; it suppresses warnings about not being able to find the | 
 | 23127 | standard library directories. | 
 | 23128 |  | 
 | 23129 | - New global flag Py_TabcheckFlag is incremented by the -t option and | 
 | 23130 | causes the tokenizer to issue warnings or errors about inconsistent | 
 | 23131 | mixing of tabs and spaces for indentation. | 
 | 23132 |  | 
 | 23133 | Miscellaneous minor changes and bug fixes | 
 | 23134 | ----------------------------------------- | 
 | 23135 |  | 
 | 23136 | - Improved the error message when an attribute of an attribute-less | 
 | 23137 | object is requested -- include the name of the attribute and the type | 
 | 23138 | of the object in the message. | 
 | 23139 |  | 
 | 23140 | - Sped up int(), long(), float() a bit. | 
 | 23141 |  | 
 | 23142 | - Fixed a bug in list.sort() that would occasionally dump core. | 
 | 23143 |  | 
 | 23144 | - Fixed a bug in PyNumber_Power() that caused numeric arrays to fail | 
 | 23145 | when taken tothe real power. | 
 | 23146 |  | 
 | 23147 | - Fixed a number of bugs in the file reading code, at least one of | 
 | 23148 | which could cause a core dump on NT, and one of which would | 
 | 23149 | occasionally cause file.read() to return less than the full contents | 
 | 23150 | of the file. | 
 | 23151 |  | 
 | 23152 | - Performance hack by Vladimir Marangozov for stack frame creation. | 
 | 23153 |  | 
 | 23154 | - Make sure setvbuf() isn't used unless HAVE_SETVBUF is defined. | 
 | 23155 |  | 
 | 23156 | Windows 95/NT | 
 | 23157 | ------------- | 
 | 23158 |  | 
 | 23159 | - The .lib files are now part of the distribution; they are collected | 
 | 23160 | in the subdirectory "libs" of the installation directory. | 
 | 23161 |  | 
 | 23162 | - The extension modules (.pyd files) are now collected in a separate | 
 | 23163 | subdirectory of the installation directory named "DLLs". | 
 | 23164 |  | 
 | 23165 | - The case of a module's filename must now match the case of the | 
 | 23166 | module name as specified in the import statement.  This is an | 
 | 23167 | experimental feature -- if it turns out to break in too many | 
 | 23168 | situations, it will be removed (or disabled by default) in the future. | 
 | 23169 | It can be disabled on a per-case basis by setting the environment | 
 | 23170 | variable PYTHONCASEOK (to any value). | 
 | 23171 |  | 
 | 23172 |  | 
 | 23173 | ====================================================================== | 
 | 23174 |  | 
 | 23175 |  | 
| Guido van Rossum | f2eac99 | 2000-09-04 17:24:24 +0000 | [diff] [blame] | 23176 | ===================================== | 
 | 23177 | ==> Release 1.5 (January 3, 1998) <== | 
 | 23178 | ===================================== | 
 | 23179 |  | 
 | 23180 |  | 
| Guido van Rossum | 439d1fa | 1998-12-21 21:41:14 +0000 | [diff] [blame] | 23181 | From 1.5b2 to 1.5 | 
 | 23182 | ================= | 
 | 23183 |  | 
 | 23184 | - Newly documentated module: BaseHTTPServer.py, thanks to Greg Stein. | 
 | 23185 |  | 
 | 23186 | - Added doc strings to string.py, stropmodule.c, structmodule.c, | 
 | 23187 | thanks to Charles Waldman. | 
 | 23188 |  | 
 | 23189 | - Many nits fixed in the manuals, thanks to Fred Drake and many others | 
 | 23190 | (especially Rob Hooft and Andrew Kuchling).  The HTML version now uses | 
 | 23191 | HTML markup instead of inline GIF images for tables; only two images | 
 | 23192 | are left (for obsure bits of math).  The index of the HTML version has | 
 | 23193 | also been much improved.  Finally, it is once again possible to | 
 | 23194 | generate an Emacs info file from the library manual (but I don't | 
 | 23195 | commit to supporting this in future versions). | 
 | 23196 |  | 
 | 23197 | - New module: telnetlib.py (a simple telnet client library). | 
 | 23198 |  | 
 | 23199 | - New tool: Tools/versioncheck/, by Jack Jansen. | 
 | 23200 |  | 
 | 23201 | - Ported zlibmodule.c and bsddbmodule.c to NT; The project file for MS | 
 | 23202 | DevStudio 5.0 now includes new subprojects to build the zlib and bsddb | 
 | 23203 | extension modules. | 
 | 23204 |  | 
 | 23205 | - Many small changes again to Tkinter.py -- mostly bugfixes and adding | 
 | 23206 | missing routines.  Thanks to Greg McFarlane for reporting a bunch of | 
 | 23207 | problems and proofreading my fixes. | 
 | 23208 |  | 
 | 23209 | - The re module and its documentation are up to date with the latest | 
 | 23210 | version released to the string-sig (Dec. 22). | 
 | 23211 |  | 
 | 23212 | - Stop test_grp.py from failing when the /etc/group file is empty | 
 | 23213 | (yes, this happens!). | 
 | 23214 |  | 
 | 23215 | - Fix bug in integer conversion (mystrtoul.c) that caused | 
 | 23216 | 4294967296==0 to be true! | 
 | 23217 |  | 
 | 23218 | - The VC++ 4.2 project file should be complete again. | 
 | 23219 |  | 
 | 23220 | - In tempfile.py, use a better template on NT, and add a new optional | 
 | 23221 | argument "suffix" with default "" to specify a specific extension for | 
 | 23222 | the temporary filename (needed sometimes on NT but perhaps also handy | 
 | 23223 | elsewhere). | 
 | 23224 |  | 
 | 23225 | - Fixed some bugs in the FAQ wizard, and converted it to use re | 
 | 23226 | instead of regex. | 
 | 23227 |  | 
 | 23228 | - Fixed a mysteriously undetected error in dlmodule.c (it was using a | 
 | 23229 | totally bogus routine name to raise an exception). | 
 | 23230 |  | 
 | 23231 | - Fixed bug in import.c which wasn't using the new "dos-8x3" name yet. | 
 | 23232 |  | 
 | 23233 | - Hopefully harmless changes to the build process to support shared | 
 | 23234 | libraries on DG/UX.  This adds a target to create | 
 | 23235 | libpython$(VERSION).so; however this target is *only* for DG/UX. | 
 | 23236 |  | 
 | 23237 | - Fixed a bug in the new format string error checking in getargs.c. | 
 | 23238 |  | 
 | 23239 | - A simple fix for infinite recursion when printing __builtins__: | 
 | 23240 | reset '_' to None before printing and set it to the printed variable | 
 | 23241 | *after* printing (and only when printing is successful). | 
 | 23242 |  | 
 | 23243 | - Fixed lib-tk/SimpleDialog.py to keep the dialog visible even if the | 
 | 23244 | parent window is not (Skip Montanaro). | 
 | 23245 |  | 
 | 23246 | - Fixed the two most annoying problems with ftp URLs in | 
 | 23247 | urllib.urlopen(); an empty file now correctly raises an error, and it | 
 | 23248 | is no longer required to explicitly close the returned "file" object | 
 | 23249 | before opening another ftp URL to the same host and directory. | 
 | 23250 |  | 
 | 23251 |  | 
 | 23252 | ====================================================================== | 
 | 23253 |  | 
 | 23254 |  | 
 | 23255 | From 1.5b1 to 1.5b2 | 
 | 23256 | =================== | 
 | 23257 |  | 
 | 23258 | - Fixed a bug in cPickle.c that caused it to crash right away because | 
 | 23259 | the version string had a different format. | 
 | 23260 |  | 
 | 23261 | - Changes in pickle.py and cPickle.c: when unpickling an instance of a | 
 | 23262 | class that doesn't define the __getinitargs__() method, the __init__() | 
 | 23263 | constructor is no longer called.  This makes a much larger group of | 
 | 23264 | classes picklable by default, but may occasionally change semantics. | 
 | 23265 | To force calling __init__() on unpickling, define a __getinitargs__() | 
 | 23266 | method.  Other changes too, in particular cPickle now handles classes | 
 | 23267 | defined in packages correctly.  The same change applies to copying | 
 | 23268 | instances with copy.py.  The cPickle.c changes and some pickle.py | 
 | 23269 | changes are courtesy Jim Fulton. | 
 | 23270 |  | 
 | 23271 | - Locale support in he "re" (Perl regular expressions) module.  Use  | 
 | 23272 | the flag re.L (or re.LOCALE) to enable locale-specific matching | 
 | 23273 | rules for \w and \b.  The in-line syntax for this flag is (?L). | 
 | 23274 |  | 
 | 23275 | - The built-in function isinstance(x, y) now also succeeds when y is | 
 | 23276 | a type object and type(x) is y. | 
 | 23277 |  | 
 | 23278 | - repr() and str() of class and instance objects now reflect the | 
 | 23279 | package/module in which the class is defined. | 
 | 23280 |  | 
 | 23281 | - Module "ni" has been removed.  (If you really need it, it's been | 
 | 23282 | renamed to "ni1".  Let me know if this causes any problems for you. | 
 | 23283 | Package authors are encouraged to write __init__.py files that | 
 | 23284 | support both ni and 1.5 package support, so the same version can be | 
 | 23285 | used with Python 1.4 as well as 1.5.) | 
 | 23286 |  | 
 | 23287 | - The thread module is now automatically included when threads are | 
 | 23288 | configured.  (You must remove it from your existing Setup file, | 
 | 23289 | since it is now in its own Setup.thread file.) | 
 | 23290 |  | 
 | 23291 | - New command line option "-x" to skip the first line of the script; | 
 | 23292 | handy to make executable scripts on non-Unix platforms. | 
 | 23293 |  | 
 | 23294 | - In importdl.c, add the RTLD_GLOBAL to the dlopen() flags.  I | 
 | 23295 | haven't checked how this affects things, but it should make symbols | 
 | 23296 | in one shared library available to the next one. | 
 | 23297 |  | 
 | 23298 | - The Windows installer now installs in the "Program Files" folder on | 
 | 23299 | the proper volume by default. | 
 | 23300 |  | 
 | 23301 | - The Windows configuration adds a new main program, "pythonw", and | 
 | 23302 | registers a new extension, ".pyw" that invokes this.  This is a | 
 | 23303 | pstandard Python interpreter that does not pop up a console window; | 
 | 23304 | handy for pure Tkinter applications.  All output to the original | 
 | 23305 | stdout and stderr is lost; reading from the original stdin yields | 
 | 23306 | EOF.  Also, both python.exe and pythonw.exe now have a pretty icon | 
 | 23307 | (a green snake in a box, courtesy Mark Hammond). | 
 | 23308 |  | 
 | 23309 | - Lots of improvements to emacs-mode.el again.  See Barry's web page: | 
 | 23310 | http://www.python.org/ftp/emacs/pmdetails.html. | 
 | 23311 |  | 
 | 23312 | - Lots of improvements and additions to the library reference manual; | 
 | 23313 | many by Fred Drake. | 
 | 23314 |  | 
 | 23315 | - Doc strings for the following modules: rfc822.py, posixpath.py, | 
 | 23316 | ntpath.py, httplib.py.  Thanks to Mitch Chapman and Charles Waldman. | 
 | 23317 |  | 
 | 23318 | - Some more regression testing. | 
 | 23319 |  | 
 | 23320 | - An optional 4th (maxsplit) argument to strop.replace(). | 
 | 23321 |  | 
 | 23322 | - Fixed handling of maxsplit in string.splitfields(). | 
 | 23323 |  | 
 | 23324 | - Tweaked os.environ so it can be pickled and copied. | 
 | 23325 |  | 
 | 23326 | - The portability problems caused by indented preprocessor commands | 
 | 23327 | and C++ style comments should be gone now. | 
 | 23328 |  | 
 | 23329 | - In random.py, added Pareto and Weibull distributions. | 
 | 23330 |  | 
 | 23331 | - The crypt module is now disabled in Modules/Setup.in by default; it | 
 | 23332 | is rarely needed and causes errors on some systems where users often | 
 | 23333 | don't know how to deal with those. | 
 | 23334 |  | 
 | 23335 | - Some improvements to the _tkinter build line suggested by Case Roole. | 
 | 23336 |  | 
 | 23337 | - A full suite of platform specific files for NetBSD 1.x, submitted by  | 
 | 23338 | Anders Andersen. | 
 | 23339 |  | 
 | 23340 | - New Solaris specific header STROPTS.py. | 
 | 23341 |  | 
 | 23342 | - Moved a confusing occurrence of *shared* from the comments in | 
 | 23343 | Modules/Setup.in (people would enable this one instead of the real | 
 | 23344 | one, and get disappointing results). | 
 | 23345 |  | 
 | 23346 | - Changed the default mode for directories to be group-writable when | 
 | 23347 | the installation process creates them. | 
 | 23348 |  | 
 | 23349 | - Check for pthread support in "-l_r" for FreeBSD/NetBSD, and support | 
 | 23350 | shared libraries for both. | 
 | 23351 |  | 
 | 23352 | - Support FreeBSD and NetBSD in posixfile.py. | 
 | 23353 |  | 
 | 23354 | - Support for the "event" command, new in Tk 4.2.  By Case Roole. | 
 | 23355 |  | 
 | 23356 | - Add Tix_SafeInit() support to tkappinit.c. | 
 | 23357 |  | 
 | 23358 | - Various bugs fixed in "re.py" and "pcre.c". | 
 | 23359 |  | 
 | 23360 | - Fixed a bug (broken use of the syntax table) in the old "regexpr.c". | 
 | 23361 |  | 
 | 23362 | - In frozenmain.c, stdin is made unbuffered too when PYTHONUNBUFFERED | 
 | 23363 | is set. | 
 | 23364 |  | 
 | 23365 | - Provide default blocksize for retrbinary in ftplib.py (Skip | 
 | 23366 | Montanaro). | 
 | 23367 |  | 
 | 23368 | - In NT, pick the username up from different places in user.py (Jeff | 
 | 23369 | Bauer). | 
 | 23370 |  | 
 | 23371 | - Patch to urlparse.urljoin() for ".." and "..#1", Marc Lemburg. | 
 | 23372 |  | 
 | 23373 | - Many small improvements to Jeff Rush' OS/2 support. | 
 | 23374 |  | 
 | 23375 | - ospath.py is gone; it's been obsolete for so many years now... | 
 | 23376 |  | 
 | 23377 | - The reference manual is now set up to prepare better HTML (still | 
 | 23378 | using webmaker, alas). | 
 | 23379 |  | 
 | 23380 | - Add special handling to /Tools/freeze for Python modules that are | 
 | 23381 | imported implicitly by the Python runtime: 'site' and 'exceptions'. | 
 | 23382 |  | 
 | 23383 | - Tools/faqwiz 0.8.3 -- add an option to suppress URL processing | 
 | 23384 | inside <PRE>, by "Scott". | 
 | 23385 |  | 
 | 23386 | - Added ConfigParser.py, a generic parser for sectioned configuration | 
 | 23387 | files. | 
 | 23388 |  | 
 | 23389 | - In _localemodule.c, LC_MESSAGES is not always defined; put it | 
 | 23390 | between #ifdefs. | 
 | 23391 |  | 
 | 23392 | - Typo in resource.c: RUSAGE_CHILDERN -> RUSAGE_CHILDREN. | 
 | 23393 |  | 
 | 23394 | - Demo/scripts/newslist.py: Fix the way the version number is gotten | 
 | 23395 | out of the RCS revision. | 
 | 23396 |  | 
 | 23397 | - PyArg_Parse[Tuple] now explicitly check for bad characters at the | 
 | 23398 | end of the format string. | 
 | 23399 |  | 
 | 23400 | - Revamped PC/example_nt to support VC++ 5.x. | 
 | 23401 |  | 
 | 23402 | - <listobject>.sort() now uses a modified quicksort by Raymund Galvin, | 
 | 23403 | after studying the GNU libg++ quicksort.  This should be much faster | 
 | 23404 | if there are lots of duplicates, and otherwise at least as good. | 
 | 23405 |  | 
 | 23406 | - Added "uue" as an alias for "uuencode" to mimetools.py.  (Hm, the | 
 | 23407 | uudecode bug where it complaints about trailing garbage is still there  | 
 | 23408 | :-( ). | 
 | 23409 |  | 
 | 23410 | - pickle.py requires integers in text mode to be in decimal notation | 
 | 23411 | (it used to accept octal and hex, even though it would only generate | 
 | 23412 | decimal numbers). | 
 | 23413 |  | 
 | 23414 | - In string.atof(), don't fail when the "re" module is unavailable. | 
 | 23415 | Plug the ensueing security leak by supplying an empty __builtins__ | 
 | 23416 | directory to eval(). | 
 | 23417 |  | 
 | 23418 | - A bunch of small fixes and improvements to Tkinter.py. | 
 | 23419 |  | 
 | 23420 | - Fixed a buffer overrun in PC/getpathp.c. | 
 | 23421 |  | 
 | 23422 |  | 
 | 23423 | ====================================================================== | 
 | 23424 |  | 
 | 23425 |  | 
 | 23426 | From 1.5a4 to 1.5b1 | 
 | 23427 | =================== | 
 | 23428 |  | 
 | 23429 | - The Windows NT/95 installer now includes full HTML of all manuals. | 
 | 23430 | It also has a checkbox that lets you decide whether to install the | 
 | 23431 | interpreter and library.  The WISE installer script for the installer | 
 | 23432 | is included in the source tree as PC/python15.wse, and so are the | 
 | 23433 | icons used for Python files.  The config.c file for the Windows build | 
 | 23434 | is now complete with the pcre module. | 
 | 23435 |  | 
 | 23436 | - sys.ps1 and sys.ps2 can now arbitrary objects; their str() is | 
 | 23437 | evaluated for the prompt. | 
 | 23438 |  | 
 | 23439 | - The reference manual is brought up to date (more or less -- it still | 
 | 23440 | needs work, e.g. in the area of package import). | 
 | 23441 |  | 
 | 23442 | - The icons used by latex2html are now included in the Doc | 
 | 23443 | subdirectory (mostly so that tarring up the HTML files can be fully | 
 | 23444 | automated).  A simple index.html is also added to Doc (it only works | 
 | 23445 | after you have successfully run latex2html). | 
 | 23446 |  | 
 | 23447 | - For all you would-be proselytizers out there: a new version of | 
 | 23448 | Misc/BLURB describes Python more concisely, and Misc/comparisons | 
 | 23449 | compares Python to several other languages.  Misc/BLURB.WINDOWS | 
 | 23450 | contains a blurb specifically aimed at Windows programmers (by Mark | 
 | 23451 | Hammond). | 
 | 23452 |  | 
 | 23453 | - A new version of the Python mode for Emacs is included as | 
 | 23454 | Misc/python-mode.el.  There are too many new features to list here. | 
 | 23455 | See http://www.python.org/ftp/emacs/pmdetails.html for more info. | 
 | 23456 |  | 
 | 23457 | - New module fileinput makes iterating over the lines of a list of | 
 | 23458 | files easier.  (This still needs some more thinking to make it more | 
 | 23459 | extensible.) | 
 | 23460 |  | 
 | 23461 | - There's full OS/2 support, courtesy Jeff Rush.  To build the OS/2 | 
 | 23462 | version, see PC/readme.txt and PC/os2vacpp.  This is for IBM's Visual | 
 | 23463 | Age C++ compiler.  I expect that Jeff will also provide a binary | 
 | 23464 | release for this platform. | 
 | 23465 |  | 
 | 23466 | - On Linux, the configure script now uses '-Xlinker -export-dynamic' | 
 | 23467 | instead of '-rdynamic' to link the main program so that it exports its | 
 | 23468 | symbols to shared libraries it loads dynamically.  I hope this doesn't | 
 | 23469 | break on older Linux versions; it is needed for mklinux and appears to | 
 | 23470 | work on Linux 2.0.30. | 
 | 23471 |  | 
 | 23472 | - Some Tkinter resstructuring: the geometry methods that apply to a | 
 | 23473 | master are now properly usable on toplevel master widgets.  There's a | 
 | 23474 | new (internal) widget class, BaseWidget.  New, longer "official" names | 
 | 23475 | for the geometry manager methods have been added, | 
 | 23476 | e.g. "grid_columnconfigure()" instead of "columnconfigure()".  The old | 
 | 23477 | shorter names still work, and where there's ambiguity, pack wins over | 
 | 23478 | place wins over grid.  Also, the bind_class method now returns its | 
 | 23479 | value. | 
 | 23480 |  | 
 | 23481 | - New, RFC-822 conformant parsing of email addresses and address lists | 
 | 23482 | in the rfc822 module, courtesy Ben Escoto. | 
 | 23483 |  | 
 | 23484 | - New, revamped tkappinit.c with support for popular packages (PIL, | 
 | 23485 | TIX, BLT, TOGL).  For the last three, you need to execute the Tcl | 
 | 23486 | command "load {} Tix" (or Blt, or Togl) to gain access to them. | 
 | 23487 | The Modules/Setup line for the _tkinter module has been rewritten | 
 | 23488 | using the cool line-breaking feature of most Bourne shells. | 
 | 23489 |  | 
 | 23490 | - New socket method connect_ex() returns the error code from connect() | 
 | 23491 | instead of raising an exception on errors; this makes the logic | 
 | 23492 | required for asynchronous connects simpler and more efficient. | 
 | 23493 |  | 
 | 23494 | - New "locale" module with (still experimental) interface to the | 
| Antoine Pitrou | fbd4f80 | 2012-08-11 16:51:50 +0200 | [diff] [blame] | 23495 | standard C library locale interface, courtesy Martin von Löwis.  This | 
| Guido van Rossum | 439d1fa | 1998-12-21 21:41:14 +0000 | [diff] [blame] | 23496 | does not repeat my mistake in 1.5a4 of always calling | 
 | 23497 | setlocale(LC_ALL, "").  In fact, we've pretty much decided that | 
 | 23498 | Python's standard numerical formatting operations should always use | 
 | 23499 | the conventions for the C locale; the locale module contains utility | 
 | 23500 | functions to format numbers according to the user specified locale. | 
 | 23501 | (All this is accomplished by an explicit call to setlocale(LC_NUMERIC, | 
 | 23502 | "C") after locale-changing calls.)  See the library manual. (Alas, the | 
 | 23503 | promised changes to the "re" module for locale support have not been | 
 | 23504 | materialized yet.  If you care, volunteer!) | 
 | 23505 |  | 
 | 23506 | - Memory leak plugged in Py_BuildValue when building a dictionary. | 
 | 23507 |  | 
 | 23508 | - Shared modules can now live inside packages (hierarchical module | 
 | 23509 | namespaces).  No changes to the shared module itself are needed. | 
 | 23510 |  | 
 | 23511 | - Improved policy for __builtins__: this is a module in __main__ and a | 
 | 23512 | dictionary everywhere else. | 
 | 23513 |  | 
 | 23514 | - Python no longer catches SIGHUP and SIGTERM by default.  This was | 
 | 23515 | impossible to get right in the light of thread contexts.  If you want | 
 | 23516 | your program to clean up when a signal happens, use the signal module | 
 | 23517 | to set up your own signal handler. | 
 | 23518 |  | 
 | 23519 | - New Python/C API PyNumber_CoerceEx() does not return an exception | 
 | 23520 | when no coercion is possible.  This is used to fix a problem where | 
 | 23521 | comparing incompatible numbers for equality would raise an exception | 
 | 23522 | rather than return false as in Python 1.4 -- it once again will return | 
 | 23523 | false. | 
 | 23524 |  | 
 | 23525 | - The errno module is changed again -- the table of error messages | 
 | 23526 | (errorstr) is removed.  Instead, you can use os.strerror().  This | 
 | 23527 | removes redundance and a potential locale dependency. | 
 | 23528 |  | 
 | 23529 | - New module xmllib, to parse XML files.  By Sjoerd Mullender. | 
 | 23530 |  | 
 | 23531 | - New C API PyOS_AfterFork() is called after fork() in posixmodule.c. | 
 | 23532 | It resets the signal module's notion of what the current process ID | 
 | 23533 | and thread are, so that signal handlers will work after (and across) | 
 | 23534 | calls to os.fork(). | 
 | 23535 |  | 
 | 23536 | - Fixed most occurrences of fatal errors due to missing thread state. | 
 | 23537 |  | 
 | 23538 | - For vgrind (a flexible source pretty printer) fans, there's a simple | 
 | 23539 | Python definition in Misc/vgrindefs, courtesy Neale Pickett. | 
 | 23540 |  | 
 | 23541 | - Fixed memory leak in exec statement. | 
 | 23542 |  | 
 | 23543 | - The test.pystone module has a new function, pystones(loops=LOOPS), | 
 | 23544 | which returns a (benchtime, stones) tuple.  The main() function now | 
 | 23545 | calls this and prints the report. | 
 | 23546 |  | 
 | 23547 | - Package directories now *require* the presence of an __init__.py (or | 
 | 23548 | __init__.pyc) file before they are considered as packages.  This is | 
 | 23549 | done to prevent accidental subdirectories with common names from | 
 | 23550 | overriding modules with the same name. | 
 | 23551 |  | 
 | 23552 | - Fixed some strange exceptions in __del__ methods in library modules | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 23553 | (e.g. urllib).  This happens because the built-in names are already | 
| Guido van Rossum | 439d1fa | 1998-12-21 21:41:14 +0000 | [diff] [blame] | 23554 | deleted by the time __del__ is called.  The solution (a hack, but it | 
 | 23555 | works) is to set some instance variables to 0 instead of None. | 
 | 23556 |  | 
 | 23557 | - The table of built-in module initializers is replaced by a pointer | 
 | 23558 | variable.  This makes it possible to switch to a different table at | 
 | 23559 | run time, e.g. when a collection of modules is loaded from a shared | 
 | 23560 | library.  (No example code of how to do this is given, but it is | 
 | 23561 | possible.)  The table is still there of course, its name prefixed with | 
 | 23562 | an underscore and used to initialize the pointer. | 
 | 23563 |  | 
 | 23564 | - The warning about a thread still having a frame now only happens in | 
 | 23565 | verbose mode. | 
 | 23566 |  | 
 | 23567 | - Change the signal finialization so that it also resets the signal | 
 | 23568 | handlers.  After this has been called, our signal handlers are no | 
 | 23569 | longer active! | 
 | 23570 |  | 
 | 23571 | - New version of tokenize.py (by Ka-Ping Yee) recognizes raw string | 
 | 23572 | literals.  There's now also a test fort this module. | 
 | 23573 |  | 
 | 23574 | - The copy module now also uses __dict__.update(state) instead of | 
 | 23575 | going through individual attribute assignments, for class instances | 
 | 23576 | without a __setstate__ method. | 
 | 23577 |  | 
 | 23578 | - New module reconvert translates old-style (regex module) regular | 
 | 23579 | expressions to new-style (re module, Perl-style) regular expressions. | 
 | 23580 |  | 
 | 23581 | - Most modules that used to use the regex module now use the re | 
 | 23582 | module.  The grep module has a new pgrep() function which uses | 
 | 23583 | Perl-style regular expressions. | 
 | 23584 |  | 
 | 23585 | - The (very old, backwards compatibility) regexp.py module has been | 
 | 23586 | deleted. | 
 | 23587 |  | 
 | 23588 | - Restricted execution (rexec): added the pcre module (support for the | 
 | 23589 | re module) to the list of trusted extension modules. | 
 | 23590 |  | 
 | 23591 | - New version of Jim Fulton's CObject object type, adds | 
 | 23592 | PyCObject_FromVoidPtrAndDesc() and PyCObject_GetDesc() APIs. | 
 | 23593 |  | 
 | 23594 | - Some patches to Lee Busby's fpectl mods that accidentally didn't | 
 | 23595 | make it into 1.5a4. | 
 | 23596 |  | 
 | 23597 | - In the string module, add an optional 4th argument to count(), | 
 | 23598 | matching find() etc. | 
 | 23599 |  | 
 | 23600 | - Patch for the nntplib module by Charles Waldman to add optional user | 
 | 23601 | and password arguments to NNTP.__init__(), for nntp servers that need | 
 | 23602 | them. | 
 | 23603 |  | 
 | 23604 | - The str() function for class objects now returns | 
 | 23605 | "modulename.classname" instead of returning the same as repr(). | 
 | 23606 |  | 
 | 23607 | - The parsing of \xXX escapes no longer relies on sscanf(). | 
 | 23608 |  | 
 | 23609 | - The "sharedmodules" subdirectory of the installation is renamed to | 
 | 23610 | "lib-dynload".  (You may have to edit your Modules/Setup file to fix | 
 | 23611 | this in an existing installation!) | 
 | 23612 |  | 
 | 23613 | - Fixed Don Beaudry's mess-up with the OPT test in the configure | 
 | 23614 | script.  Certain SGI platforms will still issue a warning for each | 
 | 23615 | compile; there's not much I can do about this since the compiler's | 
 | 23616 | exit status doesn't indicate that I was using an obsolete option. | 
 | 23617 |  | 
 | 23618 | - Fixed Barry's mess-up with {}.get(), and added test cases for it. | 
 | 23619 |  | 
 | 23620 | - Shared libraries didn't quite work under AIX because of the change | 
 | 23621 | in status of the GNU readline interface.  Fix due to by Vladimir | 
 | 23622 | Marangozov. | 
 | 23623 |  | 
 | 23624 |  | 
 | 23625 | ====================================================================== | 
 | 23626 |  | 
 | 23627 |  | 
 | 23628 | From 1.5a3 to 1.5a4 | 
 | 23629 | =================== | 
 | 23630 |  | 
 | 23631 | - faqwiz.py: version 0.8; Recognize https:// as URL; <html>...</html> | 
 | 23632 | feature; better install instructions; removed faqmain.py (which was an | 
 | 23633 | older version). | 
 | 23634 |  | 
 | 23635 | - nntplib.py: Fixed some bugs reported by Lars Wirzenius (to Debian) | 
 | 23636 | about the treatment of lines starting with '.'.  Added a minimal test | 
 | 23637 | function. | 
 | 23638 |  | 
 | 23639 | - struct module: ignore most whitespace in format strings. | 
 | 23640 |  | 
 | 23641 | - urllib.py: close the socket and temp file in URLopener.retrieve() so | 
 | 23642 | that multiple retrievals using the same connection work. | 
 | 23643 |  | 
 | 23644 | - All standard exceptions are now classes by default; use -X to make | 
 | 23645 | them strings (for backward compatibility only). | 
 | 23646 |  | 
 | 23647 | - There's a new standard exception hierarchy, defined in the standard | 
 | 23648 | library module exceptions.py (which you never need to import | 
 | 23649 | explicitly).  See | 
 | 23650 | http://grail.cnri.reston.va.us/python/essays/stdexceptions.html for | 
 | 23651 | more info. | 
 | 23652 |  | 
 | 23653 | - Three new C API functions: | 
 | 23654 |  | 
 | 23655 |   - int PyErr_GivenExceptionMatches(obj1, obj2) | 
 | 23656 |  | 
 | 23657 |     Returns 1 if obj1 and obj2 are the same object, or if obj1 is an | 
 | 23658 |     instance of type obj2, or of a class derived from obj2 | 
 | 23659 |  | 
 | 23660 |   - int PyErr_ExceptionMatches(obj) | 
 | 23661 |  | 
 | 23662 |     Higher level wrapper around PyErr_GivenExceptionMatches() which uses | 
 | 23663 |     PyErr_Occurred() as obj1.  This will be the more commonly called | 
 | 23664 |     function. | 
 | 23665 |  | 
 | 23666 |   - void PyErr_NormalizeException(typeptr, valptr, tbptr) | 
 | 23667 |  | 
 | 23668 |     Normalizes exceptions, and places the normalized values in the | 
 | 23669 |     arguments.  If type is not a class, this does nothing.  If type is a | 
 | 23670 |     class, then it makes sure that value is an instance of the class by: | 
 | 23671 |  | 
 | 23672 |     1. if instance is of the type, or a class derived from type, it does | 
 | 23673 |        nothing. | 
 | 23674 |  | 
 | 23675 |     2. otherwise it instantiates the class, using the value as an | 
 | 23676 |        argument.  If value is None, it uses an empty arg tuple, and if | 
 | 23677 |        the value is a tuple, it uses just that. | 
 | 23678 |  | 
 | 23679 | - Another new C API function: PyErr_NewException() creates a new | 
 | 23680 | exception class derived from Exception; when -X is given, it creates a | 
 | 23681 | new string exception. | 
 | 23682 |  | 
 | 23683 | - core interpreter: remove the distinction between tuple and list | 
 | 23684 | unpacking; allow an arbitrary sequence on the right hand side of any | 
 | 23685 | unpack instruction.  (UNPACK_LIST and UNPACK_TUPLE now do the same | 
 | 23686 | thing, which should really be called UNPACK_SEQUENCE.) | 
 | 23687 |  | 
 | 23688 | - classes: Allow assignments to an instance's __dict__ or __class__, | 
 | 23689 | so you can change ivars (including shared ivars -- shock horror) and | 
 | 23690 | change classes dynamically.  Also make the check on read-only | 
 | 23691 | attributes of classes less draconic -- only the specials names | 
 | 23692 | __dict__, __bases__, __name__ and __{get,set,del}attr__ can't be | 
 | 23693 | assigned. | 
 | 23694 |  | 
 | 23695 | - Two new built-in functions: issubclass() and isinstance().  Both | 
 | 23696 | take classes as their second arguments.  The former takes a class as | 
 | 23697 | the first argument and returns true iff first is second, or is a | 
 | 23698 | subclass of second.  The latter takes any object as the first argument | 
 | 23699 | and returns true iff first is an instance of the second, or any | 
 | 23700 | subclass of second. | 
 | 23701 |  | 
 | 23702 | - configure: Added configuration tests for presence of alarm(), | 
 | 23703 | pause(), and getpwent(). | 
 | 23704 |  | 
 | 23705 | - Doc/Makefile: changed latex2html targets. | 
 | 23706 |  | 
 | 23707 | - classes: Reverse the search order for the Don Beaudry hook so that | 
 | 23708 | the first class with an applicable hook wins.  Makes more sense. | 
 | 23709 |  | 
 | 23710 | - Changed the checks made in Py_Initialize() and Py_Finalize().  It is | 
 | 23711 | now legal to call these more than once.  The first call to | 
 | 23712 | Py_Initialize() initializes, the first call to Py_Finalize() | 
 | 23713 | finalizes.  There's also a new API, Py_IsInitalized() which checks | 
 | 23714 | whether we are already initialized (in case you want to leave things | 
 | 23715 | as they were). | 
 | 23716 |  | 
 | 23717 | - Completely disable the declarations for malloc(), realloc() and | 
 | 23718 | free().  Any 90's C compiler has these in header files, and the tests | 
 | 23719 | to decide whether to suppress the declarations kept failing on some | 
 | 23720 | platforms. | 
 | 23721 |  | 
 | 23722 | - *Before* (instead of after) signalmodule.o is added, remove both | 
 | 23723 | intrcheck.o and sigcheck.o.  This should get rid of warnings in ar or | 
 | 23724 | ld on various systems. | 
 | 23725 |  | 
 | 23726 | - Added reop to PC/config.c | 
 | 23727 |  | 
 | 23728 | - configure: Decided to use -Aa -D_HPUX_SOURCE on HP-UX platforms. | 
 | 23729 | Removed outdated HP-UX comments from README.  Added Cray T3E comments. | 
 | 23730 |  | 
 | 23731 | - Various renames of statically defined functions that had name | 
 | 23732 | conflicts on some systems, e.g. strndup (GNU libc), join (Cray), | 
 | 23733 | roundup (sys/types.h). | 
 | 23734 |  | 
 | 23735 | - urllib.py: Interpret three slashes in file: URL as local file (for | 
 | 23736 | Netscape on Windows/Mac). | 
 | 23737 |  | 
 | 23738 | - copy.py: Make sure the objects returned by __getinitargs__() are | 
 | 23739 | kept alive (in the memo) to avoid a certain kind of nasty crash.  (Not | 
 | 23740 | easily reproducable because it requires a later call to | 
 | 23741 | __getinitargs__() to return a tuple that happens to be allocated at | 
 | 23742 | the same address.) | 
 | 23743 |  | 
 | 23744 | - Added definition of AR to toplevel Makefile.  Renamed @buildno temp | 
 | 23745 | file to buildno1. | 
 | 23746 |  | 
 | 23747 | - Moved Include/assert.h to Parser/assert.h, which seems to be the | 
 | 23748 | only place where it's needed. | 
 | 23749 |  | 
 | 23750 | - Tweaked the dictionary lookup code again for some more speed | 
 | 23751 | (Vladimir Marangozov). | 
 | 23752 |  | 
 | 23753 | - NT build: Changed the way python15.lib is included in the other | 
 | 23754 | projects.  Per Mark Hammond's suggestion, add it to the extra libs in | 
 | 23755 | Settings instead of to the project's source files. | 
 | 23756 |  | 
 | 23757 | - regrtest.py: Change default verbosity so that there are only three | 
 | 23758 | levels left: -q, default and -v.  In default mode, the name of each | 
 | 23759 | test is now printed.  -v is the same as the old -vv.  -q is more quiet | 
 | 23760 | than the old default mode. | 
 | 23761 |  | 
 | 23762 | - Removed the old FAQ from the distribution.  You now have to get it | 
 | 23763 | from the web! | 
 | 23764 |  | 
 | 23765 | - Removed the PC/make_nt.in file from the distribution; it is no | 
 | 23766 | longer needed. | 
 | 23767 |  | 
 | 23768 | - Changed the build sequence so that shared modules are built last. | 
 | 23769 | This fixes things for AIX and doesn't hurt elsewhere. | 
 | 23770 |  | 
 | 23771 | - Improved test for GNU MP v1 in mpzmodule.c | 
 | 23772 |  | 
 | 23773 | - fileobject.c: ftell() on Linux discards all buffered data; changed | 
 | 23774 | read() code to use lseek() instead to get the same effect | 
 | 23775 |  | 
 | 23776 | - configure.in, configure, importdl.c: NeXT sharedlib fixes | 
 | 23777 |  | 
 | 23778 | - tupleobject.c: PyTuple_SetItem asserts refcnt==1 | 
 | 23779 |  | 
 | 23780 | - resource.c: Different strategy regarding whether to declare | 
 | 23781 | getrusage() and getpagesize() -- #ifdef doesn't work, Linux has | 
 | 23782 | conflicting decls in its headers.  Choice: only declare the return | 
 | 23783 | type, not the argument prototype, and not on Linux. | 
 | 23784 |  | 
 | 23785 | - importdl.c, configure*: set sharedlib extensions properly for NeXT | 
 | 23786 |  | 
 | 23787 | - configure*, Makefile.in, Modules/Makefile.pre.in: AIX shared libraries | 
 | 23788 | fixed; moved addition of PURIFY to LINKCC to configure | 
 | 23789 |  | 
 | 23790 | - reopmodule.c, regexmodule.c, regexpr.c, zlibmodule.c: needed casts | 
 | 23791 | added to shup up various compilers. | 
 | 23792 |  | 
 | 23793 | - _tkinter.c: removed buggy mac #ifndef | 
 | 23794 |  | 
 | 23795 | - Doc: various Mac documentation changes, added docs for 'ic' module | 
 | 23796 |  | 
 | 23797 | - PC/make_nt.in: deleted | 
 | 23798 |  | 
 | 23799 | - test_time.py, test_strftime.py: tweaks to catch %Z (which may return | 
 | 23800 | "") | 
 | 23801 |  | 
 | 23802 | - test_rotor.py: print b -> print `b` | 
 | 23803 |  | 
 | 23804 | - Tkinter.py: (tagOrId) -> (tagOrId,) | 
 | 23805 |  | 
 | 23806 | - Tkinter.py: the Tk class now also has a configure() method and | 
 | 23807 | friends (they have been moved to the Misc class to accomplish this). | 
 | 23808 |  | 
 | 23809 | - dict.get(key[, default]) returns dict[key] if it exists, or default | 
 | 23810 | if it doesn't.  The default defaults to None.  This is quicker for | 
 | 23811 | some applications than using either has_key() or try:...except | 
 | 23812 | KeyError:.... | 
 | 23813 |  | 
 | 23814 | - Tools/webchecker/: some small changes to webchecker.py; added | 
 | 23815 | websucker.py (a simple web site mirroring script). | 
 | 23816 |  | 
 | 23817 | - Dictionary objects now have a get() method (also in UserDict.py). | 
 | 23818 | dict.get(key, default) returns dict[key] if it exists and default | 
 | 23819 | otherwise; default defaults to None. | 
 | 23820 |  | 
 | 23821 | - Tools/scripts/logmerge.py: print the author, too. | 
 | 23822 |  | 
 | 23823 | - Changes to import: support for "import a.b.c" is now built in.  See | 
 | 23824 | http://grail.cnri.reston.va.us/python/essays/packages.html | 
 | 23825 | for more info.  Most important deviations from "ni.py": __init__.py is | 
 | 23826 | executed in the package's namespace instead of as a submodule; and | 
 | 23827 | there's no support for "__" or "__domain__".  Note that "ni.py" is not | 
 | 23828 | changed to match this -- it is simply declared obsolete (while at the | 
 | 23829 | same time, it is documented...:-( ). | 
 | 23830 | Unfortunately, "ihooks.py" has not been upgraded (but see "knee.py" | 
 | 23831 | for an example implementation of hierarchical module import written in | 
 | 23832 | Python). | 
 | 23833 |  | 
 | 23834 | - More changes to import: the site.py module is now imported by | 
 | 23835 | default when Python is initialized; use -S to disable it.  The site.py | 
 | 23836 | module extends the path with several more directories: site-packages | 
 | 23837 | inside the lib/python1.5/ directory, site-python in the lib/ | 
 | 23838 | directory, and pathnames mentioned in *.pth files found in either of | 
 | 23839 | those directories.  See | 
 | 23840 | http://grail.cnri.reston.va.us/python/essays/packages.html | 
 | 23841 | for more info. | 
 | 23842 |  | 
 | 23843 | - Changes to standard library subdirectory names: those subdirectories | 
 | 23844 | that are not packages have been renamed with a hypen in their name, | 
 | 23845 | e.g. lib-tk, lib-stdwin, plat-win, plat-linux2, plat-sunos5, dos-8x3. | 
 | 23846 | The test suite is now a package -- to run a test, you must now use | 
 | 23847 | "import test.test_foo". | 
 | 23848 |  | 
 | 23849 | - A completely new re.py module is provided (thanks to Andrew | 
 | 23850 | Kuchling, Tim Peters and Jeffrey Ollie) which uses Philip Hazel's | 
 | 23851 | "pcre" re compiler and engine.  For a while, the "old" re.py (which | 
 | 23852 | was new in 1.5a3!) will be kept around as re1.py.  The "old" regex | 
 | 23853 | module and underlying parser and engine are still present -- while | 
 | 23854 | regex is now officially obsolete, it will probably take several major | 
 | 23855 | release cycles before it can be removed. | 
 | 23856 |  | 
 | 23857 | - The posix module now has a strerror() function which translates an | 
 | 23858 | error code to a string. | 
 | 23859 |  | 
 | 23860 | - The emacs.py module (which was long obsolete) has been removed. | 
 | 23861 |  | 
 | 23862 | - The universal makefile Misc/Makefile.pre.in now features an | 
 | 23863 | "install" target.  By default, installed shared libraries go into | 
 | 23864 | $exec_prefix/lib/python$VERSION/site-packages/. | 
 | 23865 |  | 
 | 23866 | - The install-sh script is installed with the other configuration | 
 | 23867 | specific files (in the config/ subdirectory). | 
 | 23868 |  | 
 | 23869 | - It turns out whatsound.py and sndhdr.py were identical modules. | 
 | 23870 | Since there's also an imghdr.py file, I propose to make sndhdr.py the | 
 | 23871 | official one.  For compatibility, whatsound.py imports * from | 
 | 23872 | sndhdr.py. | 
 | 23873 |  | 
 | 23874 | - Class objects have a new attribute, __module__, giving the name of | 
 | 23875 | the module in which they were declared.  This is useful for pickle and | 
 | 23876 | for printing the full name of a class exception. | 
 | 23877 |  | 
 | 23878 | - Many extension modules no longer issue a fatal error when their | 
 | 23879 | initialization fails; the importing code now checks whether an error | 
 | 23880 | occurred during module initialization, and correctly propagates the | 
 | 23881 | exception to the import statement. | 
 | 23882 |  | 
 | 23883 | - Most extension modules now raise class-based exceptions (except when | 
 | 23884 | -X is used). | 
 | 23885 |  | 
 | 23886 | - Subtle changes to PyEval_{Save,Restore}Thread(): always swap the | 
 | 23887 | thread state -- just don't manipulate the lock if it isn't there. | 
 | 23888 |  | 
 | 23889 | - Fixed a bug in Python/getopt.c that made it do the wrong thing when | 
 | 23890 | an option was a single '-'.  Thanks to Andrew Kuchling. | 
 | 23891 |  | 
 | 23892 | - New module mimetypes.py will guess a MIME type from a filename's | 
 | 23893 | extension. | 
 | 23894 |  | 
 | 23895 | - Windows: the DLL version is now settable via a resource rather than | 
 | 23896 | being hardcoded.  This can be used for "branding" a binary Python | 
 | 23897 | distribution. | 
 | 23898 |  | 
 | 23899 | - urllib.py is now threadsafe -- it now uses re instead of regex, and | 
 | 23900 | sys.exc_info() instead of sys.exc_{type,value}. | 
 | 23901 |  | 
 | 23902 | - Many other library modules that used to use | 
 | 23903 | sys.exc_{type,value,traceback} are now more thread-safe by virtue of | 
 | 23904 | using sys.exc_info(). | 
 | 23905 |  | 
 | 23906 | - The functions in popen2 have an optional buffer size parameter. | 
 | 23907 | Also, the command argument can now be either a string (passed to the | 
 | 23908 | shell) or a list of arguments (passed directly to execv). | 
 | 23909 |  | 
 | 23910 | - Alas, the thread support for _tkinter released with 1.5a3 didn't | 
 | 23911 | work.  It's been rewritten.  The bad news is that it now requires a | 
 | 23912 | modified version of a file in the standard Tcl distribution, which you | 
 | 23913 | must compile with a -I option pointing to the standard Tcl source | 
 | 23914 | tree.  For this reason, the thread support is disabled by default. | 
 | 23915 |  | 
 | 23916 | - The errno extension module adds two tables: errorcode maps errno | 
 | 23917 | numbers to errno names (e.g. EINTR), and errorstr maps them to | 
 | 23918 | message strings.  (The latter is redundant because the new call | 
 | 23919 | posix.strerror() now does the same, but alla...)  (Marc-Andre Lemburg) | 
 | 23920 |  | 
 | 23921 | - The readline extension module now provides some interfaces to | 
 | 23922 | internal readline routines that make it possible to write a completer | 
 | 23923 | in Python.  An example completer, rlcompleter.py, is provided. | 
 | 23924 |  | 
 | 23925 | 	When completing a simple identifier, it completes keywords, | 
 | 23926 | 	built-ins and globals in __main__; when completing | 
 | 23927 | 	NAME.NAME..., it evaluates (!) the expression up to the last | 
 | 23928 | 	dot and completes its attributes. | 
 | 23929 |  | 
 | 23930 | 	It's very cool to do "import string" type "string.", hit the | 
 | 23931 | 	completion key (twice), and see the list of names defined by | 
 | 23932 | 	the string module! | 
 | 23933 |  | 
 | 23934 | 	Tip: to use the tab key as the completion key, call | 
 | 23935 |  | 
 | 23936 | 	    readline.parse_and_bind("tab: complete") | 
 | 23937 |  | 
 | 23938 | - The traceback.py module has a new function tb_lineno() by Marc-Andre | 
 | 23939 | Lemburg which extracts the line number from the linenumber table in | 
 | 23940 | the code object.  Apparently the traceback object doesn't contains the | 
 | 23941 | right linenumber when -O is used.  Rather than guessing whether -O is | 
 | 23942 | on or off, the module itself uses tb_lineno() unconditionally. | 
 | 23943 |  | 
 | 23944 | - Fixed Demo/tkinter/matt/canvas-moving-or-creating.py: change bind() | 
 | 23945 | to tag_bind() so it works again. | 
 | 23946 |  | 
 | 23947 | - The pystone script is now a standard library module.  Example use: | 
 | 23948 | "import test.pystone; test.pystone.main()". | 
 | 23949 |  | 
 | 23950 | - The import of the readline module in interactive mode is now also | 
 | 23951 | attempted when -i is specified.  (Yes, I know, giving in to Marc-Andre | 
 | 23952 | Lemburg, who asked for this. :-) | 
 | 23953 |  | 
 | 23954 | - rfc822.py: Entirely rewritten parseaddr() function by Sjoerd | 
 | 23955 | Mullender, to be closer to the standard.  This fixes the getaddr() | 
 | 23956 | method.  Unfortunately, getaddrlist() is as broken as ever, since it | 
 | 23957 | splits on commas without regard for RFC 822 quoting conventions. | 
 | 23958 |  | 
 | 23959 | - pprint.py: correctly emit trailing "," in singleton tuples. | 
 | 23960 |  | 
 | 23961 | - _tkinter.c: export names for its type objects, TkappType and | 
 | 23962 | TkttType. | 
 | 23963 |  | 
 | 23964 | - pickle.py: use __module__ when defined; fix a particularly hard to | 
 | 23965 | reproduce bug that confuses the memo when temporary objects are | 
 | 23966 | returned by custom pickling interfaces; and a semantic change: when | 
 | 23967 | unpickling the instance variables of an instance, use | 
 | 23968 | inst.__dict__.update(value) instead of a for loop with setattr() over | 
 | 23969 | the value.keys().  This is more consistent (the pickling doesn't use | 
 | 23970 | getattr() either but pickles inst.__dict__) and avoids problems with | 
 | 23971 | instances that have a __setattr__ hook.  But it *is* a semantic change | 
 | 23972 | (because the setattr hook is no longer used).  So beware! | 
 | 23973 |  | 
 | 23974 | - config.h is now installed (at last) in | 
 | 23975 | $exec_prefix/include/python1.5/.  For most sites, this means that it | 
 | 23976 | is actually in $prefix/include/python1.5/, with all the other Python | 
 | 23977 | include files, since $prefix and $exec_prefix are the same by | 
 | 23978 | default. | 
 | 23979 |  | 
 | 23980 | - The imp module now supports parts of the functionality to implement | 
 | 23981 | import of hierarchical module names.  It now supports find_module() | 
 | 23982 | and load_module() for all types of modules.  Docstrings have been | 
 | 23983 | added for those functions in the built-in imp module that are still | 
 | 23984 | relevant (some old interfaces are obsolete).  For a sample | 
 | 23985 | implementation of hierarchical module import in Python, see the new | 
 | 23986 | library module knee.py. | 
 | 23987 |  | 
 | 23988 | - The % operator on string objects now allows arbitrary nested parens | 
 | 23989 | in a %(...)X style format.  (Brad Howes) | 
 | 23990 |  | 
 | 23991 | - Reverse the order in which Setup and Setup.local are passed to the | 
 | 23992 | makesetup script.  This allows variable definitions in Setup.local to | 
 | 23993 | override definitions in Setup.  (But you'll still have to edit Setup | 
 | 23994 | if you want to disable modules that are enabled by default, or if such | 
 | 23995 | modules need non-standard options.) | 
 | 23996 |  | 
 | 23997 | - Added PyImport_ImportModuleEx(name, globals, locals, fromlist); this | 
 | 23998 | is like PyImport_ImporModule(name) but receives the globals and locals | 
 | 23999 | dict and the fromlist arguments as well.  (The name is a char*; the | 
 | 24000 | others are PyObject*s). | 
 | 24001 |  | 
 | 24002 | - The 'p' format in the struct extension module alloded to above is | 
 | 24003 | new in 1.5a4. | 
 | 24004 |  | 
 | 24005 | - The types.py module now uses try-except in a few places to make it | 
 | 24006 | more likely that it can be imported in restricted mode.  Some type | 
 | 24007 | names are undefined in that case, e.g. CodeType (inaccessible), | 
 | 24008 | FileType (not always accessible), and TracebackType and FrameType | 
 | 24009 | (inaccessible). | 
 | 24010 |  | 
 | 24011 | - In urllib.py: added separate administration of temporary files | 
 | 24012 | created y URLopener.retrieve() so cleanup() can properly remove them. | 
 | 24013 | The old code removed everything in tempcache which was a bad idea if | 
 | 24014 | the user had passed a non-temp file into it.  Also, in basejoin(), | 
 | 24015 | interpret relative paths starting in "../".  This is necessary if the | 
 | 24016 | server uses symbolic links. | 
 | 24017 |  | 
 | 24018 | - The Windows build procedure and project files are now based on | 
 | 24019 | Microsoft Visual C++ 5.x.  The build now takes place in the PCbuild | 
 | 24020 | directory.  It is much more robust, and properly builds separate Debug | 
 | 24021 | and Release versions.  (The installer will be added shortly.) | 
 | 24022 |  | 
 | 24023 | - Added casts and changed some return types in regexpr.c to avoid | 
 | 24024 | compiler warnings or errors on some platforms. | 
 | 24025 |  | 
 | 24026 | - The AIX build tools for shared libraries now supports VPATH.  (Donn | 
 | 24027 | Cave) | 
 | 24028 |  | 
 | 24029 | - By default, disable the "portable" multimedia modules audioop, | 
 | 24030 | imageop, and rgbimg, since they don't work on 64-bit platforms. | 
 | 24031 |  | 
 | 24032 | - Fixed a nasty bug in cStringIO.c when code was actually using the | 
 | 24033 | close() method (the destructors would try to free certain fields a | 
 | 24034 | second time). | 
 | 24035 |  | 
 | 24036 | - For those who think they need it, there's a "user.py" module.  This | 
 | 24037 | is *not* imported by default, but can be imported to run user-specific | 
 | 24038 | setup commands, ~/.pythonrc.py. | 
 | 24039 |  | 
 | 24040 | - Various speedups suggested by Fredrik Lundh, Marc-Andre Lemburg, | 
 | 24041 | Vladimir Marangozov, and others. | 
 | 24042 |  | 
 | 24043 | - Added os.altsep; this is '/' on DOS/Windows, and None on systems | 
 | 24044 | with a sane filename syntax. | 
 | 24045 |  | 
 | 24046 | - os.py: Write out the dynamic OS choice, to avoid exec statements. | 
 | 24047 | Adding support for a new OS is now a bit more work, but I bet that | 
 | 24048 | 'dos' or 'nt' will cover most situations... | 
 | 24049 |  | 
 | 24050 | - The obsolete exception AccessError is now really gone. | 
 | 24051 |  | 
 | 24052 | - Tools/faqwiz/: New installation instructions show how to maintain | 
 | 24053 | multiple FAQs.  Removed bootstrap script from end of faqwiz.py module. | 
 | 24054 | Added instructions to bootstrap script, too.  Version bumped to 0.8.1. | 
 | 24055 | Added <html>...</html> feature suggested by Skip Montanaro.  Added | 
 | 24056 | leading text for Roulette, default to 'Hit Reload ...'.  Fix typo in | 
 | 24057 | default SRCDIR. | 
 | 24058 |  | 
 | 24059 | - Documentation for the relatively new modules "keyword" and "symbol" | 
 | 24060 | has been added (to the end of the section on the parser extension | 
 | 24061 | module). | 
 | 24062 |  | 
 | 24063 | - In module bisect.py, but functions have two optional argument 'lo' | 
 | 24064 | and 'hi' which allow you to specify a subsequence of the array to | 
 | 24065 | operate on. | 
 | 24066 |  | 
 | 24067 | - In ftplib.py, changed most methods to return their status (even when | 
 | 24068 | it is always "200 OK") rather than swallowing it. | 
 | 24069 |  | 
 | 24070 | - main() now calls setlocale(LC_ALL, ""), if setlocale() and | 
 | 24071 | <locale.h> are defined. | 
 | 24072 |  | 
 | 24073 | - Changes to configure.in, the configure script, and both | 
 | 24074 | Makefile.pre.in files, to support SGI's SGI_ABI platform selection | 
 | 24075 | environment variable. | 
 | 24076 |  | 
 | 24077 |  | 
 | 24078 | ====================================================================== | 
 | 24079 |  | 
 | 24080 |  | 
 | 24081 | From 1.4 to 1.5a3 | 
 | 24082 | ================= | 
 | 24083 |  | 
 | 24084 | Security | 
 | 24085 | -------- | 
 | 24086 |  | 
 | 24087 | - If you are using the setuid script C wrapper (Misc/setuid-prog.c), | 
 | 24088 | please use the new version.  The old version has a huge security leak. | 
 | 24089 |  | 
 | 24090 | Miscellaneous | 
 | 24091 | ------------- | 
 | 24092 |  | 
 | 24093 | - Because of various (small) incompatible changes in the Python | 
 | 24094 | bytecode interpreter, the magic number for .pyc files has changed | 
 | 24095 | again. | 
 | 24096 |  | 
 | 24097 | - The default module search path is now much saner.  Both on Unix and | 
 | 24098 | Windows, it is essentially derived from the path to the executable | 
 | 24099 | (which can be overridden by setting the environment variable | 
 | 24100 | $PYTHONHOME).  The value of $PYTHONPATH on Windows is now inserted in | 
 | 24101 | front of the default path, like in Unix (instead of overriding the | 
 | 24102 | default path).  On Windows, the directory containing the executable is | 
 | 24103 | added to the end of the path. | 
 | 24104 |  | 
 | 24105 | - A new version of python-mode.el for Emacs has been included.  Also, | 
 | 24106 | a new file ccpy-style.el has been added to configure Emacs cc-mode for | 
 | 24107 | the preferred style in Python C sources. | 
 | 24108 |  | 
 | 24109 | - On Unix, when using sys.argv[0] to insert the script directory in | 
 | 24110 | front of sys.path, expand a symbolic link.  You can now install a | 
 | 24111 | program in a private directory and have a symbolic link to it in a | 
 | 24112 | public bin directory, and it will put the private directory in the | 
 | 24113 | module search path.  Note that the symlink is expanded in sys.path[0] | 
 | 24114 | but not in sys.argv[0], so you can still tell the name by which you | 
 | 24115 | were invoked. | 
 | 24116 |  | 
 | 24117 | - It is now recommended to use ``#!/usr/bin/env python'' instead of | 
 | 24118 | ``#!/usr/local/bin/python'' at the start of executable scripts, except | 
 | 24119 | for CGI scripts.  It has been determined that the use of /usr/bin/env | 
 | 24120 | is more portable than that of /usr/local/bin/python -- scripts almost | 
 | 24121 | never have to be edited when the Python interpreter lives in a | 
 | 24122 | non-standard place.  Note that this doesn't work for CGI scripts since | 
 | 24123 | the python executable often doesn't live in the HTTP server's default | 
 | 24124 | search path. | 
 | 24125 |  | 
 | 24126 | - The silly -s command line option and the corresponding | 
 | 24127 | PYTHONSUPPRESS environment variable (and the Py_SuppressPrint global | 
 | 24128 | flag in the Python/C API) are gone. | 
 | 24129 |  | 
 | 24130 | - Most problems on 64-bit platforms should now be fixed.  Andrew | 
 | 24131 | Kuchling helped.  Some uncommon extension modules are still not | 
 | 24132 | clean (image and audio ops?). | 
 | 24133 |  | 
 | 24134 | - Fixed a bug where multiple anonymous tuple arguments would be mixed up | 
 | 24135 | when using the debugger or profiler (reported by Just van Rossum). | 
 | 24136 | The simplest example is ``def f((a,b),(c,d)): print a,b,c,d''; this | 
 | 24137 | would print the wrong value when run under the debugger or profiler. | 
 | 24138 |  | 
 | 24139 | - The hacks that the dictionary implementation used to speed up | 
 | 24140 | repeated lookups of the same C string were removed; these were a | 
 | 24141 | source of subtle problems and don't seem to serve much of a purpose | 
 | 24142 | any longer. | 
 | 24143 |  | 
 | 24144 | - All traces of support for the long dead access statement have been | 
 | 24145 | removed from the sources. | 
 | 24146 |  | 
 | 24147 | - Plugged the two-byte memory leak in the tokenizer when reading an | 
 | 24148 | interactive EOF. | 
 | 24149 |  | 
 | 24150 | - There's a -O option to the interpreter that removes SET_LINENO | 
 | 24151 | instructions and assert statements (see below); it uses and produces | 
 | 24152 | .pyo files instead of .pyc files.  The speedup is only a few percent | 
 | 24153 | in most cases.  The line numbers are still available in the .pyo file, | 
 | 24154 | as a separate table (which is also available in .pyc files).  However, | 
 | 24155 | the removal of the SET_LINENO instructions means that the debugger | 
 | 24156 | (pdb) can't set breakpoints on lines in -O mode.  The traceback module | 
 | 24157 | contains a function to extract a line number from the code object | 
 | 24158 | referenced in a traceback object.  In the future it should be possible | 
 | 24159 | to write external bytecode optimizers that create better optimized | 
 | 24160 | .pyo files, and there should be more control over optimization; | 
 | 24161 | consider the -O option a "teaser".  Without -O, the assert statement | 
 | 24162 | actually generates code that first checks __debug__; if this variable | 
 | 24163 | is false, the assertion is not checked.  __debug__ is a built-in | 
 | 24164 | variable whose value is initialized to track the -O flag (it's true | 
 | 24165 | iff -O is not specified).  With -O, no code is generated for assert | 
 | 24166 | statements, nor for code of the form ``if __debug__: <something>''. | 
 | 24167 | Sorry, no further constant folding happens. | 
 | 24168 |  | 
 | 24169 |  | 
 | 24170 | Performance | 
 | 24171 | ----------- | 
 | 24172 |  | 
 | 24173 | - It's much faster (almost twice for pystone.py -- see | 
 | 24174 | Tools/scripts).  See the entry on string interning below. | 
 | 24175 |  | 
 | 24176 | - Some speedup by using separate free lists for method objects (both | 
 | 24177 | the C and the Python variety) and for floating point numbers. | 
 | 24178 |  | 
 | 24179 | - Big speedup by allocating frame objects with a single malloc() call. | 
 | 24180 | The Python/C API for frames is changed (you shouldn't be using this | 
 | 24181 | anyway). | 
 | 24182 |  | 
 | 24183 | - Significant speedup by inlining some common opcodes for common operand  | 
 | 24184 | types (e.g.  i+i, i-i, and list[i]).  Fredrik Lundh. | 
 | 24185 |  | 
 | 24186 | - Small speedup by reordering the method tables of some common | 
 | 24187 | objects (e.g. list.append is now first). | 
 | 24188 |  | 
 | 24189 | - Big optimization to the read() method of file objects.  A read() | 
 | 24190 | without arguments now attempts to use fstat to allocate a buffer of | 
 | 24191 | the right size; for pipes and sockets, it will fall back to doubling | 
 | 24192 | the buffer size.  While that the improvement is real on all systems, | 
 | 24193 | it is most dramatic on Windows. | 
 | 24194 |  | 
 | 24195 |  | 
 | 24196 | Documentation | 
 | 24197 | ------------- | 
 | 24198 |  | 
 | 24199 | - Many new pieces of library documentation were contributed, mostly by | 
 | 24200 | Andrew Kuchling.  Even cmath is now documented!  There's also a | 
 | 24201 | chapter of the library manual, "libundoc.tex", which provides a | 
 | 24202 | listing of all undocumented modules, plus their status (e.g. internal, | 
 | 24203 | obsolete, or in need of documentation).  Also contributions by Sue | 
 | 24204 | Williams, Skip Montanaro, and some module authors who succumbed to | 
 | 24205 | pressure to document their own contributed modules :-).  Note that | 
 | 24206 | printing the documentation now kills fewer trees -- the margins have | 
 | 24207 | been reduced. | 
 | 24208 |  | 
 | 24209 | - I have started documenting the Python/C API. Unfortunately this project  | 
 | 24210 | hasn't been completed yet.  It will be complete before the final release of  | 
 | 24211 | Python 1.5, though.  At the moment, it's better to read the LaTeX source  | 
 | 24212 | than to attempt to run it through LaTeX and print the resulting dvi file. | 
 | 24213 |  | 
 | 24214 | - The posix module (and hence os.py) now has doc strings!  Thanks to Neil  | 
 | 24215 | Schemenauer.  I received a few other contributions of doc strings.  In most  | 
 | 24216 | other places, doc strings are still wishful thinking... | 
 | 24217 |  | 
 | 24218 |  | 
 | 24219 | Language changes | 
 | 24220 | ---------------- | 
 | 24221 |  | 
 | 24222 | - Private variables with leading double underscore are now a permanent  | 
 | 24223 | feature of the language.  (These were experimental in release 1.4.  I have  | 
 | 24224 | favorable experience using them; I can't label them "experimental"  | 
 | 24225 | forever.) | 
 | 24226 |  | 
 | 24227 | - There's new string literal syntax for "raw strings".  Prefixing a string  | 
 | 24228 | literal with the letter r (or R) disables all escape processing in the  | 
 | 24229 | string; for example, r'\n' is a two-character string consisting of a  | 
 | 24230 | backslash followed by the letter n.  This combines with all forms of string  | 
 | 24231 | quotes; it is actually useful for triple quoted doc strings which might  | 
 | 24232 | contain references to \n or \t.  An embedded quote prefixed with a  | 
 | 24233 | backslash does not terminate the string, but the backslash is still  | 
 | 24234 | included in the string; for example, r'\'' is a two-character string  | 
 | 24235 | consisting of a backslash and a quote.  (Raw strings are also  | 
 | 24236 | affectionately known as Robin strings, after their inventor, Robin  | 
 | 24237 | Friedrich.) | 
 | 24238 |  | 
 | 24239 | - There's a simple assert statement, and a new exception | 
 | 24240 | AssertionError.  For example, ``assert foo > 0'' is equivalent to ``if | 
 | 24241 | not foo > 0: raise AssertionError''.  Sorry, the text of the asserted | 
 | 24242 | condition is not available; it would be too complicated to generate | 
 | 24243 | code for this (since the code is generated from a parse tree). | 
 | 24244 | However, the text is displayed as part of the traceback! | 
 | 24245 |  | 
 | 24246 | - The raise statement has a new feature: when using "raise SomeClass, | 
 | 24247 | somevalue" where somevalue is not an instance of SomeClass, it | 
 | 24248 | instantiates SomeClass(somevalue).  In 1.5a4, if somevalue is an | 
 | 24249 | instance of a *derived* class of SomeClass, the exception class raised | 
 | 24250 | is set to somevalue.__class__, and SomeClass is ignored after that. | 
 | 24251 |  | 
 | 24252 | - Duplicate keyword arguments are now detected at compile time; | 
 | 24253 | f(a=1,a=2) is now a syntax error. | 
 | 24254 |  | 
 | 24255 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 24256 | Changes to built-in features | 
 | 24257 | ---------------------------- | 
| Guido van Rossum | 439d1fa | 1998-12-21 21:41:14 +0000 | [diff] [blame] | 24258 |  | 
 | 24259 | - There's a new exception FloatingPointError (used only by Lee Busby's | 
 | 24260 | patches to catch floating point exceptions, at the moment). | 
 | 24261 |  | 
 | 24262 | - The obsolete exception ConflictError (presumably used by the long | 
 | 24263 | obsolete access statement) has been deleted. | 
 | 24264 |  | 
 | 24265 | - There's a new function sys.exc_info() which returns the tuple  | 
 | 24266 | (sys.exc_type, sys.exc_value, sys.exc_traceback) in a thread-safe way. | 
 | 24267 |  | 
 | 24268 | - There's a new variable sys.executable, pointing to the executable file  | 
 | 24269 | for the Python interpreter. | 
 | 24270 |  | 
 | 24271 | - The sort() methods for lists no longer uses the C library qsort(); I | 
 | 24272 | wrote my own quicksort implementation, with lots of help (in the form | 
 | 24273 | of a kind of competition) from Tim Peters.  This solves a bug in | 
 | 24274 | dictionary comparisons on some Solaris versions when Python is built | 
 | 24275 | with threads, and makes sorting lists even faster. | 
 | 24276 |  | 
 | 24277 | - The semantics of comparing two dictionaries have changed, to make | 
 | 24278 | comparison of unequal dictionaries faster.  A shorter dictionary is | 
 | 24279 | always considered smaller than a larger dictionary.  For dictionaries | 
 | 24280 | of the same size, the smallest differing element determines the | 
 | 24281 | outcome (which yields the same results as before in this case, without | 
 | 24282 | explicit sorting).  Thanks to Aaron Watters for suggesting something | 
 | 24283 | like this. | 
 | 24284 |  | 
 | 24285 | - The semantics of try-except have changed subtly so that calling a | 
 | 24286 | function in an exception handler that itself raises and catches an | 
 | 24287 | exception no longer overwrites the sys.exc_* variables.  This also | 
 | 24288 | alleviates the problem that objects referenced in a stack frame that | 
 | 24289 | caught an exception are kept alive until another exception is caught | 
 | 24290 | -- the sys.exc_* variables are restored to their previous value when | 
 | 24291 | returning from a function that caught an exception. | 
 | 24292 |  | 
 | 24293 | - There's a new "buffer" interface.  Certain objects (e.g. strings and | 
 | 24294 | arrays) now support the "buffer" protocol.  Buffer objects are acceptable  | 
 | 24295 | whenever formerly a string was required for a write operation; mutable  | 
 | 24296 | buffer objects can be the target of a read operation using the call | 
 | 24297 | f.readinto(buffer).  A cool feature is that regular expression matching now  | 
 | 24298 | also work on array objects.  Contribution by Jack Jansen.  (Needs  | 
 | 24299 | documentation.) | 
 | 24300 |  | 
 | 24301 | - String interning: dictionary lookups are faster when the lookup | 
 | 24302 | string object is the same object as the key in the dictionary, not | 
 | 24303 | just a string with the same value.  This is done by having a pool of | 
 | 24304 | "interned" strings.  Most names generated by the interpreter are now | 
 | 24305 | automatically interned, and there's a new built-in function intern(s) | 
 | 24306 | that returns the interned version of a string.  Interned strings are | 
 | 24307 | not a different object type, and interning is totally optional, but by | 
 | 24308 | interning most keys a speedup of about 15% was obtained for the | 
 | 24309 | pystone benchmark. | 
 | 24310 |  | 
 | 24311 | - Dictionary objects have several new methods; clear() and copy() have | 
 | 24312 | the obvious semantics, while update(d) merges the contents of another | 
 | 24313 | dictionary d into this one, overriding existing keys.  The dictionary | 
 | 24314 | implementation file is now called dictobject.c rather than the | 
 | 24315 | confusing mappingobject.c. | 
 | 24316 |  | 
 | 24317 | - The intrinsic function dir() is much smarter; it looks in __dict__, | 
 | 24318 | __members__ and __methods__. | 
 | 24319 |  | 
 | 24320 | - The intrinsic functions int(), long() and float() can now take a | 
 | 24321 | string argument and then do the same thing as string.atoi(), | 
 | 24322 | string.atol(), and string.atof().  No second 'base' argument is | 
 | 24323 | allowed, and complex() does not take a string (nobody cared enough). | 
 | 24324 |  | 
 | 24325 | - When a module is deleted, its globals are now deleted in two phases. | 
 | 24326 | In the first phase, all variables whose name begins with exactly one | 
 | 24327 | underscore are replaced by None; in the second phase, all variables | 
 | 24328 | are deleted.  This makes it possible to have global objects whose | 
 | 24329 | destructors depend on other globals.  The deletion order within each | 
 | 24330 | phase is still random. | 
 | 24331 |  | 
 | 24332 | - It is no longer an error for a function to be called without a | 
 | 24333 | global variable __builtins__ -- an empty directory will be provided | 
 | 24334 | by default. | 
 | 24335 |  | 
 | 24336 | - Guido's corollary to the "Don Beaudry hook": it is now possible to | 
 | 24337 | do metaprogramming by using an instance as a base class.  Not for the | 
 | 24338 | faint of heart; and undocumented as yet, but basically if a base class | 
 | 24339 | is an instance, its class will be instantiated to create the new | 
 | 24340 | class.  Jim Fulton will love it -- it also works with instances of his | 
 | 24341 | "extension classes", since it is triggered by the presence of a | 
 | 24342 | __class__ attribute on the purported base class.  See | 
 | 24343 | Demo/metaclasses/index.html for an explanation and see that directory | 
 | 24344 | for examples. | 
 | 24345 |  | 
 | 24346 | - Another change is that the Don Beaudry hook is now invoked when | 
 | 24347 | *any* base class is special.  (Up to 1.5a3, the *last* special base | 
 | 24348 | class is used; in 1.5a4, the more rational choice of the *first* | 
 | 24349 | special base class is used.) | 
 | 24350 |  | 
 | 24351 | - New optional parameter to the readlines() method of file objects. | 
 | 24352 | This indicates the number of bytes to read (the actual number of bytes | 
 | 24353 | read will be somewhat larger due to buffering reading until the end of | 
 | 24354 | the line).  Some optimizations have also been made to speed it up (but | 
 | 24355 | not as much as read()). | 
 | 24356 |  | 
 | 24357 | - Complex numbers no longer have the ".conj" pseudo attribute; use | 
 | 24358 | z.conjugate() instead, or complex(z.real, -z.imag).  Complex numbers | 
 | 24359 | now *do* support the __members__ and __methods__ special attributes. | 
 | 24360 |  | 
 | 24361 | - The complex() function now looks for a __complex__() method on class | 
 | 24362 | instances before giving up. | 
 | 24363 |  | 
 | 24364 | - Long integers now support arbitrary shift counts, so you can now | 
 | 24365 | write 1L<<1000000, memory permitting.  (Python 1.4 reports "outrageous | 
 | 24366 | shift count for this.) | 
 | 24367 |  | 
 | 24368 | - The hex() and oct() functions have been changed so that for regular | 
 | 24369 | integers, they never emit a minus sign.  For example, on a 32-bit | 
 | 24370 | machine, oct(-1) now returns '037777777777' and hex(-1) returns | 
 | 24371 | '0xffffffff'.  While this may seem inconsistent, it is much more | 
 | 24372 | useful.  (For long integers, a minus sign is used as before, to fit | 
 | 24373 | the result in memory :-) | 
 | 24374 |  | 
 | 24375 | - The hash() function computes better hashes for several data types, | 
 | 24376 | including strings, floating point numbers, and complex numbers. | 
 | 24377 |  | 
 | 24378 |  | 
 | 24379 | New extension modules | 
 | 24380 | --------------------- | 
 | 24381 |  | 
 | 24382 | - New extension modules cStringIO.c and cPickle.c, written by Jim | 
 | 24383 | Fulton and other folks at Digital Creations.  These are much more | 
 | 24384 | efficient than their Python counterparts StringIO.py and pickle.py, | 
 | 24385 | but don't support subclassing.  cPickle.c clocks up to 1000 times | 
 | 24386 | faster than pickle.py; cStringIO.c's improvement is less dramatic but | 
 | 24387 | still significant. | 
 | 24388 |  | 
 | 24389 | - New extension module zlibmodule.c, interfacing to the free zlib | 
 | 24390 | library (gzip compatible compression).  There's also a module gzip.py | 
 | 24391 | which provides a higher level interface.  Written by Andrew Kuchling | 
 | 24392 | and Jeremy Hylton. | 
 | 24393 |  | 
 | 24394 | - New module readline; see the "miscellaneous" section above. | 
 | 24395 |  | 
 | 24396 | - New Unix extension module resource.c, by Jeremy Hylton, provides | 
 | 24397 | access to getrlimit(), getrusage(), setrusage(), getpagesize(), and | 
 | 24398 | related symbolic constants. | 
 | 24399 |  | 
 | 24400 | - New extension puremodule.c, by Barry Warsaw, which interfaces to the | 
 | 24401 | Purify(TM) C API.  See also the file Misc/PURIFY.README.  It is also | 
 | 24402 | possible to enable Purify by simply setting the PURIFY Makefile | 
 | 24403 | variable in the Modules/Setup file. | 
 | 24404 |  | 
 | 24405 |  | 
 | 24406 | Changes in extension modules | 
 | 24407 | ---------------------------- | 
 | 24408 |  | 
 | 24409 | - The struct extension module has several new features to control byte | 
 | 24410 | order and word size.  It supports reading and writing IEEE floats even | 
 | 24411 | on platforms where this is not the native format.  It uses uppercase | 
 | 24412 | format codes for unsigned integers of various sizes (always using | 
 | 24413 | Python long ints for 'I' and 'L'), 's' with a size prefix for strings, | 
 | 24414 | and 'p' for "Pascal strings" (with a leading length byte, included in | 
 | 24415 | the size; blame Hannu Krosing; new in 1.5a4).  A prefix '>' forces | 
 | 24416 | big-endian data and '<' forces little-endian data; these also select | 
 | 24417 | standard data sizes and disable automatic alignment (use pad bytes as | 
 | 24418 | needed). | 
 | 24419 |  | 
 | 24420 | - The array module supports uppercase format codes for unsigned data | 
 | 24421 | formats (like the struct module). | 
 | 24422 |  | 
 | 24423 | - The fcntl extension module now exports the needed symbolic | 
 | 24424 | constants.  (Formerly these were in FCNTL.py which was not available | 
 | 24425 | or correct for all platforms.) | 
 | 24426 |  | 
 | 24427 | - The extension modules dbm, gdbm and bsddb now check that the | 
 | 24428 | database is still open before making any new calls. | 
 | 24429 |  | 
 | 24430 | - The dbhash module is no more.  Use bsddb instead.  (There's a third | 
 | 24431 | party interface for the BSD 2.x code somewhere on the web; support for | 
 | 24432 | bsddb will be deprecated.) | 
 | 24433 |  | 
 | 24434 | - The gdbm module now supports a sync() method. | 
 | 24435 |  | 
 | 24436 | - The socket module now has some new functions: getprotobyname(), and | 
 | 24437 | the set {ntoh,hton}{s,l}(). | 
 | 24438 |  | 
 | 24439 | - Various modules now export their type object: socket.SocketType, | 
 | 24440 | array.ArrayType. | 
 | 24441 |  | 
 | 24442 | - The socket module's accept() method now returns unknown addresses as | 
 | 24443 | a tuple rather than raising an exception.  (This can happen in | 
 | 24444 | promiscuous mode.)  Theres' also a new function getprotobyname(). | 
 | 24445 |  | 
 | 24446 | - The pthread support for the thread module now works on most platforms. | 
 | 24447 |  | 
 | 24448 | - STDWIN is now officially obsolete.  Support for it will eventually | 
 | 24449 | be removed from the distribution. | 
 | 24450 |  | 
 | 24451 | - The binascii extension module is now hopefully fully debugged. | 
 | 24452 | (XXX Oops -- Fredrik Lundh promised me a uuencode fix that I never | 
 | 24453 | received.) | 
 | 24454 |  | 
 | 24455 | - audioop.c: added a ratecv() function; better handling of overflow in | 
 | 24456 | add(). | 
 | 24457 |  | 
 | 24458 | - posixmodule.c: now exports the O_* flags (O_APPEND etc.).  On | 
 | 24459 | Windows, also O_TEXT and O_BINARY.  The 'error' variable (the | 
 | 24460 | exception is raises) is renamed -- its string value is now "os.error", | 
 | 24461 | so newbies don't believe they have to import posix (or nt) to catch | 
 | 24462 | it when they see os.error reported as posix.error.  The execve() | 
 | 24463 | function now accepts any mapping object for the environment. | 
 | 24464 |  | 
 | 24465 | - A new version of the al (audio library) module for SGI was | 
 | 24466 | contributed by Sjoerd Mullender. | 
 | 24467 |  | 
 | 24468 | - The regex module has a new function get_syntax() which retrieves the | 
 | 24469 | syntax setting set by set_syntax().  The code was also sanitized, | 
 | 24470 | removing worries about unclean error handling.  See also below for its | 
 | 24471 | successor, re.py. | 
 | 24472 |  | 
 | 24473 | - The "new" module (which creates new objects of various types) once | 
 | 24474 | again has a fully functioning new.function() method.  Dangerous as | 
 | 24475 | ever!  Also, new.code() has several new arguments. | 
 | 24476 |  | 
 | 24477 | - A problem has been fixed in the rotor module: on systems with signed | 
 | 24478 | characters, rotor-encoded data was not portable when the key contained | 
 | 24479 | 8-bit characters.  Also, setkey() now requires its argument rather | 
 | 24480 | than having broken code to default it. | 
 | 24481 |  | 
 | 24482 | - The sys.builtin_module_names variable is now a tuple.  Another new | 
 | 24483 | variables in sys is sys.executable (the full path to the Python | 
 | 24484 | binary, if known). | 
 | 24485 |  | 
 | 24486 | - The specs for time.strftime() have undergone some revisions.  It | 
 | 24487 | appears that not all format characters are supported in the same way | 
 | 24488 | on all platforms.  Rather than reimplement it, we note these | 
 | 24489 | differences in the documentation, and emphasize the shared set of | 
 | 24490 | features.  There's also a thorough test set (that occasionally finds | 
 | 24491 | problems in the C library implementation, e.g. on some Linuxes), | 
 | 24492 | thanks to Skip Montanaro. | 
 | 24493 |  | 
 | 24494 | - The nis module seems broken when used with NIS+; unfortunately | 
 | 24495 | nobody knows how to fix it.  It should still work with old NIS. | 
 | 24496 |  | 
 | 24497 |  | 
 | 24498 | New library modules | 
 | 24499 | ------------------- | 
 | 24500 |  | 
 | 24501 | - New (still experimental) Perl-style regular expression module, | 
 | 24502 | re.py, which uses a new interface for matching as well as a new | 
 | 24503 | syntax; the new interface avoids the thread-unsafety of the regex | 
 | 24504 | interface.  This comes with a helper extension reopmodule.c and vastly | 
 | 24505 | rewritten regexpr.c.  Most work on this was done by Jeffrey Ollie, Tim | 
 | 24506 | Peters, and Andrew Kuchling.  See the documentation libre.tex.  In | 
 | 24507 | 1.5, the old regex module is still fully supported; in the future, it | 
 | 24508 | will become obsolete. | 
 | 24509 |  | 
 | 24510 | - New module gzip.py; see zlib above. | 
 | 24511 |  | 
 | 24512 | - New module keyword.py exports knowledge about Python's built-in | 
 | 24513 | keywords.  (New version by Ka-Ping Yee.) | 
 | 24514 |  | 
 | 24515 | - New module pprint.py (with documentation) which supports | 
 | 24516 | pretty-printing of lists, tuples, & dictionaries recursively.  By Fred | 
 | 24517 | Drake. | 
 | 24518 |  | 
 | 24519 | - New module code.py.  The function code.compile_command() can | 
 | 24520 | determine whether an interactively entered command is complete or not, | 
 | 24521 | distinguishing incomplete from invalid input.  (XXX Unfortunately, | 
 | 24522 | this seems broken at this moment, and I don't have the time to fix | 
 | 24523 | it.  It's probably better to add an explicit interface to the parser | 
 | 24524 | for this.) | 
 | 24525 |  | 
 | 24526 | - There is now a library module xdrlib.py which can read and write the | 
 | 24527 | XDR data format as used by Sun RPC, for example.  It uses the struct | 
 | 24528 | module. | 
 | 24529 |  | 
 | 24530 |  | 
 | 24531 | Changes in library modules | 
 | 24532 | -------------------------- | 
 | 24533 |  | 
 | 24534 | - Module codehack.py is now completely obsolete. | 
 | 24535 |  | 
 | 24536 | - The pickle.py module has been updated to make it compatible with the | 
 | 24537 | new binary format that cPickle.c produces.  By default it produces the | 
 | 24538 | old all-ASCII format compatible with the old pickle.py, still much | 
 | 24539 | faster than pickle.py; it will read both formats automatically.  A few | 
 | 24540 | other updates have been made. | 
 | 24541 |  | 
 | 24542 | - A new helper module, copy_reg.py, is provided to register extensions | 
 | 24543 | to the pickling code. | 
 | 24544 |  | 
 | 24545 | - Revamped module tokenize.py is much more accurate and has an | 
 | 24546 | interface that makes it a breeze to write code to colorize Python | 
 | 24547 | source code.  Contributed by Ka-Ping Yee. | 
 | 24548 |  | 
 | 24549 | - In ihooks.py, ModuleLoader.load_module() now closes the file under | 
 | 24550 | all circumstances. | 
 | 24551 |  | 
 | 24552 | - The tempfile.py module has a new class, TemporaryFile, which creates | 
 | 24553 | an open temporary file that will be deleted automatically when | 
 | 24554 | closed.  This works on Windows and MacOS as well as on Unix.  (Jim | 
 | 24555 | Fulton.) | 
 | 24556 |  | 
 | 24557 | - Changes to the cgi.py module: Most imports are now done at the | 
 | 24558 | top of the module, which provides a speedup when using ni (Jim | 
 | 24559 | Fulton).  The problem with file upload to a Windows platform is solved | 
 | 24560 | by using the new tempfile.TemporaryFile class; temporary files are now | 
 | 24561 | always opened in binary mode (Jim Fulton).  The cgi.escape() function | 
 | 24562 | now takes an optional flag argument that quotes '"' to '"'.  It | 
 | 24563 | is now possible to invoke cgi.py from a command line script, to test | 
 | 24564 | cgi scripts more easily outside an http server.  There's an optional | 
 | 24565 | limit to the size of uploads to POST (Skip Montanaro).  Added a | 
 | 24566 | 'strict_parsing' option to all parsing functions (Jim Fulton).  The | 
 | 24567 | function parse_qs() now uses urllib.unquote() on the name as well as | 
 | 24568 | the value of fields (Clarence Gardner).  The FieldStorage class now | 
 | 24569 | has a __len__() method. | 
 | 24570 |  | 
 | 24571 | - httplib.py: the socket object is no longer closed; all HTTP/1.* | 
 | 24572 | responses are now accepted; and it is now thread-safe (by not using | 
 | 24573 | the regex module). | 
 | 24574 |  | 
 | 24575 | - BaseHTTPModule.py: treat all HTTP/1.* versions the same. | 
 | 24576 |  | 
 | 24577 | - The popen2.py module is now rewritten using a class, which makes | 
 | 24578 | access to the standard error stream and the process id of the | 
 | 24579 | subprocess possible. | 
 | 24580 |  | 
 | 24581 | - Added timezone support to the rfc822.py module, in the form of a | 
 | 24582 | getdate_tz() method and a parsedate_tz() function; also a mktime_tz(). | 
 | 24583 | Also added recognition of some non-standard date formats, by Lars | 
 | 24584 | Wirzenius, and RFC 850 dates (Chris Lawrence). | 
 | 24585 |  | 
 | 24586 | - mhlib.py: various enhancements, including almost compatible parsing | 
 | 24587 | of message sequence specifiers without invoking a subprocess.  Also | 
 | 24588 | added a createmessage() method by Lars Wirzenius. | 
 | 24589 |  | 
 | 24590 | - The StringIO.StringIO class now supports readline(nbytes).  (Lars  | 
 | 24591 | Wirzenius.)  (Of course, you should be using cStringIO for performance.) | 
 | 24592 |  | 
 | 24593 | - UserDict.py supports the new dictionary methods as well. | 
 | 24594 |  | 
 | 24595 | - Improvements for whrandom.py by Tim Peters: use 32-bit arithmetic to | 
 | 24596 | speed it up, and replace 0 seed values by 1 to avoid degeneration. | 
 | 24597 | A bug was fixed in the test for invalid arguments. | 
 | 24598 |  | 
 | 24599 | - Module ftplib.py: added support for parsing a .netrc file (Fred | 
 | 24600 | Drake).  Also added an ntransfercmd() method to the FTP class, which | 
 | 24601 | allows access to the expected size of a transfer when available, and a | 
 | 24602 | parse150() function to the module which parses the corresponding 150 | 
 | 24603 | response. | 
 | 24604 |  | 
 | 24605 | - urllib.py: the ftp cache is now limited to 10 entries.  Added | 
 | 24606 | quote_plus() and unquote_plus() functions which are like quote() and | 
 | 24607 | unquote() but also replace spaces with '+' or vice versa, for | 
 | 24608 | encoding/decoding CGI form arguments.  Catch all errors from the ftp | 
 | 24609 | module.  HTTP requests now add the Host: header line.  The proxy | 
 | 24610 | variable names are now mapped to lower case, for Windows.  The | 
 | 24611 | spliturl() function no longer erroneously throws away all data past | 
 | 24612 | the first newline.  The basejoin() function now intereprets "../" | 
 | 24613 | correctly.  I *believe* that the problems with "exception raised in | 
 | 24614 | __del__" under certain circumstances have been fixed (mostly by | 
 | 24615 | changes elsewher in the interpreter). | 
 | 24616 |  | 
 | 24617 | - In urlparse.py, there is a cache for results in urlparse.urlparse(); | 
 | 24618 | its size limit is set to 20.  Also, new URL schemes shttp, https, and | 
 | 24619 | snews are "supported". | 
 | 24620 |  | 
 | 24621 | - shelve.py: use cPickle and cStringIO when available.  Also added | 
 | 24622 | a sync() method, which calls the database's sync() method if there is | 
 | 24623 | one. | 
 | 24624 |  | 
 | 24625 | - The mimetools.py module now uses the available Python modules for | 
 | 24626 | decoding quoted-printable, uuencode and base64 formats, rather than | 
 | 24627 | creating a subprocess. | 
 | 24628 |  | 
 | 24629 | - The python debugger (pdb.py, and its base class bdb.py) now support | 
 | 24630 | conditional breakpoints.  See the docs. | 
 | 24631 |  | 
 | 24632 | - The modules base64.py, uu.py and quopri.py can now be used as simple | 
 | 24633 | command line utilities. | 
 | 24634 |  | 
 | 24635 | - Various small fixes to the nntplib.py module that I can't bother to | 
 | 24636 | document in detail. | 
 | 24637 |  | 
 | 24638 | - Sjoerd Mullender's mimify.py module now supports base64 encoding and  | 
 | 24639 | includes functions to handle the funny encoding you sometimes see in mail  | 
 | 24640 | headers.  It is now documented. | 
 | 24641 |  | 
 | 24642 | - mailbox.py: Added BabylMailbox.  Improved the way the mailbox is | 
 | 24643 | gotten from the environment. | 
 | 24644 |  | 
 | 24645 | - Many more modules now correctly open files in binary mode when this | 
 | 24646 | is necessary on non-Unix platforms. | 
 | 24647 |  | 
 | 24648 | - The copying functions in the undocumented module shutil.py are | 
 | 24649 | smarter. | 
 | 24650 |  | 
 | 24651 | - The Writer classes in the formatter.py module now have a flush() | 
 | 24652 | method. | 
 | 24653 |  | 
 | 24654 | - The sgmllib.py module accepts hyphens and periods in the middle of | 
 | 24655 | attribute names.  While this is against the SGML standard, there is | 
 | 24656 | some HTML out there that uses this... | 
 | 24657 |  | 
 | 24658 | - The interface for the Python bytecode disassembler module, dis.py, | 
 | 24659 | has been enhanced quite a bit.  There's now one main function, | 
 | 24660 | dis.dis(), which takes almost any kind of object (function, module, | 
 | 24661 | class, instance, method, code object) and disassembles it; without | 
 | 24662 | arguments it disassembles the last frame of the last traceback.  The | 
 | 24663 | other functions have changed slightly, too. | 
 | 24664 |  | 
 | 24665 | - The imghdr.py module recognizes new image types: BMP, PNG. | 
 | 24666 |  | 
 | 24667 | - The string.py module has a new function replace(str, old, new, | 
 | 24668 | [maxsplit]) which does substring replacements.  It is actually | 
 | 24669 | implemented in C in the strop module.  The functions [r]find() an | 
 | 24670 | [r]index() have an optional 4th argument indicating the end of the | 
 | 24671 | substring to search, alsoo implemented by their strop counterparts. | 
 | 24672 | (Remember, never import strop -- import string uses strop when | 
 | 24673 | available with zero overhead.) | 
 | 24674 |  | 
 | 24675 | - The string.join() function now accepts any sequence argument, not | 
 | 24676 | just lists and tuples. | 
 | 24677 |  | 
 | 24678 | - The string.maketrans() requires its first two arguments to be | 
 | 24679 | present.  The old version didn't require them, but there's not much | 
 | 24680 | point without them, and the documentation suggests that they are | 
 | 24681 | required, so we fixed the code to match the documentation. | 
 | 24682 |  | 
 | 24683 | - The regsub.py module has a function clear_cache(), which clears its | 
 | 24684 | internal cache of compiled regular expressions.  Also, the cache now | 
 | 24685 | takes the current syntax setting into account.  (However, this module | 
 | 24686 | is now obsolete -- use the sub() or subn() functions or methods in the | 
 | 24687 | re module.) | 
 | 24688 |  | 
 | 24689 | - The undocumented module Complex.py has been removed, now that Python | 
 | 24690 | has built-in complex numbers.  A similar module remains as | 
 | 24691 | Demo/classes/Complex.py, as an example. | 
 | 24692 |  | 
 | 24693 |  | 
 | 24694 | Changes to the build process | 
 | 24695 | ---------------------------- | 
 | 24696 |  | 
 | 24697 | - The way GNU readline is configured is totally different.  The | 
 | 24698 | --with-readline configure option is gone.  It is now an extension | 
 | 24699 | module, which may be loaded dynamically.  You must enable it (and | 
| Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 24700 | specify the correct libraries to link with) in the Modules/Setup file. | 
| Guido van Rossum | 439d1fa | 1998-12-21 21:41:14 +0000 | [diff] [blame] | 24701 | Importing the module installs some hooks which enable command line | 
 | 24702 | editing.  When the interpreter shell is invoked interactively, it | 
 | 24703 | attempts to import the readline module; when this fails, the default | 
 | 24704 | input mechanism is used.  The hook variables are PyOS_InputHook and | 
 | 24705 | PyOS_ReadlineFunctionPointer.  (Code contributed by Lee Busby, with | 
 | 24706 | ideas from William Magro.) | 
 | 24707 |  | 
 | 24708 | - New build procedure: a single library, libpython1.5.a, is now built, | 
 | 24709 | which contains absolutely everything except for a one-line main() | 
 | 24710 | program (which calls Py_Main(argc, argv) to start the interpreter | 
 | 24711 | shell).  This makes life much simpler for applications that need to | 
 | 24712 | embed Python.  The serial number of the build is now included in the | 
 | 24713 | version string (sys.version). | 
 | 24714 |  | 
 | 24715 | - As far as I can tell, neither gcc -Wall nor the Microsoft compiler | 
 | 24716 | emits a single warning any more when compiling Python. | 
 | 24717 |  | 
 | 24718 | - A number of new Makefile variables have been added for special | 
 | 24719 | situations, e.g. LDLAST is appended to the link command.  These are | 
 | 24720 | used by editing the Makefile or passing them on the make command | 
 | 24721 | line. | 
 | 24722 |  | 
 | 24723 | - A set of patches from Lee Busby has been integrated that make it | 
 | 24724 | possible to catch floating point exceptions.  Use the configure option | 
 | 24725 | --with-fpectl to enable the patches; the extension modules fpectl and | 
 | 24726 | fpetest provide control to enable/disable and test the feature, | 
 | 24727 | respectively. | 
 | 24728 |  | 
 | 24729 | - The support for shared libraries under AIX is now simpler and more | 
 | 24730 | robust.  Thanks to Vladimir Marangozov for revamping his own patches! | 
 | 24731 |  | 
 | 24732 | - The Modules/makesetup script now reads a file Setup.local as well as | 
 | 24733 | a file Setup.  Most changes to the Setup script can be done by editing | 
 | 24734 | Setup.local instead, which makes it easier to carry a particular setup | 
 | 24735 | over from one release to the next. | 
 | 24736 |  | 
 | 24737 | - The Modules/makesetup script now copies any "include" lines it | 
 | 24738 | encounters verbatim into the output Makefile.  It also recognizes .cxx | 
 | 24739 | and .cpp as C++ source files. | 
 | 24740 |  | 
 | 24741 | - The configure script is smarter about C compiler options; e.g. with | 
 | 24742 | gcc it uses -O2 and -g when possible, and on some other platforms it | 
 | 24743 | uses -Olimit 1500 to avoid a warning from the optimizer about the main | 
 | 24744 | loop in ceval.c (which has more than 1000 basic blocks). | 
 | 24745 |  | 
 | 24746 | - The configure script now detects whether malloc(0) returns a NULL | 
 | 24747 | pointer or a valid block (of length zero).  This avoids the nonsense | 
 | 24748 | of always adding one byte to all malloc() arguments on most platforms. | 
 | 24749 |  | 
 | 24750 | - The configure script has a new option, --with-dec-threads, to enable | 
 | 24751 | DEC threads on DEC Alpha platforms.  Also, --with-threads is now an | 
 | 24752 | alias for --with-thread (this was the Most Common Typo in configure | 
 | 24753 | arguments). | 
 | 24754 |  | 
 | 24755 | - Many changes in Doc/Makefile; amongst others, latex2html is now used | 
 | 24756 | to generate HTML from all latex documents. | 
 | 24757 |  | 
 | 24758 |  | 
 | 24759 | Change to the Python/C API | 
 | 24760 | -------------------------- | 
 | 24761 |  | 
 | 24762 | - Because some interfaces have changed, the PYTHON_API macro has been | 
 | 24763 | bumped.  Most extensions built for the old API version will still run, | 
 | 24764 | but I can't guarantee this.  Python prints a warning message on | 
 | 24765 | version mismatches; it dumps core when the version mismatch causes a | 
 | 24766 | serious problem :-) | 
 | 24767 |  | 
 | 24768 | - I've completed the Grand Renaming, with the help of Roger Masse and | 
 | 24769 | Barry Warsaw.  This makes reading or debugging the code much easier. | 
 | 24770 | Many other unrelated code reorganizations have also been carried out. | 
 | 24771 | The allobjects.h header file is gone; instead, you would have to | 
 | 24772 | include Python.h followed by rename2.h.  But you're better off running | 
 | 24773 | Tools/scripts/fixcid.py -s Misc/RENAME on your source, so you can omit | 
 | 24774 | the rename2.h; it will disappear in the next release. | 
 | 24775 |  | 
 | 24776 | - Various and sundry small bugs in the "abstract" interfaces have been | 
 | 24777 | fixed.  Thanks to all the (involuntary) testers of the Python 1.4 | 
 | 24778 | version!  Some new functions have been added, e.g. PySequence_List(o), | 
 | 24779 | equivalent to list(o) in Python. | 
 | 24780 |  | 
 | 24781 | - New API functions PyLong_FromUnsignedLong() and | 
 | 24782 | PyLong_AsUnsignedLong(). | 
 | 24783 |  | 
 | 24784 | - The API functions in the file cgensupport.c are no longer | 
 | 24785 | supported.  This file has been moved to Modules and is only ever | 
 | 24786 | compiled when the SGI specific 'gl' module is built. | 
 | 24787 |  | 
 | 24788 | - PyObject_Compare() can now raise an exception.  Check with | 
 | 24789 | PyErr_Occurred().  The comparison function in an object type may also | 
 | 24790 | raise an exception. | 
 | 24791 |  | 
 | 24792 | - The slice interface uses an upper bound of INT_MAX when no explicit | 
 | 24793 | upper bound is given (e.x. for a[1:]).  It used to ask the object for | 
 | 24794 | its length and do the calculations. | 
 | 24795 |  | 
 | 24796 | - Support for multiple independent interpreters.  See Doc/api.tex, | 
 | 24797 | functions Py_NewInterpreter() and Py_EndInterpreter().  Since the | 
 | 24798 | documentation is incomplete, also see the new Demo/pysvr example | 
 | 24799 | (which shows how to use these in a threaded application) and the | 
 | 24800 | source code. | 
 | 24801 |  | 
 | 24802 | - There is now a Py_Finalize() function which "de-initializes" | 
 | 24803 | Python.  It is possible to completely restart the interpreter | 
 | 24804 | repeatedly by calling Py_Finalize() followed by Py_Initialize().  A | 
 | 24805 | change of functionality in Py_Initialize() means that it is now a | 
 | 24806 | fatal error to call it while the interpreter is already initialized. | 
 | 24807 | The old, half-hearted Py_Cleanup() routine is gone.  Use of Py_Exit() | 
 | 24808 | is deprecated (it is nothing more than Py_Finalize() followed by | 
 | 24809 | exit()). | 
 | 24810 |  | 
 | 24811 | - There are no known memory leaks left.  While Py_Finalize() doesn't | 
 | 24812 | free *all* allocated memory (some of it is hard to track down), | 
 | 24813 | repeated calls to Py_Finalize() and Py_Initialize() do not create | 
 | 24814 | unaccessible heap blocks. | 
 | 24815 |  | 
 | 24816 | - There is now explicit per-thread state.  (Inspired by, but not the | 
 | 24817 | same as, Greg Stein's free threading patches.) | 
 | 24818 |  | 
 | 24819 | - There is now better support for threading C applications.  There are | 
 | 24820 | now explicit APIs to manipulate the interpreter lock.  Read the source | 
 | 24821 | or the Demo/pysvr example; the new functions are | 
 | 24822 | PyEval_{Acquire,Release}{Lock,Thread}(). | 
 | 24823 |  | 
 | 24824 | - The test macro DEBUG has changed to Py_DEBUG, to avoid interference | 
 | 24825 | with other libraries' DEBUG macros.  Likewise for any other test | 
 | 24826 | macros that didn't yet start with Py_. | 
 | 24827 |  | 
 | 24828 | - New wrappers around malloc() and friends: Py_Malloc() etc. call | 
 | 24829 | malloc() and call PyErr_NoMemory() when it fails; PyMem_Malloc() call | 
 | 24830 | just malloc().  Use of these wrappers could be essential if multiple | 
 | 24831 | memory allocators exist (e.g. when using certain DLL setups under | 
 | 24832 | Windows).  (Idea by Jim Fulton.) | 
 | 24833 |  | 
 | 24834 | - New C API PyImport_Import() which uses whatever __import__() hook | 
 | 24835 | that is installed for the current execution environment.  By Jim | 
 | 24836 | Fulton. | 
 | 24837 |  | 
 | 24838 | - It is now possible for an extension module's init function to fail | 
 | 24839 | non-fatally, by calling one of the PyErr_* functions and returning. | 
 | 24840 |  | 
 | 24841 | - The PyInt_AS_LONG() and PyFloat_AS_DOUBLE() macros now cast their | 
 | 24842 | argument to the proper type, like the similar PyString macros already | 
 | 24843 | did.  (Suggestion by Marc-Andre Lemburg.)  Similar for PyList_GET_SIZE | 
 | 24844 | and PyList_GET_ITEM. | 
 | 24845 |  | 
 | 24846 | - Some of the Py_Get* function, like Py_GetVersion() (but not yet | 
 | 24847 | Py_GetPath()) are now declared as returning a const char *.  (More | 
 | 24848 | should follow.) | 
 | 24849 |  | 
 | 24850 | - Changed the run-time library to check for exceptions after object | 
 | 24851 | comparisons.  PyObject_Compare() can now return an exception; use | 
 | 24852 | PyErr_Occurred() to check (there is *no* special return value). | 
 | 24853 |  | 
 | 24854 | - PyFile_WriteString() and Py_Flushline() now return error indicators | 
 | 24855 | instead of clearing exceptions.  This fixes an obscure bug where using | 
 | 24856 | these would clear a pending exception, discovered by Just van Rossum. | 
 | 24857 |  | 
 | 24858 | - There's a new function, PyArg_ParseTupleAndKeywords(), which parses | 
 | 24859 | an argument list including keyword arguments.  Contributed by Geoff | 
 | 24860 | Philbrick. | 
 | 24861 |  | 
 | 24862 | - PyArg_GetInt() is gone. | 
 | 24863 |  | 
 | 24864 | - It's no longer necessary to include graminit.h when calling one of | 
 | 24865 | the extended parser API functions.  The three public grammar start | 
 | 24866 | symbols are now in Python.h as Py_single_input, Py_file_input, and | 
 | 24867 | Py_eval_input. | 
 | 24868 |  | 
 | 24869 | - The CObject interface has a new function, | 
 | 24870 | PyCObject_Import(module, name).  It calls PyCObject_AsVoidPtr() | 
 | 24871 | on the object referenced by "module.name". | 
 | 24872 |  | 
 | 24873 |  | 
 | 24874 | Tkinter | 
 | 24875 | ------- | 
 | 24876 |  | 
 | 24877 | - On popular demand, _tkinter once again installs a hook for readline | 
 | 24878 | that processes certain Tk events while waiting for the user to type | 
 | 24879 | (using PyOS_InputHook). | 
 | 24880 |  | 
 | 24881 | - A patch by Craig McPheeters plugs the most obnoxious memory leaks, | 
 | 24882 | caused by command definitions referencing widget objects beyond their | 
 | 24883 | lifetime. | 
 | 24884 |  | 
 | 24885 | - New standard dialog modules: tkColorChooser.py, tkCommonDialog.py, | 
 | 24886 | tkMessageBox.py, tkFileDialog.py, tkSimpleDialog.py These interface | 
 | 24887 | with the new Tk dialog scripts, and provide more "native platform" | 
 | 24888 | style file selection dialog boxes on some platforms.  Contributed by | 
 | 24889 | Fredrik Lundh. | 
 | 24890 |  | 
 | 24891 | - Tkinter.py: when the first Tk object is destroyed, it sets the | 
 | 24892 | hiddel global _default_root to None, so that when another Tk object is | 
 | 24893 | created it becomes the new default root.  Other miscellaneous | 
 | 24894 | changes and fixes. | 
 | 24895 |  | 
 | 24896 | - The Image class now has a configure method. | 
 | 24897 |  | 
 | 24898 | - Added a bunch of new winfo options to Tkinter.py; we should now be | 
 | 24899 | up to date with Tk 4.2.  The new winfo options supported are: | 
 | 24900 | mananger, pointerx, pointerxy, pointery, server, viewable, visualid, | 
 | 24901 | visualsavailable. | 
 | 24902 |  | 
 | 24903 | - The broken bind() method on Canvas objects defined in the Canvas.py | 
 | 24904 | module has been fixed.  The CanvasItem and Group classes now also have | 
 | 24905 | an unbind() method. | 
 | 24906 |  | 
 | 24907 | - The problem with Tkinter.py falling back to trying to import | 
 | 24908 | "tkinter" when "_tkinter" is not found has been fixed -- it no longer | 
 | 24909 | tries "tkinter", ever.  This makes diagnosing the problem "_tkinter | 
 | 24910 | not configured" much easier and will hopefully reduce the newsgroup | 
 | 24911 | traffic on this topic. | 
 | 24912 |  | 
 | 24913 | - The ScrolledText module once again supports the 'cnf' parameter, to | 
 | 24914 | be compatible with the examples in Mark Lutz' book (I know, I know, | 
 | 24915 | too late...) | 
 | 24916 |  | 
 | 24917 | - The _tkinter.c extension module has been revamped.  It now support | 
 | 24918 | Tk versions 4.1 through 8.0; support for 4.0 has been dropped.  It | 
 | 24919 | works well under Windows and Mac (with the latest Tk ports to those | 
 | 24920 | platforms).  It also supports threading -- it is safe for one | 
 | 24921 | (Python-created) thread to be blocked in _tkinter.mainloop() while | 
 | 24922 | other threads modify widgets.  To make the changes visible, those | 
 | 24923 | threads must use update_idletasks()method.  (The patch for threading | 
 | 24924 | in 1.5a3 was broken; in 1.5a4, it is back in a different version, | 
 | 24925 | which requires access to the Tcl sources to get it to work -- hence it | 
 | 24926 | is disabled by default.) | 
 | 24927 |  | 
 | 24928 | - A bug in _tkinter.c has been fixed, where Split() with a string | 
 | 24929 | containing an unmatched '"' could cause an exception or core dump. | 
 | 24930 |  | 
 | 24931 | - Unfortunately, on Windows and Mac, Tk 8.0 no longer supports | 
 | 24932 | CreateFileHandler, so _tkinter.createfilehandler is not available on | 
 | 24933 | those platforms when using Tk 8.0 or later.  I will have to rethink | 
 | 24934 | how to interface with Tcl's lower-level event mechanism, or with its | 
 | 24935 | channels (which are like Python's file-like objects).  Jack Jansen has | 
 | 24936 | provided a fix for the Mac, so createfilehandler *is* actually | 
 | 24937 | supported there; maybe I can adapt his fix for Windows. | 
 | 24938 |  | 
 | 24939 |  | 
 | 24940 | Tools and Demos | 
 | 24941 | --------------- | 
 | 24942 |  | 
 | 24943 | - A new regression test suite is provided, which tests most of the | 
 | 24944 | standard and built-in modules.  The regression test is run by invoking | 
 | 24945 | the script Lib/test/regrtest.py.  Barry Warsaw wrote the test harnass; | 
 | 24946 | he and Roger Masse contributed most of the new tests. | 
 | 24947 |  | 
 | 24948 | - New tool: faqwiz -- the CGI script that is used to maintain the | 
 | 24949 | Python FAQ (http://grail.cnri.reston.va.us/cgi-bin/faqw.py).  In | 
 | 24950 | Tools/faqwiz. | 
 | 24951 |  | 
 | 24952 | - New tool: webchecker -- a simple extensible web robot that, when | 
 | 24953 | aimed at a web server, checks that server for dead links.  Available | 
 | 24954 | are a command line utility as well as a Tkinter based GUI version.  In | 
 | 24955 | Tools/webchecker.  A simplified version of this program is dissected | 
 | 24956 | in my article in O'Reilly's WWW Journal, the issue on Scripting | 
 | 24957 | Languages (Vol 2, No 2); Scripting the Web with Python (pp 97-120). | 
 | 24958 | Includes a parser for robots.txt files by Skip Montanaro. | 
 | 24959 |  | 
 | 24960 | - New small tools: cvsfiles.py (prints a list of all files under CVS | 
 | 24961 | n a particular directory tree), treesync.py (a rather Guido-specific | 
 | 24962 | script to synchronize two source trees, one on Windows NT, the other | 
 | 24963 | one on Unix under CVS but accessible from the NT box), and logmerge.py | 
 | 24964 | (sort a collection of RCS or CVS logs by date).  In Tools/scripts. | 
 | 24965 |  | 
 | 24966 | - The freeze script now also works under Windows (NT).  Another | 
 | 24967 | feature allows the -p option to be pointed at the Python source tree | 
 | 24968 | instead of the installation prefix.  This was loosely based on part of | 
 | 24969 | xfreeze by Sam Rushing and Bill Tutt. | 
 | 24970 |  | 
 | 24971 | - New examples (Demo/extend) that show how to use the generic | 
 | 24972 | extension makefile (Misc/Makefile.pre.in). | 
 | 24973 |  | 
 | 24974 | - Tools/scripts/h2py.py now supports C++ comments. | 
 | 24975 |  | 
 | 24976 | - Tools/scripts/pystone.py script is upgraded to version 1.1; there | 
 | 24977 | was a bug in version 1.0 (distributed with Python 1.4) that leaked | 
 | 24978 | memory.  Also, in 1.1, the LOOPS variable is incremented to 10000. | 
 | 24979 |  | 
 | 24980 | - Demo/classes/Rat.py completely rewritten by Sjoerd Mullender. | 
 | 24981 |  | 
 | 24982 |  | 
 | 24983 | Windows (NT and 95) | 
 | 24984 | ------------------- | 
 | 24985 |  | 
 | 24986 | - New project files for Developer Studio (Visual C++) 5.0 for Windows | 
 | 24987 | NT (the old VC++ 4.2 Makefile is also still supported, but will | 
 | 24988 | eventually be withdrawn due to its bulkiness). | 
 | 24989 |  | 
 | 24990 | - See the note on the new module search path in the "Miscellaneous" section  | 
 | 24991 | above. | 
 | 24992 |  | 
 | 24993 | - Support for Win32s (the 32-bit Windows API under Windows 3.1) is | 
 | 24994 | basically withdrawn.  If it still works for you, you're lucky. | 
 | 24995 |  | 
 | 24996 | - There's a new extension module, msvcrt.c, which provides various  | 
 | 24997 | low-level operations defined in the Microsoft Visual C++ Runtime Library.   | 
 | 24998 | These include locking(), setmode(), get_osfhandle(), set_osfhandle(), and  | 
 | 24999 | console I/O functions like kbhit(), getch() and putch(). | 
 | 25000 |  | 
 | 25001 | - The -u option not only sets the standard I/O streams to unbuffered | 
 | 25002 | status, but also sets them in binary mode.  (This can also be done | 
 | 25003 | using msvcrt.setmode(), by the way.) | 
 | 25004 |  | 
 | 25005 | - The, sys.prefix and sys.exec_prefix variables point to the directory  | 
 | 25006 | where Python is installed, or to the top of the source tree, if it was run  | 
 | 25007 | from there. | 
 | 25008 |  | 
 | 25009 | - The various os.path modules (posixpath, ntpath, macpath) now support | 
 | 25010 | passing more than two arguments to the join() function, so | 
 | 25011 | os.path.join(a, b, c) is the same as os.path.join(a, os.path.join(b, | 
 | 25012 | c)). | 
 | 25013 |  | 
 | 25014 | - The ntpath module (normally used as os.path) supports ~ to $HOME  | 
 | 25015 | expansion in expanduser(). | 
 | 25016 |  | 
 | 25017 | - The freeze tool now works on Windows. | 
 | 25018 |  | 
 | 25019 | - See also the Tkinter category for a sad note on | 
 | 25020 | _tkinter.createfilehandler(). | 
 | 25021 |  | 
 | 25022 | - The truncate() method for file objects now works on Windows. | 
 | 25023 |  | 
 | 25024 | - Py_Initialize() is no longer called when the DLL is loaded.  You | 
 | 25025 | must call it yourself. | 
 | 25026 |  | 
 | 25027 | - The time module's clock() function now has good precision through | 
 | 25028 | the use of the Win32 API QueryPerformanceCounter(). | 
 | 25029 |  | 
 | 25030 | - Mark Hammond will release Python 1.5 versions of PythonWin and his | 
 | 25031 | other Windows specific code: the win32api extensions, COM/ActiveX | 
 | 25032 | support, and the MFC interface. | 
 | 25033 |  | 
 | 25034 |  | 
 | 25035 | Mac | 
 | 25036 | --- | 
 | 25037 |  | 
 | 25038 | - As always, the Macintosh port will be done by Jack Jansen.  He will | 
 | 25039 | make a separate announcement for the Mac specific source code and the | 
 | 25040 | binary distribution(s) when these are ready. | 
 | 25041 |  | 
 | 25042 |  | 
 | 25043 | ====================================================================== | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 25044 |  | 
| Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 25045 |  | 
| Guido van Rossum | c30e95f | 1996-07-30 18:53:51 +0000 | [diff] [blame] | 25046 | ===================================== | 
| Guido van Rossum | 821a558 | 1997-05-23 04:05:31 +0000 | [diff] [blame] | 25047 | ==> Release 1.4 (October 25 1996) <== | 
 | 25048 | ===================================== | 
 | 25049 |  | 
 | 25050 | (Starting in reverse chronological order:) | 
 | 25051 |  | 
 | 25052 | - Changed disclaimer notice. | 
 | 25053 |  | 
 | 25054 | - Added SHELL=/bin/sh to Misc/Makefile.pre.in -- some Make versions | 
 | 25055 | default to the user's login shell. | 
 | 25056 |  | 
 | 25057 | - In Lib/tkinter/Tkinter.py, removed bogus binding of <Delete> in Text | 
 | 25058 | widget, and bogus bspace() function. | 
 | 25059 |  | 
 | 25060 | - In Lib/cgi.py, bumped __version__ to 2.0 and restored a truncated | 
 | 25061 | paragraph. | 
 | 25062 |  | 
 | 25063 | - Fixed the NT Makefile (PC/vc40.mak) for VC 4.0 to set /MD for all | 
 | 25064 | subprojects, and to remove the (broken) experimental NumPy | 
 | 25065 | subprojects. | 
 | 25066 |  | 
 | 25067 | - In Lib/py_compile.py, cast mtime to long() so it will work on Mac | 
 | 25068 | (where os.stat() returns mtimes as floats.) | 
 | 25069 | - Set self.rfile unbuffered (like self.wfile) in SocketServer.py, to | 
 | 25070 | fix POST in CGIHTTPServer.py. | 
 | 25071 |  | 
 | 25072 | - Version 2.83 of Misc/python-mode.el for Emacs is included. | 
 | 25073 |  | 
 | 25074 | - In Modules/regexmodule.c, fixed symcomp() to correctly handle a new | 
 | 25075 | group starting immediately after a group tag. | 
 | 25076 |  | 
 | 25077 | - In Lib/SocketServer.py, changed the mode for rfile to unbuffered. | 
 | 25078 |  | 
 | 25079 | - In Objects/stringobject.c, fixed the compare function to do the | 
 | 25080 | first char comparison in unsigned mode, for consistency with the way | 
 | 25081 | other characters are compared by memcmp(). | 
 | 25082 |  | 
 | 25083 | - In Lib/tkinter/Tkinter.py, fixed Scale.get() to support floats. | 
 | 25084 |  | 
 | 25085 | - In Lib/urllib.py, fix another case where openedurl wasn't set. | 
 | 25086 |  | 
 | 25087 | (XXX Sorry, the rest is in totally random order.  No time to fix it.) | 
 | 25088 |  | 
 | 25089 | - SyntaxError exceptions detected during code generation | 
 | 25090 | (e.g. assignment to an expression) now include a line number. | 
 | 25091 |  | 
 | 25092 | - Don't leave trailing / or \ in script directory inserted in front of | 
 | 25093 | sys.path. | 
 | 25094 |  | 
 | 25095 | - Added a note to Tools/scripts/classfix.py abouts its historical | 
 | 25096 | importance. | 
 | 25097 |  | 
 | 25098 | - Added Misc/Makefile.pre.in, a universal Makefile for extensions | 
 | 25099 | built outside the distribution. | 
 | 25100 |  | 
 | 25101 | - Rewritten Misc/faq2html.py, by Ka-Ping Yee. | 
 | 25102 |  | 
 | 25103 | - Install shared modules with mode 555 (needed for performance on some | 
 | 25104 | platforms). | 
 | 25105 |  | 
 | 25106 | - Some changes to standard library modules to avoid calling append() | 
 | 25107 | with more than one argument -- while supported, this should be | 
 | 25108 | outlawed, and I don't want to set a bad example. | 
 | 25109 |  | 
 | 25110 | - bdb.py (and hence pdb.py) supports calling run() with a code object | 
 | 25111 | instead of a code string. | 
 | 25112 |  | 
 | 25113 | - Fixed an embarrassing bug cgi.py which prevented correct uploading | 
 | 25114 | of binary files from Netscape (which doesn't distinguish between | 
 | 25115 | binary and text files).  Also added dormant logging support, which | 
 | 25116 | makes it easier to debug the cgi module itself. | 
 | 25117 |  | 
 | 25118 | - Added default writer to constructor of NullFormatter class. | 
 | 25119 |  | 
 | 25120 | - Use binary mode for socket.makefile() calls in ftplib.py. | 
 | 25121 |  | 
 | 25122 | - The ihooks module no longer "installs" itself upon import -- this | 
 | 25123 | was an experimental feature that helped ironing out some bugs but that | 
 | 25124 | slowed down code that imported it without the need to install it | 
 | 25125 | (e.g. the rexec module).  Also close the file in some cases and add | 
 | 25126 | the __file__ attribute to loaded modules. | 
 | 25127 |  | 
 | 25128 | - The test program for mailbox.py is now more useful. | 
 | 25129 |  | 
 | 25130 | - Added getparamnames() to Message class in mimetools.py -- it returns | 
 | 25131 | the names of parameters to the content-type header. | 
 | 25132 |  | 
 | 25133 | - Fixed a typo in ni that broke the loop stripping "__." from names. | 
 | 25134 |  | 
 | 25135 | - Fix sys.path[0] for scripts run via pdb.py's new main program. | 
 | 25136 |  | 
 | 25137 | - profile.py can now also run a script, like pdb. | 
 | 25138 |  | 
 | 25139 | - Fix a small bug in pyclbr -- don't add names starting with _ when | 
 | 25140 | emulating from ... import *. | 
 | 25141 |  | 
 | 25142 | - Fixed a series of embarrassing typos in rexec's handling of standard | 
 | 25143 | I/O redirection.  Added some more "safe" built-in modules: cmath, | 
 | 25144 | errno, operator. | 
 | 25145 |  | 
 | 25146 | - Fixed embarrassing typo in shelve.py. | 
 | 25147 |  | 
 | 25148 | - Added SliceType and EllipsisType to types.py. | 
 | 25149 |  | 
 | 25150 | - In urllib.py, added handling for error 301 (same as 302); added | 
 | 25151 | geturl() method to get the URL after redirection. | 
 | 25152 |  | 
 | 25153 | - Fixed embarrassing typo in xdrlib.py.  Also fixed typo in Setup.in | 
 | 25154 | for _xdrmodule.c and removed redundant #include from _xdrmodule.c. | 
 | 25155 |  | 
 | 25156 | - Fixed bsddbmodule.c to add binary mode indicator on platforms that | 
 | 25157 | have it.  This should make it working on Windows NT. | 
 | 25158 |  | 
 | 25159 | - Changed last uses of #ifdef NT to #ifdef MS_WINDOWS or MS_WIN32, | 
 | 25160 | whatever applies.  Also rationalized some other tests for various MS | 
 | 25161 | platforms. | 
 | 25162 |  | 
 | 25163 | - Added the sources for the NT installer script used for Python | 
 | 25164 | 1.4beta3.  Not tested with this release, but better than nothing. | 
 | 25165 |  | 
 | 25166 | - A compromise in pickle's defenses against Trojan horses: a | 
 | 25167 | user-defined function is now okay where a class is expected.  A | 
 | 25168 | built-in function is not okay, to prevent pickling something that | 
 | 25169 | will execute os.system("rm -f *") when unpickling. | 
 | 25170 |  | 
 | 25171 | - dis.py will print the name of local variables referenced by local | 
 | 25172 | load/store/delete instructions. | 
 | 25173 |  | 
 | 25174 | - Improved portability of SimpleHTTPServer module to non-Unix | 
 | 25175 | platform. | 
 | 25176 |  | 
 | 25177 | - The thread.h interface adds an extra argument to down_sema().  This | 
 | 25178 | only affects other C code that uses thread.c; the Python thread module | 
 | 25179 | doesn't use semaphores (which aren't provided on all platforms where | 
 | 25180 | Python threads are supported).  Note: on NT, this change is not | 
 | 25181 | implemented. | 
 | 25182 |  | 
 | 25183 | - Fixed some typos in abstract.h; corrected signature of | 
 | 25184 | PyNumber_Coerce, added PyMapping_DelItem.  Also fixed a bug in | 
 | 25185 | abstract.c's PyObject_CallMethod(). | 
 | 25186 |  | 
 | 25187 | - apply(classname, (), {}) now works even if the class has no | 
 | 25188 | __init__() method. | 
 | 25189 |  | 
 | 25190 | - Implemented complex remainder and divmod() (these would dump core!). | 
 | 25191 | Conversion of complex numbers to int, long int or float now raises an | 
 | 25192 | exception, since there is no meaningful way to do it without losing | 
 | 25193 | information. | 
 | 25194 |  | 
 | 25195 | - Fixed bug in built-in complex() function which gave the wrong result | 
 | 25196 | for two real arguments. | 
 | 25197 |  | 
 | 25198 | - Change the hash algorithm for strings -- the multiplier is now | 
 | 25199 | 1000003 instead of 3, which gives better spread for short strings. | 
 | 25200 |  | 
 | 25201 | - New default path for Windows NT, the registry structure now supports | 
 | 25202 | default paths for different install packages.  (Mark Hammond -- the | 
 | 25203 | next PythonWin release will use this.) | 
 | 25204 |  | 
 | 25205 | - Added more symbols to the python_nt.def file. | 
 | 25206 |  | 
 | 25207 | - When using GNU readline, set rl_readline_name to "python". | 
 | 25208 |  | 
 | 25209 | - The Ellipses built-in name has been renamed to Ellipsis -- this is | 
 | 25210 | the correct singular form.  Thanks to Ka-Ping Yee, who saved us from | 
 | 25211 | eternal embarrassment. | 
 | 25212 |  | 
 | 25213 | - Bumped the PYTHON_API_VERSION to 1006, due to the Ellipses -> | 
 | 25214 | Ellipsis name change. | 
 | 25215 |  | 
 | 25216 | - Updated the library reference manual.  Added documentation of | 
 | 25217 | restricted mode (rexec, Bastion) and the formatter module (for use | 
 | 25218 | with the htmllib module).  Fixed the documentation of htmllib | 
 | 25219 | (finally). | 
 | 25220 |  | 
 | 25221 | - The reference manual is now maintained in FrameMaker. | 
 | 25222 |  | 
 | 25223 | - Upgraded scripts Doc/partparse.py and Doc/texi2html.py. | 
 | 25224 |  | 
 | 25225 | - Slight improvements to Doc/Makefile. | 
 | 25226 |  | 
 | 25227 | - Added fcntl.lockf(). This should be used for Unix file locking | 
 | 25228 | instead of the posixfile module; lockf() is more portable. | 
 | 25229 |  | 
 | 25230 | - The getopt module now supports long option names, thanks to Lars | 
 | 25231 | Wizenius. | 
 | 25232 |  | 
 | 25233 | - Plenty of changes to Tkinter and Canvas, mostly due to Fred Drake | 
 | 25234 | and Nils Fischbeck. | 
 | 25235 |  | 
 | 25236 | - Use more bits of time.time() in whrandom's default seed(). | 
 | 25237 |  | 
 | 25238 | - Performance hack for regex module's regs attribute. | 
 | 25239 |  | 
 | 25240 | - Don't close already closed socket in socket module. | 
 | 25241 |  | 
 | 25242 | - Correctly handle separators containing embedded nulls in | 
 | 25243 | strop.split, strop.find and strop.rfind.  Also added more detail to | 
 | 25244 | error message for strop.atoi and friends. | 
 | 25245 |  | 
 | 25246 | - Moved fallback definition for hypot() to Python/hypot.c. | 
 | 25247 |  | 
 | 25248 | - Added fallback definition for strdup, in Python/strdup.c. | 
 | 25249 |  | 
 | 25250 | - Fixed some bugs where a function would return 0 to indicate an error | 
 | 25251 | where it should return -1. | 
 | 25252 |  | 
 | 25253 | - Test for error returned by time.localtime(), and rationalized its MS | 
 | 25254 | tests. | 
 | 25255 |  | 
 | 25256 | - Added Modules/Setup.local file, which is processed after Setup. | 
 | 25257 |  | 
 | 25258 | - Corrected bug in toplevel Makefile.in -- execution of regen script | 
 | 25259 | would not use the right PATH and PYTHONPATH. | 
 | 25260 |  | 
 | 25261 | - Various and sundry NeXT configuration changes (sigh). | 
 | 25262 |  | 
 | 25263 | - Support systems where libreadline needs neither termcap nor curses. | 
 | 25264 |  | 
 | 25265 | - Improved ld_so_aix script and python.exp file (for AIX). | 
 | 25266 |  | 
 | 25267 | - More stringent test for working <stdarg.h> in configure script. | 
 | 25268 |  | 
 | 25269 | - Removed Demo/www subdirectory -- it was totally out of date. | 
 | 25270 |  | 
 | 25271 | - Improved demos and docs for Fred Drake's parser module; fixed one | 
 | 25272 | typo in the module itself. | 
 | 25273 |  | 
 | 25274 |  | 
 | 25275 | ========================================= | 
 | 25276 | ==> Release 1.4beta3 (August 26 1996) <== | 
 | 25277 | ========================================= | 
 | 25278 |  | 
 | 25279 |  | 
 | 25280 | (XXX This is less readable that it should.  I promise to restructure | 
 | 25281 | it for the final 1.4 release.) | 
 | 25282 |  | 
 | 25283 |  | 
 | 25284 | What's new in 1.4beta3 (since beta2)? | 
 | 25285 | ------------------------------------- | 
 | 25286 |  | 
 | 25287 | - Name mangling to implement a simple form of class-private variables. | 
 | 25288 | A name of the form "__spam" can't easily be used outside the class. | 
 | 25289 | (This was added in 1.4beta3, but left out of the 1.4beta3 release | 
 | 25290 | message.) | 
 | 25291 |  | 
 | 25292 | - In urllib.urlopen(): HTTP URLs containing user:passwd@host are now | 
 | 25293 | handled correctly when using a proxy server. | 
 | 25294 |  | 
 | 25295 | - In ntpath.normpath(): don't truncate to 8+3 format. | 
 | 25296 |  | 
 | 25297 | - In mimetools.choose_boundary(): don't die when getuid() or getpid() | 
 | 25298 | aren't defined. | 
 | 25299 |  | 
 | 25300 | - Module urllib: some optimizations to (un)quoting. | 
 | 25301 |  | 
 | 25302 | - New module MimeWriter for writing MIME documents. | 
 | 25303 |  | 
 | 25304 | - More changes to formatter module. | 
 | 25305 |  | 
 | 25306 | - The freeze script works once again and is much more robust (using | 
 | 25307 | sys.prefix etc.).  It also supports a -o option to specify an | 
 | 25308 | output directory. | 
 | 25309 |  | 
 | 25310 | - New module whichdb recognizes dbm, gdbm and bsddb/dbhash files. | 
 | 25311 |  | 
 | 25312 | - The Doc/Makefile targets have been reorganized somewhat to remove the  | 
 | 25313 | insistence on always generating PostScript. | 
 | 25314 |  | 
 | 25315 | - The texinfo to html filter (Doc/texi2html.py) has been improved somewhat. | 
 | 25316 |  | 
 | 25317 | - "errors.h" has been renamed to "pyerrors.h" to resolve a long-standing  | 
 | 25318 | name conflict on the Mac. | 
 | 25319 |  | 
 | 25320 | - Linking a module compiled with a different setting for Py_TRACE_REFS now  | 
 | 25321 | generates a linker error rather than a core dump. | 
 | 25322 |  | 
 | 25323 | - The cgi module has a new convenience function print_exception(), which  | 
 | 25324 | formats a python exception using HTML.  It also fixes a bug in the  | 
 | 25325 | compatibility code and adds a dubious feature which makes it possible to  | 
 | 25326 | have two query strings, one in the URL and one in the POST data. | 
 | 25327 |  | 
 | 25328 | - A subtle change in the unpickling of class instances makes it possible  | 
 | 25329 | to unpickle in restricted execution mode, where the __dict__ attribute is  | 
 | 25330 | not available (but setattr() is). | 
 | 25331 |  | 
 | 25332 | - Documentation for os.path.splitext() (== posixpath.splitext()) has been  | 
 | 25333 | cleared up.  It splits at the *last* dot. | 
 | 25334 |  | 
 | 25335 | - posixfile locking is now also correctly supported on AIX. | 
 | 25336 |  | 
 | 25337 | - The tempfile module once again honors an initial setting of tmpdir.  It  | 
 | 25338 | now works on Windows, too. | 
 | 25339 |  | 
 | 25340 | - The traceback module has some new functions to extract, format and print  | 
 | 25341 | the active stack. | 
 | 25342 |  | 
 | 25343 | - Some translation functions in the urllib module have been made a little  | 
 | 25344 | less sluggish. | 
 | 25345 |  | 
 | 25346 | - The addtag_* methods for Canvas widgets in Tkinter as well as in the  | 
 | 25347 | separate Canvas class have been fixed so they actually do something  | 
 | 25348 | meaningful. | 
 | 25349 |  | 
 | 25350 | - A tiny _test() function has been added to Tkinter.py. | 
 | 25351 |  | 
 | 25352 | - A generic Makefile for dynamically loaded modules is provided in the Misc  | 
 | 25353 | subdirectory (Misc/gMakefile). | 
 | 25354 |  | 
 | 25355 | - A new version of python-mode.el for Emacs is provided.  See | 
 | 25356 | http://www.python.org/ftp/emacs/pmdetails.html for details.  The | 
 | 25357 | separate file pyimenu.el is no longer needed, imenu support is folded | 
 | 25358 | into python-mode.el. | 
 | 25359 |  | 
 | 25360 | - The configure script can finally correctly find the readline library in a  | 
| Walter Dörwald | f0dfc7a | 2003-10-20 14:01:56 +0000 | [diff] [blame] | 25361 | non-standard location.  The LDFLAGS variable is passed on the Makefiles  | 
| Guido van Rossum | 821a558 | 1997-05-23 04:05:31 +0000 | [diff] [blame] | 25362 | from the configure script. | 
 | 25363 |  | 
 | 25364 | - Shared libraries are now installed as programs (i.e. with executable  | 
 | 25365 | permission).  This is required on HP-UX and won't hurt on other systems. | 
 | 25366 |  | 
 | 25367 | - The objc.c module is no longer part of the distribution.  Objective-C  | 
 | 25368 | support may become available as contributed software on the ftp site. | 
 | 25369 |  | 
 | 25370 | - The sybase module is no longer part of the distribution.  A much | 
 | 25371 | improved sybase module is available as contributed software from the | 
 | 25372 | ftp site. | 
 | 25373 |  | 
 | 25374 | - _tkinter is now compatible with Tcl 7.5 / Tk 4.1 patch1 on Windows and  | 
 | 25375 | Mac (don't use unpatched Tcl/Tk!).  The default line in the Setup.in file  | 
 | 25376 | now links with Tcl 7.5 / Tk 4.1 rather than 7.4/4.0. | 
 | 25377 |  | 
 | 25378 | - In Setup, you can now write "*shared*" instead of "*noconfig*", and you  | 
 | 25379 | can use *.so and *.sl as shared libraries. | 
 | 25380 |  | 
 | 25381 | - Some more fidgeting for AIX shared libraries. | 
 | 25382 |  | 
 | 25383 | - The mpz module is now compatible with GMP 2.x.  (Not tested by me.) | 
 | 25384 | (Note -- a complete replacement by Niels Mo"ller, called gpmodule, is | 
 | 25385 | available from the contrib directory on the ftp site.) | 
 | 25386 |  | 
 | 25387 | - A warning is written to sys.stderr when a __del__ method raises an  | 
 | 25388 | exception (formerly, such exceptions were completely ignored). | 
 | 25389 |  | 
 | 25390 | - The configure script now defines HAVE_OLD_CPP if the C preprocessor is  | 
 | 25391 | incapable of ANSI style token concatenation and stringification. | 
 | 25392 |  | 
 | 25393 | - All source files (except a few platform specific modules) are once again  | 
 | 25394 | compatible with K&R C compilers as well as ANSI compilers.  In particular, | 
 | 25395 | ANSI-isms have been removed or made conditional in complexobject.c,  | 
 | 25396 | getargs.c and operator.c. | 
 | 25397 |  | 
 | 25398 | - The abstract object API has three new functions, PyObject_DelItem,  | 
 | 25399 | PySequence_DelItem, and PySequence_DelSlice. | 
 | 25400 |  | 
 | 25401 | - The operator module has new functions delitem and delslice, and the  | 
 | 25402 | functions "or" and "and" are renamed to "or_" and "and_" (since "or" and  | 
 | 25403 | "and" are reserved words).  ("__or__" and "__and__" are unchanged.) | 
 | 25404 |  | 
 | 25405 | - The environment module is no longer supported; putenv() is now a function  | 
 | 25406 | in posixmodule (also under NT). | 
 | 25407 |  | 
 | 25408 | - Error in filter(<function>, "") has been fixed. | 
 | 25409 |  | 
 | 25410 | - Unrecognized keyword arguments raise TypeError, not KeyError. | 
 | 25411 |  | 
 | 25412 | - Better portability, fewer bugs and memory leaks, fewer compiler warnings,  | 
 | 25413 | some more documentation. | 
 | 25414 |  | 
 | 25415 | - Bug in float power boundary case (0.0 to the negative integer power)  | 
 | 25416 | fixed. | 
 | 25417 |  | 
 | 25418 | - The test of negative number to the float power has been moved from the  | 
 | 25419 | built-in pow() functin to floatobject.c (so complex numbers can yield the  | 
 | 25420 | correct result). | 
 | 25421 |  | 
 | 25422 | - The bug introduced in beta2 where shared libraries loaded (using  | 
 | 25423 | dlopen()) from the current directory would fail, has been fixed. | 
 | 25424 |  | 
 | 25425 | - Modules imported as shared libraries now also have a __file__ attribute,  | 
 | 25426 | giving the filename from which they were loaded.  The only modules without  | 
 | 25427 | a __file__ attribute now are built-in modules. | 
 | 25428 |  | 
 | 25429 | - On the Mac, dynamically loaded modules can end in either ".slb" or  | 
 | 25430 | ".<platform>.slb" where <platform> is either "CFM68K" or "ppc".  The ".slb"  | 
 | 25431 | extension should only be used for "fat" binaries. | 
 | 25432 |  | 
 | 25433 | - C API addition: marshal.c now supports  | 
 | 25434 | PyMarshal_WriteObjectToString(object). | 
 | 25435 |  | 
 | 25436 | - C API addition: getargs.c now supports | 
 | 25437 | PyArg_ParseTupleAndKeywords(args, kwdict, format, kwnames, ...) | 
 | 25438 | to parse keyword arguments. | 
 | 25439 |  | 
 | 25440 | - The PC versioning scheme (sys.winver) has changed once again.  the  | 
 | 25441 | version number is now "<digit>.<digit>.<digit>.<apiversion>", where the  | 
 | 25442 | first three <digit>s are the Python version (e.g. "1.4.0" for Python 1.4,  | 
 | 25443 | "1.4.1" for Python 1.4.1 -- the beta level is not included) and  | 
 | 25444 | <apiversion> is the four-digit PYTHON_API_VERSION (currently 1005). | 
 | 25445 |  | 
 | 25446 | - h2py.py accepts whitespace before the # in CPP directives | 
 | 25447 |  | 
 | 25448 | - On Solaris 2.5, it should now be possible to use either Posix threads or  | 
 | 25449 | Solaris threads (XXX: how do you select which is used???).  (Note: the  | 
 | 25450 | Python pthreads interface doesn't fully support semaphores yet -- anyone  | 
 | 25451 | care to fix this?) | 
 | 25452 |  | 
 | 25453 | - Thread support should now work on AIX, using either DCE threads or  | 
 | 25454 | pthreads. | 
 | 25455 |  | 
 | 25456 | - New file Demo/sockets/unicast.py | 
 | 25457 |  | 
 | 25458 | - Working Mac port, with CFM68K support, with Tk 4.1 support (though not  | 
 | 25459 | both) (XXX) | 
 | 25460 |  | 
 | 25461 | - New project setup for PC port, now compatible with PythonWin, with  | 
 | 25462 | _tkinter and NumPy support (XXX) | 
 | 25463 |  | 
 | 25464 | - New module site.py (XXX) | 
 | 25465 |  | 
 | 25466 | - New module xdrlib.py and optional support module _xdrmodule.c (XXX) | 
 | 25467 |  | 
 | 25468 | - parser module adapted to new grammar, complete w/ Doc & Demo (XXX) | 
 | 25469 |  | 
 | 25470 | - regen script fixed (XXX) | 
 | 25471 |  | 
 | 25472 | - new machdep subdirectories Lib/{aix3,aix4,next3_3,freebsd2,linux2} (XXX) | 
 | 25473 |  | 
 | 25474 | - testall now also tests math module (XXX) | 
 | 25475 |  | 
 | 25476 | - string.atoi c.s. now raise an exception for an empty input string. | 
 | 25477 |  | 
 | 25478 | - At last, it is no longer necessary to define HAVE_CONFIG_H in order to  | 
 | 25479 | have config.h included at various places. | 
 | 25480 |  | 
 | 25481 | - Unrecognized keyword arguments now raise TypeError rather than KeyError. | 
 | 25482 |  | 
 | 25483 | - The makesetup script recognizes files with extension .so or .sl as | 
 | 25484 | (shared) libraries. | 
 | 25485 |  | 
 | 25486 | - 'access' is no longer a reserved word, and all code related to its  | 
 | 25487 | implementation is gone (or at least #ifdef'ed out).  This should make  | 
 | 25488 | Python a little speedier too! | 
 | 25489 |  | 
 | 25490 | - Performance enhancements suggested by Sjoerd Mullender.  This includes  | 
 | 25491 | the introduction of two new optional function pointers in type object,  | 
 | 25492 | getattro and setattro, which are like getattr and setattr but take a  | 
 | 25493 | string object instead of a C string pointer. | 
 | 25494 |  | 
 | 25495 | - New operations in string module: lstrip(s) and rstrip(s) strip whitespace  | 
 | 25496 | only on the left or only on the right, A new optional third argument to  | 
 | 25497 | split() specifies the maximum number of separators honored (so  | 
 | 25498 | splitfields(s, sep, n) returns a list of at most n+1 elements).  (Since  | 
 | 25499 | 1.3, splitfields(s, None) is totally equivalent to split(s).) | 
 | 25500 | string.capwords() has an optional second argument specifying the  | 
 | 25501 | separator (which is passed to split()). | 
 | 25502 |  | 
 | 25503 | - regsub.split() has the same addition as string.split().  regsub.splitx(s,  | 
 | 25504 | sep, maxsep) implements the functionality that was regsub.split(s, 1) in  | 
 | 25505 | 1.4beta2 (return a list containing the delimiters as well as the words). | 
 | 25506 |  | 
 | 25507 | - Final touch for AIX loading, rewritten Misc/AIX-NOTES. | 
 | 25508 |  | 
 | 25509 | - In Modules/_tkinter.c, when using Tk 4.1 or higher, use className | 
 | 25510 | argument to _tkinter.create() to set Tcl's argv0 variable, so X | 
 | 25511 | resources use the right resource class again. | 
 | 25512 |  | 
 | 25513 | - Add #undef fabs to Modules/mathmodule.c for macintosh. | 
 | 25514 |  | 
 | 25515 | - Added some macro renames for AIX in Modules/operator.c. | 
 | 25516 |  | 
 | 25517 | - Removed spurious 'E' from Doc/liberrno.tex. | 
 | 25518 |  | 
 | 25519 | - Got rid of some cruft in Misc/ (dlMakefile, pyimenu.el); added new | 
 | 25520 | Misc/gMakefile and new version of Misc/python-mode.el. | 
 | 25521 |  | 
 | 25522 | - Fixed typo in Lib/ntpath.py (islink has "return false" which gives a | 
 | 25523 | NameError). | 
 | 25524 |  | 
 | 25525 | - Added missing "from types import *" to Lib/tkinter/Canvas.py. | 
 | 25526 |  | 
 | 25527 | - Added hint about using default args for __init__ to pickle docs. | 
 | 25528 |  | 
 | 25529 | - Corrected typo in Inclide/abstract.h: PySequence_Lenth -> | 
 | 25530 | PySequence_Length. | 
 | 25531 |  | 
 | 25532 | - Some improvements to Doc/texi2html.py. | 
 | 25533 |  | 
 | 25534 | - In Python/import.c, Cast unsigned char * in struct _frozen to char * | 
 | 25535 | in calls to rds_object(). | 
 | 25536 |  | 
 | 25537 | - In doc/ref4.tex, added note about scope of lambda bodies. | 
 | 25538 |  | 
 | 25539 | What's new in 1.4beta2 (since beta1)? | 
 | 25540 | ------------------------------------- | 
 | 25541 |  | 
 | 25542 | - Portability bug in the md5.h header solved. | 
 | 25543 |  | 
 | 25544 | - The PC build procedure now really works, and sets sys.platform to a | 
 | 25545 | meaningful value (a few things were botched in beta 1).  Lib/dos_8x3 | 
 | 25546 | is now a standard part of the distribution (alas). | 
 | 25547 |  | 
 | 25548 | - More improvements to the installation procedure.  Typing "make install"  | 
 | 25549 | now inserts the version number in the pathnames of almost everything  | 
 | 25550 | installed, and creates the machine dependent modules (FCNTL.py etc.) if not  | 
 | 25551 | supplied by the distribution.  (XXX There's still a problem with the latter  | 
 | 25552 | because the "regen" script requires that Python is installed.  Some manual  | 
 | 25553 | intervention may still be required.) (This has been fixed in 1.4beta3.) | 
 | 25554 |  | 
 | 25555 | - New modules: errno, operator (XXX). | 
 | 25556 |  | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 25557 | - Changes for use with Numerical Python: built-in function slice() and | 
| Guido van Rossum | 821a558 | 1997-05-23 04:05:31 +0000 | [diff] [blame] | 25558 | Ellipses object, and corresponding syntax: | 
 | 25559 |  | 
 | 25560 | 	x[lo:hi:stride]		==	x[slice(lo, hi, stride)] | 
 | 25561 | 	x[a, ..., z]		==	x[(a, Ellipses, z)] | 
 | 25562 |  | 
| Raymond Hettinger | 565ea5a | 2004-10-02 11:02:59 +0000 | [diff] [blame] | 25563 | - New documentation for errno and cgi modules. | 
| Guido van Rossum | 821a558 | 1997-05-23 04:05:31 +0000 | [diff] [blame] | 25564 |  | 
 | 25565 | - The directory containing the script passed to the interpreter is | 
 | 25566 | inserted in from of sys.path; "." is no longer a default path | 
 | 25567 | component. | 
 | 25568 |  | 
 | 25569 | - Optional third string argument to string.translate() specifies | 
 | 25570 | characters to delete.  New function string.maketrans() creates a | 
 | 25571 | translation table for translate() or for regex.compile(). | 
 | 25572 |  | 
 | 25573 | - Module posix (and hence module os under Unix) now supports putenv(). | 
 | 25574 | Moreover, module os is enhanced so that if putenv() is supported, | 
 | 25575 | assignments to os.environ entries make the appropriate putenv() call. | 
 | 25576 | (XXX the putenv() implementation can leak a small amount of memory per | 
 | 25577 | call.) | 
 | 25578 |  | 
 | 25579 | - pdb.py can now be invoked from the command line to debug a script: | 
 | 25580 | python pdb.py <script> <arg> ... | 
 | 25581 |  | 
 | 25582 | - Much improved parseaddr() in rfc822. | 
 | 25583 |  | 
 | 25584 | - In cgi.py, you can now pass an alternative value for environ to | 
 | 25585 | nearly all functions. | 
 | 25586 |  | 
 | 25587 | - You can now assign to instance variables whose name begins and ends | 
 | 25588 | with '__'. | 
 | 25589 |  | 
 | 25590 | - New version of Fred Drake's parser module and associates (token, | 
 | 25591 | symbol, AST). | 
 | 25592 |  | 
 | 25593 | - New PYTHON_API_VERSION value and .pyc file magic number (again!). | 
 | 25594 |  | 
 | 25595 | - The "complex" internal structure type is now called "Py_complex" to | 
 | 25596 | avoid name conflicts. | 
 | 25597 |  | 
 | 25598 | - Numerous small bugs fixed. | 
 | 25599 |  | 
 | 25600 | - Slight pickle speedups. | 
 | 25601 |  | 
 | 25602 | - Some slight speedups suggested by Sjoerd (more coming in 1.4 final). | 
 | 25603 |  | 
 | 25604 | - NeXT portability mods by Bill Bumgarner integrated. | 
 | 25605 |  | 
 | 25606 | - Modules regexmodule.c, bsddbmodule.c and xxmodule.c have been | 
 | 25607 | converted to new naming style. | 
 | 25608 |  | 
 | 25609 |  | 
 | 25610 | What's new in 1.4beta1 (since 1.3)? | 
 | 25611 | ----------------------------------- | 
 | 25612 |  | 
 | 25613 | - Added sys.platform and sys.exec_platform for Bill Janssen. | 
 | 25614 |  | 
 | 25615 | - Installation has been completely overhauled.  "make install" now installs  | 
 | 25616 | everything, not just the python binary.  Installation uses the install-sh  | 
 | 25617 | script (borrowed from X11) to install each file. | 
 | 25618 |  | 
 | 25619 | - New functions in the posix module: mkfifo, plock, remove (== unlink), | 
 | 25620 | and ftruncate.  More functions are also available under NT. | 
 | 25621 |  | 
 | 25622 | - New function in the fcntl module: flock. | 
 | 25623 |  | 
 | 25624 | - Shared library support for FreeBSD. | 
 | 25625 |  | 
 | 25626 | - The --with-readline option can now be used without a DIRECTORY argument,  | 
 | 25627 | for systems where libreadline.* is in one of the standard places.  It is  | 
 | 25628 | also possible for it to be a shared library. | 
 | 25629 |  | 
 | 25630 | - The extension tkinter has been renamed to _tkinter, to avoid confusion  | 
 | 25631 | with Tkinter.py oncase insensitive file systems.  It now supports Tk 4.1 as  | 
 | 25632 | well as 4.0. | 
 | 25633 |  | 
 | 25634 | - Author's change of address from CWI in Amsterdam, The Netherlands, to  | 
 | 25635 | CNRI in Reston, VA, USA. | 
 | 25636 |  | 
 | 25637 | - The math.hypot() function is now always available (if it isn't found in  | 
 | 25638 | the C math library, Python provides its own implementation). | 
 | 25639 |  | 
 | 25640 | - The latex documentation is now compatible with latex2e, thanks to David  | 
 | 25641 | Ascher. | 
 | 25642 |  | 
 | 25643 | - The expression x**y is now equivalent to pow(x, y). | 
 | 25644 |  | 
 | 25645 | - The indexing expression x[a, b, c] is now equivalent to x[(a, b, c)]. | 
 | 25646 |  | 
 | 25647 | - Complex numbers are now supported.  Imaginary constants are written with  | 
 | 25648 | a 'j' or 'J' prefix, general complex numbers can be formed by adding a real  | 
 | 25649 | part to an imaginary part, like 3+4j.  Complex numbers are always stored in  | 
 | 25650 | floating point form, so this is equivalent to 3.0+4.0j.  It is also  | 
 | 25651 | possible to create complex numbers with the new built-in function  | 
 | 25652 | complex(re, [im]).  For the footprint-conscious, complex number support can  | 
 | 25653 | be disabled by defining the symbol WITHOUT_COMPLEX. | 
 | 25654 |  | 
 | 25655 | - New built-in function list() is the long-awaited counterpart of tuple(). | 
 | 25656 |  | 
 | 25657 | - There's a new "cmath" module which provides the same functions as the  | 
 | 25658 | "math" library but with complex arguments and results.  (There are very  | 
 | 25659 | good reasons why math.sqrt(-1) still raises an exception -- you have to use  | 
 | 25660 | cmath.sqrt(-1) to get 1j for an answer.) | 
 | 25661 |  | 
 | 25662 | - The Python.h header file (which is really the same as allobjects.h except  | 
 | 25663 | it disables support for old style names) now includes several more files,  | 
 | 25664 | so you have to have fewer #include statements in the average extension. | 
 | 25665 |  | 
 | 25666 | - The NDEBUG symbol is no longer used.  Code that used to be dependent on  | 
 | 25667 | the presence of NDEBUG is now present on the absence of DEBUG.  TRACE_REFS  | 
 | 25668 | and REF_DEBUG have been renamed to Py_TRACE_REFS and Py_REF_DEBUG,  | 
 | 25669 | respectively.  At long last, the source actually compiles and links without  | 
 | 25670 | errors when this symbol is defined. | 
 | 25671 |  | 
 | 25672 | - Several symbols that didn't follow the new naming scheme have been  | 
 | 25673 | renamed (usually by adding to rename2.h) to use a Py or _Py prefix.  There  | 
 | 25674 | are no external symbols left without a Py or _Py prefix, not even those  | 
 | 25675 | defined by sources that were incorporated from elsewhere (regexpr.c,  | 
 | 25676 | md5c.c).  (Macros are a different story...) | 
 | 25677 |  | 
 | 25678 | - There are now typedefs for the structures defined in config.c and  | 
 | 25679 | frozen.c. | 
 | 25680 |  | 
 | 25681 | - New PYTHON_API_VERSION value and .pyc file magic number. | 
 | 25682 |  | 
 | 25683 | - New module Bastion.  (XXX) | 
 | 25684 |  | 
 | 25685 | - Improved performance of StringIO module. | 
 | 25686 |  | 
 | 25687 | - UserList module now supports + and * operators. | 
 | 25688 |  | 
 | 25689 | - The binhex and binascii modules now actually work. | 
 | 25690 |  | 
 | 25691 | - The cgi module has been almost totally rewritten and documented. | 
 | 25692 | It now supports file upload and a new data type to handle forms more  | 
 | 25693 | flexibly. | 
 | 25694 |  | 
 | 25695 | - The formatter module (for use with htmllib) has been overhauled (again). | 
 | 25696 |  | 
 | 25697 | - The ftplib module now supports passive mode and has doc strings. | 
 | 25698 |  | 
 | 25699 | - In (ideally) all places where binary files are read or written, the file  | 
 | 25700 | is now correctly opened in binary mode ('rb' or 'wb') so the code will work  | 
 | 25701 | on Mac or PC. | 
 | 25702 |  | 
 | 25703 | - Dummy versions of os.path.expandvars() and expanduser() are now provided  | 
 | 25704 | on non-Unix platforms. | 
 | 25705 |  | 
 | 25706 | - Module urllib now has two new functions url2pathname and pathname2url  | 
 | 25707 | which turn local filenames into "file:..." URLs using the same rules as  | 
 | 25708 | Netscape (why be different).  it also supports urlretrieve() with a  | 
 | 25709 | pathname parameter, and honors the proxy environment variables (http_proxy  | 
 | 25710 | etc.).  The URL parsing has been improved somewhat, too. | 
 | 25711 |  | 
 | 25712 | - Micro improvements to urlparse.  Added urlparse.urldefrag() which  | 
 | 25713 | removes a trailing ``#fragment'' if any. | 
 | 25714 |  | 
 | 25715 | - The mailbox module now supports MH style message delimiters as well. | 
 | 25716 |  | 
 | 25717 | - The mhlib module contains some new functionality: setcontext() to set the  | 
 | 25718 | current folder and parsesequence() to parse a sequence as commonly passed  | 
 | 25719 | to MH commands (e.g. 1-10 or last:5). | 
 | 25720 |  | 
 | 25721 | - New module mimify for conversion to and from MIME format of email  | 
 | 25722 | messages. | 
 | 25723 |  | 
 | 25724 | - Module ni now automatically installs itself when first imported -- this  | 
 | 25725 | is against the normal rule that modules should define classes and functions  | 
 | 25726 | but not invoke them, but appears more useful in the case that two  | 
 | 25727 | different, independent modules want to use ni's features. | 
 | 25728 |  | 
 | 25729 | - Some small performance enhancements in module pickle. | 
 | 25730 |  | 
 | 25731 | - Small interface change to the profile.run*() family of functions -- more  | 
 | 25732 | sensible handling of return values. | 
 | 25733 |  | 
 | 25734 | - The officially registered Mac creator for Python files is 'Pyth'.  This  | 
 | 25735 | replaces 'PYTH' which was used before but never registered. | 
 | 25736 |  | 
 | 25737 | - Added regsub.capwords().  (XXX) | 
 | 25738 |  | 
 | 25739 | - Added string.capwords(), string.capitalize() and string.translate().   | 
 | 25740 | (XXX) | 
 | 25741 |  | 
 | 25742 | - Fixed an interface bug in the rexec module: it was impossible to pass a  | 
 | 25743 | hooks instance to the RExec class.  rexec now also supports the dynamic  | 
 | 25744 | loading of modules from shared libraries.  Some other interfaces have been  | 
 | 25745 | added too. | 
 | 25746 |  | 
 | 25747 | - Module rfc822 now caches the headers in a dictionary for more efficient  | 
 | 25748 | lookup. | 
 | 25749 |  | 
 | 25750 | - The sgmllib module now understands a limited number of SGML "shorthands"  | 
 | 25751 | like <A/.../ for <A>...</A>.  (It's not clear that this was a good idea...) | 
 | 25752 |  | 
 | 25753 | - The tempfile module actually tries a number of different places to find a  | 
 | 25754 | usable temporary directory.  (This was prompted by certain Linux  | 
 | 25755 | installations that appear to be missing a /usr/tmp directory.) [A bug in  | 
 | 25756 | the implementation that would ignore a pre-existing tmpdir global has been  | 
 | 25757 | fixed in beta3.] | 
 | 25758 |  | 
 | 25759 | - Much improved and enhanved FileDialog module for Tkinter. | 
 | 25760 |  | 
 | 25761 | - Many small changes to Tkinter, to bring it more in line with Tk 4.0 (as  | 
 | 25762 | well as Tk 4.1). | 
 | 25763 |  | 
 | 25764 | - New socket interfaces include ntohs(), ntohl(), htons(), htonl(), and  | 
 | 25765 | s.dup().  Sockets now work correctly on Windows.  On Windows, the built-in  | 
 | 25766 | extension is called _socket and a wrapper module win/socket.py provides  | 
 | 25767 | "makefile()" and "dup()" functionality.  On Windows, the select module  | 
 | 25768 | works only with socket objects. | 
 | 25769 |  | 
 | 25770 | - Bugs in bsddb module fixed (e.g. missing default argument values). | 
 | 25771 |  | 
 | 25772 | - The curses extension now includes <ncurses.h> when available. | 
 | 25773 |  | 
 | 25774 | - The gdbm module now supports opening databases in "fast" mode by  | 
 | 25775 | specifying 'f' as the second character or the mode string. | 
 | 25776 |  | 
 | 25777 | - new variables sys.prefix and sys.exec_prefix pass corresponding  | 
 | 25778 | configuration options / Makefile variables to the Python programmer. | 
 | 25779 |  | 
 | 25780 | - The ``new'' module now supports creating new user-defined classes as well  | 
 | 25781 | as instances thereof. | 
 | 25782 |  | 
 | 25783 | - The soundex module now sports get_soundex() to get the soundex value for an  | 
 | 25784 | arbitrary string (formerly it would only do soundex-based string  | 
 | 25785 | comparison) as well as doc strings. | 
 | 25786 |  | 
 | 25787 | - New object type "cobject" to safely wrap void pointers for passing them  | 
 | 25788 | between various extension modules. | 
 | 25789 |  | 
 | 25790 | - More efficient computation of float**smallint. | 
 | 25791 |  | 
 | 25792 | - The mysterious bug whereby "x.x" (two occurrences of the same  | 
 | 25793 | one-character name) typed from the commandline would sometimes fail  | 
 | 25794 | mysteriously. | 
 | 25795 |  | 
 | 25796 | - The initialization of the readline function can now be invoked by a C  | 
 | 25797 | extension through PyOS_ReadlineInit(). | 
 | 25798 |  | 
 | 25799 | - There's now an externally visible pointer PyImport_FrozenModules which  | 
 | 25800 | can be changed by an embedding application. | 
 | 25801 |  | 
 | 25802 | - The argument parsing functions now support a new format character 'D' to  | 
 | 25803 | specify complex numbers. | 
 | 25804 |  | 
 | 25805 | - Various memory leaks plugged and bugs fixed. | 
 | 25806 |  | 
 | 25807 | - Improved support for posix threads (now that real implementations are  | 
 | 25808 | beginning to apepar).  Still no fully functioning semaphores. | 
 | 25809 |  | 
 | 25810 | - Some various and sundry improvements and new entries in the Tools  | 
 | 25811 | directory. | 
 | 25812 |  | 
 | 25813 |  | 
 | 25814 | ===================================== | 
| Guido van Rossum | c30e95f | 1996-07-30 18:53:51 +0000 | [diff] [blame] | 25815 | ==> Release 1.3 (13 October 1995) <== | 
 | 25816 | ===================================== | 
 | 25817 |  | 
 | 25818 | Major change | 
 | 25819 | ============ | 
 | 25820 |  | 
 | 25821 | Two words: Keyword Arguments.  See the first section of Chapter 12 of | 
 | 25822 | the Tutorial. | 
 | 25823 |  | 
 | 25824 | (The rest of this file is textually the same as the remaining sections | 
 | 25825 | of that chapter.) | 
 | 25826 |  | 
 | 25827 |  | 
 | 25828 | Changes to the WWW and Internet tools | 
 | 25829 | ===================================== | 
 | 25830 |  | 
 | 25831 | The "htmllib" module has been rewritten in an incompatible fashion. | 
 | 25832 | The new version is considerably more complete (HTML 2.0 except forms, | 
 | 25833 | but including all ISO-8859-1 entity definitions), and easy to use. | 
 | 25834 | Small changes to "sgmllib" have also been made, to better match the | 
 | 25835 | tokenization of HTML as recognized by other web tools. | 
 | 25836 |  | 
 | 25837 | A new module "formatter" has been added, for use with the new | 
 | 25838 | "htmllib" module. | 
 | 25839 |  | 
 | 25840 | The "urllib"and "httplib" modules have been changed somewhat to allow | 
 | 25841 | overriding unknown URL types and to support authentication.  They now | 
 | 25842 | use "mimetools.Message" instead of "rfc822.Message" to parse headers. | 
 | 25843 | The "endrequest()" method has been removed from the HTTP class since | 
 | 25844 | it breaks the interaction with some servers. | 
 | 25845 |  | 
 | 25846 | The "rfc822.Message" class has been changed to allow a flag to be | 
 | 25847 | passed in that says that the file is unseekable. | 
 | 25848 |  | 
 | 25849 | The "ftplib" module has been fixed to be (hopefully) more robust on | 
 | 25850 | Linux. | 
 | 25851 |  | 
 | 25852 | Several new operations that are optionally supported by servers have | 
 | 25853 | been added to "nntplib": "xover", "xgtitle", "xpath" and "date". | 
 | 25854 |  | 
 | 25855 | Other Language Changes | 
 | 25856 | ====================== | 
 | 25857 |  | 
 | 25858 | The "raise" statement now takes an optional argument which specifies | 
 | 25859 | the traceback to be used when printing the exception's stack trace. | 
 | 25860 | This must be a traceback object, such as found in "sys.exc_traceback". | 
 | 25861 | When omitted or given as "None", the old behavior (to generate a stack | 
 | 25862 | trace entry for the current stack frame) is used. | 
 | 25863 |  | 
 | 25864 | The tokenizer is now more tolerant of alien whitespace.  Control-L in | 
 | 25865 | the leading whitespace of a line resets the column number to zero, | 
 | 25866 | while Control-R just before the end of the line is ignored. | 
 | 25867 |  | 
 | 25868 | Changes to Built-in Operations | 
 | 25869 | ============================== | 
 | 25870 |  | 
 | 25871 | For file objects, "f.read(0)" and "f.readline(0)" now return an empty | 
 | 25872 | string rather than reading an unlimited number of bytes.  For the | 
 | 25873 | latter, omit the argument altogether or pass a negative value. | 
 | 25874 |  | 
 | 25875 | A new system variable, "sys.platform", has been added.  It specifies | 
 | 25876 | the current platform, e.g. "sunos5" or "linux1". | 
 | 25877 |  | 
 | 25878 | The built-in functions "input()" and "raw_input()" now use the GNU | 
 | 25879 | readline library when it has been configured (formerly, only | 
 | 25880 | interactive input to the interpreter itself was read using GNU | 
 | 25881 | readline).  The GNU readline library provides elaborate line editing | 
 | 25882 | and history.  The Python debugger ("pdb") is the first beneficiary of | 
 | 25883 | this change. | 
 | 25884 |  | 
 | 25885 | Two new built-in functions, "globals()" and "locals()", provide access | 
 | 25886 | to dictionaries containming current global and local variables, | 
 | 25887 | respectively.  (These augment rather than replace "vars()", which | 
 | 25888 | returns the current local variables when called without an argument, | 
 | 25889 | and a module's global variables when called with an argument of type | 
 | 25890 | module.) | 
 | 25891 |  | 
 | 25892 | The built-in function "compile()" now takes a third possible value for | 
 | 25893 | the kind of code to be compiled: specifying "'single'" generates code | 
 | 25894 | for a single interactive statement, which prints the output of | 
 | 25895 | expression statements that evaluate to something else than "None". | 
 | 25896 |  | 
 | 25897 | Library Changes | 
 | 25898 | =============== | 
 | 25899 |  | 
 | 25900 | There are new module "ni" and "ihooks" that support importing modules | 
 | 25901 | with hierarchical names such as "A.B.C".  This is enabled by writing | 
 | 25902 | "import ni; ni.ni()" at the very top of the main program.  These | 
 | 25903 | modules are amply documented in the Python source. | 
 | 25904 |  | 
 | 25905 | The module "rexec" has been rewritten (incompatibly) to define a class | 
 | 25906 | and to use "ihooks". | 
 | 25907 |  | 
 | 25908 | The "string.split()" and "string.splitfields()" functions are now the | 
 | 25909 | same function (the presence or absence of the second argument | 
 | 25910 | determines which operation is invoked); similar for "string.join()" | 
 | 25911 | and "string.joinfields()". | 
 | 25912 |  | 
 | 25913 | The "Tkinter" module and its helper "Dialog" have been revamped to use | 
 | 25914 | keyword arguments.  Tk 4.0 is now the standard.  A new module | 
 | 25915 | "FileDialog" has been added which implements standard file selection | 
 | 25916 | dialogs. | 
 | 25917 |  | 
 | 25918 | The optional built-in modules "dbm" and "gdbm" are more coordinated | 
 | 25919 | --- their "open()" functions now take the same values for their "flag" | 
 | 25920 | argument, and the "flag" and "mode" argument have default values (to | 
 | 25921 | open the database for reading only, and to create the database with | 
 | 25922 | mode "0666" minuse the umask, respectively).  The memory leaks have | 
 | 25923 | finally been fixed. | 
 | 25924 |  | 
 | 25925 | A new dbm-like module, "bsddb", has been added, which uses the BSD DB | 
 | 25926 | package's hash method. | 
 | 25927 |  | 
 | 25928 | A portable (though slow) dbm-clone, implemented in Python, has been | 
 | 25929 | added for systems where none of the above is provided.  It is aptly | 
 | 25930 | dubbed "dumbdbm". | 
 | 25931 |  | 
 | 25932 | The module "anydbm" provides a unified interface to "bsddb", "gdbm", | 
 | 25933 | "dbm", and "dumbdbm", choosing the first one available. | 
 | 25934 |  | 
 | 25935 | A new extension module, "binascii", provides a variety of operations | 
 | 25936 | for conversion of text-encoded binary data. | 
 | 25937 |  | 
 | 25938 | There are three new or rewritten companion modules implemented in | 
 | 25939 | Python that can encode and decode the most common such formats: "uu" | 
 | 25940 | (uuencode), "base64" and "binhex". | 
 | 25941 |  | 
 | 25942 | A module to handle the MIME encoding quoted-printable has also been | 
 | 25943 | added: "quopri". | 
 | 25944 |  | 
 | 25945 | The parser module (which provides an interface to the Python parser's | 
 | 25946 | abstract syntax trees) has been rewritten (incompatibly) by Fred | 
 | 25947 | Drake.  It now lets you change the parse tree and compile the result! | 
 | 25948 |  | 
 | 25949 | The \code{syslog} module has been upgraded and documented. | 
 | 25950 |  | 
 | 25951 | Other Changes | 
 | 25952 | ============= | 
 | 25953 |  | 
 | 25954 | The dynamic module loader recognizes the fact that different filenames | 
 | 25955 | point to the same shared library and loads the library only once, so | 
 | 25956 | you can have a single shared library that defines multiple modules. | 
 | 25957 | (SunOS / SVR4 style shared libraries only.) | 
 | 25958 |  | 
 | 25959 | Jim Fulton's ``abstract object interface'' has been incorporated into | 
 | 25960 | the run-time API.  For more detailes, read the files | 
 | 25961 | "Include/abstract.h" and "Objects/abstract.c". | 
 | 25962 |  | 
 | 25963 | The Macintosh version is much more robust now. | 
 | 25964 |  | 
 | 25965 | Numerous things I have forgotten or that are so obscure no-one will | 
 | 25966 | notice them anyway :-) | 
 | 25967 |  | 
 | 25968 |  | 
| Guido van Rossum | f456b6d | 1995-01-04 19:20:37 +0000 | [diff] [blame] | 25969 | =================================== | 
| Guido van Rossum | d462f3d | 1995-10-09 21:30:37 +0000 | [diff] [blame] | 25970 | ==> Release 1.2 (13 April 1995) <== | 
 | 25971 | =================================== | 
 | 25972 |  | 
 | 25973 | - Changes to Misc/python-mode.el: | 
 | 25974 |   - Wrapping and indentation within triple quote strings should work | 
 | 25975 |     properly now. | 
 | 25976 |   - `Standard' bug reporting mechanism (use C-c C-b) | 
 | 25977 |   - py-mark-block was moved to C-c C-m | 
 | 25978 |   - C-c C-v shows you the python-mode version | 
 | 25979 |   - a basic python-font-lock-keywords has been added for Emacs 19 | 
 | 25980 |     font-lock colorizations. | 
 | 25981 |   - proper interaction with pending-del and del-sel modes. | 
 | 25982 |   - New py-electric-colon (:) command for improved outdenting.  Also | 
 | 25983 |     py-indent-line (TAB) should handle outdented lines better. | 
 | 25984 |   - New commands py-outdent-left (C-c C-l) and py-indent-right (C-c C-r) | 
 | 25985 |  | 
 | 25986 | - The Library Reference has been restructured, and many new and | 
 | 25987 | existing modules are now documented, in particular the debugger and | 
 | 25988 | the profiler, as well as the persistency and the WWW/Internet support | 
 | 25989 | modules. | 
 | 25990 |  | 
 | 25991 | - All known bugs have been fixed.  For example the pow(2,2,3L) bug on | 
 | 25992 | Linux has been fixed.  Also the re-entrancy problems with __del__ have | 
 | 25993 | been fixed. | 
 | 25994 |  | 
 | 25995 | - All known memory leaks have been fixed. | 
 | 25996 |  | 
 | 25997 | - Phase 2 of the Great Renaming has been executed.  The header files | 
 | 25998 | now use the new names (PyObject instead of object, etc.).  The linker | 
 | 25999 | also sees the new names.  Most source files still use the old names, | 
 | 26000 | by virtue of the rename2.h header file.  If you include Python.h, you | 
 | 26001 | only see the new names.  Dynamically linked modules have to be | 
 | 26002 | recompiled.  (Phase 3, fixing the rest of the sources, will be | 
 | 26003 | executed gradually with the release later versions.) | 
 | 26004 |  | 
 | 26005 | - The hooks for implementing "safe-python" (better called "restricted | 
 | 26006 | execution") are in place.  Specifically, the import statement is | 
 | 26007 | implemented by calling the built-in function __import__, and the | 
 | 26008 | built-in names used in a particular scope are taken from the | 
 | 26009 | dictionary __builtins__ in that scope's global dictionary.  See also | 
 | 26010 | the new (unsupported, undocumented) module rexec.py. | 
 | 26011 |  | 
 | 26012 | - The import statement now supports the syntax "import a.b.c" and | 
 | 26013 | "from a.b.c import name".  No officially supported implementation | 
 | 26014 | exists, but one can be prototyped by replacing the built-in __import__ | 
 | 26015 | function.  A proposal by Ken Manheimer is provided as newimp.py. | 
 | 26016 |  | 
 | 26017 | - All machinery used by the import statement (or the built-in | 
 | 26018 | __import__ function) is now exposed through the new built-in module | 
 | 26019 | "imp" (see the library reference manual).  All dynamic loading | 
 | 26020 | machinery is moved to the new file importdl.c. | 
 | 26021 |  | 
 | 26022 | - Persistent storage is supported through the use of the modules | 
 | 26023 | "pickle" and "shelve" (implemented in Python).  There's also a "copy" | 
 | 26024 | module implementing deepcopy and normal (shallow) copy operations. | 
 | 26025 | See the library reference manual. | 
 | 26026 |  | 
 | 26027 | - Documentation strings for many objects types are accessible through | 
 | 26028 | the __doc__ attribute.  Modules, classes and functions support special | 
 | 26029 | syntax to initialize the __doc__ attribute: if the first statement | 
 | 26030 | consists of just a string literal, that string literal becomes the | 
 | 26031 | value of the __doc__ attribute.  The default __doc__ attribute is | 
 | 26032 | None.  Documentation strings are also supported for built-in | 
 | 26033 | functions, types and modules; however this feature hasn't been widely | 
 | 26034 | used yet.  See the 'new' module for an example.  (Basically, the type | 
 | 26035 | object's tp_doc field contains the doc string for the type, and the | 
 | 26036 | 4th member of the methodlist structure contains the doc string for the | 
 | 26037 | method.) | 
 | 26038 |  | 
 | 26039 | - The __coerce__ and __cmp__ methods for user-defined classes once | 
 | 26040 | again work as expected.  As an example, there's a new standard class | 
 | 26041 | Complex in the library. | 
 | 26042 |  | 
 | 26043 | - The functions posix.popen() and posix.fdopen() now have an optional | 
 | 26044 | third argument to specify the buffer size, and default their second | 
| Georg Brandl | 93dc9eb | 2010-03-14 10:56:14 +0000 | [diff] [blame] | 26045 | (mode) argument to 'r' -- in analogy to the built-in open() function. | 
| Guido van Rossum | d462f3d | 1995-10-09 21:30:37 +0000 | [diff] [blame] | 26046 | The same applies to posixfile.open() and the socket method makefile(). | 
 | 26047 |  | 
 | 26048 | - The thread.exit_thread() function now raises SystemExit so that | 
 | 26049 | 'finally' clauses are honored and a memory leak is plugged. | 
 | 26050 |  | 
 | 26051 | - Improved X11 and Motif support, by Sjoerd Mullender.  This extension | 
 | 26052 | is being maintained and distributed separately. | 
 | 26053 |  | 
 | 26054 | - Improved support for the Apple Macintosh, in part by Jack Jansen, | 
 | 26055 | e.g. interfaces to (a few) resource mananger functions, get/set file | 
 | 26056 | type and creator, gestalt, sound manager, speech manager, MacTCP, comm | 
 | 26057 | toolbox, and the think C console library.  This is being maintained | 
 | 26058 | and distributed separately. | 
 | 26059 |  | 
 | 26060 | - Improved version for Windows NT, by Mark Hammond.  This is being | 
 | 26061 | maintained and distributed separately. | 
 | 26062 |  | 
 | 26063 | - Used autoconf 2.0 to generate the configure script.  Adapted | 
 | 26064 | configure.in to use the new features in autoconf 2.0. | 
 | 26065 |  | 
 | 26066 | - It now builds on the NeXT without intervention, even on the 3.3 | 
 | 26067 | Sparc pre-release. | 
 | 26068 |  | 
 | 26069 | - Characters passed to isspace() and friends are masked to nonnegative | 
 | 26070 | values. | 
 | 26071 |  | 
 | 26072 | - Correctly compute pow(-3.0, 3). | 
 | 26073 |  | 
 | 26074 | - Fix portability problems with getopt (configure now checks for a | 
 | 26075 | non-GNU getopt). | 
 | 26076 |  | 
 | 26077 | - Don't add frozenmain.o to libPython.a. | 
 | 26078 |  | 
 | 26079 | - Exceptions can now be classes.  ALl built-in exceptions are still | 
 | 26080 | string objects, but this will change in the future. | 
 | 26081 |  | 
 | 26082 | - The socket module exports a long list of socket related symbols. | 
 | 26083 | (More built-in modules will export their symbolic constants instead of | 
 | 26084 | relying on a separately generated Python module.) | 
 | 26085 |  | 
 | 26086 | - When a module object is deleted, it clears out its own dictionary. | 
 | 26087 | This fixes a circularity in the references between functions and | 
 | 26088 | their global dictionary. | 
 | 26089 |  | 
 | 26090 | - Changed the error handling by [new]getargs() e.g. for "O&". | 
 | 26091 |  | 
 | 26092 | - Dynamic loading of modules using shared libraries is supported for | 
 | 26093 | several new platforms. | 
 | 26094 |  | 
 | 26095 | - Support "O&", "[...]" and "{...}" in mkvalue(). | 
 | 26096 |  | 
 | 26097 | - Extension to findmethod(): findmethodinchain() (where a chain is a | 
 | 26098 | linked list of methodlist arrays).  The calling interface for | 
 | 26099 | findmethod() has changed: it now gets a pointer to the (static!) | 
 | 26100 | methodlist structure rather than just to the function name -- this | 
 | 26101 | saves copying flags etc. into the (short-lived) method object. | 
 | 26102 |  | 
 | 26103 | - The callable() function is now public. | 
 | 26104 |  | 
 | 26105 | - Object types can define a few new operations by setting function | 
 | 26106 | pointers in the type object structure: tp_call defines how an object | 
 | 26107 | is called, and tp_str defines how an object's str() is computed. | 
 | 26108 |  | 
 | 26109 |  | 
 | 26110 | =================================== | 
| Guido van Rossum | f456b6d | 1995-01-04 19:20:37 +0000 | [diff] [blame] | 26111 | ==> Release 1.1.1 (10 Nov 1994) <== | 
 | 26112 | =================================== | 
 | 26113 |  | 
 | 26114 | This is a pure bugfix release again.  See the ChangeLog file for details. | 
 | 26115 |  | 
 | 26116 | One exception: a few new features were added to tkinter. | 
 | 26117 |  | 
 | 26118 |  | 
 | 26119 | ================================= | 
 | 26120 | ==> Release 1.1 (11 Oct 1994) <== | 
 | 26121 | ================================= | 
 | 26122 |  | 
 | 26123 | This release adds several new features, improved configuration and | 
 | 26124 | portability, and fixes more bugs than I can list here (including some | 
 | 26125 | memory leaks). | 
 | 26126 |  | 
 | 26127 | The source compiles and runs out of the box on more platforms than | 
 | 26128 | ever -- including Windows NT.  Makefiles or projects for a variety of | 
 | 26129 | non-UNIX platforms are provided. | 
 | 26130 |  | 
 | 26131 | APOLOGY: some new features are badly documented or not at all.  I had | 
 | 26132 | the choice -- postpone the new release indefinitely, or release it | 
 | 26133 | now, with working code but some undocumented areas.  The problem with | 
 | 26134 | postponing the release is that people continue to suffer from existing | 
 | 26135 | bugs, and send me patches based on the previous release -- which I | 
 | 26136 | can't apply directly because my own source has changed.  Also, some | 
 | 26137 | new modules (like signal) have been ready for release for quite some | 
 | 26138 | time, and people are anxiously waiting for them.  In the case of | 
 | 26139 | signal, the interface is simple enough to figure out without | 
 | 26140 | documentation (if you're anxious enough :-).  In this case it was not | 
 | 26141 | simple to release the module on its own, since it relies on many small | 
 | 26142 | patches elsewhere in the source. | 
 | 26143 |  | 
 | 26144 | For most new Python modules, the source code contains comments that | 
 | 26145 | explain how to use them.  Documentation for the Tk interface, written | 
 | 26146 | by Matt Conway, is available as tkinter-doc.tar.gz from the Python | 
 | 26147 | home and mirror ftp sites (see Misc/FAQ for ftp addresses).  For the | 
 | 26148 | new operator overloading facilities, have a look at Demo/classes: | 
 | 26149 | Complex.py and Rat.py show how to implement a numeric type without and | 
 | 26150 | with __coerce__ method.  Also have a look at the end of the Tutorial | 
 | 26151 | document (Doc/tut.tex).  If you're still confused: use the newsgroup | 
 | 26152 | or mailing list. | 
 | 26153 |  | 
 | 26154 |  | 
 | 26155 | New language features: | 
 | 26156 |  | 
 | 26157 |     - More flexible operator overloading for user-defined classes | 
 | 26158 |     (INCOMPATIBLE WITH PREVIOUS VERSIONS!)  See end of tutorial. | 
 | 26159 |  | 
 | 26160 |     - Classes can define methods named __getattr__, __setattr__ and | 
 | 26161 |     __delattr__ to trap attribute accesses.  See end of tutorial. | 
 | 26162 |  | 
 | 26163 |     - Classes can define method __call__ so instances can be called | 
 | 26164 |     directly.  See end of tutorial. | 
 | 26165 |  | 
 | 26166 |  | 
 | 26167 | New support facilities: | 
 | 26168 |  | 
 | 26169 |     - The Makefiles (for the base interpreter as well as for extensions) | 
 | 26170 |     now support creating dynamically loadable modules if the platform | 
 | 26171 |     supports shared libraries. | 
 | 26172 |  | 
 | 26173 |     - Passing the interpreter a .pyc file as script argument will execute | 
 | 26174 |     the code in that file.  (On the Mac such files can be double-clicked!) | 
 | 26175 |  | 
 | 26176 |     - New Freeze script, to create independently distributable "binaries" | 
 | 26177 |     of Python programs -- look in Demo/freeze | 
 | 26178 |  | 
 | 26179 |     - Improved h2py script (in Demo/scripts) follows #includes and | 
 | 26180 |     supports macros with one argument | 
 | 26181 |  | 
 | 26182 |     - New module compileall generates .pyc files for all modules in a | 
 | 26183 |     directory (tree) without also executing them | 
 | 26184 |  | 
 | 26185 |     - Threads should work on more platforms | 
 | 26186 |  | 
 | 26187 |  | 
 | 26188 | New built-in modules: | 
 | 26189 |  | 
 | 26190 |     - tkinter (support for Tcl's Tk widget set) is now part of the base | 
 | 26191 |     distribution | 
 | 26192 |  | 
 | 26193 |     - signal allows catching or ignoring UNIX signals (unfortunately still | 
 | 26194 |     undocumented -- any taker?) | 
 | 26195 |  | 
 | 26196 |     - termios provides portable access to POSIX tty settings | 
 | 26197 |  | 
 | 26198 |     - curses provides an interface to the System V curses library | 
 | 26199 |  | 
 | 26200 |     - syslog provides an interface to the (BSD?) syslog daemon | 
 | 26201 |  | 
 | 26202 |     - 'new' provides interfaces to create new built-in object types | 
 | 26203 |     (e.g. modules and functions) | 
 | 26204 |  | 
 | 26205 |     - sybase provides an interface to SYBASE database | 
 | 26206 |  | 
 | 26207 |  | 
 | 26208 | New/obsolete built-in methods: | 
 | 26209 |  | 
 | 26210 |     - callable(x) tests whether x can be called | 
 | 26211 |  | 
 | 26212 |     - sockets now have a setblocking() method | 
 | 26213 |  | 
 | 26214 |     - sockets no longer have an allowbroadcast() method | 
 | 26215 |  | 
 | 26216 |     - socket methods send() and sendto() return byte count | 
 | 26217 |  | 
 | 26218 |  | 
 | 26219 | New standard library modules: | 
 | 26220 |  | 
 | 26221 |     - types.py defines standard names for built-in types, e.g. StringType | 
 | 26222 |  | 
 | 26223 |     - urlparse.py parses URLs according to the latest Internet draft | 
 | 26224 |  | 
 | 26225 |     - uu.py does uuencode/uudecode (not the fastest in the world, but | 
 | 26226 |     quicker than installing uuencode on a non-UNIX machine :-) | 
 | 26227 |  | 
 | 26228 |     - New, faster and more powerful profile module.py | 
 | 26229 |  | 
 | 26230 |     - mhlib.py provides interface to MH folders and messages | 
 | 26231 |  | 
 | 26232 |  | 
 | 26233 | New facilities for extension writers (unfortunately still | 
 | 26234 | undocumented): | 
 | 26235 |  | 
 | 26236 |     - newgetargs() supports optional arguments and improved error messages | 
 | 26237 |  | 
 | 26238 |     - O!, O& O? formats for getargs allow more versatile type checking of | 
 | 26239 |     non-standard types | 
 | 26240 |  | 
 | 26241 |     - can register pending asynchronous callback, to be called the next | 
 | 26242 |     time the Python VM begins a new instruction (Py_AddPendingCall) | 
 | 26243 |  | 
 | 26244 |     - can register cleanup routines to be called when Python exits | 
 | 26245 |     (Py_AtExit) | 
 | 26246 |  | 
 | 26247 |     - makesetup script understands C++ files in Setup file (use file.C | 
 | 26248 |     or file.cc) | 
 | 26249 |  | 
 | 26250 |     - Make variable OPT is passed on to sub-Makefiles | 
 | 26251 |  | 
 | 26252 |     - An init<module>() routine may signal an error by not entering | 
 | 26253 |     the module in the module table and raising an exception instead | 
 | 26254 |  | 
 | 26255 |     - For long module names, instead of foobarbletchmodule.c you can | 
 | 26256 |     use foobarbletch.c | 
 | 26257 |  | 
 | 26258 |     - getintvalue() and getfloatvalue() try to convert any object | 
 | 26259 |     instead of requiring an "intobject" or "floatobject" | 
 | 26260 |  | 
 | 26261 |     - All the [new]getargs() formats that retrieve an integer value | 
 | 26262 |     will now also work if a float is passed | 
 | 26263 |  | 
 | 26264 |     - C function listtuple() converts list to tuple, fast | 
 | 26265 |  | 
 | 26266 |     - You should now call sigcheck() instead of intrcheck(); | 
 | 26267 |     sigcheck() also sets an exception when it returns nonzero | 
 | 26268 |  | 
 | 26269 |  | 
| Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 26270 | ==================================== | 
 | 26271 | ==> Release 1.0.3 (14 July 1994) <== | 
 | 26272 | ==================================== | 
 | 26273 |  | 
 | 26274 | This release consists entirely of bug fixes to the C sources; see the | 
 | 26275 | head of ../ChangeLog for a complete list.  Most important bugs fixed: | 
 | 26276 |  | 
 | 26277 | - Sometimes the format operator (string%expr) would drop the last | 
 | 26278 | character of the format string | 
 | 26279 |  | 
 | 26280 | - Tokenizer looped when last line did not end in \n | 
 | 26281 |  | 
 | 26282 | - Bug when triple-quoted string ended in quote plus newline | 
 | 26283 |  | 
 | 26284 | - Typo in socketmodule (listen) (== instead of =) | 
 | 26285 |  | 
 | 26286 | - typing vars() at the >>> prompt would cause recursive output | 
 | 26287 |  | 
 | 26288 |  | 
 | 26289 | ================================== | 
 | 26290 | ==> Release 1.0.2 (4 May 1994) <== | 
 | 26291 | ================================== | 
 | 26292 |  | 
 | 26293 | Overview of the most visible changes.  Bug fixes are not listed.  See | 
 | 26294 | also ChangeLog. | 
 | 26295 |  | 
 | 26296 | Tokens | 
 | 26297 | ------ | 
 | 26298 |  | 
 | 26299 | * String literals follow Standard C rules: they may be continued on | 
 | 26300 | the next line using a backslash; adjacent literals are concatenated | 
 | 26301 | at compile time. | 
 | 26302 |  | 
 | 26303 | * A new kind of string literals, surrounded by triple quotes (""" or | 
 | 26304 | '''), can be continued on the next line without a backslash. | 
 | 26305 |  | 
 | 26306 | Syntax | 
 | 26307 | ------ | 
 | 26308 |  | 
 | 26309 | * Function arguments may have a default value, e.g. def f(a, b=1); | 
 | 26310 | defaults are evaluated at function definition time.  This also applies | 
 | 26311 | to lambda. | 
 | 26312 |  | 
 | 26313 | * The try-except statement has an optional else clause, which is | 
 | 26314 | executed when no exception occurs in the try clause. | 
 | 26315 |  | 
 | 26316 | Interpreter | 
 | 26317 | ----------- | 
 | 26318 |  | 
 | 26319 | * The result of a statement-level expression is no longer printed, | 
 | 26320 | except_ for expressions entered interactively.  Consequently, the -k | 
 | 26321 | command line option is gone. | 
 | 26322 |  | 
 | 26323 | * The result of the last printed interactive expression is assigned to | 
 | 26324 | the variable '_'. | 
 | 26325 |  | 
 | 26326 | * Access to implicit global variables has been speeded up by removing | 
 | 26327 | an always-failing dictionary lookup in the dictionary of local | 
 | 26328 | variables (mod suggested by Steve Makewski and Tim Peters). | 
 | 26329 |  | 
 | 26330 | * There is a new command line option, -u, to force stdout and stderr | 
 | 26331 | to be unbuffered. | 
 | 26332 |  | 
 | 26333 | * Incorporated Steve Majewski's mods to import.c for dynamic loading | 
 | 26334 | under AIX. | 
 | 26335 |  | 
 | 26336 | * Fewer chances of dumping core when trying to reload or re-import | 
 | 26337 | static built-in, dynamically loaded built-in, or frozen modules. | 
 | 26338 |  | 
 | 26339 | * Loops over sequences now don't ask for the sequence's length when | 
 | 26340 | they start, but try to access items 0, 1, 2, and so on until they hit | 
 | 26341 | an IndexError.  This makes it possible to create classes that generate | 
 | 26342 | infinite or indefinite sequences a la Steve Majewski.  This affects | 
 | 26343 | for loops, the (not) in operator, and the built-in functions filter(), | 
 | 26344 | map(), max(), min(), reduce(). | 
 | 26345 |  | 
 | 26346 | Changed Built-in operations | 
 | 26347 | --------------------------- | 
 | 26348 |  | 
 | 26349 | * The '%' operator on strings (printf-style formatting) supports a new | 
 | 26350 | feature (adapted from a patch by Donald Beaudry) to allow | 
 | 26351 | '%(<key>)<format>' % {...} to take values from a dictionary by name | 
 | 26352 | instead of from a tuple by position (see also the new function | 
 | 26353 | vars()). | 
 | 26354 |  | 
 | 26355 | * The '%s' formatting operator is changed to accept any type and | 
 | 26356 | convert it to a string using str(). | 
 | 26357 |  | 
 | 26358 | * Dictionaries with more than 20,000 entries can now be created | 
 | 26359 | (thanks to Steve Kirsch). | 
 | 26360 |  | 
 | 26361 | New Built-in Functions | 
 | 26362 | ---------------------- | 
 | 26363 |  | 
 | 26364 | * vars() returns a dictionary containing the local variables; vars(m) | 
 | 26365 | returns a dictionary containing the variables of module m.  Note: | 
 | 26366 | dir(x) is now equivalent to vars(x).keys(). | 
 | 26367 |  | 
 | 26368 | Changed Built-in Functions | 
 | 26369 | -------------------------- | 
 | 26370 |  | 
 | 26371 | * open() has an optional third argument to specify the buffer size: 0 | 
 | 26372 | for unbuffered, 1 for line buffered, >1 for explicit buffer size, <0 | 
 | 26373 | for default. | 
 | 26374 |  | 
 | 26375 | * open()'s second argument is now optional; it defaults to "r". | 
 | 26376 |  | 
 | 26377 | * apply() now checks that its second argument is indeed a tuple. | 
 | 26378 |  | 
 | 26379 | New Built-in Modules | 
 | 26380 | -------------------- | 
 | 26381 |  | 
 | 26382 | Changed Built-in Modules | 
 | 26383 | ------------------------ | 
 | 26384 |  | 
 | 26385 | The thread module no longer supports exit_prog(). | 
 | 26386 |  | 
 | 26387 | New Python Modules | 
 | 26388 | ------------------ | 
 | 26389 |  | 
 | 26390 | * Module addpack contains a standard interface to modify sys.path to | 
 | 26391 | find optional packages (groups of related modules). | 
 | 26392 |  | 
 | 26393 | * Module urllib contains a number of functions to access | 
 | 26394 | World-Wide-Web files specified by their URL. | 
 | 26395 |  | 
 | 26396 | * Module httplib implements the client side of the HTTP protocol used | 
 | 26397 | by World-Wide-Web servers. | 
 | 26398 |  | 
 | 26399 | * Module gopherlib implements the client side of the Gopher protocol. | 
 | 26400 |  | 
 | 26401 | * Module mailbox (by Jack Jansen) contains a parser for UNIX and MMDF | 
 | 26402 | style mailbox files. | 
 | 26403 |  | 
 | 26404 | * Module random contains various random distributions, e.g. gauss(). | 
 | 26405 |  | 
 | 26406 | * Module lockfile locks and unlocks open files using fcntl (inspired | 
 | 26407 | by a similar module by Andy Bensky). | 
 | 26408 |  | 
 | 26409 | * Module ntpath (by Jaap Vermeulen) implements path operations for | 
 | 26410 | Windows/NT. | 
 | 26411 |  | 
 | 26412 | * Module test_thread (in Lib/test) contains a small test set for the | 
 | 26413 | thread module. | 
 | 26414 |  | 
 | 26415 | Changed Python Modules | 
 | 26416 | ---------------------- | 
 | 26417 |  | 
 | 26418 | * The string module's expandvars() function is now documented and is | 
 | 26419 | implemented in Python (using regular expressions) instead of forking | 
 | 26420 | off a shell process. | 
 | 26421 |  | 
 | 26422 | * Module rfc822 now supports accessing the header fields using the | 
 | 26423 | mapping/dictionary interface, e.g. h['subject']. | 
 | 26424 |  | 
 | 26425 | * Module pdb now makes it possible to set a break on a function | 
 | 26426 | (syntax: break <expression>, where <expression> yields a function | 
 | 26427 | object). | 
 | 26428 |  | 
 | 26429 | Changed Demos | 
 | 26430 | ------------- | 
 | 26431 |  | 
 | 26432 | * The Demo/scripts/freeze.py script is working again (thanks to Jaap | 
 | 26433 | Vermeulen). | 
 | 26434 |  | 
 | 26435 | New Demos | 
 | 26436 | --------- | 
 | 26437 |  | 
 | 26438 | * Demo/threads/Generator.py is a proposed interface for restartable | 
 | 26439 | functions a la Tim Peters. | 
 | 26440 |  | 
 | 26441 | * Demo/scripts/newslist.py, by Quentin Stafford-Fraser, generates a | 
 | 26442 | directory full of HTML pages which between them contain links to all | 
 | 26443 | the newsgroups available on your server. | 
 | 26444 |  | 
 | 26445 | * Demo/dns contains a DNS (Domain Name Server) client. | 
 | 26446 |  | 
 | 26447 | * Demo/lutz contains miscellaneous demos by Mark Lutz (e.g. psh.py, a | 
 | 26448 | nice enhanced Python shell!!!). | 
 | 26449 |  | 
 | 26450 | * Demo/turing contains a Turing machine by Amrit Prem. | 
 | 26451 |  | 
 | 26452 | Documentation | 
 | 26453 | ------------- | 
 | 26454 |  | 
 | 26455 | * Documented new language features mentioned above (but not all new | 
 | 26456 | modules). | 
 | 26457 |  | 
 | 26458 | * Added a chapter to the Tutorial describing recent additions to | 
 | 26459 | Python. | 
 | 26460 |  | 
 | 26461 | * Clarified some sentences in the reference manual, | 
 | 26462 | e.g. break/continue, local/global scope, slice assignment. | 
 | 26463 |  | 
 | 26464 | Source Structure | 
 | 26465 | ---------------- | 
 | 26466 |  | 
 | 26467 | * Moved Include/tokenizer.h to Parser/tokenizer.h. | 
 | 26468 |  | 
 | 26469 | * Added Python/getopt.c for systems that don't have it. | 
 | 26470 |  | 
 | 26471 | Emacs mode | 
 | 26472 | ---------- | 
 | 26473 |  | 
 | 26474 | * Indentation of continuated lines is done more intelligently; | 
 | 26475 | consequently the variable py-continuation-offset is gone. | 
 | 26476 |  | 
| Guido van Rossum | f2eac99 | 2000-09-04 17:24:24 +0000 | [diff] [blame] | 26477 |  | 
| Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 26478 | ======================================== | 
 | 26479 | ==> Release 1.0.1 (15 February 1994) <== | 
 | 26480 | ======================================== | 
 | 26481 |  | 
 | 26482 | * Many portability fixes should make it painless to build Python on | 
 | 26483 | several new platforms, e.g. NeXT, SEQUENT, WATCOM, DOS, and Windows. | 
 | 26484 |  | 
 | 26485 | * Fixed test for <stdarg.h> -- this broke on some platforms. | 
 | 26486 |  | 
 | 26487 | * Fixed test for shared library dynalic loading -- this broke on SunOS | 
 | 26488 | 4.x using the GNU loader. | 
 | 26489 |  | 
 | 26490 | * Changed order and number of SVR4 networking libraries (it is now | 
 | 26491 | -lsocket -linet -lnsl, if these libraries exist). | 
 | 26492 |  | 
 | 26493 | * Installing the build intermediate stages with "make libainstall" now | 
 | 26494 | also installs config.c.in, Setup and makesetup, which are used by the | 
 | 26495 | new Extensions mechanism. | 
 | 26496 |  | 
 | 26497 | * Improved README file contains more hints and new troubleshooting | 
 | 26498 | section. | 
 | 26499 |  | 
 | 26500 | * The built-in module strop now defines fast versions of three more | 
 | 26501 | functions of the standard string module: atoi(), atol() and atof(). | 
 | 26502 | The strop versions of atoi() and atol() support an optional second | 
 | 26503 | argument to specify the base (default 10).  NOTE: you don't have to | 
 | 26504 | explicitly import strop to use the faster versions -- the string | 
 | 26505 | module contains code to let versions from stop override the default | 
 | 26506 | versions. | 
 | 26507 |  | 
 | 26508 | * There is now a working Lib/dospath.py for those who use Python under | 
 | 26509 | DOS (or Windows).  Thanks, Jaap! | 
 | 26510 |  | 
 | 26511 | * There is now a working Modules/dosmodule.c for DOS (or Windows) | 
 | 26512 | system calls. | 
 | 26513 |  | 
 | 26514 | * Lib.os.py has been reorganized (making it ready for more operating | 
 | 26515 | systems). | 
 | 26516 |  | 
 | 26517 | * Lib/ospath.py is now obsolete (use os.path instead). | 
 | 26518 |  | 
 | 26519 | * Many fixes to the tutorial to make it match Python 1.0.  Thanks, | 
 | 26520 | Tim! | 
 | 26521 |  | 
 | 26522 | * Fixed Doc/Makefile, Doc/README and various scripts there. | 
 | 26523 |  | 
 | 26524 | * Added missing description of fdopen to Doc/libposix.tex. | 
 | 26525 |  | 
 | 26526 | * Made cleanup() global, for the benefit of embedded applications. | 
 | 26527 |  | 
 | 26528 | * Added parsing of addresses and dates to Lib/rfc822.py. | 
 | 26529 |  | 
 | 26530 | * Small fixes to Lib/aifc.py, Lib/sunau.py, Lib/tzparse.py to make | 
 | 26531 | them usable at all. | 
 | 26532 |  | 
 | 26533 | * New module Lib/wave.py reads RIFF (*.wav) audio files. | 
 | 26534 |  | 
 | 26535 | * Module Lib/filewin.py moved to Lib/stdwin/filewin.py where it | 
 | 26536 | belongs. | 
 | 26537 |  | 
 | 26538 | * New options and comments for Modules/makesetup (used by new | 
 | 26539 | Extension mechanism). | 
 | 26540 |  | 
 | 26541 | * Misc/HYPE contains text of announcement of 1.0.0 in comp.lang.misc | 
 | 26542 | and elsewhere. | 
 | 26543 |  | 
 | 26544 | * Fixed coredump in filter(None, 'abcdefg'). | 
 | 26545 |  | 
 | 26546 |  | 
 | 26547 | ======================================= | 
 | 26548 | ==> Release 1.0.0 (26 January 1994) <== | 
 | 26549 | ======================================= | 
 | 26550 |  | 
 | 26551 | As is traditional, so many things have changed that I can't pretend to | 
 | 26552 | be complete in these release notes, but I'll try anyway :-) | 
 | 26553 |  | 
 | 26554 | Note that the very last section is labeled "remaining bugs". | 
 | 26555 |  | 
 | 26556 |  | 
 | 26557 | Source organization and build process | 
 | 26558 | ------------------------------------- | 
 | 26559 |  | 
 | 26560 | * The sources have finally been split: instead of a single src | 
 | 26561 | subdirectory there are now separate directories Include, Parser, | 
 | 26562 | Grammar, Objects, Python and Modules.  Other directories also start | 
 | 26563 | with a capital letter: Misc, Doc, Lib, Demo. | 
 | 26564 |  | 
 | 26565 | * A few extensions (notably Amoeba and X support) have been moved to a | 
 | 26566 | separate subtree Extensions, which is no longer in the core | 
 | 26567 | distribution, but separately ftp'able as extensions.tar.Z.  (The | 
 | 26568 | distribution contains a placeholder Ext-dummy with a description of | 
 | 26569 | the Extensions subtree as well as the most recent versions of the | 
 | 26570 | scripts used there.) | 
 | 26571 |  | 
 | 26572 | * A few large specialized demos (SGI video and www) have been | 
 | 26573 | moved to a separate subdirectory Demo2, which is no longer in the core | 
 | 26574 | distribution, but separately ftp'able as demo2.tar.Z. | 
 | 26575 |  | 
 | 26576 | * Parts of the standard library have been moved to subdirectories: | 
 | 26577 | there are now standard subdirectories stdwin, test, sgi and sun4. | 
 | 26578 |  | 
 | 26579 | * The configuration process has radically changed: I now use GNU | 
 | 26580 | autoconf.  This makes it much easier to build on new Unix flavors, as | 
 | 26581 | well as fully supporting VPATH (if your Make has it).  The scripts | 
 | 26582 | Configure.py and Addmodule.sh are no longer needed.  Many source files | 
 | 26583 | have been adapted in order to work with the symbols that the configure | 
 | 26584 | script generated by autoconf defines (or not); the resulting source is | 
 | 26585 | much more portable to different C compilers and operating systems, | 
 | 26586 | even non Unix systems (a Mac port was done in an afternoon).  See the | 
 | 26587 | toplevel README file for a description of the new build process. | 
 | 26588 |  | 
 | 26589 | * GNU readline (a slightly newer version) is now a subdirectory of the | 
 | 26590 | Python toplevel.  It is still not automatically configured (being | 
 | 26591 | totally autoconf-unaware :-).  One problem has been solved: typing | 
 | 26592 | Control-C to a readline prompt will now work.  The distribution no | 
 | 26593 | longer contains a "super-level" directory (above the python toplevel | 
 | 26594 | directory), and dl, dl-dld and GNU dld are no longer part of the | 
 | 26595 | Python distribution (you can still ftp them from | 
 | 26596 | ftp.cwi.nl:/pub/dynload). | 
 | 26597 |  | 
 | 26598 | * The DOS functions have been taken out of posixmodule.c and moved | 
 | 26599 | into a separate file dosmodule.c. | 
 | 26600 |  | 
 | 26601 | * There's now a separate file version.c which contains nothing but | 
 | 26602 | the version number. | 
 | 26603 |  | 
 | 26604 | * The actual main program is now contained in config.c (unless NO_MAIN | 
 | 26605 | is defined); pythonmain.c now contains a function realmain() which is | 
 | 26606 | called from config.c's main(). | 
 | 26607 |  | 
 | 26608 | * All files needed to use the built-in module md5 are now contained in | 
 | 26609 | the distribution.  The module has been cleaned up considerably. | 
 | 26610 |  | 
 | 26611 |  | 
 | 26612 | Documentation | 
 | 26613 | ------------- | 
 | 26614 |  | 
 | 26615 | * The library manual has been split into many more small latex files, | 
 | 26616 | so it is easier to edit Doc/lib.tex file to create a custom library | 
 | 26617 | manual, describing only those modules supported on your system.  (This | 
 | 26618 | is not automated though.) | 
 | 26619 |  | 
 | 26620 | * A fourth manual has been added, titled "Extending and Embedding the | 
 | 26621 | Python Interpreter" (Doc/ext.tex), which collects information about | 
 | 26622 | the interpreter which was previously spread over several files in the | 
 | 26623 | misc subdirectory. | 
 | 26624 |  | 
 | 26625 | * The entire documentation is now also available on-line for those who | 
 | 26626 | have a WWW browser (e.g. NCSA Mosaic).  Point your browser to the URL | 
 | 26627 | "http://www.cwi.nl/~guido/Python.html". | 
 | 26628 |  | 
 | 26629 |  | 
 | 26630 | Syntax | 
 | 26631 | ------ | 
 | 26632 |  | 
 | 26633 | * Strings may now be enclosed in double quotes as well as in single | 
 | 26634 | quotes.  There is no difference in interpretation.  The repr() of | 
 | 26635 | string objects will use double quotes if the string contains a single | 
 | 26636 | quote and no double quotes.  Thanks to Amrit Prem for these changes! | 
 | 26637 |  | 
 | 26638 | * There is a new keyword 'exec'.  This replaces the exec() built-in | 
 | 26639 | function.  If a function contains an exec statement, local variable | 
 | 26640 | optimization is not performed for that particular function, thus | 
 | 26641 | making assignment to local variables in exec statements less | 
 | 26642 | confusing.  (As a consequence, os.exec and python.exec have been | 
 | 26643 | renamed to execv.) | 
 | 26644 |  | 
 | 26645 | * There is a new keyword 'lambda'.  An expression of the form | 
 | 26646 |  | 
 | 26647 | 	lambda <parameters> : <expression> | 
 | 26648 |  | 
 | 26649 | yields an anonymous function.  This is really only syntactic sugar; | 
 | 26650 | you can just as well define a local function using | 
 | 26651 |  | 
 | 26652 | 	def some_temporary_name(<parameters>): return <expression> | 
 | 26653 |  | 
 | 26654 | Lambda expressions are particularly useful in combination with map(), | 
 | 26655 | filter() and reduce(), described below.  Thanks to Amrit Prem for | 
 | 26656 | submitting this code (as well as map(), filter(), reduce() and | 
 | 26657 | xrange())! | 
 | 26658 |  | 
 | 26659 |  | 
 | 26660 | Built-in functions | 
 | 26661 | ------------------ | 
 | 26662 |  | 
 | 26663 | * The built-in module containing the built-in functions is called | 
 | 26664 | __builtin__ instead of builtin. | 
 | 26665 |  | 
 | 26666 | * New built-in functions map(), filter() and reduce() perform standard | 
 | 26667 | functional programming operations (though not lazily): | 
 | 26668 |  | 
 | 26669 | - map(f, seq) returns a new sequence whose items are the items from | 
 | 26670 | seq with f() applied to them. | 
 | 26671 |  | 
 | 26672 | - filter(f, seq) returns a subsequence of seq consisting of those | 
 | 26673 | items for which f() is true. | 
 | 26674 |  | 
 | 26675 | - reduce(f, seq, initial) returns a value computed as follows: | 
 | 26676 | 	acc = initial | 
 | 26677 | 	for item in seq: acc = f(acc, item) | 
 | 26678 | 	return acc | 
 | 26679 |  | 
 | 26680 | * New function xrange() creates a "range object".  Its arguments are | 
 | 26681 | the same as those of range(), and when used in a for loop a range | 
 | 26682 | objects also behaves identical.  The advantage of xrange() over | 
 | 26683 | range() is that its representation (if the range contains many | 
 | 26684 | elements) is much more compact than that of range().  The disadvantage | 
 | 26685 | is that the result cannot be used to initialize a list object or for | 
 | 26686 | the "Python idiom" [RED, GREEN, BLUE] = range(3).  On some modern | 
 | 26687 | architectures, benchmarks have shown that "for i in range(...): ..." | 
 | 26688 | actually executes *faster* than "for i in xrange(...): ...", but on | 
 | 26689 | memory starved machines like PCs running DOS range(100000) may be just | 
 | 26690 | too big to be represented at all... | 
 | 26691 |  | 
 | 26692 | * Built-in function exec() has been replaced by the exec statement -- | 
 | 26693 | see above. | 
 | 26694 |  | 
 | 26695 |  | 
 | 26696 | The interpreter | 
 | 26697 | --------------- | 
 | 26698 |  | 
 | 26699 | * Syntax errors are now not printed to stderr by the parser, but | 
 | 26700 | rather the offending line and other relevant information are packed up | 
 | 26701 | in the SyntaxError exception argument.  When the main loop catches a | 
 | 26702 | SyntaxError exception it will print the error in the same format as | 
 | 26703 | previously, but at the proper position in the stack traceback. | 
 | 26704 |  | 
 | 26705 | * You can now set a maximum to the number of traceback entries | 
 | 26706 | printed by assigning to sys.tracebacklimit.  The default is 1000. | 
 | 26707 |  | 
 | 26708 | * The version number in .pyc files has changed yet again. | 
 | 26709 |  | 
 | 26710 | * It is now possible to have a .pyc file without a corresponding .py | 
 | 26711 | file.  (Warning: this may break existing installations if you have an | 
 | 26712 | old .pyc file lingering around somewhere on your module search path | 
 | 26713 | without a corresponding .py file, when there is a .py file for a | 
 | 26714 | module of the same name further down the path -- the new interpreter | 
 | 26715 | will find the first .pyc file and complain about it, while the old | 
 | 26716 | interpreter would ignore it and use the .py file further down.) | 
 | 26717 |  | 
 | 26718 | * The list sys.builtin_module_names is now sorted and also contains | 
 | 26719 | the names of a few hardwired built-in modules (sys, __main__ and | 
 | 26720 | __builtin__). | 
 | 26721 |  | 
 | 26722 | * A module can now find its own name by accessing the global variable | 
 | 26723 | __name__.  Assigning to this variable essentially renames the module | 
 | 26724 | (it should also be stored under a different key in sys.modules). | 
 | 26725 | A neat hack follows from this: a module that wants to execute a main | 
 | 26726 | program when called as a script no longer needs to compare | 
 | 26727 | sys.argv[0]; it can simply do "if __name__ == '__main__': main()". | 
 | 26728 |  | 
 | 26729 | * When an object is printed by the print statement, its implementation | 
 | 26730 | of str() is used.  This means that classes can define __str__(self) to | 
 | 26731 | direct how their instances are printed.  This is different from | 
 | 26732 | __repr__(self), which should define an unambigous string | 
 | 26733 | representation of the instance.  (If __str__() is not defined, it | 
 | 26734 | defaults to __repr__().) | 
 | 26735 |  | 
 | 26736 | * Functions and code objects can now be compared meaningfully. | 
 | 26737 |  | 
 | 26738 | * On systems supporting SunOS or SVR4 style shared libraries, dynamic | 
 | 26739 | loading of modules using shared libraries is automatically configured. | 
 | 26740 | Thanks to Bill Jansen and Denis Severson for contributing this change! | 
 | 26741 |  | 
 | 26742 |  | 
 | 26743 | Built-in objects | 
 | 26744 | ---------------- | 
 | 26745 |  | 
 | 26746 | * File objects have acquired a new method writelines() which is the | 
 | 26747 | reverse of readlines().  (It does not actually write lines, just a | 
 | 26748 | list of strings, but the symmetry makes the choice of name OK.) | 
 | 26749 |  | 
 | 26750 |  | 
 | 26751 | Built-in modules | 
 | 26752 | ---------------- | 
 | 26753 |  | 
 | 26754 | * Socket objects no longer support the avail() method.  Use the select | 
 | 26755 | module instead, or use this function to replace it: | 
 | 26756 |  | 
 | 26757 | 	def avail(f): | 
 | 26758 | 		import select | 
 | 26759 | 		return f in select.select([f], [], [], 0)[0] | 
 | 26760 |  | 
 | 26761 | * Initialization of stdwin is done differently.  It actually modifies | 
 | 26762 | sys.argv (taking out the options the X version of stdwin recognizes) | 
 | 26763 | the first time it is imported. | 
 | 26764 |  | 
 | 26765 | * A new built-in module parser provides a rudimentary interface to the | 
 | 26766 | python parser.  Corresponding standard library modules token and symbol | 
 | 26767 | defines the numeric values of tokens and non-terminal symbols. | 
 | 26768 |  | 
 | 26769 | * The posix module has aquired new functions setuid(), setgid(), | 
 | 26770 | execve(), and exec() has been renamed to execv(). | 
 | 26771 |  | 
 | 26772 | * The array module is extended with 8-byte object swaps, the 'i' | 
 | 26773 | format character, and a reverse() method.  The read() and write() | 
 | 26774 | methods are renamed to fromfile() and tofile(). | 
 | 26775 |  | 
 | 26776 | * The rotor module has freed of portability bugs.  This introduces a | 
 | 26777 | backward compatibility problem: strings encoded with the old rotor | 
 | 26778 | module can't be decoded by the new version. | 
 | 26779 |  | 
 | 26780 | * For select.select(), a timeout (4th) argument of None means the same | 
 | 26781 | as leaving the timeout argument out. | 
 | 26782 |  | 
 | 26783 | * Module strop (and hence standard library module string) has aquired | 
 | 26784 | a new function: rindex().  Thanks to Amrit Prem! | 
 | 26785 |  | 
 | 26786 | * Module regex defines a new function symcomp() which uses an extended | 
 | 26787 | regular expression syntax: parenthesized subexpressions may be labeled | 
 | 26788 | using the form "\(<labelname>...\)", and the group() method can return | 
 | 26789 | sub-expressions by name.  Thanks to Tracy Tims for these changes! | 
 | 26790 |  | 
 | 26791 | * Multiple threads are now supported on Solaris 2.  Thanks to Sjoerd | 
 | 26792 | Mullender! | 
 | 26793 |  | 
 | 26794 |  | 
 | 26795 | Standard library modules | 
 | 26796 | ------------------------ | 
 | 26797 |  | 
 | 26798 | * The library is now split in several subdirectories: all stuff using | 
 | 26799 | stdwin is in Lib/stdwin, all SGI specific (or SGI Indigo or GL) stuff | 
 | 26800 | is in Lib/sgi, all Sun Sparc specific stuff is in Lib/sun4, and all | 
 | 26801 | test modules are in Lib/test.  The default module search path will | 
 | 26802 | include all relevant subdirectories by default. | 
 | 26803 |  | 
 | 26804 | * Module os now knows about trying to import dos.  It defines | 
 | 26805 | functions execl(), execle(), execlp() and execvp(). | 
 | 26806 |  | 
 | 26807 | * New module dospath (should be attacked by a DOS hacker though). | 
 | 26808 |  | 
 | 26809 | * All modules defining classes now define __init__() constructors | 
 | 26810 | instead of init() methods.  THIS IS AN INCOMPATIBLE CHANGE! | 
 | 26811 |  | 
 | 26812 | * Some minor changes and bugfixes module ftplib (mostly Steve | 
 | 26813 | Majewski's suggestions); the debug() method is renamed to | 
 | 26814 | set_debuglevel(). | 
 | 26815 |  | 
 | 26816 | * Some new test modules (not run automatically by testall though): | 
 | 26817 | test_audioop, test_md5, test_rgbimg, test_select. | 
 | 26818 |  | 
 | 26819 | * Module string now defines rindex() and rfind() in analogy of index() | 
 | 26820 | and find().  It also defines atof() and atol() (and corresponding | 
 | 26821 | exceptions) in analogy to atoi(). | 
 | 26822 |  | 
 | 26823 | * Added help() functions to modules profile and pdb. | 
 | 26824 |  | 
 | 26825 | * The wdb debugger (now in Lib/stdwin) now shows class or instance | 
 | 26826 | variables on a double click.  Thanks to Sjoerd Mullender! | 
 | 26827 |  | 
 | 26828 | * The (undocumented) module lambda has gone -- you couldn't import it | 
 | 26829 | any more, and it was basically more a demo than a library module... | 
 | 26830 |  | 
 | 26831 |  | 
 | 26832 | Multimedia extensions | 
 | 26833 | --------------------- | 
 | 26834 |  | 
 | 26835 | * The optional built-in modules audioop and imageop are now standard | 
 | 26836 | parts of the interpreter.  Thanks to Sjoerd Mullender and Jack Jansen | 
 | 26837 | for contributing this code! | 
 | 26838 |  | 
 | 26839 | * There's a new operation in audioop: minmax(). | 
 | 26840 |  | 
 | 26841 | * There's a new built-in module called rgbimg which supports portable | 
 | 26842 | efficient reading of SGI RCG image files.  Thanks also to Paul | 
 | 26843 | Haeberli for the original code!  (Who will contribute a GIF reader?) | 
 | 26844 |  | 
 | 26845 | * The module aifc is gone -- you should now always use aifc, which has | 
 | 26846 | received a facelift. | 
 | 26847 |  | 
 | 26848 | * There's a new module sunau., for reading Sun (and NeXT) audio files. | 
 | 26849 |  | 
 | 26850 | * There's a new module audiodev which provides a uniform interface to | 
 | 26851 | (SGI Indigo and Sun Sparc) audio hardware. | 
 | 26852 |  | 
 | 26853 | * There's a new module sndhdr which recognizes various sound files by | 
 | 26854 | looking in their header and checking for various magic words. | 
 | 26855 |  | 
 | 26856 |  | 
 | 26857 | Optimizations | 
 | 26858 | ------------- | 
 | 26859 |  | 
 | 26860 | * Most optimizations below can be configured by compile-time flags. | 
 | 26861 | Thanks to Sjoerd Mullender for submitting these optimizations! | 
 | 26862 |  | 
 | 26863 | * Small integers (default -1..99) are shared -- i.e. if two different | 
 | 26864 | functions compute the same value it is possible (but not | 
 | 26865 | guaranteed!!!) that they return the same *object*.  Python programs | 
 | 26866 | can detect this but should *never* rely on it. | 
 | 26867 |  | 
 | 26868 | * Empty tuples (which all compare equal) are shared in the same | 
 | 26869 | manner. | 
 | 26870 |  | 
 | 26871 | * Tuples of size up to 20 (default) are put in separate free lists | 
 | 26872 | when deallocated. | 
 | 26873 |  | 
 | 26874 | * There is a compile-time option to cache a string's hash function, | 
 | 26875 | but this appeared to have a negligeable effect, and as it costs 4 | 
 | 26876 | bytes per string it is disabled by default. | 
 | 26877 |  | 
 | 26878 |  | 
 | 26879 | Embedding Python | 
 | 26880 | ---------------- | 
 | 26881 |  | 
 | 26882 | * The initialization interface has been simplified somewhat.  You now | 
 | 26883 | only call "initall()" to initialize the interpreter. | 
 | 26884 |  | 
 | 26885 | * The previously announced renaming of externally visible identifiers | 
 | 26886 | has not been carried out.  It will happen in a later release.  Sorry. | 
 | 26887 |  | 
 | 26888 |  | 
 | 26889 | Miscellaneous bugs that have been fixed | 
 | 26890 | --------------------------------------- | 
 | 26891 |  | 
 | 26892 | * All known portability bugs. | 
 | 26893 |  | 
 | 26894 | * Version 0.9.9 dumped core in <listobject>.sort() which has been | 
 | 26895 | fixed.  Thanks to Jaap Vermeulen for fixing this and posting the fix | 
 | 26896 | on the mailing list while I was away! | 
 | 26897 |  | 
 | 26898 | * Core dump on a format string ending in '%', e.g. in the expression | 
 | 26899 | '%' % None. | 
 | 26900 |  | 
 | 26901 | * The array module yielded a bogus result for concatenation (a+b would | 
 | 26902 | yield a+a). | 
 | 26903 |  | 
 | 26904 | * Some serious memory leaks in strop.split() and strop.splitfields(). | 
 | 26905 |  | 
 | 26906 | * Several problems with the nis module. | 
 | 26907 |  | 
 | 26908 | * Subtle problem when copying a class method from another class | 
 | 26909 | through assignment (the method could not be called). | 
 | 26910 |  | 
 | 26911 |  | 
 | 26912 | Remaining bugs | 
 | 26913 | -------------- | 
 | 26914 |  | 
 | 26915 | * One problem with 64-bit machines remains -- since .pyc files are | 
 | 26916 | portable and use only 4 bytes to represent an integer object, 64-bit | 
 | 26917 | integer literals are silently truncated when written into a .pyc file. | 
 | 26918 | Work-around: use eval('123456789101112'). | 
 | 26919 |  | 
 | 26920 | * The freeze script doesn't work any more.  A new and more portable | 
 | 26921 | one can probably be cooked up using tricks from Extensions/mkext.py. | 
 | 26922 |  | 
 | 26923 | * The dos support hasn't been tested yet.  (Really Soon Now we should | 
 | 26924 | have a PC with a working C compiler!) | 
 | 26925 |  | 
 | 26926 |  | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 26927 | =================================== | 
 | 26928 | ==> Release 0.9.9 (29 Jul 1993) <== | 
 | 26929 | =================================== | 
 | 26930 |  | 
 | 26931 | I *believe* these are the main user-visible changes in this release, | 
 | 26932 | but there may be others.  SGI users may scan the {src,lib}/ChangeLog | 
 | 26933 | files for improvements of some SGI specific modules, e.g. aifc and | 
 | 26934 | cl.  Developers of extension modules should also read src/ChangeLog. | 
 | 26935 |  | 
 | 26936 |  | 
 | 26937 | Naming of C symbols used by the Python interpreter | 
 | 26938 | -------------------------------------------------- | 
 | 26939 |  | 
 | 26940 | * This is the last release using the current naming conventions.  New | 
 | 26941 | naming conventions are explained in the file misc/NAMING. | 
 | 26942 | Summarizing, all externally visible symbols get (at least) a "Py" | 
 | 26943 | prefix, and most functions are renamed to the standard form | 
 | 26944 | PyModule_FunctionName. | 
 | 26945 |  | 
 | 26946 | * Writers of extensions are urged to start using the new naming | 
 | 26947 | conventions.  The next release will use the new naming conventions | 
 | 26948 | throughout (it will also have a different source directory | 
 | 26949 | structure). | 
 | 26950 |  | 
 | 26951 | * As a result of the preliminary work for the great renaming, many | 
 | 26952 | functions that were accidentally global have been made static. | 
 | 26953 |  | 
 | 26954 |  | 
 | 26955 | BETA X11 support | 
 | 26956 | ---------------- | 
 | 26957 |  | 
 | 26958 | * There are now modules interfacing to the X11 Toolkit Intrinsics, the | 
 | 26959 | Athena widgets, and the Motif 1.1 widget set.  These are not yet | 
 | 26960 | documented except through the examples and README file in the demo/x11 | 
 | 26961 | directory.  It is expected that this interface will be replaced by a | 
 | 26962 | more powerful and correct one in the future, which may or may not be | 
 | 26963 | backward compatible.  In other words, this part of the code is at most | 
 | 26964 | BETA level software!  (Note: the rest of Python is rock solid as ever!) | 
 | 26965 |  | 
 | 26966 | * I understand that the above may be a bit of a disappointment, | 
 | 26967 | however my current schedule does not allow me to change this situation | 
 | 26968 | before putting the release out of the door.  By releasing it | 
 | 26969 | undocumented and buggy, at least some of the (working!) demo programs, | 
 | 26970 | like itr (my Internet Talk Radio browser) become available to a larger | 
 | 26971 | audience. | 
 | 26972 |  | 
 | 26973 | * There are also modules interfacing to SGI's "Glx" widget (a GL | 
 | 26974 | window wrapped in a widget) and to NCSA's "HTML" widget (which can | 
 | 26975 | format HyperText Markup Language, the document format used by the | 
 | 26976 | World Wide Web). | 
 | 26977 |  | 
 | 26978 | * I've experienced some problems when building the X11 support.  In | 
 | 26979 | particular, the Xm and Xaw widget sets don't go together, and it | 
 | 26980 | appears that using X11R5 is better than using X11R4.  Also the threads | 
 | 26981 | module and its link time options may spoil things.  My own strategy is | 
 | 26982 | to build two Python binaries: one for use with X11 and one without | 
 | 26983 | it, which can contain a richer set of built-in modules.  Don't even | 
 | 26984 | *think* of loading the X11 modules dynamically... | 
 | 26985 |  | 
 | 26986 |  | 
 | 26987 | Environmental changes | 
 | 26988 | --------------------- | 
 | 26989 |  | 
 | 26990 | * Compiled files (*.pyc files) created by this Python version are | 
 | 26991 | incompatible with those created by the previous version.  Both | 
 | 26992 | versions detect this and silently create a correct version, but it | 
 | 26993 | means that it is not a good idea to use the same library directory for | 
 | 26994 | an old and a new interpreter, since they will start to "fight" over | 
 | 26995 | the *.pyc files... | 
 | 26996 |  | 
 | 26997 | * When a stack trace is printed, the exception is printed last instead | 
 | 26998 | of first.  This means that if the beginning of the stack trace | 
 | 26999 | scrolled out of your window you can still see what exception caused | 
 | 27000 | it. | 
 | 27001 |  | 
 | 27002 | * Sometimes interrupting a Python operation does not work because it | 
 | 27003 | hangs in a blocking system call.  You can now kill the interpreter by | 
 | 27004 | interrupting it three times.  The second time you interrupt it, a | 
 | 27005 | message will be printed telling you that the third interrupt will kill | 
 | 27006 | the interpreter.  The "sys.exitfunc" feature still makes limited | 
 | 27007 | clean-up possible in this case. | 
 | 27008 |  | 
 | 27009 |  | 
 | 27010 | Changes to the command line interface | 
 | 27011 | ------------------------------------- | 
 | 27012 |  | 
 | 27013 | * The python usage message is now much more informative. | 
 | 27014 |  | 
 | 27015 | * New option -i enters interactive mode after executing a script -- | 
 | 27016 | useful for debugging. | 
 | 27017 |  | 
 | 27018 | * New option -k raises an exception when an expression statement | 
 | 27019 | yields a value other than None. | 
 | 27020 |  | 
 | 27021 | * For each option there is now also a corresponding environment | 
 | 27022 | variable. | 
 | 27023 |  | 
 | 27024 |  | 
 | 27025 | Using Python as an embedded language | 
 | 27026 | ------------------------------------ | 
 | 27027 |  | 
 | 27028 | * The distribution now contains (some) documentation on the use of | 
 | 27029 | Python as an "embedded language" in other applications, as well as a | 
 | 27030 | simple example.  See the file misc/EMBEDDING and the directory embed/. | 
 | 27031 |  | 
 | 27032 |  | 
 | 27033 | Speed improvements | 
 | 27034 | ------------------ | 
 | 27035 |  | 
 | 27036 | * Function local variables are now generally stored in an array and | 
 | 27037 | accessed using an integer indexing operation, instead of through a | 
 | 27038 | dictionary lookup.  (This compensates the somewhat slower dictionary | 
 | 27039 | lookup caused by the generalization of the dictionary module.) | 
 | 27040 |  | 
 | 27041 |  | 
 | 27042 | Changes to the syntax | 
 | 27043 | --------------------- | 
 | 27044 |  | 
 | 27045 | * Continuation lines can now *sometimes* be written without a | 
 | 27046 | backslash: if the continuation is contained within nesting (), [] or | 
 | 27047 | {} brackets the \ may be omitted.  There's a much improved | 
 | 27048 | python-mode.el in the misc directory which knows about this as well. | 
 | 27049 |  | 
 | 27050 | * You can no longer use an empty set of parentheses to define a class | 
 | 27051 | without base classes.  That is, you no longer write this: | 
 | 27052 |  | 
 | 27053 | 	class Foo(): # syntax error | 
 | 27054 | 		... | 
 | 27055 |  | 
 | 27056 | You must write this instead: | 
 | 27057 |  | 
 | 27058 | 	class Foo: | 
 | 27059 | 		... | 
 | 27060 |  | 
 | 27061 | This was already the preferred syntax in release 0.9.8 but many | 
 | 27062 | people seemed not to have picked it up.  There's a Python script that | 
 | 27063 | fixes old code: demo/scripts/classfix.py. | 
 | 27064 |  | 
 | 27065 | * There's a new reserved word: "access".  The syntax and semantics are | 
| Georg Brandl | eeb575f | 2009-06-24 06:42:05 +0000 | [diff] [blame] | 27066 | still subject of research and debate (as well as undocumented), but | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 27067 | the parser knows about the keyword so you must not use it as a | 
 | 27068 | variable, function, or attribute name. | 
 | 27069 |  | 
 | 27070 |  | 
 | 27071 | Changes to the semantics of the language proper | 
 | 27072 | ----------------------------------------------- | 
 | 27073 |  | 
 | 27074 | * The following compatibility hack is removed: if a function was | 
 | 27075 | defined with two or more arguments, and called with a single argument | 
 | 27076 | that was a tuple with just as many arguments, the items of this tuple | 
 | 27077 | would be used as the arguments.  This is no longer supported. | 
 | 27078 |  | 
 | 27079 |  | 
 | 27080 | Changes to the semantics of classes and instances | 
 | 27081 | ------------------------------------------------- | 
 | 27082 |  | 
 | 27083 | * Class variables are now also accessible as instance variables for | 
 | 27084 | reading (assignment creates an instance variable which overrides the | 
 | 27085 | class variable of the same name though). | 
 | 27086 |  | 
 | 27087 | * If a class attribute is a user-defined function, a new kind of | 
 | 27088 | object is returned: an "unbound method".  This contains a pointer to | 
 | 27089 | the class and can only be called with a first argument which is a | 
 | 27090 | member of that class (or a derived class). | 
 | 27091 |  | 
 | 27092 | * If a class defines a method __init__(self, arg1, ...) then this | 
 | 27093 | method is called when a class instance is created by the classname() | 
 | 27094 | construct.  Arguments passed to classname() are passed to the | 
 | 27095 | __init__() method.  The __init__() methods of base classes are not | 
 | 27096 | automatically called; the derived __init__() method must call these if | 
 | 27097 | necessary (this was done so the derived __init__() method can choose | 
 | 27098 | the call order and arguments for the base __init__() methods). | 
 | 27099 |  | 
 | 27100 | * If a class defines a method __del__(self) then this method is called | 
 | 27101 | when an instance of the class is about to be destroyed.  This makes it | 
 | 27102 | possible to implement clean-up of external resources attached to the | 
 | 27103 | instance.  As with __init__(), the __del__() methods of base classes | 
 | 27104 | are not automatically called.  If __del__ manages to store a reference | 
 | 27105 | to the object somewhere, its destruction is postponed; when the object | 
 | 27106 | is again about to be destroyed its __del__() method will be called | 
 | 27107 | again. | 
 | 27108 |  | 
 | 27109 | * Classes may define a method __hash__(self) to allow their instances | 
 | 27110 | to be used as dictionary keys.  This must return a 32-bit integer. | 
 | 27111 |  | 
 | 27112 |  | 
 | 27113 | Minor improvements | 
 | 27114 | ------------------ | 
 | 27115 |  | 
 | 27116 | * Function and class objects now know their name (the name given in | 
 | 27117 | the 'def' or 'class' statement that created them). | 
 | 27118 |  | 
 | 27119 | * Class instances now know their class name. | 
 | 27120 |  | 
 | 27121 |  | 
 | 27122 | Additions to built-in operations | 
 | 27123 | -------------------------------- | 
 | 27124 |  | 
 | 27125 | * The % operator with a string left argument implements formatting | 
 | 27126 | similar to sprintf() in C.  The right argument is either a single | 
 | 27127 | value or a tuple of values.  All features of Standard C sprintf() are | 
 | 27128 | supported except %p. | 
 | 27129 |  | 
 | 27130 | * Dictionaries now support almost any key type, instead of just | 
 | 27131 | strings.  (The key type must be an immutable type or must be a class | 
 | 27132 | instance where the class defines a method __hash__(), in order to | 
 | 27133 | avoid losing track of keys whose value may change.) | 
 | 27134 |  | 
 | 27135 | * Built-in methods are now compared properly: when comparing x.meth1 | 
 | 27136 | and y.meth2, if x is equal to y and the methods are defined by the | 
 | 27137 | same function, x.meth1 compares equal to y.meth2. | 
 | 27138 |  | 
 | 27139 |  | 
 | 27140 | Additions to built-in functions | 
 | 27141 | ------------------------------- | 
 | 27142 |  | 
 | 27143 | * str(x) returns a string version of its argument.  If the argument is | 
 | 27144 | a string it is returned unchanged, otherwise it returns `x`. | 
 | 27145 |  | 
 | 27146 | * repr(x) returns the same as `x`.  (Some users found it easier to | 
 | 27147 | have this as a function.) | 
 | 27148 |  | 
 | 27149 | * round(x) returns the floating point number x rounded to an whole | 
 | 27150 | number, represented as a floating point number.  round(x, n) returns x | 
 | 27151 | rounded to n digits. | 
 | 27152 |  | 
 | 27153 | * hasattr(x, name) returns true when x has an attribute with the given | 
 | 27154 | name. | 
 | 27155 |  | 
 | 27156 | * hash(x) returns a hash code (32-bit integer) of an arbitrary | 
 | 27157 | immutable object's value. | 
 | 27158 |  | 
 | 27159 | * id(x) returns a unique identifier (32-bit integer) of an arbitrary | 
 | 27160 | object. | 
 | 27161 |  | 
 | 27162 | * compile() compiles a string to a Python code object. | 
 | 27163 |  | 
 | 27164 | * exec() and eval() now support execution of code objects. | 
 | 27165 |  | 
 | 27166 |  | 
 | 27167 | Changes to the documented part of the library (standard modules) | 
 | 27168 | ---------------------------------------------------------------- | 
 | 27169 |  | 
 | 27170 | * os.path.normpath() (a.k.a. posixpath.normpath()) has been fixed so | 
 | 27171 | the border case '/foo/..' returns '/' instead of ''. | 
 | 27172 |  | 
 | 27173 | * A new function string.find() is added with similar semantics to | 
 | 27174 | string.index(); however when it does not find the given substring it | 
 | 27175 | returns -1 instead of raising string.index_error. | 
 | 27176 |  | 
 | 27177 |  | 
 | 27178 | Changes to built-in modules | 
 | 27179 | --------------------------- | 
 | 27180 |  | 
 | 27181 | * New optional module 'array' implements operations on sequences of | 
 | 27182 | integers or floating point numbers of a particular size.  This is | 
 | 27183 | useful to manipulate large numerical arrays or to read and write | 
 | 27184 | binary files consisting of numerical data. | 
 | 27185 |  | 
 | 27186 | * Regular expression objects created by module regex now support a new | 
 | 27187 | method named group(), which returns one or more \(...\) groups by number. | 
 | 27188 | The number of groups is increased from 10 to 100. | 
 | 27189 |  | 
 | 27190 | * Function compile() in module regex now supports an optional mapping | 
 | 27191 | argument; a variable casefold is added to the module which can be used | 
 | 27192 | as a standard uppercase to lowercase mapping. | 
 | 27193 |  | 
 | 27194 | * Module time now supports many routines that are defined in the | 
 | 27195 | Standard C time interface (<time.h>): gmtime(), localtime(), | 
 | 27196 | asctime(), ctime(), mktime(), as well as these variables (taken from | 
 | 27197 | System V): timezone, altzone, daylight and tzname.  (The corresponding | 
 | 27198 | functions in the undocumented module calendar have been removed; the | 
 | 27199 | undocumented and unfinished module tzparse is now obsolete and will | 
 | 27200 | disappear in a future release.) | 
 | 27201 |  | 
 | 27202 | * Module strop (the fast built-in version of standard module string) | 
 | 27203 | now uses C's definition of whitespace instead of fixing it to space, | 
 | 27204 | tab and newline; in practice this usually means that vertical tab, | 
 | 27205 | form feed and return are now also considered whitespace.  It exports | 
 | 27206 | the string of characters that are considered whitespace as well as the | 
 | 27207 | characters that are considered lowercase or uppercase. | 
 | 27208 |  | 
 | 27209 | * Module sys now defines the variable builtin_module_names, a list of | 
 | 27210 | names of modules built into the current interpreter (including not | 
 | 27211 | yet imported, but excluding two special modules that always have to be | 
 | 27212 | defined -- sys and builtin). | 
 | 27213 |  | 
 | 27214 | * Objects created by module sunaudiodev now also support flush() and | 
 | 27215 | close() methods. | 
 | 27216 |  | 
 | 27217 | * Socket objects created by module socket now support an optional | 
 | 27218 | flags argument for their methods sendto() and recvfrom(). | 
 | 27219 |  | 
 | 27220 | * Module marshal now supports dumping to and loading from strings, | 
 | 27221 | through the functions dumps() and loads(). | 
 | 27222 |  | 
 | 27223 | * Module stdwin now supports some new functionality.  You may have to | 
 | 27224 | ftp the latest version: ftp.cwi.nl:/pub/stdwin/stdwinforviews.tar.Z.) | 
 | 27225 |  | 
 | 27226 |  | 
 | 27227 | Bugs fixed | 
 | 27228 | ---------- | 
 | 27229 |  | 
 | 27230 | * Fixed comparison of negative long integers. | 
 | 27231 |  | 
 | 27232 | * The tokenizer no longer botches input lines longer than BUFSIZ. | 
 | 27233 |  | 
 | 27234 | * Fixed several severe memory leaks in module select. | 
 | 27235 |  | 
 | 27236 | * Fixed memory leaks in modules socket and sv. | 
 | 27237 |  | 
 | 27238 | * Fixed memory leak in divmod() for long integers. | 
 | 27239 |  | 
 | 27240 | * Problems with definition of floatsleep() on Suns fixed. | 
 | 27241 |  | 
 | 27242 | * Many portability bugs fixed (and undoubtedly new ones added :-). | 
 | 27243 |  | 
 | 27244 |  | 
 | 27245 | Changes to the build procedure | 
 | 27246 | ------------------------------ | 
 | 27247 |  | 
 | 27248 | * The Makefile supports some new targets: "make default" and "make | 
 | 27249 | all".  Both are by normally equivalent to "make python". | 
 | 27250 |  | 
 | 27251 | * The Makefile no longer uses $> since it's not supported by all | 
 | 27252 | versions of Make. | 
 | 27253 |  | 
 | 27254 | * The header files now all contain #ifdef constructs designed to make | 
 | 27255 | it safe to include the same header file twice, as well as support for | 
 | 27256 | inclusion from C++ programs (automatic extern "C" { ... } added). | 
 | 27257 |  | 
 | 27258 |  | 
 | 27259 | Freezing Python scripts | 
 | 27260 | ----------------------- | 
 | 27261 |  | 
 | 27262 | * There is now some support for "freezing" a Python script as a | 
 | 27263 | stand-alone executable binary file.  See the script | 
 | 27264 | demo/scripts/freeze.py.  It will require some site-specific tailoring | 
 | 27265 | of the script to get this working, but is quite worthwhile if you write | 
 | 27266 | Python code for other who may not have built and installed Python. | 
 | 27267 |  | 
 | 27268 |  | 
 | 27269 | MS-DOS | 
 | 27270 | ------ | 
 | 27271 |  | 
 | 27272 | * A new MS-DOS port has been done, using MSC 6.0 (I believe).  Thanks, | 
 | 27273 | Marcel van der Peijl!  This requires fewer compatibility hacks in | 
 | 27274 | posixmodule.c.  The executable is not yet available but will be soon | 
 | 27275 | (check the mailing list). | 
 | 27276 |  | 
 | 27277 | * The default PYTHONPATH has changed. | 
 | 27278 |  | 
 | 27279 |  | 
 | 27280 | Changes for developers of extension modules | 
 | 27281 | ------------------------------------------- | 
 | 27282 |  | 
 | 27283 | * Read src/ChangeLog for full details. | 
 | 27284 |  | 
 | 27285 |  | 
 | 27286 | SGI specific changes | 
 | 27287 | -------------------- | 
 | 27288 |  | 
 | 27289 | * Read src/ChangeLog for full details. | 
 | 27290 |  | 
| Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 27291 |  | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 27292 | ================================== | 
 | 27293 | ==> Release 0.9.8 (9 Jan 1993) <== | 
 | 27294 | ================================== | 
 | 27295 |  | 
 | 27296 | I claim no completeness here, but I've tried my best to scan the log | 
 | 27297 | files throughout my source tree for interesting bits of news.  A more | 
 | 27298 | complete account of the changes is to be found in the various | 
 | 27299 | ChangeLog files. See also "News for release 0.9.7beta" below if you're | 
 | 27300 | still using release 0.9.6, and the file HISTORY if you have an even | 
 | 27301 | older release. | 
 | 27302 |  | 
 | 27303 | 	--Guido | 
 | 27304 |  | 
 | 27305 |  | 
 | 27306 | Changes to the language proper | 
 | 27307 | ------------------------------ | 
 | 27308 |  | 
 | 27309 | There's only one big change: the conformance checking for function | 
 | 27310 | argument lists (of user-defined functions only) is stricter.  Earlier, | 
 | 27311 | you could get away with the following: | 
 | 27312 |  | 
 | 27313 | 	(a) define a function of one argument and call it with any | 
 | 27314 | 	    number of arguments; if the actual argument count wasn't | 
 | 27315 | 	    one, the function would receive a tuple containing the | 
| Georg Brandl | eeb575f | 2009-06-24 06:42:05 +0000 | [diff] [blame] | 27316 | 	    arguments (an empty tuple if there were none). | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 27317 |  | 
 | 27318 | 	(b) define a function of two arguments, and call it with more | 
 | 27319 | 	    than two arguments; if there were more than two arguments, | 
 | 27320 | 	    the second argument would be passed as a tuple containing | 
 | 27321 | 	    the second and further actual arguments. | 
 | 27322 |  | 
 | 27323 | (Note that an argument (formal or actual) that is a tuple is counted as | 
 | 27324 | one; these rules don't apply inside such tuples, only at the top level | 
 | 27325 | of the argument list.) | 
 | 27326 |  | 
 | 27327 | Case (a) was needed to accommodate variable-length argument lists; | 
 | 27328 | there is now an explicit "varargs" feature (precede the last argument | 
 | 27329 | with a '*').  Case (b) was needed for compatibility with old class | 
 | 27330 | definitions: up to release 0.9.4 a method with more than one argument | 
 | 27331 | had to be declared as "def meth(self, (arg1, arg2, ...)): ...". | 
 | 27332 | Version 0.9.6 provide better ways to handle both casees, bot provided | 
 | 27333 | backward compatibility; version 0.9.8 retracts the compatibility hacks | 
 | 27334 | since they also cause confusing behavior if a function is called with | 
 | 27335 | the wrong number of arguments. | 
 | 27336 |  | 
 | 27337 | There's a script that helps converting classes that still rely on (b), | 
 | 27338 | provided their methods' first argument is called "self": | 
 | 27339 | demo/scripts/methfix.py. | 
 | 27340 |  | 
 | 27341 | If this change breaks lots of code you have developed locally, try | 
 | 27342 | #defining COMPAT_HACKS in ceval.c. | 
 | 27343 |  | 
 | 27344 | (There's a third compatibility hack, which is the reverse of (a): if a | 
 | 27345 | function is defined with two or more arguments, and called with a | 
 | 27346 | single argument that is a tuple with just as many arguments, the items | 
 | 27347 | of this tuple will be used as the arguments.  Although this can (and | 
 | 27348 | should!) be done using the built-in function apply() instead, it isn't | 
 | 27349 | withdrawn yet.) | 
 | 27350 |  | 
 | 27351 |  | 
 | 27352 | One minor change: comparing instance methods works like expected, so | 
 | 27353 | that if x is an instance of a user-defined class and has a method m, | 
 | 27354 | then (x.m==x.m) yields 1. | 
 | 27355 |  | 
 | 27356 |  | 
 | 27357 | The following was already present in 0.9.7beta, but not explicitly | 
 | 27358 | mentioned in the NEWS file: user-defined classes can now define types | 
 | 27359 | that behave in almost allrespects like numbers.  See | 
 | 27360 | demo/classes/Rat.py for a simple example. | 
 | 27361 |  | 
 | 27362 |  | 
 | 27363 | Changes to the build process | 
 | 27364 | ---------------------------- | 
 | 27365 |  | 
 | 27366 | The Configure.py script and the Makefile has been made somewhat more | 
 | 27367 | bullet-proof, after reports of (minor) trouble on certain platforms. | 
 | 27368 |  | 
 | 27369 | There is now a script to patch Makefile and config.c to add a new | 
 | 27370 | optional built-in module: Addmodule.sh.  Read the script before using! | 
 | 27371 |  | 
 | 27372 | Useing Addmodule.sh, all optional modules can now be configured at | 
 | 27373 | compile time using Configure.py, so there are no modules left that | 
 | 27374 | require dynamic loading. | 
 | 27375 |  | 
 | 27376 | The Makefile has been fixed to make it easier to use with the VPATH | 
 | 27377 | feature of some Make versions (e.g. SunOS). | 
 | 27378 |  | 
 | 27379 |  | 
 | 27380 | Changes affecting portability | 
 | 27381 | ----------------------------- | 
 | 27382 |  | 
 | 27383 | Several minor portability problems have been solved, e.g. "malloc.h" | 
 | 27384 | has been renamed to "mymalloc.h", "strdup.c" is no longer used, and | 
 | 27385 | the system now tolerates malloc(0) returning 0. | 
 | 27386 |  | 
 | 27387 | For dynamic loading on the SGI, Jack Jansen's dl 1.6 is now | 
 | 27388 | distributed with Python.  This solves several minor problems, in | 
 | 27389 | particular scripts invoked using #! can now use dynamic loading. | 
 | 27390 |  | 
 | 27391 |  | 
 | 27392 | Changes to the interpreter interface | 
 | 27393 | ------------------------------------ | 
 | 27394 |  | 
 | 27395 | On popular demand, there's finally a "profile" feature for interactive | 
 | 27396 | use of the interpreter.  If the environment variable $PYTHONSTARTUP is | 
 | 27397 | set to the name of an existing file, Python statements in this file | 
 | 27398 | are executed when the interpreter is started in interactive mode. | 
 | 27399 |  | 
 | 27400 | There is a new clean-up mechanism, complementing try...finally: if you | 
 | 27401 | assign a function object to sys.exitfunc, it will be called when | 
 | 27402 | Python exits or receives a SIGTERM or SIGHUP signal. | 
 | 27403 |  | 
 | 27404 | The interpreter is now generally assumed to live in | 
 | 27405 | /usr/local/bin/python (as opposed to /usr/local/python).  The script | 
 | 27406 | demo/scripts/fixps.py will update old scripts in place (you can easily | 
 | 27407 | modify it to do other similar changes). | 
 | 27408 |  | 
 | 27409 | Most I/O that uses sys.stdin/stdout/stderr will now use any object | 
 | 27410 | assigned to those names as long as the object supports readline() or | 
 | 27411 | write() methods. | 
 | 27412 |  | 
 | 27413 | The parser stack has been increased to 500 to accommodate more | 
 | 27414 | complicated expressions (7 levels used to be the practical maximum, | 
 | 27415 | it's now about 38). | 
 | 27416 |  | 
 | 27417 | The limit on the size of the *run-time* stack has completely been | 
 | 27418 | removed -- this means that tuple or list displays can contain any | 
 | 27419 | number of elements (formerly more than 50 would crash the | 
 | 27420 | interpreter).  | 
 | 27421 |  | 
 | 27422 |  | 
 | 27423 | Changes to existing built-in functions and methods | 
 | 27424 | -------------------------------------------------- | 
 | 27425 |  | 
 | 27426 | The built-in functions int(), long(), float(), oct() and hex() now | 
 | 27427 | also apply to class instalces that define corresponding methods | 
 | 27428 | (__int__ etc.). | 
 | 27429 |  | 
 | 27430 |  | 
 | 27431 | New built-in functions | 
 | 27432 | ---------------------- | 
 | 27433 |  | 
 | 27434 | The new functions str() and repr() convert any object to a string. | 
 | 27435 | The function repr(x) is in all respects equivalent to `x` -- some | 
 | 27436 | people prefer a function for this.  The function str(x) does the same | 
 | 27437 | except if x is already a string -- then it returns x unchanged | 
 | 27438 | (repr(x) adds quotes and escapes "funny" characters as octal escapes). | 
 | 27439 |  | 
 | 27440 | The new function cmp(x, y) returns -1 if x<y, 0 if x==y, 1 if x>y. | 
 | 27441 |  | 
 | 27442 |  | 
 | 27443 | Changes to general built-in modules | 
 | 27444 | ----------------------------------- | 
 | 27445 |  | 
 | 27446 | The time module's functions are more general: time() returns a | 
 | 27447 | floating point number and sleep() accepts one.  Their accuracies | 
 | 27448 | depends on the precision of the system clock.  Millisleep is no longer | 
 | 27449 | needed (although it still exists for now), but millitimer is still | 
 | 27450 | needed since on some systems wall clock time is only available with | 
 | 27451 | seconds precision, while a source of more precise time exists that | 
 | 27452 | isn't synchronized with the wall clock.  (On UNIX systems that support | 
 | 27453 | the BSD gettimeofday() function, time.time() is as time.millitimer().) | 
 | 27454 |  | 
 | 27455 | The string representation of a file object now includes an address: | 
 | 27456 | '<file 'filename', mode 'r' at #######>' where ###### is a hex number | 
 | 27457 | (the object's address) to make it unique. | 
 | 27458 |  | 
 | 27459 | New functions added to posix: nice(), setpgrp(), and if your system | 
 | 27460 | supports them: setsid(), setpgid(), tcgetpgrp(), tcsetpgrp(). | 
 | 27461 |  | 
 | 27462 | Improvements to the socket module: socket objects have new methods | 
 | 27463 | getpeername() and getsockname(), and the {get,set}sockopt methods can | 
 | 27464 | now get/set any kind of option using strings built with the new struct | 
 | 27465 | module.  And there's a new function fromfd() which creates a socket | 
 | 27466 | object given a file descriptor (useful for servers started by inetd, | 
 | 27467 | which have a socket connected to stdin and stdout). | 
 | 27468 |  | 
 | 27469 |  | 
 | 27470 | Changes to SGI-specific built-in modules | 
 | 27471 | ---------------------------------------- | 
 | 27472 |  | 
 | 27473 | The FORMS library interface (fl) now requires FORMS 2.1a.  Some new | 
 | 27474 | functions have been added and some bugs have been fixed. | 
 | 27475 |  | 
 | 27476 | Additions to al (audio library interface): added getname(), | 
 | 27477 | getdefault() and getminmax(). | 
 | 27478 |  | 
 | 27479 | The gl modules doesn't call "foreground()" when initialized (this | 
 | 27480 | caused some problems) like it dit in 0.9.7beta (but not before). | 
 | 27481 | There's a new gl function 'gversion() which returns a version string. | 
 | 27482 |  | 
 | 27483 | The interface to sv (Indigo video interface) has totally changed. | 
 | 27484 | (Sorry, still no documentation, but see the examples in | 
 | 27485 | demo/sgi/{sv,video}.) | 
 | 27486 |  | 
 | 27487 |  | 
 | 27488 | Changes to standard library modules | 
 | 27489 | ----------------------------------- | 
 | 27490 |  | 
 | 27491 | Most functions in module string are now much faster: they're actually | 
 | 27492 | implemented in C.  The module containing the C versions is called | 
 | 27493 | "strop" but you should still import "string" since strop doesn't | 
 | 27494 | provide all the interfaces defined in string (and strop may be renamed | 
 | 27495 | to string when it is complete in a future release). | 
 | 27496 |  | 
 | 27497 | string.index() now accepts an optional third argument giving an index | 
 | 27498 | where to start searching in the first argument, so you can find second | 
 | 27499 | and further occurrences (this is similar to the regular expression | 
 | 27500 | functions in regex). | 
 | 27501 |  | 
 | 27502 | The definition of what string.splitfields(anything, '') should return | 
 | 27503 | is changed for the last time: it returns a singleton list containing | 
 | 27504 | its whole first argument unchanged.  This is compatible with | 
 | 27505 | regsub.split() which also ignores empty delimiter matches. | 
 | 27506 |  | 
 | 27507 | posixpath, macpath: added dirname() and normpath() (and basename() to | 
 | 27508 | macpath). | 
 | 27509 |  | 
 | 27510 | The mainloop module (for use with stdwin) can now demultiplex input | 
 | 27511 | from other sources, as long as they can be polled with select(). | 
 | 27512 |  | 
 | 27513 |  | 
 | 27514 | New built-in modules | 
 | 27515 | -------------------- | 
 | 27516 |  | 
 | 27517 | Module struct defines functions to pack/unpack values to/from strings | 
 | 27518 | representing binary values in native byte order. | 
 | 27519 |  | 
 | 27520 | Module strop implements C versions of many functions from string (see | 
 | 27521 | above). | 
 | 27522 |  | 
 | 27523 | Optional module fcntl defines interfaces to fcntl() and ioctl() -- | 
 | 27524 | UNIX only.  (Not yet properly documented -- see however src/fcntl.doc.) | 
 | 27525 |  | 
 | 27526 | Optional module mpz defines an interface to an altaernative long | 
 | 27527 | integer implementation, the GNU MPZ library. | 
 | 27528 |  | 
 | 27529 | Optional module md5 uses the GNU MPZ library to calculate MD5 | 
 | 27530 | signatures of strings. | 
 | 27531 |  | 
 | 27532 | There are also optional new modules specific to SGI machines: imageop | 
 | 27533 | defines some simple operations to images represented as strings; sv | 
 | 27534 | interfaces to the Indigo video board; cl interfaces to the (yet | 
 | 27535 | unreleased) compression library. | 
 | 27536 |  | 
 | 27537 |  | 
 | 27538 | New standard library modules | 
 | 27539 | ---------------------------- | 
 | 27540 |  | 
 | 27541 | (Unfortunately the following modules are not all documented; read the | 
 | 27542 | sources to find out more about them!) | 
 | 27543 |  | 
 | 27544 | autotest: run testall without showing any output unless it differs | 
 | 27545 | from the expected output | 
 | 27546 |  | 
 | 27547 | bisect: use bisection to insert or find an item in a sorted list | 
 | 27548 |  | 
 | 27549 | colorsys: defines conversions between various color systems (e.g. RGB | 
 | 27550 | <-> YUV) | 
 | 27551 |  | 
 | 27552 | nntplib: a client interface to NNTP servers | 
 | 27553 |  | 
 | 27554 | pipes: utility to construct pipeline from templates, e.g. for | 
 | 27555 | conversion from one file format to another using several utilities. | 
 | 27556 |  | 
 | 27557 | regsub: contains three functions that are more or less compatible with | 
 | 27558 | awk functions of the same name: sub() and gsub() do string | 
 | 27559 | substitution, split() splits a string using a regular expression to | 
 | 27560 | define how separators are define. | 
 | 27561 |  | 
 | 27562 | test_types: test operations on the built-in types of Python | 
 | 27563 |  | 
 | 27564 | toaiff: convert various audio file formats to AIFF format | 
 | 27565 |  | 
 | 27566 | tzparse: parse the TZ environment parameter (this may be less general | 
 | 27567 | than it could be, let me know if you fix it). | 
 | 27568 |  | 
 | 27569 | (Note that the obsolete module "path" no longer exists.) | 
 | 27570 |  | 
 | 27571 |  | 
 | 27572 | New SGI-specific library modules | 
 | 27573 | -------------------------------- | 
 | 27574 |  | 
 | 27575 | CL: constants for use with the built-in compression library interface (cl) | 
 | 27576 |  | 
 | 27577 | Queue: a multi-producer, multi-consumer queue class implemented for | 
 | 27578 | use with the built-in thread module | 
 | 27579 |  | 
 | 27580 | SOCKET: constants for use with built-in module socket, e.g. to set/get | 
 | 27581 | socket options.  This is SGI-specific because the constants to be | 
 | 27582 | passed are system-dependent.  You can generate a version for your own | 
 | 27583 | system by running the script demo/scripts/h2py.py with | 
 | 27584 | /usr/include/sys/socket.h as input. | 
 | 27585 |  | 
| Walter Dörwald | f0dfc7a | 2003-10-20 14:01:56 +0000 | [diff] [blame] | 27586 | cddb: interface to the database used by the CD player | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 27587 |  | 
 | 27588 | torgb: convert various image file types to rgb format (requires pbmplus) | 
 | 27589 |  | 
 | 27590 |  | 
 | 27591 | New demos | 
 | 27592 | --------- | 
 | 27593 |  | 
 | 27594 | There's an experimental interface to define Sun RPC clients and | 
 | 27595 | servers in demo/rpc. | 
 | 27596 |  | 
 | 27597 | There's a collection of interfaces to WWW, WAIS and Gopher (both | 
 | 27598 | Python classes and program providing a user interface) in demo/www. | 
 | 27599 | This includes a program texi2html.py which converts texinfo files to | 
 | 27600 | HTML files (the format used hy WWW). | 
 | 27601 |  | 
 | 27602 | The ibrowse demo has moved from demo/stdwin/ibrowse to demo/ibrowse. | 
 | 27603 |  | 
 | 27604 | For SGI systems, there's a whole collection of programs and classes | 
 | 27605 | that make use of the Indigo video board in demo/sgi/{sv,video}.  This | 
 | 27606 | represents a significant amount of work that we're giving away! | 
 | 27607 |  | 
 | 27608 | There are demos "rsa" and "md5test" that exercise the mpz and md5 | 
 | 27609 | modules, respectively.  The rsa demo is a complete implementation of | 
 | 27610 | the RSA public-key cryptosystem! | 
 | 27611 |  | 
 | 27612 | A bunch of games and examples submitted by Stoffel Erasmus have been | 
 | 27613 | included in demo/stoffel. | 
 | 27614 |  | 
 | 27615 | There are miscellaneous new files in some existing demo | 
 | 27616 | subdirectories: classes/bitvec.py, scripts/{fixps,methfix}.py, | 
 | 27617 | sgi/al/cmpaf.py, sockets/{mcast,gopher}.py. | 
 | 27618 |  | 
 | 27619 | There are also many minor changes to existing files, but I'm too lazy | 
 | 27620 | to run a diff and note the differences -- you can do this yourself if | 
 | 27621 | you save the old distribution's demos.  One highlight: the | 
 | 27622 | stdwin/python.py demo is much improved! | 
 | 27623 |  | 
 | 27624 |  | 
 | 27625 | Changes to the documentation | 
 | 27626 | ---------------------------- | 
 | 27627 |  | 
 | 27628 | The LaTeX source for the library uses different macros to enable it to | 
 | 27629 | be converted to texinfo, and from there to INFO or HTML format so it | 
 | 27630 | can be browsed as a hypertext.  The net result is that you can now | 
 | 27631 | read the Python library documentation in Emacs info mode! | 
 | 27632 |  | 
 | 27633 |  | 
 | 27634 | Changes to the source code that affect C extension writers | 
 | 27635 | ---------------------------------------------------------- | 
 | 27636 |  | 
 | 27637 | The function strdup() no longer exists (it was used only in one places | 
| Georg Brandl | eeb575f | 2009-06-24 06:42:05 +0000 | [diff] [blame] | 27638 | and is somewhat of a portability problem since some systems have the | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 27639 | same function in their C library. | 
 | 27640 |  | 
 | 27641 | The functions NEW() and RENEW() allocate one spare byte to guard | 
 | 27642 | against a NULL return from malloc(0) being taken for an error, but | 
 | 27643 | this should not be relied upon. | 
 | 27644 |  | 
 | 27645 |  | 
 | 27646 | ========================= | 
 | 27647 | ==> Release 0.9.7beta <== | 
 | 27648 | ========================= | 
 | 27649 |  | 
 | 27650 |  | 
 | 27651 | Changes to the language proper | 
 | 27652 | ------------------------------ | 
 | 27653 |  | 
 | 27654 | User-defined classes can now implement operations invoked through | 
 | 27655 | special syntax, such as x[i] or `x` by defining methods named | 
 | 27656 | __getitem__(self, i) or __repr__(self), etc. | 
 | 27657 |  | 
 | 27658 |  | 
 | 27659 | Changes to the build process | 
 | 27660 | ---------------------------- | 
 | 27661 |  | 
 | 27662 | Instead of extensive manual editing of the Makefile to select | 
 | 27663 | compile-time options, you can now run a Configure.py script. | 
 | 27664 | The Makefile as distributed builds a minimal interpreter sufficient to | 
 | 27665 | run Configure.py.  See also misc/BUILD | 
 | 27666 |  | 
 | 27667 | The Makefile now includes more "utility" targets, e.g. install and | 
 | 27668 | tags/TAGS | 
 | 27669 |  | 
 | 27670 | Using the provided strtod.c and strtol.c are now separate options, as | 
 | 27671 | on the Sun the provided strtod.c dumps core :-( | 
 | 27672 |  | 
 | 27673 | The regex module is now an option chosen by the Makefile, since some | 
 | 27674 | (old) C compilers choke on regexpr.c | 
 | 27675 |  | 
 | 27676 |  | 
 | 27677 | Changes affecting portability | 
 | 27678 | ----------------------------- | 
 | 27679 |  | 
 | 27680 | You need STDWIN version 0.9.7 (released 30 June 1992) for the stdwin | 
 | 27681 | interface | 
 | 27682 |  | 
 | 27683 | Dynamic loading is now supported for Sun (and other non-COFF systems) | 
 | 27684 | throug dld-3.2.3, as well as for SGI (a new version of Jack Jansen's | 
 | 27685 | DL is out, 1.4) | 
 | 27686 |  | 
 | 27687 | The system-dependent code for the use of the select() system call is | 
 | 27688 | moved to one file: myselect.h | 
 | 27689 |  | 
 | 27690 | Thanks to Jaap Vermeulen, the code should now port cleanly to the | 
 | 27691 | SEQUENT | 
 | 27692 |  | 
 | 27693 |  | 
 | 27694 | Changes to the interpreter interface | 
 | 27695 | ------------------------------------ | 
 | 27696 |  | 
 | 27697 | The interpretation of $PYTHONPATH in the environment is different: it | 
 | 27698 | is inserted in front of the default path instead of overriding it | 
 | 27699 |  | 
 | 27700 |  | 
 | 27701 | Changes to existing built-in functions and methods | 
 | 27702 | -------------------------------------------------- | 
 | 27703 |  | 
 | 27704 | List objects now support an optional argument to their sort() method, | 
 | 27705 | which is a comparison function similar to qsort(3) in C | 
 | 27706 |  | 
 | 27707 | File objects now have a method fileno(), used by the new select module | 
 | 27708 | (see below) | 
 | 27709 |  | 
 | 27710 |  | 
 | 27711 | New built-in function | 
 | 27712 | --------------------- | 
 | 27713 |  | 
 | 27714 | coerce(x, y): take two numbers and return a tuple containing them | 
 | 27715 | both converted to a common type | 
 | 27716 |  | 
 | 27717 |  | 
 | 27718 | Changes to built-in modules | 
 | 27719 | --------------------------- | 
 | 27720 |  | 
 | 27721 | sys: fixed core dumps in settrace() and setprofile() | 
 | 27722 |  | 
 | 27723 | socket: added socket methods setsockopt() and getsockopt(); and | 
 | 27724 | fileno(), used by the new select module (see below) | 
 | 27725 |  | 
 | 27726 | stdwin: added fileno() == connectionnumber(), in support of new module | 
 | 27727 | select (see below) | 
 | 27728 |  | 
 | 27729 | posix: added get{eg,eu,g,u}id(); waitpid() is now a separate function. | 
 | 27730 |  | 
 | 27731 | gl: added qgetfd() | 
 | 27732 |  | 
 | 27733 | fl: added several new functions, fixed several obscure bugs, adapted | 
 | 27734 | to FORMS 2.1 | 
 | 27735 |  | 
 | 27736 |  | 
 | 27737 | Changes to standard modules | 
 | 27738 | --------------------------- | 
 | 27739 |  | 
 | 27740 | posixpath: changed implementation of ismount() | 
 | 27741 |  | 
 | 27742 | string: atoi() no longer mistakes leading zero for octal number | 
 | 27743 |  | 
 | 27744 | ... | 
 | 27745 |  | 
 | 27746 |  | 
 | 27747 | New built-in modules | 
 | 27748 | -------------------- | 
 | 27749 |  | 
 | 27750 | Modules marked "dynamic only" are not configured at compile time but | 
 | 27751 | can be loaded dynamically.  You need to turn on the DL or DLD option in | 
 | 27752 | the Makefile for support dynamic loading of modules (this requires | 
 | 27753 | external code). | 
 | 27754 |  | 
 | 27755 | select: interfaces to the BSD select() system call | 
 | 27756 |  | 
 | 27757 | dbm: interfaces to the (new) dbm library (dynamic only) | 
 | 27758 |  | 
 | 27759 | nis: interfaces to some NIS functions (aka yellow pages) | 
 | 27760 |  | 
 | 27761 | thread: limited form of multiple threads (sgi only) | 
 | 27762 |  | 
 | 27763 | audioop: operations useful for audio programs, e.g. u-LAW and ADPCM | 
 | 27764 | coding (dynamic only) | 
 | 27765 |  | 
 | 27766 | cd: interface to Indigo SCSI CDROM player audio library (sgi only) | 
 | 27767 |  | 
 | 27768 | jpeg: read files in JPEG format (dynamic only, sgi only; needs | 
 | 27769 | external code) | 
 | 27770 |  | 
 | 27771 | imgfile: read SGI image files (dynamic only, sgi only) | 
 | 27772 |  | 
 | 27773 | sunaudiodev: interface to sun's /dev/audio (dynamic only, sun only) | 
 | 27774 |  | 
 | 27775 | sv: interface to Indigo video library (sgi only) | 
 | 27776 |  | 
 | 27777 | pc: a minimal set of MS-DOS interfaces (MS-DOS only) | 
 | 27778 |  | 
 | 27779 | rotor: encryption, by Lance Ellinghouse (dynamic only) | 
 | 27780 |  | 
 | 27781 |  | 
 | 27782 | New standard modules | 
 | 27783 | -------------------- | 
 | 27784 |  | 
 | 27785 | Not all these modules are documented.  Read the source: | 
 | 27786 | lib/<modulename>.py.  Sometimes a file lib/<modulename>.doc contains | 
 | 27787 | additional documentation. | 
 | 27788 |  | 
 | 27789 | imghdr: recognizes image file headers | 
 | 27790 |  | 
 | 27791 | sndhdr: recognizes sound file headers | 
 | 27792 |  | 
 | 27793 | profile: print run-time statistics of Python code | 
 | 27794 |  | 
 | 27795 | readcd, cdplayer: companion modules for built-in module cd (sgi only) | 
 | 27796 |  | 
 | 27797 | emacs: interface to Emacs using py-connect.el (see below). | 
 | 27798 |  | 
 | 27799 | SOCKET: symbolic constant definitions for socket options | 
 | 27800 |  | 
 | 27801 | SUNAUDIODEV: symbolic constant definitions for sunaudiodef (sun only) | 
 | 27802 |  | 
 | 27803 | SV: symbolic constat definitions for sv (sgi only) | 
 | 27804 |  | 
 | 27805 | CD: symbolic constat definitions for cd (sgi only) | 
 | 27806 |  | 
 | 27807 |  | 
 | 27808 | New demos | 
 | 27809 | --------- | 
 | 27810 |  | 
 | 27811 | scripts/pp.py: execute Python as a filter with a Perl-like command | 
 | 27812 | line interface | 
 | 27813 |  | 
 | 27814 | classes/: examples using the new class features | 
 | 27815 |  | 
 | 27816 | threads/: examples using the new thread module | 
 | 27817 |  | 
 | 27818 | sgi/cd/: examples using the new cd module | 
 | 27819 |  | 
 | 27820 |  | 
 | 27821 | Changes to the documentation | 
 | 27822 | ---------------------------- | 
 | 27823 |  | 
 | 27824 | The last-minute syntax changes of release 0.9.6 are now reflected | 
 | 27825 | everywhere in the manuals | 
 | 27826 |  | 
 | 27827 | The reference manual has a new section (3.2) on implementing new kinds | 
 | 27828 | of numbers, sequences or mappings with user classes | 
 | 27829 |  | 
 | 27830 | Classes are now treated extensively in the tutorial (chapter 9) | 
 | 27831 |  | 
 | 27832 | Slightly restructured the system-dependent chapters of the library | 
 | 27833 | manual | 
 | 27834 |  | 
 | 27835 | The file misc/EXTENDING incorporates documentation for mkvalue() and | 
 | 27836 | a new section on error handling | 
 | 27837 |  | 
 | 27838 | The files misc/CLASSES and misc/ERRORS are no longer necessary | 
 | 27839 |  | 
 | 27840 | The doc/Makefile now creates PostScript files automatically | 
 | 27841 |  | 
 | 27842 |  | 
 | 27843 | Miscellaneous changes | 
 | 27844 | --------------------- | 
 | 27845 |  | 
 | 27846 | Incorporated Tim Peters' changes to python-mode.el, it's now version | 
 | 27847 | 1.06 | 
 | 27848 |  | 
 | 27849 | A python/Emacs bridge (provided by Terrence M. Brannon) lets a Python | 
 | 27850 | program running in an Emacs buffer execute Emacs lisp code.  The | 
 | 27851 | necessary Python code is in lib/emacs.py.  The Emacs code is | 
 | 27852 | misc/py-connect.el (it needs some external Emacs lisp code) | 
 | 27853 |  | 
 | 27854 |  | 
 | 27855 | Changes to the source code that affect C extension writers | 
 | 27856 | ---------------------------------------------------------- | 
 | 27857 |  | 
 | 27858 | New service function mkvalue() to construct a Python object from C | 
 | 27859 | values according to a "format" string a la getargs() | 
 | 27860 |  | 
 | 27861 | Most functions from pythonmain.c moved to new pythonrun.c which is | 
 | 27862 | in libpython.a.  This should make embedded versions of Python easier | 
 | 27863 |  | 
 | 27864 | ceval.h is split in eval.h (which needs compile.h and only declares | 
 | 27865 | eval_code) and ceval.h (which doesn't need compile.hand declares the | 
 | 27866 | rest) | 
 | 27867 |  | 
 | 27868 | ceval.h defines macros BGN_SAVE / END_SAVE for use with threads (to | 
 | 27869 | improve the parallellism of multi-threaded programs by letting other | 
 | 27870 | Python code run when a blocking system call or something similar is | 
 | 27871 | made) | 
 | 27872 |  | 
 | 27873 | In structmember.[ch], new member types BYTE, CHAR and unsigned | 
 | 27874 | variants have been added | 
 | 27875 |  | 
 | 27876 | New file xxmodule.c is a template for new extension modules. | 
 | 27877 |  | 
| Guido van Rossum | aa25386 | 1994-10-06 17:18:57 +0000 | [diff] [blame] | 27878 |  | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 27879 | ================================== | 
| Guido van Rossum | f2eac99 | 2000-09-04 17:24:24 +0000 | [diff] [blame] | 27880 | ==> Release 0.9.6 (6 Apr 1992) <== | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 27881 | ================================== | 
 | 27882 |  | 
 | 27883 | Misc news in 0.9.6: | 
 | 27884 | - Restructured the misc subdirectory | 
 | 27885 | - Reference manual completed, library manual much extended (with indexes!) | 
 | 27886 | - the GNU Readline library is now distributed standard with Python | 
 | 27887 | - the script "../demo/scripts/classfix.py" fixes Python modules using old | 
 | 27888 |   class syntax | 
 | 27889 | - Emacs python-mode.el (was python.el) vastly improved (thanks, Tim!) | 
 | 27890 | - Because of the GNU copyleft business I am not using the GNU regular | 
 | 27891 |   expression implementation but a free re-implementation by Tatu Ylonen | 
 | 27892 |   that recently appeared in comp.sources.misc (Bravo, Tatu!) | 
 | 27893 |  | 
 | 27894 | New features in 0.9.6: | 
 | 27895 | - stricter try stmt syntax: cannot mix except and finally clauses on 1 try | 
 | 27896 | - New module 'os' supplants modules 'mac' and 'posix' for most cases; | 
 | 27897 |   module 'path' is replaced by 'os.path' | 
 | 27898 | - os.path.split() return value differs from that of old path.split() | 
 | 27899 | - sys.exc_type, sys.exc_value, sys.exc_traceback are set to the exception | 
 | 27900 |   currently being handled | 
 | 27901 | - sys.last_type, sys.last_value, sys.last_traceback remember last unhandled | 
 | 27902 |   exception | 
 | 27903 | - New function string.expandtabs() expands tabs in a string | 
 | 27904 | - Added times() interface to posix (user & sys time of process & children) | 
 | 27905 | - Added uname() interface to posix (returns OS type, hostname, etc.) | 
 | 27906 | - New built-in function execfile() is like exec() but from a file | 
 | 27907 | - Functions exec() and eval() are less picky about whitespace/newlines | 
 | 27908 | - New built-in functions getattr() and setattr() access arbitrary attributes | 
 | 27909 | - More generic argument handling in built-in functions (see "./EXTENDING") | 
 | 27910 | - Dynamic loading of modules written in C or C++ (see "./DYNLOAD") | 
 | 27911 | - Division and modulo for long and plain integers with negative operands | 
 | 27912 |   have changed; a/b is now floor(float(a)/float(b)) and a%b is defined | 
 | 27913 |   as a-(a/b)*b.  So now the outcome of divmod(a,b) is the same as | 
 | 27914 |   (a/b, a%b) for integers.  For floats, % is also changed, but of course | 
 | 27915 |   / is unchanged, and divmod(x,y) does not yield (x/y, x%y)... | 
 | 27916 | - A function with explicit variable-length argument list can be declared | 
 | 27917 |   like this: def f(*args): ...; or even like this: def f(a, b, *rest): ... | 
 | 27918 | - Code tracing and profiling features have been added, and two source | 
 | 27919 |   code debuggers are provided in the library (pdb.py, tty-oriented, | 
 | 27920 |   and wdb, window-oriented); you can now step through Python programs! | 
 | 27921 |   See sys.settrace() and sys.setprofile(), and "../lib/pdb.doc" | 
 | 27922 | - '==' is now the only equality operator; "../demo/scripts/eqfix.py" is | 
 | 27923 |   a script that fixes old Python modules | 
 | 27924 | - Plain integer right shift now uses sign extension | 
 | 27925 | - Long integer shift/mask operations now simulate 2's complement | 
 | 27926 |   to give more useful results for negative operands | 
 | 27927 | - Changed/added range checks for long/plain integer shifts | 
 | 27928 | - Options found after "-c command" are now passed to the command in sys.argv | 
 | 27929 |   (note subtle incompatiblity with "python -c command -- -options"!) | 
 | 27930 | - Module stdwin is better protected against touching objects after they've | 
 | 27931 |   been closed; menus can now also be closed explicitly | 
 | 27932 | - Stdwin now uses its own exception (stdwin.error) | 
 | 27933 |  | 
 | 27934 | New features in 0.9.5 (released as Macintosh application only, 2 Jan 1992): | 
 | 27935 | - dictionary objects can now be compared properly; e.g., {}=={} is true | 
 | 27936 | - new exception SystemExit causes termination if not caught; | 
 | 27937 |   it is raised by sys.exit() so that 'finally' clauses can clean up, | 
 | 27938 |   and it may even be caught.  It does work interactively! | 
 | 27939 | - new module "regex" implements GNU Emacs style regular expressions; | 
 | 27940 |   module "regexp" is rewritten in Python for backward compatibility | 
 | 27941 | - formal parameter lists may contain trailing commas | 
 | 27942 |  | 
 | 27943 | Bugs fixed in 0.9.6: | 
 | 27944 | - assigning to or deleting a list item with a negative index dumped core | 
 | 27945 | - divmod(-10L,5L) returned (-3L, 5L) instead of (-2L, 0L) | 
 | 27946 |  | 
 | 27947 | Bugs fixed in 0.9.5: | 
 | 27948 | - masking operations involving negative long integers gave wrong results | 
 | 27949 |  | 
 | 27950 |  | 
 | 27951 | =================================== | 
| Guido van Rossum | f2eac99 | 2000-09-04 17:24:24 +0000 | [diff] [blame] | 27952 | ==> Release 0.9.4 (24 Dec 1991) <== | 
| Guido van Rossum | a7925f1 | 1994-01-26 10:20:16 +0000 | [diff] [blame] | 27953 | =================================== | 
 | 27954 |  | 
 | 27955 | - new function argument handling (see below) | 
 | 27956 | - built-in apply(func, args) means func(args[0], args[1], ...) | 
 | 27957 | - new, more refined exceptions | 
 | 27958 | - new exception string values (NameError = 'NameError' etc.) | 
 | 27959 | - better checking for math exceptions | 
 | 27960 | - for sequences (string/tuple/list), x[-i] is now equivalent to x[len(x)-i] | 
 | 27961 | - fixed list assignment bug: "a[1:1] = a" now works correctly | 
 | 27962 | - new class syntax, without extraneous parentheses | 
 | 27963 | - new 'global' statement to assign global variables from within a function | 
 | 27964 |  | 
 | 27965 |  | 
 | 27966 | New class syntax | 
 | 27967 | ---------------- | 
 | 27968 |  | 
 | 27969 | You can now declare a base class as follows: | 
 | 27970 |  | 
 | 27971 | 	class B:			# Was: class B(): | 
 | 27972 | 		def some_method(self): ... | 
 | 27973 | 		... | 
 | 27974 |  | 
 | 27975 | and a derived class thusly: | 
 | 27976 |  | 
 | 27977 | 	class D(B):			# Was: class D() = B(): | 
 | 27978 | 		def another_method(self, arg): ... | 
 | 27979 |  | 
 | 27980 | Multiple inheritance looks like this: | 
 | 27981 |  | 
 | 27982 | 	class M(B, D):			# Was: class M() = B(), D(): | 
 | 27983 | 		def this_or_that_method(self, arg): ... | 
 | 27984 |  | 
 | 27985 | The old syntax is still accepted by Python 0.9.4, but will disappear | 
 | 27986 | in Python 1.0 (to be posted to comp.sources). | 
 | 27987 |  | 
 | 27988 |  | 
 | 27989 | New 'global' statement | 
 | 27990 | ---------------------- | 
 | 27991 |  | 
 | 27992 | Every now and then you have a global variable in a module that you | 
 | 27993 | want to change from within a function in that module -- say, a count | 
 | 27994 | of calls to a function, or an option flag, etc.  Until now this was | 
 | 27995 | not directly possible.  While several kludges are known that | 
 | 27996 | circumvent the problem, and often the need for a global variable can | 
 | 27997 | be avoided by rewriting the module as a class, this does not always | 
 | 27998 | lead to clearer code. | 
 | 27999 |  | 
 | 28000 | The 'global' statement solves this dilemma.  Its occurrence in a | 
 | 28001 | function body means that, for the duration of that function, the | 
 | 28002 | names listed there refer to global variables.  For instance: | 
 | 28003 |  | 
 | 28004 | 	total = 0.0 | 
 | 28005 | 	count = 0 | 
 | 28006 |  | 
 | 28007 | 	def add_to_total(amount): | 
 | 28008 | 		global total, count | 
 | 28009 | 		total = total + amount | 
 | 28010 | 		count = count + 1 | 
 | 28011 |  | 
 | 28012 | 'global' must be repeated in each function where it is needed.  The | 
 | 28013 | names listed in a 'global' statement must not be used in the function | 
 | 28014 | before the statement is reached. | 
 | 28015 |  | 
 | 28016 | Remember that you don't need to use 'global' if you only want to *use* | 
 | 28017 | a global variable in a function; nor do you need ot for assignments to | 
 | 28018 | parts of global variables (e.g., list or dictionary items or | 
 | 28019 | attributes of class instances).  This has not changed; in fact | 
 | 28020 | assignment to part of a global variable was the standard workaround. | 
 | 28021 |  | 
 | 28022 |  | 
 | 28023 | New exceptions | 
 | 28024 | -------------- | 
 | 28025 |  | 
 | 28026 | Several new exceptions have been defined, to distinguish more clearly | 
 | 28027 | between different types of errors. | 
 | 28028 |  | 
 | 28029 | name			meaning					was | 
 | 28030 |  | 
 | 28031 | AttributeError		reference to non-existing attribute	NameError | 
 | 28032 | IOError			unexpected I/O error			RuntimeError | 
 | 28033 | ImportError		import of non-existing module or name	NameError | 
 | 28034 | IndexError		invalid string, tuple or list index	RuntimeError | 
 | 28035 | KeyError		key not in dictionary			RuntimeError | 
 | 28036 | OverflowError		numeric overflow			RuntimeError | 
 | 28037 | SyntaxError		invalid syntax				RuntimeError | 
 | 28038 | ValueError		invalid argument value			RuntimeError | 
 | 28039 | ZeroDivisionError	division by zero			RuntimeError | 
 | 28040 |  | 
 | 28041 | The string value of each exception is now its name -- this makes it | 
 | 28042 | easier to experimentally find out which operations raise which | 
 | 28043 | exceptions; e.g.: | 
 | 28044 |  | 
 | 28045 | 	>>> KeyboardInterrupt | 
 | 28046 | 	'KeyboardInterrupt' | 
 | 28047 | 	>>> | 
 | 28048 |  | 
 | 28049 |  | 
 | 28050 | New argument passing semantics | 
 | 28051 | ------------------------------ | 
 | 28052 |  | 
 | 28053 | Off-line discussions with Steve Majewski and Daniel LaLiberte have | 
 | 28054 | convinced me that Python's parameter mechanism could be changed in a | 
 | 28055 | way that made both of them happy (I hope), kept me happy, fixed a | 
 | 28056 | number of outstanding problems, and, given some backward compatibility | 
 | 28057 | provisions, would only break a very small amount of existing code -- | 
 | 28058 | probably all mine anyway.  In fact I suspect that most Python users | 
 | 28059 | will hardly notice the difference.  And yet it has cost me at least | 
 | 28060 | one sleepless night to decide to make the change... | 
 | 28061 |  | 
 | 28062 | Philosophically, the change is quite radical (to me, anyway): a | 
 | 28063 | function is no longer called with either zero or one argument, which | 
 | 28064 | is a tuple if there appear to be more arguments.  Every function now | 
 | 28065 | has an argument list containing 0, 1 or more arguments.  This list is | 
 | 28066 | always implemented as a tuple, and it is a (run-time) error if a | 
 | 28067 | function is called with a different number of arguments than expected. | 
 | 28068 |  | 
 | 28069 | What's the difference? you may ask.  The answer is, very little unless | 
 | 28070 | you want to write variadic functions -- functions that may be called | 
 | 28071 | with a variable number of arguments.  Formerly, you could write a | 
 | 28072 | function that accepted one or more arguments with little trouble, but | 
 | 28073 | writing a function that could be called with either 0 or 1 argument | 
 | 28074 | (or more) was next to impossible.  This is now a piece of cake: you | 
 | 28075 | can simply declare an argument that receives the entire argument | 
 | 28076 | tuple, and check its length -- it will be of size 0 if there are no | 
 | 28077 | arguments. | 
 | 28078 |  | 
 | 28079 | Another anomaly of the old system was the way multi-argument methods | 
 | 28080 | (in classes) had to be declared, e.g.: | 
 | 28081 |  | 
 | 28082 | 	class Point(): | 
 | 28083 | 		def init(self, (x, y, color)): ... | 
 | 28084 | 		def setcolor(self, color): ... | 
 | 28085 | 		dev moveto(self, (x, y)): ... | 
 | 28086 | 		def draw(self): ... | 
 | 28087 |  | 
 | 28088 | Using the new scheme there is no need to enclose the method arguments | 
 | 28089 | in an extra set of parentheses, so the above class could become: | 
 | 28090 |  | 
 | 28091 | 	class Point: | 
 | 28092 | 		def init(self, x, y, color): ... | 
 | 28093 | 		def setcolor(self, color): ... | 
 | 28094 | 		dev moveto(self, x, y): ... | 
 | 28095 | 		def draw(self): ... | 
 | 28096 |  | 
 | 28097 | That is, the equivalence rule between methods and functions has | 
 | 28098 | changed so that now p.moveto(x,y) is equivalent to Point.moveto(p,x,y) | 
 | 28099 | while formerly it was equivalent to Point.moveto(p,(x,y)). | 
 | 28100 |  | 
 | 28101 | A special backward compatibility rule makes that the old version also | 
 | 28102 | still works: whenever a function with exactly two arguments (at the top | 
 | 28103 | level) is called with more than two arguments, the second and further | 
 | 28104 | arguments are packed into a tuple and passed as the second argument. | 
 | 28105 | This rule is invoked independently of whether the function is actually a | 
 | 28106 | method, so there is a slight chance that some erroneous calls of | 
 | 28107 | functions expecting two arguments with more than that number of | 
 | 28108 | arguments go undetected at first -- when the function tries to use the | 
 | 28109 | second argument it may find it is a tuple instead of what was expected. | 
 | 28110 | Note that this rule will be removed from future versions of the | 
 | 28111 | language; it is a backward compatibility provision *only*. | 
 | 28112 |  | 
 | 28113 | Two other rules and a new built-in function handle conversion between | 
 | 28114 | tuples and argument lists: | 
 | 28115 |  | 
 | 28116 | Rule (a): when a function with more than one argument is called with a | 
 | 28117 | single argument that is a tuple of the right size, the tuple's items | 
 | 28118 | are used as arguments. | 
 | 28119 |  | 
 | 28120 | Rule (b): when a function with exactly one argument receives no | 
 | 28121 | arguments or more than one, that one argument will receive a tuple | 
 | 28122 | containing the arguments (the tuple will be empty if there were no | 
 | 28123 | arguments). | 
 | 28124 |  | 
 | 28125 |  | 
 | 28126 | A new built-in function, apply(), was added to support functions that | 
 | 28127 | need to call other functions with a constructed argument list.  The call | 
 | 28128 |  | 
 | 28129 | 	apply(function, tuple) | 
 | 28130 |  | 
 | 28131 | is equivalent to | 
 | 28132 |  | 
 | 28133 | 	function(tuple[0], tuple[1], ..., tuple[len(tuple)-1]) | 
 | 28134 |  | 
 | 28135 |  | 
 | 28136 | While no new argument syntax was added in this phase, it would now be | 
 | 28137 | quite sensible to add explicit syntax to Python for default argument | 
 | 28138 | values (as in C++ or Modula-3), or a "rest" argument to receive the | 
 | 28139 | remaining arguments of a variable-length argument list. | 
 | 28140 |  | 
 | 28141 |  | 
 | 28142 | ======================================================== | 
 | 28143 | ==> Release 0.9.3 (never made available outside CWI) <== | 
 | 28144 | ======================================================== | 
 | 28145 |  | 
 | 28146 | - string sys.version shows current version (also printed on interactive entry) | 
 | 28147 | - more detailed exceptions, e.g., IOError, ZeroDivisionError, etc. | 
 | 28148 | - 'global' statement to declare module-global variables assigned in functions. | 
 | 28149 | - new class declaration syntax: class C(Base1, Base2, ...): suite | 
 | 28150 |   (the old syntax is still accepted -- be sure to convert your classes now!) | 
 | 28151 | - C shifting and masking operators: << >> ~ & ^ | (for ints and longs). | 
 | 28152 | - C comparison operators: == != (the old = and <> remain valid). | 
 | 28153 | - floating point numbers may now start with a period (e.g., .14). | 
 | 28154 | - definition of integer division tightened (always truncates towards zero). | 
 | 28155 | - new builtins hex(x), oct(x) return hex/octal string from (long) integer. | 
 | 28156 | - new list method l.count(x) returns the number of occurrences of x in l. | 
 | 28157 | - new SGI module: al (Indigo and 4D/35 audio library). | 
 | 28158 | - the FORMS interface (modules fl and FL) now uses FORMS 2.0 | 
 | 28159 | - module gl: added lrect{read,write}, rectzoom and pixmode; | 
 | 28160 |   added (non-GL) functions (un)packrect. | 
 | 28161 | - new socket method: s.allowbroadcast(flag). | 
 | 28162 | - many objects support __dict__, __methods__ or __members__. | 
 | 28163 | - dir() lists anything that has __dict__. | 
 | 28164 | - class attributes are no longer read-only. | 
 | 28165 | - classes support __bases__, instances support __class__ (and __dict__). | 
 | 28166 | - divmod() now also works for floats. | 
 | 28167 | - fixed obscure bug in eval('1            '). | 
 | 28168 |  | 
 | 28169 |  | 
 | 28170 | =================================== | 
 | 28171 | ==> Release 0.9.2 (Autumn 1991) <== | 
 | 28172 | =================================== | 
 | 28173 |  | 
 | 28174 | Highlights | 
 | 28175 | ---------- | 
 | 28176 |  | 
 | 28177 | - tutorial now (almost) complete; library reference reorganized | 
 | 28178 | - new syntax: continue statement; semicolons; dictionary constructors; | 
 | 28179 |   restrictions on blank lines in source files removed | 
 | 28180 | - dramatically improved module load time through precompiled modules | 
 | 28181 | - arbitrary precision integers: compute 2 to the power 1000 and more... | 
 | 28182 | - arithmetic operators now accept mixed type operands, e.g., 3.14/4 | 
 | 28183 | - more operations on list: remove, index, reverse; repetition | 
 | 28184 | - improved/new file operations: readlines, seek, tell, flush, ... | 
 | 28185 | - process management added to the posix module: fork/exec/wait/kill etc. | 
 | 28186 | - BSD socket operations (with example servers and clients!) | 
 | 28187 | - many new STDWIN features (color, fonts, polygons, ...) | 
 | 28188 | - new SGI modules: font manager and FORMS library interface | 
 | 28189 |  | 
 | 28190 |  | 
 | 28191 | Extended list of changes in 0.9.2 | 
 | 28192 | --------------------------------- | 
 | 28193 |  | 
 | 28194 | Here is a summary of the most important user-visible changes in 0.9.2, | 
 | 28195 | in somewhat arbitrary order.  Changes in later versions are listed in | 
 | 28196 | the "highlights" section above. | 
 | 28197 |  | 
 | 28198 |  | 
 | 28199 | 1. Changes to the interpreter proper | 
 | 28200 |  | 
 | 28201 | - Simple statements can now be separated by semicolons. | 
 | 28202 |   If you write "if t: s1; s2", both s1 and s2 are executed | 
 | 28203 |   conditionally. | 
 | 28204 | - The 'continue' statement was added, with semantics as in C. | 
 | 28205 | - Dictionary displays are now allowed on input: {key: value, ...}. | 
 | 28206 | - Blank lines and lines bearing only a comment no longer need to | 
 | 28207 |   be indented properly.  (A completely empty line still ends a multi- | 
 | 28208 |   line statement interactively.) | 
 | 28209 | - Mixed arithmetic is supported, 1 compares equal to 1.0, etc. | 
 | 28210 | - Option "-c command" to execute statements from the command line | 
 | 28211 | - Compiled versions of modules are cached in ".pyc" files, giving a | 
 | 28212 |   dramatic improvement of start-up time | 
 | 28213 | - Other, smaller speed improvements, e.g., extracting characters from | 
 | 28214 |   strings, looking up single-character keys, and looking up global | 
 | 28215 |   variables | 
 | 28216 | - Interrupting a print operation raises KeyboardInterrupt instead of | 
 | 28217 |   only cancelling the print operation | 
 | 28218 | - Fixed various portability problems (it now passes gcc with only | 
 | 28219 |   warnings -- more Standard C compatibility will be provided in later | 
 | 28220 |   versions) | 
 | 28221 | - Source is prepared for porting to MS-DOS | 
 | 28222 | - Numeric constants are now checked for overflow (this requires | 
 | 28223 |   standard-conforming strtol() and strtod() functions; a correct | 
 | 28224 |   strtol() implementation is provided, but the strtod() provided | 
 | 28225 |   relies on atof() for everything, including error checking | 
 | 28226 |  | 
 | 28227 |  | 
 | 28228 | 2. Changes to the built-in types, functions and modules | 
 | 28229 |  | 
 | 28230 | - New module socket: interface to BSD socket primitives | 
 | 28231 | - New modules pwd and grp: access the UNIX password and group databases | 
 | 28232 | - (SGI only:) New module "fm" interfaces to the SGI IRIX Font Manager | 
 | 28233 | - (SGI only:) New module "fl" interfaces to Mark Overmars' FORMS library | 
 | 28234 | - New numeric type: long integer, for unlimited precision | 
 | 28235 | 	- integer constants suffixed with 'L' or 'l' are long integers | 
 | 28236 | 	- new built-in function long(x) converts int or float to long | 
 | 28237 | 	- int() and float() now also convert from long integers | 
 | 28238 | - New built-in function: | 
 | 28239 | 	- pow(x, y) returns x to the power y | 
 | 28240 | - New operation and methods for lists: | 
 | 28241 | 	- l*n returns a new list consisting of n concatenated copies of l | 
 | 28242 | 	- l.remove(x) removes the first occurrence of the value x from l | 
 | 28243 | 	- l.index(x) returns the index of the first occurrence of x in l | 
 | 28244 | 	- l.reverse() reverses l in place | 
 | 28245 | - New operation for tuples: | 
 | 28246 | 	- t*n returns a tuple consisting of n concatenated copies of t | 
 | 28247 | - Improved file handling: | 
 | 28248 | 	- f.readline() no longer restricts the line length, is faster, | 
 | 28249 | 	  and isn't confused by null bytes; same for raw_input() | 
 | 28250 | 	- f.read() without arguments reads the entire (rest of the) file | 
 | 28251 | 	- mixing of print and sys.stdout.write() has different effect | 
 | 28252 | - New methods for files: | 
 | 28253 | 	- f.readlines() returns a list containing the lines of the file, | 
 | 28254 | 	  as read with f.readline() | 
 | 28255 | 	- f.flush(), f.tell(), f.seek() call their stdio counterparts | 
 | 28256 | 	- f.isatty() tests for "tty-ness" | 
 | 28257 | - New posix functions: | 
 | 28258 | 	- _exit(), exec(), fork(), getpid(), getppid(), kill(), wait() | 
 | 28259 | 	- popen() returns a file object connected to a pipe | 
 | 28260 | 	- utime() replaces utimes() (the latter is not a POSIX name) | 
 | 28261 | - New stdwin features, including: | 
 | 28262 | 	- font handling | 
 | 28263 | 	- color drawing | 
 | 28264 | 	- scroll bars made optional | 
 | 28265 | 	- polygons | 
 | 28266 | 	- filled and xor shapes | 
 | 28267 | 	- text editing objects now have a 'settext' method | 
 | 28268 |  | 
 | 28269 |  | 
 | 28270 | 3. Changes to the standard library | 
 | 28271 |  | 
 | 28272 | - Name change: the functions path.cat and macpath.cat are now called | 
 | 28273 |   path.join and macpath.join | 
 | 28274 | - Added new modules: formatter, mutex, persist, sched, mainloop | 
 | 28275 | - Added some modules and functionality to the "widget set" (which is | 
 | 28276 |   still under development, so please bear with me): | 
 | 28277 | 	DirList, FormSplit, TextEdit, WindowSched | 
 | 28278 | - Fixed module testall to work non-interactively | 
 | 28279 | - Module string: | 
 | 28280 | 	- added functions join() and joinfields() | 
 | 28281 | 	- fixed center() to work correct and make it "transitive" | 
 | 28282 | - Obsolete modules were removed: util, minmax | 
 | 28283 | - Some modules were moved to the demo directory | 
 | 28284 |  | 
 | 28285 |  | 
 | 28286 | 4. Changes to the demonstration programs | 
 | 28287 |  | 
 | 28288 | - Added new useful scipts: byteyears, eptags, fact, from, lfact, | 
 | 28289 |   objgraph, pdeps, pi, primes, ptags, which | 
 | 28290 | - Added a bunch of socket demos | 
 | 28291 | - Doubled the speed of ptags | 
 | 28292 | - Added new stdwin demos: microedit, miniedit | 
 | 28293 | - Added a windowing interface to the Python interpreter: python (most | 
 | 28294 |   useful on the Mac) | 
 | 28295 | - Added a browser for Emacs info files: demo/stdwin/ibrowse | 
 | 28296 |   (yes, I plan to put all STDWIN and Python documentation in texinfo | 
 | 28297 |   form in the future) | 
 | 28298 |  | 
 | 28299 |  | 
 | 28300 | 5. Other changes to the distribution | 
 | 28301 |  | 
 | 28302 | - An Emacs Lisp file "python.el" is provided to facilitate editing | 
 | 28303 |   Python programs in GNU Emacs (slightly improved since posted to | 
 | 28304 |   gnu.emacs.sources) | 
 | 28305 | - Some info on writing an extension in C is provided | 
 | 28306 | - Some info on building Python on non-UNIX platforms is provided | 
 | 28307 |  | 
 | 28308 |  | 
 | 28309 | ===================================== | 
 | 28310 | ==> Release 0.9.1 (February 1991) <== | 
 | 28311 | ===================================== | 
 | 28312 |  | 
 | 28313 | - Micro changes only | 
 | 28314 | - Added file "patchlevel.h" | 
 | 28315 |  | 
 | 28316 |  | 
 | 28317 | ===================================== | 
 | 28318 | ==> Release 0.9.0 (February 1991) <== | 
 | 28319 | ===================================== | 
 | 28320 |  | 
 | 28321 | Original posting to alt.sources. |