GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — cpython/Misc/NEWS at v2.2.3 · python/cpython Expand file tree/ Copy pathNEWSMore file actions 3989 lines (2852 loc) · 156 KB / Copy pathNEWSFile metadata and controls3989 lines (2852 loc) · 156 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 What's New in Python 2.2.3 (final) ? Release date: 30-May-2003 ==================================== - SF #745055: Fix memory leaks in Tkapp_Split and Tkapp_SplitList. - On Posix systems, as of Python 2.2, the arguments for socket.socket() default to AF_INET, SOCK_STREAM. This is now so for the Windows-specific wrapper in socket.py as well. - Backport SF #736892: Add argument sanity checking for __get__(). - SF #742911: Fix segfault due to clearing weak references too late for new-style class instances. - Backport SF 742860: new, improved __delitem__ for WeakKeyDictionary. The old __delitem__ wasn't threadsafe, was very inefficient (expected time O(len(dict)) instead of O(1)), and could raise a spurious RuntimeError if another thread mutated the dict during __delitem__, or if a comparison function mutated it. It also neglected to raise KeyError when the key wasn't present; didn't raise TypeError when the key wasn't of a weakly referencable type; and broke various more-or-less obscure dict invariants by using a sequence of equality comparisons over the whole set of dict keys instead of computing the key's hash code to narrow the search to those keys with the same hash code. All of these are considered to be bugs. A new implementation of __delitem__ repairs all that, but note that fixing these bugs may change visible behavior in code relying (whether intentionally or accidentally) on old behavior. - Backport SF #745478: email package 2.5.3; fixes a buglet in multipart boundary calculation. - RPM spec file update from Sean Reifschneider. - Mac OS X specific backports for distutils/unixccompiler.py. SF #723495 What's New in Python 2.2.3c1 ? Release date: 22-May-2003 ============================ - C API: PyType_Ready(): If a type declares that it participates in gc (Py_TPFLAGS_HAVE_GC), and its base class does not, and its base class's tp_free slot is the default _PyObject_Del, and type does not define a tp_free slot itself, _PyObject_GC_Del is assigned to type->tp_free. Previously _PyObject_Del was inherited, which could at best lead to a segfault. In addition, if even after this magic the type's tp_free slot is _PyObject_Del or NULL, and the type is a base type (Py_TPFLAGS_BASETYPE), TypeError is raised: since the type is a base type, its dealloc function must call type->tp_free, and since the type is gc'able, tp_free must not be NULL or _PyObject_Del. - Windows: file.truncate(size) failed on large files when size didn't fit in 32 bits. This was fixed by backporting new Windows truncation code and tests from 2.3. - It is no longer possible to use object.__setattr__ to circumvent the restrictions on setting attributes of type objects. - Implemented os.fsync() for Windows, where it calls the MS _commit() function. Before, there was no way in core Python to ensure file writes actually showed up on disk when necessary. - Make all the strip, lstrip, rstrip functions/methods on string/unicode/UserString consistent by adding and/or documenting the chars parameter. The chars parameter specifies which characters to strip. - Some horridly obscure problems were fixed involving interaction between garbage collection and classes with "ambitious" getattr hooks. If a class instance didn't have a __del__ method, but did have a __getattr__ hook, and the instance became reachable only from an unreachable cycle, and the hook resurrected or deleted unreachable objects when asked to resolve "__del__", anything up to a segfault could happen. That's been repaired. - Skip locale test on Mac OS X. - Fixed some build problems related to Redhat Linux 9. - Backported the "largefile" requirement for test_largefile on Mac OS X. - Backported email package 2.5.2, which makes address parsing slightly more robust. - Added new encodings for Ukrainian Cyrillic. - SF #710576: Backport of fix for #663074, to implement per-interpreter codecs registries. This adds new members at the end of PyInterpreterState. - SF #705836: The platform-independent routines for packing floats in IEEE formats (struct.pack's <f, >f, <d, and >d codes; pickle and cPickle's protocol 1 pickling of floats) ignored that rounding can cause a carry to propagate. The worst consequence was that, in rare cases, <f and >f could produce strings that, when unpacked again, were a factor of 2 away from the original float. This has been fixed. - SF #645777: list.extend() works with any iterable and is no longer experimental. - Backported SF patch #676342: after using pdb, the readline command completion was botched. Backport fix for SF bug #741171, pdb crashes when enabling a non-existent breakpoint. - Fix problem building on OSF1 because the compiler only accepted preprocessor directives that start in column 1. (SF bug #691793.) - Fixed two places in PyObject_Generic{Get,Set}Attr() where the tp_descr_{get,set} slot of a descriptor's type was accessed without checking tp_flags whether those slots actually exist. This could cause segfaults in Zope. - The imp module now has ways to acquire and release the "import lock": imp.acquire_lock() and imp.release_lock(). Note: this is a reentrant lock, so releasing the lock only truly releases it when this is the last release_lock() call. You can check with imp.lock_held(). (SF bug #580952 and patch #683257.) - Through a bytecode optimizer bug (and I bet you didn't even know Python *had* a bytecode optimizer :-), "unsigned" hex/oct constants with a leading minus sign would come out with the wrong sign. ("Unsigned" hex/oct constants are those with a face value in the range sys.maxint+1 through sys.maxint*2+1, inclusive; these have always been interpreted as negative numbers through sign folding.) E.g. 0xffffffff is -1, and -(0xffffffff) is 1, but -0xffffffff would come out as -4294967295. This was the case in Python 2.2 through 2.2.2 and 2.3a1, and in Python 2.4 it will once again have that value, but according to PEP 237 it really needs to be 1 in Python 2.2.3 and 2.3. (SF #660455) - SF bug #678518: fix some bugs in the parser module. - Bastion.py and rexec.py are disabled. These modules are not safe in Python 2.2. or 2.3. - SF #676155: fixed errors when trying to convert a long integer into a float which couldn't fit. - SF #660476 and #513033: broken threadstate swap in readline could cause fatal errors when a readline hook was being invoked while a background thread was active. - SF #623669: a class that inherits __rdiv__ (or another __r*__ operator) could end up with infinite recursion. - Fixed sundry memory leaks. - More objects participate in garbage collection: classmethod, staticmethod, and cPickle Pickler and Unpickler. (SF #735247) - Improve the robustness of the methods for random distributions so they can work with generators producing a full range of values (unlike the Wichmann-Hill generator which never produces a zero). The range of u=random() is [0,1), so log(u) and 1/x can fail. Fix by setting u=1-random() or by reselecting for a usable value. - SF #659709: bogus float length computation during string formatting. - Deleted the __del__ method on socket wrappers; it's not needed and prevents GC to work. - Exceptions raised by __cmp__ weren't always properly handled and could cause "exception set without error return" failures. - Fixed an old bug in asyncore.py which could cause bogus read calls on file descriptors after a signal is handled while blocked in select(). - SF #643260: __rpow__ wasn't being called. - SF #534748, #645383: in setup.py, when modules fail to import, don't just delete them. - SF #529750: _Py_ResetReferences() is now a no-op. - SF #505427: build problem on HP-UX (h_errno not defined). - SF #564729: make FixTk.py search properly for Tix subdirectories. - Made string.strip() work as documented. - Implemented some additional restrictions on __class__ assignment. - SF #630824: added keyword 'yield' to pydoc.py. - SF #626172: fix crash using Unicode Latin-1 single character. - SF #570655: fix misleading option text in distutils rpm creation. - SF #624982: fix potential segfault in slot_sq_item. - New codec for Ukrainian Cyrillic. - SF #665913: fix crash on Solaris when closing an mmap'ed file which was already closed. - SF #639945: fix crash on 64-bit AIX when loading dynamic modules. - SF #659228, fix realpath() not being exported from os.path - SF #667147, fix crash when printing str subclass. - SF #557719, backported just the tiny fragment necessary to get BUILDEXE set properly in out-of-tree builds. - SF #649762, fix infinite loop in asynchat when null string used as terminator - SF #570655, fix misleading option text for bdist_rpm - Distutils: Allow unknown keyword arguments to the setup() function and the Extension constructor, printing a warning about them instead of reporting an error and stopping. - Distutils: Translate spaces in the machine name to underscores (Power Macintosh -> Power_Macintosh) - Distutils: on Mac OS X don't use -R for runtime_library_dirs, use -L in stead (#723495). - Backported SF #658233, continuation lines in .mo file metadata crashed gettext.GNUTranslations parsing. Also, export more symbols in the gettext module's __all__. - Other patch and bug fix backports: 734869, 497420, 728322, 730963, 723831, 708604, 723136, 549141, 557704, 724751, 716969, 711835, 697220, 710498, 706338, 659834, 695250, 672614, 707701, 698517, 709428, 708201, 700798, 703471, 676990, 521782, 635570, 633359, 610299, 491107, 687655, 684667, 642168, 682514, 675259, 654974, 655271, 641111, 642742, 669553, 634866, 664183, 664044, 665570, 430610, 427345, 658106, 643227, 649095, 646578, 637941, 639170, 635929, 637807, 637810, 424106, 635595, 613605, 635656, 633560, 632864, 618146, 632196, 616211, 577000, 546579, 626554, 606463, 217195 What's New in Python 2.2.2 (final) ? Release date: 14-Oct-2002 ==================================== Almost everything in this release is a pure bugfix and is backported from a corresponding bugfix already applied to Python 2.3. While at the time of writing, Python 2.3 is still in pre-alpha form, only accessible via CVS, it receives continuous and extensive testing by its developers. The list below is not a complete list of fixed bugs; it only lists fixed bugs that someone might be interested in hearing about. Documentation fixes are not listed. Tip: to quickly find SourceForge bug or patch NNNNNN, use an URL of the form www.python.org/sf/NNNNNN. Here are all the changes since the 2.2.2b1 release last week, except for documentation changes. Below it are the (much more numerous!) changes since the 2.2.1 release in April. Core and builtins - In listobject.c and tupleobject.c: added overflow checks for list*int, list+list, and tuple+tuple. - In object.c: changed misleading SystemError exceptions raised in PyObject_Init() and PyObject_InitVar() to MemoryError. - In stringobject.c: added an overflow check to string formatting; this example could segfault: '%2147483647d' % -1. [SF bug 618623] - In typeobject.c: removed COPYSLOT(tp_dictoffset) from inherit_slots(). For more info, read this python-dev thread: http://mail.python.org/pipermail/python-dev/2002-October/029502.html - In stringobject.c: fixed another string formatting nit: "%r" % u"..." would return a Unicode string, even though repr(u"...") returns an 8-bit string. Now "%r" also returns an 8-bit string. - In pystate.c: initialize the tick_counter to zero. Library - This release includes the email package version 2.4.3, which fixes some minor bugs found in email 2.4.1 since its release. - In urlparse.py: a one-character fix to urlunsplit() caused breakage when parsing relative URLs, so added a fix for the fix and a test for the fix. [SF bug 620705] - In re.py: the finditer() function was accidentally not defined. [SF bug 585882] - In webbrowser.py: fixed Konqueror support. [SF patch 539360] - In xml/sax/expatreader.py: fixed a bug in the expat-based SAX reader that allows it to work with arbitrary versions of Expat. - In distutils/sysconfig.py: added a no-op version of set_python_build() back, to avoid breaking code that might call this. (It remains no longer needed and hence deprecated, though.) Build - In configure[.in]: expand AC_CHECK_SIZEOF inline to overcome a autoconf 2.13 weakness. [SF bug 620791] - In setup.py: Be more conservative about adding a -R flag for the SSL code; it is needed on Solaris 8 and broke on Mac OSX 10.2. The -R flag is now only added for Solaris. Tests - The test list(xrange(sys.maxint / 4)) test in test_b1.py was changed to use sys.maxint / 2 instead. This means that the test will not attempt to allocate any memory, but merely check that the overflow detection code works correctly (as was intended). - The MacOSX (both 10.1 and 10.2) tests will crash with SEGV in test_re and test_sre due to the small default stack size. If you set the stack size to 2048 before doing a "make test" the failure can be avoided. If you're using the tcsh (the default on OSX), or csh shells use "limit stacksize 2048" and for the bash shell, use "ulimit -s 2048". Windows - Fixed the "File version" field in the DLL. This has apparently been broken forever. Other - Updated the Misc/ACKS file to acknowledge many new contributors. What's New in Python 2.2.2b1? Release date: 7-Oct-2002 ============================= Core and builtins - Changed new-style class instantiation so that when C's __new__ method returns something that's not a C instance, its __init__ is not called. [SF bug #537450] (This is arguably a semantic change, but it's hard to imagine a reason for wanting to depend on the old behavior. If problems with this are reported within a week of the release of 2.2.2 beta 1, we may revert this change.) - Fix a core dump in type_new() when looking for the tp_init() slot. This could call a garbage pointer when e.g. an ExtensionClass was given. - A variety of very obscure end-case bugs in new-style classes were fixed, some of which could be made to trigger core dumps with absurd input. - u'%c' will now raise a ValueError in case the argument is an integer outside the valid range of Unicode code point ordinals. - Several small patches were applied that aren't bugfixes (and aren't even backported from 2.3!) but make life easier for tools like Armin Rigo's Psyco. [SF patches 617309, 617311, 617312] - Made conversion failure error message consistent between types. - The complex() built-in now finds __complex__() in new-style classes. [SF bug 563740] - Fixed a problem in the UTF-8 decoder where a Unicode literal containing a "lone surrogate" would cause a .pyc file to be written that could not be read. [SF bug 610783] - Fixed a problem with code objects whose stacksize is >= 2**15. These cannot be marshalled correctly. As a work-around, don't write a .pyc file in this case. [SF bug 561858] - Fixed several bugs that could cause issubclass() and isinstance() to leave an exception lingering behind while returning a non-error value. - The Unicode replace() method would do the wrong thing for a unicode subclass when there were zero string replacements. [SF bug 599128] - Fixed some endcase bugs in Unicode rfind()/rindex() and endswith(). [SF bug 595350] - When x is an object whose class implements __mul__ and __rmul__, 1.0*x would correctly invoke __rmul__, but 1*x would erroneously invoke __mul__. This was due to the sequence-repeat code in the int type. This has been fixed now. - The __delete__ method wrapper wasn't supported. [SF patch 588728] - If a dying instance of a new-style class got resurrected by its class's __del__ method, Python aborted with a fatal error. - Source that creates parse nodes with an extremely large number of children (e.g., test_longexp.py) triggers problems with the platform realloc() under several platforms (e.g., MacPython, and Win98). This has been fixed via a more-aggressive overallocation strategy. - Fixed a bug with a continue inside a try block and a yield in the finally clause. [SF bug 567538] - Cycles going through the __class__ link of a new-style instance are now detected by the garbage collector. - Classes using __slots__ are now properly garbage collected. [SF bug 519621] - Fixed an inefficiency in clearing the stack frame of new frame objects. - Repaired a slow memory leak possible only in programs creating a great many cyclic structures involving frames [SF bug 543148]. - Fixed an esoteric performance glitch in GC. [SF bug 574132] - A method zfill() was added to str and unicode, that fills a numeric string to the left with zeros. For example, "+123".zfill(6) -> "+00123". - Complex numbers supported divmod() and the // and % operators, but these make no sense. Since this was documented, they're being deprecated now. - String and Unicode methods lstrip(), rstrip() and strip() now take an optional argument that specifies the characters to strip. For example, "Foo!!!?!?!?".rstrip("?!") -> "Foo". In addition, "200L".strip("L") will return "200". This is useful for replacing code that assumed longs will always be printed with a trailing "L". - A change to how new-style classes deal with __doc__: you can now supply a __doc__ descriptor that returns something different for a class than for instances of that class. - Fixed bug #521782: when a file was in non-blocking mode, file.read() could silently lose data or wrongly throw an unknown error. Extension modules - In readline.c: change completion to avoid appending a space character; this is usually more useful when editing Python code. - Fixed a crash in debug builds for marshal.dumps([128] * 1000). [SF bug 588452] - In cPickle.c: more robust test of whether global objects are accessible. Added recursion limit to pickling [SF bug 576084]. Try the persistent id code *before* calling save_global(). - In mmapmodule.c: if the size passed to mmap() is larger than the length of the file on non-Windows platforms, a ValueError is raised. [SF bug 585792] - In socketmodule.c: improve robustness of IPv6 code. - In _hotshot.c: fix broken logic in the logreader object. - In zlibmodule.c: fix for crash on second flush() call. [SF bug 544995] Library - The email package from the Python 2.3 development tree has been backported, including updated documentation. This version corresponds to email 2.4.1 and should be nearly completely backward compatible. However there have been lots of improvements in the API, so you should read the section in the library manual about the changes since email v1. - In pydoc.py: Extend stripid() to handle strings ending in more than one '>'; add resolve() to handle looking up objects and names (fix SF bug 586931); add a nicer error message when given a filename that doesn't exist. Pretend that the docstring for non-callable objects is always None; this makes for less confusing output and fixes the problem reported in SF patch 550290. Change the way 'less' is invoked as a browser (on Unix) to make it more robust. - In pickle.py: whichmodule() now skips dummy (None) package entries in sys.modules. Try the persistent id code *before* calling save_global(). - A variety of fixes were applied to the compiler package. - In distutils/: Fix distutils.sysconfig to understand that the running Python is part of the build tree and needs to use the appropriate "shape" of the tree [SF patch 547734]. Prefer rpmbuild over rpm if available [SF patch 619493]. util.convert_path() failed with empty pathname. [SF bug 574235] - In posixpath.py and user.py: fixed SF bug 555779, "import user doesn't work with CGIs." - In site.py: fixed a problem which triggered when sys.path was empty. - In smtpd.py: print the refused list to the DEBUGSTREAM [SF 515021]; removed an embarrassing debug line from smtp_RCPT(). - In smtplib.py: fix multiline string in sendmail example [SF patch 586999]; handle empty addresses [SF bug 602029]. - In urllib.py: treat file://localhost/ as local too (same as file:/ and file:///). [SF bug 607789] - In warnings.py: ignore IOError when writing the message. - In ConfigParser.py: allow internal whitespace in keys [SF bug 583248]; use option name transform consistently in has_option() [SF bug 561822]; misc other patches. - In sre_compile.py (the compile() function for the re module): Disable big charsets in UCS-4 builds. [SF bug 599377] - In pre.py (the deprecated, *old* implementation of the re module): fix broken sub() and subn(). [SF bug 570057] - In weakref.py: The WeakKeyDictionary constructor didn't work when a dict arg was given. [SF patch 564549] - In xml/: various fixes tracking PyXML. - In urllib2.py: fix proxy config with user+pass authentication. [SF patch 527518] - In pdb.py: Increase the maxstring value of _saferepr. Add exit as an alias for quit [SF bug 543674]. Fix crash on input line consisting of one or more spaces [SF bug 579701]. - In test/regrtest.py: added some sys.stdout.flush() calls. - In random.py: - Deprecate (in comment) cunifvariate(). [SF bug 506647] - Loosened the acceptable 'start' and 'stop' arguments to randrange() so that any Python (bounded) ints can be used. So, e.g., randrange(-sys.maxint-1, sys.maxint) no longer blows up. [SF bug 594996] - The gauss() method uses a piece of hidden state used by nothing else, and the .seed() and .whseed() methods failed to reset it. In other words, setting the seed didn't completely determine the sequence of results produced by random.gauss(). It does now. Programs repeatedly mixing calls to a seed method with calls to gauss() may see different results now. - The randint() method is rehabilitated (i.e. no longer deprecated). - In copy.py: when an object is copied through its __reduce__ method, there was no check for a __setstate__ method on the result [SF patch 565085]; deepcopy should treat instances of custom metaclasses the same way it treats instances of type 'type' [SF patch 560794]. - In turtle.py: update canvas before computing width; draw turtle when done drawing circle. [SF bug 612595] - In Tkinter.py: Canvas.select_item() now returns the selected item, if any. [SF patch 581396] - In multifile.py: *backed out* the change that stripped a trailing \r\n. This caused more problems than it fixed. [SF bug 514676] - In rexec.py: fixed several security problems. *This does not mean that rexec is now considered safe!* - In os.py: security fixes for _execvpe(). - In gzip.py: open files in binary mode. - In CGIHTTPServer.py: update os.environ regardless of hos it tries to handle calls (fork, popen*, etc.). Also fixed a flush() of a read-only file (can't do that on MacOS X). - In urllib.py: in splituser(), allow @ in the userinfo field. This is not allowed by RFC 2396; however, other tools support unescaped @'s so we should also. [SF patch 596581, bug 581529] - In base64.py: decodestring('') should return '' instead of raising an exception. [SF bug 595671] - atexit.py: keep working if sys.exitfunc is already set when this is first imported. - In copy.py: Make sure that *any* object whose id() is used as a memo key is kept alive in the memo. [SF bug 592567] - In httplib.py: fixed a variety of bugs. The httplib.py in Python 2.2.2 is identical to that in the CVS head (at the time of the release of 2.2.2). - In rfc822.py: change the default for Message.get() back to None. - In bdb.py: fix an old bug that made it impossible to continue after hitting a breakpoint while in the bottom frame. - In Queue.py: use try/finally to ensure that all locks are properly released. [SF bug 544473] - In SocketServer.py: the correct initialization of self.wfile is StringIO.StringIO(), not StringIO.StringIO(self.packet). [SF bug 543318] Build - Various platform-specific problems were fixed, including most open 64-bit platform specific issues. - Updated Misc/RPM for Python 2.2.2b1; added Makefile.pre.in to -devel. - The fpectl module is not built by default; it's dangerous or useless except in the hands of experts. (At the same time, a fix for DEC Alpha under Linux was applied.) - Better check for C++ linkage. [SF bug 559429] - The errno module needs to be statically linked, since it is now needed during the extension building phase. - A bug was fixed that could cause COUNT_ALLOCS builds to segfault, or get into infinite loops, when a new-style class got garbage-collected. Unfortunately, to avoid this, the way COUNT_ALLOCS works requires that new-style classes be immortal in COUNT_ALLOCS builds. Note that COUNT_ALLOCS is not enabled by default, in either release or debug builds, and that new-style classes are immortal only in COUNT_ALLOCS builds. [SF bug 578752] - In order to avoid problems with binutils 2.12 and later, test for --export-dynamic in its help output. C API - New C API PyUnicode_FromOrdinal() which exposes unichr() at C level. Windows - Improve handling of ^C on Windows. [SF bug 439992] - Provide a fallback version of ntpath.abspath() when the nt module can't be imported. - Fixed asyncore on Windows to avoid calling select() with three empty lists. Use time.sleep() instead, to match what happens on Unix/Linux in that case. [SF item 611464] - Fixed selectmodule.c to call WSAGetLastError() to retrieve the error number. - Fixed the test for mmap so that it passes on Windows too. - SF bug 595919: popenN return only text mode pipes popen2() and popen3() created text-mode pipes even when binary mode was asked for. This was specific to Windows. - Sometimes the uninstall executable (UNWISE.EXE) vanishes. One cause of that has been fixed in the installer (disabled Wise's "delete in- use files" uninstall option). Other - Most changes to IDLE were backported, including some featurettes. Open module can now handle hierarchical names for packages (such as xml.dom.minidom). On Windows, Edit SelectAll is now called with Control-A rather than Alt-A. The Edit Menu only offers module options (like import module, check module, or run script) in a module window. Those options no longer appear in the shell window where they did not have meaningful application and was confusing new users. What's New in Python 2.2.1 final? Release date: 10-Apr-2002 ================================= Core and builtins - Added new builtin function bool() and new builtin constants True and False to ease backporting of code developed for Python 2.3. In 2.2, bool() returns 1 or 0, True == 1, and False == 0. - Fixed super() to work correctly with class methods. [SF bug #535444] - Fixed two bugs reported as SF #535905: under certain conditions, deallocating a deeply nested structure could cause a segfault in the garbage collector, due to interaction with the "trashcan" code; access to the current frame during destruction of a local variable could access a pointer to freed memory. Library - The xml.sax.expatreader.ExpatParser class will no longer create circular references by using itself as the locator that gets passed to the content handler implementation. [SF bug #535474] C API - A type can now inherit its metatype from its base type. Previously, when PyType_Ready() was called, if ob_type was found to be NULL, it was always set to &PyType_Type; now it is set to base->ob_type, where base is tp_base, defaulting to &PyObject_Type. - PyType_Ready() accidentally did not inherit tp_is_gc; now it does. Windows - Fixed a bug in urllib's proxy handling in Windows. [SF bug #503031] - The installer now installs Start menu shortcuts under (the local equivalent of) "All Users" when doing an Admin install. What's New in Python 2.2.1c2? Release date: 26-Mar-2002 ============================= There were a bunch of mostly minor fixes between 2.2.1c1 and 2.2.1c2, including: - I remembered to run autoconf before cutting the release tarball. Core and builtins - The floating point behavior fix-up continued into complex_pow. Library - The email package bug #531966 was fixed. This caused exceptions to occur when flattening multipart/* messages with zero or one (scalar) attachment. - Support for https: urls in httplib was broken (by the sendall patch mentioned below). - Minor bugs in the calendar module were fixed. - A few minor bugs in pydoc were fixed (better url recognition, proper quoting of some elements). - Some distutils commands didn't list all their "boolean options" which made overriding them from .cfg files not work. What's New in Python 2.2.1c1? Release date: 18-Mar-2002 ============================= This is primarily a bugfix release. Many bugs have been fixed since the release of 2.2 final. Some of the more notable are listed here. Core and builtins - If you try to pickle an instance of a class that has __slots__ but doesn't define or override __getstate__, a TypeError is now raised. This is done by adding a bozo __getstate__ to the class that always raises TypeError. (Before, this would appear to be pickled, but the state of the slots would be lost.) - (1).__nonzero__() would dump core. - Tim has had another go at getting sensible behaviour with respect to floating point underflow/overflow. - Adding an instance of subclass of int to, say, a string, could erroneously return "NotImplemented" instead of raising a TypeError. - Subclassing longs could cause core dumps in certain circumstances. - PyErr_Display will provide file and line information for all exceptions that have an attribute print_file_and_line, not just SyntaxErrors. This fixes the bug that no proper line number is given for bad \x escapes. - sys.setprofile() and sys.settrace() would dump core if called with no arguments. - An obscure & small memory overrun in wide unicode builds have been fixed. - __doc__ can now be of arbitrary type (in particular, it can be a unicode string). - complex objects are now immutable (as they should always have been). Extension modules - A security hole ("double free") was found in zlib-1.1.3, a popular third party compression library used by some Python modules. The hole was quickly plugged in zlib-1.1.4, and the Windows build of Python 2.2.1 now ships with zlib-1.1.4. - new.instancemethod no longer fails for new-style classes. - The "pseudo-sequences" returned by os.stat(), os.fstat(), time.localtime() can now be pickled. - Due to a cut and paste error the object exported as posix.statvfs_result was in fact posix.stat_result. Library - The copy module can be used in restricted execution mode. - A few bugs in the email package have been fixed. - StringIO's attitude to unicode strings has been reverted to that of the 2.1.x branch (note cStringIO still knows nothing about unicode). - webbrowser: tightened up the command passed to os.system() so that arbitrary shell code can't be executed because a bogus URL was passed in. - Recursive structures containing new-style classes can now by deep-copied. - ftplib defaults to passive mode (again). Tools - Bugs in IDLE's autoindent when using new-style division were fixed. What's New in Python 2.2 final? Release date: 21-Dec-2001 =============================== Type/class unification and new-style classes - pickle.py, cPickle: allow pickling instances of new-style classes with a custom metaclass. Core and builtins - weakref proxy object: when comparing, unwrap both arguments if both are proxies. Extension modules - binascii.b2a_base64(): fix a potential buffer overrun when encoding very short strings. - cPickle: the obscure "fast" mode was suspected of causing stack overflows on the Mac. Hopefully fixed this by setting the recursion limit much smaller. If the limit is too low (it only affects performance), you can change it by defining PY_CPICKLE_FAST_LIMIT when compiling cPickle.c (or in pyconfig.h). Library - dumbdbm.py: fixed a dumb old bug (the file didn't get synched at close or delete time). - rfc822.py: fixed a bug where the address '<>' was converted to None instead of an empty string (also fixes the email.Utils module). - xmlrpclib.py: version 1.0.0; uses precision for doubles. - test suite: the pickle and cPickle tests were not executing any code when run from the standard regresssion test. Tools/Demos Build C API New platforms Tests Windows - distutils package: fixed broken Windows installers (bdist_wininst). - tempfile.py: prevent mysterious warnings when TemporaryFileWrapper instances are deleted at process exit time. - socket.py: prevent mysterious warnings when socket instances are deleted at process exit time. - posixmodule.c: fix a Windows crash with stat() of a filename ending in backslash. Mac - The Carbon toolbox modules have been upgraded to Universal Headers 3.4, and experimental CoreGraphics and CarbonEvents modules have been added. All only for framework-enabled MacOSX. What's New in Python 2.2c1? Release date: 14-Dec-2001 =========================== Type/class unification and new-style classes - Guido's tutorial introduction to the new type/class features has been extensively updated. See http://www.python.org/2.2/descrintro.html That remains the primary documentation in this area. - Fixed a leak: instance variables declared with __slots__ were never deleted! - The "delete attribute" method of descriptor objects is called __delete__, not __del__. In previous releases, it was mistakenly called __del__, which created an unfortunate overloading condition with finalizers. (The "get attribute" and "set attribute" methods are still called __get__ and __set__, respectively.) - Some subtle issues with the super built-in were fixed: (a) When super itself is subclassed, its __get__ method would still return an instance of the base class (i.e., of super). (b) super(C, C()).__class__ would return C rather than super. This is confusing. To fix this, I decided to change the semantics of super so that it only applies to code attributes, not to data attributes. After all, overriding data attributes is not supported anyway. (c) The __get__ method didn't check whether the argument was an instance of the type used in creation of the super instance. - Previously, hash() of an instance of a subclass of a mutable type (list or dictionary) would return some value, rather than raising TypeError. This has been fixed. Also, directly calling dict.__hash__ and list.__hash__ now raises the same TypeError (previously, these were the same as object.__hash__). - New-style objects now support deleting their __dict__. This is for all intents and purposes equivalent to assigning a brand new empty dictionary, but saves space if the object is not used further. Core and builtins - -Qnew now works as documented in PEP 238: when -Qnew is passed on the command line, all occurrences of "/" use true division instead of classic division. See the PEP for details. Note that "all" means all instances in library and 3rd-party modules, as well as in your own code. As the PEP says, -Qnew is intended for use only in educational environments with control over the libraries in use. Note that test_coercion.py in the standard Python test suite fails under -Qnew; this is expected, and won't be repaired until true division becomes the default (in the meantime, test_coercion is testing the current rules). - complex() now only allows the first argument to be a string argument, and raises TypeError if either the second arg is a string or if the second arg is specified when the first is a string. Extension modules - gc.get_referents was renamed to gc.get_referrers. Library - Functions in the os.spawn() family now release the global interpreter lock around calling the platform spawn. They should always have done this, but did not before 2.2c1. Multithreaded programs calling an os.spawn function with P_WAIT will no longer block all Python threads until the spawned program completes. It's possible that some programs relies on blocking, although more likely by accident than by design. - webbrowser defaults to netscape.exe on OS/2 now. - Tix.ResizeHandle exposes detach_widget, hide, and show. - The charset alias windows_1252 has been added. - types.StringTypes is a tuple containing the defined string types; usually this will be (str, unicode), but if Python was compiled without Unicode support it will be just (str,). - The pulldom and minidom modules were synchronized to PyXML. Tools/Demos - A new script called Tools/scripts/google.py was added, which fires off a search on Google. Build - Note that release builds of Python should arrange to define the preprocessor symbol NDEBUG on the command line (or equivalent). In the 2.2 pre-release series we tried to define this by magic in Python.h instead, but it proved to cause problems for extension authors. The Unix, Windows and Mac builds now all define NDEBUG in release builds via cmdline (or equivalent) instead. Ports to other platforms should do likewise. - It is no longer necessary to use --with-suffix when building on a case-insensitive file system (such as Mac OS X HFS+). In the build directory an extension is used, but not in the installed python. C API - New function PyDict_MergeFromSeq2() exposes the builtin dict constructor's logic for updating a dictionary from an iterable object producing key-value pairs. |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |