Changeset 388 for python/vendor/current/Misc/NEWS
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Misc/NEWS
r2 r388 1 +++++++++++2 1 Python News 3 2 +++++++++++ 4 3 5 (editors: check NEWS.help for information about editing NEWS using ReST.) 6 7 What's New in Python 2.6.5? 4 Whats' New in Python 2.7.6? 8 5 =========================== 9 6 10 *Release date: 2010-03-18* 11 12 13 What's New in Python 2.6.5 rc 2? 14 ================================ 15 16 *Release date: 2010-03-09* 7 *Release date: 2013-11-10* 8 9 Library 10 ------- 11 12 - Issue #19435: Fix directory traversal attack on CGIHttpRequestHandler. 13 14 IDLE 15 ---- 16 17 - Issue #19426: Fixed the opening of Python source file with specified encoding. 18 19 Tests 20 ----- 21 22 - Issue #19457: Fixed xmlcharrefreplace tests on wide build when tests are 23 loaded from .py[co] files. 24 25 Build 26 ----- 27 28 - Issue #15663: Revert OS X installer built-in Tcl/Tk support for 2.7.6. 29 Some third-party projects, such as Matplotlib and PIL/Pillow, 30 depended on being able to build with Tcl and Tk frameworks in 31 /Library/Frameworks. 32 33 34 What's New in Python 2.7.6 release candidate 1? 35 =============================================== 36 37 *Release date: 2013-10-26* 17 38 18 39 Core and Builtins 19 40 ----------------- 20 41 21 - Issue #8089: a OS X framework build with --with-universal-archs=3-way|intel 22 had no way to select a 32-bit executable. 23 24 - Issue #8084: fixes build issues on OSX 10.6 when targetting OSX 10.4. 42 - Issue #18603: Ensure that PyOS_mystricmp and PyOS_mystrnicmp are in the 43 Python executable and not removed by the linker's optimizer. 44 45 - Issue #19279: UTF-7 decoder no more produces illegal unicode strings. 46 47 - Issue #18739: Fix an inconsistency between math.log(n) and math.log(long(n)); 48 the results could be off from one another by a ulp or two. 49 50 - Issue #13461: Fix a crash in the "replace" error handler on 64-bit platforms. 51 Patch by Yogesh Chaudhari. 52 53 - Issue #15866: The xmlcharrefreplace error handler no more produces two XML 54 entities for a non-BMP character on narrow build. 55 56 - Issue #18184: PyUnicode_FromFormat() and PyUnicode_FromFormatV() now raise 57 OverflowError when an argument of %c format is out of range. 58 59 - Issue #18137: Detect integer overflow on precision in float.__format__() 60 and complex.__format__(). 61 62 - Issue #18038: SyntaxError raised during compilation sources with illegal 63 encoding now always contains an encoding name. 64 65 - Issue #18019: Fix crash in the repr of dictionaries containing their own 66 views. 67 68 - Issue #18427: str.replace could crash the interpreter with huge strings. 25 69 26 70 Library 27 71 ------- 28 72 29 - Reverting the changes made in r78432. Discussed in the tracker issue #7540. 30 31 - Issue #8107: Fixed test_distutils so it doesn't crash when the source 32 directory cannot be found. 73 - Issue #19393: Fix symtable.symtable function to not be confused when there are 74 functions or classes named "top". 75 76 - Issue #19327: Fixed the working of regular expressions with too big charset. 77 78 - Issue #19350: Increasing the test coverage of macurl2path. Patch by Colin 79 Williams. 80 81 - Issue #19352: Fix unittest discovery when a module can be reached 82 through several paths (e.g. under Debian/Ubuntu with virtualenv). 83 84 - Issue #15207: Fix mimetypes to read from correct part of Windows registry 85 Original patch by Dave Chambers 86 87 - Issue #8964: fix platform._sys_version to handle IronPython 2.6+. 88 Patch by Martin Matusiak. 89 90 - Issue #16038: CVE-2013-1752: ftplib: Limit amount of data read by 91 limiting the call to readline(). Original patch by MichaÅ 92 JastrzÄbski and Giampaolo Rodola. 93 94 - Issue #19276: Fixed the wave module on 64-bit big-endian platforms. 95 96 - Issue #18458: Prevent crashes with newer versions of libedit. Its readline 97 emulation has changed from 0-based indexing to 1-based like gnu readline. 98 Original patch by Ronald Oussoren. 99 100 - Issue #18919: If the close() method of a writer in the sunau or wave module 101 failed, second invocation of close() and destructor no more raise an 102 exception. Second invocation of close() on sunau writer now has no effects. 103 The aifc module now accepts lower case of names of the 'ulaw' and 'alaw' 104 codecs. 105 106 - Issue #19131: The aifc module now correctly reads and writes sampwidth of 107 compressed streams. 108 109 - Issue #19158: a rare race in BoundedSemaphore could allow .release() too 110 often. 111 112 - Issue #18037: 2to3 now escapes '\u' and '\U' in native strings. 113 114 - Issue #19137: The pprint module now correctly formats empty set and frozenset 115 and instances of set and frozenset subclasses. 116 117 - Issue #16040: CVE-2013-1752: nntplib: Limit maximum line lengths to 2048 to 118 prevent readline() calls from consuming too much memory. Patch by Jyrki 119 Pulliainen. 120 121 - Issue #12641: Avoid passing "-mno-cygwin" to the mingw32 compiler, except 122 when necessary. Patch by Oscar Benjamin. 123 124 - Properly initialize all fields of a SSL object after allocation. 125 126 - Issue #4366: Fix building extensions on all platforms when --enable-shared 127 is used. 128 129 - Issue #18950: Fix miscellaneous bugs in the sunau module. 130 Au_read.readframes() now updates current file position and reads correct 131 number of frames from multichannel stream. Au_write.writeframesraw() now 132 correctly updates current file position. Au_read and Au_write now correctly 133 work with file object if start file position is not a zero. 134 135 - Issue #18050: Fixed an incompatibility of the re module with Python 2.7.3 136 and older binaries. 137 138 - Issue #19037: The mailbox module now makes all changes to maildir files 139 before moving them into place, to avoid race conditions with other programs 140 that may be accessing the maildir directory. 141 142 - Issue #14984: On POSIX systems, when netrc is called without a filename 143 argument (and therefore is reading the user's $HOME/.netrc file), it now 144 enforces the same security rules as typical ftp clients: the .netrc file must 145 be owned by the user that owns the process and must not be readable by any 146 other user. 147 148 - Issue #17324: Fix http.server's request handling case on trailing '/'. Patch 149 contributed by Vajrasky Kok. 150 151 - Issue #19018: The heapq.merge() function no longer suppresses IndexError 152 in the underlying iterables. 153 154 - Issue #18784: The uuid module no more attempts to load libc via ctypes.CDLL, 155 if all necessary functions are already found in libuuid. 156 Patch by Evgeny Sologubov. 157 158 - Issue #14971: unittest test discovery no longer gets confused when a function 159 has a different __name__ than its name in the TestCase class dictionary. 160 161 - Issue #18672: Fixed format specifiers for Py_ssize_t in debugging output in 162 the _sre module. 163 164 - Issue #18830: inspect.getclasstree() no more produces duplicated entries even 165 when input list contains duplicates. 166 167 - Issue #18909: Fix _tkinter.tkapp.interpaddr() on Windows 64-bit, don't cast 168 64-bit pointer to long (32 bits). 169 170 - Issue #18876: The FileIO.mode attribute now better reflects the actual mode 171 under which the file was opened. Patch by Erik Bray. 172 173 - Issue #18851: Avoid a double close of subprocess pipes when the child 174 process fails starting. 175 176 - Issue #18418: After fork(), reinit all threads states, not only active ones. 177 Patch by A. Jesse Jiryu Davis. 178 179 - Issue #11973: Fix a problem in kevent. The flags and fflags fields are now 180 properly handled as unsigned. 181 182 - Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6. 183 184 - Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj 185 argument. 186 187 - Issue #17119: Fixed integer overflows when processing large Unicode strings 188 and tuples in the tkinter module. 189 190 - Issue #15233: Python now guarantees that callables registered with the atexit 191 module will be called in a deterministic order. 192 193 - Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork. 194 A pthread_atfork() parent handler is used to seed the PRNG with pid, time 195 and some stack data. 196 197 - Issue #8865: Concurrent invocation of select.poll.poll() now raises a 198 RuntimeError exception. Patch by Christian Schubert. 199 200 - Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit 201 platforms. Patch by Yogesh Chaudhari. 202 203 - Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of 204 OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function. 205 206 - Issue #18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok. 207 208 - Issue #18178: Fix ctypes on BSD. dlmalloc.c was compiled twice which broke 209 malloc weak symbols. 210 211 - Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes 212 inside subjectAltName correctly. Formerly the module has used OpenSSL's 213 GENERAL_NAME_print() function to get the string represention of ASN.1 214 strings for ``rfc822Name`` (email), ``dNSName`` (DNS) and 215 ``uniformResourceIdentifier`` (URI). 216 217 - Issue #18756: Improve error reporting in os.urandom() when the failure 218 is due to something else than /dev/urandom not existing (for example, 219 exhausting the file descriptor limit). 220 221 - Fix tkinter regression introduced by the security fix in issue #16248. 222 223 - Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get 224 docstrings and ValueError messages. Patch by Zhongyue Luo 225 226 - Issue #17998: Fix an internal error in regular expression engine. 227 228 - Issue #17557: Fix os.getgroups() to work with the modified behavior of 229 getgroups(2) on OS X 10.8. Original patch by Mateusz Lenik. 230 231 - Issue #18455: multiprocessing should not retry connect() with same socket. 232 233 - Issue #18513: Fix behaviour of cmath.rect w.r.t. signed zeros on OS X 10.8 + 234 gcc. 235 236 - Issue #18101: Tcl.split() now process Unicode strings nested in a tuple as it 237 do with byte strings. 238 239 - Issue #18347: ElementTree's html serializer now preserves the case of 240 closing tags. 241 242 - Issue #17261: Ensure multiprocessing's proxies use proper address. 243 244 - Issue #17097: Make multiprocessing ignore EINTR. 245 246 - Issue #18155: The csv module now correctly handles csv files that use 247 a delimiter character that has a special meaning in regexes, instead of 248 throwing an exception. 249 250 - Issue #18135: ssl.SSLSocket.write() now raises an OverflowError if the input 251 string in longer than 2 gigabytes. The ssl module does not support partial 252 write. 253 254 - Issue #18167: cgi.FieldStorage no longer fails to handle multipart/form-data 255 when \r\n appears at end of 65535 bytes without other newlines. 256 257 - Issue #17403: urllib.parse.robotparser normalizes the urls before adding to 258 ruleline. This helps in handling certain types invalid urls in a conservative 259 manner. Patch contributed by Mher Movsisyan. 260 261 - Implement inequality on weakref.WeakSet. 262 263 - Issue #17981: Closed socket on error in SysLogHandler. 264 265 - Issue #18015: Fix unpickling of 2.7.3 and 2.7.4 namedtuples. 266 267 - Issue #17754: Make ctypes.util.find_library() independent of the locale. 268 269 - Fix typos in the multiprocessing module. 270 271 - Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X 272 with port None or "0" and flags AI_NUMERICSERV. 273 274 - Issue #18080: When building a C extension module on OS X, if the compiler 275 is overriden with the CC environment variable, use the new compiler as 276 the default for linking if LDSHARED is not also overriden. This restores 277 Distutils behavior introduced in 2.7.3 and inadvertently dropped in 2.7.4. 278 279 - Issue #18071: C extension module builds on OS X could fail with TypeError 280 if the Xcode command line tools were not installed. 281 282 - Issue #18113: Fixed a refcount leak in the curses.panel module's 283 set_userptr() method. Reported by Atsuo Ishimoto. 284 285 - Issue #18849: Fixed a Windows-specific tempfile bug where collision with an 286 existing directory caused mkstemp and related APIs to fail instead of 287 retrying. Report and fix by Vlad Shcherbina. 288 289 - Issue #19400: Prevent extension module build failures with Xcode 5 on OS X 290 10.8+ when using a universal Python that included a PPC architecture, 291 such as with a python.org 32-bit-only binary installer. 292 293 Tools/Demos 294 ----------- 295 296 - Issue #18873: 2to3 and the findnocoding.py script now detect Python source 297 code encoding only in comment lines. 298 299 - Issue #18817: Fix a resource warning in Lib/aifc.py demo. 300 301 - Issue #18439: Make patchcheck work on Windows for ACKS, NEWS. 302 303 - Issue #18448: Fix a typo in Demo/newmetaclasses/Eiffel.py. 304 305 - Issue #12990: The "Python Launcher" on OSX could not launch python scripts 306 that have paths that include wide characters. 307 308 Build 309 ----- 310 311 - Issue #16067: Add description into MSI file to replace installer's temporary name. 312 313 - Issue #18256: Compilation fix for recent AIX releases. Patch by 314 David Edelsohn. 315 316 - Issue #18098: The deprecated OS X Build Applet.app fails to build on 317 OS X 10.8 systems because the Apple-deprecated QuickDraw headers have 318 been removed from Xcode 4. Skip building it in this case. 319 320 - Issue #1584: Provide options to override default search paths for 321 Tcl and Tk when building _tkinter. 322 323 - Issue #15663: Tcl/Tk 8.5.15 is now included with the OS X 10.6+ 324 64-bit/32-bit installer for 10.6+. It is no longer necessary 325 to install a third-party version of Tcl/Tk 8.5 to work around the 326 problems in the Apple-supplied Tcl/Tk 8.5 shipped in OS X 10.6 327 and later releases. 328 329 - Issue #19019: Change the OS X installer build script to use CFLAGS instead 330 of OPT for special build options. By setting OPT, some compiler-specific 331 options like -fwrapv were overridden and thus not used, which could result 332 in broken interpreters when building with clang. 333 334 IDLE 335 ---- 336 337 - Issue #18873: IDLE now detects Python source code encoding only in comment 338 lines. 339 340 - Issue #18988: The "Tab" key now works when a word is already autocompleted. 341 342 - Issue #18489: Add tests for SearchEngine. Original patch by Phil Webster. 343 344 - Issue #18429: Format / Format Paragraph, now works when comment blocks 345 are selected. As with text blocks, this works best when the selection 346 only includes complete lines. 347 348 - Issue #18226: Add docstrings and unittests for FormatParagraph.py. 349 Original patches by Todd Rovito and Phil Webster. 350 351 - Issue #18279: Format - Strip trailing whitespace no longer marks a file as 352 changed when it has not been changed. This fix followed the addition of a 353 test file originally written by Phil Webster (the issue's main goal). 354 355 - Issue #18539: Calltips now work for float default arguments. 356 357 - Issue #7136: In the Idle File menu, "New Window" is renamed "New File". 358 Patch by Tal Einat, Roget Serwy, and Todd Rovito. 359 360 - Issue #8515: Set __file__ when run file in IDLE. 361 Initial patch by Bruce Frederiksen. 362 363 - Issue #5492: Avoid traceback when exiting IDLE caused by a race condition. 364 365 - Issue #17511: Keep IDLE find dialog open after clicking "Find Next". 366 Original patch by Sarah K. 367 368 - Issue #15392: Create a unittest framework for IDLE. 369 Preliminary patch by Rajagopalasarma Jayakrishnan 370 See Lib/idlelib/idle_test/README.txt for how to run Idle tests. 371 372 - Issue #14146: Highlight source line while debugging on Windows. 373 374 - Issue #17532: Always include Options menu for IDLE on OS X. 375 Patch by Guilherme Simões. 376 377 Tests 378 ----- 379 380 - Issue #18919: Added tests for the sunau module. Unified and extended tests 381 for audio modules: aifc, sunau and wave. 382 383 - Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as 384 possible, since "localhost" goes through a DNS lookup under recent Windows 385 versions. 386 387 - Issue #18357: add tests for dictview set difference. 388 Patch by Fraser Tweedale. 389 390 - Issue #11185: Fix test_wait4 under AIX. Patch by Sébastien Sablé. 391 392 - Issue #18094: test_uuid no more reports skipped tests as passed. 393 394 - Issue #11995: test_pydoc doesn't import all sys.path modules anymore. 395 396 Documentation 397 ------------- 398 399 - Issue #18758: Fixed and improved cross-references. 400 401 - Issue #18718: datetime documentation contradictory on leap second support. 402 403 - Issue #17701: Improving strftime documentation. 404 405 - Issue #17844: Refactor a documentation of Python specific encodings. 406 Add links to encoders and decoders for binary-to-binary codecs. 407 408 409 What's New in Python 2.7.5? 410 =========================== 411 412 *Release date: 2013-05-12* 413 414 Core and Builtins 415 ----------------- 416 417 - Issue #15535: Fixed regression in the pickling of named tuples by 418 removing the __dict__ property introduced in 2.7.4. 419 420 - Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, 421 such as was shipped with Centos 5 and Mac OS X 10.4. 422 423 - Issue #17703: Fix a regression where an illegal use of Py_DECREF() after 424 interpreter finalization can cause a crash. 425 426 - Issue #16447: Fixed potential segmentation fault when setting __name__ on a 427 class. 428 429 - Issue #17610: Don't rely on non-standard behavior of the C qsort() function. 430 431 Library 432 ------- 433 434 - Issue #17979: Fixed the re module in build with --disable-unicode. 435 436 - Issue #17606: Fixed support of encoded byte strings in the XMLGenerator 437 .characters() and ignorableWhitespace() methods. Original patch by Sebastian 438 Ortiz Vasquez. 439 440 - Issue #16601: Restarting iteration over tarfile no more continues from where 441 it left off. Patch by Michael Birtwell. 442 443 - Issue 16584: in filecomp._cmp, catch IOError as well as os.error. 444 Patch by Till Maas. 445 446 - Issue #17926: Fix dbm.__contains__ on 64-bit big-endian machines. 447 448 - Issue #19267: Fix support of multibyte encoding (ex: UTF-16) in the logging 449 module. 450 451 - Issue #17918: When using SSLSocket.accept(), if the SSL handshake failed 452 on the new socket, the socket would linger indefinitely. Thanks to 453 Peter Saveliev for reporting. 454 455 - Issue #17289: The readline module now plays nicer with external modules 456 or applications changing the rl_completer_word_break_characters global 457 variable. Initial patch by Bradley Froehle. 458 459 - Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit 460 platforms. Patch by Federico Schwindt. 461 462 - Issue #14173: Avoid crashing when reading a signal handler during 463 interpreter shutdown. 464 465 - Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions. 466 467 - Issue #17192: Restore the patch for Issue #10309 which was ommitted 468 in 2.7.4 when updating the bundled version of libffi used by ctypes. 469 470 - Issue #17843: Removed test data file that was triggering false-positive virus 471 warnings with certain antivirus software. 472 473 - Issue #17353: Plistlib emitted empty data tags with deeply nested datastructures 474 475 - Issue #11714: Use 'with' statements to assure a Semaphore releases a 476 condition variable. Original patch by Thomas Rachel. 477 478 - Issue #17795: Reverted backwards-incompatible change in SysLogHandler with 479 Unix domain sockets. 480 481 - Issue #17555: Fix ForkAwareThreadLock so that size of after fork 482 registry does not grow exponentially with generation of process. 483 484 - Issue #17710: Fix cPickle raising a SystemError on bogus input. 485 486 - Issue #17341: Include the invalid name in the error messages from re about 487 invalid group names. 488 489 - Issue #17016: Get rid of possible pointer wraparounds and integer overflows 490 in the re module. Patch by Nickolai Zeldovich. 491 492 - Issue #17536: Add to webbrowser's browser list: xdg-open, gvfs-open, 493 www-browser, x-www-browser, chromium browsers, iceweasel, iceape. 494 495 - Issue #17656: Fix extraction of zip files with unicode member paths. 496 497 - Issue #17666: Fix reading gzip files with an extra field. 498 499 - Issue #13150, #17512: sysconfig no longer parses the Makefile and config.h 500 files when imported, instead doing it at build time. This makes importing 501 sysconfig faster and reduces Python startup time by 20%. 502 503 - Issue #13163: Rename operands in smtplib.SMTP._get_socket to correct names; 504 fixes otherwise misleading output in tracebacks and when when debug is on. 505 506 - Issue #17526: fix an IndexError raised while passing code without filename to 507 inspect.findsource(). Initial patch by Tyler Doyle. 508 509 Build 510 ----- 511 512 - Issue #17547: In configure, explicitly pass -Wformat for the benefit for GCC 513 4.8. 514 515 - Issue #17682: Add the _io module to Modules/Setup.dist (commented out). 516 517 - Issue #17086: Search the include and library directories provided by the 518 compiler. 519 520 Tests 521 ----- 522 523 - Issue #17928: Fix test_structmembers on 64-bit big-endian machines. 524 525 - Issue #17883: Fix buildbot testing of Tkinter on Windows. 526 Patch by Zachary Ware. 527 528 - Issue #7855: Add tests for ctypes/winreg for issues found in IronPython. 529 Initial patch by Dino Viehland. 530 531 - Issue #17712: Fix test_gdb failures on Ubuntu 13.04. 532 533 - Issue #17065: Use process-unique key for winreg tests to avoid failures if 534 test is run multiple times in parallel (eg: on a buildbot host). 535 536 IDLE 537 ---- 538 539 - Issue #17838: Allow sys.stdin to be reassigned. 540 541 - Issue #14735: Update IDLE docs to omit "Control-z on Windows". 542 543 - Issue #17585: Fixed IDLE regression. Now closes when using exit() or quit(). 544 545 - Issue #17657: Show full Tk version in IDLE's about dialog. 546 Patch by Todd Rovito. 547 548 - Issue #17613: Prevent traceback when removing syntax colorizer in IDLE. 549 550 - Issue #1207589: Backwards-compatibility patch for right-click menu in IDLE. 551 552 - Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box. 553 554 - Issue #14254: IDLE now handles readline correctly across shell restarts. 555 556 - Issue #17614: IDLE no longer raises exception when quickly closing a file. 557 558 - Issue #6698: IDLE now opens just an editor window when configured to do so. 559 560 - Issue #8900: Using keyboard shortcuts in IDLE to open a file no longer 561 raises an exception. 562 563 - Issue #6649: Fixed missing exit status in IDLE. Patch by Guilherme Polo. 564 565 Documentation 566 ------------- 567 568 - Issue #15940: Specify effect of locale on time functions. 569 570 - Issue #6696: add documentation for the Profile objects, and improve 571 profile/cProfile docs. Patch by Tom Pinckney. 572 573 574 What's New in Python 2.7.4? 575 =========================== 576 577 *Release date: 2013-04-06* 578 579 Build 580 ----- 581 582 - Issue #17550: Fix the --enable-profiling configure switch. 583 584 Core and Builtins 585 ----------------- 586 587 - Issue #15801 (again): With string % formatting, relax the type check for a 588 mapping such that any type with a __getitem__ can be used on the right hand 589 side. 590 591 IDLE 592 ---- 593 594 - Issue #17625: In IDLE, close the replace dialog after it is used. 595 596 Tests 597 ----- 598 599 - Issue #17835: Fix test_io when the default OS pipe buffer size is larger 600 than one million bytes. 601 602 - Issue #17531: Fix tests that thought group and user ids were always the int 603 type. Also, always allow -1 as a valid group and user id. 604 605 - Issue #17533: Fix test_xpickle with older versions of Python 2.5. 606 607 Documentation 608 ------------- 609 610 - Issue 17538: Document XML vulnerabilties 611 612 613 What's New in Python 2.7.4 release candidate 1 614 ============================================== 615 616 *Release date: 2013-03-23* 617 618 Core and Builtins 619 ----------------- 620 621 - Issue #10211: Buffer objects expose the new buffer interface internally 622 623 - Issue #16445: Fixed potential segmentation fault when deleting an exception 624 message. 625 626 - Issue #17275: Corrected class name in init error messages of the C version of 627 BufferedWriter and BufferedRandom. 628 629 - Issue #7963: Fixed misleading error message that issued when object is 630 called without arguments. 631 632 - Issue #5308: Raise ValueError when marshalling too large object (a sequence 633 with size >= 2**31), instead of producing illegal marshal data. 634 635 - Issue #17043: The unicode-internal decoder no longer read past the end of 636 input buffer. 637 638 - Issue #16979: Fix error handling bugs in the unicode-escape-decode decoder. 639 640 - Issue #10156: In the interpreter's initialization phase, unicode globals 641 are now initialized dynamically as needed. 642 643 - Issue #16975: Fix error handling bug in the escape-decode decoder. 644 645 - Issue #14850: Now a charmap decoder treats U+FFFE as "undefined mapping" 646 in any mapping, not only in a Unicode string. 647 648 - Issue #11461: Fix the incremental UTF-16 decoder. Original patch by 649 Amaury Forgeot d'Arc. 650 651 - Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB. 652 653 - Issue #15516: Fix a bug in PyString_FromFormat where it failed to properly 654 ignore errors from a __int__() method. 655 656 - Issue #16839: Fix a segfault when calling unicode() on a classic class early 657 in interpreter initialization. 658 659 - Issue #16761: Calling ``int()`` and ``long()`` with *base* argument only 660 now raises TypeError. 661 662 - Issue #16759: Support the full DWORD (unsigned long) range in Reg2Py 663 when retrieving a REG_DWORD value. This corrects functions like 664 winreg.QueryValueEx that may have been returning truncated values. 665 666 - Issue #14420: Support the full DWORD (unsigned long) range in Py2Reg 667 when passed a REG_DWORD value. Fixes ValueError in winreg.SetValueEx when 668 given a long. 669 670 - Issue #13863: Work around buggy 'fstat' implementation on Windows / NTFS that 671 lead to incorrect timestamps (off by one hour) being stored in .pyc files on 672 some systems. 673 674 - Issue #16602: When a weakref's target was part of a long deallocation 675 chain, the object could remain reachable through its weakref even though 676 its refcount had dropped to zero. 677 678 - Issue #9011: Fix hacky AST code that modified the CST when compiling 679 a negated numeric literal. 680 681 - Issue #16306: Fix multiple error messages when unknown command line 682 parameters where passed to the interpreter. Patch by Hieu Nguyen. 683 684 - Issue #15379: Fix passing of non-BMP characters as integers for the charmap 685 decoder (already working as unicode strings). Patch by Serhiy Storchaka. 686 687 - Issue #16453: Fix equality testing of dead weakref objects. 688 689 - Issue #9535: Fix pending signals that have been received but not yet 690 handled by Python to not persist after os.fork() in the child process. 691 692 - Issue #15001: fix segfault on "del sys.modules['__main__']". Patch by Victor 693 Stinner. 694 695 - Issue #5057: the peepholer no longer optimizes subscription on unicode 696 literals (e.g. u'foo'[0]) in order to produce compatible pyc files between 697 narrow and wide builds. 698 699 - Issue #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now 700 raises an error. 701 702 - Issue #14700: Fix buggy overflow checks for large width and precision 703 in string formatting operations. 704 705 - Issue #16345: Fix an infinite loop when ``fromkeys`` on a dict subclass 706 received a nonempty dict from the constructor. 707 708 - Issue #6074: Ensure cached bytecode files can always be updated by the 709 user that created them, even when the source file is read-only. 710 711 - Issue #14783: Improve int() and long() docstrings and switch docstrings for 712 unicode(), slice(), range(), and xrange() to use multi-line signatures. 713 714 - Issue #16030: Fix overflow bug in computing the `repr` of an xrange object 715 with large start, step or length. 716 717 - Issue #16029: Fix overflow bug occurring when pickling xranges with large 718 start, step or length. 719 720 - Issue #16037: Limit httplib's _read_status() function to work around broken 721 HTTP servers and reduce memory usage. It's actually a backport of a Python 722 3.2 fix. Thanks to Adrien Kunysz. 723 724 - Issue #16588: Silence unused-but-set warnings in Python/thread_pthread 725 726 - Issue #13992: The trashcan mechanism is now thread-safe. This eliminates 727 sporadic crashes in multi-thread programs when several long deallocator 728 chains ran concurrently and involved subclasses of built-in container 729 types. 730 731 - Issue #15801: Make sure mappings passed to '%' formatting are actually 732 subscriptable. 733 734 - Issue #15604: Update uses of PyObject_IsTrue() to check for and handle 735 errors correctly. Patch by Serhiy Storchaka. 736 737 - Issue #14579: Fix error handling bug in the utf-16 decoder. Patch by 738 Serhiy Storchaka. 739 740 - Issue #15368: An issue that caused bytecode generation to be 741 non-deterministic when using randomized hashing (-R) has been fixed. 742 743 - Issue #15897: zipimport.c doesn't check return value of fseek(). 744 Patch by Felipe Cruz. 745 746 - Issue #16369: Global PyTypeObjects not initialized with PyType_Ready(...). 747 748 - Issue #15033: Fix the exit status bug when modules invoked using -m switch, 749 return the proper failure return value (1). Patch contributed by Jeff Knupp. 750 751 - Issue #12268: File readline, readlines and read() methods no longer lose 752 data when an underlying read system call is interrupted. IOError is no 753 longer raised due to a read system call returning EINTR from within these 754 methods. 755 756 - Issue #13512: Create ~/.pypirc securely (CVE-2011-4944). Initial patch by 757 Philip Jenvey, tested by Mageia and Debian. 758 759 - Issue #7719: Make distutils ignore ``.nfs*`` files instead of choking later 760 on. Initial patch by SilentGhost and Jeff Ramnani. 761 762 - Issue #10053: Don't close FDs when FileIO.__init__ fails. Loosely based on 763 the work by Hirokazu Yamamoto. 764 765 - Issue #14775: Fix a potential quadratic dict build-up due to the garbage 766 collector repeatedly trying to untrack dicts. 767 768 - Issue #14494: Fix __future__.py and its documentation to note that 769 absolute imports are the default behavior in 3.0 instead of 2.7. 770 Patch by Sven Marnach. 771 772 - Issue #14761: Fix potential leak on an error case in the import machinery. 773 774 - Issue #14699: Fix calling the classmethod descriptor directly. 775 776 - Issue #11603 (again): Setting __repr__ to __str__ now raises a RuntimeError 777 when repr() or str() is called on such an object. 778 779 - Issue #14658: Fix binding a special method to a builtin implementation of a 780 special method with a different name. 781 782 - Issue #14612: Fix jumping around with blocks by setting f_lineno. 783 784 - Issue #13889: Check and (if necessary) set FPU control word before calling 785 any of the dtoa.c string <-> float conversion functions, on MSVC builds of 786 Python. This fixes issues when embedding Python in a Delphi app. 787 788 - Issue #14505: Fix file descriptor leak when deallocating file objects 789 created with PyFile_FromString(). 790 791 - Issue #14474: Save and restore exception state in thread.start_new_thread() 792 while writing error message if the thread leaves a unhandled exception. 793 794 - Issue #13019: Fix potential reference leaks in bytearray.extend(). Patch 795 by Suman Saha. 796 797 - Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as 798 the module name that was not interned. 799 800 - Issue #14331: Use significantly less stack space when importing modules by 801 allocating path buffers on the heap instead of the stack. 802 803 - Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not 804 passed strings. Also fix segfaults in the __getattribute__ and __setattr__ 805 methods of old-style classes. 806 807 - Issue #14161: fix the __repr__ of file objects to escape the file name. 808 809 - Issue #1469629: Allow cycles through an object's __dict__ slot to be 810 collected. (For example if ``x.__dict__ is x``). 811 812 - Issue #13521: dict.setdefault() now does only one lookup for the given key, 813 making it "atomic" for many purposes. Patch by Filip GruszczyÅski. 814 815 - Issue #1602133: on Mac OS X a shared library build (``--enable-shared``) 816 now fills the ``os.environ`` variable correctly. 817 818 - Issue #10538: When using the "s*" code with PyArg_ParseTuple() to fill a 819 Py_buffer structure with data from an object supporting only the old 820 PyBuffer interface, a reference to the source objects is now properly added 821 to the Py_buffer.obj member. 822 823 Library 824 ------- 825 826 - Issue #12718: Fix interaction with winpdb overriding __import__ by setting 827 importer attribute on BaseConfigurator instance. 828 829 - Issue #17521: Corrected non-enabling of logger following two calls to 830 fileConfig(). 831 832 - Issue #17508: Corrected MemoryHandler configuration in dictConfig() where 833 the target handler wasn't configured first. 834 835 - Issue #10212: cStringIO and struct.unpack support new buffer objects. 836 837 - Issue #12098: multiprocessing on Windows now starts child processes 838 using the same sys.flags as the current process. Initial patch by 839 Sergey Mezentsev. 840 841 - Issue #8862: Fixed curses cleanup when getkey is interrputed by a signal. 842 843 - Issue #9090: When a socket with a timeout fails with EWOULDBLOCK or EAGAIN, 844 retry the select() loop instead of bailing out. This is because select() 845 can incorrectly report a socket as ready for reading (for example, if it 846 received some data with an invalid checksum). 847 848 - Issue #1285086: Get rid of the refcounting hack and speed up urllib.unquote(). 849 850 - Issue #17368: Fix an off-by-one error in the Python JSON decoder that caused 851 a failure while decoding empty object literals when object_pairs_hook was 852 specified. 853 854 - Issue #17278: Fix a crash in heapq.heappush() and heapq.heappop() when 855 the list is being resized concurrently. 856 857 - Issue #17018: Make Process.join() retry if os.waitpid() fails with EINTR. 858 859 - Issue #14720: sqlite3: Convert datetime microseconds correctly. 860 Patch by Lowe Thiderman. 861 862 - Issue #17225: JSON decoder now counts columns in the first line starting 863 with 1, as in other lines. 864 865 - Issue #7842: backported fix for py_compile.compile() syntax error handling. 866 867 - Issue #13153: Tkinter functions now raise TclError instead of ValueError when 868 a unicode argument contains non-BMP character. 869 870 - Issue #9669: Protect re against infinite loops on zero-width matching in 871 non-greedy repeat. Patch by Matthew Barnett. 872 873 - Issue #13169: The maximal repetition number in a regular expression has been 874 increased from 65534 to 2147483647 (on 32-bit platform) or 4294967294 (on 875 64-bit). 876 877 - Issue #16743: Fix mmap overflow check on 32 bit Windows. 878 879 - Issue #11311: StringIO.readline(0) now returns an empty string as all other 880 file-like objects. 881 882 - Issue #16800: tempfile.gettempdir() no longer left temporary files when 883 the disk is full. Original patch by Amir Szekely. 884 885 - Issue #13555: cPickle now supports files larger than 2 GiB. 886 887 - Issue #17052: unittest discovery should use self.testLoader. 888 889 - Issue #4591: Uid and gid values larger than 2**31 are supported now. 890 891 - Issue #17141: random.vonmisesvariate() no more hangs for large kappas. 892 893 - Issue #17149: Fix random.vonmisesvariate to always return results in 894 the range [0, 2*math.pi]. 895 896 - Issue #1470548: XMLGenerator now works with UTF-16 and UTF-32 encodings. 897 898 - Issue #6975: os.path.realpath() now correctly resolves multiple nested 899 symlinks on POSIX platforms. 900 901 - Issue #7358: cStringIO.StringIO now supports writing to and reading from 902 a stream larger than 2 GiB on 64-bit systems. 903 904 - Issue #10355: In SpooledTemporaryFile class mode and name properties and 905 xreadlines method now work for unrolled files. encoding and newlines 906 properties now removed as they have no sense and always produced 907 AttributeError. 908 909 - Issue #16686: Fixed a lot of bugs in audioop module. Fixed crashes in 910 avgpp(), maxpp() and ratecv(). Fixed an integer overflow in add(), bias(), 911 and ratecv(). reverse(), lin2lin() and ratecv() no more lose precision for 912 32-bit samples. max() and rms() no more returns a negative result and 913 various other functions now work correctly with 32-bit sample -0x80000000. 914 915 - Issue #17073: Fix some integer overflows in sqlite3 module. 916 917 - Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple 918 parses nested mutating sequence. 919 920 - Issue #5289: Fix ctypes.util.find_library on Solaris. 921 922 - Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlying 923 stream or a decoder produces data of an unexpected type (i.e. when 924 io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec). 925 926 - Issue #13994: Add compatibility alias in distutils.ccompiler for 927 distutils.sysconfig.customize_compiler. 928 929 - Issue #15633: httplib.HTTPResponse is now mark closed when the server 930 sends less than the advertised Content-Length. 931 932 - Issue #15881: Fixed atexit hook in multiprocessing. 933 934 - Issue #14340: Upgrade the embedded expat library to version 2.1.0. 935 936 - Issue #11159: SAX parser now supports unicode file names. 937 938 - Issue #6972: The zipfile module no longer overwrites files outside of 939 its destination path when extracting malicious zip files. 940 941 - Issue #17049: Localized calendar methods now return unicode if a locale 942 includes an encoding and the result string contains month or weekday (was 943 regression from Python 2.6). 944 945 - Issue #4844: ZipFile now raises BadZipfile when opens a ZIP file with an 946 incomplete "End of Central Directory" record. Original patch by Guilherme 947 Polo and Alan McIntyre. 948 949 - Issue #15505: `unittest.installHandler` no longer assumes SIGINT handler is 950 set to a callable object. 951 952 - Issue #17051: Fix a memory leak in os.path.isdir() on Windows. Patch by 953 Robert Xiao. 954 955 - Issue #13454: Fix a crash when deleting an iterator created by itertools.tee() 956 if all other iterators were very advanced before. 957 958 - Issue #16992: On Windows in signal.set_wakeup_fd, validate the file 959 descriptor argument. 960 961 - Issue #15861: tkinter now correctly works with lists and tuples containing 962 strings with whitespaces, backslashes or unbalanced braces. 963 964 - Issue #10527: Use poll() instead of select() for multiprocessing pipes. 965 966 - Issue #9720: zipfile now writes correct local headers for files larger than 967 4 GiB. 968 969 - Issue #13899: \A, \Z, and \B now correctly match the A, Z, and B literals 970 when used inside character classes (e.g. '[\A]'). Patch by Matthew Barnett. 971 972 - Issue #16398: Optimize deque.rotate() so that it only moves pointers 973 and doesn't touch the underlying data with increfs and decrefs. 974 975 - Issue #15109: Fix regression in sqlite3's iterdump method where it would 976 die with an encoding error if the database contained string values 977 containing non-ASCII. (Regression was introduced by fix for 9750). 978 979 - Issue #15545: Fix regression in sqlite3's iterdump method where it was 980 failing if the connection used a row factory (such as sqlite3.Row) that 981 produced unsortable objects. (Regression was introduced by fix for 9750). 982 983 - Issue #16828: Fix error incorrectly raised by bz2.compress(''). Patch by 984 Martin Packman. 985 986 - Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy. 987 988 - Issue #10527: make multiprocessing use poll() instead of select() if available. 989 990 - Issue #16485: Now file descriptors are closed if file header patching failed 991 on closing an aifc file. 992 993 - Issue #12065: connect_ex() on an SSL socket now returns the original errno 994 when the socket's timeout expires (it used to return None). 995 996 - Issue #16713: Fix the parsing of tel url with params using urlparse module. 997 998 - Issue #16443: Add docstrings to regular expression match objects. 999 Patch by Anton Kasyanov. 1000 1001 - Issue #8853: Allow port to be of type long for socket.getaddrinfo(). 1002 1003 - Issue #16597: In buffered and text IO, call close() on the underlying stream 1004 if invoking flush() fails. 1005 1006 - Issue #15701: Fix HTTPError info method call to return the headers information. 1007 1008 - Issue #16646: ftplib.FTP.makeport() might lose socket error details. 1009 (patch by Serhiy Storchaka) 1010 1011 - Issue #16626: Fix infinite recursion in glob.glob() on Windows when the 1012 pattern contains a wildcard in the drive or UNC path. Patch by Serhiy 1013 Storchaka. 1014 1015 - Issue #16298: In HTTPResponse.read(), close the socket when there is no 1016 Content-Length and the incoming stream is finished. Patch by Eran 1017 Rundstein. 1018 1019 - Issue #16248: Disable code execution from the user's home directory by 1020 tkinter when the -E flag is passed to Python. Patch by Zachary Ware. 1021 1022 - Issue #16628: Fix a memory leak in ctypes.resize(). 1023 1024 - Issue #13614: Fix setup.py register failure with invalid rst in description. 1025 Patch by Julien Courteau and Pierre Paul Lefebvre. 1026 1027 - Issue #10182: The re module doesn't truncate indices to 32 bits anymore. 1028 Patch by Serhiy Storchaka. 1029 1030 - Issue #16573: In 2to3, treat enumerate() like a consuming call, so superfluous 1031 list() calls aren't added to filter(), map(), and zip() which are directly 1032 passed enumerate(). 1033 1034 - Issue #1160: Fix compiling large regular expressions on UCS2 builds. 1035 Patch by Serhiy Storchaka. 1036 1037 - Issue #14313: zipfile now raises NotImplementedError when the compression 1038 type is unknown. 1039 1040 - Issue #16408: Fix file descriptors not being closed in error conditions 1041 in the zipfile module. Patch by Serhiy Storchaka. 1042 1043 - Issue #16327: The subprocess module no longer leaks file descriptors 1044 used for stdin/stdout/stderr pipes to the child when fork() fails. 1045 1046 - Issue #14396: Handle the odd rare case of waitpid returning 0 when not 1047 expected in subprocess.Popen.wait(). 1048 1049 - Issue #16411: Fix a bug where zlib.decompressobj().flush() might try to access 1050 previously-freed memory. Patch by Serhiy Storchaka. 1051 1052 - Issue #16350: zlib.decompressobj().decompress() now accumulates data from 1053 successive calls after EOF in unused_data, instead of only saving the argument 1054 to the last call. decompressobj().flush() now correctly sets unused_data and 1055 unconsumed_tail. A bug in the handling of MemoryError when setting the 1056 unconsumed_tail attribute has also been fixed. Patch by Serhiy Storchaka. 1057 1058 - Issue #12759: sre_parse now raises a proper error when the name of the group 1059 is missing. Initial patch by Serhiy Storchaka. 1060 1061 - Issue #16152: fix tokenize to ignore whitespace at the end of the code when 1062 no newline is found. Patch by Ned Batchelder. 1063 1064 - Issue #16230: Fix a crash in select.select() when one the lists changes 1065 size while iterated on. Patch by Serhiy Storchaka. 1066 1067 - Issue #16228: Fix a crash in the json module where a list changes size 1068 while it is being encoded. Patch by Serhiy Storchaka. 1069 1070 - Issue #14897: Enhance error messages of struct.pack and 1071 struct.pack_into. Patch by Matti MÀki. 1072 1073 - Issue #12890: cgitb no longer prints spurious <p> tags in text 1074 mode when the logdir option is specified. 1075 1076 - Issue #14398: Fix size truncation and overflow bugs in the bz2 module. 1077 1078 - Issue #5148: Ignore 'U' in mode given to gzip.open() and gzip.GzipFile(). 1079 1080 - Issue #16220: wsgiref now always calls close() on an iterable response. 1081 Patch by Brent Tubbs. 1082 1083 - Issue #16461: Wave library should be able to deal with 4GB wav files, 1084 and sample rate of 44100 Hz. 1085 1086 - Issue #16176: Properly identify Windows 8 via platform.platform() 1087 1088 - Issue #15756: subprocess.poll() now properly handles errno.ECHILD to 1089 return a returncode of 0 when the child has already exited or cannot 1090 be waited on. 1091 1092 - Issue #12376: Pass on parameters in TextTestResult.__init__ super call 1093 1094 - Issue #15222: Insert blank line after each message in mbox mailboxes 1095 1096 - Issue #16013: Fix CSV Reader parsing issue with ending quote characters. 1097 Patch by Serhiy Storchaka. 1098 1099 - Issue #15421: fix an OverflowError in Calendar.itermonthdates() after 1100 datetime.MAXYEAR. Patch by Cédric Krier. 1101 1102 - Issue #15970: xml.etree.ElementTree now serializes correctly the empty HTML 1103 elements 'meta' and 'param'. 1104 1105 - Issue #15676: Now "mmap" check for empty files before doing the 1106 offset check. Patch by Steven Willis. 1107 1108 - Issue #15340: Fix importing the random module when /dev/urandom cannot 1109 be opened. This was a regression caused by the hash randomization patch. 1110 1111 - Issue #15841: The readable(), writable() and seekable() methods of 1112 io.BytesIO and io.StringIO objects now raise ValueError when the object has 1113 been closed. Patch by Alessandro Moura. 1114 1115 - Issue #16112: platform.architecture does not correctly escape argument to 1116 /usr/bin/file. Patch by David Benjamin. 1117 1118 - Issue #12776,#11839: call argparse type function (specified by add_argument) 1119 only once. Before, the type function was called twice in the case where the 1120 default was specified and the argument was given as well. This was 1121 especially problematic for the FileType type, as a default file would always 1122 be opened, even if a file argument was specified on the command line. 1123 1124 - Issue #15906: Fix a regression in argparse caused by the preceding change, 1125 when action='append', type='str' and default=[]. 1126 1127 - Issue #13370: Ensure that ctypes works on Mac OS X when Python is 1128 compiled using the clang compiler 1129 1130 - Issue #15544: Fix Decimal.__float__ to work with payload-carrying NaNs. 1131 1132 - Issue #15199: Fix JavaScript's default MIME type to application/javascript. 1133 Patch by Bohuslav Kabrda. 1134 1135 - Issue #15477: In cmath and math modules, add workaround for platforms whose 1136 system-supplied log1p function doesn't respect signs of zeros. 1137 1138 - Issue #11062: Fix adding a message from file to Babyl mailbox. 1139 1140 - Issue #15646: Prevent equivalent of a fork bomb when using 1141 multiprocessing on Windows without the "if __name__ == '__main__'" 1142 idiom. 1143 1144 - Issue #15567: Fix NameError when running threading._test 1145 1146 - Issue #15424: Add a __sizeof__ implementation for array objects. 1147 Patch by Ludwig HÀhne. 1148 1149 - Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() 1150 emulation code. Patch by Philipp Hagemeister. 1151 1152 - Issue #12288: Consider '0' and '0.0' as valid initialvalue 1153 for tkinter SimpleDialog. 1154 1155 - Issue #15489: Add a __sizeof__ implementation for BytesIO objects. 1156 Patch by Serhiy Storchaka. 1157 1158 - Issue #15469: Add a __sizeof__ implementation for deque objects. 1159 Patch by Serhiy Storchaka. 1160 1161 - Issue #15487: Add a __sizeof__ implementation for buffered I/O objects. 1162 Patch by Serhiy Storchaka. 1163 1164 - Issue #15512: Add a __sizeof__ implementation for parser. 1165 Patch by Serhiy Storchaka. 1166 1167 - Issue #15402: An issue in the struct module that caused sys.getsizeof to 1168 return incorrect results for struct.Struct instances has been fixed. 1169 Initial patch by Serhiy Storchaka. 1170 1171 - Issue #15232: when mangle_from is True, email.Generator now correctly mangles 1172 lines that start with 'From ' that occur in a MIME preamble or epilog. 1173 1174 - Issue #13922: argparse no longer incorrectly strips '--'s that appear 1175 after the first one. 1176 1177 - Issue #12353: argparse now correctly handles null argument values. 1178 1179 - Issue #6493: An issue in ctypes on Windows that caused structure bitfields 1180 of type ctypes.c_uint32 and width 32 to incorrectly be set has been fixed. 1181 1182 - Issue #14635: telnetlib will use poll() rather than select() when possible 1183 to avoid failing due to the select() file descriptor limit. 1184 1185 - Issue #15247: FileIO now raises an error when given a file descriptor 1186 pointing to a directory. 1187 1188 - Issue #14591: Fix bug in Random.jumpahead that could produce an invalid 1189 Mersenne Twister state on 64-bit machines. 1190 1191 - Issue #5346: Preserve permissions of mbox, MMDF and Babyl mailbox 1192 files on flush(). 1193 1194 - Issue #15219: Fix a reference leak when hashlib.new() is called with 1195 invalid parameters. 1196 1197 - Issue #9559: If messages were only added, a new file is no longer 1198 created and renamed over the old file when flush() is called on an 1199 mbox, MMDF or Babyl mailbox. 1200 1201 - Issue #14653: email.utils.mktime_tz() no longer relies on system 1202 mktime() when timezone offest is supplied. 1203 1204 - Issue #6056: Make multiprocessing use setblocking(True) on the 1205 sockets it uses. Original patch by J Derek Wilson. 1206 1207 - Issue #15101: Make pool finalizer avoid joining current thread. 1208 1209 - Issue #15054: A bug in tokenize.tokenize that caused string literals 1210 with 'b' and 'br' prefixes to be incorrectly tokenized has been fixed. 1211 Patch by Serhiy Storchaka. 1212 1213 - Issue #15036: Mailbox no longer throws an error if a flush is done 1214 between operations when removing or changing multiple items in mbox, 1215 MMDF, or Babyl mailboxes. 1216 1217 - Issue #10133: Make multiprocessing deallocate buffer if socket read 1218 fails. Patch by Hallvard B Furuseth. 1219 1220 - Issue #13854: Make multiprocessing properly handle non-integer 1221 non-string argument to SystemExit. 1222 1223 - Issue #12157: Make pool.map() empty iterables correctly. Initial 1224 patch by mouad. 1225 1226 - Issue #14036: Add an additional check to validate that port in urlparse does 1227 not go in illegal range and returns None. 1228 1229 - Issue #14888: Fix misbehaviour of the _md5 module when called on data 1230 larger than 2**32 bytes. 1231 1232 - Issue #15908: Fix misbehaviour of the sha1 module when called on data 1233 larger than 2**32 bytes. 1234 1235 - Issue #15910: Fix misbehaviour of _md5 and sha1 modules when "updating" 1236 on data larger than 2**32 bytes. 1237 1238 - Issue #14875: Use float('inf') instead of float('1e66666') in the json module. 1239 1240 - Issue #14572: Prevent build failures with pre-3.5.0 versions of 1241 sqlite3, such as was shipped with Centos 5 and Mac OS X 10.4. 1242 1243 - Issue #14426: Correct the Date format in Expires attribute of Set-Cookie 1244 Header in Cookie.py. 1245 1246 - Issue #14721: Send proper header, Content-length: 0 when the body is an empty 1247 string ''. Initial Patch contributed by Arve Knudsen. 1248 1249 - Issue #14072: Fix parsing of 'tel' URIs in urlparse by making the check for 1250 ports stricter. 1251 1252 - Issue #9374: Generic parsing of query and fragment portions of url for any 1253 scheme. Supported both by RFC3986 and RFC2396. 1254 1255 - Issue #14798: Fix the functions in pyclbr to raise an ImportError 1256 when the first part of a dotted name is not a package. Patch by 1257 Xavier de Gaye. 1258 1259 - Issue #14832: fixed the order of the argument references in the error 1260 message produced by unittest's assertItemsEqual. 1261 1262 - Issue #14829: Fix bisect issues under 64-bit Windows. 1263 1264 - Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when 1265 accessing the Tk clipboard. Modify clipboad_get() to first request type 1266 UTF8_STRING when no specific type is requested in an X11 windowing 1267 environment, falling back to the current default type STRING if that fails. 1268 Original patch by Thomas Kluyver. 1269 1270 - Issue #12541: Be lenient with quotes around Realm field with HTTP Basic 1271 Authentation in urllib2. 1272 1273 - Issue #14662: Prevent shutil failures on OS X when destination does not 1274 support chflag operations. Patch by Hynek Schlawack. 1275 1276 - Issue #14157: Fix time.strptime failing without a year on February 29th. 1277 Patch by Hynek Schlawack. 1278 1279 - Issue #14768: os.path.expanduser('~/a') doesn't works correctly when HOME is '/'. 1280 1281 - Issue #13183: Fix pdb skipping frames after hitting a breakpoint and running 1282 step. Patch by Xavier de Gaye. 1283 1284 - Issue #14664: It is now possible to use @unittest.skip{If,Unless} on a 1285 test class that doesn't inherit from TestCase (i.e. a mixin). 1286 1287 - Issue #14160: TarFile.extractfile() failed to resolve symbolic links when 1288 the links were not located in an archive subdirectory. 1289 1290 - Issue #14638: pydoc now treats non-string __name__ values as if they 1291 were missing, instead of raising an error. 1292 1293 - Issue #13684: Fix httplib tunnel issue of infinite loops for certain sites 1294 which send EOF without trailing \r\n. 1295 1296 - Issue #14308: Fix an exception when a "dummy" thread is in the threading 1297 module's active list after a fork(). 1298 1299 - Issue #14538: HTMLParser can now parse correctly start tags that contain 1300 a bare '/'. 1301 1302 - Issue #14452: SysLogHandler no longer inserts a UTF-8 BOM into the message. 1303 1304 - Issue #13496: Fix potential overflow in bisect.bisect algorithm when applied 1305 to a collection of size > sys.maxsize / 2. 1306 1307 - Issue #14399: zipfile now recognizes that the archive has been modified even 1308 if only the comment is changed. As a consequence of this fix, ZipFile is now 1309 a new style class. 1310 1311 - Issue #7978: SocketServer now restarts the select() call when EINTR is 1312 returned. This avoids crashing the server loop when a signal is received. 1313 Patch by Jerzy Kozera. 1314 1315 - Issue #10340: asyncore - properly handle EINVAL in dispatcher constructor on 1316 OSX; avoid to call handle_connect in case of a disconnected socket which 1317 was not meant to connect. 1318 1319 - Issue #12757: Fix the skipping of doctests when python is run with -OO so 1320 that it works in unittest's verbose mode as well as non-verbose mode. 1321 1322 - Issue #13694: asynchronous connect in asyncore.dispatcher does not set addr 1323 attribute. 1324 1325 - Issue #10484: Fix the CGIHTTPServer's PATH_INFO handling problem. 1326 1327 - Issue #11199: Fix the with urllib which hangs on particular ftp urls. 1328 1329 - Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under 1330 Windows when the child process has already exited. 1331 1332 - Issue #14195: An issue that caused weakref.WeakSet instances to incorrectly 1333 return True for a WeakSet instance 'a' in both 'a < a' and 'a > a' has been 1334 fixed. 1335 1336 - Issue #14159: Fix the len() of weak sets to return a better approximation 1337 when some objects are dead or dying. Moreover, the implementation is now 1338 O(1) rather than O(n). 1339 1340 - Issue #2945: Make the distutils upload command aware of bdist_rpm products. 1341 1342 - Issue #6884: Fix long-standing bugs with MANIFEST.in parsing in distutils 1343 on Windows. 1344 1345 - Issue #16441: Avoid excessive memory usage working with large gzip 1346 files using the gzip module. 1347 1348 - Issue #15782: Prevent compile errors of OS X Carbon modules _Fm, _Qd, and 1349 _Qdoffs when compiling with an SDK of 10.7 or later. The OS X APIs they 1350 wrap have long been deprecated and have now been removed with 10.7. 1351 These modules were already empty for 64-bit builds and have been removed 1352 in Python 3. 33 1353 34 1354 Extension Modules 35 1355 ----------------- 36 1356 37 - Issue #7670: sqlite3: Fixed crashes when operating on closed connections. 38 39 - Issue #8053: logic was inverted on which platforms to run a test on. 40 caused test_thread to fail on Windows. 41 42 43 What's New in Python 2.6.5 rc 1? 44 ================================ 45 46 *Release date: 2010-03-01* 1357 - Issue #17477: Update the bsddb module to pybsddb 5.3.0, supporting 1358 db-5.x, and dropping support for db-4.1 and db-4.2. 1359 1360 - Issue #17192: Update the ctypes module's libffi to v3.0.13. This 1361 specifically addresses a stack misalignment issue on x86 and issues on 1362 some more recent platforms. 1363 1364 - Issue #12268: The io module file object write methods no longer abort early 1365 when a write system calls is interrupted (EINTR). 1366 1367 - Fix the leak of a dict in the time module when used in an embedded 1368 interpreter that is repeatedly initialized and shutdown and reinitialized. 1369 1370 - Issue #12268: File readline, readlines and read or readall methods 1371 no longer lose data when an underlying read system call is interrupted 1372 within an io module object. IOError is no longer raised due to a read 1373 system call returning EINTR from within these methods. 1374 1375 - Issue #16012: Fix a regression in pyexpat. The parser's UseForeignDTD() 1376 method doesn't require an argument again. 1377 1378 - Issue #13590: OS X Xcode 4 - improve support for universal extension modules 1379 In particular, fix extension module build failures when trying to use 1380 32-bit-only installer Pythons on systems with Xcode 4 (currently 1381 OS X 10.8, 10.7, and optionally 10.6). 1382 * Backport 3.3.0 fixes to 2.7 branch (for release in 2.7.4) 1383 * Since Xcode 4 removes ppc support, extension module builds now 1384 check for ppc compiler support and by default remove ppc and 1385 ppc64 archs when they are not available. 1386 * Extension module builds now revert to using system installed 1387 headers and libs (/usr and /System/Library) if the SDK used 1388 to build the interpreter is not installed or has moved. 1389 * Try to avoid building extension modules with deprecated 1390 and problematic Apple llvm-gcc compiler. If original compiler 1391 is not available, use clang instead by default. 1392 1393 IDLE 1394 ---- 1395 1396 - IDLE was displaying spurious SystemExit tracebacks when running scripts 1397 that terminated by raising SystemExit (i.e. unittest and turtledemo). 1398 1399 - Issue #9290: In IDLE the sys.std* streams now implement io.TextIOBase 1400 interface and support all mandatory methods and properties. 1401 1402 - Issue #16829: IDLE printing no longer fails if there are spaces or other 1403 special characters in the file path. 1404 1405 - Issue #16819: IDLE method completion now correctly works for unicode literals. 1406 1407 - Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by 1408 Roger Serwy. 1409 1410 - Issue #1207589: Add Cut/Copy/Paste items to IDLE right click Context Menu 1411 Patch by Todd Rovito. 1412 1413 - Issue #13052: Fix IDLE crashing when replace string in Search/Replace dialog 1414 ended with '\'. Patch by Roger Serwy. 1415 1416 - Issue #9803: Don't close IDLE on saving if breakpoint is open. 1417 Patch by Roger Serwy. 1418 1419 - Issue #14958: Change IDLE systax highlighting to recognize all string and byte 1420 literals currently supported in Python 2.7. 1421 1422 - Issue #14962: Update text coloring in IDLE shell window after changing 1423 options. Patch by Roger Serwy. 1424 1425 - Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu. 1426 1427 - Issue #12510: Attempting to get invalid tooltip no longer closes IDLE. 1428 Original patch by Roger Serwy. 1429 1430 - Issue #10365: File open dialog now works instead of crashing 1431 even when parent window is closed. Patch by Roger Serwy. 1432 1433 - Issue #14876: Use user-selected font for highlight configuration. 1434 Patch by Roger Serwy. 1435 1436 - Issue #14409: IDLE now properly executes commands in the Shell window 1437 when it cannot read the normal config files on startup and 1438 has to use the built-in default key bindings. 1439 There was previously a bug in one of the defaults. 1440 1441 - Issue #3573: IDLE hangs when passing invalid command line args 1442 (directory(ies) instead of file(s)) (Patch by Guilherme Polo) 1443 1444 - Issue #5219: Prevent event handler cascade in IDLE. 1445 1446 Tests 1447 ----- 1448 1449 - Issue #16702: test_urllib2_localnet tests now correctly ignores proxies for 1450 localhost tests. 1451 1452 - Issue #13447: Add a test file to host regression tests for bugs in the 1453 scripts found in the Tools directory. 1454 1455 - Issue #11420: make test suite pass with -B/DONTWRITEBYTECODE set. 1456 Initial patch by Thomas Wouters. 1457 1458 - Issue #17299: Add test coverage for cPickle with file objects and general IO 1459 objects. Original patch by Aman Shah. 1460 1461 - Issue #11963: remove human verification from test_parser and test_subprocess. 1462 1463 - Issue #17249: convert a test in test_capi to use unittest and reap threads. 1464 1465 - We now run both test_email.py and test_email_renamed.py when running the 1466 test_email regression test. test_email_renamed contains some tests that 1467 test_email does not. 1468 1469 - Issue #17041: Fix testing when Python is configured with the 1470 --without-doc-strings option. 1471 1472 - Issue #15539: Added regression tests for Tools/scripts/pindent.py. 1473 1474 - Issue #15324: Fix regrtest parsing of --fromfile and --randomize options. 1475 1476 - Issue #16618: Add more regression tests for glob. 1477 Patch by Serhiy Storchaka. 1478 1479 - Issue #16664: Add regression tests for glob's behaviour concerning entries 1480 starting with a ".". Patch by Sebastian Kreft. 1481 1482 - Issue #15747: ZFS always returns EOPNOTSUPP when attempting to set the 1483 UF_IMMUTABLE flag (via either chflags or lchflags); refactor affected 1484 tests in test_posix.py to account for this. 1485 1486 - Issue #16549: Add tests for json.tools. Initial patch by Berker Peksag 1487 and Serhiy Storchaka. 1488 1489 - Issue #16559: Add more tests for the json module, including some from the 1490 official test suite at json.org. Patch by Serhiy Storchaka. 1491 1492 - Issue #16274: Fix test_asyncore on Solaris. Patch by Giampaolo Rodola'. 1493 1494 - Issue #15040: Close files in mailbox tests for PyPy compatibility. 1495 Original patch by Matti Picus. 1496 1497 - Issue #15802: Fix test logic in TestMaildir.test_create_tmp. Patch 1498 by Serhiy Storchaka. 1499 1500 - Issue #15765: Extend a previous fix to Solaris and OpenBSD for quirky 1501 getcwd() behaviour (issue #9185) to NetBSD as well. 1502 1503 - Issue #15615: Add some tests for the json module's handling of invalid 1504 input data. Patch by Kushal Das. 1505 1506 - Issue #15496: Add directory removal helpers for tests on Windows. 1507 Patch by Jeremy Kloth. 1508 1509 - Issue #15043: test_gdb is now skipped entirely if gdb security settings 1510 block loading of the gdb hooks 1511 1512 - Issue #14589: Update certificate chain for sha256.tbs-internet.com, fixing 1513 a test failure in test_ssl. 1514 1515 - Issue #16698: Skip posix test_getgroups when built with OS X 1516 deployment target prior to 10.6. 1517 1518 - Issue #17111: Prevent test_surrogates (test_fileio) failure on OS X 10.4. 1519 1520 Build 1521 ----- 1522 1523 - Issue #17425: Build against openssl 0.9.8y on Windows. 1524 1525 - Issue #16004: Add `make touch`. 1526 1527 - Issue #5033: Fix building of the sqlite3 extension module when the 1528 SQLite library version has "beta" in it. Patch by Andreas Pelme. 1529 1530 - Issue #17228: Fix building without pymalloc. 1531 1532 - Issue #17086: Backport the patches from the 3.3 branch to cross-build 1533 the package. 1534 1535 - Issue #3754: fix typo in pthread AC_CACHE_VAL. 1536 1537 - Issue #17029: Let h2py search the multiarch system include directory. 1538 1539 - Issue #16953: Fix socket module compilation on platforms with 1540 HAVE_BROKEN_POLL. Patch by Jeffrey Armstrong. 1541 1542 - Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host. 1543 1544 - Issue #15923: fix a mistake in asdl_c.py that resulted in a TypeError after 1545 2801bf875a24 (see #15801). 1546 1547 - Issue #11715: Fix multiarch detection without having Debian development 1548 tools (dpkg-dev) installed. 1549 1550 - Issue #15819: Make sure we can build Python out-of-tree from a readonly 1551 source directory. (Somewhat related to Issue #9860.) 1552 1553 - Issue #15822: Ensure 2to3 grammar pickles are properly installed. 1554 1555 - Issue #15560: Fix building _sqlite3 extension on OS X with an SDK. 1556 1557 - Issue #8847: Disable COMDAT folding in Windows PGO builds. 1558 1559 - Issue #14018: Fix OS X Tcl/Tk framework checking when using OS X SDKs. 1560 1561 - Issue #16256: OS X installer now sets correct permissions for doc directory. 1562 1563 - Issue #8767: Restore building with --disable-unicode. 1564 Patch by Stefano Taschini. 1565 1566 - Build against bzip2 1.0.6 and openssl 0.9.8x on Windows. 1567 1568 - Issue #14557: Fix extensions build on HP-UX. Patch by Adi Roiban. 1569 1570 - Issue #14437: Fix building the _io module under Cygwin. 1571 1572 - Issue #15587: Enable Tk high-resolution text rendering on Macs with 1573 Retina displays. Applies to Tkinter apps, such as IDLE, on OS X 1574 framework builds linked with Cocoa Tk 8.5. 1575 1576 - Issue #17161: make install now also installs a python2 and python man page. 1577 1578 - Issue #16848: python-config now returns proper --ldflags values for OS X 1579 framework builds. 1580 1581 Tools/Demos 1582 ----------- 1583 1584 - Issue #17156: pygettext.py now correctly escapes non-ascii characters. 1585 1586 - Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py. Now 1587 pindent.py works with a "with" statement. pindent.py no longer produces 1588 improper indentation. pindent.py now works with continued lines broken after 1589 "class" or "def" keywords and with continuations at the start of line. 1590 1591 - Issue #16476: Fix json.tool to avoid including trailing whitespace. 1592 1593 - Issue #13301: use ast.literal_eval() instead of eval() in Tools/i18n/msgfmt.py 1594 Patch by Serhiy Storchaka. 1595 1596 Documentation 1597 ------------- 1598 1599 - Issue #15041: Update "see also" list in tkinter documentation. 1600 1601 - Issue #17412: update 2.7 Doc/make.bat to also use sphinx-1.0.7. 1602 1603 - Issue #17047: remove doubled words in docs and docstrings 1604 reported by Serhiy Storchaka and Matthew Barnett. 1605 1606 - Issue #16406: combine the pages for uploading and registering to PyPI. 1607 1608 - Issue #16403: Document how distutils uses the maintainer field in 1609 PKG-INFO. Patch by Jyrki Pulliainen. 1610 1611 - Issue #16695: Document how glob handles filenames starting with a 1612 dot. Initial patch by Jyrki Pulliainen. 1613 1614 - Issue #8890: Stop advertising an insecure practice by replacing uses 1615 of the /tmp directory with better alternatives in the documentation. 1616 Patch by Geoff Wilson. 1617 1618 - Issue #17203: add long option names to unittest discovery docs. 1619 1620 - Issue #13094: add "Why do lambdas defined in a loop with different values 1621 all return the same result?" programming FAQ. 1622 1623 - Issue #14901: Update portions of the Windows FAQ. 1624 Patch by Ashish Nitin Patil. 1625 1626 - Issue #15990: Improve argument/parameter documentation. 1627 1628 - Issue #16400: Update the description of which versions of a given package 1629 PyPI displays. 1630 1631 - Issue #15677: Document that zlib and gzip accept a compression level of 0 to 1632 mean 'no compression'. Patch by Brian Brazil. 1633 1634 - Issue #8040: added a version switcher to the documentation. Patch by 1635 Yury Selivanov. 1636 1637 - Issue #16115: Improve subprocess.Popen() documentation around args, shell, 1638 and executable arguments. 1639 1640 - Issue #15979: Improve timeit documentation. 1641 1642 - Issue #16036: Improve documentation of built-in int()'s signature and 1643 arguments. 1644 1645 - Issue #15935: Clarification of argparse docs, re: add_argument() type and 1646 default arguments. Patch contributed by Chris Jerdonek. 1647 1648 - Issue #13769: Document the effect of ensure_ascii to the return type 1649 of JSON decoding functions. 1650 1651 - Issue #14880: Fix kwargs notation in csv.reader, .writer & .register_dialect. 1652 Patch by Chris Rebert. 1653 1654 - Issue #14674: Add a discussion of the json module's standard compliance. 1655 Patch by Chris Rebert. 1656 1657 - Issue #15630: Add an example for "continue" stmt in the tutorial. Patch by 1658 Daniel Ellis. 1659 1660 - Issue #13557: Clarify effect of giving two different namespaces to exec or 1661 execfile(). 1662 1663 - Issue #14034: added the argparse tutorial. 1664 1665 - Issue #15250: Document that filecmp.dircmp compares files shallowly. Patch 1666 contributed by Chris Jerdonek. 1667 1668 - Issue #15116: Remove references to appscript as it is no longer being 1669 supported. 1670 1671 1672 What's New in Python 2.7.3 release candidate 2? 1673 =============================================== 1674 1675 *Release date: 2012-03-17* 1676 1677 Library 1678 ------- 1679 1680 - Issue #14234: CVE-2012-0876: Randomize hashes of xml attributes in the hash 1681 table internal to the pyexpat module's copy of the expat library to avoid a 1682 denial of service due to hash collisions. Patch by David Malcolm with some 1683 modifications by the expat project. 1684 1685 1686 What's New in Python 2.7.3 release candidate 1? 1687 =============================================== 1688 1689 *Release date: 2012-02-23* 47 1690 48 1691 Core and Builtins 49 1692 ----------------- 50 1693 1694 - Issue #13020: Fix a reference leak when allocating a structsequence object 1695 fails. Patch by Suman Saha. 1696 1697 - Issue #13703: oCERT-2011-003: add -R command-line option and PYTHONHASHSEED 1698 environment variable, to provide an opt-in way to protect against denial of 1699 service attacks due to hash collisions within the dict and set types. Patch 1700 by David Malcolm, based on work by Victor Stinner. 1701 1702 - Issue #11235: Fix OverflowError when trying to import a source file whose 1703 modification time doesn't fit in a 32-bit timestamp. 1704 1705 - Issue #11638: Unicode strings in 'name' and 'version' no longer cause 1706 UnicodeDecodeErrors. 1707 1708 - Fix the fix for issue #12149: it was incorrect, although it had the side 1709 effect of appearing to resolve the issue. Thanks to Mark Shannon for 1710 noticing. 1711 1712 - Issue #13546: Fixed an overflow issue that could crash the intepreter when 1713 calling sys.setrecursionlimit((1<<31)-1). 1714 1715 - Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder 1716 already accepts them). 1717 1718 - Issue #10519: Avoid unnecessary recursive function calls in 1719 setobject.c. 1720 1721 - Issue #13268: Fix the assert statement when a tuple is passed as the message. 1722 1723 - Issue #13018: Fix reference leaks in error paths in dictobject.c. 1724 Patch by Suman Saha. 1725 1726 - Issue #12604: VTRACE macro expanded to no-op in _sre.c to avoid compiler 1727 warnings. Patch by Josh Triplett and Petri Lehtinen. 1728 1729 - Issue #7833: Extension modules built using distutils on Windows will no 1730 longer include a "manifest" to prevent them failing at import time in some 1731 embedded situations. 1732 1733 - Issue #13186: Fix __delitem__ on old-style instances when invoked through 1734 PySequence_DelItem. 1735 1736 - Issue #13156: Revert the patch for issue #10517 (reset TLS upon fork()), 1737 which was only relevant for the native pthread TLS implementation. 1738 1739 - Issue #7732: Fix a crash on importing a module if a directory has the same 1740 name than a Python module (e.g. "__init__.py"): don't close the file twice. 1741 1742 - Issue #12973: Fix overflow checks that invoked undefined behaviour in 1743 int.__pow__. These overflow checks were causing int.__pow__ to produce 1744 incorrect results with recent versions of Clang, as a result of the 1745 compiler optimizing the check away. Also fix similar overflow checks 1746 in list_repeat (listobject.c) and islice_next (itertoolsmodule.c). These 1747 bugs caused test failures with recent versions of Clang. 1748 1749 - Issue #12266: Fix str.capitalize() to correctly uppercase/lowercase 1750 titlecased and cased non-letter characters. 1751 1752 - Issues #12610 and #12609: Verify that user generated AST has correct string 1753 and identifier types before compiling. 1754 1755 - Issue #11627: Fix segfault when __new__ on a exception returns a 1756 non-exception class. 1757 1758 - Issue #12149: Update the method cache after a type's dictionnary gets 1759 cleared by the garbage collector. This fixes a segfault when an instance 1760 and its type get caught in a reference cycle, and the instance's 1761 deallocator calls one of the methods on the type (e.g. when subclassing 1762 IOBase). Diagnosis and patch by Davide Rizzo. 1763 1764 - Issue #12501: Remove Py3k warning for callable. callable() is supported 1765 again in Python 3.2. 1766 1767 - Issue #9611, #9015: FileIO.read(), FileIO.readinto(), FileIO.write() and 1768 os.write() clamp the length to INT_MAX on Windows. 1769 1770 - Issue #1195: my_fgets() now always clears errors before calling fgets(). Fix 1771 the following case: sys.stdin.read() stopped with CTRL+d (end of file), 1772 raw_input() interrupted by CTRL+c. 1773 1774 - Issue #10860: httplib now correctly handles an empty port after port 1775 delimiter in URLs. 1776 1777 - dict_proxy objects now display their contents rather than just the class 1778 name. 1779 1780 Library 1781 ------- 1782 1783 - Issue #8033: sqlite3: Fix 64-bit integer handling in user functions 1784 on 32-bit architectures. Initial patch by Philippe Devalkeneer. 1785 1786 - HTMLParser is now able to handle slashes in the start tag. 1787 1788 - Issue #14001: CVE-2012-0845: xmlrpc: Fix an endless loop in 1789 SimpleXMLRPCServer upon malformed POST request. 1790 1791 - Issue #2489: pty.spawn could consume 100% cpu when it encountered an EOF. 1792 1793 - Issue #13014: Fix a possible reference leak in SSLSocket.getpeercert(). 1794 1795 - Issue #13987: HTMLParser is now able to handle EOFs in the middle of a 1796 construct and malformed start tags. 1797 1798 - Issue #13015: Fix a possible reference leak in defaultdict.__repr__. 1799 Patch by Suman Saha. 1800 1801 - Issue #13979: A bug in ctypes.util.find_library that caused 1802 the wrong library name to be returned has been fixed. 1803 1804 - Issue #1326113: distutils' build_ext command --libraries option now 1805 correctly parses multiple values separated by whitespace or commas. 1806 1807 - Issue #13993: HTMLParser is now able to handle broken end tags. 1808 1809 - Issue #13960: HTMLParser is now able to handle broken comments. 1810 1811 - Issue #9750: Fix sqlite3.Connection.iterdump on tables and fields 1812 with a name that is a keyword or contains quotes. Patch by Marko 1813 Kohtala. 1814 1815 - Issue #13994: Earlier partial revert of Distutils enhancements in 2.7 1816 has left two versions of customize_compiler, the original in 1817 distutils.sysconfig and another copy in distutils.ccompiler, with some 1818 parts of distutils calling one and others using the other. 1819 Complete the revert back to only having one in distutils.sysconfig as 1820 is the case in 3.x. 1821 1822 - Issue #13590: On OS X 10.7 and 10.6 with Xcode 4.2, building 1823 Distutils-based packages with C extension modules may fail because 1824 Apple has removed gcc-4.2, the version used to build python.org 1825 64-bit/32-bit Pythons. If the user does not explicitly override 1826 the default C compiler by setting the CC environment variable, 1827 Distutils will now attempt to compile extension modules with clang 1828 if gcc-4.2 is required but not found. Also as a convenience, if 1829 the user does explicitly set CC, substitute its value as the default 1830 compiler in the Distutils LDSHARED configuration variable for OS X. 1831 (Note, the python.org 32-bit-only Pythons use gcc-4.0 and the 10.4u 1832 SDK, neither of which are available in Xcode 4. This change does not 1833 attempt to override settings to support their use with Xcode 4.) 1834 1835 - Issue #9021: Add an introduction to the copy module documentation. 1836 1837 - Issue #6005: Examples in the socket library documentation use sendall, where 1838 relevant, instead send method. 1839 1840 - Issue #10811: Fix recursive usage of cursors. Instead of crashing, 1841 raise a ProgrammingError now. 1842 1843 - Issue #13676: Handle strings with embedded zeros correctly in sqlite3. 1844 1845 - Issue #13806: The size check in audioop decompression functions was too 1846 strict and could reject valid compressed data. Patch by Oleg Plakhotnyuk. 1847 1848 - Issue #13885: CVE-2011-3389: the _ssl module would always disable the CBC 1849 IV attack countermeasure. 1850 1851 - Issue #6631: Disallow relative file paths in urllib urlopen methods. 1852 1853 - Issue #13781: Prevent gzip.GzipFile from using the dummy filename provided by 1854 file objects opened with os.fdopen(). 1855 1856 - Issue #13589: Fix some serialization primitives in the aifc module. 1857 Patch by Oleg Plakhotnyuk. 1858 1859 - Issue #13803: Under Solaris, distutils doesn't include bitness 1860 in the directory name. 1861 1862 - Issue #13642: Unquote before b64encoding user:password during Basic 1863 Authentication. Patch contributed by Joonas Kuorilehto and Michele Orrù. 1864 1865 - Issue #13636: Weak ciphers are now disabled by default in the ssl module 1866 (except when SSLv2 is explicitly asked for). 1867 1868 - Issue #12798: Updated the mimetypes documentation. 1869 1870 - Issue #13639: Accept unicode filenames in tarfile.open(mode="w|gz"). 1871 1872 - Issue #1785: Fix inspect and pydoc with misbehaving descriptors. 1873 1874 - Issue #7502: Fix equality comparison for DocTestCase instances. Patch by 1875 Cédric Krier. 1876 1877 - Issue #11870: threading: Properly reinitialize threads internal locks and 1878 condition variables to avoid deadlocks in child processes. 1879 1880 - Issue #8035: urllib: Fix a bug where the client could remain stuck after a 1881 redirection or an error. 1882 1883 - tarfile.py: Correctly detect bzip2 compressed streams with blocksizes 1884 other than 900k. 1885 1886 - Issue #13573: The csv.writer now uses the repr() for floats rather than str(). 1887 This allows floats to round-trip without loss of precision. 1888 1889 - Issue #13439: Fix many errors in turtle docstrings. 1890 1891 - Issue #12856: Ensure child processes do not inherit the parent's random 1892 seed for filename generation in the tempfile module. Patch by Brian 1893 Harring. 1894 1895 - Issue #13458: Fix a memory leak in the ssl module when decoding a 1896 certificate with a subjectAltName. Patch by Robert Xiao. 1897 1898 - Issue #13415: os.unsetenv() doesn't ignore errors anymore. 1899 1900 - Issue #13322: Fix BufferedWriter.write() to ensure that BlockingIOError is 1901 raised when the wrapped raw file is non-blocking and the write would block. 1902 Previous code assumed that the raw write() would raise BlockingIOError, but 1903 RawIOBase.write() is defined to returned None when the call would block. 1904 Patch by sbt. 1905 1906 - Issue #13358: HTMLParser now calls handle_data only once for each CDATA. 1907 1908 - Issue #4147: minidom's toprettyxml no longer adds whitespace around a text 1909 node when it is the only child of an element. Initial patch by Dan 1910 Kenigsberg. 1911 1912 - Issues #1745761, #755670, #13357, #12629, #1200313: HTMLParser now correctly 1913 handles non-valid attributes, including adjacent and unquoted attributes. 1914 1915 - Issue #13373: multiprocessing.Queue.get() could sometimes block indefinitely 1916 when called with a timeout. Patch by Arnaud Ysmal. 1917 1918 - Issue #3067: Enhance the documentation and docstring of 1919 locale.setlocale(). 1920 1921 - Issue #13254: Fix Maildir initialization so that maildir contents 1922 are read correctly. 1923 1924 - Issue #13140: Fix the daemon_threads attribute of ThreadingMixIn. 1925 1926 - Issue #2892: preserve iterparse events in case of SyntaxError. 1927 1928 - Issue #670664: Fix HTMLParser to correctly handle the content of 1929 ``<script>...</script>`` and ``<style>...</style>``. 1930 1931 - Issue #10817: Fix urlretrieve function to raise ContentTooShortError even 1932 when reporthook is None. Patch by Jyrki Pulliainen. 1933 1934 - Issue #7334: close source files on ElementTree.parse and iterparse. 1935 1936 - Issue #13232: logging: Improved logging of exceptions in the presence of 1937 multiple encodings. 1938 1939 - Issue #10332: multiprocessing: fix a race condition when a Pool is closed 1940 before all tasks have completed. 1941 1942 - Issue #1548891: The cStringIO.StringIO() constructor now encodes unicode 1943 arguments with the system default encoding just like the write() method 1944 does, instead of converting it to a raw buffer. This also fixes handling of 1945 unicode input in the shlex module (#6988, #1170). 1946 1947 - Issue #9168: now smtpd is able to bind privileged port. 1948 1949 - Issue #12529: fix cgi.parse_header issue on strings with double-quotes and 1950 semicolons together. Patch by Ben Darnell and Petri Lehtinen. 1951 1952 - Issue #6090: zipfile raises a ValueError when a document with a timestamp 1953 earlier than 1980 is provided. Patch contributed by Petri Lehtinen. 1954 1955 - Issue #13194: zlib.compressobj().copy() and zlib.decompressobj().copy() are 1956 now available on Windows. 1957 1958 - Issue #13114: Fix the distutils commands check and register when the 1959 long description is a Unicode string with non-ASCII characters. 1960 1961 - Issue #7367: Fix pkgutil.walk_paths to skip directories whose 1962 contents cannot be read. 1963 1964 - Issue #7425: Prevent pydoc -k failures due to module import errors. 1965 (Backport to 2.7 of existing 3.x fix) 1966 1967 - Issue #13099: Fix sqlite3.Cursor.lastrowid under a Turkish locale. 1968 Reported and diagnosed by Thomas Kluyver. 1969 1970 - Issue #7689: Allow pickling of dynamically created classes when their 1971 metaclass is registered with copy_reg. Patch by Nicolas M. Thiéry and 1972 Craig Citro. 1973 1974 - Issue #13058: ossaudiodev: fix a file descriptor leak on error. Patch by 1975 Thomas Jarosch. 1976 1977 - Issue #12931: xmlrpclib now encodes Unicode URI to ISO-8859-1, instead of 1978 failing with a UnicodeDecodeError. 1979 1980 - Issue #8933: distutils' PKG-INFO files will now correctly report 1981 Metadata-Version: 1.1 instead of 1.0 if a Classifier or Download-URL field is 1982 present. 1983 1984 - Issue #8286: The distutils command sdist will print a warning message instead 1985 of crashing when an invalid path is given in the manifest template. 1986 1987 - Issue #12841: tarfile unnecessarily checked the existence of numerical user 1988 and group ids on extraction. If one of them did not exist the respective id 1989 of the current user (i.e. root) was used for the file and ownership 1990 information was lost. 1991 1992 - Issue #10946: The distutils commands bdist_dumb, bdist_wininst and bdist_msi 1993 now respect a --skip-build option given to bdist. 1994 1995 - Issue #12287: Fix a stack corruption in ossaudiodev module when the FD is 1996 greater than FD_SETSIZE. 1997 1998 - Issue #12839: Fix crash in zlib module due to version mismatch. 1999 Fix by Richard M. Tew. 2000 2001 - Issue #12786: Set communication pipes used by subprocess.Popen CLOEXEC to 2002 avoid them being inherited by other subprocesses. 2003 2004 - Issue #4106: Fix occasional exceptions printed out by multiprocessing on 2005 interpreter shutdown. 2006 2007 - Issue #11657: Fix sending file descriptors over 255 over a multiprocessing 2008 Pipe. 2009 2010 - Issue #12213: Fix a buffering bug with interleaved reads and writes that 2011 could appear on io.BufferedRandom streams. 2012 2013 - Issue #12326: sys.platform is now always 'linux2' on Linux, even if Python 2014 is compiled on Linux 3. 2015 2016 - Issue #13007: whichdb should recognize gdbm 1.9 magic numbers. 2017 2018 - Issue #9173: Let shutil._make_archive work if the logger argument is None. 2019 2020 - Issue #12650: Fix a race condition where a subprocess.Popen could leak 2021 resources (FD/zombie) when killed at the wrong time. 2022 2023 - Issue #12752: Fix regression which prevented locale.normalize() from 2024 accepting unicode strings. 2025 2026 - Issue #12683: urlparse updated to include svn as schemes that uses relative 2027 paths. (svn from 1.5 onwards support relative path). 2028 2029 - Issue #11933: Fix incorrect mtime comparison in distutils. 2030 2031 - Issues #11104, #8688: Fix the behavior of distutils' sdist command with 2032 manually-maintained MANIFEST files. 2033 2034 - Issue #8887: "pydoc somebuiltin.somemethod" (or help('somebuiltin.somemethod') 2035 in Python code) now finds the doc of the method. 2036 2037 - Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime. 2038 2039 - Issue #12514: Use try/finally to assure the timeit module restores garbage 2040 collections when it is done. 2041 2042 - Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is 2043 given as a low fd, it gets overwritten. 2044 2045 - Issue #12102: Document that buffered files must be flushed before being used 2046 with mmap. Patch by Steffen Daode Nurpmeso. 2047 2048 - Issue #12560: Build libpython.so on OpenBSD. Patch by Stefan Sperling. 2049 2050 - Issue #1813: Fix codec lookup and setting/getting locales under Turkish 2051 locales. 2052 2053 - Issue #10883: Fix socket leaks in urllib when using FTP. 2054 2055 - Issue #12592: Make Python build on OpenBSD 5 (and future major releases). 2056 2057 - Issue #12372: POSIX semaphores are broken on AIX: don't use them. 2058 2059 - Issue #12571: Add a plat-linux3 directory mirroring the plat-linux2 2060 directory, so that "import DLFCN" and other similar imports work on 2061 Linux 3.0. 2062 2063 - Issue #7484: smtplib no longer puts <> around addresses in VRFY and EXPN 2064 commands; they aren't required and in fact postfix doesn't support that form. 2065 2066 - Issue #11603: Fix a crash when __str__ is rebound as __repr__. Patch by 2067 Andreas StÃŒhrk. 2068 2069 - Issue #12502: asyncore: fix polling loop with AF_UNIX sockets. 2070 2071 - Issue #4376: ctypes now supports nested structures in a endian different than 2072 the parent structure. Patch by Vlad Riscutia. 2073 2074 - Issue #12493: subprocess: Popen.communicate() now also handles EINTR errors 2075 if the process has only one pipe. 2076 2077 - Issue #12467: warnings: fix a race condition if a warning is emitted at 2078 shutdown, if globals()['__file__'] is None. 2079 2080 - Issue #12352: Fix a deadlock in multiprocessing.Heap when a block is freed by 2081 the garbage collector while the Heap lock is held. 2082 2083 - Issue #9516: On Mac OS X, change Distutils to no longer globally attempt to 2084 check or set the MACOSX_DEPLOYMENT_TARGET environment variable for the 2085 interpreter process. This could cause failures in non-Distutils subprocesses 2086 and was unreliable since tests or user programs could modify the interpreter 2087 environment after Distutils set it. Instead, have Distutils set the 2088 deployment target only in the environment of each build subprocess. It is 2089 still possible to globally override the default by setting 2090 MACOSX_DEPLOYMENT_TARGET before launching the interpreter; its value must be 2091 greater or equal to the default value, the value with which the interpreter 2092 was built. 2093 2094 - Issue #11802: The cache in filecmp now has a maximum size of 100 so that 2095 it won't grow without bound. 2096 2097 - Issue #12404: Remove C89 incompatible code from mmap module. Patch by Akira 2098 Kitada. 2099 2100 - Issue #11700: mailbox proxy object close methods can now be called multiple 2101 times without error, and _ProxyFile now closes the wrapped file. 2102 2103 - Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP 2104 connection if its getresponse() method fails with a socket error. Patch 2105 written by Ezio Melotti. 2106 2107 - Issue #9284: Allow inspect.findsource() to find the source of doctest 2108 functions. 2109 2110 - Issue #10694: zipfile now ignores garbage at the end of a zipfile. 2111 2112 - Issue #11583: Speed up os.path.isdir on Windows by using GetFileAttributes 2113 instead of os.stat. 2114 2115 - Issue #12080: Fix a performance issue in Decimal._power_exact that caused 2116 some corner-case Decimal.__pow__ calls to take an unreasonably long time. 2117 2118 - Named tuples now work correctly with vars(). 2119 2120 - sys.setcheckinterval() now updates the current ticker count as well as 2121 updating the check interval, so if the user decreases the check interval, 2122 the ticker doesn't have to wind down to zero from the old starting point 2123 before the new interval takes effect. And if the user increases the 2124 interval, it makes sure the new limit takes effect right away rather have an 2125 early task switch before recognizing the new interval. 2126 2127 - Issue #12085: Fix an attribute error in subprocess.Popen destructor if the 2128 constructor has failed, e.g. because of an undeclared keyword argument. Patch 2129 written by Oleg Oshmyan. 2130 2131 Extension Modules 2132 ----------------- 2133 2134 - Issue #9041: An issue in ctypes.c_longdouble, ctypes.c_double, and 2135 ctypes.c_float that caused an incorrect exception to be returned in the 2136 case of overflow has been fixed. 2137 2138 - bsddb module: Erratic behaviour of "DBEnv->rep_elect()" because a typo. 2139 Possible crash. 2140 2141 - Issue #13774: json: Fix a SystemError when a bogus encoding is passed to 2142 json.loads(). 2143 2144 - Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by 2145 Vilmos Nebehaj. 2146 2147 - Issue #13159: FileIO, BZ2File, and the built-in file class now use a 2148 linear-time buffer growth strategy instead of a quadratic one. 2149 2150 - Issue #13070: Fix a crash when a TextIOWrapper caught in a reference cycle 2151 would be finalized after the reference to its underlying BufferedRWPair's 2152 writer got cleared by the GC. 2153 2154 - Issue #12881: ctypes: Fix segfault with large structure field names. 2155 2156 - Issue #13013: ctypes: Fix a reference leak in PyCArrayType_from_ctype. 2157 Thanks to Suman Saha for finding the bug and providing a patch. 2158 2159 - Issue #13022: Fix: _multiprocessing.recvfd() doesn't check that 2160 file descriptor was actually received. 2161 2162 - Issue #12483: ctypes: Fix a crash when the destruction of a callback 2163 object triggers the garbage collector. 2164 2165 - Issue #12950: Fix passing file descriptors in multiprocessing, under 2166 OpenIndiana/Illumos. 2167 2168 - Issue #12764: Fix a crash in ctypes when the name of a Structure field is not 2169 a string. 2170 2171 - Issue #9651: Fix a crash when ctypes.create_string_buffer(0) was passed to 2172 some functions like file.write(). 2173 2174 - Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper 2175 signature. Without this, architectures where sizeof void* != sizeof int are 2176 broken. Patch given by Hallvard B Furuseth. 2177 2178 IDLE 2179 ---- 2180 2181 - Issue #964437 Make IDLE help window non-modal. 2182 Patch by Guilherme Polo and Roger Serwy. 2183 2184 - Issue #13933: IDLE auto-complete did not work with some imported 2185 module, like hashlib. (Patch by Roger Serwy) 2186 2187 - Issue #13506: Add '' to path for IDLE Shell when started and restarted with Restart Shell. 2188 Original patches by Marco Scataglini and Roger Serwy. 2189 2190 - Issue #4625: If IDLE cannot write to its recent file or breakpoint 2191 files, display a message popup and continue rather than crash. 2192 (original patch by Roger Serwy) 2193 2194 - Issue #8793: Prevent IDLE crash when given strings with invalid hex escape 2195 sequences. 2196 2197 - Issue #13296: Fix IDLE to clear compile __future__ flags on shell restart. 2198 (Patch by Roger Serwy) 2199 2200 Build 2201 ----- 2202 2203 - Issue #6807: Run msisupport.mak earlier. 2204 2205 - Issue #10580: Minor grammar change in Windows installer. 2206 2207 - Issue #12627: Implement PEP 394 for Python 2.7 ("python2"). 2208 2209 - Issue #8746: Correct faulty configure checks so that os.chflags() and 2210 os.lchflags() are once again built on systems that support these 2211 functions (*BSD and OS X). Also add new stat file flags for OS X 2212 (UF_HIDDEN and UF_COMPRESSED). 2213 2214 Tools/Demos 2215 ----------- 2216 2217 - Issue #14053: patchcheck.py ("make patchcheck") now works with MQ patches. 2218 Patch by Francisco MartÃn Brugué. 2219 2220 - Issue #13930: 2to3 is now able to write its converted output files to another 2221 directory tree as well as copying unchanged files and altering the file 2222 suffix. See its new -o, -W and --add-suffix options. This makes it more 2223 useful in many automated code translation workflows. 2224 2225 - Issue #10639: reindent.py no longer converts newlines and will raise 2226 an error if attempting to convert a file with mixed newlines. 2227 2228 - Issue #13628: python-gdb.py is now able to retrieve more frames in the Python 2229 traceback if Python is optimized. 2230 2231 Tests 2232 ----- 2233 2234 - Issue #15467: Move helpers for __sizeof__ tests into test_support. 2235 Patch by Serhiy Storchaka. 2236 2237 - Issue #11689: Fix a variable scoping error in an sqlite3 test. 2238 Initial patch by Torsten Landschoff. 2239 2240 - Issue #10881: Fix test_site failures with OS X framework builds. 2241 2242 - Issue #13901: Prevent test_distutils failures on OS X with --enable-shared. 2243 2244 - Issue #13304: Skip test case if user site-packages disabled (-s or 2245 PYTHONNOUSERSITE). (Patch by Carl Meyer) 2246 2247 - Issue #13218: Fix test_ssl failures on Debian/Ubuntu. 2248 2249 - Issue #12821: Fix test_fcntl failures on OpenBSD 5. 2250 2251 - Issue #12331: The test suite for lib2to3 can now run from an installed 2252 Python. 2253 2254 - Issue #12549: Correct test_platform to not fail when OS X returns 'x86_64' 2255 as the processor type on some Mac systems. 2256 2257 - Skip network tests when getaddrinfo() returns EAI_AGAIN, meaning a temporary 2258 failure in name resolution. 2259 2260 - Issue #11812: Solve transient socket failure to connect to 'localhost' 2261 in test_telnetlib.py. 2262 2263 - Solved a potential deadlock in test_telnetlib.py. Related to issue #11812. 2264 2265 - Avoid failing in test_robotparser when mueblesmoraleda.com is flaky and 2266 an overzealous DNS service (e.g. OpenDNS) redirects to a placeholder 2267 Web site. 2268 2269 - Avoid failing in test_urllibnet.test_bad_address when some overzealous 2270 DNS service (e.g. OpenDNS) resolves a non-existent domain name. The test 2271 is now skipped instead. 2272 2273 - Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run 2274 test_tk or test_ttk_guionly under a username that is not currently logged 2275 in to the console windowserver (as may be the case under buildbot or ssh). 2276 2277 - Issue #12141: Install a copy of template C module file so that 2278 test_build_ext of test_distutils is no longer silently skipped when 2279 run outside of a build directory. 2280 2281 - Issue #8746: Add additional tests for os.chflags() and os.lchflags(). 2282 Patch by Garrett Cooper. 2283 2284 - Issue #10736: Fix test_ttk test_widgets failures with Cocoa Tk 8.5.9 2285 on Mac OS X. (Patch by Ronald Oussoren) 2286 2287 - Issue #12057: Add tests for ISO 2022 codecs (iso2022_jp, iso2022_jp_2, 2288 iso2022_kr). 2289 2290 Documentation 2291 ------------- 2292 2293 - Issues #13491 and #13995: Fix many errors in sqlite3 documentation. 2294 Initial patch for #13491 by Johannes Vogel. 2295 2296 - Issue #13402: Document absoluteness of sys.executable. 2297 2298 - Issue #13883: PYTHONCASEOK also works on OS X, OS/2, and RiscOS. 2299 2300 - Issue #2134: The tokenize documentation has been clarified to explain why 2301 all operator and delimiter tokens are treated as token.OP tokens. 2302 2303 - Issue #13513: Fix io.IOBase documentation to correctly link to the 2304 io.IOBase.readline method instead of the readline module. 2305 2306 - Issue #13237: Reorganise subprocess documentation to emphasise convenience 2307 functions and the most commonly needed arguments to Popen. 2308 2309 - Issue #13141: Demonstrate recommended style for SocketServer examples. 2310 2311 2312 What's New in Python 2.7.2? 2313 =========================== 2314 2315 *Release date: 2011-06-11* 2316 2317 Library 2318 ------- 2319 2320 - Issue #12009: Fixed regression in netrc file comment handling. 2321 2322 Extension Modules 2323 ----------------- 2324 2325 - Issue #1221: Make pyexpat.__version__ equal to the Python version. 2326 2327 2328 What's New in Python 2.7.2 release candidate 1? 2329 =============================================== 2330 2331 *Release date: 2011-05-29* 2332 2333 Core and Builtins 2334 ----------------- 2335 2336 - Issue #9670: Increase the default stack size for secondary threads on 2337 Mac OS X and FreeBSD to reduce the chances of a crash instead of a 2338 "maximum recursion depth" RuntimeError exception. 2339 (patch by Ronald Oussoren) 2340 2341 - Correct lookup of __dir__ on objects. This allows old-style classes to have 2342 __dir__. It also causes errors besides AttributeError found on lookup to be 2343 propagated. 2344 2345 - Issue #1195: Fix input() if it is interrupted by CTRL+d and then CTRL+c, 2346 clear the end-of-file indicator after CTRL+d. 2347 2348 - Issue #8651: PyArg_Parse*() functions raise an OverflowError if the file 2349 doesn't have PY_SSIZE_T_CLEAN define and the size doesn't fit in an int 2350 (length bigger than 2^31-1 bytes). 2351 2352 - Issue #8651: Fix "z#" format of PyArg_Parse*() function: the size was not 2353 written if PY_SSIZE_T_CLEAN is defined. 2354 2355 - Issue #9756: When calling a method descriptor or a slot wrapper descriptor, 2356 the check of the object type doesn't read the __class__ attribute anymore. 2357 Fix a crash if a class override its __class__ attribute (e.g. a proxy of the 2358 str type). Patch written by Andreas StÃŒhrk. 2359 2360 - Issue #10517: After fork(), reinitialize the TLS used by the PyGILState_* 2361 APIs, to avoid a crash with the pthread implementation in RHEL 5. Patch 2362 by Charles-François Natali. 2363 2364 - Issue #6780: fix starts/endswith error message to mention that tuples are 2365 accepted too. 2366 2367 - Issue #5057: fix a bug in the peepholer that led to non-portable pyc files 2368 between narrow and wide builds while optimizing BINARY_SUBSCR on non-BMP 2369 chars (e.g. u"\U00012345"[0]). 2370 2371 - Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted 2372 (EINTR), for example if the program is stopped with CTRL+z on Mac OS X. Patch 2373 written by Charles-Francois Natali. 2374 2375 - Issue #11144: Ensure that int(a_float) returns an int whenever possible. 2376 Previously, there were some corner cases where a long was returned even 2377 though the result was within the range of an int. 2378 2379 - Issue #11450: Don't truncate hg version info in Py_GetBuildInfo() when 2380 there are many tags (e.g. when using mq). Patch by Nadeem Vawda. 2381 2382 - Issue #10451: memoryview objects could allow to mutate a readable buffer. 2383 Initial patch by Ross Lagerwall. 2384 2385 - Issue #10892: Don't segfault when trying to delete __abstractmethods__ from a 2386 class. 2387 2388 - Issue #8020: Avoid a crash where the small objects allocator would read 2389 non-Python managed memory while it is being modified by another thread. 2390 Patch by Matt Bandy. 2391 2392 - Issue #11004: Repaired edge case in deque.count(). 2393 2394 - Issue #8278: On Windows and with a NTFS filesystem, os.stat() and os.utime() 2395 can now handle dates after 2038. 2396 2397 - Issue #4236: Py_InitModule4 now checks the import machinery directly 2398 rather than the Py_IsInitialized flag, avoiding a Fatal Python 2399 error in certain circumstances when an import is done in __del__. 2400 2401 - Issue #11828: startswith and endswith don't accept None as slice index. 2402 Patch by Torsten Becker. 2403 2404 - Issue #10674: Remove unused 'dictmaker' rule from grammar. 2405 2406 - Issue #10596: Fix float.__mod__ to have the same behaviour as 2407 float.__divmod__ with respect to signed zeros. -4.0 % 4.0 should be 2408 0.0, not -0.0. 2409 2410 - Issue #11386: bytearray.pop() now throws IndexError when the bytearray is 2411 empty, instead of OverflowError. 2412 2413 Library 2414 ------- 2415 2416 - Issue #12161: Cause StringIO.getvalue() to raise a ValueError when used on a 2417 closed StringIO instance. 2418 2419 - Issue #12182: Fix pydoc.HTMLDoc.multicolumn() if Python uses the new (true) 2420 division (python -Qnew). Patch written by Ralf W. Grosse-Kunstleve. 2421 2422 - Issue #12175: RawIOBase.readall() now returns None if read() returns None. 2423 2424 - Issue #12175: FileIO.readall() now raises a ValueError instead of an IOError 2425 if the file is closed. 2426 2427 - Issue #1441530: In imaplib, use makefile() to wrap the SSL socket to avoid 2428 heap fragmentation and MemoryError with some malloc implementations. 2429 2430 - Issue #12100: Don't reset incremental encoders of CJK codecs at each call to 2431 their encode() method anymore, but continue to call the reset() method if the 2432 final argument is True. 2433 2434 - Issue #12124: zipimport doesn't keep a reference to zlib.decompress() anymore 2435 to be able to unload the module. 2436 2437 - Issue #10154, #10090: change the normalization of UTF-8 to "UTF-8" instead 2438 of "UTF8" in the locale module as the latter is not supported MacOSX and OpenBSD. 2439 2440 - Issue #9516: avoid errors in sysconfig when MACOSX_DEPLOYMENT_TARGET is 2441 set in shell. 2442 2443 - Issue #12050: zlib.decompressobj().decompress() now clears the unconsumed_tail 2444 attribute when called without a max_length argument. 2445 2446 - Issue #12062: In the `io` module, fix a flushing bug when doing a certain 2447 type of I/O sequence on a file opened in read+write mode (namely: reading, 2448 seeking a bit forward, writing, then seeking before the previous write but 2449 still within buffered data, and writing again). 2450 2451 - Issue #8498: In socket.accept(), allow to specify 0 as a backlog value in 2452 order to accept exactly one connection. Patch by Daniel Evers. 2453 2454 - Issue #12012: ssl.PROTOCOL_SSLv2 becomes optional. 2455 2456 - Issue #11927: SMTP_SSL now uses port 465 by default as documented. Patch 2457 by Kasun Herath. 2458 2459 - Issue #11999: fixed sporadic sync failure mailbox.Maildir due to its trying to 2460 detect mtime changes by comparing to the system clock instead of to the 2461 previous value of the mtime. 2462 2463 - Issue #10684: shutil.move used to delete a folder on case insensitive 2464 filesystems when the source and destination name where the same except 2465 for the case. 2466 2467 - Issue #11982: fix json.loads('""') to return u'' rather than ''. 2468 2469 - Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS X to get 2470 around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso. 2471 2472 - Issue #10761: Fix tarfile.extractall failure when symlinked files are 2473 present. Initial patch by Scott Leerssen. 2474 2475 - Issue #11763: don't use difflib in TestCase.assertMultiLineEqual if the 2476 strings are too long. 2477 2478 - Issue #11236: getpass.getpass responds to ctrl-c or ctrl-z on terminal. 2479 2480 - Issue #11768: The signal handler of the signal module only calls 2481 Py_AddPendingCall() for the first signal to fix a deadlock on reentrant or 2482 parallel calls. PyErr_SetInterrupt() writes also into the wake up file. 2483 2484 - Issue #11875: collections.OrderedDict's __reduce__ was temporarily 2485 mutating the object instead of just working on a copy. 2486 2487 - Issue #11442: Add a charset parameter to the Content-type in SimpleHTTPServer 2488 to avoid XSS attacks. 2489 2490 - Issue #11467: Fix urlparse behavior when handling urls which contains scheme 2491 specific part only digits. Patch by Santoso Wijaya. 2492 2493 - collections.Counter().copy() now works correctly for subclasses. 2494 2495 - Issue #11474: Fix the bug with url2pathname() handling of '/C|/' on Windows. 2496 Patch by Santoso Wijaya. 2497 2498 - Issue #9233: Fix json.loads('{}') to return a dict (instead of a list), when 2499 _json is not available. 2500 2501 - Issue #11703: urllib2.geturl() does not return correct url when the original 2502 url contains #fragment. 2503 2504 - Issue #10019: Fixed regression in json module where an indent of 0 stopped 2505 adding newlines and acted instead like 'None'. 2506 2507 - Issue #5162: Treat services like frozen executables to allow child spawning 2508 from multiprocessing.forking on Windows. 2509 2510 - Issue #4877: Fix a segfault in xml.parsers.expat while attempting to parse 2511 a closed file. 2512 2513 - Issue #11830: Remove unnecessary introspection code in the decimal module. 2514 It was causing a failed import in the Turkish locale where the locale 2515 sensitive str.upper() method caused a name mismatch. 2516 2517 - Issue #8428: Fix a race condition in multiprocessing.Pool when terminating 2518 worker processes: new processes would be spawned while the pool is being 2519 shut down. Patch by Charles-François Natali. 2520 2521 - Issue #7311: Fix HTMLParser to accept non-ASCII attribute values. 2522 2523 - Issue #10963: Ensure that subprocess.communicate() never raises EPIPE. 2524 2525 - Issue #11662: Make urllib and urllib2 ignore redirections if the 2526 scheme is not HTTP, HTTPS or FTP (CVE-2011-1521). 2527 2528 - Issue #11256: Fix inspect.getcallargs on functions that take only keyword 2529 arguments. 2530 2531 - Issue #11696: Fix ID generation in msilib. 2532 2533 - Issue #9696: Fix exception incorrectly raised by xdrlib.Packer.pack_int when 2534 trying to pack a negative (in-range) integer. 2535 2536 - Issue #11675: multiprocessing.[Raw]Array objects created from an integer size 2537 are now zeroed on creation. This matches the behaviour specified by the 2538 documentation. 2539 2540 - Issue #7639: Fix short file name generation in bdist_msi. 2541 2542 - Issue #11666: let help() display named tuple attributes and methods 2543 that start with a leading underscore. 2544 2545 - Issue #11673: Fix multiprocessing Array and RawArray constructors to accept a 2546 size of type 'long', rather than only accepting 'int'. 2547 2548 - Issue #10042: Fixed the total_ordering decorator to handle cross-type 2549 comparisons that could lead to infinite recursion. 2550 2551 - Issue #10979: unittest stdout buffering now works with class and module 2552 setup and teardown. 2553 2554 - Issue #11569: use absolute path to the sysctl command in multiprocessing to 2555 ensure that it will be found regardless of the shell PATH. This ensures 2556 that multiprocessing.cpu_count works on default installs of MacOSX. 2557 2558 - Issue #11500: Fixed a bug in the os x proxy bypass code for fully qualified 2559 IP addresses in the proxy exception list. 2560 2561 - Issue #11131: Fix sign of zero in plus and minus operations when 2562 the context rounding mode is ROUND_FLOOR. 2563 2564 - Issue #5622: Fix curses.wrapper to raise correct exception if curses 2565 initialization fails. 2566 2567 - Issue #11391: Writing to a mmap object created with 2568 ``mmap.PROT_READ|mmap.PROT_EXEC`` would segfault instead of raising a 2569 TypeError. Patch by Charles-François Natali. 2570 2571 - Issue #11306: mailbox in certain cases adapts to an inability to open 2572 certain files in read-write mode. Previously it detected this by 2573 checking for EACCES, now it also checks for EROFS. 2574 2575 - Issue #11265: asyncore now correctly handles EPIPE, EBADF and EAGAIN errors 2576 on accept(), send() and recv(). 2577 2578 - Issue #11326: Add the missing connect_ex() implementation for SSL sockets, 2579 and make it work for non-blocking connects. 2580 2581 - Issue #10956: Buffered I/O classes retry reading or writing after a signal 2582 has arrived and the handler returned successfully. 2583 2584 - Issue #10680: Fix mutually exclusive arguments for argument groups in 2585 argparse. 2586 2587 - Issue #4681: Allow mmap() to work on file sizes and offsets larger than 2588 4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for 2589 32-bit Windows. 2590 2591 - Issue #10360: In WeakSet, do not raise TypeErrors when testing for 2592 membership of non-weakrefable objects. 2593 2594 - Issue #10549: Fix pydoc traceback when text-documenting certain classes. 2595 2596 - Issue #940286: pydoc.Helper.help() ignores input/output init parameters. 2597 2598 - Issue #11171: Fix detection of config/Makefile when --prefix != 2599 --exec-prefix, which caused Python to not start. 2600 2601 - Issue #11116: any error during addition of a message to a mailbox now causes 2602 a rollback, instead of leaving the mailbox partially modified. 2603 2604 - Issue #8275: Fix passing of callback arguments with ctypes under Win64. 2605 Patch by Stan Mihai. 2606 2607 - Issue #10949: Improved robustness of rotating file handlers. 2608 2609 - Issue #10955: Fix a potential crash when trying to mmap() a file past its 2610 length. Initial patch by Ross Lagerwall. 2611 2612 - Issue #10898: Allow compiling the posix module when the C library defines 2613 a symbol named FSTAT. 2614 2615 - Issue #10916: mmap should not segfault when a file is mapped using 0 as 2616 length and a non-zero offset, and an attempt to read past the end of file 2617 is made (IndexError is raised instead). Patch by Ross Lagerwall. 2618 2619 - Issue #10875: Update Regular Expression HOWTO; patch by 'SilentGhost'. 2620 2621 - Issue #10827: Changed the rules for 2-digit years. The time.asctime 2622 function will now format any year when ``time.accept2dyear`` is 2623 false and will accept years >= 1000 otherwise. The year range 2624 accepted by ``time.mktime`` and ``time.strftime`` is still system 2625 dependent, but ``time.mktime`` will now accept full range supported 2626 by the OS. Conversion of 2-digit years to 4-digit is deprecated. 2627 2628 - Issue #10869: Fixed bug where ast.increment_lineno modified the root 2629 node twice. 2630 2631 - Issue #7858: Raise an error properly when os.utime() fails under Windows 2632 on an existing file. 2633 2634 - Issue #3839: wsgiref should not override a Content-Length header set by 2635 the application. Initial patch by Clovis Fabricio. 2636 2637 - Issue #10806, issue #9905: Fix subprocess pipes when some of the standard 2638 file descriptors (0, 1, 2) are closed in the parent process. Initial 2639 patch by Ross Lagerwall. 2640 2641 - Issue #4662: os.tempnam(), os.tmpfile() and os.tmpnam() now raise a py3k 2642 DeprecationWarning. 2643 2644 - Subclasses of collections.OrderedDict now work correctly with __missing__. 2645 2646 - Issue #10753 - Characters ';', '=' and ',' in the PATH_INFO environment 2647 variable won't be quoted when the URI is constructed by the wsgiref.util 's 2648 request_uri method. According to RFC 3986, these characters can be a part of 2649 params in PATH component of URI and need not be quoted. 2650 2651 - Issue #10738: Fix webbrowser.Opera.raise_opts 2652 2653 - Issue #9824: SimpleCookie now encodes , and ; in values to cater to how 2654 browsers actually parse cookies. 2655 2656 - Issue #1379416: eliminated a source of accidental unicode promotion in 2657 email.header.Header.encode. 2658 2659 - Issue #5258/#10642: if site.py encounters a .pth file that generates an error, 2660 it now prints the filename, line number, and traceback to stderr and skips 2661 the rest of that individual file, instead of stopping processing entirely. 2662 2663 - Issue #10750: The ``raw`` attribute of buffered IO objects is now read-only. 2664 2665 - Issue #10242: unittest.TestCase.assertItemsEqual makes too many assumptions 2666 about input. 2667 2668 - Issue #10611: SystemExit should not cause a unittest test run to exit. 2669 2670 - Issue #6791: Limit header line length (to 65535 bytes) in http.client, 2671 to avoid denial of services from the other party. 2672 2673 - Issue #9907: Fix tab handling on OSX when using editline by calling 2674 rl_initialize first, then setting our custom defaults, then reading .editrc. 2675 2676 - Issue #4188: Avoid creating dummy thread objects when logging operations 2677 from the threading module (with the internal verbose flag activated). 2678 2679 - Issue #9721: Fix the behavior of urljoin when the relative url starts with a 2680 ';' character. Patch by Wes Chow. 2681 2682 - Issue #10714: Limit length of incoming request in http.server to 65536 bytes 2683 for security reasons. Initial patch by Ross Lagerwall. 2684 2685 - Issue #9558: Fix distutils.command.build_ext with VS 8.0. 2686 2687 - Issue #10695: passing the port as a string value to telnetlib no longer 2688 causes debug mode to fail. 2689 2690 - Issue #10478: Reentrant calls inside buffered IO objects (for example by 2691 way of a signal handler) now raise a RuntimeError instead of freezing the 2692 current process. 2693 2694 - Issue #10497: Fix incorrect use of gettext in argparse. 2695 2696 - Issue #10464: netrc now correctly handles lines with embedded '#' characters. 2697 2698 - Issue #1731717: Fixed the problem where subprocess.wait() could cause an 2699 OSError exception when The OS had been told to ignore SIGCLD in our process 2700 or otherwise not wait for exiting child processes. 2701 2702 - Issue #9509: argparse now properly handles IOErrors raised by 2703 argparse.FileType. 2704 2705 - Issue #9348: Raise an early error if argparse nargs and metavar don't match. 2706 2707 - Issue #8982: Improve the documentation for the argparse Namespace object. 2708 2709 - Issue #9343: Document that argparse parent parsers must be configured before 2710 their children. 2711 2712 - Issue #9026: Fix order of argparse sub-commands in help messages. 2713 2714 - Issue #9347: Fix formatting for tuples in argparse type= error messages. 2715 2716 Extension Modules 2717 ----------------- 2718 2719 - Stop using the old interface for providing methods and attributes in the _sre 2720 module. Among other things, this gives these classes ``__class__`` 2721 attributes. (See #12099) 2722 2723 - Issue #10169: Fix argument parsing in socket.sendto() to avoid error masking. 2724 2725 - Issue #12051: Fix segfault in json.dumps() while encoding highly-nested 2726 objects using the C accelerations. 2727 2728 - Issue #12017: Fix segfault in json.loads() while decoding highly-nested 2729 objects using the C accelerations. 2730 2731 - Issue #1838: Prevent segfault in ctypes, when _as_parameter_ on a class is set 2732 to an instance of the class. 2733 2734 - Issue #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY. 2735 2736 IDLE 2737 ---- 2738 2739 - Issue #11718: IDLE's open module dialog couldn't find the __init__.py 2740 file in a package. 2741 2742 - Issue #12590: IDLE editor window now always displays the first line 2743 when opening a long file. With Tk 8.5, the first line was hidden. 2744 2745 - Issue #11088: don't crash when using F5 to run a script in IDLE on MacOSX 2746 with Tk 8.5. 2747 2748 - Issue #10940: Workaround an IDLE hang on Mac OS X 10.6 when using the 2749 menu accelerators for Open Module, Go to Line, and New Indent Width. 2750 The accelerators still work but no longer appear in the menu items. 2751 2752 - Issue #10907: Warn OS X 10.6 IDLE users to use ActiveState Tcl/Tk 8.5, rather 2753 than the currently problematic Apple-supplied one, when running with the 2754 64-/32-bit installer variant. 2755 2756 - Issue #11052: Correct IDLE menu accelerators on Mac OS X for Save 2757 commands. 2758 2759 - Issue #6075: IDLE on Mac OS X now works with both Carbon AquaTk and 2760 Cocoa AquaTk. 2761 2762 - Issue #10404: Use ctl-button-1 on OSX for the context menu in Idle. 2763 2764 - Issue #10107: Warn about unsaved files in IDLE on OSX. 2765 2766 - Issue #10406: Enable Rstrip IDLE extension on OSX (just like on other 2767 platforms). 2768 2769 Build 2770 ----- 2771 2772 - Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds, 2773 ensure "make install" creates symlinks in --prefix bin for the "-32" 2774 files in the framework bin directory like the installer does. 2775 2776 - Issue #11411: Fix 'make DESTDIR=' with a relative destination. 2777 2778 - Issue #10709: Add updated AIX notes in Misc/README.AIX. 2779 2780 - Issue #11184: Fix large-file support on AIX. 2781 2782 - Issue #941346: Fix broken shared library build on AIX. 2783 2784 - Issue #11268: Prevent Mac OS X Installer failure if Documentation 2785 package had previously been installed. 2786 2787 - Issue #11079: The /Applications/Python x.x folder created by the Mac 2788 OS X installers now includes a link to the installed documentation. 2789 2790 - Issue #11054: Allow Mac OS X installer builds to again work on 10.5 with 2791 the system-provided Python. 2792 2793 - Issue #10843: Update third-party library versions used in OS X 2794 32-bit installer builds: bzip2 1.0.6, readline 6.1.2, SQLite 3.7.4 2795 (with FTS3/FTS4 and RTREE enabled), and ncursesw 5.5 (wide-char 2796 support enabled). 2797 2798 - Don't run pgen twice when using make -j. 2799 2800 - Issue #7716: Under Solaris, don't assume existence of /usr/xpg4/bin/grep in 2801 the configure script but use $GREP instead. Patch by Fabian Groffen. 2802 2803 - Issue #10475: Don't hardcode compilers for LDSHARED/LDCXXSHARED on NetBSD 2804 and DragonFly BSD. Patch by Nicolas Joly. 2805 2806 - Issue #10655: Fix the build on PowerPC on Linux with GCC when building with 2807 timestamp profiling (--with-tsc): the preprocessor test for the PowerPC 2808 support now looks for "__powerpc__" as well as "__ppc__": the latter seems to 2809 only be present on OS X; the former is the correct one for Linux with GCC. 2810 2811 - Issue #1099: Fix the build on MacOSX when building a framework with pydebug 2812 using GCC 4.0. 2813 2814 Tests 2815 ----- 2816 2817 - Issue #11164: Remove obsolete allnodes test from minidom test. 2818 2819 - Issue #12205: Fix test_subprocess failure due to uninstalled test data. 2820 2821 - Issue #5723: Improve json tests to be executed with and without accelerations. 2822 2823 - Issue #11910: Fix test_heapq to skip the C tests when _heapq is missing. 2824 2825 - Fix test_startfile to wait for child process to terminate before finishing. 2826 2827 - Issue #11719: Fix message about unexpected test_msilib skip on non-Windows 2828 platforms. Patch by Nadeem Vawda. 2829 2830 - Issue #7108: Fix test_commands to not fail when special attributes ('@' 2831 or '.') appear in 'ls -l' output. 2832 2833 - Issue #11490: test_subprocess:test_leaking_fds_on_error no longer gives a 2834 false positive if the last directory in the path is inaccessible. 2835 2836 - Issue #10822: Fix test_posix:test_getgroups failure under Solaris. Patch 2837 by Ross Lagerwall. 2838 2839 - Issue #6293: Have regrtest.py echo back sys.flags. This is done by default 2840 in whole runs and enabled selectively using ``--header`` when running an 2841 explicit list of tests. Original patch by Collin Winter. 2842 2843 - Issue #775964: test_grp now skips YP/NIS entries instead of failing when 2844 encountering them. 2845 2846 - Issue #7110: regrtest now sends test failure reports and single-failure 2847 tracebacks to stderr rather than stdout. 2848 2849 2850 What's New in Python 2.7.1? 2851 =========================== 2852 2853 *Release date: 2010-11-27* 2854 2855 Library 2856 ------- 2857 2858 - Issue #2236: distutils' mkpath ignored the mode parameter. 2859 2860 - Fix typo in one sdist option (medata-check). 2861 2862 - Issue #10323: itertools.islice() now consumes the minimum number of 2863 inputs before stopping. Formerly, the final state of the underlying 2864 iterator was undefined. 2865 2866 - Issue #10565: The collections.Iterator ABC now checks for both 2867 ``__iter__`` and ``next``. 2868 2869 - Issue #10092: Properly reset locale in calendar.Locale*Calendar classes. 2870 2871 - Issue #10459: Update CJK character names to Unicode 5.2. 2872 2873 - Issue #6098: Don't claim DOM level 3 conformance in minidom. 2874 2875 - Issue #10561: In pdb, clear the breakpoints by the breakpoint number. 2876 2877 - Issue #5762: Fix AttributeError raised by ``xml.dom.minidom`` when an empty 2878 XML namespace attribute is encountered. 2879 2880 - Issue #1710703: Write structures for an empty ZIP archive when a ZipFile is 2881 created in modes 'a' or 'w' and then closed without adding any files. Raise 2882 BadZipfile (rather than IOError) when opening small non-ZIP files. 2883 2884 - Issue #4493: urllib2 adds '/' in front of path components which does not 2885 start with '/. Common behavior exhibited by browsers and other clients. 2886 2887 - Issue #10407: Fix one NameError in distutils. 2888 2889 - Issue #10198: fix duplicate header written to wave files when writeframes() 2890 is called without data. 2891 2892 - Issue #10467: Fix BytesIO.readinto() after seeking into a position after the 2893 end of the file. 2894 2895 - Issue #5111: IPv6 Host in the Header is wrapped inside [ ]. Patch by Chandru. 2896 2897 IDLE 2898 ---- 2899 2900 - Issue #6378: idle.bat now runs with the appropriate Python version rather than 2901 the system default. Patch by Sridhar Ratnakumar. 2902 2903 Build 2904 ----- 2905 2906 - Backport r83399 to allow test_distutils to pass on installed versions. 2907 2908 - Issue #1303434: Generate ZIP file containing all PDBs. 2909 2910 Tests 2911 ----- 2912 2913 - Issue #9424: Replace deprecated assert* methods in the Python test suite. 2914 2915 Documentation 2916 ------------- 2917 2918 - Issue #10299: List the built-in functions in a table in functions.rst. 2919 2920 2921 What's New in Python 2.7.1 release candidate 1? 2922 =============================================== 2923 2924 *Release date: 2010-11-13* 2925 2926 Core and Builtins 2927 ----------------- 2928 2929 - Issue #10221: dict.pop(k) now has a key error message that includes the 2930 missing key (same message d[k] returns for missing keys). 2931 2932 - Issue #10125: Don't segfault when the iterator passed to 2933 ``file.writelines()`` closes the file. 2934 2935 - Issue #10186: Fix the SyntaxError caret when the offset is equal to the 2936 length of the offending line. 2937 2938 - Issue #9997: Don't let the name "top" have special significance in scope 2939 resolution. 2940 2941 - Issue #9862: Compensate for broken PIPE_BUF in AIX by hard coding 2942 its value as the default 512 when compiling on AIX. 2943 2944 - Issue #9675: CObject use is marked as a Py3k warning, not a deprecation 2945 warning. 2946 2947 - Issue #10068: Global objects which have reference cycles with their module's 2948 dict are now cleared again. This causes issue #7140 to appear again. 2949 2950 - Issue #9869: Make long() and PyNumber_Long return something of type 2951 long for a class whose __long__ method returns a plain int. This 2952 fixes an interpreter crash when initializing an instance of a long 2953 subclass from an object whose __long__ method returns a plain int. 2954 2955 - Issue #10006: type.__abstractmethods__ now raises an AttributeError. 2956 2957 - Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid 2958 thread-local storage key. 2959 2960 - Issue #4947: The write() method of sys.stdout and sys.stderr uses their 2961 encoding and errors attributes instead of using utf-8 in strict mode, to get 2962 the same behaviour than the print statement. 2963 2964 - Issue #9737: Fix a crash when trying to delete a slice or an item from 2965 a memoryview object. 2966 2967 - Restore GIL in nis_cat in case of error. 2968 2969 - Issue #9688: __basicsize__ and __itemsize__ must be accessed as Py_ssize_t. 2970 2971 - Issue #8530: Prevent stringlib fastsearch from reading beyond the front 2972 of an array. 2973 2974 - Issue #83755: Implicit set-to-frozenset conversion was not thread-safe. 2975 2976 - Issue #9416: Fix some issues with complex formatting where the 2977 output with no type specifier failed to match the str output: 2978 2979 - format(complex(-0.0, 2.0), '-') omitted the real part from the output, 2980 - format(complex(0.0, 2.0), '-') included a sign and parentheses. 2981 2982 - Issue #7616: Fix copying of overlapping memoryview slices with the Intel 2983 compiler. 2984 2985 Library 2986 ------- 2987 2988 - Issue #9926: Wrapped TestSuite subclass does not get __call__ executed 2989 2990 - Issue #4471: Properly shutdown socket in IMAP.shutdown(). Patch by 2991 Lorenzo M. Catucci. 2992 2993 - Issue #10126: Fix distutils' test_build when Python was built with 2994 --enable-shared. 2995 2996 - Fix typo in one sdist option (medata-check). 2997 2998 - Issue #9199: Fix incorrect use of distutils.cmd.Command.announce. 2999 3000 - Issue #1718574: Fix options that were supposed to accept arguments but did 3001 not in build_clib. 3002 3003 - Issue #9281: Prevent race condition with mkdir in distutils. Patch by 3004 Arfrever. 3005 3006 - Issue #10229: Fix caching error in gettext. 3007 3008 - Issue #10252: Close file objects in a timely manner in distutils code and 3009 tests. Patch by Brian Brazil, completed by Ãric Araujo. 3010 3011 - Issue #10311: The signal module now restores errno before returning from 3012 its low-level signal handler. Patch by Hallvard B Furuseth. 3013 3014 - Issue #10038: json.loads() on str should always return unicode (regression 3015 from Python 2.6). Patch by Walter Dörwald. 3016 3017 - Issue #120176: Wrapped TestSuite subclass does not get __call__ executed. 3018 3019 - Issue #6706: asyncore accept() method no longer raises 3020 EWOULDBLOCK/ECONNABORTED on incomplete connection attempt but returns None 3021 instead. 3022 3023 - Issue #10266: uu.decode didn't close in_file explicitly when it was given 3024 as a filename. Patch by Brian Brazil. 3025 3026 - Issue #10246: uu.encode didn't close file objects explicitly when filenames 3027 were given to it. Patch by Brian Brazil. 3028 3029 - Issue #10253: FileIO leaks a file descriptor when trying to open a file 3030 for append that isn't seekable. Patch by Brian Brazil. 3031 3032 - Issue #6105: json.dumps now respects OrderedDict's iteration order. 3033 3034 - Issue #9295: Fix a crash under Windows when calling close() on a file 3035 object with custom buffering from two threads at once. 3036 3037 - Issue #5027: The standard ``xml`` namespace is now understood by 3038 xml.sax.saxutils.XMLGenerator as being bound to 3039 http://www.w3.org/XML/1998/namespace. Patch by Troy J. Farrell. 3040 3041 - Issue #10163: Skip unreadable registry keys during mimetypes 3042 initialization. 3043 3044 - Issue #5117: Fixed root directory related issue on posixpath.relpath() and 3045 ntpath.relpath(). 3046 3047 - Issue #9409: Fix the regex to match all kind of filenames, for interactive 3048 debugging in doctests. 3049 3050 - Issue #6612: Fix site and sysconfig to catch os.getcwd() error, eg. if the 3051 current directory was deleted. Patch written by W. Trevor King. 3052 3053 - Issue #10045: Improved performance when writing after seeking past the 3054 end of the "file" in cStringIO. 3055 3056 - Issue #9948: Fixed problem of losing filename case information. 3057 3058 - Issue #9437: Fix building C extensions with non-default LDFLAGS. 3059 3060 - Issue #9759: GzipFile now raises ValueError when an operation is attempted 3061 after the file is closed. Patch by Jeffrey Finkelstein. 3062 3063 - Issue #9042: Fix interaction of custom translation classes and caching in 3064 gettext. 3065 3066 - Issue #9065: tarfile no longer uses "root" as the default for the uname and 3067 gname field. 3068 3069 - Issue #1050268: parseaddr now correctly quotes double quote and backslash 3070 characters that appear inside quoted strings in email addresses. 3071 3072 - Issue #10004: quoprimime no longer generates a traceback when confronted 3073 with invalid characters after '=' in a Q-encoded word. 3074 3075 - Issue #9950: Fix socket.sendall() crash or misbehaviour when a signal is 3076 received. Now sendall() properly calls signal handlers if necessary, 3077 and retries sending if these returned successfully, including on sockets 3078 with a timeout. 3079 3080 - Issue #9947: logging: Fixed locking bug in stopListening. 3081 3082 - Issue #9945: logging: Fixed locking bugs in addHandler/removeHandler. 3083 3084 - Issue #9936: Fixed executable lines' search in the trace module. 3085 3086 - Issue #9928: Properly initialize the types exported by the bz2 module. 3087 3088 - Issue #9854: The default read() implementation in io.RawIOBase now 3089 handles non-blocking readinto() returning None correctly. 3090 3091 - Issue #9729: Fix the signature of SSLSocket.recvfrom() and 3092 SSLSocket.sendto() to match the corresponding socket methods. Also, 3093 fix various SSLSocket methods to raise socket.error rather than an 3094 unhelpful TypeError when called on an unconnected socket. Original patch 3095 by Andrew Bennetts. 3096 3097 - Issue #9826: OrderedDict.__repr__ can now handle self-referential 3098 values: d['x'] = d. 3099 3100 - Issue #767645: Set os.path.supports_unicode_filenames to True on Mac OS X. 3101 3102 - Issue #9837: The read() method of ZipExtFile objects (as returned by 3103 ZipFile.open()) could return more bytes than requested. 3104 3105 - Issue #9825: removed __del__ from the definition of collections.OrderedDict. 3106 This prevents user-created self-referencing ordered dictionaries from 3107 becoming permanently uncollectable GC garbage. The downside is that 3108 removing __del__ means that the internal doubly-linked list has to wait for 3109 GC collection rather than freeing memory immediately when the refcnt drops 3110 to zero. 3111 3112 - Issue #9816: random.Random.jumpahead(n) did not produce a sufficiently 3113 different internal state for small values of n. Fixed by salting the 3114 value. 3115 3116 - Issue #9792: In case of connection failure, socket.create_connection() 3117 would swallow the exception and raise a new one, making it impossible 3118 to fetch the original errno, or to filter timeout errors. Now the 3119 original error is re-raised. 3120 3121 - Issue #9758: When fcntl.ioctl() was called with mutable_flag set to True, 3122 and the passed buffer was exactly 1024 bytes long, the buffer wouldn't 3123 be updated back after the system call. Original patch by Brian Brazil. 3124 3125 - Issue #1100562: Fix deep-copying of objects derived from the list and 3126 dict types. Patch by Michele Orrù and Björn Lindqvist. 3127 3128 - Issue #7005: Fixed output of None values for RawConfigParser.write and 3129 ConfigParser.write. 3130 3131 - Issue #808164: Fixed socket.close to avoid references to globals, to 3132 avoid issues when socket.close is called from a __del__ method. 3133 3134 - Issue #2986: difflib.SequenceMatcher gets a new parameter, autojunk, which 3135 can be set to False to turn off the previously undocumented 'popularity' 3136 heuristic. Patch by Terry Reedy and Eli Bendersky 3137 3138 - Issue #8797: urllib2 does a retry for Basic Authentication failure instead of 3139 falling into recursion. 3140 3141 - Issue #1194222: email.utils.parsedate now returns RFC2822 compliant four 3142 character years even if the message contains RFC822 two character years. 3143 3144 - Issue #8750: Fixed MutableSet's methods to correctly handle 3145 reflexive operations, namely x -= x and x ^= x. 3146 3147 - Issue #9129: smtpd.py is vulnerable to DoS attacks deriving from missing 3148 error handling when accepting a new connection. 3149 3150 - Issue #658749: asyncore's connect() method now correctly interprets winsock 3151 errors. 3152 3153 - Issue #9501: Fixed logging regressions in cleanup code. 3154 3155 - Issue #9214: Set operations on KeysView or ItemsView in the collections 3156 module now correctly return a set. (Patch by Eli Bendersky.) 3157 3158 - Issue #9617: Signals received during a low-level write operation aren't 3159 ignored by the buffered IO layer anymore. 3160 3161 - Issue #2521: Use weakrefs on for caching in the abc module, so that classes 3162 are not held onto after they are deleted elsewhere. 3163 3164 - Issue #9626: the view methods for collections.OrderedDict() were returning 3165 the unordered versions inherited from dict. Those methods are now 3166 overridden to provide ordered views. 3167 3168 - Issue #8688: MANIFEST files created by distutils now include a magic 3169 comment indicating they are generated. Manually maintained MANIFESTs 3170 without this marker will not be overwritten or removed. 3171 3172 - Issue #7467: when reading a file from a ZIP archive, its CRC is checked 3173 and a BadZipfile error is raised if it doesn't match (as used to be the 3174 case in Python 2.5 and earlier). 3175 3176 - Issue #9550: a BufferedReader could issue an additional read when the 3177 original read request had been satisfied, which could block indefinitely 3178 when the underlying raw IO channel was e.g. a socket. Report and original 3179 patch by Jason V. Miller. 3180 3181 - Issue #9551: Don't raise TypeError when setting the value to None for 3182 SafeConfigParser instances constructed with allow_no_value == True. 3183 3184 - Issue #6915: Under Windows, os.listdir() didn't release the Global 3185 Interpreter Lock around all system calls. Original patch by Ryan Kelly. 3186 3187 - Issue #3757: thread-local objects now support cyclic garbage collection. 3188 Thread-local objects involved in reference cycles will be deallocated 3189 timely by the cyclic GC, even if the underlying thread is still running. 3190 3191 - Issue #6231: Fix xml.etree.ElementInclude to include the tail of the 3192 current node. 3193 3194 - Issue #6869: Fix a refcount problem in the _ctypes extension. 3195 3196 - Issue5504 - ctypes should now work with systems where mmap can't be 3197 PROT_WRITE and PROT_EXEC. 3198 3199 - Fix Issue8280 - urllib2's Request method will remove fragements in the url. 3200 This is how it is supposed to work, wget and curl do the same. Previous 3201 behavior was wrong. 3202 3203 - Issue #2944: asyncore doesn't handle connection refused correctly. 3204 3205 - Issue #3196: email header decoding is now forgiving if an RFC2047 3206 encoded word encoded in base64 is lacking padding. 3207 3208 - Issue #9444: Argparse now uses the first element of prefix_chars as 3209 the option character for the added 'h/help' option if prefix_chars 3210 does not contain a '-', instead of raising an error. 3211 3212 - Issue #9354: Provide getsockopt() in asyncore's file_wrapper. 3213 3214 - Issue #9428: Fix running scripts with the profile/cProfile modules from 3215 the command line. 3216 3217 - Issue #7781: Fix restricting stats by entry counts in the pstats 3218 interactive browser. 3219 3220 - Issue #9209: Do not crash in the pstats interactive browser on invalid 3221 regular expressions. 3222 3223 - Issue #7372: Fix pstats regression when stripping paths from profile 3224 data generated with the profile module. 3225 3226 - Issue #4108: In urllib.robotparser, if there are multiple 'User-agent: *' 3227 entries, consider the first one. 3228 3229 - Issue #8397: Raise an error when attempting to mix iteration and regular 3230 reads on a BZ2File object, rather than returning incorrect results. 3231 3232 - Issue #5294: Fix the behavior of pdb's "continue" command when called 3233 in the top-level debugged frame. 3234 3235 - Issue #5727: Restore the ability to use readline when calling into pdb 3236 in doctests. 3237 3238 - Issue #6719: In pdb, do not stop somewhere in the encodings machinery 3239 if the source file to be debugged is in a non-builtin encoding. 3240 3241 - Issue #8048: Prevent doctests from failing when sys.displayhook has 3242 been reassigned. 3243 3244 - Issue #8015: In pdb, do not crash when an empty line is entered as 3245 a breakpoint command. 3246 3247 - Issue #9448: Fix a leak of OS resources (mutexes or semaphores) when 3248 re-initializing a buffered IO object by calling its ``__init__`` method. 3249 3250 - Issue #7909: Do not touch paths with the special prefixes ``\\.\`` 3251 or ``\\?\`` in ntpath.normpath(). 3252 3253 - Issue #5146: Handle UID THREAD command correctly in imaplib. 3254 3255 - Issue #5147: Fix the header generated for cookie files written by 3256 http.cookiejar.MozillaCookieJar. 3257 3258 - Issue #8198: In pydoc, output all help text to the correct stream 3259 when sys.stdout is reassigned. 3260 3261 - Issue #7395: Fix tracebacks in pstats interactive browser. 3262 3263 - Issue #8230: Fix Lib/test/sortperf.py. 3264 3265 - Issue #1713: Fix os.path.ismount(), which returned true for symbolic links 3266 across devices. 3267 3268 - Issue #8826: Properly load old-style "expires" attribute in http.cookies. 3269 3270 - Issue #1690103: Fix initial namespace for code run with trace.main(). 3271 3272 - Issue #8471: In doctest, properly reset the output stream to an empty 3273 string when Unicode was previously output. 3274 3275 - Issue #8620: when a Cmd is fed input that reaches EOF without a final 3276 newline, it no longer truncates the last character of the last command line. 3277 3278 - Issue #6213: Implement getstate() and setstate() methods of utf-8-sig and 3279 utf-16 incremental encoders. 3280 3281 - Issue #7113: Speed up loading in ConfigParser. Patch by Åukasz Langa. 3282 3283 - Issue #3704: cookielib was not properly handling URLs with a / in the 3284 parameters. 3285 3286 - Issue #9032: XML-RPC client retries the request on EPIPE error. The EPIPE 3287 error occurs when the server closes the socket and the client sends a big 3288 XML-RPC request. 3289 3290 - Issue #5542: Remove special logic that closes HTTPConnection socket on EPIPE. 3291 3292 - Issue #4629: getopt raises an error if an argument ends with = whereas getopt 3293 doesn't except a value (eg. --help= is rejected if getopt uses ['help='] long 3294 options). 3295 3296 - Issue #7895: platform.mac_ver() no longer crashes after calling os.fork() 3297 3298 - Issue #5395: array.fromfile() would raise a spurious EOFError when an 3299 I/O error occurred. Now an IOError is raised instead. Patch by chuck 3300 (Jan Hosang). 3301 3302 - Issue #7646: The fnmatch pattern cache no longer grows without bound. 3303 3304 - Issue #9136: Fix 'dictionary changed size during iteration' 3305 RuntimeError produced when profiling the decimal module. This was 3306 due to a dangerous iteration over 'locals()' in Context.__init__. 3307 3308 - Fix extreme speed issue in Decimal.pow when the base is an exact 3309 power of 10 and the exponent is tiny (for example, 3310 Decimal(10) ** Decimal('1e-999999999')). 3311 3312 - Issue #9161: Fix regression in optparse's acceptance of unicode 3313 strings in add_option calls. 3314 3315 - Issue #9130: Fix validation of relative imports in parser module. 3316 3317 - Issue #9128: Fix validation of class decorators in parser module. 3318 3319 - Issue #9164: Ensure sysconfig handles dupblice archs while building on OSX 3320 3321 - Issue #9315: Fix for the trace module to record correct class name 3322 for tracing methods. 3323 3324 Extension Modules 3325 ----------------- 3326 3327 - Issue #9054: Fix a crash occurring when using the pyexpat module 3328 with expat version 2.0.1. 3329 3330 - Issue #10003: Allow handling of SIGBREAK on Windows. Fixes a regression 3331 introduced by issue #9324. 3332 3333 - Issue #8734: Avoid crash in msvcrt.get_osfhandle() when an invalid file 3334 descriptor is provided. Patch by Pascal Chambon. 3335 3336 - Issue #7736: Release the GIL around calls to opendir() and closedir() 3337 in the posix module. Patch by Marcin Bachry. 3338 3339 - As a result of issue #2521, the _weakref module is now compiled into the 3340 interpreter by default. 3341 3342 - Issue #9324: Add parameter validation to signal.signal on Windows in order 3343 to prevent crashes. 3344 3345 - Issue #9526: Remove some outdated (int) casts that were preventing 3346 the array module from working correctly with arrays of more than 3347 2**31 elements. 3348 3349 - Fix memory leak in ssl._ssl._test_decode_cert. 3350 3351 - Issue #8065: Fix memory leak in readline module (from failure to 3352 free the result of history_get_history_state()). 3353 3354 - Issue #9450: Fix memory leak in readline.replace_history_item and 3355 readline.remove_history_item for readline version >= 5.0. 3356 3357 - Issue #8105: Validate file descriptor passed to mmap.mmap on Windows. 3358 3359 - Issue #1019882: Fix IndexError when loading certain hotshot stats. 3360 3361 - Issue #9422: Fix memory leak when re-initializing a struct.Struct object. 3362 3363 - Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly 3364 compared to other unix systems. In particular, os.getgroups() does 3365 not reflect any changes made using os.setgroups() but basicly always 3366 returns the same information as the id command. 3367 3368 os.getgroups() can now return more than 16 groups on MacOSX. 3369 3370 - Issue #9277: Fix bug in struct.pack for bools in standard mode 3371 (e.g., struct.pack('>?')): if conversion to bool raised an exception 3372 then that exception wasn't properly propagated on machines where 3373 char is unsigned. 3374 3375 - Issue #7567: Don't call `setupterm' twice. 3376 3377 Tools/Demos 3378 ----------- 3379 3380 - Issue #7287: Demo/imputil/knee.py was removed. 3381 3382 - Issue #9188: The gdb extension now handles correctly narrow (UCS2) as well 3383 as wide (UCS4) unicode builds for both the host interpreter (embedded 3384 inside gdb) and the interpreter under test. 3385 3386 Build 3387 ----- 3388 3389 - Issue #8852: Allow the socket module to build on OpenSolaris. 3390 3391 - Issue #10054: Some platforms provide uintptr_t in inttypes.h. Patch by 3392 Akira Kitada. 3393 3394 - Issue #10055: Make json C89-compliant in UCS4 mode. 3395 3396 - Issue #1633863: Don't ignore $CC under AIX. 3397 3398 - Issue #9810: Compile bzip2 source files in python's project file 3399 directly. It used to be built with bzip2's makefile. 3400 3401 - Issue #941346: Improve the build process under AIX and allow Python to 3402 be built as a shared library. Patch by Sébastien Sablé. 3403 3404 - Issue #4026: Make the fcntl extension build under AIX. Patch by Sébastien 3405 Sablé. 3406 3407 - Issue #3101: Helper functions _add_one_to_index_C() and 3408 _add_one_to_index_F() become _Py_add_one_to_index_C() and 3409 _Py_add_one_to_index_F(), respectively. 3410 3411 - Issue #9700: define HAVE_BROKEN_POSIX_SEMAPHORES under AIX 6.x. Patch by 3412 Sébastien Sablé. 3413 3414 - Issue #9280: Make sharedinstall depend on sharedmods. 3415 3416 - Issue #9275: The OSX installer once again installs links to binaries in 3417 ``/usr/local/bin``. 3418 3419 - Issue #9392: A framework build on OSX will once again use a versioned name 3420 of the ``2to3`` tool, that is you can use ``2to3-2.7`` to select the Python 3421 2.7 edition of 2to3. 3422 3423 - Issue #9701: The MacOSX installer can patch the shell profile to ensure that 3424 the "bin" directory inside the framework is on the shell's search path. This 3425 feature now also supports the ZSH shell. 3426 3427 - Issue #7473: avoid link errors when building a framework with a different 3428 set of architectures than the one that is currently installed. 3429 3430 Tests 3431 ----- 3432 3433 - Issue #9978: Wait until subprocess completes initialization. (Win32KillTests 3434 in test_os) 3435 3436 - Issue #9894: Do not hardcode ENOENT in test_subprocess. 3437 3438 - Issue #9323: Make test.regrtest.__file__ absolute, this was not always the 3439 case when running profile or trace, for example. 3440 3441 - Issue #9315: Added tests for the trace module. Patch by Eli Bendersky. 3442 3443 - Strengthen test_unicode with explicit type checking for assertEqual tests. 3444 3445 - Issue #8857: Provide a test case for socket.getaddrinfo. 3446 3447 - Issue #7564: Skip test_ioctl if another process is attached to /dev/tty. 3448 3449 - Issue #8433: Fix test_curses failure with newer versions of ncurses. 3450 3451 - Issue #9496: Provide a test suite for the rlcompleter module. Patch by 3452 Michele Orrù. 3453 3454 - Issue #8605: Skip test_gdb if Python is compiled with optimizations. 3455 3456 - Issue #9568: Fix test_urllib2_localnet on OS X 10.3. 3457 3458 Documentation 3459 ------------- 3460 3461 - Issue #9817: Add expat COPYING file; add expat, libffi and expat licenses 3462 to Doc/license.rst. 3463 3464 - Issue #9524: Document that two CTRL* signals are meant for use only 3465 with os.kill. 3466 3467 - Issue #9255: Document that the 'test' package is for internal Python use 3468 only. 3469 3470 - Issue #7829: Document in dis that bytecode is an implementation detail. 3471 3472 3473 What's New in Python 2.7? 3474 ========================= 3475 3476 *Release date: 2010-07-03* 3477 3478 Core and Builtins 3479 ----------------- 3480 3481 - Prevent assignment to set literals. 3482 3483 Library 3484 ------- 3485 3486 - Issue #1868: Eliminate subtle timing issues in thread-local objects by 3487 getting rid of the cached copy of thread-local attribute dictionary. 3488 3489 - Issue #9125: Add recognition of 'except ... as ...' syntax to parser module. 3490 3491 Extension Modules 3492 ----------------- 3493 3494 - Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module, 3495 ensure that the input string length is a multiple of the frame size. 3496 3497 - Issue #9075: In the ssl module, remove the setting of a ``debug`` flag 3498 on an OpenSSL structure. 3499 3500 3501 What's New in Python 2.7 release candidate 2? 3502 ============================================= 3503 3504 *Release date: 2010-06-20* 3505 3506 Core and Builtins 3507 ----------------- 3508 3509 - Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError. 3510 3511 - Issue #8202: Previous change to ``sys.argv[0]`` handling for -m command line 3512 option reverted due to unintended side effects on handling of ``sys.path``. 3513 See tracker issue for details. 3514 3515 - Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash 3516 the interpreter with characters outside the Basic Multilingual Plane 3517 (higher than 0x10000). 3518 3519 - In the unicode/str.format(), raise a ValueError when indexes to arguments are 3520 too large. 3521 3522 Build 3523 ----- 3524 3525 - Issue #8854: Fix finding Visual Studio 2008 on Windows x64. 3526 3527 Library 3528 ------- 3529 3530 - Issue #6589: cleanup asyncore.socket_map in case smtpd.SMTPServer constructor 3531 raises an exception. 3532 3533 - Issue #8959: fix regression caused by using unmodified libffi 3534 library on Windows. ctypes does now again check the stack before 3535 and after calling foreign functions. 3536 3537 - Issue #8720: fix regression caused by fix for #4050 by making getsourcefile 3538 smart enough to find source files in the linecache. 3539 3540 - Issue #8986: math.erfc was incorrectly raising OverflowError for 3541 values between -27.3 and -30.0 on some platforms. 3542 3543 - Issue #8924: logging: Improved error handling for Unicode in exception text. 3544 3545 - Issue #8948: cleanup functions and class / module setups and teardowns are 3546 now honored in unittest debug methods. 3547 3548 Documentation 3549 ------------- 3550 3551 - Issues #8909: Added the size of the bitmap used in the installer created by 3552 distutils' bdist_wininst. Patch by Anatoly Techtonik. 3553 3554 Misc 3555 ---- 3556 3557 - Issue #8362: Add maintainers.rst: list of module maintainers 3558 3559 3560 What's New in Python 2.7 Release Candidate 1? 3561 ============================================= 3562 3563 *Release date: 2010-06-05* 3564 3565 Core and Builtins 3566 ----------------- 3567 3568 - Issue #8271: during the decoding of an invalid UTF-8 byte sequence, only the 3569 start byte and the continuation byte(s) are now considered invalid, instead 3570 of the number of bytes specified by the start byte. 3571 E.g.: '\xf1\x80AB'.decode('utf-8', 'replace') now returns u'\ufffdAB' and 3572 replaces with U+FFFD only the start byte ('\xf1') and the continuation byte 3573 ('\x80') even if '\xf1' is the start byte of a 4-bytes sequence. 3574 Previous versions returned a single u'\ufffd'. 3575 3576 - Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of 3577 __hash__ in 3.x" warning. Also fix "XXX undetected error" that 3578 arises from the "Overriding __eq__ blocks inheritance ..." warning 3579 when turned into an exception: in this case the exception simply 3580 gets ignored. 3581 3582 - Issue #8748: Fix two issues with comparisons between complex and integer 3583 objects. (1) The comparison could incorrectly return True in some cases 3584 (2**53+1 == complex(2**53) == 2**53), breaking transivity of equality. 3585 (2) The comparison raised an OverflowError for large integers, leading 3586 to unpredictable exceptions when combining integers and complex objects 3587 in sets or dicts. 3588 3589 - Issue #5211: Implicit coercion for the complex type is now completely 3590 removed. (Coercion for arithmetic operations was already removed in 2.7 3591 alpha 4, but coercion for rich comparisons was accidentally left in.) 3592 3593 - Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding 3594 and error handler, instead of writing to the C stderr file in utf-8 3595 3596 - Issue #7902: When using explicit relative import syntax, don't try implicit 3597 relative import semantics. 3598 3599 - Issue #7079: Fix a possible crash when closing a file object while using it 3600 from another thread. Patch by Daniel Stutzbach. 3601 3602 - Issue #8868: Fix that ensures that python scripts have access to the 3603 Window Server again in a framework build on MacOSX 10.5 or earlier. 3604 3605 C-API 3606 ----- 3607 3608 - Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows embedders 3609 of the interpreter to set sys.argv without also modifying sys.path. This 3610 helps fix `CVE-2008-5983 3611 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_. 3612 3613 Library 3614 ------- 3615 3616 - Issue #8302: SkipTest in unittest.TestCase.setUpClass or setUpModule is now 3617 reported as a skip rather than an error. 3618 3619 - Issue #8351: Excessively large diffs due to 3620 unittest.TestCase.assertSequenceEqual are no longer included in failure 3621 reports. 3622 3623 - Issue #8899: time.struct_time now has class and atribute docstrings. 3624 3625 - Issue #4487: email now accepts as charset aliases all codec aliases 3626 accepted by the codecs module. 3627 3628 - Issue #6470: Drop UNC prefix in FixTk. 3629 3630 - Issue #5610: feedparser no longer eats extra characters at the end of 3631 a body part if the body part ends with a \r\n. 3632 3633 - Issue #8833: tarfile created hard link entries with a size field != 0 by 3634 mistake. 3635 3636 - Issue #1368247: set_charset (and therefore MIMEText) now automatically 3637 encodes a unicode _payload to the output_charset. 3638 3639 - Issue #7150: Raise OverflowError if the result of adding or subtracting 3640 timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range. 3641 3642 - Issue #6662: Fix parsing of malformatted charref (&#bad;), patch written by 3643 Fredrik Håård 3644 3645 - Issue #8016: Add the CP858 codec. 3646 3647 - Issue #3924: Ignore cookies with invalid "version" field in cookielib. 3648 3649 - Issue #6268: Fix seek() method of codecs.open(), don't read or write the BOM 3650 twice after seek(0). Fix also reset() method of codecs, UTF-16, UTF-32 and 3651 StreamWriter classes. 3652 3653 - Issue #5640: Fix Shift-JIS incremental encoder for error handlers different 3654 than 'strict'. 3655 3656 - Issue #8782: Add a trailing newline in linecache.updatecache to the last line 3657 of files without one. 3658 3659 - Issue #8729: Return NotImplemented from ``collections.Mapping.__eq__()`` when 3660 comparing to a non-mapping. 3661 3662 - Issue #8759: Fix user paths in sysconfig for posix and os2 schemes. 3663 3664 - Issue #1285086: Speed up ``urllib.quote()`` and urllib.unquote for simple 3665 cases. 3666 3667 - Issue #8688: Distutils now recalculates MANIFEST every time. 3668 3669 - Issue #5099: The ``__del__()`` method of ``subprocess.Popen`` (and the methods 3670 it calls) referenced global objects, causing errors to pop up during 3671 interpreter shutdown. 3672 3673 Extension Modules 3674 ----------------- 3675 3676 - Issue #7384: If the system readline library is linked against ncurses, 3677 the curses module must be linked against ncurses as well. Otherwise it 3678 is not safe to load both the readline and curses modules in an application. 3679 3680 - Issue #2810: Fix cases where the Windows registry API returns 3681 ERROR_MORE_DATA, requiring a re-try in order to get the complete result. 3682 3683 - Issue #8674: Fixed a number of incorrect or undefined-behaviour-inducing 3684 overflow checks in the ``audioop`` module. 3685 3686 Tests 3687 ----- 3688 3689 - Issue #8889: test_support.transient_internet rewritten so that the new 3690 checks also work on FreeBSD, which lacks EAI_NODATA. 3691 3692 - Issue #8835: test_support.transient_internet() catches gaierror(EAI_NONAME) 3693 and gaierror(EAI_NODATA) 3694 3695 - Issue #7449: Skip test_socketserver if threading support is disabled 3696 3697 - On darwin, ``test_site`` assumed that a framework build was being used, 3698 leading to a failure where four directories were expected for site-packages 3699 instead of two in a non-framework build. 3700 3701 Build 3702 ----- 3703 3704 - Display installer warning that Windows 2000 won't be supported in future 3705 releases. 3706 3707 - Issues #1759169, #8864: Drop _XOPEN_SOURCE on Solaris, define it for 3708 multiprocessing only. 3709 3710 Tools/Demos 3711 ----------- 3712 3713 - Issue #5464: Implement plural forms in msgfmt.py. 3714 3715 3716 What's New in Python 2.7 beta 2? 3717 ================================ 3718 3719 *Release date: 2010-05-08* 3720 3721 Core and Builtins 3722 ----------------- 3723 3724 - Run Clang 2.7's static analyzer for ``Objects/`` and ``Python/``. 3725 3726 - Issue #1533: Fix inconsistency in range function argument processing: any 3727 non-float non-integer argument is now converted to an integer (if possible) 3728 using its __int__ method. Previously, only small arguments were treated this 3729 way; larger arguments (those whose __int__ was outside the range of a C long) 3730 would produce a TypeError. 3731 3732 - Issue #8202: ``sys.argv[0]`` is now set to '-m' instead of '-c' when searching 3733 for the module file to be executed with the -m command line option. 3734 3735 - Issue #7319: When -Q is used, do not silence DeprecationWarning. 3736 3737 - Issue #7332: Remove the 16KB stack-based buffer in 3738 ``PyMarshal_ReadLastObjectFromFile``, which doesn't bring any noticeable 3739 benefit compared to the dynamic memory allocation fallback. Patch by 3740 Charles-François Natali. 3741 3742 - Issue #8417: Raise an OverflowError when an integer larger than sys.maxsize is 3743 passed to bytearray. 3744 3745 - Issue #7072: ``isspace(0xa0)`` is true on Mac OS X. 3746 3747 - Issue #8404: Fix set operations on dictionary views. 3748 3749 - Issue #8084: PEP 370 now conforms to system conventions for framework builds 3750 on MacOS X. That is, ``python setup.py install --user`` will install into 3751 ``~/Library/Python/2.7`` instead of ``~/.local``. 3752 3753 Library 3754 ------- 3755 3756 - Issue #8681: Make the zlib module's error messages more informative when the 3757 zlib itself doesn't give any detailed explanation. 3758 3759 - Issue #8571: Fix an internal error when compressing or decompressing a chunk 3760 larger than 1GB with the zlib module's compressor and decompressor objects. 3761 3762 - Issue #8573: asyncore ``_strerror()`` function might throw ValueError. 3763 3764 - Issue #8483: asyncore.dispatcher's __getattr__ method produced confusing error 3765 messages when accessing undefined class attributes because of the cheap 3766 inheritance with the underlying socket object. The cheap inheritance has been 3767 deprecated. 3768 3769 - Issue #4265: ``shutil.copyfile()`` was leaking file descriptors when disk 3770 fills. Patch by Tres Seaver. 3771 3772 - Issue #7755: Use an unencumbered audio file for tests. 3773 3774 - Issue #8621: ``uuid.uuid4()`` returned the same sequence of values in the 3775 parent and any children created using ``os.fork`` on Mac OS X 10.6. 3776 3777 - Issue #8313: ``traceback.format_exception_only()`` encodes unicode message to 3778 ASCII with backslashreplace error handler if ``str(value)`` failed. 3779 3780 - Issue #8567: Fix precedence of signals in Decimal module: when a Decimal 3781 operation raises multiple signals and more than one of those signals is 3782 trapped, the specification determines the order in which the signals should be 3783 handled. In many cases this order wasn't being followed, leading to the wrong 3784 Python exception being raised. 3785 3786 - Issue #7865: The close() method of :mod:`io` objects should not swallow 3787 exceptions raised by the implicit flush(). Also ensure that calling close() 3788 several times is supported. Patch by Pascal Chambon. 3789 3790 - Issue #8576: logging updated to remove usage of find_unused_port(). 3791 3792 - Issue #4687: Fix accuracy of garbage collection runtimes displayed with 3793 gc.DEBUG_STATS. 3794 3795 - Issue #8354: The siginterrupt setting is now preserved for all signals, not 3796 just SIGCHLD. 3797 3798 - Issue #7192: ``webbrowser.get("firefox")`` now works on Mac OS X, as does 3799 ``webbrowser.get("safari")``. 3800 3801 - Issue #8577: ``distutils.sysconfig.get_python_inc()`` now makes a difference 3802 between the build dir and the source dir when looking for "python.h" or 3803 "Include". 3804 3805 - Issue #8464: tarfile no longer creates files with execute permissions set when 3806 mode="w|" is used. 3807 3808 - Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of 3809 the Linux kernel. Patch by Yaniv Aknin. 3810 3811 - Issue #6312: Fix http HEAD request when the transfer encoding is chunked. It 3812 should correctly return an empty response now. 3813 3814 - Issue #7490: To facilitate sharing of doctests between 2.x and 3.x test 3815 suites, the ``IGNORE_EXCEPTION_DETAIL`` directive now also ignores the module 3816 location of the raised exception. Based on initial patch by Lennart Regebro. 3817 3818 - Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline before 3819 the certificate footer. Patch by Kyle VanderBeek. 3820 3821 - Issue #8546: Reject None given as the buffering argument to ``_pyio.open()``. 3822 3823 - Issue #8549: Fix compiling the _ssl extension under AIX. Patch by Sridhar 3824 Ratnakumar. 3825 3826 - Issue #6656: Fix locale.format_string to handle escaped percents and mappings. 3827 3828 - Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown, where 3829 the method could block indefinitely if called just before the event loop 3830 started running. This also fixes the occasional freezes witnessed in 3831 test_httpservers. 3832 3833 - Issue #5103: SSL handshake would ignore the socket timeout and block 3834 indefinitely if the other end didn't respond. 3835 3836 - The do_handshake() method of SSL objects now adjusts the blocking mode of the 3837 SSL structure if necessary (as other methods already do). 3838 3839 - Issue #7507: Quote "!" in pipes.quote(); it is special to some shells. 3840 3841 - Issue #5238: Calling makefile() on an SSL object would prevent the underlying 3842 socket from being closed until all objects get truely destroyed. 3843 3844 - Issue #7943: Fix circular reference created when instantiating an SSL socket. 3845 Initial patch by Péter Szabó. 3846 3847 - Issue #8451: Syslog module now uses basename(sys.argv[0]) instead of the 3848 string "python" as the *ident*. openlog() arguments are all optional and 3849 keywords. 3850 3851 - Issue #8108: Fix the unwrap() method of SSL objects when the socket has a 3852 non-infinite timeout. Also make that method friendlier with applications 3853 wanting to continue using the socket in clear-text mode, by disabling 3854 OpenSSL's internal readahead. Thanks to Darryl Miles for guidance. 3855 3856 - Issue #8484: Load all ciphers and digest algorithms when initializing the _ssl 3857 extension, such that verification of some SSL certificates doesn't fail 3858 because of an "unknown algorithm". 3859 3860 - Issue #8437: Fix test_gdb failures, patch written by Dave Malcolm 3861 3862 - Issue #4814: The timeout parameter is now applied also for connections 3863 resulting from PORT/EPRT commands. 3864 3865 - Issue #8463: Add missing reference to bztar in shutil's documentation. 3866 3867 - Issue #8438: Remove reference to the missing "surrogateescape" encoding error 3868 handler from the new IO library. 3869 3870 - Issue #3817: ftplib.FTP.abort() method now considers 225 a valid response code 3871 as stated in RFC-959 at chapter 5.4. 3872 3873 - Issue #8279: Fix test_gdb failures. 3874 3875 - Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the 3876 available cipher list. Helps fix test_ssl with OpenSSL 1.0.0. 3877 3878 - Issue #2987: RFC 2732 support for urlparse (IPv6 addresses). Patch by Tony 3879 Locke and Hans Ulrich Niedermann. 3880 3881 - Issue #7585: difflib context and unified diffs now place a tab between 3882 filename and date, conforming to the 'standards' they were originally designed 3883 to follow. This improves compatibility with patch tools. 3884 3885 - Issue #7472: Fixed typo in email.encoders module; messages using ISO-2022 3886 character sets will now consistently use a Content-Transfer-Encoding of 7bit 3887 rather than sometimes being marked as 8bit. 3888 3889 - Issue #8330: Fix expected output in test_gdb. 3890 3891 - Issue #8374: Update the internal alias table in the :mod:`locale` module to 3892 cover recent locale changes and additions. 3893 3894 Extension Modules 3895 ----------------- 3896 3897 - Issue #8644: Improved accuracy of ``timedelta.total_seconds()``. 3898 3899 - Use Clang 2.7's static analyzer to find places to clean up some code. 3900 3901 - Build the ossaudio extension on GNU/kFreeBSD. 3902 3903 - On Windows, ctypes does no longer check the stack before and after calling a 3904 foreign function. This allows to use the unmodified libffi library. 3905 3906 Tests 3907 ----- 3908 3909 - Issue #8672: Add a zlib test ensuring that an incomplete stream can be handled 3910 by a decompressor object without errors (it returns incomplete uncompressed 3911 data). 3912 3913 - Issue #8490: asyncore now has a more solid test suite which actually tests its 3914 API. 3915 3916 - Issue #8576: Remove use of find_unused_port() in test_smtplib and 3917 test_multiprocessing. Patch by Paul Moore. 3918 3919 - Issue #7449: Fix many tests to support Python compiled without thread support. 3920 Patches written by Jerry Seutter. 3921 3922 - Issue #8108: test_ftplib's non-blocking SSL server now has proper handling of 3923 SSL shutdowns. 3924 3925 Build 3926 ----- 3927 3928 - Issue #8625: Turn off optimization in ``--with-pydebug`` builds with gcc. 3929 (Optimization was unintentionally turned on in gcc --with-pydebug builds in 3930 2.7 beta1 as a result of the issue #1628484 fix, combined with autoconf's 3931 strange choice of default CFLAGS produced by AC_PROG_CC for gcc.) 3932 3933 - Issue #8509: Fix quoting in help strings and code snippets in configure.in. 3934 3935 - Issue #3646: It is now easily possible to install a Python framework into your 3936 home directory on Mac OS X, see Mac/README for more information. 3937 3938 - Issue #8510: Update to autoconf 2.65. 3939 3940 Misc 3941 ---- 3942 3943 - Update the Vim syntax highlight file. 3944 3945 3946 What's New in Python 2.7 beta 1? 3947 ================================ 3948 3949 *Release date: 2010-04-10* 3950 3951 Core and Builtins 3952 ----------------- 3953 3954 - Issue #7301: Add environment variable $PYTHONWARNINGS. 3955 3956 - Issue #8329: Don't return the same lists from select.select when no fds are 3957 changed. 3958 3959 - Issue #8259: ``1L << (2**31)`` no longer produces an 'outrageous shift error' 3960 on 64-bit machines. The shift count for either left or right shift is 3961 permitted to be up to sys.maxsize. 3962 3963 - Ensure that tokenization of identifiers is not affected by locale. 3964 3965 - Issue #1222585: Added LDCXXSHARED for C++ support. Patch by Arfrever. 3966 3967 - Raise a TypeError when trying to delete a T_STRING_INPLACE struct member. 3968 3969 - Issue #7994: Issue a PendingDeprecationWarning if object.__format__ is called 3970 with a non-empty format string. This is an effort to future-proof user 3971 code. If a derived class does not currently implement __format__ but later 3972 adds its own __format__, it would most likely break user code that had 3973 supplied a format string. This will be changed to a DeprecationWarning in 3974 Python 3.3 and it will be an error in Python 3.4. 3975 3976 - Issue #8268: Old-style classes (not just instances) now support weak 3977 references. 3978 3979 - Issue #8211: Save/restore CFLAGS around AC_PROG_CC in configure.in, in case it 3980 is set. 3981 3982 - Issue #1583863: An unicode subclass can now override the __unicode__ method 3983 3984 - Issue #6474: Make error message from passing an inadequate number of keyword 3985 arguments to a function correct. 3986 3987 - Issue #8164: Don't allow lambda functions to have a docstring. 3988 3989 - Issue #3137: Don't ignore errors at startup, especially a keyboard interrupt 3990 (SIGINT). If an error occurs while importing the site module, the error is 3991 printed and Python exits. Initialize the GIL before importing the site 3992 module. 3993 3994 - Code objects now support weak references. 3995 3996 Library 3997 ------- 3998 3999 - Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters. 4000 4001 - Issue #8321: Give access to OpenSSL version numbers from the `ssl` module, 4002 using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO` and 4003 `ssl.OPENSSL_VERSION_NUMBER`. 4004 4005 - Issue #8310: Allow dis to examine new style classes. 4006 4007 - Issue #8257: The Decimal construct now accepts a float instance directly, 4008 converting that float to a Decimal of equal value: 4009 4010 >>> Decimal(1.1) 4011 Decimal('1.100000000000000088817841970012523233890533447265625') 4012 4013 - collections.Counter() now supports a subtract() method. 4014 4015 - The functools module now has a total_ordering() class decorator to simplify 4016 the specification of rich comparisons. 4017 4018 - The functools module also adds cmp_to_key() as a tool to transition old-style 4019 comparison functions to new-style key-functions. 4020 4021 - Issue #8294: The Fraction constructor now accepts Decimal and float instances 4022 directly. 4023 4024 - Issue #7279: Comparisons involving a Decimal signaling NaN now signal 4025 InvalidOperation instead of returning False. (Comparisons involving a quiet 4026 NaN are unchanged.) Also, Decimal quiet NaNs are now hashable; Decimal 4027 signaling NaNs remain unhashable. 4028 4029 - Issue #2531: Comparison operations between floats and Decimal instances now 4030 return a result based on the numeric values of the operands; previously they 4031 returned an arbitrary result based on the relative ordering of id(float) and 4032 id(Decimal). 4033 4034 - Issue #8233: When run as a script, py_compile.py optionally takes a single 4035 argument `-` which tells it to read files to compile from stdin. Each line is 4036 read on demand and the named file is compiled immediately. (Original patch by 4037 Piotr OÅŒarowski). 4038 4039 - Issue #3135: Add ``inspect.getcallargs()``, which binds arguments to a 4040 function like a normal call. 4041 4042 - Backwards incompatible change: Unicode codepoints line tabulation (0x0B) and 4043 form feed (0x0C) are now considered linebreaks, as specified in Unicode 4044 Standard Annex #14. See issue #7643. http://www.unicode.org/reports/tr14/ 4045 4046 - Comparisons using one of <, <=, >, >= between a complex instance and a 4047 Fractions instance now raise TypeError instead of returning True/False. This 4048 makes Fraction <=> complex comparisons consistent with int <=> complex, float 4049 <=> complex, and complex <=> complex comparisons. 4050 4051 - Addition of ``WeakSet`` to the ``weakref`` module. 4052 4053 - logging: Added LOG_FTP to SysLogHandler and updated documentation. 4054 4055 - Issue #8205: Remove the "Modules" directory from sys.path when Python is 4056 running from the build directory (POSIX only). 4057 4058 - Issue #7667: Fix doctest failures with non-ASCII paths. 4059 4060 - Issue #7512: shutil.copystat() could raise an OSError when the filesystem 4061 didn't support chflags() (for example ZFS under FreeBSD). The error is now 4062 silenced. 4063 4064 - Issue #7703: ctypes supports both buffer() and memoryview(). The former is 4065 deprecated. 4066 4067 - Issue #7860: platform.uname now reports the correct 'machine' type when Python 4068 is running in WOW64 mode on 64 bit Windows. 4069 4070 - logging: Added getChild utility method to Logger and added isEnabledFor method 4071 to LoggerAdapter. 4072 4073 - Issue #8201: logging: Handle situation of non-ASCII and Unicode logger names 4074 existing at the same time, causing a Unicode error when configuration code 4075 attempted to sort the existing loggers. 4076 4077 - Issue #8200: logging: Handle errors when multiprocessing is not fully loaded 4078 when logging occurs. 4079 4080 - Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets. 4081 Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking 4082 reads and writes are always retried by OpenSSL itself. 4083 4084 - Issue #8179: Fix macpath.realpath() on a non-existing path. 4085 4086 - Issue #8024: Update the Unicode database to 5.2. 4087 4088 - Issue #8104: socket.recv_into() and socket.recvfrom_into() now support writing 4089 into objects supporting the new buffer API, for example bytearrays or 4090 memoryviews. 4091 4092 - Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox 4093 with Tcl/Tk-8.5. 4094 4095 - Issue #8140: Extend compileall to compile single files. Add -i option. 4096 4097 - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of the 4098 locale. 4099 4100 - Issue #7774: Set sys.executable to an empty string if ``argv[0]`` has been set 4101 to an non existent program name and Python is unable to retrieve the real 4102 program name. 4103 4104 - Issue #8117: logging: Improved algorithm for computing initial rollover time 4105 for ``TimedRotatingFileHandler`` by using the modification time of an existing 4106 log file to compute the next rollover time. If the log file does not exist, 4107 the current time is used as the basis for the computation. 4108 4109 - Issue #6472: The ``xml.etree`` package is updated to ElementTree 1.3. The 4110 cElementTree module is updated too. 4111 4112 - Issue #7880: Fix sysconfig when the python executable is a symbolic link. 4113 4114 - Issue #7624: Fix ``isinstance(foo(), collections.Callable)`` for old-style 4115 classes. 4116 4117 - Issue #7143: email: ``get_payload()`` used to strip any trailing newline from 4118 a base64 transfer-encoded payload *after* decoding it; it no longer does. 4119 This is a behavior change, so email's minor version number is now bumped, to 4120 version 4.0.2, for the 2.7 release. 4121 4122 - Issue #8235: _socket: Add the constant ``SO_SETFIB``. SO_SETFIB is 4123 a socket option available on FreeBSD 7.1 and newer. 4124 4125 - Issue #8038: unittest.TestCase.assertNotRegexpMatches 4126 4127 - Addition of -b command line option to unittest for buffering stdout / stderr 4128 during test runs. 4129 4130 - Issue #1220212: Added os.kill support for Windows, including support for 4131 sending CTRL+C and CTRL+BREAK events to console subprocesses. 4132 4133 Extension Modules 4134 ----------------- 4135 4136 - Issue #8314: Fix unsigned long long bug in libffi on Sparc v8. 4137 4138 - Issue #1039, #8154: Fix os.execlp() crash with missing 2nd argument. 4139 4140 - Issue #8156: bsddb module updated to version 4.8.4. 4141 http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.8.4. This update drops 4142 support for Berkeley DB 4.0, and adds support for 4.8. 4143 4144 - Issue #3928: os.mknod() now available in Solaris, also. 4145 4146 - Issue #8142: Update libffi to the 3.0.9 release. 4147 4148 - Issue #8300: When passing a non-integer argument to struct.pack with any 4149 integer format code, struct.pack first attempts to convert the non-integer 4150 using its __index__ method. If that method is non-existent or raises 4151 TypeError it goes on to try the __int__ method, as described below. 4152 4153 - Issue #1530559: When passing a non-integer argument to struct.pack with *any* 4154 integer format code (one of 'bBhHiIlLqQ'), struct.pack attempts to use the 4155 argument's __int__ method to convert to an integer before packing. It also 4156 produces a DeprecationWarning in this case. (In Python 2.6, the behaviour was 4157 inconsistent: __int__ was used for some integer codes but not for others, and 4158 the set of integer codes for which it was used differed between native packing 4159 and standard packing.) 4160 4161 - Issue #7347: _winreg: Add CreateKeyEx and DeleteKeyEx, as well as fix a bug in 4162 the return value of QueryReflectionKey. 4163 4164 Tools/Demos 4165 ----------- 4166 4167 - Issue #7993: Add a test of IO packet processing bandwidth to ccbench. It 4168 measures the number of UDP packets processed per second depending on the 4169 number of background CPU-bound Python threads. 4170 4171 - python-config now supports multiple options on the same command line. 4172 4173 Build 4174 ----- 4175 4176 - Issue #8032: For gdb7, a python-gdb.py file is added to the build, allowing to 4177 use advanced gdb features when debugging Python. 4178 4179 - Issue #1628484: The Makefile doesn't ignore the CFLAGS environment variable 4180 anymore. It also forwards the LDFLAGS settings to the linker when building a 4181 shared library. 4182 4183 - Issue #6716: Quote -x arguments of compileall in MSI installer. 4184 4185 - Issue #7705: Fix linking on FreeBSD. 4186 4187 - Make sure that the FreeBSD build of the included libffi uses the proper 4188 assembly file. 4189 4190 C-API 4191 ----- 4192 4193 - Issue #8276: PyEval_CallObject() is now only available in macro form. The 4194 function declaration, which was kept for backwards compatibility reasons, is 4195 now removed (the macro was introduced in 1997!). 4196 4197 - Issue #7992: A replacement PyCObject API, PyCapsule, has been backported from 4198 Python 3.1. All existing Python CObjects in the main distribution have been 4199 converted to capsules. To address backwards-compatibility concerns, 4200 PyCObject_AsVoidPtr() was changed to understand capsules. 4201 4202 Tests 4203 ----- 4204 4205 - Issue #3864: Skip three test_signal tests on freebsd6 because they fail if any 4206 thread was previously started, most likely due to a platform bug. 4207 4208 - Issue #8348: Fix test ftp url in test_urllib2net. 4209 4210 - Issue #8204: Fix test_ttk notebook test by forcing focus. 4211 4212 - Issue #8344: Fix test_ttk bug on FreeBSD. 4213 4214 - Issue #8193: Fix test_zlib failure with zlib 1.2.4. 4215 4216 - Issue #8248: Add some tests for the bool type. Patch by Gregory Nofi. 4217 4218 - Issue #8263: Now regrtest.py will report a failure if it receives a 4219 KeyboardInterrupt (SIGINT). 4220 4221 - Issue #8180 and #8207: Fix test_pep277 on OS X and add more tests for special 4222 Unicode normalization cases. 4223 4224 - Issue #7783: test.test_support.open_urlresource invalidates the outdated files 4225 from the local cache. 4226 4227 4228 What's New in Python 2.7 alpha 4? 4229 ================================= 4230 4231 *Release date: 2010-03-06* 4232 4233 Core and Builtins 4234 ----------------- 4235 4236 - Issue #7544: Preallocate thread memory before creating the thread to avoid a 4237 fatal error in low memory condition. 4238 4239 - Issue #7820: The parser tokenizer restores all bytes in the right if the BOM 4240 check fails. 4241 51 4242 - Issue #7309: Fix unchecked attribute access when converting 52 UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to 53 strings. 4243 UnicodeEncodeError, UnicodeDecodeError, and UnicodeTranslateError to strings. 54 4244 55 4245 - Issue #7649: "u'%c' % char" now behaves like "u'%s' % char" and raises a 56 UnicodeDecodeError if 'char' is a byte string that can't be decoded using 57 the default encoding. 4246 UnicodeDecodeError if 'char' is a byte string that can't be decoded using the 4247 default encoding. 4248 4249 - Issue #6902: Fix problem with built-in types format incorrectly with 0 4250 padding. 4251 4252 - Issue #2560: Remove an unnecessary 'for' loop from ``my_fgets()`` in 4253 Parser/myreadline.c. 4254 4255 - Issue #7988: Fix default alignment to be right aligned for 4256 ``complex.__format__``. Now it matches other numeric types. 4257 4258 - Issue #5211: The complex type no longer uses implicit coercion in mixed-type 4259 binary arithmetic operations. 4260 4261 Library 4262 ------- 4263 4264 - Issue #7904: Changes to urllib.parse.urlsplit to handle schemes as defined by 4265 RFC3986. Anything before :// is considered a scheme and is followed by an 4266 authority (or netloc) and by '/' led path, which is optional. 4267 4268 - Issue #1555570: email no longer inserts extra blank lines when a \r\n 4269 combo crosses an 8192 byte boundary. 4270 4271 - Issue #6906: Tk should not set Unicode environment variables on Windows. 4272 4273 - Issue #1054943: Fix ``unicodedata.normalize('NFC', text)`` for the Public 4274 Review Issue #29 (http://unicode.org/review/pr-29.html). 4275 4276 - Issue #7494: Fix a crash in ``_lsprof`` (cProfile) after clearing the profiler, 4277 reset also the pointer to the current pointer context. 4278 4279 - Issue #7232: Add support for the context manager protocol to the 4280 ``tarfile.TarFile`` class. 4281 4282 - Issue #7250: Fix info leak of os.environ across multi-run uses of 4283 ``wsgiref.handlers.CGIHandler``. 4284 4285 - Issue #1729305: Fix doctest to handle encode error with "backslashreplace". 4286 4287 - Issue #691291: ``codecs.open()`` should not convert end of lines on reading 4288 and writing. 4289 4290 - Issue #7975: Correct regression in dict methods supported by bsddb.dbshelve. 4291 4292 - Issue #7959: ctypes callback functions are now registered correctly with the 4293 cycle garbage collector. 4294 4295 - Issue #7970: ``email.Generator.flatten`` now correctly flattens 4296 message/rfc822 messages parsed by ``email.Parser.HeaderParser``. 4297 4298 - Issue #3426: ``os.path.abspath`` now returns unicode when its arg is unicode. 4299 4300 - Issue #7633: In the decimal module, ``Context`` class methods (with the 4301 exception of canonical and is_canonical) now accept instances of int and long 4302 wherever a Decimal instance is accepted, and implicitly convert that argument 4303 to Decimal. Previously only some arguments were converted. 4304 4305 - Issue #6003: Add an argument to ``zipfile.Zipfile.writestr`` to specify the 4306 compression type. 4307 4308 - Issue #7893: ``unittest.TextTestResult`` is made public and a ``resultclass`` 4309 argument added to the TextTestRunner constructor allowing a different result 4310 class to be used without having to subclass. 4311 4312 - Issue #7588: ``unittest.TextTestResult.getDescription`` now includes the test 4313 name in failure reports even if the test has a docstring. 4314 4315 - Issue #5801: Remove spurious empty lines in wsgiref. 4316 4317 - Issue #1537721: Add a ``writeheader()`` method to ``csv.DictWriter``. 4318 4319 - Issue #7427: Improve the representation of httplib.BadStatusLine exceptions. 4320 4321 - Issue #7481: When a ``threading.Thread`` failed to start it would leave the 4322 instance stuck in initial state and present in ``threading.enumerate()``. 4323 4324 - Issue #1068268: The subprocess module now handles EINTR in internal 4325 ``os.waitpid()`` and ``os.read()`` system calls where appropriate. 4326 4327 - Issue #6729: Add ``ctypes.c_ssize_t`` to represent ssize_t. 4328 4329 - Issue #6247: The argparse module has been added to the standard library. 4330 4331 Extension Modules 4332 ----------------- 4333 4334 - The sqlite3 module was updated to pysqlite 2.6.0. This fixes several obscure 4335 bugs and allows loading SQLite extensions from shared libraries. 4336 4337 - Issue #7808: Fix reference leaks in _bsddb and related tests. 4338 4339 - Issue #6544: Fix a reference leak in the kqueue implementation's error 4340 handling. 4341 4342 - Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as 4343 msvcr100.dll is not a platform assembly anymore. 4344 4345 - Issue #7242: On Solaris 9 and earlier calling ``os.fork()`` from within a 4346 thread could raise an incorrect RuntimeError about not holding the import 4347 lock. The import lock is now reinitialized after fork. 4348 4349 - Issue #7999: ``os.setreuid()`` and ``os.setregid()`` would refuse to accept a 4350 -1 parameter on some platforms such as OS X. 4351 4352 Tests 4353 ----- 4354 4355 - Issue #7849: The utility ``test.test_support.check_warnings()`` verifies if 4356 warnings are effectively raised. A new utility ``check_py3k_warnings()`` is 4357 available. 4358 4359 - The four path modules (genericpath, macpath, ntpath, posixpath) share a 4360 common TestCase for some tests: test_genericpath.CommonTest. 4361 4362 - Print platform information when running the whole test suite, or using the 4363 ``--verbose`` flag. 4364 4365 - Issue #767675: Enable test_pep277 on POSIX platforms with Unicode-friendly 4366 filesystem encoding. 4367 4368 - Issue #6292: For the moment at least, the test suite runs cleanly if python 4369 is run with the -OO flag. Tests requiring docstrings are skipped. 4370 4371 - Issue #7712: test_support gained a new ``temp_cwd`` context manager which is 4372 now also used by regrtest to run all the tests in a temporary directory. The 4373 original CWD is saved in ``test.test_support.SAVEDCWD``. Thanks to Florent 4374 Xicluna who helped with the patch. 4375 4376 Build 4377 ----- 4378 4379 - Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9. 4380 4381 4382 What's New in Python 2.7 alpha 3? 4383 ================================= 4384 4385 *Release date: 2010-02-06* 4386 4387 Core and Builtins 4388 ----------------- 58 4389 59 4390 - Issue #5677: Explicitly forbid write operations on read-only file objects, 60 4391 and read operations on write-only file objects. On Windows, the system C 61 library would return a bogus result; on Solaris, it was possible to crash 62 the interpreter. Patch by Stefan Krah. 63 64 - Issue #4978: Passing keyword arguments as unicode strings is now allowed. 65 66 - Issue #7819: Check sys.call_tracing() arguments types. 67 68 - Issue #7788: Fix an interpreter crash produced by deleting a list 69 slice with very large step value. 70 71 - Issue #7561: Operations on empty bytearrays (such as `int(bytearray())`) 72 could crash in many places because of the PyByteArray_AS_STRING() macro 73 returning NULL. The macro now returns a statically allocated empty 74 string instead. 4392 library would return a bogus result; on Solaris, it was possible to crash the 4393 interpreter. Patch by Stefan Krah. 4394 4395 - Issue #7853: Normalize exceptions before they are passed to a context 4396 manager's ``__exit__()`` method. 4397 4398 - Issue #7385: Fix a crash in ``PyMemoryView_FromObject()`` when 4399 ``PyObject_GetBuffer()`` fails. Patch by Florent Xicluna. 4400 4401 - Issue #7819: Check ``sys.call_tracing()`` arguments types. 4402 4403 - Issue #7788: Fix an interpreter crash produced by deleting a list slice with 4404 very large step value. 4405 4406 - Issue #7766: Change ``sys.getwindowsversion()`` return value to a named tuple 4407 and add the additional members returned in an OSVERSIONINFOEX structure. The 4408 new members are service_pack_major, service_pack_minor, suite_mask, and 4409 product_type. 4410 4411 - Issue #7561: Operations on empty bytearrays (such as ``int(bytearray())``) 4412 could crash in many places because of the ``PyByteArray_AS_STRING()`` macro 4413 returning NULL. The macro now returns a statically allocated empty string 4414 instead. 4415 4416 - Issue #7622: Improve the split(), rsplit(), splitlines() and replace() 4417 methods of bytes, bytearray and unicode objects by using a common 4418 implementation based on stringlib's fast search. Patch by Florent Xicluna. 4419 4420 - Issue #7632: Fix various str -> float conversion bugs present in 2.7 alpha 2, 4421 including: 4422 4423 (1) a serious 'wrong output' bug that could occur for long (> 40 digit) input 4424 strings, 4425 (2) a crash in dtoa.c that occurred in debug builds when parsing certain long 4426 numeric strings corresponding to subnormal values, 4427 (3) a memory leak for some values large enough to cause overflow, and 4428 (4) a number of flaws that could lead to incorrectly rounded results. 4429 4430 - Issue #7319, #7770: Silence ``DeprecationWarning`` by default when the -3 4431 option is not used. 4432 4433 - Issue #2335: Backport set literals syntax from Python 3.x. 4434 4435 - Issue #2333: Backport set and dict comprehensions syntax from Python 3.x. 4436 4437 - Issue #1967: Backport dictionary views from Python 3.x. 4438 4439 Library 4440 ------- 4441 4442 - Issue #9137: Fix issue in MutableMapping.update, which incorrectly 4443 treated keyword arguments called 'self' or 'other' specially. 4444 4445 - Issue #7835: shelve should no longer produce mysterious warnings during 4446 interpreter shutdown. 4447 4448 - Issue #2746: Don't escape ampersands and angle brackets ("&", "<", ">") in 4449 XML processing instructions and comments. These raw characters are allowed 4450 by the XML specification, and are necessary when outputting e.g. PHP code in 4451 a processing instruction. Patch by Neil Muller. 4452 4453 - Issue #7869: logging: Improved diagnostic for format-time errors. 4454 4455 - Issue #7868: logging: Added loggerClass attribute to Manager. 4456 4457 - Issue #7851: logging: Clarification on logging configuration files. 4458 4459 - Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is 4460 specified, rather than fall through to AF_PACKET (in the ``socket`` module). 4461 Also, raise ValueError rather than TypeError when an unknown TIPC address 4462 type is specified. Patch by Brian Curtin. 4463 4464 - logging: Implemented PEP 391. 4465 4466 - Issue #6939: Fix file I/O objects in the `io` module to keep the original 4467 file position when calling `truncate()`. It would previously change the file 4468 position to the given argument, which goes against the tradition of 4469 ftruncate() and other truncation APIs. Patch by Pascal Chambon. 4470 4471 - Issue #7610: Reworked implementation of the internal ``zipfile.ZipExtFile`` 4472 class used to represent files stored inside an archive. The new 4473 implementation is significantly faster and can be wrapped in a 4474 ``io.BufferedReader`` object for more speedups. It also solves an issue 4475 where interleaved calls to ``read()`` and ``readline()`` give wrong results. 4476 Patch by Nir Aides. 4477 4478 - Issue #7792: Registering non-classes to ABCs raised an obscure error. 4479 4480 - Removed the deprecated functions ``verify()`` and ``vereq()`` from 4481 Lib/test/test_support.py. 4482 4483 - Issue #7773: Fix an UnboundLocalError in ``platform.linux_distribution()`` 4484 when the release file is empty. 4485 4486 - Issue #7748: Since unicode values are supported for some metadata options in 4487 Distutils, the DistributionMetadata get_* methods will now return an utf-8 4488 encoded string for them. This ensures that the upload and register commands 4489 send the correct values to PyPI without any error. 4490 4491 - Issue #1670765: Prevent ``email.generator.Generator`` from re-wrapping 4492 headers in multipart/signed MIME parts, which fixes one of the sources of 4493 invalid modifications to such parts by Generator. 4494 4495 - Issue #7701: Fix crash in ``binascii.b2a_uu()`` in debug mode when given a 4496 1-byte argument. Patch by Victor Stinner. 4497 4498 - Issue #3299: Fix possible crash in the _sre module when given bad argument 4499 values in debug mode. Patch by Victor Stinner. 4500 4501 - Issue #7703: Add support for the new buffer API to functions of the binascii 4502 module. Backported from py3k by Florent Xicluna, with some additional tests. 4503 4504 - Issue #2846: Add support for gzip.GzipFile reading zero-padded files. Patch 4505 by Brian Curtin. 4506 4507 - Issue #5827: Make sure that normpath preserves unicode. Initial patch by 4508 Matt Giuca. 4509 4510 - Issue #5372: Drop the reuse of .o files in Distutils' ccompiler (since 4511 Extension extra options may change the output without changing the .c file). 4512 Initial patch by Collin Winter. 4513 4514 Extension Modules 4515 ----------------- 4516 4517 - Expat: Fix DoS via XML document with malformed UTF-8 sequences 4518 (CVE_2009_3560). 4519 4520 Build 4521 ----- 4522 4523 - Issue #7632: When Py_USING_MEMORY_DEBUGGER is defined, disable the private 4524 memory allocation scheme in dtoa.c and use PyMem_Malloc and PyMem_Free 4525 instead. Also disable caching of powers of 5. 4526 4527 - Issue #7658: Ensure that the new pythonw executable works on OSX 10.4 4528 4529 - Issue #7714: Use ``gcc -dumpversion`` to detect the version of GCC on 4530 MacOSX. 4531 4532 - Issue #7661: Allow ctypes to be built from a non-ASCII directory path. 4533 Patch by Florent Xicluna. 4534 4535 Tools/Demos 4536 ----------- 4537 4538 - iobench (a file I/O benchmark) and ccbench (a concurrency benchmark) were 4539 added to the ``Tools`` directory. They were previously living in the 4540 sandbox. 4541 4542 Tests 4543 ----- 4544 4545 - Issue #7728: test_timeout was changed to use ``test_support.bind_port()`` 4546 instead of a hard coded port. 4547 4548 Documentation 4549 ------------- 4550 4551 - Updated "Using Python" documentation to include description of CPython's -J, 4552 -U and -X options. 4553 4554 - Updated Python manual page (options -B, -O0, -s, environment variables 4555 PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE). 4556 4557 4558 What's New in Python 2.7 alpha 2? 4559 ================================= 4560 4561 *Release date: 2010-01-09* 4562 4563 Core and Builtins 4564 ----------------- 4565 4566 - The ``__complex__()`` method is now looked up on the class of instances to 4567 make it consistent with other special methods. 4568 4569 - Issue #7462: Implement the stringlib fast search algorithm for the `rfind`, 4570 `rindex`, `rsplit` and `rpartition` methods. Patch by Florent Xicluna. 4571 4572 - Issue #5080: A number of functions and methods previously produced a 4573 DeprecationWarning when passed a float argument where an integer was expected. 4574 These functions and methods now raise TypeError instead. The majority of the 4575 effects of this change are in the extension modules, but some core functions 4576 and methods are affected: notably the 'chr', 'range' and 'xrange' builtins, 4577 and many unicode/str methods. 75 4578 76 4579 - Issue #7604: Deleting an unset slotted attribute did not raise an 77 4580 AttributeError. 78 4581 4582 - Issue #7534: Fix handling of IEEE specials (infinities, nans, negative zero) 4583 in ** operator. The behaviour now conforms to that described in C99 Annex F. 4584 4585 - Issue #7579: The msvcrt module now has docstrings for all its functions. 4586 79 4587 - Issue #7413: Passing '\0' as the separator to datetime.datetime.isoformat() 80 4588 used to drop the time part of the result. 81 4589 82 - Issue #6108: unicode(exception) and str(exception) should return the same 83 message when only __str__ (and not __unicode__) is overridden in the 84 subclass. 4590 - Issue #1811: Improve accuracy and cross-platform consistency for true division 4591 of integers: the result of a/b is now correctly rounded for ints a and b (at 4592 least on IEEE 754 platforms), and in particular does not depend on the 4593 internal representation of a long. 4594 4595 - Issue #6108: ``unicode(exception)`` and ``str(exception)`` should return the 4596 same message when only ``__str__()`` (and not ``__unicode__()``) is overridden 4597 in the subclass. 4598 4599 - Issue #6834: Replace the implementation for the 'python' and 'pythonw' 4600 executables on OSX. 4601 4602 These executables now work properly with the arch(1) command: ``arch -ppc 4603 python`` will start a universal binary version of python in PPC mode (unlike 4604 previous releases). 4605 4606 - Issue #1680159: Unicode coercion during an 'in' operation no longer masks the 4607 underlying error when the coercion fails for the left hand operand. 85 4608 86 4609 - Issue #7491: Metaclass's __cmp__ method was ignored. 87 4610 88 - Add Py3k warnings for parameter names in parenthesis. 89 90 - Issue #7362: Give a proper error message for def f((x)=3): pass. 91 92 - Issue #7085: Fix crash when importing some extensions in a thread 93 on MacOSX 10.6. 94 95 - Issue #7070: Fix round bug for large odd integer arguments. 96 97 - Issue #7078: Set struct.__doc__ from _struct.__doc__. 98 99 - Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which 100 fixes the problem of some exceptions being thrown at shutdown when the 101 interpreter is killed. Patch by Adam Olsen. 102 103 - Issue #7084: Fix a (very unlikely) crash when printing a list from one 104 thread, and mutating it from another one. Patch by Scott Dial. 105 106 - Issue #1747858: Fix lchown & fchown to work with large uid's and gid's on 107 64-bit platforms. 108 4611 - Issue #7466: Segmentation fault when the garbage collector is called in the 4612 middle of populating a tuple. Patch by Florent Xicluna. 109 4613 110 4614 Library 111 4615 ------- 112 4616 113 - Issue #7250: Fix info leak of os.environ across multi-run uses of 114 wsgiref.handlers.CGIHandler. 115 116 - Issue #1729305: Fix doctest to handle encode error with "backslashreplace". 117 118 - Issue #691291: codecs.open() should not convert end of lines on reading and 119 writing. 120 121 - Issue #7975: correct regression in dict methods supported by bsddb.dbshelve. 122 123 - Issue #7959: ctypes callback functions are now registered correctly 124 with the cycle garbage collector. 125 126 - Issue #6243: curses.getkey() can segfault when used with ungetch. 127 Fix by Trundle and Jerry Chen. 128 129 - Issue #7597: curses.use_env() can now be called before initscr(). 130 Noted by Kan-Ru Chen. 131 132 - Issue #7970: email.Generator.flatten now correctly flattens message/rfc822 133 messages parsed by email.Parser.HeaderParser. 134 135 - Issue #3426: ``os.path.abspath`` now returns unicode when its arg is unicode. 136 137 - Issue #7835: shelve should no longer produce mysterious warnings during 138 interpreter shutdown. 139 140 - Issue #4772: Raise a ValueError when an unknown Bluetooth protocol is 141 specified, rather than fall through to AF_PACKET (in the `socket` module). 142 Also, raise ValueError rather than TypeError when an unknown TIPC address 143 type is specified. Patch by Brian Curtin. 144 145 - Issue #6939: Fix file I/O objects in the `io` module to keep the original 146 file position when calling `truncate()`. It would previously change the 147 file position to the given argument, which goes against the tradition of 148 ftruncate() and other truncation APIs. Patch by Pascal Chambon. 149 150 - Issue #7773: Fix an UnboundLocalError in platform.linux_distribution() when 151 the release file is empty. 152 153 - Issue #7748: Since unicode values are supported for some metadata options 154 in Distutils, the DistributionMetadata get_* methods will now return an utf-8 155 encoded string for them. This ensure that the upload and register commands 156 send the right values to PyPI without any error. 157 158 - Issue #1670765: Prevent email.generator.Generator from re-wrapping 159 headers in multipart/signed MIME parts, which fixes one of the sources of 160 invalid modifications to such parts by Generator. 161 162 - Issue #7701: Fix crash in binascii.b2a_uu() in debug mode when given a 163 1-byte argument. Patch by Victor Stinner. 164 165 - Issue #3299: Fix possible crash in the _sre module when given bad 166 argument values in debug mode. Patch by Victor Stinner. 167 168 - Issue #5827: Make sure that normpath preserves unicode. Initial patch 169 by Matt Giuca. 170 171 - Issue #5372: Drop the reuse of .o files in Distutils' ccompiler (since 172 Extension extra options may change the output without changing the .c 173 file). Initial patch by Collin Winter. 174 175 - Issue #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes 176 gcc when it has a fully qualified configuration prefix. Initial patch 177 by Arfrever. 178 179 - Issue #7071: byte-compilation in Distutils is now done with respect to 180 sys.dont_write_bytecode. 4617 - Issue #6963: Added "maxtasksperchild" argument to ``multiprocessing.Pool``, 4618 allowing for a maximum number of tasks within the pool to be completed by the 4619 worker before that worker is terminated, and a new one created to replace it. 4620 4621 - Issue #7617: Make sure distutils.unixccompiler.UnixCCompiler recognizes gcc 4622 when it has a fully qualified configuration prefix. Initial patch by 4623 Arfrever. 181 4624 182 4625 - Issue #7092: Remove py3k warning when importing cPickle. 2to3 handles 183 renaming of `cPickle` to `pickle`. The warning was annoying since there's 184 noalternative to cPickle if you care about performance. Patch by Florent4626 renaming of `cPickle` to `pickle`. The warning was annoying since there's no 4627 alternative to cPickle if you care about performance. Patch by Florent 185 4628 Xicluna. 186 4629 187 - Issue #7455: Fix possible crash in cPickle on invalid input. Patch by 188 Victor Stinner. 189 190 - Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when 191 opening an empty or very small file. 192 193 - Issue #7552: Removed line feed in the base64 Authorization header in 194 the Distutils upload command to avoid an error when PyPI reads it. 195 This occurs on long passwords. Initial patch by JP St. Pierre. 196 197 - Issue #7231: urllib2 cannot handle https with proxy requiring auth. Patch by 4630 - Issue #7455: Fix possible crash in cPickle on invalid input. Patch by Victor 4631 Stinner. 4632 4633 - Issue #7092: Fix the DeprecationWarnings emitted by the standard library when 4634 using the -3 flag. Patch by Florent Xicluna. 4635 4636 - Issue #7471: Improve the performance of GzipFile's buffering mechanism, and 4637 make it implement the ``io.BufferedIOBase`` ABC to allow for further speedups 4638 by wrapping it in an ``io.BufferedReader``. Patch by Nir Aides. 4639 4640 - Issue #3972: ``httplib.HTTPConnection`` now accepts an optional source_address 4641 parameter to allow specifying where your connections come from. 4642 4643 - ``socket.create_connection()`` now accepts an optional source_address 4644 parameter. 4645 4646 - Issue #5511: ``zipfile.ZipFile`` can now be used as a context manager. 4647 Initial patch by Brian Curtin. 4648 4649 - Distutils now correctly identifies the build architecture as "x86_64" when 4650 building on OSX 10.6 without "-arch" flags. 4651 4652 - Issue #7556: Distutils' msvc9compiler now opens the MSVC Manifest file in text 4653 mode. 4654 4655 - Issue #7552: Removed line feed in the base64 Authorization header in the 4656 Distutils upload command to avoid an error when PyPI reads it. This occurs on 4657 long passwords. Initial patch by JP St. Pierre. 4658 4659 - Issue #7231: urllib2 cannot handle https with proxy requiring auth. Patch by 198 4660 Tatsuhiro Tsujikawa. 199 4661 200 - Issue #7348: StringIO.StringIO.readline(-1) now acts as if it got no argument 201 like other file objects. 202 203 - Issue #5949: fixed IMAP4_SSL hang when the IMAP server response is 204 missing proper end-of-line termination. 205 206 - Fix variations of extending deques: d.extend(d) d.extendleft(d) d+=d 207 208 - Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is 209 generated in Distutils. Patch by Stephen Emslie. 210 211 - Issue #4120: Drop reference to CRT from manifest when building extensions 212 with msvc9compiler. 213 214 - Issue #7410: deepcopy of itertools.count() erroneously reset the count. 215 216 - Issue #7403: logging: Fixed possible race condition in lock creation. 217 218 - Issue #7341: Close the internal file object in the TarFile constructor in 219 case of an error. 220 221 - Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch 222 223 - Issue #7318: multiprocessing now uses a timeout when it fails to establish 224 a connection with another process, rather than looping endlessly. The 225 default timeout is 20 seconds, which should be amply sufficient for 226 local connections. 227 228 - Issue #7282: Fix a memory leak when an RLock was used in a thread other 229 than those started through `threading.Thread` (for example, using 230 `thread.start_new_thread()`. 231 232 - Issue #7264: Fix a possible deadlock when deallocating thread-local objects 233 which are part of a reference cycle. 234 235 - Issue #7249: Methods of io.BytesIO now allow `long` as well as `int` 236 arguments. 237 238 - Issue #6665: Fix fnmatch to properly match filenames with newlines in them. 239 240 - Issue #1008086: Fixed socket.inet_aton() to always return 4 bytes even on 241 LP64 platforms (most 64-bit Linux, bsd, unix systems). 242 243 - Issue #7246 & Issue #7208: getpass now properly flushes input before 244 reading from stdin so that existing input does not confuse it and 245 lead to incorrect entry or an IOError. It also properly flushes it 246 afterwards to avoid the terminal echoing the input afterwards on 247 OSes such as Solaris. 248 249 - Issue #7244: itertools.izip_longest() no longer ignores exceptions 250 raised during the formation of an output tuple. 251 252 - Issue #7233: Fix a number of two-argument Decimal methods to make 253 sure that they accept an int or long as the second argument. Also 254 fix buggy handling of large arguments (those with coefficient longer 255 than the current precision) in shift and rotate. 256 257 - Issue #7082: When falling back to the MIME 'name' parameter, the 258 correct place to look for it is the Content-Type header. 259 260 - Issue #7099: Decimal.is_normal now returns True for numbers with exponent 261 larger than emax. 262 263 - Issue #7205: Fix a possible deadlock when using a BZ2File object from 264 several threads at once. 265 266 - Issue #7048: Force Decimal.logb to round its result when that result 267 is too large to fit in the current precision. 268 269 - Issue #1488943: difflib.Differ() doesn't always add hints for tab characters 270 271 - Issue #5037: Proxy the __unicode__ special method to __unicode__ instead of 272 __str__. 273 274 - Issue #7481: When a threading.Thread failed to start it would leave the 275 instance stuck in initial state and present in threading.enumerate(). 276 277 - Issue #1068268: The subprocess module now handles EINTR in internal 278 os.waitpid and os.read system calls where appropriate. 279 280 Extension Modules 281 ----------------- 282 283 - Issue #7808: Fix reference leaks in _bsddb and related tests. 284 285 - Stop providing crtassem.h symbols when compiling with Visual Studio 2010, as 286 msvcr100.dll is not a platform assembly anymore. 287 288 - Issue #6877: Make it possible to link the readline extension to libedit 289 on OSX. 290 291 - Expat: Fix DoS via XML document with malformed UTF-8 sequences 292 (CVE_2009_3560). 293 294 - Issue #7242: On Solaris 9 and earlier calling os.fork() from within a 295 thread could raise an incorrect RuntimeError about not holding the import 296 lock. The import lock is now reinitialized after fork. 297 298 - Issue #7999: os.setreuid() and os.setregid() would refuse to accept a -1 299 parameter on some platforms such as OS X. 4662 - Issue #7349: Make methods of file objects in the io module accept None as an 4663 argument where file-like objects (ie StringIO and BytesIO) accept them to mean 4664 the same as passing no argument. 4665 4666 - Issue #7348: ``StringIO.StringIO.readline(-1)`` now acts as if it got no 4667 argument like other file objects. 4668 4669 - Issue #7357: tarfile no longer suppresses fatal extraction errors by default. 4670 4671 - Issue #7470: logging: Fix bug in Unicode encoding fallback. 4672 4673 - Issue #5949: Fixed IMAP4_SSL hang when the IMAP server response is missing 4674 proper end-of-line termination. 4675 4676 - Issue #7457: Added a read_pkg_file method to 4677 ``distutils.dist.DistributionMetadata``. 4678 4679 - Issue #3745: Undo the 2.7a1 change to have hashlib to reject unicode and non 4680 buffer API supporting objects as input. That behavior is for 3.x only. 4681 4682 C-API 4683 ----- 4684 4685 - Issue #7767: New function ``PyLong_AsLongLongAndOverflow()`` added, analogous 4686 to ``PyLong_AsLongAndOverflow()``. 4687 4688 - Issue #5080: The argument parsing functions ``PyArg_ParseTuple()``, 4689 ``PyArg_ParseTupleAndKeywords()``, ``PyArg_VaParse()``, 4690 ``PyArg_VaParseTupleAndKeywords()`` and ``PyArg_Parse()`` no longer accept 4691 float arguments for integer format codes (other than 'L'): previously an 4692 attempt to pass a float resulted in a DeprecationWarning; now it gives a 4693 TypeError. For the 'L' format code (which previously had no warning) there is 4694 now a DeprecationWarning. 4695 4696 - Issue #7033: Function ``PyErr_NewExceptionWithDoc()`` added. 300 4697 301 4698 Build 302 4699 ----- 303 4700 304 - Issue #3920, #7903: Define _BSD_SOURCE on OpenBSD 4.4 through 4.9. 305 306 - Issue #7661: Allow ctypes to be built from a non-ASCII directory path. 307 Patch by Florent Xicluna. 4701 - Issue #6491: Allow --with-dbmliborder to specify that no dbms will be built. 4702 4703 - Issue #6943: Use pkg-config to find the libffi headers when the 4704 ``--with-system-ffi`` flag is used. 4705 4706 - Issue #7609: Add a ``--with-system-expat`` option that causes the system's 4707 expat library to be used for the pyexpat module instead of the one included 4708 with Python. 308 4709 309 4710 - Issue #7589: Only build the nis module when the correct header files are 310 4711 found. 311 4712 312 - Switch to OpenSSL 0.9.8l on Windows. 313 314 - Issue #6603: Change READ_TIMESTAMP macro in ceval.c so that it 315 compiles correctly under gcc on x86-64. This fixes a reported 316 problem with the --with-tsc build on x86-64. 317 318 - Ensure that it possible to build extensions for the default 319 binary distribution on OSX 10.6 even when the user does not 320 have the 10.4u SDK installed. 4713 - Switch to OpenSSL 0.9.8l and sqlite 3.6.21 on Windows. 321 4714 322 4715 - Issue #7541: when using ``python-config`` with a framework install the 323 4716 compiler might use the wrong library. 324 4717 325 Documentation326 -------------327 328 - Updating `Using Python` documentation to include description of CPython's329 -J, -U and -X options.330 331 - Update python manual page (options -B, -O0, -s, environment variables332 PYTHONDONTWRITEBYTECODE, PYTHONNOUSERSITE).333 334 4718 Tests 335 4719 ----- 336 4720 337 - issue #7728: test_timeout was changed to use test_support.bind_port 338 instead of a hard coded port. 4721 - Issue #7376: Instead of running a self-test (which was failing) when called 4722 with no arguments, doctest.py now gives a usage message. 4723 4724 - Issue #7396: Fix regrtest -s, which was broken by the -j enhancement. 339 4725 340 4726 - Issue #7498: test_multiprocessing now uses test_support.find_unused_port 341 4727 instead of a hardcoded port number in test_rapid_restart. 342 4728 343 - Issue #7431: use TESTFN in test_linecache instead of trying to create a 344 file in the Lib/test directory, which might be read-only for the 345 user running the tests. 346 347 - Issue #7324: add a sanity check to regrtest argument parsing to 348 catch the case of an option with no handler. 349 350 - Issue #7295: Do not use a hardcoded file name in test_tarfile. 351 352 - Issue #7270: Add some dedicated unit tests for multi-thread synchronization 353 primitives such as Lock, RLock, Condition, Event and Semaphore. 354 355 - Issue #7055: test___all__ now greedily detects all modules which have an 356 __all__ attribute, rather than using a hardcoded and incomplete list. 357 358 359 What's New in Python 2.6.4 final? 360 ================================= 361 362 *Release date: 25-Oct-2009* 4729 4730 What's New in Python 2.7 alpha 1 4731 ================================ 4732 4733 *Release date: 2009-12-05* 363 4734 364 4735 Core and Builtins 365 4736 ----------------- 366 4737 367 Library 368 ------- 369 370 371 What's New in Python 2.6.4rc2? 372 ============================== 373 374 *Release date: 18-Oct-2009* 375 376 Core and Builtins 377 ----------------- 378 379 Library 380 ------- 381 382 - Issue #7115: Fixed the extension module builds that is failing when using 383 paths in the extension name instead of dotted names. 384 385 - Issue #7120: logging: Removed import of multiprocessing which is causing 386 crash in GAE. 387 388 - Issue #7149: fix exception in urllib when detecting proxy settings on OSX. 389 390 391 What's New in Python 2.6.4rc1? 392 ============================== 393 394 *Release date: 07-Oct-2009* 395 396 Core and Builtins 397 ----------------- 398 399 - Issue #7019: Raise ValueError when unmarshalling bad long data, instead 400 of producing internally inconsistent Python longs. 401 402 Library 403 ------- 404 405 - Issue #7068: Fixed the partial renaming that occured in r72594. 406 407 - Issue #7064: Fixed the incompatibility with Setuptools in distutils 408 when running the build_ext command. 409 410 - Issue #7052: Removed nonexisting NullHandler from logging.__all__. 411 412 - Issue #7039: Fixed distutils.tests.test_sysconfig when running on 413 installation with no build. 414 415 Tests 416 ----- 417 418 - Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6. 419 420 421 What's New in Python 2.6.3 422 ========================== 423 424 *Release date: 02-Oct-2009* 425 426 What's New in Python 2.6.3rc1 427 ============================= 428 429 *Release date: 29-Sep-2009* 430 431 Core and Builtins 432 ----------------- 433 434 - Issue #5329: Fix os.popen* regression from 2.5 with commands as a 435 sequence running through the shell. Patch by Jean-Paul Calderone 436 and Jani Hakala. 437 438 - Issue #6990: Fix threading.local subclasses leaving old state around 439 after a reference cycle GC which could be recycled by new locals. 440 441 - Issue #6922: Fix an infinite loop when trying to decode an invalid 442 UTF-32 stream with a non-raising error handler like "replace" or "ignore". 4738 - Issue #7419: ``locale.setlocale()`` could crash the interpreter on Windows 4739 when called with invalid values. 4740 4741 - Issue #3382: 'F' formatting for float and complex now convert the result to 4742 upper case. This only affects 'inf' and 'nan', since 'f' no longer converts 4743 to 'g' for large values. 4744 4745 - Remove switch from "%f" formatting to "%g" formatting for floats larger than 4746 1e50 in absolute value. 4747 4748 - Remove restrictions on precision when formatting floats. E.g., "%.120g" % 4749 1e-100 used to raise OverflowError, but now gives the requested 120 4750 significant digits instead. 4751 4752 - Add Py3k warnings for parameter names in parentheses. 4753 4754 - Issue #7362: Give a proper error message for ``def f((x)=3): pass``. 4755 4756 - Issue #7085: Fix crash when importing some extensions in a thread on MacOSX 4757 10.6. 4758 4759 - Issue #7117: ``repr(x)`` for a float x returns a result based on the shortest 4760 decimal string that's guaranteed to round back to x under correct rounding 4761 (with round-half-to-even rounding mode). Previously it gave a string based on 4762 rounding x to 17 decimal digits. repr(x) for a complex number behaves 4763 similarly. On platforms where the correctly-rounded strtod and dtoa code is 4764 not supported (see below), repr is unchanged. 4765 4766 - Issue #7117: On almost all platforms: float-to-string and string-to-float 4767 conversions within Python are now correctly rounded. Places these conversions 4768 occur include: str for floats and complex numbers; the float and complex 4769 constructors; old-style and new-style numeric formatting; serialization and 4770 deserialization of floats and complex numbers using marshal, pickle and json; 4771 parsing of float and imaginary literals in Python code; Decimal-to-float 4772 conversion. 4773 4774 The conversions use a Python-adapted version of David Gay's well-known dtoa.c, 4775 providing correctly-rounded strtod and dtoa C functions. This code is 4776 supported on Windows, and on Unix-like platforms using gcc, icc or suncc as 4777 the C compiler. There may be a small number of platforms on which correct 4778 operation of this code cannot be guaranteed, so the code is not used: notably, 4779 this applies to platforms where the C double format is not IEEE 754 binary64, 4780 and to platforms on x86 hardware where the x87 FPU is set to 64-bit precision 4781 and Python's configure script is unable to determine how to change the FPU 4782 precision. On these platforms conversions use the platform strtod and dtoa, 4783 as before. 4784 4785 - Issue #7117: Backport round implementation from Python 3.x. ``round()`` now 4786 uses the correctly-rounded string <-> float conversions described above (when 4787 available), and so produces correctly rounded results that will display nicely 4788 under the float repr. There are two related small changes: (1) round now 4789 accepts any class with an ``__index__()`` method for its second argument (but 4790 no longer accepts floats for the second argument), and (2) an excessively 4791 large second integer argument (e.g., ``round(1.234, 10**100)``) no longer 4792 raises an exception. 4793 4794 - Issue #1757126: Fix the cyrillic-asian alias for the ptcp154 encoding. 4795 4796 - Fix several issues with ``compile()``. The input can now contain Windows and 4797 Mac newlines and is no longer required to end in a newline. 4798 4799 - Remove length limitation when constructing a complex number from a unicode 4800 string. 4801 4802 - Issue #7244: ``itertools.izip_longest()`` no longer ignores exceptions raised 4803 during the formation of an output tuple. 4804 4805 - Issue #1087418: Boost performance of bitwise operations for longs. 4806 4807 - Issue #1722344: ``threading._shutdown()`` is now called in ``Py_Finalize()``, 4808 which fixes the problem of some exceptions being thrown at shutdown when the 4809 interpreter is killed. Patch by Adam Olsen. 4810 4811 - Issue #7168: Document ``PyFloat_AsString()`` and ``PyFloat_AsReprString()``, 4812 and note that they are unsafe and deprecated. 4813 4814 - Issue #7120: logging: Remove import of multiprocessing which is causing crash 4815 in GAE. 4816 4817 - Issue #7140: The ``__dict__`` of a module should not be cleared unless the 4818 module is the only object holding a reference to it. 4819 4820 - Issue #1754094: Improve the stack depth calculation in the compiler. There 4821 should be no other effect than a small decrease in memory use. Patch by 4822 Christopher Tur Lesniewski-Laas. 4823 4824 - Issue #7084: Fix a (very unlikely) crash when printing a list from one thread, 4825 and mutating it from another one. Patch by Scott Dial. 4826 4827 - Issue #1571184: The Unicode database contains properties for more characters. 4828 The tables for code points representing numeric values, white spaces or line 4829 breaks are now generated from the official Unicode Character Database files, 4830 and include information from the Unihan.txt file. 4831 4832 - Issue #7050: Fix a SystemError when trying to use unpacking and augmented 4833 assignment. 4834 4835 - Issue #5329: Fix ``os.popen*`` regression from 2.5 with commands as a sequence 4836 running through the shell. Patch by Jean-Paul Calderone and Jani Hakala. 4837 4838 - Issue #7019: Raise ValueError when unmarshalling bad long data, instead of 4839 producing internally inconsistent Python longs. 4840 4841 - Issue #6990: Fix ``threading.local`` subclasses leaving old state around after 4842 a reference cycle GC which could be recycled by new locals. 4843 4844 - Issue #6300: unicode.encode, unicode.decode, str.decode, and str.encode now 4845 take keyword arguments. 4846 4847 - Issue #6922: Fix an infinite loop when trying to decode an invalid UTF-32 4848 stream with a non-raising error handler like "replace" or "ignore". 4849 4850 - Issue #6713: Improve performance of base 10 int -> string and long -> string 4851 conversions. 443 4852 444 4853 - Issue #1590864: Fix potential deadlock when mixing threads and fork(). … … 449 4858 - Issue #6846: Fix bug where bytearray.pop() returns negative integers. 450 4859 451 - Issue #6707: dir() on an uninitialized module caused a crash. 452 453 - Issue #6540: Fixed crash for bytearray.translate() with invalid parameters. 454 455 - Issue #6573: set.union() stopped processing inputs if an instance of self 4860 - ``classmethod()`` no longer checks if its argument is callable. 4861 4862 - Issue #6750: A text file opened with ``io.open()`` could duplicate its output 4863 when writing from multiple threads at the same time. 4864 4865 - Issue #6704: Improve the col_offset in AST for "for" statements with a target 4866 of tuple unpacking. 4867 4868 - Issue #6707: ``dir()`` on an uninitialized module caused a crash. 4869 4870 - Issue #6540: Fixed crash for ``bytearray.translate()`` with invalid parameters. 4871 4872 - Issue #6573: ``set.union()`` stopped processing inputs if an instance of self 456 4873 occurred in the argument chain. 457 4874 458 - Issue #6070: On posix platforms import no longer copies the execute bit 459 from the .py file to the .pyc file if it is set. 460 461 - Issue #4547: When debugging a very large function, it was not always 462 possible to update the lineno attribute of the current frame. 463 464 - Issue #4618: When unicode arguments are passed to print(), the default 4875 - Issue #1616979: Added the cp720 (Arabic DOS) encoding. 4876 4877 - Issue #6070: On posix platforms import no longer copies the execute bit from 4878 the .py file to the .pyc file if it is set. Patch by Marco N. 4879 4880 - Issue #4618: When unicode arguments are passed to ``print()``, the default 465 4881 separator and end should be unicode also. 466 4882 467 - Issue #6119: Fixed a incorrect Py3k warning about order comparisons of 468 builtin functions and methods. 4883 - Issue #6119: Fixed an incorrect Py3k warning about order comparisons of 4884 built-in functions and methods. 4885 4886 - Issue #6347: Include inttypes.h as well as stdint.h in pyport.h. This fixes a 4887 build failure on HP-UX: int32_t and uint32_t are defined in inttypes.h instead 4888 of stdint.h on that platform. 4889 4890 - Issue #4856: Remove checks for win NT. 4891 4892 - Issue #2016: Fixed a crash in a corner case where the dictionary of keyword 4893 arguments could be modified during the function call setup. 4894 4895 - Removed the ipaddr module. 4896 4897 - Issue #6329: Fixed iteration for memoryview objects (it was being blocked 4898 because it wasn't recognized as a sequence). 4899 4900 - Issue #6289: Encoding errors from ``compile()`` were being masked. 4901 4902 - When no module is given in a relative import, the module field of the 4903 ImportFrom AST node is now None instead of an empty string. 4904 4905 - Assignment to None using import statements now raises a SyntaxError. 4906 4907 - Issue #4547: When debugging a very large function, it was not always possible 4908 to update the lineno attribute of the current frame. 469 4909 470 4910 - Issue #5330: C functions called with keyword arguments were not reported by 471 the various profiling modules (profile, cProfile). Patch by Hagen FÃŒrstenau. 472 473 - Issue #6089: str.format can raise SystemError with certain invalid 474 field specifiers. 475 476 - Issue #5994: the marshal module now has docstrings. 477 478 - Issue #5981: Fix two minor inf/nan issues in float.fromhex: (1) inf 479 and nan strings with trailing whitespace were incorrectly rejected 480 and (2) the interpretation of fromhex('-nan') didn't match that of 481 float('-nan'). 482 483 - Issue #5890: in subclasses of 'property' the __doc__ attribute was 484 shadowed by classtype's, even if it was None. property now 485 inserts the __doc__ into the subclass instance __dict__. 486 487 - Issue #5724: (See also issue #4575.) Fix Py_IS_INFINITY macro to 488 work correctly on x87 FPUs: it now forces its argument to double 489 before testing for infinity. 490 491 - Issue #4971: Fix titlecase for characters that are their own 492 titlecase, but not their own uppercase. 493 494 - Issue #5829: complex('1e-500') no longer raises an exception 495 496 - Issue #5787: object.__getattribute__(some_type, "__bases__") segfaulted on 497 some builtin types. 4911 the various profiling modules (profile, cProfile). Patch by Hagen FÃŒrstenau. 4912 4913 - Issue #5982: staticmethod and classmethod now expose the wrapped function with 4914 ``__func__``. 4915 4916 - Added support for multiple context managers in the same with-statement. 4917 Deprecated ``contextlib.nested()`` which is no longer needed. 4918 4919 - Issue #6101: A new opcode, SETUP_WITH, has been added to speed up the with 4920 statement and correctly lookup the __enter__ and __exit__ special methods. 4921 4922 - Issue #5829: complex("1e500") no longer raises OverflowError. This makes it 4923 consistent with float("1e500") and interpretation of real and imaginary 4924 literals. 4925 4926 - Issue #3527: Removed Py_WIN_WIDE_FILENAMES which is not used any more. 4927 4928 - ``__instancecheck__()`` and ``__subclasscheck__()`` are now completely ignored 4929 on classic classes and instances. 4930 4931 - Issue #5994: The marshal module now has docstrings. 4932 4933 - Issue #5981: Fix three minor inf/nan issues in float.fromhex: 4934 4935 (1) inf and nan strings with trailing whitespace were incorrectly rejected; 4936 (2) parsing of strings representing infinities and nans was locale aware; and 4937 (3) the interpretation of fromhex('-nan') didn't match that of float('-nan'). 4938 4939 - Issue #5920: For ``float.__format__()``, change the behavior with the empty 4940 presentation type (that is, not one of 'e', 'f', 'g', or 'n') to be like 'g' 4941 but with at least one decimal point and with a default precision 4942 of 12. Previously, the behavior the same but with a default precision of 6. 4943 This more closely matches ``str()``, and reduces surprises when adding 4944 alignment flags to the empty presentation type. This also affects the new 4945 complex.__format__ in the same way. 4946 4947 - Issue #5890: In subclasses of 'property' the __doc__ attribute was shadowed by 4948 classtype's, even if it was None. property now inserts the __doc__ into the 4949 subclass instance __dict__. 4950 4951 - Issue #4426: The UTF-7 decoder was too strict and didn't accept some legal 4952 sequences. Patch by Nick Barnes and Victor Stinner. 4953 4954 - Issue #1588: Add complex.__format__. For example, ``format(complex(1, 2./3), 4955 '.5')`` now produces a sensible result. 4956 4957 - Issue #5864: Fix empty format code formatting for floats so that it never 4958 gives more than the requested number of significant digits. 4959 4960 - Issue #5793: Rationalize isdigit / isalpha / tolower, etc. Includes new 4961 Py_ISDIGIT / Py_ISALPHA / Py_TOLOWER, etc. in pctypes.h. 4962 4963 - Issue #4971: Fix titlecase for characters that are their own titlecase, but 4964 not their own uppercase. 4965 4966 - Issue #5835: Deprecate PyOS_ascii_formatd and replace it with 4967 _PyOS_double_to_string or PyOS_double_to_string. 498 4968 499 4969 - Issue #5283: Setting __class__ in __del__ caused a segfault. 500 4970 4971 - Issue #5816: ``complex(repr(z))`` now recovers z exactly, even when z involves 4972 nans, infs or negative zeros. 4973 4974 - Implement PEP 378, Format Specifier for Thousands Separator, for floats, ints, 4975 and longs. 4976 4977 - Issue #5515: 'n' formatting for ints, longs, and floats handles leading zero 4978 formatting poorly. 4979 4980 - Issue #5772: For float.__format__, don't add a trailing ".0" if we're using no 4981 type code and we have an exponent. 4982 4983 - Issue #3166: Make long -> float (and int -> float) conversions correctly 4984 rounded. 4985 4986 - Issue #5787: ``object.__getattribute__(some_type, "__bases__")`` segfaulted on 4987 some built-in types. 4988 4989 - Issue #1869: Fix a couple of minor round() issues. ``round(5e15+1)`` was 4990 giving 5e15+2; ``round(-0.0)`` was losing the sign of the zero. 4991 501 4992 - Issue #5759: float() didn't call __float__ on str subclasses. 4993 4994 - Issue #5704: The "-3" command-line option now implies "-t". 4995 4996 - Issue #2170: Refactored ``xml.dom.minidom.normalize``, increasing both its 4997 clarity and its speed. 4998 4999 - Issue #2396: The memoryview object was backported from Python 3.1. 5000 5001 - Fix a problem in PyErr_NormalizeException that leads to "undetected errors" 5002 when hitting the recursion limit under certain circumstances. 5003 5004 - Issue #1665206: Remove the last eager import in _warnings.c and make it lazy. 5005 5006 - Issue #4865: On MacOSX /Library/Python/2.7/site-packages is added to the end 5007 sys.path, for compatibility with the system install of Python. 5008 5009 - Issue #4688: Add a heuristic so that tuples and dicts containing only 5010 untrackable objects are not tracked by the garbage collector. This can reduce 5011 the size of collections and therefore the garbage collection overhead on 5012 long-running programs, depending on their particular use of datatypes. 5013 5014 - Issue #5512: Rewrite PyLong long division algorithm (x_divrem) to improve its 5015 performance. Long divisions and remainder operations are now between 50% and 5016 150% faster. 5017 5018 - Issue #4258: Make it possible to use base 2**30 instead of base 2**15 for the 5019 internal representation of integers, for performance reasons. Base 2**30 is 5020 enabled by default on 64-bit machines. Add --enable-big-digits option to 5021 configure, which overrides the default. Add sys.long_info structseq to 5022 provide information about the internal format. 5023 5024 - Issue #4034: Fix weird attribute error messages of the traceback object. (As a 5025 result traceback.__members__ no longer exists.) 5026 5027 - Issue #4474: PyUnicode_FromWideChar now converts characters outside the BMP to 5028 surrogate pairs, on systems with sizeof(wchar_t) == 4 and sizeof(Py_UNICODE) 5029 == 2. 5030 5031 - Issue #5237: Allow auto-numbered fields in str.format(). For example: ``'{} 5032 {}'.format(1, 2) == '1 2'``. 5033 5034 - Issue #3652: Make the 'line' argument for ``warnings.showwarning()`` a 5035 requirement. Means the DeprecationWarning from Python 2.6 can go away. 5036 5037 - Issue #5247: Improve error message when unknown format codes are used when 5038 using ``str.format()`` with str, unicode, long, int, and float arguments. 5039 5040 - Running Python with the -3 option now also warns about classic division for 5041 ints and longs. 5042 5043 - Issue #5260: Long integers now consume less memory: average saving is 2 bytes 5044 per long on a 32-bit system and 6 bytes per long on a 64-bit system. 5045 5046 - Issue #5186: Reduce hash collisions for objects with no __hash__ method by 5047 rotating the object pointer by 4 bits to the right. 5048 5049 - Issue #4575: Fix Py_IS_INFINITY macro to work correctly on x87 FPUs: it now 5050 forces its argument to double before testing for infinity. 5051 5052 - Issue #4978: Passing keyword arguments as unicode strings is now allowed. 5053 5054 - Issue #1242657: the __len__() and __length_hint__() calls in several tools 5055 were suppressing all exceptions. These include list(), filter(), map(), 5056 zip(), and bytearray(). 5057 5058 - os.ftruncate raises OSErrors instead of IOErrors for consistency with other os 5059 functions. 5060 5061 - Issue #4991: Passing invalid file descriptors to io.FileIO now raises an 5062 OSError. 5063 5064 - Issue #4807: Port the _winreg module to Windows CE. 5065 5066 - Issue #4935: The overflow checking code in the expandtabs() method common to 5067 str, bytes and bytearray could be optimized away by the compiler, letting the 5068 interpreter segfault instead of raising an error. 5069 5070 - Issue #3720: Fix a crash when an iterator modifies its class and removes its 5071 __next__ method. 5072 5073 - Issue #4893: Use NT threading on CE. 5074 5075 - Issue #4915: Port sysmodule to Windows CE. 5076 5077 - Issue #4074: Change the criteria for doing a full garbage collection (i.e. 5078 collecting the oldest generation) so that allocating lots of objects without 5079 destroying them does not show quadratic performance. Based on a proposal by 5080 Martin von Löwis at 5081 http://mail.python.org/pipermail/python-dev/2008-June/080579.html. 5082 5083 - Issue #4850: Change COUNT_ALLOCS variables to Py_ssize_t. 5084 5085 - Issue #1180193: When importing a module from a .pyc (or .pyo) file with an 5086 existing .py counterpart, override the co_filename attributes of all code 5087 objects if the original filename is obsolete (which can happen if the file has 5088 been renamed, moved, or if it is accessed through different paths). Patch by 5089 Ziga Seilnacht and Jean-Paul Calderone. 5090 5091 - Issue #4075: Use ``OutputDebugStringW()`` in Py_FatalError. 5092 5093 - Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open 5094 file with `str' filename on Windows. 5095 5096 - Issue #3680: Reference cycles created through a dict, set or deque iterator 5097 did not get collected. 5098 5099 - Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types where 5100 the tp_hash and tp_dict slots are both NULL. 5101 5102 - Issue #4764: With io.open, IOError.filename is set when trying to open a 5103 directory on POSIX systems. 5104 5105 - Issue #4764: IOError.filename is set when trying to open a directory on POSIX 5106 systems. 5107 5108 - Issue #4759: None is now allowed as the first argument of 5109 ``bytearray.translate()``. It was always allowed for ``bytes.translate()``. 5110 5111 - Added test case to ensure attempts to read from a file opened for writing 5112 fail. 5113 5114 - Issue #2467: gc.DEBUG_STATS reported invalid elapsed times. Also, always print 5115 elapsed times, not only when some objects are uncollectable/unreachable. 5116 Original patch by Neil Schemenauer. 5117 5118 - Issue #3439: Add a bit_length method to int and long. 5119 5120 - Issue #2183: Simplify and optimize bytecode for list comprehensions. Original 5121 patch by Neal Norwitz. 5122 5123 - Issue #4597: Fixed exception handling when the __exit__ function of a context 5124 manager returns a value that cannot be converted to a bool. 5125 5126 - Issue #4597: Fixed several opcodes that weren't always propagating exceptions. 5127 5128 - Issue #4445: Replace ``sizeof(PyStringObject)`` with 5129 ``offsetof(PyStringObject, ob_sval) + 1`` when allocating memory for str 5130 instances. On a typical machine this saves 3 bytes of memory (on average) per 5131 string allocation. 5132 5133 - Issue #3996: On Windows, the PyOS_CheckStack function would cause the 5134 interpreter to abort ("Fatal Python error: Could not reset the stack!") 5135 instead of throwing a MemoryError. 5136 5137 - Issue #3689: The list reversed iterator now supports __length_hint__ instead 5138 of __len__. Behavior now matches other reversed iterators. 5139 5140 - Issue #4367: Python would segfault during compiling when the unicodedata 5141 module couldn't be imported and \N escapes were present. 5142 5143 - Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()`` method on 5144 file objects with closefd=False. The file descriptor is still kept open but 5145 the file object behaves like a closed file. The ``FileIO`` object also got a 5146 new readonly attribute ``closefd``. 5147 5148 - Issue #4348: Some bytearray methods returned that didn't cause any change to 5149 the bytearray, returned the same bytearray instead of a copy. 5150 5151 - Issue #4317: Fixed a crash in the ``imageop.rgb2rgb8()`` function. 5152 5153 - Issue #4230: If ``__getattr__`` is a descriptor, it now functions correctly. 5154 5155 - Issue #4048: The parser module now correctly validates relative imports. 5156 5157 - Issue #4225: ``from __future__ import unicode_literals`` didn't work in an 5158 exec statement. 5159 5160 - Issue #4176: Fixed a crash when pickling an object which ``__reduce__`` method 5161 does not return iterators for the 4th and 5th items. 5162 5163 - Issue #4209: Enabling unicode_literals and the print_function in the same 5164 __future__ import didn't work. 5165 5166 - Using ``nonlocal`` as a variable name will now raise a Py3k SyntaxWarning 5167 because it is a reserved word in 3.x. 5168 5169 - On windows, ``os.chdir()`` given unicode was not working if 5170 GetCurrentDirectoryW returned a path longer than MAX_PATH. (But It's doubtful 5171 this code path is really executed because I cannot move to such directory on 5172 win2k) 5173 5174 - Issue #4069: When ``set.remove(element)`` is used with a set element, the 5175 element is temporarily replaced with an equivalent frozenset. But the 5176 eventual KeyError would always report the empty ``frozenset()`` as the missing 5177 key. Now it correctly refers to the initial element. 5178 5179 - Issue #4509: Various issues surrounding resize of bytearray objects to which 5180 there are buffer exports. 5181 5182 - Issue #4748: Lambda generators no longer return a value. 5183 5184 - Issue #3582: Use native TLS functions on Windows 5185 5186 - The re.sub(), re.subn() and re.split() functions now accept a flags parameter. 5187 5188 - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with short 5189 file names. 5190 5191 - Issue #1113244: Py_XINCREF, Py_DECREF, Py_XDECREF: Add `do { ... } while (0)' 5192 to avoid compiler warnings. 5193 5194 - Issue #5705: os.setuid() would not accept values > 2**31-1 but pwd.getpwnam() 5195 returned them on 64bit platforms. 502 5196 503 5197 - Issue #5108: Handle %s like %S and %R in PyUnicode_FromFormatV(): Call … … 506 5200 of using the replace error handler in PyUnicode_DecodeUTF8(). 507 5201 5202 - Issue #3739: The unicode-internal encoder now reports the number of characters 5203 consumed like any other encoder (instead of the number of bytes). 5204 5205 - Issue #2422: When compiled with the ``--with-valgrind`` option, the pymalloc 5206 allocator will be automatically disabled when running under Valgrind. This 5207 gives improved memory leak detection when running under Valgrind, while taking 5208 advantage of pymalloc at other times. 5209 508 5210 Library 509 5211 ------- 510 5212 511 - Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment 512 513 - Issue #6790: Make it possible again to pass an `array.array` to 514 `httplib.HTTPConnection.send`. Patch by Kirk McDonald. 515 516 - Issue #6236, #6348: Fix various failures in the `io` module under AIX 517 and other platforms, when using a non-gcc compiler. Patch by egreen. 5213 - Add count() and reverse() methods to collections.deque(). 5214 5215 - Fix variations of extending deques: d.extend(d) d.extendleft(d) d+=d 5216 5217 - Issue #6986: Fix crash in the JSON C accelerator when called with the wrong 5218 parameter types. Patch by Victor Stinner. 5219 5220 - logging: Added optional "secure" parameter to SMTPHandler, to enable use of 5221 TLS with authentication credentials. 5222 5223 - Issue #1923: Fixed the removal of meaningful spaces when PKG-INFO is generated 5224 in Distutils. Patch by Stephen Emslie. 5225 5226 - Issue #4120: Drop reference to CRT from manifest when building extensions with 5227 msvc9compiler. 5228 5229 - Issue #7333: The ``posix`` module gains an ``initgroups()`` function providing 5230 access to the initgroups(3) C library call on Unix systems which implement it. 5231 Patch by Jean-Paul Calderone. 5232 5233 - Issue #7408: Fixed distutils.tests.sdist so it doesn't check for group 5234 ownership when the group is not forced, because the group may be different 5235 from the user's group and inherit from its container when the test is run. 5236 5237 - Issue #1515: Enable use of deepcopy() with instance methods. Patch by Robert 5238 Collins. 5239 5240 - Issue #7403: logging: Fixed possible race condition in lock creation. 5241 5242 - Issue #6845: Add restart support for binary upload in ftplib. The 5243 ``storbinary()`` method of FTP and FTP_TLS objects gains an optional "rest" 5244 argument. Patch by Pablo Mouzo. 5245 5246 - Issue #5788: ``datetime.timedelta`` objects get a new ``total_seconds()`` 5247 method returning the total number of seconds in the duration. Patch by Brian 5248 Quinlan. 5249 5250 - Issue #6615: logging: Used weakrefs in internal handler list. 5251 5252 - Issue #1488943: ``difflib.Differ`` doesn't always add hints for tab 5253 characters. 5254 5255 - Issue #6123: tarfile now opens empty archives correctly and consistently 5256 raises ReadError on empty files. 5257 5258 - Issue #7354: distutils.tests.test_msvc9compiler - dragfullwindows can be 2. 5259 5260 - Issue #5037: Proxy the __unicode__ special method to __unicode__ instead of 5261 __str__. 5262 5263 - Issue #7341: Close the internal file object in the TarFile constructor in case 5264 of an error. 5265 5266 - Issue #7293: ``distutils.test_msvc9compiler`` is fixed to work on any fresh 5267 Windows box. Help provided by David Bolen. 5268 5269 - Issue #7328: pydoc no longer corrupts sys.path when run with the '-m' switch. 5270 5271 - Issue #2054: ftplib now provides an FTP_TLS class to do secure FTP using TLS 5272 or SSL. Patch by Giampaolo Rodola'. 5273 5274 - Issue #4969: The mimetypes module now reads the MIME database from the 5275 registry under Windows. Patch by Gabriel Genellina. 5276 5277 - Issue #6816: runpy now provides a run_path function that allows Python code to 5278 execute file paths that refer to source or compiled Python files as well as 5279 zipfiles, directories and other valid sys.path entries that contain a 5280 __main__.py file. This allows applications that run other Python scripts to 5281 support the same flexibility as the CPython command line itself. 5282 5283 - Issue #7318: multiprocessing now uses a timeout when it fails to establish a 5284 connection with another process, rather than looping endlessly. The default 5285 timeout is 20 seconds, which should be amply sufficient for local connections. 5286 5287 - Issue #7197: Allow unittest.TextTestRunner objects to be pickled and 5288 unpickled. This fixes crashes under Windows when trying to run 5289 test_multiprocessing in verbose mode. 5290 5291 - Issue #7282: Fix a memory leak when an RLock was used in a thread other than 5292 those started through ``threading.Thread`` (for example, using 5293 ``thread.start_new_thread()``. 5294 5295 - Issue #7264: Fix a possible deadlock when deallocating thread-local objects 5296 which are part of a reference cycle. 5297 5298 - Issue #7211: Allow 64-bit values for the ``ident`` and ``data`` fields of 5299 kevent objects on 64-bit systems. Patch by Michael Broghton. 5300 5301 - Issue #6896: ``mailbox.Maildir`` now invalidates its internal cache each time 5302 a modification is done through it. This fixes inconsistencies and test 5303 failures on systems with slightly bogus mtime behaviour. 5304 5305 - Issue #7246 & Issue #7208: getpass now properly flushes input before reading 5306 from stdin so that existing input does not confuse it and lead to incorrect 5307 entry or an IOError. It also properly flushes it afterwards to avoid the 5308 terminal echoing the input afterwards on OSes such as Solaris. 5309 5310 - Issue #7233: Fix a number of two-argument Decimal methods to make sure that 5311 they accept an int or long as the second argument. Also fix buggy handling of 5312 large arguments (those with coefficient longer than the current precision) in 5313 shift and rotate. 5314 5315 - Issue #4750: Store the basename of the original filename in the gzip FNAME 5316 header as required by RFC 1952. 5317 5318 - Issue #1180: Added a new global option to ignore ~/.pydistutils.cfg in 5319 Distutils. 5320 5321 - Issue #7218: Fix test_site for win32, the directory comparison was done with 5322 an uppercase. 5323 5324 - Issue #7205: Fix a possible deadlock when using a BZ2File object from several 5325 threads at once. 5326 5327 - Issue #7071: byte-compilation in Distutils is now done with respect to 5328 sys.dont_write_bytecode. 5329 5330 - Issue #7066: archive_util.make_archive now restores the cwd if an error is 5331 raised. Initial patch by Ezio Melotti. 5332 5333 - Issue #6218: io.StringIO and io.BytesIO instances are now picklable with 5334 protocol 2. 5335 5336 - Issue #7077: logging: SysLogHandler now treats Unicode as per RFC 5424. 5337 5338 - Issue #7099: Decimal.is_normal now returns True for numbers with exponent 5339 larger than emax. 5340 5341 - Issue #5833: Fix extra space character in readline completion with the GNU 5342 readline library version 6.0. 5343 5344 - Issue #7133: SSL objects now support the new buffer API. 5345 5346 - Issue #7149: urllib fails on OSX in the proxy detection code. 5347 5348 - Issue #7069: Make inspect.isabstract() return a boolean. 5349 5350 - Add support to the ``ihooks`` module for relative imports. 5351 5352 - Issue #6894: Fixed the issue urllib2 doesn't respect "no_proxy" environment. 5353 5354 - Issue #7086: Added TCP support to SysLogHandler, and tidied up some 5355 anachronisms in the code which were a relic of 1.5.2 compatibility. 5356 5357 - Issue #7082: When falling back to the MIME 'name' parameter, the correct place 5358 to look for it is the Content-Type header. 5359 5360 - Issue #7048: Force Decimal.logb to round its result when that result is too 5361 large to fit in the current precision. 5362 5363 - Issue #6516: Added owner/group support when creating tar archives in 5364 Distutils. 5365 5366 - Issue #7031: Add ``TestCase.assert(Not)IsInstance()`` methods. 5367 5368 - Issue #6790: Make it possible again to pass an ``array.array`` to 5369 ``httplib.HTTPConnection.send``. Patch by Kirk McDonald. 5370 5371 - Issue #6236, #6348: Fix various failures in the `io` module under AIX and 5372 other platforms, when using a non-gcc compiler. Patch by egreen. 5373 5374 - Issue #6954: Fixed crash when using DISTUTILS_DEBUG flag in Distutils. 518 5375 519 5376 - Issue #6851: Fix urllib.urlopen crash on secondairy threads on OSX 10.6 520 5377 521 - Issue #6947: Fix distutils test on windows. Patch by Hirokazu Yamamoto. 522 523 - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) 524 does now always result in NULL. 525 526 - Issue #5042: ctypes Structure sub-subclass does now initialize 527 correctly with base class positional arguments. 528 529 - Issue #6938: Fix a TypeError in string formatting of a multiprocessing 530 debug message. 5378 - Issue #4606: Passing 'None' if ctypes argtype is set to POINTER(...) does now 5379 always result in NULL. 5380 5381 - Issue #5042: ctypes Structure sub-subclass does now initialize correctly with 5382 base class positional arguments. 5383 5384 - Issue #6938: Fix a TypeError in string formatting of a multiprocessing debug 5385 message. 531 5386 532 5387 - Issue #6635: Fix profiler printing usage message. 533 5388 534 - Issue #6795: int(Decimal('nan')) now raises ValueError instead of 535 returning NaN or raising InvalidContext. Also, fix infinite recursion 536 in long(Decimal('nan')). 537 538 - Issue #6850: Fix bug in Decimal._parse_format_specifier for formats 539 with no type specifier. 540 541 - Issue #4937: plat-mac/bundlebuilder revers to non-existing version.plist 542 543 - Issue #6838: Use a list to accumulate the value instead of 544 repeatedly concatenating strings in httplib's 545 HTTPResponse._read_chunked providing a significant speed increase 546 when downloading large files servend with a Transfer-Encoding of 'chunked'. 5389 - Issue #6856: Add a filter keyword argument to TarFile.add(). 5390 5391 - Issue #6163: Fixed HP-UX runtime library dir options in 5392 distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and Michael 5393 Haubenwallner. 5394 5395 - Issue #6857: Default format() alignment should be '>' for Decimal instances. 5396 5397 - Issue #6795: int(Decimal('nan')) now raises ValueError instead of returning 5398 NaN or raising InvalidContext. Also, fix infinite recursion in 5399 long(Decimal('nan')). 5400 5401 - Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no 5402 type specifier. 5403 5404 - Issue #4937: plat-mac/bundlebuilder refers to non-existing version.plist. 5405 5406 - Issue #6838: Use a list to accumulate the value instead of repeatedly 5407 concatenating strings in httplib's HTTPResponse._read_chunked providing a 5408 significant speed increase when downloading large files servend with a 5409 Transfer-Encoding of 'chunked'. 5410 5411 - Issue #5275: In Cookie's Cookie.load(), properly handle non-string arguments 5412 as documented. 5413 5414 - Issue #2666: Handle BROWSER environment variable properly for unknown browser 5415 names in the webbrowser module. 5416 5417 - Issue #6054: Do not normalize stored pathnames in tarfile. 547 5418 548 5419 - Issue #6794: Fix Decimal.compare_total and Decimal.compare_total_mag: NaN 549 5420 payloads are now ordered by integer value rather than lexicographically. 550 5421 551 - Issue #6117: Fix O(n**2) performance degradation when outputting lots of 552 small data on a buffered socket.socket.makefile() object. 553 554 - Issue #6637: defaultdict.copy() did not work when the default factory 555 was left unspecified. Also, the eval/repr round-trip would fail when 556 the default_factory was None. 557 558 - Issue #1424152: Fix for httplib, urllib2 to support SSL while working through 559 proxy. Original patch by Christopher Li, changes made by Senthil Kumaran. 560 561 - Issues #5155, 5313, 5331: multiprocessing.Process._bootstrap was 5422 - Issue #6693: New functions in site.py to get user/global site packages paths. 5423 5424 - The thread.lock type now supports weak references. 5425 5426 - Issue #1356969: Add missing info methods in Tix.HList. 5427 5428 - Issue #1522587: New constants and methods for the Tix.Grid widget. 5429 5430 - Issue #1250469: Fix the return value of Tix.PanedWindow.panes. 5431 5432 - Issue #1119673: Do not override Tkinter.Text methods when creating a 5433 ScrolledText. 5434 5435 - Issue #6665: Fix fnmatch to properly match filenames with newlines in them. 5436 5437 - Issue #1135: Add the XView and YView mix-ins to avoid duplicating the xview* 5438 and yview* methods. 5439 5440 - Issue #6629: Fix a data corruption issue in the new `io` package, which could 5441 occur when writing to a BufferedRandom object (e.g. a file opened in "rb+" or 5442 "wb+" mode) after having buffered a certain amount of data for reading. This 5443 bug was not present in the pure Python implementation. 5444 5445 - Issue #4660: If a multiprocessing.JoinableQueue.put() was preempted, it was 5446 possible to get a spurious 'task_done() called too many times' error. 5447 5448 - Issue #1628205: Socket file objects returned by socket.socket.makefile() now 5449 properly handles EINTR within the read, readline, write & flush methods. The 5450 socket.sendall() method now properly handles interrupted system calls. 5451 5452 - Issue #6595: The Decimal constructor now allows arbitrary Unicode decimal 5453 digits in input, as recommended by the standard. Previously it was restricted 5454 to accepting [0-9]. 5455 5456 - Issue #6511: ZipFile now raises BadZipfile (instead of an IOError) when 5457 opening an empty or very small file. 5458 5459 - Issue #6553: Fixed a crash in cPickle.load(), when given a file-like object 5460 containing incomplete data. 5461 5462 - Issue #6545: Removed assert statements in distutils.Extension, so the behavior 5463 is similar when used with -O. 5464 5465 - unittest has been split up into a package. All old names should still work. 5466 5467 - Issue #6431: Make Fraction type return NotImplemented when it doesn't know how 5468 to handle a comparison without loss of precision. Also add correct handling 5469 of infinities and nans for comparisons with float. 5470 5471 - Issue #6415: Fixed warnings.warn segfault on bad formatted string. 5472 5473 - Issue #6466: Now distutils.cygwinccompiler and distutils.emxccompiler uses the 5474 same refactored function to get gcc/ld/dllwrap versions numbers. It's 5475 ``distutils.util.get_compiler_versions()``. Added deprecation warnings for 5476 the obsolete get_versions() functions. 5477 5478 - Issue #6433: Fixed issues with multiprocessing.pool.map hanging on empty list. 5479 5480 - Issue #6314: logging: Extra checks on the "level" argument in more places. 5481 5482 - Issue #2622: Fixed an ImportError when importing email.messsage from a 5483 standalone application built with py2exe or py2app. 5484 5485 - Issue #6455: Fixed test_build_ext under win32. 5486 5487 - Issue #6377: Enabled the compiler option, and deprecate its usage as an 5488 attribute. 5489 5490 - Issue #6413: Fixed the log level in distutils.dist for announce. 5491 5492 - Issue #3392: The subprocess communicate() method no longer fails in select() 5493 when file descriptors are large; communicate() now uses poll() when possible. 5494 5495 - Issue #6403: Fixed package path usage in build_ext. 5496 5497 - Issues #5155, #5313, #5331: multiprocessing.Process._bootstrap was 562 5498 unconditionally calling "os.close(sys.stdin.fileno())" resulting in file 563 descriptor errors 564 565 - Issue #6415: Fixed warnings.warn sagfault on bad formatted string. 5499 descriptor errors. 5500 5501 - Issue #6365: Distutils build_ext inplace mode was copying the compiled 5502 extension in a subdirectory if the extension name had dots. 566 5503 567 5504 - Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. 568 5505 569 - Issue #5230: pydoc would report no documentation found if a module generated 570 a'not found' import error when loaded; it now reports the import errors.5506 - Issue #5230: pydoc would report no documentation found if a module generated a 5507 'not found' import error when loaded; it now reports the import errors. 571 5508 Thanks to Lucas Prado Melo for initial fix and collaboration on the tests. 572 5509 573 - Issue #6274: Fixed possible file descriptors leak in subprocess.py 574 575 - Issue #6271: mmap tried to close invalid file handle (-1) when annonymous. 576 (On Unix) 5510 - Issue #6314: ``logging.basicConfig()`` performs extra checks on the "level" 5511 argument. 5512 5513 - Issue #6164: Added an AIX specific linker argument in Distutils unixcompiler. 5514 Original patch by Sridhar Ratnakumar. 5515 5516 - Issue #6274: Fixed possible file descriptors leak in subprocess.py. 5517 5518 - Issue #6189: Restored compatibility of subprocess.py with Python 2.2. 5519 5520 - Issue #6287: Added the license field in Distutils documentation. 5521 5522 - Issue #6286: Now Distutils upload command is based on urllib2 instead of 5523 httplib, allowing the usage of http_proxy. 5524 5525 - Issue #6271: mmap tried to close invalid file handle (-1) for anonymous maps 5526 on Unix. 5527 5528 - Issue #6215: All bug fixes and enhancements from the Python 3.1 io library 5529 (including the fast C implementation) have been backported to the standard 5530 ``io`` module. 577 5531 578 5532 - Issue #6258: Support AMD64 in bdist_msi. … … 581 5535 TimedRotatingFileHandler. 582 5536 583 - Issue #6121: pydoc now ignores leading and trailing spaces in the 584 argument to the 'help' function. 585 586 - Issue #6050: Don't fail extracting a directory from a zipfile if 587 the directory already exists. 588 589 - collections.namedtuple() was not working with the following field 590 names: cls, self, tuple, itemgetter, and property. 5537 - Issue #6263: Fixed syntax error in distutils.cygwincompiler. 5538 5539 - Issue #5201: distutils.sysconfig.parse_makefile() now understands ``$$`` in 5540 Makefiles. This prevents compile errors when using syntax like: 5541 ``LDFLAGS='-rpath=\$$LIB:/some/other/path'``. Patch by Floris Bruynooghe. 5542 5543 - Issue #5767: Removed sgmlop support from xmlrpclib. 5544 5545 - Issue #6131: test_modulefinder leaked when run after test_distutils. Patch by 5546 Hirokazu Yamamoto. 5547 5548 - Issue #6048: Now Distutils uses the tarfile module in archive_util. 5549 5550 - Issue #6121: pydoc now ignores leading and trailing spaces in the argument to 5551 the 'help' function. 5552 5553 - In unittest, using a skipping decorator on a class is now equivalent to 5554 skipping every test on the class. The ClassTestSuite class has been removed. 5555 5556 - Issue #6050: Don't fail extracting a directory from a zipfile if the directory 5557 already exists. 5558 5559 - Issue #5311: bdist_msi can now build packages that do not depend on a specific 5560 Python version. 591 5561 592 5562 - Issue #1309352: fcntl now converts its third arguments to a C `long` rather … … 594 5564 DN_MULTISHOT with F_NOTIFY). 595 5565 596 - Issue #1983: Fix functions taking or returning a process identifier to use 597 the dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have 598 a process identifier type wider than the standard C integer type. 5566 - Issue #1424152: Fix for httplib, urllib2 to support SSL while working through 5567 proxy. Original patch by Christopher Li, changes made by Senthil Kumaran. 5568 5569 - Issue #1983: Fix functions taking or returning a process identifier to use the 5570 dedicated C type ``pid_t`` instead of a C ``int``. Some platforms have a 5571 process identifier type wider than the standard C integer type. 599 5572 600 5573 - Issue #4066: smtplib.SMTP_SSL._get_socket now correctly returns the socket. 601 5574 Patch by Farhan Ahmad, test by Marcin Bachry. 602 5575 603 - Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. 604 605 - Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr. 5576 - Issue #6062: In distutils, fixed the package option of build_ext. Feedback 5577 and tests on pywin32 by Tim Golden. 5578 5579 - Issue #6053: Fixed distutils tests on win32. Patch by Hirokazu Yamamoto. 5580 5581 - Issue #6046: Fixed the library extension when distutils build_ext is used in 5582 place. Initial patch by Roumen Petrov. 5583 5584 - Issue #6041: Now distutils `sdist` and `register` commands use `check` as a 5585 subcommand. 5586 5587 - Issue #2116: Weak references and weak dictionaries now support copy()ing and 5588 deepcopy()ing. 5589 5590 - Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. 5591 5592 - Issue #5918: Fix a crash in the parser module. 5593 5594 - Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr. 5595 5596 - Issue #6022: A test file was created in the current working directory by 5597 test_get_outputs in Distutils. 5598 5599 - Issue #4050: inspect.findsource/getsource now raise an IOError if the 'source' 5600 file is a binary. Patch by Brodie Rao, tests by Daniel Diniz. 5601 5602 - Issue #5977: distutils build_ext.get_outputs was not taking into account the 5603 inplace option. Initial patch by kxroberto. 5604 5605 - Issue #5984: distutils.command.build_ext.check_extensions_list checks were 5606 broken for old-style extensions. 606 5607 607 5608 - Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when 608 5609 trying to print a traceback. 609 5610 610 - Issue 5955: aifc's close method did not close the file it wrapped, 611 now it does. This also means getfp method now returns the real fp. 612 613 - Issue #4875: On win32, ctypes.util.find_library does no longer 614 return directories. 615 616 - Issue #5692: In :class:`zipfile.Zipfile`, fix wrong path calculation when 5611 - Issue #5976: Fixed Distutils test_check_environ. 5612 5613 - Issue #5900: Ensure RUNPATH is added to extension modules with RPATH if GNU ld 5614 is used. Original patch by Floris Bruynooghe. 5615 5616 - Issue #5941: Distutils build_clib command was not working anymore because of 5617 an incomplete costumization of the archiver command. Added ARFLAGS in the 5618 Makefile besides AR and make Distutils use it. Original patch by David 5619 Cournapeau. 5620 5621 - Issue #5955: aifc's close method did not close the file it wrapped, now it 5622 does. This also means getfp method now returns the real fp. 5623 5624 - Issue #4875: On win32, ctypes.util.find_library does no longer return 5625 directories. 5626 5627 - Issue #5142: Add the ability to skip modules while stepping to pdb. 5628 5629 - Issue #1309567: Fix linecache behavior of stripping subdirectories when 5630 looking for files given by a relative filename. 5631 5632 - Issue #5692: In ``zipfile.Zipfile``, fix wrong path calculation when 617 5633 extracting a file to the root directory. 618 5634 5635 - Issue #5913: ``os.listdir()`` should fail for empty path on windows. 5636 5637 - Issue #5084: Unpickling now interns the attribute names of pickled objects, 5638 saving memory and avoiding growth in size of subsequent pickles. Proposal and 5639 original patch by Jake McGuire. 5640 5641 - Issue #3002: ``shutil.copyfile()`` and ``shutil.copytree()`` now raise an 5642 error when a named pipe is encountered, rather than blocking infinitely. 5643 5644 - Issue #3959: The ipaddr module has been added to the standard library. 5645 Contributed by Google. 5646 619 5647 - Issue #2245: aifc now skips chunk types it doesn't recognize, per spec. 620 5648 5649 - Issue #5874: distutils.tests.test_config_cmd is not locale-sensitive anymore. 5650 621 5651 - Issue #4305: ctypes should now build again on mipsel-linux-gnu 622 5652 623 - Issue #5853: calling a function of the mimetypes module from several threads 5653 - Issue #1734234: Massively speedup ``unicodedata.normalize()`` when the string 5654 is already in normalized form, by performing a quick check beforehand. 5655 Original patch by Rauli Ruohonen. 5656 5657 - Issue #5853: Calling a function of the mimetypes module from several threads 624 5658 at once could hit the recursion limit if the mimetypes database hadn't been 625 5659 initialized before. 626 5660 5661 - Issue #5854: Updated __all__ to include some missing names and remove some 5662 names which should not be exported. 5663 5664 - Issue #5810: Fixed Distutils test_build_scripts so it uses 5665 ``sysconfig.get_config_vars()``. 5666 5667 - Issue #4951: Fixed failure in test_httpservers. 5668 5669 - Issue #3102: All global symbols that the _ctypes extension defines are now 5670 prefixed with 'Py' or '_ctypes'. 5671 627 5672 - Issue #5041: ctypes does now allow pickling wide character. 628 5673 5674 - Issue #5812: For the two-argument form of the Fraction constructor, 5675 ``Fraction(m, n)``, m and n are permitted to be arbitrary Rational instances. 5676 5677 - Issue #5812: Fraction('1e6') is valid: more generally, any string that's valid 5678 for float() is now valid for Fraction(), with the exception of strings 5679 representing NaNs and infinities. 5680 5681 - Issue #5795: Fixed test_distutils failure on Debian ppc. 5682 629 5683 - Issue #5768: Fixed bug in Unicode output logic and test case for same. 630 5684 631 - Issue #1161031: fix readwrite select flag handling: POLLPRI now 632 results in a handle_expt_event call, not handle_read_event, and POLLERR 633 and POLLNVAL now call handle_close, not handle_expt_event. Also, 634 dispatcher now has an 'ignore_log_types' attribute for suppressing 635 log messages, which is set to 'warning' by default. 5685 - Issue #1161031: Fix readwrite select flag handling: POLLPRI now results in a 5686 handle_expt_event call, not handle_read_event, and POLLERR and POLLNVAL now 5687 call handle_close, not handle_expt_event. Also, dispatcher now has an 5688 'ignore_log_types' attribute for suppressing log messages, which is set to 5689 'warning' by default. 5690 5691 - Issue #5607: Fixed Distutils test_get_platform for Mac OS X fat binaries. 5692 5693 - Issue #5741: Don't disallow "%%" (which is an escape for "%") when setting a 5694 value in SafeConfigParser. 5695 5696 - Issue #5732: Added a new command in Distutils: check. 5697 5698 - Issue #5731: Distutils bdist_wininst no longer worked on non-Windows 5699 platforms. Initial patch by Paul Moore. 5700 5701 - Issue #2254: Fix CGIHTTPServer information disclosure. Relative paths are now 5702 collapsed within the url properly before looking in cgi_directories. 5703 5704 - Issue #5095: Added bdist_msi to the list of bdist supported formats. Initial 5705 fix by Steven Bethard. 5706 5707 - Issue #1491431: Fixed distutils.filelist.glob_to_re for edge cases. Initial 5708 fix by Wayne Davison. 5709 5710 - Issue #5693: TestSuite.__iter__ can now be consistently overridden in 5711 subclasses. 5712 5713 - Issue #5694: Removed spurious test output in Distutils (test_clean). 5714 5715 - Issue #5471: Fix os.path.expanduser() for $HOME set to '/'. 5716 5717 - Issue #1326077: Fix the formatting of SyntaxErrors by the traceback module. 5718 5719 - Issue #1726172: Fix IndexError in the case of and empty response in ftplib. 5720 5721 - Issue #2625: Added missing iteritems() call to the for loop in 5722 mailbox.MH.get_message(). 5723 5724 - Issue #5585: Add the ability to call an initializer to 5725 mulitiprocessing.manager so that users can install custom handlers/etc. 5726 5727 - Issue #3551: Patch multiprocessing to raise a proper exception if the size of 5728 the object when writefile is called causes a ERROR_NO_SYSTEM_RESOURCES. Added 5729 docs to note the limitation. 5730 5731 - unittest.assertNotEqual() now uses the inequality operator (!=) instead of the 5732 equality operator. 5733 5734 - Issue #6001: Test discovery for unittest. Implemented in 5735 unittest.TestLoader.discover and from the command line. 5736 5737 - Issue #5679: The methods unittest.TestCase.addCleanup and doCleanups were 5738 added. addCleanup allows you to add cleanup functions that will be called 5739 unconditionally (after setUp if setUp fails, otherwise after tearDown). This 5740 allows for much simpler resource allocation and deallocation during tests. 5741 5742 - Issue #3379: unittest.main now takes an optional exit argument. If False main 5743 doesn't call sys.exit allowing it to be used from the interactive interpreter. 5744 5745 - Issue #5995: unittest.main now takes an optional verbosity argument allowing 5746 test modules to be run with a higher than default verbosity. 5747 5748 - Issue #5995: A fix to allow you to run "python -m unittest test_module" or 5749 "python -m unittest test_module.TestClass" from the command line. 5750 5751 - Issue #5728: unittest.TestResult has new startTestRun and stopTestRun methods; 5752 called immediately before and after a test run. 5753 5754 - Issue #5663: Better failure messages for unittest asserts. Default assertTrue 5755 and assertFalse messages are now useful. TestCase has a longMessage attribute. 5756 This defaults to False, but if set to True useful error messages are shown in 5757 addition to explicit messages passed to assert methods. 5758 5759 - Issue #3110: Add additional protect around SEM_VALUE_MAX for multiprocessing. 5760 5761 - In Pdb, prevent the reassignment of __builtin__._ by sys.displayhook on 5762 printing out values. 5763 5764 - Issue #4572: Added SEEK_* symbolic constants to io module. 5765 5766 - Issue #1665206 (partially): Move imports in cgitb to the top of the module 5767 instead of performing them in functions. Helps prevent import deadlocking in 5768 threads. 5769 5770 - Issue #5647: MutableSet.__iand__() no longer mutates self during iteration. 5771 5772 - Actually make the SimpleXMLRPCServer CGI handler work. 5773 5774 - Issue #2522: locale.format() now checks its first argument to ensure it has 5775 been passed only one pattern, avoiding mysterious errors where it appeared 5776 that it was failing to do localization. 5777 5778 - Issue #5583: Added optional extensions in Distutils. Initial patch by Georg 5779 Brandl. 5780 5781 - Issue #5619: Multiprocessing children disobey the debug flag and causes popups 5782 on windows buildbots. Patch applied to work around this issue. 5783 5784 - Issue #5632: Thread.ident was None for the main thread and threads not created 5785 with the threading module. 5786 5787 - Issue #5400: Added patch for multiprocessing on netbsd compilation/support. 5788 5789 - Issue #5387: Fixed mmap.move crash by integer overflow. 5790 5791 - Issue #5261: Patch multiprocessing's semaphore.c to support context manager 5792 use: "with multiprocessing.Lock()" works now. 5793 5794 - Issue #5177: Multiprocessing's SocketListener class now uses 5795 socket.SO_REUSEADDR on all connections so that the user no longer needs to 5796 wait 120 seconds for the socket to expire. 5797 5798 - Adjusted _tkinter to compile without warnings when WITH_THREAD is not defined 5799 (part of issue #5035). 5800 5801 - Issue #5561: Removed the sys.version_info shortcuts from platform's 5802 python_version() and python_version_tuple() since they produced different 5803 output compared to previous Python versions. 5804 5805 - Issue #1034053: unittest now supports skipping tests and expected failures. 5806 5807 - The unittest.TestCase.assertRaises() method now returns a context manager when 5808 not given a callable so that code to be tested can be written inline using a 5809 with statement. 5810 5811 - Issue #2578: The unittest.TestCase.assertEqual() now displays the differences 5812 in lists, tuples, dicts and sets on failure. Many new handy type and 5813 comparison specific assert* methods have been added that fail with error 5814 messages actually useful for debugging. Contributed in part by Google. 5815 5816 - Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop forever 5817 on incomplete input. That caused tarfile.open() to hang when used with mode 5818 'r' or 'r:bz2' and a fileobj argument that contained no data or partial bzip2 5819 compressed data. 5820 5821 - Issue #5536: urllib.urlretrieve makes sure to close the file it's writing to 5822 even if an exception occurs. 5823 5824 - Issue #5381: Added object_pairs_hook to the json module. This allows 5825 OrderedDicts to be built by the decoder. 5826 5827 - Issue #2110: Add support for thousands separator and 'n' type specifier to 5828 ``Decimal.__format__()``. 5829 5830 - Fix Decimal.__format__ bug that swapped the meanings of the '<' and '>' 5831 alignment characters. 5832 5833 - Issue #1222: ``locale.format()`` bug when the thousands separator is a space 5834 character. 5835 5836 - Issue #5472: Fixed distutils.test_util tear down. Original patch by Tim 5837 Golden. 5838 5839 - collections.deque objects now have a read-only attribute called maxlen. 5840 5841 - Issue #2638: Show a window constructed with tkSimpleDialog.Dialog only after 5842 it is has been populated and properly configured in order to prevent window 5843 flashing. 5844 5845 - Issue #4792: Prevent a segfault in _tkinter by using the guaranteed to be safe 5846 interp argument given to the PythonCmd in place of the Tcl interpreter taken 5847 from a PythonCmd_ClientData. 5848 5849 - Issue #5193: Guarantee that Tkinter.Text.search returns a string. 5850 5851 - Issue #5394: Removed > 2.3 syntax from distutils.msvc9compiler. 5852 Original patch by Akira Kitada. 5853 5854 - Issue #5385: Fixed mmap crash after resize failure on windows. 5855 5856 - Issue #5179: Fixed subprocess handle leak on failure on windows. 5857 5858 - PEP 372: Added collections.OrderedDict(). 5859 5860 - The _asdict() for method for namedtuples now returns an OrderedDict(). 5861 5862 - The configparser module now defaults to using an ordered dictionary. 5863 5864 - Issue #4308: httplib.IncompleteRead's repr doesn't include all of the data all 5865 ready received. 5866 5867 - Issue #5401: Fixed a performance problem in mimetypes when ``from mimetypes 5868 import guess_extension`` was used. 5869 5870 - Issue #1733986: Fixed mmap crash on Windows in accessing elements of second 5871 map object with same tagname but larger size than first map. 5872 5873 - Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer 5874 overrun. 5875 5876 - Issue #1533164: Installed but not listed *.pyo was breaking Distutils 5877 bdist_rpm command. 5878 5879 - Issue #5378: Added --quiet option to Distutils bdist_rpm command. 5880 5881 - Issue #5052: Make Distutils compatible with 2.3 again. 5882 5883 - Deprecated methods of symtable.Symbol have been removed: is_keywordarg(), 5884 is_vararg(), and is_in_tuple(). 5885 5886 - Issue #5316: Fixed buildbot failures introduced by multiple inheritance in 5887 Distutils tests. 5888 5889 - Issue #5287: Add exception handling around findCaller() call to help out 5890 IronPython. 5891 5892 - Issue #5282: Fixed mmap resize on 32bit Windows and Unix. When ``offset > 5893 0``, the file was resized to wrong size. 5894 5895 - Issue #5292: Fixed mmap crash on its boundary access m[len(m)]. 5896 5897 - Issue #2279: distutils.sdist.add_defaults now add files from the package_data 5898 and the data_files metadata. 5899 5900 - Issue #5257: Refactored all tests in distutils, so they use 5901 support.TempdirManager, to avoid writing in the tests directory. 5902 5903 - Issue #4524: distutils build_script command failed with --with-suffix=3. 5904 Initial patch by Amaury Forgeot d'Arc. 5905 5906 - Issue #2461: Added tests for distutils.util. 5907 5908 - Issue #1008086: Fixed socket.inet_aton() to always return 4 bytes even on LP64 5909 platforms (most 64-bit Linux, bsd, unix systems). 5910 5911 - Issue #5203: Fixed ctypes segfaults when passing a unicode string to a 5912 function without argtypes (only occurs if HAVE_USABLE_WCHAR_T is false). 5913 5914 - Issue #3386: distutils.sysconfig.get_python_lib prefix argument was ignored 5915 under NT and OS2. Patch by Philip Jenvey. 5916 5917 - Issue #5128: Make compileall properly inspect bytecode to determine if needs 5918 to be recreated. This avoids a timing hole thanks to the old reliance on the 5919 ctime of the files involved. 5920 5921 - Issue #5122: Synchronize tk load failure check to prevent a potential 5922 deadlock. 5923 5924 - Issue #1818: collections.namedtuple() now supports a keyword argument 'rename' 5925 which lets invalid fieldnames be automatically converted to positional names 5926 in the form, _1, _2, ... 5927 5928 - Issue #4890: Handle empty text search pattern in Tkinter.Text.search. 5929 5930 - Issue #5170: Fixed Unicode output bug in logging and added test case. This is 5931 a regression which did not occur in 2.5. 5932 5933 - Issue #4512 (part 2): Promote ``ZipImporter._get_filename()`` to be a public 5934 documented method ``ZipImporter.get_filename()``. 5935 5936 - Issue #4195: The ``runpy`` module (and the ``-m`` switch) now support the 5937 execution of packages by looking for and executing a ``__main__`` submodule 5938 when a package name is supplied. Initial patch by Andi Vajda. 5939 5940 - Issue #1731706: Call Tcl_ConditionFinalize for Tcl_Conditions that will not be 5941 used again (this requires Tcl/Tk 8.3.1), also fix a memory leak in Tkapp_Call 5942 when calling from a thread different than the one that created the Tcl 5943 interpreter. Patch by Robert Hancock. 5944 5945 - Issue #1520877: Now distutils.sysconfig reads $AR from the 5946 environment/Makefile. Patch by Douglas Greiman. 5947 5948 - Issue #4285: Change sys.version_info to be a named tuple. Patch by Ross 5949 Light. 5950 5951 - Issue #1276768: The verbose option was not used in the code of 5952 distutils.file_util and distutils.dir_util. 5953 5954 - Issue #5132: Fixed trouble building extensions under Solaris with 5955 --enabled-shared activated. Initial patch by Dave Peterson. 5956 5957 - Issue #1581476: Always use the Tcl global namespace when calling into Tcl. 5958 5959 - Issue #2047: shutil.move() could believe that its destination path was inside 5960 its source path if it began with the same letters (e.g. "src" vs. "src.new"). 5961 5962 - Issue #4920: Fixed .next() vs .__next__() issues in the ABCs for Iterator and 5963 MutableSet. 5964 5965 - Added the ttk module. See issue #2983: Ttk support for Tkinter. 5966 5967 - Issue #5021: doctest.testfile() did not create __name__ and 5968 collections.namedtuple() relied on __name__ being defined. 5969 5970 - Backport importlib from Python 3.1. Only the import_module() function has been 5971 backported to help facilitate transitions from 2.7 to 3.1. 5972 5973 - Issue #1885: distutils: When running sdist with --formats=tar,gztar the tar 5974 file was overriden by the gztar one. 5975 5976 - Issue #4863: distutils.mwerkscompiler has been removed. 5977 5978 - Added new itertools functions: combinations_with_replacement() and compress(). 5979 5980 - Issue #5032: Added a step argument to itertools.count() and allowed 5981 non-integer arguments. 5982 5983 - Fix and properly document the multiprocessing module's logging support, expose 5984 the internal levels and provide proper usage examples. 5985 5986 - Issue #1672332: Fix unpickling of subnormal floats, which was 5987 producing a ValueError on some platforms. 5988 5989 - Issue #3881: Help Tcl to load even when started through the unreadable local 5990 symlink to "Program Files" on Vista. 5991 5992 - Issue #4710: Extract directories properly in the zipfile module; allow adding 5993 directories to a zipfile. 5994 5995 - Issue #3807: _multiprocessing build fails when configure is passed 5996 --without-threads argument. When this occurs, _multiprocessing will be 5997 disabled, and not compiled. 5998 5999 - Issue #5008: When a file is opened in append mode with the new IO library, do 6000 an explicit seek to the end of file (so that e.g. tell() returns the file size 6001 rather than 0). This is consistent with the behaviour of the traditional 2.x 6002 file object. 6003 6004 - Issue #5013: Fixed a bug in FileHandler which occurred when the delay 6005 parameter was set. 6006 6007 - Issue #4998: The memory saving effect of __slots__ had been lost on Fractions 6008 which inherited from numbers.py which did not have __slots__ defined. The 6009 numbers hierarchy now has its own __slots__ declarations. 6010 6011 - Issue #3321: _multiprocessing.Connection() doesn't check handle; added checks 6012 for *nix machines for negative handles and large int handles. Without this 6013 check it is possible to segfault the interpreter. 6014 6015 - Issue #4449: AssertionError in mp_benchmarks.py, caused by an underlying issue 6016 in sharedctypes.py. 6017 6018 - Issue #1225107: inspect.isclass() returned True for instances with a custom 6019 __getattr__. 6020 6021 - Issue #3997: Zipfiles generated with more than 65536 files could not be opened 6022 with other applications. 6023 6024 - Issue #1162154: ``inspect.getmembers()`` now skips attributes that raise 6025 AttributeError, e.g. a __slots__ attribute which has not been set. 6026 6027 - Issue #1696199: Add collections.Counter() for rapid and convenient counting. 6028 6029 - Issue #3860: GzipFile and BZ2File now support the context manager protocol. 6030 6031 - Issue #4272: Add an optional argument to the GzipFile constructor to override 6032 the timestamp in the gzip stream. The default value remains the current time. 6033 The information can be used by e.g. gunzip when decompressing. Patch by 6034 Jacques Frechet. 6035 6036 - Restore Python 2.3 compatibility for decimal.py. 6037 6038 - Issue #1702551: distutils sdist was not excluding VCS directories under 6039 Windows. Initial solution by Guy Dalberto. 6040 6041 - The _tkinter module functions "createfilehandler", "deletefilehandler", 6042 "createtimerhandler", "mainloop", "dooneevent" and "quit" have been deprecated 6043 for removal in 3.x 6044 6045 - Issue #4796: Added Decimal.from_float() and 6046 Context.create_decimal_from_float() to the decimal module. 6047 6048 - Issue #4812: Add missing underscore prefix to some internal-use-only constants 6049 in the decimal module. (Dec_0 becomes _Dec_0, etc.) 6050 6051 - Issue #4795: inspect.isgeneratorfunction() returns False instead of None when 6052 the function is not a generator. 6053 6054 - Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case no 6055 MSVC compiler is found under Windows. Original patch by Philip Jenvey. 6056 6057 - Issue #4646: distutils was choking on empty options arg in the setup function. 6058 Original patch by Thomas Heller. 6059 6060 - Fractions.from_float() no longer loses precision for integers too big to cast 6061 as floats. 6062 6063 - Issue #4790: The nsmallest() and nlargest() functions in the heapq module did 6064 unnecessary work in the common case where no key function was specified. 6065 6066 - Issue #3767: Convert Tk object to string in tkColorChooser. 6067 6068 - Issue #3248: Allow placing ScrolledText in a PanedWindow. 6069 6070 - Issue #4444: Allow assertRaises() to be used as a context handler, so that the 6071 code under test can be written inline if more practical. 6072 6073 - Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@') works 6074 as expected in the interactive environment. 6075 6076 - Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by 6077 Gabriel Genellina. 6078 6079 - Issue #4400: .pypirc default generated file was broken in distutils. 6080 6081 - Issue #4736: io.BufferedRWPair's closed property now functions properly. 6082 6083 - Issue #3954: Fix a potential SystemError in _hotshot.logreader error handling. 6084 6085 - Issue #4574: Fix a crash in io.IncrementalNewlineDecoder when a carriage 6086 return encodes to more than one byte in the source encoding (e.g. UTF-16) and 6087 gets split on a chunk boundary. 6088 6089 - Issue #4223: inspect.getsource() will now correctly display source code for 6090 packages loaded via zipimport (or any other conformant PEP 302 6091 loader). Original patch by Alexander Belopolsky. 6092 6093 - Issue #4201: pdb can now access and display source code loaded via zipimport 6094 (or any other conformant PEP 302 loader). Original patch by Alexander 6095 Belopolsky. 6096 6097 - Issue #4197: Doctests in modules loaded via zipimport (or any other PEP 302 6098 conformant loader) will now work correctly in most cases (they are still 6099 subject to the constraints that exist for all code running from inside a 6100 module loaded via a PEP 302 loader and attempting to perform IO operations 6101 based on __file__). Original patch by Alexander Belopolsky. 6102 6103 - Issues #4082 and #4512: Add runpy support to zipimport in a manner that allows 6104 backporting to maintenance branches. Original patch by Alexander Belopolsky. 6105 6106 - Issue #4163: Use unicode-friendly word splitting in the textwrap functions 6107 when given a Unicode string. 6108 6109 - Issue #4616: TarFile.utime(): Restore directory times on Windows. 6110 6111 - Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to give correct 6112 results in the case where one argument is a quiet NaN and the other is a 6113 finite number that requires rounding. 6114 6115 - Issue #1030250: Distutils created directories even when run with the --dry-run 6116 option. 6117 6118 - Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat libs. 6119 6120 - Issue #4529: Fix the parser module's validation of try-except-finally 6121 statements. 6122 6123 - Issue #4458: getopt.gnu_getopt() now recognizes a single "-" as an argument, 6124 not a malformed option. 6125 6126 - Added the subprocess.check_output() convenience function to get output from a 6127 subprocess on success or raise an exception on error. 6128 6129 - Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to 6130 support unusual filenames (such as those containing semi-colons) in 6131 Content-Disposition headers. 6132 6133 - Issue #4384: Added logging integration with warnings module using 6134 captureWarnings(). This change includes a NullHandler which does nothing; it 6135 will be of use to library developers who want to avoid the "No handlers could 6136 be found for logger XXX" message which can appear if the library user doesn't 6137 configure logging. 6138 6139 - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an 6140 exception. 6141 6142 - Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if the 6143 ctypes module is not present. 6144 6145 - FileIO's mode attribute now always includes ``"b"``. 6146 6147 - Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__. 6148 6149 - httplib.HTTPConnection.putheader() now accepts an arbitrary number of values 6150 for any header, matching what the documentation has claimed for a while. 6151 6152 - Issue #3774: Fixed an error when create a Tkinter menu item without command 6153 and then remove it. 6154 6155 - Fixed a modulefinder crash on certain relative imports. 6156 6157 - Issue #4150: Pdb's "up" command now works for generator frames in post-mortem 6158 debugging. 6159 6160 - Issue #4092: Return ArgInfo as promised in the documentation from 6161 inspect.getargvalues. 6162 6163 - Issue #3935: Properly support list subclasses in bisect's C implementation. 6164 6165 - Issue #4014: Don't claim that Python has an Alpha release status, in addition 6166 to claiming it is Mature. 6167 6168 - Issue #4730: Fixed the cPickle module to handle correctly astral characters 6169 when protocol 0 is used. 6170 6171 - Issue #1594: MacOS.GetCreatorAndType now always returns a big-endian result, 6172 to be consistent with Apple tools. 6173 6174 - Issue #900949: plat-mac/videoreader.py no longer relies on a non-existing 6175 module. 6176 6177 - Issue #16278952: plat-mac/videoreader.py now correctly imports MediaDescr 6178 6179 - Issue #1737832: plat-mac/EasyDialog.py no longer uses the broken aepack 6180 module. 6181 6182 - Issue #1149804: macostools.mkdirs now even works when another process creates 6183 one of the needed subdirectories. 6184 6185 - Issue #900506: added --no-zipimport flag to the bundlebuilder script. 6186 6187 - Issue #841800: bundlebuilder now works with 'python -O'. 6188 6189 - Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on 6190 biarch systems. Try to rely on ldconfig only, without using objdump and gcc. 6191 6192 - Issue #5104: The socket module now raises OverflowError when 16-bit port and 6193 protocol numbers are supplied outside the allowed 0-65536 range on bind() and 6194 getservbyport(). 6195 6196 - Issue #999042: The Python compiler now handles explict global statements 6197 correctly (should be assigned using STORE_GLOBAL opcode). 6198 6199 - Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for new 6200 arguments introduced in 2.5. 636 6201 637 6202 - Issue #5828 (Invalid behavior of unicode.lower): Fixed bogus logic in … … 639 6204 u'\u1d79'.lower() == '\x00'). 640 6205 641 - Issue #1202: zipfile module would cause a DeprecationWarning when storing 642 files with a CRC32 > 2**31-1. 643 644 - Issue #6163: Fixed HP-UX runtime library dir options in 645 distutils.unixcompiler. Initial patch by Sridhar Ratnakumar and 646 Michael Haubenwallner. 647 648 - Issue #4660: If a multiprocessing.JoinableQueue.put() was preempted, it was 649 possible to get a spurious 'task_done() called too many times' error. 650 651 - Issue #6595: The Decimal constructor now allows arbitrary Unicode 652 decimal digits in input, as recommended by the standard. Previously 653 it was restricted to accepting [0-9]. 654 655 - Issue #6553: Fixed a crash in cPickle.load(), when given a file-like object 656 containing incomplete data. 657 658 - Issue #2622: Fixed an ImportError when importing email.messsage from a 659 standalone application built with py2exe or py2app. 660 661 - Issue #6455: Fixed test_build_ext under win32. 662 663 - Issue #6403: Fixed package path usage in build_ext. 664 665 - Issue #6287: Added the license field in Distutils documentation. 666 667 - Issue #6263: Fixed syntax error in distutils.cygwincompiler. 668 669 - Issue #5201: distutils.sysconfig.parse_makefile() now understands `$$` 670 in Makefiles. This prevents compile errors when using syntax like: 671 `LDFLAGS='-rpath=\$$LIB:/some/other/path'`. Patch by Floris Bruynooghe. 672 673 - Issue #6062: In distutils, fixed the package option of build_ext. Feedback 674 and tests on pywin32 by Tim Golden. 675 676 - Issue #1309567: Fix linecache behavior of stripping subdirectories when 677 looking for files given by a relative filename. 678 679 - Issue #6046: Fixed the library extension when distutils build_ext is used 680 inplace. Initial patch by Roumen Petrov. 681 682 - Issue #6022: a test file was created in the current working directory by 683 test_get_outputs in Distutils. 684 685 - Issue #5977: distutils build_ext.get_outputs was not taking into account the 686 inplace option. Initial patch by kxroberto. 687 688 - Issue #5984: distutils.command.build_ext.check_extensions_list checks were 689 broken for old-style extensions. 690 691 - Issue #5854: Updated __all__ to include some missing names and remove some 692 names which should not be exported. 693 694 - Issue #5810: Fixed Distutils test_build_scripts so it uses 695 sysconfig.get_config_vars. 6206 - Windows locale mapping updated to Vista. 6207 6208 IDLE 6209 ---- 6210 6211 - Issue #5150: IDLE's format menu now has an option to strip trailing 6212 whitespace. 6213 6214 - Issue #5847: Remove -n switch on "Edit with IDLE" menu item. 6215 6216 Tools/Demos 6217 ----------- 6218 6219 - Ttk demos added in Demo/tkinter/ttk/. 6220 6221 - Issue #4677: Add two list comprehension tests to pybench. 6222 6223 Build 6224 ----- 6225 6226 - Issue #6603: Change READ_TIMESTAMP macro in ceval.c so that it compiles 6227 correctly under gcc on x86-64. This fixes a reported problem with the 6228 --with-tsc build on x86-64. 6229 6230 - Add 2 new options to ``--with-universal-archs`` on MacOSX: ``intel`` builds a 6231 distribution with ``i386`` and ``x86_64`` architectures, while ``3-way`` 6232 builds a distribution with the ``ppc``, ``i386`` and ``x86_64`` architectures. 6233 6234 - Issue #6802: Fix build issues on MacOSX 10.6. 6235 6236 - Issue #6244: Allow detect_tkinter to look for Tcl/Tk 8.6. 6237 6238 - Issue #5390: Add uninstall icon independent of whether file extensions are 6239 installed. 6240 6241 - Issue #5809: Specifying both --enable-framework and --enable-shared is an 6242 error. Configure now explicity tells you about this. 6243 6244 - Issue #3585: Add pkg-config support. It creates a python-2.7.pc file and a 6245 python.pc symlink in the $(LIBDIR)/pkgconfig directory. Patch by Clinton Roy. 6246 6247 - Issue #6094: Build correctly with Subversion 1.7. 6248 6249 - Issue #5726: Make Modules/ld_so_aix return the actual exit code of the linker, 6250 rather than always exit successfully. Patch by Floris Bruynooghe. 6251 6252 - Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify 6253 the order that backends for the dbm extension are checked. 6254 6255 - Link the shared python library with $(MODLIBS). 6256 6257 - Issue #5134: Silence compiler warnings when compiling sqlite with VC++. 6258 6259 - Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows. 6260 6261 - Issue #4895: Use _strdup on Windows CE. 6262 6263 - Issue #4472: ``configure --enable-shared`` now works on OSX. 6264 6265 - Issues #4728 and #4060: WORDS_BIGEDIAN is now correct in Universal builds. 6266 6267 - Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs". 6268 6269 - Issue #4289: Remove Cancel button from AdvancedDlg. 6270 6271 - Issue #1656675: Register a drop handler for .py* files on Windows. 6272 6273 - Issue #4120: Exclude manifest from extension modules in VS2008. 6274 6275 - Issue #4091: Install pythonxy.dll in system32 again. 6276 6277 - Issue #4018: Disable "for me" installations on Vista. 6278 6279 - Issue #3758: Add ``patchcheck`` build target to ``.PHONY``. 6280 6281 - Issue #4204: Fixed module build errors on FreeBSD 4. 6282 6283 Documentation 6284 ------------- 6285 6286 - Issue #6556: Fixed the Distutils configuration files location explanation for 6287 Windows. 6288 6289 - Issue #6801: symmetric_difference_update also accepts ``|``. Thanks to Carl 6290 Chenet. 6291 6292 C-API 6293 ----- 6294 6295 - Issue #7528: Add PyLong_AsLongAndOverflow (backported from py3k). 6296 6297 - Issue #7228: Add '%lld' and '%llu' support to PyString_FromFormat(V) and 6298 PyErr_Format, on machines with HAVE_LONG_LONG defined. 6299 6300 - Add new C-API function PyOS_string_to_double, and deprecated PyOS_ascii_atof 6301 and PyOS_ascii_strtod. 6302 6303 - Removed _PyOS_double_to_string. Use PyOS_double_to_string instead. This is in 6304 preparation for (but not strictly related to) issue #7117, short float repr. 6305 6306 - Issue #6624: PyArg_ParseTuple with "s" format when parsing argument with NULL: 6307 Bogus TypeError detail string. 6308 6309 - Issue #5954: Add a PyFrame_GetLineNumber() function to replace most uses of 6310 PyCode_Addr2Line(). 6311 6312 - Issue #5959: Add a PyCode_NewEmpty() function to create a new empty code 6313 object at a specified file, function, and line number. 6314 6315 - Issue #1419652: Change the first argument to PyImport_AppendInittab() to 6316 ``const char *`` as the string is stored beyond the call. 6317 6318 - Some PyBytes_* aliases have been removed because they don't exist in 3.x. 6319 6320 - Issue #5175: PyLong_AsUnsignedLongLong now raises OverflowError for negative 6321 arguments. Previously, it raised TypeError. 6322 6323 - Issue #4720: The format for PyArg_ParseTupleAndKeywords can begin with '|'. 6324 6325 - Issue #3632: From the gdb debugger, the 'pyo' macro can now be called when the 6326 GIL is released, or owned by another thread. 6327 6328 - Issue #4122: On Windows, fix a compilation error when using the 6329 Py_UNICODE_ISSPACE macro in an extension module. 6330 6331 - Issue #4293: Py_AddPendingCall() is now thread safe and can be used for 6332 asynchronous notifications to python from any thread. Documentation added. 6333 6334 Extension Modules 6335 ----------------- 6336 6337 - Issue #6508: Add posix.{getresuid,getresgid,setresuid,setresgid}. 6338 6339 - Issue #7078: Set struct.__doc__ from _struct.__doc__. 6340 6341 - Issue #3366: Add erf, erfc, expm1, gamma, lgamma functions to math module. 6342 6343 - Issue #6823: Allow time.strftime() to accept a tuple with a isdst field 6344 outside of the range of [-1, 1] by normalizing the value to within that range. 6345 6346 - Issue #6877: Make it possible to link the readline extension to libedit on 6347 OSX. 6348 6349 - Issue #6944: Fix a SystemError when socket.getnameinfo() was called with 6350 something other than a tuple as first argument. 696 6351 697 6352 - Issue #6865: Fix reference counting issue in the initialization of the pwd 698 6353 module. 699 6354 700 Extension Modules701 -----------------702 703 - Issue #6944: Fix a SystemError when socket.getnameinfo() was called704 with something other than a tuple as first argument.705 706 6355 - Issue #6848: Fix curses module build failure on OS X 10.6. 707 6356 708 - Fix expat to not segfault with specially crafted input. 6357 - Fix a segfault in expat when given a specially crafted input lead to the 6358 tokenizer not stopping. CVE-2009-3720. 6359 6360 - Issue #6561: '\d' in a regex now matches only characters with Unicode category 6361 'Nd' (Number, Decimal Digit). Previously it also matched characters with 6362 category 'No'. 6363 6364 - Issue #1523: Remove deprecated overflow wrapping for struct.pack with an 6365 integer format code ('bBhHiIlLqQ'). Packing an out-of-range integer now 6366 consistently raises struct.error. 6367 6368 - Issues #1530559, #1741130: Fix various struct.pack inconsistencies for the 6369 integer formats ('bBhHiIlLqQ'). In the following, '*' represents any of '=', 6370 '<', '>'. 6371 6372 - Packing a float now always gives a Deprecation Warning. Previously it 6373 only warned for 'I', 'L', '*B', '*H', '*I', '*L'. 6374 6375 - If x is not an int, long or float, then packing x will always result in 6376 struct.error. Previously an x with an __int__ method could be packed by 6377 'b', 'B', 'h', 'H', 'i', 'l', '*b', '*h' ,'*i', '*l', and an x with a 6378 __long__ method could be packed by 'q', 'Q', '*q', '*Q'; for x with 6379 neither __int__ nor __long__, TypeError used to be raised (with a 6380 confusing error message) for 'I', 'L', '*B', '*H', '*I', '*L', and 6381 struct.error in other cases. 6382 6383 Note: as of Python 2.7 beta 1, the above is out of date. In 2.7 beta 1, any 6384 argument with an __int__ method can be packed, but use of this feature 6385 triggers a DeprecationWarning. 709 6386 710 6387 - Issue #4873: Fix resource leaks in error cases of pwd and grp. 711 6388 712 Build 713 ----- 714 715 - Issue #6980: Fix ctypes build failure on armel-linux-gnueabi with 716 -mfloat-abi=softfp. 717 718 - Issue #6802: Fix build issues on MacOSX 10.6 719 720 - Issue 5390: Add uninstall icon independent of whether file 721 extensions are installed. 722 723 - Issue #6094: Build correctly with Subversion 1.7. 724 725 - Issue #5726: Make Modules/ld_so_aix return the actual exit code of the 726 linker, rather than always exit successfully. Patch by Floris Bruynooghe. 727 728 - Issue 5809: Specifying both --enable-framework and --enable-shared is 729 an error. Configure now explicity tells you about this. 730 731 Documentation 732 ------------- 733 734 - Issue #6556: Fixed the Distutils configuration files location explanation 735 for Windows. 736 737 - Issue #6801 : symmetric_difference_update also accepts |. 738 Thanks to Carl Chenet. 6389 - Issue #4751: For hashlib algorithms provided by OpenSSL, the Python GIL is now 6390 released during computation on data lengths >= 2048 bytes. 6391 6392 - Issue #3745: Fix hashlib to always reject unicode and non buffer-api 6393 supporting objects as input no matter how it was compiled (built in 6394 implementations or external openssl library). NOTE: Undone in 2.7a2. 6395 6396 - Issue #4397: Fix occasional test_socket failure on OS X. 6397 6398 - Issue #4279: Fix build of parsermodule under Cygwin. 6399 6400 - Issue #4051: Prevent conflict of UNICODE macros in cPickle. 6401 6402 - Issue #4228: Pack negative values the same way as 2.4 in struct's L format. 6403 6404 - Issue #1040026: Fix os.times result on systems where HZ is incorrect. 6405 6406 - Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris, 6407 OpenBSD. 6408 6409 - Issue #4365: Add crtassem.h constants to the msvcrt module. 6410 6411 - Issue #4396: The parser module now correctly validates the with statement. 6412 6413 - Issue #5228: Make functools.partial objects can now be pickled. 739 6414 740 6415 Tests 741 6416 ----- 6417 6418 - Issue #7431: Use TESTFN in test_linecache instead of trying to create a file 6419 in the Lib/test directory, which might be read-only for the user running the 6420 tests. 6421 6422 - Issue #7324: Add a sanity check to regrtest argument parsing to catch the case 6423 of an option with no handler. 6424 6425 - Issue #7312: Add a -F flag to run the selected tests in a loop until a test 6426 fails. Can be combined with -j. 6427 6428 - Issue #7295: Do not use a hardcoded file name in test_tarfile. 6429 6430 - Issue #7270: Add some dedicated unit tests for multi-thread synchronization 6431 primitives such as Lock, RLock, Condition, Event and Semaphore. 6432 6433 - Issue #7222: Make thread "reaping" more reliable so that reference 6434 leak-chasing test runs give sensible results. The previous method of reaping 6435 threads could return successfully while some Thread objects were still 6436 referenced. This also introduces a new private function: ``thread._count()``. 6437 6438 - Issue #7151: Fixed regrtest -j so that output to stderr from a test no longer 6439 runs the risk of causing the worker thread to fail. 6440 6441 - Issue #7055: test___all__ now greedily detects all modules which have an 6442 __all__ attribute, rather than using a hardcoded and incomplete list. 6443 6444 - Issue #7058: Added save/restore for things like sys.argv and cwd to 6445 runtest_inner in regrtest, with warnings if the called test modifies them, 6446 and a new section in the summary report at the end. 6447 6448 - Issue #7042: Fix test_signal (test_itimer_virtual) failure on OS X 10.6. 6449 6450 - Issue #6806: test_platform failed under OS X 10.6.0 because ``sw_ver`` leaves 6451 off the trailing 0 in the version number. 6452 6453 - Issue #5450: Moved tests involving loading tk from Lib/test/test_tcl to 6454 Lib/lib-tk/test/test_tkinter/test_loadtk. With this, these tests demonstrate 6455 the same behaviour as test_ttkguionly (and now also test_tk) which is to skip 6456 the tests if DISPLAY is defined but can't be used. 6457 6458 - Issue #6152: New option '-j'/'--multiprocess' for regrtest allows running 6459 regression tests in parallel, shortening the total runtime. 6460 6461 - Issue #5354: New test support function import_fresh_module() makes it easy to 6462 import both normal and optimised versions of modules. test_heapq and 6463 test_warnings have been adjusted to use it, tests for other modules with both 6464 C and Python implementations in the stdlib can be adjusted to use it over 6465 time. 6466 6467 - Fix test_warnings to no longer reset the warnings filter. 6468 6469 - Fix test_logging to no longer reset the warnings filter. 6470 6471 - Issue #5635: Fix running test_sys with tracing enabled. 6472 6473 - regrtest no longer treats ImportError as equivalent to SkipTest. Imports that 6474 should cause a test to be skipped are now done using import_module from test 6475 support, which does the conversion. 6476 6477 - Issue #5083: New 'gui' resource for regrtest. 742 6478 743 6479 - Issue #5837: Certain sequences of calls to set() and unset() for … … 745 6481 incorrectly on __exit__. 746 6482 747 748 What's New in Python 2.6.2 749 ========================== 750 751 *Release date: 14-Apr-2009* 752 753 754 What's New in Python 2.6.2 rc 1 755 =============================== 756 757 *Release date: 06-Apr-2009* 758 759 Core and Builtins 760 ----------------- 761 762 - xrange() is now registered as a Sequence. 763 764 - Fix a problem in PyErr_NormalizeException that leads to "undetected errors" 765 when hitting the recursion limit under certain circumstances. 766 767 - Issue #1665206: Remove the last eager import in _warnings.c and make it lazy. 768 769 - Issue #4034: Fix weird attribute error messages of the traceback object. (As 770 a result traceback.__members__ no longer exists.) 771 772 - Issue #5247: Improve error message when unknown format codes are 773 used when using str.format() with str, unicode, long, int, and 774 float arguments. 775 776 - Running Python with the -3 option now also warns about classic division 777 for ints and longs. 778 779 - Issue #5013: Fixed a bug in FileHandler which occurred when the delay 780 parameter was set. 781 782 - Issue 1242657: the __len__() and __length_hint__() calls in several tools 783 were suppressing all exceptions. These include list(), filter(), map(), 784 zip(), and bytearray(). 785 786 - Issue #4935: The overflow checking code in the expandtabs() method common 787 to str, bytes and bytearray could be optimized away by the compiler, letting 788 the interpreter segfault instead of raising an error. 789 790 - Issue #4915: Port sysmodule to Windows CE. 791 792 - Issue #1180193: When importing a module from a .pyc (or .pyo) file with 793 an existing .py counterpart, override the co_filename attributes of all 794 code objects if the original filename is obsolete (which can happen if the 795 file has been renamed, moved, or if it is accessed through different paths). 796 Patch by Ziga Seilnacht and Jean-Paul Calderone. 797 798 - Issue #4075: Use OutputDebugStringW in Py_FatalError. 799 800 - Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open 801 file with `str' filename on Windows. 802 803 - Issue #3680: Reference cycles created through a dict, set or deque iterator 804 did not get collected. 805 806 - Issue #4701: PyObject_Hash now implicitly calls PyType_Ready on types 807 where the tp_hash and tp_dict slots are both NULL. 808 809 - Issue #4764: With io.open, IOError.filename is set when trying to open a 810 directory on POSIX systems. 811 812 - Issue #4764: IOError.filename is set when trying to open a directory on POSIX 813 systems. 814 815 - Issue #4759: None is now allowed as the first argument of 816 bytearray.translate(). It was always allowed for bytes.translate(). 817 818 - Issue #4759: fix a segfault for bytearray.translate(x, None). 819 820 - Added test case to ensure attempts to read from a file opened for writing 821 fail. 822 823 - Issue #4597: Fixed several opcodes that weren't always propagating 824 exceptions. 825 826 - Issue #2467: gc.DEBUG_STATS reported invalid elapsed times. Also, always 827 print elapsed times, not only when some objects are uncollectable / 828 unreachable. Original patch by Neil Schemenauer. 829 830 - Issue #4589: Fixed exception handling when the __exit__ function of a 831 context manager returns a value that cannot be converted to a bool. 832 833 - Issue #4233: Changed semantic of ``_fileio.FileIO``'s ``close()`` 834 method on file objects with closefd=False. The file descriptor is still 835 kept open but the file object behaves like a closed file. The ``FileIO`` 836 object also got a new readonly attribute ``closefd``. 837 838 - Issue #3689: The list reversed iterator now supports __length_hint__ 839 instead of __len__. Behavior now matches other reversed iterators. 840 841 - Issue #4509: Various issues surrounding resize of bytearray objects to 842 which there are buffer exports. 843 844 - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with 845 short file names. 846 847 - Issue #5705: os.setuid() would not accept values > 2**31-1 but pwd.getpwnam() 848 returned them on 64bit platforms. 849 850 Library 851 ------- 852 853 - Issue #5741: don't disallow "%%" (which is an escape for "%") when setting 854 a value in SafeConfigParser. 855 856 - Issue #5731: Distutils bdist_wininst no longer worked on non-Windows 857 platforms. Initial patch by Paul Moore. 858 859 - Issue #1491431: Fixed distutils.filelist.glob_to_re for edge cases. 860 Initial fix by Wayne Davison. 861 862 - Issue 5471: Fix os.path.expanduser() for $HOME set to '/'. 863 864 - Issue 1726172: fix IndexError in the case of and empty response in ftplib. 865 866 - In Pdb, prevent the reassignment of __builtin__._ by sys.displayhook on 867 printing out values. 868 869 - Issue #4572: added SEEK_* symbolic constants to io module. 870 871 - Issue #1665206 (partially): Move imports in cgitb to the top of the module 872 instead of performing them in functions. Helps prevent import deadlocking in 873 threads. 874 875 - Issue #5647: MutableSet.__iand__() no longer mutates self during iteration. 876 877 - Actually make the SimpleXMLRPCServer CGI handler work. 878 879 - Issue 2625: added missing iteritems() call to the for loop in 880 mailbox.MH.get_message(). 881 882 - Issue #5647: MutableSet.__iand__() no longer mutates self during iteration. 883 884 - Issue #5619: Multiprocessing children disobey the debug flag and causes 885 popups on windows buildbots. Patch applied to work around this issue. 886 887 - Issue #5632: Thread.ident was None for the main thread and threads not 888 created with the threading module. 889 890 - Issue #5400: Added patch for multiprocessing on netbsd compilation/support 891 892 - Fix and properly document the multiprocessing module's logging 893 support, expose the internal levels and provide proper usage 894 examples. 895 896 - Issue #5387: Fixed mmap.move crash by integer overflow. 897 898 - Issue #3807: _multiprocessing build fails when configure is passed 899 --without-threads argument. When this occurs, _multiprocessing will 900 be disabled, and not compiled. 901 902 - Issue #5261: Patch multiprocessing's semaphore.c to support context 903 manager use: "with multiprocessing.Lock()" works now. 904 905 - Issue #5177: Multiprocessing's SocketListener class now uses 906 socket.SO_REUSEADDR on all connections so that the user no longer needs 907 to wait 120 seconds for the socket to expire. 908 909 - Adjusted _tkinter to compile without warnings when WITH_THREAD is not 910 defined (part of issue #5035). 911 912 - Issue #5561: Removed the sys.version_info shortcuts from platform's 913 python_version() and python_version_tuple() since they produced different 914 output compared to previous Python versions. 915 916 - Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop 917 forever on incomplete input. That caused tarfile.open() to hang when used 918 with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or 919 partial bzip2 compressed data. 920 921 - Issue #5536: urllib.urlretrieve makes sure to close the file it's writing to 922 even if an exception occurs. 923 924 - Fix Decimal.__format__ bug that swapped the meanings of the '<' and 925 '>' alignment characters. 926 927 - Issue #1222: locale.format() bug when the thousands separator is a space 928 character. 929 930 - Issue #4792: Prevent a segfault in _tkinter by using the 931 guaranteed to be safe interp argument given to the PythonCmd in place of 932 the Tcl interpreter taken from a PythonCmd_ClientData. 933 934 - Issue #5193: Guarantee that Tkinter.Text.search returns a string. 935 936 - Issue #5385: Fixed mmap crash after resize failure on windows. 937 938 - Issue #5179: Fixed subprocess handle leak on failure on windows. 939 940 - Issue #4308: httplib.IncompleteRead's repr doesn't include all of the data 941 all ready received. 942 943 - Issue #5401: Fixed a performance problem in mimetypes when ``from mimetypes 944 import guess_extension`` was used. 945 946 - Issue #1733986: Fixed mmap crash in accessing elements of second map object 947 with same tagname but larger size than first map. (Windows) 948 949 - Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer 950 overrun. 951 952 - Issue #5292: Fixed mmap crash on its boundary access m[len(m)]. 953 954 - Issue #5282: Fixed mmap resize on 32bit windows and unix. When offset > 0, 955 The file was resized to wrong size. 956 957 - Issue #5287: Add exception handling around findCaller() call in logging to 958 help out IronPython. 959 960 - Issue #4524: distutils build_script command failed with --with-suffix=3. 961 Initial patch by Amaury Forgeot d'Arc. 962 963 - Issue #4998: The memory saving effect of __slots__ had been lost on Fractions 964 which inherited from numbers.py which did not have __slots__ defined. The 965 numbers hierarchy now has its own __slots__ declarations. 966 967 - Issue #5203: Fixed ctypes segfaults when passing a unicode string to a 968 function without argtypes (only occurs if HAVE_USABLE_WCHAR_T is false). 969 970 - Issue #3321: _multiprocessing.Connection() doesn't check handle; added checks 971 for *nix machines for negative handles and large int handles. Without this 972 check it is possible to segfault the interpreter. 973 974 - Issue #4449: AssertionError in mp_benchmarks.py, caused by an underlying 975 issue in sharedctypes.py. 976 977 - Issue #3386: distutils.sysconfig.get_python_lib prefix argument was ignored 978 under NT and OS2. Patch by Philip Jenvey. 979 980 - Issue #4890: Handle empty text search pattern in Tkinter.Text.search. 981 982 - Issue #5170: Fixed Unicode output bug in logging and added test case. 983 This is a regression which did not occur in 2.5. 984 985 - Partial fix to issue #1731706: memory leak in Tkapp_Call when calling 986 from a thread different than the one that created the Tcl interpreter. 987 Patch by Robert Hancock. 988 989 - Issue #5132: Fixed trouble building extensions under Solaris with 990 --enabled-shared activated. Initial patch by Dave Peterson. 991 992 - Issue #1581476: Always use the Tcl global namespace when calling into Tcl. 993 994 - Issue #2047: shutil.move() could believe that its destination path was 995 inside its source path if it began with the same letters (e.g. "src" vs. 996 "src.new"). 997 998 - Issue 4920: Fixed .next() vs .__next__() issues in the ABCs for 999 Iterator and MutableSet. 1000 1001 - Issue 5021: doctest.testfile() did not create __name__ and 1002 collections.namedtuple() relied on __name__ being defined. 1003 1004 - Issue #3881: Help Tcl to load even when started through the 1005 unreadable local symlink to "Program Files" on Vista. 1006 1007 - Issue #4710: Extract directories properly in the zipfile module; 1008 allow adding directories to a zipfile. 1009 1010 - Issue #5008: When a file is opened in append mode with the new IO library, 1011 do an explicit seek to the end of file (so that e.g. tell() returns the 1012 file size rather than 0). This is consistent with the behaviour of the 1013 traditional 2.x file object. 1014 1015 - Issue #3997: zipfiles generated with more than 65536 files could not be 1016 opened with other applications. 1017 1018 - Issue 4816: itertools.combinations() and itertools.product were raising 1019 a ValueError for values of *r* larger than the input iterable. They now 1020 correctly return an empty iterator. 1021 1022 - Fractions.from_float() no longer loses precision for integers too big to 1023 cast as floats. 1024 1025 - Issue 4790: The nsmallest() and nlargest() functions in the heapq module 1026 did unnecessary work in the common case where no key function was specified. 1027 1028 - Issue #3767: Convert Tk object to string in tkColorChooser. 1029 1030 - Issue #3248: Allow placing ScrolledText in a PanedWindow. 1031 1032 - Issue #3954: Fix a potential SystemError in _hotshot.logreader error 1033 handling. 1034 1035 - Issue #4574: fix a crash in io.IncrementalNewlineDecoder when a carriage 1036 return encodes to more than one byte in the source encoding (e.g. UTF-16) 1037 and gets split on a chunk boundary. 1038 1039 - Issue #4223: inspect.getsource() will now correctly display source code 1040 for packages loaded via zipimport (or any other conformant PEP 302 1041 loader). Original patch by Alexander Belopolsky. 1042 1043 - Issue #4201: pdb can now access and display source code loaded via 1044 zipimport (or any other conformant PEP 302 loader). Original patch by 1045 Alexander Belopolsky. 1046 1047 - Issue #4197: doctests in modules loaded via zipimport (or any other PEP 1048 302 conformant loader) will now work correctly in most cases (they 1049 are still subject to the constraints that exist for all code running 1050 from inside a module loaded via a PEP 302 loader and attempting to 1051 perform IO operations based on __file__). Original patch by 1052 Alexander Belopolsky. 1053 1054 - Issues #4082 and #4512: Add runpy support to zipimport in a manner that 1055 allows backporting to maintenance branches. Original patch by 1056 Alexander Belopolsky. 1057 1058 - Issue #4616: TarFile.utime(): Restore directory times on Windows. 1059 1060 - Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat 1061 libs. 1062 1063 - FileIO's mode attribute now always includes ``"b"``. 1064 1065 - Issue #4861: ctypes.util.find_library(): Robustify. Fix library detection on 1066 biarch systems. Try to rely on ldconfig only, without using objdump and gcc. 1067 1068 - Issue #2703: SimpleXMLRPCDispatcher.__init__: Provide default values for 1069 new arguments introduced in 2.5. 1070 1071 - Issue #1885: distutils. When running sdist with --formats=tar,gztar 1072 the tar file was overriden by the gztar one. 1073 1074 - Registered Decimal as a numbers.Number so that isinstance(d, Number) works. 1075 1076 - Issue #1672332: fix unpickling of subnormal floats, which was 1077 producing a ValueError on some platforms. 1078 1079 - Restore Python 2.3 compatibility for decimal.py. 1080 1081 - Issue #1702551: distutils sdist was not excluding VCS directories under 1082 Windows. Inital solution by Guy Dalberto. 1083 1084 - Issue #4812: add missing underscore prefix to some internal-use-only 1085 constants in the decimal module. (Dec_0 becomes _Dec_0, etc.) 1086 1087 - Issue #4795: inspect.isgeneratorfunction() returns False instead of None when 1088 the function is not a generator. 1089 1090 - Issue #4702: Throwing a DistutilsPlatformError instead of IOError in case 1091 no MSVC compiler is found under Windows. Original patch by Philip Jenvey. 1092 1093 - Issue #4739: Add pydoc help topics for symbols, so that e.g. help('@') 1094 works as expected in the interactive environment. 1095 1096 - Issue #4756: zipfile.is_zipfile() now supports file-like objects. Patch by 1097 Gabriel Genellina. 1098 1099 - Issue #4646: distutils was choking on empty options arg in the setup 1100 function. Original patch by Thomas Heller. 1101 1102 - Issue #4400: .pypirc default generated file was broken in distutils. 1103 1104 - Issue #4736: io.BufferedRWPair's closed property now functions properly. 1105 1106 - Issue #3954: Fix a potential SystemError in _hotshot.logreader error 1107 handling. 1108 1109 - Issue #4163: Use unicode-friendly word splitting in the textwrap functions 1110 when given an unicode string. 1111 1112 - Issue #4616: TarFile.utime(): Restore directory times on Windows. 1113 1114 - Issue #4084: Fix max, min, max_mag and min_mag Decimal methods to 1115 give correct results in the case where one argument is a quiet NaN 1116 and the other is a finite number that requires rounding. 1117 1118 - Issue #1030250: Distutils created directories even when run with the 1119 --dry-run option. 1120 1121 - Issue #4483: _dbm module now builds on systems with gdbm & gdbm_compat 1122 libs. 1123 1124 - Issue #4529: fix the parser module's validation of try-except-finally 1125 statements. 1126 1127 - Issue #4458: getopt.gnu_getopt() now recognizes a single "-" as an argument, 1128 not a malformed option. 1129 1130 - Added the subprocess.check_output() convenience function to get output 1131 from a subprocess on success or raise an exception on error. 1132 1133 - Issue #1055234: cgi.parse_header(): Fixed parsing of header parameters to 1134 support unusual filenames (such as those containing semi-colons) in 1135 Content-Disposition headers. 1136 1137 - Issue #4730: Fixed the cPickle module to handle correctly astral characters 1138 when protocol 0 is used. 1139 1140 - Issue #16278952: plat-mac/videoreader.py now correctly imports MediaDescr 1141 1142 - Issue #1737832 : plat-mac/EasyDialog.py no longer uses the broken aepack 1143 module. 1144 1145 - Issue #1149804: macostools.mkdirs now even works when another process 1146 creates one of the needed subdirectories. 1147 1148 Tools/Demos 1149 ----------- 1150 1151 - Issue #4677: add two list comprehension tests to pybench. 1152 1153 Extension Modules 1154 ----------------- 1155 1156 - Issue #4301: Patch the logging module to add processName support, remove 1157 _check_logger_class from multiprocessing. 1158 1159 - Issue #1040026: Fix os.times result on systems where HZ is incorrect. 1160 1161 - Issue #4397: Fix occasional test_socket failure on OS X. 1162 1163 - Issue #4279: Fix build of parsermodule under Cygwin. 1164 1165 - Issue #4051: Prevent conflict of UNICODE macros in cPickle. 1166 1167 - Issue #4228: Pack negative values the same way as 2.4 in struct's L format. 1168 1169 - Issue #1040026: Fix os.times result on systems where HZ is incorrect. 1170 1171 - Issues #3167, #3682: Fix test_math failures for log, log10 on Solaris, 1172 OpenBSD. 1173 1174 Build 1175 ----- 1176 1177 - Link the shared python library with $(MODLIBS). 1178 1179 - Issue #5134: Silence compiler warnings when compiling sqlite with VC++. 1180 1181 - Issue #4494: Fix build with Py_NO_ENABLE_SHARED on Windows. 1182 1183 - Issue #4895: Use _strdup on Windows CE. 1184 1185 - Issue #4472: "configure --enable-shared" now works on OSX 1186 1187 - Issues #4728 and #4060: WORDS_BIGEDIAN is now correct in Universal builds. 1188 1189 C-API 1190 ----- 1191 1192 - Issue #4720: The format for PyArg_ParseTupleAndKeywords can begin with '|'. 1193 1194 - Issue #3632: from the gdb debugger, the 'pyo' macro can now be called when 1195 the GIL is released, or owned by another thread. 1196 1197 Tests 1198 ----- 1199 1200 - Issue #5635: Fix running test_sys with tracing enabled. 1201 1202 - regrtest no longer treats ImportError as equivalent to SkipTest. Imports 1203 that should cause a test to be skipped are now done using import_module 1204 from test support, which does the conversion. 1205 1206 - Issue #5083: New 'gui' resource for regrtest. 1207 1208 1209 What's New in Python 2.6.1 1210 ========================== 1211 1212 *Release date: 04-Dec-2008* 1213 1214 Core and Builtins 1215 ----------------- 1216 1217 - Issue #3996: On Windows, the PyOS_CheckStack function would cause the 1218 interpreter to abort ("Fatal Python error: Could not reset the stack!") 1219 instead of throwing a MemoryError. 1220 1221 - Issue #4367: Python would segfault during compiling when the unicodedata 1222 module couldn't be imported and \N escapes were present. 1223 1224 - Issue #4348: Some bytearray methods returned that didn't cause any change to 1225 the bytearray, returned the same bytearray instead of a copy. 1226 1227 - Issue #4317: Fixed a crash in the imageop.rgb2rgb8() function. 1228 1229 - Issue #4230: If ``__getattr__`` is a descriptor, it now functions correctly. 1230 1231 - Issue #4048: The parser module now correctly validates relative imports. 1232 1233 - Issue #4225: ``from __future__ import unicode_literals`` didn't work in an 1234 exec statement. 1235 1236 - Issue #4176: Fixed a crash when pickling an object which ``__reduce__`` 1237 method does not return iterators for the 4th and 5th items. 1238 1239 - Issue #4209: Enabling unicode_literals and the print_function in the same 1240 __future__ import didn't work. 1241 1242 - On windows, os.chdir given unicode was not working if GetCurrentDirectoryW 1243 returned a path longer than MAX_PATH. (But It's doubtful this code path is 1244 really executed because I cannot move to such directory on win2k) 1245 1246 - Issue #4069: When set.remove(element) is used with a set element, the element 1247 is temporarily replaced with an equivalent frozenset. But the eventual 1248 KeyError would always report the empty frozenset([]) as the missing key. Now 1249 it correctly refers to the initial element. 1250 1251 - Fixed C99 style comments in several files. Python is now C89 compatible 1252 again. 1253 1254 Library 1255 ------- 1256 1257 - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an 1258 exception. 1259 1260 - Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if 1261 the ctypes module is not present. 1262 1263 - Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__. 1264 1265 - Issue #3774: Fixed an error when create a Tkinter menu item without command 1266 and then remove it. 1267 1268 - Fixed a modulefinder crash on certain relative imports. 1269 1270 - Issue #4150: Pdb's "up" command now works for generator frames in post-mortem 1271 debugging. 1272 1273 - Issue #4092: Return ArgInfo as promised in the documentation from 1274 inspect.getargvalues. 1275 1276 - Issue #3935: Properly support list subclasses in bisect's C implementation. 1277 1278 - Issue #4014: Don't claim that Python has an Alpha release status, in addition 1279 to claiming it is Mature. 1280 1281 Build 1282 ----- 1283 1284 - Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs". 1285 1286 - Issue #4289: Remove Cancel button from AdvancedDlg. 1287 1288 - Issue #1656675: Register a drop handler for .py* files on Windows. 1289 1290 - Issue #4120: Exclude manifest from extension modules in VS2008. 1291 1292 - Issue #4091: Install pythonxy.dll in system32 again. 1293 1294 - Issue #4018: Disable "for me" installations on Vista. 1295 1296 - Issue #3758: Add ``patchcheck`` build target to .PHONY. 1297 1298 - Issue #4204: Fixed module build errors on FreeBSD 4. 1299 1300 C-API 1301 ----- 1302 1303 - Issue #4122: On Windows, fix a compilation error when using the 1304 Py_UNICODE_ISSPACE macro in an extension module. 1305 1306 Extension Modules 1307 ----------------- 1308 1309 - Issue #4365: Add crtassem.h constants to the msvcrt module. 1310 1311 - Issue #4396: The parser module now correctly validates the with statement. 6483 - Issue #2389: Array objects are now pickled in a portable manner. 6484 6485 Misc 6486 ---- 6487 6488 - Issue #5611: Auto-detect whether a C file uses tabs or spaces in Vim. 1312 6489 1313 6490 … … 1343 6520 sizes. 1344 6521 1345 - Issue #3879: A regression in urllib.getproxies_enviro ment was fixed.6522 - Issue #3879: A regression in urllib.getproxies_environment was fixed. 1346 6523 1347 6524 - Issue #3863: Disabled a unit test of fork being called from a thread … … 1377 6554 ----------- 1378 6555 1379 - Issue #3850: recursion tests in Misc/find_recursion_limit.py can raise6556 - Issue #3850: recursion tests in Tools/scripts/find_recursion_limit.py can raise 1380 6557 AttributeError instead of RuntimeError, depending in which C API call 1381 6558 exactly the recursion limit is exceeded. Consequently, both exception types … … 1487 6664 - Issue #3772: Fixed regression problem in StreamHandler.emit(). 1488 6665 1489 - Issue 600362: Relocated parse_qs() and parse_qsl(), from the cgi module6666 - Issue #600362: Relocated parse_qs() and parse_qsl(), from the cgi module 1490 6667 to the urlparse one. Added a PendingDeprecationWarning in the old 1491 6668 module, it will be deprecated in the future. … … 1499 6676 path to the Python binary. 1500 6677 1501 - Issue 3602: Moved test.test_support.catch_warning() to6678 - Issue #3602: Moved test.test_support.catch_warning() to 1502 6679 warnings.catch_warnings() along with some API cleanup. Expanding the tests 1503 6680 for catch_warnings() also led to an improvement in the raising of a … … 1523 6700 Extension Modules 1524 6701 ----------------- 6702 6703 - Issue #4301: Patch the logging module to add processName support, remove 6704 _check_logger_class from multiprocessing. 1525 6705 1526 6706 - Issue #2975: When compiling several extension modules with Visual Studio 2008 … … 1654 6834 fails unicode conversion on 2nd parameter. (windows only) 1655 6835 1656 - Issue 2464.urllib2 now supports a malformation in the URL received6836 - Issue #2464: urllib2 now supports a malformation in the URL received 1657 6837 in a redirect. 1658 6838 … … 1714 6894 (v. 1.68) and tests (v. 2.58) from IBM. 1715 6895 1716 - Issue 3437: Bug fix in robotparser parsing of Allow: lines.1717 1718 - Issue 1592: Improve error reporting when operations are attempted6896 - Issue #3437: Bug fix in robotparser parsing of Allow: lines. 6897 6898 - Issue #1592: Improve error reporting when operations are attempted 1719 6899 on a closed shelf. 1720 6900 … … 1905 7085 - Issue #3215: Build sqlite3 as sqlite3.dll, not sqlite3.pyd. 1906 7086 1907 1908 7087 Documentation 1909 7088 ------------- … … 1971 7150 can't be triggered from Python code. 1972 7151 1973 1974 7152 Extension Modules 1975 7153 ----------------- … … 2278 7456 2279 7457 NOTE: 64-bit and 4-way builds are only suppported on Mac OS X 10.5 (or later). 2280 2281 7458 2282 7459 C API … … 2669 7846 - Issue #2055: Convert test_fcntl to unittest. 2670 7847 2671 - Issue 1960: Convert test_gdbm to unittest.7848 - Issue #1960: Convert test_gdbm to unittest. 2672 7849 2673 7850 - GHOP 294: Convert test_contains, test_crypt, and test_select to … … 2714 7891 2715 7892 - Issue #1881: An internal parser limit has been increased. Also see 2716 issue 215555 for a discussion.7893 issue #215555 for a discussion. 2717 7894 2718 7895 - Added the future_builtins module, which contains hex() and oct(). … … 2759 7936 list was not freed on interpreter shutdown. 2760 7937 2761 - Limit free list of method and built in function objects to 2567938 - Limit free list of method and built-in function objects to 256 2762 7939 entries each. 2763 7940 … … 2893 8070 - Fix warnings found by the new version of the Coverity checker. 2894 8071 2895 - The enumerate() built in function is no longer bounded to sequences8072 - The enumerate() built-in function is no longer bounded to sequences 2896 8073 smaller than LONG_MAX. Formerly, it raised an OverflowError. Now, 2897 8074 automatically shifts from ints to longs. … … 2954 8131 2955 8132 - Issue #1303614: don't expose object's __dict__ when the dict is 2956 inherited from a built in base.8133 inherited from a built-in base. 2957 8134 2958 8135 - When __slots__ are set to a unicode string, make it work the same as … … 3155 8332 it actually exited. 3156 8333 3157 3158 8334 Library 3159 8335 ------- … … 3863 9039 3864 9040 - Bug #1586448: the compiler module now emits the same bytecode for 3865 list comprehensions as the built in compiler, using the LIST_APPEND9041 list comprehensions as the built-in compiler, using the LIST_APPEND 3866 9042 opcode. 3867 9043 … … 3886 9062 when the module is run as a script. 3887 9063 3888 - Bug #813342: Start the IDLE subprocess with -Qnew if the parent is3889 started with that option.3890 3891 9064 - Bug #1565150: Fix subsecond processing for os.utime on Windows. 3892 9065 … … 3936 9109 3937 9110 - Bug #1531862: Do not close standard file descriptors in subprocess. 3938 3939 - idle: Honor the "Cancel" action in the save dialog (Debian bug3940 #299092).3941 9111 3942 9112 - Fix utf-8-sig incremental decoder, which didn't recognise a BOM when … … 4095 9265 4096 9266 - Bug #1486663: don't reject keyword arguments for subclasses of 4097 built in types.9267 built-in types. 4098 9268 4099 9269 - Patch #1610575: The struct module now supports the 't' code, for C99 … … 4182 9352 - The sqlite3 module was updated to pysqlite 2.4.1. 4183 9353 9354 IDLE 9355 ---- 9356 9357 - Bug #813342: Start the IDLE subprocess with -Qnew if the parent is 9358 started with that option. 9359 9360 - IDLE: Honor the "Cancel" action in the save dialog (Debian bug 9361 #299092). 9362 4184 9363 Tests 4185 9364 ----- … … 4226 9405 shutil.copy to preserve user/group and permissions. Added also a 4227 9406 --nobackup option to not create the backup if the user is concerned 4228 regarding this. Check issue 1050828 for more details.9407 regarding this. Check issue #1050828 for more details. 4229 9408 4230 9409 - Tools/scripts/win_add2path.py was added. The simple script modifes … … 4245 9424 benchmark pickle. 4246 9425 4247 4248 9426 Documentation 4249 9427 ------------- … … 4278 9456 and parsedate_tz() in email.utils and rfc822. 4279 9457 4280 - Patch #1671450: add a section about subclassing built in types to the9458 - Patch #1671450: add a section about subclassing built-in types to the 4281 9459 "extending and embedding" tutorial. 4282 9460 … … 4296 9474 a good idea. 4297 9475 4298 4299 9476 Tools/Demos 4300 9477 ----------- … … 4308 9485 - Bug #1546372: Fixed small bugglet in pybench that caused a missing 4309 9486 file not to get reported properly. 4310 4311 9487 4312 9488 Build … … 4392 9568 environment. 4393 9569 4394 4395 9570 C API 4396 9571 ----- … … 4455 9630 macro so it can be used as an expression. 4456 9631 4457 4458 9632 Windows 4459 9633 ------- … … 4469 9643 - Bug #1216: Restore support for Visual Studio 2002. 4470 9644 4471 4472 9645 Mac 4473 9646 ---
Note:
See TracChangeset
for help on using the changeset viewer.