Release notes for Python 3.6.6
Python 3.6.6 final
Release date: 2018-06-27
There were no new changes in version 3.6.6.
Python 3.6.6 release candidate 1
Release date: 2018-06-11
Core and Builtins
- bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() correctly
- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter shutdown even when there was a custom handler set previously. Patch by Philipp Kerling.
- bpo-33622: Fixed a leak when the garbage collector fails to add an object
with the
__del__
method or referenced by it into thegc.garbage
list.PyGC_Collect()
can now be called when an exception is set and preserves it. - bpo-31849: Fix signed/unsigned comparison warning in pyhash.c.
- bpo-33391: Fix a leak in set_symmetric_difference().
- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer.
- bpo-33231: Fix potential memory leak in
normalizestring()
. - bpo-29922: Improved error messages in ‘async with’ when
__aenter__()
or__aexit__()
return non-awaitable object. - bpo-33199: Fix
ma_version_tag
in dict implementation is uninitialized when copying from key-sharing dict. - bpo-33041: Fixed jumping when the function contains an
async for
loop. - bpo-32282: Fix an unnecessary ifdef in the include of VersionHelpers.h in socketmodule on Windows.
- bpo-21983: Fix a crash in
ctypes.cast()
in case the type argument is a ctypes structured data type. Patch by Eryk Sun and Oren Milman.
Library
- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by Steve Weber.
- bpo-33812: Datetime instance d with non-None tzinfo, but with d.tzinfo.utcoffset(d) returning None is now treated as naive by the astimezone() method.
- bpo-30805: Avoid race condition with debug logging
- bpo-33767: The concatenation (
+
) and repetition (*
) sequence operations now raiseTypeError
instead ofSystemError
when performed onmmap.mmap
objects. Patch by Zackery Spytz. - bpo-32684: Fix gather to propagate cancellation of itself even with return_exceptions.
- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of asyncio.sslproto: start immediately the handshake instead of using call_soon(). Previously, data_received() could be called before the handshake started, causing the handshake to hang or fail.
- bpo-31647: Fixed bug where calling write_eof() on a _SelectorSocketTransport after it’s already closed raises AttributeError.
- bpo-33672: Fix Task.__repr__ crash with Cython’s bogus coroutines
- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor
- bpo-11874: Use a better regex when breaking usage into wrappable parts. Avoids bogus assertion errors from custom metavar strings.
- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder that prevented the cache of parsed strings from clearing after finishing the decoding. Based on patch by c-fos.
- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP locations
- bpo-33542: Prevent
uuid.get_node
from using a DUID instead of a MAC on Windows. Patch by Zvi Effron - bpo-26819: Fix race condition with
ReadTransport.resume_reading
in Windows proactor event loop. - bpo-28556: Minor fixes in typing module: add annotations to
NamedTuple.__new__
, pass*args
and**kwds
inGeneric.__new__
. Original PRs by Paulius Šarka and Chad Dombrova. - bpo-20087: Updated alias mapping with glibc 2.27 supported locales.
- bpo-33422: Fix trailing quotation marks getting deleted when looking up byte/string literals on pydoc. Patch by Andrés Delfino.
- bpo-33197: Update error message when constructing invalid inspect.Parameters Patch by Dong-hee Na.
- bpo-33383: Fixed crash in the get() method of the
dbm.ndbm
database object when it is called with a single argument. - bpo-33329: Fix multiprocessing regression on newer glibcs
- bpo-991266: Fix quoting of the
Comment
attribute ofhttp.cookies.SimpleCookie
. - bpo-33131: Upgrade bundled version of pip to 10.0.1.
- bpo-33308: Fixed a crash in the
parser
module when converting an ST object to a tree of tuples or lists withline_info=False
andcol_info=True
. - bpo-33263: Fix FD leak in
_SelectorSocketTransport
Patch by Vlad Starostin. - bpo-33256: Fix display of
<module>
call in the html produced bycgitb.html()
. Patch by Stéphane Blondon. - bpo-33203:
random.Random.choice()
now raisesIndexError
for empty sequences consistently even when called from subclasses without agetrandbits()
implementation. - bpo-33224: Update difflib.mdiff() for PEP 479. Convert an uncaught StopIteration in a generator into a return-statement.
- bpo-33209: End framing at the end of C implementation of
pickle.Pickler.dump()
. - bpo-32861: The urllib.robotparser’s
__str__
representation now includes wildcard entries and the “Crawl-delay” and “Request-rate” fields. Patch by Michael Lazar. - bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false boolean value. Note iid=0 and iid=False would be same. Patch by Garvit Khatri.
- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1.
- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all threads when calling mmap.mmap(), os.urandom(), and random.seed(). Patch by Nir Soffer.
- bpo-27683: Fix a regression in
ipaddress
that result ofhosts()
is empty when the network is constructed by a tuple containing an integer mask and only 1 bit left for addresses. - bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in subprocess if another low descriptor is closed.
- bpo-31908: Fix output of cover files for
trace
module command-line tool. Previously emitted cover files only when--missing
option was used. Patch by Michael Selik. - bpo-31457: If nested log adapters are used, the inner
process()
methods are no longer omitted. - bpo-16865: Support arrays >=2GiB in
ctypes
. Patch by Segev Finer. - bpo-31238: pydoc: the stop() method of the private ServerThread class now waits until DocServer.serve_until_quit() completes and then explicitly sets its docserver attribute to None to break a reference cycle.
Documentation
- bpo-33503: Fix broken pypi link
- bpo-33421: Add missing documentation for
typing.AsyncContextManager
. - bpo-33378: Add Korean language switcher for https://docs.python.org/3/
- bpo-33276: Clarify that the
__path__
attribute on modules cannot be just any value. - bpo-33201: Modernize documentation for writing C extension types.
- bpo-33195: Deprecate
Py_UNICODE
usage inc-api/arg
document.Py_UNICODE
related APIs are deprecated since Python 3.3, but it is missed in the document. - bpo-33126: Document PyBuffer_ToContiguous().
- bpo-27212: Modify documentation for the
islice()
recipe to consume initial values up to the start index. - bpo-28247: Update
zipapp
documentation to describe how to make standalone applications. - bpo-18802: Documentation changes for ipaddress. Patch by Jon Foster and Berker Peksag.
- bpo-27428: Update documentation to clarify that
WindowsRegistryFinder
implementsMetaPathFinder
. (Patch by Himanshu Lakhara) - bpo-8243: Add a note about curses.addch and curses.addstr exception behavior when writing outside a window, or pad.
- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED flags for ssl.SSLContext.verify_mode.
Tests
Build
- bpo-5755: Move
-Wstrict-prototypes
option toCFLAGS_NODIST
fromOPT
. This option emitted annoying warnings when building extension modules written in C++. - bpo-33614: Ensures module definition files for the stable ABI on Windows are correctly regenerated.
- bpo-33522: Enable CI builds on Visual Studio Team Services at https://python.visualstudio.com/cpython
- bpo-33012: Add
-Wno-cast-function-type
for gcc 8 for silencing warnings about function casts like casting to PyCFunction in method definition lists. - bpo-33394: Enable the verbose build for extension modules, when GNU make is passed macros on the command line.
Windows
- bpo-33184: Update Windows installer to OpenSSL 1.0.2o.
macOS
- bpo-33184: Update macOS installer build to use OpenSSL 1.0.2o.
IDLE
- bpo-33656: On Windows, add API call saying that tk scales for DPI. On Windows 8.1+ or 10, with DPI compatibility properties of the Python binary unchanged, and a monitor resolution greater than 96 DPI, this should make text and lines sharper. It should otherwise have no effect.
- bpo-33768: Clicking on a context line moves that line to the top of the editor window.
- bpo-33763: IDLE: Use read-only text widget for code context instead of label widget.
- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel and scrollbar slider moved text by a fixed number of pixels, resulting in partial lines at the top of the editor box. The change also applies to the shell and grep output windows, but not to read-only text views.
- bpo-33679: Enable theme-specific color configuration for Code Context. Use the Highlights tab to see the setting for built-in themes or add settings to custom themes.
- bpo-33642: Display up to maxlines non-blank lines for Code Context. If there is no current context, show a single blank line.
- bpo-33628: IDLE: Cleanup codecontext.py and its test.
- bpo-33564: IDLE’s code context now recognizes async as a block opener.
- bpo-29706: IDLE now colors async and await as keywords in 3.6. They become full keywords in 3.7.
- bpo-21474: Update word/identifier definition from ascii to unicode. In text and entry boxes, this affects selection by double-click, movement left/right by control-left/right, and deletion left/right by control-BACKSPACE/DEL.
- bpo-33204: IDLE: consistently color invalid string prefixes. A ‘u’ string prefix cannot be paired with either ‘r’ or ‘f’. Consistently color as much of the prefix, starting at the right, as is valid. Revise and extend colorizer test.
- bpo-32831: Add docstrings and tests for codecontext.
Tools/Demos
- bpo-33189: pygettext.py now recognizes only literal strings as docstrings and translatable strings, and rejects bytes literals and f-string expressions.
- bpo-31920: Fixed handling directories as arguments in the
pygettext
script. Based on patch by Oleg Krasnikov. - bpo-29673: Fix pystackv and pystack gdbinit macros.
- bpo-32885: Add an
-n
flag forTools/scripts/pathfix.py
to disbale automatic backup creation (files with~
suffix). - bpo-31583: Fix 2to3 for using with –add-suffix option but without –output-dir option for relative path to files in current directory.
C API
- bpo-32374: Document that m_traverse for multi-phase initialized modules can be called with m_state=NULL, and add a sanity check