Python.Org 5/26/14, 6:52 PM
Total Page:16
File Type:pdf, Size:1020Kb
What's New In Python 3.0 | Python.org 5/26/14, 6:52 PM What's New In Python 3.0 (editors: check NEWS.help for information about editing NEWS using ReST.) What's New in Python 3.0 final Release date: 03-Dec-2008 Core and Builtins Issue #3996: On Windows, the PyOS_CheckStack function would cause the interpreter to abort ("Fatal Python error: Could not reset the stack!") instead of throwing a MemoryError. Issue #3689: The list reversed iterator now supports __length_hint__ instead of __len__. Behavior now matches other reversed iterators. Issue #4367: Python would segfault during compiling when the unicodedata module couldn't be imported and N escapes were present. Fix build failure of _cursesmodule.c building with -D_FORTIFY_SOURCE=2. Library Issue #4387: binascii now refuses to accept str as binary input. Issue #4073: Add 2to3 support to build_scripts, refactor that support in build_py. IDLE would print a "Unhandled server exception!" message when internal debugging is enabled. Issue #4455: IDLE failed to display the windows list when two windows have the same title. Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an exception. Issue #4433: Fixed an access violation when garbage collecting _ctypes.COMError instances. Issue #4429: Fixed UnicodeDecodeError in ctypes. Issue #4373: Corrected a potential reference leak in the pickle module and silenced a false positive ref leak in distutils.tests.test_build_ext. https://www.python.org/download/releases/3.0/whatsnew Page 1 of 24 What's New In Python 3.0 | Python.org 5/26/14, 6:52 PM Issue #4382: dbm.dumb did not specify the expected file encoding for opened files. Issue #4383: When IDLE cannot make the connection to its subprocess, it would fail to properly display the error message. Build Issue #4407: Fix source file that caused the compileall step in Windows installer to fail. Docs Issue #4449: Fixed multiprocessing examples Issue #3799: Document that dbm.gnu and dbm.ndbm will accept string arguments for keys and values which will be converted to bytes before committal. What's New in Python 3.0 release candidate 3? Release date: 20-Nov-2008 Core and Builtins Issue #4349: sys.path included a non-existent platform directory because of a faulty Makefile. Issue #3327: Don't overallocate in the modules_by_index list. Issue #1721812: Binary set operations and copy() returned the input type instead of the appropriate base type. This was incorrect because set subclasses would be created without their __init__() method being called. The corrected behavior brings sets into line with lists and dicts. Issue #4296: Fix PyObject_RichCompareBool so that "x in [x]" evaluates to True, even when x doesn't compare equal to itself. This was a regression from 2.6. Issue #3705: Command-line arguments were not correctly decoded when the terminal does not use UTF8. Library Issue #4363: The uuid.uuid1() and uuid.uuid4() functions now work even if the ctypes module is not present. FileIO's mode attribute now always includes "b". Issue #3799: Fix dbm.dumb to accept strings as well as bytes for keys. String keys are now written out in UTF-8. Issue #4338: Fix distutils upload command. Issue #4354: Fix distutils register command. Issue #4116: Resolve member name conflict in ScrolledCanvas.__init__. Issue #4307: The named tuple that inspect.getfullargspec() returns now uses kwonlydefaults instead of https://www.python.org/download/releases/3.0/whatsnew Page 2 of 24 What's New In Python 3.0 | Python.org 5/26/14, 6:52 PM kwdefaults. Issue #4298: Fix a segfault when pickle.loads is passed a ill-formed input. Issue #4283: Fix a left-over "iteritems" call in distutils. Build Issue #4389: Add icon to the uninstall entry in "add-and-remove-programs". Issue #4289: Remove Cancel button from AdvancedDlg. Issue #1656675: Register a drop handler for .py* files on Windows. Tools/Demos Demos of the socketserver module now work with Python 3. What's New in Python 3.0 release candidate 2 Release date: 05-Nov-2008 Core and Builtins Issue #4211: The __path__ attribute of frozen packages is now a list instead of a string as required by PEP 302. Issue #3727: Fixed poplib. Issue #3714: Fixed nntplib by using bytes where appropriate. Issue #1210: Fixed imaplib and its documentation. Issue #4233: Changed semantic of _fileio.FileIO's close() method on file objects with closefd=False. The file descriptor is still kept open but the file object behaves like a closed file. The FileIO object also got a new readonly attribute closefd. Issue #3626: On cygwin, starting python with a non-existent script name would not display anything if the file name is only 1 character long. Issue #4176: Fixed a crash when pickling an object which __reduce__ method does not return iterators for the 4th and 5th items. Issue #3723: Fixed initialization of subinterpreters. Issue #4213: The file system encoding is now normalized by the codec subsystem, for example UTF-8 is turned into utf-8. Issue #4200: Changed the atexit module to store its state in its PyModuleDef atexitmodule. This fixes a bug with multiple subinterpeters. Issue #4237: io.FileIO() was raising invalid warnings caused by insufficient initialization of PyFileIOObject struct members. Issue #4170: Pickling a collections.defaultdict object would crash the interpreter. Issue #4146: Compilation on OpenBSD has been restored. https://www.python.org/download/releases/3.0/whatsnew Page 3 of 24 What's New In Python 3.0 | Python.org 5/26/14, 6:52 PM Issue #3574: compile() incorrectly handled source code encoded as Latin-1. Issues #2384 and #3975: Tracebacks were not correctly printed when the source file contains a coding: header: the wrong line was displayed, and the encoding was not respected. Issue #3740: Null-initialize module state. Issue #3946: PyObject_CheckReadBuffer crashed on a memoryview object. Issue #1688: On Windows, the input() prompt was not correctly displayed if it contains non-ascii characters. Bug #3951: Py_USING_MEMORY_DEBUGGER should not be enabled by default. Library Issue #3664: The pickle module could segfault if a subclass of Pickler fails to call the base __init__ method. Issue #3725: telnetlib now works completely in bytes. Issue #4072: Restore build_py_2to3. Issue #4014: Don't claim that Python has an Alpha release status, in addition to claiming it is Mature. Issue #3187: Add sys.setfilesystemencoding. Issue #3187: Better support for "undecodable" filenames. Code by Victor Stinner, with small tweaks by GvR. Issue #3965: Allow repeated calls to turtle.Screen, by making it a true singleton object. Issue #3911: ftplib.FTP.makeport() could give invalid port numbers. Issue #3929: When the database cannot be opened, dbm.open() would incorrectly raise a TypeError: "'tuple' object is not callable" instead of the expected dbm.error. Bug #3884: Make the turtle module toplevel again. Issue #3547: Fixed ctypes structures bitfields of varying integer sizes. Extension Modules Issue #3659: Subclasses of str didn't work as SQL parameters. Build Issue #4120: Exclude manifest from extension modules in VS2008. Issue #4091: Install pythonxy.dll in system32 again. Issue #4018: Disable "for me" installations on Vista. Issue #4204: Fixed module build errors on FreeBSD 4. Tools/Demos https://www.python.org/download/releases/3.0/whatsnew Page 4 of 24 What's New In Python 3.0 | Python.org 5/26/14, 6:52 PM Issue #3717: Fix Demo/embed/demo.c. Issue #4072: Add a distutils demo for build_py_2to3. What's New in Python 3.0 release candidate 1 Release date: 17-Sep-2008 Core and Builtins Issue #3827: memoryview lost its size attribute in favor of using len(view). Issue #3813: could not lanch python.exe via symbolic link on cygwin. Issue #3705: fix crash when given a non-ascii value on the command line for the "-c" and "-m" parameters. Now the behaviour is as expected under Linux, although under Windows it fails at a later point. Issue #3279: Importing site at interpreter was failing silently because the site module uses the open builtin which was not initialized at the time. Issue #3660: Corrected a reference leak in str.encode() when the encoder does not return a bytes object. Issue #3774: Added a few more checks in PyTokenizer_FindEncoding to handle error conditions. Issue #3594: Fix Parser/tokenizer.c:fp_setreadl() to open the file being tokenized by either a file path or file pointer for the benefit of PyTokenizer_FindEncoding(). Issue #3696: Error parsing arguments on OpenBSD <= 4.4 and Cygwin. On these systems, the mbstowcs() function is slightly buggy and must be replaced with strlen() for the purpose of counting of number of wide characters needed to represent the multi-byte character string. Issue #3697: "Fatal Python error: Cannot recover from stack overflow" could be easily encountered under Windows in debug mode when exercising the recursion limit checking code, due to bogus handling of recursion limit when USE_STACKCHEK was enabled. Issue 3639: The _warnings module could segfault the interpreter when unexpected types were passed in as arguments. Issue #3712: The memoryview object had a reference leak and didn't support cyclic garbage collection. Issue #3668: Fix a memory leak with the "s*" argument parser in PyArg_ParseTuple and friends, which occurred when the argument for "s*" was correctly parsed but parsing of subsequent arguments failed. Issue #3611: An exception __context__ could be cleared in a complex pattern involving a __del__ method re-raising an exception. Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__ mechanism. In the process, fix a bug where isinstance() and issubclass(), when given a tuple of classes as second argument, were looking up __instancecheck__ / __subclasscheck__ on the tuple rather than on each type object.