From: Benjamin Peterson Date: Sat, 7 Jun 2014 22:09:36 +0000 (-0700) Subject: merge 3.4 (#21463) X-Git-Tag: v3.5.0a1~1497 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=edb07d28fbfd526f0771b337b05c2e611d266981;p=python merge 3.4 (#21463) --- edb07d28fbfd526f0771b337b05c2e611d266981 diff --cc Misc/NEWS index 62c1be00ba,f581cd4580..d13d57385f --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -19,168 -19,182 +19,170 @@@ Core and Builtin time issue noticeable when compiling code with a large number of "and" and "or" operators. -Library -------- - -- Issue #21463: In urllib.request, fix pruning of the FTP cache. - -- Issue #21618: The subprocess module could fail to close open fds that were - inherited by the calling process and already higher than POSIX resource - limits would otherwise allow. On systems with a functioning /proc/self/fd - or /dev/fd interface the max is now ignored and all fds are closed. - -- Issue #21552: Fixed possible integer overflow of too long string lengths in - the tkinter module on 64-bit platforms. - -- Issue #14315: The zipfile module now ignores extra fields in the central - directory that are too short to be parsed instead of letting a struct.unpack - error bubble up as this "bad data" appears in many real world zip files in - the wild and is ignored by other zip tools. +- Issue #21418: Fix a crash in the builtin function super() when called without + argument and without current frame (ex: embedded Python). -- Issue #21402: tkinter.ttk now works when default root window is not set. +- Issue #21425: Fix flushing of standard streams in the interactive + interpreter. -- Issue #10203: sqlite3.Row now truly supports sequence protocol. In particulr - it supports reverse() and negative indices. Original patch by Claudiu Popa. +- Issue #21435: In rare cases, when running finalizers on objects in cyclic + trash a bad pointer dereference could occur due to a subtle flaw in + internal iteration logic. -- Issue #18807: If copying (no symlinks) specified for a venv, then the python - interpreter aliases (python, python3) are now created by copying rather than - symlinking. +- Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(), + PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) is now using + ``calloc()`` instead of ``malloc()`` for large objects which is faster and + use less memory. -- Issue #14710: pkgutil.get_loader() no longer raises an exception when None is - found in sys.modules. +- Issue #21377: PyBytes_Concat() now tries to concatenate in-place when the + first argument has a reference count of 1. Patch by Nikolaus Rath. -- Issue #14710: pkgutil.find_loader() no longer raises an exception when a - module doesn't exist. +- Issue #20355: -W command line options now have higher priority than the + PYTHONWARNINGS environment variable. Patch by Arfrever. -- Issue #21481: Argparse equality and inequality tests now return - NotImplemented when comparing to an unknown type. +- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c. -- Issue #8743: Fix interoperability between set objects and the - collections.Set() abstract base class. +- Issue #20904: Support setting FPU precision on m68k. -- Issue #13355: random.triangular() no longer fails with a ZeroDivisionError - when low equals high. +- Issue #21209: Fix sending tuples to custom generator objects with the yield + from syntax. -- Issue #21538: The plistlib module now supports loading of binary plist files - when reference or offset size is not a power of two. +- Issue #21193: pow(a, b, c) now raises ValueError rather than TypeError when b + is negative. Patch by Josh Rosenberg. -Build ------ +- PEP 465 and Issue #21176: Add the '@' operator for matrix multiplication. -- Issue #17095: Fix Modules/Setup *shared* support. +- Issue #21134: Fix segfault when str is called on an uninitialized + UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object. -IDLE ----- +- Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by + Andreas Schwab. -- Issue #18910: Add unittest for textView. Patch by Phil Webster. +- Issue #20929: Add a type cast to avoid shifting a negative number. -- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar. +- Issue #20731: Properly position in source code files even if they + are opened in text mode. Patch by Serhiy Storchaka. -- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster. +- Issue #20637: Key-sharing now also works for instance dictionaries of + subclasses. Patch by Peter Ingebretson. -Tests ------ +- Issue #8297: Attributes missing from modules now include the module name + in the error text. Original patch by ysj.ray. -- Issue #18492: All resources are now allowed when tests are not run by - regrtest.py. +- Issue #19995: %c, %o, %x, and %X now raise TypeError on non-integer input. -- Issue #21634: Fix pystone micro-benchmark: use floor division instead of true - division to benchmark integers instead of floating point numbers. Set pystone - version to 1.2. Patch written by Lennart Regebro. +- Issue #19655: The ASDL parser - used by the build process to generate code for + managing the Python AST in C - was rewritten. The new parser is self contained + and does not require to carry long the spark.py parser-generator library; + spark.py was removed from the source base. -- Issue #21605: Added tests for Tkinter images. +- Issue #12546: Allow \x00 to be used as a fill character when using str, int, + float, and complex __format__ methods. -- Issue #21493: Added test for ntpath.expanduser(). Original patch by - Claudiu Popa. +- Issue #20480: Add ipaddress.reverse_pointer. Patch by Leon Weber. -- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok. +- Issue #13598: Modify string.Formatter to support auto-numbering of + replacement fields. It now matches the behavior of str.format() in + this regard. Patches by Phil Elson and Ramchandra Apte. -- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(), - PanedWindow.paneconfigure(), and Menu.entryconfigure(). +- Issue #8931: Make alternate formatting ('#') for type 'c' raise an + exception. In versions prior to 3.5, '#' with 'c' had no effect. Now + specifying it is an error. Patch by Torsten Landschoff. -Windows +Library ------- -- Issue #21671, CVE-2014-0224: The bundled version of OpenSSL has been - updated to 1.0.1h. - +- Issue #21515: tempfile.TemporaryFile now uses os.O_TMPFILE flag is available. -What's New in Python 3.4.1? -=========================== - -Release date: 2014-05-18 - -Core and Builtins ------------------ ++- Issue #21463: In urllib.request, fix pruning of the FTP cache. + -- Issue #21418: Fix a crash in the builtin function super() when called without - argument and without current frame (ex: embedded Python). +- Issue #21618: The subprocess module could fail to close open fds that were + inherited by the calling process and already higher than POSIX resource + limits would otherwise allow. On systems with a functioning /proc/self/fd + or /dev/fd interface the max is now ignored and all fds are closed. -- Issue #21425: Fix flushing of standard streams in the interactive - interpreter. +- Issue #20383: Introduce importlib.util.module_from_spec() as the preferred way + to create a new module. -- Issue #21435: In rare cases, when running finalizers on objects in cyclic - trash a bad pointer dereference could occur due to a subtle flaw in - internal iteration logic. +- Issue #21552: Fixed possible integer overflow of too long string lengths in + the tkinter module on 64-bit platforms. -Library -------- +- Issue #14315: The zipfile module now ignores extra fields in the central + directory that are too short to be parsed instead of letting a struct.unpack + error bubble up as this "bad data" appears in many real world zip files in + the wild and is ignored by other zip tools. -- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial - shape. +- Issue #13742: Added "key" and "reverse" parameters to heapq.merge(). + (First draft of patch contributed by Simon Sapin.) -- Issue #20998: Fixed re.fullmatch() of repeated single character pattern - with ignore case. Original patch by Matthew Barnett. +- Issue #21402: tkinter.ttk now works when default root window is not set. -- Issue #21075: fileinput.FileInput now reads bytes from standard stream if - binary mode is specified. Patch by Sam Kimbrel. +- Issue #3015: _tkinter.create() now creates tkapp object with wantobject=1 by + default. -- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a - flush() on the underlying binary stream. Patch by akira. +- Issue #10203: sqlite3.Row now truly supports sequence protocol. In particulr + it supports reverse() and negative indices. Original patch by Claudiu Popa. -- Issue #21470: Do a better job seeding the random number generator by - using enough bytes to span the full state space of the Mersenne Twister. +- Issue #18807: If copying (no symlinks) specified for a venv, then the python + interpreter aliases (python, python3) are now created by copying rather than + symlinking. -- Issue #21398: Fix an unicode error in the pydoc pager when the documentation - contains characters not encodable to the stdout encoding. +- Issue #20197: Added support for the WebP image type in the imghdr module. + Patch by Fabrice Aneche and Claudiu Popa. -Tests ------ +- Issue #21513: Speedup some properties of IP addresses (IPv4Address, + IPv6Address) such as .is_private or .is_multicast. -- Issue #17756: Fix test_code test when run from the installed location. +- Issue #21137: Improve the repr for threading.Lock() and its variants + by showing the "locked" or "unlocked" status. Patch by Berker Peksag. -- Issue #17752: Fix distutils tests when run from the installed location. +- Issue #21538: The plistlib module now supports loading of binary plist files + when reference or offset size is not a power of two. -IDLE ----- +- Issue #21455: Add a default backlog to socket.listen(). -- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin - consolidating and improving human-validated tests of Idle. Change other files - as needed to work with htest. Running the module as __main__ runs all tests. +- Issue #21525: Most Tkinter methods which accepted tuples now accept lists too. +- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial + shape. -What's New in Python 3.4.1rc1? -============================== +- Issue #20826: Optimize ipaddress.collapse_addresses(). -Release date: 2014-05-05 +- Issue #21487: Optimize ipaddress.summarize_address_range() and + ipaddress.{IPv4Network,IPv6Network}.subnets(). -Core and Builtins ------------------ +- Issue #21486: Optimize parsing of netmasks in ipaddress.IPv4Network and + ipaddress.IPv6Network. -- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c. +- Issue #13916: Disallowed the surrogatepass error handler for non UTF-* + encodings. -- Issue #21209: Fix sending tuples to custom generator objects with the yield - from syntax. +- Issue #20998: Fixed re.fullmatch() of repeated single character pattern + with ignore case. Original patch by Matthew Barnett. -- Issue #21134: Fix segfault when str is called on an uninitialized - UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object. +- Issue #21075: fileinput.FileInput now reads bytes from standard stream if + binary mode is specified. Patch by Sam Kimbrel. -- Issue #19537: Fix PyUnicode_DATA() alignment under m68k. Patch by - Andreas Schwab. +- Issue #19775: Add a samefile() method to pathlib Path objects. Initial + patch by Vajrasky Kok. -- Issue #20929: Add a type cast to avoid shifting a negative number. +- Issue #21398: Fix an unicode error in the pydoc pager when the documentation + contains characters not encodable to the stdout encoding. -- Issue #20731: Properly position in source code files even if they - are opened in text mode. Patch by Serhiy Storchaka. +- Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept + an (address, netmask) tuple argument, so as to easily construct network + objects from existing addresses. -- Issue #20637: Key-sharing now also works for instance dictionaries of - subclasses. Patch by Peter Ingebretson. +- Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a + staticmethod. -- Issue #12546: Allow \x00 to be used as a fill character when using str, int, - float, and complex __format__ methods. +- Issue #21424: Simplified and optimized heaqp.nlargest() and nmsmallest() + to make fewer tuple comparisons. -- Issue #13598: Modify string.Formatter to support auto-numbering of - replacement fields. It now matches the behavior of str.format() in - this regard. Patches by Phil Elson and Ramchandra Apte. +- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a + flush() on the underlying binary stream. Patch by akira. -Library -------- +- Issue #18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman - Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0. In porting to Argument Clinic, the first two arguments were reversed.