1+++++++++++
2Python News
3+++++++++++
4
5What's New in Python 3.8.12 final?
6==================================
7
8*Release date: 2021-08-30*
9
10Security
11--------
12
13- bpo-42278: Replaced usage of :func:`tempfile.mktemp` with
14  :class:`~tempfile.TemporaryDirectory` to avoid a potential race condition.
15
16- bpo-44394: Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to
17  get the fix for the CVE-2013-0340 "Billion Laughs" vulnerability. This
18  copy is most used on Windows and macOS.
19
20- bpo-43124: Made the internal ``putcmd`` function in :mod:`smtplib`
21  sanitize input for presence of ``\r`` and ``\n`` characters to avoid
22  (unlikely) command injection.
23
24- bpo-36384: :mod:`ipaddress` module no longer accepts any leading zeros in
25  IPv4 address strings. Leading zeros are ambiguous and interpreted as octal
26  notation by some libraries. For example the legacy function
27  :func:`socket.inet_aton` treats leading zeros as octal notation. glibc
28  implementation of modern :func:`~socket.inet_pton` does not accept any
29  leading zeros. For a while the :mod:`ipaddress` module used to accept
30  ambiguous leading zeros.
31
32Core and Builtins
33-----------------
34
35- bpo-44872: Use new trashcan macros (Py_TRASHCAN_BEGIN/END) in
36  frameobject.c instead of the old ones (Py_TRASHCAN_SAFE_BEGIN/END).
37
38- bpo-33930: Fix segmentation fault with deep recursion when cleaning method
39  objects. Patch by Augusto Goulart and Pablo Galindo.
40
41- bpo-44856: Fix reference leaks in the error paths of ``update_bases()``
42  and ``__build_class__``. Patch by Pablo Galindo.
43
44Library
45-------
46
47- bpo-45001: Made email date parsing more robust against malformed input,
48  namely a whitespace-only ``Date:`` header. Patch by Wouter Bolsterlee.
49
50Documentation
51-------------
52
53- bpo-30511: Clarify that :func:`shutil.make_archive` is not thread-safe due
54  to reliance on changing the current working directory.
55
56Windows
57-------
58
59- bpo-45007: Update to OpenSSL 1.1.1l in Windows build
60
61macOS
62-----
63
64- bpo-45007: Update macOS installer builds to use OpenSSL 1.1.1l.
65
66- bpo-44689: :meth:`ctypes.util.find_library` now works correctly on macOS
67  11 Big Sur even if Python is built on an older version of macOS.
68  Previously, when built on older macOS systems, ``find_library`` was not
69  able to find  macOS system libraries when running on Big Sur due to
70  changes in  how system libraries are stored.
71
72
73What's New in Python 3.8.11 final?
74==================================
75
76*Release date: 2021-06-28*
77
78Security
79--------
80
81- bpo-44022: mod:`http.client` now avoids infinitely reading potential HTTP
82  headers after a ``100 Continue`` status response from the server.
83
84- bpo-43882: The presence of newline or tab characters in parts of a URL
85  could allow some forms of attacks.
86
87  Following the controlling specification for URLs defined by WHATWG
88  :func:`urllib.parse` now removes ASCII newlines and tabs from URLs,
89  preventing such attacks.
90
91- bpo-42800: Audit hooks are now fired for frame.f_code, traceback.tb_frame,
92  and generator code/frame attribute access.
93
94Core and Builtins
95-----------------
96
97- bpo-44070: No longer eagerly makes import filenames absolute, except for
98  extension modules, which was introduced in 3.8.10.
99
100Library
101-------
102
103- bpo-44061: Fix regression in previous release when calling
104  :func:`pkgutil.iter_modules` with a list of :class:`pathlib.Path` objects
105
106
107What's New in Python 3.8.10 final?
108==================================
109
110*Release date: 2021-05-03*
111
112Security
113--------
114
115- bpo-43434: Creating a :class:`sqlite3.Connection` object now also produces
116  a ``sqlite3.connect`` :ref:`auditing event <auditing>`. Previously this
117  event was only produced by :func:`sqlite3.connect` calls. Patch by Erlend
118  E. Aasland.
119
120- bpo-43472: Ensures interpreter-level audit hooks receive the
121  ``cpython.PyInterpreterState_New`` event when called through the
122  ``_xxsubinterpreters`` module.
123
124- bpo-43075: Fix Regular Expression Denial of Service (ReDoS) vulnerability
125  in :class:`urllib.request.AbstractBasicAuthHandler`.  The ReDoS-vulnerable
126  regex has quadratic worst-case complexity and it allows cause a denial of
127  service when identifying crafted invalid RFCs. This ReDoS issue is on the
128  client side and needs remote attackers to control the HTTP server.
129
130Core and Builtins
131-----------------
132
133- bpo-43105: Importlib now resolves relative paths when creating module spec
134  objects from file locations.
135
136- bpo-42924: Fix ``bytearray`` repetition incorrectly copying data from the
137  start of the buffer, even if the data is offset within the buffer (e.g.
138  after reassigning a slice at the start of the ``bytearray`` to a shorter
139  byte string).
140
141Library
142-------
143
144- bpo-43993: Update bundled pip to 21.1.1.
145
146- bpo-43937: Fixed the :mod:`turtle` module working with non-default root
147  window.
148
149- bpo-43930: Update bundled pip to 21.1 and setuptools to 56.0.0
150
151- bpo-43920: OpenSSL 3.0.0: :meth:`~ssl.SSLContext.load_verify_locations`
152  now returns a consistent error message when cadata contains no valid
153  certificate.
154
155- bpo-43607: :mod:`urllib` can now convert Windows paths with ``\\?\``
156  prefixes into URL paths.
157
158- bpo-43284: platform.win32_ver derives the windows version from
159  sys.getwindowsversion().platform_version which in turn derives the version
160  from kernel32.dll (which can be of a different version than Windows
161  itself). Therefore change the platform.win32_ver to determine the version
162  using the platform module's _syscmd_ver private function to return an
163  accurate version.
164
165- bpo-42248: [Enum] ensure exceptions raised in ``_missing__`` are released
166
167- bpo-43799: OpenSSL 3.0.0: define ``OPENSSL_API_COMPAT`` 1.1.1 to suppress
168  deprecation warnings. Python requires OpenSSL 1.1.1 APIs.
169
170- bpo-43794: Add :data:`ssl.OP_IGNORE_UNEXPECTED_EOF` constants (OpenSSL
171  3.0.0)
172
173- bpo-43789: OpenSSL 3.0.0: Don't call the password callback function a
174  second time when first call has signaled an error condition.
175
176- bpo-43788: The header files for :mod:`ssl` error codes are now OpenSSL
177  version-specific. Exceptions will now show correct reason and library
178  codes. The ``make_ssl_data.py`` script has been rewritten to use OpenSSL's
179  text file with error codes.
180
181- bpo-43655: :mod:`tkinter` dialog windows are now recognized as dialogs by
182  window managers on macOS and X Window.
183
184- bpo-43534: :func:`turtle.textinput` and :func:`turtle.numinput` create now
185  a transient window working on behalf of the canvas window.
186
187- bpo-43522: Fix problem with
188  :attr:`~ssl.SSLContext.hostname_checks_common_name`. OpenSSL does not copy
189  hostflags from *struct SSL_CTX* to *struct SSL*.
190
191- bpo-42967: Allow :class:`bytes` ``separator`` argument in
192  ``urllib.parse.parse_qs`` and ``urllib.parse.parse_qsl`` when parsing
193  :class:`str` query strings. Previously, this raised a ``TypeError``.
194
195- bpo-43176: Fixed processing of a dataclass that inherits from a frozen
196  dataclass with no fields.  It is now correctly detected as an error.
197
198- bpo-34463: Fixed discrepancy between :mod:`traceback` and the interpreter
199  in formatting of SyntaxError with lineno not set (:mod:`traceback` was
200  changed to match interpreter).
201
202- bpo-41735: Fix thread locks in zlib module may go wrong in rare case.
203  Patch by Ma Lin.
204
205- bpo-26053: Fixed bug where the :mod:`pdb` interactive run command echoed
206  the args from the shell command line, even if those have been overridden
207  at the pdb prompt.
208
209- bpo-36470: Fix dataclasses with ``InitVar``\s and
210  :func:`~dataclasses.replace()`. Patch by Claudiu Popa.
211
212- bpo-28577: The hosts method on 32-bit prefix length IPv4Networks and
213  128-bit prefix IPv6Networks now returns a list containing the single
214  Address instead of an empty list.
215
216- bpo-32745: Fix a regression in the handling of ctypes'
217  :data:`ctypes.c_wchar_p` type: embedded null characters would cause a
218  :exc:`ValueError` to be raised. Patch by Zackery Spytz.
219
220Documentation
221-------------
222
223- bpo-43959: The documentation on the PyContextVar C-API was clarified.
224
225- bpo-43938: Update dataclasses documentation to express that
226  FrozenInstanceError is derived from AttributeError.
227
228- bpo-43739: Fixing the example code in Doc/extending/extending.rst to
229  declare and initialize the pmodule variable to be of the right type.
230
231Tests
232-----
233
234- bpo-43842: Fix a race condition in the SMTP test of test_logging. Don't
235  close a file descriptor (socket) from a different thread while
236  asyncore.loop() is polling the file descriptor. Patch by Victor Stinner.
237
238- bpo-43811: Tests multiple OpenSSL versions on GitHub Actions. Use ccache
239  to speed up testing.
240
241- bpo-43791: OpenSSL 3.0.0: Disable testing of legacy protocols TLS 1.0 and
242  1.1. Tests are failing with TLSV1_ALERT_INTERNAL_ERROR.
243
244Windows
245-------
246
247- bpo-35306: Avoid raising errors from :meth:`pathlib.Path.exists()` when
248  passed an invalid filename.
249
250- bpo-38822: Fixed :func:`os.stat` failing on inaccessible directories with
251  a trailing slash, rather than falling back to the parent directory's
252  metadata. This implicitly affected :func:`os.path.exists` and
253  :func:`os.path.isdir`.
254
255- bpo-26227: Fixed decoding of host names in :func:`socket.gethostbyaddr`
256  and :func:`socket.gethostbyname_ex`.
257
258- bpo-43745: Actually updates Windows release to OpenSSL 1.1.1k. Earlier
259  releases were mislabelled and actually included 1.1.1i again.
260
261- bpo-43492: Upgrade Windows installer to use SQLite 3.35.5.
262
263macOS
264-----
265
266- bpo-44009: Provide "python3.x-intel64" executable to allow reliably
267  forcing macOS universal2 framework builds to run under Rosetta 2 Intel-64
268  emulation on Apple Silicon Macs.  This can be useful for testing or when
269  universal2 wheels are not yet available.
270
271- bpo-41100: As of 3.8.10, Python now supports building and running on macOS
272  11 (Big Sur) and on Apple Silicon Macs (based on the ``ARM64``
273  architecture). A new universal build variant, ``universal2``, is also
274  available to natively support both ``ARM64`` and ``Intel 64`` in one set
275  of executables. This backport from Python 3.9 does not include support for
276  "weaklinking"; to support a range of macOS versions, continue to target
277  for and build on the oldest version in the range; for 3.8.x, the
278  ``universal2`` variant is only useful on macOS 11 or later.
279
280- bpo-43492: Update macOS installer to use SQLite 3.35.4.
281
282IDLE
283----
284
285- bpo-43655: IDLE dialog windows are now recognized as dialogs by window
286  managers on macOS and X Window.
287
288C API
289-----
290
291- bpo-43962: _PyInterpreterState_IDIncref() now calls
292  _PyInterpreterState_IDInitref() and always increments id_refcount.
293  Previously, calling _xxsubinterpreters.get_current() could create an
294  id_refcount inconsistency when a _xxsubinterpreters.InterpreterID object
295  was deallocated. Patch by Victor Stinner.
296
297
298What's New in Python 3.8.9 final?
299=================================
300
301*Release date: 2021-04-02*
302
303Security
304--------
305
306- bpo-42988: CVE-2021-3426: Remove the ``getfile`` feature of the
307  :mod:`pydoc` module which could be abused to read arbitrary files on the
308  disk (directory traversal vulnerability). Moreover, even source code of
309  Python modules can contain sensitive data like passwords. Vulnerability
310  reported by David Schwörer.
311
312- bpo-43285: :mod:`ftplib` no longer trusts the IP address value returned
313  from the server in response to the PASV command by default.  This prevents
314  a malicious FTP server from using the response to probe IPv4 address and
315  port combinations on the client network.
316
317  Code that requires the former vulnerable behavior may set a
318  ``trust_server_pasv_ipv4_address`` attribute on their :class:`ftplib.FTP`
319  instances to ``True`` to re-enable it.
320
321- bpo-43439: Add audit hooks for :func:`gc.get_objects`,
322  :func:`gc.get_referrers` and :func:`gc.get_referents`. Patch by Pablo
323  Galindo.
324
325Core and Builtins
326-----------------
327
328- bpo-43660: Fix crash that happens when replacing ``sys.stderr`` with a
329  callable that can remove the object while an exception is being printed.
330  Patch by Pablo Galindo.
331
332- bpo-35883: Python no longer fails at startup with a fatal error if a
333  command line argument contains an invalid Unicode character. The
334  :c:func:`Py_DecodeLocale` function now escapes byte sequences which would
335  be decoded as Unicode characters outside the [U+0000; U+10ffff] range.
336
337- bpo-43406: Fix a possible race condition where ``PyErr_CheckSignals``
338  tries to execute a non-Python signal handler.
339
340Library
341-------
342
343- bpo-35930: Raising an exception raised in a "future" instance will create
344  reference cycles.
345
346- bpo-43577: Fix deadlock when using :class:`ssl.SSLContext` debug callback
347  with :meth:`ssl.SSLContext.sni_callback`.
348
349- bpo-43423: :func:`subprocess.communicate` no longer raises an IndexError
350  when there is an empty stdout or stderr IO buffer during a timeout on
351  Windows.
352
353- bpo-27820: Fixed long-standing bug of smtplib.SMTP where doing AUTH LOGIN
354  with initial_response_ok=False will fail.
355
356  The cause is that SMTP.auth_login _always_ returns a password if provided
357  with a challenge string, thus non-compliant with the standard for AUTH
358  LOGIN.
359
360  Also fixes bug with the test for smtpd.
361
362- bpo-43399: Fix ``ElementTree.extend`` not working on iterators when using
363  the Python implementation
364
365- bpo-43316: The ``python -m gzip`` command line application now properly
366  fails when detecting an unsupported extension. It exits with a non-zero
367  exit code and prints an error message to stderr.
368
369- bpo-43260: Fix TextIOWrapper can not flush internal buffer forever after
370  very large text is written.
371
372- bpo-42782: Fail fast in :func:`shutil.move()` to avoid creating
373  destination directories on failure.
374
375- bpo-37193: Fixed memory leak in ``socketserver.ThreadingMixIn`` introduced
376  in Python 3.7.
377
378Documentation
379-------------
380
381- bpo-43199: Answer "Why is there no goto?" in the Design and History FAQ.
382
383- bpo-43407: Clarified that a result from :func:`time.monotonic`,
384  :func:`time.perf_counter`, :func:`time.process_time`, or
385  :func:`time.thread_time` can be compared with the result from any
386  following call to the same function - not just the next immediate call.
387
388- bpo-27646: Clarify that 'yield from <expr>' works with any iterable, not
389  just iterators.
390
391- bpo-36346: Update some deprecated unicode APIs which are documented as
392  "will be removed in 4.0" to "3.12". See :pep:`623` for detail.
393
394Tests
395-----
396
397- bpo-37945: Fix test_getsetlocale_issue1813() of test_locale: skip the test
398  if ``setlocale()`` fails. Patch by Victor Stinner.
399
400- bpo-41561: Add workaround for Ubuntu's custom OpenSSL security level
401  policy.
402
403Build
404-----
405
406- bpo-43631: Update macOS, Windows, and CI to OpenSSL 1.1.1k.
407
408- bpo-43617: Improve configure.ac: Check for presence of autoconf-archive
409  package and remove our copies of M4 macros.
410
411macOS
412-----
413
414- bpo-41837: Update macOS installer build to use OpenSSL 1.1.1j.
415
416IDLE
417----
418
419- bpo-42225: Document that IDLE can fail on Unix either from misconfigured
420  IP masquerage rules or failure displaying complex colored (non-ascii)
421  characters.
422
423- bpo-43283: Document why printing to IDLE's Shell is often slower than
424  printing to a system terminal and that it can be made faster by
425  pre-formatting a single string before printing.
426
427
428What's New in Python 3.8.8 final?
429=================================
430
431*Release date: 2021-02-19*
432
433There were no new changes in version 3.8.8.
434
435
436
437What's New in Python 3.8.8 release candidate 1?
438===============================================
439
440*Release date: 2021-02-16*
441
442Security
443--------
444
445- bpo-42967: Fix web cache poisoning vulnerability by defaulting the query
446  args separator to ``&``, and allowing the user to choose a custom
447  separator.
448
449- bpo-42938: Avoid static buffers when computing the repr of
450  :class:`ctypes.c_double` and :class:`ctypes.c_longdouble` values.
451
452Core and Builtins
453-----------------
454
455- bpo-42819: :mod:`readline`: Explicitly disable bracketed paste in the
456  interactive interpreter, even if it's set in the inputrc, is enabled by
457  default (eg GNU Readline 8.1), or a user calls
458  ``readline.read_init_file()``. The Python REPL has not implemented
459  bracketed paste support. Also, bracketed mode writes the ``"\x1b[?2004h"``
460  escape sequence into stdout which causes test failures in applications
461  that don't support it. It can still be explicitly enabled by calling
462  ``readline.parse_and_bind("set enable-bracketed-paste on")``. Patch by
463  Dustin Rodrigues.
464
465Library
466-------
467
468- bpo-43108: Fixed a reference leak in the :mod:`curses` module. Patch by
469  Pablo Galindo
470
471- bpo-42780: Fix os.set_inheritable() for O_PATH file descriptors on Linux.
472
473- bpo-41748: Fix HTMLParser parsing rules for element attributes containing
474  commas with spaces. Patch by Karl Dubost.
475
476- bpo-42759: Fixed equality comparison of :class:`tkinter.Variable` and
477  :class:`tkinter.font.Font`. Objects which belong to different Tcl
478  interpreters are now always different, even if they have the same name.
479
480- bpo-23328: Allow / character in username, password fields on _PROXY
481  envars.
482
483- bpo-42681: Fixed range checks for color and pair numbers in :mod:`curses`.
484
485- bpo-42531: :func:`importlib.resources.path` now works for :term:`package`\
486  s missing the optional :attr:`__file__` attribute (more specifically,
487  packages whose :attr:`__spec__`\ ``.``\
488  :attr:`~importlib.machinery.ModuleSpec.origin` :keyword:`is`
489  :data:`None`).
490
491- bpo-42388: Fix subprocess.check_output(..., input=None) behavior when
492  text=True to be consistent with that of the documentation and
493  universal_newlines=True.
494
495- bpo-42384: Make pdb populate sys.path[0] exactly the same as regular
496  python execution.
497
498- bpo-42383: Fix pdb: previously pdb would fail to restart the debugging
499  target if it was specified using a relative path and the current directory
500  changed.
501
502- bpo-42318: Fixed support of non-BMP characters in :mod:`tkinter` on macOS.
503
504- bpo-42005: Fix CLI of :mod:`cProfile` and :mod:`profile` to catch
505  :exc:`BrokenPipeError`.
506
507- bpo-41604: Don't decrement the reference count of the previous user_ptr
508  when set_panel_userptr fails.
509
510- bpo-26407: Unexpected errors in calling the ``__iter__`` method are no
511  longer masked by ``TypeError`` in :func:`csv.reader`,
512  :func:`csv.writer.writerow` and :meth:`csv.writer.writerows`.
513
514- bpo-39068: Fix initialization race condition in :func:`a85encode` and
515  :func:`b85encode` in :mod:`base64`. Patch by Brandon Stansbury.
516
517- bpo-36589: The :func:`curses.update_lines_cols` function now returns
518  ``None`` instead of ``1`` on success.
519
520- bpo-33289: Correct call to :mod:`tkinter.colorchooser` to return RGB
521  triplet of ints instead of floats.  Patch by Cheryl Sabella.
522
523Documentation
524-------------
525
526- bpo-40304: Fix doc for type(name, bases, dict).  Patch by Boris
527  Verkhovskiy and Éric Araujo.
528
529- bpo-42811: Updated importlib.utils.resolve_name() doc to use
530  __spec__.parent instead of __package__. (Thanks Yair Frid.)
531
532Tests
533-----
534
535- bpo-42794: Update test_nntplib to use offical group name of news.aioe.org
536  for testing. Patch by Dong-hee Na.
537
538- bpo-40810: In :mod:`sqlite3`, fix ``CheckTraceCallbackContent`` for SQLite
539  pre 3.7.15.
540
541Build
542-----
543
544- bpo-29076: Add fish shell support to macOS installer.
545
546Windows
547-------
548
549- bpo-41837: Updated Windows installer to include OpenSSL 1.1.1i
550
551- bpo-42584: Upgrade Windows installer to use SQLite 3.34.0.
552
553macOS
554-----
555
556- bpo-41837: Update macOS installer build to use OpenSSL 1.1.1i.
557
558- bpo-42584: Update macOS installer to use SQLite 3.34.0.
559
560IDLE
561----
562
563- bpo-43008: Make IDLE invoke :func:`sys.excepthook` in normal, 2-process
564  mode. Patch by Ken Hilton.
565
566- bpo-33065: Fix problem debugging user classes with __repr__ method.
567
568- bpo-42508: Keep IDLE running on macOS.  Remove obsolete workaround that
569  prevented running files with shortcuts when using new universal2
570  installers built on macOS 11.
571
572- bpo-23544: Disable Debug=>Stack Viewer when user code is running or
573  Debugger is active, to prevent hang or crash.  Patch by Zackery Spytz.
574
575- bpo-32631: Finish zzdummy example extension module: make menu entries
576  work; add docstrings and tests with 100% coverage.
577
578Tools/Demos
579-----------
580
581- bpo-42726: Fixed Python 3 compatibility issue with gdb/libpython.py
582  handling of attribute dictionaries.
583
584C API
585-----
586
587- bpo-43030: Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on
588  platforms with signed ``wchar_t``.
589
590- bpo-40052: Fix an alignment build warning/error in function
591  ``PyVectorcall_Function()``. Patch by Andreas Schneider, Antoine Pitrou
592  and Petr Viktorin.
593
594
595What's New in Python 3.8.7 final?
596=================================
597
598*Release date: 2020-12-21*
599
600Core and Builtins
601-----------------
602
603- bpo-32381: Fix encoding name when running a ``.pyc`` file on Windows:
604  :c:func:`PyRun_SimpleFileExFlags()` now uses the correct encoding to
605  decode the filename.
606
607- bpo-42536: Several built-in and standard library types now ensure that
608  their internal result tuples are always tracked by the :term:`garbage
609  collector <garbage collection>`:
610
611  - :meth:`collections.OrderedDict.items() <collections.OrderedDict>`
612
613  - :meth:`dict.items`
614
615  - :func:`enumerate`
616
617  - :func:`functools.reduce`
618
619  - :func:`itertools.combinations`
620
621  - :func:`itertools.combinations_with_replacement`
622
623  - :func:`itertools.permutations`
624
625  - :func:`itertools.product`
626
627  - :func:`itertools.zip_longest`
628
629  - :func:`zip`
630
631  Previously, they could have become untracked by a prior garbage
632  collection. Patch by Brandt Bucher.
633
634Library
635-------
636
637- bpo-42630: :mod:`tkinter` functions and constructors which need a default
638  root window raise now :exc:`RuntimeError` with descriptive message instead
639  of obscure :exc:`AttributeError` or :exc:`NameError` if it is not created
640  yet or cannot be created automatically.
641
642- bpo-42644: `logging.disable` will now validate the types and value of its
643  parameter. It also now accepts strings representing the levels (as does
644  `loging.setLevel`) instead of only the numerical values.
645
646- bpo-36541: Fixed lib2to3.pgen2 to be able to parse PEP-570 positional only
647  argument syntax.
648
649- bpo-42375: subprocess module update for DragonFlyBSD support.
650
651- bpo-39825: Windows: Change ``sysconfig.get_config_var('EXT_SUFFIX')`` to
652  the expected full ``platform_tag.extension`` format. Previously it was
653  hard-coded to ``.pyd``, now it is compatible with ``distutils.sysconfig``
654  and will result in something like ``.cp38-win_amd64.pyd``. This brings
655  windows into conformance with the other platforms.
656
657- bpo-39101: Fixed tests using IsolatedAsyncioTestCase from hanging on
658  BaseExceptions.
659
660- bpo-41907: fix `format()` behavior for `IntFlag`
661
662- bpo-41889: Enum: fix regression involving inheriting a multiply-inherited
663  enum
664
665- bpo-41891: Ensure asyncio.wait_for waits for task completion
666
667- bpo-40219: Lowered :class:`tkinter.ttk.LabeledScale` dummy widget to
668  prevent hiding part of the content label.
669
670- bpo-40084: Fix ``Enum.__dir__``: dir(Enum.member) now includes attributes
671  as well as methods.
672
673Documentation
674-------------
675
676- bpo-17140: Add documentation for the
677  :class:`multiprocessing.pool.ThreadPool` class.
678
679Build
680-----
681
682- bpo-42604: Now all platforms use a value for the "EXT_SUFFIX" build
683  variable derived from SOABI (for instance in freeBSD, "EXT_SUFFIX" is now
684  ".cpython-310d.so" instead of ".so"). Previosuly only Linux, Mac and
685  VxWorks were using a value for "EXT_SUFFIX" that included "SOABI".
686
687- bpo-42598: Fix implicit function declarations in configure which could
688  have resulted in incorrect configuration checks.  Patch contributed by
689  Joshua Root.
690
691Tools/Demos
692-----------
693
694- bpo-42613: Fix ``freeze.py`` tool to use the prope config and library
695  directories. Patch by Victor Stinner.
696
697
698What's New in Python 3.8.7 release candidate 1?
699===============================================
700
701*Release date: 2020-12-07*
702
703Security
704--------
705
706- bpo-42103: Prevented potential DoS attack via CPU and RAM exhaustion when
707  processing malformed Apple Property List files in binary format.
708
709- bpo-42051: The :mod:`plistlib` module no longer accepts entity
710  declarations in XML plist files to avoid XML vulnerabilities. This should
711  not affect users as entity declarations are not used in regular plist
712  files.
713
714- bpo-40791: Add ``volatile`` to the accumulator variable in
715  ``hmac.compare_digest``, making constant-time-defeating optimizations less
716  likely.
717
718Core and Builtins
719-----------------
720
721- bpo-41686: On Windows, the ``SIGINT`` event, ``_PyOS_SigintEvent()``, is
722  now created even if Python is configured to not install signal handlers
723  (if :c:member:`PyConfig.install_signal_handlers` equals to 0, or
724  ``Py_InitializeEx(0)``).
725
726- bpo-42143: Fix handling of errors during creation of ``PyFunctionObject``,
727  which resulted in operations on uninitialized memory. Patch by Yonatan
728  Goldschmidt.
729
730- bpo-41984: The garbage collector now tracks all user-defined classes.
731  Patch by Brandt Bucher.
732
733- bpo-41909: Fixed stack overflow in :func:`issubclass` and
734  :func:`isinstance` when getting the ``__bases__`` attribute leads to
735  infinite recursion.
736
737- bpo-41894: When loading a native module and a load failure occurs, prevent
738  a possible UnicodeDecodeError when not running in a UTF-8 locale by
739  decoding the load error message using the current locale's encoding.
740
741Library
742-------
743
744- bpo-17735: :func:`inspect.findsource` now raises :exc:`OSError` instead of
745  :exc:`IndexError` when :attr:`co_lineno` of a code object is greater than
746  the file length. This can happen, for example, when a file is edited after
747  it was imported.  PR by Irit Katriel.
748
749- bpo-42116: Fix handling of trailing comments by :func:`inspect.getsource`.
750
751- bpo-42482: :class:`~traceback.TracebackException` no longer holds a
752  reference to the exception's traceback object. Consequently, instances of
753  TracebackException for equivalent but non-equal exceptions now compare as
754  equal.
755
756- bpo-42406: We fixed an issue in `pickle.whichmodule` in which importing
757  `multiprocessing` could change the how pickle identifies which module an
758  object belongs to, potentially breaking the unpickling of those objects.
759
760- bpo-42328: Fixed :meth:`tkinter.ttk.Style.map`. The function accepts now
761  the representation of the default state as empty sequence (as returned by
762  ``Style.map()``). The structure of the result is now the same on all
763  platform and does not depend on the value of ``wantobjects``.
764
765- bpo-42014: The ``onerror`` callback from ``shutil.rmtree`` now receives
766  correct function when ``os.open`` fails.
767
768- bpo-42237: Fix `os.sendfile()` on illumos.
769
770- bpo-42249: Fixed writing binary Plist files larger than 4 GiB.
771
772- bpo-35455: On Solaris, :func:`~time.thread_time` is now implemented with
773  ``gethrvtime()`` because ``clock_gettime(CLOCK_THREAD_CPUTIME_ID)`` is not
774  always available. Patch by Jakub Kulik.
775
776- bpo-41754: webbrowser: Ignore *NotADirectoryError* when calling
777  ``xdg-settings``.
778
779- bpo-29566: ``binhex.binhex()`` consisently writes macOS 9 line endings.
780
781- bpo-42183: Fix a stack overflow error for asyncio Task or Future repr().
782
783  The overflow occurs under some circumstances when a Task or Future
784  recursively returns itself.
785
786- bpo-42103: :exc:`~plistlib.InvalidFileException` and :exc:`RecursionError`
787  are now the only errors caused by loading malformed binary Plist file
788  (previously ValueError and TypeError could be raised in some specific
789  cases).
790
791- bpo-41491: plistlib: fix parsing XML plists with hexadecimal integer
792  values
793
794- bpo-32498: Clearer exception message when passing an argument of type
795  bytes to :func:`urllib.parse.unquote`.  This is only for 3.8; in 3.9 and
796  later this function accepts bytes inputs as well.  PR by Irit Katriel.
797
798- bpo-42065: Fix an incorrectly formatted error from
799  :meth:`_codecs.charmap_decode` when called with a mapped value outside the
800  range of valid Unicode code points. PR by Max Bernstein.
801
802- bpo-41966: Fix pickling pure Python :class:`datetime.time` subclasses.
803  Patch by Dean Inwood.
804
805- bpo-41976: Fixed a bug that was causing :func:`ctypes.util.find_library`
806  to return ``None`` when triying to locate a library in an environment when
807  gcc>=9 is available and ``ldconfig`` is not. Patch by Pablo Galindo
808
809- bpo-41900: C14N 2.0 serialisation in xml.etree.ElementTree failed for
810  unprefixed attributes when a default namespace was defined.
811
812- bpo-41855: In ``importlib.metadata``, fix issue where multiple children
813  can be returned from ``FastPath.zip_children()``. Backport of
814  `python-devs/importlib_metadata#117
815  <https://gitlab.com/python-devs/importlib_metadata/-/issues/117>`_.
816
817- bpo-41840: Fix a bug in the :mod:`symtable` module that was causing
818  module-scope global variables to not be reported as both local and global.
819  Patch by Pablo Galindo.
820
821- bpo-41831: ``str()`` for the ``type`` attribute of the ``tkinter.Event``
822  object always returns now the numeric code returned by Tk instead of the
823  name of the event type.
824
825- bpo-41662: No longer override exceptions raised in ``__len__()`` of a
826  sequence of parameters in :mod:`sqlite3` with
827  :exc:`~sqlite3.ProgrammingError`.
828
829- bpo-41662: Fixed crash when mutate list of parameters during iteration in
830  :mod:`sqlite3`.
831
832- bpo-34215: Clarify the error message for
833  :exc:`asyncio.IncompleteReadError` when ``expected`` is ``None``.
834
835- bpo-41316: Fix the :mod:`tarfile` module to write only basename of TAR
836  file to GZIP compression header.
837
838- bpo-12800: Extracting a symlink from a tarball should succeed and
839  overwrite the symlink if it already exists. The fix is to remove the
840  existing file or symlink before extraction. Based on patch by Chris AtLee,
841  Jeffrey Kintscher, and Senthil Kumaran.
842
843- bpo-16936: Allow ``ctypes.wintypes`` to be imported on non-Windows
844  systems.
845
846- bpo-40592: :func:`shutil.which` now ignores empty entries in
847  :envvar:`PATHEXT` instead of treating them as a match.
848
849- bpo-40492: Fix ``--outfile`` for :mod:`cProfile` / :mod:`profile` not
850  writing the output file in the original directory when the program being
851  profiled changes the working directory.  PR by Anthony Sottile.
852
853- bpo-40105: ZipFile truncates files to avoid corruption when a shorter
854  comment is provided in append ("a") mode. Patch by Jan Mazur.
855
856- bpo-27321: Fixed KeyError exception when flattening an email to a string
857  attempts to replace a non-existent Content-Transfer-Encoding header.
858
859- bpo-32793: Fix a duplicated debug message when
860  :meth:`smtplib.SMTP.connect` is called.
861
862Documentation
863-------------
864
865- bpo-42153: Fix the URL for the IMAP protocol documents.
866
867- bpo-41910: Document the default implementation of `object.__eq__`.
868
869- bpo-41774: In Programming FAQ "Sequences (Tuples/Lists)" section, add "How
870  do you remove multiple items from a list".
871
872- bpo-39416: Document some restrictions on the default string
873  representations of numeric classes.
874
875Tests
876-----
877
878- bpo-41473: Reenable test_gdb on gdb 9.2 and newer:
879  https://bugzilla.redhat.com/show_bug.cgi?id=1866884 bug is fixed in gdb
880  10.1.
881
882- bpo-42553: Fix ``test_asyncio.test_call_later()`` race condition: don't
883  measure asyncio performance in the ``call_later()`` unit test. The test
884  failed randomly on the CI.
885
886- bpo-40754: Include ``_testinternalcapi`` module in Windows installer for
887  test suite
888
889- bpo-41739: Fix test_logging.test_race_between_set_target_and_flush(): the
890  test now waits until all threads complete to avoid leaking running
891  threads.
892
893- bpo-41944: Tests for CJK codecs no longer call ``eval()`` on content
894  received via HTTP.
895
896- bpo-41939: Fix test_site.test_license_exists_at_url(): call
897  ``urllib.request.urlcleanup()`` to reset the global
898  ``urllib.request._opener``. Patch by Victor Stinner.
899
900- bpo-41561: test_ssl: skip test_min_max_version_mismatch when TLS 1.0 is
901  not available
902
903- bpo-41602: Add tests for SIGINT handling in the runpy module.
904
905- bpo-41306: Fixed a failure in ``test_tk.test_widgets.ScaleTest`` happening
906  when executing the test with Tk 8.6.10.
907
908Build
909-----
910
911- bpo-42398: Fix a race condition in "make regen-all" when make -jN option
912  is used to run jobs in parallel. The clinic.py script now only use atomic
913  write to write files. Moveover, generated files are now left unchanged if
914  the content does not change, to not change the file modification time.
915
916Windows
917-------
918
919- bpo-42120: Remove macro definition of ``copysign`` (to ``_copysign``) in
920  headers.
921
922- bpo-38439: Updates the icons for IDLE in the Windows Store package.
923
924- bpo-41557: Update Windows installer to use SQLite 3.33.0.
925
926- bpo-38324: Avoid Unicode errors when accessing certain locale data on
927  Windows.
928
929macOS
930-----
931
932- bpo-38443: The ``--enable-universalsdk`` and ``--with-universal-archs``
933  options for the configure script now check that the specified
934  architectures can be used.
935
936- bpo-41471: Ignore invalid prefix lengths in system proxy excludes.
937
938- bpo-41557: Update macOS installer to use SQLite 3.33.0.
939
940IDLE
941----
942
943- bpo-42426: Fix reporting offset of the RE error in searchengine.
944
945- bpo-42415: Get docstrings for IDLE calltips more often by using
946  inspect.getdoc.
947
948- bpo-33987: Mostly finish using ttk widgets, mainly for editor, settings,
949  and searches. Some patches by Mark Roseman.
950
951- bpo-41775: Use 'IDLE Shell' as shell title
952
953- bpo-40511: Typing opening and closing parentheses inside the parentheses
954  of a function call will no longer cause unnecessary "flashing" off and on
955  of an existing open call-tip, e.g. when typed in a string literal.
956
957- bpo-38439: Add a 256×256 pixel IDLE icon to the Windows .ico file. Created
958  by Andrew Clover. Remove the low-color gif variations from the .ico file.
959
960C API
961-----
962
963- bpo-41986: :c:data:`Py_FileSystemDefaultEncodeErrors` and
964  :c:data:`Py_UTF8Mode` are available again in limited API.
965
966
967What's New in Python 3.8.6 final?
968=================================
969
970*Release date: 2020-09-23*
971
972Core and Builtins
973-----------------
974
975- bpo-41525: The output of ``python --help`` contains now only ASCII
976  characters.
977
978Library
979-------
980
981- bpo-41817: fix `tkinter.EventType` Enum so all members are strings, and
982  none are tuples
983
984- bpo-41815: Fix SQLite3 segfault when backing up closed database. Patch
985  contributed by Peter David McCormick.
986
987- bpo-41517: fix bug allowing Enums to be extended via multiple inheritance
988
989- bpo-39587: use the correct mix-in data type when constructing Enums
990
991- bpo-41789: Honor `object` overrides in `Enum` class creation
992  (specifically, `__str__`, `__repr__`, `__format__`, and `__reduce_ex__`).
993
994- bpo-39651: Fix a race condition in the ``call_soon_threadsafe()`` method
995  of ``asyncio.ProactorEventLoop``: do nothing if the self-pipe socket has
996  been closed.
997
998- bpo-41720: Fixed :meth:`turtle.Vec2D.__rmul__` for arguments which are not
999  int or float.
1000
1001- bpo-39728: fix default `_missing_` so a duplicate `ValueError` is not set
1002  as the `__context__` of the original `ValueError`
1003
1004- bpo-37479: When `Enum.__str__` is overridden in a derived class, the
1005  override will be used by `Enum.__format__` regardless of whether mixin
1006  classes are present.
1007
1008Documentation
1009-------------
1010
1011- bpo-35293: Fix RemovedInSphinx40Warning when building the documentation.
1012  Patch by Dong-hee Na.
1013
1014- bpo-37149: Change Shipman tkinter doc link from archive.org to TkDocs.
1015  (The doc has been removed from the NMT server.)  The new link responds
1016  much faster and includes a short explanatory note.
1017
1018Tests
1019-----
1020
1021- bpo-41731: Make test_cmd_line_script pass with option '-vv'.
1022
1023Windows
1024-------
1025
1026- bpo-41744: Fixes automatic import of props file when using the Nuget
1027  package.
1028
1029IDLE
1030----
1031
1032- bpo-35764: Rewrite the Calltips doc section.
1033
1034- bpo-40181: In calltips, stop reminding that '/' marks the end of
1035  positional-only arguments.
1036
1037
1038What's New in Python 3.8.6 release candidate 1?
1039===============================================
1040
1041*Release date: 2020-09-07*
1042
1043Core and Builtins
1044-----------------
1045
1046- bpo-41654: Fix a crash that occurred when destroying subclasses of
1047  :class:`MemoryError`. Patch by Pablo Galindo.
1048
1049- bpo-41533: Free the stack allocated in ``va_build_stack`` if
1050  ``do_mkstack`` fails and the stack is not a ``small_stack``.
1051
1052- bpo-38156: Handle interrupts that come after EOF correctly in
1053  ``PyOS_StdioReadline``.
1054
1055Library
1056-------
1057
1058- bpo-41696: Fix handling of debug mode in :func:`asyncio.run`. This allows
1059  setting ``PYTHONASYNCIODEBUG`` or ``-X dev`` to enable asyncio debug mode
1060  when using :func:`asyncio.run`.
1061
1062- bpo-39010: Restarting a ``ProactorEventLoop`` on Windows no longer logs
1063  spurious ``ConnectionResetErrors``.
1064
1065- bpo-41609: The pdb whatis command correctly reports instance methods as
1066  'Method' rather than 'Function'.
1067
1068- bpo-32751: When cancelling the task due to a timeout,
1069  :meth:`asyncio.wait_for` will now wait until the cancellation is complete
1070  also in the case when *timeout* is <= 0, like it does with positive
1071  timeouts.
1072
1073- bpo-37658: :meth:`asyncio.wait_for` now properly handles races between
1074  cancellation of itself and the completion of the wrapped awaitable.
1075
1076- bpo-40782: Change the method asyncio.AbstractEventLoop.run_in_executor to
1077  not be a coroutine.
1078
1079- bpo-41520: Fix :mod:`codeop` regression that prevented turning compile
1080  warnings into errors.
1081
1082- bpo-41503: Fixed a race between setTarget and flush in
1083  logging.handlers.MemoryHandler.
1084
1085- bpo-41497: Fix potential UnicodeDecodeError in dis module.
1086
1087- bpo-41490: Update :mod:`ensurepip` to install pip 20.2.1 and setuptools
1088  49.2.1.
1089
1090- bpo-41467: On Windows, fix asyncio ``recv_into()`` return value when the
1091  socket/pipe is closed (:exc:`BrokenPipeError`): return ``0`` rather than
1092  an empty byte string (``b''``).
1093
1094- bpo-41425: Make tkinter doc example runnable.
1095
1096- bpo-41384: Raise TclError instead of TypeError when an unknown option is
1097  passed to tkinter.OptionMenu.
1098
1099- bpo-38731: Fix :exc:`NameError` in command-line interface of
1100  :mod:`py_compile`.
1101
1102- bpo-41364: Reduce import overhead of :mod:`uuid`.
1103
1104- bpo-41344: Prevent creating :class:`shared_memory.SharedMemory` objects
1105  with :code:`size=0`.
1106
1107- bpo-40726: Handle cases where the ``end_lineno`` is ``None`` on
1108  :func:`ast.increment_lineno`.
1109
1110- bpo-31122: ssl.wrap_socket() now raises ssl.SSLEOFError rather than
1111  OSError when peer closes connection during TLS negotiation
1112
1113- bpo-33660: Fix pathlib.PosixPath to resolve a relative path located on the
1114  root directory properly.
1115
1116Documentation
1117-------------
1118
1119- bpo-41624: Fix the signature of :class:`typing.Coroutine`.
1120
1121- bpo-40204: Enable Sphinx 3.2 ``c_allow_pre_v3`` option and disable
1122  ``c_warn_on_allowed_pre_v3`` option to make the documentation compatible
1123  with Sphinx 2 and Sphinx 3.
1124
1125- bpo-41045: Add documentation for debug feature of f-strings.
1126
1127- bpo-41314: Changed the release when ``from __future__ import annotations``
1128  becomes the default from ``4.0`` to ``3.10`` (following a change in PEP
1129  563).
1130
1131- bpo-39883: Make code, examples, and recipes in the Python documentation be
1132  licensed under the more permissive BSD0 license in addition to the
1133  existing Python 2.0 license.
1134
1135Windows
1136-------
1137
1138- bpo-41492: Fixes the description that appears in UAC prompts.
1139
1140- bpo-40741: Update Windows release to include SQLite 3.32.3.
1141
1142IDLE
1143----
1144
1145- bpo-41468: Improve IDLE run crash error message (which users should never
1146  see).
1147
1148- bpo-41373: Save files loaded with no line ending, as when blank, or
1149  different line endings, by setting its line ending to the system default.
1150  Fix regression in 3.8.4 and 3.9.0b4.
1151
1152C API
1153-----
1154
1155- bpo-41524: Fix bug in PyOS_mystrnicmp and PyOS_mystricmp that incremented
1156  pointers beyond the end of a string.
1157
1158
1159What's New in Python 3.8.5 final?
1160=================================
1161
1162*Release date: 2020-07-20*
1163
1164Security
1165--------
1166
1167- bpo-41304: Fixes `python3x._pth` being ignored on Windows, caused by the
1168  fix for :issue:`29778` (CVE-2020-15801).
1169
1170- bpo-39603: Prevent http header injection by rejecting control characters
1171  in http.client.putrequest(...).
1172
1173Core and Builtins
1174-----------------
1175
1176- bpo-41295: Resolve a regression in CPython 3.8.4 where defining
1177  "__setattr__" in a multi-inheritance setup and calling up the hierarchy
1178  chain could fail if builtins/extension types were involved in the base
1179  types.
1180
1181Library
1182-------
1183
1184- bpo-41288: Unpickling invalid NEWOBJ_EX opcode with the C implementation
1185  raises now UnpicklingError instead of crashing.
1186
1187- bpo-39017: Avoid infinite loop when reading specially crafted TAR files
1188  using the tarfile module (CVE-2019-20907).
1189
1190Documentation
1191-------------
1192
1193- bpo-37703: Updated Documentation to comprehensively elaborate on the
1194  behaviour of gather.cancel()
1195
1196Build
1197-----
1198
1199- bpo-41302: Enable building Python 3.8 with libmpdec-2.5.0 to ease
1200  maintenance for Linux distributions. Patch by Felix Yan.
1201
1202macOS
1203-----
1204
1205- bpo-40741: Update macOS installer to use SQLite 3.32.3.
1206
1207IDLE
1208----
1209
1210- bpo-41300: Save files with non-ascii chars. Fix regression released in
1211  3.9.0b4 and 3.8.4.
1212
1213
1214What's New in Python 3.8.4 final?
1215=================================
1216
1217*Release date: 2020-07-13*
1218
1219Security
1220--------
1221
1222- bpo-41162: Audit hooks are now cleared later during finalization to avoid
1223  missing events.
1224
1225- bpo-29778: Ensure :file:`python3.dll` is loaded from correct locations
1226  when Python is embedded (CVE-2020-15523).
1227
1228Core and Builtins
1229-----------------
1230
1231- bpo-41247: Always cache the running loop holder when running
1232  ``asyncio.set_running_loop``.
1233
1234- bpo-41252: Fix incorrect refcounting in _ssl.c's
1235  ``_servername_callback()``.
1236
1237- bpo-41218: Python 3.8.3 had a regression where compiling with
1238  ast.PyCF_ALLOW_TOP_LEVEL_AWAIT would aggressively mark list comprehension
1239  with CO_COROUTINE. Now only list comprehension making use of async/await
1240  will tagged as so.
1241
1242- bpo-41175: Guard against a NULL pointer dereference within bytearrayobject
1243  triggered by the ``bytearray() + bytearray()`` operation.
1244
1245- bpo-39960: The "hackcheck" that prevents sneaking around a type's
1246  __setattr__() by calling the superclass method was rewritten to allow C
1247  implemented heap types.
1248
1249Library
1250-------
1251
1252- bpo-41235: Fix the error handling in
1253  :meth:`ssl.SSLContext.load_dh_params`.
1254
1255- bpo-41193: The ``write_history()`` atexit function of the readline
1256  completer now ignores any :exc:`OSError` to ignore error if the filesystem
1257  is read-only, instead of only ignoring :exc:`FileNotFoundError` and
1258  :exc:`PermissionError`.
1259
1260- bpo-41043: Fixed the use of :func:`~glob.glob` in the stdlib: literal part
1261  of the path is now always correctly escaped.
1262
1263- bpo-39384: Fixed email.contentmanager to allow set_content() to set a null
1264  string.
1265
1266IDLE
1267----
1268
1269- bpo-37765: Add keywords to module name completion list.  Rewrite
1270  Completions section of IDLE doc.
1271
1272- bpo-41152: The encoding of ``stdin``, ``stdout`` and ``stderr`` in IDLE is
1273  now always UTF-8.
1274
1275
1276What's New in Python 3.8.4 release candidate 1?
1277===============================================
1278
1279*Release date: 2020-06-29*
1280
1281Security
1282--------
1283
1284- bpo-41004: The __hash__() methods of  ipaddress.IPv4Interface and
1285  ipaddress.IPv6Interface incorrectly generated constant hash values of 32
1286  and 128 respectively. This resulted in always causing hash collisions. The
1287  fix uses hash() to generate hash values for the tuple of (address, mask
1288  length, network address).
1289
1290- bpo-39073: Disallow CR or LF in email.headerregistry.Address arguments to
1291  guard against header injection attacks.
1292
1293Core and Builtins
1294-----------------
1295
1296- bpo-41094: Fix decoding errors with audit when open files with non-ASCII
1297  names on non-UTF-8 locale.
1298
1299- bpo-41056: Fixes a reference to deallocated stack space during startup
1300  when constructing sys.path involving a relative symlink when code was
1301  supplied via -c.  (discovered via Coverity)
1302
1303- bpo-35975: Stefan Behnel reported that cf_feature_version is used even
1304  when PyCF_ONLY_AST is not set. This is against the intention and against
1305  the documented behavior, so it's been fixed.
1306
1307- bpo-40957: Fix refleak in _Py_fopen_obj() when PySys_Audit() fails
1308
1309- bpo-40870: Raise :exc:`ValueError` when validating custom AST's where the
1310  constants ``True``, ``False`` and ``None`` are used within a
1311  :class:`ast.Name` node.
1312
1313- bpo-40826: Fix GIL usage in :c:func:`PyOS_Readline`: lock the GIL to set
1314  an exception and pass the Python thread state when checking if there is a
1315  pending signal.
1316
1317- bpo-40824: Unexpected errors in calling the ``__iter__`` method are no
1318  longer masked by ``TypeError`` in the :keyword:`in` operator and functions
1319  :func:`~operator.contains`, :func:`~operator.indexOf` and
1320  :func:`~operator.countOf` of the :mod:`operator` module.
1321
1322- bpo-40663: Correctly generate annotations where parentheses are omitted
1323  but required (e.g: ``Type[(str, int, *other))]``.
1324
1325Library
1326-------
1327
1328- bpo-41138: Fixed the :mod:`trace` module CLI for Python source files with
1329  non-UTF-8 encoding.
1330
1331- bpo-31938: Fix default-value signatures of several functions in the
1332  :mod:`select` module - by Anthony Sottile.
1333
1334- bpo-41068: Fixed reading files with non-ASCII names from ZIP archive
1335  directly after writing them.
1336
1337- bpo-41058: :func:`pdb.find_function` now correctly determines the source
1338  file encoding.
1339
1340- bpo-41056: Fix a NULL pointer dereference within the ssl module during a
1341  MemoryError in the keylog callback. (discovered by Coverity)
1342
1343- bpo-41048: :func:`mimetypes.read_mime_types` function reads the rule file
1344  using UTF-8 encoding, not the locale encoding. Patch by Srinivas Reddy
1345  Thatiparthy.
1346
1347- bpo-40448: :mod:`ensurepip` now disables the use of `pip` cache when
1348  installing the bundled versions of `pip` and `setuptools`.  Patch by
1349  Krzysztof Konopko.
1350
1351- bpo-40855: The standard deviation and variance functions in the statistics
1352  module were ignoring their mu and xbar arguments.
1353
1354- bpo-40807: Stop codeop._maybe_compile, used by code.InteractiveInterpreter
1355  (and IDLE). from from emitting each warning three times.
1356
1357- bpo-40834: Fix truncate when sending str object
1358  with_xxsubinterpreters.channel_send.
1359
1360- bpo-38488: Update ensurepip to install pip 20.1.1 and setuptools 47.1.0.
1361
1362- bpo-40767: :mod:`webbrowser` now properly finds the default browser in
1363  pure Wayland systems by checking the WAYLAND_DISPLAY environment variable.
1364  Patch contributed by Jérémy Attali.
1365
1366- bpo-40795: :mod:`ctypes` module: If ctypes fails to convert the result of
1367  a callback or if a ctypes callback function raises an exception,
1368  sys.unraisablehook is now called with an exception set. Previously, the
1369  error was logged into stderr by :c:func:`PyErr_Print`.
1370
1371- bpo-30008: Fix :mod:`ssl` code to be compatible with OpenSSL 1.1.x builds
1372  that use ``no-deprecated`` and ``--api=1.1.0``.
1373
1374- bpo-40614: :func:`ast.parse` will not parse self documenting expressions
1375  in f-strings when passed ``feature_version`` is less than ``(3, 8)``.
1376
1377- bpo-40626: Add h5 file extension as MIME Type application/x-hdf5, as per
1378  HDF Group recommendation for HDF5 formatted data files. Patch contributed
1379  by Mark Schwab.
1380
1381- bpo-25872: :mod:`linecache` could crash with a :exc:`KeyError` when
1382  accessed from multiple threads. Fix by Michael Graczyk.
1383
1384- bpo-40597: If text content lines are longer than policy.max_line_length,
1385  always use a content-encoding to make sure they are wrapped.
1386
1387- bpo-40515: The :mod:`ssl` and :mod:`hashlib` modules now actively check
1388  that OpenSSL is build with thread support. Python 3.7.0 made thread
1389  support mandatory and no longer works safely with a no-thread builds.
1390
1391- bpo-13097: ``ctypes`` now raises an ``ArgumentError`` when a callback is
1392  invoked with more than 1024 arguments.
1393
1394- bpo-40457: The ssl module now support OpenSSL builds without TLS 1.0 and
1395  1.1 methods.
1396
1397- bpo-39830: Add :class:`zipfile.Path` to ``__all__`` in the :mod:`zipfile`
1398  module.
1399
1400- bpo-40025: Raise TypeError when _generate_next_value_ is defined after
1401  members. Patch by Ethan Onstott.
1402
1403- bpo-39244: Fixed :class:`multiprocessing.context.get_all_start_methods` to
1404  properly return the default method first on macOS.
1405
1406- bpo-39040: Fix parsing of invalid mime headers parameters by collapsing
1407  whitespace between encoded words in a bare-quote-string.
1408
1409- bpo-35714: :exc:`struct.error` is now raised if there is a null character
1410  in a :mod:`struct` format string.
1411
1412- bpo-36290: AST nodes are now raising :exc:`TypeError` on conflicting
1413  keyword arguments. Patch contributed by Rémi Lapeyre.
1414
1415- bpo-29620: :func:`~unittest.TestCase.assertWarns` no longer raises a
1416  ``RuntimeException`` when accessing a module's ``__warningregistry__``
1417  causes importation of a new module, or when a new module is imported in
1418  another thread. Patch by Kernc.
1419
1420- bpo-34226: Fix `cgi.parse_multipart` without content_length. Patch by
1421  Roger Duran
1422
1423Tests
1424-----
1425
1426- bpo-41085: Fix integer overflow in the :meth:`array.array.index` method on
1427  64-bit Windows for index larger than ``2**31``.
1428
1429- bpo-38377: On Linux, skip tests using multiprocessing if the current user
1430  cannot create a file in ``/dev/shm/`` directory. Add the
1431  :func:`~test.support.skip_if_broken_multiprocessing_synchronize` function
1432  to the :mod:`test.support` module.
1433
1434- bpo-41009: Fix use of ``support.require_{linux|mac|freebsd}_version()``
1435  decorators as class decorator.
1436
1437- bpo-41003: Fix ``test_copyreg`` when ``numpy`` is installed:
1438  ``test.pickletester`` now saves/restores warnings filters when importing
1439  ``numpy``, to ignore filters installed by ``numpy``.
1440
1441- bpo-40964: Disable remote :mod:`imaplib` tests, host cyrus.andrew.cmu.edu
1442  is blocking incoming connections.
1443
1444- bpo-40055: distutils.tests now saves/restores warnings filters to leave
1445  them unchanged. Importing tests imports docutils which imports
1446  pkg_resources which adds a warnings filter.
1447
1448- bpo-34401: Make test_gdb properly run on HP-UX. Patch by Michael Osipov.
1449
1450Build
1451-----
1452
1453- bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``.
1454
1455- bpo-40653: Move _dirnameW out of HAVE_SYMLINK to fix a potential compiling
1456  issue.
1457
1458Windows
1459-------
1460
1461- bpo-41074: Fixed support of non-ASCII names in functions
1462  :func:`msilib.OpenDatabase` and :func:`msilib.init_database` and non-ASCII
1463  SQL in method :meth:`msilib.Database.OpenView`.
1464
1465- bpo-40164: Updates Windows OpenSSL to 1.1.1g
1466
1467- bpo-39631: Changes the registered MIME type for ``.py`` files on Windows
1468  to ``text/x-python`` instead of ``text/plain``.
1469
1470- bpo-40677: Manually define IO_REPARSE_TAG_APPEXECLINK in case some old
1471  Windows SDK doesn't have it.
1472
1473- bpo-40650: Include winsock2.h in pytime.c for timeval.
1474
1475- bpo-39148: Add IPv6 support to :mod:`asyncio` datagram endpoints in
1476  ProactorEventLoop. Change the raised exception for unknown address
1477  families to ValueError as it's not coming from Windows API.
1478
1479macOS
1480-----
1481
1482- bpo-39580: Avoid opening Finder window if running installer from the
1483  command line. Patch contributed by Rick Heil.
1484
1485- bpo-41100: Fix configure error when building on macOS 11. Note that the
1486  current Python release was released shortly after the first developer
1487  preview of macOS 11 (Big Sur); there are other known issues with building
1488  and running on the developer preview. Big Sur is expected to be fully
1489  supported in a future bugfix release of Python 3.8.x and with 3.9.0.
1490
1491- bpo-41005: fixed an XDG settings issue not allowing macos to open browser
1492  in webbrowser.py
1493
1494- bpo-40741: Update macOS installer to use SQLite 3.32.2.
1495
1496IDLE
1497----
1498
1499- bpo-41144: Make Open Module open a special module such as os.path.
1500
1501- bpo-39885: Make context menu Cut and Copy work again when right-clicking
1502  within a selection.
1503
1504- bpo-40723: Make test_idle pass when run after import.
1505
1506Tools/Demos
1507-----------
1508
1509- bpo-40479: Update multissltest helper to test with latest OpenSSL 1.0.2,
1510  1.1.0, 1.1.1, and 3.0.0-alpha.
1511
1512- bpo-40163: Fix multissltest tool. OpenSSL has changed download URL for old
1513  releases. The multissltest tool now tries to download from current and old
1514  download URLs.
1515
1516
1517What's New in Python 3.8.3 final?
1518=================================
1519
1520*Release date: 2020-05-13*
1521
1522Core and Builtins
1523-----------------
1524
1525- bpo-40527: Fix command line argument parsing: no longer write errors
1526  multiple times into stderr.
1527
1528- bpo-40417: Fix imp module deprecation warning when PyImport_ReloadModule
1529  is called. Patch by Robert Rouhani.
1530
1531- bpo-39562: The constant values of future flags in the :mod:`__future__`
1532  module are updated in order to prevent collision with compiler flags.
1533  Previously ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` was clashing with
1534  ``CO_FUTURE_DIVISION``.
1535
1536Library
1537-------
1538
1539- bpo-40559: Fix possible memory leak in the C implementation of
1540  :class:`asyncio.Task`.
1541
1542- bpo-40355: Improve error reporting in :func:`ast.literal_eval` in the
1543  presence of malformed :class:`ast.Dict` nodes instead of silently ignoring
1544  any non-conforming elements. Patch by Curtis Bucher.
1545
1546- bpo-40459: :func:`platform.win32_ver` now produces correct *ptype* strings
1547  instead of empty strings.
1548
1549- bpo-40398: :func:`typing.get_args` now always returns an empty tuple for
1550  special generic aliases.
1551
1552Documentation
1553-------------
1554
1555- bpo-40561: Provide docstrings for webbrowser open functions.
1556
1557- bpo-39435: Fix an incorrect signature for :func:`pickle.loads` in the docs
1558
1559Windows
1560-------
1561
1562- bpo-40458: Increase reserved stack space to prevent overflow crash on
1563  Windows.
1564
1565C API
1566-----
1567
1568- bpo-40412: Nullify inittab_copy during finalization, preventing future
1569  interpreter initializations in an embedded situation from crashing. Patch
1570  by Gregory Szorc.
1571
1572
1573What's New in Python 3.8.3 release candidate 1?
1574===============================================
1575
1576*Release date: 2020-04-29*
1577
1578Security
1579--------
1580
1581- bpo-40121: Fixes audit events raised on creating a new socket.
1582
1583- bpo-38576: Disallow control characters in hostnames in http.client,
1584  addressing CVE-2019-18348. Such potentially malicious header injection
1585  URLs now cause a InvalidURL to be raised.
1586
1587- bpo-39503: CVE-2020-8492: The
1588  :class:`~urllib.request.AbstractBasicAuthHandler` class of the
1589  :mod:`urllib.request` module uses an inefficient regular expression which
1590  can be exploited by an attacker to cause a denial of service. Fix the
1591  regex to prevent the catastrophic backtracking. Vulnerability reported by
1592  Ben Caller and Matt Schwager.
1593
1594Core and Builtins
1595-----------------
1596
1597- bpo-20526: Fix :c:func:`PyThreadState_Clear()`. ``PyThreadState.frame`` is
1598  a borrowed reference, not a strong reference: ``PyThreadState_Clear()``
1599  must not call ``Py_CLEAR(tstate->frame)``.
1600
1601- bpo-39965: Correctly raise ``SyntaxError`` if *await* is used inside
1602  non-async functions and ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` is set (like in the
1603  asyncio REPL). Patch by Pablo Galindo.
1604
1605- bpo-39562: Allow executing asynchronous comprehensions on the top level
1606  when the ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag is given. Patch by Batuhan
1607  Taskaya.
1608
1609- bpo-38894: Fix a bug that was causing incomplete results when calling
1610  ``pathlib.Path.glob`` in the presence of symlinks that point to files
1611  where the user does not have read access. Patch by Pablo Galindo and Matt
1612  Wozniski.
1613
1614- bpo-39871: Fix a possible :exc:`SystemError` in
1615  ``math.{atan2,copysign,remainder}()`` when the first argument cannot be
1616  converted to a :class:`float`. Patch by Zackery Spytz.
1617
1618- bpo-39776: Fix race condition where threads created by PyGILState_Ensure()
1619  could get a duplicate id.
1620
1621  This affects consumers of tstate->id like the contextvar caching
1622  machinery, which could return invalid cached objects under heavy thread
1623  load (observed in embedded scenarios).
1624
1625- bpo-39778: Fixed a crash due to incorrect handling of weak references in
1626  ``collections.OrderedDict`` classes. Patch by Pablo Galindo.
1627
1628- bpo-39520: Fix unparsing of ext slices with no items (``foo[:,]``). Patch
1629  by Batuhan Taskaya.
1630
1631- bpo-22490: Don't leak environment variable ``__PYVENV_LAUNCHER__`` into
1632  the interpreter session on macOS.
1633
1634Library
1635-------
1636
1637- bpo-40138: Fix the Windows implementation of :func:`os.waitpid` for exit
1638  code larger than ``INT_MAX >> 8``. The exit status is now interpreted as
1639  an unsigned number.
1640
1641- bpo-39942: Set "__main__" as the default module name when "__name__" is
1642  missing in :class:`typing.TypeVar`. Patch by Weipeng Hong.
1643
1644- bpo-40330: In :meth:`ShareableList.__setitem__`, check the size of a new
1645  string item after encoding it to utf-8, not before.
1646
1647- bpo-40287: Fixed ``SpooledTemporaryFile.seek()`` to return the position.
1648
1649- bpo-40260: Ensure :mod:`modulefinder` uses :func:`io.open_code` and
1650  respects coding comments.
1651
1652- bpo-40196: Fix a bug in the :mod:`symtable` module that was causing
1653  incorrectly report global variables as local. Patch by Pablo Galindo.
1654
1655- bpo-40126: Fixed reverting multiple patches in unittest.mock. Patcher's
1656  ``__exit__()`` is now never called if its ``__enter__()`` is failed.
1657  Returning true from ``__exit__()`` silences now the exception.
1658
1659- bpo-40089: Fix threading._after_fork(): if fork was not called by a thread
1660  spawned by threading.Thread, threading._after_fork() now creates a
1661  _MainThread instance for _main_thread, instead of a _DummyThread instance.
1662
1663- bpo-39503: :class:`~urllib.request.AbstractBasicAuthHandler` of
1664  :mod:`urllib.request` now parses all WWW-Authenticate HTTP headers and
1665  accepts multiple challenges per header: use the realm of the first Basic
1666  challenge.
1667
1668- bpo-40014: Fix ``os.getgrouplist()``: if ``getgrouplist()`` function fails
1669  because the group list is too small, retry with a larger group list. On
1670  failure, the glibc implementation of ``getgrouplist()`` sets ``ngroups``
1671  to the total number of groups. For other implementations, double the group
1672  list size.
1673
1674- bpo-40016: In re docstring, clarify the relationship between inline and
1675  argument compile flags.
1676
1677- bpo-39953: Update internal table of OpenSSL error codes in the ``ssl``
1678  module.
1679
1680- bpo-39360: Ensure all workers exit when finalizing a
1681  :class:`multiprocessing.Pool` implicitly via the module finalization
1682  handlers of multiprocessing. This fixes a deadlock situation that can be
1683  experienced when the Pool is not properly finalized via the context
1684  manager or a call to ``multiprocessing.Pool.terminate``. Patch by Batuhan
1685  Taskaya and Pablo Galindo.
1686
1687- bpo-39652: The column name found in ``sqlite3.Cursor.description`` is now
1688  truncated on the first '[' only if the PARSE_COLNAMES option is set.
1689
1690- bpo-39915: Ensure :attr:`unittest.mock.AsyncMock.await_args_list` has call
1691  objects in the order of awaited arguments instead of using
1692  :attr:`unittest.mock.Mock.call_args` which has the last value of the call.
1693  Patch by Karthikeyan Singaravelan.
1694
1695- bpo-38662: The ``ensurepip`` module now invokes ``pip`` via the ``runpy``
1696  module. Hence it is no longer tightly coupled with the internal API of the
1697  bundled ``pip`` version, allowing easier updates to a newer ``pip``
1698  version both internally and for distributors.
1699
1700- bpo-39916: More reliable use of ``os.scandir()`` in ``Path.glob()``. It no
1701  longer emits a ResourceWarning when interrupted.
1702
1703- bpo-39850: :mod:`multiprocessing` now supports abstract socket addresses
1704  (if abstract sockets are supported in the running platform). Patch by
1705  Pablo Galindo.
1706
1707- bpo-39828: Fix :mod:`json.tool` to catch :exc:`BrokenPipeError`. Patch by
1708  Dong-hee Na.
1709
1710- bpo-13487: Avoid a possible *"RuntimeError: dictionary changed size during
1711  iteration"* from :func:`inspect.getmodule` when it tried to loop through
1712  :attr:`sys.modules`.
1713
1714- bpo-39794: Add --without-decimal-contextvar build option.  This enables a
1715  thread-local rather than a coroutine local context.
1716
1717- bpo-39769: The :func:`compileall.compile_dir` function's *ddir* parameter
1718  and the compileall command line flag `-d` no longer write the wrong
1719  pathname to the generated pyc file for submodules beneath the root of the
1720  directory tree being compiled.  This fixes a regression introduced with
1721  Python 3.5.
1722
1723- bpo-39517: Fix runpy.run_path() when using pathlike objects
1724
1725- bpo-39764: Fix AttributeError when calling get_stack on a PyAsyncGenObject
1726  Task
1727
1728- bpo-30566: Fix :exc:`IndexError` when trying to decode an invalid string
1729  with punycode codec.
1730
1731- bpo-39667: Correct performance degradation in ``zipfile.Path`` as found in
1732  zipp 3.0. While retaining compatibility, this change discourages the use
1733  of ``zipfile.Path.open`` due to the signature change in Python 3.9. For
1734  compatibility across Python 3.8 and later versions, consider using
1735  ``zipp.Path`` on Python 3.8.x and earlier.
1736
1737- bpo-39548: Fix handling of header in
1738  :class:`urllib.request.AbstractDigestAuthHandler` when the optional
1739  ``qop`` parameter is not present.
1740
1741- bpo-38971: Open issue in the BPO indicated a desire to make the
1742  implementation of codecs.open() at parity with io.open(), which implements
1743  a try/except to assure file stream gets closed before an exception is
1744  raised.
1745
1746- bpo-38410: Properly handle :func:`sys.audit` failures in
1747  :func:`sys.set_asyncgen_hooks`. Based on patch by Zackery Spytz.
1748
1749- bpo-36541: lib2to3 now recognizes named assignment expressions (the walrus
1750  operator, ``:=``)
1751
1752- bpo-31758: Prevent crashes when using an uninitialized
1753  ``_elementtree.XMLParser`` object. Patch by Oren Milman.
1754
1755Documentation
1756-------------
1757
1758- bpo-27635: The pickle documentation incorrectly claimed that ``__new__``
1759  isn't called by default when unpickling.
1760
1761- bpo-39879: Updated :ref:`datamodel` docs to include :func:`dict` insertion
1762  order preservation. Patch by Furkan Onder and Samy Lahfa.
1763
1764- bpo-39868: Updated the Language Reference for :pep:`572`.
1765
1766- bpo-13790: Change 'string' to 'specification' in format doc.
1767
1768- bpo-17422: The language reference no longer restricts default class
1769  namespaces to dicts only.
1770
1771- bpo-39530: Fix misleading documentation about mixed-type numeric
1772  comparisons.
1773
1774- bpo-39718: Update :mod:`token` documentation to reflect additions in
1775  Python 3.8
1776
1777- bpo-39677: Changed operand name of **MAKE_FUNCTION** from *argc* to
1778  *flags* for module :mod:`dis`
1779
1780- bpo-38387: Document :c:macro:`PyDoc_STRVAR` macro in the C-API reference.
1781
1782Tests
1783-----
1784
1785- bpo-40436: test_gdb and test.pythoninfo now check gdb command exit code.
1786
1787- bpo-40162: Update Travis CI configuration to OpenSSL 1.1.1f.
1788
1789- bpo-40146: Update OpenSSL to 1.1.1f in Azure Pipelines.
1790
1791- bpo-40019: test_gdb now skips tests if it detects that gdb failed to read
1792  debug information because the Python binary is optimized.
1793
1794- bpo-27807: ``test_site.test_startup_imports()`` is now skipped if a path
1795  of :data:`sys.path` contains a ``.pth`` file.
1796
1797- bpo-39793: Use the same domain when testing ``make_msgid``. Patch by
1798  Batuhan Taskaya.
1799
1800- bpo-1812: Fix newline handling in doctest.testfile when loading from a
1801  package whose loader has a get_data method. Patch by Peter Donis.
1802
1803- bpo-37957: test.regrtest now can receive a list of test patterns to ignore
1804  (using the -i/--ignore argument) or a file with a list of patterns to
1805  ignore (using the --ignore-file argument). Patch by Pablo Galindo.
1806
1807- bpo-38502: test.regrtest now uses process groups in the multiprocessing
1808  mode (-jN command line option) if process groups are available: if
1809  :func:`os.setsid` and :func:`os.killpg` functions are available.
1810
1811Build
1812-----
1813
1814- bpo-38360: Support single-argument form of macOS -isysroot flag.
1815
1816- bpo-40204: Pin Sphinx version to 1.8.2 in ``Doc/Makefile``.
1817
1818- bpo-40158: Fix CPython MSBuild Properties in NuGet Package
1819  (build/native/python.props)
1820
1821- bpo-38527: Fix configure check on Solaris for "float word ordering":
1822  sometimes, the correct "grep" command was not being used. Patch by Arnon
1823  Yaari.
1824
1825Windows
1826-------
1827
1828- bpo-40164: Updates Windows to OpenSSL 1.1.1f
1829
1830- bpo-39930: Ensures the required :file:`vcruntime140.dll` is included in
1831  install packages.
1832
1833- bpo-39847: Avoid hang when computer is hibernated whilst waiting for a
1834  mutex (for lock-related objects from :mod:`threading`) around 49-day
1835  uptime.
1836
1837- bpo-38597: :mod:`distutils` will no longer statically link
1838  :file:`vcruntime140.dll` when a redistributable version is unavailable.
1839  All future releases of CPython will include a copy of this DLL to ensure
1840  distributed extensions can continue to load.
1841
1842- bpo-38380: Update Windows builds to use SQLite 3.31.1
1843
1844- bpo-39789: Update Windows release build machines to Visual Studio 2019
1845  (MSVC 14.2).
1846
1847- bpo-34803: Package for nuget.org now includes repository reference and
1848  bundled icon image.
1849
1850macOS
1851-----
1852
1853- bpo-40164: Update macOS installer builds to use OpenSSL 1.1.1g.
1854
1855- bpo-38380: Update macOS builds to use SQLite 3.31.1
1856
1857IDLE
1858----
1859
1860- bpo-27115: For 'Go to Line', use a Query box subclass with IDLE standard
1861  behavior and improved error checking.
1862
1863- bpo-39885: Since clicking to get an IDLE context menu moves the cursor,
1864  any text selection should be and now is cleared.
1865
1866- bpo-39852: Edit "Go to line" now clears any selection, preventing
1867  accidental deletion. It also updates Ln and Col on the status bar.
1868
1869- bpo-39781: Selecting code context lines no longer causes a jump.
1870
1871- bpo-38439: Add a 256×256 pixel IDLE icon to support more modern
1872  environments. Created by Andrew Clover. Delete the unused macOS idle.icns
1873  icon file.
1874
1875- bpo-38689: IDLE will no longer freeze when inspect.signature fails when
1876  fetching a calltip.
1877
1878Tools/Demos
1879-----------
1880
1881- bpo-40179: Fixed translation of ``#elif`` in Argument Clinic.
1882
1883- bpo-36184: Port python-gdb.py to FreeBSD. python-gdb.py now checks for
1884  "take_gil" function name to check if a frame tries to acquire the GIL,
1885  instead of checking for "pthread_cond_timedwait" which is specific to
1886  Linux and can be a different condition than the GIL.
1887
1888- bpo-39889: Fixed ``unparse.py`` for extended slices containing a single
1889  element (e.g. ``a[i:j,]``). Remove redundant tuples when index with a
1890  tuple (e.g. ``a[i, j]``).
1891
1892C API
1893-----
1894
1895- bpo-35370: If :c:func:`PySys_Audit` fails in :c:func:`PyEval_SetProfile`
1896  or :c:func:`PyEval_SetTrace`, log the error as an unraisable exception.
1897
1898- bpo-39884: :c:func:`PyDescr_NewMethod` and :c:func:`PyCFunction_NewEx` now
1899  include the method name in the SystemError "bad call flags" error message
1900  to ease debug.
1901
1902- bpo-38643: :c:func:`PyNumber_ToBase` now raises a :exc:`SystemError`
1903  instead of crashing when called with invalid base.
1904
1905- bpo-38913: Fixed segfault in ``Py_BuildValue()`` called with a format
1906  containing "#" and undefined PY_SSIZE_T_CLEAN whwn an exception is set.
1907
1908
1909What's New in Python 3.8.2 final?
1910=================================
1911
1912*Release date: 2020-02-24*
1913
1914Core and Builtins
1915-----------------
1916
1917- bpo-39382: Fix a use-after-free in the single inheritance path of
1918  ``issubclass()``, when the ``__bases__`` of an object has a single
1919  reference, and so does its first item. Patch by Yonatan Goldschmidt.
1920
1921- bpo-39427: Document all possibilities for the ``-X`` options in the
1922  command line help section. Patch by Pablo Galindo.
1923
1924Library
1925-------
1926
1927- bpo-39649: Remove obsolete check for `__args__` in
1928  bdb.Bdb.format_stack_entry.
1929
1930- bpo-39681: Fix a regression where the C pickle module wouldn't allow
1931  unpickling from a file-like object that doesn't expose a readinto()
1932  method.
1933
1934- bpo-39546: Fix a regression in :class:`~argparse.ArgumentParser` where
1935  ``allow_abbrev=False`` was ignored for long options that used a prefix
1936  character other than "-".
1937
1938- bpo-39432: Implement PEP-489 algorithm for non-ascii "PyInit\_..." symbol
1939  names in distutils to make it export the correct init symbol also on
1940  Windows.
1941
1942Documentation
1943-------------
1944
1945- bpo-17422: The language reference now specifies restrictions on class
1946  namespaces. Adapted from a patch by Ethan Furman.
1947
1948- bpo-39572: Updated documentation of ``total`` flag of TypeDict.
1949
1950- bpo-39654: In pyclbr doc, update 'class' to 'module' where appropriate and
1951  add readmodule comment. Patch by Hakan Çelik.
1952
1953IDLE
1954----
1955
1956- bpo-39663: Add tests for pyparse find_good_parse_start().
1957
1958
1959What's New in Python 3.8.2 release candidate 2?
1960===============================================
1961
1962*Release date: 2020-02-17*
1963
1964Security
1965--------
1966
1967- bpo-39184: Add audit events to functions in `fcntl`, `msvcrt`, `os`,
1968  `resource`, `shutil`, `signal` and `syslog`.
1969
1970Core and Builtins
1971-----------------
1972
1973- bpo-39619: Enable use of :func:`os.chroot` on HP-UX systems.
1974
1975- bpo-39606: Fix regression caused by fix for bpo-39386, that prevented
1976  calling ``aclose`` on an async generator that had already been closed or
1977  exhausted.
1978
1979- bpo-39453: Fixed a possible crash in :meth:`list.__contains__` when a list
1980  is changed during comparing items. Patch by Dong-hee Na.
1981
1982- bpo-39219: Syntax errors raised in the tokenizer now always set correct
1983  "text" and "offset" attributes.
1984
1985Library
1986-------
1987
1988- bpo-27657: The original fix for bpo-27657, "Fix urlparse() with numeric
1989  paths" (GH-16839) included in 3.8.1, inadvertently introduced a behavior
1990  change that broke several third-party packages relying on the original
1991  undefined parsing behavior. The change is reverted in 3.8.2, restoring the
1992  behavior of 3.8.0 and earlier releases.
1993
1994- bpo-39474: Fixed starting position of AST for expressions like ``(a)(b)``,
1995  ``(a)[b]`` and ``(a).b``.
1996
1997- bpo-21016: The :mod:`pydoc` and :mod:`trace` modules now use the
1998  :mod:`sysconfig` module to get the path to the Python standard library, to
1999  support uncommon installation path like ``/usr/lib64/python3.9/`` on
2000  Fedora. Patch by Jan Matějek.
2001
2002- bpo-39595: Improved performance of zipfile.Path for files with a large
2003  number of entries. Also improved performance and fixed minor issue as
2004  published with `importlib_metadata 1.5
2005  <https://importlib-metadata.readthedocs.io/en/latest/changelog%20(links).html#v1-5-0>`_.
2006
2007IDLE
2008----
2009
2010- bpo-39600: In the font configuration window, remove duplicated font names.
2011
2012
2013What's New in Python 3.8.2 release candidate 1?
2014===============================================
2015
2016*Release date: 2020-02-10*
2017
2018Security
2019--------
2020
2021- bpo-39401: Avoid unsafe load of ``api-ms-win-core-path-l1-1-0.dll`` at
2022  startup on Windows 7.
2023
2024- bpo-39184: Add audit events to command execution functions in os and pty
2025  modules.
2026
2027Core and Builtins
2028-----------------
2029
2030- bpo-39579: Change the ending column offset of `Attribute` nodes
2031  constructed in `ast_for_dotted_name` to point at the end of the current
2032  node and not at the end of the last `NAME` node.
2033
2034- bpo-39510: Fix segfault in ``readinto()`` method on closed BufferedReader.
2035
2036- bpo-39492: Fix a reference cycle in the C Pickler that was preventing the
2037  garbage collection of deleted, pickled objects.
2038
2039- bpo-39421: Fix possible crashes when operating with the functions in the
2040  :mod:`heapq` module and custom comparison operators.
2041
2042- bpo-39386: Prevent double awaiting of async iterator.
2043
2044- bpo-39235: Fix AST end location for lone generator expression in function
2045  call, e.g. f(i for i in a).
2046
2047- bpo-39209: Correctly handle multi-line tokens in interactive mode. Patch
2048  by Pablo Galindo.
2049
2050- bpo-39216: Fix constant folding optimization for positional only arguments
2051  - by Anthony Sottile.
2052
2053- bpo-39215: Fix ``SystemError`` when nested function has annotation on
2054  positional-only argument - by Anthony Sottile.
2055
2056- bpo-38588: Fix possible crashes in dict and list when calling
2057  :c:func:`PyObject_RichCompareBool`.
2058
2059- bpo-38610: Fix possible crashes in several list methods by holding strong
2060  references to list elements when calling
2061  :c:func:`PyObject_RichCompareBool`.
2062
2063Library
2064-------
2065
2066- bpo-39590: Collections.deque now holds strong references during
2067  deque.__contains__ and deque.count, fixing crashes.
2068
2069- bpo-38149: :func:`sys.audit` is now called only once per call of
2070  :func:`glob.glob` and :func:`glob.iglob`.
2071
2072- bpo-39450: Striped whitespace from docstring before returning it from
2073  :func:`unittest.case.shortDescription`.
2074
2075- bpo-39493: Mark ``typing.IO.closed`` as a property
2076
2077- bpo-39485: Fix a bug in :func:`unittest.mock.create_autospec` that would
2078  complain about the wrong number of arguments for custom descriptors
2079  defined in an extension module returning functions.
2080
2081- bpo-39082: Allow AsyncMock to correctly patch static/class methods
2082
2083- bpo-39430: Fixed race condition in lazy imports in :mod:`tarfile`.
2084
2085- bpo-39390: Fixed a regression with the `ignore` callback of
2086  :func:`shutil.copytree`. The argument types are now str and List[str]
2087  again.
2088
2089- bpo-39389: Write accurate compression level metadata in :mod:`gzip`
2090  archives, rather than always signaling maximum compression.
2091
2092- bpo-39274: ``bool(fraction.Fraction)`` now returns a boolean even if
2093  (numerator != 0) does not return a boolean (ex: numpy number).
2094
2095- bpo-39297: Improved performance of importlib.metadata distribution
2096  discovery and resilients to inaccessible sys.path entries
2097  (importlib_metadata v1.4.0).
2098
2099- bpo-39242: Updated the Gmane domain from news.gmane.org to news.gmane.io
2100  which is used for examples of :class:`~nntplib.NNTP` news reader server
2101  and nntplib tests.
2102
2103- bpo-38907: In http.server script, restore binding to IPv4 on Windows.
2104
2105- bpo-39152: Fix ttk.Scale.configure([name]) to return configuration tuple
2106  for name or all options.  Giovanni Lombardo contributed part of the patch.
2107
2108- bpo-39198: If an exception were to be thrown in `Logger.isEnabledFor`
2109  (say, by asyncio timeouts or stopit) , the `logging` global lock may not
2110  be released appropriately, resulting in deadlock.  This change wraps that
2111  block of code with `try...finally` to ensure the lock is released.
2112
2113- bpo-39191: Perform a check for running loop before starting a new task in
2114  ``loop.run_until_complete()`` to fail fast; it prevents the side effect of
2115  new task spawning before exception raising.
2116
2117- bpo-38871: Correctly parenthesize filter-based statements that contain
2118  lambda expressions in mod:`lib2to3`. Patch by Dong-hee Na.
2119
2120- bpo-39142: A change was made to logging.config.dictConfig to avoid
2121  converting instances of named tuples to ConvertingTuple. It's assumed that
2122  named tuples are too specialised to be treated like ordinary tuples; if a
2123  user of named tuples requires ConvertingTuple functionality, they will
2124  have to implement that themselves in their named tuple class.
2125
2126- bpo-39129: Fix import path for ``asyncio.TimeoutError``
2127
2128- bpo-39057: :func:`urllib.request.proxy_bypass_environment` now ignores
2129  leading dots and no longer ignores a trailing newline.
2130
2131- bpo-39056: Fixed handling invalid warning category in the -W option.  No
2132  longer import the re module if it is not needed.
2133
2134- bpo-39055: :func:`base64.b64decode` with ``validate=True`` raises now a
2135  binascii.Error if the input ends with a single ``\n``.
2136
2137- bpo-39033: Fix :exc:`NameError` in :mod:`zipimport`. Patch by Karthikeyan
2138  Singaravelan.
2139
2140- bpo-38878: Fixed __subclasshook__ of :class:`os.PathLike` to return a
2141  correct result upon inheritence. Patch by Bar Harel.
2142
2143- bpo-35182: Fixed :func:`Popen.communicate` subsequent call crash when the
2144  child process has already closed any piped standard stream, but still
2145  continues to be running. Patch by Andriy Maletsky.
2146
2147- bpo-38473: Use signature from inner mock for autospecced methods attached
2148  with :func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan.
2149
2150- bpo-38293: Add :func:`copy.copy` and :func:`copy.deepcopy` support to
2151  :func:`property` objects.
2152
2153Documentation
2154-------------
2155
2156- bpo-39153: Clarify refcounting semantics for the following functions: -
2157  PyObject_SetItem - PyMapping_SetItemString - PyDict_SetItem -
2158  PyDict_SetItemString
2159
2160- bpo-39392: Explain that when filling with turtle, overlap regions may be
2161  left unfilled.
2162
2163- bpo-39381: Mention in docs that :func:`asyncio.get_event_loop` implicitly
2164  creates new event loop only if called from the main thread.
2165
2166- bpo-38918: Add an entry for ``__module__`` in the "function" & "method"
2167  sections of the `inspect docs types and members table
2168  <https://docs.python.org/3/library/inspect.html#types-and-members>`_
2169
2170- bpo-3530: In the :mod:`ast` module documentation, fix a misleading
2171  ``NodeTransformer`` example and add advice on when to use the
2172  ``fix_missing_locations`` function.
2173
2174Tests
2175-----
2176
2177- bpo-39502: Skip test_zipfile.test_add_file_after_2107() if
2178  :func:`time.localtime` fails with :exc:`OverflowError`. It is the case on
2179  AIX 6.1 for example.
2180
2181- bpo-38546: Fix test_ressources_gced_in_workers() of
2182  test_concurrent_futures: explicitly stop the manager to prevent leaking a
2183  child process running in the background after the test completes.
2184
2185Build
2186-----
2187
2188- bpo-39144: The ctags and etags build targets both include Modules/_ctypes
2189  and Python standard library source files.
2190
2191Windows
2192-------
2193
2194- bpo-39439: Honor the Python path when a virtualenv is active on Windows.
2195
2196- bpo-39393: Improve the error message when attempting to load a DLL with
2197  unresolved dependencies.
2198
2199- bpo-38883: :meth:`~pathlib.Path.home()` and
2200  :meth:`~pathlib.Path.expanduser()` on Windows now prefer
2201  :envvar:`USERPROFILE` and no longer use :envvar:`HOME`, which is not
2202  normally set for regular user accounts. This makes them again behave like
2203  :func:`os.path.expanduser`, which was changed to ignore :envvar:`HOME` in
2204  3.8, see :issue:`36264`.
2205
2206- bpo-39185: The build.bat script has additional options for very-quiet
2207  output (-q) and very-verbose output (-vv)
2208
2209IDLE
2210----
2211
2212- bpo-30780: Add remaining configdialog tests for buttons and highlights and
2213  keys tabs.
2214
2215- bpo-39388: IDLE Settings Cancel button now cancels pending changes
2216
2217- bpo-39050: Make IDLE Settings dialog Help button work again.
2218
2219- bpo-34118: Tag memoryview, range, and tuple as classes, the same as list,
2220  etcetera, in the library manual built-in functions list.
2221
2222- bpo-38792: Close an IDLE shell calltip if a :exc:`KeyboardInterrupt` or
2223  shell restart occurs.  Patch by Zackery Spytz.
2224
2225- bpo-32989: Add tests for editor newline_and_indent_event method. Remove
2226  dead code from pyparse find_good_parse_start method.
2227
2228
2229What's New in Python 3.8.1 final?
2230=================================
2231
2232*Release date: 2019-12-18*
2233
2234Core and Builtins
2235-----------------
2236
2237- bpo-39080: Fix the value of *end_col_offset* for Starred Expression AST
2238  nodes when they are among the elements in the *args* attribute of Call AST
2239  nodes.
2240
2241- bpo-39031: When parsing an "elif" node, lineno and col_offset of the node
2242  now point to the "elif" keyword and not to its condition, making it
2243  consistent with the "if" node. Patch by Lysandros Nikolaou.
2244
2245- bpo-39008: :c:func:`PySys_Audit` now requires ``Py_ssize_t`` to be used
2246  for size arguments in the format string, regardless of whether
2247  ``PY_SSIZE_T_CLEAN`` was defined at include time.
2248
2249Library
2250-------
2251
2252- bpo-39022: Update importlib.metadata to include improvements from
2253  importlib_metadata 1.3 including better serialization of EntryPoints and
2254  improved documentation for custom finders.
2255
2256- bpo-38811: Fix an unhandled exception in :mod:`pathlib` when
2257  :meth:`os.link` is missing. Patch by Toke Høiland-Jørgensen.
2258
2259- bpo-36406: Handle namespace packages in :mod:`doctest`. Patch by
2260  Karthikeyan Singaravelan.
2261
2262Tests
2263-----
2264
2265- bpo-38546: Multiprocessing and concurrent.futures tests now stop the
2266  resource tracker process when tests complete.
2267
2268Windows
2269-------
2270
2271- bpo-39007: Add auditing events to functions in :mod:`winreg`.
2272
2273macOS
2274-----
2275
2276- bpo-38295: Prevent failure of test_relative_path in test_py_compile on
2277  macOS Catalina.
2278
2279IDLE
2280----
2281
2282- bpo-38944: Escape key now closes IDLE completion windows.  Patch by Johnny
2283  Najera.
2284
2285- bpo-38943: Fix IDLE autocomplete windows not always appearing on some
2286  systems. Patch by Johnny Najera.
2287
2288
2289What's New in Python 3.8.1 release candidate 1?
2290===============================================
2291
2292*Release date: 2019-12-09*
2293
2294Security
2295--------
2296
2297- bpo-38945: Newline characters have been escaped when performing uu
2298  encoding to prevent them from overflowing into to content section of the
2299  encoded file. This prevents malicious or accidental modification of data
2300  during the decoding process.
2301
2302- bpo-37228: Due to significant security concerns, the *reuse_address*
2303  parameter of :meth:`asyncio.loop.create_datagram_endpoint` is no longer
2304  supported. This is because of the behavior of ``SO_REUSEADDR`` in UDP. For
2305  more details, see the documentation for
2306  ``loop.create_datagram_endpoint()``. (Contributed by Kyle Stanley, Antoine
2307  Pitrou, and Yury Selivanov in :issue:`37228`.)
2308
2309- bpo-38722: :mod:`runpy` now uses :meth:`io.open_code` to open code files.
2310  Patch by Jason Killen.
2311
2312- bpo-38804: Fixes a ReDoS vulnerability in :mod:`http.cookiejar`. Patch by
2313  Ben Caller.
2314
2315- bpo-38622: Add additional audit events for the :mod:`ctypes` module.
2316
2317- bpo-38418: Fixes audit event for :func:`os.system` to be named
2318  ``os.system``.
2319
2320Core and Builtins
2321-----------------
2322
2323- bpo-38673: In REPL mode, don't switch to PS2 if the line starts with
2324  comment or whitespace. Based on work by Batuhan Taşkaya.
2325
2326- bpo-38922: Calling ``replace`` on a code object now raises the
2327  ``code.__new__`` audit event.
2328
2329- bpo-38920: Add audit hooks for when :func:`sys.excepthook` and
2330  :func:`sys.unraisablehook` are invoked
2331
2332- bpo-38892: Improve documentation for audit events table and functions.
2333
2334- bpo-38707: ``MainThread.native_id`` is now correctly reset in child
2335  processes spawned using :class:`multiprocessing.Process`, instead of
2336  retaining the parent's value.
2337
2338- bpo-38640: Fixed a bug in the compiler that was causing to raise in the
2339  presence of break statements and continue statements inside always false
2340  while loops. Patch by Pablo Galindo.
2341
2342- bpo-38535: Fixed line numbers and column offsets for AST nodes for calls
2343  without arguments in decorators.
2344
2345- bpo-38525: Fix a segmentation fault when using reverse iterators of empty
2346  ``dict`` objects. Patch by Dong-hee Na and Inada Naoki.
2347
2348- bpo-35409: Ignore GeneratorExit exceptions when throwing an exception into
2349  the aclose coroutine of an asynchronous generator.
2350
2351Library
2352-------
2353
2354- bpo-39006: Fix asyncio when the ssl module is missing: only check for
2355  ssl.SSLSocket instance if the ssl module is available.
2356
2357- bpo-38708: Fix a potential IndexError in email parser when parsing an
2358  empty msg-id.
2359
2360- bpo-38698: Add a new ``InvalidMessageID`` token to email parser to
2361  represent invalid Message-ID headers.  Also, add defects when there is
2362  remaining value after parsing the header.
2363
2364- bpo-38979: Return class from ``ContextVar.__class_getitem__`` to simplify
2365  subclassing.
2366
2367- bpo-38986: Make repr of C accelerated TaskWakeupMethWrapper the same as of
2368  pure Python version.
2369
2370- bpo-38529: Drop too noisy asyncio warning about deletion of a stream
2371  without explicit ``.close()`` call.
2372
2373- bpo-38634: The :mod:`readline` module now detects if Python is linked to
2374  libedit at runtime on all platforms.  Previously, the check was only done
2375  on macOS.
2376
2377- bpo-33684: Fix ``json.tool`` failed to read a JSON file with non-ASCII
2378  characters when locale encoding is not UTF-8.
2379
2380- bpo-38698: Prevent UnboundLocalError to pop up in parse_message_id
2381
2382  parse_message_id() was improperly using a token defined inside an
2383  exception handler, which was raising `UnboundLocalError` on parsing an
2384  invalid value. Patch by Claudiu Popa.
2385
2386- bpo-26730: Fix ``SpooledTemporaryFile.rollover()`` might corrupt the file
2387  when it is in text mode. Patch by Serhiy Storchaka.
2388
2389- bpo-38668: Calling func:`shutil.copytree` to copy a directory tree from
2390  one directory to another subdirectory resulted in an endless loop and a
2391  RecursionError. A fix was added to consume an iterator and create the list
2392  of the entries to be copied, avoiding the recursion for newly created
2393  directories. Patch by Bruno P. Kinoshita.
2394
2395- bpo-37838: :meth:`typing.get_type_hints` properly handles functions
2396  decorated with :meth:`functools.wraps`.
2397
2398- bpo-38859: AsyncMock now returns StopAsyncIteration on the exaustion of a
2399  side_effects iterable. Since PEP-479 its Impossible to raise a
2400  StopIteration exception from a coroutine.
2401
2402- bpo-38857: AsyncMock fix for return values that are awaitable types.  This
2403  also covers side_effect iterable values that happend to be awaitable, and
2404  wraps callables that return an awaitable type. Before these awaitables
2405  were being awaited instead of being returned as is.
2406
2407- bpo-38821: Fix unhandled exceptions in :mod:`argparse` when
2408  internationalizing error messages for arguments with ``nargs`` set to
2409  special (non-integer) values. Patch by Federico Bond.
2410
2411- bpo-38820: Make Python compatible with OpenSSL 3.0.0.
2412  :func:`ssl.SSLSocket.getpeercert` no longer returns IPv6 addresses with a
2413  trailing new line.
2414
2415- bpo-38807: Update :exc:`TypeError` messages for :meth:`os.path.join` to
2416  include :class:`os.PathLike` objects as acceptable input types.
2417
2418- bpo-38785: Prevent asyncio from crashing if parent ``__init__`` is not
2419  called from a constructor of object derived from ``asyncio.Future``.
2420
2421- bpo-38723: :mod:`pdb` now uses :meth:`io.open_code` to trigger auditing
2422  events.
2423
2424- bpo-27805: Allow opening pipes and other non-seekable files in append mode
2425  with :func:`open`.
2426
2427- bpo-38686: Added support for multiple ``qop`` values in
2428  :class:`urllib.request.AbstractDigestAuthHandler`.
2429
2430- bpo-38334: Fixed seeking backward on an encrypted
2431  :class:`zipfile.ZipExtFile`.
2432
2433- bpo-34679: asynci.ProactorEventLoop.close() now only calls
2434  signal.set_wakeup_fd() in the main thread.
2435
2436- bpo-31202: The case the result of :func:`pathlib.WindowsPath.glob` matches
2437  now the case of the pattern for literal parts.
2438
2439- bpo-38521: Fixed erroneous equality comparison in statistics.NormalDist().
2440
2441- bpo-38478: Fixed a bug in :meth:`inspect.signature.bind` that was causing
2442  it to fail when handling a keyword argument with same name as
2443  positional-only parameter. Patch by Pablo Galindo.
2444
2445- bpo-33604: Fixed `hmac.new` and `hmac.HMAC` to raise TypeError instead of
2446  ValueError when the digestmod parameter, now required in 3.8, is omitted.
2447  Also clarified the hmac module documentation and docstrings.
2448
2449- bpo-38422: Clarify docstrings of pathlib suffix(es)
2450
2451- bpo-36993: Improve error reporting for corrupt zip files with bad zip64
2452  extra data. Patch by Daniel Hillier.
2453
2454- bpo-36820: Break cycle generated when saving an exception in socket.py,
2455  codeop.py and dyld.py as they keep alive not only the exception but user
2456  objects through the ``__traceback__`` attribute. Patch by Mario Corchero.
2457
2458- bpo-34776: Fix dataclasses to support forward references in type
2459  annotations
2460
2461- bpo-33348: lib2to3 now recognizes expressions after ``*`` and `**` like in
2462  ``f(*[] or [])``.
2463
2464- bpo-27657: Fix urllib.parse.urlparse() with numeric paths. A string like
2465  "path:80" is no longer parsed as a path but as a scheme ("path") and a
2466  path ("80").
2467
2468Documentation
2469-------------
2470
2471- bpo-38816: Provides more details about the interaction between
2472  :c:func:`fork` and CPython's runtime, focusing just on the C-API.  This
2473  includes cautions about where :c:func:`fork` should and shouldn't be
2474  called.
2475
2476- bpo-38351: Modernize :mod:`email` examples from %-formatting to f-strings.
2477
2478- bpo-38778: Document the fact that :exc:`RuntimeError` is raised if
2479  :meth:`os.fork` is called in a subinterpreter.
2480
2481- bpo-38592: Add Brazilian Portuguese to the language switcher at Python
2482  Documentation website.
2483
2484Tests
2485-----
2486
2487- bpo-38547: Fix test_pty: if the process is the session leader, closing the
2488  master file descriptor raises a SIGHUP signal: simply ignore SIGHUP when
2489  running the tests.
2490
2491- bpo-38992: Fix a test for :func:`math.fsum` that was failing due to
2492  constant folding.
2493
2494- bpo-38965: Fix test_faulthandler on GCC 10. Use the "volatile" keyword in
2495  ``faulthandler._stack_overflow()`` to prevent tail call optimization on
2496  any compiler, rather than relying on compiler specific pragma.
2497
2498- bpo-38875: test_capi: trashcan tests now require the test "cpu" resource.
2499
2500- bpo-38841: Skip asyncio test_create_datagram_endpoint_existing_sock_unix
2501  on platforms lacking a functional bind() for named unix domain sockets.
2502
2503- bpo-38669: Raise :exc:`TypeError` when passing target as a string with
2504  :meth:`unittest.mock.patch.object`.
2505
2506- bpo-35998: Fix a race condition in test_asyncio.test_start_tls_server_1().
2507  Previously, there was a race condition between the test main() function
2508  which replaces the protocol and the test ServerProto protocol which sends
2509  ANSWER once it gets HELLO. Now, only the test main() function is
2510  responsible to send data, ServerProto no longer sends data.
2511
2512Build
2513-----
2514
2515- bpo-37404: :mod:`asyncio` now raises :exc:`TyperError` when calling
2516  incompatible methods with an :class:`ssl.SSLSocket` socket.  Patch by Ido
2517  Michael.
2518
2519- bpo-38809: On Windows, build scripts will now recognize and use python.exe
2520  from an active virtual env.
2521
2522- bpo-38684: Fix _hashlib build when Blake2 is disabled, but OpenSSL
2523  supports it.
2524
2525- bpo-37415: Fix stdatomic.h header check for ICC compiler: the ICC
2526  implementation lacks atomic_uintptr_t type which is needed by Python.
2527
2528Windows
2529-------
2530
2531- bpo-33125: Add support for building and releasing Windows ARM64 packages.
2532
2533- bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C
2534  drive
2535
2536- bpo-38453: Ensure ntpath.realpath() correctly resolves relative paths.
2537
2538- bpo-38519: Restores the internal C headers that were missing from the
2539  nuget.org and Microsoft Store packages.
2540
2541- bpo-38492: Remove ``pythonw.exe`` dependency on the Microsoft C++ runtime.
2542
2543macOS
2544-----
2545
2546- bpo-37931: Fixed a crash on OSX dynamic builds that occurred when
2547  re-initializing the posix module after a Py_Finalize if the environment
2548  had changed since the previous `import posix`. Patch by Benoît Hudson.
2549
2550IDLE
2551----
2552
2553- bpo-38862: 'Strip Trailing Whitespace' on the Format menu removes extra
2554  newlines at the end of non-shell files.
2555
2556- bpo-26353: Stop adding newline when saving an IDLE shell window.
2557
2558- bpo-38636: Fix IDLE Format menu tab toggle and file indent width. These
2559  functions (default shortcuts Alt-T and Alt-U) were mistakenly disabled in
2560  3.7.5 and 3.8.0.
2561
2562- bpo-4630: Add an option to toggle IDLE's cursor blink for shell, editor,
2563  and output windows.  See Settings, General, Window Preferences, Cursor
2564  Blink. Patch by Zackery Spytz.
2565
2566- bpo-38598: Do not try to compile IDLE shell or output windows
2567
2568C API
2569-----
2570
2571- bpo-37633: Re-export some function compatibility wrappers for macros in
2572  ``pythonrun.h``.
2573
2574- bpo-38540: Fixed possible leak in :c:func:`PyArg_Parse` and similar
2575  functions for format units ``"es#"`` and ``"et#"`` when the macro
2576  :c:macro:`PY_SSIZE_T_CLEAN` is not defined.
2577
2578- bpo-36389: The ``_PyObject_CheckConsistency()`` function is now also
2579  available in release mode. For example, it can be used to debug a crash in
2580  the ``visit_decref()`` function of the GC.
2581
2582
2583What's New in Python 3.8.0 final?
2584=================================
2585
2586*Release date: 2019-10-14*
2587
2588Core and Builtins
2589-----------------
2590
2591- bpo-38469: Fixed a bug where the scope of named expressions was not being
2592  resolved correctly in the presence of the *global* keyword. Patch by Pablo
2593  Galindo.
2594
2595- bpo-38379: When cyclic garbage collection (gc) runs finalizers that
2596  resurrect unreachable objects, the current gc run ends, without collecting
2597  any cyclic trash.  However, the statistics reported by ``collect()`` and
2598  ``get_stats()`` claimed that all cyclic trash found was collected, and
2599  that the resurrected objects were collected.   Changed the stats to report
2600  that none were collected.
2601
2602Library
2603-------
2604
2605- bpo-38449: Revert GH-15522, which introduces a regression in
2606  :meth:`mimetypes.guess_type` due to improper handling of filenames as
2607  urls.
2608
2609- bpo-38431: Fix ``__repr__`` method for :class:`dataclasses.InitVar` to
2610  support typing objects, patch by Samuel Colvin.
2611
2612- bpo-38109: Add missing :data:`stat.S_IFDOOR`, :data:`stat.S_IFPORT`,
2613  :data:`stat.S_IFWHT`, :func:`stat.S_ISDOOR`, :func:`stat.S_ISPORT`, and
2614  :func:`stat.S_ISWHT` values to the Python implementation of :mod:`stat`.
2615
2616- bpo-38405: Nested subclasses of :class:`typing.NamedTuple` are now
2617  pickleable.
2618
2619- bpo-38332: Prevent :exc:`KeyError` thrown by :func:`_encoded_words.decode`
2620  when given an encoded-word with invalid content-type encoding from
2621  propagating all the way to :func:`email.message.get`.
2622
2623- bpo-38341: Add :exc:`smtplib.SMTPNotSupportedError` to the :mod:`smtplib`
2624  exported names.
2625
2626- bpo-13153: OS native encoding is now used for converting between Python
2627  strings and Tcl objects.  This allows to display, copy and paste to
2628  clipboard emoji and other non-BMP characters.  Converting strings from Tcl
2629  to Python and back now never fails (except MemoryError).
2630
2631Documentation
2632-------------
2633
2634- bpo-38294: Add list of no-longer-escaped chars to re.escape documentation.
2635
2636Tests
2637-----
2638
2639- bpo-37531: On timeout, regrtest no longer attempts to call
2640  ``popen.communicate()`` again: it can hang until all child processes using
2641  stdout and stderr pipes completes. Kill the worker process and ignores its
2642  output. Change also the faulthandler timeout of the main process from 1
2643  minute to 5 minutes, for Python slowest buildbots.
2644
2645Windows
2646-------
2647
2648- bpo-38344: Fix error message in activate.bat.
2649
2650- bpo-38359: Ensures ``pyw.exe`` launcher reads correct registry key.
2651
2652- bpo-38355: Fixes ``ntpath.realpath`` failing on ``sys.executable``.
2653
2654IDLE
2655----
2656
2657- bpo-36698: IDLE no longer fails when write non-encodable characters to
2658  stderr.  It now escapes them with a backslash, as the regular Python
2659  interpreter. Added the ``errors`` field to the standard streams.
2660
2661Tools/Demos
2662-----------
2663
2664- bpo-38118: Update Valgrind suppression file to ignore a false alarm in
2665  :c:func:`PyUnicode_Decode` when using GCC builtin strcmp().
2666
2667- bpo-38347: pathfix.py: Assume all files that end on '.py' are Python
2668  scripts when working recursively.
2669
2670C API
2671-----
2672
2673- bpo-38395: Fix a crash in :class:`weakref.proxy` objects due to incorrect
2674  lifetime management when calling some associated methods that may delete
2675  the last reference to object being referenced by the proxy. Patch by Pablo
2676  Galindo.
2677
2678
2679What's New in Python 3.8.0 release candidate 1?
2680===============================================
2681
2682*Release date: 2019-10-01*
2683
2684Security
2685--------
2686
2687- bpo-38243: Escape the server title of
2688  :class:`xmlrpc.server.DocXMLRPCServer` when rendering the document page as
2689  HTML. (Contributed by Dong-hee Na in :issue:`38243`.)
2690
2691- bpo-38174: Update vendorized expat library version to 2.2.8, which
2692  resolves CVE-2019-15903.
2693
2694- bpo-37764: Fixes email._header_value_parser.get_unstructured going into an
2695  infinite loop for a specific case in which the email header does not have
2696  trailing whitespace, and the case in which it contains an invalid encoded
2697  word. Patch by Ashwin Ramaswami.
2698
2699Core and Builtins
2700-----------------
2701
2702- bpo-38006: Fix a bug due to the interaction of weakrefs and the cyclic
2703  garbage collector. We must clear any weakrefs in garbage in order to
2704  prevent their callbacks from executing and causing a crash.
2705
2706- bpo-38317: Fix warnings options priority: ``PyConfig.warnoptions`` has the
2707  highest priority, as stated in the :pep:`587`.
2708
2709- bpo-36871: Improve error handling for the assert_has_calls and
2710  assert_has_awaits methods of mocks. Fixed a bug where any errors
2711  encountered while binding the expected calls to the mock's spec were
2712  silently swallowed, leading to misleading error output.
2713
2714- bpo-38236: Python now dumps path configuration if it fails to import the
2715  Python codecs of the filesystem and stdio encodings.
2716
2717- bpo-38013: Allow to call ``async_generator_athrow().throw(...)`` even for
2718  non-started async generator helper. It fixes annoying warning at the end
2719  of :func:`asyncio.run` call.
2720
2721- bpo-38124: Fix an off-by-one error in PyState_AddModule that could cause
2722  out-of-bounds memory access.
2723
2724- bpo-38005: Fixed comparing and creating of InterpreterID and ChannelID.
2725
2726- bpo-37994: Fixed silencing arbitrary errors if an attribute lookup fails
2727  in several sites. Only AttributeError should be silenced.
2728
2729- bpo-37990: Fix elapsed time in gc stats was not printed correctly.  This
2730  bug was a regression in 3.8b4.
2731
2732- bpo-37966: The implementation of :func:`~unicodedata.is_normalized` has
2733  been greatly sped up on strings that aren't normalized, by implementing
2734  the full normalization-quick-check algorithm from the Unicode standard.
2735
2736- bpo-20490: Improve import error message for partially initialized module
2737  on circular ``from`` imports - by Anthony Sottile.
2738
2739- bpo-37409: Ensure explicit relative imports from interactive sessions and
2740  scripts (having no parent package) always raise ImportError, rather than
2741  treating the current module as the package. Patch by Ben Lewis.
2742
2743- bpo-37619: When adding a wrapper descriptor from one class to a different
2744  class (for example, setting ``__add__ = str.__add__`` on an ``int``
2745  subclass), an exception is correctly raised when the operator is called.
2746
2747- bpo-30773: Prohibit parallel running of aclose() / asend() / athrow(). Fix
2748  ag_running to reflect the actual running status of the AG.
2749
2750Library
2751-------
2752
2753- bpo-38319: sendfile() used in socket and shutil modules was raising
2754  OverflowError for files >= 2GiB on 32-bit architectures.  (patch by
2755  Giampaolo Rodola)
2756
2757- bpo-38242: Revert the new asyncio Streams API
2758
2759- bpo-38019: Correctly handle pause/resume reading of closed asyncio unix
2760  pipe.
2761
2762- bpo-38163: Child mocks will now detect their type as either synchronous or
2763  asynchronous, asynchronous child mocks will be AsyncMocks and synchronous
2764  child mocks will be either MagicMock or Mock (depending on their parent
2765  type).
2766
2767- bpo-38161: Removes _AwaitEvent from AsyncMock.
2768
2769- bpo-38216: Allow the rare code that wants to send invalid http requests
2770  from the `http.client` library a way to do so.  The fixes for bpo-30458
2771  led to breakage for some projects that were relying on this ability to
2772  test their own behavior in the face of bad requests.
2773
2774- bpo-38108: Any synchronous magic methods on an AsyncMock now return a
2775  MagicMock. Any asynchronous magic methods on a MagicMock now return an
2776  AsyncMock.
2777
2778- bpo-38248: asyncio: Fix inconsistent immediate Task cancellation
2779
2780- bpo-38237: The arguments for the builtin pow function are more
2781  descriptive. They can now also be passed in as keywords.
2782
2783- bpo-38191: Constructors of :class:`~typing.NamedTuple` and
2784  :class:`~typing.TypedDict` types now accept arbitrary keyword argument
2785  names, including "cls", "self", "typename", "_typename", "fields" and
2786  "_fields".  Passing positional arguments by keyword is deprecated.
2787
2788- bpo-38185: Fixed case-insensitive string comparison in
2789  :class:`sqlite3.Row` indexing.
2790
2791- bpo-38136: Changes AsyncMock call count and await count to be two
2792  different counters. Now await count only counts when a coroutine has been
2793  awaited, not when it has been called, and vice-versa. Update the
2794  documentation around this.
2795
2796- bpo-37828: Fix default mock name in
2797  :meth:`unittest.mock.Mock.assert_called` exceptions. Patch by Abraham
2798  Toriz Cruz.
2799
2800- bpo-38175: Fix a memory leak in comparison of :class:`sqlite3.Row`
2801  objects.
2802
2803- bpo-33936: _hashlib no longer calls obsolete OpenSSL initialization
2804  function with OpenSSL 1.1.0+.
2805
2806- bpo-34706: Preserve subclassing in inspect.Signature.from_callable.
2807
2808- bpo-38153: Names of hashing algorithms frome OpenSSL are now normalized to
2809  follow Python's naming conventions. For example OpenSSL uses sha3-512
2810  instead of sha3_512 or blake2b512 instead of blake2b.
2811
2812- bpo-38115: Fix a bug in dis.findlinestarts() where it would return invalid
2813  bytecode offsets. Document that a code object's co_lnotab can contain
2814  invalid bytecode offsets.
2815
2816- bpo-38148: Add slots to :mod:`asyncio` transport classes, which can reduce
2817  memory usage.
2818
2819- bpo-36991: Fixes a potential incorrect AttributeError exception escaping
2820  ZipFile.extract() in some unsupported input error situations.
2821
2822- bpo-38134: Remove obsolete copy of PBKDF2_HMAC_fast. All supported OpenSSL
2823  versions contain a fast implementation.
2824
2825- bpo-38132: The OpenSSL hashlib wrapper uses a simpler implementation.
2826  Several Macros and pointless caches are gone. The hash name now comes from
2827  OpenSSL's EVP. The algorithm name stays the same, except it is now always
2828  lower case.
2829
2830- bpo-38008: Fix parent class check in protocols to correctly identify the
2831  module that provides a builtin protocol, instead of assuming they all come
2832  from the :mod:`collections.abc` module
2833
2834- bpo-37405: Fixed regression bug for socket.getsockname() for non-CAN_ISOTP
2835  AF_CAN address family sockets by returning a 1-tuple instead of string.
2836
2837- bpo-38121: Update parameter names on functions in importlib.metadata
2838  matching the changes in the 0.22 release of importlib_metadata.
2839
2840- bpo-38110: The os.closewalk() implementation now uses the libc fdwalk()
2841  API on platforms where it is available.
2842
2843- bpo-38093: Fixes AsyncMock so it doesn't crash when used with
2844  AsyncContextManagers or AsyncIterators.
2845
2846- bpo-37488: Add warning to :meth:`datetime.utctimetuple`,
2847  :meth:`datetime.utcnow` and :meth:`datetime.utcfromtimestamp` .
2848
2849- bpo-38086: Update importlib.metadata with changes from `importlib_metadata
2850  0.21
2851  <https://gitlab.com/python-devs/importlib_metadata/blob/0.21/importlib_metadata/docs/changelog.rst>`_.
2852
2853- bpo-37251: Remove `__code__` check in AsyncMock that incorrectly evaluated
2854  function specs as async objects but failed to evaluate classes with
2855  `__await__` but no `__code__` attribute defined as async objects.
2856
2857- bpo-38037: Fix reference counters in the :mod:`signal` module.
2858
2859- bpo-38066: Hide internal asyncio.Stream methods: feed_eof(), feed_data(),
2860  set_exception() and set_transport().
2861
2862- bpo-38059: inspect.py now uses sys.exit() instead of exit()
2863
2864- bpo-37953: In :mod:`typing`, improved the ``__hash__`` and ``__eq__``
2865  methods for :class:`ForwardReferences`.
2866
2867- bpo-38026: Fixed :func:`inspect.getattr_static` used ``isinstance`` while
2868  it should avoid dynamic lookup.
2869
2870- bpo-38010: In ``importlib.metadata`` sync with ``importlib_metadata``
2871  0.20, clarifying behavior of ``files()`` and fixing issue where only one
2872  requirement was returned for ``requires()`` on ``dist-info`` packages.
2873
2874- bpo-38006: weakref.WeakValueDictionary defines a local remove() function
2875  used as callback for weak references. This function was created with a
2876  closure. Modify the implementation to avoid the closure.
2877
2878- bpo-34410: Fixed a crash in the :func:`tee` iterator when re-enter it.
2879  RuntimeError is now raised in this case.
2880
2881- bpo-37140: Fix a ctypes regression of Python 3.8. When a ctypes.Structure
2882  is passed by copy to a function, ctypes internals created a temporary
2883  object which had the side effect of calling the structure finalizer
2884  (__del__) twice. The Python semantics requires a finalizer to be called
2885  exactly once. Fix ctypes internals to no longer call the finalizer twice.
2886
2887- bpo-37972: Subscripts to the `unittest.mock.call` objects now receive the
2888  same chaining mechanism as any other custom attributes, so that the
2889  following usage no longer raises a `TypeError`:
2890
2891  call().foo().__getitem__('bar')
2892
2893  Patch by blhsing
2894
2895- bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs
2896  with only a host name. Patch by Dong-hee Na.
2897
2898- bpo-37885: venv: Don't generate unset variable warning on deactivate.
2899
2900- bpo-37785: Fix xgettext warnings in :mod:`argparse`.
2901
2902- bpo-11953: Completing WSA* error codes in :mod:`socket`.
2903
2904- bpo-37424: Fixes a possible hang when using a timeout on
2905  `subprocess.run()` while capturing output.  If the child process spawned
2906  its own children or otherwise connected its stdout or stderr handles with
2907  another process, we could hang after the timeout was reached and our child
2908  was killed when attempting to read final output from the pipes.
2909
2910- bpo-37212: :func:`unittest.mock.call` now preserves the order of keyword
2911  arguments in repr output. Patch by Karthikeyan Singaravelan.
2912
2913- bpo-37305: Add .webmanifest -> application/manifest+json to list of
2914  recognized file types and content type headers
2915
2916- bpo-21872: Fix :mod:`lzma`: module decompresses data incompletely. When
2917  decompressing a FORMAT_ALONE format file, and it doesn't have the end
2918  marker, sometimes the last one to dozens bytes can't be output. Patch by
2919  Ma Lin.
2920
2921- bpo-37206: Default values which cannot be represented as Python objects no
2922  longer improperly represented as ``None`` in function signatures.
2923
2924- bpo-12144: Ensure cookies with ``expires`` attribute are handled in
2925  :meth:`CookieJar.make_cookies`.
2926
2927- bpo-31163: pathlib.Path instance's rename and replace methods now return
2928  the new Path instance.
2929
2930- bpo-25068: :class:`urllib.request.ProxyHandler` now lowercases the keys of
2931  the passed dictionary.
2932
2933- bpo-21315: Email headers containing RFC2047 encoded words are parsed
2934  despite the missing whitespace, and a defect registered. Also missing
2935  trailing whitespace after encoded words is now registered as a defect.
2936
2937- bpo-36250: Ignore ``ValueError`` from ``signal`` with ``interaction`` in
2938  non-main thread.
2939
2940- bpo-35168: :attr:`shlex.shlex.punctuation_chars` is now a read-only
2941  property.
2942
2943- bpo-20504: Fixes a bug in :mod:`cgi` module when a multipart/form-data
2944  request has no `Content-Length` header.
2945
2946- bpo-34519: Add additional aliases for HP Roman 8. Patch by Michael Osipov.
2947
2948Documentation
2949-------------
2950
2951- bpo-26868: Fix example usage of :c:func:`PyModule_AddObject` to properly
2952  handle errors.
2953
2954- bpo-36797: Fix a dead link in the distutils API Reference.
2955
2956- bpo-37977: Warn more strongly and clearly about pickle insecurity
2957
2958- bpo-37937: Mention ``frame.f_trace`` in :func:`sys.settrace` docs.
2959
2960- bpo-36260: Add decompression pitfalls to zipfile module documentation.
2961
2962- bpo-36960: Restructured the :mod:`datetime` docs in the interest of making
2963  them more user-friendly and improving readability. Patch by Brad Solomon.
2964
2965- bpo-23460: The documentation for decimal string formatting using the `:g`
2966  specifier has been updated to reflect the correct exponential notation
2967  cutoff point. Original patch contributed by Tuomas Suutari.
2968
2969- bpo-35803: Document and test that ``tempfile`` functions may accept a
2970  :term:`path-like object` for the ``dir`` argument.  Patch by Anthony
2971  Sottile.
2972
2973- bpo-33944: Added a note about the intended use of code in .pth files.
2974
2975- bpo-34293: Fix the Doc/Makefile regarding PAPER environment variable and
2976  PDF builds
2977
2978Tests
2979-----
2980
2981- bpo-38239: Fix test_gdb for Link Time Optimization (LTO) builds.
2982
2983- bpo-38275: test_ssl now handles disabled TLS/SSL versions better.
2984  OpenSSL's crypto policy and run-time settings are recognized and tests for
2985  disabled versions are skipped. Tests also accept more TLS minimum_versions
2986  for platforms that override OpenSSL's default with strict settings.
2987
2988- bpo-38271: The private keys for test_ssl were encrypted with 3DES in
2989  traditional PKCS#5 format. 3DES and the digest algorithm of PKCS#5 are
2990  blocked by some strict crypto policies. Use PKCS#8 format with AES256
2991  encryption instead.
2992
2993- bpo-38270: test.support now has a helper function to check for
2994  availibility of a hash digest function. Several tests are refactored avoid
2995  MD5 and use SHA256 instead. Other tests are marked to use MD5 and skipped
2996  when MD5 is disabled.
2997
2998- bpo-37123: Multiprocessing test test_mymanager() now also expects
2999  -SIGTERM, not only exitcode 0. BaseManager._finalize_manager() sends
3000  SIGTERM to the manager process if it takes longer than 1 second to stop,
3001  which happens on slow buildbots.
3002
3003- bpo-38212: Multiprocessing tests: increase
3004  test_queue_feeder_donot_stop_onexc() timeout from 1 to 60 seconds.
3005
3006- bpo-38117: Test with OpenSSL 1.1.1d
3007
3008- bpo-37531: Enhance regrtest multiprocess timeout: write a message when
3009  killing a worker process, catch popen.kill() and popen.wait() exceptions,
3010  put a timeout on the second call to popen.communicate().
3011
3012- bpo-37876: Add tests for ROT-13 codec.
3013
3014- bpo-37252: Fix assertions in ``test_close`` and
3015  ``test_events_mask_overflow`` devpoll tests.
3016
3017- bpo-34001: Make test_ssl pass with LibreSSL. LibreSSL handles minimum and
3018  maximum TLS version differently than OpenSSL.
3019
3020- bpo-36919: Make ``test_source_encoding.test_issue2301`` implementation
3021  independent. The test will work now for both CPython and IronPython.
3022
3023- bpo-34596: Fallback to a default reason when :func:`unittest.skip` is
3024  uncalled. Patch by Naitree Zhu.
3025
3026Build
3027-----
3028
3029- bpo-38301: In Solaris family, we must be sure to use ``-D_REENTRANT``.
3030  Patch by Jesús Cea Avión.
3031
3032- bpo-36210: Update optional extension module detection for AIX. ossaudiodev
3033  and spwd are not applicable for AIX, and are no longer reported as
3034  missing. 3rd-party packaging of ncurses (with ASIS support) conflicts with
3035  officially supported AIX curses library, so configure AIX to use
3036  libcurses.a. However, skip trying to build _curses_panel.
3037
3038  patch by M Felt
3039
3040- bpo-36002: Locate ``llvm-profdata`` and ``llvm-ar`` binaries using
3041  ``AC_PATH_TOOL`` rather than ``AC_PATH_TARGET_TOOL``.
3042
3043- bpo-37936: The :file:`.gitignore` file systematically keeps "rooted", with
3044  a non-trailing slash, all the rules that are meant to apply to files in a
3045  specific place in the repo.  Previously, when the intended file to ignore
3046  happened to be at the root of the repo, we'd most often accidentally also
3047  ignore files and directories with the same name anywhere in the tree.
3048
3049- bpo-37936: The :file:`.gitignore` file no longer applies to any files that
3050  are in fact tracked in the Git repository.  Patch by Greg Price.
3051
3052Windows
3053-------
3054
3055- bpo-38117: Update bundled OpenSSL to 1.1.1d
3056
3057- bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual
3058  environment.
3059
3060- bpo-38133: Allow py.exe launcher to locate installations from the
3061  Microsoft Store and improve display of active virtual environments.
3062
3063- bpo-38114: The ``pip.ini`` is no longer included in the Nuget package.
3064
3065- bpo-36634: :func:`os.cpu_count` now returns active processors rather than
3066  maximum processors.
3067
3068- bpo-36634: venv activate.bat now works when the existing variables contain
3069  double quote characters.
3070
3071- bpo-38081: Prevent error calling :func:`os.path.realpath` on ``'NUL'``.
3072
3073- bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath.
3074
3075- bpo-38088: Fixes distutils not finding vcruntime140.dll with only the v142
3076  toolset installed.
3077
3078- bpo-37283: Ensure command-line and unattend.xml setting override
3079  previously detected states in Windows installer.
3080
3081- bpo-38030: Fixes :func:`os.stat` failing for block devices on Windows
3082
3083- bpo-38020: Fixes potential crash when calling :func:`os.readlink` (or
3084  indirectly through :func:`~os.path.realpath`) on a file that is not a
3085  supported link.
3086
3087- bpo-37705: Improve the implementation of ``winerror_to_errno()``.
3088
3089- bpo-37702: Fix memory leak on Windows in creating an SSLContext object or
3090  running urllib.request.urlopen('https://...').
3091
3092- bpo-37445: Include the ``FORMAT_MESSAGE_IGNORE_INSERTS`` flag in
3093  ``FormatMessageW()`` calls.
3094
3095- bpo-37380: Don't collect unfinished processes with ``subprocess._active``
3096  on Windows to cleanup later. Patch by Ruslan Kuprieiev.
3097
3098- bpo-32587: Make :data:`winreg.REG_MULTI_SZ` support zero-length strings.
3099
3100macOS
3101-----
3102
3103- bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer.
3104
3105- bpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests
3106  optional
3107
3108IDLE
3109----
3110
3111- bpo-35379: When exiting IDLE, catch any AttributeError.  One happens when
3112  EditorWindow.close is called twice.  Printing a traceback, when IDLE is
3113  run from a terminal, is useless and annoying.
3114
3115- bpo-38183: To avoid problems, test_idle ignores the user config directory.
3116  It no longer tries to create or access .idlerc or any files within. Users
3117  must run IDLE to discover problems with saving settings.
3118
3119- bpo-38077: IDLE no longer adds 'argv' to the user namespace when
3120  initializing it.  This bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4.
3121
3122- bpo-38041: Shell restart lines now fill the window width, always start
3123  with '=', and avoid wrapping unnecessarily. The line will still wrap if
3124  the included file name is long relative to the width.
3125
3126- bpo-35771: To avoid occasional spurious test_idle failures on slower
3127  machines, increase the ``hover_delay`` in test_tooltip.
3128
3129- bpo-37902: Add mousewheel scrolling for IDLE module, path, and stack
3130  browsers. Patch by George Zhang.
3131
3132Tools/Demos
3133-----------
3134
3135- bpo-37803: pdb's ``--help`` and ``--version`` long options now work.
3136
3137- bpo-37064: Add option -k to pathscript.py script: preserve shebang flags.
3138  Add option -a to pathscript.py script: add flags.
3139
3140C API
3141-----
3142
3143- bpo-38234: :c:func:`Py_SetPath` now sets :data:`sys.executable` to the
3144  program full path (:c:func:`Py_GetProgramFullPath`) rather than to the
3145  program name (:c:func:`Py_GetProgramName`).
3146
3147- bpo-38234: Python ignored arguments passed to :c:func:`Py_SetPath`,
3148  :c:func:`Py_SetPythonHome` and :c:func:`Py_SetProgramName`: fix Python
3149  initialization to use specified arguments.
3150
3151- bpo-38205: The :c:func:`Py_UNREACHABLE` macro now calls
3152  :c:func:`Py_FatalError`.
3153
3154- bpo-37879: Fix subtype_dealloc to suppress the type decref when the base
3155  type is a C heap type
3156
3157
3158What's New in Python 3.8.0 beta 4?
3159==================================
3160
3161*Release date: 2019-08-29*
3162
3163Security
3164--------
3165
3166- bpo-34155: Fix parsing of invalid email addresses with more than one ``@``
3167  (e.g. a@b@c.com.) to not return the part before 2nd ``@`` as valid email
3168  address. Patch by maxking & jpic.
3169
3170Core and Builtins
3171-----------------
3172
3173- bpo-37947: Adjust correctly the recursion level in the symtable generation
3174  for named expressions. Patch by Pablo Galindo.
3175
3176- bpo-37830: Fixed compilation of :keyword:`break` and :keyword:`continue`
3177  in the :keyword:`finally` block when the corresponding :keyword:`try`
3178  block contains :keyword:`return` with a non-constant value.
3179
3180- bpo-32912: Reverted :issue:`32912`: emitting :exc:`SyntaxWarning` instead
3181  of :exc:`DeprecationWarning` for invalid escape sequences in string and
3182  bytes literals.
3183
3184- bpo-37757: :pep:`572`: As described in the PEP, assignment expressions now
3185  raise :exc:`SyntaxError` when their interaction with comprehension scoping
3186  results in an ambiguous target scope.
3187
3188  The ``TargetScopeError`` subclass originally proposed by the PEP has been
3189  removed in favour of just raising regular syntax errors for the disallowed
3190  cases.
3191
3192- bpo-36311: Decoding bytes objects larger than 2GiB is faster and no longer
3193  fails when a multibyte characters spans a chunk boundary.
3194
3195- bpo-37433: Fix ``SyntaxError`` indicator printing too many spaces for
3196  multi-line strings - by Anthony Sottile.
3197
3198- bpo-20523: ``pdb.Pdb`` supports ~/.pdbrc in Windows 7. Patch by Tim Hopper
3199  and Dan Lidral-Porter.
3200
3201Library
3202-------
3203
3204- bpo-37834: Prevent shutil.rmtree exception when built on non-Windows
3205  system without fd system call support, like older versions of macOS.
3206
3207- bpo-37965: Fix C compiler warning caused by
3208  distutils.ccompiler.CCompiler.has_function.
3209
3210- bpo-37960: ``repr()`` of buffered and text streams now silences only
3211  expected exceptions when get the value of "name" and "mode" attributes.
3212
3213- bpo-37951: Most features of the subprocess module now work again in
3214  subinterpreters. Only *preexec_fn* is restricted in subinterpreters.
3215
3216- bpo-36205: Fix the rusage implementation of time.process_time() to
3217  correctly report the sum of the system and user CPU time.
3218
3219- bpo-37950: Fix :func:`ast.dump` when call with incompletely initialized
3220  node.
3221
3222- bpo-34679: Restores instantiation of Windows IOCP event loops from the
3223  non-main thread.
3224
3225- bpo-36917: Add default implementation of the
3226  :meth:`ast.NodeVisitor.visit_Constant` method which emits a deprecation
3227  warning and calls corresponding methody ``visit_Num()``, ``visit_Str()``,
3228  etc.
3229
3230- bpo-37798: Update test_statistics.py to verify that the statistics module
3231  works well for both C and Python implementations. Patch by Dong-hee Na
3232
3233- bpo-26589: Added a new status code to the http module: 451
3234  UNAVAILABLE_FOR_LEGAL_REASONS
3235
3236- bpo-37915: Fix a segmentation fault that appeared when comparing instances
3237  of ``datetime.timezone`` and ``datetime.tzinfo`` objects. Patch by Pablo
3238  Galindo.
3239
3240- bpo-37868: Fix dataclasses.is_dataclass when given an instance that never
3241  raises AttributeError in __getattr__.  That is, an object that returns
3242  something for __dataclass_fields__ even if it's not a dataclass.
3243
3244- bpo-37811: Fix ``socket`` module's ``socket.connect(address)`` function
3245  being unable to establish connection in case of interrupted system call.
3246  The problem was observed on all OSes which ``poll(2)`` system call can
3247  take only non-negative integers and -1 as a timeout value.
3248
3249- bpo-21131: Fix ``faulthandler.register(chain=True)`` stack. faulthandler
3250  now allocates a dedicated stack of ``SIGSTKSZ*2`` bytes, instead of just
3251  ``SIGSTKSZ`` bytes. Calling the previous signal handler in faulthandler
3252  signal handler uses more than ``SIGSTKSZ`` bytes of stack memory on some
3253  platforms.
3254
3255- bpo-37798: Add C fastpath for statistics.NormalDist.inv_cdf() Patch by
3256  Dong-hee Na
3257
3258- bpo-37819: Add Fraction.as_integer_ratio() to match the corresponding
3259  methods in bool, int, float, and decimal.
3260
3261- bpo-37810: Fix :mod:`difflib` ``?`` hint in diff output when dealing with
3262  tabs.  Patch by Anthony Sottile.
3263
3264- bpo-37772: In ``zipfile.Path``, when adding implicit dirs, ensure that
3265  ancestral directories are added and that duplicates are excluded.
3266
3267- bpo-28292: Mark calendar.py helper functions as being private.  The
3268  follows PEP 8 guidance to maintain the style conventions in the module and
3269  it addresses a known case of user confusion.
3270
3271- bpo-18049: Add definition of THREAD_STACK_SIZE for AIX in
3272  Python/thread_pthread.h The default thread stacksize caused crashes with
3273  the default recursion limit Patch by M Felt
3274
3275- bpo-37738: Fix the implementation of curses ``addch(str, color_pair)``:
3276  pass the color pair to ``setcchar()``, instead of always passing 0 as the
3277  color pair.
3278
3279- bpo-37723: Fix performance regression on regular expression parsing with
3280  huge character sets. Patch by Yann Vaginay.
3281
3282- bpo-32178: Fix IndexError in :mod:`email` package when trying to parse
3283  invalid address fields starting with ``:``.
3284
3285- bpo-37685: Fixed comparisons of :class:`datetime.timedelta` and
3286  :class:`datetime.timezone`.
3287
3288- bpo-37695: Correct :func:`curses.unget_wch` error message.  Patch by
3289  Anthony Sottile.
3290
3291- bpo-37354: Make Activate.ps1 Powershell script static to allow for signing
3292  it.
3293
3294- bpo-37664: Update wheels bundled with ensurepip (pip 19.2.3 and setuptools
3295  41.2.0)
3296
3297- bpo-37642: Allowed the pure Python implementation of
3298  :class:`datetime.timezone` to represent sub-minute offsets close to
3299  minimum and maximum boundaries, specifically in the ranges (23:59, 24:00)
3300  and (-23:59, 24:00). Patch by Ngalim Siregar
3301
3302- bpo-16970: Adding a value error when an invalid value in passed to nargs
3303  Patch by Robert Leenders
3304
3305- bpo-37587: Make json.loads faster for long strings. (Patch by Marco
3306  Paolini)
3307
3308- bpo-18378: Recognize "UTF-8" as a valid value for LC_CTYPE in
3309  locale._parse_localename.
3310
3311- bpo-37531: "python3 -m test -jN --timeout=TIMEOUT" now kills a worker
3312  process if it runs longer than *TIMEOUT* seconds.
3313
3314- bpo-37482: Fix serialization of display name in originator or destination
3315  address fields with both encoded words and special chars.
3316
3317- bpo-37372: Fix error unpickling datetime.time objects from Python 2 with
3318  seconds>=24. Patch by Justin Blanchard.
3319
3320- bpo-37085: Add the optional Linux SocketCAN Broadcast Manager constants,
3321  used as flags to configure the BCM behaviour, in the socket module.  Patch
3322  by Karl Ding.
3323
3324- bpo-36871: Ensure method signature is used instead of constructor
3325  signature of a class while asserting mock object against method calls.
3326  Patch by Karthikeyan Singaravelan.
3327
3328- bpo-36582: Fix ``UserString.encode()`` to correctly return ``bytes``
3329  rather than a ``UserString`` instance.
3330
3331- bpo-34775: Division handling of PurePath now returns NotImplemented
3332  instead of raising a TypeError when passed something other than an
3333  instance of str or PurePath. Patch by Roger Aiudi.
3334
3335Documentation
3336-------------
3337
3338- bpo-37979: Added a link to dateutil.parser.isoparse in the
3339  datetime.fromisoformat documentation. Patch by Paul Ganssle
3340
3341- bpo-37759: Beginning edits to Whatsnew 3.8
3342
3343- bpo-37726: Stop recommending getopt in the tutorial for command line
3344  argument parsing and promote argparse.
3345
3346- bpo-37256: Fix wording of arguments for :class:`Request` in
3347  :mod:`urllib.request`
3348
3349- bpo-37004: In the documentation for difflib, a note was added explicitly
3350  warning that the results of SequenceMatcher's ratio method may depend on
3351  the order of the input strings.
3352
3353- bpo-36487: Make C-API docs clear about what the "main" interpreter is.
3354
3355Tests
3356-----
3357
3358- bpo-37805: Add tests for json.dump(..., skipkeys=True). Patch by Dong-hee
3359  Na.
3360
3361Build
3362-----
3363
3364- bpo-37707: Mark some individual tests to skip when --pgo is used.  The
3365  tests marked increase the PGO task time significantly and likely don't
3366  help improve optimization of the final executable.
3367
3368Windows
3369-------
3370
3371- bpo-37549: :func:`os.dup` no longer fails for standard streams on Windows
3372  7.
3373
3374- bpo-1311: The ``nul`` file on Windows now returns True from
3375  :func:`~os.path.exists` and a valid result from :func:`os.stat` with
3376  ``S_IFCHR`` set.
3377
3378- bpo-9949: Enable support for following symlinks in :func:`os.realpath`.
3379
3380- bpo-37834: Treat all name surrogate reparse points on Windows in
3381  :func:`os.lstat` and other reparse points as regular files in
3382  :func:`os.stat`.
3383
3384- bpo-36266: Add the module name in the formatted error message when DLL
3385  load fail happens during module import in
3386  ``_PyImport_FindSharedFuncptrWindows()``. Patch by Srinivas Nyayapati.
3387
3388- bpo-25172: Trying to import the :mod:`crypt` module on Windows will result
3389  in an :exc:`ImportError` with a message explaining that the module isn't
3390  supported on Windows. On other platforms, if the underlying ``_crypt``
3391  module is not available, the ImportError will include a message explaining
3392  the problem.
3393
3394- bpo-37778: Fixes the icons used for file associations to the Microsoft
3395  Store package.
3396
3397- bpo-37734: Fix use of registry values to launch Python from Microsoft
3398  Store app.
3399
3400- bpo-28269: Replace use of :c:func:`strcasecmp` for the system function
3401  :c:func:`_stricmp`. Patch by Minmin Gong.
3402
3403macOS
3404-----
3405
3406- bpo-18049: Increase the default stack size of threads from 5MB to 16MB on
3407  macOS, to match the stack size of the main thread. This avoids crashes on
3408  deep recursion in threads.
3409
3410IDLE
3411----
3412
3413- bpo-37824: Properly handle user input warnings in IDLE shell. Cease
3414  turning SyntaxWarnings into SyntaxErrors.
3415
3416- bpo-37929: IDLE Settings dialog now closes properly when there is no shell
3417  window.
3418
3419- bpo-37849: Fixed completions list appearing too high or low when shown
3420  above the current line.
3421
3422- bpo-36419: Refactor IDLE autocomplete and improve testing.
3423
3424- bpo-37748: Reorder the Run menu.  Put the most common choice, Run Module,
3425  at the top.
3426
3427Tools/Demos
3428-----------
3429
3430- bpo-37942: Improve ArgumentClinic converter for floats.
3431
3432- bpo-37034: Argument Clinic now uses the argument name on errors with
3433  keyword-only argument instead of their position. Patch contributed by Rémi
3434  Lapeyre.
3435
3436C API
3437-----
3438
3439- bpo-36763: Options added by ``PySys_AddXOption()`` are now handled the
3440  same way than ``PyConfig.xoptions`` and command line ``-X`` options.
3441
3442- bpo-37926: Fix a crash in ``PySys_SetArgvEx(0, NULL, 0)``.
3443
3444
3445What's New in Python 3.8.0 beta 3?
3446==================================
3447
3448*Release date: 2019-07-29*
3449
3450Security
3451--------
3452
3453- bpo-37461: Fix an infinite loop when parsing specially crafted email
3454  headers. Patch by Abhilash Raj.
3455
3456Core and Builtins
3457-----------------
3458
3459- bpo-37593: Swap the positions of the *posonlyargs* and *args* parameters
3460  in the constructor of :class:`ast.parameters` nodes.
3461
3462- bpo-36974: Implemented separate vectorcall functions for every calling
3463  convention of builtin functions and methods. This improves performance for
3464  calls.
3465
3466Library
3467-------
3468
3469- bpo-37697: Syncronize ``importlib.metadata`` with `importlib_metadata 0.19
3470  <https://gitlab.com/python-devs/importlib_metadata/-/milestones/20>`_,
3471  improving handling of EGG-INFO files and fixing a crash when entry point
3472  names contained colons.
3473
3474- bpo-37691: Let math.dist() accept coordinates as sequences (or iterables)
3475  rather than just tuples.
3476
3477- bpo-37664: Update wheels bundled with ensurepip (pip 19.2.1 and setuptools
3478  41.0.1)
3479
3480- bpo-36324: Make internal attributes for statistics.NormalDist() private.
3481
3482- bpo-37491: Fix ``IndexError`` when parsing email headers with unexpectedly
3483  ending bare-quoted string value. Patch by Abhilash Raj.
3484
3485- bpo-37579: Return :exc:`NotImplemented` in Python implementation of
3486  ``__eq__`` for :class:`~datetime.timedelta` and :class:`~datetime.time`
3487  when the other object being compared is not of the same type to match C
3488  implementation. Patch by Karthikeyan Singaravelan.
3489
3490- bpo-21478: Record calls to parent when autospecced object is attached to a
3491  mock using :func:`unittest.mock.attach_mock`. Patch by Karthikeyan
3492  Singaravelan.
3493
3494- bpo-37502: pickle.loads() no longer raises TypeError when the buffers
3495  argument is set to None
3496
3497- bpo-37520: Correct behavior for zipfile.Path.parent when the path object
3498  identifies a subdirectory.
3499
3500- bpo-18374: Fix the ``.col_offset`` attribute of nested :class:`ast.BinOp`
3501  instances which had a too large value in some situations.
3502
3503- bpo-37421: Fix :func:`multiprocessing.util.get_temp_dir` finalizer: clear
3504  also the 'tempdir' configuration of the current process, so next call to
3505  ``get_temp_dir()`` will create a new temporary directory, rather than
3506  reusing the removed temporary directory.
3507
3508- bpo-37481: The distutils ``bdist_wininst`` command is deprecated in Python
3509  3.8, use ``bdist_wheel`` (wheel packages) instead.
3510
3511- bpo-26967: An :class:`~argparse.ArgumentParser` with
3512  ``allow_abbrev=False`` no longer disables grouping of short flags, such as
3513  ``-vv``, but only disables abbreviation of long flags as documented. Patch
3514  by Zac Hatfield-Dodds.
3515
3516- bpo-37347: :meth:`sqlite3.Connection.create_aggregate`,
3517  :meth:`sqlite3.Connection.create_function`,
3518  :meth:`sqlite3.Connection.set_authorizer`,
3519  :meth:`sqlite3.Connection.set_progress_handler`
3520  :meth:`sqlite3.Connection.set_trace_callback` methods lead to segfaults if
3521  some of these methods are called twice with an equal object but not the
3522  same. Now callbacks are stored more carefully. Patch by Aleksandr Balezin.
3523
3524- bpo-36564: Fix infinite loop in email header folding logic that would be
3525  triggered when an email policy's max_line_length is not long enough to
3526  include the required markup and any values in the message. Patch by Paul
3527  Ganssle
3528
3529Documentation
3530-------------
3531
3532- bpo-32910: Remove implementation-specific behaviour of how venv's
3533  Deactivate works.
3534
3535- bpo-37284: Add a brief note to indicate that any new
3536  ``sys.implementation`` required attributes must go through the PEP
3537  process.
3538
3539- bpo-30088: Documented that :class:`mailbox.Maildir` constructor doesn't
3540  attempt to verify the maildir folder layout correctness. Patch by
3541  Sviatoslav Sydorenko.
3542
3543- bpo-37521: Fix `importlib` examples to insert any newly created modules
3544  via importlib.util.module_from_spec() immediately into sys.modules instead
3545  of after calling loader.exec_module().
3546
3547  Thanks to Benjamin Mintz for finding the bug.
3548
3549- bpo-37456: Slash ('/') is now part of syntax.
3550
3551- bpo-37487: Fix PyList_GetItem index description to include 0.
3552
3553- bpo-37149: Replace the dead link to the Tkinter 8.5 reference by John
3554  Shipman, New Mexico Tech, with a link to the archive.org copy.
3555
3556- bpo-37478: Added possible exceptions to the description of os.chdir().
3557
3558Tests
3559-----
3560
3561- bpo-37558: Fix test_shared_memory_cleaned_after_process_termination name
3562  handling
3563
3564- bpo-37526: Add :func:`test.support.catch_threading_exception`: context
3565  manager catching :class:`threading.Thread` exception using
3566  :func:`threading.excepthook`.
3567
3568- bpo-37421: test_concurrent_futures now explicitly stops the ForkServer
3569  instance if it's running.
3570
3571- bpo-37421: multiprocessing tests now stop the ForkServer instance if it's
3572  running: close the "alive" file descriptor to ask the server to stop and
3573  then remove its UNIX address.
3574
3575Build
3576-----
3577
3578- bpo-36044: Reduce the number of unit tests run for the PGO generation
3579  task.  This speeds up the task by a factor of about 15x.  Running the full
3580  unit test suite is slow.  This change may result in a slightly less
3581  optimized build since not as many code branches will be executed.  If you
3582  are willing to wait for the much slower build, the old behavior can be
3583  restored using './configure [..] PROFILE_TASK="-m test --pgo-extended"'.
3584  We make no guarantees as to which PGO task set produces a faster build.
3585  Users who care should run their own relevant benchmarks as results can
3586  depend on the environment, workload, and compiler tool chain.
3587
3588Windows
3589-------
3590
3591- bpo-37672: Switch Windows Store package's pip to use bundled
3592  :file:`pip.ini` instead of :envvar:`PIP_USER` variable.
3593
3594IDLE
3595----
3596
3597- bpo-37692: Improve highlight config sample with example shell interaction
3598  and better labels for shell elements.
3599
3600- bpo-37628: Settings dialog no longer expands with font size.
3601
3602- bpo-37627: Initialize the Customize Run dialog with the command line
3603  arguments most recently entered before.  The user can optionally edit
3604  before submitting them.
3605
3606- bpo-33610: Fix code context not showing the correct context when first
3607  toggled on.
3608
3609- bpo-37530: Optimize code context to reduce unneeded background activity.
3610  Font and highlight changes now occur along with text changes instead of
3611  after a random delay.
3612
3613- bpo-27452: Cleanup ``config.py`` by inlining ``RemoveFile`` and
3614  simplifying the handling of ``file`` in ``CreateConfigHandlers``.
3615
3616- bpo-17535: Add optional line numbers for IDLE editor windows.  Windows
3617  open without line numbers unless set otherwise in the General tab of the
3618  configuration dialog.
3619
3620- bpo-26806: To compensate for stack frames added by IDLE and avoid possible
3621  problems with low recursion limits, add 30 to limits in the user code
3622  execution process.  Subtract 30 when reporting recursion limits to make
3623  this addition mostly transparent.
3624
3625- bpo-36390: Gather Format menu functions into format.py.  Combine
3626  paragraph.py, rstrip.py, and format methods from editor.py.
3627
3628Tools/Demos
3629-----------
3630
3631- bpo-37675: 2to3 now works when run from a zipped standard library.
3632
3633
3634What's New in Python 3.8.0 beta 2?
3635==================================
3636
3637*Release date: 2019-07-04*
3638
3639Security
3640--------
3641
3642- bpo-37363: Adds audit events for the range of supported run commands (see
3643  :ref:`using-on-general`).
3644
3645- bpo-37463: ssl.match_hostname() no longer accepts IPv4 addresses with
3646  additional text after the address and only quad-dotted notation without
3647  trailing whitespaces. Some inet_aton() implementations ignore whitespace
3648  and all data after whitespace, e.g. '127.0.0.1 whatever'.
3649
3650- bpo-37363: Adds audit events for :mod:`ensurepip`, :mod:`ftplib`,
3651  :mod:`glob`, :mod:`imaplib`, :mod:`nntplib`, :mod:`pdb`, :mod:`poplib`,
3652  :mod:`shutil`, :mod:`smtplib`, :mod:`sqlite3`, :mod:`subprocess`,
3653  :mod:`telnetlib`, :mod:`tempfile` and :mod:`webbrowser`, as well as
3654  :func:`os.listdir`, :func:`os.scandir` and :func:`breakpoint`.
3655
3656- bpo-37364: :func:`io.open_code` is now used when reading :file:`.pth`
3657  files.
3658
3659- bpo-34631: Updated OpenSSL to 1.1.1c in Windows installer
3660
3661Core and Builtins
3662-----------------
3663
3664- bpo-37467: Fix :func:`sys.excepthook` and :c:func:`PyErr_Display` if a
3665  filename is a bytes string. For example, for a SyntaxError exception where
3666  the filename attribute is a bytes string.
3667
3668- bpo-37417: :meth:`bytearray.extend` now correctly handles errors that
3669  arise during iteration. Patch by Brandt Bucher.
3670
3671- bpo-24214: Improved support of the surrogatepass error handler in the
3672  UTF-8 and UTF-16 incremental decoders.
3673
3674- bpo-35224: Reverse evaluation order of key: value in dict comprehensions
3675  as proposed in PEP 572. I.e. in ``{k: v for ...}``, ``k`` will be
3676  evaluated before ``v``.
3677
3678- bpo-37316: Fix the :c:func:`PySys_Audit` call in :class:`mmap.mmap`.
3679
3680- bpo-37269: Fix a bug in the peephole optimizer that was not treating
3681  correctly constant conditions with binary operators. Patch by Pablo
3682  Galindo.
3683
3684- bpo-37213: Handle correctly negative line offsets in the peephole
3685  optimizer. Patch by Pablo Galindo.
3686
3687- bpo-37219: Remove errorneous optimization for empty set differences.
3688
3689- bpo-36922: Slot functions optimize any callable with
3690  ``Py_TPFLAGS_METHOD_DESCRIPTOR`` instead of only instances of
3691  ``function``.
3692
3693- bpo-36974: The slot ``tp_vectorcall_offset`` is inherited unconditionally
3694  to support ``super().__call__()`` when the base class uses vectorcall.
3695
3696- bpo-37160: :func:`threading.get_native_id` now also supports NetBSD.
3697
3698- bpo-37077: Add :func:`threading.get_native_id` support for AIX. Patch by
3699  M. Felt
3700
3701Library
3702-------
3703
3704- bpo-37440: http.client now enables TLS 1.3 post-handshake authentication
3705  for default context or if a cert_file is passed to HTTPSConnection.
3706
3707- bpo-37437: Update vendorized expat version to 2.2.7.
3708
3709- bpo-37428: SSLContext.post_handshake_auth = True no longer sets
3710  SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the
3711  option is documented as ignored for clients, OpenSSL implicitly enables
3712  cert chain validation when the flag is set.
3713
3714- bpo-37420: :func:`os.sched_setaffinity` now correctly handles errors that
3715  arise during iteration over its ``mask`` argument. Patch by Brandt Bucher.
3716
3717- bpo-37412: The :func:`os.getcwdb` function now uses the UTF-8 encoding on
3718  Windows, rather than the ANSI code page: see :pep:`529` for the rationale.
3719  The function is no longer deprecated on Windows.
3720
3721- bpo-29412: Fix IndexError in parsing a header value ending unexpectedly.
3722  Patch by Abhilash Raj.
3723
3724- bpo-36546: The *dist* argument for statistics.quantiles() is now
3725  positional only. The current name doesn't reflect that the argument can be
3726  either a dataset or a distribution.  Marking the parameter as positional
3727  avoids confusion and makes it possible to change the name later.
3728
3729- bpo-37394: Fix a bug that was causing the :mod:`queue` module to fail if
3730  the accelerator module was not available. Patch by Pablo Galindo.
3731
3732- bpo-33972: Email with single part but content-type set to ``multipart/*``
3733  doesn't raise AttributeError anymore.
3734
3735- bpo-37280: Use threadpool for reading from file for sendfile fallback
3736  mode.
3737
3738- bpo-37279: Fix asyncio sendfile support when sendfile sends extra data in
3739  fallback mode.
3740
3741- bpo-19865: :func:`ctypes.create_unicode_buffer()` now also supports
3742  non-BMP characters on platforms with 16-bit :c:type:`wchar_t` (for
3743  example, Windows and AIX).
3744
3745- bpo-37210: Allow pure Python implementation of :mod:`pickle` to work even
3746  when the C :mod:`_pickle` module is unavailable.
3747
3748- bpo-35922: Fix :meth:`RobotFileParser.crawl_delay` and
3749  :meth:`RobotFileParser.request_rate` to return ``None`` rather than raise
3750  :exc:`AttributeError` when no relevant rule is defined in the robots.txt
3751  file.  Patch by Rémi Lapeyre.
3752
3753- bpo-35766: Change the format of feature_version to be a (major, minor)
3754  tuple.
3755
3756- bpo-36607: Eliminate :exc:`RuntimeError` raised by
3757  :func:`asyncio.all_tasks()` if internal tasks weak set is changed by
3758  another thread during iteration.
3759
3760- bpo-18748: :class:`_pyio.IOBase` destructor now does nothing if getting
3761  the ``closed`` attribute fails to better mimick :class:`_io.IOBase`
3762  finalizer.
3763
3764- bpo-36402: Fix a race condition at Python shutdown when waiting for
3765  threads. Wait until the Python thread state of all non-daemon threads get
3766  deleted (join all non-daemon threads), rather than just wait until
3767  non-daemon Python threads complete.
3768
3769- bpo-34886: Fix an unintended ValueError from :func:`subprocess.run` when
3770  checking for conflicting `input` and `stdin` or `capture_output` and
3771  `stdout` or `stderr` args when they were explicitly provided but with
3772  `None` values within a passed in `**kwargs` dict rather than as passed
3773  directly by name. Patch contributed by Rémi Lapeyre.
3774
3775- bpo-37173: The exception message for ``inspect.getfile()`` now correctly
3776  reports the passed class rather than the builtins module.
3777
3778- bpo-37178: Give math.perm() a one argument form that means the same as
3779  math.factorial().
3780
3781- bpo-37178: For math.perm(n, k), let k default to n, giving the same result
3782  as factorial.
3783
3784- bpo-37163: Deprecated passing ``obj`` argument of
3785  :func:`dataclasses.replace` as keyword argument.
3786
3787- bpo-37165: Converted _collections._count_elements to use the Argument
3788  Clinic.
3789
3790- bpo-34767: Do not always create a :class:`collections.deque` in
3791  :class:`asyncio.Lock`.
3792
3793- bpo-37158: Speed-up statistics.fmean() by switching from a function to a
3794  generator.
3795
3796- bpo-37150: `argparse._ActionsContainer.add_argument` now throws error, if
3797  someone accidentally pass FileType class object instead of instance of
3798  FileType as `type` argument
3799
3800- bpo-35621: Support running asyncio subprocesses when execution event loop
3801  in a thread on UNIX.
3802
3803- bpo-36520: Lengthy email headers with UTF-8 characters are now properly
3804  encoded when they are folded. Patch by Jeffrey Kintscher.
3805
3806- bpo-30835: Fixed a bug in email parsing where a message with invalid bytes
3807  in content-transfer-encoding of a multipart message can cause an
3808  AttributeError. Patch by Andrew Donnellan.
3809
3810- bpo-35805: Add parser for Message-ID header and add it to default
3811  HeaderRegistry. This should prevent folding of Message-ID using RFC 2048
3812  encoded words.
3813
3814- bpo-35070: posix.getgrouplist() now works correctly when the user belongs
3815  to NGROUPS_MAX supplemental groups. Patch by Jeffrey Kintscher.
3816
3817- bpo-32627: Fix compile error when ``_uuid`` headers conflicting included.
3818
3819- bpo-11122: Distutils won't check for rpmbuild in specified paths only.
3820
3821- bpo-4963: Fixed non-deterministic behavior related to mimetypes extension
3822  mapping and module reinitialization.
3823
3824Documentation
3825-------------
3826
3827- bpo-34903: Documented that in :meth:`datetime.datetime.strptime()`, the
3828  leading zero in some two-digit formats is optional. Patch by Mike Gleen.
3829
3830Tests
3831-----
3832
3833- bpo-37421: test_distutils.test_build_ext() is now able to remove the
3834  temporary directory on Windows: don't import the newly built C extension
3835  ("xx") in the current process, but test it in a separated process.
3836
3837- bpo-37421: test_concurrent_futures now cleans up multiprocessing to remove
3838  immediately temporary directories created by
3839  multiprocessing.util.get_temp_dir().
3840
3841- bpo-37421: test_winconsoleio doesn't leak a temporary file anymore: use
3842  tempfile.TemporaryFile() to remove it when the test completes.
3843
3844- bpo-37421: multiprocessing tests now explicitly call ``_run_finalizers()``
3845  to immediately remove temporary directories created by tests.
3846
3847- bpo-37199: Fix test failures when IPv6 is unavailable or disabled.
3848
3849- bpo-37335: Remove no longer necessary code from c locale coercion tests
3850
3851- bpo-37421: Fix test_shutil to no longer leak temporary files.
3852
3853- bpo-37411: Fix test_wsgiref.testEnviron() to no longer depend on the
3854  environment variables (don't fail if "X" variable is set).
3855
3856- bpo-37400: Fix test_os.test_chown(): use os.getgroups() rather than
3857  grp.getgrall() to get groups. Rename also the test to test_chown_gid().
3858
3859- bpo-37359: Add --cleanup option to python3 -m test to remove
3860  ``test_python_*`` directories of previous failed jobs. Add "make
3861  cleantest" to run ``python3 -m test --cleanup``.
3862
3863- bpo-37362: test_gdb no longer fails if it gets an "unexpected" message on
3864  stderr: it now ignores stderr. The purpose of test_gdb is to test that
3865  python-gdb.py commands work as expected, not to test gdb.
3866
3867- bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1()
3868
3869- bpo-37278: Fix test_asyncio ProactorLoopCtrlC: join the thread to prevent
3870  leaking a running thread and leaking a reference.
3871
3872- bpo-37261: Fix :func:`test.support.catch_unraisable_exception`: its
3873  __exit__() method now ignores unraisable exception raised when clearing
3874  its ``unraisable`` attribute.
3875
3876- bpo-37169: Rewrite ``_PyObject_IsFreed()`` unit tests.
3877
3878- bpo-37153: ``test_venv.test_mutiprocessing()`` now explicitly calls
3879  ``pool.terminate()`` to wait until the pool completes.
3880
3881- bpo-28009: Modify the test_uuid logic to test when a program is available
3882  AND can be used to obtain a MACADDR as basis for an UUID. Patch by M. Felt
3883
3884Build
3885-----
3886
3887- bpo-37189: Many ``PyRun_XXX()`` functions like :c:func:`PyRun_String` were
3888  no longer exported in ``libpython38.dll`` by mistake. Export them again to
3889  fix the ABI compatibiliy.
3890
3891Windows
3892-------
3893
3894- bpo-10945: Officially drop support for creating bdist_wininst installers
3895  on non-Windows systems.
3896
3897- bpo-37369: Fixes path for :data:`sys.executable` when running from the
3898  Microsoft Store.
3899
3900- bpo-37351: Removes libpython38.a from standard Windows distribution.
3901
3902- bpo-35360: Update Windows builds to use SQLite 3.28.0.
3903
3904- bpo-37267: On Windows, :func:`os.dup` no longer creates an inheritable fd
3905  when handling a character file.
3906
3907- bpo-36779: Ensure ``time.tzname`` is correct on Windows when the active
3908  code page is set to CP_UTF7 or CP_UTF8.
3909
3910macOS
3911-----
3912
3913- bpo-34602: Avoid test suite failures on macOS by no longer calling
3914  resource.setrlimit to increase the process stack size limit at runtime.
3915  The runtime change is no longer needed since the interpreter is being
3916  built with a larger default stack size.
3917
3918- bpo-35360: Update macOS installer to use SQLite 3.28.0.
3919
3920- bpo-34631: Updated OpenSSL to 1.1.1c in macOS installer.
3921
3922IDLE
3923----
3924
3925- bpo-37325: Fix tab focus traversal order for help source and custom run
3926  dialogs.
3927
3928- bpo-37321: Both subprocess connection error messages now refer to the
3929  'Startup failure' section of the IDLE doc.
3930
3931- bpo-37177: Properly 'attach' search dialogs to their main window so that
3932  they behave like other dialogs and do not get hidden behind their main
3933  window.
3934
3935- bpo-37039: Adjust "Zoom Height" to individual screens by momemtarily
3936  maximizing the window on first use with a particular screen.  Changing
3937  screen settings may invalidate the saved height.  While a window is
3938  maximized, "Zoom Height" has no effect.
3939
3940- bpo-35763: Make calltip reminder about '/' meaning positional-only less
3941  obtrusive by only adding it when there is room on the first line.
3942
3943- bpo-5680: Add 'Run... Customized' to the Run menu to run a module with
3944  customized settings.  Any 'command line arguments' entered are added to
3945  sys.argv. One can suppress the normal Shell main module restart.
3946
3947C API
3948-----
3949
3950- bpo-36763: Add :func:`PyConfig_SetWideStringList` function.
3951
3952- bpo-28805: The :const:`METH_FASTCALL` calling convention has been
3953  documented.
3954
3955- bpo-37221: ``tp_print`` is put back at the end of the ``PyTypeObject``
3956  structure to restore support for old code (in particular generated by
3957  Cython) setting ``tp_print = 0``. Note that ``tp_print`` will be removed
3958  entirely in Python 3.9.
3959
3960- bpo-37221: The new function :c:func:`PyCode_NewWithPosOnlyArgs` allows to
3961  create code objects like :c:func:`PyCode_New`, but with an extra
3962  *posonlyargcount* parameter for indicating the number of positonal-only
3963  arguments.
3964
3965- bpo-37215: Fix dtrace issue introduce by bpo-36842
3966
3967- bpo-37191: Python.h does not need compiler support for intermingled
3968  declarations (GCC's ``-Wdeclaration-after-statement``), which were added
3969  in 3.8.0 Beta 1. Note that in Python 3.9, intermingled declarations will
3970  be needed again.
3971
3972- bpo-37170: Fix the cast on error in
3973  :c:func:`PyLong_AsUnsignedLongLongMask()`.
3974
3975
3976What's New in Python 3.8.0 beta 1?
3977==================================
3978
3979*Release date: 2019-06-04*
3980
3981Security
3982--------
3983
3984- bpo-35907: CVE-2019-9948: Avoid file reading by disallowing
3985  ``local-file://`` and ``local_file://`` URL schemes in
3986  ``URLopener().open()`` and ``URLopener().retrieve()`` of
3987  :mod:`urllib.request`.
3988
3989- bpo-33529: Prevent fold function used in email header encoding from
3990  entering infinite loop when there are too many non-ASCII characters in a
3991  header.
3992
3993- bpo-33164: Updated blake2 implementation which uses secure memset
3994  implementation provided by platform.
3995
3996Core and Builtins
3997-----------------
3998
3999- bpo-35814: Allow unpacking in the right hand side of annotated
4000  assignments. In particular, ``t: Tuple[int, ...] = x, y, *z`` is now
4001  allowed.
4002
4003- bpo-37126: All structseq objects are now tracked by the garbage collector.
4004  Patch by Pablo Galindo.
4005
4006- bpo-37122: Make the *co_argcount* attribute of code objects represent the
4007  total number of positional arguments (including positional-only
4008  arguments). The value of *co_posonlyargcount* can be used to distinguish
4009  which arguments are positional only, and the difference (*co_argcount* -
4010  *co_posonlyargcount*) is the number of positional-or-keyword arguments.
4011  Patch by Pablo Galindo.
4012
4013- bpo-20092: Constructors of :class:`int`, :class:`float` and
4014  :class:`complex` will now use the :meth:`~object.__index__` special
4015  method, if available and the corresponding method :meth:`~object.__int__`,
4016  :meth:`~object.__float__` or :meth:`~object.__complex__` is not available.
4017
4018- bpo-37087: Add native thread ID (TID) support to OpenBSD.
4019
4020- bpo-26219: Implemented per opcode cache mechanism and ``LOAD_GLOBAL``
4021  instruction use it. ``LOAD_GLOBAL`` is now about 40% faster. Contributed
4022  by Yury Selivanov, and Inada Naoki.
4023
4024- bpo-37072: Fix crash in PyAST_FromNodeObject() when flags is NULL.
4025
4026- bpo-37029: Freeing a great many small objects could take time quadratic in
4027  the number of arenas, due to using linear search to keep ``obmalloc.c``'s
4028  list of usable arenas sorted by order of number of free memory pools.
4029  This is accomplished without search now, leaving the worst-case time
4030  linear in the number of arenas.  For programs where this quite visibly
4031  matters (typically with more than 100 thousand small objects alive
4032  simultaneously), this can greatly reduce the time needed to release their
4033  memory.
4034
4035- bpo-26423: Fix possible overflow in ``wrap_lenfunc()`` when ``sizeof(long)
4036  < sizeof(Py_ssize_t)`` (e.g., 64-bit Windows).
4037
4038- bpo-37050: Improve the AST for "debug" f-strings, which use '=' to print
4039  out the source of the expression being evaluated.  Delete expr_text from
4040  the FormattedValue node, and instead use a Constant string node (possibly
4041  merged with adjacent constant expressions inside the f-string).
4042
4043- bpo-22385: The `bytes.hex`, `bytearray.hex`, and `memoryview.hex` methods
4044  as well as the `binascii.hexlify` and `b2a_hex` functions now have the
4045  ability to include an optional separator between hex bytes.  This
4046  functionality was inspired by MicroPython's hexlify implementation.
4047
4048- bpo-26836: Add :func:`os.memfd_create`.
4049
4050- bpo-37032: Added new ``replace()`` method to the code type
4051  (:class:`types.CodeType`).
4052
4053- bpo-37007: Implement :func:`socket.if_nameindex()`,
4054  :func:`socket.if_nametoindex()`, and :func:`socket.if_indextoname()` on
4055  Windows.
4056
4057- bpo-36829: :c:func:`PyErr_WriteUnraisable` now creates a traceback object
4058  if there is no current traceback. Moreover, call
4059  :c:func:`PyErr_NormalizeException` and :c:func:`PyException_SetTraceback`
4060  to normalize the exception value. Ignore any error.
4061
4062- bpo-36878: Only accept text after `# type: ignore` if the first character
4063  is ASCII. This is to disallow things like `# type: ignoreé`.
4064
4065- bpo-36878: Store text appearing after a `# type: ignore` comment in the
4066  AST. For example a type ignore like `# type: ignore[E1000]` will have the
4067  string `"[E1000]"` stored in its AST node.
4068
4069- bpo-2180: Treat line continuation at EOF as a ``SyntaxError`` by Anthony
4070  Sottile.
4071
4072- bpo-36907: Fix a crash when calling a C function with a keyword dict
4073  (``f(**kwargs)``) and changing the dict ``kwargs`` while that function is
4074  running.
4075
4076- bpo-36946: Fix possible signed integer overflow when handling slices.
4077
4078- bpo-36826: Add NamedExpression kind support to ast_unparse.c
4079
4080- bpo-1875: A :exc:`SyntaxError` is now raised if a code blocks that will be
4081  optimized away (e.g. if conditions that are always false) contains syntax
4082  errors. Patch by Pablo Galindo.
4083
4084- bpo-36027: Allow computation of modular inverses via three-argument
4085  ``pow``: the second argument is now permitted to be negative in the case
4086  where the first and third arguments are relatively prime.
4087
4088- bpo-36861: Update the Unicode database to version 12.1.0.
4089
4090- bpo-28866: Avoid caching attributes of classes which type defines mro() to
4091  avoid a hard cache invalidation problem.
4092
4093- bpo-36851: The ``FrameType`` stack is now correctly cleaned up if the
4094  execution ends with a return and the stack is not empty.
4095
4096- bpo-34616: The ``compile()`` builtin functions now support the
4097  ``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag,  which allow to compile sources
4098  that  contains top-level ``await``, ``async with`` or ``async for``. This
4099  is useful to evaluate async-code from with an already async functions; for
4100  example in a custom REPL.
4101
4102- bpo-36842: Implement PEP 578, adding sys.audit, io.open_code and related
4103  APIs.
4104
4105- bpo-27639: Correct return type for UserList slicing operations. Patch by
4106  Michael Blahay, Erick Cervantes, and vaultah
4107
4108- bpo-36737: Move PyRuntimeState.warnings into per-interpreter state (via
4109  "module state").
4110
4111- bpo-36793: Removed ``__str__`` implementations from builtin types
4112  :class:`bool`, :class:`int`, :class:`float`, :class:`complex` and few
4113  classes from the standard library. They now inherit ``__str__()`` from
4114  :class:`object`.
4115
4116- bpo-36817: Add a ``=`` feature f-strings for debugging. This can precede
4117  ``!s``, ``!r``, or ``!a``. It produces the text of the expression,
4118  followed by an equal sign, followed by the repr of the value of the
4119  expression. So ``f'{3*9+15=}'`` would be equal to the string
4120  ``'3*9+15=42'``.  If ``=`` is specified, the default conversion is set to
4121  ``!r``, unless a format spec is given, in which case the formatting
4122  behavior is unchanged, and __format__ will be used.
4123
4124- bpo-24048: Save the live exception during import.c's ``remove_module()``.
4125
4126- bpo-27987: pymalloc returns memory blocks aligned by 16 bytes, instead of
4127  8 bytes, on 64-bit platforms to conform x86-64 ABI. Recent compilers
4128  assume this alignment more often. Patch by Inada Naoki.
4129
4130- bpo-36601: A long-since-meaningless check for ``getpid() == main_pid`` was
4131  removed from Python's internal C signal handler.
4132
4133- bpo-36594: Fix incorrect use of ``%p`` in format strings. Patch by Zackery
4134  Spytz.
4135
4136- bpo-36045: builtins.help() now prefixes `async` for async functions
4137
4138- bpo-36084: Add native thread ID (TID) to threading.Thread objects
4139  (supported platforms: Windows, FreeBSD, Linux, macOS)
4140
4141- bpo-36035: Added fix for broken symlinks in combination with pathlib
4142
4143- bpo-35983: Added new trashcan macros to deal with a double deallocation
4144  that could occur when the `tp_dealloc` of a subclass calls the
4145  `tp_dealloc` of a base class and that base class uses the trashcan
4146  mechanism. Patch by Jeroen Demeyer.
4147
4148- bpo-20602: Do not clear :data:`sys.flags` and :data:`sys.float_info`
4149  during shutdown. Patch by Zackery Spytz.
4150
4151- bpo-26826: Expose :func:`copy_file_range` as a low level API in the
4152  :mod:`os` module.
4153
4154- bpo-32388: Remove cross-version binary compatibility requirement in
4155  tp_flags.
4156
4157- bpo-31862: Port binascii to PEP 489 multiphase initialization. Patch by
4158  Marcel Plch.
4159
4160Library
4161-------
4162
4163- bpo-37128: Added :func:`math.perm`.
4164
4165- bpo-37120: Add SSLContext.num_tickets to control the number of TLSv1.3
4166  session tickets.
4167
4168- bpo-12202: Fix the error handling in
4169  :meth:`msilib.SummaryInformation.GetProperty`. Patch by Zackery Spytz.
4170
4171- bpo-26835: The fcntl module now contains file sealing constants for
4172  sealing of memfds.
4173
4174- bpo-29262: Add ``get_origin()`` and ``get_args()`` introspection helpers
4175  to ``typing`` module.
4176
4177- bpo-12639: :meth:`msilib.Directory.start_component()` no longer fails if
4178  *keyfile* is not ``None``.
4179
4180- bpo-36999: Add the ``asyncio.Task.get_coro()`` method to publicly expose
4181  the tasks's coroutine object.
4182
4183- bpo-35246: Make :func:`asyncio.create_subprocess_exec` accept path-like
4184  arguments.
4185
4186- bpo-35279: Change default *max_workers* of ``ThreadPoolExecutor`` from
4187  ``cpu_count() * 5`` to ``min(32, cpu_count() + 4))``.  Previous value was
4188  unreasonably large on many cores machines.
4189
4190- bpo-37076: :func:`_thread.start_new_thread` now logs uncaught exception
4191  raised by the function using :func:`sys.unraisablehook`, rather than
4192  :func:`sys.excepthook`, so the hook gets access to the function which
4193  raised the exception.
4194
4195- bpo-33725: On macOS, the :mod:`multiprocessing` module now uses *spawn*
4196  start method by default.
4197
4198- bpo-37054: Fix destructor :class:`_pyio.BytesIO` and
4199  :class:`_pyio.TextIOWrapper`: initialize their ``_buffer`` attribute as
4200  soon as possible (in the class body), because it's used by ``__del__()``
4201  which calls ``close()``.
4202
4203- bpo-37058: PEP 544: Add ``Protocol`` and ``@runtime_checkable`` to the
4204  ``typing`` module.
4205
4206- bpo-36933: The functions ``sys.set_coroutine_wrapper`` and
4207  ``sys.get_coroutine_wrapper`` that were deprecated and marked for removal
4208  in 3.8 have been removed.
4209
4210- bpo-37047: Handle late binding and attribute access in
4211  :class:`unittest.mock.AsyncMock` setup for autospeccing. Document newly
4212  implemented async methods in :class:`unittest.mock.MagicMock`.
4213
4214- bpo-37049: PEP 589: Add ``TypedDict`` to the ``typing`` module.
4215
4216- bpo-37046: PEP 586: Add ``Literal`` to the ``typing`` module.
4217
4218- bpo-37045: PEP 591: Add ``Final`` qualifier and ``@final`` decorator to
4219  the ``typing`` module.
4220
4221- bpo-37035: Don't log OSError based exceptions if a fatal error has
4222  occurred in asyncio transport. Peer can generate almost any OSError, user
4223  cannot avoid these exceptions by fixing own code. Errors are still
4224  propagated to user code, it's just logging them is pointless and pollute
4225  asyncio logs.
4226
4227- bpo-37001: :func:`symtable.symtable` now accepts the same input types for
4228  source code as the built-in :func:`compile` function. Patch by Dino
4229  Viehland.
4230
4231- bpo-37028: Implement asyncio REPL
4232
4233- bpo-37027: Return safe to use proxy socket object from
4234  transport.get_extra_info('socket')
4235
4236- bpo-32528: Make asyncio.CancelledError a BaseException.
4237
4238  This will address the common mistake many asyncio users make: an "except
4239  Exception" clause breaking Tasks cancellation.
4240
4241  In addition to this change, we stop inheriting asyncio.TimeoutError and
4242  asyncio.InvalidStateError from their concurrent.futures.* counterparts.
4243  There's no point for these exceptions to share the inheritance chain.
4244
4245- bpo-1230540: Add a new :func:`threading.excepthook` function which handles
4246  uncaught :meth:`threading.Thread.run` exception. It can be overridden to
4247  control how uncaught :meth:`threading.Thread.run` exceptions are handled.
4248
4249- bpo-36996: Handle :func:`unittest.mock.patch` used as a decorator on async
4250  functions.
4251
4252- bpo-37008: Add support for calling :func:`next` with the mock resulting
4253  from :func:`unittest.mock.mock_open`
4254
4255- bpo-27737: Allow whitespace only header encoding in ``email.header`` - by
4256  Batuhan Taskaya
4257
4258- bpo-36969: PDB command `args` now  display positional only arguments.
4259  Patch contributed by Rémi Lapeyre.
4260
4261- bpo-36969: PDB command `args` now  display keyword only arguments. Patch
4262  contributed by Rémi Lapeyre.
4263
4264- bpo-36983: Add missing names to ``typing.__all__``: ``ChainMap``,
4265  ``ForwardRef``, ``OrderedDict`` - by Anthony Sottile.
4266
4267- bpo-36972: Add SupportsIndex protocol to the typing module to allow type
4268  checking to detect classes that can be passed to `hex()`, `oct()` and
4269  `bin()`.
4270
4271- bpo-32972: Implement ``unittest.IsolatedAsyncioTestCase`` to help testing
4272  asyncio-based code.
4273
4274- bpo-36952: :func:`fileinput.input` and :class:`fileinput.FileInput`
4275  **bufsize** argument has been removed (was deprecated and ignored since
4276  Python 3.6), and as a result the **mode** and **openhook** arguments have
4277  been made keyword-only.
4278
4279- bpo-36952: Starting with Python 3.3, importing ABCs from
4280  :mod:`collections` is deprecated, and import should be done from
4281  :mod:`collections.abc`. Still being able to import from :mod:`collections`
4282  was marked for removal in 3.8, but has been delayed to 3.9; documentation
4283  and ``DeprecationWarning`` clarified.
4284
4285- bpo-36949: Implement __repr__ for WeakSet objects.
4286
4287- bpo-36948: Fix :exc:`NameError` in
4288  :meth:`urllib.request.URLopener.retrieve`. Patch by Karthikeyan
4289  Singaravelan.
4290
4291- bpo-33524: Fix the folding of email header when the max_line_length is 0
4292  or None and the header contains non-ascii characters.  Contributed by
4293  Licht Takeuchi (@Licht-T).
4294
4295- bpo-24564: :func:`shutil.copystat` now ignores :const:`errno.EINVAL` on
4296  :func:`os.setxattr` which may occur when copying files on filesystems
4297  without extended attributes support.
4298
4299  Original patch by Giampaolo Rodola, updated by Ying Wang.
4300
4301- bpo-36888: Python child processes can now access the status of their
4302  parent process using multiprocessing.process.parent_process
4303
4304- bpo-36921: Deprecate ``@coroutine`` for sake of ``async def``.
4305
4306- bpo-25652: Fix bug in ``__rmod__`` of ``UserString`` - by Batuhan Taskaya.
4307
4308- bpo-36916: Remove a message about an unhandled exception in a task when
4309  writer.write() is used without await and writer.drain() fails with an
4310  exception.
4311
4312- bpo-36889: Introduce :class:`asyncio.Stream` class that merges
4313  :class:`asyncio.StreamReader` and :class:`asyncio.StreamWriter`
4314  functionality. :class:`asyncio.Stream` can work in readonly, writeonly and
4315  readwrite modes. Provide :func:`asyncio.connect`,
4316  :func:`asyncio.connect_unix`, :func:`asyncio.connect_read_pipe` and
4317  :func:`asyncio.connect_write_pipe` factories to open
4318  :class:`asyncio.Stream` connections. Provide :class:`asyncio.StreamServer`
4319  and :class:`UnixStreamServer` to serve servers with asyncio.Stream API.
4320  Modify :func:`asyncio.create_subprocess_shell` and
4321  :func:`asyncio.create_subprocess_exec` to use :class:`asyncio.Stream`
4322  instead of deprecated :class:`StreamReader` and :class:`StreamWriter`.
4323  Deprecate :class:`asyncio.StreamReader` and :class:`asyncio.StreamWriter`.
4324  Deprecate usage of private classes, e.g.
4325  :class:`asyncio.FlowControlMixing` and
4326  :class:`asyncio.StreamReaderProtocol` outside of asyncio package.
4327
4328- bpo-36845: Added validation of integer prefixes to the construction of IP
4329  networks and interfaces in the ipaddress module.
4330
4331- bpo-23378: Add an extend action to argparser.
4332
4333- bpo-36867: Fix a bug making a SharedMemoryManager instance and its parent
4334  process use two separate resource_tracker processes.
4335
4336- bpo-23896: Adds a grammar to lib2to3.pygram that contains exec as a
4337  function not as statement.
4338
4339- bpo-36895: The function ``time.clock()`` was deprecated in 3.3 in favor of
4340  ``time.perf_counter()`` and marked for removal in 3.8, it has removed.
4341
4342- bpo-35545: Fix asyncio discarding IPv6 scopes when ensuring hostname
4343  resolutions internally
4344
4345- bpo-36887: Add new function :func:`math.isqrt` to compute integer square
4346  roots.
4347
4348- bpo-34632: Introduce the ``importlib.metadata`` module with (provisional)
4349  support for reading metadata from third-party packages.
4350
4351- bpo-36878: When using `type_comments=True` in `ast.parse`, treat `# type:
4352  ignore` followed by a non-alphanumeric character and then arbitrary text
4353  as a type ignore, instead of requiring nothing but whitespace or another
4354  comment. This is to permit formations such as `# type: ignore[E1000]`.
4355
4356- bpo-36778: ``cp65001`` encoding (Windows code page 65001) becomes an alias
4357  to ``utf_8`` encoding.
4358
4359- bpo-36867: The multiprocessing.resource_tracker replaces the
4360  multiprocessing.semaphore_tracker module. Other than semaphores,
4361  resource_tracker also tracks shared_memory segments.
4362
4363- bpo-30262: The ``Cache`` and ``Statement`` objects of the :mod:`sqlite3`
4364  module are not exposed to the user.  Patch by Aviv Palivoda.
4365
4366- bpo-24538: In `shutil.copystat()`, first copy extended file attributes and
4367  then file permissions, since extended attributes can only be set on the
4368  destination while it is still writeable.
4369
4370- bpo-36829: Add new :func:`sys.unraisablehook` function which can be
4371  overridden to control how "unraisable exceptions" are handled. It is
4372  called when an exception has occurred but there is no way for Python to
4373  handle it. For example, when a destructor raises an exception or during
4374  garbage collection (:func:`gc.collect`).
4375
4376- bpo-36832: Introducing ``zipfile.Path``, a pathlib-compatible wrapper for
4377  traversing zip files.
4378
4379- bpo-36814: Fix an issue where os.posix_spawnp() would incorrectly raise a
4380  TypeError when file_actions is None.
4381
4382- bpo-33110: Handle exceptions raised by functions added by
4383  concurrent.futures add_done_callback correctly when the Future has already
4384  completed.
4385
4386- bpo-26903: Limit `max_workers` in `ProcessPoolExecutor` to 61 to work
4387  around a WaitForMultipleObjects limitation.
4388
4389- bpo-36813: Fix :class:`~logging.handlers.QueueListener` to call
4390  ``queue.task_done()`` upon stopping. Patch by Bar Harel.
4391
4392- bpo-36806: Forbid creation of asyncio stream objects like StreamReader,
4393  StreamWriter, Process, and their protocols outside of asyncio package.
4394
4395- bpo-36802: Provide both sync and async calls for StreamWriter.write() and
4396  StreamWriter.close()
4397
4398- bpo-36801: Properly handle SSL connection closing in asyncio
4399  StreamWriter.drain() call.
4400
4401- bpo-36785: Implement PEP 574 (pickle protocol 5 with out-of-band buffers).
4402
4403- bpo-36772: functools.lru_cache() can now be used as a straight decorator
4404  in addition to its existing usage as a function that returns a decorator.
4405
4406- bpo-6584: Add a :exc:`~gzip.BadGzipFile` exception to the :mod:`gzip`
4407  module.
4408
4409- bpo-36748: Optimized write buffering in C implementation of
4410  ``TextIOWrapper``. Writing ASCII string to ``TextIOWrapper`` with ascii,
4411  latin1, or utf-8 encoding is about 20% faster.  Patch by Inada Naoki.
4412
4413- bpo-8138: Don't mark ``wsgiref.simple_server.SimpleServer`` as
4414  multi-threaded since ``wsgiref.simple_server.WSGIServer`` is
4415  single-threaded.
4416
4417- bpo-22640: :func:`py_compile.compile` now supports silent mode. Patch by
4418  Joannah Nanjekye
4419
4420- bpo-29183: Fix double exceptions in :class:`wsgiref.handlers.BaseHandler`
4421  by calling its :meth:`~wsgiref.handlers.BaseHandler.close` method only
4422  when no exception is raised.
4423
4424- bpo-36548: Improved the repr of regular expression flags.
4425
4426- bpo-36542: The signature of Python functions can now be overridden by
4427  specifying the ``__text_signature__`` attribute.
4428
4429- bpo-36533: Reinitialize logging.Handler locks in forked child processes
4430  instead of attempting to acquire them all in the parent before forking
4431  only to be released in the child process.  The acquire/release pattern was
4432  leading to deadlocks in code that has implemented any form of chained
4433  logging handlers that depend upon one another as the lock acquisition
4434  order cannot be guaranteed.
4435
4436- bpo-35252: Throw a TypeError instead of an AssertionError when using an
4437  invalid type annotation with singledispatch.
4438
4439- bpo-35900: Allow reduction methods to return a 6-item tuple where the 6th
4440  item specifies a custom state-setting method that's called instead of the
4441  regular ``__setstate__`` method.
4442
4443- bpo-35900: enable custom reduction callback registration for functions and
4444  classes in _pickle.c, using the new Pickler's attribute
4445  ``reducer_override``
4446
4447- bpo-36368: Fix a bug crashing SharedMemoryManager instances in interactive
4448  sessions after a ctrl-c (KeyboardInterrupt) was sent
4449
4450- bpo-31904: Fix mmap fail for VxWorks
4451
4452- bpo-27497: :meth:`csv.DictWriter.writeheader` now returns the return value
4453  of the underlying :meth:`csv.Writer.writerow` method. Patch contributed by
4454  Ashish Nitin Patil.
4455
4456- bpo-36239: Parsing .mo files now ignores comments starting and ending with
4457  #-#-#-#-#.
4458
4459- bpo-26707: Enable plistlib to read and write binary plist files that were
4460  created as a KeyedArchive file. Specifically, this allows the plistlib to
4461  process 0x80 tokens as UID objects.
4462
4463- bpo-31904: Add posix module support for VxWorks.
4464
4465- bpo-35125: Asyncio: Remove inner callback on outer cancellation in shield
4466
4467- bpo-35721: Fix :meth:`asyncio.SelectorEventLoop.subprocess_exec()` leaks
4468  file descriptors if ``Popen`` fails and called with
4469  ``stdin=subprocess.PIPE``. Patch by Niklas Fiekas.
4470
4471- bpo-31855: :func:`unittest.mock.mock_open` results now respects the
4472  argument of read([size]). Patch contributed by Rémi Lapeyre.
4473
4474- bpo-35431: Implement :func:`math.comb` that returns binomial coefficient,
4475  that computes the number of ways to choose k items from n items without
4476  repetition and without order. Patch by Yash Aggarwal and Keller Fuchs.
4477
4478- bpo-26660: Fixed permission errors in
4479  :class:`~tempfile.TemporaryDirectory` clean up. Previously
4480  ``TemporaryDirectory.cleanup()`` failed when non-writeable or
4481  non-searchable files or directories were created inside a temporary
4482  directory.
4483
4484- bpo-34271: Add debugging helpers to ssl module. It's now possible to dump
4485  key material and to trace TLS protocol. The default and stdlib contexts
4486  also support SSLKEYLOGFILE env var.
4487
4488- bpo-26467: Added AsyncMock to support using unittest to mock asyncio
4489  coroutines. Patch by Lisa Roach.
4490
4491- bpo-33569: dataclasses.InitVar: Exposes the type used to create the init
4492  var.
4493
4494- bpo-34424: Fix serialization of messages containing encoded strings when
4495  the policy.linesep is set to a multi-character string. Patch by Jens
4496  Troeger.
4497
4498- bpo-34303: Performance of :func:`functools.reduce` is slightly improved.
4499  Patch by Sergey Fedoseev.
4500
4501- bpo-33361: Fix a bug in :class:`codecs.StreamRecoder` where seeking might
4502  leave old data in a buffer and break subsequent read calls. Patch by Ammar
4503  Askar.
4504
4505- bpo-22454: The :mod:`shlex` module now exposes :func:`shlex.join`, the
4506  inverse of :func:`shlex.split`. Patch by Bo Bayles.
4507
4508- bpo-31922: :meth:`asyncio.AbstractEventLoop.create_datagram_endpoint`: Do
4509  not connect UDP socket when broadcast is allowed. This allows to receive
4510  replies after a UDP broadcast.
4511
4512- bpo-24882: Change ThreadPoolExecutor to use existing idle threads before
4513  spinning up new ones.
4514
4515- bpo-31961: Added support for bytes and path-like objects in
4516  :func:`subprocess.Popen` on Windows.  The *args* parameter now accepts a
4517  :term:`path-like object` if *shell* is ``False`` and a sequence containing
4518  bytes and path-like objects. The *executable* parameter now accepts a
4519  bytes and :term:`path-like object`. The *cwd* parameter now accepts a
4520  bytes object. Based on patch by Anders Lorentsen.
4521
4522- bpo-33123: :class:`pathlib.Path.unlink` now accepts a *missing_ok*
4523  parameter to avoid a :exc:`FileNotFoundError` from being raised. Patch by
4524  Robert Buchholz.
4525
4526- bpo-32941: Allow :class:`mmap.mmap` objects to access the madvise() system
4527  call (through :meth:`mmap.mmap.madvise`).
4528
4529- bpo-22102: Added support for ZIP files with disks set to 0. Such files are
4530  commonly created by builtin tools on Windows when use ZIP64 extension.
4531  Patch by Francisco Facioni.
4532
4533- bpo-32515: trace.py can now run modules via python3 -m trace -t --module
4534  module_name
4535
4536- bpo-32299: Changed :func:`unittest.mock.patch.dict` to return the patched
4537  dictionary when used as context manager. Patch by Vadim Tsander.
4538
4539- bpo-27141: Added a ``__copy__()`` to ``collections.UserList`` and
4540  ``collections.UserDict`` in order to correctly implement shallow copying
4541  of the objects. Patch by Bar Harel.
4542
4543- bpo-31829: ``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) are now
4544  escaped in protocol 0 pickles of Unicode strings. This allows to load them
4545  without loss from files open in text mode in Python 2.
4546
4547- bpo-23395: ``_thread.interrupt_main()`` now avoids setting the Python
4548  error status if the ``SIGINT`` signal is ignored or not handled by Python.
4549
4550Documentation
4551-------------
4552
4553- bpo-36896: Clarify that some types have unstable constructor signature
4554  between Python versions.
4555
4556- bpo-36686: Improve documentation of the stdin, stdout, and stderr
4557  arguments of the ``asyncio.subprocess_exec`` function to specify which
4558  values are supported. Also mention that decoding as text is not supported.
4559
4560  Add a few tests to verify that the various values passed to the std*
4561  arguments actually work.
4562
4563- bpo-36984: Improve version added references in ``typing`` module - by
4564  Anthony Sottile.
4565
4566- bpo-36868: What's new now mentions SSLContext.hostname_checks_common_name
4567  instead of SSLContext.host_flags.
4568
4569- bpo-35924: Add a note to the ``curses.addstr()`` documentation to warn
4570  that multiline strings can cause segfaults because of an ncurses bug.
4571
4572- bpo-36783: Added C API Documentation for Time_FromTimeAndFold and
4573  PyDateTime_FromDateAndTimeAndFold as per PEP 495. Patch by Edison
4574  Abahurire.
4575
4576- bpo-36797: More of the legacy distutils documentation has been either
4577  pruned, or else more clearly marked as being retained solely until the
4578  setuptools documentation covers it independently.
4579
4580- bpo-22865: Add detail to the documentation on the `pty.spawn` function.
4581
4582- bpo-35397: Remove deprecation and document urllib.parse.unwrap(). Patch
4583  contributed by Rémi Lapeyre.
4584
4585- bpo-32995: Added the context variable in glossary.
4586
4587- bpo-33519: Clarify that `copy()` is not part of the `MutableSequence` ABC.
4588
4589- bpo-33482: Make `codecs.StreamRecoder.writelines` take a list of bytes.
4590
4591- bpo-25735: Added documentation for func factorial to indicate that returns
4592  integer values
4593
4594- bpo-20285: Expand object.__doc__ (docstring) to make it clearer. Modify
4595  pydoc.py so that help(object) lists object methods (for other classes,
4596  help omits methods of the object base class.)
4597
4598Tests
4599-----
4600
4601- bpo-37069: Modify test_coroutines, test_cprofile, test_generators,
4602  test_raise, test_ssl and test_yield_from to use
4603  :func:`test.support.catch_unraisable_exception` rather than
4604  :func:`test.support.captured_stderr`.
4605
4606- bpo-37098: Fix test_memfd_create on older Linux Kernels.
4607
4608- bpo-37081: Test with OpenSSL 1.1.1c
4609
4610- bpo-36829: Add :func:`test.support.catch_unraisable_exception`: context
4611  manager catching unraisable exception using :func:`sys.unraisablehook`.
4612
4613- bpo-36915: The main regrtest process now always removes all temporary
4614  directories of worker processes even if they crash or if they are killed
4615  on KeyboardInterrupt (CTRL+c).
4616
4617- bpo-36719: "python3 -m test -jN ..." now continues the execution of next
4618  tests when a worker process crash (CHILD_ERROR state). Previously, the
4619  test suite stopped immediately. Use --failfast to stop at the first error.
4620
4621- bpo-36816: Update Lib/test/selfsigned_pythontestdotnet.pem to match
4622  self-signed.pythontest.net's new TLS certificate.
4623
4624- bpo-35925: Skip httplib and nntplib networking tests when they would
4625  otherwise fail due to a modern OS or distro with a default OpenSSL policy
4626  of rejecting connections to servers with weak certificates.
4627
4628- bpo-36782: Add tests for several C API functions in the :mod:`datetime`
4629  module. Patch by Edison Abahurire.
4630
4631- bpo-36342: Fix test_multiprocessing in test_venv if platform lacks
4632  functioning sem_open.
4633
4634Build
4635-----
4636
4637- bpo-36721: To embed Python into an application, a new ``--embed`` option
4638  must be passed to ``python3-config --libs --embed`` to get ``-lpython3.8``
4639  (link the application to libpython). To support both 3.8 and older, try
4640  ``python3-config --libs --embed`` first and fallback to ``python3-config
4641  --libs`` (without ``--embed``) if the previous command fails.
4642
4643  Add a pkg-config ``python-3.8-embed`` module to embed Python into an
4644  application: ``pkg-config python-3.8-embed --libs`` includes
4645  ``-lpython3.8``. To support both 3.8 and older, try ``pkg-config
4646  python-X.Y-embed --libs`` first and fallback to ``pkg-config python-X.Y
4647  --libs`` (without ``--embed``) if the previous command fails (replace
4648  ``X.Y`` with the Python version).
4649
4650  On the other hand, ``pkg-config python3.8 --libs`` no longer contains
4651  ``-lpython3.8``. C extensions must not be linked to libpython (except on
4652  Android, case handled by the script); this change is backward incompatible
4653  on purpose.
4654
4655- bpo-36786: "make install" now runs compileall in parallel.
4656
4657Windows
4658-------
4659
4660- bpo-36965: include of STATUS_CONTROL_C_EXIT without depending on MSC
4661  compiler
4662
4663- bpo-35926: Update to OpenSSL 1.1.1b for Windows.
4664
4665- bpo-29883: Add Windows support for UDP transports for the Proactor Event
4666  Loop. Patch by Adam Meily.
4667
4668- bpo-33407: The :c:macro:`Py_DEPRECATED()` macro has been implemented for
4669  MSVC.
4670
4671macOS
4672-----
4673
4674- bpo-36231: Support building Python on macOS without /usr/include
4675  installed. As of macOS 10.14, system header files are only available
4676  within an SDK provided by either the Command Line Tools or the Xcode app.
4677
4678IDLE
4679----
4680
4681- bpo-35610: Replace now redundant .context_use_ps1 with .prompt_last_line.
4682  This finishes change started in bpo-31858.
4683
4684- bpo-37038: Make idlelib.run runnable; add test clause.
4685
4686- bpo-36958: Print any argument other than None or int passed to SystemExit
4687  or sys.exit().
4688
4689- bpo-36807: When saving a file, call os.fsync() so bits are flushed to e.g.
4690  USB drive.
4691
4692- bpo-32411: In browser.py, remove extraneous sorting by line number since
4693  dictionary was created in line number order.
4694
4695Tools/Demos
4696-----------
4697
4698- bpo-37053: Handle strings like u"bar" correctly in
4699  Tools/parser/unparse.py. Patch by Chih-Hsuan Yen.
4700
4701C API
4702-----
4703
4704- bpo-36763: Implement the :pep:`587` "Python Initialization Configuration".
4705
4706- bpo-36379: Fix crashes when attempting to use the *modulo* parameter when
4707  ``__ipow__`` is implemented in C.
4708
4709- bpo-37107: Update :c:func:`PyObject_CallMethodObjArgs` and
4710  ``_PyObject_CallMethodIdObjArgs`` to use ``_PyObject_GetMethod`` to avoid
4711  creating a bound method object in many cases. Patch by Michael J.
4712  Sullivan.
4713
4714- bpo-36974: Implement :pep:`590`: Vectorcall: a fast calling protocol for
4715  CPython. This is a new protocol to optimize calls of custom callable
4716  objects.
4717
4718- bpo-36763: ``Py_Main()`` now returns the exitcode rather than calling
4719  ``Py_Exit(exitcode)`` when calling ``PyErr_Print()`` if the current
4720  exception type is ``SystemExit``.
4721
4722- bpo-36922: Add new type flag ``Py_TPFLAGS_METHOD_DESCRIPTOR`` for objects
4723  behaving like unbound methods. These are objects supporting the
4724  optimization given by the ``LOAD_METHOD``/``CALL_METHOD`` opcodes. See PEP
4725  590.
4726
4727- bpo-36728: The :c:func:`PyEval_ReInitThreads` function has been removed
4728  from the C API. It should not be called explicitly: use
4729  :c:func:`PyOS_AfterFork_Child` instead.
4730
4731
4732What's New in Python 3.8.0 alpha 4?
4733===================================
4734
4735*Release date: 2019-05-06*
4736
4737Security
4738--------
4739
4740- bpo-36742: Fixes mishandling of pre-normalization characters in
4741  urlsplit().
4742
4743- bpo-30458: Address CVE-2019-9740 by disallowing URL paths with embedded
4744  whitespace or control characters through into the underlying http client
4745  request.  Such potentially malicious header injection URLs now cause an
4746  http.client.InvalidURL exception to be raised.
4747
4748- bpo-35755: :func:`shutil.which` now uses ``os.confstr("CS_PATH")`` if
4749  available and if the :envvar:`PATH` environment variable is not set.
4750  Remove also the current directory from :data:`posixpath.defpath`. On Unix,
4751  :func:`shutil.which` and the :mod:`subprocess` module no longer search the
4752  executable in the current directory if the :envvar:`PATH` environment
4753  variable is not set.
4754
4755Core and Builtins
4756-----------------
4757
4758- bpo-36722: In debug build, import now also looks for C extensions compiled
4759  in release mode and for C extensions compiled in the stable ABI.
4760
4761- bpo-32849: Fix Python Initialization code on FreeBSD to detect properly
4762  when stdin file descriptor (fd 0) is invalid.
4763
4764- bpo-36623: Remove parser headers and related function declarations that
4765  lack implementations after the removal of pgen.
4766
4767- bpo-20180: ``dict.pop()`` is now up to 33% faster thanks to Argument
4768  Clinic. Patch by Inada Naoki.
4769
4770- bpo-36611: Debug memory allocators: disable serialno field by default from
4771  debug hooks on Python memory allocators to reduce the memory footprint by
4772  5%. Enable :mod:`tracemalloc` to get the traceback where a memory block
4773  has been allocated when a fatal memory error is logged to decide where to
4774  put a breakpoint. Compile Python with ``PYMEM_DEBUG_SERIALNO`` defined to
4775  get back the field.
4776
4777- bpo-36588: On AIX, :attr:`sys.platform` doesn't contain the major version
4778  anymore. Always return ``'aix'``, instead of ``'aix3'`` .. ``'aix7'``.
4779  Since older Python versions include the version number, it is recommended
4780  to always use ``sys.platform.startswith('aix')``. Contributed by M. Felt.
4781
4782- bpo-36549: Change str.capitalize to use titlecase for the first character
4783  instead of uppercase.
4784
4785- bpo-36540: Implement :pep:`570` (Python positional-only parameters). Patch
4786  by Pablo Galindo.
4787
4788- bpo-36475: :c:func:`PyEval_AcquireLock` and :c:func:`PyEval_AcquireThread`
4789  now terminate the current thread if called while the interpreter is
4790  finalizing, making them consistent with :c:func:`PyEval_RestoreThread`,
4791  :c:func:`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`.
4792
4793- bpo-36504: Fix signed integer overflow in _ctypes.c's
4794  ``PyCArrayType_new()``.
4795
4796- bpo-20844: Fix running script with encoding cookie and LF line ending may
4797  fail on Windows.
4798
4799- bpo-24214: Fixed support of the surrogatepass error handler in the UTF-8
4800  incremental decoder.
4801
4802- bpo-36452: Changing ``dict`` keys during iteration of the dict itself,
4803  ``keys()``, ``values()``, or ``items()`` will now be detected in certain
4804  corner cases where keys are deleted/added so that the number of keys isn't
4805  changed. A `RuntimeError` will be raised after ``len(dict)`` iterations.
4806  Contributed by Thomas Perl.
4807
4808- bpo-36459: Fix a possible double ``PyMem_FREE()`` due to tokenizer.c's
4809  ``tok_nextc()``.
4810
4811- bpo-36433: Fixed TypeError message in classmethoddescr_call.
4812
4813- bpo-36430: Fix a possible reference leak in :func:`itertools.count`.
4814
4815- bpo-36440: Include node names in ``ParserError`` messages, instead of
4816  numeric IDs. Patch by A. Skrobov.
4817
4818- bpo-36143: Regenerate :mod:`keyword` from the Grammar and Tokens file
4819  using pgen. Patch by Pablo Galindo.
4820
4821- bpo-18372: Add missing :c:func:`PyObject_GC_Track` calls in the
4822  :mod:`pickle` module. Patch by Zackery Spytz.
4823
4824Library
4825-------
4826
4827- bpo-35952: Fix pythoninfo when the compiler is missing.
4828
4829- bpo-28238: The ``.find*()`` methods of xml.etree.ElementTree can now
4830  search for wildcards like ``{*}tag`` and ``{ns}*`` that match a tag in any
4831  namespace or all tags in a namespace.  Patch by Stefan Behnel.
4832
4833- bpo-26978: `pathlib.path.link_to()` is now implemented. It creates a hard
4834  link pointing to a path.
4835
4836- bpo-1613500: :class:`fileinput.FileInput` now uses the input file mode to
4837  correctly set the output file mode (previously it was hardcoded to
4838  ``'w'``)  when ``inplace=True`` is passed to its constructor.
4839
4840- bpo-36734: Fix compilation of ``faulthandler.c`` on HP-UX. Initialize
4841  ``stack_t current_stack`` to zero using ``memset()``.
4842
4843- bpo-13611: The xml.etree.ElementTree packages gained support for C14N 2.0
4844  serialisation. Patch by Stefan Behnel.
4845
4846- bpo-36669: Add missing matrix multiplication operator support to
4847  weakref.proxy.
4848
4849- bpo-36676: The XMLParser() in xml.etree.ElementTree provides namespace
4850  prefix context to the parser target if it defines the callback methods
4851  "start_ns()" and/or "end_ns()". Patch by Stefan Behnel.
4852
4853- bpo-36673: The TreeBuilder and XMLPullParser in xml.etree.ElementTree
4854  gained support for parsing comments and processing instructions. Patch by
4855  Stefan Behnel.
4856
4857- bpo-36650: The C version of functools.lru_cache() was treating calls with
4858  an empty ``**kwargs`` dictionary as being distinct from calls with no
4859  keywords at all. This did not result in an incorrect answer, but it did
4860  trigger an unexpected cache miss.
4861
4862- bpo-28552: Fix :mod:`distutils.sysconfig` if :data:`sys.executable` is
4863  ``None`` or an empty string: use :func:`os.getcwd` to initialize
4864  ``project_base``.  Fix also the distutils build command: don't use
4865  :data:`sys.executable` if it is ``None`` or an empty string.
4866
4867- bpo-35755: :func:`shutil.which` and
4868  :func:`distutils.spawn.find_executable` now use ``os.confstr("CS_PATH")``
4869  if available instead of :data:`os.defpath`, if the ``PATH`` environment
4870  variable is not set. Moreover, don't use ``os.confstr("CS_PATH")`` nor
4871  :data:`os.defpath` if the ``PATH`` environment variable is set to an empty
4872  string.
4873
4874- bpo-25430: improve performance of ``IPNetwork.__contains__()``
4875
4876- bpo-30485: Path expressions in xml.etree.ElementTree can now avoid
4877  explicit namespace prefixes for tags (or the "{namespace}tag" notation) by
4878  passing a default namespace with an empty string prefix.
4879
4880- bpo-36613: Fix :mod:`asyncio` wait() not removing callback if exception
4881
4882- bpo-36598: Fix ``isinstance`` check for Mock objects with spec when the
4883  code is executed under tracing. Patch by Karthikeyan Singaravelan.
4884
4885- bpo-18748: In development mode (:option:`-X` ``dev``) and in debug build,
4886  the :class:`io.IOBase` destructor now logs ``close()`` exceptions. These
4887  exceptions are silent by default in release mode.
4888
4889- bpo-36575: The ``_lsprof`` module now uses internal timer same to
4890  ``time.perf_counter()`` by default. ``gettimeofday(2)`` was used on Unix.
4891  New timer has better resolution on most Unix platforms and timings are no
4892  longer impacted by system clock updates since ``perf_counter()`` is
4893  monotonic. Patch by Inada Naoki.
4894
4895- bpo-33461: ``json.loads`` now emits ``DeprecationWarning`` when
4896  ``encoding`` option is specified.  Patch by Matthias Bussonnier.
4897
4898- bpo-36559: The random module now prefers the lean internal _sha512 module
4899  over hashlib for seed(version=2) to optimize import time.
4900
4901- bpo-17561: Set backlog=None as the default for socket.create_server.
4902
4903- bpo-34373: Fix :func:`time.mktime` error handling on AIX for year before
4904  1970.
4905
4906- bpo-36232: Improve error message when trying to open existing DBM database
4907  that actually doesn't exist. Patch by Marco Rougeth.
4908
4909- bpo-36546: Add statistics.quantiles()
4910
4911- bpo-36050: Optimized ``http.client.HTTPResponse.read()`` for large
4912  response. Patch by Inada Naoki.
4913
4914- bpo-36522: If *debuglevel* is set to >0 in :mod:`http.client`, print all
4915  values for headers with multiple values for the same header name. Patch by
4916  Matt Houglum.
4917
4918- bpo-36492: Deprecated passing required arguments like *func* as keyword
4919  arguments in functions which should accept arbitrary keyword arguments and
4920  pass them to other function. Arbitrary keyword arguments (even with names
4921  "self" and "func") can now be passed to these functions if the required
4922  arguments are passed as positional arguments.
4923
4924- bpo-27181: Add statistics.geometric_mean().
4925
4926- bpo-30427: ``os.path.normcase()`` relies on ``os.fspath()`` to check the
4927  type of its argument. Redundant checks have been removed from its
4928  ``posixpath.normcase()`` and ``ntpath.normcase()`` implementations. Patch
4929  by Wolfgang Maier.
4930
4931- bpo-36385: Stop rejecting IPv4 octets for being ambiguously octal. Leading
4932  zeros are ignored, and no longer are assumed to specify octal octets.
4933  Octets are always decimal numbers. Octets must still be no more than three
4934  digits, including leading zeroes.
4935
4936- bpo-36434: Errors during writing to a ZIP file no longer prevent to
4937  properly close it.
4938
4939- bpo-36407: Fixed wrong indentation writing for CDATA section in
4940  xml.dom.minidom. Patch by Vladimir Surjaninov.
4941
4942- bpo-36326: inspect.getdoc() can now find docstrings for member objects
4943  when __slots__ is a dictionary.
4944
4945- bpo-36366: Calling ``stop()`` on an unstarted or stopped
4946  :func:`unittest.mock.patch` object will now return `None` instead of
4947  raising :exc:`RuntimeError`, making the method idempotent. Patch by
4948  Karthikeyan Singaravelan.
4949
4950- bpo-36348: The :meth:`imap.IMAP4.logout` method no longer ignores silently
4951  arbitrary exceptions.
4952
4953- bpo-31904: Add time module support and fix test_time faiures for VxWorks.
4954
4955- bpo-36227: Added support for keyword arguments `default_namespace` and
4956  `xml_declaration` in functions ElementTree.tostring() and
4957  ElementTree.tostringlist().
4958
4959- bpo-36004: Added new alternate constructors
4960  :meth:`datetime.date.fromisocalendar` and
4961  :meth:`datetime.datetime.fromisocalendar`, which construct date objects
4962  from ISO year, week number and weekday; these are the inverse of each
4963  class's ``isocalendar`` method. Patch by Paul Ganssle.
4964
4965- bpo-35936: :mod:`modulefinder` no longer depends on the deprecated
4966  :mod:`imp` module, and the initializer for
4967  :class:`modulefinder.ModuleFinder` now has immutable default arguments.
4968  Patch by Brandt Bucher.
4969
4970- bpo-35376: :mod:`modulefinder` correctly handles modules that have the
4971  same name as a bad package. Patch by Brandt Bucher.
4972
4973- bpo-17396: :mod:`modulefinder` no longer crashes when encountering syntax
4974  errors in followed imports. Patch by Brandt Bucher.
4975
4976- bpo-35934: Added :meth:`~socket.create_server()` and
4977  :meth:`~socket.has_dualstack_ipv6()` convenience functions to automate the
4978  necessary tasks usually involved when creating a server socket, including
4979  accepting both IPv4 and IPv6 connections on the same socket.  (Contributed
4980  by Giampaolo Rodola in :issue:`17561`.)
4981
4982- bpo-23078: Add support for :func:`classmethod` and :func:`staticmethod` to
4983  :func:`unittest.mock.create_autospec`.  Initial patch by Felipe Ochoa.
4984
4985- bpo-35416: Fix potential resource warnings in distutils. Patch by Mickaël
4986  Schoentgen.
4987
4988- bpo-25451: Add transparency methods to :class:`tkinter.PhotoImage`.  Patch
4989  by Zackery Spytz.
4990
4991- bpo-35082: Don't return deleted attributes when calling dir on a
4992  :class:`unittest.mock.Mock`.
4993
4994- bpo-34547: :class:`wsgiref.handlers.BaseHandler` now handles abrupt client
4995  connection terminations gracefully. Patch by Petter Strandmark.
4996
4997- bpo-31658: :func:`xml.sax.parse` now supports :term:`path-like <path-like
4998  object>`. Patch by Mickaël Schoentgen.
4999
5000- bpo-34139: Remove stale unix datagram socket before binding
5001
5002- bpo-33530: Implemented Happy Eyeballs in `asyncio.create_connection()`.
5003  Added two new arguments, *happy_eyeballs_delay* and *interleave*, to
5004  specify Happy Eyeballs behavior.
5005
5006- bpo-33291: Do not raise AttributeError when calling the inspect functions
5007  isgeneratorfunction, iscoroutinefunction, isasyncgenfunction on a method
5008  created from an arbitrary callable. Instead, return False.
5009
5010- bpo-31310: Fix the multiprocessing.semaphore_tracker so it is reused by
5011  child processes
5012
5013- bpo-31292: Fix ``setup.py check --restructuredtext`` for files containing
5014  ``include`` directives.
5015
5016Documentation
5017-------------
5018
5019- bpo-36625: Remove obsolete comments from docstrings in fractions.Fraction
5020
5021- bpo-30840: Document relative imports
5022
5023- bpo-36523: Add docstring for io.IOBase.writelines().
5024
5025- bpo-36425: New documentation translation: `Simplified Chinese
5026  <https://docs.python.org/zh-cn/>`_.
5027
5028- bpo-36345: Avoid the duplication of code from ``Tools/scripts/serve.py``
5029  in using the :rst:dir:`literalinclude` directive for the basic
5030  wsgiref-based web server in the documentation of :mod:`wsgiref`.
5031  Contributed by Stéphane Wirtel.
5032
5033- bpo-36345: Using the code of the ``Tools/scripts/serve.py`` script as an
5034  example in the :mod:`wsgiref` documentation.  Contributed by Stéphane
5035  Wirtel.
5036
5037- bpo-36157: Added Documention for  PyInterpreterState_Main().
5038
5039- bpo-33043: Updates the docs.python.org page with the addition of a
5040  'Contributing to Docs' link at the end of the page (between 'Reporting
5041  Bugs' and 'About Documentation'). Updates the 'Found a Bug' page with
5042  additional links and information in the Documentation Bugs section.
5043
5044- bpo-35581: @typing.type_check_only now allows type stubs to mark functions
5045  and classes not available during runtime.
5046
5047- bpo-33832: Add glossary entry for 'magic method'.
5048
5049- bpo-32913: Added re.Match.groupdict example to regex HOWTO.
5050
5051Tests
5052-----
5053
5054- bpo-36719: regrtest now always detects uncollectable objects. Previously,
5055  the check was only enabled by ``--findleaks``. The check now also works
5056  with ``-jN/--multiprocess N``. ``--findleaks`` becomes a deprecated alias
5057  to ``--fail-env-changed``.
5058
5059- bpo-36725: When using mulitprocessing mode (-jN), regrtest now better
5060  reports errors if a worker process fails, and it exits immediately on a
5061  worker thread failure or when interrupted.
5062
5063- bpo-36454: Change test_time.test_monotonic() to test only the lower bound
5064  of elapsed time after a sleep command rather than the upper bound. This
5065  prevents unnecessary test failures on slow buildbots. Patch by Victor
5066  Stinner.
5067
5068- bpo-32424: Improve test coverage for xml.etree.ElementTree. Patch by
5069  Gordon P. Hemsley.
5070
5071- bpo-32424: Fix typo in test_cyclic_gc() test for xml.etree.ElementTree.
5072  Patch by Gordon P. Hemsley.
5073
5074- bpo-36635: Add a new :mod:`_testinternalcapi` module to test the internal
5075  C API.
5076
5077- bpo-36629: Fix ``test_imap4_host_default_value()`` of ``test_imaplib``:
5078  catch also :data:`errno.ENETUNREACH` error.
5079
5080- bpo-36611: Fix ``test_sys.test_getallocatedblocks()`` when
5081  :mod:`tracemalloc` is enabled.
5082
5083- bpo-36560: Fix reference leak hunting in regrtest: compute also deltas (of
5084  reference count, allocated memory blocks, file descriptor count) during
5085  warmup, to ensure that everything is initialized before starting to hunt
5086  reference leaks.
5087
5088- bpo-36565: Fix reference hunting (``python3 -m test -R 3:3``) when Python
5089  has no built-in abc module.
5090
5091- bpo-31904: Port test_resource to VxWorks: skip tests cases setting
5092  RLIMIT_FSIZE and RLIMIT_CPU.
5093
5094- bpo-31904: Fix test_tabnanny on VxWorks: adjust ENOENT error message.
5095
5096- bpo-36436: Fix ``_testcapi.pymem_buffer_overflow()``: handle memory
5097  allocation failure.
5098
5099- bpo-31904: Fix test_utf8_mode on VxWorks: Python always use UTF-8 on
5100  VxWorks.
5101
5102- bpo-36341: Fix tests that may fail with PermissionError upon calling
5103  bind() on AF_UNIX sockets.
5104
5105Build
5106-----
5107
5108- bpo-36747: Remove the stale scriptsinstall Makefile target.
5109
5110- bpo-21536: On Unix, C extensions are no longer linked to libpython except
5111  on Android and Cygwin.
5112
5113  It is now possible for a statically linked Python to load a C extension
5114  built using a shared library Python.
5115
5116  When Python is embedded, ``libpython`` must not be loaded with
5117  ``RTLD_LOCAL``, but ``RTLD_GLOBAL`` instead. Previously, using
5118  ``RTLD_LOCAL``, it was already not possible to load C extensions which
5119  were not linked to ``libpython``, such as C extensions of the standard
5120  library built by the ``*shared*`` section of ``Modules/Setup``.
5121
5122  distutils, python-config and python-config.py have been modified.
5123
5124- bpo-36707: ``./configure --with-pymalloc`` no longer adds the ``m`` flag
5125  to SOABI (sys.implementation.cache_tag). Enabling or disabling pymalloc
5126  has no impact on the ABI.
5127
5128- bpo-36635: Change ``PyAPI_FUNC(type)``, ``PyAPI_DATA(type)`` and
5129  ``PyMODINIT_FUNC`` macros of ``pyport.h`` when ``Py_BUILD_CORE_MODULE`` is
5130  defined. The ``Py_BUILD_CORE_MODULE`` define must be now be used to build
5131  a C extension as a dynamic library accessing Python internals: export the
5132  PyInit_xxx() function in DLL exports on Windows.
5133
5134- bpo-31904: Don't build the ``_crypt`` extension on VxWorks.
5135
5136- bpo-36618: Add ``-fmax-type-align=8`` to CFLAGS when clang compiler is
5137  detected. The pymalloc memory allocator aligns memory on 8 bytes. On
5138  x86-64, clang expects alignment on 16 bytes by default and so uses MOVAPS
5139  instruction which can lead to segmentation fault. Instruct clang that
5140  Python is limited to alignment on 8 bytes to use MOVUPS instruction
5141  instead: slower but don't trigger a SIGSEGV if the memory is not aligned
5142  on 16 bytes. Sadly, the flag must be added to ``CFLAGS`` and not just
5143  ``CFLAGS_NODIST``, since third party C extensions can have the same issue.
5144
5145- bpo-36605: ``make tags`` and ``make TAGS`` now also parse
5146  ``Modules/_io/*.c`` and ``Modules/_io/*.h``.
5147
5148- bpo-36465: Release builds and debug builds are now ABI compatible:
5149  defining the ``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS``
5150  macro, which introduces the only ABI incompatibility. The
5151  ``Py_TRACE_REFS`` macro, which adds the :func:`sys.getobjects` function
5152  and the :envvar:`PYTHONDUMPREFS` environment variable, can be set using
5153  the new ``./configure --with-trace-refs`` build option.
5154
5155- bpo-36577: setup.py now correctly reports missing OpenSSL headers and
5156  libraries again.
5157
5158- bpo-36544: Fix regression introduced in bpo-36146 refactoring setup.py
5159
5160- bpo-36508: ``python-config --ldflags`` no longer includes flags of the
5161  ``LINKFORSHARED`` variable. The ``LINKFORSHARED`` variable must only be
5162  used to build executables.
5163
5164- bpo-36503: Remove references to "aix3" and "aix4". Patch by M. Felt.
5165
5166Windows
5167-------
5168
5169- bpo-35920: Added platform.win32_edition() and platform.win32_is_iot().
5170  Added support for cross-compiling packages for Windows ARM32. Skip tests
5171  that are not expected to work on Windows IoT Core ARM32.
5172
5173- bpo-36649: Remove trailing spaces for registry keys when installed via the
5174  Store.
5175
5176- bpo-34144: Fixed activate.bat to correctly update codepage when chcp.com
5177  returns dots in output. Patch by Lorenz Mende.
5178
5179- bpo-36509: Added preset-iot layout for Windows IoT ARM containers. This
5180  layout doesn't contain UI components like tkinter or IDLE. It also doesn't
5181  contain files to support on-target builds since Windows ARM32 builds must
5182  be cross-compiled when using MSVC.
5183
5184- bpo-35941: enum_certificates function of the ssl module now returns
5185  certificates from all available certificate stores inside windows in a
5186  query instead of returning only certificates from the system wide
5187  certificate store. This includes certificates from these certificate
5188  stores: local machine, local machine enterprise, local machine group
5189  policy, current user, current user group policy, services, users.
5190  ssl.enum_crls() function is changed in the same way to return all
5191  certificate revocation lists inside the windows certificate revocation
5192  list stores.
5193
5194- bpo-36441: Fixes creating a venv when debug binaries are installed.
5195
5196- bpo-36085: Enable better DLL resolution on Windows by using safe DLL
5197  search paths and adding :func:`os.add_dll_directory`.
5198
5199- bpo-36010: Add the venv standard library module to the nuget distribution
5200  for Windows.
5201
5202- bpo-29515: Add the following socket module constants on Windows:
5203  IPPROTO_AH IPPROTO_CBT IPPROTO_DSTOPTS IPPROTO_EGP IPPROTO_ESP
5204  IPPROTO_FRAGMENT IPPROTO_GGP IPPROTO_HOPOPTS IPPROTO_ICLFXBM
5205  IPPROTO_ICMPV6 IPPROTO_IDP IPPROTO_IGMP IPPROTO_IGP IPPROTO_IPV4
5206  IPPROTO_IPV6 IPPROTO_L2TP IPPROTO_MAX IPPROTO_ND IPPROTO_NONE IPPROTO_PGM
5207  IPPROTO_PIM IPPROTO_PUP IPPROTO_RDP IPPROTO_ROUTING IPPROTO_SCTP
5208  IPPROTO_ST
5209
5210- bpo-35947: Added current version of libffi to cpython-source-deps. Change
5211  _ctypes to use current version of libffi on Windows.
5212
5213- bpo-34060: Report system load when running test suite on Windows. Patch by
5214  Ammar Askar. Based on prior work by Jeremy Kloth.
5215
5216- bpo-31512: With the Windows 10 Creators Update, non-elevated users can now
5217  create symlinks as long as the computer has Developer Mode enabled.
5218
5219macOS
5220-----
5221
5222- bpo-34602: Avoid failures setting macOS stack resource limit with
5223  resource.setrlimit. This reverts an earlier fix for bpo-18075 which forced
5224  a non-default stack size when building the interpreter executable on
5225  macOS.
5226
5227IDLE
5228----
5229
5230- bpo-36429: Fix starting IDLE with pyshell. Add idlelib.pyshell alias at
5231  top; remove pyshell alias at bottom. Remove obsolete __name__=='__main__'
5232  command.
5233
5234Tools/Demos
5235-----------
5236
5237- bpo-14546: Fix the argument handling in Tools/scripts/lll.py.
5238
5239C API
5240-----
5241
5242- bpo-36763: Fix memory leak in :c:func:`Py_SetStandardStreamEncoding`:
5243  release memory if the function is called twice.
5244
5245- bpo-36641: :c:macro:`PyDoc_VAR(name)` and
5246  :c:macro:`PyDoc_STRVAR(name,str)` now create ``static const char name[]``
5247  instead of ``static char name[]``.  Patch by Inada Naoki.
5248
5249- bpo-36389: Change the value of ``CLEANBYTE``, ``DEADDYTE`` and
5250  ``FORBIDDENBYTE`` internal constants used by debug hooks on Python memory
5251  allocators (:c:func:`PyMem_SetupDebugHooks` function). Byte patterns
5252  ``0xCB``, ``0xDB`` and ``0xFB`` have been replaced with ``0xCD``, ``0xDD``
5253  and ``0xFD`` to use the same values than Windows CRT debug ``malloc()``
5254  and ``free()``.
5255
5256- bpo-36443: Since Python 3.7.0, calling :c:func:`Py_DecodeLocale` before
5257  :c:func:`Py_Initialize` produces mojibake if the ``LC_CTYPE`` locale is
5258  coerced and/or if the UTF-8 Mode is enabled by the user configuration. The
5259  LC_CTYPE coercion and UTF-8 Mode are now disabled by default to fix the
5260  mojibake issue. They must now be enabled explicitly (opt-in) using the new
5261  :c:func:`_Py_PreInitialize` API with ``_PyPreConfig``.
5262
5263- bpo-36025: Fixed an accidental change to the datetime C API where the
5264  arguments to the :c:func:`PyDate_FromTimestamp` function were incorrectly
5265  interpreted as a single timestamp rather than an arguments tuple, which
5266  causes existing code to start raising :exc:`TypeError`. The
5267  backwards-incompatible change was only present in alpha releases of Python
5268  3.8. Patch by Paul Ganssle.
5269
5270- bpo-35810: Modify ``PyObject_Init`` to correctly increase the refcount of
5271  heap- allocated Type objects. Also fix the refcounts of the heap-allocated
5272  types that were either doing this manually or not decreasing the type's
5273  refcount in tp_dealloc
5274
5275
5276What's New in Python 3.8.0 alpha 3?
5277===================================
5278
5279*Release date: 2019-03-25*
5280
5281Security
5282--------
5283
5284- bpo-36216: Changes urlsplit() to raise ValueError when the URL contains
5285  characters that decompose under IDNA encoding (NFKC-normalization) into
5286  characters that affect how the URL is parsed.
5287
5288- bpo-35121: Don't send cookies of domain A without Domain attribute to
5289  domain B when domain A is a suffix match of domain B while using a
5290  cookiejar with :class:`http.cookiejar.DefaultCookiePolicy` policy. Patch
5291  by Karthikeyan Singaravelan.
5292
5293Core and Builtins
5294-----------------
5295
5296- bpo-36421: Fix a possible double decref in _ctypes.c's
5297  ``PyCArrayType_new()``.
5298
5299- bpo-36412: Fix a possible crash when creating a new dictionary.
5300
5301- bpo-36398: Fix a possible crash in ``structseq_repr()``.
5302
5303- bpo-36256: Fix bug in parsermodule when parsing a state in a DFA that has
5304  two or more arcs with labels of the same type. Patch by Pablo Galindo.
5305
5306- bpo-36365: repr(structseq) is no longer limited to 512 bytes.
5307
5308- bpo-36374: Fix a possible null pointer dereference in
5309  ``merge_consts_recursive()``. Patch by Zackery Spytz.
5310
5311- bpo-36236: At Python initialization, the current directory is no longer
5312  prepended to :data:`sys.path` if it has been removed.
5313
5314- bpo-36352: Python initialization now fails with an error, rather than
5315  silently truncating paths, if a path is too long.
5316
5317- bpo-36301: Python initialization now fails if decoding ``pybuilddir.txt``
5318  configuration file fails at startup.
5319
5320- bpo-36333: Fix leak in _PyRuntimeState_Fini. Contributed by Stéphane
5321  Wirtel.
5322
5323- bpo-36332: The builtin :func:`compile` can now handle AST objects that
5324  contain assignment expressions. Patch by Pablo Galindo.
5325
5326- bpo-36282: Improved error message for too much positional arguments in
5327  some builtin functions.
5328
5329- bpo-30040: New empty dict uses fewer memory for now.  It used more memory
5330  than empty dict created by ``dict.clear()``.  And empty dict creation and
5331  deletion is about 2x faster.  Patch by Inada Naoki.
5332
5333- bpo-36262: Fix an unlikely memory leak on conversion from string to float
5334  in the function ``_Py_dg_strtod()`` used by ``float(str)``,
5335  ``complex(str)``, :func:`pickle.load`, :func:`marshal.load`, etc.
5336
5337- bpo-36252: Update Unicode databases to version 12.0.0.
5338
5339- bpo-36218: Fix a segfault occurring when sorting a list of heterogeneous
5340  values. Patch contributed by Rémi Lapeyre and Elliot Gorokhovsky.
5341
5342- bpo-36188: Cleaned up left-over vestiges of Python 2 unbound method
5343  handling in method objects and documentation. Patch by Martijn Pieters
5344
5345- bpo-36124: Add a new interpreter-specific dict and expose it in the C-API
5346  via PyInterpreterState_GetDict().  This parallels PyThreadState_GetDict().
5347  However, extension modules should continue using PyModule_GetState() for
5348  their own internal per-interpreter state.
5349
5350- bpo-35975: Add a ``feature_version`` flag to ``ast.parse()`` (documented)
5351  and ``compile()`` (hidden) that allows tweaking the parser to support
5352  older versions of the grammar. In particular, if ``feature_version`` is 5
5353  or 6, the hacks for the ``async`` and ``await`` keyword from PEP 492 are
5354  reinstated. (For 7 or higher, these are unconditionally treated as
5355  keywords, but they are still special tokens rather than ``NAME`` tokens
5356  that the parser driver recognizes.)
5357
5358- bpo-31904: Use UTF-8 as the system encoding on VxWorks.
5359
5360- bpo-36048: The :meth:`~object.__index__` special method will be used
5361  instead of :meth:`~object.__int__` for implicit conversion of Python
5362  numbers to C integers.  Using the ``__int__()`` method in implicit
5363  conversions has been deprecated.
5364
5365- bpo-35808: Retire pgen and use a modified version of pgen2 to generate the
5366  parser. Patch by Pablo Galindo.
5367
5368Library
5369-------
5370
5371- bpo-36401: The class documentation created by pydoc now has a separate
5372  section for readonly properties.
5373
5374- bpo-36320: The typing.NamedTuple() class has deprecated the _field_types
5375  attribute in favor of the __annotations__ attribute which carried the same
5376  information. Also, both attributes were converted from OrderedDict to a
5377  regular dict.
5378
5379- bpo-34745: Fix :mod:`asyncio` ssl memory issues caused by circular
5380  references
5381
5382- bpo-36324: Add method to statistics.NormalDist for computing the inverse
5383  cumulative normal distribution.
5384
5385- bpo-36321: collections.namedtuple() misspelled the name of an attribute.
5386  To be consistent with typing.NamedTuple, the attribute name should have
5387  been "_field_defaults" instead of "_fields_defaults".  For backwards
5388  compatibility, both spellings are now created.  The misspelled version may
5389  be removed in the future.
5390
5391- bpo-36297: "unicode_internal" codec is removed.  It was deprecated since
5392  Python 3.3. Patch by Inada Naoki.
5393
5394- bpo-36298: Raise ModuleNotFoundError in pyclbr when a module can't be
5395  found. Thanks to 'mental' for the bug report.
5396
5397- bpo-36268: Switch the default format used for writing tars with
5398  mod:`tarfile` to the modern POSIX.1-2001 pax standard, from the
5399  vendor-specific GNU. Contributed by C.A.M. Gerlach.
5400
5401- bpo-36285: Fix integer overflows in the array module. Patch by Stephan
5402  Hohe.
5403
5404- bpo-31904: Add _signal module support for VxWorks.
5405
5406- bpo-36272: :mod:`logging` does not silently ignore RecursionError anymore.
5407  Patch contributed by Rémi Lapeyre.
5408
5409- bpo-36280: Add a kind field to ast.Constant. It is 'u' if the literal has
5410  a 'u' prefix (i.e. a Python 2 style unicode literal), else None.
5411
5412- bpo-35931: The :mod:`pdb` ``debug`` command now gracefully handles all
5413  exceptions.
5414
5415- bpo-36251: Fix format strings used for stderrprinter and re.Match reprs.
5416  Patch by Stephan Hohe.
5417
5418- bpo-36235: Fix ``CFLAGS`` in ``customize_compiler()`` of
5419  ``distutils.sysconfig``: when the ``CFLAGS`` environment variable is
5420  defined, don't override ``CFLAGS`` variable with the ``OPT`` variable
5421  anymore. Initial patch written by David Malcolm.
5422
5423- bpo-35807: Update ensurepip to install pip 19.0.3 and setuptools 40.8.0.
5424
5425- bpo-36139: Release GIL when closing :class:`~mmap.mmap` objects.
5426
5427- bpo-36179: Fix two unlikely reference leaks in _hashopenssl. The leaks
5428  only occur in out-of-memory cases.
5429
5430- bpo-36169: Add overlap() method to statistics.NormalDist.  Computes the
5431  overlapping coefficient for two normal distributions.
5432
5433- bpo-36103: Default buffer size used by ``shutil.copyfileobj()`` is changed
5434  from 16 KiB to 64 KiB on non-Windows platform to reduce system call
5435  overhead. Contributed by Inada Naoki.
5436
5437- bpo-36130: Fix ``pdb`` with ``skip=...`` when stepping into a frame
5438  without a ``__name__`` global.  Patch by Anthony Sottile.
5439
5440- bpo-35652: shutil.copytree(copy_function=...) erroneously pass DirEntry
5441  instead of a path string.
5442
5443- bpo-35178: Ensure custom :func:`warnings.formatwarning` function can
5444  receive `line` as positional argument. Based on patch by Tashrif Billah.
5445
5446- bpo-36106: Resolve potential name clash with libm's sinpi(). Patch by
5447  Dmitrii Pasechnik.
5448
5449- bpo-36091: Clean up reference to async generator in Lib/types. Patch by
5450  Henry Chen.
5451
5452- bpo-36043: :class:`FileCookieJar` supports :term:`path-like object`.
5453  Contributed by Stéphane Wirtel
5454
5455- bpo-35899: Enum has been fixed to correctly handle empty strings and
5456  strings with non-Latin characters (ie. 'α', 'א') without crashing.
5457  Original patch contributed by Maxwell. Assisted by Stéphane Wirtel.
5458
5459- bpo-21269: Add ``args`` and ``kwargs`` properties to mock call objects.
5460  Contributed by Kumar Akshay.
5461
5462- bpo-30670: `pprint.pp` has been added to pretty-print objects with
5463  dictionary keys being sorted with their insertion order by default.
5464  Parameter *sort_dicts* has been added to `pprint.pprint`, `pprint.pformat`
5465  and `pprint.PrettyPrinter`. Contributed by Rémi Lapeyre.
5466
5467- bpo-35843: Implement ``__getitem__`` for ``_NamespacePath``.  Patch by
5468  Anthony Sottile.
5469
5470- bpo-35802: Clean up code which checked presence of ``os.stat`` /
5471  ``os.lstat`` / ``os.chmod`` which are always present.  Patch by Anthony
5472  Sottile.
5473
5474- bpo-35715: Librates the return value of a ProcessPoolExecutor
5475  _process_worker after it's no longer needed to free memory
5476
5477- bpo-35493: Use :func:`multiprocessing.connection.wait` instead of polling
5478  each 0.2 seconds for worker updates in :class:`multiprocessing.Pool`.
5479  Patch by Pablo Galindo.
5480
5481- bpo-35661: Store the venv prompt in pyvenv.cfg.
5482
5483- bpo-35121: Don't set cookie for a request when the request path is a
5484  prefix match of the cookie's path attribute but doesn't end with "/".
5485  Patch by Karthikeyan Singaravelan.
5486
5487- bpo-21478: Calls to a child function created with
5488  :func:`unittest.mock.create_autospec` should propagate to the parent.
5489  Patch by Karthikeyan Singaravelan.
5490
5491- bpo-35198: Fix C++ extension compilation on AIX
5492
5493Documentation
5494-------------
5495
5496- bpo-36329: Declare the path of the Python binary for the usage of
5497  ``Tools/scripts/serve.py`` when executing ``make -C Doc/ serve``.
5498  Contributed by Stéphane Wirtel
5499
5500- bpo-36138: Improve documentation about converting datetime.timedelta to
5501  scalars.
5502
5503- bpo-21314: A new entry was added to the Core Language Section of the
5504  Programming FAQ, which explaines the usage of slash(/) in the signature of
5505  a function. Patch by Lysandros Nikolaou
5506
5507Tests
5508-----
5509
5510- bpo-36234: test_posix.PosixUidGidTests: add tests for invalid uid/gid type
5511  (str). Initial patch written by David Malcolm.
5512
5513- bpo-29571: Fix ``test_re.test_locale_flag()``:  use
5514  ``locale.getpreferredencoding()`` rather than ``locale.getlocale()`` to
5515  get the locale encoding. With some locales, ``locale.getlocale()`` returns
5516  the wrong encoding.
5517
5518- bpo-36123: Fix race condition in test_socket.
5519
5520Build
5521-----
5522
5523- bpo-36356: Fix leaks that led to build failure when configured with
5524  address sanitizer.
5525
5526- bpo-36146: Add ``TEST_EXTENSIONS`` constant to ``setup.py`` to allow to
5527  not build test extensions like ``_testcapi``.
5528
5529- bpo-36146: Fix setup.py on macOS: only add ``/usr/include/ffi`` to include
5530  directories of _ctypes, not for all extensions.
5531
5532- bpo-31904: Enable build system to cross-build for VxWorks RTOS.
5533
5534Windows
5535-------
5536
5537- bpo-36312: Fixed decoders for the following code pages: 50220, 50221,
5538  50222, 50225, 50227, 50229, 57002 through 57011, 65000 and 42.
5539
5540- bpo-36264: Don't honor POSIX ``HOME`` in ``os.path.expanduser`` on
5541  windows.  Patch by Anthony Sottile.
5542
5543- bpo-24643: Fix name collisions due to ``#define timezone _timezone`` in
5544  PC/pyconfig.h.
5545
5546IDLE
5547----
5548
5549- bpo-36405: Use dict unpacking in idlelib.
5550
5551- bpo-36396: Remove fgBg param of idlelib.config.GetHighlight(). This param
5552  was only used twice and changed the return type.
5553
5554- bpo-36176: Fix IDLE autocomplete & calltip popup colors. Prevent conflicts
5555  with Linux dark themes (and slightly darken calltip background).
5556
5557- bpo-23205: For the grep module, add tests for findfiles, refactor
5558  findfiles to be a module-level function, and refactor findfiles to use
5559  os.walk.
5560
5561- bpo-23216: Add docstrings to IDLE search modules.
5562
5563- bpo-36152: Remove colorizer.ColorDelegator.close_when_done and the
5564  corresponding argument of .close().  In IDLE, both have always been None
5565  or False since 2007.
5566
5567- bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Patch
5568  by Kevin Walzer.
5569
5570- bpo-36096: Refactor class variables to instance variables in colorizer.
5571
5572- bpo-30348: Increase test coverage of idlelib.autocomplete by 30%. Patch by
5573  Louie Lu
5574
5575Tools/Demos
5576-----------
5577
5578- bpo-35132: Fix py-list and py-bt commands of python-gdb.py on gdb7.
5579
5580- bpo-32217: Fix freeze script on Windows.
5581
5582C API
5583-----
5584
5585- bpo-36381: Raise ``DeprecationWarning`` when '#' formats are used for
5586  building or parsing values without ``PY_SSIZE_T_CLEAN``.
5587
5588- bpo-36142: The whole coreconfig.h header is now excluded from
5589  Py_LIMITED_API. Move functions definitions into a new internal
5590  pycore_coreconfig.h header.
5591
5592
5593What's New in Python 3.8.0 alpha 2?
5594===================================
5595
5596*Release date: 2019-02-25*
5597
5598Core and Builtins
5599-----------------
5600
5601- bpo-36052: Raise a :exc:`SyntaxError` when assigning a value to
5602  `__debug__` with the Assignment Operator. Contributed by Stéphane Wirtel
5603  and Pablo Galindo.
5604
5605- bpo-36012: Doubled the speed of class variable writes.  When a non-dunder
5606  attribute was updated, there was an unnecessary call to update slots.
5607
5608- bpo-35942: The error message emitted when returning invalid types from
5609  ``__fspath__`` in interfaces that allow passing :class:`~os.PathLike`
5610  objects has been improved and now it does explain the origin of the error.
5611
5612- bpo-36016: ``gc.get_objects`` can now receive an optional parameter
5613  indicating a generation to get objects from. Patch by Pablo Galindo.
5614
5615- bpo-1054041: When the main interpreter exits due to an uncaught
5616  KeyboardInterrupt, the process now exits in the appropriate manner for its
5617  parent process to detect that a SIGINT or ^C terminated the process.  This
5618  allows shells and batch scripts to understand that the user has asked them
5619  to stop.
5620
5621- bpo-35992: Fix ``__class_getitem__()`` not being called on a class with a
5622  custom non-subscriptable metaclass.
5623
5624- bpo-35993: Fix a crash on fork when using subinterpreters. Contributed by
5625  Stéphane Wirtel
5626
5627- bpo-35991: Fix a potential double free in Modules/_randommodule.c.
5628
5629- bpo-35961: Fix a crash in slice_richcompare(): use strong references
5630  rather than stolen references for the two temporary internal tuples.
5631
5632- bpo-35911: Enable the creation of cell objects by adding a
5633  ``cell.__new__`` method, and expose the type ``cell`` in ``Lib/types.py``
5634  under the name CellType. Patch by Pierre Glaser.
5635
5636- bpo-12822: Use monotonic clock for ``pthread_cond_timedwait`` when
5637  ``pthread_condattr_setclock`` and ``CLOCK_MONOTONIC`` are available.
5638
5639- bpo-15248: The compiler emits now syntax warnings in the case when a comma
5640  is likely missed before tuple or list.
5641
5642- bpo-35886: The implementation of PyInterpreterState has been moved into
5643  the internal header files (guarded by Py_BUILD_CORE).
5644
5645- bpo-31506: Clarify the errors reported when ``object.__new__`` and
5646  ``object.__init__`` receive more than one argument. Contributed by Sanyam
5647  Khurana.
5648
5649- bpo-35724: Signal-handling is now guaranteed to happen relative to the
5650  main interpreter.
5651
5652- bpo-33608: We added a new internal _Py_AddPendingCall() that operates
5653  relative to the provided interpreter.  This allows us to use the existing
5654  implementation to ask another interpreter to do work that cannot be done
5655  in the current interpreter, like decref an object the other interpreter
5656  owns.  The existing Py_AddPendingCall() only operates relative to the main
5657  interpreter.
5658
5659- bpo-33989: Fix a possible crash in :meth:`list.sort` when sorting objects
5660  with ``ob_type->tp_richcompare == NULL``.  Patch by Zackery Spytz.
5661
5662Library
5663-------
5664
5665- bpo-35512: :func:`unittest.mock.patch.dict` used as a decorator with
5666  string target resolves the target during function call instead of during
5667  decorator construction. Patch by Karthikeyan Singaravelan.
5668
5669- bpo-36018: Add statistics.NormalDist, a tool for creating and manipulating
5670  normal distributions of random variable.  Features a composite class that
5671  treats the mean and standard deviation of measurement data as single
5672  entity.
5673
5674- bpo-35904: Added statistics.fmean() as a faster, floating point variant of
5675  the existing mean() function.
5676
5677- bpo-35918: Removed broken ``has_key`` method from
5678  multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre.
5679
5680- bpo-18283: Add support for bytes to :func:`shutil.which`.
5681
5682- bpo-35960: Fix :func:`dataclasses.field` throwing away empty mapping
5683  objects passed as metadata.
5684
5685- bpo-35500: Write expected and actual call parameters on separate lines in
5686  :meth:`unittest.mock.Mock.assert_called_with` assertion errors.
5687  Contributed by Susan Su.
5688
5689- bpo-35931: The :mod:`pdb` ``debug`` command now gracefully handles syntax
5690  errors.
5691
5692- bpo-24209: In http.server script, rely on getaddrinfo to bind to preferred
5693  address based on the bind parameter. Now default bind or binding to a name
5694  may bind to IPv6 or dual-stack, depending on the environment.
5695
5696- bpo-35321: Set ``__spec__.origin`` of  ``_frozen_importlib`` to frozen so
5697  that it matches the behavior of ``_frozen_importlib_external``.  Patch by
5698  Nina Zakharenko.
5699
5700- bpo-35378: Fix a reference issue inside :class:`multiprocessing.Pool` that
5701  caused the pool to remain alive if it was deleted without being closed or
5702  terminated explicitly. A new strong reference is added to the pool
5703  iterators to link the lifetime of the pool to the lifetime of its
5704  iterators so the pool does not get destroyed if a pool iterator is still
5705  alive.
5706
5707- bpo-34294: re module, fix wrong capturing groups in rare cases.
5708  :func:`re.search`, :func:`re.findall`, :func:`re.sub` and other functions
5709  that scan through string looking for a match, should reset capturing
5710  groups between two match attempts. Patch by Ma Lin.
5711
5712- bpo-35615: :mod:`weakref`: Fix a RuntimeError when copying a
5713  WeakKeyDictionary or a WeakValueDictionary, due to some keys or values
5714  disappearing while iterating.
5715
5716- bpo-35606: Implement :func:`math.prod` as analogous function to
5717  :func:`sum` that returns the product of a 'start' value (default: 1) times
5718  an iterable of numbers. Patch by Pablo Galindo.
5719
5720- bpo-32417: Performing arithmetic between :class:`datetime.datetime`
5721  subclasses and :class:`datetime.timedelta` now returns an object of the
5722  same type as the :class:`datetime.datetime` subclass. As a result,
5723  :meth:`datetime.datetime.astimezone` and alternate constructors like
5724  :meth:`datetime.datetime.now` and :meth:`datetime.fromtimestamp` called
5725  with a ``tz`` argument now *also* retain their subclass.
5726
5727- bpo-35153: Add *headers* optional keyword-only parameter to
5728  :class:`xmlrpc.client.ServerProxy`, :class:`xmlrpc.client.Transport` and
5729  :class:`xmlrpc.client.SafeTransport`.  Patch by Cédric Krier.
5730
5731- bpo-34572: Fix C implementation of pickle.loads to use importlib's locking
5732  mechanisms, and thereby avoid using partially-loaded modules. Patch by Tim
5733  Burgess.
5734
5735Documentation
5736-------------
5737
5738- bpo-36083: Fix formatting of --check-hash-based-pycs options in the
5739  manpage Synopsis.
5740
5741- bpo-36007: Bump minimum sphinx version to 1.8.  Patch by Anthony Sottile.
5742
5743- bpo-22062: Update documentation and docstrings for pathlib. Original patch
5744  by Mike Short.
5745
5746Tests
5747-----
5748
5749- bpo-27313: Avoid test_ttk_guionly ComboboxTest failure with macOS Cocoa
5750  Tk.
5751
5752- bpo-36019: Add test.support.TEST_HTTP_URL and replace references of
5753  http://www.example.com by this new constant. Contributed by Stéphane
5754  Wirtel.
5755
5756- bpo-36037: Fix test_ssl for strict OpenSSL configuration like RHEL8 strict
5757  crypto policy. Use older TLS version for minimum TLS version of the server
5758  SSL context if needed, to test TLS version older than default minimum TLS
5759  version.
5760
5761- bpo-35798: Added :func:`test.support.check_syntax_warning`.
5762
5763- bpo-35505: Make test_imap4_host_default_value independent on whether the
5764  local IMAP server is running.
5765
5766- bpo-35917: multiprocessing: provide unit tests for SyncManager and
5767  SharedMemoryManager classes + all the shareable types which are supposed
5768  to be supported by them.  (patch by Giampaolo Rodola)
5769
5770- bpo-35704: Skip ``test_shutil.test_unpack_archive_xztar`` to prevent a
5771  MemoryError on 32-bit AIX when MAXDATA setting is less than 0x20000000.
5772
5773  Patch by Michael Felt (aixtools)
5774
5775- bpo-34720: Assert m_state != NULL to mimic GC traversal functions that do
5776  not correctly handle module creation when the module state has not been
5777  created.
5778
5779Windows
5780-------
5781
5782- bpo-35976: Added ARM build support to Windows build files in PCBuild.
5783
5784- bpo-35692: ``pathlib`` no longer raises when checking file and directory
5785  existence on drives that are not ready
5786
5787- bpo-35872: Uses the base Python executable when invoking venv in a virtual
5788  environment
5789
5790- bpo-35873: Prevents venv paths being inherited by child processes
5791
5792- bpo-35299: Fix sysconfig detection of the source directory and distutils
5793  handling of pyconfig.h during PGO profiling
5794
5795IDLE
5796----
5797
5798- bpo-24310: IDLE -- Document settings dialog font tab sample.
5799
5800- bpo-35833: Revise IDLE doc for control codes sent to Shell. Add a code
5801  example block.
5802
5803- bpo-35689: Add docstrings and unittests for colorizer.py.
5804
5805
5806What's New in Python 3.8.0 alpha 1?
5807===================================
5808
5809*Release date: 2019-02-03*
5810
5811Security
5812--------
5813
5814- bpo-35746: [CVE-2019-5010] Fix a NULL pointer deref in ssl module. The
5815  cert parser did not handle CRL distribution points with empty DP or URI
5816  correctly. A malicious or buggy certificate can result into segfault.
5817  Vulnerability (TALOS-2018-0758) reported by Colin Read and Nicolas Edet of
5818  Cisco.
5819
5820- bpo-34812: The :option:`-I` command line option (run Python in isolated
5821  mode) is now also copied by the :mod:`multiprocessing` and
5822  :mod:`distutils` modules when spawning child processes. Previously, only
5823  :option:`-E` and :option:`-s` options (enabled by :option:`-I`) were
5824  copied.
5825
5826- bpo-34791: The xml.sax and xml.dom.domreg no longer use environment
5827  variables to override parser implementations when
5828  sys.flags.ignore_environment is set by -E or -I arguments.
5829
5830- bpo-17239: The xml.sax and xml.dom.minidom parsers no longer processes
5831  external entities by default. External DTD and ENTITY declarations no
5832  longer load files or create network connections.
5833
5834- bpo-34623: CVE-2018-14647: The C accelerated _elementtree module now
5835  initializes hash randomization salt from _Py_HashSecret instead of
5836  libexpat's default CSPRNG.
5837
5838- bpo-34405: Updated to OpenSSL 1.1.0i for Windows builds.
5839
5840- bpo-33871: Fixed sending the part of the file in :func:`os.sendfile` on
5841  macOS.  Using the *trailers* argument could cause sending more bytes from
5842  the input file than was specified.
5843
5844- bpo-32533: Fixed thread-safety of error handling in _ssl.
5845
5846- bpo-33136: Harden ssl module against LibreSSL CVE-2018-8970.
5847  X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new
5848  test ensures that NULL bytes are not allowed.
5849
5850- bpo-33001: Minimal fix to prevent buffer overrun in os.symlink on Windows
5851
5852- bpo-32981: Regexes in difflib and poplib were vulnerable to catastrophic
5853  backtracking. These regexes formed potential DOS vectors (REDOS). They
5854  have been refactored. This resolves CVE-2018-1060 and CVE-2018-1061. Patch
5855  by Jamie Davis.
5856
5857- bpo-28414: The ssl module now allows users to perform their own IDN
5858  en/decoding when using SNI.
5859
5860Core and Builtins
5861-----------------
5862
5863- bpo-35877: Make parenthesis optional for named expressions in while
5864  statement. Patch by Karthikeyan Singaravelan.
5865
5866- bpo-35814: Allow same right hand side expressions in annotated assignments
5867  as in normal ones. In particular, ``x: Tuple[int, int] = 1, 2`` (without
5868  parentheses on the right) is now allowed.
5869
5870- bpo-35766: Add the option to parse PEP 484 type comments in the ast
5871  module. (Off by default.) This is merging the key functionality of the
5872  third party fork thereof,
5873  [typed_ast](https://github.com/python/typed_ast).
5874
5875- bpo-35713: Reorganize Python initialization to get working exceptions and
5876  sys.stderr earlier.
5877
5878- bpo-33416: Add end line and end column position information to the Python
5879  AST nodes. This is a C-level backwards incompatible change.
5880
5881- bpo-35720: Fixed a minor memory leak in pymain_parse_cmdline_impl function
5882  in Modules/main.c
5883
5884- bpo-35634: ``func(**kwargs)`` will now raise an error when ``kwargs`` is a
5885  mapping containing multiple entries with the same key. An error was
5886  already raised when other keyword arguments are passed before ``**kwargs``
5887  since Python 3.6.
5888
5889- bpo-35623: Fix a crash when sorting very long lists. Patch by Stephan
5890  Hohe.
5891
5892- bpo-35214: clang Memory Sanitizer build instrumentation was added to work
5893  around false positives from posix, socket, time, test_io, and
5894  test_faulthandler.
5895
5896- bpo-35560: Fix an assertion error in :func:`format` in debug build for
5897  floating point formatting with "n" format, zero padding and small width.
5898  Release build is not impacted. Patch by Karthikeyan Singaravelan.
5899
5900- bpo-35552: Format characters ``%s`` and ``%V`` in
5901  :c:func:`PyUnicode_FromFormat` and ``%s`` in :c:func:`PyBytes_FromFormat`
5902  no longer read memory past the limit if *precision* is specified.
5903
5904- bpo-35504: Fix segfaults and :exc:`SystemError`\ s when deleting certain
5905  attributes. Patch by Zackery Spytz.
5906
5907- bpo-35504: Fixed a SystemError when delete the characters_written
5908  attribute of an OSError.
5909
5910- bpo-35494: Improved syntax error messages for unbalanced parentheses in
5911  f-string.
5912
5913- bpo-35444: Fixed error handling in pickling methods when fail to look up
5914  builtin "getattr". Sped up pickling iterators.
5915
5916- bpo-35436: Fix various issues with memory allocation error handling.
5917  Patch by Zackery Spytz.
5918
5919- bpo-35423: Separate the signal handling trigger in the eval loop from the
5920  "pending calls" machinery. There is no semantic change and the difference
5921  in performance is insignificant.
5922
5923- bpo-35357: Internal attributes' names of unittest.mock._Call and
5924  unittest.mock.MagicProxy (name, parent & from_kall) are now prefixed with
5925  _mock_ in order to prevent clashes with widely used object attributes.
5926  Fixed minor typo in test function name.
5927
5928- bpo-35372: Fixed the code page decoder for input longer than 2 GiB
5929  containing undecodable bytes.
5930
5931- bpo-35336: Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the
5932  C locale if the LC_CTYPE locale is "C".
5933
5934- bpo-31241: The *lineno* and *col_offset* attributes of AST nodes for list
5935  comprehensions, generator expressions and tuples are now point to the
5936  opening parenthesis or square brace. For tuples without parenthesis they
5937  point to the position of the first item.
5938
5939- bpo-33954: For :meth:`str.format`, :meth:`float.__format__` and
5940  :meth:`complex.__format__` methods for non-ASCII decimal point when using
5941  the "n" formatter.
5942
5943- bpo-35269: Fix a possible segfault involving a newly-created coroutine.
5944  Patch by Zackery Spytz.
5945
5946- bpo-35224: Implement :pep:`572` (assignment expressions). Patch by Emily
5947  Morehouse.
5948
5949- bpo-32492: Speed up :class:`namedtuple` attribute access by 1.6x using a C
5950  fast-path for the name descriptors. Patch by Pablo Galindo.
5951
5952- bpo-35214: Fixed an out of bounds memory access when parsing a truncated
5953  unicode escape sequence at the end of a string such as ``'\N'``.  It would
5954  read one byte beyond the end of the memory allocation.
5955
5956- bpo-35214: The interpreter and extension modules have had annotations
5957  added so that they work properly under clang's Memory Sanitizer.  A new
5958  configure flag --with-memory-sanitizer has been added to make test builds
5959  of this nature easier to perform.
5960
5961- bpo-35193: Fix an off by one error in the bytecode peephole optimizer
5962  where it could read bytes beyond the end of bounds of an array when
5963  removing unreachable code. This bug was present in every release of Python
5964  3.6 and 3.7 until now.
5965
5966- bpo-35169: Improved error messages for forbidden assignments.
5967
5968- bpo-34022: Fix handling of hash-based bytecode files in :mod:`zipimport`.
5969  Patch by Elvis Pranskevichus.
5970
5971- bpo-28401: Debug builds will no longer to attempt to import extension
5972  modules built for the ABI as they were never compatible to begin with.
5973  Patch by Stefano Rivera.
5974
5975- bpo-29341: Clarify in the docstrings of :mod:`os` methods that path-like
5976  objects are also accepted as input parameters.
5977
5978- bpo-35050: :mod:`socket`: Fix off-by-one bug in length check for
5979  ``AF_ALG`` name and type.
5980
5981- bpo-29743: Raise :exc:`ValueError` instead of :exc:`OverflowError` in case
5982  of a negative ``_length_`` in a :class:`ctypes.Array` subclass.  Also
5983  raise :exc:`TypeError` instead of :exc:`AttributeError` for non-integer
5984  ``_length_``. Original patch by Oren Milman.
5985
5986- bpo-16806: Fix ``lineno`` and ``col_offset`` for multi-line string tokens.
5987
5988- bpo-35029: :exc:`SyntaxWarning` raised as an exception at code generation
5989  time will be now replaced with a :exc:`SyntaxError` for better error
5990  reporting.
5991
5992- bpo-34983: Expose :meth:`symtable.Symbol.is_nonlocal` in the symtable
5993  module. Patch by Pablo Galindo.
5994
5995- bpo-34974: :class:`bytes` and :class:`bytearray` constructors no longer
5996  convert unexpected exceptions (e.g. :exc:`MemoryError` and
5997  :exc:`KeyboardInterrupt`) to :exc:`TypeError`.
5998
5999- bpo-34939: Allow annotated names in module namespace that are declared
6000  global before the annotation happens. Patch by Pablo Galindo.
6001
6002- bpo-34973: Fixed crash in :func:`bytes` when the :class:`list` argument is
6003  mutated while it is iterated.
6004
6005- bpo-34876: The *lineno* and *col_offset* attributes of the AST for
6006  decorated function and class refer now to the position of the
6007  corresponding ``def``, ``async def`` and ``class`` instead of the position
6008  of the first decorator. This leads to more correct line reporting in
6009  tracing. This is the only case when the position of child AST nodes can
6010  precede the position of the parent AST node.
6011
6012- bpo-34879: Fix a possible null pointer dereference in bytesobject.c.
6013  Patch by Zackery Spytz.
6014
6015- bpo-34784: Fix the implementation of PyStructSequence_NewType in order to
6016  create heap allocated StructSequences.
6017
6018- bpo-32912: A :exc:`SyntaxWarning` is now emitted instead of a
6019  :exc:`DeprecationWarning` for invalid escape sequences in string and bytes
6020  literals.
6021
6022- bpo-34854: Fixed a crash in compiling string annotations containing a
6023  lambda with a keyword-only argument that doesn't have a default value.
6024
6025- bpo-34850: The compiler now produces a :exc:`SyntaxWarning` when identity
6026  checks (``is`` and ``is not``) are used with certain types of literals
6027  (e.g. strings, ints).  These can often work by accident in CPython, but
6028  are not guaranteed by the language spec.  The warning advises users to use
6029  equality tests (``==`` and ``!=``) instead.
6030
6031- bpo-34824: Fix a possible null pointer dereference in Modules/_ssl.c.
6032  Patch by Zackery Spytz.
6033
6034- bpo-30156: The C function ``property_descr_get()`` uses a "cached" tuple
6035  to optimize function calls. But this tuple can be discovered in debug mode
6036  with :func:`sys.getobjects()`. Remove the optimization, it's not really
6037  worth it and it causes 3 different crashes last years.
6038
6039- bpo-34762: Fix contextvars C API to use PyObject* pointer types.
6040
6041- bpo-34751: The hash function for tuples is now based on xxHash which gives
6042  better collision results on (formerly) pathological cases. Additionally,
6043  on 64-bit systems it improves tuple hashes in general. Patch by Jeroen
6044  Demeyer with substantial contributions by Tim Peters.
6045
6046- bpo-34735: Fix a memory leak in Modules/timemodule.c.  Patch by Zackery
6047  Spytz.
6048
6049- bpo-34683: Fixed a bug where some SyntaxError error pointed to locations
6050  that were off-by-one.
6051
6052- bpo-34651: Only allow the main interpreter to fork.  The avoids the
6053  possibility of affecting the main interpreter, which is critical to
6054  operation of the runtime.
6055
6056- bpo-34653: Remove unused function PyParser_SimpleParseStringFilename.
6057
6058- bpo-32236: Warn that line buffering is not supported if :func:`open` is
6059  called with binary mode and ``buffering=1``.
6060
6061- bpo-34641: Further restrict the syntax of the left-hand side of keyword
6062  arguments in function calls. In particular, ``f((keyword)=arg)`` is now
6063  disallowed.
6064
6065- bpo-34637: Make the *start* argument to *sum()* visible as a keyword
6066  argument.
6067
6068- bpo-1621: Do not assume signed integer overflow behavior (C undefined
6069  behavior) when performing set hash table resizing.
6070
6071- bpo-34588: Fix an off-by-one in the recursive call pruning feature of
6072  traceback formatting.
6073
6074- bpo-34485: On Windows, the LC_CTYPE is now set to the user preferred
6075  locale at startup. Previously, the LC_CTYPE locale was "C" at startup, but
6076  changed when calling setlocale(LC_CTYPE, "") or setlocale(LC_ALL, "").
6077
6078- bpo-34485: Standard streams like sys.stdout now use the "surrogateescape"
6079  error handler, instead of "strict", on the POSIX locale (when the C locale
6080  is not coerced and the UTF-8 Mode is disabled).
6081
6082- bpo-34485: Fix the error handler of standard streams like sys.stdout:
6083  PYTHONIOENCODING=":" is now ignored instead of setting the error handler
6084  to "strict".
6085
6086- bpo-34485: Python now gets the locale encoding with C code to initialize
6087  the encoding of standard streams like sys.stdout. Moreover, the encoding
6088  is now initialized to the Python codec name to get a normalized encoding
6089  name and to ensure that the codec is loaded. The change avoids importing
6090  _bootlocale and _locale modules at startup by default.
6091
6092- bpo-34527: On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also
6093  forces the ASCII encoding if the LC_CTYPE locale is "POSIX", not only if
6094  the LC_CTYPE locale is "C".
6095
6096- bpo-34527: The UTF-8 Mode is now also enabled by the "POSIX" locale, not
6097  only by the "C" locale.
6098
6099- bpo-34403: On HP-UX with C or POSIX locale, sys.getfilesystemencoding()
6100  now returns "ascii" instead of "roman8" (when the UTF-8 Mode is disabled
6101  and the C locale is not coerced).
6102
6103- bpo-34523: The Python filesystem encoding is now read earlier during the
6104  Python initialization.
6105
6106- bpo-12458: Tracebacks show now correct line number for subexpressions in
6107  multiline expressions. Tracebacks show now the line number of the first
6108  line for multiline expressions instead of the line number of the last
6109  subexpression.
6110
6111- bpo-34408: Prevent a null pointer dereference and resource leakage in
6112  ``PyInterpreterState_New()``.
6113
6114- bpo-34400: Fix undefined behavior in parsetok.c.  Patch by Zackery Spytz.
6115
6116- bpo-33073: Added as_integer_ratio to ints to make them more interoperable
6117  with floats.
6118
6119- bpo-34377: Update valgrind suppression list to use
6120  ``_PyObject_Free``/``_PyObject_Realloc`` instead of
6121  ``PyObject_Free``/``PyObject_Realloc``.
6122
6123- bpo-34353: Added the "socket" option in the `stat.filemode()` Python
6124  implementation to match the C implementation.
6125
6126- bpo-34320: Fix ``dict(od)`` didn't copy iteration order of OrderedDict.
6127
6128- bpo-34113: Fixed crash on debug builds when opcode stack was adjusted with
6129  negative numbers. Patch by Constantin Petrisor.
6130
6131- bpo-34100: Compiler now merges constants in tuples and frozensets
6132  recursively. Code attributes like ``co_names`` are merged too.
6133
6134- bpo-34151: Performance of list concatenation, repetition and slicing
6135  operations is slightly improved. Patch by Sergey Fedoseev.
6136
6137- bpo-34170: -X dev: it is now possible to override the memory allocator
6138  using PYTHONMALLOC even if the developer mode is enabled.
6139
6140- bpo-33237: Improved :exc:`AttributeError` message for partially
6141  initialized module.
6142
6143- bpo-34149: Fix min and max functions to get default behavior when key is
6144  None.
6145
6146- bpo-34125: Profiling of unbound built-in methods now works when
6147  ``**kwargs`` is given.
6148
6149- bpo-34141: Optimized pickling atomic types (None, bool, int, float, bytes,
6150  str).
6151
6152- bpo-34126: Fix crashes when profiling certain invalid calls of unbound
6153  methods. Patch by Jeroen Demeyer.
6154
6155- bpo-24618: Fixed reading invalid memory when create the code object with
6156  too small varnames tuple or too large argument counts.
6157
6158- bpo-34068: In :meth:`io.IOBase.close`, ensure that the
6159  :attr:`~io.IOBase.closed` attribute is not set with a live exception.
6160  Patch by Zackery Spytz and Serhiy Storchaka.
6161
6162- bpo-34087: Fix buffer overflow while converting unicode to numeric values.
6163
6164- bpo-34080: Fixed a memory leak in the compiler when it raised some
6165  uncommon errors during tokenizing.
6166
6167- bpo-34066: Disabled interruption by Ctrl-C between calling ``open()`` and
6168  entering a **with** block in ``with open()``.
6169
6170- bpo-34042: Fix dict.copy() to maintain correct total refcount (as reported
6171  by sys.gettotalrefcount()).
6172
6173- bpo-33418: Fix potential memory leak in function object when it creates
6174  reference cycle.
6175
6176- bpo-33985: Implement contextvars.ContextVar.name attribute.
6177
6178- bpo-33956: Update vendored Expat library copy to version 2.2.5.
6179
6180- bpo-24596: Decref the module object in :c:func:`PyRun_SimpleFileExFlags`
6181  before calling :c:func:`PyErr_Print()`.  Patch by Zackery Spytz.
6182
6183- bpo-33451: Close directly executed pyc files before calling
6184  ``PyEval_EvalCode()``.
6185
6186- bpo-1617161: The hash of :class:`BuiltinMethodType` instances (methods of
6187  built-in classes) now depends on the hash of the identity of *__self__*
6188  instead of its value. The hash and equality of :class:`ModuleType` and
6189  :class:`MethodWrapperType` instances (methods of user-defined classes and
6190  some methods of built-in classes like ``str.__add__``) now depend on the
6191  hash and equality of the identity of *__self__* instead of its value.
6192  :class:`MethodWrapperType` instances no longer support ordering.
6193
6194- bpo-33824: Fix "LC_ALL=C python3.7 -V": reset properly the command line
6195  parser when the encoding changes after reading the Python configuration.
6196
6197- bpo-33803: Fix a crash in hamt.c caused by enabling GC tracking for an
6198  object that hadn't all of its fields set to NULL.
6199
6200- bpo-33738: Seven macro incompatibilities with the Limited API were fixed,
6201  and the macros :c:func:`PyIter_Check`, :c:func:`PyIndex_Check` and
6202  :c:func:`PyExceptionClass_Name` were added as functions. A script for
6203  automatic macro checks was added.
6204
6205- bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow()
6206  correctly
6207
6208- bpo-30167: ``PyRun_SimpleFileExFlags`` removes ``__cached__`` from module
6209  in addition to ``__file__``.
6210
6211- bpo-33706: Fix a crash in Python initialization when parsing the command
6212  line options. Thanks Christoph Gohlke for the bug report and the fix!
6213
6214- bpo-33597: Reduce ``PyGC_Head`` size from 3 words to 2 words.
6215
6216- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter
6217  shutdown even when there was a custom handler set previously. Patch by
6218  Philipp Kerling.
6219
6220- bpo-33622: Fixed a leak when the garbage collector fails to add an object
6221  with the ``__del__`` method or referenced by it into the
6222  :data:`gc.garbage` list. :c:func:`PyGC_Collect` can now be called when an
6223  exception is set and preserves it.
6224
6225- bpo-33462: Make dict and dict views reversible. Patch by Rémi Lapeyre.
6226
6227- bpo-23722: A :exc:`RuntimeError` is now raised when the custom metaclass
6228  doesn't provide the ``__classcell__`` entry in the namespace passed to
6229  ``type.__new__``.  A :exc:`DeprecationWarning` was emitted in Python
6230  3.6--3.7.
6231
6232- bpo-33499: Add :envvar:`PYTHONPYCACHEPREFIX` environment variable and
6233  :option:`-X` ``pycache_prefix`` command-line option to set an alternate
6234  root directory for writing module bytecode cache files.
6235
6236- bpo-25711: The :mod:`zipimport` module has been rewritten in pure Python.
6237
6238- bpo-33509: Fix module_globals parameter of warnings.warn_explicit(): don't
6239  crash if module_globals is not a dict.
6240
6241- bpo-31849: Fix signed/unsigned comparison warning in pyhash.c.
6242
6243- bpo-33475: Fixed miscellaneous bugs in converting annotations to strings
6244  and optimized parentheses in the string representation.
6245
6246- bpo-20104: Added support for the `setpgroup`, `resetids`, `setsigmask`,
6247  `setsigdef` and `scheduler` parameters of `posix_spawn`. Patch by Pablo
6248  Galindo.
6249
6250- bpo-33391: Fix a leak in set_symmetric_difference().
6251
6252- bpo-33363: Raise a SyntaxError for ``async with`` and ``async for``
6253  statements outside of async functions.
6254
6255- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer.
6256
6257- bpo-33128: Fix a bug that causes PathFinder to appear twice on
6258  sys.meta_path. Patch by Pablo Galindo Salgado.
6259
6260- bpo-33331: Modules imported last are now cleared first at interpreter
6261  shutdown.
6262
6263- bpo-33312: Fixed clang ubsan (undefined behavior sanitizer) warnings in
6264  dictobject.c by adjusting how the internal struct _dictkeysobject shared
6265  keys structure is declared.
6266
6267- bpo-33305: Improved syntax error messages for invalid numerical literals.
6268
6269- bpo-33306: Improved syntax error messages for unbalanced parentheses.
6270
6271- bpo-33234: The list constructor will pre-size and not over-allocate when
6272  the input length is known.
6273
6274- bpo-33270: Intern the names for all anonymous code objects.  Patch by
6275  Zackery Spytz.
6276
6277- bpo-30455: The C and Python code and the documentation related to tokens
6278  are now generated from a single source file :file:`Grammar/Tokens`.
6279
6280- bpo-33176: Add a ``toreadonly()`` method to memoryviews.
6281
6282- bpo-33231: Fix potential memory leak in ``normalizestring()``.
6283
6284- bpo-33205: Change dict growth function from
6285  ``round_up_to_power_2(used*2+hashtable_size/2)`` to
6286  ``round_up_to_power_2(used*3)``.  Previously, dict is shrinked only when
6287  ``used == 0``. Now dict has more chance to be shrinked.
6288
6289- bpo-29922: Improved error messages in 'async with' when ``__aenter__()``
6290  or ``__aexit__()`` return non-awaitable object.
6291
6292- bpo-33199: Fix ``ma_version_tag`` in dict implementation is uninitialized
6293  when copying from key-sharing dict.
6294
6295- bpo-33053: When using the -m switch, sys.path[0] is now explicitly
6296  expanded as the *starting* working directory, rather than being left as
6297  the empty path (which allows imports from the current working directory at
6298  the time of the import)
6299
6300- bpo-33138: Changed standard error message for non-pickleable and
6301  non-copyable types. It now says "cannot pickle" instead of "can't pickle"
6302  or "cannot serialize".
6303
6304- bpo-33018: Improve consistency of errors raised by ``issubclass()`` when
6305  called with a non-class and an abstract base class as the first and second
6306  arguments, respectively. Patch by Josh Bronson.
6307
6308- bpo-33083: ``math.factorial`` no longer accepts arguments that are not
6309  int-like. Patch by Pablo Galindo.
6310
6311- bpo-33041: Added new opcode :opcode:`END_ASYNC_FOR` and fixes the
6312  following issues:
6313
6314  * Setting global :exc:`StopAsyncIteration` no longer breaks ``async for``
6315    loops.
6316  * Jumping into an ``async for`` loop is now disabled.
6317  * Jumping out of an ``async for`` loop no longer corrupts the stack.
6318
6319- bpo-25750: Fix rare Python crash due to bad refcounting in
6320  ``type_getattro()`` if a descriptor deletes itself from the class. Patch
6321  by Jeroen Demeyer.
6322
6323- bpo-33041: Fixed bytecode generation for "async for" with a complex
6324  target. A StopAsyncIteration raised on assigning or unpacking will be now
6325  propagated instead of stopping the iteration.
6326
6327- bpo-33026: Fixed jumping out of "with" block by setting f_lineno.
6328
6329- bpo-33005: Fix a crash on fork when using a custom memory allocator (ex:
6330  using PYTHONMALLOC env var). _PyGILState_Reinit() and
6331  _PyInterpreterState_Enable() now use the default RAW memory allocator to
6332  allocate a new interpreters mutex on fork.
6333
6334- bpo-32911: Due to unexpected compatibility issues discovered during
6335  downstream beta testing, reverted :issue:`29463`. ``docstring`` field is
6336  removed from Module, ClassDef, FunctionDef, and AsyncFunctionDef ast nodes
6337  which was added in 3.7a1.  Docstring expression is restored as a first
6338  statement in their body. Based on patch by Inada Naoki.
6339
6340- bpo-17288: Prevent jumps from 'return' and 'exception' trace events.
6341
6342- bpo-32946: Importing names from already imported module with "from ...
6343  import ..." is now 30% faster if the module is not a package.
6344
6345- bpo-32932: Make error message more revealing when there are non-str
6346  objects in ``__all__``.
6347
6348- bpo-32925: Optimized iterating and containing test for literal lists
6349  consisting of non-constants: ``x in [a, b]`` and ``for x in [a, b]``. The
6350  case of all constant elements already was optimized.
6351
6352- bpo-32889: Update Valgrind suppression list to account for the rename of
6353  ``Py_ADDRESS_IN_RANG`` to ``address_in_range``.
6354
6355- bpo-32836: Don't use temporary variables in cases of list/dict/set
6356  comprehensions
6357
6358- bpo-31356: Remove the new API added in bpo-31356 (gc.ensure_disabled()
6359  context manager).
6360
6361- bpo-32305: For namespace packages, ensure that both ``__file__`` and
6362  ``__spec__.origin`` are set to None.
6363
6364- bpo-32303: Make sure ``__spec__.loader`` matches ``__loader__`` for
6365  namespace packages.
6366
6367- bpo-32711: Fix the warning messages for Python/ast_unparse.c. Patch by
6368  Stéphane Wirtel
6369
6370- bpo-32583: Fix possible crashing in builtin Unicode decoders caused by
6371  write out-of-bound errors when using customized decode error handlers.
6372
6373- bpo-32489: A :keyword:`continue` statement is now allowed in the
6374  :keyword:`finally` clause.
6375
6376- bpo-17611: Simplified the interpreter loop by moving the logic of
6377  unrolling the stack of blocks into the compiler. The compiler emits now
6378  explicit instructions for adjusting the stack of values and calling the
6379  cleaning up code for :keyword:`break`, :keyword:`continue` and
6380  :keyword:`return`.
6381
6382  Removed opcodes :opcode:`BREAK_LOOP`, :opcode:`CONTINUE_LOOP`,
6383  :opcode:`SETUP_LOOP` and :opcode:`SETUP_EXCEPT`. Added new opcodes
6384  :opcode:`ROT_FOUR`, :opcode:`BEGIN_FINALLY` and :opcode:`CALL_FINALLY` and
6385  :opcode:`POP_FINALLY`. Changed the behavior of :opcode:`END_FINALLY` and
6386  :opcode:`WITH_CLEANUP_START`.
6387
6388- bpo-32285: New function unicodedata.is_normalized, which can check whether
6389  a string is in a specific normal form.
6390
6391- bpo-10544: Yield expressions are now disallowed in comprehensions and
6392  generator expressions except the expression for the outermost iterable.
6393
6394- bpo-32117: Iterable unpacking is now allowed without parentheses in yield
6395  and return statements, e.g. ``yield 1, 2, 3, *rest``. Thanks to David
6396  Cuthbert for the change and Jordan Chapman for added tests.
6397
6398- bpo-31902: Fix the ``col_offset`` attribute for ast nodes
6399  ``ast.AsyncFor``, ``ast.AsyncFunctionDef``, and ``ast.AsyncWith``.
6400  Previously, ``col_offset`` pointed to the keyword after ``async``.
6401
6402- bpo-25862: Fix assertion failures in the ``tell()`` method of
6403  ``io.TextIOWrapper``. Patch by Zackery Spytz.
6404
6405- bpo-21983: Fix a crash in `ctypes.cast()` in case the type argument is a
6406  ctypes structured data type. Patch by Eryk Sun and Oren Milman.
6407
6408- bpo-31577: Fix a crash in `os.utime()` in case of a bad ns argument. Patch
6409  by Oren Milman.
6410
6411- bpo-29832: Remove references to 'getsockaddrarg' from various socket error
6412  messages. Patch by Oren Milman.
6413
6414Library
6415-------
6416
6417- bpo-35845: Add 'order' parameter to memoryview.tobytes().
6418
6419- bpo-35864: The _asdict() method for collections.namedtuple now returns a
6420  regular dict instead of an OrderedDict.
6421
6422- bpo-35537: An ExitStack is now used internally within subprocess.POpen to
6423  clean up pipe file handles. No behavior change in normal operation. But if
6424  closing one handle were ever to cause an exception, the others will now be
6425  closed instead of leaked.  (patch by Giampaolo Rodola)
6426
6427- bpo-35847: RISC-V needed the CTYPES_PASS_BY_REF_HACK.  Fixes ctypes
6428  Structure test_pass_by_value.
6429
6430- bpo-35813: Shared memory submodule added to multiprocessing to avoid need
6431  for serialization between processes
6432
6433- bpo-35780: Fix lru_cache() errors arising in recursive, reentrant, or
6434  multi-threaded code. These errors could result in orphan links and in the
6435  cache being trapped in a state with fewer than the specified maximum
6436  number of links. Fix handling of negative maxsize which should have been
6437  treated as zero. Fix errors in toggling the "full" status flag. Fix
6438  misordering of links when errors are encountered.  Sync-up the C code and
6439  pure Python code for the space saving path in functions with a single
6440  positional argument. In this common case, the space overhead of an lru
6441  cache entry is reduced by almost half.  Fix counting of cache misses. In
6442  error cases, the miss count was out of sync with the actual number of
6443  times the underlying user function was called.
6444
6445- bpo-35537: :func:`os.posix_spawn` and :func:`os.posix_spawnp` now have a
6446  *setsid* parameter.
6447
6448- bpo-23846: :class:`asyncio.ProactorEventLoop` now catches and logs send
6449  errors when the self-pipe is full.
6450
6451- bpo-34323: :mod:`asyncio`: Enhance ``IocpProactor.close()`` log: wait 1
6452  second before the first log, then log every second. Log also the number of
6453  seconds since ``close()`` was called.
6454
6455- bpo-35674: Add a new :func:`os.posix_spawnp` function. Patch by Joannah
6456  Nanjekye.
6457
6458- bpo-35733: ``ast.Constant(boolean)`` no longer an instance of
6459  :class:`ast.Num`.  Patch by Anthony Sottile.
6460
6461- bpo-35726: QueueHandler.prepare() now makes a copy of the record before
6462  modifying and enqueueing it, to avoid affecting other handlers in the
6463  chain.
6464
6465- bpo-35719: Sped up multi-argument :mod:`math` functions atan2(),
6466  copysign(), remainder() and hypot() by 1.3--2.5 times.
6467
6468- bpo-35717: Fix KeyError exception raised when using enums and compile.
6469  Patch contributed by Rémi Lapeyre.
6470
6471- bpo-35699: Fixed detection of Visual Studio Build Tools 2017 in distutils
6472
6473- bpo-32710: Fix memory leaks in asyncio ProactorEventLoop on overlapped
6474  operation failure.
6475
6476- bpo-35702: The :data:`time.CLOCK_UPTIME_RAW` constant is now available for
6477  macOS 10.12.
6478
6479- bpo-32710: Fix a memory leak in asyncio in the ProactorEventLoop when
6480  ``ReadFile()`` or ``WSASend()`` overlapped operation fail immediately:
6481  release the internal buffer.
6482
6483- bpo-35682: Fix ``asyncio.ProactorEventLoop.sendfile()``: don't attempt to
6484  set the result of an internal future if it's already done.
6485
6486- bpo-35283: Add a deprecated warning for the
6487  :meth:`threading.Thread.isAlive` method. Patch by Dong-hee Na.
6488
6489- bpo-35664: Improve operator.itemgetter() performance by 33% with optimized
6490  argument handling and with adding a fast path for the common case of a
6491  single non-negative integer index into a tuple (which is the typical use
6492  case in the standard library).
6493
6494- bpo-35643: Fixed a SyntaxWarning: invalid escape sequence in
6495  Modules/_sha3/cleanup.py. Patch by Mickaël Schoentgen.
6496
6497- bpo-35619: Improved support of custom data descriptors in :func:`help` and
6498  :mod:`pydoc`.
6499
6500- bpo-28503: The `crypt` module now internally uses the `crypt_r()` library
6501  function instead of `crypt()` when available.
6502
6503- bpo-35614: Fixed help() on metaclasses. Patch by Sanyam Khurana.
6504
6505- bpo-35568: Expose ``raise(signum)`` as `raise_signal`
6506
6507- bpo-35588: The floor division and modulo operations and the :func:`divmod`
6508  function on :class:`fractions.Fraction` types are 2--4x faster. Patch by
6509  Stefan Behnel.
6510
6511- bpo-35585: Speed-up building enums by value, e.g. http.HTTPStatus(200).
6512
6513- bpo-30561: random.gammavariate(1.0, beta) now computes the same result as
6514  random.expovariate(1.0 / beta).  This synchonizes the two algorithms and
6515  eliminates some idiosyncrasies in the old implementation.  It does however
6516  produce a difference stream of random variables than it used to.
6517
6518- bpo-35537: The :mod:`subprocess` module can now use the
6519  :func:`os.posix_spawn` function in some cases for better performance.
6520
6521- bpo-35526: Delaying the 'joke' of barry_as_FLUFL.mandatory to Python
6522  version 4.0
6523
6524- bpo-35523: Remove :mod:`ctypes` callback workaround: no longer create a
6525  callback at startup. Avoid SELinux alert on ``import ctypes`` and ``import
6526  uuid``.
6527
6528- bpo-31784: :func:`uuid.uuid1` now calls :func:`time.time_ns` rather than
6529  ``int(time.time() * 1e9)``.
6530
6531- bpo-35513: :class:`~unittest.runner.TextTestRunner` of
6532  :mod:`unittest.runner` now uses :func:`time.perf_counter` rather than
6533  :func:`time.time` to measure the execution time of a test:
6534  :func:`time.time` can go backwards, whereas :func:`time.perf_counter` is
6535  monotonic.
6536
6537- bpo-35502: Fixed reference leaks in
6538  :class:`xml.etree.ElementTree.TreeBuilder` in case of unfinished building
6539  of the tree (in particular when an error was raised during parsing XML).
6540
6541- bpo-35348: Make :func:`platform.architecture` parsing of ``file`` command
6542  output more reliable: add the ``-b`` option to the ``file`` command to
6543  omit the filename, force the usage of the C locale, and search also the
6544  "shared object" pattern.
6545
6546- bpo-35491: :mod:`multiprocessing`: Add ``Pool.__repr__()`` and enhance
6547  ``BaseProcess.__repr__()`` (add pid and parent pid) to ease debugging.
6548  Pool state constant values are now strings instead of integers, for
6549  example ``RUN`` value becomes ``'RUN'`` instead of ``0``.
6550
6551- bpo-35477: :meth:`multiprocessing.Pool.__enter__` now fails if the pool is
6552  not running: ``with pool:`` fails if used more than once.
6553
6554- bpo-31446: Copy command line that was passed to CreateProcessW since this
6555  function can change the content of the input buffer.
6556
6557- bpo-35471: Python 2.4 dropped MacOS 9 support. The macpath module was
6558  deprecated in Python 3.7. The module is now removed.
6559
6560- bpo-23057: Unblock Proactor event loop when keyboard interrupt is received
6561  on Windows
6562
6563- bpo-35052: Fix xml.dom.minidom cloneNode() on a document with an entity:
6564  pass the correct arguments to the user data handler of an entity.
6565
6566- bpo-20239: Allow repeated assignment deletion of
6567  :class:`unittest.mock.Mock` attributes. Patch by Pablo Galindo.
6568
6569- bpo-17185: Set ``__signature__`` on mock for :mod:`inspect` to get
6570  signature. Patch by Karthikeyan Singaravelan.
6571
6572- bpo-35445: Memory errors during creating posix.environ no longer ignored.
6573
6574- bpo-35415: Validate fileno= argument to socket.socket().
6575
6576- bpo-35424: :class:`multiprocessing.Pool` destructor now emits
6577  :exc:`ResourceWarning` if the pool is still running.
6578
6579- bpo-35330: When a :class:`Mock` instance was used to wrap an object, if
6580  `side_effect` is used in one of the mocks of it methods, don't call the
6581  original implementation and return the result of using the side effect the
6582  same way that it is done with return_value.
6583
6584- bpo-35346: Drop Mac OS 9 and Rhapsody support from the :mod:`platform`
6585  module. Rhapsody last release was in 2000. Mac OS 9 last release was in
6586  2001.
6587
6588- bpo-10496: :func:`~distutils.utils.check_environ` of
6589  :mod:`distutils.utils` now catches :exc:`KeyError` on calling
6590  :func:`pwd.getpwuid`: don't create the ``HOME`` environment variable in
6591  this case.
6592
6593- bpo-10496: :func:`posixpath.expanduser` now returns the input *path*
6594  unchanged if the ``HOME`` environment variable is not set and the current
6595  user has no home directory (if the current user identifier doesn't exist
6596  in the password database). This change fix the :mod:`site` module if the
6597  current user doesn't exist in the password database (if the user has no
6598  home directory).
6599
6600- bpo-35389: :func:`platform.libc_ver` now uses
6601  ``os.confstr('CS_GNU_LIBC_VERSION')`` if available and the *executable*
6602  parameter is not set.
6603
6604- bpo-35394: Add empty slots to asyncio abstract protocols.
6605
6606- bpo-35310: Fix a bug in :func:`select.select` where, in some cases, the
6607  file descriptor sequences were returned unmodified after a signal
6608  interruption, even though the file descriptors might not be ready yet.
6609  :func:`select.select` will now always return empty lists if a timeout has
6610  occurred.  Patch by Oran Avraham.
6611
6612- bpo-35380: Enable TCP_NODELAY on Windows for proactor asyncio event loop.
6613
6614- bpo-35341: Add generic version of ``collections.OrderedDict`` to the
6615  ``typing`` module. Patch by Ismo Toijala.
6616
6617- bpo-35371: Fixed possible crash in ``os.utime()`` on Windows when pass
6618  incorrect arguments.
6619
6620- bpo-35346: :func:`platform.uname` now redirects ``stderr`` to
6621  :data:`os.devnull` when running external programs like ``cmd /c ver``.
6622
6623- bpo-35066: Previously, calling the strftime() method on a datetime object
6624  with a trailing '%' in the format string would result in an exception.
6625  However, this only occurred when the datetime C module was being used; the
6626  python implementation did not match this behavior. Datetime is now PEP-399
6627  compliant, and will not throw an exception on a trailing '%'.
6628
6629- bpo-35345: The function `platform.popen` has been removed, it was
6630  deprecated since Python 3.3: use :func:`os.popen` instead.
6631
6632- bpo-35344: On macOS, :func:`platform.platform` now uses
6633  :func:`platform.mac_ver`, if it returns a non-empty release string, to get
6634  the macOS version rather than the darwin version.
6635
6636- bpo-35312: Make ``lib2to3.pgen2.parse.ParseError`` round-trip pickle-able.
6637  Patch by Anthony Sottile.
6638
6639- bpo-35308: Fix regression in ``webbrowser`` where default browsers may be
6640  preferred over browsers in the ``BROWSER`` environment variable.
6641
6642- bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff.
6643  Original patch by R. David Murray & Jairo Trad. Enhanced by Sanyam
6644  Khurana.
6645
6646- bpo-28604: :func:`locale.localeconv` now sets temporarily the ``LC_CTYPE``
6647  locale to the ``LC_MONETARY`` locale if the two locales are different and
6648  monetary strings are non-ASCII. This temporary change affects other
6649  threads.
6650
6651- bpo-35277: Update ensurepip to install pip 18.1 and setuptools 40.6.2.
6652
6653- bpo-24209: Adds IPv6 support when invoking http.server directly.
6654
6655- bpo-35226: Recursively check arguments when testing for equality of
6656  :class:`unittest.mock.call` objects and add note that tracking of
6657  parameters used to create ancestors of mocks in ``mock_calls`` is not
6658  possible.
6659
6660- bpo-29564: The warnings module now suggests to enable tracemalloc if the
6661  source is specified, the tracemalloc module is available, but tracemalloc
6662  is not tracing memory allocations.
6663
6664- bpo-35189: Modify the following fnctl function to retry if interrupted by
6665  a signal (EINTR): flock, lockf, fnctl
6666
6667- bpo-30064: Use add_done_callback() in sock_* asyncio API to unsubscribe
6668  reader/writer early on calcellation.
6669
6670- bpo-35186: Removed the "built with" comment added when ``setup.py upload``
6671  is used with either ``bdist_rpm`` or ``bdist_dumb``.
6672
6673- bpo-35152: Allow sending more than 2 GB at once on a multiprocessing
6674  connection on non-Windows systems.
6675
6676- bpo-35062: Fix incorrect parsing of
6677  :class:`_io.IncrementalNewlineDecoder`'s *translate* argument.
6678
6679- bpo-35065: Remove `StreamReaderProtocol._untrack_reader`. The call to
6680  `_untrack_reader` is currently performed too soon, causing the protocol to
6681  forget about the reader before `connection_lost` can run and feed the EOF
6682  to the reader.
6683
6684- bpo-34160: ElementTree and minidom now preserve the attribute order
6685  specified by the user.
6686
6687- bpo-35079: Improve difflib.SequenceManager.get_matching_blocks doc by
6688  adding 'non-overlapping' and changing '!=' to '<'.
6689
6690- bpo-33710: Deprecated ``l*gettext()`` functions and methods in the
6691  :mod:`gettext` module. They return encoded bytes instead of Unicode
6692  strings and are artifacts from Python 2 times. Also deprecated functions
6693  and methods related to setting the charset for ``l*gettext()`` functions
6694  and methods.
6695
6696- bpo-35017: :meth:`socketserver.BaseServer.serve_forever` now exits
6697  immediately if it's :meth:`~socketserver.BaseServer.shutdown` method is
6698  called while it is polling for new events.
6699
6700- bpo-35024: `importlib` no longer logs `wrote <bytecode path>` redundantly
6701  after `(created|could not create) <bytecode path>` is already logged.
6702  Patch by Quentin Agren.
6703
6704- bpo-35047: ``unittest.mock`` now includes mock calls in exception messages
6705  if ``assert_not_called``, ``assert_called_once``, or
6706  ``assert_called_once_with`` fails. Patch by Petter Strandmark.
6707
6708- bpo-31047: Fix ``ntpath.abspath`` regression where it didn't remove a
6709  trailing separator on Windows. Patch by Tim Graham.
6710
6711- bpo-35053: tracemalloc now tries to update the traceback when an object is
6712  reused from a "free list" (optimization for faster object creation, used
6713  by the builtin list type for example).
6714
6715- bpo-31553: Add the --json-lines option to json.tool. Patch by hongweipeng.
6716
6717- bpo-34794: Fixed a leak in Tkinter when pass the Python wrapper around
6718  Tcl_Obj back to Tcl/Tk.
6719
6720- bpo-34909: Enum: fix grandchildren subclassing when parent mixed with
6721  concrete data types.
6722
6723- bpo-35022: :class:`unittest.mock.MagicMock` now supports the
6724  ``__fspath__`` method (from :class:`os.PathLike`).
6725
6726- bpo-35008: Fixed references leaks when call the ``__setstate__()`` method
6727  of :class:`xml.etree.ElementTree.Element` in the C implementation for
6728  already initialized element.
6729
6730- bpo-23420: Verify the value for the parameter '-s' of the cProfile CLI.
6731  Patch by Robert Kuska
6732
6733- bpo-33947: dataclasses now handle recursive reprs without raising
6734  RecursionError.
6735
6736- bpo-34890: Make :func:`inspect.iscoroutinefunction`,
6737  :func:`inspect.isgeneratorfunction` and :func:`inspect.isasyncgenfunction`
6738  work with :func:`functools.partial`. Patch by Pablo Galindo.
6739
6740- bpo-34521: Use :func:`socket.CMSG_SPACE` to calculate ancillary data size
6741  instead of :func:`socket.CMSG_LEN` in
6742  :func:`multiprocessing.reduction.recvfds` as :rfc:`3542` requires the use
6743  of the former for portable applications.
6744
6745- bpo-31522: The `mailbox.mbox.get_string` function *from_* parameter can
6746  now successfully be set to a non-default value.
6747
6748- bpo-34970: Protect tasks weak set manipulation in ``asyncio.all_tasks()``
6749
6750- bpo-34969: gzip: Add --fast, --best on the gzip CLI, these parameters will
6751  be used for the fast compression method (quick) or the best method
6752  compress (slower, but smaller file). Also, change the default compression
6753  level to 6 (tradeoff).
6754
6755- bpo-16965: The :term:`2to3` :2to3fixer:`execfile` fixer now opens the file
6756  with mode ``'rb'``.  Patch by Zackery Spytz.
6757
6758- bpo-34966: :mod:`pydoc` now supports aliases not only to methods defined
6759  in the end class, but also to inherited methods.  The docstring is not
6760  duplicated for aliases.
6761
6762- bpo-34926: :meth:`mimetypes.MimeTypes.guess_type` now accepts
6763  :term:`path-like object` in addition to url strings. Patch by Mayank
6764  Asthana.
6765
6766- bpo-23831: Add ``moveto()`` method to the ``tkinter.Canvas`` widget. Patch
6767  by Juliette Monsel.
6768
6769- bpo-34941: Methods ``find()``, ``findtext()`` and ``findall()`` of the
6770  ``Element`` class in the :mod:`xml.etree.ElementTree` module are now able
6771  to find children which are instances of ``Element`` subclasses.
6772
6773- bpo-32680: :class:`smtplib.SMTP` objects now always have a `sock`
6774  attribute present
6775
6776- bpo-34769: Fix for async generators not finalizing when event loop is in
6777  debug mode and garbage collector runs in another thread.
6778
6779- bpo-34936: Fix ``TclError`` in ``tkinter.Spinbox.selection_element()``.
6780  Patch by Juliette Monsel.
6781
6782- bpo-34829: Add methods ``selection_from``, ``selection_range``,
6783  ``selection_present`` and ``selection_to`` to the ``tkinter.Spinbox`` for
6784  consistency with the ``tkinter.Entry`` widget. Patch by Juliette Monsel.
6785
6786- bpo-34911: Added *secure_protocols* argument to
6787  *http.cookiejar.DefaultCookiePolicy* to allow for tweaking of protocols
6788  and also to add support by default for *wss*, the secure websocket
6789  protocol.
6790
6791- bpo-34922: Fixed integer overflow in the :meth:`~hashlib.shake.digest()`
6792  and :meth:`~hashlib.shake.hexdigest()` methods for the SHAKE algorithm in
6793  the :mod:`hashlib` module.
6794
6795- bpo-34925: 25% speedup in argument parsing for the functions in the bisect
6796  module.
6797
6798- bpo-34900: Fixed :meth:`unittest.TestCase.debug` when used to call test
6799  methods with subtests.  Patch by Bruno Oliveira.
6800
6801- bpo-34844: logging.Formatter enhancement - Ensure styles and fmt matches
6802  in logging.Formatter - Added validate method in each format style class:
6803  StrFormatStyle, PercentStyle, StringTemplateStyle. - This method is called
6804  in the constructor of logging.Formatter class - Also re-raise the KeyError
6805  in the format method of each style class, so it would a bit clear that
6806  it's an error with the invalid format fields.
6807
6808- bpo-34897: Adjust test.support.missing_compiler_executable check so that a
6809  nominal command name of "" is ignored. Patch by Michael Felt.
6810
6811- bpo-34871: Fix inspect module polluted ``sys.modules`` when parsing
6812  ``__text_signature__`` of callable.
6813
6814- bpo-34898: Add `mtime` argument to `gzip.compress` for reproducible
6815  output. Patch by Guo Ci Teo.
6816
6817- bpo-28441: On Cygwin and MinGW, ensure that ``sys.executable`` always
6818  includes the full filename in the path, including the ``.exe`` suffix
6819  (unless it is a symbolic link).
6820
6821- bpo-34866: Adding ``max_num_fields`` to ``cgi.FieldStorage`` to make DOS
6822  attacks harder by limiting the number of ``MiniFieldStorage`` objects
6823  created by ``FieldStorage``.
6824
6825- bpo-34711: http.server ensures it reports HTTPStatus.NOT_FOUND when the
6826  local path ends with "/" and is not a directory, even if the underlying OS
6827  (e.g. AIX) accepts such paths as a valid file reference. Patch by Michael
6828  Felt.
6829
6830- bpo-34872: Fix self-cancellation in C implementation of asyncio.Task
6831
6832- bpo-34849: Don't log waiting for ``selector.select`` in asyncio loop
6833  iteration. The waiting is pretty normal for any asyncio program, logging
6834  its time just adds a noise to logs without any useful information
6835  provided.
6836
6837- bpo-34022: The :envvar:`SOURCE_DATE_EPOCH` environment variable no longer
6838  overrides the value of the *invalidation_mode* argument to
6839  :func:`py_compile.compile`, and determines its default value instead.
6840
6841- bpo-34819: Use a monotonic clock to compute timeouts in
6842  :meth:`Executor.map` and :func:`as_completed`, in order to prevent
6843  timeouts from deviating when the system clock is adjusted.
6844
6845- bpo-34758: Add .wasm -> application/wasm to list of recognized file types
6846  and content type headers
6847
6848- bpo-34789: :func:`xml.sax.make_parser` now accepts any iterable as its
6849  *parser_list* argument.  Patch by Andrés Delfino.
6850
6851- bpo-34334: In :class:`QueueHandler`, clear `exc_text` from
6852  :class:`LogRecord` to prevent traceback from being written twice.
6853
6854- bpo-34687: On Windows, asyncio now uses ProactorEventLoop, instead of
6855  SelectorEventLoop, by default.
6856
6857- bpo-5950: Support reading zip files with archive comments in
6858  :mod:`zipimport`.
6859
6860- bpo-32892: The parser now represents all constants as
6861  :class:`ast.Constant` instead of using specific constant AST types
6862  (``Num``, ``Str``, ``Bytes``, ``NameConstant`` and ``Ellipsis``). These
6863  classes are considered deprecated and will be removed in future Python
6864  versions.
6865
6866- bpo-34728: Add deprecation warning when `loop` is used in methods:
6867  `asyncio.sleep`, `asyncio.wait` and `asyncio.wait_for`.
6868
6869- bpo-34738: ZIP files created by :mod:`distutils` will now include entries
6870  for directories.
6871
6872- bpo-34659: Add an optional *initial* argument to itertools.accumulate().
6873
6874- bpo-29577: Support multiple mixin classes when creating Enums.
6875
6876- bpo-34670: Add SSLContext.post_handshake_auth and
6877  SSLSocket.verify_client_post_handshake for TLS 1.3's post handshake
6878  authentication feature.
6879
6880- bpo-32718: The Activate.ps1 script from venv works with PowerShell Core
6881  6.1 and is now available under all operating systems.
6882
6883- bpo-31177: Fix bug that prevented using :meth:`reset_mock
6884  <unittest.mock.Mock.reset_mock>` on mock instances with deleted attributes
6885
6886- bpo-34672: Add a workaround, so the ``'Z'`` :func:`time.strftime`
6887  specifier on the musl C library can work in some cases.
6888
6889- bpo-34666: Implement ``asyncio.StreamWriter.awrite`` and
6890  ``asyncio.StreamWriter.aclose()`` coroutines.  Methods are needed for
6891  providing a consistent stream API with control flow switched on by
6892  default.
6893
6894- bpo-6721: Acquire the logging module's commonly used internal locks while
6895  fork()ing to avoid deadlocks in the child process.
6896
6897- bpo-34658: Fix a rare interpreter unhandled exception state SystemError
6898  only seen when using subprocess with a preexec_fn while an after_parent
6899  handler has been registered with os.register_at_fork and the fork system
6900  call fails.
6901
6902- bpo-34652: Ensure :func:`os.lchmod` is never defined on Linux.
6903
6904- bpo-34638: Store a weak reference to stream reader to break strong
6905  references loop between reader and protocol.  It allows to detect and
6906  close the socket if the stream is deleted (garbage collected) without
6907  ``close()`` call.
6908
6909- bpo-34536: `Enum._missing_`:  raise `ValueError` if None returned and
6910  `TypeError` if non-member is returned.
6911
6912- bpo-34636: Speed up re scanning of many non-matching characters for \s \w
6913  and \d within bytes objects. (microoptimization)
6914
6915- bpo-24412: Add :func:`~unittest.addModuleCleanup()` and
6916  :meth:`~unittest.TestCase.addClassCleanup()` to unittest to support
6917  cleanups for :func:`~unittest.setUpModule()` and
6918  :meth:`~unittest.TestCase.setUpClass()`. Patch by Lisa Roach.
6919
6920- bpo-34630: Don't log SSL certificate errors in asyncio code (connection
6921  error logging is skipped already).
6922
6923- bpo-32490: Prevent filename duplication in :mod:`subprocess` exception
6924  messages.  Patch by Zackery Spytz.
6925
6926- bpo-34363: dataclasses.asdict() and .astuple() now handle namedtuples
6927  correctly.
6928
6929- bpo-34625: Update vendorized expat library version to 2.2.6.
6930
6931- bpo-32270: The subprocess module no longer mistakenly closes redirected
6932  fds even when they were in pass_fds when outside of the default {0, 1, 2}
6933  set.
6934
6935- bpo-34622: Create a dedicated ``asyncio.CancelledError``,
6936  ``asyncio.InvalidStateError`` and ``asyncio.TimeoutError`` exception
6937  classes.  Inherit them from corresponding exceptions from
6938  ``concurrent.futures`` package. Extract ``asyncio`` exceptions into a
6939  separate file.
6940
6941- bpo-34610: Fixed iterator of :class:`multiprocessing.managers.DictProxy`.
6942
6943- bpo-34421: Fix distutils logging for non-ASCII strings.  This caused
6944  installation issues on Windows.
6945
6946- bpo-34604: Fix possible mojibake in the error message of `pwd.getpwnam`
6947  and `grp.getgrnam` using string representation because of invisible
6948  characters or trailing whitespaces. Patch by William Grzybowski.
6949
6950- bpo-30977: Make uuid.UUID use ``__slots__`` to reduce its memory
6951  footprint. Based on original patch by Wouter Bolsterlee.
6952
6953- bpo-34574: OrderedDict iterators are not exhausted during pickling
6954  anymore. Patch by Sergey Fedoseev.
6955
6956- bpo-8110: Refactored :mod:`subprocess` to check for Windows-specific
6957  modules rather than ``sys.platform == 'win32'``.
6958
6959- bpo-34530: ``distutils.spawn.find_executable()`` now falls back on
6960  :data:`os.defpath` if the ``PATH`` environment variable is not set.
6961
6962- bpo-34563: On Windows, fix multiprocessing.Connection for very large read:
6963  fix _winapi.PeekNamedPipe() and _winapi.ReadFile() for read larger than
6964  INT_MAX (usually 2^31-1).
6965
6966- bpo-34558: Correct typo in Lib/ctypes/_aix.py
6967
6968- bpo-34282: Move ``Enum._convert`` to ``EnumMeta._convert_`` and fix enum
6969  members getting shadowed by parent attributes.
6970
6971- bpo-22872: When the queue is closed, :exc:`ValueError` is now raised by
6972  :meth:`multiprocessing.Queue.put` and :meth:`multiprocessing.Queue.get`
6973  instead of :exc:`AssertionError` and :exc:`OSError`, respectively. Patch
6974  by Zackery Spytz.
6975
6976- bpo-34515: Fix parsing non-ASCII identifiers in
6977  :mod:`lib2to3.pgen2.tokenize` (PEP 3131).
6978
6979- bpo-13312: Avoids a possible integer underflow (undefined behavior) in the
6980  time module's year handling code when passed a very low negative year
6981  value.
6982
6983- bpo-34472: Improved compatibility for streamed files in :mod:`zipfile`.
6984  Previously an optional signature was not being written and certain ZIP
6985  applications were not supported. Patch by Silas Sewell.
6986
6987- bpo-34454: Fix the .fromisoformat() methods of datetime types crashing
6988  when given unicode with non-UTF-8-encodable code points.  Specifically,
6989  datetime.fromisoformat() now accepts surrogate unicode code points used as
6990  the separator. Report and tests by Alexey Izbyshev, patch by Paul Ganssle.
6991
6992- bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks.
6993  Patch by Vladimir Matveev.
6994
6995- bpo-34171: Running the :mod:`trace` module no longer creates the
6996  ``trace.cover`` file.
6997
6998- bpo-34441: Fix crash when an ``ABC``-derived class with invalid
6999  ``__subclasses__`` is passed as the second argument to
7000  :func:`issubclass()`. Patch by Alexey Izbyshev.
7001
7002- bpo-34427: Fix infinite loop in ``a.extend(a)`` for ``MutableSequence``
7003  subclasses.
7004
7005- bpo-34412: Make :func:`signal.strsignal` work on HP-UX. Patch by Michael
7006  Osipov.
7007
7008- bpo-20849: shutil.copytree now accepts a new ``dirs_exist_ok`` keyword
7009  argument. Patch by Josh Bronson.
7010
7011- bpo-31715: Associate ``.mjs`` file extension with
7012  ``application/javascript`` MIME Type.
7013
7014- bpo-34384: :func:`os.readlink` now accepts :term:`path-like <path-like
7015  object>` and :class:`bytes` objects on Windows.
7016
7017- bpo-22602: The UTF-7 decoder now raises :exc:`UnicodeDecodeError` for
7018  ill-formed sequences starting with "+" (as specified in RFC 2152).  Patch
7019  by Zackery Spytz.
7020
7021- bpo-2122: The :meth:`mmap.flush() <mmap.mmap.flush>` method now returns
7022  ``None`` on success, raises an exception on error under all platforms.
7023
7024- bpo-34341: Appending to the ZIP archive with the ZIP64 extension no longer
7025  grows the size of extra fields of existing entries.
7026
7027- bpo-34333: Fix %-formatting in :meth:`pathlib.PurePath.with_suffix` when
7028  formatting an error message.
7029
7030- bpo-18540: The :class:`imaplib.IMAP4` and :class:`imaplib.IMAP4_SSL`
7031  classes now resolve to the local host IP correctly when the default value
7032  of *host* parameter (``''``) is used.
7033
7034- bpo-26502: Implement ``traceback.FrameSummary.__len__()`` method to
7035  preserve compatibility with the old tuple API.
7036
7037- bpo-34318: :func:`~unittest.TestCase.assertRaises`,
7038  :func:`~unittest.TestCase.assertRaisesRegex`,
7039  :func:`~unittest.TestCase.assertWarns` and
7040  :func:`~unittest.TestCase.assertWarnsRegex` no longer success if the
7041  passed callable is None. They no longer ignore unknown keyword arguments
7042  in the context manager mode. A DeprecationWarning was raised in these
7043  cases since Python 3.5.
7044
7045- bpo-9372: Deprecate :meth:`__getitem__` methods of
7046  :class:`xml.dom.pulldom.DOMEventStream`, :class:`wsgiref.util.FileWrapper`
7047  and :class:`fileinput.FileInput`.
7048
7049- bpo-33613: Fix a race condition in ``multiprocessing.semaphore_tracker``
7050  when the tracker receives SIGINT before it can register signal handlers
7051  for ignoring it.
7052
7053- bpo-34248: Report filename in the exception raised when the database file
7054  cannot be opened by :func:`dbm.gnu.open` and :func:`dbm.ndbm.open` due to
7055  OS-related error. Patch by Zsolt Cserna.
7056
7057- bpo-33089: Add math.dist() to compute the Euclidean distance between two
7058  points.
7059
7060- bpo-34246: :meth:`smtplib.SMTP.send_message` no longer modifies the
7061  content of the *mail_options* argument. Patch by Pablo S. Blum de Aguiar.
7062
7063- bpo-31047: Fix ``ntpath.abspath`` for invalid paths on windows. Patch by
7064  Franz Woellert.
7065
7066- bpo-32321: Add pure Python fallback for functools.reduce. Patch by Robert
7067  Wright.
7068
7069- bpo-34270: The default asyncio task class now always has a name which can
7070  be get or set using two new methods (:meth:`~asyncio.Task.get_name()` and
7071  :meth:`~asyncio.Task.set_name`) and is visible in the :func:`repr` output.
7072  An initial name can also be set using the new ``name`` keyword argument to
7073  :func:`asyncio.create_task` or the
7074  :meth:`~asyncio.AbstractEventLoop.create_task` method of the event loop.
7075  If no initial name is set, the default Task implementation generates a
7076  name like ``Task-1`` using a monotonic counter.
7077
7078- bpo-34263: asyncio's event loop will not pass timeouts longer than one day
7079  to epoll/select etc.
7080
7081- bpo-34035: Fix several AttributeError in zipfile seek() methods. Patch by
7082  Mickaël Schoentgen.
7083
7084- bpo-32215: Fix performance regression in :mod:`sqlite3` when a DML
7085  statement appeared in a different line than the rest of the SQL query.
7086
7087- bpo-34075: Deprecate passing non-ThreadPoolExecutor instances to
7088  :meth:`AbstractEventLoop.set_default_executor`.
7089
7090- bpo-34251: Restore ``msilib.Win64`` to preserve backwards compatibility
7091  since it's already used by :mod:`distutils`' ``bdist_msi`` command.
7092
7093- bpo-19891: Ignore errors caused by missing / non-writable homedir while
7094  writing history during exit of an interactive session.  Patch by Anthony
7095  Sottile.
7096
7097- bpo-33089: Enhanced math.hypot() to support more than two dimensions.
7098
7099- bpo-34228: tracemalloc: PYTHONTRACEMALLOC=0 environment variable and -X
7100  tracemalloc=0 command line option are now allowed to disable explicitly
7101  tracemalloc at startup.
7102
7103- bpo-13041: Use :func:`shutil.get_terminal_size` to calculate the terminal
7104  width correctly in the ``argparse.HelpFormatter`` class.  Initial patch by
7105  Zbyszek Jędrzejewski-Szmek.
7106
7107- bpo-34213: Allow frozen dataclasses to have a field named "object".
7108  Previously this conflicted with an internal use of "object".
7109
7110- bpo-34052: :meth:`sqlite3.Connection.create_aggregate`,
7111  :meth:`sqlite3.Connection.create_function`,
7112  :meth:`sqlite3.Connection.set_authorizer`,
7113  :meth:`sqlite3.Connection.set_progress_handler` methods raises TypeError
7114  when unhashable objects are passed as callable. These methods now don't
7115  pass such objects to SQLite API. Previous behavior could lead to
7116  segfaults. Patch by Sergey Fedoseev.
7117
7118- bpo-34197: Attributes *skipinitialspace*, *doublequote* and *strict* of
7119  the *dialect* attribute of the :mod:`csv` reader are now :class:`bool`
7120  instances instead of integers 0 or 1.
7121
7122- bpo-32788: Errors other than :exc:`TypeError` raised in methods
7123  ``__adapt__()`` and ``__conform__()`` in the :mod:`sqlite3` module are now
7124  propagated to the user.
7125
7126- bpo-21446: The :2to3fixer:`reload` fixer now uses :func:`importlib.reload`
7127  instead of deprecated :func:`imp.reload`.
7128
7129- bpo-940286: pydoc's ``Helper.showtopic()`` method now prints the cross
7130  references of a topic correctly.
7131
7132- bpo-34164: :func:`base64.b32decode` could raise UnboundLocalError or
7133  OverflowError for incorrect padding.  Now it always raises
7134  :exc:`base64.Error` in these cases.
7135
7136- bpo-33729: Fixed issues with arguments parsing in :mod:`hashlib`.
7137
7138- bpo-34097: ZipFile can zip files older than 1980-01-01 and newer than
7139  2107-12-31 using a new ``strict_timestamps`` parameter at the cost of
7140  setting the timestamp to the limit.
7141
7142- bpo-34108: Remove extraneous CR in 2to3 refactor.
7143
7144- bpo-34070: Make sure to only check if the handle is a tty, when opening a
7145  file with ``buffering=-1``.
7146
7147- bpo-27494: Reverted :issue:`27494`. 2to3 rejects now a trailing comma in
7148  generator expressions.
7149
7150- bpo-33967: functools.singledispatch now raises TypeError instead of
7151  IndexError when no positional arguments are passed.
7152
7153- bpo-34041: Add the parameter *deterministic* to the
7154  :meth:`sqlite3.Connection.create_function` method. Patch by Sergey
7155  Fedoseev.
7156
7157- bpo-34056: Ensure the loader shim created by ``imp.load_module`` always
7158  returns bytes from its ``get_data()`` function. This fixes using
7159  ``imp.load_module`` with :pep:`552` hash-based pycs.
7160
7161- bpo-34054: The multiprocessing module now uses the monotonic clock
7162  :func:`time.monotonic` instead of the system clock :func:`time.time` to
7163  implement timeout.
7164
7165- bpo-34043: Optimize tarfile uncompress performance about 15% when gzip is
7166  used.
7167
7168- bpo-34044: ``subprocess.Popen`` now copies the *startupinfo* argument to
7169  leave it unchanged: it will modify the copy, so that the same
7170  ``STARTUPINFO`` object can be used multiple times.
7171
7172- bpo-34010: Fixed a performance regression for reading streams with
7173  tarfile. The buffered read should use a list, instead of appending to a
7174  bytes object.
7175
7176- bpo-34019: webbrowser: Correct the arguments passed to Opera Browser when
7177  opening a new URL using the ``webbrowser`` module. Patch by Bumsik Kim.
7178
7179- bpo-34003: csv.DictReader now creates dicts instead of OrderedDicts. Patch
7180  by Michael Selik.
7181
7182- bpo-33978: Closed existing logging handlers before reconfiguration via
7183  fileConfig and dictConfig. Patch by Karthikeyan Singaravelan.
7184
7185- bpo-14117: Make minor tweaks to turtledemo. The 'wikipedia' example is now
7186  'rosette', describing what it draws.  The 'penrose' print output is
7187  reduced. The'1024' output of 'tree' is eliminated.
7188
7189- bpo-33974: Fixed passing lists and tuples of strings containing special
7190  characters ``"``, ``\``, ``{``, ``}`` and ``\n`` as options to
7191  :mod:`~tkinter.ttk` widgets.
7192
7193- bpo-27500: Fix getaddrinfo to resolve IPv6 addresses correctly.
7194
7195- bpo-24567: Improve random.choices() to handle subnormal input weights that
7196  could occasionally trigger an IndexError.
7197
7198- bpo-33871: Fixed integer overflow in :func:`os.readv`, :func:`os.writev`,
7199  :func:`os.preadv` and :func:`os.pwritev` and in :func:`os.sendfile` with
7200  *headers* or *trailers* arguments (on BSD-based OSes and macOS).
7201
7202- bpo-25007: Add :func:`copy.copy` and :func:`copy.deepcopy` support to zlib
7203  compressors and decompressors.  Patch by Zackery Spytz.
7204
7205- bpo-33929: multiprocessing: Fix a race condition in Popen of
7206  multiprocessing.popen_spawn_win32. The child process now duplicates the
7207  read end of pipe instead of "stealing" it. Previously, the read end of
7208  pipe was "stolen" by the child process, but it leaked a handle if the
7209  child process had been terminated before it could steal the handle from
7210  the parent process.
7211
7212- bpo-33899: Tokenize module now implicitly emits a NEWLINE when provided
7213  with input that does not have a trailing new line.  This behavior now
7214  matches what the C tokenizer does internally.  Contributed by Ammar Askar.
7215
7216- bpo-33897: Added a 'force' keyword argument to logging.basicConfig().
7217
7218- bpo-33695: :func:`shutil.copytree` uses :func:`os.scandir` function and
7219  all copy functions depending from it use cached :func:`os.stat` values.
7220  The speedup for copying a directory with 8000 files is around +9% on
7221  Linux, +20% on Windows and + 30% on a Windows SMB share. Also the number
7222  of :func:`os.stat` syscalls is reduced by 38% making
7223  :func:`shutil.copytree` especially faster on network filesystems.
7224  (Contributed by Giampaolo Rodola' in :issue:`33695`.)
7225
7226- bpo-33916: bz2 and lzma: When Decompressor.__init__() is called twice,
7227  free the old lock to not leak memory.
7228
7229- bpo-32568: Make select.epoll() and its documentation consistent regarding
7230  *sizehint* and *flags*.
7231
7232- bpo-33833: Fixed bug in asyncio where ProactorSocketTransport logs
7233  AssertionError if force closed during write.
7234
7235- bpo-33663: Convert content length to string before putting to header.
7236
7237- bpo-33721: :mod:`os.path` functions that return a boolean result like
7238  :func:`~os.path.exists`, :func:`~os.path.lexists`, :func:`~os.path.isdir`,
7239  :func:`~os.path.isfile`, :func:`~os.path.islink`, and
7240  :func:`~os.path.ismount`, and :mod:`pathlib.Path` methods that return a
7241  boolean result like :meth:`~pathlib.Path.exists()`,
7242  :meth:`~pathlib.Path.is_dir()`, :meth:`~pathlib.Path.is_file()`,
7243  :meth:`~pathlib.Path.is_mount()`, :meth:`~pathlib.Path.is_symlink()`,
7244  :meth:`~pathlib.Path.is_block_device()`,
7245  :meth:`~pathlib.Path.is_char_device()`, :meth:`~pathlib.Path.is_fifo()`,
7246  :meth:`~pathlib.Path.is_socket()` now return ``False`` instead of raising
7247  :exc:`ValueError` or its subclasses :exc:`UnicodeEncodeError` and
7248  :exc:`UnicodeDecodeError` for paths that contain characters or bytes
7249  unrepresentable at the OS level.
7250
7251- bpo-26544: Fixed implementation of :func:`platform.libc_ver`. It almost
7252  always returned version '2.9' for glibc.
7253
7254- bpo-33843: Remove deprecated ``cgi.escape``, ``cgi.parse_qs`` and
7255  ``cgi.parse_qsl``.
7256
7257- bpo-33842: Remove ``tarfile.filemode`` which is deprecated since Python
7258  3.3.
7259
7260- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by
7261  Steve Weber.
7262
7263- bpo-33805: Improve error message of dataclasses.replace() when an InitVar
7264  is not specified
7265
7266- bpo-33687: Fix the call to ``os.chmod()`` for ``uu.decode()`` if a mode is
7267  given or decoded. Patch by Timo Furrer.
7268
7269- bpo-33812: Datetime instance d with non-None tzinfo, but with
7270  d.tzinfo.utcoffset(d) returning None is now treated as naive by the
7271  astimezone() method.
7272
7273- bpo-32108: In configparser, don't clear section when it is assigned to
7274  itself.
7275
7276- bpo-27397: Make email module properly handle invalid-length base64
7277  strings.
7278
7279- bpo-33578: Implement multibyte encoder/decoder state methods
7280
7281- bpo-30805: Avoid race condition with debug logging
7282
7283- bpo-33476: Fix _header_value_parser.py when address group is missing final
7284  ';'. Contributed by Enrique Perez-Terron
7285
7286- bpo-33694: asyncio: Fix a race condition causing data loss on
7287  pause_reading()/resume_reading() when using the ProactorEventLoop.
7288
7289- bpo-32493: Correct test for ``uuid_enc_be`` availability in
7290  ``configure.ac``. Patch by Michael Felt.
7291
7292- bpo-33792: Add asyncio.WindowsSelectorEventLoopPolicy and
7293  asyncio.WindowsProactorEventLoopPolicy.
7294
7295- bpo-33274: W3C DOM Level 1 specifies return value of
7296  Element.removeAttributeNode() as "The Attr node that was removed."
7297  xml.dom.minidom now complies with this requirement.
7298
7299- bpo-33778: Update ``unicodedata``'s database to Unicode version 11.0.0.
7300
7301- bpo-33165: Added a stacklevel parameter to logging calls to allow use of
7302  wrapper/helper functions for logging APIs.
7303
7304- bpo-33770: improve base64 exception message for encoded inputs of invalid
7305  length
7306
7307- bpo-33769: asyncio/start_tls: Fix error message; cancel callbacks in case
7308  of an unhandled error; mark SSLTransport as closed if it is aborted.
7309
7310- bpo-33767: The concatenation (``+``) and repetition (``*``) sequence
7311  operations now raise :exc:`TypeError` instead of :exc:`SystemError` when
7312  performed on :class:`mmap.mmap` objects.  Patch by Zackery Spytz.
7313
7314- bpo-33734: asyncio/ssl: Fix AttributeError, increase default handshake
7315  timeout
7316
7317- bpo-31014: Fixed creating a controller for :mod:`webbrowser` when a user
7318  specifies a path to an entry in the BROWSER environment variable.  Based
7319  on patch by John Still.
7320
7321- bpo-2504: Add gettext.pgettext() and variants.
7322
7323- bpo-33197: Add description property for _ParameterKind
7324
7325- bpo-32751: When cancelling the task due to a timeout,
7326  :meth:`asyncio.wait_for` will now wait until the cancellation is complete.
7327
7328- bpo-32684: Fix gather to propagate cancellation of itself even with
7329  return_exceptions.
7330
7331- bpo-33654: Support protocol type switching in SSLTransport.set_protocol().
7332
7333- bpo-33674: Pause the transport as early as possible to further reduce the
7334  risk of data_received() being called before connection_made().
7335
7336- bpo-33671: :func:`shutil.copyfile`, :func:`shutil.copy`,
7337  :func:`shutil.copy2`, :func:`shutil.copytree` and :func:`shutil.move` use
7338  platform-specific fast-copy syscalls on Linux and macOS in order to copy
7339  the file more efficiently. On Windows :func:`shutil.copyfile` uses a
7340  bigger default buffer size (1 MiB instead of 16 KiB) and a
7341  :func:`memoryview`-based variant of :func:`shutil.copyfileobj` is used.
7342  The speedup for copying a 512MiB file is about +26% on Linux, +50% on
7343  macOS and +40% on Windows. Also, much less CPU cycles are consumed.
7344  (Contributed by Giampaolo Rodola' in :issue:`25427`.)
7345
7346- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of
7347  asyncio.sslproto: start immediately the handshake instead of using
7348  call_soon(). Previously, data_received() could be called before the
7349  handshake started, causing the handshake to hang or fail.
7350
7351- bpo-31647: Fixed bug where calling write_eof() on a
7352  _SelectorSocketTransport after it's already closed raises AttributeError.
7353
7354- bpo-32610: Make asyncio.all_tasks() return only pending tasks.
7355
7356- bpo-32410: Avoid blocking on file IO in sendfile fallback code
7357
7358- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor
7359
7360- bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines
7361
7362- bpo-33654: Fix transport.set_protocol() to support switching between
7363  asyncio.Protocol and asyncio.BufferedProtocol.  Fix loop.start_tls() to
7364  work with asyncio.BufferedProtocols.
7365
7366- bpo-33652: Pickles of type variables and subscripted generics are now
7367  future-proof and compatible with older Python versions.
7368
7369- bpo-32493: Fixed :func:`uuid.uuid1` on FreeBSD.
7370
7371- bpo-33238: Add ``InvalidStateError`` to :mod:`concurrent.futures`.
7372  ``Future.set_result`` and ``Future.set_exception`` now raise
7373  ``InvalidStateError`` if the futures are not pending or running. Patch by
7374  Jason Haydaman.
7375
7376- bpo-33618: Finalize and document preliminary and experimental TLS 1.3
7377  support with OpenSSL 1.1.1
7378
7379- bpo-33625: Release GIL on `grp.getgrnam`, `grp.getgrgid`, `pwd.getpwnam`
7380  and `pwd.getpwuid` if reentrant variants of these functions are available.
7381  Patch by William Grzybowski.
7382
7383- bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__
7384
7385- bpo-11874: Use a better regex when breaking usage into wrappable parts.
7386  Avoids bogus assertion errors from custom metavar strings.
7387
7388- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder
7389  that prevented the cache of parsed strings from clearing after finishing
7390  the decoding. Based on patch by c-fos.
7391
7392- bpo-33604: Remove HMAC default to md5 marked for removal in 3.8 (removal
7393  originally planned in 3.6, bump to 3.8 in gh-7062).
7394
7395- bpo-33582: Emit a deprecation warning for inspect.formatargspec
7396
7397- bpo-21145: Add ``functools.cached_property`` decorator, for computed
7398  properties cached for the life of the instance.
7399
7400- bpo-33570: Change TLS 1.3 cipher suite settings for compatibility with
7401  OpenSSL 1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 ciphers
7402  enabled by default.
7403
7404- bpo-28556: Do not simplify arguments to `typing.Union`. Now
7405  `Union[Manager, Employee]` is not simplified to `Employee` at runtime.
7406  Such simplification previously caused several bugs and limited
7407  possibilities for introspection.
7408
7409- bpo-12486: :func:`tokenize.generate_tokens` is now documented as a public
7410  API to tokenize unicode strings. It was previously present but
7411  undocumented.
7412
7413- bpo-33540: Add a new ``block_on_close`` class attribute to
7414  ``ForkingMixIn`` and ``ThreadingMixIn`` classes of :mod:`socketserver`.
7415
7416- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP
7417  locations
7418
7419- bpo-33109: argparse subparsers are once again not required by default,
7420  reverting the change in behavior introduced by bpo-26510 in 3.7.0a2.
7421
7422- bpo-33541: Remove unused private method ``_strptime.LocaleTime.__pad``
7423  (a.k.a. ``_LocaleTime__pad``).
7424
7425- bpo-33536: dataclasses.make_dataclass now checks for invalid field names
7426  and duplicate fields. Also, added a check for invalid field
7427  specifications.
7428
7429- bpo-33542: Prevent ``uuid.get_node`` from using a DUID instead of a MAC on
7430  Windows. Patch by Zvi Effron
7431
7432- bpo-26819: Fix race condition with `ReadTransport.resume_reading` in
7433  Windows proactor event loop.
7434
7435- Fix failure in `typing.get_type_hints()` when ClassVar was provided as a
7436  string forward reference.
7437
7438- bpo-33516: :class:`unittest.mock.MagicMock` now supports the ``__round__``
7439  magic method.
7440
7441- bpo-28612: Added support for Site Maps to urllib's ``RobotFileParser`` as
7442  :meth:`RobotFileParser.site_maps()
7443  <urllib.robotparser.RobotFileParser.site_maps>`. Patch by Lady Red, based
7444  on patch by Peter Wirtz.
7445
7446- bpo-28167: Remove platform.linux_distribution, which was deprecated since
7447  3.5.
7448
7449- bpo-33504: Switch the default dictionary implementation for
7450  :mod:`configparser` from :class:`collections.OrderedDict` to the standard
7451  :class:`dict` type.
7452
7453- bpo-33505: Optimize asyncio.ensure_future() by reordering if checks: 1.17x
7454  faster.
7455
7456- bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in
7457  FieldStorage use the given errors (needed for Twisted).  Patch by Amber
7458  Brown.
7459
7460- bpo-29235: The :class:`cProfile.Profile` class can now be used as a
7461  context manager. Patch by Scott Sanderson.
7462
7463- bpo-33495: Change dataclasses.Fields repr to use the repr of each of its
7464  members, instead of str.  This makes it more clear what each field
7465  actually represents.  This is especially true for the 'type' member.
7466
7467- bpo-26103: Correct ``inspect.isdatadescriptor`` to look for ``__set__`` or
7468  ``__delete__``.  Patch by Aaron Hall.
7469
7470- bpo-29209: Removed the ``doctype()`` method and the *html* parameter of
7471  the constructor of :class:`~xml.etree.ElementTree.XMLParser`.  The
7472  ``doctype()`` method defined in a subclass will no longer be called.
7473  Deprecated methods ``getchildren()`` and ``getiterator()`` in the
7474  :mod:`~xml.etree.ElementTree` module emit now a :exc:`DeprecationWarning`
7475  instead of :exc:`PendingDeprecationWarning`.
7476
7477- bpo-33453: Fix dataclasses to work if using literal string type
7478  annotations or if using PEP 563 "Postponed Evaluation of Annotations".
7479  Only specific string prefixes are detected for both ClassVar ("ClassVar"
7480  and "typing.ClassVar") and InitVar ("InitVar" and "dataclasses.InitVar").
7481
7482- bpo-28556: Minor fixes in typing module: add annotations to
7483  ``NamedTuple.__new__``, pass ``*args`` and ``**kwds`` in
7484  ``Generic.__new__``.  Original PRs by Paulius Šarka and Chad Dombrova.
7485
7486- bpo-33365: Print the header values besides the header keys instead just
7487  the header keys if *debuglevel* is set to >0 in :mod:`http.client`. Patch
7488  by Marco Strigl.
7489
7490- bpo-20087: Updated alias mapping with glibc 2.27 supported locales.
7491
7492- bpo-33422: Fix trailing quotation marks getting deleted when looking up
7493  byte/string literals on pydoc. Patch by Andrés Delfino.
7494
7495- bpo-28167: The function ``platform.linux_distribution`` and
7496  ``platform.dist`` now trigger a ``DeprecationWarning`` and have been
7497  marked for removal in Python 3.8
7498
7499- bpo-33281: Fix ctypes.util.find_library regression on macOS.
7500
7501- bpo-33311: Text and html output generated by cgitb does not display
7502  parentheses if the current call is done directly in the module. Patch by
7503  Stéphane Blondon.
7504
7505- bpo-27300: The file classes in *tempfile* now accept an *errors* parameter
7506  that complements the already existing *encoding*.  Patch by Stephan Hohe.
7507
7508- bpo-32933: :func:`unittest.mock.mock_open` now supports iteration over the
7509  file contents. Patch by Tony Flury.
7510
7511- bpo-33217: Raise :exc:`TypeError` when looking up non-Enum objects in Enum
7512  classes and Enum members.
7513
7514- bpo-33197: Update error message when constructing invalid
7515  inspect.Parameters Patch by Dong-hee Na.
7516
7517- bpo-33383: Fixed crash in the get() method of the :mod:`dbm.ndbm` database
7518  object when it is called with a single argument.
7519
7520- bpo-33375: The warnings module now finds the Python file associated with a
7521  warning from the code object, rather than the frame's global namespace.
7522  This is consistent with how tracebacks and pdb find filenames, and should
7523  work better for dynamically executed code.
7524
7525- bpo-33336: ``imaplib`` now allows ``MOVE`` command in ``IMAP4.uid()`` (RFC
7526  6851: IMAP MOVE Extension) and potentially as a name of supported method
7527  of ``IMAP4`` object.
7528
7529- bpo-32455: Added *jump* parameter to :func:`dis.stack_effect`.
7530
7531- bpo-27485: Rename and deprecate undocumented functions in
7532  :func:`urllib.parse`.
7533
7534- bpo-33332: Add ``signal.valid_signals()`` to expose the POSIX sigfillset()
7535  functionality.
7536
7537- bpo-33251: `ConfigParser.items()` was fixed so that key-value pairs passed
7538  in via `vars` are not included in the resulting output.
7539
7540- bpo-33329: Fix multiprocessing regression on newer glibcs
7541
7542- bpo-33334: :func:`dis.stack_effect` now supports all defined opcodes
7543  including NOP and EXTENDED_ARG.
7544
7545- bpo-991266: Fix quoting of the ``Comment`` attribute of
7546  :class:`http.cookies.SimpleCookie`.
7547
7548- bpo-33131: Upgrade bundled version of pip to 10.0.1.
7549
7550- bpo-33308: Fixed a crash in the :mod:`parser` module when converting an ST
7551  object to a tree of tuples or lists with ``line_info=False`` and
7552  ``col_info=True``.
7553
7554- bpo-23403: lib2to3 now uses pickle protocol 4 for pre-computed grammars.
7555
7556- bpo-33266: lib2to3 now recognizes ``rf'...'`` strings.
7557
7558- bpo-11594: Ensure line-endings are respected when using lib2to3.
7559
7560- bpo-33254: Have :func:`importlib.resources.contents` and
7561  :meth:`importlib.abc.ResourceReader.contents` return an :term:`iterable`
7562  instead of an :term:`iterator`.
7563
7564- bpo-33265: ``contextlib.ExitStack`` and ``contextlib.AsyncExitStack`` now
7565  use a method instead of a wrapper function for exit callbacks.
7566
7567- bpo-33263: Fix FD leak in `_SelectorSocketTransport`  Patch by Vlad
7568  Starostin.
7569
7570- bpo-33256: Fix display of ``<module>`` call in the html produced by
7571  ``cgitb.html()``. Patch by Stéphane Blondon.
7572
7573- bpo-33144: ``random.Random()`` and its subclassing mechanism got optimized
7574  to check only once at class/subclass instantiation time whether its
7575  ``getrandbits()`` method can be relied on by other methods, including
7576  ``randrange()``, for the generation of arbitrarily large random integers.
7577  Patch by Wolfgang Maier.
7578
7579- bpo-33185: Fixed regression when running pydoc with the :option:`-m`
7580  switch. (The regression was introduced in 3.7.0b3 by the resolution of
7581  :issue:`33053`)
7582
7583  This fix also changed pydoc to add ``os.getcwd()`` to :data:`sys.path`
7584  when necessary, rather than adding ``"."``.
7585
7586- bpo-29613: Added support for the ``SameSite`` cookie flag to the
7587  ``http.cookies`` module.
7588
7589- bpo-33169: Delete entries of ``None`` in :data:`sys.path_importer_cache`
7590  when :meth:`importlib.machinery.invalidate_caches` is called.
7591
7592- bpo-33203: ``random.Random.choice()`` now raises ``IndexError`` for empty
7593  sequences consistently even when called from subclasses without a
7594  ``getrandbits()`` implementation.
7595
7596- bpo-33224: Update difflib.mdiff() for :pep:`479`.  Convert an uncaught
7597  StopIteration in a generator into a return-statement.
7598
7599- bpo-33209: End framing at the end of C implementation of
7600  :func:`pickle.Pickler.dump`.
7601
7602- bpo-32861: The urllib.robotparser's ``__str__`` representation now
7603  includes wildcard entries and the "Crawl-delay" and "Request-rate" fields.
7604  Also removes extra newlines that were being appended to the end of the
7605  string. Patch by Michael Lazar.
7606
7607- bpo-23403: ``DEFAULT_PROTOCOL`` in :mod:`pickle` was bumped to 4. Protocol
7608  4 is described in :pep:`3154` and available since Python 3.4. It offers
7609  better performance and smaller size compared to protocol 3 introduced in
7610  Python 3.0.
7611
7612- bpo-20104: Improved error handling and fixed a reference leak in
7613  :func:`os.posix_spawn()`.
7614
7615- bpo-33106: Deleting a key from a read-only dbm database raises module
7616  specific error instead of KeyError.
7617
7618- bpo-33175: In dataclasses, Field.__set_name__ now looks up the
7619  __set_name__ special method on the class, not the instance, of the default
7620  value.
7621
7622- bpo-32380: Create functools.singledispatchmethod to support generic single
7623  dispatch on descriptors and methods.
7624
7625- bpo-33141: Have Field objects pass through __set_name__ to their default
7626  values, if they have their own __set_name__.
7627
7628- bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false
7629  boolean value. Note iid=0 and iid=False would be same. Patch by Garvit
7630  Khatri.
7631
7632- bpo-32873: Treat type variables and special typing forms as immutable by
7633  copy and pickle.  This fixes several minor issues and inconsistencies, and
7634  improves backwards compatibility with Python 3.6.
7635
7636- bpo-33134: When computing dataclass's __hash__, use the lookup table to
7637  contain the function which returns the __hash__ value.  This is an
7638  improvement over looking up a string, and then testing that string to see
7639  what to do.
7640
7641- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1.
7642
7643- bpo-32505: Raise TypeError if a member variable of a dataclass is of type
7644  Field, but doesn't have a type annotation.
7645
7646- bpo-33078: Fix the failure on OSX caused by the tests relying on
7647  sem_getvalue
7648
7649- bpo-33116: Add 'Field' to dataclasses.__all__.
7650
7651- bpo-32896: Fix an error where subclassing a dataclass with a field that
7652  uses a default_factory would generate an incorrect class.
7653
7654- bpo-33100: Dataclasses: If a field has a default value that's a
7655  MemberDescriptorType, then it's from that field being in __slots__, not an
7656  actual default value.
7657
7658- bpo-32953: If a non-dataclass inherits from a frozen dataclass, allow
7659  attributes to be added to the derived class.  Only attributes from the
7660  frozen dataclass cannot be assigned to.  Require all dataclasses in a
7661  hierarchy to be either all frozen or all non-frozen.
7662
7663- bpo-33097: Raise RuntimeError when ``executor.submit`` is called during
7664  interpreter shutdown.
7665
7666- bpo-32968: Modulo and floor division involving Fraction and float should
7667  return float.
7668
7669- bpo-33061: Add missing ``NoReturn`` to ``__all__`` in typing.py
7670
7671- bpo-33078: Fix the size handling in multiprocessing.Queue when a pickling
7672  error occurs.
7673
7674- bpo-33064: lib2to3 now properly supports trailing commas after ``*args``
7675  and ``**kwargs`` in function signatures.
7676
7677- bpo-33056: FIX properly close leaking fds in
7678  concurrent.futures.ProcessPoolExecutor.
7679
7680- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all
7681  threads when calling mmap.mmap(), os.urandom(), and random.seed().  Patch
7682  by Nir Soffer.
7683
7684- bpo-31804: Avoid failing in multiprocessing.Process if the standard
7685  streams are closed or None at exit.
7686
7687- bpo-33034: Providing an explicit error message when casting the port
7688  property to anything that is not an integer value using ``urlparse()`` and
7689  ``urlsplit()``. Patch by Matt Eaton.
7690
7691- bpo-30249: Improve struct.unpack_from() exception messages for problems
7692  with the buffer size and offset.
7693
7694- bpo-33037: Skip sending/receiving data after SSL transport closing.
7695
7696- bpo-27683: Fix a regression in :mod:`ipaddress` that result of
7697  :meth:`hosts` is empty when the network is constructed by a tuple
7698  containing an integer mask and only 1 bit left for addresses.
7699
7700- bpo-22674: Add the strsignal() function in the signal module that returns
7701  the system description of the given signal, as returned by strsignal(3).
7702
7703- bpo-32999: Fix C implementation of ``ABC.__subclasscheck__(cls,
7704  subclass)`` crashed when ``subclass`` is not a type object.
7705
7706- bpo-33009: Fix inspect.signature() for single-parameter partialmethods.
7707
7708- bpo-32969: Expose several missing constants in zlib and fix corresponding
7709  documentation.
7710
7711- bpo-32056: Improved exceptions raised for invalid number of channels and
7712  sample width when read an audio file in modules :mod:`aifc`, :mod:`wave`
7713  and :mod:`sunau`.
7714
7715- bpo-32970: Improved disassembly of the MAKE_FUNCTION instruction.
7716
7717- bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in
7718  subprocess if another low descriptor is closed.
7719
7720- bpo-32960: For dataclasses, disallow inheriting frozen from non-frozen
7721  classes, and also disallow inheriting non-frozen from frozen classes. This
7722  restriction will be relaxed at a future date.
7723
7724- bpo-32713: Fixed tarfile.itn handling of out-of-bounds float values. Patch
7725  by Joffrey Fuhrer.
7726
7727- bpo-32257: The ssl module now contains OP_NO_RENEGOTIATION constant,
7728  available with OpenSSL 1.1.0h or 1.1.1.
7729
7730- bpo-32951: Direct instantiation of SSLSocket and SSLObject objects is now
7731  prohibited. The constructors were never documented, tested, or designed as
7732  public constructors. Users were suppose to use ssl.wrap_socket() or
7733  SSLContext.
7734
7735- bpo-32929: Remove the tri-state parameter "hash", and add the boolean
7736  "unsafe_hash". If unsafe_hash is True, add a __hash__ function, but if a
7737  __hash__ exists, raise TypeError.  If unsafe_hash is False, add a __hash__
7738  based on the values of eq= and frozen=.  The unsafe_hash=False behavior is
7739  the same as the old hash=None behavior.  unsafe_hash=False is the default,
7740  just as hash=None used to be.
7741
7742- bpo-32947: Add OP_ENABLE_MIDDLEBOX_COMPAT and test workaround for TLSv1.3
7743  for future compatibility with OpenSSL 1.1.1.
7744
7745- bpo-32146: Document the interaction between frozen executables and the
7746  spawn and forkserver start methods in multiprocessing.
7747
7748- bpo-30622: The ssl module now detects missing NPN support in LibreSSL.
7749
7750- bpo-32922: dbm.open() now encodes filename with the filesystem encoding
7751  rather than default encoding.
7752
7753- bpo-32759: Free unused arenas in multiprocessing.heap.
7754
7755- bpo-32859: In ``os.dup2``, don't check every call whether the ``dup3``
7756  syscall exists or not.
7757
7758- bpo-32556: nt._getfinalpathname, nt._getvolumepathname and
7759  nt._getdiskusage now correctly convert from bytes.
7760
7761- bpo-21060: Rewrite confusing message from setup.py upload from "No dist
7762  file created in earlier command" to the more helpful "Must create and
7763  upload files in one command".
7764
7765- bpo-32857: In :mod:`tkinter`, ``after_cancel(None)`` now raises a
7766  :exc:`ValueError` instead of canceling the first scheduled function.
7767  Patch by Cheryl Sabella.
7768
7769- bpo-32852: Make sure sys.argv remains as a list when running trace.
7770
7771- bpo-31333: ``_abc`` module is added.  It is a speedup module with C
7772  implementations for various functions and methods in ``abc``.  Creating an
7773  ABC subclass and calling ``isinstance`` or ``issubclass`` with an ABC
7774  subclass are up to 1.5x faster. In addition, this makes Python start-up up
7775  to 10% faster.
7776
7777  Note that the new implementation hides internal registry and caches,
7778  previously accessible via private attributes ``_abc_registry``,
7779  ``_abc_cache``, and ``_abc_negative_cache``.  There are three debugging
7780  helper methods that can be used instead ``_dump_registry``,
7781  ``_abc_registry_clear``, and ``_abc_caches_clear``.
7782
7783- bpo-32841: Fixed `asyncio.Condition` issue which silently ignored
7784  cancellation after notifying and cancelling a conditional lock. Patch by
7785  Bar Harel.
7786
7787- bpo-32819: ssl.match_hostname() has been simplified and no longer depends
7788  on re and ipaddress module for wildcard and IP addresses. Error reporting
7789  for invalid wildcards has been improved.
7790
7791- bpo-19675: ``multiprocessing.Pool`` no longer leaks processes if its
7792  initialization fails.
7793
7794- bpo-32394: socket: Remove
7795  TCP_FASTOPEN,TCP_KEEPCNT,TCP_KEEPIDLE,TCP_KEEPINTVL flags on older version
7796  Windows during run-time.
7797
7798- bpo-31787: Fixed refleaks of ``__init__()`` methods in various modules.
7799  (Contributed by Oren Milman)
7800
7801- bpo-30157: Fixed guessing quote and delimiter in csv.Sniffer.sniff() when
7802  only the last field is quoted.  Patch by Jake Davis.
7803
7804- bpo-30688: Added support of ``\N{name}`` escapes in regular expressions.
7805  Based on patch by Jonathan Eunice.
7806
7807- bpo-32792: collections.ChainMap() preserves the order of the underlying
7808  mappings.
7809
7810- bpo-32775: :func:`fnmatch.translate()` no longer produces patterns which
7811  contain set operations. Sets starting with '[' or containing '--', '&&',
7812  '~~' or '||' will be interpreted differently in regular expressions in
7813  future versions. Currently they emit warnings. fnmatch.translate() now
7814  avoids producing patterns containing such sets by accident.
7815
7816- bpo-32622: Implement native fast sendfile for Windows proactor event loop.
7817
7818- bpo-32777: Fix a rare but potential pre-exec child process deadlock in
7819  subprocess on POSIX systems when marking file descriptors inheritable on
7820  exec in the child process.  This bug appears to have been introduced in
7821  3.4.
7822
7823- bpo-32647: The ctypes module used to depend on indirect linking for
7824  dlopen. The shared extension is now explicitly linked against libdl on
7825  platforms with dl.
7826
7827- bpo-32749: A :mod:`dbm.dumb` database opened with flags 'r' is now
7828  read-only. :func:`dbm.dumb.open` with flags 'r' and 'w' no longer creates
7829  a database if it does not exist.
7830
7831- bpo-32741: Implement ``asyncio.TimerHandle.when()`` method.
7832
7833- bpo-32691: Use mod_spec.parent when running modules with pdb
7834
7835- bpo-32734: Fixed ``asyncio.Lock()`` safety issue which allowed acquiring
7836  and locking the same lock multiple times, without it being free. Patch by
7837  Bar Harel.
7838
7839- bpo-32727: Do not include name field in SMTP envelope from address. Patch
7840  by Stéphane Wirtel
7841
7842- bpo-31453: Add TLSVersion constants and SSLContext.maximum_version /
7843  minimum_version attributes. The new API wraps OpenSSL 1.1
7844  https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
7845  feature.
7846
7847- bpo-24334: Internal implementation details of ssl module were cleaned up.
7848  The SSLSocket has one less layer of indirection. Owner and session
7849  information are now handled by the SSLSocket and SSLObject constructor.
7850  Channel binding implementation has been simplified.
7851
7852- bpo-31848: Fix the error handling in Aifc_read.initfp() when the SSND
7853  chunk is not found. Patch by Zackery Spytz.
7854
7855- bpo-32585: Add Ttk spinbox widget to :mod:`tkinter.ttk`.  Patch by Alan D
7856  Moore.
7857
7858- bpo-32512: :mod:`profile` CLI accepts `-m module_name` as an alternative
7859  to script path.
7860
7861- bpo-8525: help() on a type now displays builtin subclasses. This is
7862  intended primarily to help with notification of more specific exception
7863  subclasses.
7864
7865  Patch by Sanyam Khurana.
7866
7867- bpo-31639: http.server now exposes a ThreadingHTTPServer class and uses it
7868  when the module is run with ``-m`` to cope with web browsers pre-opening
7869  sockets.
7870
7871- bpo-29877: compileall: import ProcessPoolExecutor only when needed,
7872  preventing hangs on low resource platforms
7873
7874- bpo-32221: Various functions returning tuple containing IPv6 addresses now
7875  omit ``%scope`` part since the same information is already encoded in
7876  *scopeid* tuple item. Especially this speeds up :func:`socket.recvfrom`
7877  when it receives multicast packet since useless resolving of network
7878  interface name is omitted.
7879
7880- bpo-32147: :func:`binascii.unhexlify` is now up to 2 times faster. Patch
7881  by Sergey Fedoseev.
7882
7883- bpo-30693: The TarFile class now recurses directories in a reproducible
7884  way.
7885
7886- bpo-30693: The ZipFile class now recurses directories in a reproducible
7887  way.
7888
7889- bpo-31680: Added :data:`curses.ncurses_version`.
7890
7891- bpo-31908: Fix output of cover files for ``trace`` module command-line
7892  tool. Previously emitted cover files only when ``--missing`` option was
7893  used. Patch by Michael Selik.
7894
7895- bpo-31608: Raise a ``TypeError`` instead of crashing if a
7896  ``collections.deque`` subclass returns a non-deque from ``__new__``. Patch
7897  by Oren Milman.
7898
7899- bpo-31425: Add support for sockets of the AF_QIPCRTR address family,
7900  supported by the Linux kernel. This is used to communicate with services,
7901  such as GPS or radio, running on Qualcomm devices. Patch by Bjorn
7902  Andersson.
7903
7904- bpo-22005: Implemented unpickling instances of
7905  :class:`~datetime.datetime`, :class:`~datetime.date` and
7906  :class:`~datetime.time` pickled by Python 2. ``encoding='latin1'`` should
7907  be used for successful decoding.
7908
7909- bpo-27645: :class:`sqlite3.Connection` now exposes a
7910  :class:`~sqlite3.Connection.backup` method, if the underlying SQLite
7911  library is at version 3.6.11 or higher.  Patch by Lele Gaifax.
7912
7913- bpo-16865: Support arrays >=2GiB in :mod:`ctypes`.  Patch by Segev Finer.
7914
7915- bpo-31508: Removed support of arguments in
7916  `tkinter.ttk.Treeview.selection`. It was deprecated in 3.6.  Use
7917  specialized methods like `selection_set` for changing the selection.
7918
7919- bpo-29456: Fix bugs in hangul normalization: u1176, u11a7 and u11c3
7920
7921Documentation
7922-------------
7923
7924- bpo-21257: Document :func:`http.client.parse_headers`.
7925
7926- bpo-34764: Improve example of iter() with 2nd sentinel argument.
7927
7928- bpo-35564: Explicitly set master_doc variable in conf.py for compliance
7929  with Sphinx 2.0
7930
7931- bpo-35511: Specified that profile.Profile class doesn't not support enable
7932  or disable methods. Also, elaborated that Profile object as a context
7933  manager is only supported in cProfile module.
7934
7935- bpo-10536: Enhance the gettext docs. Patch by Éric Araujo
7936
7937- bpo-35089: Remove mention of ``typing.io`` and ``typing.re``. Their types
7938  should be imported from ``typing`` directly.
7939
7940- bpo-35038: Fix the documentation about an unexisting `f_restricted`
7941  attribute in the frame object. Patch by Stéphane Wirtel
7942
7943- bpo-35042: Replace PEP XYZ by the pep role and allow to use the direct
7944  links to the PEPs.
7945
7946- bpo-35044: Fix the documentation with the role ``exc`` for the
7947  appropriated exception. Patch by Stéphane Wirtel
7948
7949- bpo-35035: Rename documentation for :mod:`email.utils` to
7950  ``email.utils.rst``.
7951
7952- bpo-34967: Use app.add_object_type() instead of the deprecated Sphinx
7953  function app.description_unit()
7954
7955- bpo-34913: Add documentation about the new command line interface of the
7956  gzip module.
7957
7958- bpo-32174: chm document displays non-ASCII charaters properly on some MBCS
7959  Windows systems.
7960
7961- bpo-11233: Create availability directive for documentation.  Original
7962  patch by Georg Brandl.
7963
7964- bpo-34790: Document how passing coroutines to asyncio.wait() can be
7965  confusing.
7966
7967- bpo-34552: Make clear that ``==`` operator sometimes is equivalent to
7968  `is`. The ``<``, ``<=``, ``>`` and ``>=`` operators are only defined where
7969  they make sense.
7970
7971- bpo-28617: Fixed info in the stdtypes docs concerning the types that
7972  support membership tests.
7973
7974- bpo-20177: Migrate datetime.date.fromtimestamp to Argument Clinic. Patch
7975  by Tim Hoffmann.
7976
7977- bpo-34065: Fix wrongly written basicConfig documentation markup syntax
7978
7979- bpo-33460: replaced ellipsis with correct error codes in tutorial chapter
7980  3.
7981
7982- bpo-33847: Add '@' operator entry to index.
7983
7984- bpo-33409: Clarified the relationship between :pep:`538`'s
7985  PYTHONCOERCECLOCALE and PEP 540's PYTHONUTF8 mode.
7986
7987- bpo-33197: Add versionadded tag to the documentation of
7988  ParameterKind.description
7989
7990- bpo-17045: Improve the C-API doc for PyTypeObject.  This includes adding
7991  several quick-reference tables and a lot of missing slot/typedef entries.
7992  The existing entries were also cleaned up with a slightly more consistent
7993  format.
7994
7995- bpo-33736: Improve the documentation of :func:`asyncio.open_connection`,
7996  :func:`asyncio.start_server` and their UNIX socket counterparts.
7997
7998- bpo-23859: Document that `asyncio.wait()` does not cancel its futures on
7999  timeout.
8000
8001- bpo-32436: Document :pep:`567` changes to asyncio.
8002
8003- bpo-33604: Update HMAC md5 default to a DeprecationWarning, bump removal
8004  to 3.8.
8005
8006- bpo-33594: Document ``getargspec``, ``from_function`` and ``from_builtin``
8007  as deprecated in their respective docstring, and include version since
8008  deprecation in DeprecationWarning message.
8009
8010- bpo-33503: Fix broken pypi link
8011
8012- bpo-33421: Add missing documentation for ``typing.AsyncContextManager``.
8013
8014- bpo-33487: BZ2file now emit a DeprecationWarning when buffering=None is
8015  passed, the deprecation message and documentation also now explicitly
8016  state it is deprecated since 3.0.
8017
8018- bpo-33378: Add Korean language switcher for https://docs.python.org/3/
8019
8020- bpo-33276: Clarify that the ``__path__`` attribute on modules cannot be
8021  just any value.
8022
8023- bpo-33201: Modernize documentation for writing C extension types.
8024
8025- bpo-33195: Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document.
8026  ``Py_UNICODE`` related APIs are deprecated since Python 3.3, but it is
8027  missed in the document.
8028
8029- bpo-33126: Document PyBuffer_ToContiguous().
8030
8031- bpo-27212: Modify documentation for the :func:`islice` recipe to consume
8032  initial values up to the start index.
8033
8034- bpo-28247: Update :mod:`zipapp` documentation to describe how to make
8035  standalone applications.
8036
8037- bpo-18802: Documentation changes for ipaddress.  Patch by Jon Foster and
8038  Berker Peksag.
8039
8040- bpo-27428: Update documentation to clarify that ``WindowsRegistryFinder``
8041  implements ``MetaPathFinder``. (Patch by Himanshu Lakhara)
8042
8043- bpo-28124: The ssl module function ssl.wrap_socket() has been
8044  de-emphasized and deprecated in favor of the more secure and efficient
8045  SSLContext.wrap_socket() method.
8046
8047- bpo-17232: Clarify docs for -O and -OO.  Patch by Terry Reedy.
8048
8049- bpo-32436: Add documentation for the contextvars module (PEP 567).
8050
8051- bpo-32800: Update link to w3c doc for xml default namespaces.
8052
8053- bpo-11015: Update :mod:`test.support` documentation.
8054
8055- bpo-32613: Update the faq/windows.html to use the py command from PEP 397
8056  instead of python.
8057
8058- bpo-8722: Document :meth:`__getattr__` behavior when property :meth:`get`
8059  method raises :exc:`AttributeError`.
8060
8061- bpo-32614: Modify RE examples in documentation to use raw strings to
8062  prevent :exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight
8063  the deprecation.
8064
8065- bpo-20709: Remove the paragraph where we explain that os.utime() does not
8066  support a directory as path under Windows. Patch by Jan-Philip Gehrcke
8067
8068- bpo-32722: Remove the bad example in the tutorial of the Generator
8069  Expression. Patch by Stéphane Wirtel
8070
8071- bpo-31972: Improve docstrings for `pathlib.PurePath` subclasses.
8072
8073- bpo-30607: Use the externalized ``python-docs-theme`` package when
8074  building the documentation.
8075
8076- bpo-8243: Add a note about curses.addch and curses.addstr exception
8077  behavior when writing outside a window, or pad.
8078
8079- bpo-32337: Update documentation related with ``dict`` order.
8080
8081- bpo-25041: Document ``AF_PACKET`` in the :mod:`socket` module.
8082
8083- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED
8084  flags for ssl.SSLContext.verify_mode.
8085
8086Tests
8087-----
8088
8089- bpo-35772: Fix sparse file tests of test_tarfile on ppc64 with the tmpfs
8090  filesystem. Fix the function testing if the filesystem supports sparse
8091  files: create a file which contains data and "holes", instead of creating
8092  a file which contains no data. tmpfs effective block size is a page size
8093  (tmpfs lives in the page cache). RHEL uses 64 KiB pages on aarch64, ppc64,
8094  ppc64le, only s390x and x86_64 use 4 KiB pages, whereas the test punch
8095  holes of 4 KiB.
8096
8097- bpo-35045: Make ssl tests less strict and also accept TLSv1 as system
8098  default. The changes unbreaks test_min_max_version on Fedora 29.
8099
8100- bpo-32710: ``test_asyncio/test_sendfile.py`` now resets the event loop
8101  policy using :func:`tearDownModule` as done in other tests, to prevent a
8102  warning when running tests on Windows.
8103
8104- bpo-33717: test.pythoninfo now logs information of all clocks, not only
8105  time.time() and time.perf_counter().
8106
8107- bpo-35488: Add a test to pathlib's Path.match() to verify it does not
8108  support glob-style ** recursive pattern matching.
8109
8110- bpo-31731: Fix a race condition in ``check_interrupted_write()`` of
8111  test_io: create directly the thread with SIGALRM signal blocked, rather
8112  than blocking the signal later from the thread. Previously, it was
8113  possible that the thread gets the signal before the signal is blocked.
8114
8115- bpo-35424: Fix test_multiprocessing_main_handling: use
8116  :class:`multiprocessing.Pool` with a context manager and then explicitly
8117  join the pool.
8118
8119- bpo-35519: Rename :mod:`test.bisect` module to :mod:`test.bisect_cmd` to
8120  avoid conflict with :mod:`bisect` module when running directly a test like
8121  ``./python Lib/test/test_xmlrpc.py``.
8122
8123- bpo-35513: Replace :func:`time.time` with :func:`time.monotonic` in tests
8124  to measure time delta.
8125
8126- bpo-34279: :func:`test.support.run_unittest` no longer raise
8127  :exc:`TestDidNotRun` if the test result contains skipped tests. The
8128  exception is now only raised if no test have been run and no test have
8129  been skipped.
8130
8131- bpo-35412: Add testcase to ``test_future4``: check unicode literal.
8132
8133- bpo-26704: Added test demonstrating double-patching of an instance method.
8134  Patch by Anthony Sottile.
8135
8136- bpo-33725: test_multiprocessing_fork may crash on recent versions of
8137  macOS.  Until the issue is resolved, skip the test on macOS.
8138
8139- bpo-35352: Modify test_asyncio to use the certificate set from the test
8140  directory.
8141
8142- bpo-35317: Fix ``mktime()`` overflow error in ``test_email``: run
8143  ``test_localtime_daylight_true_dst_true()`` and
8144  ``test_localtime_daylight_false_dst_true()`` with a specific timezone.
8145
8146- bpo-21263: After several reports that test_gdb does not work properly on
8147  macOS and since gdb is not shipped by default anymore, test_gdb is now
8148  skipped on macOS when LLVM Clang has been used to compile Python. Patch by
8149  Lysandros Nikolaou
8150
8151- bpo-34279: regrtest issue a warning when no tests have been executed in a
8152  particular test file. Also, a new final result state is issued if no test
8153  have been executed across all test files. Patch by Pablo Galindo.
8154
8155- bpo-34962: make docstest in Doc now passes., and is enforced in CI
8156
8157- bpo-23596: Use argparse for the command line of the gzip module. Patch by
8158  Antony Lee
8159
8160- bpo-34537: Fix ``test_gdb.test_strings()`` when ``LC_ALL=C`` and GDB was
8161  compiled with Python 3.6 or earlier.
8162
8163- bpo-34587: test_socket: Remove RDSTest.testCongestion(). The test tries to
8164  fill the receiver's socket buffer and expects an error. But the RDS
8165  protocol doesn't require that. Moreover, the Linux implementation of RDS
8166  expects that the producer of the messages reduces its rate, it's not the
8167  role of the receiver to trigger an error. The test fails on Fedora 28 by
8168  design, so just remove it.
8169
8170- bpo-34661: Fix test_shutil if unzip doesn't support -t.
8171
8172- bpo-34200: Fixed non-deterministic flakiness of test_pkg by not using the
8173  scary test.support.module_cleanup() logic to save and restore sys.modules
8174  contents between test cases.
8175
8176- bpo-34569: The experimental PEP 554 data channels now correctly pass
8177  negative PyLong objects between subinterpreters on 32-bit systems. Patch
8178  by Michael Felt.
8179
8180- bpo-34594: Fix usage of hardcoded ``errno`` values in the tests.
8181
8182- bpo-34579: Fix test_embed for AIX Patch by Michael Felt
8183
8184- bpo-34542: Use 3072 RSA keys and SHA-256 signature for test certs and
8185  keys.
8186
8187- bpo-11193: Remove special condition for AIX in
8188  `test_subprocess.test_undecodable_env`
8189
8190- bpo-34347: Fix `test_utf8_mode.test_cmd_line` for AIX
8191
8192- bpo-34490: On AIX with AF_UNIX family sockets getsockname() does not
8193  provide 'sockname', so skip calls to transport.get_extra_info('sockname')
8194
8195- bpo-34391: Fix ftplib test for TLS 1.3 by reading from data socket.
8196
8197- bpo-11192: Fix `test_socket` on AIX 6.1 and later IPv6 zone id supports
8198  only supported by inet_pton6_zone() Switch to runtime-based
8199  platform.system() to establish current platform  rather than build-time
8200  based sys.platform()
8201
8202- bpo-34399: Update all RSA keys and DH params to use at least 2048 bits.
8203
8204- bpo-34373: Fix ``test_mktime`` and ``test_pthread_getcpuclickid`` tests
8205  for AIX Add range checking for ``_PyTime_localtime`` for AIX Patch by
8206  Michael Felt
8207
8208- bpo-11191: Skip the distutils test 'test_search_cpp' when using XLC as
8209  compiler patch by aixtools (Michael Felt)
8210
8211- Improved an error message when mock assert_has_calls fails.
8212
8213- bpo-33746: Fix test_unittest when run in verbose mode.
8214
8215- bpo-33901: Fix test_dbm_gnu on macOS with gdbm 1.15: add a larger value to
8216  make sure that the file size changes.
8217
8218- bpo-33873: Fix a bug in ``regrtest`` that caused an extra test to run if
8219  --huntrleaks/-R was used. Exit with error in case that invalid parameters
8220  are specified to --huntrleaks/-R (at least one warmup run and one
8221  repetition must be used).
8222
8223- bpo-33562: Check that a global asyncio event loop policy is not left
8224  behind by any tests.
8225
8226- bpo-33655: Ignore test_posix_fallocate failures on BSD platforms that
8227  might be due to running on ZFS.
8228
8229- bpo-32962: Fixed test_gdb when Python is compiled with flags -mcet
8230  -fcf-protection -O0.
8231
8232- bpo-33358: Fix ``test_embed.test_pre_initialization_sys_options()`` when
8233  the interpreter is built with ``--enable-shared``.
8234
8235- bpo-32872: Avoid regrtest compatibility issue with namespace packages.
8236
8237- bpo-32517: Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport
8238  of ``KqueueSelector`` loop was not being closed.
8239
8240- bpo-32663: Making sure the `SMTPUTF8SimTests` class of tests gets run in
8241  test_smtplib.py.
8242
8243- bpo-27643: Test_C test case needs "signed short" bitfields, but the IBM
8244  XLC compiler (on AIX) does not support this Skip the code and test when
8245  AIX and XLC are used
8246
8247  Applicable to Python2-2.7 and later
8248
8249- bpo-19417: Add test_bdb.py.
8250
8251- bpo-31809: Add tests to verify connection with secp ECDH curves.
8252
8253Build
8254-----
8255
8256- bpo-34691: The _contextvars module is now built into the core Python
8257  library on Windows.
8258
8259- bpo-35683: Improved Azure Pipelines build steps and now verifying layouts
8260  correctly
8261
8262- bpo-35642: Remove asynciomodule.c from pythoncore.vcxproj
8263
8264- bpo-35550: Fix incorrect Solaris #ifdef checks to look for __sun && __SVR4
8265  instead of sun when compiling.
8266
8267- bpo-35499: ``make profile-opt`` no longer replaces ``CFLAGS_NODIST`` with
8268  ``CFLAGS``. It now adds profile-guided optimization (PGO) flags to
8269  ``CFLAGS_NODIST``: existing ``CFLAGS_NODIST`` flags are kept.
8270
8271- bpo-35257: Avoid leaking the linker flags from Link Time Optimizations
8272  (LTO) into distutils when compiling C extensions.
8273
8274- bpo-35351: When building Python with clang and LTO, LTO flags are no
8275  longer passed into CFLAGS to build third-party C extensions through
8276  distutils.
8277
8278- bpo-35139: Fix a compiler error when statically linking `pyexpat` in
8279  `Modules/Setup`.
8280
8281- bpo-35059: PCbuild: Set InlineFunctionExpansion to OnlyExplicitInline
8282  ("/Ob1" option) in pyproject.props in Debug mode to expand functions
8283  marked as inline. This change should make Python compiled in Debug mode a
8284  little bit faster on Windows.
8285
8286- bpo-35011: Restores the use of pyexpatns.h to isolate our embedded copy of
8287  the expat C library so that its symbols do not conflict at link or dynamic
8288  loading time with an embedding application or other extension modules with
8289  their own version of libexpat.
8290
8291- bpo-28015: Have --with-lto works correctly with clang.
8292
8293- bpo-34765: Update the outdated install-sh file to the latest revision from
8294  automake v1.16.1
8295
8296- bpo-34585: Check for floating-point byte order in configure.ac using
8297  compilation tests instead of executing code, so that these checks work in
8298  cross-compiled builds.
8299
8300- bpo-34710: Fixed SSL module build with OpenSSL & pedantic CFLAGS.
8301
8302- bpo-34582: Add JUnit XML output for regression tests and update Azure
8303  DevOps builds.
8304
8305- bpo-34081: Make Sphinx warnings as errors in the Docs Makefile.
8306
8307- bpo-34555: Fix for case where it was not possible to have both
8308  ``HAVE_LINUX_VM_SOCKETS_H`` and ``HAVE_SOCKADDR_ALG`` be undefined.
8309
8310- bpo-33015: Fix an undefined behaviour in the pthread implementation of
8311  :c:func:`PyThread_start_new_thread`: add a function wrapper to always
8312  return ``NULL``.
8313
8314- bpo-34245: The Python shared library is now installed with write
8315  permission (mode 0755), which is the standard way of installing such
8316  libraries.
8317
8318- bpo-34121: Fix detection of C11 atomic support on clang.
8319
8320- bpo-32430: Rename Modules/Setup.dist to Modules/Setup, and remove the
8321  necessity to copy the former manually to the latter when updating the
8322  local source tree.
8323
8324- bpo-30345: Add -g to LDFLAGS when compiling with LTO to get debug symbols.
8325
8326- bpo-5755: Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from
8327  ``OPT``. This option emitted annoying warnings when building extension
8328  modules written in C++.
8329
8330- bpo-33614: Ensures module definition files for the stable ABI on Windows
8331  are correctly regenerated.
8332
8333- bpo-33648: The --with-c-locale-warning configuration flag has been
8334  removed. It has had no effect for about a year.
8335
8336- bpo-33522: Enable CI builds on Visual Studio Team Services at
8337  https://python.visualstudio.com/cpython
8338
8339- bpo-33512: configure's check for "long double" has been simplified
8340
8341- bpo-33483: C compiler is now correctly detected from the standard
8342  environment variables. --without-gcc and --with-icc options have been
8343  removed.
8344
8345- bpo-33394: Enable the verbose build for extension modules, when GNU make
8346  is passed macros on the command line.
8347
8348- bpo-33393: Update config.guess and config.sub files.
8349
8350- bpo-33377: Add new triplets for mips r6 and riscv variants (used in
8351  extension suffixes).
8352
8353- bpo-32232: By default, modules configured in `Modules/Setup` are no longer
8354  built with `-DPy_BUILD_CORE`. Instead, modules that specifically need that
8355  preprocessor definition include it in their individual entries.
8356
8357- bpo-33182: The embedding tests can once again be built with clang 6.0
8358
8359- bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1.
8360
8361- bpo-33012: gcc 8 has added a new warning heuristic to detect invalid
8362  function casts and a stock python build seems to hit that warning quite
8363  often.  The most common is the cast of a METH_NOARGS function (that uses
8364  just one argument) to a PyCFunction. Fix this by adding a dummy argument
8365  to all functions that implement METH_NOARGS.
8366
8367- bpo-32898: Fix the python debug build when using COUNT_ALLOCS.
8368
8369- bpo-29442: Replace optparse with argparse in setup.py
8370
8371Windows
8372-------
8373
8374- bpo-35890: Fix API calling consistency of GetVersionEx and wcstok.
8375
8376- bpo-32560: The ``py`` launcher now forwards its ``STARTUPINFO`` structure
8377  to child processes.
8378
8379- bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows
8380
8381- bpo-35811: Avoid propagating venv settings when launching via py.exe
8382
8383- bpo-35797: Fix default executable used by the multiprocessing module
8384
8385- bpo-35758: Allow building on ARM with MSVC.
8386
8387- bpo-29734: Fix handle leaks in os.stat on Windows.
8388
8389- bpo-35596: Use unchecked PYCs for the embeddable distro to avoid zipimport
8390  restrictions.
8391
8392- bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple
8393  times.
8394
8395- bpo-35402: Update Windows build to use Tcl and Tk 8.6.9
8396
8397- bpo-35401: Updates Windows build to OpenSSL 1.1.0j
8398
8399- bpo-34977: venv on Windows will now use a python.exe redirector rather
8400  than copying the actual binaries from the base environment.
8401
8402- bpo-34977: Adds support for building a Windows App Store package
8403
8404- bpo-35067: Remove _distutils_findvs module and use vswhere.exe instead.
8405
8406- bpo-32557: Allow shutil.disk_usage to take a file path on Windows
8407
8408- bpo-34770: Fix a possible null pointer dereference in pyshellext.cpp.
8409
8410- bpo-34603: Fix returning structs from functions produced by MSVC
8411
8412- bpo-34581: Guard MSVC-specific code in socketmodule.c with ``#ifdef
8413  _MSC_VER``.
8414
8415- bpo-34532: Fixes exit code of list version arguments for py.exe.
8416
8417- bpo-34062: Fixed the '--list' and '--list-paths' arguments for the py.exe
8418  launcher
8419
8420- bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash.
8421
8422- bpo-34011: A suite of code has been changed which copied across DLLs and
8423  init.tcl from the running Python location into a venv being created. These
8424  copies are needed only when running from a Python source build, and the
8425  copying code is now only run when that is the case, rather than whenever a
8426  venv is created.
8427
8428- bpo-34006: Revert line length limit for Windows help docs. The line-length
8429  limit is not needed because the pages appear in a separate app rather than
8430  on a browser tab.  It can also interact badly with the DPI setting.
8431
8432- bpo-31546: Restore running PyOS_InputHook while waiting for user input at
8433  the prompt. The restores integration of interactive GUI windows (such as
8434  Matplotlib figures) with the prompt on Windows.
8435
8436- bpo-30237: Output error when ReadConsole is canceled by
8437  CancelSynchronousIo instead of crashing.
8438
8439- bpo-33895: GIL is released while calling functions that acquire Windows
8440  loader lock.
8441
8442- bpo-33720: Reduces maximum marshal recursion depth on release builds.
8443
8444- bpo-29097: Fix bug where :meth:`datetime.fromtimestamp` erroneously throws
8445  an :exc:`OSError` on Windows for values between 0 and 86400. Patch by
8446  Ammar Askar.
8447
8448- bpo-33316: PyThread_release_lock always fails
8449
8450- bpo-33184: Update Windows installer to use OpenSSL 1.1.0h.
8451
8452- bpo-32890: Fix usage of GetLastError() instead of errno in os.execve() and
8453  os.truncate().
8454
8455- bpo-33016: Fix potential use of uninitialized memory in
8456  nt._getfinalpathname
8457
8458- bpo-32903: Fix a memory leak in os.chdir() on Windows if the current
8459  directory is set to a UNC path.
8460
8461- bpo-32901: Update Tcl and Tk versions to 8.6.8
8462
8463- bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data.
8464
8465- bpo-32409: Ensures activate.bat can handle Unicode contents.
8466
8467- bpo-32457: Improves handling of denormalized executable path when
8468  launching Python.
8469
8470- bpo-32370: Use the correct encoding for ipconfig output in the uuid
8471  module. Patch by Segev Finer.
8472
8473- bpo-29248: Fix :func:`os.readlink` on Windows, which was mistakenly
8474  treating the ``PrintNameOffset`` field of the reparse data buffer as a
8475  number of characters instead of bytes. Patch by Craig Holmquist and SSE4.
8476
8477- bpo-1104: Correctly handle string length in
8478  ``msilib.SummaryInfo.GetProperty()`` to prevent it from truncating the
8479  last character.
8480
8481macOS
8482-----
8483
8484- bpo-35401: Update macOS installer to use OpenSSL 1.1.0j.
8485
8486- bpo-35025: Properly guard the use of the ``CLOCK_GETTIME`` et al. macros
8487  in ``timemodule`` on macOS.
8488
8489- bpo-24658: On macOS, fix reading from and writing into a file with a size
8490  larger than 2 GiB.
8491
8492- bpo-34405: Update to OpenSSL 1.1.0i for macOS installer builds.
8493
8494- bpo-33635: In macOS stat on some file descriptors (/dev/fd/3 f.e) will
8495  result in bad file descriptor OSError. Guard against this exception was
8496  added in is_dir, is_file and similar methods. DirEntry.is_dir can also
8497  throw this exception so _RecursiveWildcardSelector._iterate_directories
8498  was also extended with the same error ignoring pattern.
8499
8500- bpo-13631: The .editrc file in user's home directory is now processed
8501  correctly during the readline initialization through editline emulation on
8502  macOS.
8503
8504- bpo-33184: Update macOS installer build to use OpenSSL 1.1.0h.
8505
8506- bpo-32726: Build and link with private copy of Tcl/Tk 8.6 for the macOS
8507  10.6+ installer. The 10.9+ installer variant already does this.  This
8508  means that the Python 3.7 provided by the python.org macOS installers no
8509  longer need or use any external versions of Tcl/Tk, either system-provided
8510  or user-installed, such as ActiveTcl.
8511
8512- bpo-32901: Update macOS 10.9+ installer to Tcl/Tk 8.6.8.
8513
8514- bpo-31903: In :mod:`_scproxy`, drop the GIL when calling into
8515  ``SystemConfiguration`` to avoid deadlocks.
8516
8517IDLE
8518----
8519
8520- bpo-35770: IDLE macosx deletes Options => Configure IDLE. It previously
8521  deleted Window => Zoom Height by mistake. (Zoom Height is now on the
8522  Options menu).  On Mac, the settings dialog is accessed via Preferences on
8523  the IDLE menu.
8524
8525- bpo-35769: Change IDLE's new file name from 'Untitled' to 'untitled'
8526
8527- bpo-35660: Fix imports in idlelib.window.
8528
8529- bpo-35641: Proper format `calltip` when the function has no docstring.
8530
8531- bpo-33987: Use ttk Frame for ttk widgets.
8532
8533- bpo-34055: Fix erroneous 'smart' indents and newlines in IDLE Shell.
8534
8535- bpo-35591: Find Selection now works when selection not found.
8536
8537- bpo-35196: Speed up squeezer line counting.
8538
8539- bpo-35598: Update config_key: use PEP 8 names and ttk widgets, make some
8540  objects global, and add tests.
8541
8542- bpo-28097: Add Previous/Next History entries to Shell menu.
8543
8544- bpo-35208: Squeezer now properly counts wrapped lines before newlines.
8545
8546- bpo-35555: Gray out Code Context menu entry when it's not applicable.
8547
8548- bpo-35521: Document the IDLE editor code context feature. Add some
8549  internal references within the IDLE doc.
8550
8551- bpo-22703: The Code Context menu label now toggles between Show/Hide Code
8552  Context. The Zoom Height menu now toggles between Zoom/Restore Height.
8553  Zoom Height has moved from the Window menu to the Options menu.
8554
8555- bpo-35213: Where appropriate, use 'macOS' in idlelib.
8556
8557- bpo-34864: On macOS, warn if the system preference "Prefer tabs when
8558  opening documents" is set to "Always".
8559
8560- bpo-34864: Document two IDLE on MacOS issues. The System Preferences Dock
8561  "prefer tabs always" setting disables some IDLE features.  Menus are a bit
8562  different than as described for Windows and Linux.
8563
8564- bpo-35202: Remove unused imports from lib/idlelib
8565
8566- bpo-33000: Document that IDLE's shell has no line limit. A program that
8567  runs indefinitely can overfill memory.
8568
8569- bpo-23220: Explain how IDLE's Shell displays output.
8570
8571- bpo-35099: Improve the doc about IDLE running user code.   The section is
8572  renamed from "IDLE -- console differences" is renamed "Running user code".
8573  It mostly covers the implications of using custom sys.stdxxx objects.
8574
8575- bpo-35097: Add IDLE doc subsection explaining editor windows. Topics
8576  include opening, title and status bar, .py* extension, and running.
8577
8578- bpo-35093: Document the IDLE document viewer in the IDLE doc. Add a
8579  paragraph in "Help and preferences", "Help sources" subsection.
8580
8581- bpo-35088: Update idlelib.help.copy_string docstring. We now use git and
8582  backporting instead of hg and forward merging.
8583
8584- bpo-35087: Update idlelib help files for the current doc build. The main
8585  change is the elimination of chapter-section numbers.
8586
8587- bpo-34548: Use configured color theme for read-only text views.
8588
8589- bpo-1529353: Enable "squeezing" of long outputs in the shell, to avoid
8590  performance degradation and to clean up the history without losing it.
8591  Squeezed outputs may be copied, viewed in a separate window, and
8592  "unsqueezed".
8593
8594- bpo-34047: Fixed mousewheel scrolling direction on macOS.
8595
8596- bpo-34275: Make IDLE calltips always visible on Mac. Some MacOS-tk
8597  combinations need .update_idletasks(). Patch by Kevin Walzer.
8598
8599- bpo-34120: Fix unresponsiveness after closing certain windows and dialogs.
8600
8601- bpo-33975: Avoid small type when running htests. Since part of the purpose
8602  of human-viewed tests is to determine that widgets look right, it is
8603  important that they look the same for testing as when running IDLE.
8604
8605- bpo-33905: Add test for idlelib.stackview.StackBrowser.
8606
8607- bpo-33924: Change mainmenu.menudefs key 'windows' to 'window'. Every other
8608  menudef key is lowercase version of main menu entry.
8609
8610- bpo-33906: Rename idlelib.windows as window Match Window on the main menu
8611  and remove last plural module name.
8612
8613- bpo-33917: Fix and document idlelib/idle_test/template.py. The revised
8614  file compiles, runs, and tests OK.  idle_test/README.txt explains how to
8615  use it to create new IDLE test files.
8616
8617- bpo-33904: IDLE: In rstrip, rename class RstripExtension as Rstrip
8618
8619- bpo-33907: For consistency and clarity, rename an IDLE module and classes.
8620  Module calltips and its class CallTips are now calltip and Calltip. In
8621  module calltip_w, class CallTip is now CalltipWindow.
8622
8623- bpo-33856: Add "help" in the welcome message of IDLE
8624
8625- bpo-33839: IDLE: refactor ToolTip and CallTip and add documentation and
8626  tests
8627
8628- bpo-33855: Minimally test all IDLE modules. Add missing files, import
8629  module, instantiate classes, and check coverage. Check existing files.
8630
8631- bpo-33656: On Windows, add API call saying that tk scales for DPI. On
8632  Windows 8.1+ or 10, with DPI compatibility properties of the Python binary
8633  unchanged, and a monitor resolution greater than 96 DPI, this should make
8634  text and lines sharper.  It should otherwise have no effect.
8635
8636- bpo-33768: Clicking on a context line moves that line to the top of the
8637  editor window.
8638
8639- bpo-33763: IDLE: Use read-only text widget for code context instead of
8640  label widget.
8641
8642- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel
8643  and scrollbar slider moved text by a fixed number of pixels, resulting in
8644  partial lines at the top of the editor box.  The change also applies to
8645  the shell and grep output windows, but not to read-only text views.
8646
8647- bpo-33679: Enable theme-specific color configuration for Code Context. Use
8648  the Highlights tab to see the setting for built-in themes or add settings
8649  to custom themes.
8650
8651- bpo-33642: Display up to maxlines non-blank lines for Code Context. If
8652  there is no current context, show a single blank line.
8653
8654- bpo-33628: IDLE: Cleanup codecontext.py and its test.
8655
8656- bpo-33564: IDLE's code context now recognizes async as a block opener.
8657
8658- bpo-21474: Update word/identifier definition from ascii to unicode. In
8659  text and entry boxes, this affects selection by double-click, movement
8660  left/right by control-left/right, and deletion left/right by
8661  control-BACKSPACE/DEL.
8662
8663- bpo-33204: IDLE: consistently color invalid string prefixes. A 'u' string
8664  prefix cannot be paired with either 'r' or 'f'. Consistently color as much
8665  of the prefix, starting at the right, as is valid. Revise and extend
8666  colorizer test.
8667
8668- bpo-32984: Set ``__file__`` while running a startup file.  Like Python,
8669  IDLE optionally runs one startup file in the Shell window before
8670  presenting the first interactive input prompt.  For IDLE, ``-s`` runs a
8671  file named in environmental variable  :envvar:`IDLESTARTUP` or
8672  :envvar:`PYTHONSTARTUP`; ``-r file`` runs ``file``.  Python sets
8673  ``__file__`` to the startup file name before running the file and unsets
8674  it before the first prompt.  IDLE now does the same when run normally,
8675  without the ``-n`` option.
8676
8677- bpo-32940: Simplify and rename StringTranslatePseudoMapping in pyparse.
8678
8679- bpo-32916: Change ``str`` to ``code`` in pyparse.
8680
8681- bpo-32905: Remove unused code in pyparse module.
8682
8683- bpo-32874: Add tests for pyparse.
8684
8685- bpo-32837: Using the system and place-dependent default encoding for
8686  open() is a bad idea for IDLE's system and location-independent files.
8687
8688- bpo-32826: Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI
8689  test test_file_buttons() only looks at initial ascii-only lines, but
8690  failed on systems where open() defaults to 'ascii' because readline()
8691  internally reads and decodes far enough ahead to encounter a non-ascii
8692  character in CREDITS.txt.
8693
8694- bpo-32831: Add docstrings and tests for codecontext.
8695
8696- bpo-32765: Update configdialog General tab docstring to add new widgets to
8697  the widget list.
8698
8699Tools/Demos
8700-----------
8701
8702- bpo-35884: Add a benchmark script for timing various ways to access
8703  variables: ``Tools/scripts/var_access_benchmark.py``.
8704
8705- bpo-34989: python-gdb.py now handles errors on computing the line number
8706  of a Python frame.
8707
8708- bpo-20260: Argument Clinic now has non-bitwise unsigned int converters.
8709
8710- bpo-32962: python-gdb now catches ``UnicodeDecodeError`` exceptions when
8711  calling ``string()``.
8712
8713- bpo-32962: python-gdb now catches ValueError on read_var(): when Python
8714  has no debug symbols for example.
8715
8716- bpo-33189: :program:`pygettext.py` now recognizes only literal strings as
8717  docstrings and translatable strings, and rejects bytes literals and
8718  f-string expressions.
8719
8720- bpo-31920: Fixed handling directories as arguments in the ``pygettext``
8721  script. Based on patch by Oleg Krasnikov.
8722
8723- bpo-29673: Fix pystackv and pystack gdbinit macros.
8724
8725- bpo-25427: Remove the pyvenv script in favor of ``python3 -m venv`` in
8726  order to lower confusion as to what Python interpreter a virtual
8727  environment will be created for.
8728
8729- bpo-32885: Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable
8730  automatic backup creation (files with ``~`` suffix).
8731
8732- bpo-32222: Fix pygettext not extracting docstrings for functions with type
8733  annotated arguments. Patch by Toby Harradine.
8734
8735- bpo-31583: Fix 2to3 for using with --add-suffix option but without
8736  --output-dir option for relative path to files in current directory.
8737
8738C API
8739-----
8740
8741- bpo-35713: The :c:func:`PyByteArray_Init` and :c:func:`PyByteArray_Fini`
8742  functions have been removed. They did nothing since Python 2.7.4 and
8743  Python 3.2.0, were excluded from the limited API (stable ABI), and were
8744  not documented.
8745
8746- bpo-33817: Fixed :c:func:`_PyBytes_Resize` for empty bytes objects.
8747
8748- bpo-35322: Fix memory leak in :c:func:`PyUnicode_EncodeLocale` and
8749  :c:func:`PyUnicode_EncodeFSDefault` on error handling.
8750
8751- bpo-35059: The following C macros have been converted to static inline
8752  functions: :c:func:`Py_INCREF`, :c:func:`Py_DECREF`, :c:func:`Py_XINCREF`,
8753  :c:func:`Py_XDECREF`, :c:func:`PyObject_INIT`,
8754  :c:func:`PyObject_INIT_VAR`.
8755
8756- bpo-35296: ``make install`` now also installs the internal API:
8757  ``Include/internal/*.h`` header files.
8758
8759- bpo-35081: Internal APIs surrounded by ``#ifdef Py_BUILD_CORE`` have been
8760  moved from ``Include/*.h`` headers to new header files
8761  ``Include/internal/pycore_*.h``.
8762
8763- bpo-35259: Conditionally declare :c:func:`Py_FinalizeEx()` (new in 3.6)
8764  based on Py_LIMITED_API. Patch by Arthur Neufeld.
8765
8766- bpo-35081: The :c:func:`_PyObject_GC_TRACK` and
8767  :c:func:`_PyObject_GC_UNTRACK` macros have been removed from the public C
8768  API.
8769
8770- bpo-35134: Creation of a new ``Include/cpython/`` subdirectory.
8771
8772- bpo-34725: Adds _Py_SetProgramFullPath so embedders may override
8773  sys.executable
8774
8775- bpo-34910: Ensure that :c:func:`PyObject_Print` always returns ``-1`` on
8776  error.  Patch by Zackery Spytz.
8777
8778- bpo-34523: Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8
8779  encoding on Windows if Py_LegacyWindowsFSEncodingFlag is zero.
8780
8781- bpo-34193: Fix pluralization in TypeError messages in getargs.c and
8782  typeobject.c: '1 argument' instead of '1 arguments' and '1 element'
8783  instead of '1 elements'.
8784
8785- bpo-34127: Return grammatically correct error message based on argument
8786  count. Patch by Karthikeyan Singaravelan.
8787
8788- bpo-23927: Fixed :exc:`SystemError` in
8789  :c:func:`PyArg_ParseTupleAndKeywords` when the ``w*`` format unit is used
8790  for optional parameter.
8791
8792- bpo-32455: Added :c:func:`PyCompile_OpcodeStackEffectWithJump`.
8793
8794- bpo-34008: Py_Main() can again be called after Py_Initialize(), as in
8795  Python 3.6.
8796
8797- bpo-32500: Fixed error messages for :c:func:`PySequence_Size`,
8798  :c:func:`PySequence_GetItem`, :c:func:`PySequence_SetItem` and
8799  :c:func:`PySequence_DelItem` called with a mapping and
8800  :c:func:`PyMapping_Size` called with a sequence.
8801
8802- bpo-33818: :c:func:`PyExceptionClass_Name` will now return ``const char
8803  *`` instead of ``char *``.
8804
8805- bpo-33042: Embedding applications may once again call
8806  PySys_ResetWarnOptions, PySys_AddWarnOption, and PySys_AddXOption prior to
8807  calling Py_Initialize.
8808
8809- bpo-32374: Document that m_traverse for multi-phase initialized modules
8810  can be called with m_state=NULL, and add a sanity check
8811
8812- bpo-30863: :c:func:`PyUnicode_AsWideChar` and
8813  :c:func:`PyUnicode_AsWideCharString` no longer cache the ``wchar_t*``
8814  representation of string objects.
8815
8816
8817What's New in Python 3.7.0 final?
8818=================================
8819
8820*Release date: 2018-06-27*
8821
8822Library
8823-------
8824
8825- bpo-33851: Fix :func:`ast.get_docstring` for a node that lacks a
8826  docstring.
8827
8828C API
8829-----
8830
8831- bpo-33932: Calling Py_Initialize() twice does nothing, instead of failing
8832  with a fatal error: restore the Python 3.6 behaviour.
8833
8834
8835What's New in Python 3.7.0 release candidate 1?
8836===============================================
8837
8838*Release date: 2018-06-12*
8839
8840Core and Builtins
8841-----------------
8842
8843- bpo-33803: Fix a crash in hamt.c caused by enabling GC tracking for an
8844  object that hadn't all of its fields set to NULL.
8845
8846- bpo-33706: Fix a crash in Python initialization when parsing the command
8847  line options. Thanks Christoph Gohlke for the bug report and the fix!
8848
8849- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter
8850  shutdown even when there was a custom handler set previously. Patch by
8851  Philipp Kerling.
8852
8853- bpo-31849: Fix signed/unsigned comparison warning in pyhash.c.
8854
8855Library
8856-------
8857
8858- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by
8859  Steve Weber.
8860
8861- bpo-33812: Datetime instance d with non-None tzinfo, but with
8862  d.tzinfo.utcoffset(d) returning None is now treated as naive by the
8863  astimezone() method.
8864
8865- bpo-30805: Avoid race condition with debug logging
8866
8867- bpo-33694: asyncio: Fix a race condition causing data loss on
8868  pause_reading()/resume_reading() when using the ProactorEventLoop.
8869
8870- bpo-32493: Correct test for ``uuid_enc_be`` availability in
8871  ``configure.ac``. Patch by Michael Felt.
8872
8873- bpo-33792: Add asyncio.WindowsSelectorEventLoopPolicy and
8874  asyncio.WindowsProactorEventLoopPolicy.
8875
8876- bpo-33778: Update ``unicodedata``'s database to Unicode version 11.0.0.
8877
8878- bpo-33770: improve base64 exception message for encoded inputs of invalid
8879  length
8880
8881- bpo-33769: asyncio/start_tls: Fix error message; cancel callbacks in case
8882  of an unhandled error; mark SSLTransport as closed if it is aborted.
8883
8884- bpo-33767: The concatenation (``+``) and repetition (``*``) sequence
8885  operations now raise :exc:`TypeError` instead of :exc:`SystemError` when
8886  performed on :class:`mmap.mmap` objects.  Patch by Zackery Spytz.
8887
8888- bpo-33734: asyncio/ssl: Fix AttributeError, increase default handshake
8889  timeout
8890
8891- bpo-11874: Use a better regex when breaking usage into wrappable parts.
8892  Avoids bogus assertion errors from custom metavar strings.
8893
8894- bpo-33582: Emit a deprecation warning for inspect.formatargspec
8895
8896Documentation
8897-------------
8898
8899- bpo-33409: Clarified the relationship between :pep:`538`'s
8900  PYTHONCOERCECLOCALE and PEP 540's PYTHONUTF8 mode.
8901
8902- bpo-33736: Improve the documentation of :func:`asyncio.open_connection`,
8903  :func:`asyncio.start_server` and their UNIX socket counterparts.
8904
8905- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED
8906  flags for ssl.SSLContext.verify_mode.
8907
8908Build
8909-----
8910
8911- bpo-5755: Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from
8912  ``OPT``. This option emitted annoying warnings when building extension
8913  modules written in C++.
8914
8915Windows
8916-------
8917
8918- bpo-33720: Reduces maximum marshal recursion depth on release builds.
8919
8920IDLE
8921----
8922
8923- bpo-33656: On Windows, add API call saying that tk scales for DPI. On
8924  Windows 8.1+ or 10, with DPI compatibility properties of the Python binary
8925  unchanged, and a monitor resolution greater than 96 DPI, this should make
8926  text and lines sharper.  It should otherwise have no effect.
8927
8928- bpo-33768: Clicking on a context line moves that line to the top of the
8929  editor window.
8930
8931- bpo-33763: IDLE: Use read-only text widget for code context instead of
8932  label widget.
8933
8934- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel
8935  and scrollbar slider moved text by a fixed number of pixels, resulting in
8936  partial lines at the top of the editor box.  The change also applies to
8937  the shell and grep output windows, but not to read-only text views.
8938
8939- bpo-33679: Enable theme-specific color configuration for Code Context. Use
8940  the Highlights tab to see the setting for built-in themes or add settings
8941  to custom themes.
8942
8943- bpo-33642: Display up to maxlines non-blank lines for Code Context. If
8944  there is no current context, show a single blank line.
8945
8946
8947What's New in Python 3.7.0 beta 5?
8948==================================
8949
8950*Release date: 2018-05-30*
8951
8952Core and Builtins
8953-----------------
8954
8955- bpo-33622: Fixed a leak when the garbage collector fails to add an object
8956  with the ``__del__`` method or referenced by it into the
8957  :data:`gc.garbage` list. :c:func:`PyGC_Collect` can now be called when an
8958  exception is set and preserves it.
8959
8960- bpo-33509: Fix module_globals parameter of warnings.warn_explicit(): don't
8961  crash if module_globals is not a dict.
8962
8963- bpo-20104: The new `os.posix_spawn` added in 3.7.0b1 was removed as we are
8964  still working on what the API should look like.  Expect this in 3.8
8965  instead.
8966
8967- bpo-33475: Fixed miscellaneous bugs in converting annotations to strings
8968  and optimized parentheses in the string representation.
8969
8970- bpo-33391: Fix a leak in set_symmetric_difference().
8971
8972- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer.
8973
8974- bpo-32911: Due to unexpected compatibility issues discovered during
8975  downstream beta testing, reverted :issue:`29463`. ``docstring`` field is
8976  removed from Module, ClassDef, FunctionDef, and AsyncFunctionDef ast nodes
8977  which was added in 3.7a1.  Docstring expression is restored as a first
8978  statement in their body. Based on patch by Inada Naoki.
8979
8980- bpo-21983: Fix a crash in `ctypes.cast()` in case the type argument is a
8981  ctypes structured data type. Patch by Eryk Sun and Oren Milman.
8982
8983Library
8984-------
8985
8986- bpo-32751: When cancelling the task due to a timeout,
8987  :meth:`asyncio.wait_for` will now wait until the cancellation is complete.
8988
8989- bpo-32684: Fix gather to propagate cancellation of itself even with
8990  return_exceptions.
8991
8992- bpo-33654: Support protocol type switching in SSLTransport.set_protocol().
8993
8994- bpo-33674: Pause the transport as early as possible to further reduce the
8995  risk of data_received() being called before connection_made().
8996
8997- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of
8998  asyncio.sslproto: start immediately the handshake instead of using
8999  call_soon(). Previously, data_received() could be called before the
9000  handshake started, causing the handshake to hang or fail.
9001
9002- bpo-31647: Fixed bug where calling write_eof() on a
9003  _SelectorSocketTransport after it's already closed raises AttributeError.
9004
9005- bpo-32610: Make asyncio.all_tasks() return only pending tasks.
9006
9007- bpo-32410: Avoid blocking on file IO in sendfile fallback code
9008
9009- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor
9010
9011- bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines
9012
9013- bpo-33654: Fix transport.set_protocol() to support switching between
9014  asyncio.Protocol and asyncio.BufferedProtocol.  Fix loop.start_tls() to
9015  work with asyncio.BufferedProtocols.
9016
9017- bpo-33652: Pickles of type variables and subscripted generics are now
9018  future-proof and compatible with older Python versions.
9019
9020- bpo-32493: Fixed :func:`uuid.uuid1` on FreeBSD.
9021
9022- bpo-33618: Finalize and document preliminary and experimental TLS 1.3
9023  support with OpenSSL 1.1.1
9024
9025- bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__
9026
9027- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder
9028  that prevented the cache of parsed strings from clearing after finishing
9029  the decoding. Based on patch by c-fos.
9030
9031- bpo-33570: Change TLS 1.3 cipher suite settings for compatibility with
9032  OpenSSL 1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 ciphers
9033  enabled by default.
9034
9035- bpo-28556: Do not simplify arguments to `typing.Union`. Now
9036  `Union[Manager, Employee]` is not simplified to `Employee` at runtime.
9037  Such simplification previously caused several bugs and limited
9038  possibilities for introspection.
9039
9040- bpo-33540: Add a new ``block_on_close`` class attribute to
9041  ``ForkingMixIn`` and ``ThreadingMixIn`` classes of :mod:`socketserver`.
9042
9043- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP
9044  locations
9045
9046- bpo-33109: argparse subparsers are once again not required by default,
9047  reverting the change in behavior introduced by bpo-26510 in 3.7.0a2.
9048
9049- bpo-33536: dataclasses.make_dataclass now checks for invalid field names
9050  and duplicate fields. Also, added a check for invalid field
9051  specifications.
9052
9053- bpo-33542: Prevent ``uuid.get_node`` from using a DUID instead of a MAC on
9054  Windows. Patch by Zvi Effron
9055
9056- bpo-26819: Fix race condition with `ReadTransport.resume_reading` in
9057  Windows proactor event loop.
9058
9059- Fix failure in `typing.get_type_hints()` when ClassVar was provided as a
9060  string forward reference.
9061
9062- bpo-33505: Optimize asyncio.ensure_future() by reordering if checks: 1.17x
9063  faster.
9064
9065- bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in
9066  FieldStorage use the given errors (needed for Twisted).  Patch by Amber
9067  Brown.
9068
9069- bpo-33495: Change dataclasses.Fields repr to use the repr of each of its
9070  members, instead of str.  This makes it more clear what each field
9071  actually represents.  This is especially true for the 'type' member.
9072
9073- bpo-33453: Fix dataclasses to work if using literal string type
9074  annotations or if using PEP 563 "Postponed Evaluation of Annotations".
9075  Only specific string prefixes are detected for both ClassVar ("ClassVar"
9076  and "typing.ClassVar") and InitVar ("InitVar" and "dataclasses.InitVar").
9077
9078- bpo-28556: Minor fixes in typing module: add annotations to
9079  ``NamedTuple.__new__``, pass ``*args`` and ``**kwds`` in
9080  ``Generic.__new__``.  Original PRs by Paulius Šarka and Chad Dombrova.
9081
9082- bpo-20087: Updated alias mapping with glibc 2.27 supported locales.
9083
9084- bpo-33422: Fix trailing quotation marks getting deleted when looking up
9085  byte/string literals on pydoc. Patch by Andrés Delfino.
9086
9087- bpo-28167: The function ``platform.linux_distribution`` and
9088  ``platform.dist`` now trigger a ``DeprecationWarning`` and have been
9089  marked for removal in Python 3.8
9090
9091- bpo-33197: Update error message when constructing invalid
9092  inspect.Parameters Patch by Dong-hee Na.
9093
9094- bpo-33263: Fix FD leak in `_SelectorSocketTransport`  Patch by Vlad
9095  Starostin.
9096
9097- bpo-32861: The urllib.robotparser's ``__str__`` representation now
9098  includes wildcard entries and the "Crawl-delay" and "Request-rate" fields.
9099  Patch by Michael Lazar.
9100
9101- bpo-32257: The ssl module now contains OP_NO_RENEGOTIATION constant,
9102  available with OpenSSL 1.1.0h or 1.1.1.
9103
9104- bpo-16865: Support arrays >=2GiB in :mod:`ctypes`.  Patch by Segev Finer.
9105
9106Documentation
9107-------------
9108
9109- bpo-23859: Document that `asyncio.wait()` does not cancel its futures on
9110  timeout.
9111
9112- bpo-32436: Document :pep:`567` changes to asyncio.
9113
9114- bpo-33604: Update HMAC md5 default to a DeprecationWarning, bump removal
9115  to 3.8.
9116
9117- bpo-33503: Fix broken pypi link
9118
9119- bpo-33421: Add missing documentation for ``typing.AsyncContextManager``.
9120
9121Tests
9122-----
9123
9124- bpo-33655: Ignore test_posix_fallocate failures on BSD platforms that
9125  might be due to running on ZFS.
9126
9127- bpo-32604: Remove the _xxsubinterpreters module (meant for testing) and
9128  associated helpers.  This module was originally added recently in 3.7b1.
9129
9130Build
9131-----
9132
9133- bpo-33614: Ensures module definition files for the stable ABI on Windows
9134  are correctly regenerated.
9135
9136- bpo-33522: Enable CI builds on Visual Studio Team Services at
9137  https://python.visualstudio.com/cpython
9138
9139- bpo-33012: Add ``-Wno-cast-function-type`` for gcc 8 for silencing
9140  warnings about function casts like casting to PyCFunction in method
9141  definition lists.
9142
9143macOS
9144-----
9145
9146- bpo-13631: The .editrc file in user's home directory is now processed
9147  correctly during the readline initialization through editline emulation on
9148  macOS.
9149
9150IDLE
9151----
9152
9153- bpo-33628: IDLE: Cleanup codecontext.py and its test.
9154
9155- bpo-33564: IDLE's code context now recognizes async as a block opener.
9156
9157- bpo-32831: Add docstrings and tests for codecontext.
9158
9159
9160What's New in Python 3.7.0 beta 4?
9161==================================
9162
9163*Release date: 2018-05-02*
9164
9165Core and Builtins
9166-----------------
9167
9168- bpo-33363: Raise a SyntaxError for ``async with`` and ``async for``
9169  statements outside of async functions.
9170
9171- bpo-33128: Fix a bug that causes PathFinder to appear twice on
9172  sys.meta_path. Patch by Pablo Galindo Salgado.
9173
9174- bpo-33312: Fixed clang ubsan (undefined behavior sanitizer) warnings in
9175  dictobject.c by adjusting how the internal struct _dictkeysobject shared
9176  keys structure is declared.
9177
9178- bpo-33231: Fix potential memory leak in ``normalizestring()``.
9179
9180- bpo-33205: Change dict growth function from
9181  ``round_up_to_power_2(used*2+hashtable_size/2)`` to
9182  ``round_up_to_power_2(used*3)``.  Previously, dict is shrinked only when
9183  ``used == 0``. Now dict has more chance to be shrinked.
9184
9185- bpo-29922: Improved error messages in 'async with' when ``__aenter__()``
9186  or ``__aexit__()`` return non-awaitable object.
9187
9188- bpo-33199: Fix ``ma_version_tag`` in dict implementation is uninitialized
9189  when copying from key-sharing dict.
9190
9191Library
9192-------
9193
9194- bpo-33281: Fix ctypes.util.find_library regression on macOS.
9195
9196- bpo-33383: Fixed crash in the get() method of the :mod:`dbm.ndbm` database
9197  object when it is called with a single argument.
9198
9199- bpo-33329: Fix multiprocessing regression on newer glibcs
9200
9201- bpo-991266: Fix quoting of the ``Comment`` attribute of
9202  :class:`http.cookies.SimpleCookie`.
9203
9204- bpo-33131: Upgrade bundled version of pip to 10.0.1.
9205
9206- bpo-33308: Fixed a crash in the :mod:`parser` module when converting an ST
9207  object to a tree of tuples or lists with ``line_info=False`` and
9208  ``col_info=True``.
9209
9210- bpo-33266: lib2to3 now recognizes ``rf'...'`` strings.
9211
9212- bpo-11594: Ensure line-endings are respected when using lib2to3.
9213
9214- bpo-33254: Have :func:`importlib.resources.contents` and
9215  :meth:`importlib.abc.ResourceReader.contents` return an :term:`iterable`
9216  instead of an :term:`iterator`.
9217
9218- bpo-33256: Fix display of ``<module>`` call in the html produced by
9219  ``cgitb.html()``. Patch by Stéphane Blondon.
9220
9221- bpo-33185: Fixed regression when running pydoc with the :option:`-m`
9222  switch. (The regression was introduced in 3.7.0b3 by the resolution of
9223  :issue:`33053`) This fix also changed pydoc to add ``os.getcwd()`` to
9224  :data:`sys.path` when necessary, rather than adding ``"."``.
9225
9226- bpo-33169: Delete entries of ``None`` in :data:`sys.path_importer_cache`
9227  when :meth:`importlib.machinery.invalidate_caches` is called.
9228
9229- bpo-33217: Deprecate looking up non-Enum objects in Enum classes and Enum
9230  members (will raise :exc:`TypeError` in 3.8+).
9231
9232- bpo-33203: ``random.Random.choice()`` now raises ``IndexError`` for empty
9233  sequences consistently even when called from subclasses without a
9234  ``getrandbits()`` implementation.
9235
9236- bpo-33224: Update difflib.mdiff() for :pep:`479`.  Convert an uncaught
9237  StopIteration in a generator into a return-statement.
9238
9239- bpo-33209: End framing at the end of C implementation of
9240  :func:`pickle.Pickler.dump`.
9241
9242- bpo-20104: Improved error handling and fixed a reference leak in
9243  :func:`os.posix_spawn()`.
9244
9245- bpo-33175: In dataclasses, Field.__set_name__ now looks up the
9246  __set_name__ special method on the class, not the instance, of the default
9247  value.
9248
9249- bpo-33097: Raise RuntimeError when ``executor.submit`` is called during
9250  interpreter shutdown.
9251
9252- bpo-31908: Fix output of cover files for ``trace`` module command-line
9253  tool. Previously emitted cover files only when ``--missing`` option was
9254  used. Patch by Michael Selik.
9255
9256Documentation
9257-------------
9258
9259- bpo-33378: Add Korean language switcher for https://docs.python.org/3/
9260
9261- bpo-33276: Clarify that the ``__path__`` attribute on modules cannot be
9262  just any value.
9263
9264- bpo-33201: Modernize documentation for writing C extension types.
9265
9266- bpo-33195: Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document.
9267  ``Py_UNICODE`` related APIs are deprecated since Python 3.3, but it is
9268  missed in the document.
9269
9270- bpo-8243: Add a note about curses.addch and curses.addstr exception
9271  behavior when writing outside a window, or pad.
9272
9273- bpo-32337: Update documentation related with ``dict`` order.
9274
9275Tests
9276-----
9277
9278- bpo-33358: Fix ``test_embed.test_pre_initialization_sys_options()`` when
9279  the interpreter is built with ``--enable-shared``.
9280
9281Build
9282-----
9283
9284- bpo-33394: Enable the verbose build for extension modules, when GNU make
9285  is passed macros on the command line.
9286
9287- bpo-33393: Update config.guess and config.sub files.
9288
9289- bpo-33377: Add new triplets for mips r6 and riscv variants (used in
9290  extension suffixes).
9291
9292- bpo-32232: By default, modules configured in `Modules/Setup` are no longer
9293  built with `-DPy_BUILD_CORE`. Instead, modules that specifically need that
9294  preprocessor definition include it in their individual entries.
9295
9296- bpo-33182: The embedding tests can once again be built with clang 6.0
9297
9298Windows
9299-------
9300
9301- bpo-33184: Update Windows installer to use OpenSSL 1.1.0h.
9302
9303macOS
9304-----
9305
9306- bpo-33184: Update macOS installer build to use OpenSSL 1.1.0h.
9307
9308IDLE
9309----
9310
9311- bpo-21474: Update word/identifier definition from ascii to unicode. In
9312  text and entry boxes, this affects selection by double-click, movement
9313  left/right by control-left/right, and deletion left/right by
9314  control-BACKSPACE/DEL.
9315
9316- bpo-33204: IDLE: consistently color invalid string prefixes. A 'u' string
9317  prefix cannot be paired with either 'r' or 'f'. Consistently color as much
9318  of the prefix, starting at the right, as is valid. Revise and extend
9319  colorizer test.
9320
9321Tools/Demos
9322-----------
9323
9324- bpo-33189: :program:`pygettext.py` now recognizes only literal strings as
9325  docstrings and translatable strings, and rejects bytes literals and
9326  f-string expressions.
9327
9328- bpo-31920: Fixed handling directories as arguments in the ``pygettext``
9329  script. Based on patch by Oleg Krasnikov.
9330
9331- bpo-29673: Fix pystackv and pystack gdbinit macros.
9332
9333- bpo-31583: Fix 2to3 for using with --add-suffix option but without
9334  --output-dir option for relative path to files in current directory.
9335
9336
9337What's New in Python 3.7.0 beta 3?
9338==================================
9339
9340*Release date: 2018-03-29*
9341
9342Security
9343--------
9344
9345- bpo-33136: Harden ssl module against LibreSSL CVE-2018-8970.
9346  X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new
9347  test ensures that NULL bytes are not allowed.
9348
9349- bpo-33001: Minimal fix to prevent buffer overrun in os.symlink on Windows
9350
9351- bpo-32981: Regexes in difflib and poplib were vulnerable to catastrophic
9352  backtracking. These regexes formed potential DOS vectors (REDOS). They
9353  have been refactored. This resolves CVE-2018-1060 and CVE-2018-1061. Patch
9354  by Jamie Davis.
9355
9356Core and Builtins
9357-----------------
9358
9359- bpo-33053: When using the -m switch, sys.path[0] is now explicitly
9360  expanded as the *starting* working directory, rather than being left as
9361  the empty path (which allows imports from the current working directory at
9362  the time of the import)
9363
9364- bpo-33018: Improve consistency of errors raised by ``issubclass()`` when
9365  called with a non-class and an abstract base class as the first and second
9366  arguments, respectively. Patch by Josh Bronson.
9367
9368- bpo-33041: Fixed jumping when the function contains an ``async for`` loop.
9369
9370- bpo-33026: Fixed jumping out of "with" block by setting f_lineno.
9371
9372- bpo-33005: Fix a crash on fork when using a custom memory allocator (ex:
9373  using PYTHONMALLOC env var). _PyGILState_Reinit() and
9374  _PyInterpreterState_Enable() now use the default RAW memory allocator to
9375  allocate a new interpreters mutex on fork.
9376
9377- bpo-17288: Prevent jumps from 'return' and 'exception' trace events.
9378
9379- bpo-32836: Don't use temporary variables in cases of list/dict/set
9380  comprehensions
9381
9382Library
9383-------
9384
9385- bpo-33141: Have Field objects pass through __set_name__ to their default
9386  values, if they have their own __set_name__.
9387
9388- bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false
9389  boolean value. Note iid=0 and iid=False would be same. Patch by Garvit
9390  Khatri.
9391
9392- bpo-32873: Treat type variables and special typing forms as immutable by
9393  copy and pickle.  This fixes several minor issues and inconsistencies, and
9394  improves backwards compatibility with Python 3.6.
9395
9396- bpo-33134: When computing dataclass's __hash__, use the lookup table to
9397  contain the function which returns the __hash__ value.  This is an
9398  improvement over looking up a string, and then testing that string to see
9399  what to do.
9400
9401- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1.
9402
9403- bpo-32505: Raise TypeError if a member variable of a dataclass is of type
9404  Field, but doesn't have a type annotation.
9405
9406- bpo-33078: Fix the failure on OSX caused by the tests relying on
9407  sem_getvalue
9408
9409- bpo-33116: Add 'Field' to dataclasses.__all__.
9410
9411- bpo-32896: Fix an error where subclassing a dataclass with a field that
9412  uses a default_factory would generate an incorrect class.
9413
9414- bpo-33100: Dataclasses: If a field has a default value that's a
9415  MemberDescriptorType, then it's from that field being in __slots__, not an
9416  actual default value.
9417
9418- bpo-32953: If a non-dataclass inherits from a frozen dataclass, allow
9419  attributes to be added to the derived class.  Only attributes from the
9420  frozen dataclass cannot be assigned to.  Require all dataclasses in a
9421  hierarchy to be either all frozen or all non-frozen.
9422
9423- bpo-33061: Add missing ``NoReturn`` to ``__all__`` in typing.py
9424
9425- bpo-33078: Fix the size handling in multiprocessing.Queue when a pickling
9426  error occurs.
9427
9428- bpo-33064: lib2to3 now properly supports trailing commas after ``*args``
9429  and ``**kwargs`` in function signatures.
9430
9431- bpo-33056: FIX properly close leaking fds in
9432  concurrent.futures.ProcessPoolExecutor.
9433
9434- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all
9435  threads when calling mmap.mmap(), os.urandom(), and random.seed().  Patch
9436  by Nir Soffer.
9437
9438- bpo-31804: Avoid failing in multiprocessing.Process if the standard
9439  streams are closed or None at exit.
9440
9441- bpo-33037: Skip sending/receiving data after SSL transport closing.
9442
9443- bpo-27683: Fix a regression in :mod:`ipaddress` that result of
9444  :meth:`hosts` is empty when the network is constructed by a tuple
9445  containing an integer mask and only 1 bit left for addresses.
9446
9447- bpo-32999: Fix C implementation of ``ABC.__subclasscheck__(cls,
9448  subclass)`` crashed when ``subclass`` is not a type object.
9449
9450- bpo-33009: Fix inspect.signature() for single-parameter partialmethods.
9451
9452- bpo-32969: Expose several missing constants in zlib and fix corresponding
9453  documentation.
9454
9455- bpo-32056: Improved exceptions raised for invalid number of channels and
9456  sample width when read an audio file in modules :mod:`aifc`, :mod:`wave`
9457  and :mod:`sunau`.
9458
9459- bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in
9460  subprocess if another low descriptor is closed.
9461
9462- bpo-32857: In :mod:`tkinter`, ``after_cancel(None)`` now raises a
9463  :exc:`ValueError` instead of canceling the first scheduled function.
9464  Patch by Cheryl Sabella.
9465
9466- bpo-31639: http.server now exposes a ThreadedHTTPServer class and uses it
9467  when the module is run with ``-m`` to cope with web browsers pre-opening
9468  sockets.
9469
9470- bpo-27645: :class:`sqlite3.Connection` now exposes a
9471  :class:`~sqlite3.Connection.backup` method, if the underlying SQLite
9472  library is at version 3.6.11 or higher.  Patch by Lele Gaifax.
9473
9474Documentation
9475-------------
9476
9477- bpo-33126: Document PyBuffer_ToContiguous().
9478
9479- bpo-27212: Modify documentation for the :func:`islice` recipe to consume
9480  initial values up to the start index.
9481
9482- bpo-28247: Update :mod:`zipapp` documentation to describe how to make
9483  standalone applications.
9484
9485- bpo-18802: Documentation changes for ipaddress.  Patch by Jon Foster and
9486  Berker Peksag.
9487
9488- bpo-27428: Update documentation to clarify that ``WindowsRegistryFinder``
9489  implements ``MetaPathFinder``. (Patch by Himanshu Lakhara)
9490
9491Tests
9492-----
9493
9494- bpo-32872: Avoid regrtest compatibility issue with namespace packages.
9495
9496- bpo-32517: Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport
9497  of ``KqueueSelector`` loop was not being closed.
9498
9499- bpo-19417: Add test_bdb.py.
9500
9501Build
9502-----
9503
9504- bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1.
9505
9506Windows
9507-------
9508
9509- bpo-33016: Fix potential use of uninitialized memory in
9510  nt._getfinalpathname
9511
9512- bpo-32903: Fix a memory leak in os.chdir() on Windows if the current
9513  directory is set to a UNC path.
9514
9515macOS
9516-----
9517
9518- bpo-32726: Build and link with private copy of Tcl/Tk 8.6 for the macOS
9519  10.6+ installer. The 10.9+ installer variant already does this.  This
9520  means that the Python 3.7 provided by the python.org macOS installers no
9521  longer need or use any external versions of Tcl/Tk, either system-provided
9522  or user-installed, such as ActiveTcl.
9523
9524IDLE
9525----
9526
9527- bpo-32984: Set ``__file__`` while running a startup file.  Like Python,
9528  IDLE optionally runs one startup file in the Shell window before
9529  presenting the first interactive input prompt.  For IDLE, ``-s`` runs a
9530  file named in environmental variable  :envvar:`IDLESTARTUP` or
9531  :envvar:`PYTHONSTARTUP`; ``-r file`` runs ``file``.  Python sets
9532  ``__file__`` to the startup file name before running the file and unsets
9533  it before the first prompt.  IDLE now does the same when run normally,
9534  without the ``-n`` option.
9535
9536- bpo-32940: Simplify and rename StringTranslatePseudoMapping in pyparse.
9537
9538Tools/Demos
9539-----------
9540
9541- bpo-32885: Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable
9542  automatic backup creation (files with ``~`` suffix).
9543
9544C API
9545-----
9546
9547- bpo-33042: Embedding applications may once again call
9548  PySys_ResetWarnOptions, PySys_AddWarnOption, and PySys_AddXOption prior to
9549  calling Py_Initialize.
9550
9551- bpo-32374: Document that m_traverse for multi-phase initialized modules
9552  can be called with m_state=NULL, and add a sanity check
9553
9554
9555What's New in Python 3.7.0 beta 2?
9556==================================
9557
9558*Release date: 2018-02-27*
9559
9560Security
9561--------
9562
9563- bpo-28414: The ssl module now allows users to perform their own IDN
9564  en/decoding when using SNI.
9565
9566Core and Builtins
9567-----------------
9568
9569- bpo-32889: Update Valgrind suppression list to account for the rename of
9570  ``Py_ADDRESS_IN_RANG`` to ``address_in_range``.
9571
9572- bpo-31356: Remove the new API added in bpo-31356 (gc.ensure_disabled()
9573  context manager).
9574
9575- bpo-32305: For namespace packages, ensure that both ``__file__`` and
9576  ``__spec__.origin`` are set to None.
9577
9578- bpo-32303: Make sure ``__spec__.loader`` matches ``__loader__`` for
9579  namespace packages.
9580
9581- bpo-32711: Fix the warning messages for Python/ast_unparse.c. Patch by
9582  Stéphane Wirtel
9583
9584- bpo-32583: Fix possible crashing in builtin Unicode decoders caused by
9585  write out-of-bound errors when using customized decode error handlers.
9586
9587Library
9588-------
9589
9590- bpo-32960: For dataclasses, disallow inheriting frozen from non-frozen
9591  classes, and also disallow inheriting non-frozen from frozen classes. This
9592  restriction will be relaxed at a future date.
9593
9594- bpo-32713: Fixed tarfile.itn handling of out-of-bounds float values. Patch
9595  by Joffrey Fuhrer.
9596
9597- bpo-32951: Direct instantiation of SSLSocket and SSLObject objects is now
9598  prohibited. The constructors were never documented, tested, or designed as
9599  public constructors. Users were suppose to use ssl.wrap_socket() or
9600  SSLContext.
9601
9602- bpo-32929: Remove the tri-state parameter "hash", and add the boolean
9603  "unsafe_hash". If unsafe_hash is True, add a __hash__ function, but if a
9604  __hash__ exists, raise TypeError.  If unsafe_hash is False, add a __hash__
9605  based on the values of eq= and frozen=.  The unsafe_hash=False behavior is
9606  the same as the old hash=None behavior.  unsafe_hash=False is the default,
9607  just as hash=None used to be.
9608
9609- bpo-32947: Add OP_ENABLE_MIDDLEBOX_COMPAT and test workaround for TLSv1.3
9610  for future compatibility with OpenSSL 1.1.1.
9611
9612- bpo-30622: The ssl module now detects missing NPN support in LibreSSL.
9613
9614- bpo-32922: dbm.open() now encodes filename with the filesystem encoding
9615  rather than default encoding.
9616
9617- bpo-32859: In ``os.dup2``, don't check every call whether the ``dup3``
9618  syscall exists or not.
9619
9620- bpo-32556: nt._getfinalpathname, nt._getvolumepathname and
9621  nt._getdiskusage now correctly convert from bytes.
9622
9623- bpo-25988: Emit a :exc:`DeprecationWarning` when using or importing an ABC
9624  directly from :mod:`collections` rather than from :mod:`collections.abc`.
9625
9626- bpo-21060: Rewrite confusing message from setup.py upload from "No dist
9627  file created in earlier command" to the more helpful "Must create and
9628  upload files in one command".
9629
9630- bpo-32852: Make sure sys.argv remains as a list when running trace.
9631
9632- bpo-31333: ``_abc`` module is added.  It is a speedup module with C
9633  implementations for various functions and methods in ``abc``.  Creating an
9634  ABC subclass and calling ``isinstance`` or ``issubclass`` with an ABC
9635  subclass are up to 1.5x faster. In addition, this makes Python start-up up
9636  to 10% faster. Note that the new implementation hides internal registry
9637  and caches, previously accessible via private attributes
9638  ``_abc_registry``, ``_abc_cache``, and ``_abc_negative_cache``.  There are
9639  three debugging helper methods that can be used instead
9640  ``_dump_registry``, ``_abc_registry_clear``, and ``_abc_caches_clear``.
9641
9642- bpo-32841: Fixed `asyncio.Condition` issue which silently ignored
9643  cancellation after notifying and cancelling a conditional lock. Patch by
9644  Bar Harel.
9645
9646- bpo-32819: ssl.match_hostname() has been simplified and no longer depends
9647  on re and ipaddress module for wildcard and IP addresses. Error reporting
9648  for invalid wildcards has been improved.
9649
9650- bpo-32394: socket: Remove
9651  TCP_FASTOPEN,TCP_KEEPCNT,TCP_KEEPIDLE,TCP_KEEPINTVL flags on older version
9652  Windows during run-time.
9653
9654- bpo-31787: Fixed refleaks of ``__init__()`` methods in various modules.
9655  (Contributed by Oren Milman)
9656
9657- bpo-30157: Fixed guessing quote and delimiter in csv.Sniffer.sniff() when
9658  only the last field is quoted.  Patch by Jake Davis.
9659
9660- bpo-32792: collections.ChainMap() preserves the order of the underlying
9661  mappings.
9662
9663- bpo-32775: :func:`fnmatch.translate()` no longer produces patterns which
9664  contain set operations. Sets starting with '[' or containing '--', '&&',
9665  '~~' or '||' will be interpreted differently in regular expressions in
9666  future versions. Currently they emit warnings. fnmatch.translate() now
9667  avoids producing patterns containing such sets by accident.
9668
9669- bpo-32622: Implement native fast sendfile for Windows proactor event loop.
9670
9671- bpo-32777: Fix a rare but potential pre-exec child process deadlock in
9672  subprocess on POSIX systems when marking file descriptors inheritable on
9673  exec in the child process.  This bug appears to have been introduced in
9674  3.4.
9675
9676- bpo-32647: The ctypes module used to depend on indirect linking for
9677  dlopen. The shared extension is now explicitly linked against libdl on
9678  platforms with dl.
9679
9680- bpo-32741: Implement ``asyncio.TimerHandle.when()`` method.
9681
9682- bpo-32691: Use mod_spec.parent when running modules with pdb
9683
9684- bpo-32734: Fixed ``asyncio.Lock()`` safety issue which allowed acquiring
9685  and locking the same lock multiple times, without it being free. Patch by
9686  Bar Harel.
9687
9688- bpo-32727: Do not include name field in SMTP envelope from address. Patch
9689  by Stéphane Wirtel
9690
9691- bpo-31453: Add TLSVersion constants and SSLContext.maximum_version /
9692  minimum_version attributes. The new API wraps OpenSSL 1.1
9693  https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html
9694  feature.
9695
9696- bpo-24334: Internal implementation details of ssl module were cleaned up.
9697  The SSLSocket has one less layer of indirection. Owner and session
9698  information are now handled by the SSLSocket and SSLObject constructor.
9699  Channel binding implementation has been simplified.
9700
9701- bpo-31848: Fix the error handling in Aifc_read.initfp() when the SSND
9702  chunk is not found. Patch by Zackery Spytz.
9703
9704- bpo-32585: Add Ttk spinbox widget to :mod:`tkinter.ttk`.  Patch by Alan D
9705  Moore.
9706
9707- bpo-32221: Various functions returning tuple containing IPv6 addresses now
9708  omit ``%scope`` part since the same information is already encoded in
9709  *scopeid* tuple item. Especially this speeds up :func:`socket.recvfrom`
9710  when it receives multicast packet since useless resolving of network
9711  interface name is omitted.
9712
9713- bpo-30693: The TarFile class now recurses directories in a reproducible
9714  way.
9715
9716- bpo-30693: The ZipFile class now recurses directories in a reproducible
9717  way.
9718
9719Documentation
9720-------------
9721
9722- bpo-28124: The ssl module function ssl.wrap_socket() has been
9723  de-emphasized and deprecated in favor of the more secure and efficient
9724  SSLContext.wrap_socket() method.
9725
9726- bpo-17232: Clarify docs for -O and -OO.  Patch by Terry Reedy.
9727
9728- bpo-32436: Add documentation for the contextvars module (PEP 567).
9729
9730- bpo-32800: Update link to w3c doc for xml default namespaces.
9731
9732- bpo-11015: Update :mod:`test.support` documentation.
9733
9734- bpo-8722: Document :meth:`__getattr__` behavior when property :meth:`get`
9735  method raises :exc:`AttributeError`.
9736
9737- bpo-32614: Modify RE examples in documentation to use raw strings to
9738  prevent :exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight
9739  the deprecation.
9740
9741- bpo-31972: Improve docstrings for `pathlib.PurePath` subclasses.
9742
9743Tests
9744-----
9745
9746- bpo-31809: Add tests to verify connection with secp ECDH curves.
9747
9748Build
9749-----
9750
9751- bpo-32898: Fix the python debug build when using COUNT_ALLOCS.
9752
9753Windows
9754-------
9755
9756- bpo-32901: Update Tcl and Tk versions to 8.6.8
9757
9758- bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data.
9759
9760- bpo-32409: Ensures activate.bat can handle Unicode contents.
9761
9762- bpo-32457: Improves handling of denormalized executable path when
9763  launching Python.
9764
9765- bpo-32370: Use the correct encoding for ipconfig output in the uuid
9766  module. Patch by Segev Finer.
9767
9768- bpo-29248: Fix :func:`os.readlink` on Windows, which was mistakenly
9769  treating the ``PrintNameOffset`` field of the reparse data buffer as a
9770  number of characters instead of bytes. Patch by Craig Holmquist and SSE4.
9771
9772macOS
9773-----
9774
9775- bpo-32901: Update macOS 10.9+ installer to Tcl/Tk 8.6.8.
9776
9777IDLE
9778----
9779
9780- bpo-32916: Change ``str`` to ``code`` in pyparse.
9781
9782- bpo-32905: Remove unused code in pyparse module.
9783
9784- bpo-32874: Add tests for pyparse.
9785
9786- bpo-32837: Using the system and place-dependent default encoding for
9787  open() is a bad idea for IDLE's system and location-independent files.
9788
9789- bpo-32826: Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI
9790  test test_file_buttons() only looks at initial ascii-only lines, but
9791  failed on systems where open() defaults to 'ascii' because readline()
9792  internally reads and decodes far enough ahead to encounter a non-ascii
9793  character in CREDITS.txt.
9794
9795- bpo-32765: Update configdialog General tab docstring to add new widgets to
9796  the widget list.
9797
9798Tools/Demos
9799-----------
9800
9801- bpo-32222: Fix pygettext not extracting docstrings for functions with type
9802  annotated arguments. Patch by Toby Harradine.
9803
9804
9805What's New in Python 3.7.0 beta 1?
9806==================================
9807
9808*Release date: 2018-01-30*
9809
9810Core and Builtins
9811-----------------
9812
9813- bpo-32703: Fix coroutine's ResourceWarning when there's an active error
9814  set when it's being finalized.
9815
9816- bpo-32650: Pdb and other debuggers dependent on bdb.py will correctly step
9817  over (next command) native coroutines. Patch by Pablo Galindo.
9818
9819- bpo-28685: Optimize list.sort() and sorted() by using type specialized
9820  comparisons when possible.
9821
9822- bpo-32685: Improve suggestion when the Python 2 form of print statement is
9823  either present on the same line as the header of a compound statement or
9824  else terminated by a semi-colon instead of a newline. Patch by Nitish
9825  Chandra.
9826
9827- bpo-32697: Python now explicitly preserves the definition order of
9828  keyword-only parameters.  It's always preserved their order, but this
9829  behavior was never guaranteed before; this behavior is now guaranteed and
9830  tested.
9831
9832- bpo-32690: The locals() dictionary now displays in the lexical order that
9833  variables were defined.  Previously, the order was reversed.
9834
9835- bpo-32677: Add ``.isascii()`` method to ``str``, ``bytes`` and
9836  ``bytearray``. It can be used to test that string contains only ASCII
9837  characters.
9838
9839- bpo-32670: Enforce :pep:`479` for all code. This means that manually
9840  raising a StopIteration exception from a generator is prohibited for all
9841  code, regardless of whether 'from __future__ import generator_stop' was
9842  used or not.
9843
9844- bpo-32591: Added built-in support for tracking the origin of coroutine
9845  objects; see sys.set_coroutine_origin_tracking_depth and
9846  CoroutineType.cr_origin. This replaces the asyncio debug mode's use of
9847  coroutine wrapping for native coroutine objects.
9848
9849- bpo-31368: Expose preadv and pwritev system calls in the os module. Patch
9850  by Pablo Galindo
9851
9852- bpo-32544: ``hasattr(obj, name)`` and ``getattr(obj, name, default)`` are
9853  about 4 times faster than before when ``name`` is not found and ``obj``
9854  doesn't override ``__getattr__`` or ``__getattribute__``.
9855
9856- bpo-26163: Improved frozenset() hash to create more distinct hash values
9857  when faced with datasets containing many similar values.
9858
9859- bpo-32550: Remove the STORE_ANNOTATION bytecode.
9860
9861- bpo-20104: Expose posix_spawn as a low level API in the os module.
9862  (removed before 3.7.0rc1)
9863
9864- bpo-24340: Fixed estimation of the code stack size.
9865
9866- bpo-32436: Implement :pep:`567` Context Variables.
9867
9868- bpo-18533: ``repr()`` on a dict containing its own ``values()`` or
9869  ``items()`` no longer raises ``RecursionError``; OrderedDict similarly.
9870  Instead, use ``...``, as for other recursive structures.  Patch by Ben
9871  North.
9872
9873- bpo-20891: Py_Initialize() now creates the GIL. The GIL is no longer
9874  created "on demand" to fix a race condition when PyGILState_Ensure() is
9875  called in a non-Python thread.
9876
9877- bpo-32028: Leading whitespace is now correctly ignored when generating
9878  suggestions for converting Py2 print statements to Py3 builtin print
9879  function calls. Patch by Sanyam Khurana.
9880
9881- bpo-31179: Make dict.copy() up to 5.5 times faster.
9882
9883- bpo-31113: Get rid of recursion in the compiler for normal control flow.
9884
9885Library
9886-------
9887
9888- bpo-25988: Deprecate exposing the contents of collections.abc in the
9889  regular collections module.
9890
9891- bpo-31429: The default cipher suite selection of the ssl module now uses a
9892  blacklist approach rather than a hard-coded whitelist. Python no longer
9893  re-enables ciphers that have been blocked by OpenSSL security update.
9894  Default cipher suite selection can be configured on compile time.
9895
9896- bpo-30306: contextlib.contextmanager now releases the arguments passed to
9897  the underlying generator as soon as the context manager is entered.
9898  Previously it would keep them alive for as long as the context manager was
9899  alive, even when not being used as a function decorator. Patch by Martin
9900  Teichmann.
9901
9902- bpo-21417: Added support for setting the compression level for
9903  zipfile.ZipFile.
9904
9905- bpo-32251: Implement asyncio.BufferedProtocol (provisional API).
9906
9907- bpo-32513: In dataclasses, allow easier overriding of dunder methods
9908  without specifying decorator parameters.
9909
9910- bpo-32660: :mod:`termios` makes available ``FIONREAD``, ``FIONCLEX``,
9911  ``FIOCLEX``, ``FIOASYNC`` and ``FIONBIO`` also under Solaris/derivatives.
9912
9913- bpo-27931: Fix email address header parsing error when the username is an
9914  empty quoted string. Patch by Xiang Zhang.
9915
9916- bpo-32659: Under Solaris and derivatives, :class:`os.stat_result` provides
9917  a st_fstype attribute.
9918
9919- bpo-32662: Implement Server.start_serving(), Server.serve_forever(), and
9920  Server.is_serving() methods.  Add 'start_serving' keyword parameter to
9921  loop.create_server() and loop.create_unix_server().
9922
9923- bpo-32391: Implement :meth:`asyncio.StreamWriter.wait_closed` and
9924  :meth:`asyncio.StreamWriter.is_closing` methods
9925
9926- bpo-32643: Make Task._step, Task._wakeup and Future._schedule_callbacks
9927  methods private.
9928
9929- bpo-32630: Refactor decimal module to use contextvars to store decimal
9930  context.
9931
9932- bpo-32622: Add :meth:`asyncio.AbstractEventLoop.sendfile` method.
9933
9934- bpo-32304: distutils' upload command no longer corrupts tar files ending
9935  with a CR byte, and no longer tries to convert CR to CRLF in any of the
9936  upload text fields.
9937
9938- bpo-32502: uuid.uuid1 no longer raises an exception if a 64-bit hardware
9939  address is encountered.
9940
9941- bpo-32596: ``concurrent.futures`` imports ``ThreadPoolExecutor`` and
9942  ``ProcessPoolExecutor`` lazily (using :pep:`562`). It makes ``import
9943  asyncio`` about 15% faster because asyncio uses only
9944  ``ThreadPoolExecutor`` by default.
9945
9946- bpo-31801: Add ``_ignore_`` to ``Enum`` so temporary variables can be used
9947  during class construction without being turned into members.
9948
9949- bpo-32576: Use queue.SimpleQueue() in places where it can be invoked from
9950  a weakref callback.
9951
9952- bpo-32574: Fix memory leak in asyncio.Queue, when the queue has limited
9953  size and it is full, the cancelation of queue.put() can cause a memory
9954  leak. Patch by: José Melero.
9955
9956- bpo-32521: The nis module is now compatible with new libnsl and headers
9957  location.
9958
9959- bpo-32467: collections.abc.ValuesView now inherits from
9960  collections.abc.Collection.
9961
9962- bpo-32473: Improve ABCMeta._dump_registry() output readability
9963
9964- bpo-32102: New argument ``capture_output`` for subprocess.run
9965
9966- bpo-32521: glibc has removed Sun RPC. Use replacement libtirpc headers and
9967  library in nis module.
9968
9969- bpo-32493: UUID module fixes build for FreeBSD/OpenBSD
9970
9971- bpo-32503: Pickling with protocol 4 no longer creates too small frames.
9972
9973- bpo-29237: Create enum for pstats sorting options
9974
9975- bpo-32454: Add close(fd) function to the socket module.
9976
9977- bpo-25942: The subprocess module is now more graceful when handling a
9978  Ctrl-C KeyboardInterrupt during subprocess.call, subprocess.run, or a
9979  Popen context manager.  It now waits a short amount of time for the child
9980  (presumed to have also gotten the SIGINT) to exit, before continuing the
9981  KeyboardInterrupt exception handling.  This still includes a SIGKILL in
9982  the call() and run() APIs, but at least the child had a chance first.
9983
9984- bpo-32433: The hmac module now has hmac.digest(), which provides an
9985  optimized HMAC digest.
9986
9987- bpo-28134: Sockets now auto-detect family, type and protocol from file
9988  descriptor by default.
9989
9990- bpo-32404: Fix bug where :meth:`datetime.datetime.fromtimestamp` did not
9991  call __new__ in :class:`datetime.datetime` subclasses.
9992
9993- bpo-32403: Improved speed of :class:`datetime.date` and
9994  :class:`datetime.datetime` alternate constructors.
9995
9996- bpo-32228: Ensure that ``truncate()`` preserves the file position (as
9997  reported by ``tell()``) after writes longer than the buffer size.
9998
9999- bpo-32410: Implement ``loop.sock_sendfile`` for asyncio event loop.
10000
10001- bpo-22908: Added seek and tell to the ZipExtFile class. This only works if
10002  the file object used to open the zipfile is seekable.
10003
10004- bpo-32373: Add socket.getblocking() method.
10005
10006- bpo-32248: Add :mod:`importlib.resources` and
10007  :class:`importlib.abc.ResourceReader` as the unified API for reading
10008  resources contained within packages.  Loaders wishing to support resource
10009  reading must implement the :meth:`get_resource_reader()` method.
10010  File-based and zipimport-based loaders both implement these APIs.
10011  :class:`importlib.abc.ResourceLoader` is deprecated in favor of these new
10012  APIs.
10013
10014- bpo-32320: collections.namedtuple() now supports default values.
10015
10016- bpo-29302: Add contextlib.AsyncExitStack. Patch by Alexander Mohr and Ilya
10017  Kulakov.
10018
10019- bpo-31961: *Removed in Python 3.7.0b2.* The *args* argument of
10020  subprocess.Popen can now be a :term:`path-like object`. If *args* is given
10021  as a sequence, it's first element can now be a :term:`path-like object` as
10022  well.
10023
10024- bpo-31900: The :func:`locale.localeconv` function now sets temporarily the
10025  ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale to decode
10026  ``decimal_point`` and ``thousands_sep`` byte strings if they are non-ASCII
10027  or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the
10028  ``LC_CTYPE`` locale. This temporary change affects other threads. Same
10029  change for the :meth:`str.format` method when formatting a number
10030  (:class:`int`, :class:`float`, :class:`float` and subclasses) with the
10031  ``n`` type (ex: ``'{:n}'.format(1234)``).
10032
10033- bpo-31853: Use super().method instead of socket.method in SSLSocket.  They
10034  were there most likely for legacy reasons.
10035
10036- bpo-31399: The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host()
10037  and X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses.
10038  Subject common name fallback can be disabled with
10039  SSLContext.hostname_checks_common_name.
10040
10041- bpo-14976: Add a queue.SimpleQueue class, an unbounded FIFO queue with a
10042  reentrant C implementation of put().
10043
10044Documentation
10045-------------
10046
10047- bpo-32724: Add references to some commands in the documentation of Pdb.
10048  Patch by Stéphane Wirtel
10049
10050- bpo-32649: Complete the C API documentation, profiling and tracing part
10051  with the newly added per-opcode events.
10052
10053- bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile and
10054  their C-API counterparts regarding which type of events are received in
10055  each function. Patch by Pablo Galindo Salgado.
10056
10057Tests
10058-----
10059
10060- bpo-32721: Fix test_hashlib to not fail if the _md5 module is not built.
10061
10062- bpo-28414: Add test cases for IDNA 2003 and 2008 host names. IDNA 2003
10063  internationalized host names are working since bpo-31399 has landed. IDNA
10064  2008 are still broken.
10065
10066- bpo-32604: Add a new "_xxsubinterpreters" extension module that exposes
10067  the existing subinterpreter C-API and a new cross-interpreter data sharing
10068  mechanism. The module is primarily intended for more thorough testing of
10069  the existing subinterpreter support. Note that the _xxsubinterpreters
10070  module has been removed in 3.7.0rc1.
10071
10072- bpo-32602: Add test certs and test for ECDSA cert and EC/RSA dual mode.
10073
10074- bpo-32549: On Travis CI, Python now Compiles and uses a local copy of
10075  OpenSSL 1.1.0g for testing.
10076
10077Build
10078-----
10079
10080- bpo-32635: Fix segfault of the crypt module when libxcrypt is provided
10081  instead of libcrypt at the system.
10082
10083- bpo-32598: Use autoconf to detect OpenSSL libs, headers and supported
10084  features. The ax_check_openssl M4 macro uses pkg-config to locate OpenSSL
10085  and falls back to manual search.
10086
10087- bpo-32593: Drop support of FreeBSD 9 and older.
10088
10089- bpo-29708: If the :envvar:`SOURCE_DATE_EPOCH` environment variable is set,
10090  :mod:`py_compile` will always create hash-based ``.pyc`` files.
10091
10092Windows
10093-------
10094
10095- bpo-32588: Create standalone _distutils_findvs module and add missing
10096  _queue module to installer.
10097
10098- bpo-29911: Ensure separate Modify and Uninstall buttons are displayed.
10099
10100- bpo-32507: Use app-local UCRT install rather than the proper update for
10101  old versions of Windows.
10102
10103macOS
10104-----
10105
10106- bpo-32726: Provide an additional, more modern macOS installer variant that
10107  supports macOS 10.9+ systems in 64-bit mode only.  Upgrade the supplied
10108  third-party libraries to OpenSSL 1.1.0g and to SQLite 3.22.0.  The 10.9+
10109  installer now links with and supplies its own copy of Tcl/Tk 8.6.
10110
10111- bpo-28440: No longer add /Library/Python/3.x/site-packages to sys.path for
10112  macOS framework builds to avoid future conflicts.
10113
10114C API
10115-----
10116
10117- bpo-32681: Fix uninitialized variable 'res' in the C implementation of
10118  os.dup2. Patch by Stéphane Wirtel
10119
10120- bpo-10381: Add C API access to the ``datetime.timezone`` constructor and
10121  ``datetime.timzone.UTC`` singleton.
10122
10123
10124What's New in Python 3.7.0 alpha 4?
10125===================================
10126
10127*Release date: 2018-01-08*
10128
10129Core and Builtins
10130-----------------
10131
10132- bpo-31975: The default warning filter list now starts with a
10133  "default::DeprecationWarning:__main__" entry, so deprecation warnings are
10134  once again shown by default in single-file scripts and at the interactive
10135  prompt.
10136
10137- bpo-32226: ``__class_getitem__`` is now an automatic class method.
10138
10139- bpo-32399: Add AIX uuid library support for RFC4122 using uuid_create() in
10140  libc.a
10141
10142- bpo-32390: Fix the compilation failure on AIX after the f_fsid field has
10143  been added to the object returned by os.statvfs() (issue #32143). Original
10144  patch by Michael Felt.
10145
10146- bpo-32379: Make MRO computation faster when a class inherits from a single
10147  base.
10148
10149- bpo-32259: The error message of a TypeError raised when unpack
10150  non-iterable is now more specific.
10151
10152- bpo-27169: The ``__debug__`` constant is now optimized out at compile
10153  time. This fixes also bpo-22091.
10154
10155- bpo-32329: The :option:`-R` option now turns on hash randomization when
10156  the :envvar:`PYTHONHASHSEED` environment variable is set to ``0``.
10157  Previously, the option was ignored. Moreover,
10158  ``sys.flags.hash_randomization`` is now properly set to 0 when hash
10159  randomization is turned off by ``PYTHONHASHSEED=0``.
10160
10161- bpo-30416: The optimizer is now protected from spending much time doing
10162  complex calculations and consuming much memory for creating large
10163  constants in constant folding. Increased limits for constants that can be
10164  produced in constant folding.
10165
10166- bpo-32282: Fix an unnecessary ifdef in the include of VersionHelpers.h in
10167  socketmodule on Windows.
10168
10169- bpo-30579: Implement TracebackType.__new__ to allow Python-level creation
10170  of traceback objects, and make TracebackType.tb_next mutable.
10171
10172- bpo-32260: Don't byte swap the input keys to the SipHash algorithm on
10173  big-endian platforms. This should ensure siphash gives consistent results
10174  across platforms.
10175
10176- bpo-31506: Improve the error message logic for object.__new__ and
10177  object.__init__. Patch by Sanyam Khurana.
10178
10179- bpo-20361: ``-b`` and ``-bb`` now inject ``'default::BytesWarning'`` and
10180  ``error::BytesWarning`` entries into ``sys.warnoptions``, ensuring that
10181  they take precedence over any other warning filters configured via the
10182  ``-W`` option or the ``PYTHONWARNINGS`` environment variable.
10183
10184- bpo-32230: `-X dev` now injects a ``'default'`` entry into
10185  sys.warnoptions, ensuring that it behaves identically to actually passing
10186  ``-Wdefault`` at the command line.
10187
10188- bpo-29240: Add a new UTF-8 mode: implementation of the :pep:`540`.
10189
10190- bpo-32226: :pep:`560`: Add support for ``__mro_entries__`` and
10191  ``__class_getitem__``. Implemented by Ivan Levkivskyi.
10192
10193- bpo-32225: :pep:`562`: Add support for module ``__getattr__`` and
10194  ``__dir__``. Implemented by Ivan Levkivskyi.
10195
10196- bpo-31901: The `atexit` module now has its callback stored per
10197  interpreter.
10198
10199- bpo-31650: Implement :pep:`552` (Deterministic pycs). Python now supports
10200  invalidating bytecode cache files bashed on a source content hash rather
10201  than source last-modified time.
10202
10203- bpo-29469: Move constant folding from bytecode layer to AST layer.
10204  Original patch by Eugene Toder.
10205
10206Library
10207-------
10208
10209- bpo-32506: Now that dict is defined as keeping insertion order, drop
10210  OrderedDict and just use plain dict.
10211
10212- bpo-32279: Add params to dataclasses.make_dataclasses(): init, repr, eq,
10213  order, hash, and frozen.  Pass them through to dataclass().
10214
10215- bpo-32278: Make type information optional on dataclasses.make_dataclass().
10216  If omitted, the string 'typing.Any' is used.
10217
10218- bpo-32499: Add dataclasses.is_dataclass(obj), which returns True if obj is
10219  a dataclass or an instance of one.
10220
10221- bpo-32468: Improve frame repr() to mention filename, code name and current
10222  line number.
10223
10224- bpo-23749: asyncio: Implement loop.start_tls()
10225
10226- bpo-32441: Return the new file descriptor (i.e., the second argument) from
10227  ``os.dup2``. Previously, ``None`` was always returned.
10228
10229- bpo-32422: ``functools.lru_cache`` uses less memory (3 words for each
10230  cached key) and takes about 1/3 time for cyclic GC.
10231
10232- bpo-31721: Prevent Python crash from happening when Future._log_traceback
10233  is set to True manually.  Now it can only be set to False, or a ValueError
10234  is raised.
10235
10236- bpo-32415: asyncio: Add Task.get_loop() and Future.get_loop()
10237
10238- bpo-26133: Don't unsubscribe signals in asyncio UNIX event loop on
10239  interpreter shutdown.
10240
10241- bpo-32363: Make asyncio.Task.set_exception() and set_result() raise
10242  NotImplementedError. Task._step() and Future.__await__() raise proper
10243  exceptions when they are in an invalid state, instead of raising an
10244  AssertionError.
10245
10246- bpo-32357: Optimize asyncio.iscoroutine() and loop.create_task() for
10247  non-native coroutines (e.g. async/await compiled with Cython).
10248  'loop.create_task(python_coroutine)' used to be 20% faster than
10249  'loop.create_task(cython_coroutine)'.  Now, the latter is as fast.
10250
10251- bpo-32356: asyncio.transport.resume_reading() and pause_reading() are now
10252  idempotent. New transport.is_reading() method is added.
10253
10254- bpo-32355: Optimize asyncio.gather(); now up to 15% faster.
10255
10256- bpo-32351: Use fastpath in asyncio.sleep if delay<0 (2x boost)
10257
10258- bpo-32348: Optimize asyncio.Future schedule/add/remove callback.  The
10259  optimization shows 3-6% performance improvements of async/await code.
10260
10261- bpo-32331: Fix socket.settimeout() and socket.setblocking() to keep
10262  socket.type as is. Fix socket.socket() constructor to reset any bit flags
10263  applied to socket's type.  This change only affects OSes that have
10264  SOCK_NONBLOCK and/or SOCK_CLOEXEC.
10265
10266- bpo-32248: Add :class:`importlib.abc.ResourceReader` as an ABC for loaders
10267  to provide a unified API for reading resources contained within packages.
10268  Also add :mod:`importlib.resources` as the port of
10269  ``importlib_resources``.
10270
10271- bpo-32311: Implement asyncio.create_task(coro) shortcut
10272
10273- bpo-32327: Convert asyncio functions that were documented as coroutines to
10274  coroutines. Affected functions: loop.sock_sendall, loop.sock_recv,
10275  loop.sock_accept, loop.getaddrinfo, loop.getnameinfo.
10276
10277- bpo-32323: :func:`urllib.parse.urlsplit()` does not convert zone-id
10278  (scope) to lower case for scoped IPv6 addresses in hostnames now.
10279
10280- bpo-32302: Fix bdist_wininst of distutils for CRT v142: it binary
10281  compatible with CRT v140.
10282
10283- bpo-29711: Fix ``stop_serving`` in asyncio proactor loop kill all
10284  listening servers
10285
10286- bpo-32308: :func:`re.sub()` now replaces empty matches adjacent to a
10287  previous non-empty match.
10288
10289- bpo-29970: Abort asyncio SSLProtocol connection if handshake not complete
10290  within 10s
10291
10292- bpo-32314: Implement asyncio.run().
10293
10294- bpo-17852: Revert incorrect fix based on misunderstanding of
10295  _Py_PyAtExit() semantics.
10296
10297- bpo-32296: Implement asyncio._get_running_loop() and get_event_loop() in
10298  C. This makes them 4x faster.
10299
10300- bpo-32250: Implement ``asyncio.current_task()`` and
10301  ``asyncio.all_tasks()``. Add helpers intended to be used by alternative
10302  task implementations: ``asyncio._register_task``, ``asyncio._enter_task``,
10303  ``asyncio._leave_task`` and ``asyncio._unregister_task``. Deprecate
10304  ``asyncio.Task.current_task()`` and ``asyncio.Task.all_tasks()``.
10305
10306- bpo-32255: A single empty field is now always quoted when written into a
10307  CSV file. This allows to distinguish an empty row from a row consisting of
10308  a single empty field. Patch by Licht Takeuchi.
10309
10310- bpo-32277: Raise ``NotImplementedError`` instead of ``SystemError`` on
10311  platforms where ``chmod(..., follow_symlinks=False)`` is not supported.
10312  Patch by Anthony Sottile.
10313
10314- bpo-30050: New argument warn_on_full_buffer to signal.set_wakeup_fd lets
10315  you control whether Python prints a warning on stderr when the wakeup fd
10316  buffer overflows.
10317
10318- bpo-29137: The ``fpectl`` library has been removed. It was never enabled
10319  by default, never worked correctly on x86-64, and it changed the Python
10320  ABI in ways that caused unexpected breakage of C extensions.
10321
10322- bpo-32273: Move asyncio.test_utils to test.test_asyncio.
10323
10324- bpo-32272: Remove asyncio.async() function.
10325
10326- bpo-32269: Add asyncio.get_running_loop() function.
10327
10328- bpo-32265: All class and static methods of builtin types now are correctly
10329  classified by inspect.classify_class_attrs() and grouped in pydoc ouput.
10330  Added types.ClassMethodDescriptorType for unbound class methods of builtin
10331  types.
10332
10333- bpo-32253: Deprecate ``yield from lock``, ``await lock``, ``with (yield
10334  from lock)`` and ``with await lock`` for asyncio synchronization
10335  primitives.
10336
10337- bpo-22589: Changed MIME type of .bmp from 'image/x-ms-bmp' to 'image/bmp'
10338
10339- bpo-32193: Convert asyncio to use *async/await* syntax. Old styled ``yield
10340  from`` is still supported too.
10341
10342- bpo-32206: Add support to run modules with pdb
10343
10344- bpo-32227: ``functools.singledispatch`` now supports registering
10345  implementations using type annotations.
10346
10347- bpo-15873: Added new alternate constructors
10348  :meth:`datetime.datetime.fromisoformat`,
10349  :meth:`datetime.time.fromisoformat` and
10350  :meth:`datetime.date.fromisoformat` as the inverse operation of each
10351  classes's respective ``isoformat`` methods.
10352
10353- bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link
10354  list'.
10355
10356- bpo-32143: os.statvfs() includes the f_fsid field from statvfs(2)
10357
10358- bpo-26439: Fix ctypes.util.find_library() for AIX by implementing
10359  ctypes._aix.find_library() Patch by: Michael Felt
10360
10361- bpo-31993: The pickler now uses less memory when serializing large bytes
10362  and str objects into a file.  Pickles created with protocol 4 will require
10363  less memory for unpickling large bytes and str objects.
10364
10365- bpo-27456: Ensure TCP_NODELAY is set on Linux. Tests by Victor Stinner.
10366
10367- bpo-31778: ast.literal_eval() is now more strict. Addition and subtraction
10368  of arbitrary numbers no longer allowed.
10369
10370- bpo-31802: Importing native path module (``posixpath``, ``ntpath``) now
10371  works even if the ``os`` module still is not imported.
10372
10373- bpo-30241: Add contextlib.AbstractAsyncContextManager. Patch by Jelle
10374  Zijlstra.
10375
10376- bpo-31699: Fix deadlocks in
10377  :class:`concurrent.futures.ProcessPoolExecutor` when task arguments or
10378  results cause pickling or unpickling errors. This should make sure that
10379  calls to the :class:`ProcessPoolExecutor` API always eventually return.
10380
10381- bpo-15216: ``TextIOWrapper.reconfigure()`` supports changing *encoding*,
10382  *errors*, and *newline*.
10383
10384Documentation
10385-------------
10386
10387- bpo-32418: Add get_loop() method to Server and AbstractServer classes.
10388
10389Tests
10390-----
10391
10392- bpo-32252: Fix faulthandler_suppress_crash_report() used to prevent core
10393  dump files when testing crashes. getrlimit() returns zero on success.
10394
10395- bpo-32002: Adjust C locale coercion testing for the empty locale and POSIX
10396  locale cases to more readily adjust to platform dependent behaviour.
10397
10398Windows
10399-------
10400
10401- bpo-19764: Implement support for `subprocess.Popen(close_fds=True)` on
10402  Windows. Patch by Segev Finer.
10403
10404Tools/Demos
10405-----------
10406
10407- bpo-24960: 2to3 and lib2to3 can now read pickled grammar files using
10408  pkgutil.get_data() rather than probing the filesystem. This lets 2to3 and
10409  lib2to3 work when run from a zipfile.
10410
10411C API
10412-----
10413
10414- bpo-32030: Py_Initialize() doesn't reset the memory allocators to default
10415  if the ``PYTHONMALLOC`` environment variable is not set.
10416
10417- bpo-29084: Undocumented C API for OrderedDict has been excluded from the
10418  limited C API. It was added by mistake and actually never worked in the
10419  limited C API.
10420
10421- bpo-32264: Moved the pygetopt.h header into internal/, since it has no
10422  public APIs.
10423
10424- bpo-32241: :c:func:`Py_SetProgramName` and :c:func:`Py_SetPythonHome` now
10425  take the ``const wchar *`` arguments instead of ``wchar *``.
10426
10427
10428What's New in Python 3.7.0 alpha 3?
10429===================================
10430
10431*Release date: 2017-12-05*
10432
10433Core and Builtins
10434-----------------
10435
10436- bpo-32176: co_flags.CO_NOFREE is now always set correctly by the code
10437  object constructor based on freevars and cellvars, rather than needing to
10438  be set correctly by the caller. This ensures it will be cleared
10439  automatically when additional cell references are injected into a modified
10440  code object and function.
10441
10442- bpo-10544: Yield expressions are now deprecated in comprehensions and
10443  generator expressions. They are still permitted in the definition of the
10444  outermost iterable, as that is evaluated directly in the enclosing scope.
10445
10446- bpo-32137: The repr of deeply nested dict now raises a RecursionError
10447  instead of crashing due to a stack overflow.
10448
10449- bpo-32096: Revert memory allocator changes in the C API: move structures
10450  back from _PyRuntime to Objects/obmalloc.c. The memory allocators are once
10451  again initialized statically, and so PyMem_RawMalloc() and
10452  Py_DecodeLocale() can be called before _PyRuntime_Initialize().
10453
10454- bpo-32043: Add a new "developer mode": new "-X dev" command line option to
10455  enable debug checks at runtime.
10456
10457- bpo-32023: SyntaxError is now correctly raised when a generator expression
10458  without parenthesis is used instead of an inheritance list in a class
10459  definition. The duplication of the parentheses can be omitted only on
10460  calls.
10461
10462- bpo-32012: SyntaxError is now correctly raised when a generator expression
10463  without parenthesis is passed as an argument, but followed by a trailing
10464  comma. A generator expression always needs to be directly inside a set of
10465  parentheses and cannot have a comma on either side.
10466
10467- bpo-28180: A new internal ``_Py_SetLocaleFromEnv(category)`` helper
10468  function has been added in order to improve the consistency of behaviour
10469  across different ``libc`` implementations (e.g. Android doesn't support
10470  setting the locale from the environment by default).
10471
10472- bpo-31949: Fixed several issues in printing tracebacks
10473  (PyTraceBack_Print()). Setting sys.tracebacklimit to 0 or less now
10474  suppresses printing tracebacks. Setting sys.tracebacklimit to None now
10475  causes using the default limit. Setting sys.tracebacklimit to an integer
10476  larger than LONG_MAX now means using the limit LONG_MAX rather than the
10477  default limit. Fixed integer overflows in the case of more than 2**31
10478  traceback items on Windows. Fixed output errors handling.
10479
10480- bpo-30696: Fix the interactive interpreter looping endlessly when no
10481  memory.
10482
10483- bpo-20047: Bytearray methods partition() and rpartition() now accept only
10484  bytes-like objects as separator, as documented.  In particular they now
10485  raise TypeError rather of returning a bogus result when an integer is
10486  passed as a separator.
10487
10488- bpo-21720: BytesWarning no longer emitted when the *fromlist* argument of
10489  ``__import__()`` or the ``__all__`` attribute of the module contain bytes
10490  instances.
10491
10492- bpo-31845: Environment variables are once more read correctly at
10493  interpreter startup.
10494
10495- bpo-28936: Ensure that lexically first syntax error involving a parameter
10496  and ``global`` or ``nonlocal`` is detected first at a given scope. Patch
10497  by Ivan Levkivskyi.
10498
10499- bpo-31825: Fixed OverflowError in the 'unicode-escape' codec and in
10500  codecs.escape_decode() when decode an escaped non-ascii byte.
10501
10502- bpo-31618: The per-frame tracing logic added in 3.7a1 has been altered so
10503  that ``frame->f_lineno`` is updated before either ``"line"`` or
10504  ``"opcode"`` events are emitted. Previously, opcode events were emitted
10505  first, and therefore would occasionally see stale line numbers on the
10506  frame. The behavior of this feature has changed slightly as a result: when
10507  both ``f_trace_lines`` and ``f_trace_opcodes`` are enabled, line events
10508  now occur first.
10509
10510- bpo-28603: Print the full context/cause chain of exceptions on interpreter
10511  exit, even if an exception in the chain is unhashable or compares equal to
10512  later ones. Patch by Zane Bitter.
10513
10514- bpo-31786: Fix timeout rounding in the select module to round correctly
10515  negative timeouts between -1.0 and 0.0. The functions now block waiting
10516  for events as expected. Previously, the call was incorrectly non-blocking.
10517  Patch by Pablo Galindo.
10518
10519- bpo-31781: Prevent crashes when calling methods of an uninitialized
10520  ``zipimport.zipimporter`` object. Patch by Oren Milman.
10521
10522- bpo-30399: Standard repr() of BaseException with a single argument no
10523  longer contains redundant trailing comma.
10524
10525- bpo-31626: Fixed a bug in debug memory allocator.  There was a write to
10526  freed memory after shrinking a memory block.
10527
10528- bpo-30817: `PyErr_PrintEx()` clears now the ignored exception that may be
10529  raised by `_PySys_SetObjectId()`, for example when no memory.
10530
10531Library
10532-------
10533
10534- bpo-28556: Two minor fixes for ``typing`` module: allow shallow copying
10535  instances of generic classes, improve interaction of ``__init_subclass__``
10536  with generics. Original PRs by Ivan Levkivskyi.
10537
10538- bpo-32214: PEP 557, Data Classes. Provides a decorator which adds
10539  boilerplate methods to classes which use type annotations so specify
10540  fields.
10541
10542- bpo-27240: The header folding algorithm for the new email policies has
10543  been rewritten, which also fixes bpo-30788, bpo-31831, and bpo-32182.  In
10544  particular, RFC2231 folding is now done correctly.
10545
10546- bpo-32186: io.FileIO.readall() and io.FileIO.read() now release the GIL
10547  when getting the file size. Fixed hang of all threads with inaccessible
10548  NFS server. Patch by Nir Soffer.
10549
10550- bpo-321010: Add :attr:`sys.flags.dev_mode` flag
10551
10552- bpo-32154: The ``asyncio.windows_utils.socketpair()`` function has been
10553  removed: use directly :func:`socket.socketpair` which is available on all
10554  platforms since Python 3.5 (before, it wasn't available on Windows).
10555  ``asyncio.windows_utils.socketpair()`` was just an alias to
10556  ``socket.socketpair`` on Python 3.5 and newer.
10557
10558- bpo-32089: warnings: In development (-X dev) and debug mode (pydebug
10559  build), use the "default" action for ResourceWarning, rather than the
10560  "always" action, in the default warnings filters.
10561
10562- bpo-32107: ``uuid.getnode()`` now preferentially returns universally
10563  administered MAC addresses if available, over locally administered MAC
10564  addresses.  This makes a better guarantee for global uniqueness of UUIDs
10565  returned from ``uuid.uuid1()``.  If only locally administered MAC
10566  addresses are available, the first such one found is returned.
10567
10568- bpo-23033: Wildcard is now supported in hostname when it is one and only
10569  character in the left most segment of hostname in second argument of
10570  :meth:`ssl.match_hostname`.  Patch by Mandeep Singh.
10571
10572- bpo-12239: Make :meth:`msilib.SummaryInformation.GetProperty` return
10573  ``None`` when the value of property is ``VT_EMPTY``.  Initial patch by
10574  Mark Mc Mahon.
10575
10576- bpo-28334: Use :func:`os.path.expanduser` to find the ``~/.netrc`` file in
10577  :class:`netrc.netrc`.  If it does not exist, :exc:`FileNotFoundError` is
10578  raised.  Patch by Dimitri Merejkowsky.
10579
10580- bpo-32121: Made ``tracemalloc.Traceback`` behave more like the traceback
10581  module, sorting the frames from oldest to most recent.
10582  ``Traceback.format()`` now accepts negative *limit*, truncating the result
10583  to the ``abs(limit)`` oldest frames. To get the old behaviour, one can use
10584  the new *most_recent_first* argument to ``Traceback.format()``. (Patch by
10585  Jesse Bakker.)
10586
10587- bpo-31325: Fix wrong usage of :func:`collections.namedtuple` in the
10588  :meth:`RobotFileParser.parse() <urllib.robotparser.RobotFileParser.parse>`
10589  method. Initial patch by Robin Wellner.
10590
10591- bpo-12382: :func:`msilib.OpenDatabase` now raises a better exception
10592  message when it couldn't open or create an MSI file.  Initial patch by
10593  William Tisäter.
10594
10595- bpo-19610: ``setup()`` now warns about invalid types for some fields. The
10596  ``distutils.dist.Distribution`` class now warns when ``classifiers``,
10597  ``keywords`` and ``platforms`` fields are not specified as a list or a
10598  string.
10599
10600- bpo-32071: Added the ``-k`` command-line option to ``python -m unittest``
10601  to run only tests that match the given pattern(s).
10602
10603- bpo-10049: Added *nullcontext* no-op context manager to contextlib. This
10604  provides a simpler and faster alternative to ExitStack() when handling
10605  optional context managers.
10606
10607- bpo-28684: The new test.support.skip_unless_bind_unix_socket() decorator
10608  is used here to skip asyncio tests that fail because the platform lacks a
10609  functional bind() function for unix domain sockets (as it is the case for
10610  non root users on the recent Android versions that run now SELinux in
10611  enforcing mode).
10612
10613- bpo-32110: ``codecs.StreamReader.read(n)`` now returns not more than *n*
10614  characters/bytes for non-negative *n*. This makes it compatible with
10615  ``read()`` methods of other file-like objects.
10616
10617- bpo-27535: The warnings module doesn't leak memory anymore in the hidden
10618  warnings registry for the "ignore" action of warnings filters.
10619  warn_explicit() function doesn't add the warning key to the registry
10620  anymore for the "ignore" action.
10621
10622- bpo-32088: warnings:  When Python is build is debug mode (``Py_DEBUG``),
10623  :exc:`DeprecationWarning`, :exc:`PendingDeprecationWarning` and
10624  :exc:`ImportWarning` warnings are now displayed by default.
10625
10626- bpo-1647489: Fixed searching regular expression patterns that could match
10627  an empty string. Non-empty string can now be correctly found after
10628  matching an empty string.
10629
10630- bpo-25054: Added support of splitting on a pattern that could match an
10631  empty string.
10632
10633- bpo-32072: Fixed issues with binary plists: Fixed saving bytearrays.
10634  Identical objects will be saved only once. Equal references will be load
10635  as identical objects. Added support for saving and loading recursive data
10636  structures.
10637
10638- bpo-32069: Drop legacy SSL transport from asyncio, ssl.MemoryBIO is always
10639  used anyway.
10640
10641- bpo-32066: asyncio: Support pathlib.Path in create_unix_connection; sock
10642  arg should be optional
10643
10644- bpo-32046: Updates 2to3 to convert from operator.isCallable(obj) to
10645  callable(obj). Patch by Dong-hee Na.
10646
10647- bpo-32018: inspect.signature should follow :pep:`8`, if the parameter has
10648  an annotation and a default value. Patch by Dong-hee Na.
10649
10650- bpo-32025: Add time.thread_time() and time.thread_time_ns()
10651
10652- bpo-32037: Integers that fit in a signed 32-bit integer will be now
10653  pickled with protocol 0 using the INT opcode.  This will decrease the size
10654  of a pickle, speed up pickling and unpickling, and make these integers be
10655  unpickled as int instances in Python 2.
10656
10657- bpo-32034: Make asyncio.IncompleteReadError and LimitOverrunError
10658  pickleable.
10659
10660- bpo-32015: Fixed the looping of asyncio in the case of reconnection the
10661  socket during waiting async read/write from/to the socket.
10662
10663- bpo-32011: Restored support of loading marshal files with the TYPE_INT64
10664  code. These files can be produced in Python 2.7.
10665
10666- bpo-28369: Enhance add_reader/writer check that socket is not used by some
10667  transport. Before, only cases when add_reader/writer were called with an
10668  int FD were supported.  Now the check is implemented correctly for all
10669  file-like objects.
10670
10671- bpo-31976: Fix race condition when flushing a file is slow, which can
10672  cause a segfault if closing the file from another thread.
10673
10674- bpo-31985: Formally deprecated aifc.openfp, sunau.openfp, and wave.openfp.
10675  Since change 7bc817d5ba917528e8bd07ec461c635291e7b06a in 1993, openfp in
10676  each of the three modules had been pointing to that module's open function
10677  as a matter of backwards compatibility, though it had been both untested
10678  and undocumented.
10679
10680- bpo-21862: cProfile command line now accepts `-m module_name` as an
10681  alternative to script path. Patch by Sanyam Khurana.
10682
10683- bpo-31970: Reduce performance overhead of asyncio debug mode.
10684
10685- bpo-31843: *database* argument of sqlite3.connect() now accepts a
10686  :term:`path-like object`, instead of just a string.
10687
10688- bpo-31945: Add Configurable *blocksize* to ``HTTPConnection`` and
10689  ``HTTPSConnection`` for improved upload throughput.  Patch by Nir Soffer.
10690
10691- bpo-31943: Add a ``cancelled()`` method to :class:`asyncio.Handle`.  Patch
10692  by Marat Sharafutdinov.
10693
10694- bpo-9678: Fixed determining the MAC address in the uuid module: Using
10695  ifconfig on NetBSD and OpenBSD. Using arp on Linux, FreeBSD, NetBSD and
10696  OpenBSD. Based on patch by Takayuki Shimizukawa.
10697
10698- bpo-30057: Fix potential missed signal in signal.signal().
10699
10700- bpo-31933: Fix Blake2 params leaf_size and node_offset on big endian
10701  platforms. Patch by Jack O'Connor.
10702
10703- bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor
10704
10705- bpo-31927: Fixed compilation of the socket module on NetBSD 8.  Fixed
10706  assertion failure or reading arbitrary data when parse a AF_BLUETOOTH
10707  address on NetBSD and DragonFly BSD.
10708
10709- bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse()
10710  when the size of types chtype or mmask_t is less than the size of C long.
10711  curses.box() now accepts characters as arguments.  Based on patch by Steve
10712  Fink.
10713
10714- bpo-31917: Add 3 new clock identifiers: :data:`time.CLOCK_BOOTTIME`,
10715  :data:`time.CLOCK_PROF` and :data:`time.CLOCK_UPTIME`.
10716
10717- bpo-31897: plistlib now catches more errors when read binary plists and
10718  raises InvalidFileException instead of unexpected exceptions.
10719
10720- bpo-25720: Fix the method for checking pad state of curses WINDOW. Patch
10721  by Masayuki Yamamoto.
10722
10723- bpo-31893: Fixed the layout of the kqueue_event structure on OpenBSD and
10724  NetBSD. Fixed the comparison of the kqueue_event objects.
10725
10726- bpo-31891: Fixed building the curses module on NetBSD.
10727
10728- bpo-31884: added required constants to subprocess module for setting
10729  priority on windows
10730
10731- bpo-28281: Remove year (1-9999) limits on the Calendar.weekday() function.
10732  Patch by Mark Gollahon.
10733
10734- bpo-31702: crypt.mksalt() now allows to specify the number of rounds for
10735  SHA-256 and SHA-512 hashing.
10736
10737- bpo-30639: :func:`inspect.getfile` no longer computes the repr of unknown
10738  objects to display in an error message, to protect against badly behaved
10739  custom reprs.
10740
10741- bpo-30768: Fix the pthread+semaphore implementation of
10742  PyThread_acquire_lock_timed() when called with timeout > 0 and
10743  intr_flag=0: recompute the timeout if sem_timedwait() is interrupted by a
10744  signal (EINTR). See also the :pep:`475`.
10745
10746- bpo-31854: Add ``mmap.ACCESS_DEFAULT`` constant.
10747
10748- bpo-31834: Use optimized code for BLAKE2 only with SSSE3+. The pure SSE2
10749  implementation is slower than the pure C reference implementation.
10750
10751- bpo-28292: Calendar.itermonthdates() will now consistently raise an
10752  exception when a date falls outside of the 0001-01-01 through 9999-12-31
10753  range.  To support applications that cannot tolerate such exceptions, the
10754  new methods itermonthdays3() and itermonthdays4() are added.  The new
10755  methods return tuples and are not restricted by the range supported by
10756  datetime.date.
10757
10758- bpo-28564: The shutil.rmtree() function has been sped up to 20--40%. This
10759  was done using the os.scandir() function.
10760
10761- bpo-28416: Instances of pickle.Pickler subclass with the persistent_id()
10762  method and pickle.Unpickler subclass with the persistent_load() method no
10763  longer create reference cycles.
10764
10765- bpo-31653: Don't release the GIL if we can acquire a multiprocessing
10766  semaphore immediately.
10767
10768- bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed
10769  or None.
10770
10771- bpo-20825: Add `subnet_of` and `superset_of` containment tests to
10772  :class:`ipaddress.IPv6Network` and :class:`ipaddress.IPv4Network`. Patch
10773  by Michel Albert and Cheryl Sabella.
10774
10775- bpo-31827: Remove the os.stat_float_times() function. It was introduced in
10776  Python 2.3 for backward compatibility with Python 2.2, and was deprecated
10777  since Python 3.1.
10778
10779- bpo-31756: Add a ``subprocess.Popen(text=False)`` keyword argument to
10780  `subprocess` functions to be more explicit about when the library should
10781  attempt to decode outputs into text. Patch by Andrew Clegg.
10782
10783- bpo-31819: Add AbstractEventLoop.sock_recv_into().
10784
10785- bpo-31457: If nested log adapters are used, the inner ``process()``
10786  methods are no longer omitted.
10787
10788- bpo-31457: The ``manager`` property on LoggerAdapter objects is now
10789  properly settable.
10790
10791- bpo-31806: Fix timeout rounding in time.sleep(), threading.Lock.acquire()
10792  and socket.socket.settimeout() to round correctly negative timeouts
10793  between -1.0 and 0.0. The functions now block waiting for events as
10794  expected. Previously, the call was incorrectly non-blocking. Patch by
10795  Pablo Galindo.
10796
10797- bpo-31803: time.clock() and time.get_clock_info('clock') now emit a
10798  DeprecationWarning warning.
10799
10800- bpo-31800: Extended support for parsing UTC offsets. strptime '%z' can now
10801  parse the output generated by datetime.isoformat, including seconds and
10802  microseconds.
10803
10804- bpo-28603: traceback: Fix a TypeError that occurred during printing of
10805  exception tracebacks when either the current exception or an exception in
10806  its context/cause chain is unhashable. Patch by Zane Bitter.
10807
10808- bpo-30541: Add new function to seal a mock and prevent the automatically
10809  creation of child mocks. Patch by Mario Corchero.
10810
10811- bpo-31784: Implement the :pep:`564`, add new 6 new functions with
10812  nanosecond resolution to the :mod:`time` module:
10813  :func:`~time.clock_gettime_ns`, :func:`~time.clock_settime_ns`,
10814  :func:`~time.monotonic_ns`, :func:`~time.perf_counter_ns`,
10815  :func:`~time.process_time_ns`, :func:`~time.time_ns`.
10816
10817- bpo-30143: 2to3 now generates a code that uses abstract collection classes
10818  from collections.abc rather than collections.
10819
10820- bpo-31770: Prevent a crash when calling the ``__init__()`` method of a
10821  ``sqlite3.Cursor`` object more than once. Patch by Oren Milman.
10822
10823- bpo-31764: Prevent a crash in ``sqlite3.Cursor.close()`` in case the
10824  ``Cursor`` object is uninitialized. Patch by Oren Milman.
10825
10826- bpo-31752: Fix possible crash in timedelta constructor called with custom
10827  integers.
10828
10829- bpo-31620: an empty asyncio.Queue now doesn't leak memory when queue.get
10830  pollers timeout
10831
10832- bpo-31690: Allow the flags re.ASCII, re.LOCALE, and re.UNICODE to be used
10833  as group flags for regular expressions.
10834
10835- bpo-30349: FutureWarning is now emitted if a regular expression contains
10836  character set constructs that will change semantically in the future
10837  (nested sets and set operations).
10838
10839- bpo-31664: Added support for the Blowfish hashing in the crypt module.
10840
10841- bpo-31632: Fix method set_protocol() of class _SSLProtocolTransport in
10842  asyncio module. This method was previously modifying a wrong reference to
10843  the protocol.
10844
10845- bpo-15037: Added a workaround for getkey() in curses for ncurses 5.7 and
10846  earlier.
10847
10848- bpo-31307: Allow use of bytes objects for arguments to
10849  :meth:`configparser.ConfigParser.read`. Patch by Vincent Michel.
10850
10851- bpo-31334: Fix ``poll.poll([timeout])`` in the ``select`` module for
10852  arbitrary negative timeouts on all OSes where it can only be a
10853  non-negative integer or -1. Patch by Riccardo Coccioli.
10854
10855- bpo-31310: multiprocessing's semaphore tracker should be launched again if
10856  crashed.
10857
10858- bpo-31308: Make multiprocessing's forkserver process immune to Ctrl-C and
10859  other user interruptions. If it crashes, restart it when necessary.
10860
10861- bpo-31245: Added support for AF_UNIX socket in asyncio
10862  `create_datagram_endpoint`.
10863
10864- bpo-30553: Add HTTP/2 status code 421 (Misdirected Request) to
10865  :class:`http.HTTPStatus`. Patch by Vitor Pereira.
10866
10867Documentation
10868-------------
10869
10870- bpo-32105: Added asyncio.BaseEventLoop.connect_accepted_socket
10871  versionadded marker.
10872
10873Tests
10874-----
10875
10876- bpo-31380: Skip test_httpservers test_undecodable_file on macOS: fails on
10877  APFS.
10878
10879- bpo-31705: Skip test_socket.test_sha256() on Linux kernel older than 4.5.
10880  The test fails with ENOKEY on kernel 3.10 (on ppc64le). A fix was merged
10881  into the kernel 4.5.
10882
10883- bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV and
10884  remove the test.support.requires_android_level decorator.
10885
10886- bpo-32136: The runtime embedding tests have been split out from
10887  ``Lib/test/test_capi.py`` into a new ``Lib/test/test_embed.py`` file.
10888
10889- bpo-28668: test.support.requires_multiprocessing_queue is removed. Skip
10890  tests with test.support.import_module('multiprocessing.synchronize')
10891  instead when the semaphore implementation is broken or missing.
10892
10893- bpo-32126: Skip test_get_event_loop_new_process in
10894  test.test_asyncio.test_events when sem_open() is not functional.
10895
10896- bpo-31174: Fix test_tools.test_unparse: DirectoryTestCase now stores the
10897  names sample to always test the same files. It prevents false alarms when
10898  hunting reference leaks.
10899
10900Build
10901-----
10902
10903- bpo-28538: Revert the previous changes, the if_nameindex structure is
10904  defined by Unified Headers.
10905
10906- bpo-28762: Revert the last commit, the F_LOCK macro is defined by Android
10907  Unified Headers.
10908
10909- bpo-29040: Support building Android with Unified Headers. The first NDK
10910  release to support Unified Headers is android-ndk-r14.
10911
10912- bpo-32059: ``detect_modules()`` in ``setup.py`` now also searches the
10913  sysroot paths when cross-compiling.
10914
10915- bpo-31957: Fixes Windows SDK version detection when building for Windows.
10916
10917- bpo-31609: Fixes quotes in PCbuild/clean.bat
10918
10919- bpo-31934: Abort the build when building out of a not clean source tree.
10920
10921- bpo-31926: Fixed Argument Clinic sometimes causing compilation errors when
10922  there was more than one function and/or method in a .c file with the same
10923  name.
10924
10925- bpo-28791: Update Windows builds to use SQLite 3.21.0.
10926
10927- bpo-28791: Update OS X installer to use SQLite 3.21.0.
10928
10929- bpo-28643: Record profile-opt build progress with stamp files.
10930
10931- bpo-31866: Finish removing support for AtheOS.
10932
10933Windows
10934-------
10935
10936- bpo-1102: Return ``None`` when ``View.Fetch()`` returns
10937  ``ERROR_NO_MORE_ITEMS`` instead of raising ``MSIError``. Initial patch by
10938  Anthony Tuininga.
10939
10940- bpo-31944: Fixes Modify button in Apps and Features dialog.
10941
10942- bpo-20486: Implement the ``Database.Close()`` method to help closing MSI
10943  database objects.
10944
10945- bpo-31857: Make the behavior of USE_STACKCHECK deterministic in a
10946  multi-threaded environment.
10947
10948macOS
10949-----
10950
10951- bpo-31392: Update macOS installer to use OpenSSL 1.0.2m
10952
10953IDLE
10954----
10955
10956- bpo-32207: Improve tk event exception tracebacks in IDLE. When tk event
10957  handling is driven by IDLE's run loop, a confusing and distracting
10958  queue.EMPTY traceback context is no longer added to tk event exception
10959  tracebacks.  The traceback is now the same as when event handling is
10960  driven by user code.  Patch based on a suggestion by Serhiy Storchaka.
10961
10962- bpo-32164: Delete unused file idlelib/tabbedpages.py. Use of TabbedPageSet
10963  in configdialog was replaced by ttk.Notebook.
10964
10965- bpo-32100: IDLE: Fix old and new bugs in pathbrowser; improve tests. Patch
10966  mostly by Cheryl Sabella.
10967
10968- bpo-31858: IDLE -- Restrict shell prompt manipulation to the shell. Editor
10969  and output windows only see an empty last prompt line.  This simplifies
10970  the code and fixes a minor bug when newline is inserted. Sys.ps1, if
10971  present, is read on Shell start-up, but is not set or changed.
10972
10973- bpo-31860: The font sample in the IDLE configuration dialog is now
10974  editable. Changes persist while IDLE remains open
10975
10976- bpo-31836: Test_code_module now passes if run after test_idle, which sets
10977  ps1. The code module uses sys.ps1 if present or sets it to '>>> ' if not.
10978  Test_code_module now properly tests both behaviors.  Ditto for ps2.
10979
10980- bpo-28603: Fix a TypeError that caused a shell restart when printing a
10981  traceback that includes an exception that is unhashable. Patch by Zane
10982  Bitter.
10983
10984- bpo-13802: Use non-Latin characters in the IDLE's Font settings sample.
10985  Even if one selects a font that defines a limited subset of the unicode
10986  Basic Multilingual Plane, tcl/tk will use other fonts that define a
10987  character. The expanded example give users of non-Latin characters a
10988  better idea of what they might see in IDLE's shell and editors. To make
10989  room for the expanded sample, frames on the Font tab are re-arranged.  The
10990  Font/Tabs help explains a bit about the additions.
10991
10992Tools/Demos
10993-----------
10994
10995- bpo-32159: Remove CVS and Subversion tools: remove svneol.py and
10996  treesync.py scripts. CPython migrated from CVS to Subversion, to
10997  Mercurial, and then to Git. CVS and Subversion are no longer used to
10998  develop CPython.
10999
11000- bpo-30722: Make redemo work with Python 3.6 and newer versions. Also,
11001  remove the ``LOCALE`` option since it doesn't work with string patterns in
11002  Python 3. Patch by Christoph Sarnowski.
11003
11004C API
11005-----
11006
11007- bpo-20891: Fix PyGILState_Ensure(). When PyGILState_Ensure() is called in
11008  a non-Python thread before PyEval_InitThreads(), only call
11009  PyEval_InitThreads() after calling PyThreadState_New() to fix a crash.
11010
11011- bpo-32125: The ``Py_UseClassExceptionsFlag`` flag has been removed. It was
11012  deprecated and wasn't used anymore since Python 2.0.
11013
11014- bpo-25612: Move the current exception state from the frame object to the
11015  co-routine. This simplifies the interpreter and fixes a couple of obscure
11016  bugs caused by having swap exception state when entering or exiting a
11017  generator.
11018
11019- bpo-23699: Add Py_RETURN_RICHCOMPARE macro to reduce boilerplate code in
11020  rich comparison functions.
11021
11022- bpo-30697: The `PyExc_RecursionErrorInst` singleton is removed and
11023  `PyErr_NormalizeException()` does not use it anymore. This singleton is
11024  persistent and its members being never cleared may cause a segfault during
11025  finalization of the interpreter. See also issue #22898.
11026
11027
11028What's New in Python 3.7.0 alpha 2?
11029===================================
11030
11031*Release date: 2017-10-16*
11032
11033Core and Builtins
11034-----------------
11035
11036- bpo-31558: ``gc.freeze()`` is a new API that allows for moving all objects
11037  currently tracked by the garbage collector to a permanent generation,
11038  effectively removing them from future collection events. This can be used
11039  to protect those objects from having their PyGC_Head mutated. In effect,
11040  this enables great copy-on-write stability at fork().
11041
11042- bpo-31642: Restored blocking "from package import module" by setting
11043  sys.modules["package.module"] to None.
11044
11045- bpo-31708: Allow use of asynchronous generator expressions in synchronous
11046  functions.
11047
11048- bpo-31709: Drop support of asynchronous __aiter__.
11049
11050- bpo-30404: The -u option now makes the stdout and stderr streams
11051  unbuffered rather than line-buffered.
11052
11053- bpo-31619: Fixed a ValueError when convert a string with large number of
11054  underscores to integer with binary base.
11055
11056- bpo-31602: Fix an assertion failure in `zipimporter.get_source()` in case
11057  of a bad `zlib.decompress()`. Patch by Oren Milman.
11058
11059- bpo-31592: Fixed an assertion failure in Python parser in case of a bad
11060  `unicodedata.normalize()`. Patch by Oren Milman.
11061
11062- bpo-31588: Raise a `TypeError` with a helpful error message when class
11063  creation fails due to a metaclass with a bad ``__prepare__()`` method.
11064  Patch by Oren Milman.
11065
11066- bpo-31574: Importlib was instrumented with two dtrace probes to profile
11067  import timing.
11068
11069- bpo-31566: Fix an assertion failure in `_warnings.warn()` in case of a bad
11070  ``__name__`` global. Patch by Oren Milman.
11071
11072- bpo-31506: Improved the error message logic for object.__new__ and
11073  object.__init__.
11074
11075- bpo-31505: Fix an assertion failure in `json`, in case
11076  `_json.make_encoder()` received a bad `encoder()` argument. Patch by Oren
11077  Milman.
11078
11079- bpo-31492: Fix assertion failures in case of failing to import from a
11080  module with a bad ``__name__`` attribute, and in case of failing to access
11081  an attribute of such a module. Patch by Oren Milman.
11082
11083- bpo-31478: Fix an assertion failure in `_random.Random.seed()` in case the
11084  argument has a bad ``__abs__()`` method. Patch by Oren Milman.
11085
11086- bpo-31336: Speed up class creation by 10-20% by reducing the overhead in
11087  the necessary special method lookups.  Patch by Stefan Behnel.
11088
11089- bpo-31415: Add ``-X importtime`` option to show how long each import
11090  takes. It can be used to optimize application's startup time.  Support the
11091  :envvar:`PYTHONPROFILEIMPORTTIME` as an equivalent way to enable this.
11092
11093- bpo-31410: Optimized calling wrapper and classmethod descriptors.
11094
11095- bpo-31353: :pep:`553` - Add a new built-in called ``breakpoint()`` which
11096  calls ``sys.breakpointhook()``.  By default this imports ``pdb`` and calls
11097  ``pdb.set_trace()``, but users may override ``sys.breakpointhook()`` to
11098  call whatever debugger they want.  The original value of the hook is saved
11099  in ``sys.__breakpointhook__``.
11100
11101- bpo-17852: Maintain a list of open buffered files, flush them before
11102  exiting the interpreter.  Based on a patch from Armin Rigo.
11103
11104- bpo-31315: Fix an assertion failure in imp.create_dynamic(), when
11105  spec.name is not a string. Patch by Oren Milman.
11106
11107- bpo-31311: Fix a crash in the ``__setstate__()`` method of
11108  `ctypes._CData`, in case of a bad ``__dict__``. Patch by Oren Milman.
11109
11110- bpo-31293: Fix crashes in true division and multiplication of a timedelta
11111  object by a float with a bad as_integer_ratio() method. Patch by Oren
11112  Milman.
11113
11114- bpo-31285: Fix an assertion failure in `warnings.warn_explicit`, when the
11115  return value of the received loader's get_source() has a bad splitlines()
11116  method. Patch by Oren Milman.
11117
11118- bpo-30406: Make ``async`` and ``await`` proper keywords, as specified in
11119  :pep:`492`.
11120
11121Library
11122-------
11123
11124- bpo-30058: Fixed buffer overflow in select.kqueue.control().
11125
11126- bpo-31672: ``idpattern`` in ``string.Template`` matched some non-ASCII
11127  characters. Now it uses ``-i`` regular expression local flag to avoid
11128  non-ASCII characters.
11129
11130- bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM
11131  exceptions.
11132
11133- bpo-31728: Prevent crashes in `_elementtree` due to unsafe cleanup of
11134  `Element.text` and `Element.tail`. Patch by Oren Milman.
11135
11136- bpo-31671: Now ``re.compile()`` converts passed RegexFlag to normal int
11137  object before compiling. bm_regex_compile benchmark shows 14% performance
11138  improvements.
11139
11140- bpo-30397: The types of compiled regular objects and match objects are now
11141  exposed as `re.Pattern` and `re.Match`.  This adds information in pydoc
11142  output for the re module.
11143
11144- bpo-31675: Fixed memory leaks in Tkinter's methods splitlist() and split()
11145  when pass a string larger than 2 GiB.
11146
11147- bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo().
11148
11149- bpo-31648: Improvements to path predicates in ElementTree: Allow
11150  whitespace around predicate parts, i.e. "[a = 'text']" instead of
11151  requiring the less readable "[a='text']". Add support for text comparison
11152  of the current node, like "[.='text']". Patch by Stefan Behnel.
11153
11154- bpo-30806: Fix the string representation of a netrc object.
11155
11156- bpo-31638: Add optional argument ``compressed`` to
11157  ``zipapp.create_archive``, and add option ``--compress`` to the command
11158  line interface of ``zipapp``.
11159
11160- bpo-25351: Avoid venv activate failures with undefined variables
11161
11162- bpo-20519: Avoid ctypes use (if possible) and improve import time for
11163  uuid.
11164
11165- bpo-28293: The regular expression cache is no longer completely dumped
11166  when it is full.
11167
11168- bpo-31596: Added pthread_getcpuclockid() to the time module
11169
11170- bpo-27494: Make 2to3 accept a trailing comma in generator expressions. For
11171  example, ``set(x for x in [],)`` is now allowed.
11172
11173- bpo-30347: Stop crashes when concurrently iterate over itertools.groupby()
11174  iterators.
11175
11176- bpo-30346: An iterator produced by itertools.groupby() iterator now
11177  becomes exhausted after advancing the groupby iterator.
11178
11179- bpo-31556: Cancel asyncio.wait_for future faster if timeout <= 0
11180
11181- bpo-31540: Allow passing a context object in
11182  :class:`concurrent.futures.ProcessPoolExecutor` constructor. Also, free
11183  job resources in :class:`concurrent.futures.ProcessPoolExecutor` earlier
11184  to improve memory usage when a worker waits for new jobs.
11185
11186- bpo-31516: ``threading.current_thread()`` should not return a dummy thread
11187  at shutdown.
11188
11189- bpo-31525: In the sqlite module, require the sqlite3_prepare_v2 API. Thus,
11190  the sqlite module now requires sqlite version at least 3.3.9.
11191
11192- bpo-26510: argparse subparsers are now required by default.  This matches
11193  behaviour in Python 2. For optional subparsers, use the new parameter
11194  ``add_subparsers(required=False)``. Patch by Anthony Sottile. (As of
11195  3.7.0rc1, the default was changed to not required as had been the case
11196  since Python 3.3.)
11197
11198- bpo-27541: Reprs of subclasses of some collection and iterator classes
11199  (`bytearray`, `array.array`, `collections.deque`,
11200  `collections.defaultdict`, `itertools.count`, `itertools.repeat`) now
11201  contain actual type name insteads of hardcoded name of the base class.
11202
11203- bpo-31351: python -m ensurepip now exits with non-zero exit code if pip
11204  bootstrapping has failed.
11205
11206- bpo-31389: ``pdb.set_trace()`` now takes an optional keyword-only argument
11207  ``header``. If given, this is printed to the console just before debugging
11208  begins.
11209
11210Documentation
11211-------------
11212
11213- bpo-31537: Fix incorrect usage of ``get_history_length`` in readline
11214  documentation example code. Patch by Brad Smith.
11215
11216- bpo-30085: The operator functions without double underscores are preferred
11217  for clarity. The one with underscores are only kept for
11218  back-compatibility.
11219
11220Build
11221-----
11222
11223- bpo-31696: Improve compiler version information in :data:`sys.version`
11224  when Python is built with Clang.
11225
11226- bpo-31625: Stop using ranlib on static libraries. Instead, we assume ar
11227  supports the 's' flag.
11228
11229- bpo-31624: Remove support for BSD/OS.
11230
11231- bpo-22140: Prevent double substitution of prefix in python-config.sh.
11232
11233- bpo-31569: Correct PCBuild/ case to PCbuild/ in build scripts and
11234  documentation.
11235
11236- bpo-31536: Avoid wholesale rebuild after `make regen-all` if nothing
11237  changed.
11238
11239IDLE
11240----
11241
11242- bpo-31460: Simplify the API of IDLE's Module Browser. Passing a widget
11243  instead of an flist with a root widget opens the option of creating a
11244  browser frame that is only part of a window.  Passing a full file name
11245  instead of pieces assumed to come from a .py file opens the possibility of
11246  browsing python files that do not end in .py.
11247
11248- bpo-31649: IDLE - Make _htest, _utest parameters keyword only.
11249
11250- bpo-31559: Remove test order dependence in idle_test.test_browser.
11251
11252- bpo-31459: Rename IDLE's module browser from Class Browser to Module
11253  Browser. The original module-level class and method browser became a
11254  module browser, with the addition of module-level functions, years ago.
11255  Nested classes and functions were added yesterday.  For
11256  back-compatibility, the virtual event <<open-class-browser>>, which
11257  appears on the Keys tab of the Settings dialog, is not changed. Patch by
11258  Cheryl Sabella.
11259
11260- bpo-31500: Default fonts now are scaled on HiDPI displays.
11261
11262- bpo-1612262: IDLE module browser now shows nested classes and functions.
11263  Original patches for code and tests by Guilherme Polo and Cheryl Sabella,
11264  respectively.
11265
11266C API
11267-----
11268
11269- bpo-28280: Make `PyMapping_Keys()`, `PyMapping_Values()` and
11270  `PyMapping_Items()` always return a `list` (rather than a `list` or a
11271  `tuple`). Patch by Oren Milman.
11272
11273- bpo-31532: Fix memory corruption due to allocator mix in getpath.c between
11274  Py_GetPath() and Py_SetPath()
11275
11276- bpo-25658: Implement :pep:`539` for Thread Specific Storage (TSS) API: it
11277  is a new Thread Local Storage (TLS) API to CPython which would supersede
11278  use of the existing TLS API within the CPython interpreter, while
11279  deprecating the existing API. PEP written by Erik M. Bray, patch by
11280  Masayuki Yamamoto.
11281
11282
11283What's New in Python 3.7.0 alpha 1?
11284===================================
11285
11286*Release date: 2017-09-19*
11287
11288Security
11289--------
11290
11291- bpo-29781: SSLObject.version() now correctly returns None when handshake
11292  over BIO has not been performed yet.
11293
11294- bpo-29505: Add fuzz tests for float(str), int(str), unicode(str); for
11295  oss-fuzz.
11296
11297- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to
11298  get security fixes.
11299
11300- bpo-30730: Prevent environment variables injection in subprocess on
11301  Windows.  Prevent passing other environment variables and command
11302  arguments.
11303
11304- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple
11305  security vulnerabilities including: CVE-2017-9233 (External entity
11306  infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix),
11307  CVE-2016-0718 (Fix regression bugs from 2.2.0's fix to CVE-2016-0718) and
11308  CVE-2012-0876 (Counter hash flooding with SipHash). Note: the
11309  CVE-2016-5300 (Use os-specific entropy sources like getrandom) doesn't
11310  impact Python, since Python already gets entropy from the OS to set the
11311  expat secret using ``XML_SetHashSalt()``.
11312
11313- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For
11314  example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the
11315  ``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an
11316  authentication (``login@host``).
11317
11318- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of
11319  CVE-2016-0718 and CVE-2016-4472. See
11320  https://sourceforge.net/p/expat/bugs/537/ for more information.
11321
11322Core and Builtins
11323-----------------
11324
11325- bpo-31490: Fix an assertion failure in `ctypes` class definition, in case
11326  the class has an attribute whose name is specified in ``_anonymous_`` but
11327  not in ``_fields_``. Patch by Oren Milman.
11328
11329- bpo-31471: Fix an assertion failure in `subprocess.Popen()` on Windows, in
11330  case the env argument has a bad keys() method. Patch by Oren Milman.
11331
11332- bpo-31418: Fix an assertion failure in `PyErr_WriteUnraisable()` in case
11333  of an exception with a bad ``__module__`` attribute. Patch by Oren Milman.
11334
11335- bpo-31416: Fix assertion failures in case of a bad warnings.filters or
11336  warnings.defaultaction. Patch by Oren Milman.
11337
11338- bpo-28411: Change direct usage of PyInterpreterState.modules to
11339  PyImport_GetModuleDict(). Also introduce more uniformity in other code
11340  that deals with sys.modules. This helps reduce complications when working
11341  on sys.modules.
11342
11343- bpo-28411: Switch to the abstract API when dealing with
11344  ``PyInterpreterState.modules``. This allows later support for all dict
11345  subclasses and other Mapping implementations.  Also add a
11346  ``PyImport_GetModule()`` function to reduce a bunch of duplicated code.
11347
11348- bpo-31411: Raise a TypeError instead of SystemError in case
11349  warnings.onceregistry is not a dictionary. Patch by Oren Milman.
11350
11351- bpo-31344: For finer control of tracing behaviour when testing the
11352  interpreter, two new frame attributes have been added to control the
11353  emission of particular trace events: ``f_trace_lines`` (``True`` by
11354  default) to turn off per-line trace events; and ``f_trace_opcodes``
11355  (``False`` by default) to turn on per-opcode trace events.
11356
11357- bpo-31373: Fix several possible instances of undefined behavior due to
11358  floating-point demotions.
11359
11360- bpo-30465: Location information (``lineno`` and ``col_offset``) in
11361  f-strings is now (mostly) correct.  This fixes tools like flake8 from
11362  showing warnings on the wrong line (typically the first line of the file).
11363
11364- bpo-30860: Consolidate CPython's global runtime state under a single
11365  struct.  This improves discoverability of the runtime state.
11366
11367- bpo-31347: Fix possible undefined behavior in _PyObject_FastCall_Prepend.
11368
11369- bpo-31343: Include sys/sysmacros.h for major(), minor(), and makedev().
11370  GNU C libray plans to remove the functions from sys/types.h.
11371
11372- bpo-31291: Fix an assertion failure in `zipimport.zipimporter.get_data` on
11373  Windows, when the return value of ``pathname.replace('/','\\')`` isn't a
11374  string. Patch by Oren Milman.
11375
11376- bpo-31271: Fix an assertion failure in the write() method of
11377  `io.TextIOWrapper`, when the encoder doesn't return a bytes object. Patch
11378  by Oren Milman.
11379
11380- bpo-31243: Fix a crash in some methods of `io.TextIOWrapper`, when the
11381  decoder's state is invalid. Patch by Oren Milman.
11382
11383- bpo-30721: ``print`` now shows correct usage hint for using Python 2
11384  redirection syntax.  Patch by Sanyam Khurana.
11385
11386- bpo-31070: Fix a race condition in importlib _get_module_lock().
11387
11388- bpo-30747: Add a non-dummy implementation of _Py_atomic_store and
11389  _Py_atomic_load on MSVC.
11390
11391- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which
11392  doesn't call ``PyObject_GC_UnTrack()``.
11393
11394- bpo-31071: Avoid masking original TypeError in call with * unpacking when
11395  other arguments are passed.
11396
11397- bpo-30978: str.format_map() now passes key lookup exceptions through.
11398  Previously any exception was replaced with a KeyError exception.
11399
11400- bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state.
11401
11402- bpo-30876: Relative import from unloaded package now reimports the package
11403  instead of failing with SystemError.  Relative import from non-package now
11404  fails with ImportError rather than SystemError.
11405
11406- bpo-30703: Improve signal delivery. Avoid using Py_AddPendingCall from
11407  signal handler, to avoid calling signal-unsafe functions. The tests I'm
11408  adding here fail without the rest of the patch, on Linux and OS X. This
11409  means our signal delivery logic had defects (some signals could be lost).
11410
11411- bpo-30765: Avoid blocking in pthread_mutex_lock() when
11412  PyThread_acquire_lock() is asked not to block.
11413
11414- bpo-31161: Make sure the 'Missing parentheses' syntax error message is
11415  only applied to SyntaxError, not to subclasses. Patch by Martijn Pieters.
11416
11417- bpo-30814: Fixed a race condition when import a submodule from a package.
11418
11419- bpo-30736: The internal unicodedata database has been upgraded to Unicode
11420  10.0.
11421
11422- bpo-30604: Move co_extra_freefuncs from per-thread to per-interpreter to
11423  avoid crashes.
11424
11425- bpo-30597: ``print`` now shows expected input in custom error message when
11426  used as a Python 2 statement. Patch by Sanyam Khurana.
11427
11428- bpo-30682: Removed a too-strict assertion that failed for certain
11429  f-strings, such as eval("f'\\\n'") and eval("f'\\\r'").
11430
11431- bpo-30501: The compiler now produces more optimal code for complex
11432  condition expressions in the "if", "while" and "assert" statement, the
11433  "if" expression, and generator expressions and comprehensions.
11434
11435- bpo-28180: Implement :pep:`538` (legacy C locale coercion). This means
11436  that when a suitable coercion target locale is available, both the core
11437  interpreter and locale-aware C extensions will assume the use of UTF-8 as
11438  the default text encoding, rather than ASCII.
11439
11440- bpo-30486: Allows setting cell values for __closure__. Patch by Lisa
11441  Roach.
11442
11443- bpo-30537: itertools.islice now accepts integer-like objects (having an
11444  __index__ method) as start, stop, and slice arguments
11445
11446- bpo-25324: Tokens needed for parsing in Python moved to C. ``COMMENT``,
11447  ``NL`` and ``ENCODING``. This way the tokens and tok_names in the token
11448  module don't get changed when you import the tokenize module.
11449
11450- bpo-29104: Fixed parsing backslashes in f-strings.
11451
11452- bpo-27945: Fixed various segfaults with dict when input collections are
11453  mutated during searching, inserting or comparing.  Based on patches by
11454  Duane Griffin and Tim Mitchell.
11455
11456- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for
11457  non-interned attribute names.  Based on patch by Eryk Sun.
11458
11459- bpo-30039: If a KeyboardInterrupt happens when the interpreter is in the
11460  middle of resuming a chain of nested 'yield from' or 'await' calls, it's
11461  now correctly delivered to the innermost frame.
11462
11463- bpo-28974: ``object.__format__(x, '')`` is now equivalent to ``str(x)``
11464  rather than ``format(str(self), '')``.
11465
11466- bpo-30024: Circular imports involving absolute imports with binding a
11467  submodule to a name are now supported.
11468
11469- bpo-12414: sys.getsizeof() on a code object now returns the sizes which
11470  includes the code struct and sizes of objects which it references. Patch
11471  by Dong-hee Na.
11472
11473- bpo-29839: len() now raises ValueError rather than OverflowError if
11474  __len__() returned a large negative integer.
11475
11476- bpo-11913: README.rst is now included in the list of distutils standard
11477  READMEs and therefore included in source distributions.
11478
11479- bpo-29914: Fixed default implementations of __reduce__ and
11480  __reduce_ex__(). object.__reduce__() no longer takes arguments,
11481  object.__reduce_ex__() now requires one argument.
11482
11483- bpo-29949: Fix memory usage regression of set and frozenset object.
11484
11485- bpo-29935: Fixed error messages in the index() method of tuple, list and
11486  deque when pass indices of wrong type.
11487
11488- bpo-29816: Shift operation now has less opportunity to raise
11489  OverflowError. ValueError always is raised rather than OverflowError for
11490  negative counts. Shifting zero with non-negative count always returns
11491  zero.
11492
11493- bpo-24821: Fixed the slowing down to 25 times in the searching of some
11494  unlucky Unicode characters.
11495
11496- bpo-29102: Add a unique ID to PyInterpreterState.  This makes it easier to
11497  identify each subinterpreter.
11498
11499- bpo-29894: The deprecation warning is emitted if __complex__ returns an
11500  instance of a strict subclass of complex.  In a future versions of Python
11501  this can be an error.
11502
11503- bpo-29859: Show correct error messages when any of the pthread_* calls in
11504  thread_pthread.h fails.
11505
11506- bpo-29849: Fix a memory leak when an ImportError is raised during from
11507  import.
11508
11509- bpo-28856: Fix an oversight that %b format for bytes should support
11510  objects follow the buffer protocol.
11511
11512- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused
11513  a regression by revealing an inconsistency in how sys.path is initialized
11514  when executing ``__main__`` from a zipfile, directory, or other import
11515  location. The interpreter now consistently avoids ever adding the import
11516  location's parent directory to ``sys.path``, and ensures no other
11517  ``sys.path`` entries are inadvertently modified when inserting the import
11518  location named on the command line.
11519
11520- bpo-29568: Escaped percent "%%" in the format string for classic string
11521  formatting no longer allows any characters between two percents.
11522
11523- bpo-29714: Fix a regression that bytes format may fail when containing
11524  zero bytes inside.
11525
11526- bpo-29695: bool(), float(), list() and tuple() no longer take keyword
11527  arguments. The first argument of int() can now be passes only as
11528  positional argument.
11529
11530- bpo-28893: Set correct __cause__ for errors about invalid awaitables
11531  returned from __aiter__ and __anext__.
11532
11533- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises
11534  :exc:`OverflowError`.
11535
11536- bpo-29683: Fixes to memory allocation in _PyCode_SetExtra.  Patch by Brian
11537  Coleman.
11538
11539- bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords. It
11540  should raise TypeError when kwargs is not a dict.  But it might cause segv
11541  when args=NULL and kwargs is not a dict.
11542
11543- bpo-28598: Support __rmod__ for subclasses of str being called before
11544  str.__mod__. Patch by Martijn Pieters.
11545
11546- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX. Patch by
11547  Matthieu Dartiailh.
11548
11549- bpo-29602: Fix incorrect handling of signed zeros in complex constructor
11550  for complex subclasses and for inputs having a __complex__ method. Patch
11551  by Serhiy Storchaka.
11552
11553- bpo-29347: Fixed possibly dereferencing undefined pointers when creating
11554  weakref objects.
11555
11556- bpo-29463: Add ``docstring`` field to Module, ClassDef, FunctionDef, and
11557  AsyncFunctionDef ast nodes.  docstring is not first stmt in their body
11558  anymore.  It affects ``co_firstlineno`` and ``co_lnotab`` of code object
11559  for module and class. (Reverted in :issue:`32911`.)
11560
11561- bpo-29438: Fixed use-after-free problem in key sharing dict.
11562
11563- bpo-29546: Set the 'path' and 'name' attribute on ImportError for ``from
11564  ... import ...``.
11565
11566- bpo-29546: Improve from-import error message with location
11567
11568- bpo-29478: If max_line_length=None is specified while using the Compat32
11569  policy, it is no longer ignored.  Patch by Mircea Cosbuc.
11570
11571- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0].
11572
11573- bpo-29337: Fixed possible BytesWarning when compare the code objects.
11574  Warnings could be emitted at compile time.
11575
11576- bpo-29327: Fixed a crash when pass the iterable keyword argument to
11577  sorted().
11578
11579- bpo-29034: Fix memory leak and use-after-free in os module
11580  (path_converter).
11581
11582- bpo-29159: Fix regression in bytes(x) when x.__index__() raises Exception.
11583
11584- bpo-29049: Call _PyObject_GC_TRACK() lazily when calling Python function.
11585  Calling function is up to 5% faster.
11586
11587- bpo-28927: bytes.fromhex() and bytearray.fromhex() now ignore all ASCII
11588  whitespace, not only spaces.  Patch by Robert Xiao.
11589
11590- bpo-28932: Do not include <sys/random.h> if it does not exist.
11591
11592- bpo-25677: Correct the positioning of the syntax error caret for indented
11593  blocks. Based on patch by Michael Layzell.
11594
11595- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate
11596  form.
11597
11598- bpo-18896: Python function can now have more than 255 parameters.
11599  collections.namedtuple() now supports tuples with more than 255 elements.
11600
11601- bpo-28596: The preferred encoding is UTF-8 on Android. Patch written by
11602  Chi Hsuan Yen.
11603
11604- bpo-22257: Clean up interpreter startup (see :pep:`432`).
11605
11606- bpo-26919: On Android, operating system data is now always encoded/decoded
11607  to/from UTF-8, instead of the locale encoding to avoid inconsistencies
11608  with os.fsencode() and os.fsdecode() which are already using UTF-8.
11609
11610- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy
11611  bug triggerable by a monkey-patched len() function.
11612
11613- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must
11614  not convert combined table into split table. Patch written by INADA Naoki.
11615
11616- bpo-28739: f-string expressions are no longer accepted as docstrings and
11617  by ast.literal_eval() even if they do not include expressions.
11618
11619- bpo-28512: Fixed setting the offset attribute of SyntaxError by
11620  PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
11621
11622- bpo-28918: Fix the cross compilation of xxlimited when Python has been
11623  built with Py_DEBUG defined.
11624
11625- bpo-23722: Rather than silently producing a class that doesn't support
11626  zero-argument ``super()`` in methods, failing to pass the new
11627  ``__classcell__`` namespace entry up to ``type.__new__`` now results in a
11628  ``DeprecationWarning`` and a class that supports zero-argument
11629  ``super()``.
11630
11631- bpo-28797: Modifying the class __dict__ inside the __set_name__ method of
11632  a descriptor that is used inside that class no longer prevents calling the
11633  __set_name__ method of other descriptors.
11634
11635- bpo-28799: Remove the ``PyEval_GetCallStats()`` function and deprecate the
11636  untested and undocumented ``sys.callstats()`` function. Remove the
11637  ``CALL_PROFILE`` special build: use the :func:`sys.setprofile` function,
11638  :mod:`cProfile` or :mod:`profile` to profile function calls.
11639
11640- bpo-12844: More than 255 arguments can now be passed to a function.
11641
11642- bpo-28782: Fix a bug in the implementation ``yield from`` when checking if
11643  the next instruction is YIELD_FROM. Regression introduced by WORDCODE
11644  (issue #26647).
11645
11646- bpo-28774: Fix error position of the unicode error in ASCII and Latin1
11647  encoders when a string returned by the error handler contains multiple
11648  non-encodable characters (non-ASCII for the ASCII codec, characters out of
11649  the U+0000-U+00FF range for Latin1).
11650
11651- bpo-28731: Optimize _PyDict_NewPresized() to create correct size dict.
11652  Improve speed of dict literal with constant keys up to 30%.
11653
11654- bpo-28532: Show sys.version when -V option is supplied twice.
11655
11656- bpo-27100: The with-statement now checks for __enter__ before it checks
11657  for __exit__. This gives less confusing error messages when both methods
11658  are missing. Patch by Jonathan Ellington.
11659
11660- bpo-28746: Fix the set_inheritable() file descriptor method on platforms
11661  that do not have the ioctl FIOCLEX and FIONCLEX commands.
11662
11663- bpo-26920: Fix not getting the locale's charset upon initializing the
11664  interpreter, on platforms that do not have langinfo.
11665
11666- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
11667  when decode astral characters.  Patch by Xiang Zhang.
11668
11669- bpo-28665: Improve speed of the STORE_DEREF opcode by 40%.
11670
11671- bpo-19398: Extra slash no longer added to sys.path components in case of
11672  empty compile-time PYTHONPATH components.
11673
11674- bpo-28621: Sped up converting int to float by reusing faster bits counting
11675  implementation.  Patch by Adrian Wielgosik.
11676
11677- bpo-28580: Optimize iterating split table values. Patch by Xiang Zhang.
11678
11679- bpo-28583: PyDict_SetDefault didn't combine split table when needed. Patch
11680  by Xiang Zhang.
11681
11682- bpo-28128: Deprecation warning for invalid str and byte escape sequences
11683  now prints better information about where the error occurs. Patch by
11684  Serhiy Storchaka and Eric Smith.
11685
11686- bpo-28509: dict.update() no longer allocate unnecessary large memory.
11687
11688- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
11689  build.
11690
11691- bpo-28517: Fixed of-by-one error in the peephole optimizer that caused
11692  keeping unreachable code.
11693
11694- bpo-28214: Improved exception reporting for problematic __set_name__
11695  attributes.
11696
11697- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception
11698  loss in PyTraceBack_Here().
11699
11700- bpo-28183: Optimize and cleanup dict iteration.
11701
11702- bpo-26081: Added C implementation of asyncio.Future. Original patch by
11703  Yury Selivanov.
11704
11705- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
11706  Patch by Xiang Zhang.
11707
11708- bpo-28376: The type of long range iterator is now registered as Iterator.
11709  Patch by Oren Milman.
11710
11711- bpo-28376: Creating instances of range_iterator by calling range_iterator
11712  type now is disallowed.  Calling iter() on range instance is the only way.
11713  Patch by Oren Milman.
11714
11715- bpo-26906: Resolving special methods of uninitialized type now causes
11716  implicit initialization of the type instead of a fail.
11717
11718- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original
11719  patch by Niklas Koep.
11720
11721- bpo-24098: Fixed possible crash when AST is changed in process of
11722  compiling it.
11723
11724- bpo-28201: Dict reduces possibility of 2nd conflict in hash table when
11725  hashes have same lower bits.
11726
11727- bpo-28350: String constants with null character no longer interned.
11728
11729- bpo-26617: Fix crash when GC runs during weakref callbacks.
11730
11731- bpo-27942: String constants now interned recursively in tuples and
11732  frozensets.
11733
11734- bpo-28289: ImportError.__init__ now resets not specified attributes.
11735
11736- bpo-21578: Fixed misleading error message when ImportError called with
11737  invalid keyword args.
11738
11739- bpo-28203: Fix incorrect type in complex(1.0, {2:3}) error message. Patch
11740  by Soumya Sharma.
11741
11742- bpo-28086: Single var-positional argument of tuple subtype was passed
11743  unscathed to the C-defined function.  Now it is converted to exact tuple.
11744
11745- bpo-28214: Now __set_name__ is looked up on the class instead of the
11746  instance.
11747
11748- bpo-27955: Fallback on reading /dev/urandom device when the getrandom()
11749  syscall fails with EPERM, for example when blocked by SECCOMP.
11750
11751- bpo-28192: Don't import readline in isolated mode.
11752
11753- bpo-27441: Remove some redundant assignments to ob_size in longobject.c.
11754  Thanks Oren Milman.
11755
11756- bpo-27222: Clean up redundant code in long_rshift function. Thanks Oren
11757  Milman.
11758
11759- Upgrade internal unicode databases to Unicode version 9.0.0.
11760
11761- bpo-28131: Fix a regression in zipimport's compile_source().  zipimport
11762  should use the same optimization level as the interpreter.
11763
11764- bpo-28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly
11765  optimize memcpy().
11766
11767- bpo-28120: Fix dict.pop() for splitted dictionary when trying to remove a
11768  "pending key" (Not yet inserted in split-table). Patch by Xiang Zhang.
11769
11770- bpo-26182: Raise DeprecationWarning when async and await keywords are used
11771  as variable/attribute/class/function name.
11772
11773- bpo-26182: Fix a refleak in code that raises DeprecationWarning.
11774
11775- bpo-28721: Fix asynchronous generators aclose() and athrow() to handle
11776  StopAsyncIteration propagation properly.
11777
11778- bpo-26110: Speed-up method calls: add LOAD_METHOD and CALL_METHOD opcodes.
11779
11780Library
11781-------
11782
11783- bpo-31499: xml.etree: Fix a crash when a parser is part of a reference
11784  cycle.
11785
11786- bpo-31482: ``random.seed()`` now works with bytes in version=1
11787
11788- bpo-28556: typing.get_type_hints now finds the right globalns for classes
11789  and modules by default (when no ``globalns`` was specified by the caller).
11790
11791- bpo-28556: Speed improvements to the ``typing`` module.  Original PRs by
11792  Ivan Levkivskyi and Mitar.
11793
11794- bpo-31544: The C accelerator module of ElementTree ignored exceptions
11795  raised when looking up TreeBuilder target methods in XMLParser().
11796
11797- bpo-31234: socket.create_connection() now fixes manually a reference
11798  cycle: clear the variable storing the last exception on success.
11799
11800- bpo-31457: LoggerAdapter objects can now be nested.
11801
11802- bpo-31431: SSLContext.check_hostname now automatically sets
11803  SSLContext.verify_mode to ssl.CERT_REQUIRED instead of failing with a
11804  ValueError.
11805
11806- bpo-31233: socketserver.ThreadingMixIn now keeps a list of non-daemonic
11807  threads to wait until all these threads complete in server_close().
11808
11809- bpo-28638: Changed the implementation strategy for
11810  collections.namedtuple() to substantially reduce the use of exec() in
11811  favor of precomputed methods. As a result, the *verbose* parameter and
11812  *_source* attribute are no longer supported.  The benefits include 1)
11813  having a smaller memory footprint for applications using multiple named
11814  tuples, 2) faster creation of the named tuple class (approx 4x to 6x
11815  depending on how it is measured), and 3) minor speed-ups for instance
11816  creation using __new__, _make, and _replace.  (The primary patch
11817  contributor is Jelle Zijlstra with further improvements by INADA Naoki,
11818  Serhiy Storchaka, and Raymond Hettinger.)
11819
11820- bpo-31400: Improves SSL error handling to avoid losing error numbers.
11821
11822- bpo-27629: Make return types of SSLContext.wrap_bio() and
11823  SSLContext.wrap_socket() customizable.
11824
11825- bpo-28958: ssl.SSLContext() now uses OpenSSL error information when a
11826  context cannot be instantiated.
11827
11828- bpo-28182: The SSL module now raises SSLCertVerificationError when OpenSSL
11829  fails to verify the peer's certificate. The exception contains more
11830  information about the error.
11831
11832- bpo-27340: SSLSocket.sendall() now uses memoryview to create slices of
11833  data. This fixes support for all bytes-like object. It is also more
11834  efficient and avoids costly copies.
11835
11836- bpo-14191: A new function
11837  ``argparse.ArgumentParser.parse_intermixed_args`` provides the ability to
11838  parse command lines where there user intermixes options and positional
11839  arguments.
11840
11841- bpo-31178: Fix string concatenation bug in rare error path in the
11842  subprocess module
11843
11844- bpo-31350: Micro-optimize :func:`asyncio._get_running_loop` to become up
11845  to 10% faster.
11846
11847- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of
11848  partial characters for UTF-8 input (libexpat bug 115):
11849  https://github.com/libexpat/libexpat/issues/115
11850
11851- bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3.
11852
11853- bpo-1198569: ``string.Template`` subclasses can optionally define
11854  ``braceidpattern`` if they want to specify different placeholder patterns
11855  inside and outside the braces.  If None (the default) it falls back to
11856  ``idpattern``.
11857
11858- bpo-31326: concurrent.futures.ProcessPoolExecutor.shutdown() now
11859  explicitly closes the call queue. Moreover, shutdown(wait=True) now also
11860  join the call queue thread, to prevent leaking a dangling thread.
11861
11862- bpo-27144: The ``map()`` and ``as_completed()`` iterators in
11863  ``concurrent.futures`` now avoid keeping a reference to yielded objects.
11864
11865- bpo-31281: Fix ``fileinput.FileInput(files, inplace=True)`` when ``files``
11866  contain ``pathlib.Path`` objects.
11867
11868- bpo-10746: Fix ctypes producing wrong :pep:`3118` type codes for integer
11869  types.
11870
11871- bpo-27584: ``AF_VSOCK`` has been added to the socket interface which
11872  allows communication between virtual machines and their host.
11873
11874- bpo-22536: The subprocess module now sets the filename when
11875  FileNotFoundError is raised on POSIX systems due to the executable or cwd
11876  not being found.
11877
11878- bpo-29741: Update some methods in the _pyio module to also accept integer
11879  types. Patch by Oren Milman.
11880
11881- bpo-31249: concurrent.futures: WorkItem.run() used by ThreadPoolExecutor
11882  now breaks a reference cycle between an exception object and the WorkItem
11883  object.
11884
11885- bpo-31247: xmlrpc.server now explicitly breaks reference cycles when using
11886  sys.exc_info() in code handling exceptions.
11887
11888- bpo-23835: configparser: reading defaults in the ``ConfigParser()``
11889  constructor is now using ``read_dict()``, making its behavior consistent
11890  with the rest of the parser.  Non-string keys and values in the defaults
11891  dictionary are now being implicitly converted to strings.  Patch by James
11892  Tocknell.
11893
11894- bpo-31238: pydoc: the stop() method of the private ServerThread class now
11895  waits until DocServer.serve_until_quit() completes and then explicitly
11896  sets its docserver attribute to None to break a reference cycle.
11897
11898- bpo-5001: Many asserts in `multiprocessing` are now more informative, and
11899  some error types have been changed to more specific ones.
11900
11901- bpo-31109: Convert zipimport to use Argument Clinic.
11902
11903- bpo-30102: The ssl and hashlib modules now call
11904  OPENSSL_add_all_algorithms_noconf() on OpenSSL < 1.1.0. The function
11905  detects CPU features and enables optimizations on some CPU architectures
11906  such as POWER8. Patch is based on research from Gustavo Serra Scalet.
11907
11908- bpo-18966: Non-daemonic threads created by a multiprocessing.Process are
11909  now joined on child exit.
11910
11911- bpo-31183: `dis` now works with asynchronous generator and coroutine
11912  objects. Patch by George Collins based on diagnosis by Luciano Ramalho.
11913
11914- bpo-5001: There are a number of uninformative asserts in the
11915  `multiprocessing` module, as noted in issue 5001. This change fixes two of
11916  the most potentially problematic ones, since they are in error-reporting
11917  code, in the `multiprocessing.managers.convert_to_error` function. (It
11918  also makes more informative a ValueError message.) The only potentially
11919  problematic change is that the AssertionError is now a TypeError; however,
11920  this should also help distinguish it from an AssertionError being
11921  *reported* by the function/its caller (such as in issue 31169). - Patch by
11922  Allen W. Smith (drallensmith on github).
11923
11924- bpo-31185: Fixed miscellaneous errors in asyncio speedup module.
11925
11926- bpo-31151: socketserver.ForkingMixIn.server_close() now waits until all
11927  child processes completed to prevent leaking zombie processes.
11928
11929- bpo-31072: Add an ``include_file`` parameter to
11930  ``zipapp.create_archive()``
11931
11932- bpo-24700: Optimize array.array comparison. It is now from 10x up to 70x
11933  faster when comparing arrays holding values of the same integer type.
11934
11935- bpo-31135: ttk: fix the destroy() method of LabeledScale and OptionMenu
11936  classes. Call the parent destroy() method even if the used attribute
11937  doesn't exist. The LabeledScale.destroy() method now also explicitly
11938  clears label and scale attributes to help the garbage collector to destroy
11939  all widgets.
11940
11941- bpo-31107: Fix `copyreg._slotnames()` mangled attribute calculation for
11942  classes whose name begins with an underscore. Patch by Shane Harvey.
11943
11944- bpo-31080: Allow `logging.config.fileConfig` to accept kwargs and/or args.
11945
11946- bpo-30897: ``pathlib.Path`` objects now include an ``is_mount()`` method
11947  (only implemented on POSIX).  This is similar to ``os.path.ismount(p)``.
11948  Patch by Cooper Ry Lees.
11949
11950- bpo-31061: Fixed a crash when using asyncio and threads.
11951
11952- bpo-30987: Added support for CAN ISO-TP protocol in the socket module.
11953
11954- bpo-30522: Added a ``setStream`` method to ``logging.StreamHandler`` to
11955  allow the stream to be set after creation.
11956
11957- bpo-30502: Fix handling of long oids in ssl.  Based on patch by Christian
11958  Heimes.
11959
11960- bpo-5288: Support tzinfo objects with sub-minute offsets.
11961
11962- bpo-30919: Fix shared memory performance regression in multiprocessing in
11963  3.x. Shared memory used anonymous memory mappings in 2.x, while 3.x mmaps
11964  actual files. Try to be careful to do as little disk I/O as possible.
11965
11966- bpo-26732: Fix too many fds in processes started with the "forkserver"
11967  method. A child process would inherit as many fds as the number of
11968  still-running children.
11969
11970- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound
11971  builtin functions.  Patch by Aaron Gallagher.
11972
11973- bpo-30961: Fix decrementing a borrowed reference in tracemalloc.
11974
11975- bpo-19896: Fix multiprocessing.sharedctypes to recognize typecodes ``'q'``
11976  and ``'Q'``.
11977
11978- bpo-30946: Remove obsolete code in readline module for platforms where GNU
11979  readline is older than 2.1 or where select() is not available.
11980
11981- bpo-25684: Change ``ttk.OptionMenu`` radiobuttons to be unique across
11982  instances of ``OptionMenu``.
11983
11984- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the
11985  thread completes, even if the thread was started by the same process which
11986  created the queue.
11987
11988- bpo-29854: Fix segfault in readline when using readline's history-size
11989  option.  Patch by Nir Soffer.
11990
11991- bpo-30794: Added multiprocessing.Process.kill method to terminate using
11992  the SIGKILL signal on Unix.
11993
11994- bpo-30319: socket.close() now ignores ECONNRESET error.
11995
11996- bpo-30828: Fix out of bounds write in
11997  `asyncio.CFuture.remove_done_callback()`.
11998
11999- bpo-30302: Use keywords in the ``repr`` of ``datetime.timedelta``.
12000
12001- bpo-30807: signal.setitimer() may disable the timer when passed a tiny
12002  value. Tiny values (such as 1e-6) are valid non-zero values for
12003  setitimer(), which is specified as taking microsecond-resolution
12004  intervals. However, on some platform, our conversion routine could convert
12005  1e-6 into a zero interval, therefore disabling the timer instead of
12006  (re-)scheduling it.
12007
12008- bpo-30441: Fix bug when modifying os.environ while iterating over it
12009
12010- bpo-29585: Avoid importing ``sysconfig`` from ``site`` to improve startup
12011  speed. Python startup is about 5% faster on Linux and 30% faster on macOS.
12012
12013- bpo-29293: Add missing parameter "n" on
12014  multiprocessing.Condition.notify(). The doc claims
12015  multiprocessing.Condition behaves like threading.Condition, but its
12016  notify() method lacked the optional "n" argument (to specify the number of
12017  sleepers to wake up) that threading.Condition.notify() accepts.
12018
12019- bpo-30532: Fix email header value parser dropping folding white space in
12020  certain cases.
12021
12022- bpo-30596: Add a ``close()`` method to ``multiprocessing.Process``.
12023
12024- bpo-9146: Fix a segmentation fault in _hashopenssl when standard hash
12025  functions such as md5 are not available in the linked OpenSSL library.  As
12026  in some special FIPS-140 build environments.
12027
12028- bpo-29169: Update zlib to 1.2.11.
12029
12030- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that
12031  contains CR or LF. Patch by Dong-hee Na.
12032
12033- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called
12034  with bytes-like argument.
12035
12036- bpo-30746: Prohibited the '=' character in environment variable names in
12037  ``os.putenv()`` and ``os.spawn*()``.
12038
12039- bpo-30664: The description of a unittest subtest now preserves the order
12040  of keyword arguments of TestCase.subTest().
12041
12042- bpo-21071: struct.Struct.format type is now :class:`str` instead of
12043  :class:`bytes`.
12044
12045- bpo-29212: Fix concurrent.futures.thread.ThreadPoolExecutor threads to
12046  have a non repr() based thread name by default when no thread_name_prefix
12047  is supplied. They will now identify themselves as
12048  "ThreadPoolExecutor-y_n".
12049
12050- bpo-29755: Fixed the lgettext() family of functions in the gettext module.
12051  They now always return bytes.
12052
12053- bpo-30616: Functional API of enum allows to create empty enums. Patched by
12054  Dong-hee Na
12055
12056- bpo-30038: Fix race condition between signal delivery and wakeup file
12057  descriptor. Patch by Nathaniel Smith.
12058
12059- bpo-23894: lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings.
12060
12061- bpo-24744: pkgutil.walk_packages function now raises ValueError if *path*
12062  is a string. Patch by Sanyam Khurana.
12063
12064- bpo-24484: Avoid race condition in multiprocessing cleanup.
12065
12066- bpo-30589: Fix multiprocessing.Process.exitcode to return the opposite of
12067  the signal number when the process is killed by a signal (instead of 255)
12068  when using the "forkserver" method.
12069
12070- bpo-28994: The traceback no longer displayed for SystemExit raised in a
12071  callback registered by atexit.
12072
12073- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was
12074  called.
12075
12076- bpo-30645: Fix path calculation in `imp.load_package()`, fixing it for
12077  cases when a package is only shipped with bytecodes. Patch by Alexandru
12078  Ardelean.
12079
12080- bpo-11822: The dis.dis() function now is able to disassemble nested code
12081  objects.
12082
12083- bpo-30624: selectors does not take KeyboardInterrupt and SystemExit into
12084  account, leaving a fd in a bad state in case of error. Patch by Giampaolo
12085  Rodola'.
12086
12087- bpo-30595: multiprocessing.Queue.get() with a timeout now polls its reader
12088  in non-blocking mode if it succeeded to acquire the lock but the acquire
12089  took longer than the timeout.
12090
12091- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add
12092  support for ContextManager on all versions. Original PRs by Jelle Zijlstra
12093  and Ivan Levkivskyi
12094
12095- bpo-30605: re.compile() no longer raises a BytesWarning when compiling a
12096  bytes instance with misplaced inline modifier.  Patch by Roy Williams.
12097
12098- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl
12099  implementation. Patch by Michaël Sghaïer.
12100
12101- bpo-29743: Closing transport during handshake process leaks open socket.
12102  Patch by Nikolay Kim
12103
12104- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu
12105  Sornay.
12106
12107- bpo-30014: modify() method of poll(), epoll() and devpoll() based classes
12108  of selectors module is around 10% faster.  Patch by Giampaolo Rodola'.
12109
12110- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore
12111  EINVAL on stdin.write() if the child process is still running but closed
12112  the pipe.
12113
12114- bpo-30463: Addded empty __slots__ to abc.ABC.  This allows subclassers to
12115  deny __dict__ and __weakref__ creation.  Patch by Aaron Hall.
12116
12117- bpo-30520: Loggers are now pickleable.
12118
12119- bpo-30557: faulthandler now correctly filters and displays exception codes
12120  on Windows
12121
12122- bpo-30526: Add TextIOWrapper.reconfigure() and a
12123  TextIOWrapper.write_through attribute.
12124
12125- bpo-30245: Fix possible overflow when organize struct.pack_into error
12126  message.  Patch by Yuan Liu.
12127
12128- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot
12129  handle IPv6 addresses.
12130
12131- bpo-16500: Allow registering at-fork handlers.
12132
12133- bpo-30470: Deprecate invalid ctypes call protection on Windows.  Patch by
12134  Mariatta Wijaya.
12135
12136- bpo-30414: multiprocessing.Queue._feed background running thread do not
12137  break from main loop on exception.
12138
12139- bpo-30003: Fix handling escape characters in HZ codec.  Based on patch by
12140  Ma Lin.
12141
12142- bpo-30149: inspect.signature() now supports callables with
12143  variable-argument parameters wrapped with partialmethod. Patch by Dong-hee
12144  Na.
12145
12146- bpo-30436: importlib.find_spec() raises ModuleNotFoundError instead of
12147  AttributeError if the specified parent module is not a package (i.e. lacks
12148  a __path__ attribute).
12149
12150- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn*
12151  and *forkserver* start methods.
12152
12153- bpo-30375: Warnings emitted when compile a regular expression now always
12154  point to the line in the user code.  Previously they could point into
12155  inners of the re module if emitted from inside of groups or conditionals.
12156
12157- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error
12158  (code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted.
12159  This error occurs sometimes on SSL connections.
12160
12161- bpo-29196: Removed previously deprecated in Python 2.4 classes Plist, Dict
12162  and _InternalDict in the plistlib module.  Dict values in the result of
12163  functions readPlist() and readPlistFromBytes() are now normal dicts.  You
12164  no longer can use attribute access to access items of these dictionaries.
12165
12166- bpo-9850: The :mod:`macpath` is now deprecated and will be removed in
12167  Python 3.8.
12168
12169- bpo-30299: Compiling regular expression in debug mode on CPython now
12170  displays the compiled bytecode in human readable form.
12171
12172- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running
12173  coroutine and the coroutine returned without any more ``await``.
12174
12175- bpo-30266: contextlib.AbstractContextManager now supports
12176  anti-registration by setting __enter__ = None or __exit__ = None,
12177  following the pattern introduced in bpo-25958. Patch by Jelle Zijlstra.
12178
12179- bpo-30340: Enhanced regular expressions optimization. This increased the
12180  performance of matching some patterns up to 25 times.
12181
12182- bpo-30298: Weaken the condition of deprecation warnings for inline
12183  modifiers. Now allowed several subsequential inline modifiers at the start
12184  of the pattern (e.g. ``'(?i)(?s)...'``).  In verbose mode whitespaces and
12185  comments now are allowed before and between inline modifiers (e.g. ``'(?x)
12186  (?i) (?s)...'``).
12187
12188- bpo-30285: Optimized case-insensitive matching and searching of regular
12189  expressions.
12190
12191- bpo-29990: Fix range checking in GB18030 decoder.  Original patch by Ma
12192  Lin.
12193
12194- bpo-29979: rewrite cgi.parse_multipart, reusing the FieldStorage class and
12195  making its results consistent with those of FieldStorage for
12196  multipart/form-data requests. Patch by Pierre Quentel.
12197
12198- bpo-30243: Removed the __init__ methods of _json's scanner and encoder.
12199  Misusing them could cause memory leaks or crashes.  Now scanner and
12200  encoder objects are completely initialized in the __new__ methods.
12201
12202- bpo-30215: Compiled regular expression objects with the re.LOCALE flag no
12203  longer depend on the locale at compile time.  Only the locale at matching
12204  time affects the result of matching.
12205
12206- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process
12207  when Ctrl-C is received.
12208
12209- bpo-30103: binascii.b2a_uu() and uu.encode() now support using ``'`'`` as
12210  zero instead of space.
12211
12212- bpo-28556: Various updates to typing module: add typing.NoReturn type, use
12213  WrapperDescriptorType, minor bug-fixes.  Original PRs by Jim
12214  Fasarakis-Hilliard and Ivan Levkivskyi.
12215
12216- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux.
12217
12218- bpo-30228: The seek() and tell() methods of io.FileIO now set the internal
12219  seekable attribute to avoid one syscall on open() (in buffered or text
12220  mode).
12221
12222- bpo-30190: unittest's assertAlmostEqual and assertNotAlmostEqual provide a
12223  better message in case of failure which includes the difference between
12224  left and right arguments.  (patch by Giampaolo Rodola')
12225
12226- bpo-30101: Add support for curses.A_ITALIC.
12227
12228- bpo-29822: inspect.isabstract() now works during __init_subclass__.  Patch
12229  by Nate Soares.
12230
12231- bpo-29960: Preserve generator state when _random.Random.setstate() raises
12232  an exception. Patch by Bryan Olson.
12233
12234- bpo-30070: Fixed leaks and crashes in errors handling in the parser
12235  module.
12236
12237- bpo-22352: Column widths in the output of dis.dis() are now adjusted for
12238  large line numbers and instruction offsets.
12239
12240- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when
12241  readline() or __next__() respectively return non-sizeable object. Fixed
12242  possible other errors caused by not checking results of PyObject_Size(),
12243  PySequence_Size(), or PyMapping_Size().
12244
12245- bpo-30218: Fix PathLike support for shutil.unpack_archive. Patch by Jelle
12246  Zijlstra.
12247
12248- bpo-10076: Compiled regular expression and match objects in the re module
12249  now support copy.copy() and copy.deepcopy() (they are considered atomic).
12250
12251- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint
12252  is present.
12253
12254- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True.
12255  Patch by Armin Rigo.
12256
12257- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in
12258  contextlib.contextmanager.  Patch by Siddharth Velankar.
12259
12260- bpo-26187: Test that sqlite3 trace callback is not called multiple times
12261  when schema is changing.  Indirectly fixed by switching to use
12262  sqlite3_prepare_v2() in bpo-9303.  Patch by Aviv Palivoda.
12263
12264- bpo-30017: Allowed calling the close() method of the zip entry writer
12265  object multiple times.  Writing to a closed writer now always produces a
12266  ValueError.
12267
12268- bpo-29998: Pickling and copying ImportError now preserves name and path
12269  attributes.
12270
12271- bpo-29995: re.escape() now escapes only regex special characters.
12272
12273- bpo-29962: Add math.remainder operation, implementing remainder as
12274  specified in IEEE 754.
12275
12276- bpo-29649: Improve struct.pack_into() exception messages for problems with
12277  the buffer size and offset.  Patch by Andrew Nester.
12278
12279- bpo-29654: Support If-Modified-Since HTTP header (browser cache).  Patch
12280  by Pierre Quentel.
12281
12282- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects.
12283  Patch by Sanjay Sundaresan.
12284
12285- bpo-29953: Fixed memory leaks in the replace() method of datetime and time
12286  objects when pass out of bound fold argument.
12287
12288- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering
12289  long runs of empty iterables.
12290
12291- bpo-10030: Sped up reading encrypted ZIP files by 2 times.
12292
12293- bpo-29204: Element.getiterator() and the html parameter of XMLParser()
12294  were deprecated only in the documentation (since Python 3.2 and 3.4
12295  correspondintly). Now using them emits a deprecation warning.
12296
12297- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions
12298  and wrong types.
12299
12300- bpo-25996: Added support of file descriptors in os.scandir() on Unix.
12301  os.fwalk() is sped up by 2 times by using os.scandir().
12302
12303- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an
12304  exception at the very first of an iterable may swallow the exception or
12305  make the program hang. Patch by Davin Potts and Xiang Zhang.
12306
12307- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a
12308  reference cycle to not keep objects alive longer than expected.
12309
12310- bpo-29901: The zipapp module now supports general path-like objects, not
12311  just pathlib.Path.
12312
12313- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when
12314  the OS gives priority to errors such as EACCES over EEXIST.
12315
12316- bpo-29861: Release references to tasks, their arguments and their results
12317  as soon as they are finished in multiprocessing.Pool.
12318
12319- bpo-19930: The mode argument of os.makedirs() no longer affects the file
12320  permission bits of newly-created intermediate-level directories.
12321
12322- bpo-29884: faulthandler: Restore the old sigaltstack during teardown.
12323  Patch by Christophe Zeitouny.
12324
12325- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects.
12326
12327- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords
12328  are not strings.  Patch by Michael Seifert.
12329
12330- bpo-8256: Fixed possible failing or crashing input() if attributes
12331  "encoding" or "errors" of sys.stdin or sys.stdout are not set or are not
12332  strings.
12333
12334- bpo-28692: Using non-integer value for selecting a plural form in gettext
12335  is now deprecated.
12336
12337- bpo-26121: Use C library implementation for math functions erf() and
12338  erfc().
12339
12340- bpo-29619: os.stat() and os.DirEntry.inode() now convert inode (st_ino)
12341  using unsigned integers.
12342
12343- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting
12344  big intables (objects that have __int__) as elements.
12345
12346- bpo-29645: Speed up importing the webbrowser module.
12347  webbrowser.register() is now thread-safe.
12348
12349- bpo-28231: The zipfile module now accepts path-like objects for external
12350  paths.
12351
12352- bpo-26915: index() and count() methods of collections.abc.Sequence now
12353  check identity before checking equality when do comparisons.
12354
12355- bpo-28682: Added support for bytes paths in os.fwalk().
12356
12357- bpo-29728: Add new :data:`socket.TCP_NOTSENT_LOWAT` (Linux 3.12) constant.
12358  Patch by Nathaniel J. Smith.
12359
12360- bpo-29623: Allow use of path-like object as a single argument in
12361  ConfigParser.read(). Patch by David Ellis.
12362
12363- bpo-9303: Migrate sqlite3 module to _v2 API.  Patch by Aviv Palivoda.
12364
12365- bpo-28963: Fix out of bound iteration in
12366  asyncio.Future.remove_done_callback implemented in C.
12367
12368- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes
12369  before all pipes are closed.
12370
12371- bpo-29271: Fix Task.current_task and Task.all_tasks implemented in C to
12372  accept None argument as their pure Python implementation.
12373
12374- bpo-29703: Fix asyncio to support instantiation of new event loops in
12375  child processes.
12376
12377- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other
12378  exception) to exception(s) raised in the dispatched methods. Patch by Petr
12379  Motejlek.
12380
12381- bpo-7769: Method register_function() of
12382  xmlrpc.server.SimpleXMLRPCDispatcher and its subclasses can now be used as
12383  a decorator.
12384
12385- bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
12386
12387- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts
12388  PathLike objects.  Patch by Sayan Chowdhury.
12389
12390- bpo-28518: Start a transaction implicitly before a DML statement. Patch by
12391  Aviv Palivoda.
12392
12393- bpo-29742: get_extra_info() raises exception if get called on closed ssl
12394  transport. Patch by Nikolay Kim.
12395
12396- bpo-16285: urllib.parse.quote is now based on RFC 3986 and hence includes
12397  '~' in the set of characters that is not quoted by default. Patch by
12398  Christian Theune and Ratnadeep Debnath.
12399
12400- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no
12401  longer affects a partial object after creation.
12402
12403- bpo-29110: Fix file object leak in aifc.open() when file is given as a
12404  filesystem path and is not in valid AIFF format. Patch by Anthony Zhang.
12405
12406- bpo-22807: Add uuid.SafeUUID and uuid.UUID.is_safe to relay information
12407  from the platform about whether generated UUIDs are generated with a
12408  multiprocessing safe method.
12409
12410- bpo-29576: Improve some deprecations in importlib. Some deprecated methods
12411  now emit DeprecationWarnings and have better descriptive messages.
12412
12413- bpo-29534: Fixed different behaviour of Decimal.from_float() for _decimal
12414  and _pydecimal. Thanks Andrew Nester.
12415
12416- bpo-10379: locale.format_string now supports the 'monetary' keyword
12417  argument, and locale.format is deprecated.
12418
12419- bpo-29851: importlib.reload() now raises ModuleNotFoundError if the module
12420  lacks a spec.
12421
12422- bpo-28556: Various updates to typing module: typing.Counter,
12423  typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle
12424  Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa.
12425
12426- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python
12427  3.6.0: check minimum and maximum years.
12428
12429- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir
12430
12431- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the
12432  match object. Based on patch by WGH.
12433
12434- bpo-29377: Add WrapperDescriptorType, MethodWrapperType, and
12435  MethodDescriptorType built-in types to types module. Original patch by
12436  Manuel Krebber.
12437
12438- bpo-29218: Unused install_misc command is now removed.  It has been
12439  documented as unused since 2000.  Patch by Eric N. Vander Weele.
12440
12441- bpo-29368: The extend() method is now called instead of the append()
12442  method when unpickle collections.deque and other list-like objects. This
12443  can speed up unpickling to 2 times.
12444
12445- bpo-29338: The help of a builtin or extension class now includes the
12446  constructor signature if __text_signature__ is provided for the class.
12447
12448- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited
12449  to a stopped instead of terminated state (ex: when under ptrace).
12450
12451- bpo-29290: Fix a regression in argparse that help messages would wrap at
12452  non-breaking spaces.
12453
12454- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY.
12455
12456- bpo-29197: Removed deprecated function ntpath.splitunc().
12457
12458- bpo-29210: Removed support of deprecated argument "exclude" in
12459  tarfile.TarFile.add().
12460
12461- bpo-29219: Fixed infinite recursion in the repr of uninitialized
12462  ctypes.CDLL instances.
12463
12464- bpo-29192: Removed deprecated features in the http.cookies module.
12465
12466- bpo-29193: A format string argument for string.Formatter.format() is now
12467  positional-only.
12468
12469- bpo-29195: Removed support of deprecated undocumented keyword arguments in
12470  methods of regular expression objects.
12471
12472- bpo-28969: Fixed race condition in C implementation of
12473  functools.lru_cache. KeyError could be raised when cached function with
12474  full cache was simultaneously called from different threads with the same
12475  uncached arguments.
12476
12477- bpo-20804: The unittest.mock.sentinel attributes now preserve their
12478  identity when they are copied or pickled.
12479
12480- bpo-29142: In urllib.request, suffixes in no_proxy environment variable
12481  with leading dots could match related hostnames again (e.g. .b.c matches
12482  a.b.c). Patch by Milan Oberkirch.
12483
12484- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter
12485  anymore. Patch written by Jiajun Huang.
12486
12487- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a
12488  context. Patch by Sam Breese.
12489
12490- bpo-28985: Update authorizer constants in sqlite3 module. Patch by
12491  Dingyuan Wang.
12492
12493- bpo-29079: Prevent infinite loop in pathlib.resolve() on Windows
12494
12495- bpo-13051: Fixed recursion errors in large or resized
12496  curses.textpad.Textbox.  Based on patch by Tycho Andersen.
12497
12498- bpo-9770: curses.ascii predicates now work correctly with negative
12499  integers.
12500
12501- bpo-28427: old keys should not remove new values from WeakValueDictionary
12502  when collecting from another thread.
12503
12504- bpo-28923: Remove editor artifacts from Tix.py.
12505
12506- bpo-28871: Fixed a crash when deallocate deep ElementTree.
12507
12508- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and
12509  WeakValueDictionary.pop() when a GC collection happens in another thread.
12510
12511- bpo-20191: Fixed a crash in resource.prlimit() when passing a sequence
12512  that doesn't own its elements as limits.
12513
12514- bpo-16255: subprocess.Popen uses /system/bin/sh on Android as the shell,
12515  instead of /bin/sh.
12516
12517- bpo-28779: multiprocessing.set_forkserver_preload() would crash the
12518  forkserver process if a preloaded module instantiated some multiprocessing
12519  objects such as locks.
12520
12521- bpo-26937: The chown() method of the tarfile.TarFile class does not fail
12522  now when the grp module cannot be imported, as for example on Android
12523  platforms.
12524
12525- bpo-28847: dbm.dumb now supports reading read-only files and no longer
12526  writes the index file when it is not changed.  A deprecation warning is
12527  now emitted if the index file is missed and recreated in the 'r' and 'w'
12528  modes (will be an error in future Python releases).
12529
12530- bpo-27030: Unknown escapes consisting of ``'\'`` and an ASCII letter in
12531  re.sub() replacement templates regular expressions now are errors.
12532
12533- bpo-28835: Fix a regression introduced in warnings.catch_warnings(): call
12534  warnings.showwarning() if it was overridden inside the context manager.
12535
12536- bpo-27172: To assist with upgrades from 2.7, the previously documented
12537  deprecation of ``inspect.getfullargspec()`` has been reversed. This
12538  decision may be revisited again after the Python 2.7 branch is no longer
12539  officially supported.
12540
12541- bpo-28740: Add sys.getandroidapilevel(): return the build time API version
12542  of Android as an integer. Function only available on Android.
12543
12544- bpo-26273: Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and
12545  :data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by
12546  Omar Sandoval.
12547
12548- bpo-28752: Restored the __reduce__() methods of datetime objects.
12549
12550- bpo-28727: Regular expression patterns, _sre.SRE_Pattern objects created
12551  by re.compile(), become comparable (only x==y and x!=y operators). This
12552  change should fix the issue #18383: don't duplicate warning filters when
12553  the warnings module is reloaded (thing usually only done in unit tests).
12554
12555- bpo-20572: Remove the subprocess.Popen.wait endtime parameter.  It was
12556  deprecated in 3.4 and undocumented prior to that.
12557
12558- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and
12559  from_buffer_copy() methods on abstract classes like Array.
12560
12561- bpo-28548: In the "http.server" module, parse the protocol version if
12562  possible, to avoid using HTTP 0.9 in some error responses.
12563
12564- bpo-19717: Makes Path.resolve() succeed on paths that do not exist. Patch
12565  by Vajrasky Kok
12566
12567- bpo-28563: Fixed possible DoS and arbitrary code execution when handle
12568  plural form selections in the gettext module.  The expression parser now
12569  supports exact syntax supported by GNU gettext.
12570
12571- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the
12572  garbage collector is invoked in other thread.  Based on patch by Sebastian
12573  Cufre.
12574
12575- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if
12576  given empty data twice.  Patch by Benjamin Fogle.
12577
12578- bpo-28549: Fixed segfault in curses's addch() with ncurses6.
12579
12580- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar
12581  file with compression before trying to open it without compression.
12582  Otherwise it had 50% chance failed with ignore_zeros=True.
12583
12584- bpo-23262: The webbrowser module now supports Firefox 36+ and derived
12585  browsers.  Based on patch by Oleg Broytman.
12586
12587- bpo-24241: The webbrowser in an X environment now prefers using the
12588  default browser directly. Also, the webbrowser register() function now has
12589  a documented 'preferred' argument, to specify browsers to be returned by
12590  get() with no arguments. Patch by David Steele
12591
12592- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
12593  by representing the scale as float value internally in Tk.  tkinter.IntVar
12594  now works if float value is set to underlying Tk variable.
12595
12596- bpo-28255: calendar.TextCalendar.prweek() no longer prints a space after a
12597  weeks's calendar.  calendar.TextCalendar.pryear() no longer prints
12598  redundant newline after a year's calendar.  Based on patch by Xiang Zhang.
12599
12600- bpo-28255: calendar.TextCalendar.prmonth() no longer prints a space at the
12601  start of new line after printing a month's calendar.  Patch by Xiang
12602  Zhang.
12603
12604- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces.
12605  Based on patch by Kaarle Ritvanen.
12606
12607- bpo-28353: os.fwalk() no longer fails on broken links.
12608
12609- bpo-28430: Fix iterator of C implemented asyncio.Future doesn't accept
12610  non-None value is passed to it.send(val).
12611
12612- bpo-27025: Generated names for Tkinter widgets now start by the "!" prefix
12613  for readability.
12614
12615- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a
12616  workaround to Tix library bug.
12617
12618- bpo-28488: shutil.make_archive() no longer adds entry "./" to ZIP archive.
12619
12620- bpo-25953: re.sub() now raises an error for invalid numerical group
12621  reference in replacement template even if the pattern is not found in the
12622  string.  Error message for invalid group reference now includes the group
12623  index and the position of the reference. Based on patch by SilentGhost.
12624
12625- bpo-28469: timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead of
12626  1, 10, 100,... for autoranging.
12627
12628- bpo-28115: Command-line interface of the zipfile module now uses argparse.
12629  Added support of long options.
12630
12631- bpo-18219: Optimize csv.DictWriter for large number of columns. Patch by
12632  Mariatta Wijaya.
12633
12634- bpo-28448: Fix C implemented asyncio.Future didn't work on Windows.
12635
12636- bpo-23214: In the "io" module, the argument to BufferedReader and
12637  BytesIO's read1() methods is now optional and can be -1, matching the
12638  BufferedIOBase specification.
12639
12640- bpo-28480: Fix error building socket module when multithreading is
12641  disabled.
12642
12643- bpo-28240: timeit: remove ``-c/--clock`` and ``-t/--time`` command line
12644  options which were deprecated since Python 3.3.
12645
12646- bpo-28240: timeit now repeats the benchmarks 5 times instead of only 3 to
12647  make benchmarks more reliable.
12648
12649- bpo-28240: timeit autorange now uses a single loop iteration if the
12650  benchmark takes less than 10 seconds, instead of 10 iterations. "python3
12651  -m timeit -s 'import time' 'time.sleep(1)'" now takes 4 seconds instead of
12652  40 seconds.
12653
12654- Distutils.sdist now looks for README and setup.py files with case
12655  sensitivity. This behavior matches that found in Setuptools 6.0 and later.
12656  See `setuptools 100 <https://github.com/pypa/setuptools/issues/100>`_ for
12657  rationale.
12658
12659- bpo-24452: Make webbrowser support Chrome on Mac OS X. Patch by Ned
12660  Batchelder.
12661
12662- bpo-20766: Fix references leaked by pdb in the handling of SIGINT
12663  handlers.
12664
12665- bpo-27998: Fixed bytes path support in os.scandir() on Windows. Patch by
12666  Eryk Sun.
12667
12668- bpo-28317: The disassembler now decodes FORMAT_VALUE argument.
12669
12670- bpo-28380: unittest.mock Mock autospec functions now properly support
12671  assert_called, assert_not_called, and assert_called_once.
12672
12673- bpo-28229: lzma module now supports pathlib.
12674
12675- bpo-28321: Fixed writing non-BMP characters with binary format in
12676  plistlib.
12677
12678- bpo-28225: bz2 module now supports pathlib.  Initial patch by Ethan
12679  Furman.
12680
12681- bpo-28227: gzip now supports pathlib.  Patch by Ethan Furman.
12682
12683- bpo-28332: Deprecated silent truncations in socket.htons and socket.ntohs.
12684  Original patch by Oren Milman.
12685
12686- bpo-27358: Optimized merging var-keyword arguments and improved error
12687  message when passing a non-mapping as a var-keyword argument.
12688
12689- bpo-28257: Improved error message when passing a non-iterable as a
12690  var-positional argument.  Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
12691
12692- bpo-28322: Fixed possible crashes when unpickle itertools objects from
12693  incorrect pickle data.  Based on patch by John Leitch.
12694
12695- bpo-28228: imghdr now supports pathlib.
12696
12697- bpo-28226: compileall now supports pathlib.
12698
12699- bpo-28314: Fix function declaration (C flags) for the getiterator() method
12700  of xml.etree.ElementTree.Element.
12701
12702- bpo-28148: Stop using localtime() and gmtime() in the time module.
12703  Introduced platform independent _PyTime_localtime API that is similar to
12704  POSIX localtime_r, but available on all platforms.  Patch by Ed Schouten.
12705
12706- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and
12707  9999-12. Methods itermonthdays() and itermonthdays2() are reimplemented so
12708  that they don't call itermonthdates() which can cause datetime.date
12709  under/overflow.
12710
12711- bpo-28275: Fixed possible use after free in the decompress() methods of
12712  the LZMADecompressor and BZ2Decompressor classes. Original patch by John
12713  Leitch.
12714
12715- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation()
12716  if pass invalid string-like object as a name.  Patch by Xiang Zhang.
12717
12718- bpo-18844: random.choices() now has k as a keyword-only argument to
12719  improve the readability of common cases and come into line with the
12720  signature used in other languages.
12721
12722- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py.
12723  Patch by Madison May.
12724
12725- bpo-27611: Fixed support of default root window in the tkinter.tix module.
12726  Added the master parameter in the DisplayStyle constructor.
12727
12728- bpo-27348: In the traceback module, restore the formatting of exception
12729  messages like "Exception: None".  This fixes a regression introduced in
12730  3.5a2.
12731
12732- bpo-25651: Allow falsy values to be used for msg parameter of subTest().
12733
12734- bpo-27778: Fix a memory leak in os.getrandom() when the getrandom() is
12735  interrupted by a signal and a signal handler raises a Python exception.
12736
12737- bpo-28200: Fix memory leak on Windows in the os module (fix
12738  path_converter() function).
12739
12740- bpo-25400: RobotFileParser now correctly returns default values for
12741  crawl_delay and request_rate.  Initial patch by Peter Wirtz.
12742
12743- bpo-27932: Prevent memory leak in win32_ver().
12744
12745- Fix UnboundLocalError in socket._sendfile_use_sendfile.
12746
12747- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of
12748  os.stat().  Patch by Eryk Sun.
12749
12750- bpo-22493: Warning message emitted by using inline flags in the middle of
12751  regular expression now contains a (truncated) regex pattern. Patch by Tim
12752  Graham.
12753
12754- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an
12755  empty bytestring is passed.
12756
12757- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam.
12758
12759- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by
12760  Gergely Imreh and Markus Holtermann.
12761
12762- bpo-28114: Fix a crash in parse_envlist() when env contains byte strings.
12763  Patch by Eryk Sun.
12764
12765- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and
12766  binascii.a2b_qp().
12767
12768- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by
12769  Kevin Conway.
12770
12771- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by
12772  Seth Michael Larson.
12773
12774- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by
12775  iceboy.
12776
12777- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki.
12778
12779- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect.
12780
12781- bpo-27759: Fix selectors incorrectly retain invalid file descriptors.
12782  Patch by Mark Williams.
12783
12784- bpo-28325: Remove vestigial MacOS 9 macurl2path module and its tests.
12785
12786- bpo-28368: Refuse monitoring processes if the child watcher has no loop
12787  attached. Patch by Vincent Michel.
12788
12789- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader,
12790  add_writer, etc.
12791
12792- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг
12793  Марк.
12794
12795- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor.
12796
12797- bpo-28372: Fix asyncio to support formatting of non-python coroutines.
12798
12799- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг
12800  Марк.
12801
12802- bpo-27972: Prohibit Tasks to await on themselves.
12803
12804- bpo-24142: Reading a corrupt config file left configparser in an invalid
12805  state. Original patch by Florian Höch.
12806
12807- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract
12808  base classes to use keyword parameters in __init_subclass__. Patch by Nate
12809  Soares.
12810
12811- bpo-25532: inspect.unwrap() will now only try to unwrap an object
12812  sys.getrecursionlimit() times, to protect against objects which create a
12813  new object on every attribute access.
12814
12815- bpo-30177: path.resolve(strict=False) no longer cuts the path after the
12816  first element not present in the filesystem.  Patch by Antoine Pietri.
12817
12818Documentation
12819-------------
12820
12821- bpo-31294: Fix incomplete code snippet in the ZeroMQSocketListener and
12822  ZeroMQSocketHandler examples and adapt them to Python 3.
12823
12824- bpo-21649: Add RFC 7525 and Mozilla server side TLS links to SSL
12825  documentation.
12826
12827- bpo-31128: Allow the pydoc server to bind to arbitrary hostnames.
12828
12829- bpo-30803: Clarify doc on truth value testing. Original patch by Peter
12830  Thomassen.
12831
12832- bpo-30176: Add missing attribute related constants in curses
12833  documentation.
12834
12835- bpo-30052: the link targets for :func:`bytes` and :func:`bytearray` are
12836  now their respective type definitions, rather than the corresponding
12837  builtin function entries. Use :ref:`bytes <func-bytes>` and
12838  :ref:`bytearray <func-bytearray>` to reference the latter. In order to
12839  ensure this and future cross-reference updates are applied automatically,
12840  the daily documentation builds now disable the default output caching
12841  features in Sphinx.
12842
12843- bpo-26985: Add missing info of code object in inspect documentation.
12844
12845- bpo-19824: Improve the documentation for, and links to, template strings
12846  by emphasizing their utility for internationalization, and by clarifying
12847  some usage constraints. (See also: bpo-20314, bpo-12518)
12848
12849- bpo-28929: Link the documentation to its source file on GitHub.
12850
12851- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer
12852  to aiosmtpd, a third-party asyncio-based replacement.
12853
12854- bpo-26355: Add canonical header link on each page to corresponding major
12855  version of the documentation. Patch by Matthias Bussonnier.
12856
12857- bpo-29349: Fix Python 2 syntax in code for building the documentation.
12858
12859- bpo-23722: The data model reference and the porting section in the 3.6
12860  What's New guide now cover the additional ``__classcell__`` handling
12861  needed for custom metaclasses to fully support :pep:`487` and
12862  zero-argument ``super()``.
12863
12864- bpo-28513: Documented command-line interface of zipfile.
12865
12866Tests
12867-----
12868
12869- bpo-29639: test.support.HOST is now "localhost", a new HOSTv4 constant has
12870  been added for your ``127.0.0.1`` needs, similar to the existing HOSTv6
12871  constant.
12872
12873- bpo-31320: Silence traceback in test_ssl
12874
12875- bpo-31346: Prefer PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER protocols
12876  for SSLContext.
12877
12878- bpo-25674: Remove sha256.tbs-internet.com ssl test
12879
12880- bpo-30715: Address ALPN callback changes for OpenSSL 1.1.0f. The latest
12881  version behaves like OpenSSL 1.0.2 and no longer aborts handshake.
12882
12883- bpo-30822: regrtest: Exclude tzdata from regrtest --all. When running the
12884  test suite using --use=all / -u all, exclude tzdata since it makes
12885  test_datetime too slow (15-20 min on some buildbots) which then times out
12886  on some buildbots. Fix also regrtest command line parser to allow passing
12887  -u extralargefile to run test_zipfile64.
12888
12889- bpo-30695: Add the `set_nomemory(start, stop)` and `remove_mem_hooks()`
12890  functions to the _testcapi module.
12891
12892- bpo-30357: test_thread: setUp() now uses support.threading_setup() and
12893  support.threading_cleanup() to wait until threads complete to avoid random
12894  side effects on following tests. Initial patch written by Grzegorz
12895  Grzywacz.
12896
12897- bpo-30197: Enhanced functions swap_attr() and swap_item() in the
12898  test.support module. They now work when delete replaced attribute or item
12899  inside the with statement.  The old value of the attribute or item (or
12900  None if it doesn't exist) now will be assigned to the target of the "as"
12901  clause, if there is one.
12902
12903- bpo-24932: Use proper command line parsing in _testembed
12904
12905- bpo-28950: Disallow -j0 to be combined with -T/-l in regrtest command line
12906  arguments.
12907
12908- bpo-28683: Fix the tests that bind() a unix socket and raise
12909  PermissionError on Android for a non-root user.
12910
12911- bpo-26936: Fix the test_socket failures on Android - getservbyname(),
12912  getservbyport() and getaddrinfo() are broken on some Android API levels.
12913
12914- bpo-28666: Now test.support.rmtree is able to remove unwritable or
12915  unreadable directories.
12916
12917- bpo-23839: Various caches now are cleared before running every test file.
12918
12919- bpo-26944: Fix test_posix for Android where 'id -G' is entirely wrong or
12920  missing the effective gid.
12921
12922- bpo-28409: regrtest: fix the parser of command line arguments.
12923
12924- bpo-28217: Adds _testconsole module to test console input.
12925
12926- bpo-26939: Add the support.setswitchinterval() function to fix
12927  test_functools hanging on the Android armv7 qemu emulator.
12928
12929Build
12930-----
12931
12932- bpo-31354: Allow --with-lto to be used on all builds, not just `make
12933  profile-opt`.
12934
12935- bpo-31370: Remove support for building --without-threads. This option is
12936  not really useful anymore in the 21st century. Removing lots of
12937  conditional paths allows us to simplify the code base, including in
12938  difficult to maintain low-level internal code.
12939
12940- bpo-31341: Per :pep:`11`, support for the IRIX operating system was
12941  removed.
12942
12943- bpo-30854: Fix compile error when compiling --without-threads. Patch by
12944  Masayuki Yamamoto.
12945
12946- bpo-30687: Locate msbuild.exe on Windows when building rather than
12947  vcvarsall.bat
12948
12949- bpo-20210: Support the *disabled* marker in Setup files. Extension modules
12950  listed after this marker are not built at all, neither by the Makefile nor
12951  by setup.py.
12952
12953- bpo-29941: Add ``--with-assertions`` configure flag to explicitly enable C
12954  ``assert()`` checks. Defaults to off. ``--with-pydebug`` implies
12955  ``--with-assertions``.
12956
12957- bpo-28787: Fix out-of-tree builds of Python when configured with
12958  ``--with--dtrace``.
12959
12960- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``,
12961  ``make install`` and some other make targets when configured with
12962  ``--enable-optimizations``.
12963
12964- bpo-23404: Don't regenerate generated files based on file modification
12965  time anymore: the action is now explicit. Replace ``make touch`` with
12966  ``make regen-all``.
12967
12968- bpo-29643: Fix ``--enable-optimization`` didn't work.
12969
12970- bpo-27593: sys.version and the platform module python_build(),
12971  python_branch(), and python_revision() functions now use git information
12972  rather than hg when building from a repo.
12973
12974- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k.
12975
12976- bpo-27659: Prohibit implicit C function declarations: use
12977  ``-Werror=implicit-function-declaration`` when possible (GCC and Clang,
12978  but it depends on the compiler version). Patch written by Chi Hsuan Yen.
12979
12980- bpo-29384: Remove old Be OS helper scripts.
12981
12982- bpo-26851: Set Android compilation and link flags.
12983
12984- bpo-28768: Fix implicit declaration of function _setmode. Patch by
12985  Masayuki Yamamoto
12986
12987- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat
12988
12989- bpo-23903: Added missed names to PC/python3.def.
12990
12991- bpo-28762: lockf() is available on Android API level 24, but the F_LOCK
12992  macro is not defined in android-ndk-r13.
12993
12994- bpo-28538: Fix the compilation error that occurs because if_nameindex() is
12995  available on Android API level 24, but the if_nameindex structure is not
12996  defined.
12997
12998- bpo-20211: Do not add the directory for installing C header files and the
12999  directory for installing object code libraries to the cross compilation
13000  search paths. Original patch by Thomas Petazzoni.
13001
13002- bpo-28849: Do not define sys.implementation._multiarch on Android.
13003
13004- bpo-10656: Fix out-of-tree building on AIX.  Patch by Tristan Carel and
13005  Michael Haubenwallner.
13006
13007- bpo-26359: Rename --with-optimiations to --enable-optimizations.
13008
13009- bpo-28444: Fix missing extensions modules when cross compiling.
13010
13011- bpo-28208: Update Windows build and OS X installers to use SQLite 3.14.2.
13012
13013- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j.
13014
13015- bpo-21124: Fix building the _struct module on Cygwin by passing ``NULL``
13016  instead of ``&PyType_Type`` to PyVarObject_HEAD_INIT.  Patch by Masayuki
13017  Yamamoto.
13018
13019- bpo-13756: Fix building extensions modules on Cygwin.  Patch by Roumen
13020  Petrov, based on original patch by Jason Tishler.
13021
13022- bpo-21085: Add configure check for siginfo_t.si_band, which Cygwin does
13023  not provide. Patch by Masayuki Yamamoto with review and rebase by Erik
13024  Bray.
13025
13026- bpo-28258: Fixed build with Estonian locale (python-config and distclean
13027  targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.
13028
13029- bpo-26661: setup.py now detects system libffi with multiarch wrapper.
13030
13031- bpo-27979: A full copy of libffi is no longer bundled for use when
13032  building _ctypes on non-OSX UNIX platforms.  An installed copy of libffi
13033  is now required when building _ctypes on such platforms.
13034
13035- bpo-15819: Remove redundant include search directory option for building
13036  outside the source tree.
13037
13038- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS.
13039  Patch by Gareth Rees.
13040
13041Windows
13042-------
13043
13044- bpo-31392: Update Windows build to use OpenSSL 1.1.0f
13045
13046- bpo-30389: Adds detection of Visual Studio 2017 to distutils on Windows.
13047
13048- bpo-31358: zlib is no longer bundled in the CPython source, instead it is
13049  downloaded on demand just like bz2, lzma, OpenSSL, Tcl/Tk, and SQLite.
13050
13051- bpo-31340: Change to building with MSVC v141 (included with Visual Studio
13052  2017)
13053
13054- bpo-30581: os.cpu_count() now returns the correct number of processors on
13055  Windows when the number of logical processors is greater than 64.
13056
13057- bpo-30916: Pre-build OpenSSL, Tcl and Tk and include the binaries in the
13058  build.
13059
13060- bpo-30731: Add a missing xmlns to python.manifest so that it matches the
13061  schema.
13062
13063- bpo-30291: Allow requiring 64-bit interpreters from py.exe using -64
13064  suffix. Contributed by Steve (Gadget) Barnes.
13065
13066- bpo-30362: Adds list options (-0, -0p) to py.exe launcher. Contributed by
13067  Steve Barnes.
13068
13069- bpo-23451: Fix socket deprecation warnings in socketmodule.c. Patch by
13070  Segev Finer.
13071
13072- bpo-30450: The build process on Windows no longer depends on Subversion,
13073  instead pulling external code from GitHub via a Python script.  If Python
13074  3.6 is not found on the system (via ``py -3.6``), NuGet is used to
13075  download a copy of 32-bit Python.
13076
13077- bpo-29579: Removes readme.txt from the installer.
13078
13079- bpo-25778: winreg does not truncate string correctly (Patch by Eryk Sun)
13080
13081- bpo-28896: Deprecate WindowsRegistryFinder and disable it by default
13082
13083- bpo-28522: Fixes mishandled buffer reallocation in getpathp.c
13084
13085- bpo-28402: Adds signed catalog files for stdlib on Windows.
13086
13087- bpo-28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk
13088  Sun)
13089
13090- bpo-28251: Improvements to help manuals on Windows.
13091
13092- bpo-28110: launcher.msi has different product codes between 32-bit and
13093  64-bit
13094
13095- bpo-28161: Opening CON for write access fails
13096
13097- bpo-28162: WindowsConsoleIO readall() fails if first line starts with
13098  Ctrl+Z
13099
13100- bpo-28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle
13101
13102- bpo-28164: _PyIO_get_console_type fails for various paths
13103
13104- bpo-28137: Renames Windows path file to ._pth
13105
13106- bpo-28138: Windows ._pth file should allow import site
13107
13108IDLE
13109----
13110
13111- bpo-31493: IDLE code context -- fix code update and font update timers.
13112  Canceling timers prevents a warning message when test_idle completes.
13113
13114- bpo-31488: IDLE - Update non-key options in former extension classes. When
13115  applying configdialog changes, call .reload for each feature class. Change
13116  ParenMatch so updated options affect existing instances attached to
13117  existing editor windows.
13118
13119- bpo-31477: IDLE - Improve rstrip entry in doc. Strip trailing whitespace
13120  strips more than blank spaces.  Multiline string literals are not skipped.
13121
13122- bpo-31480: IDLE - make tests pass with zzdummy extension disabled by
13123  default.
13124
13125- bpo-31421: Document how IDLE runs tkinter programs. IDLE calls tcl/tk
13126  update in the background in order to make live interaction and
13127  experimentation with tkinter applications much easier.
13128
13129- bpo-31414: IDLE -- fix tk entry box tests by deleting first. Adding to an
13130  int entry is not the same as deleting and inserting because int('') will
13131  fail.
13132
13133- bpo-31051: Rearrange IDLE configdialog GenPage into Window, Editor, and
13134  Help sections.
13135
13136- bpo-30617: IDLE - Add docstrings and tests for outwin subclass of editor.
13137  Move some data and functions from the class to module level. Patch by
13138  Cheryl Sabella.
13139
13140- bpo-31287: IDLE - Do not modify tkinter.message in test_configdialog.
13141
13142- bpo-27099: Convert IDLE's built-in 'extensions' to regular features. About
13143  10 IDLE features were implemented as supposedly optional extensions. Their
13144  different behavior could be confusing or worse for users and not good for
13145  maintenance. Hence the conversion. The main difference for users is that
13146  user configurable key bindings for builtin features are now handled
13147  uniformly. Now, editing a binding in a keyset only affects its value in
13148  the keyset. All bindings are defined together in the system-specific
13149  default keysets in config-extensions.def. All custom keysets are saved as
13150  a whole in config-extension.cfg.  All take effect as soon as one clicks
13151  Apply or Ok. The affected events are '<<force-open-completions>>',
13152  '<<expand-word>>', '<<force-open-calltip>>', '<<flash-paren>>',
13153  '<<format-paragraph>>', '<<run-module>>', '<<check-module>>', and
13154  '<<zoom-height>>'.  Any (global) customizations made before 3.6.3 will not
13155  affect their keyset-specific customization after 3.6.3. and vice versa.
13156  Initial patch by Charles Wohlganger.
13157
13158- bpo-31206: IDLE: Factor HighPage(Frame) class from ConfigDialog. Patch by
13159  Cheryl Sabella.
13160
13161- bpo-31001: Add tests for configdialog highlight tab.  Patch by Cheryl
13162  Sabella.
13163
13164- bpo-31205: IDLE: Factor KeysPage(Frame) class from ConfigDialog.  The
13165  slightly modified tests continue to pass.  Patch by Cheryl Sabella.
13166
13167- bpo-31130: IDLE -- stop leaks in test_configdialog. Initial patch by
13168  Victor Stinner.
13169
13170- bpo-31002: Add tests for configdialog keys tab. Patch by Cheryl Sabella.
13171
13172- bpo-19903: IDLE: Calltips use `inspect.signature` instead of
13173  `inspect.getfullargspec`. This improves calltips for builtins converted to
13174  use Argument Clinic. Patch by Louie Lu.
13175
13176- bpo-31083: IDLE - Add an outline of a TabPage class in configdialog.
13177  Update existing classes to match outline. Initial patch by Cheryl Sabella.
13178
13179- bpo-31050: Factor GenPage(Frame) class from ConfigDialog. The slightly
13180  modified tests continue to pass. Patch by Cheryl Sabella.
13181
13182- bpo-31004: IDLE - Factor FontPage(Frame) class from ConfigDialog. Slightly
13183  modified tests continue to pass. Fix General tests. Patch mostly by Cheryl
13184  Sabella.
13185
13186- bpo-30781: IDLE - Use ttk widgets in ConfigDialog. Patches by Terry Jan
13187  Reedy and Cheryl Sabella.
13188
13189- bpo-31060: IDLE - Finish rearranging methods of ConfigDialog Grouping
13190  methods pertaining to each tab and the buttons will aid writing tests and
13191  improving the tabs and will enable splitting the groups into classes.
13192
13193- bpo-30853: IDLE -- Factor a VarTrace class out of ConfigDialog. Instance
13194  tracers manages pairs consisting of a tk variable and a callback function.
13195  When tracing is turned on, setting the variable calls the function.  Test
13196  coverage for the new class is 100%.
13197
13198- bpo-31003: IDLE: Add more tests for General tab.
13199
13200- bpo-30993: IDLE - Improve configdialog font page and tests. In
13201  configdialog: Document causal pathways in create_font_tab docstring.
13202  Simplify some attribute names. Move set_samples calls to var_changed_font
13203  (idea from Cheryl Sabella).  Move related functions to positions after the
13204  create widgets function. In test_configdialog: Fix test_font_set so not
13205  order dependent.  Fix renamed test_indent_scale so it tests the widget.
13206  Adjust tests for movement of set_samples call.  Add tests for load
13207  functions.  Put all font tests in one class and tab indent tests in
13208  another.  Except for two lines, these tests completely cover the related
13209  functions.
13210
13211- bpo-30981: IDLE -- Add more configdialog font page tests.
13212
13213- bpo-28523: IDLE: replace 'colour' with 'color' in configdialog.
13214
13215- bpo-30917: Add tests for idlelib.config.IdleConf. Increase coverage from
13216  46% to 96%. Patch by Louie Lu.
13217
13218- bpo-30934: Document coverage details for idlelib tests. Add section to
13219  idlelib/idle-test/README.txt. Include check that branches are taken both
13220  ways. Exclude IDLE-specific code that does not run during unit tests.
13221
13222- bpo-30913: IDLE: Document ConfigDialog tk Vars, methods, and widgets in
13223  docstrings This will facilitate improving the dialog and splitting up the
13224  class. Original patch by Cheryl Sabella.
13225
13226- bpo-30899: IDLE: Add tests for ConfigParser subclasses in config. Patch by
13227  Louie Lu.
13228
13229- bpo-30881: IDLE: Add docstrings to browser.py. Patch by Cheryl Sabella.
13230
13231- bpo-30851: IDLE: Remove unused variables in configdialog.  One is a
13232  duplicate, one is set but cannot be altered by users. Patch by Cheryl
13233  Sabella.
13234
13235- bpo-30870: IDLE: In Settings dialog, select font with Up, Down keys as
13236  well as mouse. Initial patch by Louie Lu.
13237
13238- bpo-8231: IDLE: call config.IdleConf.GetUserCfgDir only once.
13239
13240- bpo-30779: IDLE: Factor ConfigChanges class from configdialog, put in
13241  config; test. * In config, put dump test code in a function; run it and
13242  unittest in   'if __name__ == '__main__'. * Add class config.ConfigChanges
13243  based on changes_class_v4.py on bpo issue. * Add class
13244  test_config.ChangesTest, partly using configdialog_tests_v1.py. * Revise
13245  configdialog to use ConfigChanges; see tracker msg297804. * Revise
13246  test_configdialog to match configdialog changes. * Remove configdialog
13247  functions unused or moved to ConfigChanges. Cheryl Sabella contributed
13248  parts of the patch.
13249
13250- bpo-30777: IDLE: configdialog - Add docstrings and fix comments. Patch by
13251  Cheryl Sabella.
13252
13253- bpo-30495: IDLE: Improve textview with docstrings, PEP8 names, and more
13254  tests. Patch by Cheryl Sabella.
13255
13256- bpo-30723: IDLE: Make several improvements to parenmatch. Add 'parens'
13257  style to highlight both opener and closer. Make 'default' style, which is
13258  not default, a synonym for 'opener'. Make time-delay work the same with
13259  all styles. Add help for config dialog extensions tab, including help for
13260  parenmatch. Add new tests.  Original patch by Charles Wohlganger.
13261
13262- bpo-30674: IDLE: add docstrings to grep module. Patch by Cheryl Sabella
13263
13264- bpo-21519: IDLE's basic custom key entry dialog now detects duplicates
13265  properly. Original patch by Saimadhav Heblikar.
13266
13267- bpo-29910: IDLE no longer deletes a character after commenting out a
13268  region by a key shortcut.  Add ``return 'break'`` for this and other
13269  potential conflicts between IDLE and default key bindings.
13270
13271- bpo-30728: Review and change idlelib.configdialog names. Lowercase method
13272  and attribute names. Replace 'colour' with 'color', expand overly cryptic
13273  names, delete unneeded underscores. Replace ``import *`` with specific
13274  imports. Patches by Cheryl Sabella.
13275
13276- bpo-6739: IDLE: Verify user-entered key sequences by trying to bind them
13277  with tk. Add tests for all 3 validation functions. Original patch by G
13278  Polo.  Tests added by Cheryl Sabella.
13279
13280- bpo-15786: Fix several problems with IDLE's autocompletion box. The
13281  following should now work: clicking on selection box items; using the
13282  scrollbar; selecting an item by hitting Return. Hangs on MacOSX should no
13283  longer happen. Patch by Louie Lu.
13284
13285- bpo-25514: Add doc subsubsection about IDLE failure to start. Popup
13286  no-connection message directs users to this section.
13287
13288- bpo-30642: Fix reference leaks in IDLE tests. Patches by Louie Lu and
13289  Terry Jan Reedy.
13290
13291- bpo-30495: Add docstrings for textview.py and use PEP8 names. Patches by
13292  Cheryl Sabella and Terry Jan Reedy.
13293
13294- bpo-30290: Help-about: use pep8 names and add tests. Increase coverage to
13295  100%. Patches by Louie Lu, Cheryl Sabella, and Terry Jan Reedy.
13296
13297- bpo-30303: Add _utest option to textview; add new tests. Increase coverage
13298  to 100%. Patches by Louie Lu and Terry Jan Reedy.
13299
13300- bpo-29071: IDLE colors f-string prefixes (but not invalid ur prefixes).
13301
13302- bpo-28572: Add 10% to coverage of IDLE's test_configdialog. Update and
13303  augment description of the configuration system.
13304
13305Tools/Demos
13306-----------
13307
13308- bpo-30983: gdb integration commands (py-bt, etc.) work on optimized shared
13309  builds now, too.  :pep:`523` introduced _PyEval_EvalFrameDefault which
13310  inlines PyEval_EvalFrameEx on non-debug shared builds.  This broke the
13311  ability to use py-bt, py-up, and a few other Python-specific gdb
13312  integrations. The problem is fixed by only looking for
13313  _PyEval_EvalFrameDefault frames in python-gdb.py.  Original patch by Bruno
13314  "Polaco" Penteado.
13315
13316- bpo-29748: Added the slice index converter in Argument Clinic.
13317
13318- bpo-24037: Argument Clinic now uses the converter `bool(accept={int})`
13319  rather than `int` for semantical booleans.  This avoids repeating the
13320  default value for Python and C and will help in converting to `bool` in
13321  future.
13322
13323- bpo-29367: python-gdb.py now supports also ``method-wrapper``
13324  (``wrapperobject``) objects.
13325
13326- bpo-28023: Fix python-gdb.py didn't support new dict implementation.
13327
13328- bpo-15369: The pybench and pystone microbenchmark have been removed from
13329  Tools. Please use the new Python benchmark suite
13330  https://github.com/python/performance which is more reliable and includes
13331  a portable version of pybench working on Python 2 and Python 3.
13332
13333- bpo-28102: The zipfile module CLI now prints usage to stderr. Patch by
13334  Stephen J. Turnbull.
13335
13336C API
13337-----
13338
13339- bpo-31338: Added the ``Py_UNREACHABLE()`` macro for code paths which are
13340  never expected to be reached.  This and a few other useful macros are now
13341  documented in the C API manual.
13342
13343- bpo-30832: Remove own implementation for thread-local storage. CPython has
13344  provided the own implementation for thread-local storage (TLS) on
13345  Python/thread.c, it's used in the case which a platform has not supplied
13346  native TLS.  However, currently all supported platforms (Windows and
13347  pthreads) have provided native TLS and defined the Py_HAVE_NATIVE_TLS
13348  macro with unconditional in any case.
13349
13350- bpo-30708: PyUnicode_AsWideCharString() now raises a ValueError if the
13351  second argument is NULL and the wchar_t\* string contains null characters.
13352
13353- bpo-16500: Deprecate PyOS_AfterFork() and add PyOS_BeforeFork(),
13354  PyOS_AfterFork_Parent() and PyOS_AfterFork_Child().
13355
13356- bpo-6532: The type of results of PyThread_start_new_thread() and
13357  PyThread_get_thread_ident(), and the id parameter of
13358  PyThreadState_SetAsyncExc() changed from "long" to "unsigned long".
13359
13360- bpo-27867: Function PySlice_GetIndicesEx() is deprecated and replaced with
13361  a macro if Py_LIMITED_API is not set or set to the value between
13362  0x03050400 and 0x03060000 (not including) or 0x03060100 or higher.  Added
13363  functions PySlice_Unpack() and PySlice_AdjustIndices().
13364
13365- bpo-29083: Fixed the declaration of some public API functions.
13366  PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in
13367  limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and
13368  Py_BuildValue() were not available in limited API of version < 3.3 when
13369  PY_SSIZE_T_CLEAN is defined.
13370
13371- bpo-28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8()
13372  is now of type ``const char *`` rather of ``char *``.
13373
13374- bpo-29058: All stable API extensions added after Python 3.2 are now
13375  available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of
13376  the minimum Python version supporting this API.
13377
13378- bpo-28822: The index parameters *start* and *end* of PyUnicode_FindChar()
13379  are now adjusted to behave like ``str[start:end]``.
13380
13381- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
13382
13383- bpo-28761: The fields name and doc of structures PyMemberDef, PyGetSetDef,
13384  PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of
13385  type ``const char *`` rather of ``char *``.
13386
13387- bpo-28748: Private variable _Py_PackageContext is now of type ``const char
13388  *`` rather of ``char *``.
13389
13390- bpo-19569: Compiler warnings are now emitted if use most of deprecated
13391  functions.
13392
13393- bpo-28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(),
13394  PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and
13395  PyUnicode_AsEncodedUnicode().
13396
13397
13398What's New in Python 3.6.6 final?
13399=================================
13400
13401*Release date: 2018-06-27*
13402
13403There were no new changes in version 3.6.6.
13404
13405
13406
13407What's New in Python 3.6.6 release candidate 1?
13408===============================================
13409
13410*Release date: 2018-06-11*
13411
13412Core and Builtins
13413-----------------
13414
13415- bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow()
13416  correctly
13417
13418- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter
13419  shutdown even when there was a custom handler set previously. Patch by
13420  Philipp Kerling.
13421
13422- bpo-33622: Fixed a leak when the garbage collector fails to add an object
13423  with the ``__del__`` method or referenced by it into the
13424  :data:`gc.garbage` list. :c:func:`PyGC_Collect` can now be called when an
13425  exception is set and preserves it.
13426
13427- bpo-31849: Fix signed/unsigned comparison warning in pyhash.c.
13428
13429- bpo-33391: Fix a leak in set_symmetric_difference().
13430
13431- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer.
13432
13433- bpo-33231: Fix potential memory leak in ``normalizestring()``.
13434
13435- bpo-29922: Improved error messages in 'async with' when ``__aenter__()``
13436  or ``__aexit__()`` return non-awaitable object.
13437
13438- bpo-33199: Fix ``ma_version_tag`` in dict implementation is uninitialized
13439  when copying from key-sharing dict.
13440
13441- bpo-33041: Fixed jumping when the function contains an ``async for`` loop.
13442
13443- bpo-32282: Fix an unnecessary ifdef in the include of VersionHelpers.h in
13444  socketmodule on Windows.
13445
13446- bpo-21983: Fix a crash in `ctypes.cast()` in case the type argument is a
13447  ctypes structured data type. Patch by Eryk Sun and Oren Milman.
13448
13449Library
13450-------
13451
13452- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by
13453  Steve Weber.
13454
13455- bpo-33812: Datetime instance d with non-None tzinfo, but with
13456  d.tzinfo.utcoffset(d) returning None is now treated as naive by the
13457  astimezone() method.
13458
13459- bpo-30805: Avoid race condition with debug logging
13460
13461- bpo-33767: The concatenation (``+``) and repetition (``*``) sequence
13462  operations now raise :exc:`TypeError` instead of :exc:`SystemError` when
13463  performed on :class:`mmap.mmap` objects.  Patch by Zackery Spytz.
13464
13465- bpo-32684: Fix gather to propagate cancellation of itself even with
13466  return_exceptions.
13467
13468- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of
13469  asyncio.sslproto: start immediately the handshake instead of using
13470  call_soon(). Previously, data_received() could be called before the
13471  handshake started, causing the handshake to hang or fail.
13472
13473- bpo-31647: Fixed bug where calling write_eof() on a
13474  _SelectorSocketTransport after it's already closed raises AttributeError.
13475
13476- bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines
13477
13478- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor
13479
13480- bpo-11874: Use a better regex when breaking usage into wrappable parts.
13481  Avoids bogus assertion errors from custom metavar strings.
13482
13483- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder
13484  that prevented the cache of parsed strings from clearing after finishing
13485  the decoding. Based on patch by c-fos.
13486
13487- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP
13488  locations
13489
13490- bpo-33542: Prevent ``uuid.get_node`` from using a DUID instead of a MAC on
13491  Windows. Patch by Zvi Effron
13492
13493- bpo-26819: Fix race condition with `ReadTransport.resume_reading` in
13494  Windows proactor event loop.
13495
13496- bpo-28556: Minor fixes in typing module: add annotations to
13497  ``NamedTuple.__new__``, pass ``*args`` and ``**kwds`` in
13498  ``Generic.__new__``.  Original PRs by Paulius Šarka and Chad Dombrova.
13499
13500- bpo-20087: Updated alias mapping with glibc 2.27 supported locales.
13501
13502- bpo-33422: Fix trailing quotation marks getting deleted when looking up
13503  byte/string literals on pydoc. Patch by Andrés Delfino.
13504
13505- bpo-33197: Update error message when constructing invalid
13506  inspect.Parameters Patch by Dong-hee Na.
13507
13508- bpo-33383: Fixed crash in the get() method of the :mod:`dbm.ndbm` database
13509  object when it is called with a single argument.
13510
13511- bpo-33329: Fix multiprocessing regression on newer glibcs
13512
13513- bpo-991266: Fix quoting of the ``Comment`` attribute of
13514  :class:`http.cookies.SimpleCookie`.
13515
13516- bpo-33131: Upgrade bundled version of pip to 10.0.1.
13517
13518- bpo-33308: Fixed a crash in the :mod:`parser` module when converting an ST
13519  object to a tree of tuples or lists with ``line_info=False`` and
13520  ``col_info=True``.
13521
13522- bpo-33263: Fix FD leak in `_SelectorSocketTransport`  Patch by Vlad
13523  Starostin.
13524
13525- bpo-33256: Fix display of ``<module>`` call in the html produced by
13526  ``cgitb.html()``. Patch by Stéphane Blondon.
13527
13528- bpo-33203: ``random.Random.choice()`` now raises ``IndexError`` for empty
13529  sequences consistently even when called from subclasses without a
13530  ``getrandbits()`` implementation.
13531
13532- bpo-33224: Update difflib.mdiff() for :pep:`479`.  Convert an uncaught
13533  StopIteration in a generator into a return-statement.
13534
13535- bpo-33209: End framing at the end of C implementation of
13536  :func:`pickle.Pickler.dump`.
13537
13538- bpo-32861: The urllib.robotparser's ``__str__`` representation now
13539  includes wildcard entries and the "Crawl-delay" and "Request-rate" fields.
13540  Patch by Michael Lazar.
13541
13542- bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false
13543  boolean value. Note iid=0 and iid=False would be same. Patch by Garvit
13544  Khatri.
13545
13546- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1.
13547
13548- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all
13549  threads when calling mmap.mmap(), os.urandom(), and random.seed().  Patch
13550  by Nir Soffer.
13551
13552- bpo-27683: Fix a regression in :mod:`ipaddress` that result of
13553  :meth:`hosts` is empty when the network is constructed by a tuple
13554  containing an integer mask and only 1 bit left for addresses.
13555
13556- bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in
13557  subprocess if another low descriptor is closed.
13558
13559- bpo-31908: Fix output of cover files for ``trace`` module command-line
13560  tool. Previously emitted cover files only when ``--missing`` option was
13561  used. Patch by Michael Selik.
13562
13563- bpo-31457: If nested log adapters are used, the inner ``process()``
13564  methods are no longer omitted.
13565
13566- bpo-16865: Support arrays >=2GiB in :mod:`ctypes`.  Patch by Segev Finer.
13567
13568- bpo-31238: pydoc: the stop() method of the private ServerThread class now
13569  waits until DocServer.serve_until_quit() completes and then explicitly
13570  sets its docserver attribute to None to break a reference cycle.
13571
13572Documentation
13573-------------
13574
13575- bpo-33503: Fix broken pypi link
13576
13577- bpo-33421: Add missing documentation for ``typing.AsyncContextManager``.
13578
13579- bpo-33378: Add Korean language switcher for https://docs.python.org/3/
13580
13581- bpo-33276: Clarify that the ``__path__`` attribute on modules cannot be
13582  just any value.
13583
13584- bpo-33201: Modernize documentation for writing C extension types.
13585
13586- bpo-33195: Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document.
13587  ``Py_UNICODE`` related APIs are deprecated since Python 3.3, but it is
13588  missed in the document.
13589
13590- bpo-33126: Document PyBuffer_ToContiguous().
13591
13592- bpo-27212: Modify documentation for the :func:`islice` recipe to consume
13593  initial values up to the start index.
13594
13595- bpo-28247: Update :mod:`zipapp` documentation to describe how to make
13596  standalone applications.
13597
13598- bpo-18802: Documentation changes for ipaddress.  Patch by Jon Foster and
13599  Berker Peksag.
13600
13601- bpo-27428: Update documentation to clarify that ``WindowsRegistryFinder``
13602  implements ``MetaPathFinder``. (Patch by Himanshu Lakhara)
13603
13604- bpo-8243: Add a note about curses.addch and curses.addstr exception
13605  behavior when writing outside a window, or pad.
13606
13607- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED
13608  flags for ssl.SSLContext.verify_mode.
13609
13610Tests
13611-----
13612
13613- bpo-33655: Ignore test_posix_fallocate failures on BSD platforms that
13614  might be due to running on ZFS.
13615
13616- bpo-19417: Add test_bdb.py.
13617
13618Build
13619-----
13620
13621- bpo-5755: Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from
13622  ``OPT``. This option emitted annoying warnings when building extension
13623  modules written in C++.
13624
13625- bpo-33614: Ensures module definition files for the stable ABI on Windows
13626  are correctly regenerated.
13627
13628- bpo-33522: Enable CI builds on Visual Studio Team Services at
13629  https://python.visualstudio.com/cpython
13630
13631- bpo-33012: Add ``-Wno-cast-function-type`` for gcc 8 for silencing
13632  warnings about function casts like casting to PyCFunction in method
13633  definition lists.
13634
13635- bpo-33394: Enable the verbose build for extension modules, when GNU make
13636  is passed macros on the command line.
13637
13638Windows
13639-------
13640
13641- bpo-33184: Update Windows installer to OpenSSL 1.0.2o.
13642
13643macOS
13644-----
13645
13646- bpo-33184: Update macOS installer build to use OpenSSL 1.0.2o.
13647
13648IDLE
13649----
13650
13651- bpo-33656: On Windows, add API call saying that tk scales for DPI. On
13652  Windows 8.1+ or 10, with DPI compatibility properties of the Python binary
13653  unchanged, and a monitor resolution greater than 96 DPI, this should make
13654  text and lines sharper.  It should otherwise have no effect.
13655
13656- bpo-33768: Clicking on a context line moves that line to the top of the
13657  editor window.
13658
13659- bpo-33763: IDLE: Use read-only text widget for code context instead of
13660  label widget.
13661
13662- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel
13663  and scrollbar slider moved text by a fixed number of pixels, resulting in
13664  partial lines at the top of the editor box.  The change also applies to
13665  the shell and grep output windows, but not to read-only text views.
13666
13667- bpo-33679: Enable theme-specific color configuration for Code Context. Use
13668  the Highlights tab to see the setting for built-in themes or add settings
13669  to custom themes.
13670
13671- bpo-33642: Display up to maxlines non-blank lines for Code Context. If
13672  there is no current context, show a single blank line.
13673
13674- bpo-33628: IDLE: Cleanup codecontext.py and its test.
13675
13676- bpo-33564: IDLE's code context now recognizes async as a block opener.
13677
13678- bpo-29706: IDLE now colors async and await as keywords in 3.6. They become
13679  full keywords in 3.7.
13680
13681- bpo-21474: Update word/identifier definition from ascii to unicode. In
13682  text and entry boxes, this affects selection by double-click, movement
13683  left/right by control-left/right, and deletion left/right by
13684  control-BACKSPACE/DEL.
13685
13686- bpo-33204: IDLE: consistently color invalid string prefixes. A 'u' string
13687  prefix cannot be paired with either 'r' or 'f'. Consistently color as much
13688  of the prefix, starting at the right, as is valid. Revise and extend
13689  colorizer test.
13690
13691- bpo-32831: Add docstrings and tests for codecontext.
13692
13693Tools/Demos
13694-----------
13695
13696- bpo-33189: :program:`pygettext.py` now recognizes only literal strings as
13697  docstrings and translatable strings, and rejects bytes literals and
13698  f-string expressions.
13699
13700- bpo-31920: Fixed handling directories as arguments in the ``pygettext``
13701  script. Based on patch by Oleg Krasnikov.
13702
13703- bpo-29673: Fix pystackv and pystack gdbinit macros.
13704
13705- bpo-32885: Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable
13706  automatic backup creation (files with ``~`` suffix).
13707
13708- bpo-31583: Fix 2to3 for using with --add-suffix option but without
13709  --output-dir option for relative path to files in current directory.
13710
13711C API
13712-----
13713
13714- bpo-32374: Document that m_traverse for multi-phase initialized modules
13715  can be called with m_state=NULL, and add a sanity check
13716
13717
13718What's New in Python 3.6.5 final?
13719=================================
13720
13721*Release date: 2018-03-28*
13722
13723Tests
13724-----
13725
13726- bpo-32872: Avoid regrtest compatibility issue with namespace packages.
13727
13728Build
13729-----
13730
13731- bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1.
13732
13733
13734What's New in Python 3.6.5 release candidate 1?
13735===============================================
13736
13737*Release date: 2018-03-13*
13738
13739Security
13740--------
13741
13742- bpo-33001: Minimal fix to prevent buffer overrun in os.symlink on Windows
13743
13744- bpo-32981: Regexes in difflib and poplib were vulnerable to catastrophic
13745  backtracking. These regexes formed potential DOS vectors (REDOS). They
13746  have been refactored. This resolves CVE-2018-1060 and CVE-2018-1061. Patch
13747  by Jamie Davis.
13748
13749Core and Builtins
13750-----------------
13751
13752- bpo-33026: Fixed jumping out of "with" block by setting f_lineno.
13753
13754- bpo-17288: Prevent jumps from 'return' and 'exception' trace events.
13755
13756- bpo-32889: Update Valgrind suppression list to account for the rename of
13757  ``Py_ADDRESS_IN_RANG`` to ``address_in_range``.
13758
13759- bpo-32650: Pdb and other debuggers dependent on bdb.py will correctly step
13760  over (next command) native coroutines. Patch by Pablo Galindo.
13761
13762- bpo-32685: Improve suggestion when the Python 2 form of print statement is
13763  either present on the same line as the header of a compound statement or
13764  else terminated by a semi-colon instead of a newline. Patch by Nitish
13765  Chandra.
13766
13767- bpo-32583: Fix possible crashing in builtin Unicode decoders caused by
13768  write out-of-bound errors when using customized decode error handlers.
13769
13770- bpo-26163: Improved frozenset() hash to create more distinct hash values
13771  when faced with datasets containing many similar values.
13772
13773- bpo-27169: The ``__debug__`` constant is now optimized out at compile
13774  time. This fixes also bpo-22091.
13775
13776- bpo-32329: ``sys.flags.hash_randomization`` is now properly set to 0 when
13777  hash randomization is turned off by ``PYTHONHASHSEED=0``.
13778
13779- bpo-30416: The optimizer is now protected from spending much time doing
13780  complex calculations and consuming much memory for creating large
13781  constants in constant folding.
13782
13783- bpo-18533: ``repr()`` on a dict containing its own ``values()`` or
13784  ``items()`` no longer raises ``RecursionError``; OrderedDict similarly.
13785  Instead, use ``...``, as for other recursive structures.  Patch by Ben
13786  North.
13787
13788- bpo-32028: Leading whitespace is now correctly ignored when generating
13789  suggestions for converting Py2 print statements to Py3 builtin print
13790  function calls. Patch by Sanyam Khurana.
13791
13792- bpo-32137: The repr of deeply nested dict now raises a RecursionError
13793  instead of crashing due to a stack overflow.
13794
13795Library
13796-------
13797
13798- bpo-33064: lib2to3 now properly supports trailing commas after ``*args``
13799  and ``**kwargs`` in function signatures.
13800
13801- bpo-31804: Avoid failing in multiprocessing.Process if the standard
13802  streams are closed or None at exit.
13803
13804- bpo-33037: Skip sending/receiving data after SSL transport closing.
13805
13806- bpo-30353: Fix ctypes pass-by-value for structs on 64-bit Cygwin/MinGW.
13807
13808- bpo-33009: Fix inspect.signature() for single-parameter partialmethods.
13809
13810- bpo-32969: Expose several missing constants in zlib and fix corresponding
13811  documentation.
13812
13813- bpo-32713: Fixed tarfile.itn handling of out-of-bounds float values. Patch
13814  by Joffrey Fuhrer.
13815
13816- bpo-30622: The ssl module now detects missing NPN support in LibreSSL.
13817
13818- bpo-32922: dbm.open() now encodes filename with the filesystem encoding
13819  rather than default encoding.
13820
13821- bpo-32859: In ``os.dup2``, don't check every call whether the ``dup3``
13822  syscall exists or not.
13823
13824- bpo-21060: Rewrite confusing message from setup.py upload from "No dist
13825  file created in earlier command" to the more helpful "Must create and
13826  upload files in one command".
13827
13828- bpo-32857: In :mod:`tkinter`, ``after_cancel(None)`` now raises a
13829  :exc:`ValueError` instead of canceling the first scheduled function.
13830  Patch by Cheryl Sabella.
13831
13832- bpo-32852: Make sure sys.argv remains as a list when running trace.
13833
13834- bpo-32841: Fixed `asyncio.Condition` issue which silently ignored
13835  cancellation after notifying and cancelling a conditional lock. Patch by
13836  Bar Harel.
13837
13838- bpo-31787: Fixed refleaks of ``__init__()`` methods in various modules.
13839  (Contributed by Oren Milman)
13840
13841- bpo-30157: Fixed guessing quote and delimiter in csv.Sniffer.sniff() when
13842  only the last field is quoted.  Patch by Jake Davis.
13843
13844- bpo-32394: socket: Remove TCP_FASTOPEN, TCP_KEEPCNT flags on older version
13845  Windows during run-time.
13846
13847- bpo-32777: Fix a rare but potential pre-exec child process deadlock in
13848  subprocess on POSIX systems when marking file descriptors inheritable on
13849  exec in the child process.  This bug appears to have been introduced in
13850  3.4.
13851
13852- bpo-32647: The ctypes module used to depend on indirect linking for
13853  dlopen. The shared extension is now explicitly linked against libdl on
13854  platforms with dl.
13855
13856- bpo-32734: Fixed ``asyncio.Lock()`` safety issue which allowed acquiring
13857  and locking the same lock multiple times, without it being free. Patch by
13858  Bar Harel.
13859
13860- bpo-32727: Do not include name field in SMTP envelope from address. Patch
13861  by Stéphane Wirtel
13862
13863- bpo-27931: Fix email address header parsing error when the username is an
13864  empty quoted string. Patch by Xiang Zhang.
13865
13866- bpo-32304: distutils' upload command no longer corrupts tar files ending
13867  with a CR byte, and no longer tries to convert CR to CRLF in any of the
13868  upload text fields.
13869
13870- bpo-32502: uuid.uuid1 no longer raises an exception if a 64-bit hardware
13871  address is encountered.
13872
13873- bpo-31848: Fix the error handling in Aifc_read.initfp() when the SSND
13874  chunk is not found. Patch by Zackery Spytz.
13875
13876- bpo-32555: On FreeBSD and Solaris, os.strerror() now always decode the
13877  byte string from the current locale encoding, rather than using
13878  ASCII/surrogateescape in some cases.
13879
13880- bpo-32521: The nis module is now compatible with new libnsl and headers
13881  location.
13882
13883- bpo-32473: Improve ABCMeta._dump_registry() output readability
13884
13885- bpo-32521: glibc has removed Sun RPC. Use replacement libtirpc headers and
13886  library in nis module.
13887
13888- bpo-32228: Ensure that ``truncate()`` preserves the file position (as
13889  reported by ``tell()``) after writes longer than the buffer size.
13890
13891- bpo-26133: Don't unsubscribe signals in asyncio UNIX event loop on
13892  interpreter shutdown.
13893
13894- bpo-32185: The SSL module no longer sends IP addresses in SNI TLS
13895  extension on platforms with OpenSSL 1.0.2+ or inet_pton.
13896
13897- bpo-32323: :func:`urllib.parse.urlsplit()` does not convert zone-id
13898  (scope) to lower case for scoped IPv6 addresses in hostnames now.
13899
13900- bpo-32302: Fix bdist_wininst of distutils for CRT v142: it binary
13901  compatible with CRT v140.
13902
13903- bpo-32255: A single empty field is now always quoted when written into a
13904  CSV file. This allows to distinguish an empty row from a row consisting of
13905  a single empty field. Patch by Licht Takeuchi.
13906
13907- bpo-32277: Raise ``NotImplementedError`` instead of ``SystemError`` on
13908  platforms where ``chmod(..., follow_symlinks=False)`` is not supported.
13909  Patch by Anthony Sottile.
13910
13911- bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link
13912  list'.
13913
13914- bpo-27456: Ensure TCP_NODELAY is set on Linux. Tests by Victor Stinner.
13915
13916- bpo-31900: The :func:`locale.localeconv` function now sets temporarily the
13917  ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale to decode
13918  ``decimal_point`` and ``thousands_sep`` byte strings if they are non-ASCII
13919  or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the
13920  ``LC_CTYPE`` locale. This temporary change affects other threads. Same
13921  change for the :meth:`str.format` method when formatting a number
13922  (:class:`int`, :class:`float`, :class:`float` and subclasses) with the
13923  ``n`` type (ex: ``'{:n}'.format(1234)``).
13924
13925- bpo-31802: Importing native path module (``posixpath``, ``ntpath``) now
13926  works even if the ``os`` module still is not imported.
13927
13928Documentation
13929-------------
13930
13931- bpo-17232: Clarify docs for -O and -OO.  Patch by Terry Reedy.
13932
13933- bpo-32800: Update link to w3c doc for xml default namespaces.
13934
13935- bpo-8722: Document :meth:`__getattr__` behavior when property :meth:`get`
13936  method raises :exc:`AttributeError`.
13937
13938- bpo-32614: Modify RE examples in documentation to use raw strings to
13939  prevent :exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight
13940  the deprecation.
13941
13942- bpo-31972: Improve docstrings for `pathlib.PurePath` subclasses.
13943
13944- bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile and
13945  their C-API counterparts regarding which type of events are received in
13946  each function. Patch by Pablo Galindo Salgado.
13947
13948Tests
13949-----
13950
13951- bpo-32517: Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport
13952  of ``KqueueSelector`` loop was not being closed.
13953
13954- bpo-32721: Fix test_hashlib to not fail if the _md5 module is not built.
13955
13956- bpo-32252: Fix faulthandler_suppress_crash_report() used to prevent core
13957  dump files when testing crashes. getrlimit() returns zero on success.
13958
13959- bpo-31518: Debian Unstable has disabled TLS 1.0 and 1.1 for
13960  SSLv23_METHOD(). Change TLS/SSL protocol of some tests to PROTOCOL_TLS or
13961  PROTOCOL_TLSv1_2 to make them pass on Debian.
13962
13963Build
13964-----
13965
13966- bpo-32635: Fix segfault of the crypt module when libxcrypt is provided
13967  instead of libcrypt at the system.
13968
13969Windows
13970-------
13971
13972- bpo-33016: Fix potential use of uninitialized memory in
13973  nt._getfinalpathname
13974
13975- bpo-32903: Fix a memory leak in os.chdir() on Windows if the current
13976  directory is set to a UNC path.
13977
13978- bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data.
13979
13980- bpo-32409: Ensures activate.bat can handle Unicode contents.
13981
13982- bpo-32457: Improves handling of denormalized executable path when
13983  launching Python.
13984
13985- bpo-32370: Use the correct encoding for ipconfig output in the uuid
13986  module. Patch by Segev Finer.
13987
13988- bpo-29248: Fix :func:`os.readlink` on Windows, which was mistakenly
13989  treating the ``PrintNameOffset`` field of the reparse data buffer as a
13990  number of characters instead of bytes. Patch by Craig Holmquist and SSE4.
13991
13992- bpo-32588: Create standalone _distutils_findvs module.
13993
13994macOS
13995-----
13996
13997- bpo-32726: Provide an additional, more modern macOS installer variant that
13998  supports macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied
13999  third-party libraries to OpenSSL 1.0.2n, XZ 5.2.3, and SQLite 3.22.0. The
14000  10.9+ installer now links with and supplies its own copy of Tcl/Tk 8.6.8.
14001
14002IDLE
14003----
14004
14005- bpo-32984: Set ``__file__`` while running a startup file.  Like Python,
14006  IDLE optionally runs one startup file in the Shell window before
14007  presenting the first interactive input prompt.  For IDLE, ``-s`` runs a
14008  file named in environmental variable  :envvar:`IDLESTARTUP` or
14009  :envvar:`PYTHONSTARTUP`; ``-r file`` runs ``file``.  Python sets
14010  ``__file__`` to the startup file name before running the file and unsets
14011  it before the first prompt.  IDLE now does the same when run normally,
14012  without the ``-n`` option.
14013
14014- bpo-32940: Simplify and rename StringTranslatePseudoMapping in pyparse.
14015
14016- bpo-32916: Change ``str`` to ``code`` in pyparse.
14017
14018- bpo-32905: Remove unused code in pyparse module.
14019
14020- bpo-32874: Add tests for pyparse.
14021
14022- bpo-32837: Using the system and place-dependent default encoding for
14023  open() is a bad idea for IDLE's system and location-independent files.
14024
14025- bpo-32826: Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI
14026  test test_file_buttons() only looks at initial ascii-only lines, but
14027  failed on systems where open() defaults to 'ascii' because readline()
14028  internally reads and decodes far enough ahead to encounter a non-ascii
14029  character in CREDITS.txt.
14030
14031- bpo-32765: Update configdialog General tab docstring to add new widgets to
14032  the widget list.
14033
14034Tools/Demos
14035-----------
14036
14037- bpo-24960: 2to3 and lib2to3 can now read pickled grammar files using
14038  pkgutil.get_data() rather than probing the filesystem. This lets 2to3 and
14039  lib2to3 work when run from a zipfile.
14040
14041- bpo-32222: Fix pygettext not extracting docstrings for functions with type
14042  annotated arguments. Patch by Toby Harradine.
14043
14044C API
14045-----
14046
14047- bpo-29084: Undocumented C API for OrderedDict has been excluded from the
14048  limited C API. It was added by mistake and actually never worked in the
14049  limited C API.
14050
14051
14052What's New in Python 3.6.4 final?
14053=================================
14054
14055*Release date: 2017-12-18*
14056
14057There were no new code changes in version 3.6.4 since v3.6.4rc1.
14058
14059
14060
14061What's New in Python 3.6.4 release candidate 1?
14062===============================================
14063
14064*Release date: 2017-12-05*
14065
14066Core and Builtins
14067-----------------
14068
14069- bpo-32176: co_flags.CO_NOFREE is now always set correctly by the code
14070  object constructor based on freevars and cellvars, rather than needing to
14071  be set correctly by the caller. This ensures it will be cleared
14072  automatically when additional cell references are injected into a modified
14073  code object and function.
14074
14075- bpo-31949: Fixed several issues in printing tracebacks
14076  (PyTraceBack_Print()). Setting sys.tracebacklimit to 0 or less now
14077  suppresses printing tracebacks. Setting sys.tracebacklimit to None now
14078  causes using the default limit. Setting sys.tracebacklimit to an integer
14079  larger than LONG_MAX now means using the limit LONG_MAX rather than the
14080  default limit. Fixed integer overflows in the case of more than 2**31
14081  traceback items on Windows. Fixed output errors handling.
14082
14083- bpo-30696: Fix the interactive interpreter looping endlessly when no
14084  memory.
14085
14086- bpo-20047: Bytearray methods partition() and rpartition() now accept only
14087  bytes-like objects as separator, as documented.  In particular they now
14088  raise TypeError rather of returning a bogus result when an integer is
14089  passed as a separator.
14090
14091- bpo-31852: Fix a segmentation fault caused by a combination of the async
14092  soft keyword and continuation lines.
14093
14094- bpo-21720: BytesWarning no longer emitted when the *fromlist* argument of
14095  ``__import__()`` or the ``__all__`` attribute of the module contain bytes
14096  instances.
14097
14098- bpo-31825: Fixed OverflowError in the 'unicode-escape' codec and in
14099  codecs.escape_decode() when decode an escaped non-ascii byte.
14100
14101- bpo-28603: Print the full context/cause chain of exceptions on interpreter
14102  exit, even if an exception in the chain is unhashable or compares equal to
14103  later ones. Patch by Zane Bitter.
14104
14105- bpo-31786: Fix timeout rounding in the select module to round correctly
14106  negative timeouts between -1.0 and 0.0. The functions now block waiting
14107  for events as expected. Previously, the call was incorrectly non-blocking.
14108  Patch by Pablo Galindo.
14109
14110- bpo-31642: Restored blocking "from package import module" by setting
14111  sys.modules["package.module"] to None.
14112
14113- bpo-31626: Fixed a bug in debug memory allocator.  There was a write to
14114  freed memory after shrinking a memory block.
14115
14116- bpo-31619: Fixed a ValueError when convert a string with large number of
14117  underscores to integer with binary base.
14118
14119- bpo-31592: Fixed an assertion failure in Python parser in case of a bad
14120  `unicodedata.normalize()`. Patch by Oren Milman.
14121
14122- bpo-31588: Raise a `TypeError` with a helpful error message when class
14123  creation fails due to a metaclass with a bad ``__prepare__()`` method.
14124  Patch by Oren Milman.
14125
14126- bpo-31566: Fix an assertion failure in `_warnings.warn()` in case of a bad
14127  ``__name__`` global. Patch by Oren Milman.
14128
14129- bpo-31505: Fix an assertion failure in `json`, in case
14130  `_json.make_encoder()` received a bad `encoder()` argument. Patch by Oren
14131  Milman.
14132
14133- bpo-31492: Fix assertion failures in case of failing to import from a
14134  module with a bad ``__name__`` attribute, and in case of failing to access
14135  an attribute of such a module. Patch by Oren Milman.
14136
14137- bpo-31490: Fix an assertion failure in `ctypes` class definition, in case
14138  the class has an attribute whose name is specified in ``_anonymous_`` but
14139  not in ``_fields_``. Patch by Oren Milman.
14140
14141- bpo-31478: Fix an assertion failure in `_random.Random.seed()` in case the
14142  argument has a bad ``__abs__()`` method. Patch by Oren Milman.
14143
14144- bpo-31315: Fix an assertion failure in imp.create_dynamic(), when
14145  spec.name is not a string. Patch by Oren Milman.
14146
14147- bpo-31311: Fix a crash in the ``__setstate__()`` method of
14148  `ctypes._CData`, in case of a bad ``__dict__``. Patch by Oren Milman.
14149
14150- bpo-31293: Fix crashes in true division and multiplication of a timedelta
14151  object by a float with a bad as_integer_ratio() method. Patch by Oren
14152  Milman.
14153
14154- bpo-31285: Fix an assertion failure in `warnings.warn_explicit`, when the
14155  return value of the received loader's get_source() has a bad splitlines()
14156  method. Patch by Oren Milman.
14157
14158- bpo-30817: `PyErr_PrintEx()` clears now the ignored exception that may be
14159  raised by `_PySys_SetObjectId()`, for example when no memory.
14160
14161Library
14162-------
14163
14164- bpo-28556: Two minor fixes for ``typing`` module: allow shallow copying
14165  instances of generic classes, improve interaction of ``__init_subclass__``
14166  with generics. Original PRs by Ivan Levkivskyi.
14167
14168- bpo-27240: The header folding algorithm for the new email policies has
14169  been rewritten, which also fixes bpo-30788, bpo-31831, and bpo-32182.  In
14170  particular, RFC2231 folding is now done correctly.
14171
14172- bpo-32186: io.FileIO.readall() and io.FileIO.read() now release the GIL
14173  when getting the file size. Fixed hang of all threads with inaccessible
14174  NFS server. Patch by Nir Soffer.
14175
14176- bpo-12239: Make :meth:`msilib.SummaryInformation.GetProperty` return
14177  ``None`` when the value of property is ``VT_EMPTY``.  Initial patch by
14178  Mark Mc Mahon.
14179
14180- bpo-31325: Fix wrong usage of :func:`collections.namedtuple` in the
14181  :meth:`RobotFileParser.parse() <urllib.robotparser.RobotFileParser.parse>`
14182  method. Initial patch by Robin Wellner.
14183
14184- bpo-12382: :func:`msilib.OpenDatabase` now raises a better exception
14185  message when it couldn't open or create an MSI file.  Initial patch by
14186  William Tisäter.
14187
14188- bpo-32110: ``codecs.StreamReader.read(n)`` now returns not more than *n*
14189  characters/bytes for non-negative *n*. This makes it compatible with
14190  ``read()`` methods of other file-like objects.
14191
14192- bpo-32072: Fixed issues with binary plists: Fixed saving bytearrays.
14193  Identical objects will be saved only once. Equal references will be load
14194  as identical objects. Added support for saving and loading recursive data
14195  structures.
14196
14197- bpo-32034: Make asyncio.IncompleteReadError and LimitOverrunError
14198  pickleable.
14199
14200- bpo-32015: Fixed the looping of asyncio in the case of reconnection the
14201  socket during waiting async read/write from/to the socket.
14202
14203- bpo-32011: Restored support of loading marshal files with the TYPE_INT64
14204  code. These files can be produced in Python 2.7.
14205
14206- bpo-31970: Reduce performance overhead of asyncio debug mode.
14207
14208- bpo-9678: Fixed determining the MAC address in the uuid module: Using
14209  ifconfig on NetBSD and OpenBSD. Using arp on Linux, FreeBSD, NetBSD and
14210  OpenBSD. Based on patch by Takayuki Shimizukawa.
14211
14212- bpo-30057: Fix potential missed signal in signal.signal().
14213
14214- bpo-31933: Fix Blake2 params leaf_size and node_offset on big endian
14215  platforms. Patch by Jack O'Connor.
14216
14217- bpo-31927: Fixed compilation of the socket module on NetBSD 8.  Fixed
14218  assertion failure or reading arbitrary data when parse a AF_BLUETOOTH
14219  address on NetBSD and DragonFly BSD.
14220
14221- bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse()
14222  when the size of types chtype or mmask_t is less than the size of C long.
14223  curses.box() now accepts characters as arguments.  Based on patch by Steve
14224  Fink.
14225
14226- bpo-31897: plistlib now catches more errors when read binary plists and
14227  raises InvalidFileException instead of unexpected exceptions.
14228
14229- bpo-25720: Fix the method for checking pad state of curses WINDOW. Patch
14230  by Masayuki Yamamoto.
14231
14232- bpo-31893: Fixed the layout of the kqueue_event structure on OpenBSD and
14233  NetBSD. Fixed the comparison of the kqueue_event objects.
14234
14235- bpo-31891: Fixed building the curses module on NetBSD.
14236
14237- bpo-28416: Instances of pickle.Pickler subclass with the persistent_id()
14238  method and pickle.Unpickler subclass with the persistent_load() method no
14239  longer create reference cycles.
14240
14241- bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed
14242  or None.
14243
14244- bpo-31457: If nested log adapters are used, the inner ``process()``
14245  methods are no longer omitted.
14246
14247- bpo-31457: The ``manager`` property on LoggerAdapter objects is now
14248  properly settable.
14249
14250- bpo-31806: Fix timeout rounding in time.sleep(), threading.Lock.acquire()
14251  and socket.socket.settimeout() to round correctly negative timeouts
14252  between -1.0 and 0.0. The functions now block waiting for events as
14253  expected. Previously, the call was incorrectly non-blocking. Patch by
14254  Pablo Galindo.
14255
14256- bpo-28603: traceback: Fix a TypeError that occurred during printing of
14257  exception tracebacks when either the current exception or an exception in
14258  its context/cause chain is unhashable. Patch by Zane Bitter.
14259
14260- bpo-30058: Fixed buffer overflow in select.kqueue.control().
14261
14262- bpo-31770: Prevent a crash when calling the ``__init__()`` method of a
14263  ``sqlite3.Cursor`` object more than once. Patch by Oren Milman.
14264
14265- bpo-31672: ``idpattern`` in ``string.Template`` matched some non-ASCII
14266  characters. Now it uses ``-i`` regular expression local flag to avoid
14267  non-ASCII characters.
14268
14269- bpo-31764: Prevent a crash in ``sqlite3.Cursor.close()`` in case the
14270  ``Cursor`` object is uninitialized. Patch by Oren Milman.
14271
14272- bpo-31752: Fix possible crash in timedelta constructor called with custom
14273  integers.
14274
14275- bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM
14276  exceptions.
14277
14278- bpo-31728: Prevent crashes in `_elementtree` due to unsafe cleanup of
14279  `Element.text` and `Element.tail`. Patch by Oren Milman.
14280
14281- bpo-31620: an empty asyncio.Queue now doesn't leak memory when queue.get
14282  pollers timeout
14283
14284- bpo-31632: Fix method set_protocol() of class _SSLProtocolTransport in
14285  asyncio module. This method was previously modifying a wrong reference to
14286  the protocol.
14287
14288- bpo-31675: Fixed memory leaks in Tkinter's methods splitlist() and split()
14289  when pass a string larger than 2 GiB.
14290
14291- bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo().
14292
14293- bpo-30806: Fix the string representation of a netrc object.
14294
14295- bpo-15037: Added a workaround for getkey() in curses for ncurses 5.7 and
14296  earlier.
14297
14298- bpo-25351: Avoid venv activate failures with undefined variables
14299
14300- bpo-25532: inspect.unwrap() will now only try to unwrap an object
14301  sys.getrecursionlimit() times, to protect against objects which create a
14302  new object on every attribute access.
14303
14304- bpo-30347: Stop crashes when concurrently iterate over itertools.groupby()
14305  iterators.
14306
14307- bpo-31516: ``threading.current_thread()`` should not return a dummy thread
14308  at shutdown.
14309
14310- bpo-31351: python -m ensurepip now exits with non-zero exit code if pip
14311  bootstrapping has failed.
14312
14313- bpo-31482: ``random.seed()`` now works with bytes in version=1
14314
14315- bpo-31334: Fix ``poll.poll([timeout])`` in the ``select`` module for
14316  arbitrary negative timeouts on all OSes where it can only be a
14317  non-negative integer or -1. Patch by Riccardo Coccioli.
14318
14319- bpo-31310: multiprocessing's semaphore tracker should be launched again if
14320  crashed.
14321
14322- bpo-31308: Make multiprocessing's forkserver process immune to Ctrl-C and
14323  other user interruptions. If it crashes, restart it when necessary.
14324
14325Documentation
14326-------------
14327
14328- bpo-32105: Added asyncio.BaseEventLoop.connect_accepted_socket
14329  versionadded marker.
14330
14331- bpo-31537: Fix incorrect usage of ``get_history_length`` in readline
14332  documentation example code. Patch by Brad Smith.
14333
14334- bpo-30085: The operator functions without double underscores are preferred
14335  for clarity. The one with underscores are only kept for
14336  back-compatibility.
14337
14338Tests
14339-----
14340
14341- bpo-31380: Skip test_httpservers test_undecodable_file on macOS: fails on
14342  APFS.
14343
14344- bpo-31705: Skip test_socket.test_sha256() on Linux kernel older than 4.5.
14345  The test fails with ENOKEY on kernel 3.10 (on ppc64le). A fix was merged
14346  into the kernel 4.5.
14347
14348- bpo-31174: Fix test_tools.test_unparse: DirectoryTestCase now stores the
14349  names sample to always test the same files. It prevents false alarms when
14350  hunting reference leaks.
14351
14352- bpo-30695: Add the `set_nomemory(start, stop)` and `remove_mem_hooks()`
14353  functions to the _testcapi module.
14354
14355Build
14356-----
14357
14358- bpo-32059: ``detect_modules()`` in ``setup.py`` now also searches the
14359  sysroot paths when cross-compiling.
14360
14361- bpo-31957: Fixes Windows SDK version detection when building for Windows.
14362
14363- bpo-31609: Fixes quotes in PCbuild/clean.bat
14364
14365- bpo-31934: Abort the build when building out of a not clean source tree.
14366
14367- bpo-31926: Fixed Argument Clinic sometimes causing compilation errors when
14368  there was more than one function and/or method in a .c file with the same
14369  name.
14370
14371- bpo-28791: Update Windows builds to use SQLite 3.21.0.
14372
14373- bpo-28791: Update OS X installer to use SQLite 3.21.0.
14374
14375- bpo-22140: Prevent double substitution of prefix in python-config.sh.
14376
14377- bpo-31536: Avoid wholesale rebuild after `make regen-all` if nothing
14378  changed.
14379
14380Windows
14381-------
14382
14383- bpo-1102: Return ``None`` when ``View.Fetch()`` returns
14384  ``ERROR_NO_MORE_ITEMS`` instead of raising ``MSIError``. Initial patch by
14385  Anthony Tuininga.
14386
14387- bpo-31944: Fixes Modify button in Apps and Features dialog.
14388
14389macOS
14390-----
14391
14392- bpo-31392: Update macOS installer to use OpenSSL 1.0.2m
14393
14394IDLE
14395----
14396
14397- bpo-32207: Improve tk event exception tracebacks in IDLE. When tk event
14398  handling is driven by IDLE's run loop, a confusing and distracting
14399  queue.EMPTY traceback context is no longer added to tk event exception
14400  tracebacks.  The traceback is now the same as when event handling is
14401  driven by user code.  Patch based on a suggestion by Serhiy Storchaka.
14402
14403- bpo-32164: Delete unused file idlelib/tabbedpages.py. Use of TabbedPageSet
14404  in configdialog was replaced by ttk.Notebook.
14405
14406- bpo-32100: IDLE: Fix old and new bugs in pathbrowser; improve tests. Patch
14407  mostly by Cheryl Sabella.
14408
14409- bpo-31858: IDLE -- Restrict shell prompt manipulation to the shell. Editor
14410  and output windows only see an empty last prompt line.  This simplifies
14411  the code and fixes a minor bug when newline is inserted. Sys.ps1, if
14412  present, is read on Shell start-up, but is not set or changed.
14413
14414- bpo-31860: The font sample in the IDLE configuration dialog is now
14415  editable. Changes persist while IDLE remains open
14416
14417- bpo-31836: Test_code_module now passes if run after test_idle, which sets
14418  ps1. The code module uses sys.ps1 if present or sets it to '>>> ' if not.
14419  Test_code_module now properly tests both behaviors.  Ditto for ps2.
14420
14421- bpo-28603: Fix a TypeError that caused a shell restart when printing a
14422  traceback that includes an exception that is unhashable. Patch by Zane
14423  Bitter.
14424
14425- bpo-13802: Use non-Latin characters in the IDLE's Font settings sample.
14426  Even if one selects a font that defines a limited subset of the unicode
14427  Basic Multilingual Plane, tcl/tk will use other fonts that define a
14428  character. The expanded example give users of non-Latin characters a
14429  better idea of what they might see in IDLE's shell and editors. To make
14430  room for the expanded sample, frames on the Font tab are re-arranged. The
14431  Font/Tabs help explains a bit about the additions.
14432
14433- bpo-31460: Simplify the API of IDLE's Module Browser. Passing a widget
14434  instead of an flist with a root widget opens the option of creating a
14435  browser frame that is only part of a window.  Passing a full file name
14436  instead of pieces assumed to come from a .py file opens the possibility of
14437  browsing python files that do not end in .py.
14438
14439- bpo-31649: IDLE - Make _htest, _utest parameters keyword only.
14440
14441- bpo-31559: Remove test order dependence in idle_test.test_browser.
14442
14443- bpo-31459: Rename IDLE's module browser from Class Browser to Module
14444  Browser. The original module-level class and method browser became a
14445  module browser, with the addition of module-level functions, years ago.
14446  Nested classes and functions were added yesterday.  For
14447  back-compatibility, the virtual event <<open-class-browser>>, which
14448  appears on the Keys tab of the Settings dialog, is not changed. Patch by
14449  Cheryl Sabella.
14450
14451- bpo-31500: Default fonts now are scaled on HiDPI displays.
14452
14453- bpo-1612262: IDLE module browser now shows nested classes and functions.
14454  Original patches for code and tests by Guilherme Polo and Cheryl Sabella,
14455  respectively.
14456
14457Tools/Demos
14458-----------
14459
14460- bpo-30722: Make redemo work with Python 3.6 and newer versions. Also,
14461  remove the ``LOCALE`` option since it doesn't work with string patterns in
14462  Python 3. Patch by Christoph Sarnowski.
14463
14464C API
14465-----
14466
14467- bpo-20891: Fix PyGILState_Ensure(). When PyGILState_Ensure() is called in
14468  a non-Python thread before PyEval_InitThreads(), only call
14469  PyEval_InitThreads() after calling PyThreadState_New() to fix a crash.
14470
14471- bpo-31532: Fix memory corruption due to allocator mix in getpath.c between
14472  Py_GetPath() and Py_SetPath()
14473
14474- bpo-30697: The `PyExc_RecursionErrorInst` singleton is removed and
14475  `PyErr_NormalizeException()` does not use it anymore. This singleton is
14476  persistent and its members being never cleared may cause a segfault during
14477  finalization of the interpreter. See also issue #22898.
14478
14479
14480What's New in Python 3.6.3 final?
14481=================================
14482
14483*Release date: 2017-10-03*
14484
14485Library
14486-------
14487
14488- bpo-31641: Re-allow arbitrary iterables in
14489  `concurrent.futures.as_completed()`. Fixes regression in 3.6.3rc1.
14490
14491Build
14492-----
14493
14494- bpo-31662: Fix typos in Windows ``uploadrelease.bat`` script. Fix Windows
14495  Doc build issues in ``Doc/make.bat``.
14496
14497- bpo-31423: Fix building the PDF documentation with newer versions of
14498  Sphinx.
14499
14500
14501What's New in Python 3.6.3 release candidate 1?
14502===============================================
14503
14504*Release date: 2017-09-18*
14505
14506Security
14507--------
14508
14509- bpo-29781: SSLObject.version() now correctly returns None when handshake
14510  over BIO has not been performed yet.
14511
14512- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to
14513  get security fixes.
14514
14515Core and Builtins
14516-----------------
14517
14518- bpo-31471: Fix an assertion failure in `subprocess.Popen()` on Windows, in
14519  case the env argument has a bad keys() method. Patch by Oren Milman.
14520
14521- bpo-31418: Fix an assertion failure in `PyErr_WriteUnraisable()` in case
14522  of an exception with a bad ``__module__`` attribute. Patch by Oren Milman.
14523
14524- bpo-31416: Fix assertion failures in case of a bad warnings.filters or
14525  warnings.defaultaction. Patch by Oren Milman.
14526
14527- bpo-31411: Raise a TypeError instead of SystemError in case
14528  warnings.onceregistry is not a dictionary. Patch by Oren Milman.
14529
14530- bpo-31373: Fix several possible instances of undefined behavior due to
14531  floating-point demotions.
14532
14533- bpo-30465: Location information (``lineno`` and ``col_offset``) in
14534  f-strings is now (mostly) correct.  This fixes tools like flake8 from
14535  showing warnings on the wrong line (typically the first line of the file).
14536
14537- bpo-31343: Include sys/sysmacros.h for major(), minor(), and makedev().
14538  GNU C libray plans to remove the functions from sys/types.h.
14539
14540- bpo-31291: Fix an assertion failure in `zipimport.zipimporter.get_data` on
14541  Windows, when the return value of ``pathname.replace('/','\\')`` isn't a
14542  string. Patch by Oren Milman.
14543
14544- bpo-31271: Fix an assertion failure in the write() method of
14545  `io.TextIOWrapper`, when the encoder doesn't return a bytes object. Patch
14546  by Oren Milman.
14547
14548- bpo-31243: Fix a crash in some methods of `io.TextIOWrapper`, when the
14549  decoder's state is invalid. Patch by Oren Milman.
14550
14551- bpo-30721: ``print`` now shows correct usage hint for using Python 2
14552  redirection syntax.  Patch by Sanyam Khurana.
14553
14554- bpo-31070: Fix a race condition in importlib _get_module_lock().
14555
14556- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which
14557  doesn't call ``PyObject_GC_UnTrack()``.
14558
14559- bpo-31071: Avoid masking original TypeError in call with * unpacking when
14560  other arguments are passed.
14561
14562- bpo-30978: str.format_map() now passes key lookup exceptions through.
14563  Previously any exception was replaced with a KeyError exception.
14564
14565- bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state.
14566
14567- bpo-30876: Relative import from unloaded package now reimports the package
14568  instead of failing with SystemError.  Relative import from non-package now
14569  fails with ImportError rather than SystemError.
14570
14571- bpo-30703: Improve signal delivery. Avoid using Py_AddPendingCall from
14572  signal handler, to avoid calling signal-unsafe functions. The tests I'm
14573  adding here fail without the rest of the patch, on Linux and OS X. This
14574  means our signal delivery logic had defects (some signals could be lost).
14575
14576- bpo-30765: Avoid blocking in pthread_mutex_lock() when
14577  PyThread_acquire_lock() is asked not to block.
14578
14579- bpo-31161: Make sure the 'Missing parentheses' syntax error message is
14580  only applied to SyntaxError, not to subclasses. Patch by Martijn Pieters.
14581
14582- bpo-30814: Fixed a race condition when import a submodule from a package.
14583
14584- bpo-30597: ``print`` now shows expected input in custom error message when
14585  used as a Python 2 statement. Patch by Sanyam Khurana.
14586
14587Library
14588-------
14589
14590- bpo-31499: xml.etree: Fix a crash when a parser is part of a reference
14591  cycle.
14592
14593- bpo-28556: typing.get_type_hints now finds the right globalns for classes
14594  and modules by default (when no ``globalns`` was specified by the caller).
14595
14596- bpo-28556: Speed improvements to the ``typing`` module.  Original PRs by
14597  Ivan Levkivskyi and Mitar.
14598
14599- bpo-31544: The C accelerator module of ElementTree ignored exceptions
14600  raised when looking up TreeBuilder target methods in XMLParser().
14601
14602- bpo-31234: socket.create_connection() now fixes manually a reference
14603  cycle: clear the variable storing the last exception on success.
14604
14605- bpo-31457: LoggerAdapter objects can now be nested.
14606
14607- bpo-31400: Improves SSL error handling to avoid losing error numbers.
14608
14609- bpo-28958: ssl.SSLContext() now uses OpenSSL error information when a
14610  context cannot be instantiated.
14611
14612- bpo-27340: SSLSocket.sendall() now uses memoryview to create slices of
14613  data. This fixes support for all bytes-like object. It is also more
14614  efficient and avoids costly copies.
14615
14616- bpo-31178: Fix string concatenation bug in rare error path in the
14617  subprocess module
14618
14619- bpo-31350: Micro-optimize :func:`asyncio._get_running_loop` to become up
14620  to 10% faster.
14621
14622- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of
14623  partial characters for UTF-8 input (libexpat bug 115):
14624  https://github.com/libexpat/libexpat/issues/115
14625
14626- bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3.
14627
14628- bpo-29212: Fix concurrent.futures.thread.ThreadPoolExecutor threads to
14629  have a non repr() based thread name by default when no thread_name_prefix
14630  is supplied. They will now identify themselves as
14631  "ThreadPoolExecutor-y_n".
14632
14633- bpo-9146: Fix a segmentation fault in _hashopenssl when standard hash
14634  functions such as md5 are not available in the linked OpenSSL library.  As
14635  in some special FIPS-140 build environments.
14636
14637- bpo-27144: The ``map()`` and ``as_completed()`` iterators in
14638  ``concurrent.futures`` now avoid keeping a reference to yielded objects.
14639
14640- bpo-10746: Fix ctypes producing wrong :pep:`3118` type codes for integer
14641  types.
14642
14643- bpo-22536: The subprocess module now sets the filename when
14644  FileNotFoundError is raised on POSIX systems due to the executable or cwd
14645  not being found.
14646
14647- bpo-31249: concurrent.futures: WorkItem.run() used by ThreadPoolExecutor
14648  now breaks a reference cycle between an exception object and the WorkItem
14649  object.
14650
14651- bpo-31247: xmlrpc.server now explicitly breaks reference cycles when using
14652  sys.exc_info() in code handling exceptions.
14653
14654- bpo-30102: The ssl and hashlib modules now call
14655  OPENSSL_add_all_algorithms_noconf() on OpenSSL < 1.1.0. The function
14656  detects CPU features and enables optimizations on some CPU architectures
14657  such as POWER8. Patch is based on research from Gustavo Serra Scalet.
14658
14659- bpo-31185: Fixed miscellaneous errors in asyncio speedup module.
14660
14661- bpo-31135: ttk: fix the destroy() method of LabeledScale and OptionMenu
14662  classes. Call the parent destroy() method even if the used attribute
14663  doesn't exist. The LabeledScale.destroy() method now also explicitly
14664  clears label and scale attributes to help the garbage collector to destroy
14665  all widgets.
14666
14667- bpo-31107: Fix `copyreg._slotnames()` mangled attribute calculation for
14668  classes whose name begins with an underscore. Patch by Shane Harvey.
14669
14670- bpo-31061: Fixed a crash when using asyncio and threads.
14671
14672- bpo-30502: Fix handling of long oids in ssl.  Based on patch by Christian
14673  Heimes.
14674
14675- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that
14676  contains CR or LF. Patch by Dong-hee Na.
14677
14678- bpo-30595: multiprocessing.Queue.get() with a timeout now polls its reader
14679  in non-blocking mode if it succeeded to acquire the lock but the acquire
14680  took longer than the timeout.
14681
14682- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound
14683  builtin functions.  Patch by Aaron Gallagher.
14684
14685- bpo-30961: Fix decrementing a borrowed reference in tracemalloc.
14686
14687- bpo-25684: Change ``ttk.OptionMenu`` radiobuttons to be unique across
14688  instances of ``OptionMenu``.
14689
14690- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the
14691  thread completes, even if the thread was started by the same process which
14692  created the queue.
14693
14694- bpo-29854: Fix segfault in readline when using readline's history-size
14695  option.  Patch by Nir Soffer.
14696
14697- bpo-30319: socket.close() now ignores ECONNRESET error.
14698
14699- bpo-30828: Fix out of bounds write in
14700  `asyncio.CFuture.remove_done_callback()`.
14701
14702- bpo-30807: signal.setitimer() may disable the timer when passed a tiny
14703  value. Tiny values (such as 1e-6) are valid non-zero values for
14704  setitimer(), which is specified as taking microsecond-resolution
14705  intervals. However, on some platform, our conversion routine could convert
14706  1e-6 into a zero interval, therefore disabling the timer instead of
14707  (re-)scheduling it.
14708
14709- bpo-30441: Fix bug when modifying os.environ while iterating over it
14710
14711- bpo-30532: Fix email header value parser dropping folding white space in
14712  certain cases.
14713
14714- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called
14715  with bytes-like argument.
14716
14717- bpo-30746: Prohibited the '=' character in environment variable names in
14718  ``os.putenv()`` and ``os.spawn*()``.
14719
14720- bpo-29755: Fixed the lgettext() family of functions in the gettext module.
14721  They now always return bytes.
14722
14723Documentation
14724-------------
14725
14726- bpo-31294: Fix incomplete code snippet in the ZeroMQSocketListener and
14727  ZeroMQSocketHandler examples and adapt them to Python 3.
14728
14729- bpo-21649: Add RFC 7525 and Mozilla server side TLS links to SSL
14730  documentation.
14731
14732- bpo-30803: Clarify doc on truth value testing. Original patch by Peter
14733  Thomassen.
14734
14735Tests
14736-----
14737
14738- bpo-31320: Silence traceback in test_ssl
14739
14740- bpo-25674: Remove sha256.tbs-internet.com ssl test
14741
14742- bpo-30715: Address ALPN callback changes for OpenSSL 1.1.0f. The latest
14743  version behaves like OpenSSL 1.0.2 and no longer aborts handshake.
14744
14745- bpo-30822: regrtest: Exclude tzdata from regrtest --all. When running the
14746  test suite using --use=all / -u all, exclude tzdata since it makes
14747  test_datetime too slow (15-20 min on some buildbots) which then times out
14748  on some buildbots. Fix also regrtest command line parser to allow passing
14749  -u extralargefile to run test_zipfile64.
14750
14751Build
14752-----
14753
14754- bpo-30854: Fix compile error when compiling --without-threads. Patch by
14755  Masayuki Yamamoto.
14756
14757Windows
14758-------
14759
14760- bpo-30389: Adds detection of Visual Studio 2017 to distutils on Windows.
14761
14762- bpo-31340: Change to building with MSVC v141 (included with Visual Studio
14763  2017)
14764
14765- bpo-30581: os.cpu_count() now returns the correct number of processors on
14766  Windows when the number of logical processors is greater than 64.
14767
14768- bpo-30731: Add a missing xmlns to python.manifest so that it matches the
14769  schema.
14770
14771IDLE
14772----
14773
14774- bpo-31493: IDLE code context -- fix code update and font update timers.
14775  Canceling timers prevents a warning message when test_idle completes.
14776
14777- bpo-31488: IDLE - Update non-key options in former extension classes. When
14778  applying configdialog changes, call .reload for each feature class. Change
14779  ParenMatch so updated options affect existing instances attached to
14780  existing editor windows.
14781
14782- bpo-31477: IDLE - Improve rstrip entry in doc. Strip trailing whitespace
14783  strips more than blank spaces.  Multiline string literals are not skipped.
14784
14785- bpo-31480: IDLE - make tests pass with zzdummy extension disabled by
14786  default.
14787
14788- bpo-31421: Document how IDLE runs tkinter programs. IDLE calls tcl/tk
14789  update in the background in order to make live interaction and
14790  experimentation with tkinter applications much easier.
14791
14792- bpo-31414: IDLE -- fix tk entry box tests by deleting first. Adding to an
14793  int entry is not the same as deleting and inserting because int('') will
14794  fail.
14795
14796- bpo-31051: Rearrange IDLE configdialog GenPage into Window, Editor, and
14797  Help sections.
14798
14799- bpo-30617: IDLE - Add docstrings and tests for outwin subclass of editor.
14800  Move some data and functions from the class to module level. Patch by
14801  Cheryl Sabella.
14802
14803- bpo-31287: IDLE - Do not modify tkinter.message in test_configdialog.
14804
14805- bpo-27099: Convert IDLE's built-in 'extensions' to regular features. About
14806  10 IDLE features were implemented as supposedly optional extensions. Their
14807  different behavior could be confusing or worse for users and not good for
14808  maintenance. Hence the conversion. The main difference for users is that
14809  user configurable key bindings for builtin features are now handled
14810  uniformly. Now, editing a binding in a keyset only affects its value in
14811  the keyset. All bindings are defined together in the system-specific
14812  default keysets in config-extensions.def. All custom keysets are saved as
14813  a whole in config-extension.cfg.  All take effect as soon as one clicks
14814  Apply or Ok. The affected events are '<<force-open-completions>>',
14815  '<<expand-word>>', '<<force-open-calltip>>', '<<flash-paren>>',
14816  '<<format-paragraph>>', '<<run-module>>', '<<check-module>>', and
14817  '<<zoom-height>>'.  Any (global) customizations made before 3.6.3 will not
14818  affect their keyset-specific customization after 3.6.3. and vice versa.
14819  Initial patch by Charles Wohlganger.
14820
14821- bpo-31206: IDLE: Factor HighPage(Frame) class from ConfigDialog. Patch by
14822  Cheryl Sabella.
14823
14824- bpo-31001: Add tests for configdialog highlight tab.  Patch by Cheryl
14825  Sabella.
14826
14827- bpo-31205: IDLE: Factor KeysPage(Frame) class from ConfigDialog.  The
14828  slightly modified tests continue to pass.  Patch by Cheryl Sabella.
14829
14830- bpo-31130: IDLE -- stop leaks in test_configdialog. Initial patch by
14831  Victor Stinner.
14832
14833- bpo-31002: Add tests for configdialog keys tab. Patch by Cheryl Sabella.
14834
14835- bpo-19903: IDLE: Calltips use `inspect.signature` instead of
14836  `inspect.getfullargspec`. This improves calltips for builtins converted to
14837  use Argument Clinic. Patch by Louie Lu.
14838
14839- bpo-31083: IDLE - Add an outline of a TabPage class in configdialog.
14840  Update existing classes to match outline. Initial patch by Cheryl Sabella.
14841
14842- bpo-31050: Factor GenPage(Frame) class from ConfigDialog. The slightly
14843  modified tests continue to pass. Patch by Cheryl Sabella.
14844
14845- bpo-31004: IDLE - Factor FontPage(Frame) class from ConfigDialog. Slightly
14846  modified tests continue to pass. Fix General tests. Patch mostly by Cheryl
14847  Sabella.
14848
14849- bpo-30781: IDLE - Use ttk widgets in ConfigDialog. Patches by Terry Jan
14850  Reedy and Cheryl Sabella.
14851
14852- bpo-31060: IDLE - Finish rearranging methods of ConfigDialog Grouping
14853  methods pertaining to each tab and the buttons will aid writing tests and
14854  improving the tabs and will enable splitting the groups into classes.
14855
14856- bpo-30853: IDLE -- Factor a VarTrace class out of ConfigDialog. Instance
14857  tracers manages pairs consisting of a tk variable and a callback function.
14858  When tracing is turned on, setting the variable calls the function.  Test
14859  coverage for the new class is 100%.
14860
14861- bpo-31003: IDLE: Add more tests for General tab.
14862
14863- bpo-30993: IDLE - Improve configdialog font page and tests. In
14864  configdialog: Document causal pathways in create_font_tab docstring.
14865  Simplify some attribute names. Move set_samples calls to var_changed_font
14866  (idea from Cheryl Sabella).  Move related functions to positions after the
14867  create widgets function. In test_configdialog: Fix test_font_set so not
14868  order dependent.  Fix renamed test_indent_scale so it tests the widget.
14869  Adjust tests for movement of set_samples call.  Add tests for load
14870  functions.  Put all font tests in one class and tab indent tests in
14871  another.  Except for two lines, these tests completely cover the related
14872  functions.
14873
14874- bpo-30981: IDLE -- Add more configdialog font page tests.
14875
14876- bpo-28523: IDLE: replace 'colour' with 'color' in configdialog.
14877
14878- bpo-30917: Add tests for idlelib.config.IdleConf. Increase coverage from
14879  46% to 96%. Patch by Louie Lu.
14880
14881- bpo-30934: Document coverage details for idlelib tests. Add section to
14882  idlelib/idle-test/README.txt. Include check that branches are taken both
14883  ways. Exclude IDLE-specific code that does not run during unit tests.
14884
14885- bpo-30913: IDLE: Document ConfigDialog tk Vars, methods, and widgets in
14886  docstrings This will facilitate improving the dialog and splitting up the
14887  class. Original patch by Cheryl Sabella.
14888
14889- bpo-30899: IDLE: Add tests for ConfigParser subclasses in config. Patch by
14890  Louie Lu.
14891
14892- bpo-30881: IDLE: Add docstrings to browser.py. Patch by Cheryl Sabella.
14893
14894- bpo-30851: IDLE: Remove unused variables in configdialog.  One is a
14895  duplicate, one is set but cannot be altered by users. Patch by Cheryl
14896  Sabella.
14897
14898- bpo-30870: IDLE: In Settings dialog, select font with Up, Down keys as
14899  well as mouse. Initial patch by Louie Lu.
14900
14901- bpo-8231: IDLE: call config.IdleConf.GetUserCfgDir only once.
14902
14903- bpo-30779: IDLE: Factor ConfigChanges class from configdialog, put in
14904  config; test. * In config, put dump test code in a function; run it and
14905  unittest in   'if __name__ == '__main__'. * Add class config.ConfigChanges
14906  based on changes_class_v4.py on bpo issue. * Add class
14907  test_config.ChangesTest, partly using configdialog_tests_v1.py. * Revise
14908  configdialog to use ConfigChanges; see tracker msg297804. * Revise
14909  test_configdialog to match configdialog changes. * Remove configdialog
14910  functions unused or moved to ConfigChanges. Cheryl Sabella contributed
14911  parts of the patch.
14912
14913- bpo-30777: IDLE: configdialog - Add docstrings and fix comments. Patch by
14914  Cheryl Sabella.
14915
14916- bpo-30495: IDLE: Improve textview with docstrings, PEP8 names, and more
14917  tests. Patch by Cheryl Sabella.
14918
14919- bpo-30723: IDLE: Make several improvements to parenmatch. Add 'parens'
14920  style to highlight both opener and closer. Make 'default' style, which is
14921  not default, a synonym for 'opener'. Make time-delay work the same with
14922  all styles. Add help for config dialog extensions tab, including help for
14923  parenmatch. Add new tests.  Original patch by Charles Wohlganger.
14924
14925- bpo-30674: IDLE: add docstrings to grep module. Patch by Cheryl Sabella
14926
14927- bpo-21519: IDLE's basic custom key entry dialog now detects duplicates
14928  properly. Original patch by Saimadhav Heblikar.
14929
14930- bpo-29910: IDLE no longer deletes a character after commenting out a
14931  region by a key shortcut.  Add ``return 'break'`` for this and other
14932  potential conflicts between IDLE and default key bindings.
14933
14934- bpo-30728: Review and change idlelib.configdialog names. Lowercase method
14935  and attribute names. Replace 'colour' with 'color', expand overly cryptic
14936  names, delete unneeded underscores. Replace ``import *`` with specific
14937  imports. Patches by Cheryl Sabella.
14938
14939- bpo-6739: IDLE: Verify user-entered key sequences by trying to bind them
14940  with tk. Add tests for all 3 validation functions. Original patch by G
14941  Polo.  Tests added by Cheryl Sabella.
14942
14943Tools/Demos
14944-----------
14945
14946- bpo-30983: gdb integration commands (py-bt, etc.) work on optimized shared
14947  builds now, too.  :pep:`523` introduced _PyEval_EvalFrameDefault which
14948  inlines PyEval_EvalFrameEx on non-debug shared builds.  This broke the
14949  ability to use py-bt, py-up, and a few other Python-specific gdb
14950  integrations. The problem is fixed by only looking for
14951  _PyEval_EvalFrameDefault frames in python-gdb.py.  Original patch by Bruno
14952  "Polaco" Penteado.
14953
14954
14955What's New in Python 3.6.2 final?
14956=================================
14957
14958*Release date: 2017-07-17*
14959
14960No changes since release candidate 2
14961
14962
14963
14964What's New in Python 3.6.2 release candidate 2?
14965===============================================
14966
14967*Release date: 2017-07-07*
14968
14969Security
14970--------
14971
14972- bpo-30730: Prevent environment variables injection in subprocess on
14973  Windows.  Prevent passing other environment variables and command
14974  arguments.
14975
14976- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple
14977  security vulnerabilities including: CVE-2017-9233 (External entity
14978  infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix),
14979  CVE-2016-0718 (Fix regression bugs from 2.2.0's fix to CVE-2016-0718) and
14980  CVE-2012-0876 (Counter hash flooding with SipHash). Note: the
14981  CVE-2016-5300 (Use os-specific entropy sources like getrandom) doesn't
14982  impact Python, since Python already gets entropy from the OS to set the
14983  expat secret using ``XML_SetHashSalt()``.
14984
14985- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For
14986  example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the
14987  ``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an
14988  authentication (``login@host``).
14989
14990
14991What's New in Python 3.6.2 release candidate 1?
14992===============================================
14993
14994*Release date: 2017-06-17*
14995
14996Core and Builtins
14997-----------------
14998
14999- bpo-30682: Removed a too-strict assertion that failed for certain
15000  f-strings, such as eval("f'\\\n'") and eval("f'\\\r'").
15001
15002- bpo-30604: Move co_extra_freefuncs to not be per-thread to avoid crashes
15003
15004- bpo-29104: Fixed parsing backslashes in f-strings.
15005
15006- bpo-27945: Fixed various segfaults with dict when input collections are
15007  mutated during searching, inserting or comparing.  Based on patches by
15008  Duane Griffin and Tim Mitchell.
15009
15010- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for
15011  non-interned attribute names.  Based on patch by Eryk Sun.
15012
15013- bpo-30039: If a KeyboardInterrupt happens when the interpreter is in the
15014  middle of resuming a chain of nested 'yield from' or 'await' calls, it's
15015  now correctly delivered to the innermost frame.
15016
15017- bpo-12414: sys.getsizeof() on a code object now returns the sizes which
15018  includes the code struct and sizes of objects which it references. Patch
15019  by Dong-hee Na.
15020
15021- bpo-29949: Fix memory usage regression of set and frozenset object.
15022
15023- bpo-29935: Fixed error messages in the index() method of tuple, list and
15024  deque when pass indices of wrong type.
15025
15026- bpo-29859: Show correct error messages when any of the pthread_* calls in
15027  thread_pthread.h fails.
15028
15029- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises
15030  :exc:`OverflowError`.
15031
15032- bpo-29600: Fix wrapping coroutine return values in StopIteration.
15033
15034- bpo-28856: Fix an oversight that %b format for bytes should support
15035  objects follow the buffer protocol.
15036
15037- bpo-29714: Fix a regression that bytes format may fail when containing
15038  zero bytes inside.
15039
15040- bpo-29478: If max_line_length=None is specified while using the Compat32
15041  policy, it is no longer ignored.  Patch by Mircea Cosbuc.
15042
15043Library
15044-------
15045
15046- bpo-30616: Functional API of enum allows to create empty enums. Patched by
15047  Dong-hee Na
15048
15049- bpo-30038: Fix race condition between signal delivery and wakeup file
15050  descriptor. Patch by Nathaniel Smith.
15051
15052- bpo-23894: lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings.
15053
15054- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a
15055  reference cycle to not keep objects alive longer than expected.
15056
15057- bpo-30149: inspect.signature() now supports callables with
15058  variable-argument parameters wrapped with partialmethod. Patch by Dong-hee
15059  Na.
15060
15061- bpo-30645: Fix path calculation in imp.load_package(), fixing it for cases
15062  when a package is only shipped with bytecodes. Patch by Alexandru
15063  Ardelean.
15064
15065- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects.
15066  Patch by Sanjay Sundaresan.
15067
15068- bpo-30605: re.compile() no longer raises a BytesWarning when compiling a
15069  bytes instance with misplaced inline modifier.  Patch by Roy Williams.
15070
15071Security
15072--------
15073
15074- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of
15075  CVE-2016-0718 and CVE-2016-4472. See
15076  https://sourceforge.net/p/expat/bugs/537/ for more information.
15077
15078Library
15079-------
15080
15081- bpo-24484: Avoid race condition in multiprocessing cleanup (#2159)
15082
15083- bpo-28994: The traceback no longer displayed for SystemExit raised in a
15084  callback registered by atexit.
15085
15086- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was
15087  called.
15088
15089- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add
15090  support for ContextManager on all versions. Original PRs by Jelle Zijlstra
15091  and Ivan Levkivskyi
15092
15093- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl
15094  implementation. Patch by Michaël Sghaïer.
15095
15096- bpo-29743: Closing transport during handshake process leaks open socket.
15097  Patch by Nikolay Kim
15098
15099- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu
15100  Sornay.
15101
15102- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore
15103  EINVAL on stdin.write() if the child process is still running but closed
15104  the pipe.
15105
15106- bpo-29822: inspect.isabstract() now works during __init_subclass__.  Patch
15107  by Nate Soares.
15108
15109- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract
15110  base classes to use keyword parameters in __init_subclass__. Patch by Nate
15111  Soares.
15112
15113- bpo-30557: faulthandler now correctly filters and displays exception codes
15114  on Windows
15115
15116- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot
15117  handle IPv6 addresses.
15118
15119- bpo-29960: Preserve generator state when _random.Random.setstate() raises
15120  an exception. Patch by Bryan Olson.
15121
15122- bpo-30414: multiprocessing.Queue._feed background running thread do not
15123  break from main loop on exception.
15124
15125- bpo-30003: Fix handling escape characters in HZ codec.  Based on patch by
15126  Ma Lin.
15127
15128- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn*
15129  and *forkserver* start methods.
15130
15131- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error
15132  (code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted.
15133  This error occurs sometimes on SSL connections.
15134
15135- bpo-30375: Warnings emitted when compile a regular expression now always
15136  point to the line in the user code.  Previously they could point into
15137  inners of the re module if emitted from inside of groups or conditionals.
15138
15139- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running
15140  coroutine and the coroutine returned without any more ``await``.
15141
15142- bpo-30266: contextlib.AbstractContextManager now supports
15143  anti-registration by setting __enter__ = None or __exit__ = None,
15144  following the pattern introduced in bpo-25958. Patch by Jelle Zijlstra.
15145
15146- bpo-30298: Weaken the condition of deprecation warnings for inline
15147  modifiers. Now allowed several subsequential inline modifiers at the start
15148  of the pattern (e.g. ``'(?i)(?s)...'``).  In verbose mode whitespaces and
15149  comments now are allowed before and between inline modifiers (e.g. ``'(?x)
15150  (?i) (?s)...'``).
15151
15152- bpo-29990: Fix range checking in GB18030 decoder.  Original patch by Ma
15153  Lin.
15154
15155- bpo-26293: Change resulted because of zipfile breakage. (See also:
15156  bpo-29094)
15157
15158- bpo-30243: Removed the __init__ methods of _json's scanner and encoder.
15159  Misusing them could cause memory leaks or crashes.  Now scanner and
15160  encoder objects are completely initialized in the __new__ methods.
15161
15162- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process
15163  when Ctrl-C is received.
15164
15165- bpo-28556: Various updates to typing module: add typing.NoReturn type, use
15166  WrapperDescriptorType, minor bug-fixes.  Original PRs by Jim
15167  Fasarakis-Hilliard and Ivan Levkivskyi.
15168
15169- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux.
15170
15171- bpo-30070: Fixed leaks and crashes in errors handling in the parser
15172  module.
15173
15174- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when
15175  readline() or __next__() respectively return non-sizeable object. Fixed
15176  possible other errors caused by not checking results of PyObject_Size(),
15177  PySequence_Size(), or PyMapping_Size().
15178
15179- bpo-30017: Allowed calling the close() method of the zip entry writer
15180  object multiple times.  Writing to a closed writer now always produces a
15181  ValueError.
15182
15183- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint
15184  is present.
15185
15186- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True.
15187  Patch by Armin Rigo.
15188
15189- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in
15190  contextlib.contextmanager.  Patch by Siddharth Velankar.
15191
15192- bpo-29998: Pickling and copying ImportError now preserves name and path
15193  attributes.
15194
15195- bpo-29953: Fixed memory leaks in the replace() method of datetime and time
15196  objects when pass out of bound fold argument.
15197
15198- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering
15199  long runs of empty iterables.
15200
15201- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions
15202  and wrong types.
15203
15204- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an
15205  exception at the very first of an iterable may swallow the exception or
15206  make the program hang. Patch by Davin Potts and Xiang Zhang.
15207
15208- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when
15209  the OS gives priority to errors such as EACCES over EEXIST.
15210
15211- bpo-29861: Release references to tasks, their arguments and their results
15212  as soon as they are finished in multiprocessing.Pool.
15213
15214- bpo-29884: faulthandler: Restore the old sigaltstack during teardown.
15215  Patch by Christophe Zeitouny.
15216
15217- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects.
15218
15219- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords
15220  are not strings.  Patch by Michael Seifert.
15221
15222- bpo-29742: get_extra_info() raises exception if get called on closed ssl
15223  transport. Patch by Nikolay Kim.
15224
15225- bpo-8256: Fixed possible failing or crashing input() if attributes
15226  "encoding" or "errors" of sys.stdin or sys.stdout are not set or are not
15227  strings.
15228
15229- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting
15230  big intables (objects that have __int__) as elements.  Patch by Oren
15231  Milman.
15232
15233- bpo-28231: The zipfile module now accepts path-like objects for external
15234  paths.
15235
15236- bpo-26915: index() and count() methods of collections.abc.Sequence now
15237  check identity before checking equality when do comparisons.
15238
15239- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other
15240  exception) to exception(s) raised in the dispatched methods. Patch by Petr
15241  Motejlek.
15242
15243- bpo-30177: path.resolve(strict=False) no longer cuts the path after the
15244  first element not present in the filesystem.  Patch by Antoine Pietri.
15245
15246IDLE
15247----
15248
15249- bpo-15786: Fix several problems with IDLE's autocompletion box. The
15250  following should now work: clicking on selection box items; using the
15251  scrollbar; selecting an item by hitting Return. Hangs on MacOSX should no
15252  longer happen. Patch by Louie Lu.
15253
15254- bpo-25514: Add doc subsubsection about IDLE failure to start. Popup
15255  no-connection message directs users to this section.
15256
15257- bpo-30642: Fix reference leaks in IDLE tests. Patches by Louie Lu and
15258  Terry Jan Reedy.
15259
15260- bpo-30495: Add docstrings for textview.py and use PEP8 names. Patches by
15261  Cheryl Sabella and Terry Jan Reedy.
15262
15263- bpo-30290: Help-about: use pep8 names and add tests. Increase coverage to
15264  100%. Patches by Louie Lu, Cheryl Sabella, and Terry Jan Reedy.
15265
15266- bpo-30303: Add _utest option to textview; add new tests. Increase coverage
15267  to 100%. Patches by Louie Lu and Terry Jan Reedy.
15268
15269C API
15270-----
15271
15272- bpo-27867: Function PySlice_GetIndicesEx() no longer replaced with a macro
15273  if Py_LIMITED_API is not set.
15274
15275Build
15276-----
15277
15278- bpo-29941: Add ``--with-assertions`` configure flag to explicitly enable C
15279  ``assert()`` checks. Defaults to off. ``--with-pydebug`` implies
15280  ``--with-assertions``.
15281
15282- bpo-28787: Fix out-of-tree builds of Python when configured with
15283  ``--with--dtrace``.
15284
15285- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``,
15286  ``make install`` and some other make targets when configured with
15287  ``--enable-optimizations``.
15288
15289- bpo-23404: Don't regenerate generated files based on file modification
15290  time anymore: the action is now explicit. Replace ``make touch`` with
15291  ``make regen-all``.
15292
15293- bpo-29643: Fix ``--enable-optimization`` didn't work.
15294
15295Documentation
15296-------------
15297
15298- bpo-30176: Add missing attribute related constants in curses
15299  documentation.
15300
15301- bpo-30052: the link targets for :func:`bytes` and :func:`bytearray` are
15302  now their respective type definitions, rather than the corresponding
15303  builtin function entries. Use :ref:`bytes <func-bytes>` and
15304  :ref:`bytearray <func-bytearray>` to reference the latter. In order to
15305  ensure this and future cross-reference updates are applied automatically,
15306  the daily documentation builds now disable the default output caching
15307  features in Sphinx.
15308
15309- bpo-26985: Add missing info of code object in inspect documentation.
15310
15311Tools/Demos
15312-----------
15313
15314- bpo-29367: python-gdb.py now supports also ``method-wrapper``
15315  (``wrapperobject``) objects.
15316
15317Tests
15318-----
15319
15320- bpo-30357: test_thread: setUp() now uses support.threading_setup() and
15321  support.threading_cleanup() to wait until threads complete to avoid random
15322  side effects on following tests. Initial patch written by Grzegorz
15323  Grzywacz.
15324
15325- bpo-30197: Enhanced functions swap_attr() and swap_item() in the
15326  test.support module. They now work when delete replaced attribute or item
15327  inside the with statement.  The old value of the attribute or item (or
15328  None if it doesn't exist) now will be assigned to the target of the "as"
15329  clause, if there is one.
15330
15331Windows
15332-------
15333
15334- bpo-30687: Locate msbuild.exe on Windows when building rather than
15335  vcvarsall.bat
15336
15337- bpo-30450: The build process on Windows no longer depends on Subversion,
15338  instead pulling external code from GitHub via a Python script.  If Python
15339  3.6 is not found on the system (via ``py -3.6``), NuGet is used to
15340  download a copy of 32-bit Python.
15341
15342
15343What's New in Python 3.6.1 final?
15344=================================
15345
15346*Release date: 2017-03-21*
15347
15348Core and Builtins
15349-----------------
15350
15351- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused
15352  a regression by revealing an inconsistency in how sys.path is initialized
15353  when executing ``__main__`` from a zipfile, directory, or other import
15354  location. The interpreter now consistently avoids ever adding the import
15355  location's parent directory to ``sys.path``, and ensures no other
15356  ``sys.path`` entries are inadvertently modified when inserting the import
15357  location named on the command line.
15358
15359Build
15360-----
15361
15362- bpo-27593: fix format of git information used in sys.version
15363
15364- Fix incompatible comment in python.h
15365
15366
15367What's New in Python 3.6.1 release candidate 1?
15368===============================================
15369
15370*Release date: 2017-03-04*
15371
15372Core and Builtins
15373-----------------
15374
15375- bpo-28893: Set correct __cause__ for errors about invalid awaitables
15376  returned from __aiter__ and __anext__.
15377
15378- bpo-29683: Fixes to memory allocation in _PyCode_SetExtra.  Patch by Brian
15379  Coleman.
15380
15381- bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords. It
15382  should raise TypeError when kwargs is not a dict.  But it might cause segv
15383  when args=NULL and kwargs is not a dict.
15384
15385- bpo-28598: Support __rmod__ for subclasses of str being called before
15386  str.__mod__. Patch by Martijn Pieters.
15387
15388- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX. Patch by
15389  Matthieu Dartiailh.
15390
15391- bpo-29602: Fix incorrect handling of signed zeros in complex constructor
15392  for complex subclasses and for inputs having a __complex__ method. Patch
15393  by Serhiy Storchaka.
15394
15395- bpo-29347: Fixed possibly dereferencing undefined pointers when creating
15396  weakref objects.
15397
15398- bpo-29438: Fixed use-after-free problem in key sharing dict.
15399
15400- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0].
15401
15402- bpo-29337: Fixed possible BytesWarning when compare the code objects.
15403  Warnings could be emitted at compile time.
15404
15405- bpo-29327: Fixed a crash when pass the iterable keyword argument to
15406  sorted().
15407
15408- bpo-29034: Fix memory leak and use-after-free in os module
15409  (path_converter).
15410
15411- bpo-29159: Fix regression in bytes(x) when x.__index__() raises Exception.
15412
15413- bpo-28932: Do not include <sys/random.h> if it does not exist.
15414
15415- bpo-25677: Correct the positioning of the syntax error caret for indented
15416  blocks. Based on patch by Michael Layzell.
15417
15418- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate
15419  form.
15420
15421- bpo-26919: On Android, operating system data is now always encoded/decoded
15422  to/from UTF-8, instead of the locale encoding to avoid inconsistencies
15423  with os.fsencode() and os.fsdecode() which are already using UTF-8.
15424
15425- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy
15426  bug triggerable by a monkey-patched len() function.
15427
15428- bpo-28739: f-string expressions are no longer accepted as docstrings and
15429  by ast.literal_eval() even if they do not include expressions.
15430
15431- bpo-28512: Fixed setting the offset attribute of SyntaxError by
15432  PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
15433
15434- bpo-28918: Fix the cross compilation of xxlimited when Python has been
15435  built with Py_DEBUG defined.
15436
15437- bpo-28731: Optimize _PyDict_NewPresized() to create correct size dict.
15438  Improve speed of dict literal with constant keys up to 30%.
15439
15440Library
15441-------
15442
15443- bpo-29169: Update zlib to 1.2.11.
15444
15445- bpo-29623: Allow use of path-like object as a single argument in
15446  ConfigParser.read(). Patch by David Ellis.
15447
15448- bpo-28963: Fix out of bound iteration in
15449  asyncio.Future.remove_done_callback implemented in C.
15450
15451- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes
15452  before all pipes are closed.
15453
15454- bpo-29271: Fix Task.current_task and Task.all_tasks implemented in C to
15455  accept None argument as their pure Python implementation.
15456
15457- bpo-29703: Fix asyncio to support instantiation of new event loops in
15458  child processes.
15459
15460- bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
15461
15462- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts
15463  PathLike objects.  Patch by Sayan Chowdhury.
15464
15465- bpo-28518: Start a transaction implicitly before a DML statement. Patch by
15466  Aviv Palivoda.
15467
15468- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no
15469  longer affects a partial object after creation.
15470
15471- bpo-29110: Fix file object leak in aifc.open() when file is given as a
15472  filesystem path and is not in valid AIFF format. Patch by Anthony Zhang.
15473
15474- bpo-28556: Various updates to typing module: typing.Counter,
15475  typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle
15476  Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa.
15477
15478- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python
15479  3.6.0: check minimum and maximum years.
15480
15481- bpo-29519: Fix weakref spewing exceptions during interpreter shutdown when
15482  used with a rare combination of multiprocessing and custom codecs.
15483
15484- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir
15485
15486- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the
15487  match object. Based on patch by WGH.
15488
15489- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited
15490  to a stopped instead of terminated state (ex: when under ptrace).
15491
15492- bpo-29290: Fix a regression in argparse that help messages would wrap at
15493  non-breaking spaces.
15494
15495- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY.
15496
15497- bpo-29316: Restore the provisional status of typing module, add
15498  corresponding note to documentation. Patch by Ivan L.
15499
15500- bpo-29219: Fixed infinite recursion in the repr of uninitialized
15501  ctypes.CDLL instances.
15502
15503- bpo-29011: Fix an important omission by adding Deque to the typing module.
15504
15505- bpo-28969: Fixed race condition in C implementation of
15506  functools.lru_cache. KeyError could be raised when cached function with
15507  full cache was simultaneously called from different threads with the same
15508  uncached arguments.
15509
15510- bpo-29142: In urllib.request, suffixes in no_proxy environment variable
15511  with leading dots could match related hostnames again (e.g. .b.c matches
15512  a.b.c). Patch by Milan Oberkirch.
15513
15514- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter
15515  anymore. Patch written by Jiajun Huang.
15516
15517- bpo-29203: functools.lru_cache() now respects :pep:`468` and preserves the
15518  order of keyword arguments.  f(a=1, b=2) is now cached separately from
15519  f(b=2, a=1) since both calls could potentially give different results.
15520
15521- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a
15522  context. Patch by Sam Breese.
15523
15524- bpo-29094: Offsets in a ZIP file created with extern file object and modes
15525  "w" and "x" now are relative to the start of the file.
15526
15527- bpo-29085: Allow random.Random.seed() to use high quality OS randomness
15528  rather than the pid and time.
15529
15530- bpo-29061: Fixed bug in secrets.randbelow() which would hang when given a
15531  negative input.  Patch by Brendan Donegan.
15532
15533- bpo-29079: Prevent infinite loop in pathlib.resolve() on Windows
15534
15535- bpo-13051: Fixed recursion errors in large or resized
15536  curses.textpad.Textbox.  Based on patch by Tycho Andersen.
15537
15538- bpo-29119: Fix weakrefs in the pure python version of
15539  collections.OrderedDict move_to_end() method. Contributed by Andra
15540  Bogildea.
15541
15542- bpo-9770: curses.ascii predicates now work correctly with negative
15543  integers.
15544
15545- bpo-28427: old keys should not remove new values from WeakValueDictionary
15546  when collecting from another thread.
15547
15548- bpo-28923: Remove editor artifacts from Tix.py.
15549
15550- bpo-29055: Neaten-up empty population error on random.choice() by
15551  suppressing the upstream exception.
15552
15553- bpo-28871: Fixed a crash when deallocate deep ElementTree.
15554
15555- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and
15556  WeakValueDictionary.pop() when a GC collection happens in another thread.
15557
15558- bpo-20191: Fixed a crash in resource.prlimit() when passing a sequence
15559  that doesn't own its elements as limits.
15560
15561- bpo-28779: multiprocessing.set_forkserver_preload() would crash the
15562  forkserver process if a preloaded module instantiated some multiprocessing
15563  objects such as locks.
15564
15565- bpo-28847: dbm.dumb now supports reading read-only files and no longer
15566  writes the index file when it is not changed.
15567
15568- bpo-26937: The chown() method of the tarfile.TarFile class does not fail
15569  now when the grp module cannot be imported, as for example on Android
15570  platforms.
15571
15572IDLE
15573----
15574
15575- bpo-29071: IDLE colors f-string prefixes (but not invalid ur prefixes).
15576
15577- bpo-28572: Add 10% to coverage of IDLE's test_configdialog. Update and
15578  augment description of the configuration system.
15579
15580Windows
15581-------
15582
15583- bpo-29579: Removes readme.txt from the installer
15584
15585- bpo-29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev)
15586
15587- bpo-28164: Correctly handle special console filenames (patch by Eryk Sun)
15588
15589- bpo-29409: Implement :pep:`529` for io.FileIO (Patch by Eryk Sun)
15590
15591- bpo-29392: Prevent crash when passing invalid arguments into msvcrt
15592  module.
15593
15594- bpo-25778: winreg does not truncate string correctly (Patch by Eryk Sun)
15595
15596- bpo-28896: Deprecate WindowsRegistryFinder and disable it by default.
15597
15598C API
15599-----
15600
15601- bpo-27867: Function PySlice_GetIndicesEx() is replaced with a macro if
15602  Py_LIMITED_API is not set or set to the value between 0x03050400 and
15603  0x03060000 (not including) or 0x03060100 or higher.
15604
15605- bpo-29083: Fixed the declaration of some public API functions.
15606  PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in
15607  limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and
15608  Py_BuildValue() were not available in limited API of version < 3.3 when
15609  PY_SSIZE_T_CLEAN is defined.
15610
15611- bpo-29058: All stable API extensions added after Python 3.2 are now
15612  available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of
15613  the minimum Python version supporting this API.
15614
15615Documentation
15616-------------
15617
15618- bpo-28929: Link the documentation to its source file on GitHub.
15619
15620- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer
15621  to aiosmtpd, a third-party asyncio-based replacement.
15622
15623- bpo-26355: Add canonical header link on each page to corresponding major
15624  version of the documentation. Patch by Matthias Bussonnier.
15625
15626- bpo-29349: Fix Python 2 syntax in code for building the documentation.
15627
15628Tests
15629-----
15630
15631- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. Skip
15632  some tests of select.poll when running on macOS due to unresolved issues
15633  with the underlying system poll function on some macOS versions.
15634
15635- bpo-29571: to match the behaviour of the ``re.LOCALE`` flag,
15636  test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)``
15637  to determine the candidate encoding for the test regex (allowing it to
15638  correctly skip the test when the default locale encoding is a multi-byte
15639  encoding)
15640
15641- bpo-28950: Disallow -j0 to be combined with -T/-l in regrtest command line
15642  arguments.
15643
15644- bpo-28683: Fix the tests that bind() a unix socket and raise
15645  PermissionError on Android for a non-root user.
15646
15647- bpo-26939: Add the support.setswitchinterval() function to fix
15648  test_functools hanging on the Android armv7 qemu emulator.
15649
15650Build
15651-----
15652
15653- bpo-27593: sys.version and the platform module python_build(),
15654  python_branch(), and python_revision() functions now use git information
15655  rather than hg when building from a repo.
15656
15657- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k.
15658
15659- bpo-26851: Set Android compilation and link flags.
15660
15661- bpo-28768: Fix implicit declaration of function _setmode. Patch by
15662  Masayuki Yamamoto
15663
15664- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat
15665
15666- bpo-23903: Added missed names to PC/python3.def.
15667
15668- bpo-28762: lockf() is available on Android API level 24, but the F_LOCK
15669  macro is not defined in android-ndk-r13.
15670
15671- bpo-28538: Fix the compilation error that occurs because if_nameindex() is
15672  available on Android API level 24, but the if_nameindex structure is not
15673  defined.
15674
15675- bpo-20211: Do not add the directory for installing C header files and the
15676  directory for installing object code libraries to the cross compilation
15677  search paths. Original patch by Thomas Petazzoni.
15678
15679- bpo-28849: Do not define sys.implementation._multiarch on Android.
15680
15681
15682What's New in Python 3.6.0 final?
15683=================================
15684
15685*Release date: 2016-12-23*
15686
15687No changes since release candidate 2
15688
15689
15690
15691What's New in Python 3.6.0 release candidate 2?
15692===============================================
15693
15694*Release date: 2016-12-16*
15695
15696Core and Builtins
15697-----------------
15698
15699- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must
15700  not convert combined table into split table. Patch written by INADA Naoki.
15701
15702- bpo-28990: Fix asyncio SSL hanging if connection is closed before
15703  handshake is completed. (Patch by HoHo-Ho)
15704
15705Tools/Demos
15706-----------
15707
15708- bpo-28770: Fix python-gdb.py for fastcalls.
15709
15710Windows
15711-------
15712
15713- bpo-28896: Deprecate WindowsRegistryFinder.
15714
15715Build
15716-----
15717
15718- bpo-28898: Prevent gdb build errors due to HAVE_LONG_LONG redefinition.
15719
15720
15721What's New in Python 3.6.0 release candidate 1?
15722===============================================
15723
15724*Release date: 2016-12-06*
15725
15726Core and Builtins
15727-----------------
15728
15729- bpo-23722: Rather than silently producing a class that doesn't support
15730  zero-argument ``super()`` in methods, failing to pass the new
15731  ``__classcell__`` namespace entry up to ``type.__new__`` now results in a
15732  ``DeprecationWarning`` and a class that supports zero-argument
15733  ``super()``.
15734
15735- bpo-28797: Modifying the class __dict__ inside the __set_name__ method of
15736  a descriptor that is used inside that class no longer prevents calling the
15737  __set_name__ method of other descriptors.
15738
15739- bpo-28782: Fix a bug in the implementation ``yield from`` when checking if
15740  the next instruction is YIELD_FROM. Regression introduced by WORDCODE
15741  (issue #26647).
15742
15743Library
15744-------
15745
15746- bpo-27030: Unknown escapes in re.sub() replacement template are allowed
15747  again.  But they still are deprecated and will be disabled in 3.7.
15748
15749- bpo-28835: Fix a regression introduced in warnings.catch_warnings(): call
15750  warnings.showwarning() if it was overridden inside the context manager.
15751
15752- bpo-27172: To assist with upgrades from 2.7, the previously documented
15753  deprecation of ``inspect.getfullargspec()`` has been reversed. This
15754  decision may be revisited again after the Python 2.7 branch is no longer
15755  officially supported.
15756
15757- bpo-26273: Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and
15758  :data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by
15759  Omar Sandoval.
15760
15761- bpo-24142: Reading a corrupt config file left configparser in an invalid
15762  state. Original patch by Florian Höch.
15763
15764- bpo-28843: Fix asyncio C Task to handle exceptions __traceback__.
15765
15766C API
15767-----
15768
15769- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
15770
15771Documentation
15772-------------
15773
15774- bpo-23722: The data model reference and the porting section in the What's
15775  New guide now cover the additional ``__classcell__`` handling needed for
15776  custom metaclasses to fully support :pep:`487` and zero-argument
15777  ``super()``.
15778
15779Tools/Demos
15780-----------
15781
15782- bpo-28023: Fix python-gdb.py didn't support new dict implementation.
15783
15784
15785What's New in Python 3.6.0 beta 4?
15786==================================
15787
15788*Release date: 2016-11-21*
15789
15790Core and Builtins
15791-----------------
15792
15793- bpo-28532: Show sys.version when -V option is supplied twice.
15794
15795- bpo-27100: The with-statement now checks for __enter__ before it checks
15796  for __exit__. This gives less confusing error messages when both methods
15797  are missing. Patch by Jonathan Ellington.
15798
15799- bpo-28746: Fix the set_inheritable() file descriptor method on platforms
15800  that do not have the ioctl FIOCLEX and FIONCLEX commands.
15801
15802- bpo-26920: Fix not getting the locale's charset upon initializing the
15803  interpreter, on platforms that do not have langinfo.
15804
15805- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
15806  when decode astral characters.  Patch by Xiang Zhang.
15807
15808- bpo-19398: Extra slash no longer added to sys.path components in case of
15809  empty compile-time PYTHONPATH components.
15810
15811- bpo-28665: Improve speed of the STORE_DEREF opcode by 40%.
15812
15813- bpo-28583: PyDict_SetDefault didn't combine split table when needed. Patch
15814  by Xiang Zhang.
15815
15816- bpo-27243: Change PendingDeprecationWarning -> DeprecationWarning. As it
15817  was agreed in the issue, __aiter__ returning an awaitable should result in
15818  PendingDeprecationWarning in 3.5 and in DeprecationWarning in 3.6.
15819
15820- bpo-26182: Fix a refleak in code that raises DeprecationWarning.
15821
15822- bpo-28721: Fix asynchronous generators aclose() and athrow() to handle
15823  StopAsyncIteration propagation properly.
15824
15825Library
15826-------
15827
15828- bpo-28752: Restored the __reduce__() methods of datetime objects.
15829
15830- bpo-28727: Regular expression patterns, _sre.SRE_Pattern objects created
15831  by re.compile(), become comparable (only x==y and x!=y operators). This
15832  change should fix the issue #18383: don't duplicate warning filters when
15833  the warnings module is reloaded (thing usually only done in unit tests).
15834
15835- bpo-20572: The subprocess.Popen.wait method's undocumented endtime
15836  parameter now raises a DeprecationWarning.
15837
15838- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and
15839  from_buffer_copy() methods on abstract classes like Array.
15840
15841- bpo-19717: Makes Path.resolve() succeed on paths that do not exist. Patch
15842  by Vajrasky Kok
15843
15844- bpo-28563: Fixed possible DoS and arbitrary code execution when handle
15845  plural form selections in the gettext module.  The expression parser now
15846  supports exact syntax supported by GNU gettext.
15847
15848- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the
15849  garbage collector is invoked in other thread.  Based on patch by Sebastian
15850  Cufre.
15851
15852- bpo-28600: Optimize loop.call_soon.
15853
15854- bpo-28613: Fix get_event_loop() return the current loop if called from
15855  coroutines/callbacks.
15856
15857- bpo-28634: Fix asyncio.isfuture() to support unittest.Mock.
15858
15859- bpo-26081: Fix refleak in _asyncio.Future.__iter__().throw.
15860
15861- bpo-28639: Fix inspect.isawaitable to always return bool Patch by Justin
15862  Mayfield.
15863
15864- bpo-28652: Make loop methods reject socket kinds they do not support.
15865
15866- bpo-28653: Fix a refleak in functools.lru_cache.
15867
15868- bpo-28703: Fix asyncio.iscoroutinefunction to handle Mock objects.
15869
15870- bpo-28704: Fix create_unix_server to support Path-like objects (PEP 519).
15871
15872- bpo-28720: Add collections.abc.AsyncGenerator.
15873
15874Documentation
15875-------------
15876
15877- bpo-28513: Documented command-line interface of zipfile.
15878
15879Tests
15880-----
15881
15882- bpo-28666: Now test.support.rmtree is able to remove unwritable or
15883  unreadable directories.
15884
15885- bpo-23839: Various caches now are cleared before running every test file.
15886
15887Build
15888-----
15889
15890- bpo-10656: Fix out-of-tree building on AIX.  Patch by Tristan Carel and
15891  Michael Haubenwallner.
15892
15893- bpo-26359: Rename --with-optimiations to --enable-optimizations.
15894
15895- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS.
15896  Patch by Gareth Rees.
15897
15898
15899What's New in Python 3.6.0 beta 3?
15900==================================
15901
15902*Release date: 2016-10-31*
15903
15904Core and Builtins
15905-----------------
15906
15907- bpo-28128: Deprecation warning for invalid str and byte escape sequences
15908  now prints better information about where the error occurs. Patch by
15909  Serhiy Storchaka and Eric Smith.
15910
15911- bpo-28509: dict.update() no longer allocate unnecessary large memory.
15912
15913- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
15914  build.
15915
15916- bpo-28517: Fixed of-by-one error in the peephole optimizer that caused
15917  keeping unreachable code.
15918
15919- bpo-28214: Improved exception reporting for problematic __set_name__
15920  attributes.
15921
15922- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception
15923  loss in PyTraceBack_Here().
15924
15925- bpo-28471: Fix "Python memory allocator called without holding the GIL"
15926  crash in socket.setblocking.
15927
15928Library
15929-------
15930
15931- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if
15932  given empty data twice.  Patch by Benjamin Fogle.
15933
15934- bpo-28549: Fixed segfault in curses's addch() with ncurses6.
15935
15936- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar
15937  file with compression before trying to open it without compression.
15938  Otherwise it had 50% chance failed with ignore_zeros=True.
15939
15940- bpo-23262: The webbrowser module now supports Firefox 36+ and derived
15941  browsers.  Based on patch by Oleg Broytman.
15942
15943- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
15944  by representing the scale as float value internally in Tk.  tkinter.IntVar
15945  now works if float value is set to underlying Tk variable.
15946
15947- bpo-18844: The various ways of specifying weights for random.choices() now
15948  produce the same result sequences.
15949
15950- bpo-28255: calendar.TextCalendar().prmonth() no longer prints a space at
15951  the start of new line after printing a month's calendar.  Patch by Xiang
15952  Zhang.
15953
15954- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces.
15955  Based on patch by Kaarle Ritvanen.
15956
15957- bpo-28353: os.fwalk() no longer fails on broken links.
15958
15959- bpo-28430: Fix iterator of C implemented asyncio.Future doesn't accept
15960  non-None value is passed to it.send(val).
15961
15962- bpo-27025: Generated names for Tkinter widgets now start by the "!" prefix
15963  for readability.
15964
15965- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a
15966  workaround to Tix library bug.
15967
15968- bpo-28488: shutil.make_archive() no longer adds entry "./" to ZIP archive.
15969
15970- bpo-25953: re.sub() now raises an error for invalid numerical group
15971  reference in replacement template even if the pattern is not found in the
15972  string.  Error message for invalid group reference now includes the group
15973  index and the position of the reference. Based on patch by SilentGhost.
15974
15975- bpo-18219: Optimize csv.DictWriter for large number of columns. Patch by
15976  Mariatta Wijaya.
15977
15978- bpo-28448: Fix C implemented asyncio.Future didn't work on Windows.
15979
15980- bpo-28480: Fix error building socket module when multithreading is
15981  disabled.
15982
15983- bpo-24452: Make webbrowser support Chrome on Mac OS X.
15984
15985- bpo-20766: Fix references leaked by pdb in the handling of SIGINT
15986  handlers.
15987
15988- bpo-28492: Fix how StopIteration exception is raised in _asyncio.Future.
15989
15990- bpo-28500: Fix asyncio to handle async gens GC from another thread.
15991
15992- bpo-26923: Fix asyncio.Gather to refuse being cancelled once all children
15993  are done. Patch by Johannes Ebke.
15994
15995- bpo-26796: Don't configure the number of workers for default threadpool
15996  executor. Initial patch by Hans Lawrenz.
15997
15998- bpo-28544: Implement asyncio.Task in C.
15999
16000Windows
16001-------
16002
16003- bpo-28522: Fixes mishandled buffer reallocation in getpathp.c
16004
16005Build
16006-----
16007
16008- bpo-28444: Fix missing extensions modules when cross compiling.
16009
16010- bpo-28208: Update Windows build and OS X installers to use SQLite 3.14.2.
16011
16012- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j.
16013
16014Tests
16015-----
16016
16017- bpo-26944: Fix test_posix for Android where 'id -G' is entirely wrong or
16018  missing the effective gid.
16019
16020- bpo-28409: regrtest: fix the parser of command line arguments.
16021
16022
16023What's New in Python 3.6.0 beta 2?
16024==================================
16025
16026*Release date: 2016-10-10*
16027
16028Core and Builtins
16029-----------------
16030
16031- bpo-28183: Optimize and cleanup dict iteration.
16032
16033- bpo-26081: Added C implementation of asyncio.Future. Original patch by
16034  Yury Selivanov.
16035
16036- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
16037  Patch by Xiang Zhang.
16038
16039- bpo-28376: The type of long range iterator is now registered as Iterator.
16040  Patch by Oren Milman.
16041
16042- bpo-28376: Creating instances of range_iterator by calling range_iterator
16043  type now is deprecated.  Patch by Oren Milman.
16044
16045- bpo-28376: The constructor of range_iterator now checks that step is not
16046  0. Patch by Oren Milman.
16047
16048- bpo-26906: Resolving special methods of uninitialized type now causes
16049  implicit initialization of the type instead of a fail.
16050
16051- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original
16052  patch by Niklas Koep.
16053
16054- bpo-24098: Fixed possible crash when AST is changed in process of
16055  compiling it.
16056
16057- bpo-28201: Dict reduces possibility of 2nd conflict in hash table when
16058  hashes have same lower bits.
16059
16060- bpo-28350: String constants with null character no longer interned.
16061
16062- bpo-26617: Fix crash when GC runs during weakref callbacks.
16063
16064- bpo-27942: String constants now interned recursively in tuples and
16065  frozensets.
16066
16067- bpo-21578: Fixed misleading error message when ImportError called with
16068  invalid keyword args.
16069
16070- bpo-28203: Fix incorrect type in complex(1.0, {2:3}) error message. Patch
16071  by Soumya Sharma.
16072
16073- bpo-28086: Single var-positional argument of tuple subtype was passed
16074  unscathed to the C-defined function.  Now it is converted to exact tuple.
16075
16076- bpo-28214: Now __set_name__ is looked up on the class instead of the
16077  instance.
16078
16079- bpo-27955: Fallback on reading /dev/urandom device when the getrandom()
16080  syscall fails with EPERM, for example when blocked by SECCOMP.
16081
16082- bpo-28192: Don't import readline in isolated mode.
16083
16084- Upgrade internal unicode databases to Unicode version 9.0.0.
16085
16086- bpo-28131: Fix a regression in zipimport's compile_source().  zipimport
16087  should use the same optimization level as the interpreter.
16088
16089- bpo-28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly
16090  optimize memcpy().
16091
16092- bpo-28120: Fix dict.pop() for splitted dictionary when trying to remove a
16093  "pending key" (Not yet inserted in split-table). Patch by Xiang Zhang.
16094
16095- bpo-26182: Raise DeprecationWarning when async and await keywords are used
16096  as variable/attribute/class/function name.
16097
16098Library
16099-------
16100
16101- bpo-27998: Fixed bytes path support in os.scandir() on Windows. Patch by
16102  Eryk Sun.
16103
16104- bpo-28317: The disassembler now decodes FORMAT_VALUE argument.
16105
16106- bpo-26293: Fixed writing ZIP files that starts not from the start of the
16107  file.  Offsets in ZIP file now are relative to the start of the archive in
16108  conforming to the specification.
16109
16110- bpo-28380: unittest.mock Mock autospec functions now properly support
16111  assert_called, assert_not_called, and assert_called_once.
16112
16113- bpo-27181: remove statistics.geometric_mean and defer until 3.7.
16114
16115- bpo-28229: lzma module now supports pathlib.
16116
16117- bpo-28321: Fixed writing non-BMP characters with binary format in
16118  plistlib.
16119
16120- bpo-28225: bz2 module now supports pathlib.  Initial patch by Ethan
16121  Furman.
16122
16123- bpo-28227: gzip now supports pathlib.  Patch by Ethan Furman.
16124
16125- bpo-27358: Optimized merging var-keyword arguments and improved error
16126  message when passing a non-mapping as a var-keyword argument.
16127
16128- bpo-28257: Improved error message when passing a non-iterable as a
16129  var-positional argument.  Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
16130
16131- bpo-28322: Fixed possible crashes when unpickle itertools objects from
16132  incorrect pickle data.  Based on patch by John Leitch.
16133
16134- bpo-28228: imghdr now supports pathlib.
16135
16136- bpo-28226: compileall now supports pathlib.
16137
16138- bpo-28314: Fix function declaration (C flags) for the getiterator() method
16139  of xml.etree.ElementTree.Element.
16140
16141- bpo-28148: Stop using localtime() and gmtime() in the time module.
16142  Introduced platform independent _PyTime_localtime API that is similar to
16143  POSIX localtime_r, but available on all platforms.  Patch by Ed Schouten.
16144
16145- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and
16146  9999-12. Methods itermonthdays() and itermonthdays2() are reimplemented so
16147  that they don't call itermonthdates() which can cause datetime.date
16148  under/overflow.
16149
16150- bpo-28275: Fixed possible use after free in the decompress() methods of
16151  the LZMADecompressor and BZ2Decompressor classes. Original patch by John
16152  Leitch.
16153
16154- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation()
16155  if pass invalid string-like object as a name.  Patch by Xiang Zhang.
16156
16157- bpo-18844: random.choices() now has k as a keyword-only argument to
16158  improve the readability of common cases and come into line with the
16159  signature used in other languages.
16160
16161- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py.
16162  Patch by Madison May.
16163
16164- bpo-27611: Fixed support of default root window in the tkinter.tix module.
16165  Added the master parameter in the DisplayStyle constructor.
16166
16167- bpo-27348: In the traceback module, restore the formatting of exception
16168  messages like "Exception: None".  This fixes a regression introduced in
16169  3.5a2.
16170
16171- bpo-25651: Allow falsy values to be used for msg parameter of subTest().
16172
16173- bpo-27778: Fix a memory leak in os.getrandom() when the getrandom() is
16174  interrupted by a signal and a signal handler raises a Python exception.
16175
16176- bpo-28200: Fix memory leak on Windows in the os module (fix
16177  path_converter() function).
16178
16179- bpo-25400: RobotFileParser now correctly returns default values for
16180  crawl_delay and request_rate.  Initial patch by Peter Wirtz.
16181
16182- bpo-27932: Prevent memory leak in win32_ver().
16183
16184- Fix UnboundLocalError in socket._sendfile_use_sendfile.
16185
16186- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of
16187  os.stat().  Patch by Eryk Sun.
16188
16189- bpo-22493: Warning message emitted by using inline flags in the middle of
16190  regular expression now contains a (truncated) regex pattern. Patch by Tim
16191  Graham.
16192
16193- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an
16194  empty bytestring is passed.
16195
16196- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam.
16197
16198- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by
16199  Gergely Imreh and Markus Holtermann.
16200
16201- bpo-28114: Fix a crash in parse_envlist() when env contains byte strings.
16202  Patch by Eryk Sun.
16203
16204- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and
16205  binascii.a2b_qp().
16206
16207- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by
16208  Kevin Conway.
16209
16210- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by
16211  Seth Michael Larson.
16212
16213- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by
16214  iceboy.
16215
16216- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki.
16217
16218- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect.
16219
16220- bpo-27759: Fix selectors incorrectly retain invalid file descriptors.
16221  Patch by Mark Williams.
16222
16223- bpo-28368: Refuse monitoring processes if the child watcher has no loop
16224  attached. Patch by Vincent Michel.
16225
16226- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader,
16227  add_writer, etc.
16228
16229- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг
16230  Марк.
16231
16232- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor.
16233
16234- bpo-28372: Fix asyncio to support formatting of non-python coroutines.
16235
16236- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг
16237  Марк.
16238
16239- bpo-27972: Prohibit Tasks to await on themselves.
16240
16241Windows
16242-------
16243
16244- bpo-28402: Adds signed catalog files for stdlib on Windows.
16245
16246- bpo-28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk
16247  Sun)
16248
16249- bpo-28251: Improvements to help manuals on Windows.
16250
16251- bpo-28110: launcher.msi has different product codes between 32-bit and
16252  64-bit
16253
16254- bpo-28161: Opening CON for write access fails
16255
16256- bpo-28162: WindowsConsoleIO readall() fails if first line starts with
16257  Ctrl+Z
16258
16259- bpo-28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle
16260
16261- bpo-28164: _PyIO_get_console_type fails for various paths
16262
16263- bpo-28137: Renames Windows path file to ._pth
16264
16265- bpo-28138: Windows ._pth file should allow import site
16266
16267C API
16268-----
16269
16270- bpo-28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(),
16271  PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and
16272  PyUnicode_AsEncodedUnicode().
16273
16274Build
16275-----
16276
16277- bpo-28258: Fixed build with Estonian locale (python-config and distclean
16278  targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.
16279
16280- bpo-26661: setup.py now detects system libffi with multiarch wrapper.
16281
16282- bpo-15819: Remove redundant include search directory option for building
16283  outside the source tree.
16284
16285Tests
16286-----
16287
16288- bpo-28217: Adds _testconsole module to test console input.
16289
16290
16291What's New in Python 3.6.0 beta 1?
16292==================================
16293
16294*Release date: 2016-09-12*
16295
16296Core and Builtins
16297-----------------
16298
16299- bpo-23722: The __class__ cell used by zero-argument super() is now
16300  initialized from type.__new__ rather than __build_class__, so class
16301  methods relying on that will now work correctly when called from metaclass
16302  methods during class creation. Patch by Martin Teichmann.
16303
16304- bpo-25221: Fix corrupted result from PyLong_FromLong(0) when Python is
16305  compiled with NSMALLPOSINTS = 0.
16306
16307- bpo-27080: Implement formatting support for :pep:`515`.  Initial patch by
16308  Chris Angelico.
16309
16310- bpo-27199: In tarfile, expose copyfileobj bufsize to improve throughput.
16311  Patch by Jason Fried.
16312
16313- bpo-27948: In f-strings, only allow backslashes inside the braces (where
16314  the expressions are).  This is a breaking change from the 3.6 alpha
16315  releases, where backslashes are allowed anywhere in an f-string.  Also,
16316  require that expressions inside f-strings be enclosed within literal
16317  braces, and not escapes like ``f'\x7b"hi"\x7d'``.
16318
16319- bpo-28046: Remove platform-specific directories from sys.path.
16320
16321- bpo-28071: Add early-out for differencing from an empty set.
16322
16323- bpo-25758: Prevents zipimport from unnecessarily encoding a filename
16324  (patch by Eryk Sun)
16325
16326- bpo-25856: The __module__ attribute of extension classes and functions now
16327  is interned. This leads to more compact pickle data with protocol 4.
16328
16329- bpo-27213: Rework CALL_FUNCTION* opcodes to produce shorter and more
16330  efficient bytecode. Patch by Demur Rumed, design by Serhiy Storchaka,
16331  reviewed by Serhiy Storchaka and Victor Stinner.
16332
16333- bpo-26331: Implement tokenizing support for :pep:`515`. Patch by Georg
16334  Brandl.
16335
16336- bpo-27999: Make "global after use" a SyntaxError, and ditto for nonlocal.
16337  Patch by Ivan Levkivskyi.
16338
16339- bpo-28003: Implement :pep:`525` -- Asynchronous Generators.
16340
16341- bpo-27985: Implement :pep:`526` -- Syntax for Variable Annotations. Patch
16342  by Ivan Levkivskyi.
16343
16344- bpo-26058: Add a new private version to the builtin dict type, incremented
16345  at each dictionary creation and at each dictionary change. Implementation
16346  of the PEP 509.
16347
16348- bpo-27364: A backslash-character pair that is not a valid escape sequence
16349  now generates a DeprecationWarning.  Patch by Emanuel Barry.
16350
16351- bpo-27350: `dict` implementation is changed like PyPy. It is more compact
16352  and preserves insertion order. (Concept developed by Raymond Hettinger and
16353  patch by Inada Naoki.)
16354
16355- bpo-27911: Remove unnecessary error checks in
16356  ``exec_builtin_or_dynamic()``.
16357
16358- bpo-27078: Added BUILD_STRING opcode.  Optimized f-strings evaluation.
16359
16360- bpo-17884: Python now requires systems with inttypes.h and stdint.h
16361
16362- bpo-27961: Require platforms to support ``long long``. Python hasn't
16363  compiled without ``long long`` for years, so this is basically a
16364  formality.
16365
16366- bpo-27355: Removed support for Windows CE.  It was never finished, and
16367  Windows CE is no longer a relevant platform for Python.
16368
16369- Implement :pep:`523`.
16370
16371- bpo-27870: A left shift of zero by a large integer no longer attempts to
16372  allocate large amounts of memory.
16373
16374- bpo-25402: In int-to-decimal-string conversion, improve the estimate of
16375  the intermediate memory required, and remove an unnecessarily strict
16376  overflow check. Patch by Serhiy Storchaka.
16377
16378- bpo-27214: In long_invert, be more careful about modifying object returned
16379  by long_add, and remove an unnecessary check for small longs. Thanks Oren
16380  Milman for analysis and patch.
16381
16382- bpo-27506: Support passing the bytes/bytearray.translate() "delete"
16383  argument by keyword.
16384
16385- bpo-27812: Properly clear out a generator's frame's backreference to the
16386  generator to prevent crashes in frame.clear().
16387
16388- bpo-27811: Fix a crash when a coroutine that has not been awaited is
16389  finalized with warnings-as-errors enabled.
16390
16391- bpo-27587: Fix another issue found by PVS-Studio: Null pointer check after
16392  use of 'def' in _PyState_AddModule(). Initial patch by Christian Heimes.
16393
16394- bpo-27792: The modulo operation applied to ``bool`` and other ``int``
16395  subclasses now always returns an ``int``. Previously the return type
16396  depended on the input values. Patch by Xiang Zhang.
16397
16398- bpo-26984: int() now always returns an instance of exact int.
16399
16400- bpo-25604: Fix a minor bug in integer true division; this bug could
16401  potentially have caused off-by-one-ulp results on platforms with
16402  unreliable ldexp implementations.
16403
16404- bpo-24254: Make class definition namespace ordered by default.
16405
16406- bpo-27662: Fix an overflow check in ``List_New``: the original code was
16407  checking against ``Py_SIZE_MAX`` instead of the correct upper bound of
16408  ``Py_SSIZE_T_MAX``. Patch by Xiang Zhang.
16409
16410- bpo-27782: Multi-phase extension module import now correctly allows the
16411  ``m_methods`` field to be used to add module level functions to instances
16412  of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang.
16413
16414- bpo-27936: The round() function accepted a second None argument for some
16415  types but not for others.  Fixed the inconsistency by accepting None for
16416  all numeric types.
16417
16418- bpo-27487: Warn if a submodule argument to "python -m" or
16419  runpy.run_module() is found in sys.modules after parent packages are
16420  imported, but before the submodule is executed.
16421
16422- bpo-27157: Make only type() itself accept the one-argument form. Patch by
16423  Eryk Sun and Emanuel Barry.
16424
16425- bpo-27558: Fix a SystemError in the implementation of "raise" statement.
16426  In a brand new thread, raise a RuntimeError since there is no active
16427  exception to reraise. Patch written by Xiang Zhang.
16428
16429- bpo-28008: Implement :pep:`530` -- asynchronous comprehensions.
16430
16431- bpo-27942: Fix memory leak in codeobject.c
16432
16433Library
16434-------
16435
16436- bpo-28732: Fix crash in os.spawnv() with no elements in args
16437
16438- bpo-28485: Always raise ValueError for negative
16439  compileall.compile_dir(workers=...) parameter, even when multithreading is
16440  unavailable.
16441
16442- bpo-28037: Use sqlite3_get_autocommit() instead of setting
16443  Connection->inTransaction manually.
16444
16445- bpo-25283: Attributes tm_gmtoff and tm_zone are now available on all
16446  platforms in the return values of time.localtime() and time.gmtime().
16447
16448- bpo-24454: Regular expression match object groups are now accessible using
16449  __getitem__. "mo[x]" is equivalent to "mo.group(x)".
16450
16451- bpo-10740: sqlite3 no longer implicitly commit an open transaction before
16452  DDL statements.
16453
16454- bpo-17941: Add a *module* parameter to collections.namedtuple().
16455
16456- bpo-22493: Inline flags now should be used only at the start of the
16457  regular expression. Deprecation warning is emitted if uses them in the
16458  middle of the regular expression.
16459
16460- bpo-26885: xmlrpc now supports unmarshalling additional data types used by
16461  Apache XML-RPC implementation for numerics and None.
16462
16463- bpo-28070: Fixed parsing inline verbose flag in regular expressions.
16464
16465- bpo-19500: Add client-side SSL session resumption to the ssl module.
16466
16467- bpo-28022: Deprecate ssl-related arguments in favor of SSLContext. The
16468  deprecation include manual creation of SSLSocket and certfile/keyfile (or
16469  similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib.
16470
16471- bpo-28043: SSLContext has improved default settings: OP_NO_SSLv2,
16472  OP_NO_SSLv3, OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE,
16473  OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE and HIGH ciphers without MD5.
16474
16475- bpo-24693: Changed some RuntimeError's in the zipfile module to more
16476  appropriate types. Improved some error messages and debugging output.
16477
16478- bpo-17909: ``json.load`` and ``json.loads`` now support binary input
16479  encoded as UTF-8, UTF-16 or UTF-32. Patch by Serhiy Storchaka.
16480
16481- bpo-27137: the pure Python fallback implementation of
16482  ``functools.partial`` now matches the behaviour of its accelerated C
16483  counterpart for subclassing, pickling and text representation purposes.
16484  Patch by Emanuel Barry and Serhiy Storchaka.
16485
16486- Fix possible integer overflows and crashes in the mmap module with unusual
16487  usage patterns.
16488
16489- bpo-1703178: Fix the ability to pass the --link-objects option to the
16490  distutils build_ext command.
16491
16492- bpo-28019: itertools.count() no longer rounds non-integer step in range
16493  between 1.0 and 2.0 to 1.
16494
16495- bpo-18401: Pdb now supports the 'readrc' keyword argument to control
16496  whether .pdbrc files should be read.  Patch by Martin Matusiak and Sam
16497  Kimbrel.
16498
16499- bpo-25969: Update the lib2to3 grammar to handle the unpacking
16500  generalizations added in 3.5.
16501
16502- bpo-14977: mailcap now respects the order of the lines in the mailcap
16503  files ("first match"), as required by RFC 1542.  Patch by Michael Lazar.
16504
16505- bpo-28082: Convert re flag constants to IntFlag.
16506
16507- bpo-28025: Convert all ssl module constants to IntEnum and IntFlags.
16508  SSLContext properties now return flags and enums.
16509
16510- bpo-23591: Add Flag, IntFlag, and auto() to enum module.
16511
16512- bpo-433028: Added support of modifier spans in regular expressions.
16513
16514- bpo-24594: Validates persist parameter when opening MSI database
16515
16516- bpo-17582: xml.etree.ElementTree nows preserves whitespaces in attributes
16517  (Patch by Duane Griffin.  Reviewed and approved by Stefan Behnel.)
16518
16519- bpo-28047: Fixed calculation of line length used for the base64 CTE in the
16520  new email policies.
16521
16522- bpo-27576: Fix call order in OrderedDict.__init__().
16523
16524- email.generator.DecodedGenerator now supports the policy keyword.
16525
16526- bpo-28027: Remove undocumented modules from ``Lib/plat-*``: IN, CDROM,
16527  DLFCN, TYPES, CDIO, and STROPTS.
16528
16529- bpo-27445: Don't pass str(_charset) to MIMEText.set_payload(). Patch by
16530  Claude Paroz.
16531
16532- bpo-24277: The new email API is no longer provisional, and the docs have
16533  been reorganized and rewritten to emphasize the new API.
16534
16535- bpo-22450: urllib now includes an ``Accept: */*`` header among the default
16536  headers. This makes the results of REST API requests more consistent and
16537  predictable especially when proxy servers are involved.
16538
16539- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
16540  between runs given the same Grammar.txt input regardless of the hash
16541  randomization setting.
16542
16543- bpo-28005: Allow ImportErrors in encoding implementation to propagate.
16544
16545- bpo-26667: Support path-like objects in importlib.util.
16546
16547- bpo-27570: Avoid zero-length memcpy() etc calls with null source pointers
16548  in the "ctypes" and "array" modules.
16549
16550- bpo-22233: Break email header lines *only* on the RFC specified CR and LF
16551  characters, not on arbitrary unicode line breaks.  This also fixes a bug
16552  in HTTP header parsing.
16553
16554- bpo-27331: The email.mime classes now all accept an optional policy
16555  keyword.
16556
16557- bpo-27988: Fix email iter_attachments incorrect mutation of payload list.
16558
16559- bpo-16113: Add SHA-3 and SHAKE support to hashlib module.
16560
16561- Eliminate a tautological-pointer-compare warning in _scproxy.c.
16562
16563- bpo-27776: The :func:`os.urandom` function does now block on Linux 3.17
16564  and newer until the system urandom entropy pool is initialized to increase
16565  the security. This change is part of the :pep:`524`.
16566
16567- bpo-27778: Expose the Linux ``getrandom()`` syscall as a new
16568  :func:`os.getrandom` function. This change is part of the :pep:`524`.
16569
16570- bpo-27691: Fix ssl module's parsing of GEN_RID subject alternative name
16571  fields in X.509 certs.
16572
16573- bpo-18844: Add random.choices().
16574
16575- bpo-25761: Improved error reporting about truncated pickle data in C
16576  implementation of unpickler.  UnpicklingError is now raised instead of
16577  AttributeError and ValueError in some cases.
16578
16579- bpo-26798: Add BLAKE2 (blake2b and blake2s) to hashlib.
16580
16581- bpo-26032: Optimized globbing in pathlib by using os.scandir(); it is now
16582  about 1.5--4 times faster.
16583
16584- bpo-25596: Optimized glob() and iglob() functions in the glob module; they
16585  are now about 3--6 times faster.
16586
16587- bpo-27928: Add scrypt (password-based key derivation function) to hashlib
16588  module (requires OpenSSL 1.1.0).
16589
16590- bpo-27850: Remove 3DES from ssl module's default cipher list to counter
16591  measure sweet32 attack (CVE-2016-2183).
16592
16593- bpo-27766: Add ChaCha20 Poly1305 to ssl module's default cipher list.
16594  (Required OpenSSL 1.1.0 or LibreSSL).
16595
16596- bpo-25387: Check return value of winsound.MessageBeep.
16597
16598- bpo-27866: Add SSLContext.get_ciphers() method to get a list of all
16599  enabled ciphers.
16600
16601- bpo-27744: Add AF_ALG (Linux Kernel crypto) to socket module.
16602
16603- bpo-26470: Port ssl and hashlib module to OpenSSL 1.1.0.
16604
16605- bpo-11620: Fix support for SND_MEMORY in winsound.PlaySound.  Based on a
16606  patch by Tim Lesher.
16607
16608- bpo-11734: Add support for IEEE 754 half-precision floats to the struct
16609  module. Based on a patch by Eli Stevens.
16610
16611- bpo-27919: Deprecated ``extra_path`` distribution option in distutils
16612  packaging.
16613
16614- bpo-23229: Add new ``cmath`` constants: ``cmath.inf`` and ``cmath.nan`` to
16615  match ``math.inf`` and ``math.nan``, and also ``cmath.infj`` and
16616  ``cmath.nanj`` to match the format used by complex repr.
16617
16618- bpo-27842: The csv.DictReader now returns rows of type OrderedDict.
16619  (Contributed by Steve Holden.)
16620
16621- Remove support for passing a file descriptor to os.access. It never worked
16622  but previously didn't raise.
16623
16624- bpo-12885: Fix error when distutils encounters symlink.
16625
16626- bpo-27881: Fixed possible bugs when setting
16627  sqlite3.Connection.isolation_level. Based on patch by Xiang Zhang.
16628
16629- bpo-27861: Fixed a crash in sqlite3.Connection.cursor() when a factory
16630  creates not a cursor.  Patch by Xiang Zhang.
16631
16632- bpo-19884: Avoid spurious output on OS X with Gnu Readline.
16633
16634- bpo-27706: Restore deterministic behavior of random.Random().seed() for
16635  string seeds using seeding version 1.  Allows sequences of calls to
16636  random() to exactly match those obtained in Python 2. Patch by Nofar
16637  Schnider.
16638
16639- bpo-10513: Fix a regression in Connection.commit().  Statements should not
16640  be reset after a commit.
16641
16642- bpo-12319: Chunked transfer encoding support added to
16643  http.client.HTTPConnection requests.  The
16644  urllib.request.AbstractHTTPHandler class does not enforce a Content-Length
16645  header any more.  If a HTTP request has a file or iterable body, but no
16646  Content-Length header, the library now falls back to use chunked
16647  transfer-encoding.
16648
16649- A new version of typing.py from https://github.com/python/typing: -
16650  Collection (only for 3.6) (Issue #27598) - Add FrozenSet to __all__
16651  (upstream #261) - fix crash in _get_type_vars() (upstream #259) - Remove
16652  the dict constraint in ForwardRef._eval_type (upstream #252)
16653
16654- bpo-27832: Make ``_normalize`` parameter to ``Fraction`` constructor
16655  keyword-only, so that ``Fraction(2, 3, 4)`` now raises ``TypeError``.
16656
16657- bpo-27539: Fix unnormalised ``Fraction.__pow__`` result in the case of
16658  negative exponent and negative base.
16659
16660- bpo-21718: cursor.description is now available for queries using CTEs.
16661
16662- bpo-27819: In distutils sdists, simply produce the "gztar" (gzipped tar
16663  format) distributions on all platforms unless "formats" is supplied.
16664
16665- bpo-2466: posixpath.ismount now correctly recognizes mount points which
16666  the user does not have permission to access.
16667
16668- bpo-9998: On Linux, ctypes.util.find_library now looks in LD_LIBRARY_PATH
16669  for shared libraries.
16670
16671- bpo-27573: exit message for code.interact is now configurable.
16672
16673- bpo-27930: Improved behaviour of logging.handlers.QueueListener. Thanks to
16674  Paulo Andrade and Petr Viktorin for the analysis and patch.
16675
16676- bpo-6766: Distributed reference counting added to multiprocessing to
16677  support nesting of shared values / proxy objects.
16678
16679- bpo-21201: Improves readability of multiprocessing error message.  Thanks
16680  to Wojciech Walczak for patch.
16681
16682- asyncio: Add set_protocol / get_protocol to Transports.
16683
16684- bpo-27456: asyncio: Set TCP_NODELAY by default.
16685
16686IDLE
16687----
16688
16689- bpo-15308: Add 'interrupt execution' (^C) to Shell menu. Patch by Roger
16690  Serwy, updated by Bayard Randel.
16691
16692- bpo-27922: Stop IDLE tests from 'flashing' gui widgets on the screen.
16693
16694- bpo-27891: Consistently group and sort imports within idlelib modules.
16695
16696- bpo-17642: add larger font sizes for classroom projection.
16697
16698- Add version to title of IDLE help window.
16699
16700- bpo-25564: In section on IDLE -- console differences, mention that using
16701  exec means that __builtins__ is defined for each statement.
16702
16703- bpo-27821: Fix 3.6.0a3 regression that prevented custom key sets from
16704  being selected when no custom theme was defined.
16705
16706C API
16707-----
16708
16709- bpo-26900: Excluded underscored names and other private API from limited
16710  API.
16711
16712- bpo-26027: Add support for path-like objects in PyUnicode_FSConverter() &
16713  PyUnicode_FSDecoder().
16714
16715Tests
16716-----
16717
16718- bpo-27427: Additional tests for the math module. Patch by Francisco Couzo.
16719
16720- bpo-27953: Skip math and cmath tests that fail on OS X 10.4 due to a poor
16721  libm implementation of tan.
16722
16723- bpo-26040: Improve test_math and test_cmath coverage and rigour. Patch by
16724  Jeff Allen.
16725
16726- bpo-27787: Call gc.collect() before checking each test for "dangling
16727  threads", since the dangling threads are weak references.
16728
16729Build
16730-----
16731
16732- bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach)
16733
16734- bpo-27705: Update message in validate_ucrtbase.py
16735
16736- bpo-27976: Deprecate building _ctypes with the bundled copy of libffi on
16737  non-OSX UNIX platforms.
16738
16739- bpo-27983: Cause lack of llvm-profdata tool when using clang as required
16740  for PGO linking to be a configure time error rather than make time when
16741  ``--with-optimizations`` is enabled.  Also improve our ability to find the
16742  llvm-profdata tool on MacOS and some Linuxes.
16743
16744- bpo-21590: Support for DTrace and SystemTap probes.
16745
16746- bpo-26307: The profile-opt build now applies PGO to the built-in modules.
16747
16748- bpo-26359: Add the --with-optimizations flag to turn on LTO and PGO build
16749  support when available.
16750
16751- bpo-27917: Set platform triplets for Android builds.
16752
16753- bpo-25825: Update references to the $(LIBPL) installation path on AIX.
16754  This path was changed in 3.2a4.
16755
16756- Update OS X installer to use SQLite 3.14.1 and XZ 5.2.2.
16757
16758- bpo-21122: Fix LTO builds on OS X.
16759
16760- bpo-17128: Build OS X installer with a private copy of OpenSSL. Also
16761  provide a sample Install Certificates command script to install a set of
16762  root certificates from the third-party certifi module.
16763
16764Tools/Demos
16765-----------
16766
16767- bpo-27952: Get Tools/scripts/fixcid.py working with Python 3 and the
16768  current "re" module, avoid invalid Python backslash escapes, and fix a bug
16769  parsing escaped C quote signs.
16770
16771Windows
16772-------
16773
16774- bpo-28065: Update xz dependency to 5.2.2 and build it from source.
16775
16776- bpo-25144: Ensures TargetDir is set before continuing with custom install.
16777
16778- bpo-1602: Windows console doesn't input or print Unicode (PEP 528)
16779
16780- bpo-27781: Change file system encoding on Windows to UTF-8 (PEP 529)
16781
16782- bpo-27731: Opt-out of MAX_PATH on Windows 10
16783
16784- bpo-6135: Adds encoding and errors parameters to subprocess.
16785
16786- bpo-27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec
16787  lookup.
16788
16789- bpo-27982: The functions of the winsound module now accept keyword
16790  arguments.
16791
16792- bpo-20366: Build full text search support into SQLite on Windows.
16793
16794- bpo-27756: Adds new icons for Python files and processes on Windows.
16795  Designs by Cherry Wang.
16796
16797- bpo-27883: Update sqlite to 3.14.1.0 on Windows.
16798
16799
16800What's New in Python 3.6.0 alpha 4?
16801===================================
16802
16803*Release date: 2016-08-15*
16804
16805Core and Builtins
16806-----------------
16807
16808- bpo-27704: Optimized creating bytes and bytearray from byte-like objects
16809  and iterables. Speed up to 3 times for short objects.  Original patch by
16810  Naoki Inada.
16811
16812- bpo-26823: Large sections of repeated lines in tracebacks are now
16813  abbreviated as "[Previous line repeated {count} more times]" by the
16814  builtin traceback rendering. Patch by Emanuel Barry.
16815
16816- bpo-27574: Decreased an overhead of parsing keyword arguments in functions
16817  implemented with using Argument Clinic.
16818
16819- bpo-22557: Now importing already imported modules is up to 2.5 times
16820  faster.
16821
16822- bpo-17596: Include <wincrypt.h> to help with Min GW building.
16823
16824- bpo-17599: On Windows, rename the privately defined REPARSE_DATA_BUFFER
16825  structure to avoid conflicting with the definition from Min GW.
16826
16827- bpo-27507: Add integer overflow check in bytearray.extend().  Patch by
16828  Xiang Zhang.
16829
16830- bpo-27581: Don't rely on wrapping for overflow check in
16831  PySequence_Tuple().  Patch by Xiang Zhang.
16832
16833- bpo-1621: Avoid signed integer overflow in list and tuple operations.
16834  Patch by Xiang Zhang.
16835
16836- bpo-27419: Standard __import__() no longer look up "__import__" in globals
16837  or builtins for importing submodules or "from import".  Fixed a crash if
16838  raise a warning about unabling to resolve package from __spec__ or
16839  __package__.
16840
16841- bpo-27083: Respect the PYTHONCASEOK environment variable under Windows.
16842
16843- bpo-27514: Make having too many statically nested blocks a SyntaxError
16844  instead of SystemError.
16845
16846- bpo-27366: Implemented :pep:`487` (Simpler customization of class
16847  creation). Upon subclassing, the __init_subclass__ classmethod is called
16848  on the base class. Descriptors are initialized with __set_name__ after
16849  class creation.
16850
16851Library
16852-------
16853
16854- bpo-26027: Add :pep:`519`/__fspath__() support to the os and os.path
16855  modules. Includes code from Jelle Zijlstra. (See also: bpo-27524)
16856
16857- bpo-27598: Add Collections to collections.abc. Patch by Ivan Levkivskyi,
16858  docs by Neil Girdhar.
16859
16860- bpo-25958: Support "anti-registration" of special methods from various
16861  ABCs, like __hash__, __iter__ or __len__.  All these (and several more)
16862  can be set to None in an implementation class and the behavior will be as
16863  if the method is not defined at all. (Previously, this mechanism existed
16864  only for __hash__, to make mutable classes unhashable.)  Code contributed
16865  by Andrew Barnert and Ivan Levkivskyi.
16866
16867- bpo-16764: Support keyword arguments to zlib.decompress().  Patch by Xiang
16868  Zhang.
16869
16870- bpo-27736: Prevent segfault after interpreter re-initialization due to ref
16871  count problem introduced in code for Issue #27038 in 3.6.0a3. Patch by
16872  Xiang Zhang.
16873
16874- bpo-25628: The *verbose* and *rename* parameters for
16875  collections.namedtuple are now keyword-only.
16876
16877- bpo-12345: Add mathematical constant tau to math and cmath. See also
16878  :pep:`628`.
16879
16880- bpo-26823: traceback.StackSummary.format now abbreviates large sections of
16881  repeated lines as "[Previous line repeated {count} more times]" (this
16882  change then further affects other traceback display operations in the
16883  module). Patch by Emanuel Barry.
16884
16885- bpo-27664: Add to concurrent.futures.thread.ThreadPoolExecutor() the
16886  ability to specify a thread name prefix.
16887
16888- bpo-27181: Add geometric_mean and harmonic_mean to statistics module.
16889
16890- bpo-27573: code.interact now prints an message when exiting.
16891
16892- bpo-6422: Add autorange method to timeit.Timer objects.
16893
16894- bpo-27773: Correct some memory management errors server_hostname in
16895  _ssl.wrap_socket().
16896
16897- bpo-26750: unittest.mock.create_autospec() now works properly for
16898  subclasses of property() and other data descriptors.  Removes the never
16899  publicly used, never documented unittest.mock.DescriptorTypes tuple.
16900
16901- bpo-26754: Undocumented support of general bytes-like objects as path in
16902  compile() and similar functions is now deprecated.
16903
16904- bpo-26800: Undocumented support of general bytes-like objects as paths in
16905  os functions is now deprecated.
16906
16907- bpo-26981: Add _order_ compatibility shim to enum.Enum for Python 2/3 code
16908  bases.
16909
16910- bpo-27661: Added tzinfo keyword argument to datetime.combine.
16911
16912- In the curses module, raise an error if window.getstr() or window.instr()
16913  is passed a negative value.
16914
16915- bpo-27783: Fix possible usage of uninitialized memory in
16916  operator.methodcaller.
16917
16918- bpo-27774: Fix possible Py_DECREF on unowned object in _sre.
16919
16920- bpo-27760: Fix possible integer overflow in binascii.b2a_qp.
16921
16922- bpo-27758: Fix possible integer overflow in the _csv module for large
16923  record lengths.
16924
16925- bpo-27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
16926  HTTP_PROXY variable when REQUEST_METHOD environment is set, which
16927  indicates that the script is in CGI mode.
16928
16929- bpo-7063: Remove dead code from the "array" module's slice handling. Patch
16930  by Chuck.
16931
16932- bpo-27656: Do not assume sched.h defines any SCHED_* constants.
16933
16934- bpo-27130: In the "zlib" module, fix handling of large buffers (typically
16935  4 GiB) when compressing and decompressing.  Previously, inputs were
16936  limited to 4 GiB, and compression and decompression operations did not
16937  properly handle results of 4 GiB.
16938
16939- bpo-24773: Implemented :pep:`495` (Local Time Disambiguation).
16940
16941- Expose the EPOLLEXCLUSIVE constant (when it is defined) in the select
16942  module.
16943
16944- bpo-27567: Expose the EPOLLRDHUP and POLLRDHUP constants in the select
16945  module.
16946
16947- bpo-1621: Avoid signed int negation overflow in the "audioop" module.
16948
16949- bpo-27533: Release GIL in nt._isdir
16950
16951- bpo-17711: Fixed unpickling by the persistent ID with protocol 0. Original
16952  patch by Alexandre Vassalotti.
16953
16954- bpo-27522: Avoid an unintentional reference cycle in email.feedparser.
16955
16956- bpo-27512: Fix a segfault when os.fspath() called an __fspath__() method
16957  that raised an exception. Patch by Xiang Zhang.
16958
16959IDLE
16960----
16961
16962- bpo-27714: text_textview and test_autocomplete now pass when re-run in the
16963  same process.  This occurs when test_idle fails when run with the -w
16964  option but without -jn.  Fix warning from test_config.
16965
16966- bpo-27621: Put query response validation error messages in the query box
16967  itself instead of in a separate messagebox.  Redo tests to match. Add Mac
16968  OSX refinements. Original patch by Mark Roseman.
16969
16970- bpo-27620: Escape key now closes Query box as cancelled.
16971
16972- bpo-27609: IDLE: tab after initial whitespace should tab, not
16973  autocomplete. This fixes problem with writing docstrings at least twice
16974  indented.
16975
16976- bpo-27609: Explicitly return None when there are also non-None returns. In
16977  a few cases, reverse a condition and eliminate a return.
16978
16979- bpo-25507: IDLE no longer runs buggy code because of its tkinter imports.
16980  Users must include the same imports required to run directly in Python.
16981
16982- bpo-27173: Add 'IDLE Modern Unix' to the built-in key sets. Make the
16983  default key set depend on the platform. Add tests for the changes to the
16984  config module.
16985
16986- bpo-27452: add line counter and crc to IDLE configHandler test dump.
16987
16988Tests
16989-----
16990
16991- bpo-25805: Skip a test in test_pkgutil as needed that doesn't work when
16992  ``__name__ == __main__``. Patch by SilentGhost.
16993
16994- bpo-27472: Add test.support.unix_shell as the path to the default shell.
16995
16996- bpo-27369: In test_pyexpat, avoid testing an error message detail that
16997  changed in Expat 2.2.0.
16998
16999- bpo-27594: Prevent assertion error when running test_ast with coverage
17000  enabled: ensure code object has a valid first line number. Patch suggested
17001  by Ivan Levkivskyi.
17002
17003Windows
17004-------
17005
17006- bpo-27647: Update bundled Tcl/Tk to 8.6.6.
17007
17008- bpo-27610: Adds :pep:`514` metadata to Windows installer
17009
17010- bpo-27469: Adds a shell extension to the launcher so that drag and drop
17011  works correctly.
17012
17013- bpo-27309: Enables proper Windows styles in python[w].exe manifest.
17014
17015Build
17016-----
17017
17018- bpo-27713: Suppress spurious build warnings when updating importlib's
17019  bootstrap files. Patch by Xiang Zhang
17020
17021- bpo-25825: Correct the references to Modules/python.exp, which is required
17022  on AIX.  The references were accidentally changed in 3.5.0a1.
17023
17024- bpo-27453: CPP invocation in configure must use CPPFLAGS. Patch by Chi
17025  Hsuan Yen.
17026
17027- bpo-27641: The configure script now inserts comments into the makefile to
17028  prevent the pgen and _freeze_importlib executables from being
17029  cross-compiled.
17030
17031- bpo-26662: Set PYTHON_FOR_GEN in configure as the Python program to be
17032  used for file generation during the build.
17033
17034- bpo-10910: Avoid C++ compilation errors on FreeBSD and OS X. Also update
17035  FreedBSD version checks for the original ctype UTF-8 workaround.
17036
17037
17038What's New in Python 3.6.0 alpha 3?
17039===================================
17040
17041*Release date: 2016-07-11*
17042
17043Core and Builtins
17044-----------------
17045
17046- bpo-27473: Fixed possible integer overflow in bytes and bytearray
17047  concatenations. Patch by Xiang Zhang.
17048
17049- bpo-23034: The output of a special Python build with defined COUNT_ALLOCS,
17050  SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by  default.  It
17051  can be re-enabled using the "-X showalloccount" option.  It now outputs to
17052  stderr instead of stdout.
17053
17054- bpo-27443: __length_hint__() of bytearray iterators no longer return a
17055  negative integer for a resized bytearray.
17056
17057- bpo-27007: The fromhex() class methods of bytes and bytearray subclasses
17058  now return an instance of corresponding subclass.
17059
17060Library
17061-------
17062
17063- bpo-26844: Fix error message for imp.find_module() to refer to 'path'
17064  instead of 'name'. Patch by Lev Maximov.
17065
17066- bpo-23804: Fix SSL zero-length recv() calls to not block and not raise an
17067  error about unclean EOF.
17068
17069- bpo-27466: Change time format returned by http.cookie.time2netscape,
17070  confirming the netscape cookie format and making it consistent with
17071  documentation.
17072
17073- bpo-21708: Deprecated dbm.dumb behavior that differs from common dbm
17074  behavior: creating a database in 'r' and 'w' modes and modifying a
17075  database in 'r' mode.
17076
17077- bpo-26721: Change the socketserver.StreamRequestHandler.wfile attribute to
17078  implement BufferedIOBase. In particular, the write() method no longer does
17079  partial writes.
17080
17081- bpo-22115: Added methods trace_add, trace_remove and trace_info in the
17082  tkinter.Variable class.  They replace old methods trace_variable, trace,
17083  trace_vdelete and trace_vinfo that use obsolete Tcl commands and might not
17084  work in future versions of Tcl.  Fixed old tracing methods:
17085  trace_vdelete() with wrong mode no longer break tracing, trace_vinfo() now
17086  always returns a list of pairs of strings, tracing in the "u" mode now
17087  works.
17088
17089- bpo-26243: Only the level argument to zlib.compress() is keyword argument
17090  now.  The first argument is positional-only.
17091
17092- bpo-27038: Expose the DirEntry type as os.DirEntry. Code patch by Jelle
17093  Zijlstra.
17094
17095- bpo-27186: Update os.fspath()/PyOS_FSPath() to check the return value of
17096  __fspath__() to be either str or bytes.
17097
17098- bpo-18726: All optional parameters of the dump(), dumps(), load() and
17099  loads() functions and JSONEncoder and JSONDecoder class constructors in
17100  the json module are now keyword-only.
17101
17102- bpo-27319: Methods selection_set(), selection_add(), selection_remove()
17103  and selection_toggle() of ttk.TreeView now allow passing multiple items as
17104  multiple arguments instead of passing them as a tuple.  Deprecated
17105  undocumented ability of calling the selection() method with arguments.
17106
17107- bpo-27079: Fixed curses.ascii functions isblank(), iscntrl() and
17108  ispunct().
17109
17110- bpo-27294: Numerical state in the repr for Tkinter event objects is now
17111  represented as a combination of known flags.
17112
17113- bpo-27177: Match objects in the re module now support index-like objects
17114  as group indices.  Based on patches by Jeroen Demeyer and Xiang Zhang.
17115
17116- bpo-26754: Some functions (compile() etc) accepted a filename argument
17117  encoded as an iterable of integers. Now only strings and byte-like objects
17118  are accepted.
17119
17120- bpo-26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by
17121  Daniel Stokes.
17122
17123- bpo-27048: Prevents distutils failing on Windows when environment
17124  variables contain non-ASCII characters
17125
17126- bpo-27330: Fixed possible leaks in the ctypes module.
17127
17128- bpo-27238: Got rid of bare excepts in the turtle module.  Original patch
17129  by Jelle Zijlstra.
17130
17131- bpo-27122: When an exception is raised within the context being managed by
17132  a contextlib.ExitStack() and one of the exit stack generators catches and
17133  raises it in a chain, do not re-raise the original exception when exiting,
17134  let the new chained one through.  This avoids the :pep:`479` bug described
17135  in issue25782.
17136
17137Security
17138--------
17139
17140- bpo-27278: Fix os.urandom() implementation using getrandom() on Linux.
17141  Truncate size to INT_MAX and loop until we collected enough random bytes,
17142  instead of casting a directly Py_ssize_t to int.
17143
17144Library
17145-------
17146
17147- bpo-16864: sqlite3.Cursor.lastrowid now supports REPLACE statement.
17148  Initial patch by Alex LordThorsen.
17149
17150- bpo-26386: Fixed ttk.TreeView selection operations with item id's
17151  containing spaces.
17152
17153- bpo-8637: Honor a pager set by the env var MANPAGER (in preference to one
17154  set by the env var PAGER).
17155
17156Security
17157--------
17158
17159- bpo-22636: Avoid shell injection problems with ctypes.util.find_library().
17160
17161Library
17162-------
17163
17164- bpo-16182: Fix various functions in the "readline" module to use the
17165  locale encoding, and fix get_begidx() and get_endidx() to return code
17166  point indexes.
17167
17168- bpo-27392: Add loop.connect_accepted_socket(). Patch by Jim Fulton.
17169
17170IDLE
17171----
17172
17173- bpo-27477: IDLE search dialogs now use ttk widgets.
17174
17175- bpo-27173: Add 'IDLE Modern Unix' to the built-in key sets. Make the
17176  default key set depend on the platform. Add tests for the changes to the
17177  config module.
17178
17179- bpo-27452: make command line "idle-test> python test_help.py" work.
17180  __file__ is relative when python is started in the file's directory.
17181
17182- bpo-27452: add line counter and crc to IDLE configHandler test dump.
17183
17184- bpo-27380: IDLE: add query.py with base Query dialog and ttk widgets.
17185  Module had subclasses SectionName, ModuleName, and HelpSource, which are
17186  used to get information from users by configdialog and file =>Load Module.
17187  Each subclass has itw own validity checks.  Using ModuleName allows users
17188  to edit bad module names instead of starting over. Add tests and delete
17189  the two files combined into the new one.
17190
17191- bpo-27372: Test_idle no longer changes the locale.
17192
17193- bpo-27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names.
17194
17195- bpo-27245: IDLE: Cleanly delete custom themes and key bindings.
17196  Previously, when IDLE was started from a console or by import, a cascade
17197  of warnings was emitted. Patch by Serhiy Storchaka.
17198
17199- bpo-24137: Run IDLE, test_idle, and htest with tkinter default root
17200  disabled.  Fix code and tests that fail with this restriction.  Fix htests
17201  to not create a second and redundant root and mainloop.
17202
17203- bpo-27310: Fix IDLE.app failure to launch on OS X due to vestigial import.
17204
17205C API
17206-----
17207
17208- bpo-26754: PyUnicode_FSDecoder() accepted a filename argument encoded as
17209  an iterable of integers. Now only strings and byte-like objects are
17210  accepted.
17211
17212Build
17213-----
17214
17215- bpo-28066: Fix the logic that searches build directories for generated
17216  include files when building outside the source tree.
17217
17218- bpo-27442: Expose the Android API level that python was built against, in
17219  sysconfig.get_config_vars() as 'ANDROID_API_LEVEL'.
17220
17221- bpo-27434: The interpreter that runs the cross-build, found in PATH, must
17222  now be of the same feature version (e.g. 3.6) as the source being built.
17223
17224- bpo-26930: Update Windows builds to use OpenSSL 1.0.2h.
17225
17226- bpo-23968: Rename the platform directory from plat-$(MACHDEP) to
17227  plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from
17228  config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install
17229  the platform specific _sysconfigdata module into the platform directory
17230  and rename it to include the ABIFLAGS.
17231
17232- Don't use largefile support for GNU/Hurd.
17233
17234Tools/Demos
17235-----------
17236
17237- bpo-27332: Fixed the type of the first argument of module-level functions
17238  generated by Argument Clinic.  Patch by Petr Viktorin.
17239
17240- bpo-27418: Fixed Tools/importbench/importbench.py.
17241
17242Documentation
17243-------------
17244
17245- bpo-19489: Moved the search box from the sidebar to the header and footer
17246  of each page. Patch by Ammar Askar.
17247
17248- bpo-27285: Update documentation to reflect the deprecation of ``pyvenv``
17249  and normalize on the term "virtual environment". Patch by Steve Piercy.
17250
17251Tests
17252-----
17253
17254- bpo-27027: Added test.support.is_android that is True when this is an
17255  Android build.
17256
17257
17258What's New in Python 3.6.0 alpha 2?
17259===================================
17260
17261*Release date: 2016-06-13*
17262
17263Core and Builtins
17264-----------------
17265
17266- bpo-27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes.
17267  Patch by Demur Rumed.
17268
17269- bpo-27190: Raise NotSupportedError if sqlite3 is older than 3.3.1. Patch
17270  by Dave Sawyer.
17271
17272- bpo-27286: Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode.  Calling
17273  function with generalized unpacking (PEP 448) and conflicting keyword
17274  names could cause undefined behavior.
17275
17276- bpo-27140: Added BUILD_CONST_KEY_MAP opcode.
17277
17278- bpo-27186: Add support for os.PathLike objects to open() (part of
17279  :pep:`519`).
17280
17281- bpo-27066: Fixed SystemError if a custom opener (for open()) returns a
17282  negative number without setting an exception.
17283
17284- bpo-26983: float() now always return an instance of exact float. The
17285  deprecation warning is emitted if __float__ returns an instance of a
17286  strict subclass of float.  In a future versions of Python this can be an
17287  error.
17288
17289- bpo-27097: Python interpreter is now about 7% faster due to optimized
17290  instruction decoding.  Based on patch by Demur Rumed.
17291
17292- bpo-26647: Python interpreter now uses 16-bit wordcode instead of
17293  bytecode. Patch by Demur Rumed.
17294
17295- bpo-23275: Allow assigning to an empty target list in round brackets: () =
17296  iterable.
17297
17298- bpo-27243: Update the __aiter__ protocol: instead of returning an
17299  awaitable that resolves to an asynchronous iterator, the asynchronous
17300  iterator should be returned directly.  Doing the former will trigger a
17301  PendingDeprecationWarning.
17302
17303Library
17304-------
17305
17306- Comment out socket (SO_REUSEPORT) and posix (O_SHLOCK, O_EXLOCK) constants
17307  exposed on the API which are not implemented on GNU/Hurd. They would not
17308  work at runtime anyway.
17309
17310- bpo-27025: Generated names for Tkinter widgets are now more meaningful and
17311  recognizable.
17312
17313- bpo-25455: Fixed crashes in repr of recursive ElementTree.Element and
17314  functools.partial objects.
17315
17316- bpo-27294: Improved repr for Tkinter event objects.
17317
17318- bpo-20508: Improve exception message of IPv{4,6}Network.__getitem__. Patch
17319  by Gareth Rees.
17320
17321Security
17322--------
17323
17324- bpo-26556: Update expat to 2.1.1, fixes CVE-2015-1283.
17325
17326- Fix TLS stripping vulnerability in smtplib, CVE-2016-0772. Reported by
17327  Team Oststrom.
17328
17329Library
17330-------
17331
17332- bpo-21386: Implement missing IPv4Address.is_global property.  It was
17333  documented since 07a5610bae9d.  Initial patch by Roger Luethi.
17334
17335- bpo-27029: Removed deprecated support of universal newlines mode from
17336  ZipFile.open().
17337
17338- bpo-27030: Unknown escapes consisting of ``'\'`` and an ASCII letter in
17339  regular expressions now are errors.  The re.LOCALE flag now can be used
17340  only with bytes patterns.
17341
17342- bpo-27186: Add os.PathLike support to DirEntry (part of :pep:`519`).
17343  Initial patch by Jelle Zijlstra.
17344
17345- bpo-20900: distutils register command now decodes HTTP responses
17346  correctly.  Initial patch by ingrid.
17347
17348- bpo-27186: Add os.PathLike support to pathlib, removing its provisional
17349  status (part of PEP 519). Initial patch by Dusty Phillips.
17350
17351- bpo-27186: Add support for os.PathLike objects to os.fsencode() and
17352  os.fsdecode() (part of :pep:`519`).
17353
17354- bpo-27186: Introduce os.PathLike and os.fspath() (part of :pep:`519`).
17355
17356- A new version of typing.py provides several new classes and features:
17357  @overload outside stubs, Reversible, DefaultDict, Text, ContextManager,
17358  Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some
17359  of the new features are not yet implemented in mypy or other static
17360  analyzers). Also classes for :pep:`492` (Awaitable, AsyncIterable,
17361  AsyncIterator) have been added (in fact they made it into 3.5.1 but were
17362  never mentioned).
17363
17364- bpo-25738: Stop http.server.BaseHTTPRequestHandler.send_error() from
17365  sending a message body for 205 Reset Content.  Also, don't send Content
17366  header fields in responses that don't have a body.  Patch by Susumu
17367  Koshiba.
17368
17369- bpo-21313: Fix the "platform" module to tolerate when sys.version contains
17370  truncated build information.
17371
17372Security
17373--------
17374
17375- bpo-26839: On Linux, :func:`os.urandom` now calls ``getrandom()`` with
17376  ``GRND_NONBLOCK`` to fall back on reading ``/dev/urandom`` if the urandom
17377  entropy pool is not initialized yet. Patch written by Colm Buckley.
17378
17379Library
17380-------
17381
17382- bpo-23883: Added missing APIs to __all__ to match the documented APIs for
17383  the following modules: cgi, mailbox, mimetypes, plistlib and smtpd.
17384  Patches by Jacek Kołodziej.
17385
17386- bpo-27164: In the zlib module, allow decompressing raw Deflate streams
17387  with a predefined zdict.  Based on patch by Xiang Zhang.
17388
17389- bpo-24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely
17390  write data to the client.  Previously it could do partial writes and
17391  truncate data.  Also, wsgiref.handler.ServerHandler can now handle stdout
17392  doing partial writes, but this is deprecated.
17393
17394- bpo-21272: Use _sysconfigdata.py to initialize distutils.sysconfig.
17395
17396- bpo-19611: :mod:`inspect` now reports the implicit ``.0`` parameters
17397  generated by the compiler for comprehension and generator expression
17398  scopes as if they were positional-only parameters called ``implicit0``.
17399  Patch by Jelle Zijlstra.
17400
17401- bpo-26809: Add ``__all__`` to :mod:`string`.  Patch by Emanuel Barry.
17402
17403- bpo-26373: subprocess.Popen.communicate now correctly ignores
17404  BrokenPipeError when the child process dies before .communicate() is
17405  called in more/all circumstances.
17406
17407- signal, socket, and ssl module IntEnum constant name lookups now return a
17408  consistent name for values having multiple names.  Ex: signal.Signals(6)
17409  now refers to itself as signal.SIGALRM rather than flipping between that
17410  and signal.SIGIOT based on the interpreter's hash randomization seed.
17411
17412- bpo-27167: Clarify the subprocess.CalledProcessError error message text
17413  when the child process died due to a signal.
17414
17415- bpo-25931: Don't define socketserver.Forking* names on platforms such as
17416  Windows that do not support os.fork().
17417
17418- bpo-21776: distutils.upload now correctly handles HTTPError. Initial patch
17419  by Claudiu Popa.
17420
17421- bpo-26526: Replace custom parse tree validation in the parser module with
17422  a simple DFA validator.
17423
17424- bpo-27114: Fix SSLContext._load_windows_store_certs fails with
17425  PermissionError
17426
17427- bpo-18383: Avoid creating duplicate filters when using filterwarnings and
17428  simplefilter. Based on patch by Alex Shkop.
17429
17430- bpo-23026: winreg.QueryValueEx() now return an integer for REG_QWORD type.
17431
17432- bpo-26741: subprocess.Popen destructor now emits a ResourceWarning warning
17433  if the child process is still running.
17434
17435- bpo-27056: Optimize pickle.load() and pickle.loads(), up to 10% faster to
17436  deserialize a lot of small objects.
17437
17438- bpo-21271: New keyword only parameters in reset_mock call.
17439
17440IDLE
17441----
17442
17443- bpo-5124: Paste with text selected now replaces the selection on X11. This
17444  matches how paste works on Windows, Mac, most modern Linux apps, and ttk
17445  widgets. Original patch by Serhiy Storchaka.
17446
17447- bpo-24750: Switch all scrollbars in IDLE to ttk versions. Where needed,
17448  minimal tests are added to cover changes.
17449
17450- bpo-24759: IDLE requires tk 8.5 and availability ttk widgets. Delete now
17451  unneeded tk version tests and code for older versions. Add test for IDLE
17452  syntax colorizer.
17453
17454- bpo-27239: idlelib.macosx.isXyzTk functions initialize as needed.
17455
17456- bpo-27262: move Aqua unbinding code, which enable context menus, to
17457  macosx.
17458
17459- bpo-24759: Make clear in idlelib.idle_test.__init__ that the directory is
17460  a private implementation of test.test_idle and tool for maintainers.
17461
17462- bpo-27196: Stop 'ThemeChanged' warnings when running IDLE tests. These
17463  persisted after other warnings were suppressed in #20567. Apply Serhiy
17464  Storchaka's update_idletasks solution to four test files. Record this
17465  additional advice in idle_test/README.txt
17466
17467- bpo-20567: Revise idle_test/README.txt with advice about avoiding tk
17468  warning messages from tests.  Apply advice to several IDLE tests.
17469
17470- bpo-24225: Update idlelib/README.txt with new file names and event
17471  handlers.
17472
17473- bpo-27156: Remove obsolete code not used by IDLE.
17474
17475- bpo-27117: Make colorizer htest and turtledemo work with dark themes. Move
17476  code for configuring text widget colors to a new function.
17477
17478- bpo-24225: Rename many `idlelib/*.py` and `idle_test/test_*.py` files.
17479  Edit files to replace old names with new names when the old name referred
17480  to the module rather than the class it contained. See the issue and IDLE
17481  section in What's New in 3.6 for more.
17482
17483- bpo-26673: When tk reports font size as 0, change to size 10. Such fonts
17484  on Linux prevented the configuration dialog from opening.
17485
17486- bpo-21939: Add test for IDLE's percolator. Original patch by Saimadhav
17487  Heblikar.
17488
17489- bpo-21676: Add test for IDLE's replace dialog. Original patch by Saimadhav
17490  Heblikar.
17491
17492- bpo-18410: Add test for IDLE's search dialog. Original patch by Westley
17493  Martínez.
17494
17495- bpo-21703: Add test for undo delegator.  Patch mostly by Saimadhav
17496  Heblikar .
17497
17498- bpo-27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks.
17499
17500- bpo-23977: Add more asserts to test_delegator.
17501
17502Documentation
17503-------------
17504
17505- bpo-16484: Change the default PYTHONDOCS URL to "https:", and fix the
17506  resulting links to use lowercase.  Patch by Sean Rodman, test by Kaushik
17507  Nadikuditi.
17508
17509- bpo-24136: Document the new :pep:`448` unpacking syntax of 3.5.
17510
17511- bpo-22558: Add remaining doc links to source code for Python-coded
17512  modules. Patch by Yoni Lavi.
17513
17514Tests
17515-----
17516
17517- bpo-25285: regrtest now uses subprocesses when the -j1 command line option
17518  is used: each test file runs in a fresh child process. Before, the -j1
17519  option was ignored.
17520
17521- bpo-25285: Tools/buildbot/test.bat script now uses -j1 by default to run
17522  each test file in fresh child process.
17523
17524Windows
17525-------
17526
17527- bpo-27064: The py.exe launcher now defaults to Python 3. The Windows
17528  launcher ``py.exe`` no longer prefers an installed Python 2 version over
17529  Python 3 by default when used interactively.
17530
17531Build
17532-----
17533
17534- bpo-27229: Fix the cross-compiling pgen rule for in-tree builds.  Patch by
17535  Xavier de Gaye.
17536
17537- bpo-26930: Update OS X 10.5+ 32-bit-only installer to build and link with
17538  OpenSSL 1.0.2h.
17539
17540Windows
17541-------
17542
17543- bpo-17500: Remove unused and outdated icons. (See also:
17544  https://github.com/python/pythondotorg/issues/945)
17545
17546C API
17547-----
17548
17549- bpo-27186: Add the PyOS_FSPath() function (part of :pep:`519`).
17550
17551- bpo-26282: PyArg_ParseTupleAndKeywords() now supports positional-only
17552  parameters.
17553
17554Tools/Demos
17555-----------
17556
17557- bpo-26282: Argument Clinic now supports positional-only and keyword
17558  parameters in the same function.
17559
17560
17561What's New in Python 3.6.0 alpha 1?
17562===================================
17563
17564*Release date: 2016-05-16*
17565
17566Core and Builtins
17567-----------------
17568
17569- bpo-20041: Fixed TypeError when frame.f_trace is set to None. Patch by
17570  Xavier de Gaye.
17571
17572- bpo-26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
17573  format unit.
17574
17575- bpo-26991: Fix possible refleak when creating a function with annotations.
17576
17577- bpo-27039: Fixed bytearray.remove() for values greater than 127.  Based on
17578  patch by Joe Jevnik.
17579
17580- bpo-23640: int.from_bytes() no longer bypasses constructors for
17581  subclasses.
17582
17583- bpo-27005: Optimized the float.fromhex() class method for exact float. It
17584  is now 2 times faster.
17585
17586- bpo-18531: Single var-keyword argument of dict subtype was passed
17587  unscathed to the C-defined function.  Now it is converted to exact dict.
17588
17589- bpo-26811: gc.get_objects() no longer contains a broken tuple with NULL
17590  pointer.
17591
17592- bpo-20120: Use RawConfigParser for .pypirc parsing, removing support for
17593  interpolation unintentionally added with move to Python 3. Behavior no
17594  longer does any interpolation in .pypirc files, matching behavior in
17595  Python 2.7 and Setuptools 19.0.
17596
17597- bpo-26249: Memory functions of the :c:func:`PyMem_Malloc` domain
17598  (:c:data:`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc allocator
17599  <pymalloc>` rather than system :c:func:`malloc`. Applications calling
17600  :c:func:`PyMem_Malloc` without holding the GIL can now crash: use
17601  ``PYTHONMALLOC=debug`` environment variable to validate the usage of
17602  memory allocators in your application.
17603
17604- bpo-26802: Optimize function calls only using unpacking like
17605  ``func(*tuple)`` (no other positional argument, no keyword): avoid copying
17606  the tuple. Patch written by Joe Jevnik.
17607
17608- bpo-26659: Make the builtin slice type support cycle collection.
17609
17610- bpo-26718: super.__init__ no longer leaks memory if called multiple times.
17611  NOTE: A direct call of super.__init__ is not endorsed!
17612
17613- bpo-27138: Fix the doc comment for FileFinder.find_spec().
17614
17615- bpo-27147: Mention :pep:`420` in the importlib docs.
17616
17617- bpo-25339: PYTHONIOENCODING now has priority over locale in setting the
17618  error handler for stdin and stdout.
17619
17620- bpo-26494: Fixed crash on iterating exhausting iterators. Affected classes
17621  are generic sequence iterators, iterators of str, bytes, bytearray, list,
17622  tuple, set, frozenset, dict, OrderedDict, corresponding views and
17623  os.scandir() iterator.
17624
17625- bpo-26574: Optimize ``bytes.replace(b'', b'.')`` and
17626  ``bytearray.replace(b'', b'.')``. Patch written by Josh Snider.
17627
17628- bpo-26581: If coding cookie is specified multiple times on a line in
17629  Python source code file, only the first one is taken to account.
17630
17631- bpo-19711: Add tests for reloading namespace packages.
17632
17633- bpo-21099: Switch applicable importlib tests to use :pep:`451` API.
17634
17635- bpo-26563: Debug hooks on Python memory allocators now raise a fatal error
17636  if functions of the :c:func:`PyMem_Malloc` family are called without
17637  holding the GIL.
17638
17639- bpo-26564: On error, the debug hooks on Python memory allocators now use
17640  the :mod:`tracemalloc` module to get the traceback where a memory block
17641  was allocated.
17642
17643- bpo-26558: The debug hooks on Python memory allocator
17644  :c:func:`PyObject_Malloc` now detect when functions are called without
17645  holding the GIL.
17646
17647- bpo-26516: Add :envvar:`PYTHONMALLOC` environment variable to set the
17648  Python memory allocators and/or install debug hooks.
17649
17650- bpo-26516: The :c:func:`PyMem_SetupDebugHooks` function can now also be
17651  used on Python compiled in release mode.
17652
17653- bpo-26516: The :envvar:`PYTHONMALLOCSTATS` environment variable can now
17654  also be used on Python compiled in release mode. It now has no effect if
17655  set to an empty string.
17656
17657- bpo-26516: In debug mode, debug hooks are now also installed on Python
17658  memory allocators when Python is configured without pymalloc.
17659
17660- bpo-26464: Fix str.translate() when string is ASCII and first replacements
17661  removes character, but next replacement uses a non-ASCII character or a
17662  string longer than 1 character. Regression introduced in Python 3.5.0.
17663
17664- bpo-22836: Ensure exception reports from PyErr_Display() and
17665  PyErr_WriteUnraisable() are sensible even when formatting them produces
17666  secondary errors.  This affects the reports produced by
17667  sys.__excepthook__() and when __del__() raises an exception.
17668
17669- bpo-26302: Correct behavior to reject comma as a legal character for
17670  cookie names.
17671
17672- bpo-26136: Upgrade the warning when a generator raises StopIteration from
17673  PendingDeprecationWarning to DeprecationWarning.  Patch by Anish Shah.
17674
17675- bpo-26204: The compiler now ignores all constant statements: bytes, str,
17676  int, float, complex, name constants (None, False, True), Ellipsis and
17677  ast.Constant; not only str and int. For example, ``1.0`` is now ignored in
17678  ``def f(): 1.0``.
17679
17680- bpo-4806: Avoid masking the original TypeError exception when using star
17681  (``*``) unpacking in function calls.  Based on patch by Hagen Fürstenau
17682  and Daniel Urban.
17683
17684- bpo-26146: Add a new kind of AST node: ``ast.Constant``. It can be used by
17685  external AST optimizers, but the compiler does not emit directly such
17686  node.
17687
17688- bpo-23601: Sped-up allocation of dict key objects by using Python's small
17689  object allocator.  (Contributed by Julian Taylor.)
17690
17691- bpo-18018: Import raises ImportError instead of SystemError if a relative
17692  import is attempted without a known parent package.
17693
17694- bpo-25843: When compiling code, don't merge constants if they are equal
17695  but have a different types. For example, ``f1, f2 = lambda: 1, lambda:
17696  1.0`` is now correctly compiled to two different functions: ``f1()``
17697  returns ``1`` (``int``) and ``f2()`` returns ``1.0`` (``float``), even if
17698  ``1`` and ``1.0`` are equal.
17699
17700- bpo-26107: The format of the ``co_lnotab`` attribute of code objects
17701  changes to support negative line number delta.
17702
17703- bpo-26154: Add a new private _PyThreadState_UncheckedGet() function to get
17704  the current Python thread state, but don't issue a fatal error if it is
17705  NULL. This new function must be used instead of accessing directly the
17706  _PyThreadState_Current variable.  The variable is no more exposed since
17707  Python 3.5.1 to hide the exact implementation of atomic C types, to avoid
17708  compiler issues.
17709
17710- bpo-25791: If __package__ != __spec__.parent or if neither __package__ or
17711  __spec__ are defined then ImportWarning is raised.
17712
17713- bpo-22995: [UPDATE] Comment out the one of the pickleability tests in
17714  _PyObject_GetState() due to regressions observed in Cython-based projects.
17715
17716- bpo-25961: Disallowed null characters in the type name.
17717
17718- bpo-25973: Fix segfault when an invalid nonlocal statement binds a name
17719  starting with two underscores.
17720
17721- bpo-22995: Instances of extension types with a state that aren't
17722  subclasses of list or dict and haven't implemented any pickle-related
17723  methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or
17724  __getstate__), can no longer be pickled.  Including memoryview.
17725
17726- bpo-20440: Massive replacing unsafe attribute setting code with special
17727  macro Py_SETREF.
17728
17729- bpo-25766: Special method __bytes__() now works in str subclasses.
17730
17731- bpo-25421: __sizeof__ methods of builtin types now use dynamic basic size.
17732  This allows sys.getsize() to work correctly with their subclasses with
17733  __slots__ defined.
17734
17735- bpo-25709: Fixed problem with in-place string concatenation and utf-8
17736  cache.
17737
17738- bpo-5319: New Py_FinalizeEx() API allowing Python to set an exit status of
17739  120 on failure to flush buffered streams.
17740
17741- bpo-25485: telnetlib.Telnet is now a context manager.
17742
17743- bpo-24097: Fixed crash in object.__reduce__() if slot name is freed inside
17744  __getattr__.
17745
17746- bpo-24731: Fixed crash on converting objects with special methods
17747  __bytes__, __trunc__, and __float__ returning instances of subclasses of
17748  bytes, int, and float to subclasses of bytes, int, and float
17749  correspondingly.
17750
17751- bpo-25630: Fix a possible segfault during argument parsing in functions
17752  that accept filesystem paths.
17753
17754- bpo-23564: Fixed a partially broken sanity check in the _posixsubprocess
17755  internals regarding how fds_to_pass were passed to the child.  The bug had
17756  no actual impact as subprocess.py already avoided it.
17757
17758- bpo-25388: Fixed tokenizer crash when processing undecodable source code
17759  with a null byte.
17760
17761- bpo-25462: The hash of the key now is calculated only once in most
17762  operations in C implementation of OrderedDict.
17763
17764- bpo-22995: Default implementation of __reduce__ and __reduce_ex__ now
17765  rejects builtin types with not defined __new__.
17766
17767- bpo-24802: Avoid buffer overreads when int(), float(), compile(), exec()
17768  and eval() are passed bytes-like objects.  These objects are not
17769  necessarily terminated by a null byte, but the functions assumed they
17770  were.
17771
17772- bpo-25555: Fix parser and AST: fill lineno and col_offset of "arg" node
17773  when compiling AST from Python objects.
17774
17775- bpo-24726: Fixed a crash and leaking NULL in repr() of OrderedDict that
17776  was mutated by direct calls of dict methods.
17777
17778- bpo-25449: Iterating OrderedDict with keys with unstable hash now raises
17779  KeyError in C implementations as well as in Python implementation.
17780
17781- bpo-25395: Fixed crash when highly nested OrderedDict structures were
17782  garbage collected.
17783
17784- bpo-25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now
17785  between 2x and 3.5x faster.
17786
17787- bpo-25399: Optimize bytearray % args using the new private _PyBytesWriter
17788  API. Formatting is now between 2.5 and 5 times faster.
17789
17790- bpo-25274: sys.setrecursionlimit() now raises a RecursionError if the new
17791  recursion limit is too low depending at the current recursion depth.
17792  Modify also the "lower-water mark" formula to make it monotonic. This mark
17793  is used to decide when the overflowed flag of the thread state is reset.
17794
17795- bpo-24402: Fix input() to prompt to the redirected stdout when
17796  sys.stdout.fileno() fails.
17797
17798- bpo-25349: Optimize bytes % args using the new private _PyBytesWriter API.
17799  Formatting is now up to 2 times faster.
17800
17801- bpo-24806: Prevent builtin types that are not allowed to be subclassed
17802  from being subclassed through multiple inheritance.
17803
17804- bpo-25301: The UTF-8 decoder is now up to 15 times as fast for error
17805  handlers: ``ignore``, ``replace`` and ``surrogateescape``.
17806
17807- bpo-24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
17808
17809- bpo-25267: The UTF-8 encoder is now up to 75 times as fast for error
17810  handlers: ``ignore``, ``replace``, ``surrogateescape``, ``surrogatepass``.
17811  Patch co-written with Serhiy Storchaka.
17812
17813- bpo-25280: Import trace messages emitted in verbose (-v) mode are no
17814  longer formatted twice.
17815
17816- bpo-25227: Optimize ASCII and latin1 encoders with the ``surrogateescape``
17817  error handler: the encoders are now up to 3 times as fast. Initial patch
17818  written by Serhiy Storchaka.
17819
17820- bpo-25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom()
17821  function instead of the getentropy() function. The getentropy() function
17822  is blocking to generate very good quality entropy, os.urandom() doesn't
17823  need such high-quality entropy.
17824
17825- bpo-9232: Modify Python's grammar to allow trailing commas in the argument
17826  list of a function declaration.  For example, "def f(\*, a = 3,): pass" is
17827  now legal. Patch from Mark Dickinson.
17828
17829- bpo-24965: Implement :pep:`498` "Literal String Interpolation". This
17830  allows you to embed expressions inside f-strings, which are converted to
17831  normal strings at run time. Given x=3, then f'value={x}' == 'value=3'.
17832  Patch by Eric V. Smith.
17833
17834- bpo-26478: Fix semantic bugs when using binary operators with dictionary
17835  views and tuples.
17836
17837- bpo-26171: Fix possible integer overflow and heap corruption in
17838  zipimporter.get_data().
17839
17840- bpo-25660: Fix TAB key behaviour in REPL with readline.
17841
17842- bpo-26288: Optimize PyLong_AsDouble.
17843
17844- bpo-26289: Optimize floor and modulo division for single-digit longs.
17845  Microbenchmarks show 2-2.5x improvement.  Built-in 'divmod' function is
17846  now also ~10% faster. (See also: bpo-26315)
17847
17848- bpo-25887: Raise a RuntimeError when a coroutine object is awaited more
17849  than once.
17850
17851Library
17852-------
17853
17854- bpo-27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
17855  SELinux and fails with EACCESS. The function now falls back to fcntl().
17856  Patch written by Michał Bednarski.
17857
17858- bpo-27014: Fix infinite recursion using typing.py.  Thanks to Kalle Tuure!
17859
17860- bpo-27031: Removed dummy methods in Tkinter widget classes: tk_menuBar()
17861  and tk_bindForTraversal().
17862
17863- bpo-14132: Fix urllib.request redirect handling when the target only has a
17864  query string.  Original fix by Ján Janech.
17865
17866- bpo-17214: The "urllib.request" module now percent-encodes non-ASCII bytes
17867  found in redirect target URLs.  Some servers send Location header fields
17868  with non-ASCII bytes, but "http.client" requires the request target to be
17869  ASCII-encodable, otherwise a UnicodeEncodeError is raised.  Based on patch
17870  by Christian Heimes.
17871
17872- bpo-27033: The default value of the decode_data parameter for
17873  smtpd.SMTPChannel and smtpd.SMTPServer constructors is changed to False.
17874
17875- bpo-27034: Removed deprecated class asynchat.fifo.
17876
17877- bpo-26870: Added readline.set_auto_history(), which can stop entries being
17878  automatically added to the history list.  Based on patch by Tyler
17879  Crompton.
17880
17881- bpo-26039: zipfile.ZipFile.open() can now be used to write data into a ZIP
17882  file, as well as for extracting data.  Patch by Thomas Kluyver.
17883
17884- bpo-26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch
17885  contributed by Chi Hsuan Yen.
17886
17887- bpo-22274: In the subprocess module, allow stderr to be redirected to
17888  stdout even when stdout is not redirected.  Patch by Akira Li.
17889
17890- bpo-26807: mock_open 'files' no longer error on readline at end of file.
17891  Patch from Yolanda Robla.
17892
17893- bpo-25745: Fixed leaking a userptr in curses panel destructor.
17894
17895- bpo-26977: Removed unnecessary, and ignored, call to sum of squares helper
17896  in statistics.pvariance.
17897
17898- bpo-26002: Use bisect in statistics.median instead of a linear search.
17899  Patch by Upendra Kuma.
17900
17901- bpo-25974: Make use of new Decimal.as_integer_ratio() method in statistics
17902  module. Patch by Stefan Krah.
17903
17904- bpo-26996: Add secrets module as described in :pep:`506`.
17905
17906- bpo-26881: The modulefinder module now supports extended opcode arguments.
17907
17908- bpo-23815: Fixed crashes related to directly created instances of types in
17909  _tkinter and curses.panel modules.
17910
17911- bpo-17765: weakref.ref() no longer silently ignores keyword arguments.
17912  Patch by Georg Brandl.
17913
17914- bpo-26873: xmlrpc now raises ResponseError on unsupported type tags
17915  instead of silently return incorrect result.
17916
17917- bpo-26915: The __contains__ methods in the collections ABCs now check for
17918  identity before checking equality.  This better matches the behavior of
17919  the concrete classes, allows sensible handling of NaNs, and makes it
17920  easier to reason about container invariants.
17921
17922- bpo-26711: Fixed the comparison of plistlib.Data with other types.
17923
17924- bpo-24114: Fix an uninitialized variable in `ctypes.util`. The bug only
17925  occurs on SunOS when the ctypes implementation searches for the `crle`
17926  program.  Patch by Xiang Zhang.  Tested on SunOS by Kees Bos.
17927
17928- bpo-26864: In urllib.request, change the proxy bypass host checking
17929  against no_proxy to be case-insensitive, and to not match unrelated host
17930  names that happen to have a bypassed hostname as a suffix.  Patch by Xiang
17931  Zhang.
17932
17933- bpo-24902: Print server URL on http.server startup.  Initial patch by
17934  Felix Kaiser.
17935
17936- bpo-25788: fileinput.hook_encoded() now supports an "errors" argument for
17937  passing to open.  Original patch by Joseph Hackman.
17938
17939- bpo-26634: recursive_repr() now sets __qualname__ of wrapper.  Patch by
17940  Xiang Zhang.
17941
17942- bpo-26804: urllib.request will prefer lower_case proxy environment
17943  variables over UPPER_CASE or Mixed_Case ones. Patch contributed by
17944  Hans-Peter Jansen.
17945
17946- bpo-26837: assertSequenceEqual() now correctly outputs non-stringified
17947  differing items (like bytes in the -b mode).  This affects
17948  assertListEqual() and assertTupleEqual().
17949
17950- bpo-26041: Remove "will be removed in Python 3.7" from deprecation
17951  messages of platform.dist() and platform.linux_distribution(). Patch by
17952  Kumaripaba Miyurusara Athukorala.
17953
17954- bpo-26822: itemgetter, attrgetter and methodcaller objects no longer
17955  silently ignore keyword arguments.
17956
17957- bpo-26733: Disassembling a class now disassembles class and static
17958  methods. Patch by Xiang Zhang.
17959
17960- bpo-26801: Fix error handling in :func:`shutil.get_terminal_size`, catch
17961  :exc:`AttributeError` instead of :exc:`NameError`. Patch written by
17962  Emanuel Barry.
17963
17964- bpo-24838: tarfile's ustar and gnu formats now correctly calculate name
17965  and link field limits for multibyte character encodings like utf-8.
17966
17967Security
17968--------
17969
17970- bpo-26657: Fix directory traversal vulnerability with http.server on
17971  Windows.  This fixes a regression that was introduced in 3.3.4rc1 and
17972  3.4.0rc1.  Based on patch by Philipp Hagemeister.
17973
17974Library
17975-------
17976
17977- bpo-26717: Stop encoding Latin-1-ized WSGI paths with UTF-8.  Patch by
17978  Anthony Sottile.
17979
17980- bpo-26782: Add STARTUPINFO to subprocess.__all__ on Windows.
17981
17982- bpo-26404: Add context manager to socketserver.  Patch by Aviv Palivoda.
17983
17984- bpo-26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading
17985  more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of
17986  1024 bytes per call.
17987
17988- bpo-26585: Eliminate http.server._quote_html() and use
17989  html.escape(quote=False).  Patch by Xiang Zhang.
17990
17991- bpo-26685: Raise OSError if closing a socket fails.
17992
17993- bpo-16329: Add .webm to mimetypes.types_map.  Patch by Giampaolo Rodola'.
17994
17995- bpo-13952: Add .csv to mimetypes.types_map.  Patch by Geoff Wilson.
17996
17997- bpo-26587: the site module now allows .pth files to specify files to be
17998  added to sys.path (e.g. zip files).
17999
18000- bpo-25609: Introduce contextlib.AbstractContextManager and
18001  typing.ContextManager.
18002
18003- bpo-26709: Fixed Y2038 problem in loading binary PLists.
18004
18005- bpo-23735: Handle terminal resizing with Readline 6.3+ by installing our
18006  own SIGWINCH handler.  Patch by Eric Price.
18007
18008- bpo-25951: Change SSLSocket.sendall() to return None, as explicitly
18009  documented for plain socket objects.  Patch by Aviv Palivoda.
18010
18011- bpo-26586: In http.server, respond with "413 Request header fields too
18012  large" if there are too many header fields to parse, rather than killing
18013  the connection and raising an unhandled exception.  Patch by Xiang Zhang.
18014
18015- bpo-26676: Added missing XMLPullParser to ElementTree.__all__.
18016
18017- bpo-22854: Change BufferedReader.writable() and BufferedWriter.readable()
18018  to always return False.
18019
18020- bpo-26492: Exhausted iterator of array.array now conforms with the
18021  behavior of iterators of other mutable sequences: it lefts exhausted even
18022  if iterated array is extended.
18023
18024- bpo-26641: doctest.DocFileTest and doctest.testfile() now support packages
18025  (module splitted into multiple directories) for the package parameter.
18026
18027- bpo-25195: Fix a regression in mock.MagicMock. _Call is a subclass of
18028  tuple (changeset 3603bae63c13 only works for classes) so we need to
18029  implement __ne__ ourselves.  Patch by Andrew Plummer.
18030
18031- bpo-26644: Raise ValueError rather than SystemError when a negative length
18032  is passed to SSLSocket.recv() or read().
18033
18034- bpo-23804: Fix SSL recv(0) and read(0) methods to return zero bytes
18035  instead of up to 1024.
18036
18037- bpo-26616: Fixed a bug in datetime.astimezone() method.
18038
18039- bpo-26637: The :mod:`importlib` module now emits an :exc:`ImportError`
18040  rather than a :exc:`TypeError` if :func:`__import__` is tried during the
18041  Python shutdown process but :data:`sys.path` is already cleared (set to
18042  ``None``).
18043
18044- bpo-21925: :func:`warnings.formatwarning` now catches exceptions when
18045  calling :func:`linecache.getline` and
18046  :func:`tracemalloc.get_object_traceback` to be able to log
18047  :exc:`ResourceWarning` emitted late during the Python shutdown process.
18048
18049- bpo-23848: On Windows, faulthandler.enable() now also installs an
18050  exception handler to dump the traceback of all Python threads on any
18051  Windows exception, not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT).
18052
18053- bpo-26530: Add C functions :c:func:`_PyTraceMalloc_Track` and
18054  :c:func:`_PyTraceMalloc_Untrack` to track memory blocks using the
18055  :mod:`tracemalloc` module. Add :c:func:`_PyTraceMalloc_GetTraceback` to
18056  get the traceback of an object.
18057
18058- bpo-26588: The _tracemalloc now supports tracing memory allocations of
18059  multiple address spaces (domains).
18060
18061- bpo-24266: Ctrl+C during Readline history search now cancels the search
18062  mode when compiled with Readline 7.
18063
18064- bpo-26590: Implement a safe finalizer for the _socket.socket type. It now
18065  releases the GIL to close the socket.
18066
18067- bpo-18787: spwd.getspnam() now raises a PermissionError if the user
18068  doesn't have privileges.
18069
18070- bpo-26560: Avoid potential ValueError in BaseHandler.start_response.
18071  Initial patch by Peter Inglesby.
18072
18073- bpo-26567: Add a new function :c:func:`PyErr_ResourceWarning` function to
18074  pass the destroyed object. Add a *source* attribute to
18075  :class:`warnings.WarningMessage`. Add warnings._showwarnmsg() which uses
18076  tracemalloc to get the traceback where source object was allocated.
18077
18078Security
18079--------
18080
18081- bpo-26313: ssl.py _load_windows_store_certs fails if windows cert store is
18082  empty. Patch by Baji.
18083
18084Library
18085-------
18086
18087- bpo-26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex`
18088  to support importing packages.
18089
18090- bpo-26499: Account for remaining Content-Length in HTTPResponse.readline()
18091  and read1(). Based on patch by Silent Ghost. Also document that
18092  HTTPResponse now supports these methods.
18093
18094- bpo-25320: Handle sockets in directories unittest discovery is scanning.
18095  Patch from Victor van den Elzen.
18096
18097- bpo-16181: cookiejar.http2time() now returns None if year is higher than
18098  datetime.MAXYEAR.
18099
18100- bpo-26513: Fixes platform module detection of Windows Server
18101
18102- bpo-23718: Fixed parsing time in week 0 before Jan 1.  Original patch by
18103  Tamás Bence Gedai.
18104
18105- bpo-26323: Add Mock.assert_called() and Mock.assert_called_once() methods
18106  to unittest.mock. Patch written by Amit Saha.
18107
18108- bpo-20589: Invoking Path.owner() and Path.group() on Windows now raise
18109  NotImplementedError instead of ImportError.
18110
18111- bpo-26177: Fixed the keys() method for Canvas and Scrollbar widgets.
18112
18113- bpo-15068: Got rid of excessive buffering in fileinput. The bufsize
18114  parameter is now deprecated and ignored.
18115
18116- bpo-19475: Added an optional argument timespec to the datetime isoformat()
18117  method to choose the precision of the time component.
18118
18119- bpo-2202: Fix UnboundLocalError in
18120  AbstractDigestAuthHandler.get_algorithm_impls. Initial patch by Mathieu
18121  Dupuy.
18122
18123- bpo-26167: Minimized overhead in copy.copy() and copy.deepcopy().
18124  Optimized copying and deepcopying bytearrays, NotImplemented, slices,
18125  short lists, tuples, dicts, sets.
18126
18127- bpo-25718: Fixed pickling and copying the accumulate() iterator with total
18128  is None.
18129
18130- bpo-26475: Fixed debugging output for regular expressions with the (?x)
18131  flag.
18132
18133- bpo-26482: Allowed pickling recursive dequeues.
18134
18135- bpo-26335: Make mmap.write() return the number of bytes written like other
18136  write methods.  Patch by Jakub Stasiak.
18137
18138- bpo-26457: Fixed the subnets() methods in IP network classes for the case
18139  when resulting prefix length is equal to maximal prefix length. Based on
18140  patch by Xiang Zhang.
18141
18142- bpo-26385: Remove the file if the internal open() call in
18143  NamedTemporaryFile() fails. Patch by Silent Ghost.
18144
18145- bpo-26402: Fix XML-RPC client to retry when the server shuts down a
18146  persistent connection.  This was a regression related to the new
18147  http.client.RemoteDisconnected exception in 3.5.0a4.
18148
18149- bpo-25913: Leading ``<~`` is optional now in base64.a85decode() with
18150  adobe=True.  Patch by Swati Jaiswal.
18151
18152- bpo-26186: Remove an invalid type check in importlib.util.LazyLoader.
18153
18154- bpo-26367: importlib.__import__() raises ImportError like
18155  builtins.__import__() when ``level`` is specified but without an
18156  accompanying package specified.
18157
18158- bpo-26309: In the "socketserver" module, shut down the request (closing
18159  the connected socket) when verify_request() returns false.  Patch by Aviv
18160  Palivoda.
18161
18162- bpo-23430: Change the socketserver module to only catch exceptions raised
18163  from a request handler that are derived from Exception (instead of
18164  BaseException). Therefore SystemExit and KeyboardInterrupt no longer
18165  trigger the handle_error() method, and will now to stop a single-threaded
18166  server.
18167
18168Security
18169--------
18170
18171- bpo-25939: On Windows open the cert store readonly in
18172  ssl.enum_certificates.
18173
18174Library
18175-------
18176
18177- bpo-25995: os.walk() no longer uses FDs proportional to the tree depth.
18178
18179- bpo-25994: Added the close() method and the support of the context manager
18180  protocol for the os.scandir() iterator.
18181
18182- bpo-23992: multiprocessing: make MapResult not fail-fast upon exception.
18183
18184- bpo-26243: Support keyword arguments to zlib.compress().  Patch by Aviv
18185  Palivoda.
18186
18187- bpo-26117: The os.scandir() iterator now closes file descriptor not only
18188  when the iteration is finished, but when it was failed with error.
18189
18190- bpo-25949: __dict__ for an OrderedDict instance is now created only when
18191  needed.
18192
18193- bpo-25911: Restored support of bytes paths in os.walk() on Windows.
18194
18195- bpo-26045: Add UTF-8 suggestion to error message when posting a
18196  non-Latin-1 string with http.client.
18197
18198- bpo-26039: Added zipfile.ZipInfo.from_file() and zipinfo.ZipInfo.is_dir().
18199  Patch by Thomas Kluyver.
18200
18201- bpo-12923: Reset FancyURLopener's redirect counter even if there is an
18202  exception. Based on patches by Brian Brazil and Daniel Rocco.
18203
18204- bpo-25945: Fixed a crash when unpickle the functools.partial object with
18205  wrong state. Fixed a leak in failed functools.partial constructor. "args"
18206  and "keywords" attributes of functools.partial have now always types tuple
18207  and dict correspondingly.
18208
18209- bpo-26202: copy.deepcopy() now correctly copies range() objects with
18210  non-atomic attributes.
18211
18212- bpo-23076: Path.glob() now raises a ValueError if it's called with an
18213  invalid pattern. Patch by Thomas Nyberg.
18214
18215- bpo-19883: Fixed possible integer overflows in zipimport.
18216
18217- bpo-26227: On Windows, getnameinfo(), gethostbyaddr() and
18218  gethostbyname_ex() functions of the socket module now decode the hostname
18219  from the ANSI code page rather than UTF-8.
18220
18221- bpo-26099: The site module now writes an error into stderr if
18222  sitecustomize module can be imported but executing the module raise an
18223  ImportError. Same change for usercustomize.
18224
18225- bpo-26147: xmlrpc now works with strings not encodable with used non-UTF-8
18226  encoding.
18227
18228- bpo-25935: Garbage collector now breaks reference loops with OrderedDict.
18229
18230- bpo-16620: Fixed AttributeError in msilib.Directory.glob().
18231
18232- bpo-26013: Added compatibility with broken protocol 2 pickles created in
18233  old Python 3 versions (3.4.3 and lower).
18234
18235- bpo-26129: Deprecated accepting non-integers in grp.getgrgid().
18236
18237- bpo-25850: Use cross-compilation by default for 64-bit Windows.
18238
18239- bpo-25822: Add docstrings to the fields of urllib.parse results. Patch
18240  contributed by Swati Jaiswal.
18241
18242- bpo-22642: Convert trace module option parsing mechanism to argparse.
18243  Patch contributed by SilentGhost.
18244
18245- bpo-24705: Fix sysconfig._parse_makefile not expanding ${} vars appearing
18246  before $() vars.
18247
18248- bpo-26069: Remove the deprecated apis in the trace module.
18249
18250- bpo-22138: Fix mock.patch behavior when patching descriptors. Restore
18251  original values after patching. Patch contributed by Sean McCully.
18252
18253- bpo-25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode
18254  option if it is safe to do so.
18255
18256- bpo-26012: Don't traverse into symlinks for ``**`` pattern in
18257  pathlib.Path.[r]glob().
18258
18259- bpo-24120: Ignore PermissionError when traversing a tree with
18260  pathlib.Path.[r]glob(). Patch by Ulrich Petri.
18261
18262- bpo-21815: Accept ] characters in the data portion of imap responses, in
18263  order to handle the flags with square brackets accepted and produced by
18264  servers such as gmail.
18265
18266- bpo-25447: fileinput now uses sys.stdin as-is if it does not have a buffer
18267  attribute (restores backward compatibility).
18268
18269- bpo-25971: Optimized creating Fractions from floats by 2 times and from
18270  Decimals by 3 times.
18271
18272- bpo-25802: Document as deprecated the remaining implementations of
18273  importlib.abc.Loader.load_module().
18274
18275- bpo-25928: Add Decimal.as_integer_ratio().
18276
18277- bpo-25447: Copying the lru_cache() wrapper object now always works,
18278  independently from the type of the wrapped object (by returning the
18279  original object unchanged).
18280
18281- bpo-25768: Have the functions in compileall return booleans instead of
18282  ints and add proper documentation and tests for the return values.
18283
18284- bpo-24103: Fixed possible use after free in ElementTree.XMLPullParser.
18285
18286- bpo-25860: os.fwalk() no longer skips remaining directories when error
18287  occurs. Original patch by Samson Lee.
18288
18289- bpo-25914: Fixed and simplified OrderedDict.__sizeof__.
18290
18291- bpo-25869: Optimized deepcopying ElementTree; it is now 20 times faster.
18292
18293- bpo-25873: Optimized iterating ElementTree.  Iterating elements
18294  Element.iter() is now 40% faster, iterating text Element.itertext() is now
18295  up to 2.5 times faster.
18296
18297- bpo-25902: Fixed various refcount issues in ElementTree iteration.
18298
18299- bpo-22227: The TarFile iterator is reimplemented using generator. This
18300  implementation is simpler that using class.
18301
18302- bpo-25638: Optimized ElementTree.iterparse(); it is now 2x faster.
18303  Optimized ElementTree parsing; it is now 10% faster.
18304
18305- bpo-25761: Improved detecting errors in broken pickle data.
18306
18307- bpo-25717: Restore the previous behaviour of tolerating most fstat()
18308  errors when opening files.  This was a regression in 3.5a1, and stopped
18309  anonymous temporary files from working in special cases.
18310
18311- bpo-24903: Fix regression in number of arguments compileall accepts when
18312  '-d' is specified.  The check on the number of arguments has been dropped
18313  completely as it never worked correctly anyway.
18314
18315- bpo-25764: In the subprocess module, preserve any exception caused by
18316  fork() failure when preexec_fn is used.
18317
18318- bpo-25771: Tweak the exception message for importlib.util.resolve_name()
18319  when 'package' isn't specified but necessary.
18320
18321- bpo-6478: _strptime's regexp cache now is reset after changing timezone
18322  with time.tzset().
18323
18324- bpo-14285: When executing a package with the "python -m package" option,
18325  and package initialization fails, a proper traceback is now reported.  The
18326  "runpy" module now lets exceptions from package initialization pass back
18327  to the caller, rather than raising ImportError.
18328
18329- bpo-19771: Also in runpy and the "-m" option, omit the irrelevant message
18330  ". . . is a package and cannot be directly executed" if the package could
18331  not even be initialized (e.g. due to a bad ``*.pyc`` file).
18332
18333- bpo-25177: Fixed problem with the mean of very small and very large
18334  numbers. As a side effect, statistics.mean and statistics.variance should
18335  be significantly faster.
18336
18337- bpo-25718: Fixed copying object with state with boolean value is false.
18338
18339- bpo-10131: Fixed deep copying of minidom documents.  Based on patch by
18340  Marian Ganisin.
18341
18342- bpo-7990: dir() on ElementTree.Element now lists properties: "tag",
18343  "text", "tail" and "attrib".  Original patch by Santoso Wijaya.
18344
18345- bpo-25725: Fixed a reference leak in pickle.loads() when unpickling
18346  invalid data including tuple instructions.
18347
18348- bpo-25663: In the Readline completer, avoid listing duplicate global
18349  names, and search the global namespace before searching builtins.
18350
18351- bpo-25688: Fixed file leak in ElementTree.iterparse() raising an error.
18352
18353- bpo-23914: Fixed SystemError raised by unpickler on broken pickle data.
18354
18355- bpo-25691: Fixed crash on deleting ElementTree.Element attributes.
18356
18357- bpo-25624: ZipFile now always writes a ZIP_STORED header for directory
18358  entries.  Patch by Dingyuan Wang.
18359
18360- bpo-25626: Change three zlib functions to accept sizes that fit in
18361  Py_ssize_t, but internally cap those sizes to UINT_MAX.  This resolves a
18362  regression in 3.5 where GzipFile.read() failed to read chunks larger than
18363  2 or 4 GiB.  The change affects the zlib.Decompress.decompress()
18364  max_length parameter, the zlib.decompress() bufsize parameter, and the
18365  zlib.Decompress.flush() length parameter.
18366
18367- bpo-25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True)
18368  when the OS gives priority to errors such as EACCES over EEXIST.
18369
18370- bpo-25593: Change semantics of EventLoop.stop() in asyncio.
18371
18372- bpo-6973: When we know a subprocess.Popen process has died, do not allow
18373  the send_signal(), terminate(), or kill() methods to do anything as they
18374  could potentially signal a different process.
18375
18376- bpo-23883: Added missing APIs to __all__ to match the documented APIs for
18377  the following modules: calendar, csv, enum, fileinput, ftplib, logging,
18378  optparse, tarfile, threading and wave.  Also added a
18379  test.support.check__all__() helper. Patches by Jacek Kołodziej, Mauro S.
18380  M. Rodrigues and Joel Taddei.
18381
18382- bpo-25590: In the Readline completer, only call getattr() once per
18383  attribute.  Also complete names of attributes such as properties and slots
18384  which are listed by dir() but not yet created on an instance.
18385
18386- bpo-25498: Fix a crash when garbage-collecting ctypes objects created by
18387  wrapping a memoryview.  This was a regression made in 3.5a1.  Based on
18388  patch by Eryksun.
18389
18390- bpo-25584: Added "escape" to the __all__ list in the glob module.
18391
18392- bpo-25584: Fixed recursive glob() with patterns starting with ``**``.
18393
18394- bpo-25446: Fix regression in smtplib's AUTH LOGIN support.
18395
18396- bpo-18010: Fix the pydoc web server's module search function to handle
18397  exceptions from importing packages.
18398
18399- bpo-25554: Got rid of circular references in regular expression parsing.
18400
18401- bpo-18973: Command-line interface of the calendar module now uses argparse
18402  instead of optparse.
18403
18404- bpo-25510: fileinput.FileInput.readline() now returns b'' instead of '' at
18405  the end if the FileInput was opened with binary mode. Patch by Ryosuke
18406  Ito.
18407
18408- bpo-25503: Fixed inspect.getdoc() for inherited docstrings of properties.
18409  Original patch by John Mark Vandenberg.
18410
18411- bpo-25515: Always use os.urandom as a source of randomness in uuid.uuid4.
18412
18413- bpo-21827: Fixed textwrap.dedent() for the case when largest common
18414  whitespace is a substring of smallest leading whitespace. Based on patch
18415  by Robert Li.
18416
18417- bpo-25447: The lru_cache() wrapper objects now can be copied and pickled
18418  (by returning the original object unchanged).
18419
18420- bpo-25390: typing: Don't crash on Union[str, Pattern].
18421
18422- bpo-25441: asyncio: Raise error from drain() when socket is closed.
18423
18424- bpo-25410: Cleaned up and fixed minor bugs in C implementation of
18425  OrderedDict.
18426
18427- bpo-25411: Improved Unicode support in SMTPHandler through better use of
18428  the email package. Thanks to user simon04 for the patch.
18429
18430- Move the imp module from a PendingDeprecationWarning to
18431  DeprecationWarning.
18432
18433- bpo-25407: Remove mentions of the formatter module being removed in Python
18434  3.6.
18435
18436- bpo-25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
18437  that caused segmentation fault or hang in iterating after moving several
18438  items to the start of ordered dict.
18439
18440- bpo-25382: pickletools.dis() now outputs implicit memo index for the
18441  MEMOIZE opcode.
18442
18443- bpo-25357: Add an optional newline parameter to binascii.b2a_base64().
18444  base64.b64encode() uses it to avoid a memory copy.
18445
18446- bpo-24164: Objects that need calling ``__new__`` with keyword arguments,
18447  can now be pickled using pickle protocols older than protocol version 4.
18448
18449- bpo-25364: zipfile now works in threads disabled builds.
18450
18451- bpo-25328: smtpd's SMTPChannel now correctly raises a ValueError if both
18452  decode_data and enable_SMTPUTF8 are set to true.
18453
18454- bpo-16099: RobotFileParser now supports Crawl-delay and Request-rate
18455  extensions.  Patch by Nikolay Bogoychev.
18456
18457- bpo-25316: distutils raises OSError instead of DistutilsPlatformError when
18458  MSVC is not installed.
18459
18460- bpo-25380: Fixed protocol for the STACK_GLOBAL opcode in
18461  pickletools.opcodes.
18462
18463- bpo-23972: Updates asyncio datagram create method allowing reuseport and
18464  reuseaddr socket options to be set prior to binding the socket. Mirroring
18465  the existing asyncio create_server method the reuseaddr option for
18466  datagram sockets defaults to True if the O/S is 'posix' (except if the
18467  platform is Cygwin). Patch by Chris Laws.
18468
18469- bpo-25304: Add asyncio.run_coroutine_threadsafe().  This lets you submit a
18470  coroutine to a loop from another thread, returning a
18471  concurrent.futures.Future.  By Vincent Michel.
18472
18473- bpo-25232: Fix CGIRequestHandler to split the query from the URL at the
18474  first question mark (?) rather than the last. Patch from Xiang Zhang.
18475
18476- bpo-24657: Prevent CGIRequestHandler from collapsing slashes in the query
18477  part of the URL as if it were a path. Patch from Xiang Zhang.
18478
18479- bpo-25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not
18480  supported. Check if it is supported, it may not be supported on OpenBSD
18481  for example.
18482
18483- bpo-23600: Default implementation of tzinfo.fromutc() was returning wrong
18484  results in some cases.
18485
18486- bpo-25203: Failed readline.set_completer_delims() no longer left the
18487  module in inconsistent state.
18488
18489- bpo-25011: rlcompleter now omits private and special attribute names
18490  unless the prefix starts with underscores.
18491
18492- bpo-25209: rlcompleter now can add a space or a colon after completed
18493  keyword.
18494
18495- bpo-22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'.
18496
18497- bpo-23517: fromtimestamp() and utcfromtimestamp() methods of
18498  datetime.datetime now round microseconds to nearest with ties going to
18499  nearest even integer (ROUND_HALF_EVEN), as round(float), instead of
18500  rounding towards -Infinity (ROUND_FLOOR).
18501
18502- bpo-23552: Timeit now warns when there is substantial (4x) variance
18503  between best and worst times. Patch from Serhiy Storchaka.
18504
18505- bpo-24633: site-packages/README -> README.txt.
18506
18507- bpo-24879: help() and pydoc can now list named tuple fields in the order
18508  they were defined rather than alphabetically.  The ordering is determined
18509  by the _fields attribute if present.
18510
18511- bpo-24874: Improve speed of itertools.cycle() and make its pickle more
18512  compact.
18513
18514- Fix crash in itertools.cycle.__setstate__() when the first argument wasn't
18515  a list.
18516
18517- bpo-20059: urllib.parse raises ValueError on all invalid ports. Patch by
18518  Martin Panter.
18519
18520- bpo-24360: Improve __repr__ of argparse.Namespace() for invalid
18521  identifiers.  Patch by Matthias Bussonnier.
18522
18523- bpo-23426: run_setup was broken in distutils. Patch from Alexander
18524  Belopolsky.
18525
18526- bpo-13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond.
18527
18528- bpo-2091: open() accepted a 'U' mode string containing '+', but 'U' can
18529  only be used with 'r'. Patch from Jeff Balogh and John O'Connor.
18530
18531- bpo-8585: improved tests for zipimporter2. Patch from Mark Lawrence.
18532
18533- bpo-18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
18534  Patch from Nicola Palumbo and Laurent De Buyst.
18535
18536- bpo-24426: Fast searching optimization in regular expressions now works
18537  for patterns that starts with capturing groups.  Fast searching
18538  optimization now can't be disabled at compile time.
18539
18540- bpo-23661: unittest.mock side_effects can now be exceptions again. This
18541  was a regression vs Python 3.4. Patch from Ignacio Rossi
18542
18543- bpo-13248: Remove deprecated inspect.getmoduleinfo function.
18544
18545- bpo-25578: Fix (another) memory leak in SSLSocket.getpeercer().
18546
18547- bpo-25530: Disable the vulnerable SSLv3 protocol by default when creating
18548  ssl.SSLContext.
18549
18550- bpo-25569: Fix memory leak in SSLSocket.getpeercert().
18551
18552- bpo-25471: Sockets returned from accept() shouldn't appear to be
18553  nonblocking.
18554
18555- bpo-25319: When threading.Event is reinitialized, the underlying condition
18556  should use a regular lock rather than a recursive lock.
18557
18558- Skip getaddrinfo if host is already resolved. Patch by A. Jesse Jiryu
18559  Davis.
18560
18561- bpo-26050: Add asyncio.StreamReader.readuntil() method. Patch by Марк
18562  Коренберг.
18563
18564- bpo-25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X
18565  versions 10.5 or higher.  Original patch by A. Jesse Jiryu Davis.
18566
18567- bpo-26406: Avoid unnecessary serialization of getaddrinfo(3) calls on
18568  current versions of OpenBSD and NetBSD.  Patch by A. Jesse Jiryu Davis.
18569
18570- bpo-26848: Fix asyncio/subprocess.communicate() to handle empty input.
18571  Patch by Jack O'Connor.
18572
18573- bpo-27040: Add loop.get_exception_handler method
18574
18575- bpo-27041: asyncio: Add loop.create_future method
18576
18577IDLE
18578----
18579
18580- bpo-20640: Add tests for idlelib.configHelpSourceEdit. Patch by Saimadhav
18581  Heblikar.
18582
18583- In the 'IDLE-console differences' section of the IDLE doc, clarify how
18584  running with IDLE affects sys.modules and the standard streams.
18585
18586- bpo-25507: fix incorrect change in IOBinding that prevented printing.
18587  Augment IOBinding htest to include all major IOBinding functions.
18588
18589- bpo-25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION
18590  MARK in README.txt and open this and NEWS.txt with 'ascii'. Re-encode
18591  CREDITS.txt to utf-8 and open it with 'utf-8'.
18592
18593- bpo-15348: Stop the debugger engine (normally in a user process) before
18594  closing the debugger window (running in the IDLE process). This prevents
18595  the RuntimeErrors that were being caught and ignored.
18596
18597- bpo-24455: Prevent IDLE from hanging when a) closing the shell while the
18598  debugger is active (15347); b) closing the debugger with the [X] button
18599  (15348); and c) activating the debugger when already active (24455). The
18600  patch by Mark Roseman does this by making two changes. 1. Suspend and
18601  resume the gui.interaction method with the tcl vwait mechanism intended
18602  for this purpose (instead of root.mainloop & .quit). 2. In gui.run, allow
18603  any existing interaction to terminate first.
18604
18605- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
18606  to make it clearer that the program referred to is the currently running
18607  user program, not IDLE itself.
18608
18609- bpo-24750: Improve the appearance of the IDLE editor window status bar.
18610  Patch by Mark Roseman.
18611
18612- bpo-25313: Change the handling of new built-in text color themes to better
18613  address the compatibility problem introduced by the addition of IDLE Dark.
18614  Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
18615
18616- bpo-24782: Extension configuration is now a tab in the IDLE Preferences
18617  dialog rather than a separate dialog.  The former tabs are now a sorted
18618  list.  Patch by Mark Roseman.
18619
18620- bpo-22726: Re-activate the config dialog help button with some content
18621  about the other buttons and the new IDLE Dark theme.
18622
18623- bpo-24820: IDLE now has an 'IDLE Dark' built-in text color theme. It is
18624  more or less IDLE Classic inverted, with a cobalt blue background.
18625  Strings, comments, keywords, ... are still green, red, orange, ... . To
18626  use it with IDLEs released before November 2015, hit the 'Save as New
18627  Custom Theme' button and enter a new name, such as 'Custom Dark'.  The
18628  custom theme will work with any IDLE release, and can be modified.
18629
18630- bpo-25224: README.txt is now an idlelib index for IDLE developers and
18631  curious users. The previous user content is now in the IDLE doc chapter.
18632  'IDLE' now means 'Integrated Development and Learning Environment'.
18633
18634- bpo-24820: Users can now set breakpoint colors in Settings -> Custom
18635  Highlighting. Original patch by Mark Roseman.
18636
18637- bpo-24972: Inactive selection background now matches active selection
18638  background, as configured by users, on all systems.  Found items are now
18639  always highlighted on Windows.  Initial patch by Mark Roseman.
18640
18641- bpo-24570: Idle: make calltip and completion boxes appear on Macs affected
18642  by a tk regression.  Initial patch by Mark Roseman.
18643
18644- bpo-24988: Idle ScrolledList context menus (used in debugger) now work on
18645  Mac Aqua. Patch by Mark Roseman.
18646
18647- bpo-24801: Make right-click for context menu work on Mac Aqua. Patch by
18648  Mark Roseman.
18649
18650- bpo-25173: Associate tkinter messageboxes with a specific widget. For Mac
18651  OSX, make them a 'sheet'.  Patch by Mark Roseman.
18652
18653- bpo-25198: Enhance the initial html viewer now used for Idle Help.
18654  Properly indent fixed-pitch text (patch by Mark Roseman). Give code
18655  snippet a very Sphinx-like light blueish-gray background. Re-use initial
18656  width and height set by users for shell and editor. When the Table of
18657  Contents (TOC) menu is used, put the section header at the top of the
18658  screen.
18659
18660- bpo-25225: Condense and rewrite Idle doc section on text colors.
18661
18662- bpo-21995: Explain some differences between IDLE and console Python.
18663
18664- bpo-22820: Explain need for *print* when running file from Idle editor.
18665
18666- bpo-25224: Doc: augment Idle feature list and no-subprocess section.
18667
18668- bpo-25219: Update doc for Idle command line options. Some were missing and
18669  notes were not correct.
18670
18671- bpo-24861: Most of idlelib is private and subject to change. Use
18672  idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
18673
18674- bpo-25199: Idle: add synchronization comments for future maintainers.
18675
18676- bpo-16893: Replace help.txt with help.html for Idle doc display. The new
18677  idlelib/help.html is rstripped Doc/build/html/library/idle.html. It looks
18678  better than help.txt and will better document Idle as released. The
18679  tkinter html viewer that works for this file was written by Rose Roseman.
18680  The now unused EditorWindow.HelpDialog class and helt.txt file are
18681  deprecated.
18682
18683- bpo-24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
18684
18685- bpo-24790: Remove extraneous code (which also create 2 & 3 conflicts).
18686
18687Documentation
18688-------------
18689
18690- bpo-26736: Used HTTPS for external links in the documentation if possible.
18691
18692- bpo-6953: Rework the Readline module documentation to group related
18693  functions together, and add more details such as what underlying Readline
18694  functions and variables are accessed.
18695
18696- bpo-23606: Adds note to ctypes documentation regarding cdll.msvcrt.
18697
18698- bpo-24952: Clarify the default size argument of stack_size() in the
18699  "threading" and "_thread" modules. Patch from Mattip.
18700
18701- bpo-26014: Update 3.x packaging documentation: * "See also" links to the
18702  new docs are now provided in the legacy pages * links to setuptools
18703  documentation have been updated
18704
18705Tests
18706-----
18707
18708- bpo-21916: Added tests for the turtle module.  Patch by ingrid, Gregory
18709  Loyse and Jelle Zijlstra.
18710
18711- bpo-26295: When using "python3 -m test --testdir=TESTDIR", regrtest
18712  doesn't add "test." prefix to test module names.
18713
18714- bpo-26523: The multiprocessing thread pool (multiprocessing.dummy.Pool)
18715  was untested.
18716
18717- bpo-26015: Added new tests for pickling iterators of mutable sequences.
18718
18719- bpo-26325: Added test.support.check_no_resource_warning() to check that no
18720  ResourceWarning is emitted.
18721
18722- bpo-25940: Changed test_ssl to use its internal local server more.  This
18723  avoids relying on svn.python.org, which recently changed root certificate.
18724
18725- bpo-25616: Tests for OrderedDict are extracted from test_collections into
18726  separate file test_ordered_dict.
18727
18728- bpo-25449: Added tests for OrderedDict subclasses.
18729
18730- bpo-25188: Add -P/--pgo to test.regrtest to suppress error output when
18731  running the test suite for the purposes of a PGO build. Initial patch by
18732  Alecsandru Patrascu.
18733
18734- bpo-22806: Add ``python -m test --list-tests`` command to list tests.
18735
18736- bpo-18174: ``python -m test --huntrleaks ...`` now also checks for leak of
18737  file descriptors. Patch written by Richard Oudkerk.
18738
18739- bpo-25260: Fix ``python -m test --coverage`` on Windows. Remove the list
18740  of ignored directories.
18741
18742- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass
18743  along to regrtest.py.  Previously there was a limit of 9.
18744
18745- bpo-26583: Skip test_timestamp_overflow in test_import if bytecode files
18746  cannot be written.
18747
18748Build
18749-----
18750
18751- bpo-21277: Don't try to link _ctypes with a ffi_convenience library.
18752
18753- bpo-26884: Fix linking extension modules for cross builds. Patch by Xavier
18754  de Gaye.
18755
18756- bpo-26932: Fixed support of RTLD_* constants defined as enum values, not
18757  via macros (in particular on Android).  Patch by Chi Hsuan Yen.
18758
18759- bpo-22359: Disable the rules for running _freeze_importlib and pgen when
18760  cross-compiling.  The output of these programs is normally saved with the
18761  source code anyway, and is still regenerated when doing a native build.
18762  Patch by Xavier de Gaye.
18763
18764- bpo-21668: Link audioop, _datetime, _ctypes_test modules to libm, except
18765  on Mac OS X. Patch written by Chi Hsuan Yen.
18766
18767- bpo-25702: A --with-lto configure option has been added that will enable
18768  link time optimizations at build time during a make profile-opt. Some
18769  compilers and toolchains are known to not produce stable code when using
18770  LTO, be sure to test things thoroughly before relying on it. It can
18771  provide a few % speed up over profile-opt alone.
18772
18773- bpo-26624: Adds validation of ucrtbase[d].dll version with warning for old
18774  versions.
18775
18776- bpo-17603: Avoid error about nonexistent fileblocks.o file by using a
18777  lower-level check for st_blocks in struct stat.
18778
18779- bpo-26079: Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern
18780  Thiel.
18781
18782- bpo-26465: Update Windows builds to use OpenSSL 1.0.2g.
18783
18784- bpo-25348: Added ``--pgo`` and ``--pgo-job`` arguments to
18785  ``PCbuild\build.bat`` for building with Profile-Guided Optimization.  The
18786  old ``PCbuild\build_pgo.bat`` script is removed.
18787
18788- bpo-25827: Add support for building with ICC to ``configure``, including a
18789  new ``--with-icc`` flag.
18790
18791- bpo-25696: Fix installation of Python on UNIX with make -j9.
18792
18793- bpo-24986: It is now possible to build Python on Windows without errors
18794  when external libraries are not available.
18795
18796- bpo-24421: Compile Modules/_math.c once, before building extensions.
18797  Previously it could fail to compile properly if the math and cmath builds
18798  were concurrent.
18799
18800- bpo-26465: Update OS X 10.5+ 32-bit-only installer to build and link with
18801  OpenSSL 1.0.2g.
18802
18803- bpo-26268: Update Windows builds to use OpenSSL 1.0.2f.
18804
18805- bpo-25136: Support Apple Xcode 7's new textual SDK stub libraries.
18806
18807- bpo-24324: Do not enable unreachable code warnings when using gcc as the
18808  option does not work correctly in older versions of gcc and has been
18809  silently removed as of gcc-4.5.
18810
18811Windows
18812-------
18813
18814- bpo-27053: Updates make_zip.py to correctly generate library ZIP file.
18815
18816- bpo-26268: Update the prepare_ssl.py script to handle OpenSSL releases
18817  that don't include the contents of the include directory (that is, 1.0.2e
18818  and later).
18819
18820- bpo-26071: bdist_wininst created binaries fail to start and find 32bit
18821  Python
18822
18823- bpo-26073: Update the list of magic numbers in launcher
18824
18825- bpo-26065: Excludes venv from library when generating embeddable distro.
18826
18827- bpo-25022: Removed very outdated PC/example_nt/ directory.
18828
18829Tools/Demos
18830-----------
18831
18832- bpo-26799: Fix python-gdb.py: don't get C types once when the Python code
18833  is loaded, but get C types on demand. The C types can change if
18834  python-gdb.py is loaded before the Python executable. Patch written by
18835  Thomas Ilsche.
18836
18837- bpo-26271: Fix the Freeze tool to properly use flags passed through
18838  configure. Patch by Daniel Shaulov.
18839
18840- bpo-26489: Add dictionary unpacking support to Tools/parser/unparse.py.
18841  Patch by Guo Ci Teo.
18842
18843- bpo-26316: Fix variable name typo in Argument Clinic.
18844
18845- bpo-25440: Fix output of python-config --extension-suffix.
18846
18847- bpo-25154: The pyvenv script has been deprecated in favour of `python3 -m
18848  venv`.
18849
18850C API
18851-----
18852
18853- bpo-26312: SystemError is now raised in all programming bugs with using
18854  PyArg_ParseTupleAndKeywords().  RuntimeError did raised before in some
18855  programming bugs.
18856
18857- bpo-26198: ValueError is now raised instead of TypeError on buffer
18858  overflow in parsing "es#" and "et#" format units.  SystemError is now
18859  raised instead of TypeError on programmatical error in parsing format
18860  string.
18861
18862
18863What's New in Python 3.5.5 final?
18864=================================
18865
18866*Release date: 2018-02-04*
18867
18868There were no new changes in version 3.5.5.
18869
18870
18871
18872What's New in Python 3.5.5 release candidate 1?
18873===============================================
18874
18875*Release date: 2018-01-23*
18876
18877Security
18878--------
18879
18880- bpo-32551: The ``sys.path[0]`` initialization change for bpo-29139 caused
18881  a regression by revealing an inconsistency in how sys.path is initialized
18882  when executing ``__main__`` from a zipfile, directory, or other import
18883  location. This is considered a potential security issue, as it may lead to
18884  privileged processes unexpectedly loading code from user controlled
18885  directories in situations where that was not previously the case. The
18886  interpreter now consistently avoids ever adding the import location's
18887  parent directory to ``sys.path``, and ensures no other ``sys.path``
18888  entries are inadvertently modified when inserting the import location
18889  named on the command line. (Originally reported as bpo-29723 against
18890  Python 3.6rc1, but it was missed at the time that the then upcoming Python
18891  3.5.4 release would also be affected)
18892
18893- bpo-30657: Fixed possible integer overflow in PyBytes_DecodeEscape,
18894  CVE-2017-1000158. Original patch by Jay Bosamiya; rebased to Python 3 by
18895  Miro Hrončok.
18896
18897- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to
18898  get security fixes.
18899
18900Core and Builtins
18901-----------------
18902
18903- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which
18904  doesn't call ``PyObject_GC_UnTrack()``.
18905
18906Library
18907-------
18908
18909- bpo-32072: Fixed issues with binary plists: Fixed saving bytearrays.
18910  Identical objects will be saved only once. Equal references will be load
18911  as identical objects. Added support for saving and loading recursive data
18912  structures.
18913
18914- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of
18915  partial characters for UTF-8 input (libexpat bug 115):
18916  https://github.com/libexpat/libexpat/issues/115
18917
18918
18919What's New in Python 3.5.4 final?
18920=================================
18921
18922*Release date: 2017-08-07*
18923
18924Library
18925-------
18926
18927- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that
18928  contains CR or LF. Patch by Dong-hee Na.
18929
18930
18931What's New in Python 3.5.4 release candidate 1?
18932===============================================
18933
18934*Release date: 2017-07-23*
18935
18936Security
18937--------
18938
18939- bpo-30730: Prevent environment variables injection in subprocess on
18940  Windows.  Prevent passing other environment variables and command
18941  arguments.
18942
18943- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple
18944  security vulnerabilities including: CVE-2017-9233 (External entity
18945  infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix),
18946  CVE-2016-0718 (Fix regression bugs from 2.2.0's fix to CVE-2016-0718) and
18947  CVE-2012-0876 (Counter hash flooding with SipHash). Note: the
18948  CVE-2016-5300 (Use os-specific entropy sources like getrandom) doesn't
18949  impact Python, since Python already gets entropy from the OS to set the
18950  expat secret using ``XML_SetHashSalt()``.
18951
18952- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For
18953  example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the
18954  ``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an
18955  authentication (``login@host``).
18956
18957- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of
18958  CVE-2016-0718 and CVE-2016-4472. See
18959  https://sourceforge.net/p/expat/bugs/537/ for more information.
18960
18961Core and Builtins
18962-----------------
18963
18964- bpo-30876: Relative import from unloaded package now reimports the package
18965  instead of failing with SystemError.  Relative import from non-package now
18966  fails with ImportError rather than SystemError.
18967
18968- bpo-30765: Avoid blocking in pthread_mutex_lock() when
18969  PyThread_acquire_lock() is asked not to block.
18970
18971- bpo-27945: Fixed various segfaults with dict when input collections are
18972  mutated during searching, inserting or comparing.  Based on patches by
18973  Duane Griffin and Tim Mitchell.
18974
18975- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for
18976  non-interned attribute names.  Based on patch by Eryk Sun.
18977
18978- bpo-29935: Fixed error messages in the index() method of tuple, list and
18979  deque when pass indices of wrong type.
18980
18981- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises
18982  :exc:`OverflowError`.
18983
18984- bpo-29600: Fix wrapping coroutine return values in StopIteration.
18985
18986- bpo-29537: Restore runtime compatibility with bytecode files generated by
18987  CPython 3.5.0 to 3.5.2, and adjust the eval loop to avoid the problems
18988  that could be caused by the malformed variant of the
18989  BUILD_MAP_UNPACK_WITH_CALL opcode that they may contain. Patch by Petr
18990  Viktorin, Serhiy Storchaka, and Nick Coghlan.
18991
18992- bpo-28598: Support __rmod__ for subclasses of str being called before
18993  str.__mod__. Patch by Martijn Pieters.
18994
18995- bpo-29602: Fix incorrect handling of signed zeros in complex constructor
18996  for complex subclasses and for inputs having a __complex__ method. Patch
18997  by Serhiy Storchaka.
18998
18999- bpo-29347: Fixed possibly dereferencing undefined pointers when creating
19000  weakref objects.
19001
19002- bpo-29438: Fixed use-after-free problem in key sharing dict.
19003
19004- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0].
19005
19006- bpo-29337: Fixed possible BytesWarning when compare the code objects.
19007  Warnings could be emitted at compile time.
19008
19009- bpo-29478: If max_line_length=None is specified while using the Compat32
19010  policy, it is no longer ignored.  Patch by Mircea Cosbuc.
19011
19012Library
19013-------
19014
19015- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound
19016  builtin functions.  Patch by Aaron Gallagher.
19017
19018- bpo-30961: Fix decrementing a borrowed reference in tracemalloc.
19019
19020- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the
19021  thread completes, even if the thread was started by the same process which
19022  created the queue.
19023
19024- bpo-29854: Fix segfault in readline when using readline's history-size
19025  option.  Patch by Nir Soffer.
19026
19027- bpo-30807: signal.setitimer() may disable the timer when passed a tiny
19028  value. Tiny values (such as 1e-6) are valid non-zero values for
19029  setitimer(), which is specified as taking microsecond-resolution
19030  intervals. However, on some platform, our conversion routine could convert
19031  1e-6 into a zero interval, therefore disabling the timer instead of
19032  (re-)scheduling it.
19033
19034- bpo-30441: Fix bug when modifying os.environ while iterating over it
19035
19036- bpo-30532: Fix email header value parser dropping folding white space in
19037  certain cases.
19038
19039- bpo-29169: Update zlib to 1.2.11.
19040
19041- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called
19042  with bytes-like argument.
19043
19044- bpo-30746: Prohibited the '=' character in environment variable names in
19045  ``os.putenv()`` and ``os.spawn*()``.
19046
19047- bpo-29755: Fixed the lgettext() family of functions in the gettext module.
19048  They now always return bytes.
19049
19050- bpo-30645: Fix path calculation in imp.load_package(), fixing it for cases
19051  when a package is only shipped with bytecodes. Patch by Alexandru
19052  Ardelean.
19053
19054- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a
19055  reference cycle to not keep objects alive longer than expected.
19056
19057- bpo-30149: inspect.signature() now supports callables with
19058  variable-argument parameters wrapped with partialmethod. Patch by Dong-hee
19059  Na.
19060
19061- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects.
19062  Patch by Sanjay Sundaresan.
19063
19064- bpo-24484: Avoid race condition in multiprocessing cleanup.
19065
19066- bpo-28994: The traceback no longer displayed for SystemExit raised in a
19067  callback registered by atexit.
19068
19069- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was
19070  called.
19071
19072- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add
19073  support for ContextManager on all versions. Original PRs by Jelle Zijlstra
19074  and Ivan Levkivskyi
19075
19076- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl
19077  implementation. Patch by Michaël Sghaïer.
19078
19079- bpo-29743: Closing transport during handshake process leaks open socket.
19080  Patch by Nikolay Kim
19081
19082- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu
19083  Sornay.
19084
19085- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore
19086  EINVAL on stdin.write() if the child process is still running but closed
19087  the pipe.
19088
19089- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot
19090  handle IPv6 addresses.
19091
19092- bpo-29960: Preserve generator state when _random.Random.setstate() raises
19093  an exception. Patch by Bryan Olson.
19094
19095- bpo-30414: multiprocessing.Queue._feed background running thread do not
19096  break from main loop on exception.
19097
19098- bpo-30003: Fix handling escape characters in HZ codec.  Based on patch by
19099  Ma Lin.
19100
19101- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn*
19102  and *forkserver* start methods.
19103
19104- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error
19105  (code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted.
19106  This error occurs sometimes on SSL connections.
19107
19108- bpo-30375: Warnings emitted when compile a regular expression now always
19109  point to the line in the user code.  Previously they could point into
19110  inners of the re module if emitted from inside of groups or conditionals.
19111
19112- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running
19113  coroutine and the coroutine returned without any more ``await``.
19114
19115- bpo-29990: Fix range checking in GB18030 decoder.  Original patch by Ma
19116  Lin.
19117
19118- bpo-26293: Change resulted because of zipfile breakage. (See also:
19119  bpo-29094)
19120
19121- bpo-30243: Removed the __init__ methods of _json's scanner and encoder.
19122  Misusing them could cause memory leaks or crashes.  Now scanner and
19123  encoder objects are completely initialized in the __new__ methods.
19124
19125- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process
19126  when Ctrl-C is received.
19127
19128- bpo-28556: Various updates to typing module: add typing.NoReturn type, use
19129  WrapperDescriptorType, minor bug-fixes.  Original PRs by Jim
19130  Fasarakis-Hilliard and Ivan Levkivskyi.
19131
19132- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux.
19133
19134- bpo-30070: Fixed leaks and crashes in errors handling in the parser
19135  module.
19136
19137- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when
19138  readline() or __next__() respectively return non-sizeable object. Fixed
19139  possible other errors caused by not checking results of PyObject_Size(),
19140  PySequence_Size(), or PyMapping_Size().
19141
19142- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint
19143  is present.
19144
19145- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True.
19146  Patch by Armin Rigo.
19147
19148- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in
19149  contextlib.contextmanager.  Patch by Siddharth Velankar.
19150
19151- bpo-29998: Pickling and copying ImportError now preserves name and path
19152  attributes.
19153
19154- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering
19155  long runs of empty iterables.
19156
19157- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions
19158  and wrong types.
19159
19160- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an
19161  exception at the very first of an iterable may swallow the exception or
19162  make the program hang. Patch by Davin Potts and Xiang Zhang.
19163
19164- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when
19165  the OS gives priority to errors such as EACCES over EEXIST.
19166
19167- bpo-29861: Release references to tasks, their arguments and their results
19168  as soon as they are finished in multiprocessing.Pool.
19169
19170- bpo-29884: faulthandler: Restore the old sigaltstack during teardown.
19171  Patch by Christophe Zeitouny.
19172
19173- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects.
19174
19175- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords
19176  are not strings.  Patch by Michael Seifert.
19177
19178- bpo-29742: get_extra_info() raises exception if get called on closed ssl
19179  transport. Patch by Nikolay Kim.
19180
19181- bpo-8256: Fixed possible failing or crashing input() if attributes
19182  "encoding" or "errors" of sys.stdin or sys.stdout are not set or are not
19183  strings.
19184
19185- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting
19186  big intables (objects that have __int__) as elements.  Patch by Oren
19187  Milman.
19188
19189- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other
19190  exception) to exception(s) raised in the dispatched methods. Patch by Petr
19191  Motejlek.
19192
19193- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes
19194  before all pipes are closed.
19195
19196- bpo-29703: Fix asyncio to support instantiation of new event loops in
19197  child processes.
19198
19199- bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
19200
19201- bpo-29110: Fix file object leak in aifc.open() when file is given as a
19202  filesystem path and is not in valid AIFF format. Patch by Anthony Zhang.
19203
19204- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter
19205  anymore. Patch written by Jiajun Huang.
19206
19207- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no
19208  longer affects a partial object after creation.
19209
19210- bpo-28556: Various updates to typing module: typing.Counter,
19211  typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle
19212  Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa.
19213
19214- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python
19215  3.6.0: check minimum and maximum years.
19216
19217- bpo-29519: Fix weakref spewing exceptions during interpreter shutdown when
19218  used with a rare combination of multiprocessing and custom codecs.
19219
19220- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir
19221
19222- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the
19223  match object. Based on patch by WGH.
19224
19225- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited
19226  to a stopped instead of terminated state (ex: when under ptrace).
19227
19228- bpo-29290: Fix a regression in argparse that help messages would wrap at
19229  non-breaking spaces.
19230
19231- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY.
19232
19233- bpo-29011: Fix an important omission by adding Deque to the typing module.
19234
19235- bpo-29219: Fixed infinite recursion in the repr of uninitialized
19236  ctypes.CDLL instances.
19237
19238- bpo-28969: Fixed race condition in C implementation of
19239  functools.lru_cache. KeyError could be raised when cached function with
19240  full cache was simultaneously called from different threads with the same
19241  uncached arguments.
19242
19243- bpo-29142: In urllib.request, suffixes in no_proxy environment variable
19244  with leading dots could match related hostnames again (e.g. .b.c matches
19245  a.b.c). Patch by Milan Oberkirch.
19246
19247Documentation
19248-------------
19249
19250- bpo-30176: Add missing attribute related constants in curses
19251  documentation.
19252
19253- bpo-26985: Add missing info of code object in inspect documentation.
19254
19255- bpo-28929: Link the documentation to its source file on GitHub.
19256
19257- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer
19258  to aiosmtpd, a third-party asyncio-based replacement.
19259
19260- bpo-26355: Add canonical header link on each page to corresponding major
19261  version of the documentation. Patch by Matthias Bussonnier.
19262
19263- bpo-29349: Fix Python 2 syntax in code for building the documentation.
19264
19265Tests
19266-----
19267
19268- bpo-30822: Fix regrtest command line parser to allow passing -u
19269  extralargefile to run test_zipfile64.
19270
19271- bpo-30383: regrtest: Enhance regrtest and backport features from the
19272  master branch. Add options: --coverage, --testdir, --list-tests (list test
19273  files, don't run them), --list-cases (list test identifiers, don't run
19274  them, :issue:`30523`), --matchfile (load a list of test filters from a
19275  text file, :issue:`30540`), --slowest (alias to --slow). Enhance output:
19276  add timestamp, test result, currently running tests, "Tests result: xxx"
19277  summary with total duration, etc. Fix reference leak hunting in regrtest,
19278  --huntrleaks: regrtest now warms up caches, create explicitly all internal
19279  singletons which are created on demand to prevent false positives when
19280  checking for reference leaks. (:issue:`30675`).
19281
19282- bpo-30357: test_thread: setUp() now uses support.threading_setup() and
19283  support.threading_cleanup() to wait until threads complete to avoid random
19284  side effects on following tests. Initial patch written by Grzegorz
19285  Grzywacz.
19286
19287- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. Skip
19288  some tests of select.poll when running on macOS due to unresolved issues
19289  with the underlying system poll function on some macOS versions.
19290
19291- bpo-30197: Enhanced functions swap_attr() and swap_item() in the
19292  test.support module. They now work when delete replaced attribute or item
19293  inside the with statement.  The old value of the attribute or item (or
19294  None if it doesn't exist) now will be assigned to the target of the "as"
19295  clause, if there is one.
19296
19297- bpo-29571: to match the behaviour of the ``re.LOCALE`` flag,
19298  test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)``
19299  to determine the candidate encoding for the test regex (allowing it to
19300  correctly skip the test when the default locale encoding is a multi-byte
19301  encoding)
19302
19303Build
19304-----
19305
19306- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``,
19307  ``make install`` and some other make targets when configured with
19308  ``--enable-optimizations``.
19309
19310- bpo-23404: Don't regenerate generated files based on file modification
19311  time anymore: the action is now explicit. Replace ``make touch`` with
19312  ``make regen-all``.
19313
19314- bpo-29643: Fix ``--enable-optimization`` didn't work.
19315
19316Windows
19317-------
19318
19319- bpo-30687: Locate msbuild.exe on Windows when building rather than
19320  vcvarsall.bat
19321
19322- bpo-29392: Prevent crash when passing invalid arguments into msvcrt
19323  module.
19324
19325C API
19326-----
19327
19328- bpo-27867: Function PySlice_GetIndicesEx() is replaced with a macro if
19329  Py_LIMITED_API is set to the value between 0x03050400 and 0x03060000 (not
19330  including) or 0x03060100 or higher.
19331
19332- bpo-29083: Fixed the declaration of some public API functions.
19333  PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in
19334  limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and
19335  Py_BuildValue() were not available in limited API of version < 3.3 when
19336  PY_SSIZE_T_CLEAN is defined.
19337
19338
19339What's New in Python 3.5.3 final?
19340=================================
19341
19342*Release date: 2017-01-17*
19343
19344There were no code changes between 3.5.3rc1 and 3.5.3 final.
19345
19346
19347
19348What's New in Python 3.5.3 release candidate 1?
19349===============================================
19350
19351*Release date: 2017-01-02*
19352
19353Core and Builtins
19354-----------------
19355
19356- bpo-29073: bytearray formatting no longer truncates on first null byte.
19357
19358- bpo-28932: Do not include <sys/random.h> if it does not exist.
19359
19360- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must
19361  not convert combined table into split table.
19362
19363- bpo-25677: Correct the positioning of the syntax error caret for indented
19364  blocks. Based on patch by Michael Layzell.
19365
19366- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate
19367  form.
19368
19369- bpo-28512: Fixed setting the offset attribute of SyntaxError by
19370  PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
19371
19372- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy
19373  bug caused by a monkey-patched len() function.
19374
19375- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
19376  when decode astral characters.  Patch by Xiang Zhang.
19377
19378- bpo-19398: Extra slash no longer added to sys.path components in case of
19379  empty compile-time PYTHONPATH components.
19380
19381- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
19382  build.
19383
19384- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception
19385  loss in PyTraceBack_Here().
19386
19387- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
19388  Patch by Xiang Zhang.
19389
19390- bpo-28376: The type of long range iterator is now registered as Iterator.
19391  Patch by Oren Milman.
19392
19393- bpo-28376: The constructor of range_iterator now checks that step is not
19394  0. Patch by Oren Milman.
19395
19396- bpo-26906: Resolving special methods of uninitialized type now causes
19397  implicit initialization of the type instead of a fail.
19398
19399- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original
19400  patch by Niklas Koep.
19401
19402- bpo-24098: Fixed possible crash when AST is changed in process of
19403  compiling it.
19404
19405- bpo-28350: String constants with null character no longer interned.
19406
19407- bpo-26617: Fix crash when GC runs during weakref callbacks.
19408
19409- bpo-27942: String constants now interned recursively in tuples and
19410  frozensets.
19411
19412- bpo-21578: Fixed misleading error message when ImportError called with
19413  invalid keyword args.
19414
19415- bpo-28203: Fix incorrect type in error message from ``complex(1.0,
19416  {2:3})``. Patch by Soumya Sharma.
19417
19418- bpo-27955: Fallback on reading /dev/urandom device when the getrandom()
19419  syscall fails with EPERM, for example when blocked by SECCOMP.
19420
19421- bpo-28131: Fix a regression in zipimport's compile_source().  zipimport
19422  should use the same optimization level as the interpreter.
19423
19424- bpo-25221: Fix corrupted result from PyLong_FromLong(0) when Python is
19425  compiled with NSMALLPOSINTS = 0.
19426
19427- bpo-25758: Prevents zipimport from unnecessarily encoding a filename
19428  (patch by Eryk Sun)
19429
19430- bpo-28189: dictitems_contains no longer swallows compare errors. (Patch by
19431  Xiang Zhang)
19432
19433- bpo-27812: Properly clear out a generator's frame's backreference to the
19434  generator to prevent crashes in frame.clear().
19435
19436- bpo-27811: Fix a crash when a coroutine that has not been awaited is
19437  finalized with warnings-as-errors enabled.
19438
19439- bpo-27587: Fix another issue found by PVS-Studio: Null pointer check after
19440  use of 'def' in _PyState_AddModule(). Initial patch by Christian Heimes.
19441
19442- bpo-26020: set literal evaluation order did not match documented
19443  behaviour.
19444
19445- bpo-27782: Multi-phase extension module import now correctly allows the
19446  ``m_methods`` field to be used to add module level functions to instances
19447  of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang.
19448
19449- bpo-27936: The round() function accepted a second None argument for some
19450  types but not for others.  Fixed the inconsistency by accepting None for
19451  all numeric types.
19452
19453- bpo-27487: Warn if a submodule argument to "python -m" or
19454  runpy.run_module() is found in sys.modules after parent packages are
19455  imported, but before the submodule is executed.
19456
19457- bpo-27558: Fix a SystemError in the implementation of "raise" statement.
19458  In a brand new thread, raise a RuntimeError since there is no active
19459  exception to reraise. Patch written by Xiang Zhang.
19460
19461- bpo-27419: Standard __import__() no longer look up "__import__" in globals
19462  or builtins for importing submodules or "from import".  Fixed handling an
19463  error of non-string package name.
19464
19465- bpo-27083: Respect the PYTHONCASEOK environment variable under Windows.
19466
19467- bpo-27514: Make having too many statically nested blocks a SyntaxError
19468  instead of SystemError.
19469
19470- bpo-27473: Fixed possible integer overflow in bytes and bytearray
19471  concatenations. Patch by Xiang Zhang.
19472
19473- bpo-27507: Add integer overflow check in bytearray.extend().  Patch by
19474  Xiang Zhang.
19475
19476- bpo-27581: Don't rely on wrapping for overflow check in
19477  PySequence_Tuple().  Patch by Xiang Zhang.
19478
19479- bpo-27443: __length_hint__() of bytearray iterators no longer return a
19480  negative integer for a resized bytearray.
19481
19482- bpo-27942: Fix memory leak in codeobject.c
19483
19484Library
19485-------
19486
19487- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a
19488  context. Patch by Sam Breese.
19489
19490- bpo-29094: Offsets in a ZIP file created with extern file object and modes
19491  "w" and "x" now are relative to the start of the file.
19492
19493- bpo-13051: Fixed recursion errors in large or resized
19494  curses.textpad.Textbox.  Based on patch by Tycho Andersen.
19495
19496- bpo-29119: Fix weakrefs in the pure python version of
19497  collections.OrderedDict move_to_end() method. Contributed by Andra
19498  Bogildea.
19499
19500- bpo-9770: curses.ascii predicates now work correctly with negative
19501  integers.
19502
19503- bpo-28427: old keys should not remove new values from WeakValueDictionary
19504  when collecting from another thread.
19505
19506- bpo-28923: Remove editor artifacts from Tix.py.
19507
19508- bpo-28871: Fixed a crash when deallocate deep ElementTree.
19509
19510- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and
19511  WeakValueDictionary.pop() when a GC collection happens in another thread.
19512
19513- bpo-20191: Fixed a crash in resource.prlimit() when pass a sequence that
19514  doesn't own its elements as limits.
19515
19516- bpo-28779: multiprocessing.set_forkserver_preload() would crash the
19517  forkserver process if a preloaded module instantiated some multiprocessing
19518  objects such as locks.
19519
19520- bpo-28847: dbm.dumb now supports reading read-only files and no longer
19521  writes the index file when it is not changed.
19522
19523- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and
19524  from_buffer_copy() methods on abstract classes like Array.
19525
19526- bpo-28732: Fix crash in os.spawnv() with no elements in args
19527
19528- bpo-28485: Always raise ValueError for negative
19529  compileall.compile_dir(workers=...) parameter, even when multithreading is
19530  unavailable.
19531
19532- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the
19533  garbage collector is invoked in other thread.  Based on patch by Sebastian
19534  Cufre.
19535
19536- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if
19537  given empty data twice.  Patch by Benjamin Fogle.
19538
19539- bpo-28549: Fixed segfault in curses's addch() with ncurses6.
19540
19541- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar
19542  file with compression before trying to open it without compression.
19543  Otherwise it had 50% chance failed with ignore_zeros=True.
19544
19545- bpo-23262: The webbrowser module now supports Firefox 36+ and derived
19546  browsers.  Based on patch by Oleg Broytman.
19547
19548- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
19549  by representing the scale as float value internally in Tk.  tkinter.IntVar
19550  now works if float value is set to underlying Tk variable.
19551
19552- bpo-28255: calendar.TextCalendar().prmonth() no longer prints a space at
19553  the start of new line after printing a month's calendar.  Patch by Xiang
19554  Zhang.
19555
19556- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces.
19557  Based on patch by Kaarle Ritvanen.
19558
19559- bpo-28353: os.fwalk() no longer fails on broken links.
19560
19561- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a
19562  workaround to Tix library bug.
19563
19564- bpo-28488: shutil.make_archive() no longer add entry "./" to ZIP archive.
19565
19566- bpo-24452: Make webbrowser support Chrome on Mac OS X.
19567
19568- bpo-20766: Fix references leaked by pdb in the handling of SIGINT
19569  handlers.
19570
19571- bpo-26293: Fixed writing ZIP files that starts not from the start of the
19572  file.  Offsets in ZIP file now are relative to the start of the archive in
19573  conforming to the specification.
19574
19575- bpo-28321: Fixed writing non-BMP characters with binary format in
19576  plistlib.
19577
19578- bpo-28322: Fixed possible crashes when unpickle itertools objects from
19579  incorrect pickle data.  Based on patch by John Leitch.
19580
19581- Fix possible integer overflows and crashes in the mmap module with unusual
19582  usage patterns.
19583
19584- bpo-1703178: Fix the ability to pass the --link-objects option to the
19585  distutils build_ext command.
19586
19587- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and
19588  9999-12. Methods itermonthdays() and itermonthdays2() are reimplemented so
19589  that they don't call itermonthdates() which can cause datetime.date
19590  under/overflow.
19591
19592- bpo-28275: Fixed possible use after free in the decompress() methods of
19593  the LZMADecompressor and BZ2Decompressor classes. Original patch by John
19594  Leitch.
19595
19596- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation()
19597  if pass invalid string-like object as a name.  Patch by Xiang Zhang.
19598
19599- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py.
19600  Patch by Madison May.
19601
19602- bpo-27611: Fixed support of default root window in the tkinter.tix module.
19603
19604- bpo-27348: In the traceback module, restore the formatting of exception
19605  messages like "Exception: None".  This fixes a regression introduced in
19606  3.5a2.
19607
19608- bpo-25651: Allow falsy values to be used for msg parameter of subTest().
19609
19610- bpo-27932: Prevent memory leak in win32_ver().
19611
19612- Fix UnboundLocalError in socket._sendfile_use_sendfile.
19613
19614- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of
19615  os.stat().  Patch by Eryk Sun.
19616
19617- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an
19618  empty bytestring is passed.
19619
19620- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam.
19621
19622- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by
19623  Gergely Imreh and Markus Holtermann.
19624
19625- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and
19626  binascii.a2b_qp().
19627
19628- bpo-19003: m email.generator now replaces only ``\r`` and/or ``\n`` line
19629  endings, per the RFC, instead of all unicode line endings.
19630
19631- bpo-28019: itertools.count() no longer rounds non-integer step in range
19632  between 1.0 and 2.0 to 1.
19633
19634- bpo-25969: Update the lib2to3 grammar to handle the unpacking
19635  generalizations added in 3.5.
19636
19637- bpo-14977: mailcap now respects the order of the lines in the mailcap
19638  files ("first match"), as required by RFC 1542.  Patch by Michael Lazar.
19639
19640- bpo-24594: Validates persist parameter when opening MSI database
19641
19642- bpo-17582: xml.etree.ElementTree nows preserves whitespaces in attributes
19643  (Patch by Duane Griffin.  Reviewed and approved by Stefan Behnel.)
19644
19645- bpo-28047: Fixed calculation of line length used for the base64 CTE in the
19646  new email policies.
19647
19648- bpo-27445: Don't pass str(_charset) to MIMEText.set_payload(). Patch by
19649  Claude Paroz.
19650
19651- bpo-22450: urllib now includes an ``Accept: */*`` header among the default
19652  headers. This makes the results of REST API requests more consistent and
19653  predictable especially when proxy servers are involved.
19654
19655- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
19656  between runs given the same Grammar.txt input regardless of the hash
19657  randomization setting.
19658
19659- bpo-27570: Avoid zero-length memcpy() etc calls with null source pointers
19660  in the "ctypes" and "array" modules.
19661
19662- bpo-22233: Break email header lines *only* on the RFC specified CR and LF
19663  characters, not on arbitrary unicode line breaks.  This also fixes a bug
19664  in HTTP header parsing.
19665
19666- bpo-27988: Fix email iter_attachments incorrect mutation of payload list.
19667
19668- bpo-27691: Fix ssl module's parsing of GEN_RID subject alternative name
19669  fields in X.509 certs.
19670
19671- bpo-27850: Remove 3DES from ssl module's default cipher list to counter
19672  measure sweet32 attack (CVE-2016-2183).
19673
19674- bpo-27766: Add ChaCha20 Poly1305 to ssl module's default cipher list.
19675  (Required OpenSSL 1.1.0 or LibreSSL).
19676
19677- bpo-26470: Port ssl and hashlib module to OpenSSL 1.1.0.
19678
19679- Remove support for passing a file descriptor to os.access. It never worked
19680  but previously didn't raise.
19681
19682- bpo-12885: Fix error when distutils encounters symlink.
19683
19684- bpo-27881: Fixed possible bugs when setting
19685  sqlite3.Connection.isolation_level. Based on patch by Xiang Zhang.
19686
19687- bpo-27861: Fixed a crash in sqlite3.Connection.cursor() when a factory
19688  creates not a cursor.  Patch by Xiang Zhang.
19689
19690- bpo-19884: Avoid spurious output on OS X with Gnu Readline.
19691
19692- bpo-27706: Restore deterministic behavior of random.Random().seed() for
19693  string seeds using seeding version 1.  Allows sequences of calls to
19694  random() to exactly match those obtained in Python 2. Patch by Nofar
19695  Schnider.
19696
19697- bpo-10513: Fix a regression in Connection.commit().  Statements should not
19698  be reset after a commit.
19699
19700- A new version of typing.py from https://github.com/python/typing:
19701  Collection (only for 3.6) (Issue #27598). Add FrozenSet to __all__
19702  (upstream #261). Fix crash in _get_type_vars() (upstream #259). Remove the
19703  dict constraint in ForwardRef._eval_type (upstream #252).
19704
19705- bpo-27539: Fix unnormalised ``Fraction.__pow__`` result in the case of
19706  negative exponent and negative base.
19707
19708- bpo-21718: cursor.description is now available for queries using CTEs.
19709
19710- bpo-2466: posixpath.ismount now correctly recognizes mount points which
19711  the user does not have permission to access.
19712
19713- bpo-27773: Correct some memory management errors server_hostname in
19714  _ssl.wrap_socket().
19715
19716- bpo-26750: unittest.mock.create_autospec() now works properly for
19717  subclasses of property() and other data descriptors.
19718
19719- In the curses module, raise an error if window.getstr() or window.instr()
19720  is passed a negative value.
19721
19722- bpo-27783: Fix possible usage of uninitialized memory in
19723  operator.methodcaller.
19724
19725- bpo-27774: Fix possible Py_DECREF on unowned object in _sre.
19726
19727- bpo-27760: Fix possible integer overflow in binascii.b2a_qp.
19728
19729- bpo-27758: Fix possible integer overflow in the _csv module for large
19730  record lengths.
19731
19732- bpo-27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
19733  HTTP_PROXY variable when REQUEST_METHOD environment is set, which
19734  indicates that the script is in CGI mode.
19735
19736- bpo-27656: Do not assume sched.h defines any SCHED_* constants.
19737
19738- bpo-27130: In the "zlib" module, fix handling of large buffers (typically
19739  4 GiB) when compressing and decompressing.  Previously, inputs were
19740  limited to 4 GiB, and compression and decompression operations did not
19741  properly handle results of 4 GiB.
19742
19743- bpo-27533: Release GIL in nt._isdir
19744
19745- bpo-17711: Fixed unpickling by the persistent ID with protocol 0. Original
19746  patch by Alexandre Vassalotti.
19747
19748- bpo-27522: Avoid an unintentional reference cycle in email.feedparser.
19749
19750- bpo-26844: Fix error message for imp.find_module() to refer to 'path'
19751  instead of 'name'. Patch by Lev Maximov.
19752
19753- bpo-23804: Fix SSL zero-length recv() calls to not block and not raise an
19754  error about unclean EOF.
19755
19756- bpo-27466: Change time format returned by http.cookie.time2netscape,
19757  confirming the netscape cookie format and making it consistent with
19758  documentation.
19759
19760- bpo-26664: Fix activate.fish by removing mis-use of ``$``.
19761
19762- bpo-22115: Fixed tracing Tkinter variables: trace_vdelete() with wrong
19763  mode no longer break tracing, trace_vinfo() now always returns a list of
19764  pairs of strings, tracing in the "u" mode now works.
19765
19766- Fix a scoping issue in importlib.util.LazyLoader which triggered an
19767  UnboundLocalError when lazy-loading a module that was already put into
19768  sys.modules.
19769
19770- bpo-27079: Fixed curses.ascii functions isblank(), iscntrl() and
19771  ispunct().
19772
19773- bpo-26754: Some functions (compile() etc) accepted a filename argument
19774  encoded as an iterable of integers. Now only strings and byte-like objects
19775  are accepted.
19776
19777- bpo-27048: Prevents distutils failing on Windows when environment
19778  variables contain non-ASCII characters
19779
19780- bpo-27330: Fixed possible leaks in the ctypes module.
19781
19782- bpo-27238: Got rid of bare excepts in the turtle module.  Original patch
19783  by Jelle Zijlstra.
19784
19785- bpo-27122: When an exception is raised within the context being managed by
19786  a contextlib.ExitStack() and one of the exit stack generators catches and
19787  raises it in a chain, do not re-raise the original exception when exiting,
19788  let the new chained one through.  This avoids the :pep:`479` bug described
19789  in issue25782.
19790
19791Security
19792--------
19793
19794- bpo-27278: Fix os.urandom() implementation using getrandom() on Linux.
19795  Truncate size to INT_MAX and loop until we collected enough random bytes,
19796  instead of casting a directly Py_ssize_t to int.
19797
19798Library
19799-------
19800
19801- bpo-26386: Fixed ttk.TreeView selection operations with item id's
19802  containing spaces.
19803
19804Security
19805--------
19806
19807- bpo-22636: Avoid shell injection problems with ctypes.util.find_library().
19808
19809Library
19810-------
19811
19812- bpo-16182: Fix various functions in the "readline" module to use the
19813  locale encoding, and fix get_begidx() and get_endidx() to return code
19814  point indexes.
19815
19816- bpo-27392: Add loop.connect_accepted_socket(). Patch by Jim Fulton.
19817
19818- bpo-27930: Improved behaviour of logging.handlers.QueueListener. Thanks to
19819  Paulo Andrade and Petr Viktorin for the analysis and patch.
19820
19821- bpo-21201: Improves readability of multiprocessing error message.  Thanks
19822  to Wojciech Walczak for patch.
19823
19824- bpo-27456: asyncio: Set TCP_NODELAY by default.
19825
19826- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by
19827  Kevin Conway.
19828
19829- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by
19830  Seth Michael Larson.
19831
19832- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by
19833  iceboy.
19834
19835- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki.
19836
19837- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect.
19838
19839- bpo-27759: Fix selectors incorrectly retain invalid file descriptors.
19840  Patch by Mark Williams.
19841
19842- bpo-28368: Refuse monitoring processes if the child watcher has no loop
19843  attached. Patch by Vincent Michel.
19844
19845- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader,
19846  add_writer, etc.
19847
19848- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг
19849  Марк.
19850
19851- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor.
19852
19853- bpo-28372: Fix asyncio to support formatting of non-python coroutines.
19854
19855- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг
19856  Марк.
19857
19858- bpo-27972: Prohibit Tasks to await on themselves.
19859
19860- bpo-26923: Fix asyncio.Gather to refuse being cancelled once all children
19861  are done. Patch by Johannes Ebke.
19862
19863- bpo-26796: Don't configure the number of workers for default threadpool
19864  executor. Initial patch by Hans Lawrenz.
19865
19866- bpo-28600: Optimize loop.call_soon().
19867
19868- bpo-28613: Fix get_event_loop() return the current loop if called from
19869  coroutines/callbacks.
19870
19871- bpo-28639: Fix inspect.isawaitable to always return bool Patch by Justin
19872  Mayfield.
19873
19874- bpo-28652: Make loop methods reject socket kinds they do not support.
19875
19876- bpo-28653: Fix a refleak in functools.lru_cache.
19877
19878- bpo-28703: Fix asyncio.iscoroutinefunction to handle Mock objects.
19879
19880- bpo-24142: Reading a corrupt config file left the parser in an invalid
19881  state.  Original patch by Florian Höch.
19882
19883- bpo-28990: Fix SSL hanging if connection is closed before handshake
19884  completed. (Patch by HoHo-Ho)
19885
19886IDLE
19887----
19888
19889- bpo-15308: Add 'interrupt execution' (^C) to Shell menu. Patch by Roger
19890  Serwy, updated by Bayard Randel.
19891
19892- bpo-27922: Stop IDLE tests from 'flashing' gui widgets on the screen.
19893
19894- Add version to title of IDLE help window.
19895
19896- bpo-25564: In section on IDLE -- console differences, mention that using
19897  exec means that __builtins__ is defined for each statement.
19898
19899- bpo-27714: text_textview and test_autocomplete now pass when re-run in the
19900  same process.  This occurs when test_idle fails when run with the -w
19901  option but without -jn.  Fix warning from test_config.
19902
19903- bpo-25507: IDLE no longer runs buggy code because of its tkinter imports.
19904  Users must include the same imports required to run directly in Python.
19905
19906- bpo-27452: add line counter and crc to IDLE configHandler test dump.
19907
19908- bpo-27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names.
19909
19910- bpo-27245: IDLE: Cleanly delete custom themes and key bindings.
19911  Previously, when IDLE was started from a console or by import, a cascade
19912  of warnings was emitted. Patch by Serhiy Storchaka.
19913
19914C API
19915-----
19916
19917- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
19918
19919- bpo-26754: PyUnicode_FSDecoder() accepted a filename argument encoded as
19920  an iterable of integers. Now only strings and bytes-like objects are
19921  accepted.
19922
19923Documentation
19924-------------
19925
19926- bpo-28513: Documented command-line interface of zipfile.
19927
19928Tests
19929-----
19930
19931- bpo-28950: Disallow -j0 to be combined with -T/-l/-M in regrtest command
19932  line arguments.
19933
19934- bpo-28666: Now test.support.rmtree is able to remove unwritable or
19935  unreadable directories.
19936
19937- bpo-23839: Various caches now are cleared before running every test file.
19938
19939- bpo-28409: regrtest: fix the parser of command line arguments.
19940
19941- bpo-27787: Call gc.collect() before checking each test for "dangling
19942  threads", since the dangling threads are weak references.
19943
19944- bpo-27369: In test_pyexpat, avoid testing an error message detail that
19945  changed in Expat 2.2.0.
19946
19947Tools/Demos
19948-----------
19949
19950- bpo-27952: Get Tools/scripts/fixcid.py working with Python 3 and the
19951  current "re" module, avoid invalid Python backslash escapes, and fix a bug
19952  parsing escaped C quote signs.
19953
19954- bpo-27332: Fixed the type of the first argument of module-level functions
19955  generated by Argument Clinic.  Patch by Petr Viktorin.
19956
19957- bpo-27418: Fixed Tools/importbench/importbench.py.
19958
19959Windows
19960-------
19961
19962- bpo-28251: Improvements to help manuals on Windows.
19963
19964- bpo-28110: launcher.msi has different product codes between 32-bit and
19965  64-bit
19966
19967- bpo-25144: Ensures TargetDir is set before continuing with custom install.
19968
19969- bpo-27469: Adds a shell extension to the launcher so that drag and drop
19970  works correctly.
19971
19972- bpo-27309: Enabled proper Windows styles in python[w].exe manifest.
19973
19974Build
19975-----
19976
19977- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat
19978
19979- bpo-23903: Added missed names to PC/python3.def.
19980
19981- bpo-10656: Fix out-of-tree building on AIX.  Patch by Tristan Carel and
19982  Michael Haubenwallner.
19983
19984- bpo-26359: Rename --with-optimiations to --enable-optimizations.
19985
19986- bpo-28444: Fix missing extensions modules when cross compiling.
19987
19988- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j.
19989
19990- bpo-28258: Fixed build with Estonian locale (python-config and distclean
19991  targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.
19992
19993- bpo-26661: setup.py now detects system libffi with multiarch wrapper.
19994
19995- bpo-28066: Fix the logic that searches build directories for generated
19996  include files when building outside the source tree.
19997
19998- bpo-15819: Remove redundant include search directory option for building
19999  outside the source tree.
20000
20001- bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach)
20002
20003- bpo-27705: Update message in validate_ucrtbase.py
20004
20005- bpo-27983: Cause lack of llvm-profdata tool when using clang as required
20006  for PGO linking to be a configure time error rather than make time when
20007  --with-optimizations is enabled.  Also improve our ability to find the
20008  llvm-profdata tool on MacOS and some Linuxes.
20009
20010- bpo-26307: The profile-opt build now applies PGO to the built-in modules.
20011
20012- bpo-26359: Add the --with-optimizations configure flag.
20013
20014- bpo-27713: Suppress spurious build warnings when updating importlib's
20015  bootstrap files. Patch by Xiang Zhang
20016
20017- bpo-25825: Correct the references to Modules/python.exp and ld_so_aix,
20018  which are required on AIX.  This updates references to an installation
20019  path that was changed in 3.2a4, and undoes changed references to the build
20020  tree that were made in 3.5.0a1.
20021
20022- bpo-27453: CPP invocation in configure must use CPPFLAGS. Patch by Chi
20023  Hsuan Yen.
20024
20025- bpo-27641: The configure script now inserts comments into the makefile to
20026  prevent the pgen and _freeze_importlib executables from being
20027  cross-compiled.
20028
20029- bpo-26662: Set PYTHON_FOR_GEN in configure as the Python program to be
20030  used for file generation during the build.
20031
20032- bpo-10910: Avoid C++ compilation errors on FreeBSD and OS X. Also update
20033  FreedBSD version checks for the original ctype UTF-8 workaround.
20034
20035- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS.
20036  Patch by Gareth Rees.
20037
20038
20039What's New in Python 3.5.2 final?
20040=================================
20041
20042*Release date: 2016-06-26*
20043
20044Core and Builtins
20045-----------------
20046
20047- bpo-26930: Update Windows builds to use OpenSSL 1.0.2h.
20048
20049Tests
20050-----
20051
20052- bpo-26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test.
20053
20054IDLE
20055----
20056
20057- bpo-27365: Allow non-ascii in idlelib/NEWS.txt - minimal part for 3.5.2.
20058
20059
20060What's New in Python 3.5.2 release candidate 1?
20061===============================================
20062
20063*Release date: 2016-06-12*
20064
20065Core and Builtins
20066-----------------
20067
20068- bpo-27066: Fixed SystemError if a custom opener (for open()) returns a
20069  negative number without setting an exception.
20070
20071- bpo-20041: Fixed TypeError when frame.f_trace is set to None. Patch by
20072  Xavier de Gaye.
20073
20074- bpo-26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
20075  format unit.
20076
20077- bpo-26991: Fix possible refleak when creating a function with annotations.
20078
20079- bpo-27039: Fixed bytearray.remove() for values greater than 127.  Patch by
20080  Joe Jevnik.
20081
20082- bpo-23640: int.from_bytes() no longer bypasses constructors for
20083  subclasses.
20084
20085- bpo-26811: gc.get_objects() no longer contains a broken tuple with NULL
20086  pointer.
20087
20088- bpo-20120: Use RawConfigParser for .pypirc parsing, removing support for
20089  interpolation unintentionally added with move to Python 3. Behavior no
20090  longer does any interpolation in .pypirc files, matching behavior in
20091  Python 2.7 and Setuptools 19.0.
20092
20093- bpo-26659: Make the builtin slice type support cycle collection.
20094
20095- bpo-26718: super.__init__ no longer leaks memory if called multiple times.
20096  NOTE: A direct call of super.__init__ is not endorsed!
20097
20098- bpo-25339: PYTHONIOENCODING now has priority over locale in setting the
20099  error handler for stdin and stdout.
20100
20101- bpo-26494: Fixed crash on iterating exhausting iterators. Affected classes
20102  are generic sequence iterators, iterators of str, bytes, bytearray, list,
20103  tuple, set, frozenset, dict, OrderedDict, corresponding views and
20104  os.scandir() iterator.
20105
20106- bpo-26581: If coding cookie is specified multiple times on a line in
20107  Python source code file, only the first one is taken to account.
20108
20109- bpo-26464: Fix str.translate() when string is ASCII and first replacements
20110  removes character, but next replacement uses a non-ASCII character or a
20111  string longer than 1 character. Regression introduced in Python 3.5.0.
20112
20113- bpo-22836: Ensure exception reports from PyErr_Display() and
20114  PyErr_WriteUnraisable() are sensible even when formatting them produces
20115  secondary errors.  This affects the reports produced by
20116  sys.__excepthook__() and when __del__() raises an exception.
20117
20118- bpo-26302: Correct behavior to reject comma as a legal character for
20119  cookie names.
20120
20121- bpo-4806: Avoid masking the original TypeError exception when using star
20122  (``*``) unpacking in function calls.  Based on patch by Hagen Fürstenau
20123  and Daniel Urban.
20124
20125- bpo-27138: Fix the doc comment for FileFinder.find_spec().
20126
20127- bpo-26154: Add a new private _PyThreadState_UncheckedGet() function to get
20128  the current Python thread state, but don't issue a fatal error if it is
20129  NULL. This new function must be used instead of accessing directly the
20130  _PyThreadState_Current variable.  The variable is no more exposed since
20131  Python 3.5.1 to hide the exact implementation of atomic C types, to avoid
20132  compiler issues.
20133
20134- bpo-26194: Deque.insert() gave odd results for bounded deques that had
20135  reached their maximum size.  Now an IndexError will be raised when
20136  attempting to insert into a full deque.
20137
20138- bpo-25843: When compiling code, don't merge constants if they are equal
20139  but have a different types. For example, ``f1, f2 = lambda: 1, lambda:
20140  1.0`` is now correctly compiled to two different functions: ``f1()``
20141  returns ``1`` (``int``) and ``f2()`` returns ``1.0`` (``int``), even if
20142  ``1`` and ``1.0`` are equal.
20143
20144- bpo-22995: [UPDATE] Comment out the one of the pickleability tests in
20145  _PyObject_GetState() due to regressions observed in Cython-based projects.
20146
20147- bpo-25961: Disallowed null characters in the type name.
20148
20149- bpo-25973: Fix segfault when an invalid nonlocal statement binds a name
20150  starting with two underscores.
20151
20152- bpo-22995: Instances of extension types with a state that aren't
20153  subclasses of list or dict and haven't implemented any pickle-related
20154  methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or
20155  __getstate__), can no longer be pickled.  Including memoryview.
20156
20157- bpo-20440: Massive replacing unsafe attribute setting code with special
20158  macro Py_SETREF.
20159
20160- bpo-25766: Special method __bytes__() now works in str subclasses.
20161
20162- bpo-25421: __sizeof__ methods of builtin types now use dynamic basic size.
20163  This allows sys.getsize() to work correctly with their subclasses with
20164  __slots__ defined.
20165
20166- bpo-25709: Fixed problem with in-place string concatenation and utf-8
20167  cache.
20168
20169- bpo-27147: Mention :pep:`420` in the importlib docs.
20170
20171- bpo-24097: Fixed crash in object.__reduce__() if slot name is freed inside
20172  __getattr__.
20173
20174- bpo-24731: Fixed crash on converting objects with special methods
20175  __bytes__, __trunc__, and __float__ returning instances of subclasses of
20176  bytes, int, and float to subclasses of bytes, int, and float
20177  correspondingly.
20178
20179- bpo-26478: Fix semantic bugs when using binary operators with dictionary
20180  views and tuples.
20181
20182- bpo-26171: Fix possible integer overflow and heap corruption in
20183  zipimporter.get_data().
20184
20185- bpo-25660: Fix TAB key behaviour in REPL with readline.
20186
20187- bpo-25887: Raise a RuntimeError when a coroutine object is awaited more
20188  than once.
20189
20190- bpo-27243: Update the __aiter__ protocol: instead of returning an
20191  awaitable that resolves to an asynchronous iterator, the asynchronous
20192  iterator should be returned directly.  Doing the former will trigger a
20193  PendingDeprecationWarning.
20194
20195Security
20196--------
20197
20198- bpo-26556: Update expat to 2.1.1, fixes CVE-2015-1283.
20199
20200- Fix TLS stripping vulnerability in smtplib, CVE-2016-0772. Reported by
20201  Team Oststrom
20202
20203Library
20204-------
20205
20206- bpo-21386: Implement missing IPv4Address.is_global property.  It was
20207  documented since 07a5610bae9d.  Initial patch by Roger Luethi.
20208
20209- bpo-20900: distutils register command now decodes HTTP responses
20210  correctly.  Initial patch by ingrid.
20211
20212- A new version of typing.py provides several new classes and features:
20213  @overload outside stubs, Reversible, DefaultDict, Text, ContextManager,
20214  Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some
20215  of the new features are not yet implemented in mypy or other static
20216  analyzers). Also classes for :pep:`492` (Awaitable, AsyncIterable,
20217  AsyncIterator) have been added (in fact they made it into 3.5.1 but were
20218  never mentioned).
20219
20220- bpo-25738: Stop http.server.BaseHTTPRequestHandler.send_error() from
20221  sending a message body for 205 Reset Content.  Also, don't send Content
20222  header fields in responses that don't have a body.  Patch by Susumu
20223  Koshiba.
20224
20225- bpo-21313: Fix the "platform" module to tolerate when sys.version contains
20226  truncated build information.
20227
20228Security
20229--------
20230
20231- bpo-26839: On Linux, :func:`os.urandom` now calls ``getrandom()`` with
20232  ``GRND_NONBLOCK`` to fall back on reading ``/dev/urandom`` if the urandom
20233  entropy pool is not initialized yet. Patch written by Colm Buckley.
20234
20235Library
20236-------
20237
20238- bpo-27164: In the zlib module, allow decompressing raw Deflate streams
20239  with a predefined zdict.  Based on patch by Xiang Zhang.
20240
20241- bpo-24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely
20242  write data to the client.  Previously it could do partial writes and
20243  truncate data.  Also, wsgiref.handler.ServerHandler can now handle stdout
20244  doing partial writes, but this is deprecated.
20245
20246- bpo-26809: Add ``__all__`` to :mod:`string`.  Patch by Emanuel Barry.
20247
20248- bpo-26373: subprocess.Popen.communicate now correctly ignores
20249  BrokenPipeError when the child process dies before .communicate() is
20250  called in more/all circumstances.
20251
20252- bpo-21776: distutils.upload now correctly handles HTTPError. Initial patch
20253  by Claudiu Popa.
20254
20255- bpo-27114: Fix SSLContext._load_windows_store_certs fails with
20256  PermissionError
20257
20258- bpo-18383: Avoid creating duplicate filters when using filterwarnings and
20259  simplefilter. Based on patch by Alex Shkop.
20260
20261- bpo-27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
20262  SELinux and fails with EACCESS. The function now falls back to fcntl().
20263  Patch written by Michał Bednarski.
20264
20265- bpo-27014: Fix infinite recursion using typing.py.  Thanks to Kalle Tuure!
20266
20267- bpo-14132: Fix urllib.request redirect handling when the target only has a
20268  query string.  Original fix by Ján Janech.
20269
20270- bpo-17214: The "urllib.request" module now percent-encodes non-ASCII bytes
20271  found in redirect target URLs.  Some servers send Location header fields
20272  with non-ASCII bytes, but "http.client" requires the request target to be
20273  ASCII-encodable, otherwise a UnicodeEncodeError is raised.  Based on patch
20274  by Christian Heimes.
20275
20276- bpo-26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch
20277  contributed by Chi Hsuan Yen.
20278
20279- bpo-22274: In the subprocess module, allow stderr to be redirected to
20280  stdout even when stdout is not redirected.  Patch by Akira Li.
20281
20282- bpo-26807: mock_open 'files' no longer error on readline at end of file.
20283  Patch from Yolanda Robla.
20284
20285- bpo-25745: Fixed leaking a userptr in curses panel destructor.
20286
20287- bpo-26977: Removed unnecessary, and ignored, call to sum of squares helper
20288  in statistics.pvariance.
20289
20290- bpo-26881: The modulefinder module now supports extended opcode arguments.
20291
20292- bpo-23815: Fixed crashes related to directly created instances of types in
20293  _tkinter and curses.panel modules.
20294
20295- bpo-17765: weakref.ref() no longer silently ignores keyword arguments.
20296  Patch by Georg Brandl.
20297
20298- bpo-26873: xmlrpc now raises ResponseError on unsupported type tags
20299  instead of silently return incorrect result.
20300
20301- bpo-26711: Fixed the comparison of plistlib.Data with other types.
20302
20303- bpo-24114: Fix an uninitialized variable in `ctypes.util`. The bug only
20304  occurs on SunOS when the ctypes implementation searches for the `crle`
20305  program.  Patch by Xiang Zhang.  Tested on SunOS by Kees Bos.
20306
20307- bpo-26864: In urllib.request, change the proxy bypass host checking
20308  against no_proxy to be case-insensitive, and to not match unrelated host
20309  names that happen to have a bypassed hostname as a suffix.  Patch by Xiang
20310  Zhang.
20311
20312- bpo-26634: recursive_repr() now sets __qualname__ of wrapper.  Patch by
20313  Xiang Zhang.
20314
20315- bpo-26804: urllib.request will prefer lower_case proxy environment
20316  variables over UPPER_CASE or Mixed_Case ones. Patch contributed by
20317  Hans-Peter Jansen.
20318
20319- bpo-26837: assertSequenceEqual() now correctly outputs non-stringified
20320  differing items (like bytes in the -b mode).  This affects
20321  assertListEqual() and assertTupleEqual().
20322
20323- bpo-26041: Remove "will be removed in Python 3.7" from deprecation
20324  messages of platform.dist() and platform.linux_distribution(). Patch by
20325  Kumaripaba Miyurusara Athukorala.
20326
20327- bpo-26822: itemgetter, attrgetter and methodcaller objects no longer
20328  silently ignore keyword arguments.
20329
20330- bpo-26733: Disassembling a class now disassembles class and static
20331  methods. Patch by Xiang Zhang.
20332
20333- bpo-26801: Fix error handling in :func:`shutil.get_terminal_size`, catch
20334  :exc:`AttributeError` instead of :exc:`NameError`. Patch written by
20335  Emanuel Barry.
20336
20337- bpo-24838: tarfile's ustar and gnu formats now correctly calculate name
20338  and link field limits for multibyte character encodings like utf-8.
20339
20340Security
20341--------
20342
20343- bpo-26657: Fix directory traversal vulnerability with http.server on
20344  Windows.  This fixes a regression that was introduced in 3.3.4rc1 and
20345  3.4.0rc1.  Based on patch by Philipp Hagemeister.
20346
20347Library
20348-------
20349
20350- bpo-26717: Stop encoding Latin-1-ized WSGI paths with UTF-8.  Patch by
20351  Anthony Sottile.
20352
20353- bpo-26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading
20354  more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of
20355  1024 bytes per call.
20356
20357- bpo-16329: Add .webm to mimetypes.types_map.  Patch by Giampaolo Rodola'.
20358
20359- bpo-13952: Add .csv to mimetypes.types_map.  Patch by Geoff Wilson.
20360
20361- bpo-26709: Fixed Y2038 problem in loading binary PLists.
20362
20363- bpo-23735: Handle terminal resizing with Readline 6.3+ by installing our
20364  own SIGWINCH handler.  Patch by Eric Price.
20365
20366- bpo-26586: In http.server, respond with "413 Request header fields too
20367  large" if there are too many header fields to parse, rather than killing
20368  the connection and raising an unhandled exception.  Patch by Xiang Zhang.
20369
20370- bpo-22854: Change BufferedReader.writable() and BufferedWriter.readable()
20371  to always return False.
20372
20373- bpo-25195: Fix a regression in mock.MagicMock. _Call is a subclass of
20374  tuple (changeset 3603bae63c13 only works for classes) so we need to
20375  implement __ne__ ourselves.  Patch by Andrew Plummer.
20376
20377- bpo-26644: Raise ValueError rather than SystemError when a negative length
20378  is passed to SSLSocket.recv() or read().
20379
20380- bpo-23804: Fix SSL recv(0) and read(0) methods to return zero bytes
20381  instead of up to 1024.
20382
20383- bpo-26616: Fixed a bug in datetime.astimezone() method.
20384
20385- bpo-21925: :func:`warnings.formatwarning` now catches exceptions on
20386  ``linecache.getline(...)`` to be able to log :exc:`ResourceWarning`
20387  emitted late during the Python shutdown process.
20388
20389- bpo-24266: Ctrl+C during Readline history search now cancels the search
20390  mode when compiled with Readline 7.
20391
20392- bpo-26560: Avoid potential ValueError in BaseHandler.start_response.
20393  Initial patch by Peter Inglesby.
20394
20395Security
20396--------
20397
20398- bpo-26313: ssl.py _load_windows_store_certs fails if windows cert store is
20399  empty. Patch by Baji.
20400
20401Library
20402-------
20403
20404- bpo-26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex`
20405  to support importing packages.
20406
20407- bpo-26499: Account for remaining Content-Length in HTTPResponse.readline()
20408  and read1(). Based on patch by Silent Ghost. Also document that
20409  HTTPResponse now supports these methods.
20410
20411- bpo-25320: Handle sockets in directories unittest discovery is scanning.
20412  Patch from Victor van den Elzen.
20413
20414- bpo-16181: cookiejar.http2time() now returns None if year is higher than
20415  datetime.MAXYEAR.
20416
20417- bpo-26513: Fixes platform module detection of Windows Server
20418
20419- bpo-23718: Fixed parsing time in week 0 before Jan 1.  Original patch by
20420  Tamás Bence Gedai.
20421
20422- bpo-20589: Invoking Path.owner() and Path.group() on Windows now raise
20423  NotImplementedError instead of ImportError.
20424
20425- bpo-26177: Fixed the keys() method for Canvas and Scrollbar widgets.
20426
20427- bpo-15068: Got rid of excessive buffering in the fileinput module. The
20428  bufsize parameter is no longer used.
20429
20430- bpo-2202: Fix UnboundLocalError in
20431  AbstractDigestAuthHandler.get_algorithm_impls. Initial patch by Mathieu
20432  Dupuy.
20433
20434- bpo-25718: Fixed pickling and copying the accumulate() iterator with total
20435  is None.
20436
20437- bpo-26475: Fixed debugging output for regular expressions with the (?x)
20438  flag.
20439
20440- bpo-26457: Fixed the subnets() methods in IP network classes for the case
20441  when resulting prefix length is equal to maximal prefix length. Based on
20442  patch by Xiang Zhang.
20443
20444- bpo-26385: Remove the file if the internal open() call in
20445  NamedTemporaryFile() fails. Patch by Silent Ghost.
20446
20447- bpo-26402: Fix XML-RPC client to retry when the server shuts down a
20448  persistent connection.  This was a regression related to the new
20449  http.client.RemoteDisconnected exception in 3.5.0a4.
20450
20451- bpo-25913: Leading ``<~`` is optional now in base64.a85decode() with
20452  adobe=True.  Patch by Swati Jaiswal.
20453
20454- bpo-26186: Remove an invalid type check in importlib.util.LazyLoader.
20455
20456- bpo-26367: importlib.__import__() raises SystemError like
20457  builtins.__import__() when ``level`` is specified but without an
20458  accompanying package specified.
20459
20460- bpo-26309: In the "socketserver" module, shut down the request (closing
20461  the connected socket) when verify_request() returns false.  Patch by Aviv
20462  Palivoda.
20463
20464Security
20465--------
20466
20467- bpo-25939: On Windows open the cert store readonly in
20468  ssl.enum_certificates.
20469
20470Library
20471-------
20472
20473- bpo-25995: os.walk() no longer uses FDs proportional to the tree depth.
20474
20475- bpo-26117: The os.scandir() iterator now closes file descriptor not only
20476  when the iteration is finished, but when it was failed with error.
20477
20478- bpo-25911: Restored support of bytes paths in os.walk() on Windows.
20479
20480- bpo-26045: Add UTF-8 suggestion to error message when posting a
20481  non-Latin-1 string with http.client.
20482
20483- bpo-12923: Reset FancyURLopener's redirect counter even if there is an
20484  exception. Based on patches by Brian Brazil and Daniel Rocco.
20485
20486- bpo-25945: Fixed a crash when unpickle the functools.partial object with
20487  wrong state. Fixed a leak in failed functools.partial constructor. "args"
20488  and "keywords" attributes of functools.partial have now always types tuple
20489  and dict correspondingly.
20490
20491- bpo-26202: copy.deepcopy() now correctly copies range() objects with
20492  non-atomic attributes.
20493
20494- bpo-23076: Path.glob() now raises a ValueError if it's called with an
20495  invalid pattern. Patch by Thomas Nyberg.
20496
20497- bpo-19883: Fixed possible integer overflows in zipimport.
20498
20499- bpo-26227: On Windows, getnameinfo(), gethostbyaddr() and
20500  gethostbyname_ex() functions of the socket module now decode the hostname
20501  from the ANSI code page rather than UTF-8.
20502
20503- bpo-26147: xmlrpc now works with strings not encodable with used non-UTF-8
20504  encoding.
20505
20506- bpo-25935: Garbage collector now breaks reference loops with OrderedDict.
20507
20508- bpo-16620: Fixed AttributeError in msilib.Directory.glob().
20509
20510- bpo-26013: Added compatibility with broken protocol 2 pickles created in
20511  old Python 3 versions (3.4.3 and lower).
20512
20513- bpo-25850: Use cross-compilation by default for 64-bit Windows.
20514
20515- bpo-17633: Improve zipimport's support for namespace packages.
20516
20517- bpo-24705: Fix sysconfig._parse_makefile not expanding ${} vars appearing
20518  before $() vars.
20519
20520- bpo-22138: Fix mock.patch behavior when patching descriptors. Restore
20521  original values after patching. Patch contributed by Sean McCully.
20522
20523- bpo-25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode
20524  option if it is safe to do so.
20525
20526- bpo-26012: Don't traverse into symlinks for ``**`` pattern in
20527  pathlib.Path.[r]glob().
20528
20529- bpo-24120: Ignore PermissionError when traversing a tree with
20530  pathlib.Path.[r]glob(). Patch by Ulrich Petri.
20531
20532- bpo-25447: fileinput now uses sys.stdin as-is if it does not have a buffer
20533  attribute (restores backward compatibility).
20534
20535- bpo-25447: Copying the lru_cache() wrapper object now always works,
20536  independently from the type of the wrapped object (by returning the
20537  original object unchanged).
20538
20539- bpo-24103: Fixed possible use after free in ElementTree.XMLPullParser.
20540
20541- bpo-25860: os.fwalk() no longer skips remaining directories when error
20542  occurs. Original patch by Samson Lee.
20543
20544- bpo-25914: Fixed and simplified OrderedDict.__sizeof__.
20545
20546- bpo-25902: Fixed various refcount issues in ElementTree iteration.
20547
20548- bpo-25717: Restore the previous behaviour of tolerating most fstat()
20549  errors when opening files.  This was a regression in 3.5a1, and stopped
20550  anonymous temporary files from working in special cases.
20551
20552- bpo-24903: Fix regression in number of arguments compileall accepts when
20553  '-d' is specified.  The check on the number of arguments has been dropped
20554  completely as it never worked correctly anyway.
20555
20556- bpo-25764: In the subprocess module, preserve any exception caused by
20557  fork() failure when preexec_fn is used.
20558
20559- bpo-6478: _strptime's regexp cache now is reset after changing timezone
20560  with time.tzset().
20561
20562- bpo-14285: When executing a package with the "python -m package" option,
20563  and package initialization fails, a proper traceback is now reported.  The
20564  "runpy" module now lets exceptions from package initialization pass back
20565  to the caller, rather than raising ImportError.
20566
20567- bpo-19771: Also in runpy and the "-m" option, omit the irrelevant message
20568  ". . . is a package and cannot be directly executed" if the package could
20569  not even be initialized (e.g. due to a bad ``*.pyc`` file).
20570
20571- bpo-25177: Fixed problem with the mean of very small and very large
20572  numbers. As a side effect, statistics.mean and statistics.variance should
20573  be significantly faster.
20574
20575- bpo-25718: Fixed copying object with state with boolean value is false.
20576
20577- bpo-10131: Fixed deep copying of minidom documents.  Based on patch by
20578  Marian Ganisin.
20579
20580- bpo-25725: Fixed a reference leak in pickle.loads() when unpickling
20581  invalid data including tuple instructions.
20582
20583- bpo-25663: In the Readline completer, avoid listing duplicate global
20584  names, and search the global namespace before searching builtins.
20585
20586- bpo-25688: Fixed file leak in ElementTree.iterparse() raising an error.
20587
20588- bpo-23914: Fixed SystemError raised by unpickler on broken pickle data.
20589
20590- bpo-25691: Fixed crash on deleting ElementTree.Element attributes.
20591
20592- bpo-25624: ZipFile now always writes a ZIP_STORED header for directory
20593  entries.  Patch by Dingyuan Wang.
20594
20595- Skip getaddrinfo if host is already resolved. Patch by A. Jesse Jiryu
20596  Davis.
20597
20598- bpo-26050: Add asyncio.StreamReader.readuntil() method. Patch by Марк
20599  Коренберг.
20600
20601- bpo-25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X
20602  versions 10.5 or higher.  Original patch by A. Jesse Jiryu Davis.
20603
20604- bpo-26406: Avoid unnecessary serialization of getaddrinfo(3) calls on
20605  current versions of OpenBSD and NetBSD.  Patch by A. Jesse Jiryu Davis.
20606
20607- bpo-26848: Fix asyncio/subprocess.communicate() to handle empty input.
20608  Patch by Jack O'Connor.
20609
20610- bpo-27040: Add loop.get_exception_handler method
20611
20612- bpo-27041: asyncio: Add loop.create_future method
20613
20614- bpo-27223: asyncio: Fix _read_ready and _write_ready to respect
20615  _conn_lost. Patch by Łukasz Langa.
20616
20617- bpo-22970: asyncio: Fix inconsistency cancelling Condition.wait. Patch by
20618  David Coles.
20619
20620IDLE
20621----
20622
20623- bpo-5124: Paste with text selected now replaces the selection on X11. This
20624  matches how paste works on Windows, Mac, most modern Linux apps, and ttk
20625  widgets. Original patch by Serhiy Storchaka.
20626
20627- bpo-24759: Make clear in idlelib.idle_test.__init__ that the directory is
20628  a private implementation of test.test_idle and tool for maintainers.
20629
20630- bpo-27196: Stop 'ThemeChanged' warnings when running IDLE tests. These
20631  persisted after other warnings were suppressed in #20567. Apply Serhiy
20632  Storchaka's update_idletasks solution to four test files. Record this
20633  additional advice in idle_test/README.txt
20634
20635- bpo-20567: Revise idle_test/README.txt with advice about avoiding tk
20636  warning messages from tests.  Apply advice to several IDLE tests.
20637
20638- bpo-27117: Make colorizer htest and turtledemo work with dark themes. Move
20639  code for configuring text widget colors to a new function.
20640
20641- bpo-26673: When tk reports font size as 0, change to size 10. Such fonts
20642  on Linux prevented the configuration dialog from opening.
20643
20644- bpo-21939: Add test for IDLE's percolator. Original patch by Saimadhav
20645  Heblikar.
20646
20647- bpo-21676: Add test for IDLE's replace dialog. Original patch by Saimadhav
20648  Heblikar.
20649
20650- bpo-18410: Add test for IDLE's search dialog. Original patch by Westley
20651  Martínez.
20652
20653- bpo-21703: Add test for IDLE's undo delegator. Original patch by Saimadhav
20654  Heblikar .
20655
20656- bpo-27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks.
20657
20658- bpo-23977: Add more asserts to test_delegator.
20659
20660- bpo-20640: Add tests for idlelib.configHelpSourceEdit. Patch by Saimadhav
20661  Heblikar.
20662
20663- In the 'IDLE-console differences' section of the IDLE doc, clarify how
20664  running with IDLE affects sys.modules and the standard streams.
20665
20666- bpo-25507: fix incorrect change in IOBinding that prevented printing.
20667  Augment IOBinding htest to include all major IOBinding functions.
20668
20669- bpo-25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION
20670  MARK in README.txt and open this and NEWS.txt with 'ascii'. Re-encode
20671  CREDITS.txt to utf-8 and open it with 'utf-8'.
20672
20673Documentation
20674-------------
20675
20676- bpo-19489: Moved the search box from the sidebar to the header and footer
20677  of each page. Patch by Ammar Askar.
20678
20679- bpo-24136: Document the new :pep:`448` unpacking syntax of 3.5.
20680
20681- bpo-26736: Used HTTPS for external links in the documentation if possible.
20682
20683- bpo-6953: Rework the Readline module documentation to group related
20684  functions together, and add more details such as what underlying Readline
20685  functions and variables are accessed.
20686
20687- bpo-23606: Adds note to ctypes documentation regarding cdll.msvcrt.
20688
20689- bpo-25500: Fix documentation to not claim that __import__ is searched for
20690  in the global scope.
20691
20692- bpo-26014: Update 3.x packaging documentation: * "See also" links to the
20693  new docs are now provided in the legacy pages * links to setuptools
20694  documentation have been updated
20695
20696Tests
20697-----
20698
20699- bpo-21916: Added tests for the turtle module.  Patch by ingrid, Gregory
20700  Loyse and Jelle Zijlstra.
20701
20702- bpo-26523: The multiprocessing thread pool (multiprocessing.dummy.Pool)
20703  was untested.
20704
20705- bpo-26015: Added new tests for pickling iterators of mutable sequences.
20706
20707- bpo-26325: Added test.support.check_no_resource_warning() to check that no
20708  ResourceWarning is emitted.
20709
20710- bpo-25940: Changed test_ssl to use self-signed.pythontest.net.  This
20711  avoids relying on svn.python.org, which recently changed root certificate.
20712
20713- bpo-25616: Tests for OrderedDict are extracted from test_collections into
20714  separate file test_ordered_dict.
20715
20716- bpo-26583: Skip test_timestamp_overflow in test_import if bytecode files
20717  cannot be written.
20718
20719Build
20720-----
20721
20722- bpo-26884: Fix linking extension modules for cross builds. Patch by Xavier
20723  de Gaye.
20724
20725- bpo-22359: Disable the rules for running _freeze_importlib and pgen when
20726  cross-compiling.  The output of these programs is normally saved with the
20727  source code anyway, and is still regenerated when doing a native build.
20728  Patch by Xavier de Gaye.
20729
20730- bpo-27229: Fix the cross-compiling pgen rule for in-tree builds.  Patch by
20731  Xavier de Gaye.
20732
20733- bpo-21668: Link audioop, _datetime, _ctypes_test modules to libm, except
20734  on Mac OS X. Patch written by Xavier de Gaye.
20735
20736- bpo-25702: A --with-lto configure option has been added that will enable
20737  link time optimizations at build time during a make profile-opt. Some
20738  compilers and toolchains are known to not produce stable code when using
20739  LTO, be sure to test things thoroughly before relying on it. It can
20740  provide a few % speed up over profile-opt alone.
20741
20742- bpo-26624: Adds validation of ucrtbase[d].dll version with warning for old
20743  versions.
20744
20745- bpo-17603: Avoid error about nonexistent fileblocks.o file by using a
20746  lower-level check for st_blocks in struct stat.
20747
20748- bpo-26079: Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern
20749  Thiel.
20750
20751- bpo-26465: Update Windows builds to use OpenSSL 1.0.2g.
20752
20753- bpo-24421: Compile Modules/_math.c once, before building extensions.
20754  Previously it could fail to compile properly if the math and cmath builds
20755  were concurrent.
20756
20757- bpo-25348: Added ``--pgo`` and ``--pgo-job`` arguments to
20758  ``PCbuild\build.bat`` for building with Profile-Guided Optimization.  The
20759  old ``PCbuild\build_pgo.bat`` script is now deprecated, and simply calls
20760  ``PCbuild\build.bat --pgo %*``.
20761
20762- bpo-25827: Add support for building with ICC to ``configure``, including a
20763  new ``--with-icc`` flag.
20764
20765- bpo-25696: Fix installation of Python on UNIX with make -j9.
20766
20767- bpo-26930: Update OS X 10.5+ 32-bit-only installer to build and link with
20768  OpenSSL 1.0.2h.
20769
20770- bpo-26268: Update Windows builds to use OpenSSL 1.0.2f.
20771
20772- bpo-25136: Support Apple Xcode 7's new textual SDK stub libraries.
20773
20774- bpo-24324: Do not enable unreachable code warnings when using gcc as the
20775  option does not work correctly in older versions of gcc and has been
20776  silently removed as of gcc-4.5.
20777
20778Windows
20779-------
20780
20781- bpo-27053: Updates make_zip.py to correctly generate library ZIP file.
20782
20783- bpo-26268: Update the prepare_ssl.py script to handle OpenSSL releases
20784  that don't include the contents of the include directory (that is, 1.0.2e
20785  and later).
20786
20787- bpo-26071: bdist_wininst created binaries fail to start and find 32bit
20788  Python
20789
20790- bpo-26073: Update the list of magic numbers in launcher
20791
20792- bpo-26065: Excludes venv from library when generating embeddable distro.
20793
20794Tools/Demos
20795-----------
20796
20797- bpo-26799: Fix python-gdb.py: don't get C types once when the Python code
20798  is loaded, but get C types on demand. The C types can change if
20799  python-gdb.py is loaded before the Python executable. Patch written by
20800  Thomas Ilsche.
20801
20802- bpo-26271: Fix the Freeze tool to properly use flags passed through
20803  configure. Patch by Daniel Shaulov.
20804
20805- bpo-26489: Add dictionary unpacking support to Tools/parser/unparse.py.
20806  Patch by Guo Ci Teo.
20807
20808- bpo-26316: Fix variable name typo in Argument Clinic.
20809
20810Windows
20811-------
20812
20813- bpo-17500: Remove unused and outdated icons. (See also:
20814  https://github.com/python/pythondotorg/issues/945)
20815
20816
20817What's New in Python 3.5.1 final?
20818=================================
20819
20820*Release date: 2015-12-06*
20821
20822Core and Builtins
20823-----------------
20824
20825- bpo-25709: Fixed problem with in-place string concatenation and utf-8
20826  cache.
20827
20828Windows
20829-------
20830
20831- bpo-25715: Python 3.5.1 installer shows wrong upgrade path and incorrect
20832  logic for launcher detection.
20833
20834
20835What's New in Python 3.5.1 release candidate 1?
20836===============================================
20837
20838*Release date: 2015-11-22*
20839
20840Core and Builtins
20841-----------------
20842
20843- bpo-25630: Fix a possible segfault during argument parsing in functions
20844  that accept filesystem paths.
20845
20846- bpo-23564: Fixed a partially broken sanity check in the _posixsubprocess
20847  internals regarding how fds_to_pass were passed to the child.  The bug had
20848  no actual impact as subprocess.py already avoided it.
20849
20850- bpo-25388: Fixed tokenizer crash when processing undecodable source code
20851  with a null byte.
20852
20853- bpo-25462: The hash of the key now is calculated only once in most
20854  operations in C implementation of OrderedDict.
20855
20856- bpo-22995: Default implementation of __reduce__ and __reduce_ex__ now
20857  rejects builtin types with not defined __new__.
20858
20859- bpo-25555: Fix parser and AST: fill lineno and col_offset of "arg" node
20860  when compiling AST from Python objects.
20861
20862- bpo-24802: Avoid buffer overreads when int(), float(), compile(), exec()
20863  and eval() are passed bytes-like objects.  These objects are not
20864  necessarily terminated by a null byte, but the functions assumed they
20865  were.
20866
20867- bpo-24726: Fixed a crash and leaking NULL in repr() of OrderedDict that
20868  was mutated by direct calls of dict methods.
20869
20870- bpo-25449: Iterating OrderedDict with keys with unstable hash now raises
20871  KeyError in C implementations as well as in Python implementation.
20872
20873- bpo-25395: Fixed crash when highly nested OrderedDict structures were
20874  garbage collected.
20875
20876- bpo-25274: sys.setrecursionlimit() now raises a RecursionError if the new
20877  recursion limit is too low depending at the current recursion depth.
20878  Modify also the "lower-water mark" formula to make it monotonic. This mark
20879  is used to decide when the overflowed flag of the thread state is reset.
20880
20881- bpo-24402: Fix input() to prompt to the redirected stdout when
20882  sys.stdout.fileno() fails.
20883
20884- bpo-24806: Prevent builtin types that are not allowed to be subclassed
20885  from being subclassed through multiple inheritance.
20886
20887- bpo-24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
20888
20889- bpo-25280: Import trace messages emitted in verbose (-v) mode are no
20890  longer formatted twice.
20891
20892- bpo-25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom()
20893  function instead of the getentropy() function. The getentropy() function
20894  is blocking to generate very good quality entropy, os.urandom() doesn't
20895  need such high-quality entropy.
20896
20897- bpo-25182: The stdprinter (used as sys.stderr before the io module is
20898  imported at startup) now uses the backslashreplace error handler.
20899
20900- bpo-25131: Make the line number and column offset of set/dict literals and
20901  comprehensions correspond to the opening brace.
20902
20903- bpo-25150: Hide the private _Py_atomic_xxx symbols from the public
20904  Python.h header to fix a compilation error with OpenMP.
20905  PyThreadState_GET() becomes an alias to PyThreadState_Get() to avoid ABI
20906  incompatibilities.
20907
20908Library
20909-------
20910
20911- bpo-25626: Change three zlib functions to accept sizes that fit in
20912  Py_ssize_t, but internally cap those sizes to UINT_MAX.  This resolves a
20913  regression in 3.5 where GzipFile.read() failed to read chunks larger than
20914  2 or 4 GiB.  The change affects the zlib.Decompress.decompress()
20915  max_length parameter, the zlib.decompress() bufsize parameter, and the
20916  zlib.Decompress.flush() length parameter.
20917
20918- bpo-25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True)
20919  when the OS gives priority to errors such as EACCES over EEXIST.
20920
20921- bpo-25593: Change semantics of EventLoop.stop() in asyncio.
20922
20923- bpo-6973: When we know a subprocess.Popen process has died, do not allow
20924  the send_signal(), terminate(), or kill() methods to do anything as they
20925  could potentially signal a different process.
20926
20927- bpo-25590: In the Readline completer, only call getattr() once per
20928  attribute.
20929
20930- bpo-25498: Fix a crash when garbage-collecting ctypes objects created by
20931  wrapping a memoryview.  This was a regression made in 3.5a1.  Based on
20932  patch by Eryksun.
20933
20934- bpo-25584: Added "escape" to the __all__ list in the glob module.
20935
20936- bpo-25584: Fixed recursive glob() with patterns starting with ``**``.
20937
20938- bpo-25446: Fix regression in smtplib's AUTH LOGIN support.
20939
20940- bpo-18010: Fix the pydoc web server's module search function to handle
20941  exceptions from importing packages.
20942
20943- bpo-25554: Got rid of circular references in regular expression parsing.
20944
20945- bpo-25510: fileinput.FileInput.readline() now returns b'' instead of '' at
20946  the end if the FileInput was opened with binary mode. Patch by Ryosuke
20947  Ito.
20948
20949- bpo-25503: Fixed inspect.getdoc() for inherited docstrings of properties.
20950  Original patch by John Mark Vandenberg.
20951
20952- bpo-25515: Always use os.urandom as a source of randomness in uuid.uuid4.
20953
20954- bpo-21827: Fixed textwrap.dedent() for the case when largest common
20955  whitespace is a substring of smallest leading whitespace. Based on patch
20956  by Robert Li.
20957
20958- bpo-25447: The lru_cache() wrapper objects now can be copied and pickled
20959  (by returning the original object unchanged).
20960
20961- bpo-25390: typing: Don't crash on Union[str, Pattern].
20962
20963- bpo-25441: asyncio: Raise error from drain() when socket is closed.
20964
20965- bpo-25410: Cleaned up and fixed minor bugs in C implementation of
20966  OrderedDict.
20967
20968- bpo-25411: Improved Unicode support in SMTPHandler through better use of
20969  the email package. Thanks to user simon04 for the patch.
20970
20971- bpo-25407: Remove mentions of the formatter module being removed in Python
20972  3.6.
20973
20974- bpo-25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
20975  that caused segmentation fault or hang in iterating after moving several
20976  items to the start of ordered dict.
20977
20978- bpo-25364: zipfile now works in threads disabled builds.
20979
20980- bpo-25328: smtpd's SMTPChannel now correctly raises a ValueError if both
20981  decode_data and enable_SMTPUTF8 are set to true.
20982
20983- bpo-25316: distutils raises OSError instead of DistutilsPlatformError when
20984  MSVC is not installed.
20985
20986- bpo-25380: Fixed protocol for the STACK_GLOBAL opcode in
20987  pickletools.opcodes.
20988
20989- bpo-23972: Updates asyncio datagram create method allowing reuseport and
20990  reuseaddr socket options to be set prior to binding the socket. Mirroring
20991  the existing asyncio create_server method the reuseaddr option for
20992  datagram sockets defaults to True if the O/S is 'posix' (except if the
20993  platform is Cygwin). Patch by Chris Laws.
20994
20995- bpo-25304: Add asyncio.run_coroutine_threadsafe().  This lets you submit a
20996  coroutine to a loop from another thread, returning a
20997  concurrent.futures.Future.  By Vincent Michel.
20998
20999- bpo-25232: Fix CGIRequestHandler to split the query from the URL at the
21000  first question mark (?) rather than the last. Patch from Xiang Zhang.
21001
21002- bpo-24657: Prevent CGIRequestHandler from collapsing slashes in the query
21003  part of the URL as if it were a path. Patch from Xiang Zhang.
21004
21005- bpo-24483: C implementation of functools.lru_cache() now calculates key's
21006  hash only once.
21007
21008- bpo-22958: Constructor and update method of weakref.WeakValueDictionary
21009  now accept the self and the dict keyword arguments.
21010
21011- bpo-22609: Constructor of collections.UserDict now accepts the self
21012  keyword argument.
21013
21014- bpo-25111: Fixed comparison of traceback.FrameSummary.
21015
21016- bpo-25262: Added support for BINBYTES8 opcode in Python implementation of
21017  unpickler. Highest 32 bits of 64-bit size for BINUNICODE8 and BINBYTES8
21018  opcodes no longer silently ignored on 32-bit platforms in C
21019  implementation.
21020
21021- bpo-25034: Fix string.Formatter problem with auto-numbering and nested
21022  format_specs. Patch by Anthon van der Neut.
21023
21024- bpo-25233: Rewrite the guts of asyncio.Queue and asyncio.Semaphore to be
21025  more understandable and correct.
21026
21027- bpo-25203: Failed readline.set_completer_delims() no longer left the
21028  module in inconsistent state.
21029
21030- bpo-23600: Default implementation of tzinfo.fromutc() was returning wrong
21031  results in some cases.
21032
21033- bpo-23329: Allow the ssl module to be built with older versions of
21034  LibreSSL.
21035
21036- Prevent overflow in _Unpickler_Read.
21037
21038- bpo-25047: The XML encoding declaration written by Element Tree now
21039  respects the letter case given by the user. This restores the ability to
21040  write encoding names in uppercase like "UTF-8", which worked in Python 2.
21041
21042- bpo-25135: Make deque_clear() safer by emptying the deque before clearing.
21043  This helps avoid possible reentrancy issues.
21044
21045- bpo-19143: platform module now reads Windows version from kernel32.dll to
21046  avoid compatibility shims.
21047
21048- bpo-25092: Fix datetime.strftime() failure when errno was already set to
21049  EINVAL.
21050
21051- bpo-23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
21052  of datetime.datetime: microseconds are now rounded to nearest with ties
21053  going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding
21054  towards minus infinity (ROUND_FLOOR). It's important that these methods
21055  use the same rounding mode than datetime.timedelta to keep the property:
21056  (datetime(1970,1,1) + timedelta(seconds=t)) ==
21057  datetime.utcfromtimestamp(t). It also the rounding mode used by
21058  round(float) for example.
21059
21060- bpo-25155: Fix datetime.datetime.now() and datetime.datetime.utcnow() on
21061  Windows to support date after year 2038. It was a regression introduced in
21062  Python 3.5.0.
21063
21064- bpo-25108: Omitted internal frames in traceback functions print_stack(),
21065  format_stack(), and extract_stack() called without arguments.
21066
21067- bpo-25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows.
21068
21069- bpo-24684: socket.socket.getaddrinfo() now calls
21070  PyUnicode_AsEncodedString() instead of calling the encode() method of the
21071  host, to handle correctly custom string with an encode() method which
21072  doesn't return a byte string. The encoder of the IDNA codec is now called
21073  directly instead of calling the encode() method of the string.
21074
21075- bpo-25060: Correctly compute stack usage of the BUILD_MAP opcode.
21076
21077- bpo-24857: Comparing call_args to a long sequence now correctly returns a
21078  boolean result instead of raising an exception.  Patch by A Kaptur.
21079
21080- bpo-23144: Make sure that HTMLParser.feed() returns all the data, even
21081  when convert_charrefs is True.
21082
21083- bpo-24982: shutil.make_archive() with the "zip" format now adds entries
21084  for directories (including empty directories) in ZIP file.
21085
21086- bpo-25019: Fixed a crash caused by setting non-string key of expat parser.
21087  Based on patch by John Leitch.
21088
21089- bpo-16180: Exit pdb if file has syntax error, instead of trapping user in
21090  an infinite loop.  Patch by Xavier de Gaye.
21091
21092- bpo-24891: Fix a race condition at Python startup if the file descriptor
21093  of stdin (0), stdout (1) or stderr (2) is closed while Python is creating
21094  sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set
21095  to None if the creation of the object failed, instead of raising an
21096  OSError exception. Initial patch written by Marco Paolini.
21097
21098- bpo-24992: Fix error handling and a race condition (related to garbage
21099  collection) in collections.OrderedDict constructor.
21100
21101- bpo-24881: Fixed setting binary mode in Python implementation of FileIO on
21102  Windows and Cygwin.  Patch from Akira Li.
21103
21104- bpo-25578: Fix (another) memory leak in SSLSocket.getpeercer().
21105
21106- bpo-25530: Disable the vulnerable SSLv3 protocol by default when creating
21107  ssl.SSLContext.
21108
21109- bpo-25569: Fix memory leak in SSLSocket.getpeercert().
21110
21111- bpo-25471: Sockets returned from accept() shouldn't appear to be
21112  nonblocking.
21113
21114- bpo-25319: When threading.Event is reinitialized, the underlying condition
21115  should use a regular lock rather than a recursive lock.
21116
21117- bpo-21112: Fix regression in unittest.expectedFailure on subclasses. Patch
21118  from Berker Peksag.
21119
21120- bpo-24764: cgi.FieldStorage.read_multi() now ignores the Content-Length
21121  header in part headers. Patch written by Peter Landry and reviewed by
21122  Pierre Quentel.
21123
21124- bpo-24913: Fix overrun error in deque.index(). Found by John Leitch and
21125  Bryce Darling.
21126
21127- bpo-24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
21128
21129- bpo-21159: Improve message in
21130  configparser.InterpolationMissingOptionError. Patch from Łukasz Langa.
21131
21132- bpo-20362: Honour TestCase.longMessage correctly in assertRegex. Patch
21133  from Ilia Kurenkov.
21134
21135- bpo-23572: Fixed functools.singledispatch on classes with falsy
21136  metaclasses.  Patch by Ethan Furman.
21137
21138- asyncio: ensure_future() now accepts awaitable objects.
21139
21140IDLE
21141----
21142
21143- bpo-15348: Stop the debugger engine (normally in a user process) before
21144  closing the debugger window (running in the IDLE process). This prevents
21145  the RuntimeErrors that were being caught and ignored.
21146
21147- bpo-24455: Prevent IDLE from hanging when a) closing the shell while the
21148  debugger is active (15347); b) closing the debugger with the [X] button
21149  (15348); and c) activating the debugger when already active (24455). The
21150  patch by Mark Roseman does this by making two changes. 1. Suspend and
21151  resume the gui.interaction method with the tcl vwait mechanism intended
21152  for this purpose (instead of root.mainloop & .quit). 2. In gui.run, allow
21153  any existing interaction to terminate first.
21154
21155- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
21156  to make it clearer that the program referred to is the currently running
21157  user program, not IDLE itself.
21158
21159- bpo-24750: Improve the appearance of the IDLE editor window status bar.
21160  Patch by Mark Roseman.
21161
21162- bpo-25313: Change the handling of new built-in text color themes to better
21163  address the compatibility problem introduced by the addition of IDLE Dark.
21164  Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
21165
21166- bpo-24782: Extension configuration is now a tab in the IDLE Preferences
21167  dialog rather than a separate dialog.  The former tabs are now a sorted
21168  list.  Patch by Mark Roseman.
21169
21170- bpo-22726: Re-activate the config dialog help button with some content
21171  about the other buttons and the new IDLE Dark theme.
21172
21173- bpo-24820: IDLE now has an 'IDLE Dark' built-in text color theme. It is
21174  more or less IDLE Classic inverted, with a cobalt blue background.
21175  Strings, comments, keywords, ... are still green, red, orange, ... . To
21176  use it with IDLEs released before November 2015, hit the 'Save as New
21177  Custom Theme' button and enter a new name, such as 'Custom Dark'.  The
21178  custom theme will work with any IDLE release, and can be modified.
21179
21180- bpo-25224: README.txt is now an idlelib index for IDLE developers and
21181  curious users. The previous user content is now in the IDLE doc chapter.
21182  'IDLE' now means 'Integrated Development and Learning Environment'.
21183
21184- bpo-24820: Users can now set breakpoint colors in Settings -> Custom
21185  Highlighting. Original patch by Mark Roseman.
21186
21187- bpo-24972: Inactive selection background now matches active selection
21188  background, as configured by users, on all systems.  Found items are now
21189  always highlighted on Windows.  Initial patch by Mark Roseman.
21190
21191- bpo-24570: Idle: make calltip and completion boxes appear on Macs affected
21192  by a tk regression.  Initial patch by Mark Roseman.
21193
21194- bpo-24988: Idle ScrolledList context menus (used in debugger) now work on
21195  Mac Aqua. Patch by Mark Roseman.
21196
21197- bpo-24801: Make right-click for context menu work on Mac Aqua. Patch by
21198  Mark Roseman.
21199
21200- bpo-25173: Associate tkinter messageboxes with a specific widget. For Mac
21201  OSX, make them a 'sheet'.  Patch by Mark Roseman.
21202
21203- bpo-25198: Enhance the initial html viewer now used for Idle Help.
21204  Properly indent fixed-pitch text (patch by Mark Roseman). Give code
21205  snippet a very Sphinx-like light blueish-gray background. Re-use initial
21206  width and height set by users for shell and editor. When the Table of
21207  Contents (TOC) menu is used, put the section header at the top of the
21208  screen.
21209
21210- bpo-25225: Condense and rewrite Idle doc section on text colors.
21211
21212- bpo-21995: Explain some differences between IDLE and console Python.
21213
21214- bpo-22820: Explain need for *print* when running file from Idle editor.
21215
21216- bpo-25224: Doc: augment Idle feature list and no-subprocess section.
21217
21218- bpo-25219: Update doc for Idle command line options. Some were missing and
21219  notes were not correct.
21220
21221- bpo-24861: Most of idlelib is private and subject to change. Use
21222  idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
21223
21224- bpo-25199: Idle: add synchronization comments for future maintainers.
21225
21226- bpo-16893: Replace help.txt with help.html for Idle doc display. The new
21227  idlelib/help.html is rstripped Doc/build/html/library/idle.html. It looks
21228  better than help.txt and will better document Idle as released. The
21229  tkinter html viewer that works for this file was written by Mark Roseman.
21230  The now unused EditorWindow.HelpDialog class and helt.txt file are
21231  deprecated.
21232
21233- bpo-24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
21234
21235- bpo-24790: Remove extraneous code (which also create 2 & 3 conflicts).
21236
21237Documentation
21238-------------
21239
21240- bpo-22558: Add remaining doc links to source code for Python-coded
21241  modules. Patch by Yoni Lavi.
21242
21243- bpo-12067: Rewrite Comparisons section in the Expressions chapter of the
21244  language reference. Some of the details of comparing mixed types were
21245  incorrect or ambiguous. NotImplemented is only relevant at a lower level
21246  than the Expressions chapter. Added details of comparing range() objects,
21247  and default behaviour and consistency suggestions for user-defined
21248  classes. Patch from Andy Maier.
21249
21250- bpo-24952: Clarify the default size argument of stack_size() in the
21251  "threading" and "_thread" modules. Patch from Mattip.
21252
21253- bpo-23725: Overhaul tempfile docs. Note deprecated status of mktemp. Patch
21254  from Zbigniew Jędrzejewski-Szmek.
21255
21256- bpo-24808: Update the types of some PyTypeObject fields.  Patch by Joseph
21257  Weston.
21258
21259- bpo-22812: Fix unittest discovery examples. Patch from Pam McA'Nulty.
21260
21261Tests
21262-----
21263
21264- bpo-25449: Added tests for OrderedDict subclasses.
21265
21266- bpo-25099: Make test_compileall not fail when an entry on sys.path cannot
21267  be written to (commonly seen in administrative installs on Windows).
21268
21269- bpo-23919: Prevents assert dialogs appearing in the test suite.
21270
21271- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass
21272  along to regrtest.py.  Previously there was a limit of 9.
21273
21274Build
21275-----
21276
21277- bpo-24915: Add LLVM support for PGO builds and use the test suite to
21278  generate the profile data. Initial patch by Alecsandru Patrascu of Intel.
21279
21280- bpo-24910: Windows MSIs now have unique display names.
21281
21282- bpo-24986: It is now possible to build Python on Windows without errors
21283  when external libraries are not available.
21284
21285Windows
21286-------
21287
21288- bpo-25450: Updates shortcuts to start Python in installation directory.
21289
21290- bpo-25164: Changes default all-users install directory to match per-user
21291  directory.
21292
21293- bpo-25143: Improves installer error messages for unsupported platforms.
21294
21295- bpo-25163: Display correct directory in installer when using non-default
21296  settings.
21297
21298- bpo-25361: Disables use of SSE2 instructions in Windows 32-bit build
21299
21300- bpo-25089: Adds logging to installer for case where launcher is not
21301  selected on upgrade.
21302
21303- bpo-25165: Windows uninstallation should not remove launcher if other
21304  versions remain
21305
21306- bpo-25112: py.exe launcher is missing icons
21307
21308- bpo-25102: Windows installer does not precompile for -O or -OO.
21309
21310- bpo-25081: Makes Back button in installer go back to upgrade page when
21311  upgrading.
21312
21313- bpo-25091: Increases font size of the installer.
21314
21315- bpo-25126: Clarifies that the non-web installer will download some
21316  components.
21317
21318- bpo-25213: Restores requestedExecutionLevel to manifest to disable UAC
21319  virtualization.
21320
21321- bpo-25022: Removed very outdated PC/example_nt/ directory.
21322
21323Tools/Demos
21324-----------
21325
21326- bpo-25440: Fix output of python-config --extension-suffix.
21327
21328
21329What's New in Python 3.5.0 final?
21330=================================
21331
21332*Release date: 2015-09-13*
21333
21334Build
21335-----
21336
21337- bpo-25071: Windows installer should not require TargetDir parameter when
21338  installing quietly.
21339
21340
21341What's New in Python 3.5.0 release candidate 4?
21342===============================================
21343
21344*Release date: 2015-09-09*
21345
21346Library
21347-------
21348
21349- bpo-25029: Fixes MemoryError in test_strptime.
21350
21351Build
21352-----
21353
21354- bpo-25027: Reverts partial-static build options and adds vcruntime140.dll
21355  to Windows installation.
21356
21357
21358What's New in Python 3.5.0 release candidate 3?
21359===============================================
21360
21361*Release date: 2015-09-07*
21362
21363Core and Builtins
21364-----------------
21365
21366- bpo-24305: Prevent import subsystem stack frames from being counted by the
21367  warnings.warn(stacklevel=) parameter.
21368
21369- bpo-24912: Prevent __class__ assignment to immutable built-in objects.
21370
21371- bpo-24975: Fix AST compilation for :pep:`448` syntax.
21372
21373Library
21374-------
21375
21376- bpo-24917: time_strftime() buffer over-read.
21377
21378- bpo-24748: To resolve a compatibility problem found with py2exe and
21379  pywin32, imp.load_dynamic() once again ignores previously loaded modules
21380  to support Python modules replacing themselves with extension modules.
21381  Patch by Petr Viktorin.
21382
21383- bpo-24635: Fixed a bug in typing.py where isinstance([], typing.Iterable)
21384  would return True once, then False on subsequent calls.
21385
21386- bpo-24989: Fixed buffer overread in BytesIO.readline() if a position is
21387  set beyond size.  Based on patch by John Leitch.
21388
21389- bpo-24913: Fix overrun error in deque.index(). Found by John Leitch and
21390  Bryce Darling.
21391
21392
21393What's New in Python 3.5.0 release candidate 2?
21394===============================================
21395
21396*Release date: 2015-08-25*
21397
21398Core and Builtins
21399-----------------
21400
21401- bpo-24769: Interpreter now starts properly when dynamic loading is
21402  disabled.  Patch by Petr Viktorin.
21403
21404- bpo-21167: NAN operations are now handled correctly when python is
21405  compiled with ICC even if -fp-model strict is not specified.
21406
21407- bpo-24492: A "package" lacking a __name__ attribute when trying to perform
21408  a ``from .. import ...`` statement will trigger an ImportError instead of
21409  an AttributeError.
21410
21411Library
21412-------
21413
21414- bpo-24847: Removes vcruntime140.dll dependency from Tcl/Tk.
21415
21416- bpo-24839: platform._syscmd_ver raises DeprecationWarning
21417
21418- bpo-24867: Fix Task.get_stack() for 'async def' coroutines
21419
21420
21421What's New in Python 3.5.0 release candidate 1?
21422===============================================
21423
21424*Release date: 2015-08-09*
21425
21426Core and Builtins
21427-----------------
21428
21429- bpo-24667: Resize odict in all cases that the underlying dict resizes.
21430
21431Library
21432-------
21433
21434- bpo-24824: Signatures of codecs.encode() and codecs.decode() now are
21435  compatible with pydoc.
21436
21437- bpo-24634: Importing uuid should not try to load libc on Windows
21438
21439- bpo-24798: _msvccompiler.py doesn't properly support manifests
21440
21441- bpo-4395: Better testing and documentation of binary operators. Patch by
21442  Martin Panter.
21443
21444- bpo-23973: Update typing.py from GitHub repo.
21445
21446- bpo-23004: mock_open() now reads binary data correctly when the type of
21447  read_data is bytes.  Initial patch by Aaron Hill.
21448
21449- bpo-23888: Handle fractional time in cookie expiry. Patch by ssh.
21450
21451- bpo-23652: Make it possible to compile the select module against the libc
21452  headers from the Linux Standard Base, which do not include some EPOLL
21453  macros.  Patch by Matt Frank.
21454
21455- bpo-22932: Fix timezones in email.utils.formatdate. Patch from Dmitry
21456  Shachnev.
21457
21458- bpo-23779: imaplib raises TypeError if authenticator tries to abort. Patch
21459  from Craig Holmquist.
21460
21461- bpo-23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch
21462  written by Matthieu Gautier.
21463
21464- bpo-23254: Document how to close the TCPServer listening socket. Patch
21465  from Martin Panter.
21466
21467- bpo-19450: Update Windows and OS X installer builds to use SQLite 3.8.11.
21468
21469- bpo-17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
21470
21471- bpo-24791: Fix grammar regression for call syntax: 'g(\*a or b)'.
21472
21473IDLE
21474----
21475
21476- bpo-23672: Allow Idle to edit and run files with astral chars in name.
21477  Patch by Mohd Sanad Zaki Rizvi.
21478
21479- bpo-24745: Idle editor default font. Switch from Courier to
21480  platform-sensitive TkFixedFont.  This should not affect current customized
21481  font selections.  If there is a problem, edit
21482  $HOME/.idlerc/config-main.cfg and remove 'fontxxx' entries from [Editor
21483  Window].  Patch by Mark Roseman.
21484
21485- bpo-21192: Idle editor. When a file is run, put its name in the restart
21486  bar. Do not print false prompts. Original patch by Adnan Umer.
21487
21488- bpo-13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
21489
21490Documentation
21491-------------
21492
21493- bpo-24129: Clarify the reference documentation for name resolution. This
21494  includes removing the assumption that readers will be familiar with the
21495  name resolution scheme Python used prior to the introduction of lexical
21496  scoping for function namespaces. Patch by Ivan Levkivskyi.
21497
21498- bpo-20769: Improve reload() docs. Patch by Dorian Pula.
21499
21500- bpo-23589: Remove duplicate sentence from the FAQ.  Patch by Yongzhi Pan.
21501
21502- bpo-24729: Correct IO tutorial to match implementation regarding encoding
21503  parameter to open function.
21504
21505Tests
21506-----
21507
21508- bpo-24751: When running regrtest with the ``-w`` command line option, a
21509  test run is no longer marked as a failure if all tests succeed when
21510  re-run.
21511
21512
21513What's New in Python 3.5.0 beta 4?
21514==================================
21515
21516*Release date: 2015-07-26*
21517
21518Core and Builtins
21519-----------------
21520
21521- bpo-23573: Restored optimization of bytes.rfind() and bytearray.rfind()
21522  for single-byte argument on Linux.
21523
21524- bpo-24569: Make :pep:`448` dictionary evaluation more consistent.
21525
21526- bpo-24583: Fix crash when set is mutated while being updated.
21527
21528- bpo-24407: Fix crash when dict is mutated while being updated.
21529
21530- bpo-24619: New approach for tokenizing async/await. As a consequence, it
21531  is now possible to have one-line 'async def foo(): await ..' functions.
21532
21533- bpo-24687: Plug refleak on SyntaxError in function parameters annotations.
21534
21535- bpo-15944: memoryview: Allow arbitrary formats when casting to bytes.
21536  Patch by Martin Panter.
21537
21538Library
21539-------
21540
21541- bpo-23441: rcompleter now prints a tab character instead of displaying
21542  possible completions for an empty word.  Initial patch by Martin Sekera.
21543
21544- bpo-24683: Fixed crashes in _json functions called with arguments of
21545  inappropriate type.
21546
21547- bpo-21697: shutil.copytree() now correctly handles symbolic links that
21548  point to directories.  Patch by Eduardo Seabra and Thomas Kluyver.
21549
21550- bpo-14373: Fixed segmentation fault when gc.collect() is called during
21551  constructing lru_cache (C implementation).
21552
21553- bpo-24695: Fix a regression in traceback.print_exception().  If
21554  exc_traceback is None we shouldn't print a traceback header like described
21555  in the documentation.
21556
21557- bpo-24620: Random.setstate() now validates the value of state last
21558  element.
21559
21560- bpo-22485: Fixed an issue that caused `inspect.getsource` to return
21561  incorrect results on nested functions.
21562
21563- bpo-22153: Improve unittest docs. Patch from Martin Panter and evilzero.
21564
21565- bpo-24580: Symbolic group references to open group in re patterns now are
21566  explicitly forbidden as well as numeric group references.
21567
21568- bpo-24206: Fixed __eq__ and __ne__ methods of inspect classes.
21569
21570- bpo-24631: Fixed regression in the timeit module with multiline setup.
21571
21572- bpo-18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
21573  Patch from Nicola Palumbo and Laurent De Buyst.
21574
21575- bpo-23661: unittest.mock side_effects can now be exceptions again. This
21576  was a regression vs Python 3.4. Patch from Ignacio Rossi
21577
21578- bpo-24608: chunk.Chunk.read() now always returns bytes, not str.
21579
21580- bpo-18684: Fixed reading out of the buffer in the re module.
21581
21582- bpo-24259: tarfile now raises a ReadError if an archive is truncated
21583  inside a data segment.
21584
21585- bpo-15014: SMTP.auth() and SMTP.login() now support RFC 4954's optional
21586  initial-response argument to the SMTP AUTH command.
21587
21588- bpo-24669: Fix inspect.getsource() for 'async def' functions. Patch by Kai
21589  Groner.
21590
21591- bpo-24688: ast.get_docstring() for 'async def' functions.
21592
21593Build
21594-----
21595
21596- bpo-24603: Update Windows builds and OS X 10.5 installer to use OpenSSL
21597  1.0.2d.
21598
21599
21600What's New in Python 3.5.0 beta 3?
21601==================================
21602
21603*Release date: 2015-07-05*
21604
21605Core and Builtins
21606-----------------
21607
21608- bpo-24467: Fixed possible buffer over-read in bytearray. The bytearray
21609  object now always allocates place for trailing null byte and it's buffer
21610  now is always null-terminated.
21611
21612- Upgrade to Unicode 8.0.0.
21613
21614- bpo-24345: Add Py_tp_finalize slot for the stable ABI.
21615
21616- bpo-24400: Introduce a distinct type for :pep:`492` coroutines; add
21617  types.CoroutineType, inspect.getcoroutinestate,
21618  inspect.getcoroutinelocals; coroutines no longer use CO_GENERATOR flag;
21619  sys.set_coroutine_wrapper works only for 'async def' coroutines;
21620  inspect.iscoroutine no longer uses collections.abc.Coroutine, it's
21621  intended to test for pure 'async def' coroutines only; add new opcode:
21622  GET_YIELD_FROM_ITER; fix generators wrapper used in types.coroutine to be
21623  instance of collections.abc.Generator; collections.abc.Awaitable and
21624  collections.abc.Coroutine can no longer be used to detect generator-based
21625  coroutines--use inspect.isawaitable instead.
21626
21627- bpo-24450: Add gi_yieldfrom to generators and cr_await to coroutines.
21628  Contributed by Benno Leslie and Yury Selivanov.
21629
21630- bpo-19235: Add new RecursionError exception. Patch by Georg Brandl.
21631
21632Library
21633-------
21634
21635- bpo-21750: mock_open.read_data can now be read from each instance, as it
21636  could in Python 3.3.
21637
21638- bpo-24552: Fix use after free in an error case of the _pickle module.
21639
21640- bpo-24514: tarfile now tolerates number fields consisting of only
21641  whitespace.
21642
21643- bpo-19176: Fixed doctype() related bugs in C implementation of
21644  ElementTree. A deprecation warning no longer issued by XMLParser subclass
21645  with default doctype() method.  Direct call of doctype() now issues a
21646  warning.  Parser's doctype() now is not called if target's doctype() is
21647  called.  Based on patch by Martin Panter.
21648
21649- bpo-20387: Restore semantic round-trip correctness in tokenize/untokenize
21650  for tab-indented blocks.
21651
21652- bpo-24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()
21653  functions of the audioop module.
21654
21655- bpo-24336: The contextmanager decorator now works with functions with
21656  keyword arguments called "func" and "self".  Patch by Martin Panter.
21657
21658- bpo-24522: Fix possible integer overflow in json accelerator module.
21659
21660- bpo-24489: ensure a previously set C errno doesn't disturb cmath.polar().
21661
21662- bpo-24408: Fixed AttributeError in measure() and metrics() methods of
21663  tkinter.Font.
21664
21665- bpo-14373: C implementation of functools.lru_cache() now can be used with
21666  methods.
21667
21668- bpo-24347: Set KeyError if PyDict_GetItemWithError returns NULL.
21669
21670- bpo-24348: Drop superfluous incref/decref.
21671
21672- bpo-24359: Check for changed OrderedDict size during iteration.
21673
21674- bpo-24368: Support keyword arguments in OrderedDict methods.
21675
21676- bpo-24362: Simplify the C OrderedDict fast nodes resize logic.
21677
21678- bpo-24377: Fix a ref leak in OrderedDict.__repr__.
21679
21680- bpo-24369: Defend against key-changes during iteration.
21681
21682Tests
21683-----
21684
21685- bpo-24373: _testmultiphase and xxlimited now use tp_traverse and
21686  tp_finalize to avoid reference leaks encountered when combining tp_dealloc
21687  with PyType_FromSpec (see issue #16690 for details)
21688
21689Documentation
21690-------------
21691
21692- bpo-24458: Update documentation to cover multi-phase initialization for
21693  extension modules (PEP 489). Patch by Petr Viktorin.
21694
21695- bpo-24351: Clarify what is meant by "identifier" in the context of
21696  string.Template instances.
21697
21698Build
21699-----
21700
21701- bpo-24432: Update Windows builds and OS X 10.5 installer to use OpenSSL
21702  1.0.2c.
21703
21704
21705What's New in Python 3.5.0 beta 2?
21706==================================
21707
21708*Release date: 2015-05-31*
21709
21710Core and Builtins
21711-----------------
21712
21713- bpo-24284: The startswith and endswith methods of the str class no longer
21714  return True when finding the empty string and the indexes are completely
21715  out of range.
21716
21717- bpo-24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
21718  PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
21719  to check for and handle errors correctly.
21720
21721- bpo-24328: Fix importing one character extension modules.
21722
21723- bpo-11205: In dictionary displays, evaluate the key before the value.
21724
21725- bpo-24285: Fixed regression that prevented importing extension modules
21726  from inside packages. Patch by Petr Viktorin.
21727
21728Library
21729-------
21730
21731- bpo-23247: Fix a crash in the StreamWriter.reset() of CJK codecs.
21732
21733- bpo-24270: Add math.isclose() and cmath.isclose() functions as per
21734  :pep:`485`. Contributed by Chris Barker and Tal Einat.
21735
21736- bpo-5633: Fixed timeit when the statement is a string and the setup is
21737  not.
21738
21739- bpo-24326: Fixed audioop.ratecv() with non-default weightB argument.
21740  Original patch by David Moore.
21741
21742- bpo-16991: Add a C implementation of OrderedDict.
21743
21744- bpo-23934: Fix inspect.signature to fail correctly for builtin types
21745  lacking signature information.  Initial patch by James Powell.
21746
21747
21748What's New in Python 3.5.0 beta 1?
21749==================================
21750
21751*Release date: 2015-05-24*
21752
21753Core and Builtins
21754-----------------
21755
21756- bpo-24276: Fixed optimization of property descriptor getter.
21757
21758- bpo-24268: PEP 489: Multi-phase extension module initialization. Patch by
21759  Petr Viktorin.
21760
21761- bpo-23955: Add pyvenv.cfg option to suppress registry/environment lookup
21762  for generating sys.path on Windows.
21763
21764- bpo-24257: Fixed system error in the comparison of faked
21765  types.SimpleNamespace.
21766
21767- bpo-22939: Fixed integer overflow in iterator object.  Patch by Clement
21768  Rouault.
21769
21770- bpo-23985: Fix a possible buffer overrun when deleting a slice from the
21771  front of a bytearray and then appending some other bytes data.
21772
21773- bpo-24102: Fixed exception type checking in standard error handlers.
21774
21775- bpo-15027: The UTF-32 encoder is now 3x to 7x faster.
21776
21777- bpo-23290: Optimize set_merge() for cases where the target is empty.
21778  (Contributed by Serhiy Storchaka.)
21779
21780- bpo-2292: PEP 448: Additional Unpacking Generalizations.
21781
21782- bpo-24096: Make warnings.warn_explicit more robust against mutation of the
21783  warnings.filters list.
21784
21785- bpo-23996: Avoid a crash when a delegated generator raises an unnormalized
21786  StopIteration exception.  Patch by Stefan Behnel.
21787
21788- bpo-23910: Optimize property() getter calls.  Patch by Joe Jevnik.
21789
21790- bpo-23911: Move path-based importlib bootstrap code to a separate frozen
21791  module.
21792
21793- bpo-24192: Fix namespace package imports.
21794
21795- bpo-24022: Fix tokenizer crash when processing undecodable source code.
21796
21797- bpo-9951: Added a hex() method to bytes, bytearray, and memoryview.
21798
21799- bpo-22906: PEP 479: Change StopIteration handling inside generators.
21800
21801- bpo-24017: PEP 492: Coroutines with async and await syntax.
21802
21803Library
21804-------
21805
21806- bpo-14373: Added C implementation of functools.lru_cache().  Based on
21807  patches by Matt Joiner and Alexey Kachayev.
21808
21809- bpo-24230: The tempfile module now accepts bytes for prefix, suffix and
21810  dir parameters and returns bytes in such situations (matching the os
21811  module APIs).
21812
21813- bpo-22189: collections.UserString now supports __getnewargs__(),
21814  __rmod__(), casefold(), format_map(), isprintable(), and maketrans().
21815  Patch by Joe Jevnik.
21816
21817- bpo-24244: Prevents termination when an invalid format string is
21818  encountered on Windows in strftime.
21819
21820- bpo-23973: PEP 484: Add the typing module.
21821
21822- bpo-23086: The collections.abc.Sequence() abstract base class added
21823  *start* and *stop* parameters to the index() mixin. Patch by Devin
21824  Jeanpierre.
21825
21826- bpo-20035: Replaced the ``tkinter._fix`` module used for setting up the
21827  Tcl/Tk environment on Windows with a private function in the ``_tkinter``
21828  module that makes no permanent changes to the environment.
21829
21830- bpo-24257: Fixed segmentation fault in sqlite3.Row constructor with faked
21831  cursor type.
21832
21833- bpo-15836: assertRaises(), assertRaisesRegex(), assertWarns() and
21834  assertWarnsRegex() assertments now check the type of the first argument to
21835  prevent possible user error.  Based on patch by Daniel Wagner-Hall.
21836
21837- bpo-9858: Add missing method stubs to _io.RawIOBase.  Patch by Laura
21838  Rupprecht.
21839
21840- bpo-22955: attrgetter, itemgetter and methodcaller objects in the operator
21841  module now support pickling.  Added readable and evaluable repr for these
21842  objects. Based on patch by Josh Rosenberg.
21843
21844- bpo-22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again when
21845  a directory with the chosen name already exists on Windows as well as on
21846  Unix. tempfile.mkstemp() now fails early if parent directory is not valid
21847  (not exists or is a file) on Windows.
21848
21849- bpo-23780: Improved error message in os.path.join() with single argument.
21850
21851- bpo-6598: Increased time precision and random number range in
21852  email.utils.make_msgid() to strengthen the uniqueness of the message ID.
21853
21854- bpo-24091: Fixed various crashes in corner cases in C implementation of
21855  ElementTree.
21856
21857- bpo-21931: msilib.FCICreate() now raises TypeError in the case of a bad
21858  argument instead of a ValueError with a bogus FCI error number. Patch by
21859  Jeffrey Armstrong.
21860
21861- bpo-13866: *quote_via* argument added to urllib.parse.urlencode.
21862
21863- bpo-20098: New mangle_from policy option for email, default True for
21864  compat32, but False for all other policies.
21865
21866- bpo-24211: The email library now supports RFC 6532: it can generate
21867  headers using utf-8 instead of encoded words.
21868
21869- bpo-16314: Added support for the LZMA compression in distutils.
21870
21871- bpo-21804: poplib now supports RFC 6856 (UTF8).
21872
21873- bpo-18682: Optimized pprint functions for builtin scalar types.
21874
21875- bpo-22027: smtplib now supports RFC 6531 (SMTPUTF8).
21876
21877- bpo-23488: Random generator objects now consume 2x less memory on 64-bit.
21878
21879- bpo-1322: platform.dist() and platform.linux_distribution() functions are
21880  now deprecated.  Initial patch by Vajrasky Kok.
21881
21882- bpo-22486: Added the math.gcd() function.  The fractions.gcd() function
21883  now is deprecated.  Based on patch by Mark Dickinson.
21884
21885- bpo-24064: Property() docstrings are now writeable. (Patch by Berker
21886  Peksag.)
21887
21888- bpo-22681: Added support for the koi8_t encoding.
21889
21890- bpo-22682: Added support for the kz1048 encoding.
21891
21892- bpo-23796: peek and read1 methods of BufferedReader now raise ValueError
21893  if they called on a closed object. Patch by John Hergenroeder.
21894
21895- bpo-21795: smtpd now supports the 8BITMIME extension whenever the new
21896  *decode_data* constructor argument is set to False.
21897
21898- bpo-24155: optimize heapq.heapify() for better cache performance when
21899  heapifying large lists.
21900
21901- bpo-21800: imaplib now supports RFC 5161 (enable), RFC 6855
21902  (utf8/internationalized email) and automatically encodes non-ASCII
21903  usernames and passwords to UTF8.
21904
21905- bpo-20274: When calling a _sqlite.Connection, it now complains if passed
21906  any keyword arguments.  Previously it silently ignored them.
21907
21908- bpo-20274: Remove ignored and erroneous "kwargs" parameters from three
21909  METH_VARARGS methods on _sqlite.Connection.
21910
21911- bpo-24134: assertRaises(), assertRaisesRegex(), assertWarns() and
21912  assertWarnsRegex() checks now emits a deprecation warning when callable is
21913  None or keyword arguments except msg is passed in the context manager
21914  mode.
21915
21916- bpo-24018: Add a collections.abc.Generator abstract base class.
21917  Contributed by Stefan Behnel.
21918
21919- bpo-23880: Tkinter's getint() and getdouble() now support Tcl_Obj.
21920  Tkinter's getdouble() now supports any numbers (in particular int).
21921
21922- bpo-22619: Added negative limit support in the traceback module. Based on
21923  patch by Dmitry Kazakov.
21924
21925- bpo-24094: Fix possible crash in json.encode with poorly behaved dict
21926  subclasses.
21927
21928- bpo-9246: On POSIX, os.getcwd() now supports paths longer than 1025 bytes.
21929  Patch written by William Orr.
21930
21931- bpo-17445: add difflib.diff_bytes() to support comparison of byte strings
21932  (fixes a regression from Python 2).
21933
21934- bpo-23917: Fall back to sequential compilation when ProcessPoolExecutor
21935  doesn't exist. Patch by Claudiu Popa.
21936
21937- bpo-23008: Fixed resolving attributes with boolean value is False in
21938  pydoc.
21939
21940- Fix asyncio issue 235: LifoQueue and PriorityQueue's put didn't increment
21941  unfinished tasks (this bug was introduced when JoinableQueue was merged
21942  with Queue).
21943
21944- bpo-23908: os functions now reject paths with embedded null character on
21945  Windows instead of silently truncating them.
21946
21947- bpo-23728: binascii.crc_hqx() could return an integer outside of the range
21948  0-0xffff for empty data.
21949
21950- bpo-23887: urllib.error.HTTPError now has a proper repr() representation.
21951  Patch by Berker Peksag.
21952
21953- asyncio: New event loop APIs: set_task_factory() and get_task_factory().
21954
21955- asyncio: async() function is deprecated in favour of ensure_future().
21956
21957- bpo-24178: asyncio.Lock, Condition, Semaphore, and BoundedSemaphore
21958  support new 'async with' syntax.  Contributed by Yury Selivanov.
21959
21960- bpo-24179: Support 'async for' for asyncio.StreamReader. Contributed by
21961  Yury Selivanov.
21962
21963- bpo-24184: Add AsyncIterator and AsyncIterable ABCs to collections.abc.
21964  Contributed by Yury Selivanov.
21965
21966- bpo-22547: Implement informative __repr__ for inspect.BoundArguments.
21967  Contributed by Yury Selivanov.
21968
21969- bpo-24190: Implement inspect.BoundArgument.apply_defaults() method.
21970  Contributed by Yury Selivanov.
21971
21972- bpo-20691: Add 'follow_wrapped' argument to
21973  inspect.Signature.from_callable() and inspect.signature(). Contributed by
21974  Yury Selivanov.
21975
21976- bpo-24248: Deprecate inspect.Signature.from_function() and
21977  inspect.Signature.from_builtin().
21978
21979- bpo-23898: Fix inspect.classify_class_attrs() to support attributes with
21980  overloaded __eq__ and __bool__.  Patch by Mike Bayer.
21981
21982- bpo-24298: Fix inspect.signature() to correctly unwrap wrappers around
21983  bound methods.
21984
21985IDLE
21986----
21987
21988- bpo-23184: remove unused names and imports in idlelib. Initial patch by Al
21989  Sweigart.
21990
21991Tests
21992-----
21993
21994- bpo-21520: test_zipfile no longer fails if the word 'bad' appears anywhere
21995  in the name of the current directory.
21996
21997- bpo-9517: Move script_helper into the support package. Patch by Christie
21998  Wilson.
21999
22000Documentation
22001-------------
22002
22003- bpo-22155: Add File Handlers subsection with createfilehandler to tkinter
22004  doc.  Remove obsolete example from FAQ.  Patch by Martin Panter.
22005
22006- bpo-24029: Document the name binding behavior for submodule imports.
22007
22008- bpo-24077: Fix typo in man page for -I command option: -s, not -S
22009
22010Tools/Demos
22011-----------
22012
22013- bpo-24000: Improved Argument Clinic's mapping of converters to legacy
22014  "format units". Updated the documentation to match.
22015
22016- bpo-24001: Argument Clinic converters now use accept={type} instead of
22017  types={'type'} to specify the types the converter accepts.
22018
22019- bpo-23330: h2py now supports arbitrary filenames in #include.
22020
22021- bpo-24031: make patchcheck now supports git checkouts, too.
22022
22023
22024What's New in Python 3.5.0 alpha 4?
22025===================================
22026
22027*Release date: 2015-04-19*
22028
22029Core and Builtins
22030-----------------
22031
22032- bpo-22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now
22033  include the architecture triplet in the extension name, to make it easy to
22034  test builds for different ABIs in the same working tree.  Under OS X, the
22035  extension name now includes :pep:`3149`-style information.
22036
22037- bpo-22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES. Patch
22038  courtesy of Joe Jevnik.
22039
22040- bpo-23731: Implement :pep:`488`: removal of .pyo files.
22041
22042- bpo-23726: Don't enable GC for user subclasses of non-GC types that don't
22043  add any new fields.  Patch by Eugene Toder.
22044
22045- bpo-23309: Avoid a deadlock at shutdown if a daemon thread is aborted
22046  while it is holding a lock to a buffered I/O object, and the main thread
22047  tries to use the same I/O object (typically stdout or stderr).  A fatal
22048  error is emitted instead.
22049
22050- bpo-22977: Fixed formatting Windows error messages on Wine. Patch by
22051  Martin Panter.
22052
22053- bpo-23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
22054  non-integer input.
22055
22056- bpo-24044: Fix possible null pointer dereference in list.sort in out of
22057  memory conditions.
22058
22059- bpo-21354: PyCFunction_New function is exposed by python DLL again.
22060
22061Library
22062-------
22063
22064- bpo-23840: tokenize.open() now closes the temporary binary file on error
22065  to fix a resource warning.
22066
22067- bpo-16914: new debuglevel 2 in smtplib adds timestamps to debug output.
22068
22069- bpo-7159: urllib.request now supports sending auth credentials
22070  automatically after the first 401.  This enhancement is a superset of the
22071  enhancement from issue #19494 and supersedes that change.
22072
22073- bpo-23703: Fix a regression in urljoin() introduced in 901e4e52b20a. Patch
22074  by Demian Brecht.
22075
22076- bpo-4254: Adds _curses.update_lines_cols().  Patch by Arnon Yaari
22077
22078- bpo-19933: Provide default argument for ndigits in round. Patch by
22079  Vajrasky Kok.
22080
22081- bpo-23193: Add a numeric_owner parameter to tarfile.TarFile.extract and
22082  tarfile.TarFile.extractall. Patch by Michael Vogt and Eric Smith.
22083
22084- bpo-23342: Add a subprocess.run() function than returns a CalledProcess
22085  instance for a more consistent API than the existing call* functions.
22086
22087- bpo-21217: inspect.getsourcelines() now tries to compute the start and end
22088  lines from the code object, fixing an issue when a lambda function is used
22089  as decorator argument. Patch by Thomas Ballinger and Allison Kaptur.
22090
22091- bpo-24521: Fix possible integer overflows in the pickle module.
22092
22093- bpo-22931: Allow '[' and ']' in cookie values.
22094
22095- The keywords attribute of functools.partial is now always a dictionary.
22096
22097- bpo-23811: Add missing newline to the PyCompileError error message. Patch
22098  by Alex Shkop.
22099
22100- bpo-21116: Avoid blowing memory when allocating a multiprocessing shared
22101  array that's larger than 50% of the available RAM.  Patch by Médéric
22102  Boquien.
22103
22104- bpo-22982: Improve BOM handling when seeking to multiple positions of a
22105  writable text file.
22106
22107- bpo-23464: Removed deprecated asyncio JoinableQueue.
22108
22109- bpo-23529: Limit the size of decompressed data when reading from GzipFile,
22110  BZ2File or LZMAFile.  This defeats denial of service attacks using
22111  compressed bombs (i.e. compressed payloads which decompress to a huge
22112  size).  Patch by Martin Panter and Nikolaus Rath.
22113
22114- bpo-21859: Added Python implementation of io.FileIO.
22115
22116- bpo-23865: close() methods in multiple modules now are idempotent and more
22117  robust at shutdown. If they need to release multiple resources, all are
22118  released even if errors occur.
22119
22120- bpo-23400: Raise same exception on both Python 2 and 3 if sem_open is not
22121  available. Patch by Davin Potts.
22122
22123- bpo-10838: The subprocess now module includes SubprocessError and
22124  TimeoutError in its list of exported names for the users wild enough to
22125  use ``from subprocess import *``.
22126
22127- bpo-23411: Added DefragResult, ParseResult, SplitResult,
22128  DefragResultBytes, ParseResultBytes, and SplitResultBytes to
22129  urllib.parse.__all__. Patch by Martin Panter.
22130
22131- bpo-23881: urllib.request.ftpwrapper constructor now closes the socket if
22132  the FTP connection failed to fix a ResourceWarning.
22133
22134- bpo-23853: :meth:`socket.socket.sendall` does no more reset the socket
22135  timeout each time data is sent successfully. The socket timeout is now the
22136  maximum total duration to send all data.
22137
22138- bpo-22721: An order of multiline pprint output of set or dict containing
22139  orderable and non-orderable elements no longer depends on iteration order
22140  of set or dict.
22141
22142- bpo-15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
22143  returns bool. tkinter.BooleanVar now validates input values (accepted
22144  bool, int, str, and Tcl_Obj).  tkinter.BooleanVar.get() now always returns
22145  bool.
22146
22147- bpo-10590: xml.sax.parseString() now supports string argument.
22148
22149- bpo-23338: Fixed formatting ctypes error messages on Cygwin. Patch by
22150  Makoto Kato.
22151
22152- bpo-15582: inspect.getdoc() now follows inheritance chains.
22153
22154- bpo-2175: SAX parsers now support a character stream of InputSource
22155  object.
22156
22157- bpo-16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
22158  arbitrary precision integers added in Tcl 8.5.
22159
22160- bpo-23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
22161  result of sendto() instead of the C int type.
22162
22163- bpo-23618: :meth:`socket.socket.connect` now waits until the connection
22164  completes instead of raising :exc:`InterruptedError` if the connection is
22165  interrupted by signals, signal handlers don't raise an exception and the
22166  socket is blocking or has a timeout. :meth:`socket.socket.connect` still
22167  raise :exc:`InterruptedError` for non-blocking sockets.
22168
22169- bpo-21526: Tkinter now supports new boolean type in Tcl 8.5.
22170
22171- bpo-23836: Fix the faulthandler module to handle reentrant calls to its
22172  signal handlers.
22173
22174- bpo-23838: linecache now clears the cache and returns an empty result on
22175  MemoryError.
22176
22177- bpo-10395: Added os.path.commonpath(). Implemented in posixpath and
22178  ntpath. Based on patch by Rafik Draoui.
22179
22180- bpo-23611: Serializing more "lookupable" objects (such as unbound methods
22181  or nested classes) now are supported with pickle protocols < 4.
22182
22183- bpo-13583: sqlite3.Row now supports slice indexing.
22184
22185- bpo-18473: Fixed 2to3 and 3to2 compatible pickle mappings.  Fixed
22186  ambiguous reverse mappings.  Added many new mappings.  Import mapping is
22187  no longer applied to modules already mapped with full name mapping.
22188
22189- bpo-23485: select.select() is now retried automatically with the
22190  recomputed timeout when interrupted by a signal, except if the signal
22191  handler raises an exception. This change is part of the :pep:`475`.
22192
22193- bpo-23752: When built from an existing file descriptor, io.FileIO() now
22194  only calls fstat() once. Before fstat() was called twice, which was not
22195  necessary.
22196
22197- bpo-23704: collections.deque() objects now support __add__, __mul__, and
22198  __imul__().
22199
22200- bpo-23171: csv.Writer.writerow() now supports arbitrary iterables.
22201
22202- bpo-23745: The new email header parser now handles duplicate MIME
22203  parameter names without error, similar to how get_param behaves.
22204
22205- bpo-22117: Fix os.utime(), it now rounds the timestamp towards minus
22206  infinity (-inf) instead of rounding towards zero.
22207
22208- bpo-23310: Fix MagicMock's initializer to work with __methods__, just like
22209  configure_mock().  Patch by Kasia Jachim.
22210
22211Build
22212-----
22213
22214- bpo-23817: FreeBSD now uses "1.0" in the SOVERSION as other operating
22215  systems, instead of just "1".
22216
22217- bpo-23501: Argument Clinic now generates code into separate files by
22218  default.
22219
22220Tests
22221-----
22222
22223- bpo-23799: Added test.support.start_threads() for running and cleaning up
22224  multiple threads.
22225
22226- bpo-22390: test.regrtest now emits a warning if temporary files or
22227  directories are left after running a test.
22228
22229Tools/Demos
22230-----------
22231
22232- bpo-18128: pygettext now uses standard +NNNN format in the
22233  POT-Creation-Date header.
22234
22235- bpo-23935: Argument Clinic's understanding of format units accepting
22236  bytes, bytearrays, and buffers is now consistent with both the
22237  documentation and the implementation.
22238
22239- bpo-23944: Argument Clinic now wraps long impl prototypes at column 78.
22240
22241- bpo-20586: Argument Clinic now ensures that functions without docstrings
22242  have signatures.
22243
22244- bpo-23492: Argument Clinic now generates argument parsing code with
22245  PyArg_Parse instead of PyArg_ParseTuple if possible.
22246
22247- bpo-23500: Argument Clinic is now smarter about generating the "#ifndef"
22248  (empty) definition of the methoddef macro: it's only generated once, even
22249  if Argument Clinic processes the same symbol multiple times, and it's
22250  emitted at the end of all processing rather than immediately after the
22251  first use.
22252
22253C API
22254-----
22255
22256- bpo-23998: PyImport_ReInitLock() now checks for lock allocation error
22257
22258
22259What's New in Python 3.5.0 alpha 3?
22260===================================
22261
22262*Release date: 2015-03-28*
22263
22264Core and Builtins
22265-----------------
22266
22267- bpo-23573: Increased performance of string search operations (str.find,
22268  str.index, str.count, the in operator, str.split, str.partition) with
22269  arguments of different kinds (UCS1, UCS2, UCS4).
22270
22271- bpo-23753: Python doesn't support anymore platforms without stat() or
22272  fstat(), these functions are always required.
22273
22274- bpo-23681: The -b option now affects comparisons of bytes with int.
22275
22276- bpo-23632: Memoryviews now allow tuple indexing (including for
22277  multi-dimensional memoryviews).
22278
22279- bpo-23192: Fixed generator lambdas.  Patch by Bruno Cauet.
22280
22281- bpo-23629: Fix the default __sizeof__ implementation for variable-sized
22282  objects.
22283
22284Library
22285-------
22286
22287- bpo-14260: The groupindex attribute of regular expression pattern object
22288  now is non-modifiable mapping.
22289
22290- bpo-23792: Ignore KeyboardInterrupt when the pydoc pager is active. This
22291  mimics the behavior of the standard unix pagers, and prevents pipepager
22292  from shutting down while the pager itself is still running.
22293
22294- bpo-23775: pprint() of OrderedDict now outputs the same representation as
22295  repr().
22296
22297- bpo-23765: Removed IsBadStringPtr calls in ctypes
22298
22299- bpo-22364: Improved some re error messages using regex for hints.
22300
22301- bpo-23742: ntpath.expandvars() no longer loses unbalanced single quotes.
22302
22303- bpo-21717: The zipfile.ZipFile.open function now supports 'x' (exclusive
22304  creation) mode.
22305
22306- bpo-21802: The reader in BufferedRWPair now is closed even when closing
22307  writer failed in BufferedRWPair.close().
22308
22309- bpo-23622: Unknown escapes in regular expressions that consist of ``'\'``
22310  and ASCII letter now raise a deprecation warning and will be forbidden in
22311  Python 3.6.
22312
22313- bpo-23671: string.Template now allows specifying the "self" parameter as a
22314  keyword argument.  string.Formatter now allows specifying the "self" and
22315  the "format_string" parameters as keyword arguments.
22316
22317- bpo-23502: The pprint module now supports mapping proxies.
22318
22319- bpo-17530: pprint now wraps long bytes objects and bytearrays.
22320
22321- bpo-22687: Fixed some corner cases in breaking words in tetxtwrap. Got rid
22322  of quadratic complexity in breaking long words.
22323
22324- bpo-4727: The copy module now uses pickle protocol 4 (PEP 3154) and
22325  supports copying of instances of classes whose __new__ method takes
22326  keyword-only arguments.
22327
22328- bpo-23491: Added a zipapp module to support creating executable zip file
22329  archives of Python code. Registered ".pyz" and ".pyzw" extensions on
22330  Windows for these archives (PEP 441).
22331
22332- bpo-23657: Avoid explicit checks for str in zipapp, adding support for
22333  pathlib.Path objects as arguments.
22334
22335- bpo-23688: Added support of arbitrary bytes-like objects and avoided
22336  unnecessary copying of memoryview in gzip.GzipFile.write(). Original patch
22337  by Wolfgang Maier.
22338
22339- bpo-23252: Added support for writing ZIP files to unseekable streams.
22340
22341- bpo-23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes.
22342
22343- bpo-23539: If body is None, http.client.HTTPConnection.request now sets
22344  Content-Length to 0 for PUT, POST, and PATCH headers to avoid 411 errors
22345  from some web servers.
22346
22347- bpo-22351: The nntplib.NNTP constructor no longer leaves the connection
22348  and socket open until the garbage collector cleans them up.  Patch by
22349  Martin Panter.
22350
22351- bpo-23704: collections.deque() objects now support methods for index(),
22352  insert(), and copy().  This allows deques to be registered as a
22353  MutableSequence and it improves their substitutability for lists.
22354
22355- bpo-23715: :func:`signal.sigwaitinfo` and :func:`signal.sigtimedwait` are
22356  now retried when interrupted by a signal not in the *sigset* parameter, if
22357  the signal handler does not raise an exception. signal.sigtimedwait()
22358  recomputes the timeout with a monotonic clock when it is retried.
22359
22360- bpo-23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and
22361  codecs, that accepted only read-only bytes-like object now accept writable
22362  bytes-like object too.
22363
22364- bpo-23646: If time.sleep() is interrupted by a signal, the sleep is now
22365  retried with the recomputed delay, except if the signal handler raises an
22366  exception (PEP 475).
22367
22368- bpo-23136: _strptime now uniformly handles all days in week 0, including
22369  Dec 30 of previous year.  Based on patch by Jim Carroll.
22370
22371- bpo-23700: Iterator of NamedTemporaryFile now keeps a reference to
22372  NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
22373
22374- bpo-22903: The fake test case created by unittest.loader when it fails
22375  importing a test module is now picklable.
22376
22377- bpo-22181: On Linux, os.urandom() now uses the new getrandom() syscall if
22378  available, syscall introduced in the Linux kernel 3.17. It is more
22379  reliable and more secure, because it avoids the need of a file descriptor
22380  and waits until the kernel has enough entropy.
22381
22382- bpo-2211: Updated the implementation of the http.cookies.Morsel class.
22383  Setting attributes key, value and coded_value directly now is deprecated.
22384  update() and setdefault() now transform and check keys.  Comparing for
22385  equality now takes into account attributes key, value and coded_value.
22386  copy() now returns a Morsel, not a dict.  repr() now contains all
22387  attributes. Optimized checking keys and quoting values.  Added new tests.
22388  Original patch by Demian Brecht.
22389
22390- bpo-18983: Allow selection of output units in timeit. Patch by Julian
22391  Gindi.
22392
22393- bpo-23631: Fix traceback.format_list when a traceback has been mutated.
22394
22395- bpo-23568: Add rdivmod support to MagicMock() objects. Patch by Håkan
22396  Lövdahl.
22397
22398- bpo-2052: Add charset parameter to HtmlDiff.make_file().
22399
22400- bpo-23668: Support os.truncate and os.ftruncate on Windows.
22401
22402- bpo-23138: Fixed parsing cookies with absent keys or values in cookiejar.
22403  Patch by Demian Brecht.
22404
22405- bpo-23051: multiprocessing.Pool methods imap() and imap_unordered() now
22406  handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
22407  Potts.
22408
22409- bpo-23581: Add matmul support to MagicMock. Patch by Håkan Lövdahl.
22410
22411- bpo-23566: enable(), register(), dump_traceback() and
22412  dump_traceback_later() functions of faulthandler now accept file
22413  descriptors. Patch by Wei Wu.
22414
22415- bpo-22928: Disabled HTTP header injections in http.client. Original patch
22416  by Demian Brecht.
22417
22418- bpo-23615: Modules bz2, tarfile and tokenize now can be reloaded with
22419  imp.reload(). Patch by Thomas Kluyver.
22420
22421- bpo-23605: os.walk() now calls os.scandir() instead of os.listdir(). The
22422  usage of os.scandir() reduces the number of calls to os.stat(). Initial
22423  patch written by Ben Hoyt.
22424
22425Build
22426-----
22427
22428- bpo-23585: make patchcheck will ensure the interpreter is built.
22429
22430Tests
22431-----
22432
22433- bpo-23583: Added tests for standard IO streams in IDLE.
22434
22435- bpo-22289: Prevent test_urllib2net failures due to ftp connection timeout.
22436
22437Tools/Demos
22438-----------
22439
22440- bpo-22826: The result of open() in Tools/freeze/bkfile.py is now better
22441  compatible with regular files (in particular it now supports the context
22442  management protocol).
22443
22444
22445What's New in Python 3.5.0 alpha 2?
22446===================================
22447
22448*Release date: 2015-03-09*
22449
22450Core and Builtins
22451-----------------
22452
22453- bpo-23571: PyObject_Call() and PyCFunction_Call() now raise a SystemError
22454  if a function returns a result and raises an exception. The SystemError is
22455  chained to the previous exception.
22456
22457Library
22458-------
22459
22460- bpo-22524: New os.scandir() function, part of the :pep:`471`:
22461  "os.scandir() function -- a better and faster directory iterator". Patch
22462  written by Ben Hoyt.
22463
22464- bpo-23103: Reduced the memory consumption of IPv4Address and IPv6Address.
22465
22466- bpo-21793: BaseHTTPRequestHandler again logs response code as numeric, not
22467  as stringified enum.  Patch by Demian Brecht.
22468
22469- bpo-23476: In the ssl module, enable OpenSSL's X509_V_FLAG_TRUSTED_FIRST
22470  flag on certificate stores when it is available.
22471
22472- bpo-23576: Avoid stalling in SSL reads when EOF has been reached in the
22473  SSL layer but the underlying connection hasn't been closed.
22474
22475- bpo-23504: Added an __all__ to the types module.
22476
22477- bpo-23563: Optimized utility functions in urllib.parse.
22478
22479- bpo-7830: Flatten nested functools.partial.
22480
22481- bpo-20204: Added the __module__ attribute to _tkinter classes.
22482
22483- bpo-19980: Improved help() for non-recognized strings.  help('') now shows
22484  the help on str.  help('help') now shows the help on help(). Original
22485  patch by Mark Lawrence.
22486
22487- bpo-23521: Corrected pure python implementation of timedelta division.
22488  Eliminated OverflowError from ``timedelta * float`` for some floats;
22489  Corrected rounding in timedelta true division.
22490
22491- bpo-21619: Popen objects no longer leave a zombie after exit in the with
22492  statement if the pipe was broken.  Patch by Martin Panter.
22493
22494- bpo-22936: Make it possible to show local variables in tracebacks for both
22495  the traceback module and unittest.
22496
22497- bpo-15955: Add an option to limit the output size in bz2.decompress().
22498  Patch by Nikolaus Rath.
22499
22500- bpo-6639: Module-level turtle functions no longer raise TclError after
22501  closing the window.
22502
22503- bpo-814253: Group references and conditional group references now work in
22504  lookbehind assertions in regular expressions. (See also: bpo-9179)
22505
22506- bpo-23215: Multibyte codecs with custom error handlers that ignores errors
22507  consumed too much memory and raised SystemError or MemoryError. Original
22508  patch by Aleksi Torhamo.
22509
22510- bpo-5700: io.FileIO() called flush() after closing the file. flush() was
22511  not called in close() if closefd=False.
22512
22513- bpo-23374: Fixed pydoc failure with non-ASCII files when stdout encoding
22514  differs from file system encoding (e.g. on Mac OS).
22515
22516- bpo-23481: Remove RC4 from the SSL module's default cipher list.
22517
22518- bpo-21548: Fix pydoc.synopsis() and pydoc.apropos() on modules with empty
22519  docstrings.
22520
22521- bpo-22885: Fixed arbitrary code execution vulnerability in the dbm.dumb
22522  module. Original patch by Claudiu Popa.
22523
22524- bpo-23239: ssl.match_hostname() now supports matching of IP addresses.
22525
22526- bpo-23146: Fix mishandling of absolute Windows paths with forward slashes
22527  in pathlib.
22528
22529- bpo-23096: Pickle representation of floats with protocol 0 now is the same
22530  for both Python and C implementations.
22531
22532- bpo-19105: pprint now more efficiently uses free space at the right.
22533
22534- bpo-14910: Add allow_abbrev parameter to argparse.ArgumentParser. Patch by
22535  Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson.
22536
22537- bpo-21717: tarfile.open() now supports 'x' (exclusive creation) mode.
22538
22539- bpo-23344: marshal.dumps() is now 20-25% faster on average.
22540
22541- bpo-20416: marshal.dumps() with protocols 3 and 4 is now 40-50% faster on
22542  average.
22543
22544- bpo-23421: Fixed compression in tarfile CLI.  Patch by wdv4758h.
22545
22546- bpo-23367: Fix possible overflows in the unicodedata module.
22547
22548- bpo-23361: Fix possible overflow in Windows subprocess creation code.
22549
22550- logging.handlers.QueueListener now takes a respect_handler_level keyword
22551  argument which, if set to True, will pass messages to handlers taking
22552  handler levels into account.
22553
22554- bpo-19705: turtledemo now has a visual sorting algorithm demo.  Original
22555  patch from Jason Yeo.
22556
22557- bpo-23801: Fix issue where cgi.FieldStorage did not always ignore the
22558  entire preamble to a multipart body.
22559
22560Build
22561-----
22562
22563- bpo-23445: pydebug builds now use "gcc -Og" where possible, to make the
22564  resulting executable faster.
22565
22566- bpo-23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.
22567
22568C API
22569-----
22570
22571- bpo-20204: Deprecation warning is now raised for builtin types without the
22572  __module__ attribute.
22573
22574Windows
22575-------
22576
22577- bpo-23465: Implement :pep:`486` - Make the Python Launcher aware of
22578  virtual environments. Patch by Paul Moore.
22579
22580- bpo-23437: Make user scripts directory versioned on Windows. Patch by Paul
22581  Moore.
22582
22583
22584What's New in Python 3.5.0 alpha 1?
22585===================================
22586
22587*Release date: 2015-02-08*
22588
22589Core and Builtins
22590-----------------
22591
22592- bpo-23285: PEP 475 - EINTR handling.
22593
22594- bpo-22735: Fix many edge cases (including crashes) involving custom mro()
22595  implementations.
22596
22597- bpo-22896: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
22598  and PyObject_AsWriteBuffer().
22599
22600- bpo-21295: Revert some changes (issue #16795) to AST line numbers and
22601  column offsets that constituted a regression.
22602
22603- bpo-22986: Allow changing an object's __class__ between a dynamic type and
22604  static type in some cases.
22605
22606- bpo-15859: PyUnicode_EncodeFSDefault(), PyUnicode_EncodeMBCS() and
22607  PyUnicode_EncodeCodePage() now raise an exception if the object is not a
22608  Unicode object. For PyUnicode_EncodeFSDefault(), it was already the case
22609  on platforms other than Windows. Patch written by Campbell Barton.
22610
22611- bpo-21408: The default __ne__() now returns NotImplemented if __eq__()
22612  returned NotImplemented.  Original patch by Martin Panter.
22613
22614- bpo-23321: Fixed a crash in str.decode() when error handler returned
22615  replacement string longer than malformed input data.
22616
22617- bpo-22286: The "backslashreplace" error handlers now works with decoding
22618  and translating.
22619
22620- bpo-23253: Delay-load ShellExecute[AW] in os.startfile for reduced startup
22621  overhead on Windows.
22622
22623- bpo-22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for
22624  atomic memory access if available. Patch written by Vitor de Lima and
22625  Gustavo Temple.
22626
22627- bpo-20284: %-interpolation (aka printf) formatting added for bytes and
22628  bytearray.
22629
22630- bpo-23048: Fix jumping out of an infinite while loop in the pdb.
22631
22632- bpo-20335: bytes constructor now raises TypeError when encoding or errors
22633  is specified with non-string argument.  Based on patch by Renaud Blanch.
22634
22635- bpo-22834: If the current working directory ends up being set to a
22636  non-existent directory then import will no longer raise FileNotFoundError.
22637
22638- bpo-22869: Move the interpreter startup & shutdown code to a new dedicated
22639  pylifecycle.c module
22640
22641- bpo-22847: Improve method cache efficiency.
22642
22643- bpo-22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff
22644  bytes on a 32-bit platform.
22645
22646- bpo-22653: Fix an assertion failure in debug mode when doing a reentrant
22647  dict insertion in debug mode.
22648
22649- bpo-22643: Fix integer overflow in Unicode case operations (upper, lower,
22650  title, swapcase, casefold).
22651
22652- bpo-17636: Circular imports involving relative imports are now supported.
22653
22654- bpo-22604: Fix assertion error in debug mode when dividing a complex
22655  number by (nan+0j).
22656
22657- bpo-21052: Do not raise ImportWarning when sys.path_hooks or sys.meta_path
22658  are set to None.
22659
22660- bpo-16518: Use 'bytes-like object required' in error messages that
22661  previously used the far more cryptic "'x' does not support the buffer
22662  protocol.
22663
22664- bpo-22470: Fixed integer overflow issues in "backslashreplace",
22665  "xmlcharrefreplace", and "surrogatepass" error handlers.
22666
22667- bpo-22540: speed up `PyObject_IsInstance` and `PyObject_IsSubclass` in the
22668  common case that the second argument has metaclass `type`.
22669
22670- bpo-18711: Add a new `PyErr_FormatV` function, similar to `PyErr_Format`
22671  but accepting a `va_list` argument.
22672
22673- bpo-22520: Fix overflow checking when generating the repr of a unicode
22674  object.
22675
22676- bpo-22519: Fix overflow checking in PyBytes_Repr.
22677
22678- bpo-22518: Fix integer overflow issues in latin-1 encoding.
22679
22680- bpo-16324: _charset parameter of MIMEText now also accepts
22681  email.charset.Charset instances. Initial patch by Claude Paroz.
22682
22683- bpo-1764286: Fix inspect.getsource() to support decorated functions. Patch
22684  by Claudiu Popa.
22685
22686- bpo-18554: os.__all__ includes posix functions.
22687
22688- bpo-21391: Use os.path.abspath in the shutil module.
22689
22690- bpo-11471: avoid generating a JUMP_FORWARD instruction at the end of an
22691  if-block if there is no else-clause.  Original patch by Eugene Toder.
22692
22693- bpo-22215: Now ValueError is raised instead of TypeError when str or bytes
22694  argument contains not permitted null character or byte.
22695
22696- bpo-22258: Fix the internal function set_inheritable() on Illumos. This
22697  platform exposes the function ``ioctl(FIOCLEX)``, but calling it fails
22698  with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable()
22699  now falls back to the slower ``fcntl()`` (``F_GETFD`` and then
22700  ``F_SETFD``).
22701
22702- bpo-21389: Displaying the __qualname__ of the underlying function in the
22703  repr of a bound method.
22704
22705- bpo-22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM
22706  and returns -1 (error) on integer overflow.
22707
22708- bpo-20184: Argument Clinic based signature introspection added for 30 of
22709  the builtin functions.
22710
22711- bpo-22116: C functions and methods (of the 'builtin_function_or_method'
22712  type) can now be weakref'ed.  Patch by Wei Wu.
22713
22714- bpo-22077: Improve index error messages for bytearrays, bytes, lists, and
22715  tuples by adding 'or slices'. Added ', not <typename>' for bytearrays.
22716  Original patch by Claudiu Popa.
22717
22718- bpo-20179: Apply Argument Clinic to bytes and bytearray. Patch by Tal
22719  Einat.
22720
22721- bpo-22082: Clear interned strings in slotdefs.
22722
22723- Upgrade Unicode database to Unicode 7.0.0.
22724
22725- bpo-21897: Fix a crash with the f_locals attribute with closure variables
22726  when frame.clear() has been called.
22727
22728- bpo-21205: Add a new ``__qualname__`` attribute to generator, the
22729  qualified name, and use it in the representation of a generator
22730  (``repr(gen)``). The default name of the generator (``__name__``
22731  attribute) is now get from the function instead of the code. Use
22732  ``gen.gi_code.co_name`` to get the name of the code.
22733
22734- bpo-21669: With the aid of heuristics in SyntaxError.__init__, the parser
22735  now attempts to generate more meaningful (or at least more search engine
22736  friendly) error messages when "exec" and "print" are used as statements.
22737
22738- bpo-21642: In the conditional if-else expression, allow an integer written
22739  with no space between itself and the ``else`` keyword (e.g. ``True if
22740  42else False``) to be valid syntax.
22741
22742- bpo-21523: Fix over-pessimistic computation of the stack effect of some
22743  opcodes in the compiler.  This also fixes a quadratic compilation time
22744  issue noticeable when compiling code with a large number of "and" and "or"
22745  operators.
22746
22747- bpo-21418: Fix a crash in the builtin function super() when called without
22748  argument and without current frame (ex: embedded Python).
22749
22750- bpo-21425: Fix flushing of standard streams in the interactive
22751  interpreter.
22752
22753- bpo-21435: In rare cases, when running finalizers on objects in cyclic
22754  trash a bad pointer dereference could occur due to a subtle flaw in
22755  internal iteration logic.
22756
22757- bpo-21377: PyBytes_Concat() now tries to concatenate in-place when the
22758  first argument has a reference count of 1.  Patch by Nikolaus Rath.
22759
22760- bpo-20355: -W command line options now have higher priority than the
22761  PYTHONWARNINGS environment variable.  Patch by Arfrever.
22762
22763- bpo-21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
22764
22765- bpo-20904: Support setting FPU precision on m68k.
22766
22767- bpo-21209: Fix sending tuples to custom generator objects with the yield
22768  from syntax.
22769
22770- bpo-21193: pow(a, b, c) now raises ValueError rather than TypeError when b
22771  is negative. Patch by Josh Rosenberg.
22772
22773- bpo-21176: PEP 465: Add the '@' operator for matrix multiplication.
22774
22775- bpo-21134: Fix segfault when str is called on an uninitialized
22776  UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
22777
22778- bpo-19537: Fix PyUnicode_DATA() alignment under m68k.  Patch by Andreas
22779  Schwab.
22780
22781- bpo-20929: Add a type cast to avoid shifting a negative number.
22782
22783- bpo-20731: Properly position in source code files even if they are opened
22784  in text mode. Patch by Serhiy Storchaka.
22785
22786- bpo-20637: Key-sharing now also works for instance dictionaries of
22787  subclasses.  Patch by Peter Ingebretson.
22788
22789- bpo-8297: Attributes missing from modules now include the module name in
22790  the error text.  Original patch by ysj.ray.
22791
22792- bpo-19995: %c, %o, %x, and %X now raise TypeError on non-integer input.
22793
22794- bpo-19655: The ASDL parser - used by the build process to generate code
22795  for managing the Python AST in C - was rewritten. The new parser is self
22796  contained and does not require to carry long the spark.py parser-generator
22797  library; spark.py was removed from the source base.
22798
22799- bpo-12546: Allow ``\x00`` to be used as a fill character when using str,
22800  int, float, and complex __format__ methods.
22801
22802- bpo-20480: Add ipaddress.reverse_pointer. Patch by Leon Weber.
22803
22804- bpo-13598: Modify string.Formatter to support auto-numbering of
22805  replacement fields. It now matches the behavior of str.format() in this
22806  regard. Patches by Phil Elson and Ramchandra Apte.
22807
22808- bpo-8931: Make alternate formatting ('#') for type 'c' raise an exception.
22809  In versions prior to 3.5, '#' with 'c' had no effect. Now specifying it is
22810  an error. Patch by Torsten Landschoff.
22811
22812- bpo-23165: Perform overflow checks before allocating memory in the
22813  _Py_char2wchar function.
22814
22815Library
22816-------
22817
22818- bpo-23399: pyvenv creates relative symlinks where possible.
22819
22820- bpo-20289: cgi.FieldStorage() now supports the context management
22821  protocol.
22822
22823- bpo-13128: Print response headers for CONNECT requests when debuglevel >
22824  0. Patch by Demian Brecht.
22825
22826- bpo-15381: Optimized io.BytesIO to make less allocations and copyings.
22827
22828- bpo-22818: Splitting on a pattern that could match an empty string now
22829  raises a warning.  Patterns that can only match empty strings are now
22830  rejected.
22831
22832- bpo-23099: Closing io.BytesIO with exported buffer is rejected now to
22833  prevent corrupting exported buffer.
22834
22835- bpo-23326: Removed __ne__ implementations.  Since fixing default __ne__
22836  implementation in issue #21408 they are redundant.
22837
22838- bpo-23363: Fix possible overflow in itertools.permutations.
22839
22840- bpo-23364: Fix possible overflow in itertools.product.
22841
22842- bpo-23366: Fixed possible integer overflow in itertools.combinations.
22843
22844- bpo-23369: Fixed possible integer overflow in
22845  _json.encode_basestring_ascii.
22846
22847- bpo-23353: Fix the exception handling of generators in
22848  PyEval_EvalFrameEx(). At entry, save or swap the exception state even if
22849  PyEval_EvalFrameEx() is called with throwflag=0. At exit, the exception
22850  state is now always restored or swapped, not only if why is WHY_YIELD or
22851  WHY_RETURN. Patch co-written with Antoine Pitrou.
22852
22853- bpo-14099: Restored support of writing ZIP files to tellable but
22854  non-seekable streams.
22855
22856- bpo-14099: Writing to ZipFile and reading multiple ZipExtFiles is
22857  threadsafe now.
22858
22859- bpo-19361: JSON decoder now raises JSONDecodeError instead of ValueError.
22860
22861- bpo-18518: timeit now rejects statements which can't be compiled outside a
22862  function or a loop (e.g. "return" or "break").
22863
22864- bpo-23094: Fixed readline with frames in Python implementation of pickle.
22865
22866- bpo-23268: Fixed bugs in the comparison of ipaddress classes.
22867
22868- bpo-21408: Removed incorrect implementations of __ne__() which didn't
22869  returned NotImplemented if __eq__() returned NotImplemented.  The default
22870  __ne__() now works correctly.
22871
22872- bpo-19996: :class:`email.feedparser.FeedParser` now handles (malformed)
22873  headers with no key rather than assuming the body has started.
22874
22875- bpo-20188: Support Application-Layer Protocol Negotiation (ALPN) in the
22876  ssl module.
22877
22878- bpo-23133: Pickling of ipaddress objects now produces more compact and
22879  portable representation.
22880
22881- bpo-23248: Update ssl error codes from latest OpenSSL git master.
22882
22883- bpo-23266: Much faster implementation of ipaddress.collapse_addresses()
22884  when there are many non-consecutive addresses.
22885
22886- bpo-23098: 64-bit dev_t is now supported in the os module.
22887
22888- bpo-21817: When an exception is raised in a task submitted to a
22889  ProcessPoolExecutor, the remote traceback is now displayed in the parent
22890  process.  Patch by Claudiu Popa.
22891
22892- bpo-15955: Add an option to limit output size when decompressing LZMA
22893  data.  Patch by Nikolaus Rath and Martin Panter.
22894
22895- bpo-23250: In the http.cookies module, capitalize "HttpOnly" and "Secure"
22896  as they are written in the standard.
22897
22898- bpo-23063: In the distutils' check command, fix parsing of reST with code
22899  or code-block directives.
22900
22901- bpo-23209: selectors.BaseSelector.get_key() now raises a RuntimeError if
22902  the selector is closed. And selectors.BaseSelector.close() now clears its
22903  internal reference to the selector mapping to break a reference cycle.
22904  Initial patch written by Martin Richard. (See also: bpo-23225)
22905
22906- bpo-17911: Provide a way to seed the linecache for a PEP-302 module
22907  without actually loading the code.
22908
22909- bpo-17911: Provide a new object API for traceback, including the ability
22910  to not lookup lines at all until the traceback is actually rendered,
22911  without any trace of the original objects being kept alive.
22912
22913- bpo-19777: Provide a home() classmethod on Path objects.  Contributed by
22914  Victor Salgado and Mayank Tripathi.
22915
22916- bpo-23206: Make ``json.dumps(..., ensure_ascii=False)`` as fast as the
22917  default case of ``ensure_ascii=True``.  Patch by Naoki Inada.
22918
22919- bpo-23185: Add math.inf and math.nan constants.
22920
22921- bpo-23186: Add ssl.SSLObject.shared_ciphers() and
22922  ssl.SSLSocket.shared_ciphers() to fetch the client's list ciphers sent at
22923  handshake.
22924
22925- bpo-23143: Remove compatibility with OpenSSLs older than 0.9.8.
22926
22927- bpo-23132: Improve performance and introspection support of comparison
22928  methods created by functool.total_ordering.
22929
22930- bpo-19776: Add an expanduser() method on Path objects.
22931
22932- bpo-23112: Fix SimpleHTTPServer to correctly carry the query string and
22933  fragment when it redirects to add a trailing slash.
22934
22935- bpo-21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK,
22936  HTTPStatus.NOT_FOUND). Patch by Demian Brecht.
22937
22938- bpo-23093: In the io, module allow more operations to work on detached
22939  streams.
22940
22941- bpo-23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol
22942  version.
22943
22944- bpo-22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
22945  instead of reading /dev/urandom, to get pseudo-random bytes.
22946
22947- bpo-19104: pprint now produces evaluable output for wrapped strings.
22948
22949- bpo-23071: Added missing names to codecs.__all__.  Patch by Martin Panter.
22950
22951- bpo-22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
22952  opcode if possible.
22953
22954- bpo-15513: Added a __sizeof__ implementation for pickle classes.
22955
22956- bpo-19858: pickletools.optimize() now aware of the MEMOIZE opcode, can
22957  produce more compact result and no longer produces invalid output if input
22958  data contains MEMOIZE opcodes together with PUT or BINPUT opcodes.
22959
22960- bpo-22095: Fixed HTTPConnection.set_tunnel with default port.  The port
22961  value in the host header was set to "None".  Patch by Demian Brecht.
22962
22963- bpo-23016: A warning no longer produces an AttributeError when the program
22964  is run with pythonw.exe.
22965
22966- bpo-21775: shutil.copytree(): fix crash when copying to VFAT. An exception
22967  handler assumed that OSError objects always have a 'winerror' attribute.
22968  That is not the case, so the exception handler itself raised
22969  AttributeError when run on Linux (and, presumably, any other non-Windows
22970  OS). Patch by Greg Ward.
22971
22972- bpo-1218234: Fix inspect.getsource() to load updated source of reloaded
22973  module. Initial patch by Berker Peksag.
22974
22975- bpo-21740: Support wrapped callables in doctest. Patch by Claudiu Popa.
22976
22977- bpo-23009: Make sure selectors.EpollSelector.select() works when no FD is
22978  registered.
22979
22980- bpo-22959: In the constructor of http.client.HTTPSConnection, prefer the
22981  context's check_hostname attribute over the *check_hostname* parameter.
22982
22983- bpo-22696: Add function :func:`sys.is_finalizing` to know about
22984  interpreter shutdown.
22985
22986- bpo-16043: Add a default limit for the amount of data
22987  xmlrpclib.gzip_decode will return. This resolves CVE-2013-1753.
22988
22989- bpo-14099: ZipFile.open() no longer reopen the underlying file.  Objects
22990  returned by ZipFile.open() can now operate independently of the ZipFile
22991  even if the ZipFile was created by passing in a file-like object as the
22992  first argument to the constructor.
22993
22994- bpo-22966: Fix __pycache__ pyc file name clobber when pyc_compile is asked
22995  to compile a source file containing multiple dots in the source file name.
22996
22997- bpo-21971: Update turtledemo doc and add module to the index.
22998
22999- bpo-21032: Fixed socket leak if HTTPConnection.getresponse() fails.
23000  Original patch by Martin Panter.
23001
23002- bpo-22407: Deprecated the use of re.LOCALE flag with str patterns or
23003  re.ASCII. It was newer worked.
23004
23005- bpo-22902: The "ip" command is now used on Linux to determine MAC address
23006  in uuid.getnode().  Pach by Bruno Cauet.
23007
23008- bpo-22960: Add a context argument to xmlrpclib.ServerProxy constructor.
23009
23010- bpo-22389: Add contextlib.redirect_stderr().
23011
23012- bpo-21356: Make ssl.RAND_egd() optional to support LibreSSL. The
23013  availability of the function is checked during the compilation. Patch
23014  written by Bernard Spil.
23015
23016- bpo-22915: SAX parser now supports files opened with file descriptor or
23017  bytes path.
23018
23019- bpo-22609: Constructors and update methods of mapping classes in the
23020  collections module now accept the self keyword argument.
23021
23022- bpo-22940: Add readline.append_history_file.
23023
23024- bpo-19676: Added the "namereplace" error handler.
23025
23026- bpo-22788: Add *context* parameter to logging.handlers.HTTPHandler.
23027
23028- bpo-22921: Allow SSLContext to take the *hostname* parameter even if
23029  OpenSSL doesn't support SNI.
23030
23031- bpo-22894: TestCase.subTest() would cause the test suite to be stopped
23032  when in failfast mode, even in the absence of failures.
23033
23034- bpo-22796: HTTP cookie parsing is now stricter, in order to protect
23035  against potential injection attacks.
23036
23037- bpo-22370: Windows detection in pathlib is now more robust.
23038
23039- bpo-22841: Reject coroutines in asyncio add_signal_handler(). Patch by
23040  Ludovic.Gasc.
23041
23042- bpo-19494: Added urllib.request.HTTPBasicPriorAuthHandler. Patch by Matej
23043  Cepl.
23044
23045- bpo-22578: Added attributes to the re.error class.
23046
23047- bpo-22849: Fix possible double free in the io.TextIOWrapper constructor.
23048
23049- bpo-12728: Different Unicode characters having the same uppercase but
23050  different lowercase are now matched in case-insensitive regular
23051  expressions.
23052
23053- bpo-22821: Fixed fcntl() with integer argument on 64-bit big-endian
23054  platforms.
23055
23056- bpo-21650: Add an `--sort-keys` option to json.tool CLI.
23057
23058- bpo-22824: Updated reprlib output format for sets to use set literals.
23059  Patch contributed by Berker Peksag.
23060
23061- bpo-22824: Updated reprlib output format for arrays to display empty
23062  arrays without an unnecessary empty list.  Suggested by Serhiy Storchaka.
23063
23064- bpo-22406: Fixed the uu_codec codec incorrectly ported to 3.x. Based on
23065  patch by Martin Panter.
23066
23067- bpo-17293: uuid.getnode() now determines MAC address on AIX using netstat.
23068  Based on patch by Aivars Kalvāns.
23069
23070- bpo-22769: Fixed ttk.Treeview.tag_has() when called without arguments.
23071
23072- bpo-22417: Verify certificates by default in httplib (PEP 476).
23073
23074- bpo-22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
23075  and above. Patch by Tim Graham.
23076
23077- bpo-22776: Brought excluded code into the scope of a try block in
23078  SysLogHandler.emit().
23079
23080- bpo-22665: Add missing get_terminal_size and SameFileError to
23081  shutil.__all__.
23082
23083- bpo-6623: Remove deprecated Netrc class in the ftplib module. Patch by
23084  Matt Chaput.
23085
23086- bpo-17381: Fixed handling of case-insensitive ranges in regular
23087  expressions.
23088
23089- bpo-22410: Module level functions in the re module now cache compiled
23090  locale-dependent regular expressions taking into account the locale.
23091
23092- bpo-22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now
23093  return False when the underlying stat call raises NotADirectoryError.
23094
23095- bpo-8876: distutils now falls back to copying files when hard linking
23096  doesn't work. This allows use with special filesystems such as VirtualBox
23097  shared folders.
23098
23099- bpo-22217: Implemented reprs of classes in the zipfile module.
23100
23101- bpo-22457: Honour load_tests in the start_dir of discovery.
23102
23103- bpo-18216: gettext now raises an error when a .mo file has an unsupported
23104  major version number.  Patch by Aaron Hill.
23105
23106- bpo-13918: Provide a locale.delocalize() function which can remove
23107  locale-specific number formatting from a string representing a number,
23108  without then converting it to a specific type.  Patch by Cédric Krier.
23109
23110- bpo-22676: Make the pickling of global objects which don't have a
23111  __module__ attribute less slow.
23112
23113- bpo-18853: Fixed ResourceWarning in shlex.__nain__.
23114
23115- bpo-9351: Defaults set with set_defaults on an argparse subparser are no
23116  longer ignored when also set on the parent parser.
23117
23118- bpo-7559: unittest test loading ImportErrors are reported as import errors
23119  with their import exception rather than as attribute errors after the
23120  import has already failed.
23121
23122- bpo-19746: Make it possible to examine the errors from unittest discovery
23123  without executing the test suite. The new `errors` attribute on TestLoader
23124  exposes these non-fatal errors encountered during discovery.
23125
23126- bpo-21991: Make email.headerregistry's header 'params' attributes be
23127  read-only (MappingProxyType).  Previously the dictionary was modifiable
23128  but a new one was created on each access of the attribute.
23129
23130- bpo-22638: SSLv3 is now disabled throughout the standard library. It can
23131  still be enabled by instantiating a SSLContext manually.
23132
23133- bpo-22641: In asyncio, the default SSL context for client connections is
23134  now created using ssl.create_default_context(), for stronger security.
23135
23136- bpo-17401: Include closefd in io.FileIO repr.
23137
23138- bpo-21338: Add silent mode for compileall. quiet parameters of
23139  compile_{dir, file, path} functions now have a multilevel value. Also, -q
23140  option of the CLI now have a multilevel value. Patch by Thomas Kluyver.
23141
23142- bpo-20152: Convert the array and cmath modules to Argument Clinic.
23143
23144- bpo-18643: Add socket.socketpair() on Windows.
23145
23146- bpo-22435: Fix a file descriptor leak when socketserver bind fails.
23147
23148- bpo-13096: Fixed segfault in CTypes POINTER handling of large values.
23149
23150- bpo-11694: Raise ConversionError in xdrlib as documented.  Patch by Filip
23151  Gruszczyński and Claudiu Popa.
23152
23153- bpo-19380: Optimized parsing of regular expressions.
23154
23155- bpo-1519638: Now unmatched groups are replaced with empty strings in
23156  re.sub() and re.subn().
23157
23158- bpo-18615: sndhdr.what/whathdr now return a namedtuple.
23159
23160- bpo-22462: Fix pyexpat's creation of a dummy frame to make it appear in
23161  exception tracebacks.
23162
23163- bpo-21965: Add support for in-memory SSL to the ssl module.  Patch by
23164  Geert Jansen.
23165
23166- bpo-21173: Fix len() on a WeakKeyDictionary when .clear() was called with
23167  an iterator alive.
23168
23169- bpo-11866: Eliminated race condition in the computation of names for new
23170  threads.
23171
23172- bpo-21905: Avoid RuntimeError in pickle.whichmodule() when sys.modules is
23173  mutated while iterating.  Patch by Olivier Grisel.
23174
23175- bpo-11271: concurrent.futures.Executor.map() now takes a *chunksize*
23176  argument to allow batching of tasks in child processes and improve
23177  performance of ProcessPoolExecutor.  Patch by Dan O'Reilly.
23178
23179- bpo-21883: os.path.join() and os.path.relpath() now raise a TypeError with
23180  more helpful error message for unsupported or mismatched types of
23181  arguments.
23182
23183- bpo-22219: The zipfile module CLI now adds entries for directories
23184  (including empty directories) in ZIP file.
23185
23186- bpo-22449: In the ssl.SSLContext.load_default_certs, consult the
23187  environmental variables SSL_CERT_DIR and SSL_CERT_FILE on Windows.
23188
23189- bpo-22508: The email.__version__ variable has been removed; the email code
23190  is no longer shipped separately from the stdlib, and __version__ hasn't
23191  been updated in several releases.
23192
23193- bpo-20076: Added non derived UTF-8 aliases to locale aliases table.
23194
23195- bpo-20079: Added locales supported in glibc 2.18 to locale alias table.
23196
23197- bpo-20218: Added convenience methods read_text/write_text and read_bytes/
23198  write_bytes to pathlib.Path objects.
23199
23200- bpo-22396: On 32-bit AIX platform, don't expose os.posix_fadvise() nor
23201  os.posix_fallocate() because their prototypes in system headers are wrong.
23202
23203- bpo-22517: When an io.BufferedRWPair object is deallocated, clear its
23204  weakrefs.
23205
23206- bpo-22437: Number of capturing groups in regular expression is no longer
23207  limited by 100.
23208
23209- bpo-17442: InteractiveInterpreter now displays the full chained traceback
23210  in its showtraceback method, to match the built in interactive
23211  interpreter.
23212
23213- bpo-23392: Added tests for marshal C API that works with FILE*.
23214
23215- bpo-10510: distutils register and upload methods now use HTML standards
23216  compliant CRLF line endings.
23217
23218- bpo-9850: Fixed macpath.join() for empty first component.  Patch by Oleg
23219  Oshmyan.
23220
23221- bpo-5309: distutils' build and build_ext commands now accept a ``-j``
23222  option to enable parallel building of extension modules.
23223
23224- bpo-22448: Improve canceled timer handles cleanup to prevent unbound
23225  memory usage. Patch by Joshua Moore-Oliva.
23226
23227- bpo-22427: TemporaryDirectory no longer attempts to clean up twice when
23228  used in the with statement in generator.
23229
23230- bpo-22362: Forbidden ambiguous octal escapes out of range 0-0o377 in
23231  regular expressions.
23232
23233- bpo-20912: Now directories added to ZIP file have correct Unix and MS-DOS
23234  directory attributes.
23235
23236- bpo-21866: ZipFile.close() no longer writes ZIP64 central directory
23237  records if allowZip64 is false.
23238
23239- bpo-22278: Fix urljoin problem with relative urls, a regression observed
23240  after changes to issue22118 were submitted.
23241
23242- bpo-22415: Fixed debugging output of the GROUPREF_EXISTS opcode in the re
23243  module. Removed trailing spaces in debugging output.
23244
23245- bpo-22423: Unhandled exception in thread no longer causes unhandled
23246  AttributeError when sys.stderr is None.
23247
23248- bpo-21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line
23249  buffering, rather than block buffering.  Patch by Akira Li.
23250
23251- bpo-21091: Fix API bug: email.message.EmailMessage.is_attachment is now a
23252  method.
23253
23254- bpo-21079: Fix email.message.EmailMessage.is_attachment to return the
23255  correct result when the header has parameters as well as a value.
23256
23257- bpo-22247: Add NNTPError to nntplib.__all__.
23258
23259- bpo-22366: urllib.request.urlopen will accept a context object
23260  (SSLContext) as an argument which will then be used for HTTPS connection.
23261  Patch by Alex Gaynor.
23262
23263- bpo-4180: The warnings registries are now reset when the filters are
23264  modified.
23265
23266- bpo-22419: Limit the length of incoming HTTP request in wsgiref server to
23267  65536 bytes and send a 414 error code for higher lengths. Patch
23268  contributed by Devin Cook.
23269
23270- Lax cookie parsing in http.cookies could be a security issue when combined
23271  with non-standard cookie handling in some Web browsers.  Reported by
23272  Sergey Bobrov.
23273
23274- bpo-20537: logging methods now accept an exception instance as well as a
23275  Boolean value or exception tuple. Thanks to Yury Selivanov for the patch.
23276
23277- bpo-22384: An exception in Tkinter callback no longer crashes the program
23278  when it is run with pythonw.exe.
23279
23280- bpo-22168: Prevent turtle AttributeError with non-default Canvas on OS X.
23281
23282- bpo-21147: sqlite3 now raises an exception if the request contains a null
23283  character instead of truncating it.  Based on patch by Victor Stinner.
23284
23285- bpo-13968: The glob module now supports recursive search in subdirectories
23286  using the ``**`` pattern.
23287
23288- bpo-21951: Fixed a crash in Tkinter on AIX when called Tcl command with
23289  empty string or tuple argument.
23290
23291- bpo-21951: Tkinter now most likely raises MemoryError instead of crash if
23292  the memory allocation fails.
23293
23294- bpo-22338: Fix a crash in the json module on memory allocation failure.
23295
23296- bpo-12410: imaplib.IMAP4 now supports the context management protocol.
23297  Original patch by Tarek Ziadé.
23298
23299- bpo-21270: We now override tuple methods in mock.call objects so that they
23300  can be used as normal call attributes.
23301
23302- bpo-16662: load_tests() is now unconditionally run when it is present in a
23303  package's __init__.py.  TestLoader.loadTestsFromModule() still accepts
23304  use_load_tests, but it is deprecated and ignored.  A new keyword-only
23305  attribute `pattern` is added and documented.  Patch given by Robert
23306  Collins, tweaked by Barry Warsaw.
23307
23308- bpo-22226: First letter no longer is stripped from the "status" key in the
23309  result of Treeview.heading().
23310
23311- bpo-19524: Fixed resource leak in the HTTP connection when an invalid
23312  response is received.  Patch by Martin Panter.
23313
23314- bpo-20421: Add a .version() method to SSL sockets exposing the actual
23315  protocol version in use.
23316
23317- bpo-19546: configparser exceptions no longer expose implementation
23318  details. Chained KeyErrors are removed, which leads to cleaner tracebacks.
23319  Patch by Claudiu Popa.
23320
23321- bpo-22051: turtledemo no longer reloads examples to re-run them.
23322  Initialization of variables and gui setup should be done in main(), which
23323  is called each time a demo is run, but not on import.
23324
23325- bpo-21933: Turtledemo users can change the code font size with a menu
23326  selection or control(command) '-' or '+' or control-mousewheel. Original
23327  patch by Lita Cho.
23328
23329- bpo-21597: The separator between the turtledemo text pane and the drawing
23330  canvas can now be grabbed and dragged with a mouse.  The code text pane
23331  can be widened to easily view or copy the full width of the text.  The
23332  canvas can be widened on small screens.  Original patches by Jan Kanis and
23333  Lita Cho.
23334
23335- bpo-18132: Turtledemo buttons no longer disappear when the window is
23336  shrunk.  Original patches by Jan Kanis and Lita Cho.
23337
23338- bpo-22043: time.monotonic() is now always available.
23339  ``threading.Lock.acquire()``, ``threading.RLock.acquire()`` and socket
23340  operations now use a monotonic clock, instead of the system clock, when a
23341  timeout is used.
23342
23343- bpo-21527: Add a default number of workers to ThreadPoolExecutor equal to
23344  5 times the number of CPUs.  Patch by Claudiu Popa.
23345
23346- bpo-22216: smtplib now resets its state more completely after a quit.  The
23347  most obvious consequence of the previous behavior was a STARTTLS failure
23348  during a connect/starttls/quit/connect/starttls sequence.
23349
23350- bpo-22098: ctypes' BigEndianStructure and LittleEndianStructure now define
23351  an empty __slots__ so that subclasses don't always get an instance dict.
23352  Patch by Claudiu Popa.
23353
23354- bpo-22185: Fix an occasional RuntimeError in threading.Condition.wait()
23355  caused by mutation of the waiters queue without holding the lock.  Patch
23356  by Doug Zongker.
23357
23358- bpo-22287: On UNIX, _PyTime_gettimeofday() now uses
23359  clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now
23360  depends on the librt library on Solaris and on Linux (only with glibc
23361  older than 2.17).
23362
23363- bpo-22182: Use e.args to unpack exceptions correctly in
23364  distutils.file_util.move_file. Patch by Claudiu Popa.
23365
23366- The webbrowser module now uses subprocess's start_new_session=True rather
23367  than a potentially risky preexec_fn=os.setsid call.
23368
23369- bpo-22042: signal.set_wakeup_fd(fd) now raises an exception if the file
23370  descriptor is in blocking mode.
23371
23372- bpo-16808: inspect.stack() now returns a named tuple instead of a tuple.
23373  Patch by Daniel Shahaf.
23374
23375- bpo-22236: Fixed Tkinter images copying operations in NoDefaultRoot mode.
23376
23377- bpo-2527: Add a *globals* argument to timeit functions, in order to
23378  override the globals namespace in which the timed code is executed. Patch
23379  by Ben Roberts.
23380
23381- bpo-22118: Switch urllib.parse to use RFC 3986 semantics for the
23382  resolution of relative URLs, rather than RFCs 1808 and 2396. Patch by
23383  Demian Brecht.
23384
23385- bpo-21549: Added the "members" parameter to TarFile.list().
23386
23387- bpo-19628: Allow compileall recursion depth to be specified with a -r
23388  option.
23389
23390- bpo-15696: Add a __sizeof__ implementation for mmap objects on Windows.
23391
23392- bpo-22068: Avoided reference loops with Variables and Fonts in Tkinter.
23393
23394- bpo-22165: SimpleHTTPRequestHandler now supports undecodable file names.
23395
23396- bpo-15381: Optimized line reading in io.BytesIO.
23397
23398- bpo-8797: Raise HTTPError on failed Basic Authentication immediately.
23399  Initial patch by Sam Bull.
23400
23401- bpo-20729: Restored the use of lazy iterkeys()/itervalues()/iteritems() in
23402  the mailbox module.
23403
23404- bpo-21448: Changed FeedParser feed() to avoid O(N**2) behavior when
23405  parsing long line. Original patch by Raymond Hettinger.
23406
23407- bpo-22184: The functools LRU Cache decorator factory now gives an earlier
23408  and clearer error message when the user forgets the required parameters.
23409
23410- bpo-17923: glob() patterns ending with a slash no longer match non-dirs on
23411  AIX.  Based on patch by Delhallt.
23412
23413- bpo-21725: Added support for RFC 6531 (SMTPUTF8) in smtpd.
23414
23415- bpo-22176: Update the ctypes module's libffi to v3.1.  This release adds
23416  support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
23417  architectures.
23418
23419- bpo-5411: Added support for the "xztar" format in the shutil module.
23420
23421- bpo-21121: Don't force 3rd party C extensions to be built with
23422  -Werror=declaration-after-statement.
23423
23424- bpo-21975: Fixed crash when using uninitialized sqlite3.Row (in particular
23425  when unpickling pickled sqlite3.Row).  sqlite3.Row is now initialized in
23426  the __new__() method.
23427
23428- bpo-20170: Convert posixmodule to use Argument Clinic.
23429
23430- bpo-21539: Add an *exists_ok* argument to `Pathlib.mkdir()` to mimic
23431  `mkdir -p` and `os.makedirs()` functionality.  When true, ignore
23432  FileExistsErrors.  Patch by Berker Peksag.
23433
23434- bpo-22127: Bypass IDNA for pure-ASCII host names in the socket module (in
23435  particular for numeric IPs).
23436
23437- bpo-21047: set the default value for the *convert_charrefs* argument of
23438  HTMLParser to True.  Patch by Berker Peksag.
23439
23440- Add an __all__ to html.entities.
23441
23442- bpo-15114: the strict mode and argument of HTMLParser, HTMLParser.error,
23443  and the HTMLParserError exception have been removed.
23444
23445- bpo-22085: Dropped support of Tk 8.3 in Tkinter.
23446
23447- bpo-21580: Now Tkinter correctly handles bytes arguments passed to Tk. In
23448  particular this allows initializing images from binary data.
23449
23450- bpo-22003: When initialized from a bytes object, io.BytesIO() now defers
23451  making a copy until it is mutated, improving performance and memory use on
23452  some use cases. Patch by David Wilson.
23453
23454- bpo-22018: On Windows, signal.set_wakeup_fd() now also supports sockets. A
23455  side effect is that Python depends to the WinSock library.
23456
23457- bpo-22054: Add os.get_blocking() and os.set_blocking() functions to get
23458  and set the blocking mode of a file descriptor (False if the O_NONBLOCK
23459  flag is set, True otherwise). These functions are not available on
23460  Windows.
23461
23462- bpo-17172: Make turtledemo start as active on OS X even when run with
23463  subprocess. Patch by Lita Cho.
23464
23465- bpo-21704: Fix build error for _multiprocessing when semaphores are not
23466  available. Patch by Arfrever Frehtes Taifersar Arahesis.
23467
23468- bpo-20173: Convert sha1, sha256, sha512 and md5 to ArgumentClinic. Patch
23469  by Vajrasky Kok.
23470
23471- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
23472  on closed socket. repr(socket.socket) already works fine.
23473
23474- bpo-22033: Reprs of most Python implemented classes now contain actual
23475  class name instead of hardcoded one.
23476
23477- bpo-21947: The dis module can now disassemble generator-iterator objects
23478  based on their gi_code attribute. Patch by Clement Rouault.
23479
23480- bpo-16133: The asynchat.async_chat.handle_read() method now ignores
23481  BlockingIOError exceptions.
23482
23483- bpo-22044: Fixed premature DECREF in call_tzinfo_method. Patch by Tom
23484  Flanagan.
23485
23486- bpo-19884: readline: Disable the meta modifier key if stdout is not a
23487  terminal to not write the ANSI sequence ``"\033[1034h"`` into stdout. This
23488  sequence is used on some terminal (ex: TERM=xterm-256color") to enable
23489  support of 8 bit characters.
23490
23491- bpo-4350: Removed a number of out-of-dated and non-working for a long time
23492  Tkinter methods.
23493
23494- bpo-6167: Scrollbar.activate() now returns the name of active element if
23495  the argument is not specified.  Scrollbar.set() now always accepts only 2
23496  arguments.
23497
23498- bpo-15275: Clean up and speed up the ntpath module.
23499
23500- bpo-21888: plistlib's load() and loads() now work if the fmt parameter is
23501  specified.
23502
23503- bpo-22032: __qualname__ instead of __name__ is now always used to format
23504  fully qualified class names of Python implemented classes.
23505
23506- bpo-22031: Reprs now always use hexadecimal format with the "0x" prefix
23507  when contain an id in form " at 0x...".
23508
23509- bpo-22018: signal.set_wakeup_fd() now raises an OSError instead of a
23510  ValueError on ``fstat()`` failure.
23511
23512- bpo-21044: tarfile.open() now handles fileobj with an integer 'name'
23513  attribute.  Based on patch by Antoine Pietri.
23514
23515- bpo-21966: Respect -q command-line option when code module is ran.
23516
23517- bpo-19076: Don't pass the redundant 'file' argument to self.error().
23518
23519- bpo-16382: Improve exception message of warnings.warn() for bad category.
23520  Initial patch by Phil Elson.
23521
23522- bpo-21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of
23523  :c:type:`int` for the size to support reading more than 2 GB at once. On
23524  Windows, the size is truncated to INT_MAX. As any call to os.read(), the
23525  OS may read less bytes than the number of requested bytes.
23526
23527- bpo-21942: Fixed source file viewing in pydoc's server mode on Windows.
23528
23529- bpo-11259: asynchat.async_chat().set_terminator() now raises a ValueError
23530  if the number of received bytes is negative.
23531
23532- bpo-12523: asynchat.async_chat.push() now raises a TypeError if it doesn't
23533  get a bytes string
23534
23535- bpo-21707: Add missing kwonlyargcount argument to
23536  ModuleFinder.replace_paths_in_code().
23537
23538- bpo-20639: calling Path.with_suffix('') allows removing the suffix again.
23539  Patch by July Tikhonov.
23540
23541- bpo-21714: Disallow the construction of invalid paths using
23542  Path.with_name().  Original patch by Antony Lee.
23543
23544- bpo-15014: Added 'auth' method to smtplib to make implementing auth
23545  mechanisms simpler, and used it internally in the login method.
23546
23547- bpo-21151: Fixed a segfault in the winreg module when ``None`` is passed
23548  as a ``REG_BINARY`` value to SetValueEx.  Patch by John Ehresman.
23549
23550- bpo-21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
23551  it ignored I/O errors if at least the first C call read() succeed.
23552
23553- bpo-5800: headers parameter of wsgiref.headers.Headers is now optional.
23554  Initial patch by Pablo Torres Navarrete and SilentGhost.
23555
23556- bpo-21781: ssl.RAND_add() now supports strings longer than 2 GB.
23557
23558- bpo-21679: Prevent extraneous fstat() calls during open().  Patch by
23559  Bohuslav Kabrda.
23560
23561- bpo-21863: cProfile now displays the module name of C extension functions,
23562  in addition to their own name.
23563
23564- bpo-11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper
23565  object is destroyed. The destructor now closes the file if needed. The
23566  close() method can now be called twice: the second call does nothing.
23567
23568- bpo-21858: Better handling of Python exceptions in the sqlite3 module.
23569
23570- bpo-21476: Make sure the email.parser.BytesParser TextIOWrapper is
23571  discarded after parsing, so the input file isn't unexpectedly closed.
23572
23573- bpo-20295: imghdr now recognizes OpenEXR format images.
23574
23575- bpo-21729: Used the "with" statement in the dbm.dumb module to ensure
23576  files closing. Patch by Claudiu Popa.
23577
23578- bpo-21491: socketserver: Fix a race condition in child processes reaping.
23579
23580- bpo-21719: Added the ``st_file_attributes`` field to os.stat_result on
23581  Windows.
23582
23583- bpo-21832: Require named tuple inputs to be exact strings.
23584
23585- bpo-21722: The distutils "upload" command now exits with a non-zero return
23586  code when uploading fails.  Patch by Martin Dengler.
23587
23588- bpo-21723: asyncio.Queue: support any type of number (ex: float) for the
23589  maximum size. Patch written by Vajrasky Kok.
23590
23591- bpo-21711: support for "site-python" directories has now been removed from
23592  the site module (it was deprecated in 3.4).
23593
23594- bpo-17552: new socket.sendfile() method allowing a file to be sent over a
23595  socket by using high-performance os.sendfile() on UNIX. Patch by Giampaolo
23596  Rodola'.
23597
23598- bpo-18039: dbm.dump.open() now always creates a new database when the flag
23599  has the value 'n'.  Patch by Claudiu Popa.
23600
23601- bpo-21326: Add a new is_closed() method to asyncio.BaseEventLoop.
23602  run_forever() and run_until_complete() methods of asyncio.BaseEventLoop
23603  now raise an exception if the event loop was closed.
23604
23605- bpo-21766: Prevent a security hole in CGIHTTPServer by URL unquoting paths
23606  before checking for a CGI script at that path.
23607
23608- bpo-21310: Fixed possible resource leak in failed open().
23609
23610- bpo-21256: Printout of keyword args should be in deterministic order in a
23611  mock function call. This will help to write better doctests.
23612
23613- bpo-21677: Fixed chaining nonnormalized exceptions in io close() methods.
23614
23615- bpo-11709: Fix the pydoc.help function to not fail when sys.stdin is not a
23616  valid file.
23617
23618- bpo-21515: tempfile.TemporaryFile now uses os.O_TMPFILE flag is available.
23619
23620- bpo-13223: Fix pydoc.writedoc so that the HTML documentation for methods
23621  that use 'self' in the example code is generated correctly.
23622
23623- bpo-21463: In urllib.request, fix pruning of the FTP cache.
23624
23625- bpo-21618: The subprocess module could fail to close open fds that were
23626  inherited by the calling process and already higher than POSIX resource
23627  limits would otherwise allow.  On systems with a functioning /proc/self/fd
23628  or /dev/fd interface the max is now ignored and all fds are closed.
23629
23630- bpo-20383: Introduce importlib.util.module_from_spec() as the preferred
23631  way to create a new module.
23632
23633- bpo-21552: Fixed possible integer overflow of too long string lengths in
23634  the tkinter module on 64-bit platforms.
23635
23636- bpo-14315: The zipfile module now ignores extra fields in the central
23637  directory that are too short to be parsed instead of letting a
23638  struct.unpack error bubble up as this "bad data" appears in many real
23639  world zip files in the wild and is ignored by other zip tools.
23640
23641- bpo-13742: Added "key" and "reverse" parameters to heapq.merge(). (First
23642  draft of patch contributed by Simon Sapin.)
23643
23644- bpo-21402: tkinter.ttk now works when default root window is not set.
23645
23646- bpo-3015: _tkinter.create() now creates tkapp object with wantobject=1 by
23647  default.
23648
23649- bpo-10203: sqlite3.Row now truly supports sequence protocol.  In
23650  particular it supports reverse() and negative indices.  Original patch by
23651  Claudiu Popa.
23652
23653- bpo-18807: If copying (no symlinks) specified for a venv, then the python
23654  interpreter aliases (python, python3) are now created by copying rather
23655  than symlinking.
23656
23657- bpo-20197: Added support for the WebP image type in the imghdr module.
23658  Patch by Fabrice Aneche and Claudiu Popa.
23659
23660- bpo-21513: Speedup some properties of IP addresses (IPv4Address,
23661  IPv6Address) such as .is_private or .is_multicast.
23662
23663- bpo-21137: Improve the repr for threading.Lock() and its variants by
23664  showing the "locked" or "unlocked" status.  Patch by Berker Peksag.
23665
23666- bpo-21538: The plistlib module now supports loading of binary plist files
23667  when reference or offset size is not a power of two.
23668
23669- bpo-21455: Add a default backlog to socket.listen().
23670
23671- bpo-21525: Most Tkinter methods which accepted tuples now accept lists
23672  too.
23673
23674- bpo-22166: With the assistance of a new internal _codecs._forget_codec
23675  helping function, test_codecs now clears the encoding caches to avoid the
23676  appearance of a reference leak
23677
23678- bpo-22236: Tkinter tests now don't reuse default root window.  New root
23679  window is created for every test class.
23680
23681- bpo-10744: Fix :pep:`3118` format strings on ctypes objects with a
23682  nontrivial shape.
23683
23684- bpo-20826: Optimize ipaddress.collapse_addresses().
23685
23686- bpo-21487: Optimize ipaddress.summarize_address_range() and
23687  ipaddress.{IPv4Network,IPv6Network}.subnets().
23688
23689- bpo-21486: Optimize parsing of netmasks in ipaddress.IPv4Network and
23690  ipaddress.IPv6Network.
23691
23692- bpo-13916: Disallowed the surrogatepass error handler for non UTF-\*
23693  encodings.
23694
23695- bpo-20998: Fixed re.fullmatch() of repeated single character pattern with
23696  ignore case. Original patch by Matthew Barnett.
23697
23698- bpo-21075: fileinput.FileInput now reads bytes from standard stream if
23699  binary mode is specified.  Patch by Sam Kimbrel.
23700
23701- bpo-19775: Add a samefile() method to pathlib Path objects.  Initial patch
23702  by Vajrasky Kok.
23703
23704- bpo-21226: Set up modules properly in PyImport_ExecCodeModuleObject (and
23705  friends).
23706
23707- bpo-21398: Fix a unicode error in the pydoc pager when the documentation
23708  contains characters not encodable to the stdout encoding.
23709
23710- bpo-16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept an
23711  (address, netmask) tuple argument, so as to easily construct network
23712  objects from existing addresses.
23713
23714- bpo-21156: importlib.abc.InspectLoader.source_to_code() is now a
23715  staticmethod.
23716
23717- bpo-21424: Simplified and optimized heaqp.nlargest() and nmsmallest() to
23718  make fewer tuple comparisons.
23719
23720- bpo-21396: Fix TextIOWrapper(..., write_through=True) to not force a
23721  flush() on the underlying binary stream.  Patch by akira.
23722
23723- bpo-18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman
23724
23725- bpo-21088: Bugfix for curses.window.addch() regression in 3.4.0. In
23726  porting to Argument Clinic, the first two arguments were reversed.
23727
23728- bpo-21407: _decimal: The module now supports function signatures.
23729
23730- bpo-10650: Remove the non-standard 'watchexp' parameter from the
23731  Decimal.quantize() method in the Python version.  It had never been
23732  present in the C version.
23733
23734- bpo-21469: Reduced the risk of false positives in robotparser by checking
23735  to make sure that robots.txt has been read or does not exist prior to
23736  returning True in can_fetch().
23737
23738- bpo-19414: Have the OrderedDict mark deleted links as unusable. This gives
23739  an early failure if the link is deleted during iteration.
23740
23741- bpo-21421: Add __slots__ to the MappingViews ABC. Patch by Josh Rosenberg.
23742
23743- bpo-21101: Eliminate double hashing in the C speed-up code for
23744  collections.Counter().
23745
23746- bpo-21321: itertools.islice() now releases the reference to the source
23747  iterator when the slice is exhausted.  Patch by Anton Afanasyev.
23748
23749- bpo-21057: TextIOWrapper now allows the underlying binary stream's read()
23750  or read1() method to return an arbitrary bytes-like object (such as a
23751  memoryview). Patch by Nikolaus Rath.
23752
23753- bpo-20951: SSLSocket.send() now raises either SSLWantReadError or
23754  SSLWantWriteError on a non-blocking socket if the operation would block.
23755  Previously, it would return 0.  Patch by Nikolaus Rath.
23756
23757- bpo-13248: removed previously deprecated asyncore.dispatcher __getattr__
23758  cheap inheritance hack.
23759
23760- bpo-9815: assertRaises now tries to clear references to local variables in
23761  the exception's traceback.
23762
23763- bpo-19940: ssl.cert_time_to_seconds() now interprets the given time string
23764  in the UTC timezone (as specified in RFC 5280), not the local timezone.
23765
23766- bpo-13204: Calling sys.flags.__new__ would crash the interpreter, now it
23767  raises a TypeError.
23768
23769- bpo-19385: Make operations on a closed dbm.dumb database always raise the
23770  same exception.
23771
23772- bpo-21207: Detect when the os.urandom cached fd has been closed or
23773  replaced, and open it anew.
23774
23775- bpo-21291: subprocess's Popen.wait() is now thread safe so that multiple
23776  threads may be calling wait() or poll() on a Popen instance at the same
23777  time without losing the Popen.returncode value.
23778
23779- bpo-21127: Path objects can now be instantiated from str subclass
23780  instances (such as ``numpy.str_``).
23781
23782- bpo-15002: urllib.response object to use _TemporaryFileWrapper (and
23783  _TemporaryFileCloser) facility. Provides a better way to handle file
23784  descriptor close. Patch contributed by Christian Theune.
23785
23786- bpo-12220: mindom now raises a custom ValueError indicating it doesn't
23787  support spaces in URIs instead of letting a 'split' ValueError bubble up.
23788
23789- bpo-21068: The ssl.PROTOCOL* constants are now enum members.
23790
23791- bpo-21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
23792
23793- bpo-21262: New method assert_not_called for Mock. It raises AssertionError
23794  if the mock has been called.
23795
23796- bpo-21238: New keyword argument `unsafe` to Mock. It raises
23797  `AttributeError` incase of an attribute startswith assert or assret.
23798
23799- bpo-20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not
23800  PROTOCOL_SSLv3, for maximum compatibility.
23801
23802- bpo-21239: patch.stopall() didn't work deterministically when the same
23803  name was patched more than once.
23804
23805- bpo-21203: Updated fileConfig and dictConfig to remove inconsistencies.
23806  Thanks to Jure Koren for the patch.
23807
23808- bpo-21222: Passing name keyword argument to mock.create_autospec now
23809  works.
23810
23811- bpo-21197: Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX.
23812
23813- bpo-17498: Some SMTP servers disconnect after certain errors, violating
23814  strict RFC conformance.  Instead of losing the error code when we issue
23815  the subsequent RSET, smtplib now returns the error code and defers raising
23816  the SMTPServerDisconnected error until the next command is issued.
23817
23818- bpo-17826: setting an iterable side_effect on a mock function created by
23819  create_autospec now works. Patch by Kushal Das.
23820
23821- bpo-7776: Fix ``Host:`` header and reconnection when using
23822  http.client.HTTPConnection.set_tunnel(). Patch by Nikolaus Rath.
23823
23824- bpo-20968: unittest.mock.MagicMock now supports division. Patch by
23825  Johannes Baiter.
23826
23827- bpo-21529: Fix arbitrary memory access in JSONDecoder.raw_decode with a
23828  negative second parameter. Bug reported by Guido Vranken. (See also:
23829  CVE-2014-4616)
23830
23831- bpo-21169: getpass now handles non-ascii characters that the input stream
23832  encoding cannot encode by re-encoding using the replace error handler.
23833
23834- bpo-21171: Fixed undocumented filter API of the rot13 codec. Patch by
23835  Berker Peksag.
23836
23837- bpo-20539: Improved math.factorial error message for large positive inputs
23838  and changed exception type (OverflowError -> ValueError) for large
23839  negative inputs.
23840
23841- bpo-21172: isinstance check relaxed from dict to collections.Mapping.
23842
23843- bpo-21155: asyncio.EventLoop.create_unix_server() now raises a ValueError
23844  if path and sock are specified at the same time.
23845
23846- bpo-21136: Avoid unnecessary normalization of Fractions resulting from
23847  power and other operations.  Patch by Raymond Hettinger.
23848
23849- bpo-17621: Introduce importlib.util.LazyLoader.
23850
23851- bpo-21076: signal module constants were turned into enums. Patch by
23852  Giampaolo Rodola'.
23853
23854- bpo-20636: Improved the repr of Tkinter widgets.
23855
23856- bpo-19505: The items, keys, and values views of OrderedDict now support
23857  reverse iteration using reversed().
23858
23859- bpo-21149: Improved thread-safety in logging cleanup during interpreter
23860  shutdown. Thanks to Devin Jeanpierre for the patch.
23861
23862- bpo-21058: Fix a leak of file descriptor in
23863  :func:`tempfile.NamedTemporaryFile`, close the file descriptor if
23864  :func:`io.open` fails
23865
23866- bpo-21200: Return None from pkgutil.get_loader() when __spec__ is missing.
23867
23868- bpo-21013: Enhance ssl.create_default_context() when used for server side
23869  sockets to provide better security by default.
23870
23871- bpo-20145: `assertRaisesRegex` and `assertWarnsRegex` now raise a
23872  TypeError if the second argument is not a string or compiled regex.
23873
23874- bpo-20633: Replace relative import by absolute import.
23875
23876- bpo-20980: Stop wrapping exception when using ThreadPool.
23877
23878- bpo-21082: In os.makedirs, do not set the process-wide umask. Note this
23879  changes behavior of makedirs when exist_ok=True.
23880
23881- bpo-20990: Fix issues found by pyflakes for multiprocessing.
23882
23883- bpo-21015: SSL contexts will now automatically select an elliptic curve
23884  for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to
23885  "prime256v1".
23886
23887- bpo-21000: Improve the command-line interface of json.tool.
23888
23889- bpo-20995: Enhance default ciphers used by the ssl module to enable better
23890  security and prioritize perfect forward secrecy.
23891
23892- bpo-20884: Don't assume that __file__ is defined on importlib.__init__.
23893
23894- bpo-21499: Ignore __builtins__ in several test_importlib.test_api tests.
23895
23896- bpo-20627: xmlrpc.client.ServerProxy is now a context manager.
23897
23898- bpo-19165: The formatter module now raises DeprecationWarning instead of
23899  PendingDeprecationWarning.
23900
23901- bpo-13936: Remove the ability of datetime.time instances to be considered
23902  false in boolean contexts.
23903
23904- bpo-18931: selectors module now supports /dev/poll on Solaris. Patch by
23905  Giampaolo Rodola'.
23906
23907- bpo-19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
23908  :py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the
23909  ``surrogateescape`` error handler, instead of the ``strict`` error
23910  handler.
23911
23912- bpo-20574: Implement incremental decoder for cp65001 code (Windows code
23913  page 65001, Microsoft UTF-8).
23914
23915- bpo-20879: Delay the initialization of encoding and decoding tables for
23916  base32, ascii85 and base85 codecs in the base64 module, and delay the
23917  initialization of the unquote_to_bytes() table of the urllib.parse module,
23918  to not waste memory if these modules are not used.
23919
23920- bpo-19157: Include the broadcast address in the usuable hosts for IPv6 in
23921  ipaddress.
23922
23923- bpo-11599: When an external command (e.g. compiler) fails, distutils now
23924  prints out the whole command line (instead of just the command name) if
23925  the environment variable DISTUTILS_DEBUG is set.
23926
23927- bpo-4931: distutils should not produce unhelpful "error: None" messages
23928  anymore. distutils.util.grok_environment_error is kept but doc-deprecated.
23929
23930- bpo-20875: Prevent possible gzip "'read' is not defined" NameError. Patch
23931  by Claudiu Popa.
23932
23933- bpo-11558: ``email.message.Message.attach`` now returns a more useful
23934  error message if ``attach`` is called on a message for which
23935  ``is_multipart`` is False.
23936
23937- bpo-20283: RE pattern methods now accept the string keyword parameters as
23938  documented. The pattern and source keyword parameters are left as
23939  deprecated aliases.
23940
23941- bpo-20778: Fix modulefinder to work with bytecode-only modules.
23942
23943- bpo-20791: copy.copy() now doesn't make a copy when the input is a bytes
23944  object. Initial patch by Peter Otten.
23945
23946- bpo-19748: On AIX, time.mktime() now raises an OverflowError for year
23947  outsize range [1902; 2037].
23948
23949- bpo-19573: inspect.signature: Use enum for parameter kind constants.
23950
23951- bpo-20726: inspect.signature: Make Signature and Parameter picklable.
23952
23953- bpo-17373: Add inspect.Signature.from_callable method.
23954
23955- bpo-20378: Improve repr of inspect.Signature and inspect.Parameter.
23956
23957- bpo-20816: Fix inspect.getcallargs() to raise correct TypeError for
23958  missing keyword-only arguments. Patch by Jeremiah Lowin.
23959
23960- bpo-20817: Fix inspect.getcallargs() to fail correctly if more than 3
23961  arguments are missing. Patch by Jeremiah Lowin.
23962
23963- bpo-6676: Ensure a meaningful exception is raised when attempting to parse
23964  more than one XML document per pyexpat xmlparser instance. (Original
23965  patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with suggested
23966  wording by David Gutteridge)
23967
23968- bpo-21117: Fix inspect.signature to better support functools.partial. Due
23969  to the specifics of functools.partial implementation,
23970  positional-or-keyword arguments passed as keyword arguments become
23971  keyword-only.
23972
23973- bpo-20334: inspect.Signature and inspect.Parameter are now hashable.
23974  Thanks to Antony Lee for bug reports and suggestions.
23975
23976- bpo-15916: doctest.DocTestSuite returns an empty unittest.TestSuite
23977  instead of raising ValueError if it finds no tests
23978
23979- bpo-21209: Fix asyncio.tasks.CoroWrapper to workaround a bug in yield-from
23980  implementation in CPythons prior to 3.4.1.
23981
23982- asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream
23983  issue #163).
23984
23985- bpo-21311: Avoid exception in _osx_support with non-standard compiler
23986  configurations. Patch by John Szakmeister.
23987
23988- bpo-11571: Ensure that the turtle window becomes the topmost window when
23989  launched on OS X.
23990
23991- bpo-21801: Validate that __signature__ is None or an instance of
23992  Signature.
23993
23994- bpo-21923: Prevent AttributeError in
23995  distutils.sysconfig.customize_compiler due to possible uninitialized
23996  _config_vars.
23997
23998- bpo-21323: Fix http.server to again handle scripts in CGI subdirectories,
23999  broken by the fix for security issue #19435.  Patch by Zach Byrne.
24000
24001- bpo-22733: Fix ffi_prep_args not zero-extending argument values correctly
24002  on 64-bit Windows.
24003
24004- bpo-23302: Default to TCP_NODELAY=1 upon establishing an HTTPConnection.
24005  Removed use of hard-coded MSS as it's an optimization that's no longer
24006  needed with Nagle disabled.
24007
24008IDLE
24009----
24010
24011- bpo-20577: Configuration of the max line length for the FormatParagraph
24012  extension has been moved from the General tab of the Idle preferences
24013  dialog to the FormatParagraph tab of the Config Extensions dialog. Patch
24014  by Tal Einat.
24015
24016- bpo-16893: Update Idle doc chapter to match current Idle and add new
24017  information.
24018
24019- bpo-3068: Add Idle extension configuration dialog to Options menu. Changes
24020  are written to HOME/.idlerc/config-extensions.cfg. Original patch by Tal
24021  Einat.
24022
24023- bpo-16233: A module browser (File : Class Browser, Alt+C) requires an
24024  editor window with a filename.  When Class Browser is requested otherwise,
24025  from a shell, output window, or 'Untitled' editor, Idle no longer displays
24026  an error box. It now pops up an Open Module box (Alt+M). If a valid name
24027  is entered and a module is opened, a corresponding browser is also opened.
24028
24029- bpo-4832: Save As to type Python files automatically adds .py to the name
24030  you enter (even if your system does not display it).  Some systems
24031  automatically add .txt when type is Text files.
24032
24033- bpo-21986: Code objects are not normally pickled by the pickle module. To
24034  match this, they are no longer pickled when running under Idle.
24035
24036- bpo-17390: Adjust Editor window title; remove 'Python', move version to
24037  end.
24038
24039- bpo-14105: Idle debugger breakpoints no longer disappear when inserting or
24040  deleting lines.
24041
24042- bpo-17172: Turtledemo can now be run from Idle. Currently, the entry is on
24043  the Help menu, but it may move to Run. Patch by Ramchandra Apt and Lita
24044  Cho.
24045
24046- bpo-21765: Add support for non-ascii identifiers to HyperParser.
24047
24048- bpo-21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
24049  Heblikar.
24050
24051- bpo-18592: Add unittest for SearchDialogBase. Patch by Phil Webster.
24052
24053- bpo-21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar.
24054
24055- bpo-21686: add unittest for HyperParser. Original patch by Saimadhav
24056  Heblikar.
24057
24058- bpo-12387: Add missing upper(lower)case versions of default Windows key
24059  bindings for Idle so Caps Lock does not disable them. Patch by Roger
24060  Serwy.
24061
24062- bpo-21695: Closing a Find-in-files output window while the search is still
24063  in progress no longer closes Idle.
24064
24065- bpo-18910: Add unittest for textView. Patch by Phil Webster.
24066
24067- bpo-18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar.
24068
24069- bpo-18409: Add unittest for AutoComplete. Patch by Phil Webster.
24070
24071- bpo-21477: htest.py - Improve framework, complete set of tests. Patches by
24072  Saimadhav Heblikar
24073
24074- bpo-18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
24075  consolidating and improving human-validated tests of Idle. Change other
24076  files as needed to work with htest.  Running the module as __main__ runs
24077  all tests.
24078
24079- bpo-21139: Change default paragraph width to 72, the :pep:`8`
24080  recommendation.
24081
24082- bpo-21284: Paragraph reformat test passes after user changes reformat
24083  width.
24084
24085- bpo-17654: Ensure IDLE menus are customized properly on OS X for
24086  non-framework builds and for all variants of Tk.
24087
24088- bpo-23180: Rename IDLE "Windows" menu item to "Window". Patch by Al
24089  Sweigart.
24090
24091Build
24092-----
24093
24094- bpo-15506: Use standard PKG_PROG_PKG_CONFIG autoconf macro in the
24095  configure script.
24096
24097- bpo-22935: Allow the ssl module to be compiled if openssl doesn't support
24098  SSL 3.
24099
24100- bpo-22592: Drop support of the Borland C compiler to build Python. The
24101  distutils module still supports it to build extensions.
24102
24103- bpo-22591: Drop support of MS-DOS, especially of the DJGPP compiler
24104  (MS-DOS port of GCC).
24105
24106- bpo-16537: Check whether self.extensions is empty in setup.py. Patch by
24107  Jonathan Hosmer.
24108
24109- bpo-22359: Remove incorrect uses of recursive make.  Patch by Jonas
24110  Wagner.
24111
24112- bpo-21958: Define HAVE_ROUND when building with Visual Studio 2013 and
24113  above.  Patch by Zachary Turner.
24114
24115- bpo-18093: the programs that embed the CPython runtime are now in a
24116  separate "Programs" directory, rather than being kept in the Modules
24117  directory.
24118
24119- bpo-15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
24120  now display special message when and only when there are failures.
24121
24122- bpo-21141: The Windows build process no longer attempts to find Perl,
24123  instead relying on OpenSSL source being configured and ready to build.
24124  The ``PCbuild\build_ssl.py`` script has been re-written and re-named to
24125  ``PCbuild\prepare_ssl.py``, and takes care of configuring OpenSSL source
24126  for both 32 and 64 bit platforms.  OpenSSL sources obtained from
24127  svn.python.org will always be pre-configured and ready to build.
24128
24129- bpo-21037: Add a build option to enable AddressSanitizer support.
24130
24131- bpo-19962: The Windows build process now creates "python.bat" in the root
24132  of the source tree, which passes all arguments through to the most
24133  recently built interpreter.
24134
24135- bpo-21285: Refactor and fix curses configure check to always search in a
24136  ncursesw directory.
24137
24138- bpo-15234: For BerkelyDB and Sqlite, only add the found library and
24139  include directories if they aren't already being searched. This avoids an
24140  explicit runtime library dependency.
24141
24142- bpo-17861: Tools/scripts/generate_opcode_h.py automatically regenerates
24143  Include/opcode.h from Lib/opcode.py if the latter gets any change.
24144
24145- bpo-20644: OS X installer build support for documentation build changes in
24146  3.4.1: assume externally supplied sphinx-build is available in /usr/bin.
24147
24148- bpo-20022: Eliminate use of deprecated bundlebuilder in OS X builds.
24149
24150- bpo-15968: Incorporated Tcl, Tk, and Tix builds into the Windows build
24151  solution.
24152
24153- bpo-17095: Fix Modules/Setup *shared* support.
24154
24155- bpo-21811: Anticipated fixes to support OS X versions > 10.9.
24156
24157- bpo-21166: Prevent possible segfaults and other random failures of python
24158  --generate-posix-vars in pybuilddir.txt build target.
24159
24160- bpo-18096: Fix library order returned by python-config.
24161
24162- bpo-17219: Add library build dir for Python extension cross-builds.
24163
24164- bpo-22919: Windows build updated to support VC 14.0 (Visual Studio 2015),
24165  which will be used for the official release.
24166
24167- bpo-21236: Build _msi.pyd with cabinet.lib instead of fci.lib
24168
24169- bpo-17128: Use private version of OpenSSL for OS X 10.5+ installer.
24170
24171C API
24172-----
24173
24174- bpo-14203: Remove obsolete support for view==NULL in PyBuffer_FillInfo(),
24175  bytearray_getbuffer(), bytesiobuf_getbuffer() and array_buffer_getbuf().
24176  All functions now raise BufferError in that case.
24177
24178- bpo-22445: PyBuffer_IsContiguous() now implements precise contiguity
24179  tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation
24180  flag.  Previously the function reported false negatives for corner cases.
24181
24182- bpo-22079: PyType_Ready() now checks that statically allocated type has no
24183  dynamically allocated bases.
24184
24185- bpo-22453: Removed non-documented macro PyObject_REPR().
24186
24187- bpo-18395: Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`,
24188  rename ``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document
24189  these functions.
24190
24191- bpo-21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),
24192  PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) is now using
24193  ``calloc()`` instead of ``malloc()`` for large objects which is faster and
24194  use less memory.
24195
24196- bpo-20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to
24197  match what importlib does; this affects _frozen_importlib as well as any
24198  module loaded using imp.init_frozen().
24199
24200Documentation
24201-------------
24202
24203- bpo-19548: Update the codecs module documentation to better cover the
24204  distinction between text encodings and other codecs, together with other
24205  clarifications. Patch by Martin Panter.
24206
24207- bpo-22394: Doc/Makefile now supports ``make venv PYTHON=../python`` to
24208  create a venv for generating the documentation, e.g., ``make html
24209  PYTHON=venv/bin/python3``.
24210
24211- bpo-21514: The documentation of the json module now refers to new JSON RFC
24212  7159 instead of obsoleted RFC 4627.
24213
24214- bpo-21777: The binary sequence methods on bytes and bytearray are now
24215  documented explicitly, rather than assuming users will be able to derive
24216  the expected behaviour from the behaviour of the corresponding str
24217  methods.
24218
24219- bpo-6916: undocument deprecated asynchat.fifo class.
24220
24221- bpo-17386: Expanded functionality of the ``Doc/make.bat`` script to make
24222  it much more comparable to ``Doc/Makefile``.
24223
24224- bpo-21312: Update the thread_foobar.h template file to include newer
24225  threading APIs. Patch by Jack McCracken.
24226
24227- bpo-21043: Remove the recommendation for specific CA organizations and to
24228  mention the ability to load the OS certificates.
24229
24230- bpo-20765: Add missing documentation for PurePath.with_name() and
24231  PurePath.with_suffix().
24232
24233- bpo-19407: New package installation and distribution guides based on the
24234  Python Packaging Authority tools. Existing guides have been retained as
24235  legacy links from the distutils docs, as they still contain some required
24236  reference material for tool developers that isn't recorded anywhere else.
24237
24238- bpo-19697: Document cases where __main__.__spec__ is None.
24239
24240Tests
24241-----
24242
24243- bpo-18982: Add tests for CLI of the calendar module.
24244
24245- bpo-19548: Added some additional checks to test_codecs to ensure that
24246  statements in the updated documentation remain accurate. Patch by Martin
24247  Panter.
24248
24249- bpo-22838: All test_re tests now work with unittest test discovery.
24250
24251- bpo-22173: Update lib2to3 tests to use unittest test discovery.
24252
24253- bpo-16000: Convert test_curses to use unittest.
24254
24255- bpo-21456: Skip two tests in test_urllib2net.py if _ssl module not
24256  present. Patch by Remi Pointel.
24257
24258- bpo-20746: Fix test_pdb to run in refleak mode (-R).  Patch by Xavier de
24259  Gaye.
24260
24261- bpo-22060: test_ctypes has been somewhat cleaned up and simplified; it now
24262  uses unittest test discovery to find its tests.
24263
24264- bpo-22104: regrtest.py no longer holds a reference to the suite of tests
24265  loaded from test modules that don't define test_main().
24266
24267- bpo-22111: Assorted cleanups in test_imaplib.  Patch by Milan Oberkirch.
24268
24269- bpo-22002: Added ``load_package_tests`` function to test.support and used
24270  it to implement/augment test discovery in test_asyncio, test_email,
24271  test_importlib, test_json, and test_tools.
24272
24273- bpo-21976: Fix test_ssl to accept LibreSSL version strings.  Thanks to
24274  William Orr.
24275
24276- bpo-21918: Converted test_tools from a module to a package containing
24277  separate test files for each tested script.
24278
24279- bpo-9554: Use modern unittest features in test_argparse. Initial patch by
24280  Denver Coneybeare and Radu Voicilas.
24281
24282- bpo-20155: Changed HTTP method names in failing tests in test_httpservers
24283  so that packet filtering software (specifically Windows Base Filtering
24284  Engine) does not interfere with the transaction semantics expected by the
24285  tests.
24286
24287- bpo-19493: Refactored the ctypes test package to skip tests explicitly
24288  rather than silently.
24289
24290- bpo-18492: All resources are now allowed when tests are not run by
24291  regrtest.py.
24292
24293- bpo-21634: Fix pystone micro-benchmark: use floor division instead of true
24294  division to benchmark integers instead of floating point numbers. Set
24295  pystone version to 1.2. Patch written by Lennart Regebro.
24296
24297- bpo-21605: Added tests for Tkinter images.
24298
24299- bpo-21493: Added test for ntpath.expanduser().  Original patch by Claudiu
24300  Popa.
24301
24302- bpo-19925: Added tests for the spwd module. Original patch by Vajrasky
24303  Kok.
24304
24305- bpo-21522: Added Tkinter tests for Listbox.itemconfigure(),
24306  PanedWindow.paneconfigure(), and Menu.entryconfigure().
24307
24308- bpo-17756: Fix test_code test when run from the installed location.
24309
24310- bpo-17752: Fix distutils tests when run from the installed location.
24311
24312- bpo-18604: Consolidated checks for GUI availability.  All platforms now at
24313  least check whether Tk can be instantiated when the GUI resource is
24314  requested.
24315
24316- bpo-21275: Fix a socket test on KFreeBSD.
24317
24318- bpo-21223: Pass test_site/test_startup_imports when some of the extensions
24319  are built as builtins.
24320
24321- bpo-20635: Added tests for Tk geometry managers.
24322
24323- Add test case for freeze.
24324
24325- bpo-20743: Fix a reference leak in test_tcl.
24326
24327- bpo-21097: Move test_namespace_pkgs into test_importlib.
24328
24329- bpo-21503: Use test_both() consistently in test_importlib.
24330
24331- bpo-20939: Avoid various network test failures due to new redirect of
24332  http://www.python.org/ to https://www.python.org: use
24333  http://www.example.com instead.
24334
24335- bpo-20668: asyncio tests no longer rely on tests.txt file. (Patch by
24336  Vajrasky Kok)
24337
24338- bpo-21093: Prevent failures of ctypes test_macholib on OS X if a copy of
24339  libz exists in $HOME/lib or /usr/local/lib.
24340
24341- bpo-22770: Prevent some Tk segfaults on OS X when running gui tests.
24342
24343- bpo-23211: Workaround test_logging failure on some OS X 10.6 systems.
24344
24345- bpo-23345: Prevent test_ssl failures with large OpenSSL patch level values
24346  (like 0.9.8zc).
24347
24348Tools/Demos
24349-----------
24350
24351- bpo-22314: pydoc now works when the LINES environment variable is set.
24352
24353- bpo-22615: Argument Clinic now supports the "type" argument for the int
24354  converter. This permits using the int converter with enums and typedefs.
24355
24356- bpo-20076: The makelocalealias.py script no longer ignores UTF-8 mapping.
24357
24358- bpo-20079: The makelocalealias.py script now can parse the SUPPORTED file
24359  from glibc sources and supports command line options for source paths.
24360
24361- bpo-22201: Command-line interface of the zipfile module now correctly
24362  extracts ZIP files with directory entries.  Patch by Ryan Wilson.
24363
24364- bpo-22120: For functions using an unsigned integer return converter,
24365  Argument Clinic now generates a cast to that type for the comparison to -1
24366  in the generated code.  (This suppresses a compilation warning.)
24367
24368- bpo-18974: Tools/scripts/diff.py now uses argparse instead of optparse.
24369
24370- bpo-21906: Make Tools/scripts/md5sum.py work in Python 3. Patch by Zachary
24371  Ware.
24372
24373- bpo-21629: Fix Argument Clinic's "--converters" feature.
24374
24375- Add support for ``yield from`` to 2to3.
24376
24377- Add support for the :pep:`465` matrix multiplication operator to 2to3.
24378
24379- bpo-16047: Fix module exception list and __file__ handling in freeze.
24380  Patch by Meador Inge.
24381
24382- bpo-11824: Consider ABI tags in freeze. Patch by Meador Inge.
24383
24384- bpo-20535: PYTHONWARNING no longer affects the run_tests.py script. Patch
24385  by Arfrever Frehtes Taifersar Arahesis.
24386
24387Windows
24388-------
24389
24390- bpo-23260: Update Windows installer
24391
24392- The bundled version of Tcl/Tk has been updated to 8.6.3.  The most visible
24393  result of this change is the addition of new native file dialogs when
24394  running on Windows Vista or newer.  See Tcl/Tk's TIP 432 for more
24395  information.  Also, this version of Tcl/Tk includes support for Windows
24396  10.
24397
24398- bpo-17896: The Windows build scripts now expect external library sources
24399  to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``.
24400
24401- bpo-17717: The Windows build scripts now use a copy of NASM pulled from
24402  svn.python.org to build OpenSSL.
24403
24404- bpo-21907: Improved the batch scripts provided for building Python.
24405
24406- bpo-22644: The bundled version of OpenSSL has been updated to 1.0.1j.
24407
24408- bpo-10747: Use versioned labels in the Windows start menu. Patch by Olive
24409  Kilburn.
24410
24411- bpo-22980: .pyd files with a version and platform tag (for example,
24412  ".cp35-win32.pyd") will now be loaded in preference to those without tags.
24413
24414
24415**(For information about older versions, consult the HISTORY file.)**
24416