+++++++++++
Python News
+++++++++++
What's New in Python 3.6.2?
===========================
*Release date: 2017-07-17*
- No changes since release candidate 2
What's New in Python 3.6.2 release candidate 2?
===============================================
*Release date: 2017-07-07*
Core and Builtins
-----------------
Library
-------
- [Security] bpo-30730: Prevent environment variables injection in subprocess on
Windows. Prevent passing other environment variables and command arguments.
- [Security] bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes
of multiple security vulnerabilities including: CVE-2017-9233 (External
entity infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix),
CVE-2016-0718 (Fix regression bugs from 2.2.0's fix to CVE-2016-0718)
and CVE-2012-0876 (Counter hash flooding with SipHash).
Note: the CVE-2016-5300 (Use os-specific entropy sources like getrandom)
doesn't impact Python, since Python already gets entropy from the OS to set
the expat secret using ``XML_SetHashSalt()``.
- [Security] bpo-30500: Fix urllib.parse.splithost() to correctly parse
fragments. For example, ``splithost('//127.0.0.1#@evil.com/')`` now
correctly returns the ``127.0.0.1`` host, instead of treating ``@evil.com``
as the host in an authentification (``login@host``).
What's New in Python 3.6.2 release candidate 1?
===============================================
*Release date: 2017-06-17*
Core and Builtins
-----------------
- bpo-30682: Removed a too-strict assertion that failed for certain f-strings,
such as eval("f'\\\n'") and eval("f'\\\r'").
- bpo-30604: Move co_extra_freefuncs to not be per-thread to avoid crashes
- bpo-29104: Fixed parsing backslashes in f-strings.
- bpo-27945: Fixed various segfaults with dict when input collections are
mutated during searching, inserting or comparing. Based on patches by
Duane Griffin and Tim Mitchell.
- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for
non-interned attribute names. Based on patch by Eryk Sun.
- bpo-30039: If a KeyboardInterrupt happens when the interpreter is in
the middle of resuming a chain of nested 'yield from' or 'await'
calls, it's now correctly delivered to the innermost frame.
- bpo-12414: sys.getsizeof() on a code object now returns the sizes
which includes the code struct and sizes of objects which it references.
Patch by Dong-hee Na.
- bpo-29949: Fix memory usage regression of set and frozenset object.
- bpo-29935: Fixed error messages in the index() method of tuple, list and deque
when pass indices of wrong type.
- bpo-29859: Show correct error messages when any of the pthread_* calls in
thread_pthread.h fails.
- bpo-28876: ``bool(range)`` works even if ``len(range)``
raises :exc:`OverflowError`.
- bpo-29600: Fix wrapping coroutine return values in StopIteration.
- bpo-28856: Fix an oversight that %b format for bytes should support objects
follow the buffer protocol.
- bpo-29714: Fix a regression that bytes format may fail when containing zero
bytes inside.
- bpo-29478: If max_line_length=None is specified while using the Compat32 policy,
it is no longer ignored. Patch by Mircea Cosbuc.
Library
-------
- bpo-30038: Fix race condition between signal delivery and wakeup file
descriptor. Patch by Nathaniel Smith.
- bpo-23894: lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings.
- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a reference
cycle to not keep objects alive longer than expected.
- bpo-30149: inspect.signature() now supports callables with
variable-argument parameters wrapped with partialmethod.
Patch by Dong-hee Na.
- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects.
Patch by Sanjay Sundaresan.
- bpo-30605: re.compile() no longer raises a BytesWarning when compiling a
bytes instance with misplaced inline modifier. Patch by Roy Williams.
- [Security] bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes
of CVE-2016-0718 and CVE-2016-4472. See
https://sourceforge.net/p/expat/bugs/537/ for more information.
- bpo-24484: Avoid race condition in multiprocessing cleanup (#2159)
- bpo-28994: The traceback no longer displayed for SystemExit raised in
a callback registered by atexit.
- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was
called.
- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add
support for ContextManager on all versions. Original PRs by Jelle Zijlstra
and Ivan Levkivskyi
- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl
implementation. Patch by Michaël Sghaïer.
- bpo-29743: Closing transport during handshake process leaks open socket.
Patch by Nikolay Kim
- bpo-27585: Fix waiter cancellation in asyncio.Lock.
Patch by Mathieu Sornay.
- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore EINVAL
on stdin.write() if the child process is still running but closed the pipe.
- bpo-29822: inspect.isabstract() now works during __init_subclass__. Patch
by Nate Soares.
- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract base
classes to use keyword parameters in __init_subclass__. Patch by Nate Soares.
- bpo-30557: faulthandler now correctly filters and displays exception codes
on Windows
- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot
handle IPv6 addresses.
- bpo-29960: Preserve generator state when _random.Random.setstate()
raises an exception. Patch by Bryan Olson.
- bpo-30414: multiprocessing.Queue._feed background running
thread do not break from main loop on exception.
- bpo-30003: Fix handling escape characters in HZ codec. Based on patch
by Ma Lin.
- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under
*spawn* and *forkserver* start methods.
- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error
(code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted.
This error occurs sometimes on SSL connections.
- bpo-30375: Warnings emitted when compile a regular expression now always
point to the line in the user code. Previously they could point into inners
of the re module if emitted from inside of groups or conditionals.
- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is
running coroutine and the coroutine returned without any more ``await``.
- bpo-30266: contextlib.AbstractContextManager now supports anti-registration
by setting __enter__ = None or __exit__ = None, following the pattern
introduced in bpo-25958. Patch by Jelle Zijlstra.
- bpo-30298: Weaken the condition of deprecation warnings for inline modifiers.
Now allowed several subsequential inline modifiers at the start of the
pattern (e.g. ``'(?i)(?s)...'``). In verbose mode whitespaces and comments
now are allowed before and between inline modifiers (e.g.
``'(?x) (?i) (?s)...'``).
- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma Lin.
- Revert bpo-26293 for zipfile breakage. See also bpo-29094.
- bpo-30243: Removed the __init__ methods of _json's scanner and encoder.
Misusing them could cause memory leaks or crashes. Now scanner and encoder
objects are completely initialized in the __new__ methods.
- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process
when Ctrl-C is received.
- bpo-28556: Various updates to typing module: add typing.NoReturn type, use
WrapperDescriptorType, minor bug-fixes. Original PRs by
Jim Fasarakis-Hilliard and Ivan Levkivskyi.
- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux.
- bpo-30070: Fixed leaks and crashes in errors handling in the parser module.
评论0