1+++++++++++
2Python News
3+++++++++++
4
5What's New in Python 3.6.1?
6===========================
7
8*Release date: 2017-03-21*
9
10Core and Builtins
11-----------------
12
13- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused a
14  regression by revealing an inconsistency in how sys.path is initialized when
15  executing ``__main__`` from a zipfile, directory, or other import location.
16  The interpreter now consistently avoids ever adding the import location's
17  parent directory to ``sys.path``, and ensures no other ``sys.path`` entries
18  are inadvertently modified when inserting the import location named on the
19  command line.
20
21Build
22-----
23
24- bpo-27593: fix format of git information used in sys.version
25
26- Fix incompatible comment in python.h
27
28
29What's New in Python 3.6.1 release candidate 1
30==============================================
31
32*Release date: 2017-03-04*
33
34Core and Builtins
35-----------------
36
37- bpo-28893: Set correct __cause__ for errors about invalid awaitables
38  returned from __aiter__ and __anext__.
39
40- bpo-29683: Fixes to memory allocation in _PyCode_SetExtra.  Patch by
41  Brian Coleman.
42
43- bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords.
44  It should raise TypeError when kwargs is not a dict.  But it might
45  cause segv when args=NULL and kwargs is not a dict.
46
47- Issue #28598: Support __rmod__ for subclasses of str being called before
48  str.__mod__.  Patch by Martijn Pieters.
49
50- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k.
51
52- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX.
53  Patch by Matthieu Dartiailh.
54
55- bpo-29602: Fix incorrect handling of signed zeros in complex constructor for
56  complex subclasses and for inputs having a __complex__ method. Patch
57  by Serhiy Storchaka.
58
59- bpo-29347: Fixed possibly dereferencing undefined pointers
60  when creating weakref objects.
61
62- bpo-29438: Fixed use-after-free problem in key sharing dict.
63
64- Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0].
65
66- Issue #29337: Fixed possible BytesWarning when compare the code objects.
67  Warnings could be emitted at compile time.
68
69- Issue #29327: Fixed a crash when pass the iterable keyword argument to
70  sorted().
71
72- Issue #29034: Fix memory leak and use-after-free in os module (path_converter).
73
74- Issue #29159: Fix regression in bytes(x) when x.__index__() raises Exception.
75
76- Issue #28932: Do not include <sys/random.h> if it does not exist.
77
78- Issue #25677: Correct the positioning of the syntax error caret for
79  indented blocks.  Based on patch by Michael Layzell.
80
81- Issue #29000: Fixed bytes formatting of octals with zero padding in alternate
82  form.
83
84- Issue #26919: On Android, operating system data is now always encoded/decoded
85  to/from UTF-8, instead of the locale encoding to avoid inconsistencies with
86  os.fsencode() and os.fsdecode() which are already using UTF-8.
87
88- Issue #28991:  functools.lru_cache() was susceptible to an obscure reentrancy
89  bug triggerable by a monkey-patched len() function.
90
91- Issue #28739: f-string expressions are no longer accepted as docstrings and
92  by ast.literal_eval() even if they do not include expressions.
93
94- Issue #28512: Fixed setting the offset attribute of SyntaxError by
95  PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
96
97- Issue #28918: Fix the cross compilation of xxlimited when Python has been
98  built with Py_DEBUG defined.
99
100- Issue #28731: Optimize _PyDict_NewPresized() to create correct size dict.
101  Improve speed of dict literal with constant keys up to 30%.
102
103Extension Modules
104-----------------
105
106- Issue #29169: Update zlib to 1.2.11.
107
108Library
109-------
110
111- bpo-29623: Allow use of path-like object as a single argument in
112  ConfigParser.read().  Patch by David Ellis.
113
114- bpo-28963: Fix out of bound iteration in asyncio.Future.remove_done_callback
115  implemented in C.
116
117- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes
118  before all pipes are closed.
119
120- bpo-29271: Fix Task.current_task and Task.all_tasks implemented in C
121  to accept None argument as their pure Python implementation.
122
123- bpo-29703: Fix asyncio to support instantiation of new event loops
124  in child processes.
125
126- bpo-29376: Fix assertion error in threading._DummyThread.is_alive().
127
128- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts
129  PathLike objects.  Patch by Sayan Chowdhury.
130
131- bpo-28518: Start a transaction implicitly before a DML statement.
132  Patch by Aviv Palivoda.
133
134- bpo-29532: Altering a kwarg dictionary passed to functools.partial()
135  no longer affects a partial object after creation.
136
137- bpo-29110: Fix file object leak in aifc.open() when file is given as a
138  filesystem path and is not in valid AIFF format. Patch by Anthony Zhang.
139
140- Issue #28556: Various updates to typing module: typing.Counter, typing.ChainMap,
141  improved ABC caching, etc. Original PRs by Jelle Zijlstra, Ivan Levkivskyi,
142  Manuel Krebber, and Łukasz Langa.
143
144- Issue #29100: Fix datetime.fromtimestamp() regression introduced in Python
145  3.6.0: check minimum and maximum years.
146
147- Issue #29519: Fix weakref spewing exceptions during interpreter shutdown
148  when used with a rare combination of multiprocessing and custom codecs.
149
150- Issue #29416: Prevent infinite loop in pathlib.Path.mkdir
151
152- Issue #29444: Fixed out-of-bounds buffer access in the group() method of
153  the match object.  Based on patch by WGH.
154
155- Issue #29335: Fix subprocess.Popen.wait() when the child process has
156  exited to a stopped instead of terminated state (ex: when under ptrace).
157
158- Issue #29290: Fix a regression in argparse that help messages would wrap at
159  non-breaking spaces.
160
161- Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.
162
163- Issue #29316: Restore the provisional status of typing module, add
164  corresponding note to documentation. Patch by Ivan L.
165
166- Issue #29219: Fixed infinite recursion in the repr of uninitialized
167  ctypes.CDLL instances.
168
169- Issue #29011:  Fix an important omission by adding Deque to the typing module.
170
171- Issue #28969: Fixed race condition in C implementation of functools.lru_cache.
172  KeyError could be raised when cached function with full cache was
173  simultaneously called from differen threads with the same uncached arguments.
174
175- Issue #29142: In urllib.request, suffixes in no_proxy environment variable with
176  leading dots could match related hostnames again (e.g. .b.c matches a.b.c).
177  Patch by Milan Oberkirch.
178
179- Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter
180  anymore. Patch written by Jiajun Huang.
181
182- Issue #29203:  functools.lru_cache() now respects PEP 468 and preserves
183  the order of keyword arguments.  f(a=1, b=2) is now cached separately
184  from f(b=2, a=1) since both calls could potentially give different results.
185
186- Issue #15812: inspect.getframeinfo() now correctly shows the first line of
187  a context.  Patch by Sam Breese.
188
189- Issue #29094: Offsets in a ZIP file created with extern file object and modes
190  "w" and "x" now are relative to the start of the file.
191
192- Issue #29085: Allow random.Random.seed() to use high quality OS randomness
193  rather than the pid and time.
194
195- Issue #29061: Fixed bug in secrets.randbelow() which would hang when given
196  a negative input.  Patch by Brendan Donegan.
197
198- Issue #29079: Prevent infinite loop in pathlib.resolve() on Windows
199
200- Issue #13051: Fixed recursion errors in large or resized
201  curses.textpad.Textbox.  Based on patch by Tycho Andersen.
202
203- Issue #29119: Fix weakrefs in the pure python version of
204  collections.OrderedDict move_to_end() method.
205  Contributed by Andra Bogildea.
206
207- Issue #9770: curses.ascii predicates now work correctly with negative
208  integers.
209
210- Issue #28427: old keys should not remove new values from
211  WeakValueDictionary when collecting from another thread.
212
213- Issue 28923: Remove editor artifacts from Tix.py.
214
215- Issue #29055:  Neaten-up empty population error on random.choice()
216  by suppressing the upstream exception.
217
218- Issue #28871: Fixed a crash when deallocate deep ElementTree.
219
220- Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and
221  WeakValueDictionary.pop() when a GC collection happens in another
222  thread.
223
224- Issue #20191: Fixed a crash in resource.prlimit() when passing a sequence that
225  doesn't own its elements as limits.
226
227- Issue #28779: multiprocessing.set_forkserver_preload() would crash the
228  forkserver process if a preloaded module instantiated some
229  multiprocessing objects such as locks.
230
231- Issue #28847: dbm.dumb now supports reading read-only files and no longer
232  writes the index file when it is not changed.
233
234- Issue #26937: The chown() method of the tarfile.TarFile class does not fail
235  now when the grp module cannot be imported, as for example on Android
236  platforms.
237
238Windows
239-------
240
241- bpo-29579: Removes readme.txt from the installer
242
243- Issue #29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev)
244
245- Issue #28164: Correctly handle special console filenames (patch by Eryk Sun)
246
247- Issue #29409: Implement PEP 529 for io.FileIO (Patch by Eryk Sun)
248
249- Issue #29392: Prevent crash when passing invalid arguments into msvcrt module.
250
251- Issue #25778: winreg does not truncate string correctly (Patch by Eryk Sun)
252
253- Issue #28896: Deprecate WindowsRegistryFinder and disable it by default.
254
255C API
256-----
257
258- Issue #27867: Function PySlice_GetIndicesEx() is replaced with a macro if
259  Py_LIMITED_API is not set or set to the value between 0x03050400
260  and 0x03060000 (not including) or 0x03060100 or higher.
261
262- Issue #29083: Fixed the declaration of some public API functions.
263  PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in
264  limited API.  PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and
265  Py_BuildValue() were not available in limited API of version < 3.3 when
266  PY_SSIZE_T_CLEAN is defined.
267
268- Issue #29058: All stable API extensions added after Python 3.2 are now
269  available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of
270  the minimum Python version supporting this API.
271
272Documentation
273-------------
274
275- bpo-28929: Link the documentation to its source file on GitHub.
276
277- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer to
278  aiosmtpd, a third-party asyncio-based replacement.
279
280- Issue #26355: Add canonical header link on each page to corresponding major
281  version of the documentation. Patch by Matthias Bussonnier.
282
283- Issue #29349: Fix Python 2 syntax in code for building the documentation.
284
285Tests
286-----
287
288- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS.
289  Skip some tests of select.poll when running on macOS due to unresolved
290  issues with the underlying system poll function on some macOS versions.
291
292- Issue #29571: to match the behaviour of the ``re.LOCALE`` flag,
293  test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to
294  determine the candidate encoding for the test regex (allowing it to correctly
295  skip the test when the default locale encoding is a multi-byte encoding)
296
297- Issue #28950: Disallow -j0 to be combined with -T/-l in regrtest
298  command line arguments.
299
300- Issue #28683: Fix the tests that bind() a unix socket and raise
301  PermissionError on Android for a non-root user.
302
303- Issue #26939: Add the support.setswitchinterval() function to fix
304  test_functools hanging on the Android armv7 qemu emulator.
305
306Build
307-----
308
309- bpo-27593: sys.version and the platform module python_build(),
310  python_branch(), and python_revision() functions now use
311  git information rather than hg when building from a repo.
312
313- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k.
314
315- Issue #26851: Set Android compilation and link flags.
316
317- Issue #28768: Fix implicit declaration of function _setmode. Patch by
318  Masayuki Yamamoto
319
320- Issue #29080: Removes hard dependency on hg.exe from PCBuild/build.bat
321
322- Issue #23903: Added missed names to PC/python3.def.
323
324- Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
325  macro is not defined in android-ndk-r13.
326
327- Issue #28538: Fix the compilation error that occurs because if_nameindex() is
328  available on Android API level 24, but the if_nameindex structure is not
329  defined.
330
331- Issue #20211: Do not add the directory for installing C header files and the
332  directory for installing object code libraries to the cross compilation
333  search paths. Original patch by Thomas Petazzoni.
334
335- Issue #28849: Do not define sys.implementation._multiarch on Android.
336
337
338What's New in Python 3.6.0?
339===========================
340
341*Release date: 2016-12-23*
342
343- No changes since release candidate 2
344
345
346What's New in Python 3.6.0 release candidate 2?
347===============================================
348
349*Release date: 2016-12-16*
350
351Core and Builtins
352-----------------
353
354- Issue #28147: Fix a memory leak in split-table dictionaries: setattr()
355  must not convert combined table into split table. Patch written by INADA
356  Naoki.
357
358- Issue #28990: Fix asyncio SSL hanging if connection is closed before
359  handshake is completed. (Patch by HoHo-Ho)
360
361Tools/Demos
362-----------
363
364- Issue #28770: Fix python-gdb.py for fastcalls.
365
366Windows
367-------
368
369- Issue #28896: Deprecate WindowsRegistryFinder.
370
371Build
372-----
373
374- Issue #28898: Prevent gdb build errors due to HAVE_LONG_LONG redefinition.
375
376
377What's New in Python 3.6.0 release candidate 1?
378===============================================
379
380*Release date: 2016-12-06*
381
382Core and Builtins
383-----------------
384
385- Issue #23722: Rather than silently producing a class that doesn't support
386  zero-argument ``super()`` in methods, failing to pass the new
387  ``__classcell__`` namespace entry up to ``type.__new__`` now results in a
388  ``DeprecationWarning`` and a class that supports zero-argument ``super()``.
389
390- Issue #28797: Modifying the class __dict__ inside the __set_name__ method of
391  a descriptor that is used inside that class no longer prevents calling the
392  __set_name__ method of other descriptors.
393
394- Issue #28782: Fix a bug in the implementation ``yield from`` when checking
395  if the next instruction is YIELD_FROM. Regression introduced by WORDCODE
396  (issue #26647).
397
398Library
399-------
400
401- Issue #27030: Unknown escapes in re.sub() replacement template are allowed
402  again.  But they still are deprecated and will be disabled in 3.7.
403
404- Issue #28835: Fix a regression introduced in warnings.catch_warnings():
405  call warnings.showwarning() if it was overriden inside the context manager.
406
407- Issue #27172: To assist with upgrades from 2.7, the previously documented
408  deprecation of ``inspect.getfullargspec()`` has been reversed. This decision
409  may be revisited again after the Python 2.7 branch is no longer officially
410  supported.
411
412- Issue #26273: Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and
413  :data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by
414  Omar Sandoval.
415
416- Issue #24142: Reading a corrupt config file left configparser in an
417  invalid state.  Original patch by Florian Höch.
418
419- Issue #28843: Fix asyncio C Task to handle exceptions __traceback__.
420
421C API
422-----
423
424- Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
425
426Documentation
427-------------
428
429- Issue #23722: The data model reference and the porting section in the What's
430  New guide now cover the additional ``__classcell__`` handling needed for
431  custom metaclasses to fully support PEP 487 and zero-argument ``super()``.
432
433Tools/Demos
434-----------
435
436- Issue #28023: Fix python-gdb.py didn't support new dict implementation.
437
438
439What's New in Python 3.6.0 beta 4?
440==================================
441
442*Release date: 2016-11-21*
443
444Core and Builtins
445-----------------
446
447- Issue #28532: Show sys.version when -V option is supplied twice.
448
449- Issue #27100: The with-statement now checks for __enter__ before it
450  checks for __exit__.  This gives less confusing error messages when
451  both methods are missing. Patch by Jonathan Ellington.
452
453- Issue #28746: Fix the set_inheritable() file descriptor method on platforms
454  that do not have the ioctl FIOCLEX and FIONCLEX commands.
455
456- Issue #26920: Fix not getting the locale's charset upon initializing the
457  interpreter, on platforms that do not have langinfo.
458
459- Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
460  when decode astral characters.  Patch by Xiang Zhang.
461
462- Issue #19398: Extra slash no longer added to sys.path components in case of
463  empty compile-time PYTHONPATH components.
464
465- Issue #28665:  Improve speed of the STORE_DEREF opcode by 40%.
466
467- Issue #28583: PyDict_SetDefault didn't combine split table when needed.
468  Patch by Xiang Zhang.
469
470- Issue #27243: Change PendingDeprecationWarning -> DeprecationWarning.
471  As it was agreed in the issue, __aiter__ returning an awaitable
472  should result in PendingDeprecationWarning in 3.5 and in
473  DeprecationWarning in 3.6.
474
475- Issue #26182: Fix a refleak in code that raises DeprecationWarning.
476
477- Issue #28721: Fix asynchronous generators aclose() and athrow() to
478  handle StopAsyncIteration propagation properly.
479
480Library
481-------
482
483- Issue #28752: Restored the __reduce__() methods of datetime objects.
484
485- Issue #28727: Regular expression patterns, _sre.SRE_Pattern objects created
486  by re.compile(), become comparable (only x==y and x!=y operators). This
487  change should fix the issue #18383: don't duplicate warning filters when the
488  warnings module is reloaded (thing usually only done in unit tests).
489
490- Issue #20572: The subprocess.Popen.wait method's undocumented
491  endtime parameter now raises a DeprecationWarning.
492
493- Issue #25659: In ctypes, prevent a crash calling the from_buffer() and
494  from_buffer_copy() methods on abstract classes like Array.
495
496- Issue #19717: Makes Path.resolve() succeed on paths that do not exist.
497  Patch by Vajrasky Kok
498
499- Issue #28563: Fixed possible DoS and arbitrary code execution when handle
500  plural form selections in the gettext module.  The expression parser now
501  supports exact syntax supported by GNU gettext.
502
503- Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator when
504  the garbage collector is invoked in other thread.  Based on patch by
505  Sebastian Cufre.
506
507- Issue #28600: Optimize loop.call_soon.
508
509- Issue #28613: Fix get_event_loop() return the current loop if
510  called from coroutines/callbacks.
511
512- Issue #28634: Fix asyncio.isfuture() to support unittest.Mock.
513
514- Issue #26081: Fix refleak in _asyncio.Future.__iter__().throw.
515
516- Issue #28639: Fix inspect.isawaitable to always return bool
517  Patch by Justin Mayfield.
518
519- Issue #28652: Make loop methods reject socket kinds they do not support.
520
521- Issue #28653: Fix a refleak in functools.lru_cache.
522
523- Issue #28703: Fix asyncio.iscoroutinefunction to handle Mock objects.
524
525- Issue #28704: Fix create_unix_server to support Path-like objects
526  (PEP 519).
527
528- Issue #28720: Add collections.abc.AsyncGenerator.
529
530Documentation
531-------------
532
533- Issue #28513: Documented command-line interface of zipfile.
534
535Tests
536-----
537
538- Issue #28666: Now test.support.rmtree is able to remove unwritable or
539  unreadable directories.
540
541- Issue #23839: Various caches now are cleared before running every test file.
542
543Build
544-----
545
546- Issue #10656: Fix out-of-tree building on AIX.  Patch by Tristan Carel and
547  Michael Haubenwallner.
548
549- Issue #26359: Rename --with-optimiations to --enable-optimizations.
550
551- Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
552  Patch by Gareth Rees.
553
554
555What's New in Python 3.6.0 beta 3?
556==================================
557
558*Release date: 2016-10-31*
559
560Core and Builtins
561-----------------
562
563- Issue #28128: Deprecation warning for invalid str and byte escape
564  sequences now prints better information about where the error
565  occurs. Patch by Serhiy Storchaka and Eric Smith.
566
567- Issue #28509: dict.update() no longer allocate unnecessary large memory.
568
569- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
570  build.
571
572- Issue #28517: Fixed of-by-one error in the peephole optimizer that caused
573  keeping unreachable code.
574
575- Issue #28214: Improved exception reporting for problematic __set_name__
576  attributes.
577
578- Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception
579  loss in PyTraceBack_Here().
580
581- Issue #28471: Fix "Python memory allocator called without holding the GIL"
582  crash in socket.setblocking.
583
584Library
585-------
586
587- Issue #27517: LZMA compressor and decompressor no longer raise exceptions if
588  given empty data twice.  Patch by Benjamin Fogle.
589
590- Issue #28549: Fixed segfault in curses's addch() with ncurses6.
591
592- Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar
593  file with compression before trying to open it without compression.  Otherwise
594  it had 50% chance failed with ignore_zeros=True.
595
596- Issue #23262: The webbrowser module now supports Firefox 36+ and derived
597  browsers.  Based on patch by Oleg Broytman.
598
599- Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
600  by representing the scale as float value internally in Tk.  tkinter.IntVar
601  now works if float value is set to underlying Tk variable.
602
603- Issue #18844: The various ways of specifying weights for random.choices()
604  now produce the same result sequences.
605
606- Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space
607  at the start of new line after printing a month's calendar.  Patch by
608  Xiang Zhang.
609
610- Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces.
611  Based on patch by Kaarle Ritvanen.
612
613- Issue #28353: os.fwalk() no longer fails on broken links.
614
615- Issue #28430: Fix iterator of C implemented asyncio.Future doesn't accept
616  non-None value is passed to it.send(val).
617
618- Issue #27025: Generated names for Tkinter widgets now start by the "!" prefix
619  for readability (was "`").
620
621- Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin
622  a workaround to Tix library bug.
623
624- Issue #28488: shutil.make_archive() no longer adds entry "./" to ZIP archive.
625
626- Issue #25953: re.sub() now raises an error for invalid numerical group
627  reference in replacement template even if the pattern is not found in
628  the string.  Error message for invalid group reference now includes the
629  group index and the position of the reference.
630  Based on patch by SilentGhost.
631
632- Issue #18219: Optimize csv.DictWriter for large number of columns.
633  Patch by Mariatta Wijaya.
634
635- Issue #28448: Fix C implemented asyncio.Future didn't work on Windows.
636
637- Issue #28480: Fix error building socket module when multithreading is
638  disabled.
639
640- Issue #24452: Make webbrowser support Chrome on Mac OS X.
641
642- Issue #20766: Fix references leaked by pdb in the handling of SIGINT
643  handlers.
644
645- Issue #28492: Fix how StopIteration exception is raised in _asyncio.Future.
646
647- Issue #28500: Fix asyncio to handle async gens GC from another thread.
648
649- Issue #26923: Fix asyncio.Gather to refuse being cancelled once all
650  children are done.
651  Patch by Johannes Ebke.
652
653- Issue #26796: Don't configure the number of workers for default
654  threadpool executor.
655  Initial patch by Hans Lawrenz.
656
657- Issue #28544: Implement asyncio.Task in C.
658
659Windows
660-------
661
662- Issue #28522: Fixes mishandled buffer reallocation in getpathp.c
663
664Build
665-----
666
667- Issue #28444: Fix missing extensions modules when cross compiling.
668
669- Issue #28208: Update Windows build and OS X installers to use SQLite 3.14.2.
670
671- Issue #28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j.
672
673Tests
674-----
675
676- Issue #26944: Fix test_posix for Android where 'id -G' is entirely wrong or
677  missing the effective gid.
678
679- Issue #28409: regrtest: fix the parser of command line arguments.
680
681
682What's New in Python 3.6.0 beta 2?
683==================================
684
685*Release date: 2016-10-10*
686
687Core and Builtins
688-----------------
689
690- Issue #28183: Optimize and cleanup dict iteration.
691
692- Issue #26081: Added C implementation of asyncio.Future.
693  Original patch by Yury Selivanov.
694
695- Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
696  Patch by Xiang Zhang.
697
698- Issue #28376: The type of long range iterator is now registered as Iterator.
699  Patch by Oren Milman.
700
701- Issue #28376: Creating instances of range_iterator by calling range_iterator
702  type now is deprecated.  Patch by Oren Milman.
703
704- Issue #28376: The constructor of range_iterator now checks that step is not 0.
705  Patch by Oren Milman.
706
707- Issue #26906: Resolving special methods of uninitialized type now causes
708  implicit initialization of the type instead of a fail.
709
710- Issue #18287: PyType_Ready() now checks that tp_name is not NULL.
711  Original patch by Niklas Koep.
712
713- Issue #24098: Fixed possible crash when AST is changed in process of
714  compiling it.
715
716- Issue #28201: Dict reduces possibility of 2nd conflict in hash table when
717  hashes have same lower bits.
718
719- Issue #28350: String constants with null character no longer interned.
720
721- Issue #26617: Fix crash when GC runs during weakref callbacks.
722
723- Issue #27942: String constants now interned recursively in tuples and frozensets.
724
725- Issue #21578: Fixed misleading error message when ImportError called with
726  invalid keyword args.
727
728- Issue #28203: Fix incorrect type in complex(1.0, {2:3}) error message.
729  Patch by Soumya Sharma.
730
731- Issue #28086: Single var-positional argument of tuple subtype was passed
732  unscathed to the C-defined function.  Now it is converted to exact tuple.
733
734- Issue #28214: Now __set_name__ is looked up on the class instead of the
735  instance.
736
737- Issue #27955: Fallback on reading /dev/urandom device when the getrandom()
738  syscall fails with EPERM, for example when blocked by SECCOMP.
739
740- Issue #28192: Don't import readline in isolated mode.
741
742- Upgrade internal unicode databases to Unicode version 9.0.0.
743
744- Issue #28131: Fix a regression in zipimport's compile_source().  zipimport
745  should use the same optimization level as the interpreter.
746
747- Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly
748  optimize memcpy().
749
750- Issue #28120: Fix dict.pop() for splitted dictionary when trying to remove a
751  "pending key" (Not yet inserted in split-table). Patch by Xiang Zhang.
752
753- Issue #26182: Raise DeprecationWarning when async and await keywords are
754  used as variable/attribute/class/function name.
755
756Library
757-------
758
759- Issue #27998: Fixed bytes path support in os.scandir() on Windows.
760  Patch by Eryk Sun.
761
762- Issue #28317: The disassembler now decodes FORMAT_VALUE argument.
763
764- Issue #26293: Fixed writing ZIP files that starts not from the start of the
765  file.  Offsets in ZIP file now are relative to the start of the archive in
766  conforming to the specification.
767
768- Issue #28380: unittest.mock Mock autospec functions now properly support
769  assert_called, assert_not_called, and assert_called_once.
770
771- Issue #27181 remove statistics.geometric_mean and defer until 3.7.
772
773- Issue #28229: lzma module now supports pathlib.
774
775- Issue #28321: Fixed writing non-BMP characters with binary format in plistlib.
776
777- Issue #28225: bz2 module now supports pathlib.  Initial patch by Ethan Furman.
778
779- Issue #28227: gzip now supports pathlib.  Patch by Ethan Furman.
780
781- Issue #27358: Optimized merging var-keyword arguments and improved error
782  message when passing a non-mapping as a var-keyword argument.
783
784- Issue #28257: Improved error message when passing a non-iterable as
785  a var-positional argument.  Added opcode BUILD_TUPLE_UNPACK_WITH_CALL.
786
787- Issue #28322: Fixed possible crashes when unpickle itertools objects from
788  incorrect pickle data.  Based on patch by John Leitch.
789
790- Issue #28228: imghdr now supports pathlib.
791
792- Issue #28226: compileall now supports pathlib.
793
794- Issue #28314: Fix function declaration (C flags) for the getiterator() method
795  of xml.etree.ElementTree.Element.
796
797- Issue #28148: Stop using localtime() and gmtime() in the time
798  module.
799
800  Introduced platform independent _PyTime_localtime API that is
801  similar to POSIX localtime_r, but available on all platforms.  Patch
802  by Ed Schouten.
803
804- Issue #28253: Fixed calendar functions for extreme months: 0001-01
805  and 9999-12.
806
807  Methods itermonthdays() and itermonthdays2() are reimplemented so
808  that they don't call itermonthdates() which can cause datetime.date
809  under/overflow.
810
811- Issue #28275: Fixed possible use after free in the decompress()
812  methods of the LZMADecompressor and BZ2Decompressor classes.
813  Original patch by John Leitch.
814
815- Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
816  if pass invalid string-like object as a name.  Patch by Xiang Zhang.
817
818- Issue #18844: random.choices() now has k as a keyword-only argument
819  to improve the readability of common cases and come into line
820  with the signature used in other languages.
821
822- Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py.
823  Patch by Madison May.
824
825- Issue #27611: Fixed support of default root window in the tkinter.tix module.
826  Added the master parameter in the DisplayStyle constructor.
827
828- Issue #27348: In the traceback module, restore the formatting of exception
829  messages like "Exception: None".  This fixes a regression introduced in
830  3.5a2.
831
832- Issue #25651: Allow falsy values to be used for msg parameter of subTest().
833
834- Issue #27778: Fix a memory leak in os.getrandom() when the getrandom() is
835  interrupted by a signal and a signal handler raises a Python exception.
836
837- Issue #28200: Fix memory leak on Windows in the os module (fix
838  path_converter() function).
839
840- Issue #25400: RobotFileParser now correctly returns default values for
841  crawl_delay and request_rate.  Initial patch by Peter Wirtz.
842
843- Issue #27932: Prevent memory leak in win32_ver().
844
845- Fix UnboundLocalError in socket._sendfile_use_sendfile.
846
847- Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of
848  os.stat().  Patch by Eryk Sun.
849
850- Issue #22493: Warning message emitted by using inline flags in the middle of
851  regular expression now contains a (truncated) regex pattern.
852  Patch by Tim Graham.
853
854- Issue #25270: Prevent codecs.escape_encode() from raising SystemError when
855  an empty bytestring is passed.
856
857- Issue #28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam.
858
859- Issue #25895: Enable WebSocket URL schemes in urllib.parse.urljoin.
860  Patch by Gergely Imreh and Markus Holtermann.
861
862- Issue #28114: Fix a crash in parse_envlist() when env contains byte strings.
863  Patch by Eryk Sun.
864
865- Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp().
866
867- Issue #27906: Fix socket accept exhaustion during high TCP traffic.
868  Patch by Kevin Conway.
869
870- Issue #28174: Handle when SO_REUSEPORT isn't properly supported.
871  Patch by Seth Michael Larson.
872
873- Issue #26654: Inspect functools.partial in asyncio.Handle.__repr__.
874  Patch by iceboy.
875
876- Issue #26909: Fix slow pipes IO in asyncio.
877  Patch by INADA Naoki.
878
879- Issue #28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect.
880
881- Issue #27759: Fix selectors incorrectly retain invalid file descriptors.
882  Patch by Mark Williams.
883
884- Issue #28368: Refuse monitoring processes if the child watcher has no
885  loop attached.
886  Patch by Vincent Michel.
887
888- Issue #28369: Raise RuntimeError when transport's FD is used with
889  add_reader, add_writer, etc.
890
891- Issue #28370: Speedup asyncio.StreamReader.readexactly.
892  Patch by Коренберг Марк.
893
894- Issue #28371: Deprecate passing asyncio.Handles to run_in_executor.
895
896- Issue #28372: Fix asyncio to support formatting of non-python coroutines.
897
898- Issue #28399: Remove UNIX socket from FS before binding.
899  Patch by Коренберг Марк.
900
901- Issue #27972: Prohibit Tasks to await on themselves.
902
903Windows
904-------
905
906- Issue #28402: Adds signed catalog files for stdlib on Windows.
907
908- Issue #28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by
909  Eryk Sun)
910
911- Issue #28251: Improvements to help manuals on Windows.
912
913- Issue #28110: launcher.msi has different product codes between 32-bit and
914  64-bit
915
916- Issue #28161: Opening CON for write access fails
917
918- Issue #28162: WindowsConsoleIO readall() fails if first line starts with
919  Ctrl+Z
920
921- Issue #28163: WindowsConsoleIO fileno() passes wrong flags to
922  _open_osfhandle
923
924- Issue #28164: _PyIO_get_console_type fails for various paths
925
926- Issue #28137: Renames Windows path file to ._pth
927
928- Issue #28138: Windows ._pth file should allow import site
929
930C API
931-----
932
933- Issue #28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(),
934  PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and
935  PyUnicode_AsEncodedUnicode().
936
937Build
938-----
939
940- Issue #28258: Fixed build with Estonian locale (python-config and distclean
941  targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.
942
943- Issue #26661: setup.py now detects system libffi with multiarch wrapper.
944
945- Issue #15819: Remove redundant include search directory option for building
946  outside the source tree.
947
948Tests
949-----
950
951- Issue #28217: Adds _testconsole module to test console input.
952
953
954What's New in Python 3.6.0 beta 1?
955==================================
956
957*Release date: 2016-09-12*
958
959Core and Builtins
960-----------------
961
962- Issue #23722: The __class__ cell used by zero-argument super() is now
963  initialized from type.__new__ rather than __build_class__, so class methods
964  relying on that will now work correctly when called from metaclass methods
965  during class creation. Patch by Martin Teichmann.
966
967- Issue #25221: Fix corrupted result from PyLong_FromLong(0) when Python
968  is compiled with NSMALLPOSINTS = 0.
969
970- Issue #27080: Implement formatting support for PEP 515.  Initial patch
971  by Chris Angelico.
972
973- Issue #27199: In tarfile, expose copyfileobj bufsize to improve throughput.
974  Patch by Jason Fried.
975
976- Issue #27948: In f-strings, only allow backslashes inside the braces
977  (where the expressions are).  This is a breaking change from the 3.6
978  alpha releases, where backslashes are allowed anywhere in an
979  f-string.  Also, require that expressions inside f-strings be
980  enclosed within literal braces, and not escapes like
981  f'\x7b"hi"\x7d'.
982
983- Issue #28046: Remove platform-specific directories from sys.path.
984
985- Issue #28071: Add early-out for differencing from an empty set.
986
987- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
988  (patch by Eryk Sun)
989
990- Issue #25856: The __module__ attribute of extension classes and functions
991  now is interned. This leads to more compact pickle data with protocol 4.
992
993- Issue #27213: Rework CALL_FUNCTION* opcodes to produce shorter and more
994  efficient bytecode. Patch by Demur Rumed, design by Serhiy Storchaka,
995  reviewed by Serhiy Storchaka and Victor Stinner.
996
997- Issue #26331: Implement tokenizing support for PEP 515. Patch by Georg Brandl.
998
999- Issue #27999: Make "global after use" a SyntaxError, and ditto for nonlocal.
1000  Patch by Ivan Levkivskyi.
1001
1002- Issue #28003: Implement PEP 525 -- Asynchronous Generators.
1003
1004- Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.
1005  Patch by Ivan Levkivskyi.
1006
1007- Issue #26058: Add a new private version to the builtin dict type, incremented
1008  at each dictionary creation and at each dictionary change. Implementation of
1009  the PEP 509.
1010
1011- Issue #27364: A backslash-character pair that is not a valid escape sequence
1012  now generates a DeprecationWarning.  Patch by Emanuel Barry.
1013
1014- Issue #27350: `dict` implementation is changed like PyPy. It is more compact
1015  and preserves insertion order.
1016  (Concept developed by Raymond Hettinger and patch by Inada Naoki.)
1017
1018- Issue #27911: Remove unnecessary error checks in
1019  ``exec_builtin_or_dynamic()``.
1020
1021- Issue #27078: Added BUILD_STRING opcode.  Optimized f-strings evaluation.
1022
1023- Issue #17884: Python now requires systems with inttypes.h and stdint.h
1024
1025- Issue #27961: Require platforms to support ``long long``. Python hasn't
1026  compiled without ``long long`` for years, so this is basically a formality.
1027
1028- Issue #27355: Removed support for Windows CE.  It was never finished,
1029  and Windows CE is no longer a relevant platform for Python.
1030
1031- Implement PEP 523.
1032
1033- Issue #27870: A left shift of zero by a large integer no longer attempts
1034  to allocate large amounts of memory.
1035
1036- Issue #25402: In int-to-decimal-string conversion, improve the estimate
1037  of the intermediate memory required, and remove an unnecessarily strict
1038  overflow check. Patch by Serhiy Storchaka.
1039
1040- Issue #27214: In long_invert, be more careful about modifying object
1041  returned by long_add, and remove an unnecessary check for small longs.
1042  Thanks Oren Milman for analysis and patch.
1043
1044- Issue #27506: Support passing the bytes/bytearray.translate() "delete"
1045  argument by keyword.
1046
1047- Issue #27812: Properly clear out a generator's frame's backreference to the
1048  generator to prevent crashes in frame.clear().
1049
1050- Issue #27811: Fix a crash when a coroutine that has not been awaited is
1051  finalized with warnings-as-errors enabled.
1052
1053- Issue #27587: Fix another issue found by PVS-Studio: Null pointer check
1054  after use of 'def' in _PyState_AddModule().
1055  Initial patch by Christian Heimes.
1056
1057- Issue #27792: The modulo operation applied to ``bool`` and other
1058  ``int`` subclasses now always returns an ``int``. Previously
1059  the return type depended on the input values. Patch by Xiang Zhang.
1060
1061- Issue #26984: int() now always returns an instance of exact int.
1062
1063- Issue #25604: Fix a minor bug in integer true division; this bug could
1064  potentially have caused off-by-one-ulp results on platforms with
1065  unreliable ldexp implementations.
1066
1067- Issue #24254: Make class definition namespace ordered by default.
1068
1069- Issue #27662: Fix an overflow check in ``List_New``: the original code was
1070  checking against ``Py_SIZE_MAX`` instead of the correct upper bound of
1071  ``Py_SSIZE_T_MAX``. Patch by Xiang Zhang.
1072
1073- Issue #27782: Multi-phase extension module import now correctly allows the
1074  ``m_methods`` field to be used to add module level functions to instances
1075  of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang.
1076
1077- Issue #27936: The round() function accepted a second None argument
1078  for some types but not for others.  Fixed the inconsistency by
1079  accepting None for all numeric types.
1080
1081- Issue #27487: Warn if a submodule argument to "python -m" or
1082  runpy.run_module() is found in sys.modules after parent packages are
1083  imported, but before the submodule is executed.
1084
1085- Issue #27157: Make only type() itself accept the one-argument form.
1086  Patch by Eryk Sun and Emanuel Barry.
1087
1088- Issue #27558: Fix a SystemError in the implementation of "raise" statement.
1089  In a brand new thread, raise a RuntimeError since there is no active
1090  exception to reraise. Patch written by Xiang Zhang.
1091
1092- Issue #28008: Implement PEP 530 -- asynchronous comprehensions.
1093
1094- Issue #27942: Fix memory leak in codeobject.c
1095
1096Library
1097-------
1098
1099- Issue #28732: Fix crash in os.spawnv() with no elements in args
1100
1101- Issue #28485: Always raise ValueError for negative
1102  compileall.compile_dir(workers=...) parameter, even when multithreading is
1103  unavailable.
1104
1105- Issue #28037: Use sqlite3_get_autocommit() instead of setting
1106  Connection->inTransaction manually.
1107
1108- Issue #25283: Attributes tm_gmtoff and tm_zone are now available on
1109  all platforms in the return values of time.localtime() and
1110  time.gmtime().
1111
1112- Issue #24454: Regular expression match object groups are now
1113  accessible using __getitem__.  "mo[x]" is equivalent to
1114  "mo.group(x)".
1115
1116- Issue #10740: sqlite3 no longer implicitly commit an open transaction
1117  before DDL statements.
1118
1119- Issue #17941: Add a *module* parameter to collections.namedtuple().
1120
1121- Issue #22493: Inline flags now should be used only at the start of the
1122  regular expression.  Deprecation warning is emitted if uses them in the
1123  middle of the regular expression.
1124
1125- Issue #26885: xmlrpc now supports unmarshalling additional data types used
1126  by Apache XML-RPC implementation for numerics and None.
1127
1128- Issue #28070: Fixed parsing inline verbose flag in regular expressions.
1129
1130- Issue #19500: Add client-side SSL session resumption to the ssl module.
1131
1132- Issue #28022: Deprecate ssl-related arguments in favor of SSLContext. The
1133  deprecation include manual creation of SSLSocket and certfile/keyfile
1134  (or similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib.
1135
1136- Issue #28043: SSLContext has improved default settings: OP_NO_SSLv2,
1137  OP_NO_SSLv3, OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE,
1138  OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE and HIGH ciphers without MD5.
1139
1140- Issue #24693: Changed some RuntimeError's in the zipfile module to more
1141  appropriate types. Improved some error messages and debugging output.
1142
1143- Issue #17909: ``json.load`` and ``json.loads`` now support binary input
1144  encoded as UTF-8, UTF-16 or UTF-32. Patch by Serhiy Storchaka.
1145
1146- Issue #27137: the pure Python fallback implementation of ``functools.partial``
1147  now matches the behaviour of its accelerated C counterpart for subclassing,
1148  pickling and text representation purposes. Patch by Emanuel Barry and
1149  Serhiy Storchaka.
1150
1151- Fix possible integer overflows and crashes in the mmap module with unusual
1152  usage patterns.
1153
1154- Issue #1703178: Fix the ability to pass the --link-objects option to the
1155  distutils build_ext command.
1156
1157- Issue #28019: itertools.count() no longer rounds non-integer step in range
1158  between 1.0 and 2.0 to 1.
1159
1160- Issue #18401: Pdb now supports the 'readrc' keyword argument to control
1161  whether .pdbrc files should be read.  Patch by Martin Matusiak and
1162  Sam Kimbrel.
1163
1164- Issue #25969: Update the lib2to3 grammar to handle the unpacking
1165  generalizations added in 3.5.
1166
1167- Issue #14977: mailcap now respects the order of the lines in the mailcap
1168  files ("first match"), as required by RFC 1542.  Patch by Michael Lazar.
1169
1170- Issue #28082: Convert re flag constants to IntFlag.
1171
1172- Issue #28025: Convert all ssl module constants to IntEnum and IntFlags.
1173  SSLContext properties now return flags and enums.
1174
1175- Issue #23591: Add Flag, IntFlag, and auto() to enum module.
1176
1177- Issue #433028: Added support of modifier spans in regular expressions.
1178
1179- Issue #24594: Validates persist parameter when opening MSI database
1180
1181- Issue #17582: xml.etree.ElementTree nows preserves whitespaces in attributes
1182  (Patch by Duane Griffin.  Reviewed and approved by Stefan Behnel.)
1183
1184- Issue #28047: Fixed calculation of line length used for the base64 CTE
1185  in the new email policies.
1186
1187- Issue #27576: Fix call order in OrderedDict.__init__().
1188
1189- email.generator.DecodedGenerator now supports the policy keyword.
1190
1191- Issue #28027: Remove undocumented modules from ``Lib/plat-*``: IN, CDROM,
1192  DLFCN, TYPES, CDIO, and STROPTS.
1193
1194- Issue #27445: Don't pass str(_charset) to MIMEText.set_payload().
1195  Patch by Claude Paroz.
1196
1197- Issue #24277: The new email API is no longer provisional, and the docs
1198  have been reorganized and rewritten to emphasize the new API.
1199
1200- Issue #22450: urllib now includes an "Accept: */*" header among the
1201  default headers.  This makes the results of REST API requests more
1202  consistent and predictable especially when proxy servers are involved.
1203
1204- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
1205  between runs given the same Grammar.txt input regardless of the hash
1206  randomization setting.
1207
1208- Issue #28005: Allow ImportErrors in encoding implementation to propagate.
1209
1210- Issue #26667: Support path-like objects in importlib.util.
1211
1212- Issue #27570: Avoid zero-length memcpy() etc calls with null source
1213  pointers in the "ctypes" and "array" modules.
1214
1215- Issue #22233: Break email header lines *only* on the RFC specified CR and LF
1216  characters, not on arbitrary unicode line breaks.  This also fixes a bug in
1217  HTTP header parsing.
1218
1219- Issue 27331: The email.mime classes now all accept an optional policy keyword.
1220
1221- Issue 27988: Fix email iter_attachments incorrect mutation of payload list.
1222
1223- Issue #16113: Add SHA-3 and SHAKE support to hashlib module.
1224
1225- Eliminate a tautological-pointer-compare warning in _scproxy.c.
1226
1227- Issue #27776: The :func:`os.urandom` function does now block on Linux 3.17
1228  and newer until the system urandom entropy pool is initialized to increase
1229  the security. This change is part of the :pep:`524`.
1230
1231- Issue #27778: Expose the Linux ``getrandom()`` syscall as a new
1232  :func:`os.getrandom` function. This change is part of the :pep:`524`.
1233
1234- Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name
1235  fields in X.509 certs.
1236
1237- Issue #18844: Add random.choices().
1238
1239- Issue #25761: Improved error reporting about truncated pickle data in
1240  C implementation of unpickler.  UnpicklingError is now raised instead of
1241  AttributeError and ValueError in some cases.
1242
1243- Issue #26798: Add BLAKE2 (blake2b and blake2s) to hashlib.
1244
1245- Issue #26032: Optimized globbing in pathlib by using os.scandir(); it is now
1246  about 1.5--4 times faster.
1247
1248- Issue #25596: Optimized glob() and iglob() functions in the
1249  glob module; they are now about 3--6 times faster.
1250
1251- Issue #27928: Add scrypt (password-based key derivation function) to
1252  hashlib module (requires OpenSSL 1.1.0).
1253
1254- Issue #27850: Remove 3DES from ssl module's default cipher list to counter
1255  measure sweet32 attack (CVE-2016-2183).
1256
1257- Issue #27766: Add ChaCha20 Poly1305 to ssl module's default ciper list.
1258  (Required OpenSSL 1.1.0 or LibreSSL).
1259
1260- Issue #25387: Check return value of winsound.MessageBeep.
1261
1262- Issue #27866: Add SSLContext.get_ciphers() method to get a list of all
1263  enabled ciphers.
1264
1265- Issue #27744: Add AF_ALG (Linux Kernel crypto) to socket module.
1266
1267- Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0.
1268
1269- Issue #11620: Fix support for SND_MEMORY in winsound.PlaySound.  Based on a
1270  patch by Tim Lesher.
1271
1272- Issue #11734: Add support for IEEE 754 half-precision floats to the
1273  struct module. Based on a patch by Eli Stevens.
1274
1275- Issue #27919: Deprecated ``extra_path`` distribution option in distutils
1276  packaging.
1277
1278- Issue #23229: Add new ``cmath`` constants: ``cmath.inf`` and ``cmath.nan`` to
1279  match ``math.inf`` and ``math.nan``, and also ``cmath.infj`` and
1280  ``cmath.nanj`` to match the format used by complex repr.
1281
1282- Issue #27842: The csv.DictReader now returns rows of type OrderedDict.
1283  (Contributed by Steve Holden.)
1284
1285- Remove support for passing a file descriptor to os.access. It never worked but
1286  previously didn't raise.
1287
1288- Issue #12885: Fix error when distutils encounters symlink.
1289
1290- Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
1291  Based on patch by Xiang Zhang.
1292
1293- Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory
1294  creates not a cursor.  Patch by Xiang Zhang.
1295
1296- Issue #19884: Avoid spurious output on OS X with Gnu Readline.
1297
1298- Issue #27706: Restore deterministic behavior of random.Random().seed()
1299  for string seeds using seeding version 1.  Allows sequences of calls
1300  to random() to exactly match those obtained in Python 2.
1301  Patch by Nofar Schnider.
1302
1303- Issue #10513: Fix a regression in Connection.commit().  Statements should
1304  not be reset after a commit.
1305
1306- Issue #12319: Chunked transfer encoding support added to
1307  http.client.HTTPConnection requests.  The
1308  urllib.request.AbstractHTTPHandler class does not enforce a Content-Length
1309  header any more.  If a HTTP request has a file or iterable body, but no
1310  Content-Length header, the library now falls back to use chunked transfer-
1311  encoding.
1312
1313- A new version of typing.py from https://github.com/python/typing:
1314  - Collection (only for 3.6) (Issue #27598)
1315  - Add FrozenSet to __all__ (upstream #261)
1316  - fix crash in _get_type_vars() (upstream #259)
1317  - Remove the dict constraint in ForwardRef._eval_type (upstream #252)
1318
1319- Issue #27832: Make ``_normalize`` parameter to ``Fraction`` constuctor
1320  keyword-only, so that ``Fraction(2, 3, 4)`` now raises ``TypeError``.
1321
1322- Issue #27539: Fix unnormalised ``Fraction.__pow__`` result in the case
1323  of negative exponent and negative base.
1324
1325- Issue #21718: cursor.description is now available for queries using CTEs.
1326
1327- Issue #27819: In distutils sdists, simply produce the "gztar" (gzipped tar
1328  format) distributions on all platforms unless "formats" is supplied.
1329
1330- Issue #2466: posixpath.ismount now correctly recognizes mount points which
1331  the user does not have permission to access.
1332
1333- Issue #9998: On Linux, ctypes.util.find_library now looks in LD_LIBRARY_PATH
1334  for shared libraries.
1335
1336- Issue #27573: exit message for code.interact is now configurable.
1337
1338- Issue #27930: Improved behaviour of logging.handlers.QueueListener.
1339  Thanks to Paulo Andrade and Petr Viktorin for the analysis and patch.
1340
1341- Issue #6766: Distributed reference counting added to multiprocessing
1342  to support nesting of shared values / proxy objects.
1343
1344- Issue #21201: Improves readability of multiprocessing error message.  Thanks
1345  to Wojciech Walczak for patch.
1346
1347- asyncio: Add set_protocol / get_protocol to Transports.
1348
1349- Issue #27456: asyncio: Set TCP_NODELAY by default.
1350
1351IDLE
1352----
1353
1354- Issue #15308: Add 'interrupt execution' (^C) to Shell menu.
1355  Patch by Roger Serwy, updated by Bayard Randel.
1356
1357- Issue #27922: Stop IDLE tests from 'flashing' gui widgets on the screen.
1358
1359- Issue #27891: Consistently group and sort imports within idlelib modules.
1360
1361- Issue #17642: add larger font sizes for classroom projection.
1362
1363- Add version to title of IDLE help window.
1364
1365- Issue #25564: In section on IDLE -- console differences, mention that
1366  using exec means that __builtins__ is defined for each statement.
1367
1368- Issue #27821: Fix 3.6.0a3 regression that prevented custom key sets
1369  from being selected when no custom theme was defined.
1370
1371C API
1372-----
1373
1374- Issue #26900: Excluded underscored names and other private API from limited API.
1375
1376- Issue #26027: Add support for path-like objects in PyUnicode_FSConverter() &
1377  PyUnicode_FSDecoder().
1378
1379Tests
1380-----
1381
1382- Issue #27427: Additional tests for the math module. Patch by Francisco Couzo.
1383
1384- Issue #27953: Skip math and cmath tests that fail on OS X 10.4 due to a
1385  poor libm implementation of tan.
1386
1387- Issue #26040: Improve test_math and test_cmath coverage and rigour. Patch by
1388  Jeff Allen.
1389
1390- Issue #27787: Call gc.collect() before checking each test for "dangling
1391  threads", since the dangling threads are weak references.
1392
1393Build
1394-----
1395
1396- Issue #27566: Fix clean target in freeze makefile (patch by Lisa Roach)
1397
1398- Issue #27705: Update message in validate_ucrtbase.py
1399
1400- Issue #27976: Deprecate building _ctypes with the bundled copy of libffi on
1401  non-OSX UNIX platforms.
1402
1403- Issue #27983: Cause lack of llvm-profdata tool when using clang as
1404  required for PGO linking to be a configure time error rather than
1405  make time when --with-optimizations is enabled.  Also improve our
1406  ability to find the llvm-profdata tool on MacOS and some Linuxes.
1407
1408- Issue #21590: Support for DTrace and SystemTap probes.
1409
1410- Issue #26307: The profile-opt build now applies PGO to the built-in modules.
1411
1412- Issue #26359: Add the --with-optimizations flag to turn on LTO and PGO build
1413  support when available.
1414
1415- Issue #27917: Set platform triplets for Android builds.
1416
1417- Issue #25825: Update references to the $(LIBPL) installation path on AIX.
1418  This path was changed in 3.2a4.
1419
1420- Update OS X installer to use SQLite 3.14.1 and XZ 5.2.2.
1421
1422- Issue #21122: Fix LTO builds on OS X.
1423
1424- Issue #17128: Build OS X installer with a private copy of OpenSSL.
1425  Also provide a sample Install Certificates command script to install a
1426  set of root certificates from the third-party certifi module.
1427
1428Tools/Demos
1429-----------
1430
1431- Issue #27952: Get Tools/scripts/fixcid.py working with Python 3 and the
1432  current "re" module, avoid invalid Python backslash escapes, and fix a bug
1433  parsing escaped C quote signs.
1434
1435Windows
1436-------
1437
1438- Issue #28065: Update xz dependency to 5.2.2 and build it from source.
1439
1440- Issue #25144: Ensures TargetDir is set before continuing with custom
1441  install.
1442
1443- Issue #1602: Windows console doesn't input or print Unicode (PEP 528)
1444
1445- Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529)
1446
1447- Issue #27731: Opt-out of MAX_PATH on Windows 10
1448
1449- Issue #6135: Adds encoding and errors parameters to subprocess.
1450
1451- Issue #27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to
1452  codec lookup.
1453
1454- Issue #27982: The functions of the winsound module now accept keyword
1455  arguments.
1456
1457- Issue #20366: Build full text search support into SQLite on Windows.
1458
1459- Issue #27756: Adds new icons for Python files and processes on Windows.
1460  Designs by Cherry Wang.
1461
1462- Issue #27883: Update sqlite to 3.14.1.0 on Windows.
1463
1464
1465What's New in Python 3.6.0 alpha 4?
1466===================================
1467
1468*Release date: 2016-08-15*
1469
1470Core and Builtins
1471-----------------
1472
1473- Issue #27704: Optimized creating bytes and bytearray from byte-like objects
1474  and iterables.  Speed up to 3 times for short objects.  Original patch by
1475  Naoki Inada.
1476
1477- Issue #26823: Large sections of repeated lines in tracebacks are now
1478  abbreviated as "[Previous line repeated {count} more times]" by the builtin
1479  traceback rendering. Patch by Emanuel Barry.
1480
1481- Issue #27574: Decreased an overhead of parsing keyword arguments in functions
1482  implemented with using Argument Clinic.
1483
1484- Issue #22557: Now importing already imported modules is up to 2.5 times
1485  faster.
1486
1487- Issue #17596: Include <wincrypt.h> to help with Min GW building.
1488
1489- Issue #17599: On Windows, rename the privately defined REPARSE_DATA_BUFFER
1490  structure to avoid conflicting with the definition from Min GW.
1491
1492- Issue #27507: Add integer overflow check in bytearray.extend().  Patch by
1493  Xiang Zhang.
1494
1495- Issue #27581: Don't rely on wrapping for overflow check in
1496  PySequence_Tuple().  Patch by Xiang Zhang.
1497
1498- Issue #1621: Avoid signed integer overflow in list and tuple operations.
1499  Patch by Xiang Zhang.
1500
1501- Issue #27419: Standard __import__() no longer look up "__import__" in globals
1502  or builtins for importing submodules or "from import".  Fixed a crash if
1503  raise a warning about unabling to resolve package from __spec__ or
1504  __package__.
1505
1506- Issue #27083: Respect the PYTHONCASEOK environment variable under Windows.
1507
1508- Issue #27514: Make having too many statically nested blocks a SyntaxError
1509  instead of SystemError.
1510
1511- Issue #27366: Implemented PEP 487 (Simpler customization of class creation).
1512  Upon subclassing, the __init_subclass__ classmethod is called on the base
1513  class. Descriptors are initialized with __set_name__ after class creation.
1514
1515Library
1516-------
1517
1518- Issue #26027, #27524: Add PEP 519/__fspath__() support to the os and os.path
1519  modules. Includes code from Jelle Zijlstra.
1520
1521- Issue #27598: Add Collections to collections.abc.
1522  Patch by Ivan Levkivskyi, docs by Neil Girdhar.
1523
1524- Issue #25958: Support "anti-registration" of special methods from
1525  various ABCs, like __hash__, __iter__ or __len__.  All these (and
1526  several more) can be set to None in an implementation class and the
1527  behavior will be as if the method is not defined at all.
1528  (Previously, this mechanism existed only for __hash__, to make
1529  mutable classes unhashable.)  Code contributed by Andrew Barnert and
1530  Ivan Levkivskyi.
1531
1532- Issue #16764: Support keyword arguments to zlib.decompress().  Patch by
1533  Xiang Zhang.
1534
1535- Issue #27736: Prevent segfault after interpreter re-initialization due
1536  to ref count problem introduced in code for Issue #27038 in 3.6.0a3.
1537  Patch by Xiang Zhang.
1538
1539- Issue #25628:  The *verbose* and *rename* parameters for
1540  collections.namedtuple are now keyword-only.
1541
1542- Issue #12345: Add mathematical constant tau to math and cmath. See also
1543  PEP 628.
1544
1545- Issue #26823: traceback.StackSummary.format now abbreviates large sections of
1546  repeated lines as "[Previous line repeated {count} more times]" (this change
1547  then further affects other traceback display operations in the module). Patch
1548  by Emanuel Barry.
1549
1550- Issue #27664: Add to concurrent.futures.thread.ThreadPoolExecutor()
1551  the ability to specify a thread name prefix.
1552
1553- Issue #27181: Add geometric_mean and harmonic_mean to statistics module.
1554
1555- Issue #27573: code.interact now prints an message when exiting.
1556
1557- Issue #6422: Add autorange method to timeit.Timer objects.
1558
1559- Issue #27773: Correct some memory management errors server_hostname in
1560  _ssl.wrap_socket().
1561
1562- Issue #26750: unittest.mock.create_autospec() now works properly for
1563  subclasses of property() and other data descriptors.  Removes the never
1564  publicly used, never documented unittest.mock.DescriptorTypes tuple.
1565
1566- Issue #26754: Undocumented support of general bytes-like objects
1567  as path in compile() and similar functions is now deprecated.
1568
1569- Issue #26800: Undocumented support of general bytes-like objects
1570  as paths in os functions is now deprecated.
1571
1572- Issue #26981: Add _order_ compatibility shim to enum.Enum for
1573  Python 2/3 code bases.
1574
1575- Issue #27661: Added tzinfo keyword argument to datetime.combine.
1576
1577- In the curses module, raise an error if window.getstr() or window.instr() is
1578  passed a negative value.
1579
1580- Issue #27783: Fix possible usage of uninitialized memory in
1581  operator.methodcaller.
1582
1583- Issue #27774: Fix possible Py_DECREF on unowned object in _sre.
1584
1585- Issue #27760: Fix possible integer overflow in binascii.b2a_qp.
1586
1587- Issue #27758: Fix possible integer overflow in the _csv module for large
1588  record lengths.
1589
1590- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
1591  HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
1592  that the script is in CGI mode.
1593
1594- Issue #7063: Remove dead code from the "array" module's slice handling.
1595  Patch by Chuck.
1596
1597- Issue #27656: Do not assume sched.h defines any SCHED_* constants.
1598
1599- Issue #27130: In the "zlib" module, fix handling of large buffers
1600  (typically 4 GiB) when compressing and decompressing.  Previously, inputs
1601  were limited to 4 GiB, and compression and decompression operations did not
1602  properly handle results of 4 GiB.
1603
1604- Issue #24773: Implemented PEP 495 (Local Time Disambiguation).
1605
1606- Expose the EPOLLEXCLUSIVE constant (when it is defined) in the select module.
1607
1608- Issue #27567: Expose the EPOLLRDHUP and POLLRDHUP constants in the select
1609  module.
1610
1611- Issue #1621: Avoid signed int negation overflow in the "audioop" module.
1612
1613- Issue #27533: Release GIL in nt._isdir
1614
1615- Issue #17711: Fixed unpickling by the persistent ID with protocol 0.
1616  Original patch by Alexandre Vassalotti.
1617
1618- Issue #27522: Avoid an unintentional reference cycle in email.feedparser.
1619
1620- Issue #27512: Fix a segfault when os.fspath() called an __fspath__() method
1621  that raised an exception. Patch by Xiang Zhang.
1622
1623IDLE
1624----
1625
1626- Issue #27714: text_textview and test_autocomplete now pass when re-run
1627  in the same process.  This occurs when test_idle fails when run with the
1628  -w option but without -jn.  Fix warning from test_config.
1629
1630- Issue #27621: Put query response validation error messages in the query
1631  box itself instead of in a separate massagebox.  Redo tests to match.
1632  Add Mac OSX refinements.  Original patch by Mark Roseman.
1633
1634- Issue #27620: Escape key now closes Query box as cancelled.
1635
1636- Issue #27609: IDLE: tab after initial whitespace should tab, not
1637  autocomplete. This fixes problem with writing docstrings at least
1638  twice indented.
1639
1640- Issue #27609: Explicitly return None when there are also non-None
1641  returns. In a few cases, reverse a condition and eliminate a return.
1642
1643- Issue #25507: IDLE no longer runs buggy code because of its tkinter imports.
1644  Users must include the same imports required to run directly in Python.
1645
1646- Issue #27173: Add 'IDLE Modern Unix' to the built-in key sets.
1647  Make the default key set depend on the platform.
1648  Add tests for the changes to the config module.
1649
1650- Issue #27452: add line counter and crc to IDLE configHandler test dump.
1651
1652Tests
1653-----
1654
1655- Issue #25805: Skip a test in test_pkgutil as needed that doesn't work when
1656  ``__name__ == __main__``. Patch by SilentGhost.
1657
1658- Issue #27472: Add test.support.unix_shell as the path to the default shell.
1659
1660- Issue #27369: In test_pyexpat, avoid testing an error message detail that
1661  changed in Expat 2.2.0.
1662
1663- Issue #27594: Prevent assertion error when running test_ast with coverage
1664  enabled: ensure code object has a valid first line number.
1665  Patch suggested by Ivan Levkivskyi.
1666
1667Windows
1668-------
1669
1670- Issue #27647: Update bundled Tcl/Tk to 8.6.6.
1671
1672- Issue #27610: Adds PEP 514 metadata to Windows installer
1673
1674- Issue #27469: Adds a shell extension to the launcher so that drag and drop
1675  works correctly.
1676
1677- Issue #27309: Enables proper Windows styles in python[w].exe manifest.
1678
1679Build
1680-----
1681
1682- Issue #27713: Suppress spurious build warnings when updating importlib's
1683  bootstrap files.  Patch by Xiang Zhang
1684
1685- Issue #25825: Correct the references to Modules/python.exp, which is
1686  required on AIX.  The references were accidentally changed in 3.5.0a1.
1687
1688- Issue #27453: CPP invocation in configure must use CPPFLAGS. Patch by
1689  Chi Hsuan Yen.
1690
1691- Issue #27641: The configure script now inserts comments into the makefile
1692  to prevent the pgen and _freeze_importlib executables from being cross-
1693  compiled.
1694
1695- Issue #26662: Set PYTHON_FOR_GEN in configure as the Python program to be
1696  used for file generation during the build.
1697
1698- Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
1699  Also update FreedBSD version checks for the original ctype UTF-8 workaround.
1700
1701
1702What's New in Python 3.6.0 alpha 3?
1703===================================
1704
1705*Release date: 2016-07-11*
1706
1707Core and Builtins
1708-----------------
1709
1710- Issue #27473: Fixed possible integer overflow in bytes and bytearray
1711  concatenations.  Patch by Xiang Zhang.
1712
1713- Issue #23034: The output of a special Python build with defined COUNT_ALLOCS,
1714  SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by  default.  It can
1715  be re-enabled using the "-X showalloccount" option.  It now outputs to stderr
1716  instead of stdout.
1717
1718- Issue #27443: __length_hint__() of bytearray iterators no longer return a
1719  negative integer for a resized bytearray.
1720
1721- Issue #27007: The fromhex() class methods of bytes and bytearray subclasses
1722  now return an instance of corresponding subclass.
1723
1724Library
1725-------
1726
1727- Issue #26844: Fix error message for imp.find_module() to refer to 'path'
1728  instead of 'name'. Patch by Lev Maximov.
1729
1730- Issue #23804: Fix SSL zero-length recv() calls to not block and not raise
1731  an error about unclean EOF.
1732
1733- Issue #27466: Change time format returned by http.cookie.time2netscape,
1734  confirming the netscape cookie format and making it consistent with
1735  documentation.
1736
1737- Issue #21708: Deprecated dbm.dumb behavior that differs from common dbm
1738  behavior: creating a database in 'r' and 'w' modes and modifying a database
1739  in 'r' mode.
1740
1741- Issue #26721: Change the socketserver.StreamRequestHandler.wfile attribute
1742  to implement BufferedIOBase. In particular, the write() method no longer
1743  does partial writes.
1744
1745- Issue #22115: Added methods trace_add, trace_remove and trace_info in the
1746  tkinter.Variable class.  They replace old methods trace_variable, trace,
1747  trace_vdelete and trace_vinfo that use obsolete Tcl commands and might
1748  not work in future versions of Tcl.  Fixed old tracing methods:
1749  trace_vdelete() with wrong mode no longer break tracing, trace_vinfo() now
1750  always returns a list of pairs of strings, tracing in the "u" mode now works.
1751
1752- Issue #26243: Only the level argument to zlib.compress() is keyword argument
1753  now.  The first argument is positional-only.
1754
1755- Issue #27038: Expose the DirEntry type as os.DirEntry. Code patch by
1756  Jelle Zijlstra.
1757
1758- Issue #27186: Update os.fspath()/PyOS_FSPath() to check the return value of
1759  __fspath__() to be either str or bytes.
1760
1761- Issue #18726: All optional parameters of the dump(), dumps(),
1762  load() and loads() functions and JSONEncoder and JSONDecoder class
1763  constructors in the json module are now keyword-only.
1764
1765- Issue #27319: Methods selection_set(), selection_add(), selection_remove()
1766  and selection_toggle() of ttk.TreeView now allow passing multiple items as
1767  multiple arguments instead of passing them as a tuple.  Deprecated
1768  undocumented ability of calling the selection() method with arguments.
1769
1770- Issue #27079: Fixed curses.ascii functions isblank(), iscntrl() and ispunct().
1771
1772- Issue #27294: Numerical state in the repr for Tkinter event objects is now
1773  represented as a combination of known flags.
1774
1775- Issue #27177: Match objects in the re module now support index-like objects
1776  as group indices.  Based on patches by Jeroen Demeyer and Xiang Zhang.
1777
1778- Issue #26754: Some functions (compile() etc) accepted a filename argument
1779  encoded as an iterable of integers. Now only strings and byte-like objects
1780  are accepted.
1781
1782- Issue #26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by
1783  Daniel Stokes.
1784
1785- Issue #27048: Prevents distutils failing on Windows when environment
1786  variables contain non-ASCII characters
1787
1788- Issue #27330: Fixed possible leaks in the ctypes module.
1789
1790- Issue #27238: Got rid of bare excepts in the turtle module.  Original patch
1791  by Jelle Zijlstra.
1792
1793- Issue #27122: When an exception is raised within the context being managed
1794  by a contextlib.ExitStack() and one of the exit stack generators
1795  catches and raises it in a chain, do not re-raise the original exception
1796  when exiting, let the new chained one through.  This avoids the PEP 479
1797  bug described in issue25782.
1798
1799- [Security] Issue #27278: Fix os.urandom() implementation using getrandom() on
1800  Linux.  Truncate size to INT_MAX and loop until we collected enough random
1801  bytes, instead of casting a directly Py_ssize_t to int.
1802
1803- Issue #16864: sqlite3.Cursor.lastrowid now supports REPLACE statement.
1804  Initial patch by Alex LordThorsen.
1805
1806- Issue #26386: Fixed ttk.TreeView selection operations with item id's
1807  containing spaces.
1808
1809- Issue #8637: Honor a pager set by the env var MANPAGER (in preference to
1810  one set by the env var PAGER).
1811
1812- [Security] Issue #22636: Avoid shell injection problems with
1813  ctypes.util.find_library().
1814
1815- Issue #16182: Fix various functions in the "readline" module to use the
1816  locale encoding, and fix get_begidx() and get_endidx() to return code point
1817  indexes.
1818
1819- Issue #27392: Add loop.connect_accepted_socket().
1820  Patch by Jim Fulton.
1821
1822IDLE
1823----
1824
1825- Issue #27477: IDLE search dialogs now use ttk widgets.
1826
1827- Issue #27173: Add 'IDLE Modern Unix' to the built-in key sets.
1828  Make the default key set depend on the platform.
1829  Add tests for the changes to the config module.
1830
1831- Issue #27452: make command line "idle-test> python test_help.py" work.
1832  __file__ is relative when python is started in the file's directory.
1833
1834- Issue #27452: add line counter and crc to IDLE configHandler test dump.
1835
1836- Issue #27380: IDLE: add query.py with base Query dialog and ttk widgets.
1837  Module had subclasses SectionName, ModuleName, and HelpSource, which are
1838  used to get information from users by configdialog and file =>Load Module.
1839  Each subclass has itw own validity checks.  Using ModuleName allows users
1840  to edit bad module names instead of starting over.
1841  Add tests and delete the two files combined into the new one.
1842
1843- Issue #27372: Test_idle no longer changes the locale.
1844
1845- Issue #27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names.
1846
1847- Issue #27245: IDLE: Cleanly delete custom themes and key bindings.
1848  Previously, when IDLE was started from a console or by import, a cascade
1849  of warnings was emitted.  Patch by Serhiy Storchaka.
1850
1851- Issue #24137: Run IDLE, test_idle, and htest with tkinter default root
1852  disabled.  Fix code and tests that fail with this restriction.  Fix htests to
1853  not create a second and redundant root and mainloop.
1854
1855- Issue #27310: Fix IDLE.app failure to launch on OS X due to vestigial import.
1856
1857C API
1858-----
1859
1860- Issue #26754: PyUnicode_FSDecoder() accepted a filename argument encoded as
1861  an iterable of integers. Now only strings and byte-like objects are accepted.
1862
1863Build
1864-----
1865
1866- Issue #28066: Fix the logic that searches build directories for generated
1867  include files when building outside the source tree.
1868
1869- Issue #27442: Expose the Android API level that python was built against, in
1870  sysconfig.get_config_vars() as 'ANDROID_API_LEVEL'.
1871
1872- Issue #27434: The interpreter that runs the cross-build, found in PATH, must
1873  now be of the same feature version (e.g. 3.6) as the source being built.
1874
1875- Issue #26930: Update Windows builds to use OpenSSL 1.0.2h.
1876
1877- Issue #23968: Rename the platform directory from plat-$(MACHDEP) to
1878  plat-$(PLATFORM_TRIPLET).
1879  Rename the config directory (LIBPL) from config-$(LDVERSION) to
1880  config-$(LDVERSION)-$(PLATFORM_TRIPLET).
1881  Install the platform specifc _sysconfigdata module into the platform
1882  directory and rename it to include the ABIFLAGS.
1883
1884- Don't use largefile support for GNU/Hurd.
1885
1886Tools/Demos
1887-----------
1888
1889- Issue #27332: Fixed the type of the first argument of module-level functions
1890  generated by Argument Clinic.  Patch by Petr Viktorin.
1891
1892- Issue #27418: Fixed Tools/importbench/importbench.py.
1893
1894Documentation
1895-------------
1896
1897- Issue #19489: Moved the search box from the sidebar to the header and footer
1898  of each page.  Patch by Ammar Askar.
1899
1900- Issue #27285: Update documentation to reflect the deprecation of ``pyvenv``
1901  and normalize on the term "virtual environment". Patch by Steve Piercy.
1902
1903Tests
1904-----
1905
1906- Issue #27027: Added test.support.is_android that is True when this is an
1907  Android build.
1908
1909
1910What's New in Python 3.6.0 alpha 2?
1911===================================
1912
1913*Release date: 2016-06-13*
1914
1915Core and Builtins
1916-----------------
1917
1918- Issue #27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes.
1919  Patch by Demur Rumed.
1920
1921- Issue #27190: Raise NotSupportedError if sqlite3 is older than 3.3.1.
1922  Patch by Dave Sawyer.
1923
1924- Issue #27286: Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode.  Calling
1925  function with generalized unpacking (PEP 448) and conflicting keyword names
1926  could cause undefined behavior.
1927
1928- Issue #27140: Added BUILD_CONST_KEY_MAP opcode.
1929
1930- Issue #27186: Add support for os.PathLike objects to open() (part of PEP 519).
1931
1932- Issue #27066: Fixed SystemError if a custom opener (for open()) returns a
1933  negative number without setting an exception.
1934
1935- Issue #26983: float() now always return an instance of exact float.
1936  The deprecation warning is emitted if __float__ returns an instance of
1937  a strict subclass of float.  In a future versions of Python this can
1938  be an error.
1939
1940- Issue #27097: Python interpreter is now about 7% faster due to optimized
1941  instruction decoding.  Based on patch by Demur Rumed.
1942
1943- Issue #26647: Python interpreter now uses 16-bit wordcode instead of bytecode.
1944  Patch by Demur Rumed.
1945
1946- Issue #23275: Allow assigning to an empty target list in round brackets:
1947  () = iterable.
1948
1949- Issue #27243: Update the __aiter__ protocol: instead of returning
1950  an awaitable that resolves to an asynchronous iterator, the asynchronous
1951  iterator should be returned directly.  Doing the former will trigger a
1952  PendingDeprecationWarning.
1953
1954
1955Library
1956-------
1957
1958- Comment out socket (SO_REUSEPORT) and posix (O_SHLOCK, O_EXLOCK) constants
1959  exposed on the API which are not implemented on GNU/Hurd. They would not
1960  work at runtime anyway.
1961
1962- Issue #27025: Generated names for Tkinter widgets are now more meanful
1963  and recognizirable.
1964
1965- Issue #25455: Fixed crashes in repr of recursive ElementTree.Element and
1966  functools.partial objects.
1967
1968- Issue #27294: Improved repr for Tkinter event objects.
1969
1970- Issue #20508: Improve exception message of IPv{4,6}Network.__getitem__.
1971  Patch by Gareth Rees.
1972
1973- [Security] Issue #26556: Update expat to 2.1.1, fixes CVE-2015-1283.
1974
1975- [Security] Fix TLS stripping vulnerability in smtplib, CVE-2016-0772.
1976  Reported by Team Oststrom.
1977
1978- Issue #21386: Implement missing IPv4Address.is_global property.  It was
1979  documented since 07a5610bae9d.  Initial patch by Roger Luethi.
1980
1981- Issue #27029: Removed deprecated support of universal newlines mode from
1982  ZipFile.open().
1983
1984- Issue #27030: Unknown escapes consisting of ``'\'`` and an ASCII letter in
1985  regular expressions now are errors.  The re.LOCALE flag now can be used
1986  only with bytes patterns.
1987
1988- Issue #27186: Add os.PathLike support to DirEntry (part of PEP 519).
1989  Initial patch by Jelle Zijlstra.
1990
1991- Issue #20900: distutils register command now decodes HTTP responses
1992  correctly.  Initial patch by ingrid.
1993
1994- Issue #27186: Add os.PathLike support to pathlib, removing its provisional
1995  status (part of PEP 519). Initial patch by Dusty Phillips.
1996
1997- Issue #27186: Add support for os.PathLike objects to os.fsencode() and
1998  os.fsdecode() (part of PEP 519).
1999
2000- Issue #27186: Introduce os.PathLike and os.fspath() (part of PEP 519).
2001
2002- A new version of typing.py provides several new classes and
2003  features: @overload outside stubs, Reversible, DefaultDict, Text,
2004  ContextManager, Type[], NewType(), TYPE_CHECKING, and numerous bug
2005  fixes (note that some of the new features are not yet implemented in
2006  mypy or other static analyzers).  Also classes for PEP 492
2007  (Awaitable, AsyncIterable, AsyncIterator) have been added (in fact
2008  they made it into 3.5.1 but were never mentioned).
2009
2010- Issue #25738: Stop http.server.BaseHTTPRequestHandler.send_error() from
2011  sending a message body for 205 Reset Content.  Also, don't send Content
2012  header fields in responses that don't have a body.  Patch by Susumu
2013  Koshiba.
2014
2015- Issue #21313: Fix the "platform" module to tolerate when sys.version
2016  contains truncated build information.
2017
2018- [Security] Issue #26839: On Linux, :func:`os.urandom` now calls
2019  ``getrandom()`` with ``GRND_NONBLOCK`` to fall back on reading
2020  ``/dev/urandom`` if the urandom entropy pool is not initialized yet. Patch
2021  written by Colm Buckley.
2022
2023- Issue #23883: Added missing APIs to __all__ to match the documented APIs
2024  for the following modules: cgi, mailbox, mimetypes, plistlib and smtpd.
2025  Patches by Jacek Kołodziej.
2026
2027- Issue #27164: In the zlib module, allow decompressing raw Deflate streams
2028  with a predefined zdict.  Based on patch by Xiang Zhang.
2029
2030- Issue #24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely
2031  write data to the client.  Previously it could do partial writes and
2032  truncate data.  Also, wsgiref.handler.ServerHandler can now handle stdout
2033  doing partial writes, but this is deprecated.
2034
2035- Issue #21272: Use _sysconfigdata.py to initialize distutils.sysconfig.
2036
2037- Issue #19611: :mod:`inspect` now reports the implicit ``.0`` parameters
2038  generated by the compiler for comprehension and generator expression scopes
2039  as if they were positional-only parameters called ``implicit0``.
2040  Patch by Jelle Zijlstra.
2041
2042- Issue #26809: Add ``__all__`` to :mod:`string`.  Patch by Emanuel Barry.
2043
2044- Issue #26373: subprocess.Popen.communicate now correctly ignores
2045  BrokenPipeError when the child process dies before .communicate()
2046  is called in more/all circumstances.
2047
2048- signal, socket, and ssl module IntEnum constant name lookups now return a
2049  consistent name for values having multiple names.  Ex: signal.Signals(6)
2050  now refers to itself as signal.SIGALRM rather than flipping between that
2051  and signal.SIGIOT based on the interpreter's hash randomization seed.
2052
2053- Issue #27167: Clarify the subprocess.CalledProcessError error message text
2054  when the child process died due to a signal.
2055
2056- Issue #25931: Don't define socketserver.Forking* names on platforms such
2057  as Windows that do not support os.fork().
2058
2059- Issue #21776: distutils.upload now correctly handles HTTPError.
2060  Initial patch by Claudiu Popa.
2061
2062- Issue #26526: Replace custom parse tree validation in the parser
2063  module with a simple DFA validator.
2064
2065- Issue #27114: Fix SSLContext._load_windows_store_certs fails with
2066  PermissionError
2067
2068- Issue #18383: Avoid creating duplicate filters when using filterwarnings
2069  and simplefilter.  Based on patch by Alex Shkop.
2070
2071- Issue #23026: winreg.QueryValueEx() now return an integer for REG_QWORD type.
2072
2073- Issue #26741: subprocess.Popen destructor now emits a ResourceWarning warning
2074  if the child process is still running.
2075
2076- Issue #27056: Optimize pickle.load() and pickle.loads(), up to 10% faster
2077  to deserialize a lot of small objects.
2078
2079- Issue #21271: New keyword only parameters in reset_mock call.
2080
2081IDLE
2082----
2083
2084- Issue #5124: Paste with text selected now replaces the selection on X11.
2085  This matches how paste works on Windows, Mac, most modern Linux apps,
2086  and ttk widgets.  Original patch by Serhiy Storchaka.
2087
2088- Issue #24750: Switch all scrollbars in IDLE to ttk versions.
2089  Where needed, minimal tests are added to cover changes.
2090
2091- Issue #24759: IDLE requires tk 8.5 and availability ttk widgets.
2092  Delete now unneeded tk version tests and code for older versions.
2093  Add test for IDLE syntax colorizoer.
2094
2095- Issue #27239: idlelib.macosx.isXyzTk functions initialize as needed.
2096
2097- Issue #27262: move Aqua unbinding code, which enable context menus, to maxosx.
2098
2099- Issue #24759: Make clear in idlelib.idle_test.__init__ that the directory
2100  is a private implementation of test.test_idle and tool for maintainers.
2101
2102- Issue #27196: Stop 'ThemeChanged' warnings when running IDLE tests.
2103  These persisted after other warnings were suppressed in #20567.
2104  Apply Serhiy Storchaka's update_idletasks solution to four test files.
2105  Record this additional advice in idle_test/README.txt
2106
2107- Issue #20567: Revise idle_test/README.txt with advice about avoiding
2108  tk warning messages from tests.  Apply advice to several IDLE tests.
2109
2110- Issue #24225: Update idlelib/README.txt with new file names
2111  and event handlers.
2112
2113- Issue #27156: Remove obsolete code not used by IDLE.  Replacements:
2114  1. help.txt, replaced by help.html, is out-of-date and should not be used.
2115  Its dedicated viewer has be replaced by the html viewer in help.py.
2116  2. ``import idlever; I = idlever.IDLE_VERSION`` is the same as
2117  ``import sys; I = version[:version.index(' ')]``
2118  3. After ``ob = stackviewer.VariablesTreeItem(*args)``,
2119  ``ob.keys() == list(ob.object.keys)``.
2120  4. In macosc, runningAsOSXAPP == isAquaTk; idCarbonAquaTk == isCarbonTk
2121
2122- Issue #27117: Make colorizer htest and turtledemo work with dark themes.
2123  Move code for configuring text widget colors to a new function.
2124
2125- Issue #24225: Rename many `idlelib/*.py` and `idle_test/test_*.py` files.
2126  Edit files to replace old names with new names when the old name
2127  referred to the module rather than the class it contained.
2128  See the issue and IDLE section in What's New in 3.6 for more.
2129
2130- Issue #26673: When tk reports font size as 0, change to size 10.
2131  Such fonts on Linux prevented the configuration dialog from opening.
2132
2133- Issue #21939: Add test for IDLE's percolator.
2134  Original patch by Saimadhav Heblikar.
2135
2136- Issue #21676: Add test for IDLE's replace dialog.
2137  Original patch by Saimadhav Heblikar.
2138
2139- Issue #18410: Add test for IDLE's search dialog.
2140  Original patch by Westley Martínez.
2141
2142- Issue #21703: Add test for undo delegator.  Patch mostly by
2143  Saimadhav Heblikar .
2144
2145- Issue #27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks.
2146
2147- Issue #23977: Add more asserts to test_delegator.
2148
2149Documentation
2150-------------
2151
2152- Issue #16484: Change the default PYTHONDOCS URL to "https:", and fix the
2153  resulting links to use lowercase.  Patch by Sean Rodman, test by Kaushik
2154  Nadikuditi.
2155
2156- Issue #24136: Document the new PEP 448 unpacking syntax of 3.5.
2157
2158- Issue #22558: Add remaining doc links to source code for Python-coded modules.
2159  Patch by Yoni Lavi.
2160
2161Tests
2162-----
2163
2164- Issue #25285: regrtest now uses subprocesses when the -j1 command line option
2165  is used: each test file runs in a fresh child process. Before, the -j1 option
2166  was ignored.
2167
2168- Issue #25285: Tools/buildbot/test.bat script now uses -j1 by default to run
2169  each test file in fresh child process.
2170
2171Windows
2172-------
2173
2174- Issue #27064: The py.exe launcher now defaults to Python 3.
2175  The Windows launcher ``py.exe`` no longer prefers an installed
2176  Python 2 version over Python 3 by default when used interactively.
2177
2178Build
2179-----
2180
2181- Issue #27229: Fix the cross-compiling pgen rule for in-tree builds.  Patch
2182  by Xavier de Gaye.
2183
2184- Issue #26930: Update OS X 10.5+ 32-bit-only installer to build
2185  and link with OpenSSL 1.0.2h.
2186
2187Misc
2188----
2189
2190- Issue #17500, and https://github.com/python/pythondotorg/issues/945: Remove
2191  unused and outdated icons.
2192
2193C API
2194-----
2195
2196- Issue #27186: Add the PyOS_FSPath() function (part of PEP 519).
2197
2198- Issue #26282: PyArg_ParseTupleAndKeywords() now supports positional-only
2199  parameters.
2200
2201Tools/Demos
2202-----------
2203
2204- Issue #26282: Argument Clinic now supports positional-only and keyword
2205  parameters in the same function.
2206
2207
2208What's New in Python 3.6.0 alpha 1?
2209===================================
2210
2211Release date: 2016-05-16
2212
2213Core and Builtins
2214-----------------
2215
2216- Issue #20041: Fixed TypeError when frame.f_trace is set to None.
2217  Patch by Xavier de Gaye.
2218
2219- Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
2220  format unit.
2221
2222- Issue #26991: Fix possible refleak when creating a function with annotations.
2223
2224- Issue #27039: Fixed bytearray.remove() for values greater than 127.  Based on
2225  patch by Joe Jevnik.
2226
2227- Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses.
2228
2229- Issue #27005: Optimized the float.fromhex() class method for exact float.
2230  It is now 2 times faster.
2231
2232- Issue #18531: Single var-keyword argument of dict subtype was passed
2233  unscathed to the C-defined function.  Now it is converted to exact dict.
2234
2235- Issue #26811: gc.get_objects() no longer contains a broken tuple with NULL
2236  pointer.
2237
2238- Issue #20120: Use RawConfigParser for .pypirc parsing,
2239  removing support for interpolation unintentionally added
2240  with move to Python 3. Behavior no longer does any
2241  interpolation in .pypirc files, matching behavior in Python
2242  2.7 and Setuptools 19.0.
2243
2244- Issue #26249: Memory functions of the :c:func:`PyMem_Malloc` domain
2245  (:c:data:`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc allocator <pymalloc>`
2246  rather than system :c:func:`malloc`. Applications calling
2247  :c:func:`PyMem_Malloc` without holding the GIL can now crash: use
2248  ``PYTHONMALLOC=debug`` environment variable to validate the usage of memory
2249  allocators in your application.
2250
2251- Issue #26802: Optimize function calls only using unpacking like
2252  ``func(*tuple)`` (no other positional argument, no keyword): avoid copying
2253  the tuple. Patch written by Joe Jevnik.
2254
2255- Issue #26659: Make the builtin slice type support cycle collection.
2256
2257- Issue #26718: super.__init__ no longer leaks memory if called multiple times.
2258  NOTE: A direct call of super.__init__ is not endorsed!
2259
2260- Issue #27138: Fix the doc comment for FileFinder.find_spec().
2261
2262- Issue #27147: Mention PEP 420 in the importlib docs.
2263
2264- Issue #25339: PYTHONIOENCODING now has priority over locale in setting the
2265  error handler for stdin and stdout.
2266
2267- Issue #26494: Fixed crash on iterating exhausting iterators.
2268  Affected classes are generic sequence iterators, iterators of str, bytes,
2269  bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
2270  views and os.scandir() iterator.
2271
2272- Issue #26574: Optimize ``bytes.replace(b'', b'.')`` and
2273  ``bytearray.replace(b'', b'.')``. Patch written by Josh Snider.
2274
2275- Issue #26581: If coding cookie is specified multiple times on a line in
2276  Python source code file, only the first one is taken to account.
2277
2278- Issue #19711: Add tests for reloading namespace packages.
2279
2280- Issue #21099: Switch applicable importlib tests to use PEP 451 API.
2281
2282- Issue #26563: Debug hooks on Python memory allocators now raise a fatal
2283  error if functions of the :c:func:`PyMem_Malloc` family are called without
2284  holding the GIL.
2285
2286- Issue #26564: On error, the debug hooks on Python memory allocators now use
2287  the :mod:`tracemalloc` module to get the traceback where a memory block was
2288  allocated.
2289
2290- Issue #26558: The debug hooks on Python memory allocator
2291  :c:func:`PyObject_Malloc` now detect when functions are called without
2292  holding the GIL.
2293
2294- Issue #26516: Add :envvar:`PYTHONMALLOC` environment variable to set the
2295  Python memory allocators and/or install debug hooks.
2296
2297- Issue #26516: The :c:func:`PyMem_SetupDebugHooks` function can now also be
2298  used on Python compiled in release mode.
2299
2300- Issue #26516: The :envvar:`PYTHONMALLOCSTATS` environment variable can now
2301  also be used on Python compiled in release mode. It now has no effect if
2302  set to an empty string.
2303
2304- Issue #26516: In debug mode, debug hooks are now also installed on Python
2305  memory allocators when Python is configured without pymalloc.
2306
2307- Issue #26464: Fix str.translate() when string is ASCII and first replacements
2308  removes character, but next replacement uses a non-ASCII character or a
2309  string longer than 1 character. Regression introduced in Python 3.5.0.
2310
2311- Issue #22836: Ensure exception reports from PyErr_Display() and
2312  PyErr_WriteUnraisable() are sensible even when formatting them produces
2313  secondary errors.  This affects the reports produced by
2314  sys.__excepthook__() and when __del__() raises an exception.
2315
2316- Issue #26302: Correct behavior to reject comma as a legal character for
2317  cookie names.
2318
2319- Issue #26136: Upgrade the warning when a generator raises StopIteration
2320  from PendingDeprecationWarning to DeprecationWarning.  Patch by Anish
2321  Shah.
2322
2323- Issue #26204: The compiler now ignores all constant statements: bytes, str,
2324  int, float, complex, name constants (None, False, True), Ellipsis
2325  and ast.Constant; not only str and int. For example, ``1.0`` is now ignored
2326  in ``def f(): 1.0``.
2327
2328- Issue #4806: Avoid masking the original TypeError exception when using star
2329  (*) unpacking in function calls.  Based on patch by Hagen Fürstenau and
2330  Daniel Urban.
2331
2332- Issue #26146: Add a new kind of AST node: ``ast.Constant``. It can be used
2333  by external AST optimizers, but the compiler does not emit directly such
2334  node.
2335
2336- Issue #23601:  Sped-up allocation of dict key objects by using Python's
2337  small object allocator.  (Contributed by Julian Taylor.)
2338
2339- Issue #18018: Import raises ImportError instead of SystemError if a relative
2340  import is attempted without a known parent package.
2341
2342- Issue #25843: When compiling code, don't merge constants if they are equal
2343  but have a different types. For example, ``f1, f2 = lambda: 1, lambda: 1.0``
2344  is now correctly compiled to two different functions: ``f1()`` returns ``1``
2345  (``int``) and ``f2()`` returns ``1.0`` (``float``), even if ``1`` and ``1.0``
2346  are equal.
2347
2348- Issue #26107: The format of the ``co_lnotab`` attribute of code objects
2349  changes to support negative line number delta.
2350
2351- Issue #26154: Add a new private _PyThreadState_UncheckedGet() function to get
2352  the current Python thread state, but don't issue a fatal error if it is NULL.
2353  This new function must be used instead of accessing directly the
2354  _PyThreadState_Current variable.  The variable is no more exposed since
2355  Python 3.5.1 to hide the exact implementation of atomic C types, to avoid
2356  compiler issues.
2357
2358- Issue #25791: If __package__ != __spec__.parent or if neither __package__ or
2359  __spec__ are defined then ImportWarning is raised.
2360
2361- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
2362  _PyObject_GetState() due to regressions observed in Cython-based projects.
2363
2364- Issue #25961: Disallowed null characters in the type name.
2365
2366- Issue #25973: Fix segfault when an invalid nonlocal statement binds a name
2367  starting with two underscores.
2368
2369- Issue #22995: Instances of extension types with a state that aren't
2370  subclasses of list or dict and haven't implemented any pickle-related
2371  methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__,
2372  or __getstate__), can no longer be pickled.  Including memoryview.
2373
2374- Issue #20440: Massive replacing unsafe attribute setting code with special
2375  macro Py_SETREF.
2376
2377- Issue #25766: Special method __bytes__() now works in str subclasses.
2378
2379- Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
2380  This allows sys.getsize() to work correctly with their subclasses with
2381  __slots__ defined.
2382
2383- Issue #25709: Fixed problem with in-place string concatenation and utf-8
2384  cache.
2385
2386- Issue #5319: New Py_FinalizeEx() API allowing Python to set an exit status
2387  of 120 on failure to flush buffered streams.
2388
2389- Issue #25485: telnetlib.Telnet is now a context manager.
2390
2391- Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
2392  __getattr__.
2393
2394- Issue #24731: Fixed crash on converting objects with special methods
2395  __bytes__, __trunc__, and __float__ returning instances of subclasses of
2396  bytes, int, and float to subclasses of bytes, int, and float correspondingly.
2397
2398- Issue #25630: Fix a possible segfault during argument parsing in functions
2399  that accept filesystem paths.
2400
2401- Issue #23564: Fixed a partially broken sanity check in the _posixsubprocess
2402  internals regarding how fds_to_pass were passed to the child.  The bug had
2403  no actual impact as subprocess.py already avoided it.
2404
2405- Issue #25388: Fixed tokenizer crash when processing undecodable source code
2406  with a null byte.
2407
2408- Issue #25462: The hash of the key now is calculated only once in most
2409  operations in C implementation of OrderedDict.
2410
2411- Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
2412  rejects builtin types with not defined __new__.
2413
2414- Issue #24802: Avoid buffer overreads when int(), float(), compile(), exec()
2415  and eval() are passed bytes-like objects.  These objects are not
2416  necessarily terminated by a null byte, but the functions assumed they were.
2417
2418- Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node
2419  when compiling AST from Python objects.
2420
2421- Issue #24726: Fixed a crash and leaking NULL in repr() of OrderedDict that
2422  was mutated by direct calls of dict methods.
2423
2424- Issue #25449: Iterating OrderedDict with keys with unstable hash now raises
2425  KeyError in C implementations as well as in Python implementation.
2426
2427- Issue #25395: Fixed crash when highly nested OrderedDict structures were
2428  garbage collected.
2429
2430- Issue #25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now
2431  between 2x and 3.5x faster.
2432
2433- Issue #25399: Optimize bytearray % args using the new private _PyBytesWriter
2434  API. Formatting is now between 2.5 and 5 times faster.
2435
2436- Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
2437  recursion limit is too low depending at the current recursion depth. Modify
2438  also the "lower-water mark" formula to make it monotonic. This mark is used
2439  to decide when the overflowed flag of the thread state is reset.
2440
2441- Issue #24402: Fix input() to prompt to the redirected stdout when
2442  sys.stdout.fileno() fails.
2443
2444- Issue #25349: Optimize bytes % args using the new private _PyBytesWriter API.
2445  Formatting is now up to 2 times faster.
2446
2447- Issue #24806: Prevent builtin types that are not allowed to be subclassed from
2448  being subclassed through multiple inheritance.
2449
2450- Issue #25301: The UTF-8 decoder is now up to 15 times as fast for error
2451  handlers: ``ignore``, ``replace`` and ``surrogateescape``.
2452
2453- Issue #24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
2454
2455- Issue #25267: The UTF-8 encoder is now up to 75 times as fast for error
2456  handlers: ``ignore``, ``replace``, ``surrogateescape``, ``surrogatepass``.
2457  Patch co-written with Serhiy Storchaka.
2458
2459- Issue #25280: Import trace messages emitted in verbose (-v) mode are no
2460  longer formatted twice.
2461
2462- Issue #25227: Optimize ASCII and latin1 encoders with the ``surrogateescape``
2463  error handler: the encoders are now up to 3 times as fast. Initial patch
2464  written by Serhiy Storchaka.
2465
2466- Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the
2467  getrandom() function instead of the getentropy() function. The getentropy()
2468  function is blocking to generate very good quality entropy, os.urandom()
2469  doesn't need such high-quality entropy.
2470
2471- Issue #9232: Modify Python's grammar to allow trailing commas in the
2472  argument list of a function declaration.  For example, "def f(\*, a =
2473  3,): pass" is now legal. Patch from Mark Dickinson.
2474
2475- Issue #24965: Implement PEP 498 "Literal String Interpolation". This
2476  allows you to embed expressions inside f-strings, which are
2477  converted to normal strings at run time. Given x=3, then
2478  f'value={x}' == 'value=3'. Patch by Eric V. Smith.
2479
2480- Issue #26478: Fix semantic bugs when using binary operators with dictionary
2481  views and tuples.
2482
2483- Issue #26171: Fix possible integer overflow and heap corruption in
2484  zipimporter.get_data().
2485
2486- Issue #25660: Fix TAB key behaviour in REPL with readline.
2487
2488- Issue #26288: Optimize PyLong_AsDouble.
2489
2490- Issues #26289 and #26315: Optimize floor and modulo division for
2491  single-digit longs.  Microbenchmarks show 2-2.5x improvement.  Built-in
2492  'divmod' function is now also ~10% faster.
2493
2494- Issue #25887: Raise a RuntimeError when a coroutine object is awaited
2495  more than once.
2496
2497Library
2498-------
2499
2500- Issue #27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
2501  SELinux and fails with EACCESS. The function now falls back to fcntl().
2502  Patch written by Michał Bednarski.
2503
2504- Issue #27014: Fix infinite recursion using typing.py.  Thanks to Kalle Tuure!
2505
2506- Issue #27031: Removed dummy methods in Tkinter widget classes: tk_menuBar()
2507  and tk_bindForTraversal().
2508
2509- Issue #14132: Fix urllib.request redirect handling when the target only has
2510  a query string.  Original fix by Ján Janech.
2511
2512- Issue #17214: The "urllib.request" module now percent-encodes non-ASCII
2513  bytes found in redirect target URLs.  Some servers send Location header
2514  fields with non-ASCII bytes, but "http.client" requires the request target
2515  to be ASCII-encodable, otherwise a UnicodeEncodeError is raised.  Based on
2516  patch by Christian Heimes.
2517
2518- Issue #27033: The default value of the decode_data parameter for
2519  smtpd.SMTPChannel and smtpd.SMTPServer constructors is changed to False.
2520
2521- Issue #27034: Removed deprecated class asynchat.fifo.
2522
2523- Issue #26870: Added readline.set_auto_history(), which can stop entries
2524  being automatically added to the history list.  Based on patch by Tyler
2525  Crompton.
2526
2527- Issue #26039: zipfile.ZipFile.open() can now be used to write data into a ZIP
2528  file, as well as for extracting data.  Patch by Thomas Kluyver.
2529
2530- Issue #26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch
2531  contributed by Chi Hsuan Yen.
2532
2533- Issue #22274: In the subprocess module, allow stderr to be redirected to
2534  stdout even when stdout is not redirected.  Patch by Akira Li.
2535
2536- Issue #26807: mock_open 'files' no longer error on readline at end of file.
2537  Patch from Yolanda Robla.
2538
2539- Issue #25745: Fixed leaking a userptr in curses panel destructor.
2540
2541- Issue #26977: Removed unnecessary, and ignored, call to sum of squares helper
2542  in statistics.pvariance.
2543
2544- Issue #26002: Use bisect in statistics.median instead of a linear search.
2545  Patch by Upendra Kuma.
2546
2547- Issue #25974: Make use of new Decimal.as_integer_ratio() method in statistics
2548  module. Patch by Stefan Krah.
2549
2550- Issue #26996: Add secrets module as described in PEP 506.
2551
2552- Issue #26881: The modulefinder module now supports extended opcode arguments.
2553
2554- Issue #23815: Fixed crashes related to directly created instances of types in
2555  _tkinter and curses.panel modules.
2556
2557- Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
2558  Patch by Georg Brandl.
2559
2560- Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
2561  instead of silently return incorrect result.
2562
2563- Issue #26915:  The __contains__ methods in the collections ABCs now check
2564  for identity before checking equality.  This better matches the behavior
2565  of the concrete classes, allows sensible handling of NaNs, and makes it
2566  easier to reason about container invariants.
2567
2568- Issue #26711: Fixed the comparison of plistlib.Data with other types.
2569
2570- Issue #24114: Fix an uninitialized variable in `ctypes.util`.
2571
2572  The bug only occurs on SunOS when the ctypes implementation searches
2573  for the `crle` program.  Patch by Xiang Zhang.  Tested on SunOS by
2574  Kees Bos.
2575
2576- Issue #26864: In urllib.request, change the proxy bypass host checking
2577  against no_proxy to be case-insensitive, and to not match unrelated host
2578  names that happen to have a bypassed hostname as a suffix.  Patch by Xiang
2579  Zhang.
2580
2581- Issue #24902: Print server URL on http.server startup.  Initial patch by
2582  Felix Kaiser.
2583
2584- Issue #25788: fileinput.hook_encoded() now supports an "errors" argument
2585  for passing to open.  Original patch by Joseph Hackman.
2586
2587- Issue #26634: recursive_repr() now sets __qualname__ of wrapper.  Patch by
2588  Xiang Zhang.
2589
2590- Issue #26804: urllib.request will prefer lower_case proxy environment
2591  variables over UPPER_CASE or Mixed_Case ones. Patch contributed by Hans-Peter
2592  Jansen.
2593
2594- Issue #26837: assertSequenceEqual() now correctly outputs non-stringified
2595  differing items (like bytes in the -b mode).  This affects assertListEqual()
2596  and assertTupleEqual().
2597
2598- Issue #26041: Remove "will be removed in Python 3.7" from deprecation
2599  messages of platform.dist() and platform.linux_distribution().
2600  Patch by Kumaripaba Miyurusara Athukorala.
2601
2602- Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
2603  silently ignore keyword arguments.
2604
2605- Issue #26733: Disassembling a class now disassembles class and static methods.
2606  Patch by Xiang Zhang.
2607
2608- Issue #26801: Fix error handling in :func:`shutil.get_terminal_size`, catch
2609  :exc:`AttributeError` instead of :exc:`NameError`. Patch written by Emanuel
2610  Barry.
2611
2612- Issue #24838: tarfile's ustar and gnu formats now correctly calculate name
2613  and link field limits for multibyte character encodings like utf-8.
2614
2615- [Security] Issue #26657: Fix directory traversal vulnerability with
2616  http.server on Windows.  This fixes a regression that was introduced in
2617  3.3.4rc1 and 3.4.0rc1.  Based on patch by Philipp Hagemeister.
2618
2619- Issue #26717: Stop encoding Latin-1-ized WSGI paths with UTF-8.  Patch by
2620  Anthony Sottile.
2621
2622- Issue #26782: Add STARTUPINFO to subprocess.__all__ on Windows.
2623
2624- Issue #26404: Add context manager to socketserver.  Patch by Aviv Palivoda.
2625
2626- Issue #26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading
2627  more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of
2628  1024 bytes per call.
2629
2630- Issue #26585: Eliminate http.server._quote_html() and use
2631  html.escape(quote=False).  Patch by Xiang Zhang.
2632
2633- Issue #26685: Raise OSError if closing a socket fails.
2634
2635- Issue #16329: Add .webm to mimetypes.types_map.  Patch by Giampaolo Rodola'.
2636
2637- Issue #13952: Add .csv to mimetypes.types_map.  Patch by Geoff Wilson.
2638
2639- Issue #26587: the site module now allows .pth files to specify files to be
2640  added to sys.path (e.g. zip files).
2641
2642- Issue #25609: Introduce contextlib.AbstractContextManager and
2643  typing.ContextManager.
2644
2645- Issue #26709: Fixed Y2038 problem in loading binary PLists.
2646
2647- Issue #23735: Handle terminal resizing with Readline 6.3+ by installing our
2648  own SIGWINCH handler.  Patch by Eric Price.
2649
2650- Issue #25951: Change SSLSocket.sendall() to return None, as explicitly
2651  documented for plain socket objects.  Patch by Aviv Palivoda.
2652
2653- Issue #26586: In http.server, respond with "413 Request header fields too
2654  large" if there are too many header fields to parse, rather than killing
2655  the connection and raising an unhandled exception.  Patch by Xiang Zhang.
2656
2657- Issue #26676: Added missing XMLPullParser to ElementTree.__all__.
2658
2659- Issue #22854: Change BufferedReader.writable() and
2660  BufferedWriter.readable() to always return False.
2661
2662- Issue #26492: Exhausted iterator of array.array now conforms with the behavior
2663  of iterators of other mutable sequences: it lefts exhausted even if iterated
2664  array is extended.
2665
2666- Issue #26641: doctest.DocFileTest and doctest.testfile() now support
2667  packages (module splitted into multiple directories) for the package
2668  parameter.
2669
2670- Issue #25195: Fix a regression in mock.MagicMock. _Call is a subclass of
2671  tuple (changeset 3603bae63c13 only works for classes) so we need to
2672  implement __ne__ ourselves.  Patch by Andrew Plummer.
2673
2674- Issue #26644: Raise ValueError rather than SystemError when a negative
2675  length is passed to SSLSocket.recv() or read().
2676
2677- Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
2678  instead of up to 1024.
2679
2680- Issue #26616: Fixed a bug in datetime.astimezone() method.
2681
2682- Issue #26637: The :mod:`importlib` module now emits an :exc:`ImportError`
2683  rather than a :exc:`TypeError` if :func:`__import__` is tried during the
2684  Python shutdown process but :data:`sys.path` is already cleared (set to
2685  ``None``).
2686
2687- Issue #21925: :func:`warnings.formatwarning` now catches exceptions when
2688  calling :func:`linecache.getline` and
2689  :func:`tracemalloc.get_object_traceback` to be able to log
2690  :exc:`ResourceWarning` emitted late during the Python shutdown process.
2691
2692- Issue #23848: On Windows, faulthandler.enable() now also installs an
2693  exception handler to dump the traceback of all Python threads on any Windows
2694  exception, not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT).
2695
2696- Issue #26530: Add C functions :c:func:`_PyTraceMalloc_Track` and
2697  :c:func:`_PyTraceMalloc_Untrack` to track memory blocks using the
2698  :mod:`tracemalloc` module. Add :c:func:`_PyTraceMalloc_GetTraceback` to get
2699  the traceback of an object.
2700
2701- Issue #26588: The _tracemalloc now supports tracing memory allocations of
2702  multiple address spaces (domains).
2703
2704- Issue #24266: Ctrl+C during Readline history search now cancels the search
2705  mode when compiled with Readline 7.
2706
2707- Issue #26590: Implement a safe finalizer for the _socket.socket type. It now
2708  releases the GIL to close the socket.
2709
2710- Issue #18787: spwd.getspnam() now raises a PermissionError if the user
2711  doesn't have privileges.
2712
2713- Issue #26560: Avoid potential ValueError in BaseHandler.start_response.
2714  Initial patch by Peter Inglesby.
2715
2716- Issue #26567: Add a new function :c:func:`PyErr_ResourceWarning` function to
2717  pass the destroyed object. Add a *source* attribute to
2718  :class:`warnings.WarningMessage`. Add warnings._showwarnmsg() which uses
2719  tracemalloc to get the traceback where source object was allocated.
2720
2721- [Security] Issue #26313: ssl.py _load_windows_store_certs fails if windows
2722  cert store is empty. Patch by Baji.
2723
2724- Issue #26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex`
2725  to support importing packages.
2726
2727- Issue #26499: Account for remaining Content-Length in
2728  HTTPResponse.readline() and read1().  Based on patch by Silent Ghost.
2729  Also document that HTTPResponse now supports these methods.
2730
2731- Issue #25320: Handle sockets in directories unittest discovery is scanning.
2732  Patch from Victor van den Elzen.
2733
2734- Issue #16181: cookiejar.http2time() now returns None if year is higher than
2735  datetime.MAXYEAR.
2736
2737- Issue #26513: Fixes platform module detection of Windows Server
2738
2739- Issue #23718: Fixed parsing time in week 0 before Jan 1.  Original patch by
2740  Tamás Bence Gedai.
2741
2742- Issue #26323: Add Mock.assert_called() and Mock.assert_called_once()
2743  methods to unittest.mock. Patch written by Amit Saha.
2744
2745- Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise
2746  NotImplementedError instead of ImportError.
2747
2748- Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
2749
2750- Issue #15068: Got rid of excessive buffering in fileinput.
2751  The bufsize parameter is now deprecated and ignored.
2752
2753- Issue #19475: Added an optional argument timespec to the datetime
2754  isoformat() method to choose the precision of the time component.
2755
2756- Issue #2202: Fix UnboundLocalError in
2757  AbstractDigestAuthHandler.get_algorithm_impls.  Initial patch by Mathieu
2758  Dupuy.
2759
2760- Issue #26167: Minimized overhead in copy.copy() and copy.deepcopy().
2761  Optimized copying and deepcopying bytearrays, NotImplemented, slices,
2762  short lists, tuples, dicts, sets.
2763
2764- Issue #25718: Fixed pickling and copying the accumulate() iterator with
2765  total is None.
2766
2767- Issue #26475: Fixed debugging output for regular expressions with the (?x)
2768  flag.
2769
2770- Issue #26482: Allowed pickling recursive dequeues.
2771
2772- Issue #26335: Make mmap.write() return the number of bytes written like
2773  other write methods.  Patch by Jakub Stasiak.
2774
2775- Issue #26457: Fixed the subnets() methods in IP network classes for the case
2776  when resulting prefix length is equal to maximal prefix length.
2777  Based on patch by Xiang Zhang.
2778
2779- Issue #26385: Remove the file if the internal open() call in
2780  NamedTemporaryFile() fails.  Patch by Silent Ghost.
2781
2782- Issue #26402: Fix XML-RPC client to retry when the server shuts down a
2783  persistent connection.  This was a regression related to the new
2784  http.client.RemoteDisconnected exception in 3.5.0a4.
2785
2786- Issue #25913: Leading ``<~`` is optional now in base64.a85decode() with
2787  adobe=True.  Patch by Swati Jaiswal.
2788
2789- Issue #26186: Remove an invalid type check in importlib.util.LazyLoader.
2790
2791- Issue #26367: importlib.__import__() raises ImportError like
2792  builtins.__import__() when ``level`` is specified but without an accompanying
2793  package specified.
2794
2795- Issue #26309: In the "socketserver" module, shut down the request (closing
2796  the connected socket) when verify_request() returns false.  Patch by Aviv
2797  Palivoda.
2798
2799- Issue #23430: Change the socketserver module to only catch exceptions
2800  raised from a request handler that are derived from Exception (instead of
2801  BaseException).  Therefore SystemExit and KeyboardInterrupt no longer
2802  trigger the handle_error() method, and will now to stop a single-threaded
2803  server.
2804
2805- [Security] Issue #25939: On Windows open the cert store readonly in
2806  ssl.enum_certificates.
2807
2808- Issue #25995: os.walk() no longer uses FDs proportional to the tree depth.
2809
2810- Issue #25994: Added the close() method and the support of the context manager
2811  protocol for the os.scandir() iterator.
2812
2813- Issue #23992: multiprocessing: make MapResult not fail-fast upon exception.
2814
2815- Issue #26243: Support keyword arguments to zlib.compress().  Patch by Aviv
2816  Palivoda.
2817
2818- Issue #26117: The os.scandir() iterator now closes file descriptor not only
2819  when the iteration is finished, but when it was failed with error.
2820
2821- Issue #25949: __dict__ for an OrderedDict instance is now created only when
2822  needed.
2823
2824- Issue #25911: Restored support of bytes paths in os.walk() on Windows.
2825
2826- Issue #26045: Add UTF-8 suggestion to error message when posting a
2827  non-Latin-1 string with http.client.
2828
2829- Issue #26039: Added zipfile.ZipInfo.from_file() and zipinfo.ZipInfo.is_dir().
2830  Patch by Thomas Kluyver.
2831
2832- Issue #12923: Reset FancyURLopener's redirect counter even if there is an
2833  exception.  Based on patches by Brian Brazil and Daniel Rocco.
2834
2835- Issue #25945: Fixed a crash when unpickle the functools.partial object with
2836  wrong state.  Fixed a leak in failed functools.partial constructor.
2837  "args" and "keywords" attributes of functools.partial have now always types
2838  tuple and dict correspondingly.
2839
2840- Issue #26202: copy.deepcopy() now correctly copies range() objects with
2841  non-atomic attributes.
2842
2843- Issue #23076: Path.glob() now raises a ValueError if it's called with an
2844  invalid pattern.  Patch by Thomas Nyberg.
2845
2846- Issue #19883: Fixed possible integer overflows in zipimport.
2847
2848- Issue #26227: On Windows, getnameinfo(), gethostbyaddr() and
2849  gethostbyname_ex() functions of the socket module now decode the hostname
2850  from the ANSI code page rather than UTF-8.
2851
2852- Issue #26099: The site module now writes an error into stderr if
2853  sitecustomize module can be imported but executing the module raise an
2854  ImportError. Same change for usercustomize.
2855
2856- Issue #26147: xmlrpc now works with strings not encodable with used
2857  non-UTF-8 encoding.
2858
2859- Issue #25935: Garbage collector now breaks reference loops with OrderedDict.
2860
2861- Issue #16620: Fixed AttributeError in msilib.Directory.glob().
2862
2863- Issue #26013: Added compatibility with broken protocol 2 pickles created
2864  in old Python 3 versions (3.4.3 and lower).
2865
2866- Issue #26129: Deprecated accepting non-integers in grp.getgrgid().
2867
2868- Issue #25850: Use cross-compilation by default for 64-bit Windows.
2869
2870- Issue #25822: Add docstrings to the fields of urllib.parse results.
2871  Patch contributed by Swati Jaiswal.
2872
2873- Issue #22642: Convert trace module option parsing mechanism to argparse.
2874  Patch contributed by SilentGhost.
2875
2876- Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars
2877  appearing before $() vars.
2878
2879- Issue #26069: Remove the deprecated apis in the trace module.
2880
2881- Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
2882  original values after patching. Patch contributed by Sean McCully.
2883
2884- Issue #25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode
2885  option if it is safe to do so.
2886
2887- Issue #26012: Don't traverse into symlinks for ** pattern in
2888  pathlib.Path.[r]glob().
2889
2890- Issue #24120: Ignore PermissionError when traversing a tree with
2891  pathlib.Path.[r]glob().  Patch by Ulrich Petri.
2892
2893- Issue #21815: Accept ] characters in the data portion of imap responses,
2894  in order to handle the flags with square brackets accepted and produced
2895  by servers such as gmail.
2896
2897- Issue #25447: fileinput now uses sys.stdin as-is if it does not have a
2898  buffer attribute (restores backward compatibility).
2899
2900- Issue #25971: Optimized creating Fractions from floats by 2 times and from
2901  Decimals by 3 times.
2902
2903- Issue #25802: Document as deprecated the remaining implementations of
2904  importlib.abc.Loader.load_module().
2905
2906- Issue #25928: Add Decimal.as_integer_ratio().
2907
2908- Issue #25447: Copying the lru_cache() wrapper object now always works,
2909  independently from the type of the wrapped object (by returning the original
2910  object unchanged).
2911
2912- Issue #25768: Have the functions in compileall return booleans instead of
2913  ints and add proper documentation and tests for the return values.
2914
2915- Issue #24103: Fixed possible use after free in ElementTree.XMLPullParser.
2916
2917- Issue #25860: os.fwalk() no longer skips remaining directories when error
2918  occurs.  Original patch by Samson Lee.
2919
2920- Issue #25914: Fixed and simplified OrderedDict.__sizeof__.
2921
2922- Issue #25869: Optimized deepcopying ElementTree; it is now 20 times faster.
2923
2924- Issue #25873: Optimized iterating ElementTree.  Iterating elements
2925  Element.iter() is now 40% faster, iterating text Element.itertext()
2926  is now up to 2.5 times faster.
2927
2928- Issue #25902: Fixed various refcount issues in ElementTree iteration.
2929
2930- Issue #22227: The TarFile iterator is reimplemented using generator.
2931  This implementation is simpler that using class.
2932
2933- Issue #25638: Optimized ElementTree.iterparse(); it is now 2x faster.
2934  Optimized ElementTree parsing; it is now 10% faster.
2935
2936- Issue #25761: Improved detecting errors in broken pickle data.
2937
2938- Issue #25717: Restore the previous behaviour of tolerating most fstat()
2939  errors when opening files.  This was a regression in 3.5a1, and stopped
2940  anonymous temporary files from working in special cases.
2941
2942- Issue #24903: Fix regression in number of arguments compileall accepts when
2943  '-d' is specified.  The check on the number of arguments has been dropped
2944  completely as it never worked correctly anyway.
2945
2946- Issue #25764: In the subprocess module, preserve any exception caused by
2947  fork() failure when preexec_fn is used.
2948
2949- Issue #25771: Tweak the exception message for importlib.util.resolve_name()
2950  when 'package' isn't specified but necessary.
2951
2952- Issue #6478: _strptime's regexp cache now is reset after changing timezone
2953  with time.tzset().
2954
2955- Issue #14285: When executing a package with the "python -m package" option,
2956  and package initialization fails, a proper traceback is now reported.  The
2957  "runpy" module now lets exceptions from package initialization pass back to
2958  the caller, rather than raising ImportError.
2959
2960- Issue #19771: Also in runpy and the "-m" option, omit the irrelevant
2961  message ". . . is a package and cannot be directly executed" if the package
2962  could not even be initialized (e.g. due to a bad ``*.pyc`` file).
2963
2964- Issue #25177: Fixed problem with the mean of very small and very large
2965  numbers. As a side effect, statistics.mean and statistics.variance should
2966  be significantly faster.
2967
2968- Issue #25718: Fixed copying object with state with boolean value is false.
2969
2970- Issue #10131: Fixed deep copying of minidom documents.  Based on patch
2971  by Marian Ganisin.
2972
2973- Issue #7990: dir() on ElementTree.Element now lists properties: "tag",
2974  "text", "tail" and "attrib".  Original patch by Santoso Wijaya.
2975
2976- Issue #25725: Fixed a reference leak in pickle.loads() when unpickling
2977  invalid data including tuple instructions.
2978
2979- Issue #25663: In the Readline completer, avoid listing duplicate global
2980  names, and search the global namespace before searching builtins.
2981
2982- Issue #25688: Fixed file leak in ElementTree.iterparse() raising an error.
2983
2984- Issue #23914: Fixed SystemError raised by unpickler on broken pickle data.
2985
2986- Issue #25691: Fixed crash on deleting ElementTree.Element attributes.
2987
2988- Issue #25624: ZipFile now always writes a ZIP_STORED header for directory
2989  entries.  Patch by Dingyuan Wang.
2990
2991- Issue #25626: Change three zlib functions to accept sizes that fit in
2992  Py_ssize_t, but internally cap those sizes to UINT_MAX.  This resolves a
2993  regression in 3.5 where GzipFile.read() failed to read chunks larger than 2
2994  or 4 GiB.  The change affects the zlib.Decompress.decompress() max_length
2995  parameter, the zlib.decompress() bufsize parameter, and the
2996  zlib.Decompress.flush() length parameter.
2997
2998- Issue #25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True)
2999  when the OS gives priority to errors such as EACCES over EEXIST.
3000
3001- Issue #25593: Change semantics of EventLoop.stop() in asyncio.
3002
3003- Issue #6973: When we know a subprocess.Popen process has died, do
3004  not allow the send_signal(), terminate(), or kill() methods to do
3005  anything as they could potentially signal a different process.
3006
3007- Issue #23883: Added missing APIs to __all__ to match the documented APIs
3008  for the following modules: calendar, csv, enum, fileinput, ftplib, logging,
3009  optparse, tarfile, threading and wave.  Also added a
3010  test.support.check__all__() helper.  Patches by Jacek Kołodziej, Mauro
3011  S. M. Rodrigues and Joel Taddei.
3012
3013- Issue #25590: In the Readline completer, only call getattr() once per
3014  attribute.  Also complete names of attributes such as properties and slots
3015  which are listed by dir() but not yet created on an instance.
3016
3017- Issue #25498: Fix a crash when garbage-collecting ctypes objects created
3018  by wrapping a memoryview.  This was a regression made in 3.5a1.  Based
3019  on patch by Eryksun.
3020
3021- Issue #25584: Added "escape" to the __all__ list in the glob module.
3022
3023- Issue #25584: Fixed recursive glob() with patterns starting with '\*\*'.
3024
3025- Issue #25446: Fix regression in smtplib's AUTH LOGIN support.
3026
3027- Issue #18010: Fix the pydoc web server's module search function to handle
3028  exceptions from importing packages.
3029
3030- Issue #25554: Got rid of circular references in regular expression parsing.
3031
3032- Issue #18973: Command-line interface of the calendar module now uses argparse
3033  instead of optparse.
3034
3035- Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
3036  at the end if the FileInput was opened with binary mode.
3037  Patch by Ryosuke Ito.
3038
3039- Issue #25503: Fixed inspect.getdoc() for inherited docstrings of properties.
3040  Original patch by John Mark Vandenberg.
3041
3042- Issue #25515: Always use os.urandom as a source of randomness in uuid.uuid4.
3043
3044- Issue #21827: Fixed textwrap.dedent() for the case when largest common
3045  whitespace is a substring of smallest leading whitespace.
3046  Based on patch by Robert Li.
3047
3048- Issue #25447: The lru_cache() wrapper objects now can be copied and pickled
3049  (by returning the original object unchanged).
3050
3051- Issue #25390: typing: Don't crash on Union[str, Pattern].
3052
3053- Issue #25441: asyncio: Raise error from drain() when socket is closed.
3054
3055- Issue #25410: Cleaned up and fixed minor bugs in C implementation of
3056  OrderedDict.
3057
3058- Issue #25411: Improved Unicode support in SMTPHandler through better use of
3059  the email package. Thanks to user simon04 for the patch.
3060
3061- Move the imp module from a PendingDeprecationWarning to DeprecationWarning.
3062
3063- Issue #25407: Remove mentions of the formatter module being removed in
3064  Python 3.6.
3065
3066- Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
3067  that caused segmentation fault or hang in iterating after moving several
3068  items to the start of ordered dict.
3069
3070- Issue #25382: pickletools.dis() now outputs implicit memo index for the
3071  MEMOIZE opcode.
3072
3073- Issue #25357: Add an optional newline paramer to binascii.b2a_base64().
3074  base64.b64encode() uses it to avoid a memory copy.
3075
3076- Issue #24164: Objects that need calling ``__new__`` with keyword arguments,
3077  can now be pickled using pickle protocols older than protocol version 4.
3078
3079- Issue #25364: zipfile now works in threads disabled builds.
3080
3081- Issue #25328: smtpd's SMTPChannel now correctly raises a ValueError if both
3082  decode_data and enable_SMTPUTF8 are set to true.
3083
3084- Issue #16099: RobotFileParser now supports Crawl-delay and Request-rate
3085  extensions.  Patch by Nikolay Bogoychev.
3086
3087- Issue #25316: distutils raises OSError instead of DistutilsPlatformError
3088  when MSVC is not installed.
3089
3090- Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in
3091  pickletools.opcodes.
3092
3093- Issue #23972: Updates asyncio datagram create method allowing reuseport
3094  and reuseaddr socket options to be set prior to binding the socket.
3095  Mirroring the existing asyncio create_server method the reuseaddr option
3096  for datagram sockets defaults to True if the O/S is 'posix' (except if the
3097  platform is Cygwin). Patch by Chris Laws.
3098
3099- Issue #25304: Add asyncio.run_coroutine_threadsafe().  This lets you
3100  submit a coroutine to a loop from another thread, returning a
3101  concurrent.futures.Future.  By Vincent Michel.
3102
3103- Issue #25232: Fix CGIRequestHandler to split the query from the URL at the
3104  first question mark (?) rather than the last. Patch from Xiang Zhang.
3105
3106- Issue #24657: Prevent CGIRequestHandler from collapsing slashes in the
3107  query part of the URL as if it were a path. Patch from Xiang Zhang.
3108
3109- Issue #25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not
3110  supported. Check if it is supported, it may not be supported on OpenBSD for
3111  example.
3112
3113- Issue #23600: Default implementation of tzinfo.fromutc() was returning
3114  wrong results in some cases.
3115
3116- Issue #25203: Failed readline.set_completer_delims() no longer left the
3117  module in inconsistent state.
3118
3119- Issue #25011: rlcompleter now omits private and special attribute names unless
3120  the prefix starts with underscores.
3121
3122- Issue #25209: rlcompleter now can add a space or a colon after completed
3123  keyword.
3124
3125- Issue #22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'.
3126
3127- Issue #23517: fromtimestamp() and utcfromtimestamp() methods of
3128  datetime.datetime now round microseconds to nearest with ties going to
3129  nearest even integer (ROUND_HALF_EVEN), as round(float), instead of rounding
3130  towards -Infinity (ROUND_FLOOR).
3131
3132- Issue #23552: Timeit now warns when there is substantial (4x) variance
3133  between best and worst times. Patch from Serhiy Storchaka.
3134
3135- Issue #24633: site-packages/README -> README.txt.
3136
3137- Issue #24879: help() and pydoc can now list named tuple fields in the
3138  order they were defined rather than alphabetically.  The ordering is
3139  determined by the _fields attribute if present.
3140
3141- Issue #24874: Improve speed of itertools.cycle() and make its
3142  pickle more compact.
3143
3144- Fix crash in itertools.cycle.__setstate__() when the first argument wasn't
3145  a list.
3146
3147- Issue #20059: urllib.parse raises ValueError on all invalid ports.
3148  Patch by Martin Panter.
3149
3150- Issue #24360: Improve __repr__ of argparse.Namespace() for invalid
3151  identifiers.  Patch by Matthias Bussonnier.
3152
3153- Issue #23426: run_setup was broken in distutils.
3154  Patch from Alexander Belopolsky.
3155
3156- Issue #13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond.
3157
3158- Issue #2091: open() accepted a 'U' mode string containing '+', but 'U' can
3159  only be used with 'r'. Patch from Jeff Balogh and John O'Connor.
3160
3161- Issue #8585: improved tests for zipimporter2. Patch from Mark Lawrence.
3162
3163- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
3164  Patch from Nicola Palumbo and Laurent De Buyst.
3165
3166- Issue #24426: Fast searching optimization in regular expressions now works
3167  for patterns that starts with capturing groups.  Fast searching optimization
3168  now can't be disabled at compile time.
3169
3170- Issue #23661: unittest.mock side_effects can now be exceptions again. This
3171  was a regression vs Python 3.4. Patch from Ignacio Rossi
3172
3173- Issue #13248: Remove deprecated inspect.getmoduleinfo function.
3174
3175- Issue #25578: Fix (another) memory leak in SSLSocket.getpeercer().
3176
3177- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating
3178  ssl.SSLContext.
3179
3180- Issue #25569: Fix memory leak in SSLSocket.getpeercert().
3181
3182- Issue #25471: Sockets returned from accept() shouldn't appear to be
3183  nonblocking.
3184
3185- Issue #25319: When threading.Event is reinitialized, the underlying condition
3186  should use a regular lock rather than a recursive lock.
3187
3188- Skip getaddrinfo if host is already resolved.
3189  Patch by A. Jesse Jiryu Davis.
3190
3191- Issue #26050: Add asyncio.StreamReader.readuntil() method.
3192  Patch by Марк Коренберг.
3193
3194- Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on
3195  OS X versions 10.5 or higher.  Original patch by A. Jesse Jiryu Davis.
3196
3197- Issue #26406: Avoid unnecessary serialization of getaddrinfo(3) calls on
3198  current versions of OpenBSD and NetBSD.  Patch by A. Jesse Jiryu Davis.
3199
3200- Issue #26848: Fix asyncio/subprocess.communicate() to handle empty input.
3201  Patch by Jack O'Connor.
3202
3203- Issue #27040: Add loop.get_exception_handler method
3204
3205- Issue #27041: asyncio: Add loop.create_future method
3206
3207IDLE
3208----
3209
3210- Issue #20640: Add tests for idlelib.configHelpSourceEdit.
3211  Patch by Saimadhav Heblikar.
3212
3213- In the 'IDLE-console differences' section of the IDLE doc, clarify
3214  how running with IDLE affects sys.modules and the standard streams.
3215
3216- Issue #25507: fix incorrect change in IOBinding that prevented printing.
3217  Augment IOBinding htest to include all major IOBinding functions.
3218
3219- Issue #25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION
3220  MARK in README.txt and open this and NEWS.txt with 'ascii'.
3221  Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.
3222
3223- Issue #15348: Stop the debugger engine (normally in a user process)
3224  before closing the debugger window (running in the IDLE process).
3225  This prevents the RuntimeErrors that were being caught and ignored.
3226
3227- Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
3228  debugger is active (15347); b) closing the debugger with the [X] button
3229  (15348); and c) activating the debugger when already active (24455).
3230  The patch by Mark Roseman does this by making two changes.
3231  1. Suspend and resume the gui.interaction method with the tcl vwait
3232  mechanism intended for this purpose (instead of root.mainloop & .quit).
3233  2. In gui.run, allow any existing interaction to terminate first.
3234
3235- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
3236  to make it clearer that the program referred to is the currently running
3237  user program, not IDLE itself.
3238
3239- Issue #24750: Improve the appearance of the IDLE editor window status bar.
3240  Patch by Mark Roseman.
3241
3242- Issue #25313: Change the handling of new built-in text color themes to better
3243  address the compatibility problem introduced by the addition of IDLE Dark.
3244  Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
3245
3246- Issue #24782: Extension configuration is now a tab in the IDLE Preferences
3247  dialog rather than a separate dialog.  The former tabs are now a sorted
3248  list.  Patch by Mark Roseman.
3249
3250- Issue #22726: Re-activate the config dialog help button with some content
3251  about the other buttons and the new IDLE Dark theme.
3252
3253- Issue #24820: IDLE now has an 'IDLE Dark' built-in text color theme.
3254  It is more or less IDLE Classic inverted, with a cobalt blue background.
3255  Strings, comments, keywords, ... are still green, red, orange, ... .
3256  To use it with IDLEs released before November 2015, hit the
3257  'Save as New Custom Theme' button and enter a new name,
3258  such as 'Custom Dark'.  The custom theme will work with any IDLE
3259  release, and can be modified.
3260
3261- Issue #25224: README.txt is now an idlelib index for IDLE developers and
3262  curious users.  The previous user content is now in the IDLE doc chapter.
3263  'IDLE' now means 'Integrated Development and Learning Environment'.
3264
3265- Issue #24820: Users can now set breakpoint colors in
3266  Settings -> Custom Highlighting.  Original patch by Mark Roseman.
3267
3268- Issue #24972: Inactive selection background now matches active selection
3269  background, as configured by users, on all systems.  Found items are now
3270  always highlighted on Windows.  Initial patch by Mark Roseman.
3271
3272- Issue #24570: Idle: make calltip and completion boxes appear on Macs
3273  affected by a tk regression.  Initial patch by Mark Roseman.
3274
3275- Issue #24988: Idle ScrolledList context menus (used in debugger)
3276  now work on Mac Aqua.  Patch by Mark Roseman.
3277
3278- Issue #24801: Make right-click for context menu work on Mac Aqua.
3279  Patch by Mark Roseman.
3280
3281- Issue #25173: Associate tkinter messageboxes with a specific widget.
3282  For Mac OSX, make them a 'sheet'.  Patch by Mark Roseman.
3283
3284- Issue #25198: Enhance the initial html viewer now used for Idle Help.
3285  * Properly indent fixed-pitch text (patch by Mark Roseman).
3286  * Give code snippet a very Sphinx-like light blueish-gray background.
3287  * Re-use initial width and height set by users for shell and editor.
3288  * When the Table of Contents (TOC) menu is used, put the section header
3289  at the top of the screen.
3290
3291- Issue #25225: Condense and rewrite Idle doc section on text colors.
3292
3293- Issue #21995: Explain some differences between IDLE and console Python.
3294
3295- Issue #22820: Explain need for *print* when running file from Idle editor.
3296
3297- Issue #25224: Doc: augment Idle feature list and no-subprocess section.
3298
3299- Issue #25219: Update doc for Idle command line options.
3300  Some were missing and notes were not correct.
3301
3302- Issue #24861: Most of idlelib is private and subject to change.
3303  Use idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
3304
3305- Issue #25199: Idle: add synchronization comments for future maintainers.
3306
3307- Issue #16893: Replace help.txt with help.html for Idle doc display.
3308  The new idlelib/help.html is rstripped Doc/build/html/library/idle.html.
3309  It looks better than help.txt and will better document Idle as released.
3310  The tkinter html viewer that works for this file was written by Rose Roseman.
3311  The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.
3312
3313- Issue #24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
3314
3315- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
3316
3317Documentation
3318-------------
3319
3320- Issue #26736: Used HTTPS for external links in the documentation if possible.
3321
3322- Issue #6953: Rework the Readline module documentation to group related
3323  functions together, and add more details such as what underlying Readline
3324  functions and variables are accessed.
3325
3326- Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.
3327
3328- Issue #24952: Clarify the default size argument of stack_size() in
3329  the "threading" and "_thread" modules. Patch from Mattip.
3330
3331- Issue #26014: Update 3.x packaging documentation:
3332  * "See also" links to the new docs are now provided in the legacy pages
3333  * links to setuptools documentation have been updated
3334
3335Tests
3336-----
3337
3338- Issue #21916: Added tests for the turtle module.  Patch by ingrid,
3339  Gregory Loyse and Jelle Zijlstra.
3340
3341- Issue #26295: When using "python3 -m test --testdir=TESTDIR", regrtest
3342  doesn't add "test." prefix to test module names.
3343
3344- Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool)
3345  was untested.
3346
3347- Issue #26015: Added new tests for pickling iterators of mutable sequences.
3348
3349- Issue #26325: Added test.support.check_no_resource_warning() to check that
3350  no ResourceWarning is emitted.
3351
3352- Issue #25940: Changed test_ssl to use its internal local server more.  This
3353  avoids relying on svn.python.org, which recently changed root certificate.
3354
3355- Issue #25616: Tests for OrderedDict are extracted from test_collections
3356  into separate file test_ordered_dict.
3357
3358- Issue #25449: Added tests for OrderedDict subclasses.
3359
3360- Issue #25188: Add -P/--pgo to test.regrtest to suppress error output when
3361  running the test suite for the purposes of a PGO build. Initial patch by
3362  Alecsandru Patrascu.
3363
3364- Issue #22806: Add ``python -m test --list-tests`` command to list tests.
3365
3366- Issue #18174: ``python -m test --huntrleaks ...`` now also checks for leak of
3367  file descriptors. Patch written by Richard Oudkerk.
3368
3369- Issue #25260: Fix ``python -m test --coverage`` on Windows. Remove the
3370  list of ignored directories.
3371
3372- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass along
3373  to regrtest.py.  Previously there was a limit of 9.
3374
3375- Issue #26583: Skip test_timestamp_overflow in test_import if bytecode
3376  files cannot be written.
3377
3378Build
3379-----
3380
3381- Issue #21277: Don't try to link _ctypes with a ffi_convenience library.
3382
3383- Issue #26884: Fix linking extension modules for cross builds.
3384  Patch by Xavier de Gaye.
3385
3386- Issue #26932: Fixed support of RTLD_* constants defined as enum values,
3387  not via macros (in particular on Android).  Patch by Chi Hsuan Yen.
3388
3389- Issue #22359: Disable the rules for running _freeze_importlib and pgen when
3390  cross-compiling.  The output of these programs is normally saved with the
3391  source code anyway, and is still regenerated when doing a native build.
3392  Patch by Xavier de Gaye.
3393
3394- Issue #21668: Link audioop, _datetime, _ctypes_test modules to libm,
3395  except on Mac OS X. Patch written by Chi Hsuan Yen.
3396
3397- Issue #25702: A --with-lto configure option has been added that will
3398  enable link time optimizations at build time during a make profile-opt.
3399  Some compilers and toolchains are known to not produce stable code when
3400  using LTO, be sure to test things thoroughly before relying on it.
3401  It can provide a few % speed up over profile-opt alone.
3402
3403- Issue #26624: Adds validation of ucrtbase[d].dll version with warning
3404  for old versions.
3405
3406- Issue #17603: Avoid error about nonexistant fileblocks.o file by using a
3407  lower-level check for st_blocks in struct stat.
3408
3409- Issue #26079: Fixing the build output folder for tix-8.4.3.6. Patch by
3410  Bjoern Thiel.
3411
3412- Issue #26465: Update Windows builds to use OpenSSL 1.0.2g.
3413
3414- Issue #25348: Added ``--pgo`` and ``--pgo-job`` arguments to
3415  ``PCbuild\build.bat`` for building with Profile-Guided Optimization.  The
3416  old ``PCbuild\build_pgo.bat`` script is removed.
3417
3418- Issue #25827: Add support for building with ICC to ``configure``, including
3419  a new ``--with-icc`` flag.
3420
3421- Issue #25696: Fix installation of Python on UNIX with make -j9.
3422
3423- Issue #24986: It is now possible to build Python on Windows without errors
3424  when external libraries are not available.
3425
3426- Issue #24421: Compile Modules/_math.c once, before building extensions.
3427  Previously it could fail to compile properly if the math and cmath builds
3428  were concurrent.
3429
3430- Issue #26465: Update OS X 10.5+ 32-bit-only installer to build
3431  and link with OpenSSL 1.0.2g.
3432
3433- Issue #26268: Update Windows builds to use OpenSSL 1.0.2f.
3434
3435- Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
3436
3437- Issue #24324: Do not enable unreachable code warnings when using
3438  gcc as the option does not work correctly in older versions of gcc
3439  and has been silently removed as of gcc-4.5.
3440
3441Windows
3442-------
3443
3444- Issue #27053: Updates make_zip.py to correctly generate library ZIP file.
3445
3446- Issue #26268: Update the prepare_ssl.py script to handle OpenSSL releases
3447  that don't include the contents of the include directory (that is, 1.0.2e
3448  and later).
3449
3450- Issue #26071: bdist_wininst created binaries fail to start and find
3451  32bit Python
3452
3453- Issue #26073: Update the list of magic numbers in launcher
3454
3455- Issue #26065: Excludes venv from library when generating embeddable
3456  distro.
3457
3458- Issue #25022: Removed very outdated PC/example_nt/ directory.
3459
3460Tools/Demos
3461-----------
3462
3463- Issue #26799: Fix python-gdb.py: don't get C types once when the Python code
3464  is loaded, but get C types on demand. The C types can change if
3465  python-gdb.py is loaded before the Python executable. Patch written by Thomas
3466  Ilsche.
3467
3468- Issue #26271: Fix the Freeze tool to properly use flags passed through
3469  configure. Patch by Daniel Shaulov.
3470
3471- Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py.
3472  Patch by Guo Ci Teo.
3473
3474- Issue #26316: Fix variable name typo in Argument Clinic.
3475
3476- Issue #25440: Fix output of python-config --extension-suffix.
3477
3478- Issue #25154: The pyvenv script has been deprecated in favour of
3479  `python3 -m venv`.
3480
3481C API
3482-----
3483
3484- Issue #26312: SystemError is now raised in all programming bugs with using
3485  PyArg_ParseTupleAndKeywords().  RuntimeError did raised before in some
3486  programming bugs.
3487
3488- Issue #26198: ValueError is now raised instead of TypeError on buffer
3489  overflow in parsing "es#" and "et#" format units.  SystemError is now raised
3490  instead of TypeError on programmical error in parsing format string.
3491
3492
3493What's New in Python 3.5.3?
3494===========================
3495
3496Release date: 2017-01-17
3497
3498There were no code changes between 3.5.3rc1 and 3.5.3 final.
3499
3500
3501What's New in Python 3.5.3 release candidate 1?
3502===============================================
3503
3504Release date: 2017-01-02
3505
3506Core and Builtins
3507-----------------
3508
3509- Issue #29073: bytearray formatting no longer truncates on first null byte.
3510
3511- Issue #28932: Do not include <sys/random.h> if it does not exist.
3512
3513- Issue #28147: Fix a memory leak in split-table dictionaries: setattr()
3514  must not convert combined table into split table.
3515
3516- Issue #25677: Correct the positioning of the syntax error caret for
3517  indented blocks.  Based on patch by Michael Layzell.
3518
3519- Issue #29000: Fixed bytes formatting of octals with zero padding in alternate
3520  form.
3521
3522- Issue #28512: Fixed setting the offset attribute of SyntaxError by
3523  PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject().
3524
3525- Issue #28991:  functools.lru_cache() was susceptible to an obscure reentrancy
3526  bug caused by a monkey-patched len() function.
3527
3528- Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
3529  when decode astral characters.  Patch by Xiang Zhang.
3530
3531- Issue #19398: Extra slash no longer added to sys.path components in case of
3532  empty compile-time PYTHONPATH components.
3533
3534- Issue #28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug
3535  build.
3536
3537- Issue #23782: Fixed possible memory leak in _PyTraceback_Add() and exception
3538  loss in PyTraceBack_Here().
3539
3540- Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
3541  Patch by Xiang Zhang.
3542
3543- Issue #28376: The type of long range iterator is now registered as Iterator.
3544  Patch by Oren Milman.
3545
3546- Issue #28376: The constructor of range_iterator now checks that step is not 0.
3547  Patch by Oren Milman.
3548
3549- Issue #26906: Resolving special methods of uninitialized type now causes
3550  implicit initialization of the type instead of a fail.
3551
3552- Issue #18287: PyType_Ready() now checks that tp_name is not NULL.
3553  Original patch by Niklas Koep.
3554
3555- Issue #24098: Fixed possible crash when AST is changed in process of
3556  compiling it.
3557
3558- Issue #28350: String constants with null character no longer interned.
3559
3560- Issue #26617: Fix crash when GC runs during weakref callbacks.
3561
3562- Issue #27942: String constants now interned recursively in tuples and frozensets.
3563
3564- Issue #21578: Fixed misleading error message when ImportError called with
3565  invalid keyword args.
3566
3567- Issue #28203: Fix incorrect type in error message from
3568  ``complex(1.0, {2:3})``. Patch by Soumya Sharma.
3569
3570- Issue #27955: Fallback on reading /dev/urandom device when the getrandom()
3571  syscall fails with EPERM, for example when blocked by SECCOMP.
3572
3573- Issue #28131: Fix a regression in zipimport's compile_source().  zipimport
3574  should use the same optimization level as the interpreter.
3575
3576- Issue #25221: Fix corrupted result from PyLong_FromLong(0) when
3577  Python is compiled with NSMALLPOSINTS = 0.
3578
3579- Issue #25758: Prevents zipimport from unnecessarily encoding a filename
3580  (patch by Eryk Sun)
3581
3582- Issue #28189: dictitems_contains no longer swallows compare errors.
3583  (Patch by Xiang Zhang)
3584
3585- Issue #27812: Properly clear out a generator's frame's backreference to the
3586  generator to prevent crashes in frame.clear().
3587
3588- Issue #27811: Fix a crash when a coroutine that has not been awaited is
3589  finalized with warnings-as-errors enabled.
3590
3591- Issue #27587: Fix another issue found by PVS-Studio: Null pointer check
3592  after use of 'def' in _PyState_AddModule().
3593  Initial patch by Christian Heimes.
3594
3595- Issue #26020: set literal evaluation order did not match documented behaviour.
3596
3597- Issue #27782: Multi-phase extension module import now correctly allows the
3598  ``m_methods`` field to be used to add module level functions to instances
3599  of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang.
3600
3601- Issue #27936: The round() function accepted a second None argument
3602  for some types but not for others.  Fixed the inconsistency by
3603  accepting None for all numeric types.
3604
3605- Issue #27487: Warn if a submodule argument to "python -m" or
3606  runpy.run_module() is found in sys.modules after parent packages are
3607  imported, but before the submodule is executed.
3608
3609- Issue #27558: Fix a SystemError in the implementation of "raise" statement.
3610  In a brand new thread, raise a RuntimeError since there is no active
3611  exception to reraise. Patch written by Xiang Zhang.
3612
3613- Issue #27419: Standard __import__() no longer look up "__import__" in globals
3614  or builtins for importing submodules or "from import".  Fixed handling an
3615  error of non-string package name.
3616
3617- Issue #27083: Respect the PYTHONCASEOK environment variable under Windows.
3618
3619- Issue #27514: Make having too many statically nested blocks a SyntaxError
3620  instead of SystemError.
3621
3622- Issue #27473: Fixed possible integer overflow in bytes and bytearray
3623  concatenations.  Patch by Xiang Zhang.
3624
3625- Issue #27507: Add integer overflow check in bytearray.extend().  Patch by
3626  Xiang Zhang.
3627
3628- Issue #27581: Don't rely on wrapping for overflow check in
3629  PySequence_Tuple().  Patch by Xiang Zhang.
3630
3631- Issue #27443: __length_hint__() of bytearray iterators no longer return a
3632  negative integer for a resized bytearray.
3633
3634- Issue #27942: Fix memory leak in codeobject.c
3635
3636Library
3637-------
3638
3639- Issue #15812: inspect.getframeinfo() now correctly shows the first line of
3640  a context.  Patch by Sam Breese.
3641
3642- Issue #29094: Offsets in a ZIP file created with extern file object and modes
3643  "w" and "x" now are relative to the start of the file.
3644
3645- Issue #13051: Fixed recursion errors in large or resized
3646  curses.textpad.Textbox.  Based on patch by Tycho Andersen.
3647
3648- Issue #29119: Fix weakrefs in the pure python version of
3649  collections.OrderedDict move_to_end() method.
3650  Contributed by Andra Bogildea.
3651
3652- Issue #9770: curses.ascii predicates now work correctly with negative
3653  integers.
3654
3655- Issue #28427: old keys should not remove new values from
3656  WeakValueDictionary when collecting from another thread.
3657
3658- Issue 28923: Remove editor artifacts from Tix.py.
3659
3660- Issue #28871: Fixed a crash when deallocate deep ElementTree.
3661
3662- Issue #19542: Fix bugs in WeakValueDictionary.setdefault() and
3663  WeakValueDictionary.pop() when a GC collection happens in another
3664  thread.
3665
3666- Issue #20191: Fixed a crash in resource.prlimit() when pass a sequence that
3667  doesn't own its elements as limits.
3668
3669- Issue #28779: multiprocessing.set_forkserver_preload() would crash the
3670  forkserver process if a preloaded module instantiated some
3671  multiprocessing objects such as locks.
3672
3673- Issue #28847: dbm.dumb now supports reading read-only files and no longer
3674  writes the index file when it is not changed.
3675
3676- Issue #25659: In ctypes, prevent a crash calling the from_buffer() and
3677  from_buffer_copy() methods on abstract classes like Array.
3678
3679- Issue #28732: Fix crash in os.spawnv() with no elements in args
3680
3681- Issue #28485: Always raise ValueError for negative
3682  compileall.compile_dir(workers=...) parameter, even when multithreading is
3683  unavailable.
3684
3685- Issue #28387: Fixed possible crash in _io.TextIOWrapper deallocator when
3686  the garbage collector is invoked in other thread.  Based on patch by
3687  Sebastian Cufre.
3688
3689- Issue #27517: LZMA compressor and decompressor no longer raise exceptions if
3690  given empty data twice.  Patch by Benjamin Fogle.
3691
3692- Issue #28549: Fixed segfault in curses's addch() with ncurses6.
3693
3694- Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar
3695  file with compression before trying to open it without compression.  Otherwise
3696  it had 50% chance failed with ignore_zeros=True.
3697
3698- Issue #23262: The webbrowser module now supports Firefox 36+ and derived
3699  browsers.  Based on patch by Oleg Broytman.
3700
3701- Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
3702  by representing the scale as float value internally in Tk.  tkinter.IntVar
3703  now works if float value is set to underlying Tk variable.
3704
3705- Issue #28255: calendar.TextCalendar().prmonth() no longer prints a space
3706  at the start of new line after printing a month's calendar.  Patch by
3707  Xiang Zhang.
3708
3709- Issue #20491: The textwrap.TextWrapper class now honors non-breaking spaces.
3710  Based on patch by Kaarle Ritvanen.
3711
3712- Issue #28353: os.fwalk() no longer fails on broken links.
3713
3714- Issue #25464: Fixed HList.header_exists() in tkinter.tix module by addin
3715  a workaround to Tix library bug.
3716
3717- Issue #28488: shutil.make_archive() no longer add entry "./" to ZIP archive.
3718
3719- Issue #24452: Make webbrowser support Chrome on Mac OS X.
3720
3721- Issue #20766: Fix references leaked by pdb in the handling of SIGINT
3722  handlers.
3723
3724- Issue #26293: Fixed writing ZIP files that starts not from the start of the
3725  file.  Offsets in ZIP file now are relative to the start of the archive in
3726  conforming to the specification.
3727
3728- Issue #28321: Fixed writing non-BMP characters with binary format in plistlib.
3729
3730- Issue #28322: Fixed possible crashes when unpickle itertools objects from
3731  incorrect pickle data.  Based on patch by John Leitch.
3732
3733- Fix possible integer overflows and crashes in the mmap module with unusual
3734  usage patterns.
3735
3736- Issue #1703178: Fix the ability to pass the --link-objects option to the
3737  distutils build_ext command.
3738
3739- Issue #28253: Fixed calendar functions for extreme months: 0001-01
3740  and 9999-12.
3741
3742  Methods itermonthdays() and itermonthdays2() are reimplemented so
3743  that they don't call itermonthdates() which can cause datetime.date
3744  under/overflow.
3745
3746- Issue #28275: Fixed possible use after free in the decompress()
3747  methods of the LZMADecompressor and BZ2Decompressor classes.
3748  Original patch by John Leitch.
3749
3750- Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
3751  if pass invalid string-like object as a name.  Patch by Xiang Zhang.
3752
3753- Issue #18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py.
3754  Patch by Madison May.
3755
3756- Issue #27611: Fixed support of default root window in the tkinter.tix module.
3757
3758- Issue #27348: In the traceback module, restore the formatting of exception
3759  messages like "Exception: None".  This fixes a regression introduced in
3760  3.5a2.
3761
3762- Issue #25651: Allow falsy values to be used for msg parameter of subTest().
3763
3764- Issue #27932: Prevent memory leak in win32_ver().
3765
3766- Fix UnboundLocalError in socket._sendfile_use_sendfile.
3767
3768- Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of
3769  os.stat().  Patch by Eryk Sun.
3770
3771- Issue #25270: Prevent codecs.escape_encode() from raising SystemError when
3772  an empty bytestring is passed.
3773
3774- Issue #28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam.
3775
3776- Issue #25895: Enable WebSocket URL schemes in urllib.parse.urljoin.
3777  Patch by Gergely Imreh and Markus Holtermann.
3778
3779- Issue #27599: Fixed buffer overrun in binascii.b2a_qp() and binascii.a2b_qp().
3780
3781- Issue #19003:m email.generator now replaces only \r and/or \n line
3782  endings, per the RFC, instead of all unicode line endings.
3783
3784- Issue #28019: itertools.count() no longer rounds non-integer step in range
3785  between 1.0 and 2.0 to 1.
3786
3787- Issue #25969: Update the lib2to3 grammar to handle the unpacking
3788  generalizations added in 3.5.
3789
3790- Issue #14977: mailcap now respects the order of the lines in the mailcap
3791  files ("first match"), as required by RFC 1542.  Patch by Michael Lazar.
3792
3793- Issue #24594: Validates persist parameter when opening MSI database
3794
3795- Issue #17582: xml.etree.ElementTree nows preserves whitespaces in attributes
3796  (Patch by Duane Griffin.  Reviewed and approved by Stefan Behnel.)
3797
3798- Issue #28047: Fixed calculation of line length used for the base64 CTE
3799  in the new email policies.
3800
3801- Issue #27445: Don't pass str(_charset) to MIMEText.set_payload().
3802  Patch by Claude Paroz.
3803
3804- Issue #22450: urllib now includes an "Accept: */*" header among the
3805  default headers.  This makes the results of REST API requests more
3806  consistent and predictable especially when proxy servers are involved.
3807
3808- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file
3809  between runs given the same Grammar.txt input regardless of the hash
3810  randomization setting.
3811
3812- Issue #27570: Avoid zero-length memcpy() etc calls with null source
3813  pointers in the "ctypes" and "array" modules.
3814
3815- Issue #22233: Break email header lines *only* on the RFC specified CR and LF
3816  characters, not on arbitrary unicode line breaks.  This also fixes a bug in
3817  HTTP header parsing.
3818
3819- Issue 27988: Fix email iter_attachments incorrect mutation of payload list.
3820
3821- Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name
3822  fields in X.509 certs.
3823
3824- Issue #27850: Remove 3DES from ssl module's default cipher list to counter
3825  measure sweet32 attack (CVE-2016-2183).
3826
3827- Issue #27766: Add ChaCha20 Poly1305 to ssl module's default ciper list.
3828  (Required OpenSSL 1.1.0 or LibreSSL).
3829
3830- Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0.
3831
3832- Remove support for passing a file descriptor to os.access. It never worked but
3833  previously didn't raise.
3834
3835- Issue #12885: Fix error when distutils encounters symlink.
3836
3837- Issue #27881: Fixed possible bugs when setting sqlite3.Connection.isolation_level.
3838  Based on patch by Xiang Zhang.
3839
3840- Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory
3841  creates not a cursor.  Patch by Xiang Zhang.
3842
3843- Issue #19884: Avoid spurious output on OS X with Gnu Readline.
3844
3845- Issue #27706: Restore deterministic behavior of random.Random().seed()
3846  for string seeds using seeding version 1.  Allows sequences of calls
3847  to random() to exactly match those obtained in Python 2.
3848  Patch by Nofar Schnider.
3849
3850- Issue #10513: Fix a regression in Connection.commit().  Statements should
3851  not be reset after a commit.
3852
3853- A new version of typing.py from https://github.com/python/typing:
3854  - Collection (only for 3.6) (Issue #27598)
3855  - Add FrozenSet to __all__ (upstream #261)
3856  - fix crash in _get_type_vars() (upstream #259)
3857  - Remove the dict constraint in ForwardRef._eval_type (upstream #252)
3858
3859- Issue #27539: Fix unnormalised ``Fraction.__pow__`` result in the case
3860  of negative exponent and negative base.
3861
3862- Issue #21718: cursor.description is now available for queries using CTEs.
3863
3864- Issue #2466: posixpath.ismount now correctly recognizes mount points which
3865  the user does not have permission to access.
3866
3867- Issue #27773: Correct some memory management errors server_hostname in
3868  _ssl.wrap_socket().
3869
3870- Issue #26750: unittest.mock.create_autospec() now works properly for
3871  subclasses of property() and other data descriptors.
3872
3873- In the curses module, raise an error if window.getstr() or window.instr() is
3874  passed a negative value.
3875
3876- Issue #27783: Fix possible usage of uninitialized memory in
3877  operator.methodcaller.
3878
3879- Issue #27774: Fix possible Py_DECREF on unowned object in _sre.
3880
3881- Issue #27760: Fix possible integer overflow in binascii.b2a_qp.
3882
3883- Issue #27758: Fix possible integer overflow in the _csv module for large
3884  record lengths.
3885
3886- Issue #27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the
3887  HTTP_PROXY variable when REQUEST_METHOD environment is set, which indicates
3888  that the script is in CGI mode.
3889
3890- Issue #27656: Do not assume sched.h defines any SCHED_* constants.
3891
3892- Issue #27130: In the "zlib" module, fix handling of large buffers
3893  (typically 4 GiB) when compressing and decompressing.  Previously, inputs
3894  were limited to 4 GiB, and compression and decompression operations did not
3895  properly handle results of 4 GiB.
3896
3897- Issue #27533: Release GIL in nt._isdir
3898
3899- Issue #17711: Fixed unpickling by the persistent ID with protocol 0.
3900  Original patch by Alexandre Vassalotti.
3901
3902- Issue #27522: Avoid an unintentional reference cycle in email.feedparser.
3903
3904- Issue #26844: Fix error message for imp.find_module() to refer to 'path'
3905  instead of 'name'. Patch by Lev Maximov.
3906
3907- Issue #23804: Fix SSL zero-length recv() calls to not block and not raise
3908  an error about unclean EOF.
3909
3910- Issue #27466: Change time format returned by http.cookie.time2netscape,
3911  confirming the netscape cookie format and making it consistent with
3912  documentation.
3913
3914- Issue #26664: Fix activate.fish by removing mis-use of ``$``.
3915
3916- Issue #22115: Fixed tracing Tkinter variables: trace_vdelete() with wrong
3917  mode no longer break tracing, trace_vinfo() now always returns a list of
3918  pairs of strings, tracing in the "u" mode now works.
3919
3920- Fix a scoping issue in importlib.util.LazyLoader which triggered an
3921  UnboundLocalError when lazy-loading a module that was already put into
3922  sys.modules.
3923
3924- Issue #27079: Fixed curses.ascii functions isblank(), iscntrl() and ispunct().
3925
3926- Issue #26754: Some functions (compile() etc) accepted a filename argument
3927  encoded as an iterable of integers. Now only strings and byte-like objects
3928  are accepted.
3929
3930- Issue #27048: Prevents distutils failing on Windows when environment
3931  variables contain non-ASCII characters
3932
3933- Issue #27330: Fixed possible leaks in the ctypes module.
3934
3935- Issue #27238: Got rid of bare excepts in the turtle module.  Original patch
3936  by Jelle Zijlstra.
3937
3938- Issue #27122: When an exception is raised within the context being managed
3939  by a contextlib.ExitStack() and one of the exit stack generators
3940  catches and raises it in a chain, do not re-raise the original exception
3941  when exiting, let the new chained one through.  This avoids the PEP 479
3942  bug described in issue25782.
3943
3944- [Security] Issue #27278: Fix os.urandom() implementation using getrandom() on
3945  Linux.  Truncate size to INT_MAX and loop until we collected enough random
3946  bytes, instead of casting a directly Py_ssize_t to int.
3947
3948- Issue #26386: Fixed ttk.TreeView selection operations with item id's
3949  containing spaces.
3950
3951- [Security] Issue #22636: Avoid shell injection problems with
3952  ctypes.util.find_library().
3953
3954- Issue #16182: Fix various functions in the "readline" module to use the
3955  locale encoding, and fix get_begidx() and get_endidx() to return code point
3956  indexes.
3957
3958- Issue #27392: Add loop.connect_accepted_socket().
3959  Patch by Jim Fulton.
3960
3961- Issue #27930: Improved behaviour of logging.handlers.QueueListener.
3962  Thanks to Paulo Andrade and Petr Viktorin for the analysis and patch.
3963
3964- Issue #21201: Improves readability of multiprocessing error message.  Thanks
3965  to Wojciech Walczak for patch.
3966
3967- Issue #27456: asyncio: Set TCP_NODELAY by default.
3968
3969- Issue #27906: Fix socket accept exhaustion during high TCP traffic.
3970  Patch by Kevin Conway.
3971
3972- Issue #28174: Handle when SO_REUSEPORT isn't properly supported.
3973  Patch by Seth Michael Larson.
3974
3975- Issue #26654: Inspect functools.partial in asyncio.Handle.__repr__.
3976  Patch by iceboy.
3977
3978- Issue #26909: Fix slow pipes IO in asyncio.
3979  Patch by INADA Naoki.
3980
3981- Issue #28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect.
3982
3983- Issue #27759: Fix selectors incorrectly retain invalid file descriptors.
3984  Patch by Mark Williams.
3985
3986- Issue #28368: Refuse monitoring processes if the child watcher has
3987  no loop attached.
3988  Patch by Vincent Michel.
3989
3990- Issue #28369: Raise RuntimeError when transport's FD is used with
3991  add_reader, add_writer, etc.
3992
3993- Issue #28370: Speedup asyncio.StreamReader.readexactly.
3994  Patch by Коренберг Марк.
3995
3996- Issue #28371: Deprecate passing asyncio.Handles to run_in_executor.
3997
3998- Issue #28372: Fix asyncio to support formatting of non-python coroutines.
3999
4000- Issue #28399: Remove UNIX socket from FS before binding.
4001  Patch by Коренберг Марк.
4002
4003- Issue #27972: Prohibit Tasks to await on themselves.
4004
4005- Issue #26923: Fix asyncio.Gather to refuse being cancelled once all
4006  children are done.
4007  Patch by Johannes Ebke.
4008
4009- Issue #26796: Don't configure the number of workers for default
4010  threadpool executor.
4011  Initial patch by Hans Lawrenz.
4012
4013- Issue #28600: Optimize loop.call_soon().
4014
4015- Issue #28613: Fix get_event_loop() return the current loop if
4016  called from coroutines/callbacks.
4017
4018- Issue #28639: Fix inspect.isawaitable to always return bool
4019  Patch by Justin Mayfield.
4020
4021- Issue #28652: Make loop methods reject socket kinds they do not support.
4022
4023- Issue #28653: Fix a refleak in functools.lru_cache.
4024
4025- Issue #28703: Fix asyncio.iscoroutinefunction to handle Mock objects.
4026
4027- Issue #24142: Reading a corrupt config file left the parser in an
4028  invalid state.  Original patch by Florian Höch.
4029
4030- Issue #28990: Fix SSL hanging if connection is closed before handshake
4031  completed.
4032  (Patch by HoHo-Ho)
4033
4034IDLE
4035----
4036
4037- Issue #15308: Add 'interrupt execution' (^C) to Shell menu.
4038  Patch by Roger Serwy, updated by Bayard Randel.
4039
4040- Issue #27922: Stop IDLE tests from 'flashing' gui widgets on the screen.
4041
4042- Add version to title of IDLE help window.
4043
4044- Issue #25564: In section on IDLE -- console differences, mention that
4045  using exec means that __builtins__ is defined for each statement.
4046
4047- Issue #27714: text_textview and test_autocomplete now pass when re-run
4048  in the same process.  This occurs when test_idle fails when run with the
4049  -w option but without -jn.  Fix warning from test_config.
4050
4051- Issue #25507: IDLE no longer runs buggy code because of its tkinter imports.
4052  Users must include the same imports required to run directly in Python.
4053
4054- Issue #27452: add line counter and crc to IDLE configHandler test dump.
4055
4056- Issue #27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names.
4057
4058- Issue #27245: IDLE: Cleanly delete custom themes and key bindings.
4059  Previously, when IDLE was started from a console or by import, a cascade
4060  of warnings was emitted.  Patch by Serhiy Storchaka.
4061
4062C API
4063-----
4064
4065- Issue #28808: PyUnicode_CompareWithASCIIString() now never raises exceptions.
4066
4067- Issue #26754: PyUnicode_FSDecoder() accepted a filename argument encoded as
4068  an iterable of integers. Now only strings and bytes-like objects are accepted.
4069
4070Documentation
4071-------------
4072
4073- Issue #28513: Documented command-line interface of zipfile.
4074
4075Tests
4076-----
4077
4078- Issue #28950: Disallow -j0 to be combined with -T/-l/-M in regrtest
4079  command line arguments.
4080
4081- Issue #28666: Now test.support.rmtree is able to remove unwritable or
4082  unreadable directories.
4083
4084- Issue #23839: Various caches now are cleared before running every test file.
4085
4086- Issue #28409: regrtest: fix the parser of command line arguments.
4087
4088- Issue #27787: Call gc.collect() before checking each test for "dangling
4089  threads", since the dangling threads are weak references.
4090
4091- Issue #27369: In test_pyexpat, avoid testing an error message detail that
4092  changed in Expat 2.2.0.
4093
4094Tools/Demos
4095-----------
4096
4097- Issue #27952: Get Tools/scripts/fixcid.py working with Python 3 and the
4098  current "re" module, avoid invalid Python backslash escapes, and fix a bug
4099  parsing escaped C quote signs.
4100
4101- Issue #27332: Fixed the type of the first argument of module-level functions
4102  generated by Argument Clinic.  Patch by Petr Viktorin.
4103
4104- Issue #27418: Fixed Tools/importbench/importbench.py.
4105
4106Windows
4107-------
4108
4109- Issue #28251: Improvements to help manuals on Windows.
4110
4111- Issue #28110: launcher.msi has different product codes between 32-bit and
4112  64-bit
4113
4114- Issue #25144: Ensures TargetDir is set before continuing with custom
4115  install.
4116
4117- Issue #27469: Adds a shell extension to the launcher so that drag and drop
4118  works correctly.
4119
4120- Issue #27309: Enabled proper Windows styles in python[w].exe manifest.
4121
4122Build
4123-----
4124
4125- Issue #29080: Removes hard dependency on hg.exe from PCBuild/build.bat
4126
4127- Issue #23903: Added missed names to PC/python3.def.
4128
4129- Issue #10656: Fix out-of-tree building on AIX.  Patch by Tristan Carel and
4130  Michael Haubenwallner.
4131
4132- Issue #26359: Rename --with-optimiations to --enable-optimizations.
4133
4134- Issue #28444: Fix missing extensions modules when cross compiling.
4135
4136- Issue #28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j.
4137
4138- Issue #28258: Fixed build with Estonian locale (python-config and distclean
4139  targets in Makefile).  Patch by Arfrever Frehtes Taifersar Arahesis.
4140
4141- Issue #26661: setup.py now detects system libffi with multiarch wrapper.
4142
4143- Issue #28066: Fix the logic that searches build directories for generated
4144  include files when building outside the source tree.
4145
4146- Issue #15819: Remove redundant include search directory option for building
4147  outside the source tree.
4148
4149- Issue #27566: Fix clean target in freeze makefile (patch by Lisa Roach)
4150
4151- Issue #27705: Update message in validate_ucrtbase.py
4152
4153- Issue #27983: Cause lack of llvm-profdata tool when using clang as
4154  required for PGO linking to be a configure time error rather than
4155  make time when --with-optimizations is enabled.  Also improve our
4156  ability to find the llvm-profdata tool on MacOS and some Linuxes.
4157
4158- Issue #26307: The profile-opt build now applies PGO to the built-in modules.
4159
4160- Issue #26359: Add the --with-optimizations configure flag.
4161
4162- Issue #27713: Suppress spurious build warnings when updating importlib's
4163  bootstrap files.  Patch by Xiang Zhang
4164
4165- Issue #25825: Correct the references to Modules/python.exp and ld_so_aix,
4166  which are required on AIX.  This updates references to an installation path
4167  that was changed in 3.2a4, and undoes changed references to the build tree
4168  that were made in 3.5.0a1.
4169
4170- Issue #27453: CPP invocation in configure must use CPPFLAGS. Patch by
4171  Chi Hsuan Yen.
4172
4173- Issue #27641: The configure script now inserts comments into the makefile
4174  to prevent the pgen and _freeze_importlib executables from being cross-
4175  compiled.
4176
4177- Issue #26662: Set PYTHON_FOR_GEN in configure as the Python program to be
4178  used for file generation during the build.
4179
4180- Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X.
4181  Also update FreedBSD version checks for the original ctype UTF-8 workaround.
4182
4183- Issue #28676: Prevent missing 'getentropy' declaration warning on macOS.
4184  Patch by Gareth Rees.
4185
4186
4187What's New in Python 3.5.2?
4188===========================
4189
4190Release date: 2016-06-26
4191
4192Core and Builtins
4193-----------------
4194
4195- Issue #26930: Update Windows builds to use OpenSSL 1.0.2h.
4196
4197Tests
4198-----
4199
4200- Issue #26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test.
4201
4202IDLE
4203----
4204
4205- Issue #27365: Allow non-ascii in idlelib/NEWS.txt - minimal part for 3.5.2.
4206
4207
4208What's New in Python 3.5.2 release candidate 1?
4209===============================================
4210
4211Release date: 2016-06-12
4212
4213Core and Builtins
4214-----------------
4215
4216- Issue #27066: Fixed SystemError if a custom opener (for open()) returns a
4217  negative number without setting an exception.
4218
4219- Issue #20041: Fixed TypeError when frame.f_trace is set to None.
4220  Patch by Xavier de Gaye.
4221
4222- Issue #26168: Fixed possible refleaks in failing Py_BuildValue() with the "N"
4223  format unit.
4224
4225- Issue #26991: Fix possible refleak when creating a function with annotations.
4226
4227- Issue #27039: Fixed bytearray.remove() for values greater than 127.  Patch by
4228  Joe Jevnik.
4229
4230- Issue #23640: int.from_bytes() no longer bypasses constructors for subclasses.
4231
4232- Issue #26811: gc.get_objects() no longer contains a broken tuple with NULL
4233  pointer.
4234
4235- Issue #20120: Use RawConfigParser for .pypirc parsing,
4236  removing support for interpolation unintentionally added
4237  with move to Python 3. Behavior no longer does any
4238  interpolation in .pypirc files, matching behavior in Python
4239  2.7 and Setuptools 19.0.
4240
4241- Issue #26659: Make the builtin slice type support cycle collection.
4242
4243- Issue #26718: super.__init__ no longer leaks memory if called multiple times.
4244  NOTE: A direct call of super.__init__ is not endorsed!
4245
4246- Issue #25339: PYTHONIOENCODING now has priority over locale in setting the
4247  error handler for stdin and stdout.
4248
4249- Issue #26494: Fixed crash on iterating exhausting iterators.
4250  Affected classes are generic sequence iterators, iterators of str, bytes,
4251  bytearray, list, tuple, set, frozenset, dict, OrderedDict, corresponding
4252  views and os.scandir() iterator.
4253
4254- Issue #26581: If coding cookie is specified multiple times on a line in
4255  Python source code file, only the first one is taken to account.
4256
4257- Issue #26464: Fix str.translate() when string is ASCII and first replacements
4258  removes character, but next replacement uses a non-ASCII character or a
4259  string longer than 1 character. Regression introduced in Python 3.5.0.
4260
4261- Issue #22836: Ensure exception reports from PyErr_Display() and
4262  PyErr_WriteUnraisable() are sensible even when formatting them produces
4263  secondary errors.  This affects the reports produced by
4264  sys.__excepthook__() and when __del__() raises an exception.
4265
4266- Issue #26302: Correct behavior to reject comma as a legal character for
4267  cookie names.
4268
4269- Issue #4806: Avoid masking the original TypeError exception when using star
4270  (*) unpacking in function calls.  Based on patch by Hagen Fürstenau and
4271  Daniel Urban.
4272
4273- Issue #27138: Fix the doc comment for FileFinder.find_spec().
4274
4275- Issue #26154: Add a new private _PyThreadState_UncheckedGet() function to get
4276  the current Python thread state, but don't issue a fatal error if it is NULL.
4277  This new function must be used instead of accessing directly the
4278  _PyThreadState_Current variable.  The variable is no more exposed since
4279  Python 3.5.1 to hide the exact implementation of atomic C types, to avoid
4280  compiler issues.
4281
4282- Issue #26194:  Deque.insert() gave odd results for bounded deques that had
4283  reached their maximum size.  Now an IndexError will be raised when attempting
4284  to insert into a full deque.
4285
4286- Issue #25843: When compiling code, don't merge constants if they are equal
4287  but have a different types. For example, ``f1, f2 = lambda: 1, lambda: 1.0``
4288  is now correctly compiled to two different functions: ``f1()`` returns ``1``
4289  (``int``) and ``f2()`` returns ``1.0`` (``int``), even if ``1`` and ``1.0``
4290  are equal.
4291
4292- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
4293  _PyObject_GetState() due to regressions observed in Cython-based projects.
4294
4295- Issue #25961: Disallowed null characters in the type name.
4296
4297- Issue #25973: Fix segfault when an invalid nonlocal statement binds a name
4298  starting with two underscores.
4299
4300- Issue #22995: Instances of extension types with a state that aren't
4301  subclasses of list or dict and haven't implemented any pickle-related
4302  methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__,
4303  or __getstate__), can no longer be pickled.  Including memoryview.
4304
4305- Issue #20440: Massive replacing unsafe attribute setting code with special
4306  macro Py_SETREF.
4307
4308- Issue #25766: Special method __bytes__() now works in str subclasses.
4309
4310- Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.
4311  This allows sys.getsize() to work correctly with their subclasses with
4312  __slots__ defined.
4313
4314- Issue #25709: Fixed problem with in-place string concatenation and utf-8
4315  cache.
4316
4317- Issue #27147: Mention PEP 420 in the importlib docs.
4318
4319- Issue #24097: Fixed crash in object.__reduce__() if slot name is freed inside
4320  __getattr__.
4321
4322- Issue #24731: Fixed crash on converting objects with special methods
4323  __bytes__, __trunc__, and __float__ returning instances of subclasses of
4324  bytes, int, and float to subclasses of bytes, int, and float correspondingly.
4325
4326- Issue #26478: Fix semantic bugs when using binary operators with dictionary
4327  views and tuples.
4328
4329- Issue #26171: Fix possible integer overflow and heap corruption in
4330  zipimporter.get_data().
4331
4332- Issue #25660: Fix TAB key behaviour in REPL with readline.
4333
4334- Issue #25887: Raise a RuntimeError when a coroutine object is awaited
4335  more than once.
4336
4337- Issue #27243: Update the __aiter__ protocol: instead of returning
4338  an awaitable that resolves to an asynchronous iterator, the asynchronous
4339  iterator should be returned directly.  Doing the former will trigger a
4340  PendingDeprecationWarning.
4341
4342
4343Library
4344-------
4345
4346- [Security] Issue #26556: Update expat to 2.1.1, fixes CVE-2015-1283.
4347
4348- [Security] Fix TLS stripping vulnerability in smtplib, CVE-2016-0772.
4349  Reported by Team Oststrom
4350
4351- Issue #21386: Implement missing IPv4Address.is_global property.  It was
4352  documented since 07a5610bae9d.  Initial patch by Roger Luethi.
4353
4354- Issue #20900: distutils register command now decodes HTTP responses
4355  correctly.  Initial patch by ingrid.
4356
4357- A new version of typing.py provides several new classes and
4358  features: @overload outside stubs, Reversible, DefaultDict, Text,
4359  ContextManager, Type[], NewType(), TYPE_CHECKING, and numerous bug
4360  fixes (note that some of the new features are not yet implemented in
4361  mypy or other static analyzers).  Also classes for PEP 492
4362  (Awaitable, AsyncIterable, AsyncIterator) have been added (in fact
4363  they made it into 3.5.1 but were never mentioned).
4364
4365- Issue #25738: Stop http.server.BaseHTTPRequestHandler.send_error() from
4366  sending a message body for 205 Reset Content.  Also, don't send Content
4367  header fields in responses that don't have a body.  Patch by Susumu
4368  Koshiba.
4369
4370- Issue #21313: Fix the "platform" module to tolerate when sys.version
4371  contains truncated build information.
4372
4373- [Security] Issue #26839: On Linux, :func:`os.urandom` now calls
4374  ``getrandom()`` with ``GRND_NONBLOCK`` to fall back on reading
4375  ``/dev/urandom`` if the urandom entropy pool is not initialized yet. Patch
4376  written by Colm Buckley.
4377
4378- Issue #27164: In the zlib module, allow decompressing raw Deflate streams
4379  with a predefined zdict.  Based on patch by Xiang Zhang.
4380
4381- Issue #24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely
4382  write data to the client.  Previously it could do partial writes and
4383  truncate data.  Also, wsgiref.handler.ServerHandler can now handle stdout
4384  doing partial writes, but this is deprecated.
4385
4386- Issue #26809: Add ``__all__`` to :mod:`string`.  Patch by Emanuel Barry.
4387
4388- Issue #26373: subprocess.Popen.communicate now correctly ignores
4389  BrokenPipeError when the child process dies before .communicate()
4390  is called in more/all circumstances.
4391
4392- Issue #21776: distutils.upload now correctly handles HTTPError.
4393  Initial patch by Claudiu Popa.
4394
4395- Issue #27114: Fix SSLContext._load_windows_store_certs fails with
4396  PermissionError
4397
4398- Issue #18383: Avoid creating duplicate filters when using filterwarnings
4399  and simplefilter.  Based on patch by Alex Shkop.
4400
4401- Issue #27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
4402  SELinux and fails with EACCESS. The function now falls back to fcntl().
4403  Patch written by Michał Bednarski.
4404
4405- Issue #27014: Fix infinite recursion using typing.py.  Thanks to Kalle Tuure!
4406
4407- Issue #14132: Fix urllib.request redirect handling when the target only has
4408  a query string.  Original fix by Ján Janech.
4409
4410- Issue #17214: The "urllib.request" module now percent-encodes non-ASCII
4411  bytes found in redirect target URLs.  Some servers send Location header
4412  fields with non-ASCII bytes, but "http.client" requires the request target
4413  to be ASCII-encodable, otherwise a UnicodeEncodeError is raised.  Based on
4414  patch by Christian Heimes.
4415
4416- Issue #26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch
4417  contributed by Chi Hsuan Yen.
4418
4419- Issue #22274: In the subprocess module, allow stderr to be redirected to
4420  stdout even when stdout is not redirected.  Patch by Akira Li.
4421
4422- Issue #26807: mock_open 'files' no longer error on readline at end of file.
4423  Patch from Yolanda Robla.
4424
4425- Issue #25745: Fixed leaking a userptr in curses panel destructor.
4426
4427- Issue #26977: Removed unnecessary, and ignored, call to sum of squares helper
4428  in statistics.pvariance.
4429
4430- Issue #26881: The modulefinder module now supports extended opcode arguments.
4431
4432- Issue #23815: Fixed crashes related to directly created instances of types in
4433  _tkinter and curses.panel modules.
4434
4435- Issue #17765: weakref.ref() no longer silently ignores keyword arguments.
4436  Patch by Georg Brandl.
4437
4438- Issue #26873: xmlrpc now raises ResponseError on unsupported type tags
4439  instead of silently return incorrect result.
4440
4441- Issue #26711: Fixed the comparison of plistlib.Data with other types.
4442
4443- Issue #24114: Fix an uninitialized variable in `ctypes.util`.
4444
4445  The bug only occurs on SunOS when the ctypes implementation searches
4446  for the `crle` program.  Patch by Xiang Zhang.  Tested on SunOS by
4447  Kees Bos.
4448
4449- Issue #26864: In urllib.request, change the proxy bypass host checking
4450  against no_proxy to be case-insensitive, and to not match unrelated host
4451  names that happen to have a bypassed hostname as a suffix.  Patch by Xiang
4452  Zhang.
4453
4454- Issue #26634: recursive_repr() now sets __qualname__ of wrapper.  Patch by
4455  Xiang Zhang.
4456
4457- Issue #26804: urllib.request will prefer lower_case proxy environment
4458  variables over UPPER_CASE or Mixed_Case ones. Patch contributed by Hans-Peter
4459  Jansen.
4460
4461- Issue #26837: assertSequenceEqual() now correctly outputs non-stringified
4462  differing items (like bytes in the -b mode).  This affects assertListEqual()
4463  and assertTupleEqual().
4464
4465- Issue #26041: Remove "will be removed in Python 3.7" from deprecation
4466  messages of platform.dist() and platform.linux_distribution().
4467  Patch by Kumaripaba Miyurusara Athukorala.
4468
4469- Issue #26822: itemgetter, attrgetter and methodcaller objects no longer
4470  silently ignore keyword arguments.
4471
4472- Issue #26733: Disassembling a class now disassembles class and static methods.
4473  Patch by Xiang Zhang.
4474
4475- Issue #26801: Fix error handling in :func:`shutil.get_terminal_size`, catch
4476  :exc:`AttributeError` instead of :exc:`NameError`. Patch written by Emanuel
4477  Barry.
4478
4479- Issue #24838: tarfile's ustar and gnu formats now correctly calculate name
4480  and link field limits for multibyte character encodings like utf-8.
4481
4482- [Security] Issue #26657: Fix directory traversal vulnerability with
4483  http.server on Windows.  This fixes a regression that was introduced in
4484  3.3.4rc1 and 3.4.0rc1.  Based on patch by Philipp Hagemeister.
4485
4486- Issue #26717: Stop encoding Latin-1-ized WSGI paths with UTF-8.  Patch by
4487  Anthony Sottile.
4488
4489- Issue #26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading
4490  more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of
4491  1024 bytes per call.
4492
4493- Issue #16329: Add .webm to mimetypes.types_map.  Patch by Giampaolo Rodola'.
4494
4495- Issue #13952: Add .csv to mimetypes.types_map.  Patch by Geoff Wilson.
4496
4497- Issue #26709: Fixed Y2038 problem in loading binary PLists.
4498
4499- Issue #23735: Handle terminal resizing with Readline 6.3+ by installing our
4500  own SIGWINCH handler.  Patch by Eric Price.
4501
4502- Issue #26586: In http.server, respond with "413 Request header fields too
4503  large" if there are too many header fields to parse, rather than killing
4504  the connection and raising an unhandled exception.  Patch by Xiang Zhang.
4505
4506- Issue #22854: Change BufferedReader.writable() and
4507  BufferedWriter.readable() to always return False.
4508
4509- Issue #25195: Fix a regression in mock.MagicMock. _Call is a subclass of
4510  tuple (changeset 3603bae63c13 only works for classes) so we need to
4511  implement __ne__ ourselves.  Patch by Andrew Plummer.
4512
4513- Issue #26644: Raise ValueError rather than SystemError when a negative
4514  length is passed to SSLSocket.recv() or read().
4515
4516- Issue #23804: Fix SSL recv(0) and read(0) methods to return zero bytes
4517  instead of up to 1024.
4518
4519- Issue #26616: Fixed a bug in datetime.astimezone() method.
4520
4521- Issue #21925: :func:`warnings.formatwarning` now catches exceptions on
4522  ``linecache.getline(...)`` to be able to log :exc:`ResourceWarning` emitted
4523  late during the Python shutdown process.
4524
4525- Issue #24266: Ctrl+C during Readline history search now cancels the search
4526  mode when compiled with Readline 7.
4527
4528- Issue #26560: Avoid potential ValueError in BaseHandler.start_response.
4529  Initial patch by Peter Inglesby.
4530
4531- [Security] Issue #26313: ssl.py _load_windows_store_certs fails if windows
4532  cert store is empty. Patch by Baji.
4533
4534- Issue #26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex`
4535  to support importing packages.
4536
4537- Issue #26499: Account for remaining Content-Length in
4538  HTTPResponse.readline() and read1().  Based on patch by Silent Ghost.
4539  Also document that HTTPResponse now supports these methods.
4540
4541- Issue #25320: Handle sockets in directories unittest discovery is scanning.
4542  Patch from Victor van den Elzen.
4543
4544- Issue #16181: cookiejar.http2time() now returns None if year is higher than
4545  datetime.MAXYEAR.
4546
4547- Issue #26513: Fixes platform module detection of Windows Server
4548
4549- Issue #23718: Fixed parsing time in week 0 before Jan 1.  Original patch by
4550  Tamás Bence Gedai.
4551
4552- Issue #20589: Invoking Path.owner() and Path.group() on Windows now raise
4553  NotImplementedError instead of ImportError.
4554
4555- Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
4556
4557- Issue #15068: Got rid of excessive buffering in the fileinput module.
4558  The bufsize parameter is no longer used.
4559
4560- Issue #2202: Fix UnboundLocalError in
4561  AbstractDigestAuthHandler.get_algorithm_impls.  Initial patch by Mathieu
4562  Dupuy.
4563
4564- Issue #25718: Fixed pickling and copying the accumulate() iterator with
4565  total is None.
4566
4567- Issue #26475: Fixed debugging output for regular expressions with the (?x)
4568  flag.
4569
4570- Issue #26457: Fixed the subnets() methods in IP network classes for the case
4571  when resulting prefix length is equal to maximal prefix length.
4572  Based on patch by Xiang Zhang.
4573
4574- Issue #26385: Remove the file if the internal open() call in
4575  NamedTemporaryFile() fails.  Patch by Silent Ghost.
4576
4577- Issue #26402: Fix XML-RPC client to retry when the server shuts down a
4578  persistent connection.  This was a regression related to the new
4579  http.client.RemoteDisconnected exception in 3.5.0a4.
4580
4581- Issue #25913: Leading ``<~`` is optional now in base64.a85decode() with
4582  adobe=True.  Patch by Swati Jaiswal.
4583
4584- Issue #26186: Remove an invalid type check in importlib.util.LazyLoader.
4585
4586- Issue #26367: importlib.__import__() raises SystemError like
4587  builtins.__import__() when ``level`` is specified but without an accompanying
4588  package specified.
4589
4590- Issue #26309: In the "socketserver" module, shut down the request (closing
4591  the connected socket) when verify_request() returns false.  Patch by Aviv
4592  Palivoda.
4593
4594- [Security] Issue #25939: On Windows open the cert store readonly in
4595  ssl.enum_certificates.
4596
4597- Issue #25995: os.walk() no longer uses FDs proportional to the tree depth.
4598
4599- Issue #26117: The os.scandir() iterator now closes file descriptor not only
4600  when the iteration is finished, but when it was failed with error.
4601
4602- Issue #25911: Restored support of bytes paths in os.walk() on Windows.
4603
4604- Issue #26045: Add UTF-8 suggestion to error message when posting a
4605  non-Latin-1 string with http.client.
4606
4607- Issue #12923: Reset FancyURLopener's redirect counter even if there is an
4608  exception.  Based on patches by Brian Brazil and Daniel Rocco.
4609
4610- Issue #25945: Fixed a crash when unpickle the functools.partial object with
4611  wrong state.  Fixed a leak in failed functools.partial constructor.
4612  "args" and "keywords" attributes of functools.partial have now always types
4613  tuple and dict correspondingly.
4614
4615- Issue #26202: copy.deepcopy() now correctly copies range() objects with
4616  non-atomic attributes.
4617
4618- Issue #23076: Path.glob() now raises a ValueError if it's called with an
4619  invalid pattern.  Patch by Thomas Nyberg.
4620
4621- Issue #19883: Fixed possible integer overflows in zipimport.
4622
4623- Issue #26227: On Windows, getnameinfo(), gethostbyaddr() and
4624  gethostbyname_ex() functions of the socket module now decode the hostname
4625  from the ANSI code page rather than UTF-8.
4626
4627- Issue #26147: xmlrpc now works with strings not encodable with used
4628  non-UTF-8 encoding.
4629
4630- Issue #25935: Garbage collector now breaks reference loops with OrderedDict.
4631
4632- Issue #16620: Fixed AttributeError in msilib.Directory.glob().
4633
4634- Issue #26013: Added compatibility with broken protocol 2 pickles created
4635  in old Python 3 versions (3.4.3 and lower).
4636
4637- Issue #25850: Use cross-compilation by default for 64-bit Windows.
4638
4639- Issue #17633: Improve zipimport's support for namespace packages.
4640
4641- Issue #24705: Fix sysconfig._parse_makefile not expanding ${} vars
4642  appearing before $() vars.
4643
4644- Issue #22138: Fix mock.patch behavior when patching descriptors. Restore
4645  original values after patching. Patch contributed by Sean McCully.
4646
4647- Issue #25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode
4648  option if it is safe to do so.
4649
4650- Issue #26012: Don't traverse into symlinks for ** pattern in
4651  pathlib.Path.[r]glob().
4652
4653- Issue #24120: Ignore PermissionError when traversing a tree with
4654  pathlib.Path.[r]glob().  Patch by Ulrich Petri.
4655
4656- Issue #25447: fileinput now uses sys.stdin as-is if it does not have a
4657  buffer attribute (restores backward compatibility).
4658
4659- Issue #25447: Copying the lru_cache() wrapper object now always works,
4660  independedly from the type of the wrapped object (by returning the original
4661  object unchanged).
4662
4663- Issue #24103: Fixed possible use after free in ElementTree.XMLPullParser.
4664
4665- Issue #25860: os.fwalk() no longer skips remaining directories when error
4666  occurs.  Original patch by Samson Lee.
4667
4668- Issue #25914: Fixed and simplified OrderedDict.__sizeof__.
4669
4670- Issue #25902: Fixed various refcount issues in ElementTree iteration.
4671
4672- Issue #25717: Restore the previous behaviour of tolerating most fstat()
4673  errors when opening files.  This was a regression in 3.5a1, and stopped
4674  anonymous temporary files from working in special cases.
4675
4676- Issue #24903: Fix regression in number of arguments compileall accepts when
4677  '-d' is specified.  The check on the number of arguments has been dropped
4678  completely as it never worked correctly anyway.
4679
4680- Issue #25764: In the subprocess module, preserve any exception caused by
4681  fork() failure when preexec_fn is used.
4682
4683- Issue #6478: _strptime's regexp cache now is reset after changing timezone
4684  with time.tzset().
4685
4686- Issue #14285: When executing a package with the "python -m package" option,
4687  and package initialization fails, a proper traceback is now reported.  The
4688  "runpy" module now lets exceptions from package initialization pass back to
4689  the caller, rather than raising ImportError.
4690
4691- Issue #19771: Also in runpy and the "-m" option, omit the irrelevant
4692  message ". . . is a package and cannot be directly executed" if the package
4693  could not even be initialized (e.g. due to a bad ``*.pyc`` file).
4694
4695- Issue #25177: Fixed problem with the mean of very small and very large
4696  numbers. As a side effect, statistics.mean and statistics.variance should
4697  be significantly faster.
4698
4699- Issue #25718: Fixed copying object with state with boolean value is false.
4700
4701- Issue #10131: Fixed deep copying of minidom documents.  Based on patch
4702  by Marian Ganisin.
4703
4704- Issue #25725: Fixed a reference leak in pickle.loads() when unpickling
4705  invalid data including tuple instructions.
4706
4707- Issue #25663: In the Readline completer, avoid listing duplicate global
4708  names, and search the global namespace before searching builtins.
4709
4710- Issue #25688: Fixed file leak in ElementTree.iterparse() raising an error.
4711
4712- Issue #23914: Fixed SystemError raised by unpickler on broken pickle data.
4713
4714- Issue #25691: Fixed crash on deleting ElementTree.Element attributes.
4715
4716- Issue #25624: ZipFile now always writes a ZIP_STORED header for directory
4717  entries.  Patch by Dingyuan Wang.
4718
4719- Skip getaddrinfo if host is already resolved.
4720  Patch by A. Jesse Jiryu Davis.
4721
4722- Issue #26050: Add asyncio.StreamReader.readuntil() method.
4723  Patch by Марк Коренберг.
4724
4725- Issue #25924: Avoid unnecessary serialization of getaddrinfo(3) calls on
4726  OS X versions 10.5 or higher.  Original patch by A. Jesse Jiryu Davis.
4727
4728- Issue #26406: Avoid unnecessary serialization of getaddrinfo(3) calls on
4729  current versions of OpenBSD and NetBSD.  Patch by A. Jesse Jiryu Davis.
4730
4731- Issue #26848: Fix asyncio/subprocess.communicate() to handle empty input.
4732  Patch by Jack O'Connor.
4733
4734- Issue #27040: Add loop.get_exception_handler method
4735
4736- Issue #27041: asyncio: Add loop.create_future method
4737
4738- Issue #27223: asyncio: Fix _read_ready and _write_ready to respect
4739  _conn_lost.
4740  Patch by Łukasz Langa.
4741
4742- Issue #22970: asyncio: Fix inconsistency cancelling Condition.wait.
4743  Patch by David Coles.
4744
4745IDLE
4746----
4747
4748- Issue #5124: Paste with text selected now replaces the selection on X11.
4749  This matches how paste works on Windows, Mac, most modern Linux apps,
4750  and ttk widgets.  Original patch by Serhiy Storchaka.
4751
4752- Issue #24759: Make clear in idlelib.idle_test.__init__ that the directory
4753  is a private implementation of test.test_idle and tool for maintainers.
4754
4755- Issue #27196: Stop 'ThemeChanged' warnings when running IDLE tests.
4756  These persisted after other warnings were suppressed in #20567.
4757  Apply Serhiy Storchaka's update_idletasks solution to four test files.
4758  Record this additional advice in idle_test/README.txt
4759
4760- Issue #20567: Revise idle_test/README.txt with advice about avoiding
4761  tk warning messages from tests.  Apply advice to several IDLE tests.
4762
4763- Issue #27117: Make colorizer htest and turtledemo work with dark themes.
4764  Move code for configuring text widget colors to a new function.
4765
4766- Issue #26673: When tk reports font size as 0, change to size 10.
4767  Such fonts on Linux prevented the configuration dialog from opening.
4768
4769- Issue #21939: Add test for IDLE's percolator.
4770  Original patch by Saimadhav Heblikar.
4771
4772- Issue #21676: Add test for IDLE's replace dialog.
4773  Original patch by Saimadhav Heblikar.
4774
4775- Issue #18410: Add test for IDLE's search dialog.
4776  Original patch by Westley Martínez.
4777
4778- Issue #21703: Add test for IDLE's undo delegator.
4779  Original patch by Saimadhav Heblikar .
4780
4781- Issue #27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks.
4782
4783- Issue #23977: Add more asserts to test_delegator.
4784
4785- Issue #20640: Add tests for idlelib.configHelpSourceEdit.
4786  Patch by Saimadhav Heblikar.
4787
4788- In the 'IDLE-console differences' section of the IDLE doc, clarify
4789  how running with IDLE affects sys.modules and the standard streams.
4790
4791- Issue #25507: fix incorrect change in IOBinding that prevented printing.
4792  Augment IOBinding htest to include all major IOBinding functions.
4793
4794- Issue #25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION
4795  MARK in README.txt and open this and NEWS.txt with 'ascii'.
4796  Re-encode CREDITS.txt to utf-8 and open it with 'utf-8'.
4797
4798Documentation
4799-------------
4800
4801- Issue #19489: Moved the search box from the sidebar to the header and footer
4802  of each page.  Patch by Ammar Askar.
4803
4804- Issue #24136: Document the new PEP 448 unpacking syntax of 3.5.
4805
4806- Issue #26736: Used HTTPS for external links in the documentation if possible.
4807
4808- Issue #6953: Rework the Readline module documentation to group related
4809  functions together, and add more details such as what underlying Readline
4810  functions and variables are accessed.
4811
4812- Issue #23606: Adds note to ctypes documentation regarding cdll.msvcrt.
4813
4814- Issue #25500: Fix documentation to not claim that __import__ is searched for
4815  in the global scope.
4816
4817- Issue #26014: Update 3.x packaging documentation:
4818  * "See also" links to the new docs are now provided in the legacy pages
4819  * links to setuptools documentation have been updated
4820
4821Tests
4822-----
4823
4824- Issue #21916: Added tests for the turtle module.  Patch by ingrid,
4825  Gregory Loyse and Jelle Zijlstra.
4826
4827- Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool)
4828  was untested.
4829
4830- Issue #26015: Added new tests for pickling iterators of mutable sequences.
4831
4832- Issue #26325: Added test.support.check_no_resource_warning() to check that
4833  no ResourceWarning is emitted.
4834
4835- Issue #25940: Changed test_ssl to use self-signed.pythontest.net.  This
4836  avoids relying on svn.python.org, which recently changed root certificate.
4837
4838- Issue #25616: Tests for OrderedDict are extracted from test_collections
4839  into separate file test_ordered_dict.
4840
4841- Issue #26583: Skip test_timestamp_overflow in test_import if bytecode
4842  files cannot be written.
4843
4844Build
4845-----
4846
4847- Issue #26884: Fix linking extension modules for cross builds.
4848  Patch by Xavier de Gaye.
4849
4850- Issue #22359: Disable the rules for running _freeze_importlib and pgen when
4851  cross-compiling.  The output of these programs is normally saved with the
4852  source code anyway, and is still regenerated when doing a native build.
4853  Patch by Xavier de Gaye.
4854
4855- Issue #27229: Fix the cross-compiling pgen rule for in-tree builds.  Patch
4856  by Xavier de Gaye.
4857
4858- Issue #21668: Link audioop, _datetime, _ctypes_test modules to libm,
4859  except on Mac OS X. Patch written by Xavier de Gaye.
4860
4861- Issue #25702: A --with-lto configure option has been added that will
4862  enable link time optimizations at build time during a make profile-opt.
4863  Some compilers and toolchains are known to not produce stable code when
4864  using LTO, be sure to test things thoroughly before relying on it.
4865  It can provide a few % speed up over profile-opt alone.
4866
4867- Issue #26624: Adds validation of ucrtbase[d].dll version with warning
4868  for old versions.
4869
4870- Issue #17603: Avoid error about nonexistant fileblocks.o file by using a
4871  lower-level check for st_blocks in struct stat.
4872
4873- Issue #26079: Fixing the build output folder for tix-8.4.3.6. Patch by
4874  Bjoern Thiel.
4875
4876- Issue #26465: Update Windows builds to use OpenSSL 1.0.2g.
4877
4878- Issue #24421: Compile Modules/_math.c once, before building extensions.
4879  Previously it could fail to compile properly if the math and cmath builds
4880  were concurrent.
4881
4882- Issue #25348: Added ``--pgo`` and ``--pgo-job`` arguments to
4883  ``PCbuild\build.bat`` for building with Profile-Guided Optimization.  The
4884  old ``PCbuild\build_pgo.bat`` script is now deprecated, and simply calls
4885  ``PCbuild\build.bat --pgo %*``.
4886
4887- Issue #25827: Add support for building with ICC to ``configure``, including
4888  a new ``--with-icc`` flag.
4889
4890- Issue #25696: Fix installation of Python on UNIX with make -j9.
4891
4892- Issue #26930: Update OS X 10.5+ 32-bit-only installer to build
4893  and link with OpenSSL 1.0.2h.
4894
4895- Issue #26268: Update Windows builds to use OpenSSL 1.0.2f.
4896
4897- Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.
4898
4899- Issue #24324: Do not enable unreachable code warnings when using
4900  gcc as the option does not work correctly in older versions of gcc
4901  and has been silently removed as of gcc-4.5.
4902
4903Windows
4904-------
4905
4906- Issue #27053: Updates make_zip.py to correctly generate library ZIP file.
4907
4908- Issue #26268: Update the prepare_ssl.py script to handle OpenSSL releases
4909  that don't include the contents of the include directory (that is, 1.0.2e
4910  and later).
4911
4912- Issue #26071: bdist_wininst created binaries fail to start and find
4913  32bit Python
4914
4915- Issue #26073: Update the list of magic numbers in launcher
4916
4917- Issue #26065: Excludes venv from library when generating embeddable
4918  distro.
4919
4920Tools/Demos
4921-----------
4922
4923- Issue #26799: Fix python-gdb.py: don't get C types once when the Python code
4924  is loaded, but get C types on demand. The C types can change if
4925  python-gdb.py is loaded before the Python executable. Patch written by Thomas
4926  Ilsche.
4927
4928- Issue #26271: Fix the Freeze tool to properly use flags passed through
4929  configure. Patch by Daniel Shaulov.
4930
4931- Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py.
4932  Patch by Guo Ci Teo.
4933
4934- Issue #26316: Fix variable name typo in Argument Clinic.
4935
4936Misc
4937----
4938
4939- Issue #17500, and https://github.com/python/pythondotorg/issues/945: Remove
4940  unused and outdated icons.
4941
4942
4943What's New in Python 3.5.1 final?
4944=================================
4945
4946Release date: 2015-12-06
4947
4948Core and Builtins
4949-----------------
4950
4951- Issue #25709: Fixed problem with in-place string concatenation and
4952  utf-8 cache.
4953
4954Windows
4955-------
4956
4957- Issue #25715: Python 3.5.1 installer shows wrong upgrade path and incorrect
4958  logic for launcher detection.
4959
4960
4961What's New in Python 3.5.1 release candidate 1?
4962===============================================
4963
4964Release date: 2015-11-22
4965
4966Core and Builtins
4967-----------------
4968
4969- Issue #25630: Fix a possible segfault during argument parsing in functions
4970  that accept filesystem paths.
4971
4972- Issue #23564: Fixed a partially broken sanity check in the _posixsubprocess
4973  internals regarding how fds_to_pass were passed to the child.  The bug had
4974  no actual impact as subprocess.py already avoided it.
4975
4976- Issue #25388: Fixed tokenizer crash when processing undecodable source code
4977  with a null byte.
4978
4979- Issue #25462: The hash of the key now is calculated only once in most
4980  operations in C implementation of OrderedDict.
4981
4982- Issue #22995: Default implementation of __reduce__ and __reduce_ex__ now
4983  rejects builtin types with not defined __new__.
4984
4985- Issue #25555: Fix parser and AST: fill lineno and col_offset of "arg" node
4986  when compiling AST from Python objects.
4987
4988- Issue #24802: Avoid buffer overreads when int(), float(), compile(), exec()
4989  and eval() are passed bytes-like objects.  These objects are not
4990  necessarily terminated by a null byte, but the functions assumed they were.
4991
4992- Issue #24726: Fixed a crash and leaking NULL in repr() of OrderedDict that
4993  was mutated by direct calls of dict methods.
4994
4995- Issue #25449: Iterating OrderedDict with keys with unstable hash now raises
4996  KeyError in C implementations as well as in Python implementation.
4997
4998- Issue #25395: Fixed crash when highly nested OrderedDict structures were
4999  garbage collected.
5000
5001- Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
5002  recursion limit is too low depending at the current recursion depth. Modify
5003  also the "lower-water mark" formula to make it monotonic. This mark is used
5004  to decide when the overflowed flag of the thread state is reset.
5005
5006- Issue #24402: Fix input() to prompt to the redirected stdout when
5007  sys.stdout.fileno() fails.
5008
5009- Issue #24806: Prevent builtin types that are not allowed to be subclassed from
5010  being subclassed through multiple inheritance.
5011
5012- Issue #24848: Fixed a number of bugs in UTF-7 decoding of misformed data.
5013
5014- Issue #25280: Import trace messages emitted in verbose (-v) mode are no
5015  longer formatted twice.
5016
5017- Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the
5018  getrandom() function instead of the getentropy() function. The getentropy()
5019  function is blocking to generate very good quality entropy, os.urandom()
5020  doesn't need such high-quality entropy.
5021
5022- Issue #25182: The stdprinter (used as sys.stderr before the io module is
5023  imported at startup) now uses the backslashreplace error handler.
5024
5025- Issue #25131: Make the line number and column offset of set/dict literals and
5026  comprehensions correspond to the opening brace.
5027
5028- Issue #25150: Hide the private _Py_atomic_xxx symbols from the public
5029  Python.h header to fix a compilation error with OpenMP. PyThreadState_GET()
5030  becomes an alias to PyThreadState_Get() to avoid ABI incompatibilies.
5031
5032Library
5033-------
5034
5035- Issue #25626: Change three zlib functions to accept sizes that fit in
5036  Py_ssize_t, but internally cap those sizes to UINT_MAX.  This resolves a
5037  regression in 3.5 where GzipFile.read() failed to read chunks larger than 2
5038  or 4 GiB.  The change affects the zlib.Decompress.decompress() max_length
5039  parameter, the zlib.decompress() bufsize parameter, and the
5040  zlib.Decompress.flush() length parameter.
5041
5042- Issue #25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True)
5043  when the OS gives priority to errors such as EACCES over EEXIST.
5044
5045- Issue #25593: Change semantics of EventLoop.stop() in asyncio.
5046
5047- Issue #6973: When we know a subprocess.Popen process has died, do
5048  not allow the send_signal(), terminate(), or kill() methods to do
5049  anything as they could potentially signal a different process.
5050
5051- Issue #25590: In the Readline completer, only call getattr() once per
5052  attribute.
5053
5054- Issue #25498: Fix a crash when garbage-collecting ctypes objects created
5055  by wrapping a memoryview.  This was a regression made in 3.5a1.  Based
5056  on patch by Eryksun.
5057
5058- Issue #25584: Added "escape" to the __all__ list in the glob module.
5059
5060- Issue #25584: Fixed recursive glob() with patterns starting with '\*\*'.
5061
5062- Issue #25446: Fix regression in smtplib's AUTH LOGIN support.
5063
5064- Issue #18010: Fix the pydoc web server's module search function to handle
5065  exceptions from importing packages.
5066
5067- Issue #25554: Got rid of circular references in regular expression parsing.
5068
5069- Issue #25510: fileinput.FileInput.readline() now returns b'' instead of ''
5070  at the end if the FileInput was opened with binary mode.
5071  Patch by Ryosuke Ito.
5072
5073- Issue #25503: Fixed inspect.getdoc() for inherited docstrings of properties.
5074  Original patch by John Mark Vandenberg.
5075
5076- Issue #25515: Always use os.urandom as a source of randomness in uuid.uuid4.
5077
5078- Issue #21827: Fixed textwrap.dedent() for the case when largest common
5079  whitespace is a substring of smallest leading whitespace.
5080  Based on patch by Robert Li.
5081
5082- Issue #25447: The lru_cache() wrapper objects now can be copied and pickled
5083  (by returning the original object unchanged).
5084
5085- Issue #25390: typing: Don't crash on Union[str, Pattern].
5086
5087- Issue #25441: asyncio: Raise error from drain() when socket is closed.
5088
5089- Issue #25410: Cleaned up and fixed minor bugs in C implementation of
5090  OrderedDict.
5091
5092- Issue #25411: Improved Unicode support in SMTPHandler through better use of
5093  the email package. Thanks to user simon04 for the patch.
5094
5095- Issue #25407: Remove mentions of the formatter module being removed in
5096  Python 3.6.
5097
5098- Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()
5099  that caused segmentation fault or hang in iterating after moving several
5100  items to the start of ordered dict.
5101
5102- Issue #25364: zipfile now works in threads disabled builds.
5103
5104- Issue #25328: smtpd's SMTPChannel now correctly raises a ValueError if both
5105  decode_data and enable_SMTPUTF8 are set to true.
5106
5107- Issue #25316: distutils raises OSError instead of DistutilsPlatformError
5108  when MSVC is not installed.
5109
5110- Issue #25380: Fixed protocol for the STACK_GLOBAL opcode in
5111  pickletools.opcodes.
5112
5113- Issue #23972: Updates asyncio datagram create method allowing reuseport
5114  and reuseaddr socket options to be set prior to binding the socket.
5115  Mirroring the existing asyncio create_server method the reuseaddr option
5116  for datagram sockets defaults to True if the O/S is 'posix' (except if the
5117  platform is Cygwin). Patch by Chris Laws.
5118
5119- Issue #25304: Add asyncio.run_coroutine_threadsafe().  This lets you
5120  submit a coroutine to a loop from another thread, returning a
5121  concurrent.futures.Future.  By Vincent Michel.
5122
5123- Issue #25232: Fix CGIRequestHandler to split the query from the URL at the
5124  first question mark (?) rather than the last. Patch from Xiang Zhang.
5125
5126- Issue #24657: Prevent CGIRequestHandler from collapsing slashes in the
5127  query part of the URL as if it were a path. Patch from Xiang Zhang.
5128
5129- Issue #24483: C implementation of functools.lru_cache() now calculates key's
5130  hash only once.
5131
5132- Issue #22958: Constructor and update method of weakref.WeakValueDictionary
5133  now accept the self and the dict keyword arguments.
5134
5135- Issue #22609: Constructor of collections.UserDict now accepts the self keyword
5136  argument.
5137
5138- Issue #25111: Fixed comparison of traceback.FrameSummary.
5139
5140- Issue #25262: Added support for BINBYTES8 opcode in Python implementation of
5141  unpickler.  Highest 32 bits of 64-bit size for BINUNICODE8 and BINBYTES8
5142  opcodes no longer silently ignored on 32-bit platforms in C implementation.
5143
5144- Issue #25034: Fix string.Formatter problem with auto-numbering and
5145  nested format_specs. Patch by Anthon van der Neut.
5146
5147- Issue #25233: Rewrite the guts of asyncio.Queue and
5148  asyncio.Semaphore to be more understandable and correct.
5149
5150- Issue #25203: Failed readline.set_completer_delims() no longer left the
5151  module in inconsistent state.
5152
5153- Issue #23600: Default implementation of tzinfo.fromutc() was returning
5154  wrong results in some cases.
5155
5156- Issue #23329: Allow the ssl module to be built with older versions of
5157  LibreSSL.
5158
5159- Prevent overflow in _Unpickler_Read.
5160
5161- Issue #25047: The XML encoding declaration written by Element Tree now
5162  respects the letter case given by the user. This restores the ability to
5163  write encoding names in uppercase like "UTF-8", which worked in Python 2.
5164
5165- Issue #25135: Make deque_clear() safer by emptying the deque before clearing.
5166  This helps avoid possible reentrancy issues.
5167
5168- Issue #19143: platform module now reads Windows version from kernel32.dll to
5169  avoid compatibility shims.
5170
5171- Issue #25092: Fix datetime.strftime() failure when errno was already set to
5172  EINVAL.
5173
5174- Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
5175  of datetime.datetime: microseconds are now rounded to nearest with ties
5176  going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding
5177  towards minus infinity (ROUND_FLOOR). It's important that these methods use
5178  the same rounding mode than datetime.timedelta to keep the property:
5179  (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t).
5180  It also the rounding mode used by round(float) for example.
5181
5182- Issue #25155: Fix datetime.datetime.now() and datetime.datetime.utcnow() on
5183  Windows to support date after year 2038. It was a regression introduced in
5184  Python 3.5.0.
5185
5186- Issue #25108: Omitted internal frames in traceback functions print_stack(),
5187  format_stack(), and extract_stack() called without arguments.
5188
5189- Issue #25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows.
5190
5191- Issue #24684: socket.socket.getaddrinfo() now calls
5192  PyUnicode_AsEncodedString() instead of calling the encode() method of the
5193  host, to handle correctly custom string with an encode() method which doesn't
5194  return a byte string. The encoder of the IDNA codec is now called directly
5195  instead of calling the encode() method of the string.
5196
5197- Issue #25060: Correctly compute stack usage of the BUILD_MAP opcode.
5198
5199- Issue #24857: Comparing call_args to a long sequence now correctly returns a
5200  boolean result instead of raising an exception.  Patch by A Kaptur.
5201
5202- Issue #23144: Make sure that HTMLParser.feed() returns all the data, even
5203  when convert_charrefs is True.
5204
5205- Issue #24982: shutil.make_archive() with the "zip" format now adds entries
5206  for directories (including empty directories) in ZIP file.
5207
5208- Issue #25019: Fixed a crash caused by setting non-string key of expat parser.
5209  Based on patch by John Leitch.
5210
5211- Issue #16180: Exit pdb if file has syntax error, instead of trapping user
5212  in an infinite loop.  Patch by Xavier de Gaye.
5213
5214- Issue #24891: Fix a race condition at Python startup if the file descriptor
5215  of stdin (0), stdout (1) or stderr (2) is closed while Python is creating
5216  sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set
5217  to None if the creation of the object failed, instead of raising an OSError
5218  exception. Initial patch written by Marco Paolini.
5219
5220- Issue #24992: Fix error handling and a race condition (related to garbage
5221  collection) in collections.OrderedDict constructor.
5222
5223- Issue #24881: Fixed setting binary mode in Python implementation of FileIO
5224  on Windows and Cygwin.  Patch from Akira Li.
5225
5226- Issue #25578: Fix (another) memory leak in SSLSocket.getpeercer().
5227
5228- Issue #25530: Disable the vulnerable SSLv3 protocol by default when creating
5229  ssl.SSLContext.
5230
5231- Issue #25569: Fix memory leak in SSLSocket.getpeercert().
5232
5233- Issue #25471: Sockets returned from accept() shouldn't appear to be
5234  nonblocking.
5235
5236- Issue #25319: When threading.Event is reinitialized, the underlying condition
5237  should use a regular lock rather than a recursive lock.
5238
5239- Issue #21112: Fix regression in unittest.expectedFailure on subclasses.
5240  Patch from Berker Peksag.
5241
5242- Issue #24764: cgi.FieldStorage.read_multi() now ignores the Content-Length
5243  header in part headers. Patch written by Peter Landry and reviewed by Pierre
5244  Quentel.
5245
5246- Issue #24913: Fix overrun error in deque.index().
5247  Found by John Leitch and Bryce Darling.
5248
5249- Issue #24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu.
5250
5251- Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
5252  Patch from Łukasz Langa.
5253
5254- Issue #20362: Honour TestCase.longMessage correctly in assertRegex.
5255  Patch from Ilia Kurenkov.
5256
5257- Issue #23572: Fixed functools.singledispatch on classes with falsy
5258  metaclasses.  Patch by Ethan Furman.
5259
5260- asyncio: ensure_future() now accepts awaitable objects.
5261
5262IDLE
5263----
5264
5265- Issue #15348: Stop the debugger engine (normally in a user process)
5266  before closing the debugger window (running in the IDLE process).
5267  This prevents the RuntimeErrors that were being caught and ignored.
5268
5269- Issue #24455: Prevent IDLE from hanging when a) closing the shell while the
5270  debugger is active (15347); b) closing the debugger with the [X] button
5271  (15348); and c) activating the debugger when already active (24455).
5272  The patch by Mark Roseman does this by making two changes.
5273  1. Suspend and resume the gui.interaction method with the tcl vwait
5274  mechanism intended for this purpose (instead of root.mainloop & .quit).
5275  2. In gui.run, allow any existing interaction to terminate first.
5276
5277- Change 'The program' to 'Your program' in an IDLE 'kill program?' message
5278  to make it clearer that the program referred to is the currently running
5279  user program, not IDLE itself.
5280
5281- Issue #24750: Improve the appearance of the IDLE editor window status bar.
5282  Patch by Mark Roseman.
5283
5284- Issue #25313: Change the handling of new built-in text color themes to better
5285  address the compatibility problem introduced by the addition of IDLE Dark.
5286  Consistently use the revised idleConf.CurrentTheme everywhere in idlelib.
5287
5288- Issue #24782: Extension configuration is now a tab in the IDLE Preferences
5289  dialog rather than a separate dialog.  The former tabs are now a sorted
5290  list.  Patch by Mark Roseman.
5291
5292- Issue #22726: Re-activate the config dialog help button with some content
5293  about the other buttons and the new IDLE Dark theme.
5294
5295- Issue #24820: IDLE now has an 'IDLE Dark' built-in text color theme.
5296  It is more or less IDLE Classic inverted, with a cobalt blue background.
5297  Strings, comments, keywords, ... are still green, red, orange, ... .
5298  To use it with IDLEs released before November 2015, hit the
5299  'Save as New Custom Theme' button and enter a new name,
5300  such as 'Custom Dark'.  The custom theme will work with any IDLE
5301  release, and can be modified.
5302
5303- Issue #25224: README.txt is now an idlelib index for IDLE developers and
5304  curious users.  The previous user content is now in the IDLE doc chapter.
5305  'IDLE' now means 'Integrated Development and Learning Environment'.
5306
5307- Issue #24820: Users can now set breakpoint colors in
5308  Settings -> Custom Highlighting.  Original patch by Mark Roseman.
5309
5310- Issue #24972: Inactive selection background now matches active selection
5311  background, as configured by users, on all systems.  Found items are now
5312  always highlighted on Windows.  Initial patch by Mark Roseman.
5313
5314- Issue #24570: Idle: make calltip and completion boxes appear on Macs
5315  affected by a tk regression.  Initial patch by Mark Roseman.
5316
5317- Issue #24988: Idle ScrolledList context menus (used in debugger)
5318  now work on Mac Aqua.  Patch by Mark Roseman.
5319
5320- Issue #24801: Make right-click for context menu work on Mac Aqua.
5321  Patch by Mark Roseman.
5322
5323- Issue #25173: Associate tkinter messageboxes with a specific widget.
5324  For Mac OSX, make them a 'sheet'.  Patch by Mark Roseman.
5325
5326- Issue #25198: Enhance the initial html viewer now used for Idle Help.
5327  * Properly indent fixed-pitch text (patch by Mark Roseman).
5328  * Give code snippet a very Sphinx-like light blueish-gray background.
5329  * Re-use initial width and height set by users for shell and editor.
5330  * When the Table of Contents (TOC) menu is used, put the section header
5331  at the top of the screen.
5332
5333- Issue #25225: Condense and rewrite Idle doc section on text colors.
5334
5335- Issue #21995: Explain some differences between IDLE and console Python.
5336
5337- Issue #22820: Explain need for *print* when running file from Idle editor.
5338
5339- Issue #25224: Doc: augment Idle feature list and no-subprocess section.
5340
5341- Issue #25219: Update doc for Idle command line options.
5342  Some were missing and notes were not correct.
5343
5344- Issue #24861: Most of idlelib is private and subject to change.
5345  Use idleib.idle.* to start Idle. See idlelib.__init__.__doc__.
5346
5347- Issue #25199: Idle: add synchronization comments for future maintainers.
5348
5349- Issue #16893: Replace help.txt with help.html for Idle doc display.
5350  The new idlelib/help.html is rstripped Doc/build/html/library/idle.html.
5351  It looks better than help.txt and will better document Idle as released.
5352  The tkinter html viewer that works for this file was written by Mark Roseman.
5353  The now unused EditorWindow.HelpDialog class and helt.txt file are deprecated.
5354
5355- Issue #24199: Deprecate unused idlelib.idlever with possible removal in 3.6.
5356
5357- Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
5358
5359Documentation
5360-------------
5361
5362- Issue #22558: Add remaining doc links to source code for Python-coded modules.
5363  Patch by Yoni Lavi.
5364
5365- Issue #12067: Rewrite Comparisons section in the Expressions chapter of the
5366  language reference. Some of the details of comparing mixed types were
5367  incorrect or ambiguous. NotImplemented is only relevant at a lower level
5368  than the Expressions chapter. Added details of comparing range() objects,
5369  and default behaviour and consistency suggestions for user-defined classes.
5370  Patch from Andy Maier.
5371
5372- Issue #24952: Clarify the default size argument of stack_size() in
5373  the "threading" and "_thread" modules. Patch from Mattip.
5374
5375- Issue #23725: Overhaul tempfile docs. Note deprecated status of mktemp.
5376  Patch from Zbigniew Jędrzejewski-Szmek.
5377
5378- Issue #24808: Update the types of some PyTypeObject fields.  Patch by
5379  Joseph Weston.
5380
5381- Issue #22812: Fix unittest discovery examples.
5382  Patch from Pam McA'Nulty.
5383
5384Tests
5385-----
5386
5387- Issue #25449: Added tests for OrderedDict subclasses.
5388
5389- Issue #25099: Make test_compileall not fail when an entry on sys.path cannot
5390  be written to (commonly seen in administrative installs on Windows).
5391
5392- Issue #23919: Prevents assert dialogs appearing in the test suite.
5393
5394- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass along
5395  to regrtest.py.  Previously there was a limit of 9.
5396
5397Build
5398-----
5399
5400- Issue #24915: Add LLVM support for PGO builds and use the test suite to
5401  generate the profile data. Initial patch by Alecsandru Patrascu of Intel.
5402
5403- Issue #24910: Windows MSIs now have unique display names.
5404
5405- Issue #24986: It is now possible to build Python on Windows without errors
5406  when external libraries are not available.
5407
5408Windows
5409-------
5410
5411- Issue #25450: Updates shortcuts to start Python in installation directory.
5412
5413- Issue #25164: Changes default all-users install directory to match per-user
5414  directory.
5415
5416- Issue #25143: Improves installer error messages for unsupported platforms.
5417
5418- Issue #25163: Display correct directory in installer when using non-default
5419  settings.
5420
5421- Issue #25361: Disables use of SSE2 instructions in Windows 32-bit build
5422
5423- Issue #25089: Adds logging to installer for case where launcher is not
5424  selected on upgrade.
5425
5426- Issue #25165: Windows uninstallation should not remove launcher if other
5427  versions remain
5428
5429- Issue #25112: py.exe launcher is missing icons
5430
5431- Issue #25102: Windows installer does not precompile for -O or -OO.
5432
5433- Issue #25081: Makes Back button in installer go back to upgrade page when
5434  upgrading.
5435
5436- Issue #25091: Increases font size of the installer.
5437
5438- Issue #25126: Clarifies that the non-web installer will download some
5439  components.
5440
5441- Issue #25213: Restores requestedExecutionLevel to manifest to disable
5442  UAC virtualization.
5443
5444- Issue #25022: Removed very outdated PC/example_nt/ directory.
5445
5446Tools/Demos
5447-----------
5448
5449- Issue #25440: Fix output of python-config --extension-suffix.
5450
5451
5452What's New in Python 3.5.0 final?
5453=================================
5454
5455Release date: 2015-09-13
5456
5457Build
5458-----
5459
5460- Issue #25071: Windows installer should not require TargetDir
5461  parameter when installing quietly.
5462
5463
5464What's New in Python 3.5.0 release candidate 4?
5465===============================================
5466
5467Release date: 2015-09-09
5468
5469Library
5470-------
5471
5472- Issue #25029: Fixes MemoryError in test_strptime.
5473
5474Build
5475-----
5476
5477- Issue #25027: Reverts partial-static build options and adds
5478  vcruntime140.dll to Windows installation.
5479
5480
5481What's New in Python 3.5.0 release candidate 3?
5482===============================================
5483
5484Release date: 2015-09-07
5485
5486Core and Builtins
5487-----------------
5488
5489- Issue #24305: Prevent import subsystem stack frames from being counted
5490  by the warnings.warn(stacklevel=) parameter.
5491
5492- Issue #24912: Prevent __class__ assignment to immutable built-in objects.
5493
5494- Issue #24975: Fix AST compilation for PEP 448 syntax.
5495
5496Library
5497-------
5498
5499- Issue #24917: time_strftime() buffer over-read.
5500
5501- Issue #24748: To resolve a compatibility problem found with py2exe and
5502  pywin32, imp.load_dynamic() once again ignores previously loaded modules
5503  to support Python modules replacing themselves with extension modules.
5504  Patch by Petr Viktorin.
5505
5506- Issue #24635: Fixed a bug in typing.py where isinstance([], typing.Iterable)
5507  would return True once, then False on subsequent calls.
5508
5509- Issue #24989: Fixed buffer overread in BytesIO.readline() if a position is
5510  set beyond size.  Based on patch by John Leitch.
5511
5512- Issue #24913: Fix overrun error in deque.index().
5513  Found by John Leitch and Bryce Darling.
5514
5515
5516What's New in Python 3.5.0 release candidate 2?
5517===============================================
5518
5519Release date: 2015-08-25
5520
5521Core and Builtins
5522-----------------
5523
5524- Issue #24769: Interpreter now starts properly when dynamic loading
5525  is disabled.  Patch by Petr Viktorin.
5526
5527- Issue #21167: NAN operations are now handled correctly when python is
5528  compiled with ICC even if -fp-model strict is not specified.
5529
5530- Issue #24492: A "package" lacking a __name__ attribute when trying to perform
5531  a ``from .. import ...`` statement will trigger an ImportError instead of an
5532  AttributeError.
5533
5534Library
5535-------
5536
5537- Issue #24847: Removes vcruntime140.dll dependency from Tcl/Tk.
5538
5539- Issue #24839: platform._syscmd_ver raises DeprecationWarning
5540
5541- Issue #24867: Fix Task.get_stack() for 'async def' coroutines
5542
5543
5544What's New in Python 3.5.0 release candidate 1?
5545===============================================
5546
5547Release date: 2015-08-09
5548
5549Core and Builtins
5550-----------------
5551
5552- Issue #24667: Resize odict in all cases that the underlying dict resizes.
5553
5554Library
5555-------
5556
5557- Issue #24824: Signatures of codecs.encode() and codecs.decode() now are
5558  compatible with pydoc.
5559
5560- Issue #24634: Importing uuid should not try to load libc on Windows
5561
5562- Issue #24798: _msvccompiler.py doesn't properly support manifests
5563
5564- Issue #4395: Better testing and documentation of binary operators.
5565  Patch by Martin Panter.
5566
5567- Issue #23973: Update typing.py from GitHub repo.
5568
5569- Issue #23004: mock_open() now reads binary data correctly when the type of
5570  read_data is bytes.  Initial patch by Aaron Hill.
5571
5572- Issue #23888: Handle fractional time in cookie expiry. Patch by ssh.
5573
5574- Issue #23652: Make it possible to compile the select module against the
5575  libc headers from the Linux Standard Base, which do not include some
5576  EPOLL macros.  Patch by Matt Frank.
5577
5578- Issue #22932: Fix timezones in email.utils.formatdate.
5579  Patch from Dmitry Shachnev.
5580
5581- Issue #23779: imaplib raises TypeError if authenticator tries to abort.
5582  Patch from Craig Holmquist.
5583
5584- Issue #23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch
5585  written by Matthieu Gautier.
5586
5587- Issue #23254: Document how to close the TCPServer listening socket.
5588  Patch from Martin Panter.
5589
5590- Issue #19450: Update Windows and OS X installer builds to use SQLite 3.8.11.
5591
5592- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
5593
5594- Issue #24791: Fix grammar regression for call syntax: 'g(\*a or b)'.
5595
5596IDLE
5597----
5598
5599- Issue #23672: Allow Idle to edit and run files with astral chars in name.
5600  Patch by Mohd Sanad Zaki Rizvi.
5601
5602- Issue #24745: Idle editor default font. Switch from Courier to
5603  platform-sensitive TkFixedFont.  This should not affect current customized
5604  font selections.  If there is a problem, edit $HOME/.idlerc/config-main.cfg
5605  and remove 'fontxxx' entries from [Editor Window].  Patch by Mark Roseman.
5606
5607- Issue #21192: Idle editor. When a file is run, put its name in the restart bar.
5608  Do not print false prompts. Original patch by Adnan Umer.
5609
5610- Issue #13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy.
5611
5612Documentation
5613-------------
5614
5615- Issue #24129: Clarify the reference documentation for name resolution.
5616  This includes removing the assumption that readers will be familiar with the
5617  name resolution scheme Python used prior to the introduction of lexical
5618  scoping for function namespaces. Patch by Ivan Levkivskyi.
5619
5620- Issue #20769: Improve reload() docs. Patch by Dorian Pula.
5621
5622- Issue #23589: Remove duplicate sentence from the FAQ.  Patch by Yongzhi Pan.
5623
5624- Issue #24729: Correct IO tutorial to match implementation regarding
5625  encoding parameter to open function.
5626
5627Tests
5628-----
5629
5630- Issue #24751: When running regrtest with the ``-w`` command line option,
5631  a test run is no longer marked as a failure if all tests succeed when
5632  re-run.
5633
5634
5635What's New in Python 3.5.0 beta 4?
5636==================================
5637
5638Release date: 2015-07-26
5639
5640Core and Builtins
5641-----------------
5642
5643- Issue #23573: Restored optimization of bytes.rfind() and bytearray.rfind()
5644  for single-byte argument on Linux.
5645
5646- Issue #24569: Make PEP 448 dictionary evaluation more consistent.
5647
5648- Issue #24583: Fix crash when set is mutated while being updated.
5649
5650- Issue #24407: Fix crash when dict is mutated while being updated.
5651
5652- Issue #24619: New approach for tokenizing async/await. As a consequence,
5653  it is now possible to have one-line 'async def foo(): await ..' functions.
5654
5655- Issue #24687: Plug refleak on SyntaxError in function parameters
5656  annotations.
5657
5658- Issue #15944: memoryview: Allow arbitrary formats when casting to bytes.
5659  Patch by Martin Panter.
5660
5661Library
5662-------
5663
5664- Issue #23441: rcompleter now prints a tab character instead of displaying
5665  possible completions for an empty word.  Initial patch by Martin Sekera.
5666
5667- Issue #24683: Fixed crashes in _json functions called with arguments of
5668  inappropriate type.
5669
5670- Issue #21697: shutil.copytree() now correctly handles symbolic links that
5671  point to directories.  Patch by Eduardo Seabra and Thomas Kluyver.
5672
5673- Issue #14373: Fixed segmentation fault when gc.collect() is called during
5674  constructing lru_cache (C implementation).
5675
5676- Issue #24695: Fix a regression in traceback.print_exception().  If
5677  exc_traceback is None we shouldn't print a traceback header like described
5678  in the documentation.
5679
5680- Issue #24620: Random.setstate() now validates the value of state last element.
5681
5682- Issue #22485: Fixed an issue that caused `inspect.getsource` to return
5683  incorrect results on nested functions.
5684
5685- Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero.
5686
5687- Issue #24580: Symbolic group references to open group in re patterns now are
5688  explicitly forbidden as well as numeric group references.
5689
5690- Issue #24206: Fixed __eq__ and __ne__ methods of inspect classes.
5691
5692- Issue #24631: Fixed regression in the timeit module with multiline setup.
5693
5694- Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.
5695  Patch from Nicola Palumbo and Laurent De Buyst.
5696
5697- Issue #23661: unittest.mock side_effects can now be exceptions again. This
5698  was a regression vs Python 3.4. Patch from Ignacio Rossi
5699
5700- Issue #24608: chunk.Chunk.read() now always returns bytes, not str.
5701
5702- Issue #18684: Fixed reading out of the buffer in the re module.
5703
5704- Issue #24259: tarfile now raises a ReadError if an archive is truncated
5705  inside a data segment.
5706
5707- Issue #15014: SMTP.auth() and SMTP.login() now support RFC 4954's optional
5708  initial-response argument to the SMTP AUTH command.
5709
5710- Issue #24669: Fix inspect.getsource() for 'async def' functions.
5711  Patch by Kai Groner.
5712
5713- Issue #24688: ast.get_docstring() for 'async def' functions.
5714
5715Build
5716-----
5717
5718- Issue #24603: Update Windows builds and OS X 10.5 installer to use OpenSSL
5719  1.0.2d.
5720
5721
5722What's New in Python 3.5.0 beta 3?
5723==================================
5724
5725Release date: 2015-07-05
5726
5727Core and Builtins
5728-----------------
5729
5730- Issue #24467: Fixed possible buffer over-read in bytearray. The bytearray
5731  object now always allocates place for trailing null byte and it's buffer now
5732  is always null-terminated.
5733
5734- Upgrade to Unicode 8.0.0.
5735
5736- Issue #24345: Add Py_tp_finalize slot for the stable ABI.
5737
5738- Issue #24400: Introduce a distinct type for PEP 492 coroutines; add
5739  types.CoroutineType, inspect.getcoroutinestate, inspect.getcoroutinelocals;
5740  coroutines no longer use CO_GENERATOR flag; sys.set_coroutine_wrapper
5741  works only for 'async def' coroutines; inspect.iscoroutine no longer
5742  uses collections.abc.Coroutine, it's intended to test for pure 'async def'
5743  coroutines only; add new opcode: GET_YIELD_FROM_ITER; fix generators wrapper
5744  used in types.coroutine to be instance of collections.abc.Generator;
5745  collections.abc.Awaitable and collections.abc.Coroutine can no longer
5746  be used to detect generator-based coroutines--use inspect.isawaitable
5747  instead.
5748
5749- Issue #24450: Add gi_yieldfrom to generators and cr_await to coroutines.
5750  Contributed by Benno Leslie and Yury Selivanov.
5751
5752- Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.
5753
5754Library
5755-------
5756
5757- Issue #21750: mock_open.read_data can now be read from each instance, as it
5758  could in Python 3.3.
5759
5760- Issue #24552: Fix use after free in an error case of the _pickle module.
5761
5762- Issue #24514: tarfile now tolerates number fields consisting of only
5763  whitespace.
5764
5765- Issue #19176: Fixed doctype() related bugs in C implementation of ElementTree.
5766  A deprecation warning no longer issued by XMLParser subclass with default
5767  doctype() method.  Direct call of doctype() now issues a warning.  Parser's
5768  doctype() now is not called if target's doctype() is called.  Based on patch
5769  by Martin Panter.
5770
5771- Issue #20387: Restore semantic round-trip correctness in tokenize/untokenize
5772  for tab-indented blocks.
5773
5774- Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()
5775  functions of the audioop module.
5776
5777- Issue #24336: The contextmanager decorator now works with functions with
5778  keyword arguments called "func" and "self".  Patch by Martin Panter.
5779
5780- Issue #24522: Fix possible integer overflow in json accelerator module.
5781
5782- Issue #24489: ensure a previously set C errno doesn't disturb cmath.polar().
5783
5784- Issue #24408: Fixed AttributeError in measure() and metrics() methods of
5785  tkinter.Font.
5786
5787- Issue #14373: C implementation of functools.lru_cache() now can be used with
5788  methods.
5789
5790- Issue #24347: Set KeyError if PyDict_GetItemWithError returns NULL.
5791
5792- Issue #24348: Drop superfluous incref/decref.
5793
5794- Issue #24359: Check for changed OrderedDict size during iteration.
5795
5796- Issue #24368: Support keyword arguments in OrderedDict methods.
5797
5798- Issue #24362: Simplify the C OrderedDict fast nodes resize logic.
5799
5800- Issue #24377: Fix a ref leak in OrderedDict.__repr__.
5801
5802- Issue #24369: Defend against key-changes during iteration.
5803
5804Tests
5805-----
5806
5807- Issue #24373: _testmultiphase and xxlimited now use tp_traverse and
5808  tp_finalize to avoid reference leaks encountered when combining tp_dealloc
5809  with PyType_FromSpec (see issue #16690 for details)
5810
5811Documentation
5812-------------
5813
5814- Issue #24458: Update documentation to cover multi-phase initialization for
5815  extension modules (PEP 489). Patch by Petr Viktorin.
5816
5817- Issue #24351: Clarify what is meant by "identifier" in the context of
5818  string.Template instances.
5819
5820Build
5821-----
5822
5823- Issue #24432: Update Windows builds and OS X 10.5 installer to use OpenSSL
5824  1.0.2c.
5825
5826
5827What's New in Python 3.5.0 beta 2?
5828==================================
5829
5830Release date: 2015-05-31
5831
5832Core and Builtins
5833-----------------
5834
5835- Issue #24284: The startswith and endswith methods of the str class no longer
5836  return True when finding the empty string and the indexes are completely out
5837  of range.
5838
5839- Issue #24115: Update uses of PyObject_IsTrue(), PyObject_Not(),
5840  PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
5841  to check for and handle errors correctly.
5842
5843- Issue #24328: Fix importing one character extension modules.
5844
5845- Issue #11205: In dictionary displays, evaluate the key before the value.
5846
5847- Issue #24285: Fixed regression that prevented importing extension modules
5848  from inside packages. Patch by Petr Viktorin.
5849
5850Library
5851-------
5852
5853- Issue #23247: Fix a crash in the StreamWriter.reset() of CJK codecs.
5854
5855- Issue #24270: Add math.isclose() and cmath.isclose() functions as per PEP 485.
5856  Contributed by Chris Barker and Tal Einat.
5857
5858- Issue #5633: Fixed timeit when the statement is a string and the setup is not.
5859
5860- Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
5861  Original patch by David Moore.
5862
5863- Issue #16991: Add a C implementation of OrderedDict.
5864
5865- Issue #23934: Fix inspect.signature to fail correctly for builtin types
5866  lacking signature information.  Initial patch by James Powell.
5867
5868
5869What's New in Python 3.5.0 beta 1?
5870==================================
5871
5872Release date: 2015-05-24
5873
5874Core and Builtins
5875-----------------
5876
5877- Issue #24276: Fixed optimization of property descriptor getter.
5878
5879- Issue #24268: PEP 489: Multi-phase extension module initialization.
5880  Patch by Petr Viktorin.
5881
5882- Issue #23955: Add pyvenv.cfg option to suppress registry/environment
5883  lookup for generating sys.path on Windows.
5884
5885- Issue #24257: Fixed system error in the comparison of faked
5886  types.SimpleNamespace.
5887
5888- Issue #22939: Fixed integer overflow in iterator object.  Patch by
5889  Clement Rouault.
5890
5891- Issue #23985: Fix a possible buffer overrun when deleting a slice from
5892  the front of a bytearray and then appending some other bytes data.
5893
5894- Issue #24102: Fixed exception type checking in standard error handlers.
5895
5896- Issue #15027: The UTF-32 encoder is now 3x to 7x faster.
5897
5898- Issue #23290: Optimize set_merge() for cases where the target is empty.
5899  (Contributed by Serhiy Storchaka.)
5900
5901- Issue #2292: PEP 448: Additional Unpacking Generalizations.
5902
5903- Issue #24096: Make warnings.warn_explicit more robust against mutation of the
5904  warnings.filters list.
5905
5906- Issue #23996: Avoid a crash when a delegated generator raises an
5907  unnormalized StopIteration exception.  Patch by Stefan Behnel.
5908
5909- Issue #23910: Optimize property() getter calls.  Patch by Joe Jevnik.
5910
5911- Issue #23911: Move path-based importlib bootstrap code to a separate
5912  frozen module.
5913
5914- Issue #24192: Fix namespace package imports.
5915
5916- Issue #24022: Fix tokenizer crash when processing undecodable source code.
5917
5918- Issue #9951: Added a hex() method to bytes, bytearray, and memoryview.
5919
5920- Issue #22906: PEP 479: Change StopIteration handling inside generators.
5921
5922- Issue #24017: PEP 492: Coroutines with async and await syntax.
5923
5924Library
5925-------
5926
5927- Issue #14373: Added C implementation of functools.lru_cache().  Based on
5928  patches by Matt Joiner and Alexey Kachayev.
5929
5930- Issue #24230: The tempfile module now accepts bytes for prefix, suffix and dir
5931  parameters and returns bytes in such situations (matching the os module APIs).
5932
5933- Issue #22189: collections.UserString now supports __getnewargs__(),
5934  __rmod__(), casefold(), format_map(), isprintable(), and maketrans().
5935  Patch by Joe Jevnik.
5936
5937- Issue #24244: Prevents termination when an invalid format string is
5938  encountered on Windows in strftime.
5939
5940- Issue #23973: PEP 484: Add the typing module.
5941
5942- Issue #23086: The collections.abc.Sequence() abstract base class added
5943  *start* and *stop* parameters to the index() mixin.
5944  Patch by Devin Jeanpierre.
5945
5946- Issue #20035: Replaced the ``tkinter._fix`` module used for setting up the
5947  Tcl/Tk environment on Windows with a private function in the ``_tkinter``
5948  module that makes no permanent changes to the environment.
5949
5950- Issue #24257: Fixed segmentation fault in sqlite3.Row constructor with faked
5951  cursor type.
5952
5953- Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns() and
5954  assertWarnsRegex() assertments now check the type of the first argument
5955  to prevent possible user error.  Based on patch by Daniel Wagner-Hall.
5956
5957- Issue #9858: Add missing method stubs to _io.RawIOBase.  Patch by Laura
5958  Rupprecht.
5959
5960- Issue #22955: attrgetter, itemgetter and methodcaller objects in the operator
5961  module now support pickling.  Added readable and evaluable repr for these
5962  objects.  Based on patch by Josh Rosenberg.
5963
5964- Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
5965  when a directory with the chosen name already exists on Windows as well as
5966  on Unix.  tempfile.mkstemp() now fails early if parent directory is not
5967  valid (not exists or is a file) on Windows.
5968
5969- Issue #23780: Improved error message in os.path.join() with single argument.
5970
5971- Issue #6598: Increased time precision and random number range in
5972  email.utils.make_msgid() to strengthen the uniqueness of the message ID.
5973
5974- Issue #24091: Fixed various crashes in corner cases in C implementation of
5975  ElementTree.
5976
5977- Issue #21931: msilib.FCICreate() now raises TypeError in the case of a bad
5978  argument instead of a ValueError with a bogus FCI error number.
5979  Patch by Jeffrey Armstrong.
5980
5981- Issue #13866: *quote_via* argument added to urllib.parse.urlencode.
5982
5983- Issue #20098: New mangle_from policy option for email, default True
5984  for compat32, but False for all other policies.
5985
5986- Issue #24211: The email library now supports RFC 6532: it can generate
5987  headers using utf-8 instead of encoded words.
5988
5989- Issue #16314: Added support for the LZMA compression in distutils.
5990
5991- Issue #21804: poplib now supports RFC 6856 (UTF8).
5992
5993- Issue #18682: Optimized pprint functions for builtin scalar types.
5994
5995- Issue #22027: smtplib now supports RFC 6531 (SMTPUTF8).
5996
5997- Issue #23488: Random generator objects now consume 2x less memory on 64-bit.
5998
5999- Issue #1322: platform.dist() and platform.linux_distribution() functions are
6000  now deprecated.  Initial patch by Vajrasky Kok.
6001
6002- Issue #22486: Added the math.gcd() function.  The fractions.gcd() function
6003  now is deprecated.  Based on patch by Mark Dickinson.
6004
6005- Issue #24064: Property() docstrings are now writeable.
6006  (Patch by Berker Peksag.)
6007
6008- Issue #22681: Added support for the koi8_t encoding.
6009
6010- Issue #22682: Added support for the kz1048 encoding.
6011
6012- Issue #23796: peek and read1 methods of BufferedReader now raise ValueError
6013  if they called on a closed object. Patch by John Hergenroeder.
6014
6015- Issue #21795: smtpd now supports the 8BITMIME extension whenever
6016  the new *decode_data* constructor argument is set to False.
6017
6018- Issue #24155: optimize heapq.heapify() for better cache performance
6019  when heapifying large lists.
6020
6021- Issue #21800: imaplib now supports RFC 5161 (enable), RFC 6855
6022  (utf8/internationalized email) and automatically encodes non-ASCII
6023  usernames and passwords to UTF8.
6024
6025- Issue #20274: When calling a _sqlite.Connection, it now complains if passed
6026  any keyword arguments.  Previously it silently ignored them.
6027
6028- Issue #20274: Remove ignored and erroneous "kwargs" parameters from three
6029  METH_VARARGS methods on _sqlite.Connection.
6030
6031- Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() and
6032  assertWarnsRegex() checks now emits a deprecation warning when callable is
6033  None or keyword arguments except msg is passed in the context manager mode.
6034
6035- Issue #24018: Add a collections.abc.Generator abstract base class.
6036  Contributed by Stefan Behnel.
6037
6038- Issue #23880: Tkinter's getint() and getdouble() now support Tcl_Obj.
6039  Tkinter's getdouble() now supports any numbers (in particular int).
6040
6041- Issue #22619: Added negative limit support in the traceback module.
6042  Based on patch by Dmitry Kazakov.
6043
6044- Issue #24094: Fix possible crash in json.encode with poorly behaved dict
6045  subclasses.
6046
6047- Issue #9246: On POSIX, os.getcwd() now supports paths longer than 1025 bytes.
6048  Patch written by William Orr.
6049
6050- Issue #17445: add difflib.diff_bytes() to support comparison of
6051  byte strings (fixes a regression from Python 2).
6052
6053- Issue #23917: Fall back to sequential compilation when ProcessPoolExecutor
6054  doesn't exist.  Patch by Claudiu Popa.
6055
6056- Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
6057
6058- Fix asyncio issue 235: LifoQueue and PriorityQueue's put didn't
6059  increment unfinished tasks (this bug was introduced when
6060  JoinableQueue was merged with Queue).
6061
6062- Issue #23908: os functions now reject paths with embedded null character
6063  on Windows instead of silently truncating them.
6064
6065- Issue #23728: binascii.crc_hqx() could return an integer outside of the range
6066  0-0xffff for empty data.
6067
6068- Issue #23887: urllib.error.HTTPError now has a proper repr() representation.
6069  Patch by Berker Peksag.
6070
6071- asyncio: New event loop APIs: set_task_factory() and get_task_factory().
6072
6073- asyncio: async() function is deprecated in favour of ensure_future().
6074
6075- Issue #24178: asyncio.Lock, Condition, Semaphore, and BoundedSemaphore
6076  support new 'async with' syntax.  Contributed by Yury Selivanov.
6077
6078- Issue #24179: Support 'async for' for asyncio.StreamReader.
6079  Contributed by Yury Selivanov.
6080
6081- Issue #24184: Add AsyncIterator and AsyncIterable ABCs to
6082  collections.abc.  Contributed by Yury Selivanov.
6083
6084- Issue #22547: Implement informative __repr__ for inspect.BoundArguments.
6085  Contributed by Yury Selivanov.
6086
6087- Issue #24190: Implement inspect.BoundArgument.apply_defaults() method.
6088  Contributed by Yury Selivanov.
6089
6090- Issue #20691: Add 'follow_wrapped' argument to
6091  inspect.Signature.from_callable() and inspect.signature().
6092  Contributed by Yury Selivanov.
6093
6094- Issue #24248: Deprecate inspect.Signature.from_function() and
6095  inspect.Signature.from_builtin().
6096
6097- Issue #23898: Fix inspect.classify_class_attrs() to support attributes
6098  with overloaded __eq__ and __bool__.  Patch by Mike Bayer.
6099
6100- Issue #24298: Fix inspect.signature() to correctly unwrap wrappers
6101  around bound methods.
6102
6103IDLE
6104----
6105
6106- Issue #23184: remove unused names and imports in idlelib.
6107  Initial patch by Al Sweigart.
6108
6109Tests
6110-----
6111
6112- Issue #21520: test_zipfile no longer fails if the word 'bad' appears
6113  anywhere in the name of the current directory.
6114
6115- Issue #9517: Move script_helper into the support package.
6116  Patch by Christie Wilson.
6117
6118Documentation
6119-------------
6120
6121- Issue #22155: Add File Handlers subsection with createfilehandler to tkinter
6122  doc.  Remove obsolete example from FAQ.  Patch by Martin Panter.
6123
6124- Issue #24029: Document the name binding behavior for submodule imports.
6125
6126- Issue #24077: Fix typo in man page for -I command option: -s, not -S
6127
6128Tools/Demos
6129-----------
6130
6131- Issue #24000: Improved Argument Clinic's mapping of converters to legacy
6132  "format units".  Updated the documentation to match.
6133
6134- Issue #24001: Argument Clinic converters now use accept={type}
6135  instead of types={'type'} to specify the types the converter accepts.
6136
6137- Issue #23330: h2py now supports arbitrary filenames in #include.
6138
6139- Issue #24031: make patchcheck now supports git checkouts, too.
6140
6141
6142What's New in Python 3.5.0 alpha 4?
6143===================================
6144
6145Release date: 2015-04-19
6146
6147Core and Builtins
6148-----------------
6149
6150- Issue #22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include
6151  the architecture triplet in the extension name, to make it easy to test builds
6152  for different ABIs in the same working tree.  Under OS X, the extension name
6153  now includes PEP 3149-style information.
6154
6155- Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES.
6156  Patch courtesy of Joe Jevnik.
6157
6158- Issue #23731: Implement PEP 488: removal of .pyo files.
6159
6160- Issue #23726: Don't enable GC for user subclasses of non-GC types that
6161  don't add any new fields.  Patch by Eugene Toder.
6162
6163- Issue #23309: Avoid a deadlock at shutdown if a daemon thread is aborted
6164  while it is holding a lock to a buffered I/O object, and the main thread
6165  tries to use the same I/O object (typically stdout or stderr).  A fatal
6166  error is emitted instead.
6167
6168- Issue #22977: Fixed formatting Windows error messages on Wine.
6169  Patch by Martin Panter.
6170
6171- Issue #23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on
6172  non-integer input.
6173
6174- Issue #24044: Fix possible null pointer dereference in list.sort in out of
6175  memory conditions.
6176
6177- Issue #21354: PyCFunction_New function is exposed by python DLL again.
6178
6179Library
6180-------
6181
6182- Issue #23840: tokenize.open() now closes the temporary binary file on error
6183  to fix a resource warning.
6184
6185- Issue #16914: new debuglevel 2 in smtplib adds timestamps to debug output.
6186
6187- Issue #7159: urllib.request now supports sending auth credentials
6188  automatically after the first 401.  This enhancement is a superset of the
6189  enhancement from issue #19494 and supersedes that change.
6190
6191- Issue #23703: Fix a regression in urljoin() introduced in 901e4e52b20a.
6192  Patch by Demian Brecht.
6193
6194- Issue #4254: Adds _curses.update_lines_cols().  Patch by Arnon Yaari
6195
6196- Issue #19933: Provide default argument for ndigits in round. Patch by
6197  Vajrasky Kok.
6198
6199- Issue #23193: Add a numeric_owner parameter to
6200  tarfile.TarFile.extract and tarfile.TarFile.extractall. Patch by
6201  Michael Vogt and Eric Smith.
6202
6203- Issue #23342: Add a subprocess.run() function than returns a CalledProcess
6204  instance for a more consistent API than the existing call* functions.
6205
6206- Issue #21217: inspect.getsourcelines() now tries to compute the start and end
6207  lines from the code object, fixing an issue when a lambda function is used as
6208  decorator argument. Patch by Thomas Ballinger and Allison Kaptur.
6209
6210- Issue #24521: Fix possible integer overflows in the pickle module.
6211
6212- Issue #22931: Allow '[' and ']' in cookie values.
6213
6214- The keywords attribute of functools.partial is now always a dictionary.
6215
6216- Issue #23811: Add missing newline to the PyCompileError error message.
6217  Patch by Alex Shkop.
6218
6219- Issue #21116: Avoid blowing memory when allocating a multiprocessing shared
6220  array that's larger than 50% of the available RAM.  Patch by Médéric Boquien.
6221
6222- Issue #22982: Improve BOM handling when seeking to multiple positions of
6223  a writable text file.
6224
6225- Issue #23464: Removed deprecated asyncio JoinableQueue.
6226
6227- Issue #23529: Limit the size of decompressed data when reading from
6228  GzipFile, BZ2File or LZMAFile.  This defeats denial of service attacks
6229  using compressed bombs (i.e. compressed payloads which decompress to a huge
6230  size).  Patch by Martin Panter and Nikolaus Rath.
6231
6232- Issue #21859: Added Python implementation of io.FileIO.
6233
6234- Issue #23865: close() methods in multiple modules now are idempotent and more
6235  robust at shutdown. If they need to release multiple resources, all are
6236  released even if errors occur.
6237
6238- Issue #23400: Raise same exception on both Python 2 and 3 if sem_open is not
6239  available.  Patch by Davin Potts.
6240
6241- Issue #10838: The subprocess now module includes SubprocessError and
6242  TimeoutError in its list of exported names for the users wild enough
6243  to use ``from subprocess import *``.
6244
6245- Issue #23411: Added DefragResult, ParseResult, SplitResult, DefragResultBytes,
6246  ParseResultBytes, and SplitResultBytes to urllib.parse.__all__.
6247  Patch by Martin Panter.
6248
6249- Issue #23881: urllib.request.ftpwrapper constructor now closes the socket if
6250  the FTP connection failed to fix a ResourceWarning.
6251
6252- Issue #23853: :meth:`socket.socket.sendall` does no more reset the socket
6253  timeout each time data is sent successfully. The socket timeout is now the
6254  maximum total duration to send all data.
6255
6256- Issue #22721: An order of multiline pprint output of set or dict containing
6257  orderable and non-orderable elements no longer depends on iteration order of
6258  set or dict.
6259
6260- Issue #15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always
6261  returns bool.  tkinter.BooleanVar now validates input values (accepted bool,
6262  int, str, and Tcl_Obj).  tkinter.BooleanVar.get() now always returns bool.
6263
6264- Issue #10590: xml.sax.parseString() now supports string argument.
6265
6266- Issue #23338: Fixed formatting ctypes error messages on Cygwin.
6267  Patch by Makoto Kato.
6268
6269- Issue #15582: inspect.getdoc() now follows inheritance chains.
6270
6271- Issue #2175: SAX parsers now support a character stream of InputSource object.
6272
6273- Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and
6274  arbitrary precision integers added in Tcl 8.5.
6275
6276- Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
6277  result of sendto() instead of the C int type.
6278
6279- Issue #23618: :meth:`socket.socket.connect` now waits until the connection
6280  completes instead of raising :exc:`InterruptedError` if the connection is
6281  interrupted by signals, signal handlers don't raise an exception and the
6282  socket is blocking or has a timeout. :meth:`socket.socket.connect` still
6283  raise :exc:`InterruptedError` for non-blocking sockets.
6284
6285- Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
6286
6287- Issue #23836: Fix the faulthandler module to handle reentrant calls to
6288  its signal handlers.
6289
6290- Issue #23838: linecache now clears the cache and returns an empty result on
6291  MemoryError.
6292
6293- Issue #10395: Added os.path.commonpath(). Implemented in posixpath and ntpath.
6294  Based on patch by Rafik Draoui.
6295
6296- Issue #23611: Serializing more "lookupable" objects (such as unbound methods
6297  or nested classes) now are supported with pickle protocols < 4.
6298
6299- Issue #13583: sqlite3.Row now supports slice indexing.
6300
6301- Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.  Fixed
6302  ambigious reverse mappings.  Added many new mappings.  Import mapping is no
6303  longer applied to modules already mapped with full name mapping.
6304
6305- Issue #23485: select.select() is now retried automatically with the
6306  recomputed timeout when interrupted by a signal, except if the signal handler
6307  raises an exception. This change is part of the PEP 475.
6308
6309- Issue #23752: When built from an existing file descriptor, io.FileIO() now
6310  only calls fstat() once. Before fstat() was called twice, which was not
6311  necessary.
6312
6313- Issue #23704: collections.deque() objects now support __add__, __mul__, and
6314  __imul__().
6315
6316- Issue #23171: csv.Writer.writerow() now supports arbitrary iterables.
6317
6318- Issue #23745: The new email header parser now handles duplicate MIME
6319  parameter names without error, similar to how get_param behaves.
6320
6321- Issue #22117: Fix os.utime(), it now rounds the timestamp towards minus
6322  infinity (-inf) instead of rounding towards zero.
6323
6324- Issue #23310: Fix MagicMock's initializer to work with __methods__, just
6325  like configure_mock().  Patch by Kasia Jachim.
6326
6327Build
6328-----
6329
6330- Issue #23817: FreeBSD now uses "1.0" in the SOVERSION as other operating
6331  systems, instead of just "1".
6332
6333- Issue #23501: Argument Clinic now generates code into separate files by default.
6334
6335Tests
6336-----
6337
6338- Issue #23799: Added test.support.start_threads() for running and
6339  cleaning up multiple threads.
6340
6341- Issue #22390: test.regrtest now emits a warning if temporary files or
6342  directories are left after running a test.
6343
6344Tools/Demos
6345-----------
6346
6347- Issue #18128: pygettext now uses standard +NNNN format in the
6348  POT-Creation-Date header.
6349
6350- Issue #23935: Argument Clinic's understanding of format units
6351  accepting bytes, bytearrays, and buffers is now consistent with
6352  both the documentation and the implementation.
6353
6354- Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.
6355
6356- Issue #20586: Argument Clinic now ensures that functions without docstrings
6357  have signatures.
6358
6359- Issue #23492: Argument Clinic now generates argument parsing code with
6360  PyArg_Parse instead of PyArg_ParseTuple if possible.
6361
6362- Issue #23500: Argument Clinic is now smarter about generating the "#ifndef"
6363  (empty) definition of the methoddef macro: it's only generated once, even
6364  if Argument Clinic processes the same symbol multiple times, and it's emitted
6365  at the end of all processing rather than immediately after the first use.
6366
6367C API
6368-----
6369
6370- Issue #23998: PyImport_ReInitLock() now checks for lock allocation error
6371
6372
6373What's New in Python 3.5.0 alpha 3?
6374===================================
6375
6376Release date: 2015-03-28
6377
6378Core and Builtins
6379-----------------
6380
6381- Issue #23573: Increased performance of string search operations (str.find,
6382  str.index, str.count, the in operator, str.split, str.partition) with
6383  arguments of different kinds (UCS1, UCS2, UCS4).
6384
6385- Issue #23753: Python doesn't support anymore platforms without stat() or
6386  fstat(), these functions are always required.
6387
6388- Issue #23681: The -b option now affects comparisons of bytes with int.
6389
6390- Issue #23632: Memoryviews now allow tuple indexing (including for
6391  multi-dimensional memoryviews).
6392
6393- Issue #23192: Fixed generator lambdas.  Patch by Bruno Cauet.
6394
6395- Issue #23629: Fix the default __sizeof__ implementation for variable-sized
6396  objects.
6397
6398Library
6399-------
6400
6401- Issue #14260: The groupindex attribute of regular expression pattern object
6402  now is non-modifiable mapping.
6403
6404- Issue #23792: Ignore KeyboardInterrupt when the pydoc pager is active.
6405  This mimics the behavior of the standard unix pagers, and prevents
6406  pipepager from shutting down while the pager itself is still running.
6407
6408- Issue #23775: pprint() of OrderedDict now outputs the same representation
6409  as repr().
6410
6411- Issue #23765: Removed IsBadStringPtr calls in ctypes
6412
6413- Issue #22364: Improved some re error messages using regex for hints.
6414
6415- Issue #23742: ntpath.expandvars() no longer loses unbalanced single quotes.
6416
6417- Issue #21717: The zipfile.ZipFile.open function now supports 'x' (exclusive
6418  creation) mode.
6419
6420- Issue #21802: The reader in BufferedRWPair now is closed even when closing
6421  writer failed in BufferedRWPair.close().
6422
6423- Issue #23622: Unknown escapes in regular expressions that consist of ``'\'``
6424  and ASCII letter now raise a deprecation warning and will be forbidden in
6425  Python 3.6.
6426
6427- Issue #23671: string.Template now allows specifying the "self" parameter as
6428  a keyword argument.  string.Formatter now allows specifying the "self" and
6429  the "format_string" parameters as keyword arguments.
6430
6431- Issue #23502: The pprint module now supports mapping proxies.
6432
6433- Issue #17530: pprint now wraps long bytes objects and bytearrays.
6434
6435- Issue #22687: Fixed some corner cases in breaking words in tetxtwrap.
6436  Got rid of quadratic complexity in breaking long words.
6437
6438- Issue #4727: The copy module now uses pickle protocol 4 (PEP 3154) and
6439  supports copying of instances of classes whose __new__ method takes
6440  keyword-only arguments.
6441
6442- Issue #23491: Added a zipapp module to support creating executable zip
6443  file archives of Python code. Registered ".pyz" and ".pyzw" extensions
6444  on Windows for these archives (PEP 441).
6445
6446- Issue #23657: Avoid explicit checks for str in zipapp, adding support
6447  for pathlib.Path objects as arguments.
6448
6449- Issue #23688: Added support of arbitrary bytes-like objects and avoided
6450  unnecessary copying of memoryview in gzip.GzipFile.write().
6451  Original patch by Wolfgang Maier.
6452
6453- Issue #23252: Added support for writing ZIP files to unseekable streams.
6454
6455- Issue #23647: Increase impalib's MAXLINE to accommodate modern mailbox sizes.
6456
6457- Issue #23539: If body is None, http.client.HTTPConnection.request now sets
6458  Content-Length to 0 for PUT, POST, and PATCH headers to avoid 411 errors from
6459  some web servers.
6460
6461- Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
6462  and socket open until the garbage collector cleans them up.  Patch by
6463  Martin Panter.
6464
6465- Issue #23704: collections.deque() objects now support methods for index(),
6466  insert(), and copy().  This allows deques to be registered as a
6467  MutableSequence and it improves their substitutability for lists.
6468
6469- Issue #23715: :func:`signal.sigwaitinfo` and :func:`signal.sigtimedwait` are
6470  now retried when interrupted by a signal not in the *sigset* parameter, if
6471  the signal handler does not raise an exception. signal.sigtimedwait()
6472  recomputes the timeout with a monotonic clock when it is retried.
6473
6474- Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and
6475  codecs, that accepted only read-only bytes-like object now accept writable
6476  bytes-like object too.
6477
6478- Issue #23646: If time.sleep() is interrupted by a signal, the sleep is now
6479  retried with the recomputed delay, except if the signal handler raises an
6480  exception (PEP 475).
6481
6482- Issue #23136: _strptime now uniformly handles all days in week 0, including
6483  Dec 30 of previous year.  Based on patch by Jim Carroll.
6484
6485- Issue #23700: Iterator of NamedTemporaryFile now keeps a reference to
6486  NamedTemporaryFile instance.  Patch by Bohuslav Kabrda.
6487
6488- Issue #22903: The fake test case created by unittest.loader when it fails
6489  importing a test module is now picklable.
6490
6491- Issue #22181: On Linux, os.urandom() now uses the new getrandom() syscall if
6492  available, syscall introduced in the Linux kernel 3.17. It is more reliable
6493  and more secure, because it avoids the need of a file descriptor and waits
6494  until the kernel has enough entropy.
6495
6496- Issue #2211: Updated the implementation of the http.cookies.Morsel class.
6497  Setting attributes key, value and coded_value directly now is deprecated.
6498  update() and setdefault() now transform and check keys.  Comparing for
6499  equality now takes into account attributes key, value and coded_value.
6500  copy() now returns a Morsel, not a dict.  repr() now contains all attributes.
6501  Optimized checking keys and quoting values.  Added new tests.
6502  Original patch by Demian Brecht.
6503
6504- Issue #18983: Allow selection of output units in timeit.
6505  Patch by Julian Gindi.
6506
6507- Issue #23631: Fix traceback.format_list when a traceback has been mutated.
6508
6509- Issue #23568: Add rdivmod support to MagicMock() objects.
6510  Patch by Håkan Lövdahl.
6511
6512- Issue #2052: Add charset parameter to HtmlDiff.make_file().
6513
6514- Issue #23668: Support os.truncate and os.ftruncate on Windows.
6515
6516- Issue #23138: Fixed parsing cookies with absent keys or values in cookiejar.
6517  Patch by Demian Brecht.
6518
6519- Issue #23051: multiprocessing.Pool methods imap() and imap_unordered() now
6520  handle exceptions raised by an iterator.  Patch by Alon Diamant and Davin
6521  Potts.
6522
6523- Issue #23581: Add matmul support to MagicMock. Patch by Håkan Lövdahl.
6524
6525- Issue #23566: enable(), register(), dump_traceback() and
6526  dump_traceback_later() functions of faulthandler now accept file
6527  descriptors. Patch by Wei Wu.
6528
6529- Issue #22928: Disabled HTTP header injections in http.client.
6530  Original patch by Demian Brecht.
6531
6532- Issue #23615: Modules bz2, tarfile and tokenize now can be reloaded with
6533  imp.reload().  Patch by Thomas Kluyver.
6534
6535- Issue #23605: os.walk() now calls os.scandir() instead of os.listdir().
6536  The usage of os.scandir() reduces the number of calls to os.stat().
6537  Initial patch written by Ben Hoyt.
6538
6539Build
6540-----
6541
6542- Issue #23585: make patchcheck will ensure the interpreter is built.
6543
6544Tests
6545-----
6546
6547- Issue #23583: Added tests for standard IO streams in IDLE.
6548
6549- Issue #22289: Prevent test_urllib2net failures due to ftp connection timeout.
6550
6551Tools/Demos
6552-----------
6553
6554- Issue #22826: The result of open() in Tools/freeze/bkfile.py is now better
6555  compatible with regular files (in particular it now supports the context
6556  management protocol).
6557
6558
6559What's New in Python 3.5 alpha 2?
6560=================================
6561
6562Release date: 2015-03-09
6563
6564Core and Builtins
6565-----------------
6566
6567- Issue #23571: PyObject_Call() and PyCFunction_Call() now raise a SystemError
6568  if a function returns a result and raises an exception. The SystemError is
6569  chained to the previous exception.
6570
6571Library
6572-------
6573
6574- Issue #22524: New os.scandir() function, part of the PEP 471: "os.scandir()
6575  function -- a better and faster directory iterator". Patch written by Ben
6576  Hoyt.
6577
6578- Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address.
6579
6580- Issue #21793: BaseHTTPRequestHandler again logs response code as numeric,
6581  not as stringified enum.  Patch by Demian Brecht.
6582
6583- Issue #23476: In the ssl module, enable OpenSSL's X509_V_FLAG_TRUSTED_FIRST
6584  flag on certificate stores when it is available.
6585
6586- Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the
6587  SSL layer but the underlying connection hasn't been closed.
6588
6589- Issue #23504: Added an __all__ to the types module.
6590
6591- Issue #23563: Optimized utility functions in urllib.parse.
6592
6593- Issue #7830: Flatten nested functools.partial.
6594
6595- Issue #20204: Added the __module__ attribute to _tkinter classes.
6596
6597- Issue #19980: Improved help() for non-recognized strings.  help('') now
6598  shows the help on str.  help('help') now shows the help on help().
6599  Original patch by Mark Lawrence.
6600
6601- Issue #23521: Corrected pure python implementation of timedelta division.
6602
6603 * Eliminated OverflowError from timedelta * float for some floats;
6604 * Corrected rounding in timedlta true division.
6605
6606- Issue #21619: Popen objects no longer leave a zombie after exit in the with
6607  statement if the pipe was broken.  Patch by Martin Panter.
6608
6609- Issue #22936: Make it possible to show local variables in tracebacks for
6610  both the traceback module and unittest.
6611
6612- Issue #15955: Add an option to limit the output size in bz2.decompress().
6613  Patch by Nikolaus Rath.
6614
6615- Issue #6639: Module-level turtle functions no longer raise TclError after
6616  closing the window.
6617
6618- Issues #814253, #9179: Group references and conditional group references now
6619  work in lookbehind assertions in regular expressions.
6620
6621- Issue #23215: Multibyte codecs with custom error handlers that ignores errors
6622  consumed too much memory and raised SystemError or MemoryError.
6623  Original patch by Aleksi Torhamo.
6624
6625- Issue #5700: io.FileIO() called flush() after closing the file.
6626  flush() was not called in close() if closefd=False.
6627
6628- Issue #23374: Fixed pydoc failure with non-ASCII files when stdout encoding
6629  differs from file system encoding (e.g. on Mac OS).
6630
6631- Issue #23481: Remove RC4 from the SSL module's default cipher list.
6632
6633- Issue #21548: Fix pydoc.synopsis() and pydoc.apropos() on modules with empty
6634  docstrings.
6635
6636- Issue #22885: Fixed arbitrary code execution vulnerability in the dbm.dumb
6637  module.  Original patch by Claudiu Popa.
6638
6639- Issue #23239: ssl.match_hostname() now supports matching of IP addresses.
6640
6641- Issue #23146: Fix mishandling of absolute Windows paths with forward
6642  slashes in pathlib.
6643
6644- Issue #23096: Pickle representation of floats with protocol 0 now is the same
6645  for both Python and C implementations.
6646
6647- Issue #19105: pprint now more efficiently uses free space at the right.
6648
6649- Issue #14910: Add allow_abbrev parameter to argparse.ArgumentParser. Patch by
6650  Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson.
6651
6652- Issue #21717: tarfile.open() now supports 'x' (exclusive creation) mode.
6653
6654- Issue #23344: marshal.dumps() is now 20-25% faster on average.
6655
6656- Issue #20416: marshal.dumps() with protocols 3 and 4 is now 40-50% faster on
6657  average.
6658
6659- Issue #23421: Fixed compression in tarfile CLI.  Patch by wdv4758h.
6660
6661- Issue #23367: Fix possible overflows in the unicodedata module.
6662
6663- Issue #23361: Fix possible overflow in Windows subprocess creation code.
6664
6665- logging.handlers.QueueListener now takes a respect_handler_level keyword
6666  argument which, if set to True, will pass messages to handlers taking handler
6667  levels into account.
6668
6669- Issue #19705: turtledemo now has a visual sorting algorithm demo.  Original
6670  patch from Jason Yeo.
6671
6672- Issue #23801: Fix issue where cgi.FieldStorage did not always ignore the
6673  entire preamble to a multipart body.
6674
6675Build
6676-----
6677
6678- Issue #23445: pydebug builds now use "gcc -Og" where possible, to make
6679  the resulting executable faster.
6680
6681- Issue #23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a.
6682
6683C API
6684-----
6685
6686- Issue #20204: Deprecation warning is now raised for builtin types without the
6687  __module__ attribute.
6688
6689Windows
6690-------
6691
6692- Issue #23465: Implement PEP 486 - Make the Python Launcher aware of virtual
6693  environments. Patch by Paul Moore.
6694
6695- Issue #23437: Make user scripts directory versioned on Windows. Patch by Paul
6696  Moore.
6697
6698
6699What's New in Python 3.5 alpha 1?
6700=================================
6701
6702Release date: 2015-02-08
6703
6704Core and Builtins
6705-----------------
6706
6707- Issue #23285: PEP 475 - EINTR handling.
6708
6709- Issue #22735: Fix many edge cases (including crashes) involving custom mro()
6710  implementations.
6711
6712- Issue #22896: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
6713  and PyObject_AsWriteBuffer().
6714
6715- Issue #21295: Revert some changes (issue #16795) to AST line numbers and
6716  column offsets that constituted a regression.
6717
6718- Issue #22986: Allow changing an object's __class__ between a dynamic type and
6719  static type in some cases.
6720
6721- Issue #15859: PyUnicode_EncodeFSDefault(), PyUnicode_EncodeMBCS() and
6722  PyUnicode_EncodeCodePage() now raise an exception if the object is not a
6723  Unicode object. For PyUnicode_EncodeFSDefault(), it was already the case on
6724  platforms other than Windows. Patch written by Campbell Barton.
6725
6726- Issue #21408: The default __ne__() now returns NotImplemented if __eq__()
6727  returned NotImplemented.  Original patch by Martin Panter.
6728
6729- Issue #23321: Fixed a crash in str.decode() when error handler returned
6730  replacment string longer than mailformed input data.
6731
6732- Issue #22286: The "backslashreplace" error handlers now works with
6733  decoding and translating.
6734
6735- Issue #23253: Delay-load ShellExecute[AW] in os.startfile for reduced
6736  startup overhead on Windows.
6737
6738- Issue #22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for
6739  atomic memory access if available. Patch written by Vitor de Lima and Gustavo
6740  Temple.
6741
6742- Issue #20284: %-interpolation (aka printf) formatting added for bytes and
6743  bytearray.
6744
6745- Issue #23048: Fix jumping out of an infinite while loop in the pdb.
6746
6747- Issue #20335: bytes constructor now raises TypeError when encoding or errors
6748  is specified with non-string argument.  Based on patch by Renaud Blanch.
6749
6750- Issue #22834: If the current working directory ends up being set to a
6751  non-existent directory then import will no longer raise FileNotFoundError.
6752
6753- Issue #22869: Move the interpreter startup & shutdown code to a new
6754  dedicated pylifecycle.c module
6755
6756- Issue #22847: Improve method cache efficiency.
6757
6758- Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff
6759  bytes on a 32-bit platform.
6760
6761- Issue #22653: Fix an assertion failure in debug mode when doing a reentrant
6762  dict insertion in debug mode.
6763
6764- Issue #22643: Fix integer overflow in Unicode case operations (upper, lower,
6765  title, swapcase, casefold).
6766
6767- Issue #17636: Circular imports involving relative imports are now
6768  supported.
6769
6770- Issue #22604: Fix assertion error in debug mode when dividing a complex
6771  number by (nan+0j).
6772
6773- Issue #21052: Do not raise ImportWarning when sys.path_hooks or sys.meta_path
6774  are set to None.
6775
6776- Issue #16518: Use 'bytes-like object required' in error messages that
6777  previously used the far more cryptic "'x' does not support the buffer
6778  protocol.
6779
6780- Issue #22470: Fixed integer overflow issues in "backslashreplace",
6781  "xmlcharrefreplace", and "surrogatepass" error handlers.
6782
6783- Issue #22540: speed up `PyObject_IsInstance` and `PyObject_IsSubclass` in the
6784  common case that the second argument has metaclass `type`.
6785
6786- Issue #18711: Add a new `PyErr_FormatV` function, similar to `PyErr_Format`
6787  but accepting a `va_list` argument.
6788
6789- Issue #22520: Fix overflow checking when generating the repr of a unicode
6790  object.
6791
6792- Issue #22519: Fix overflow checking in PyBytes_Repr.
6793
6794- Issue #22518: Fix integer overflow issues in latin-1 encoding.
6795
6796- Issue #16324: _charset parameter of MIMEText now also accepts
6797  email.charset.Charset instances. Initial patch by Claude Paroz.
6798
6799- Issue #1764286: Fix inspect.getsource() to support decorated functions.
6800  Patch by Claudiu Popa.
6801
6802- Issue #18554: os.__all__ includes posix functions.
6803
6804- Issue #21391: Use os.path.abspath in the shutil module.
6805
6806- Issue #11471: avoid generating a JUMP_FORWARD instruction at the end of
6807  an if-block if there is no else-clause.  Original patch by Eugene Toder.
6808
6809- Issue #22215: Now ValueError is raised instead of TypeError when str or bytes
6810  argument contains not permitted null character or byte.
6811
6812- Issue #22258: Fix the internal function set_inheritable() on Illumos.
6813  This platform exposes the function ``ioctl(FIOCLEX)``, but calling it fails
6814  with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable()
6815  now falls back to the slower ``fcntl()`` (``F_GETFD`` and then ``F_SETFD``).
6816
6817- Issue #21389: Displaying the __qualname__ of the underlying function in the
6818  repr of a bound method.
6819
6820- Issue #22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM
6821  and returns -1 (error) on integer overflow.
6822
6823- Issue #20184: Argument Clinic based signature introspection added for
6824  30 of the builtin functions.
6825
6826- Issue #22116: C functions and methods (of the 'builtin_function_or_method'
6827  type) can now be weakref'ed.  Patch by Wei Wu.
6828
6829- Issue #22077: Improve index error messages for bytearrays, bytes, lists,
6830  and tuples by adding 'or slices'. Added ', not <typename>' for bytearrays.
6831  Original patch by Claudiu Popa.
6832
6833- Issue #20179: Apply Argument Clinic to bytes and bytearray.
6834  Patch by Tal Einat.
6835
6836- Issue #22082: Clear interned strings in slotdefs.
6837
6838- Upgrade Unicode database to Unicode 7.0.0.
6839
6840- Issue #21897: Fix a crash with the f_locals attribute with closure
6841  variables when frame.clear() has been called.
6842
6843- Issue #21205: Add a new ``__qualname__`` attribute to generator, the
6844  qualified name, and use it in the representation of a generator
6845  (``repr(gen)``). The default name of the generator (``__name__`` attribute)
6846  is now get from the function instead of the code. Use ``gen.gi_code.co_name``
6847  to get the name of the code.
6848
6849- Issue #21669: With the aid of heuristics in SyntaxError.__init__, the
6850  parser now attempts to generate more meaningful (or at least more search
6851  engine friendly) error messages when "exec" and "print" are used as
6852  statements.
6853
6854- Issue #21642: In the conditional if-else expression, allow an integer written
6855  with no space between itself and the ``else`` keyword (e.g. ``True if 42else
6856  False``) to be valid syntax.
6857
6858- Issue #21523: Fix over-pessimistic computation of the stack effect of
6859  some opcodes in the compiler.  This also fixes a quadratic compilation
6860  time issue noticeable when compiling code with a large number of "and"
6861  and "or" operators.
6862
6863- Issue #21418: Fix a crash in the builtin function super() when called without
6864  argument and without current frame (ex: embedded Python).
6865
6866- Issue #21425: Fix flushing of standard streams in the interactive
6867  interpreter.
6868
6869- Issue #21435: In rare cases, when running finalizers on objects in cyclic
6870  trash a bad pointer dereference could occur due to a subtle flaw in
6871  internal iteration logic.
6872
6873- Issue #21377: PyBytes_Concat() now tries to concatenate in-place when the
6874  first argument has a reference count of 1.  Patch by Nikolaus Rath.
6875
6876- Issue #20355: -W command line options now have higher priority than the
6877  PYTHONWARNINGS environment variable.  Patch by Arfrever.
6878
6879- Issue #21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c.
6880
6881- Issue #20904: Support setting FPU precision on m68k.
6882
6883- Issue #21209: Fix sending tuples to custom generator objects with the yield
6884  from syntax.
6885
6886- Issue #21193: pow(a, b, c) now raises ValueError rather than TypeError when b
6887  is negative.  Patch by Josh Rosenberg.
6888
6889- PEP 465 and Issue #21176: Add the '@' operator for matrix multiplication.
6890
6891- Issue #21134: Fix segfault when str is called on an uninitialized
6892  UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object.
6893
6894- Issue #19537: Fix PyUnicode_DATA() alignment under m68k.  Patch by
6895  Andreas Schwab.
6896
6897- Issue #20929: Add a type cast to avoid shifting a negative number.
6898
6899- Issue #20731: Properly position in source code files even if they
6900  are opened in text mode. Patch by Serhiy Storchaka.
6901
6902- Issue #20637: Key-sharing now also works for instance dictionaries of
6903  subclasses.  Patch by Peter Ingebretson.
6904
6905- Issue #8297: Attributes missing from modules now include the module name
6906  in the error text.  Original patch by ysj.ray.
6907
6908- Issue #19995: %c, %o, %x, and %X now raise TypeError on non-integer input.
6909
6910- Issue #19655: The ASDL parser - used by the build process to generate code for
6911  managing the Python AST in C - was rewritten. The new parser is self contained
6912  and does not require to carry long the spark.py parser-generator library;
6913  spark.py was removed from the source base.
6914
6915- Issue #12546: Allow ``\x00`` to be used as a fill character when using str, int,
6916  float, and complex __format__ methods.
6917
6918- Issue #20480: Add ipaddress.reverse_pointer. Patch by Leon Weber.
6919
6920- Issue #13598: Modify string.Formatter to support auto-numbering of
6921  replacement fields. It now matches the behavior of str.format() in
6922  this regard. Patches by Phil Elson and Ramchandra Apte.
6923
6924- Issue #8931: Make alternate formatting ('#') for type 'c' raise an
6925  exception. In versions prior to 3.5, '#' with 'c' had no effect. Now
6926  specifying it is an error.  Patch by Torsten Landschoff.
6927
6928- Issue #23165: Perform overflow checks before allocating memory in the
6929  _Py_char2wchar function.
6930
6931Library
6932-------
6933
6934- Issue #23399: pyvenv creates relative symlinks where possible.
6935
6936- Issue #20289: cgi.FieldStorage() now supports the context management
6937  protocol.
6938
6939- Issue #13128: Print response headers for CONNECT requests when debuglevel
6940  > 0. Patch by Demian Brecht.
6941
6942- Issue #15381: Optimized io.BytesIO to make less allocations and copyings.
6943
6944- Issue #22818: Splitting on a pattern that could match an empty string now
6945  raises a warning.  Patterns that can only match empty strings are now
6946  rejected.
6947
6948- Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
6949  prevent corrupting exported buffer.
6950
6951- Issue #23326: Removed __ne__ implementations.  Since fixing default __ne__
6952  implementation in issue #21408 they are redundant.
6953
6954- Issue #23363: Fix possible overflow in itertools.permutations.
6955
6956- Issue #23364: Fix possible overflow in itertools.product.
6957
6958- Issue #23366: Fixed possible integer overflow in itertools.combinations.
6959
6960- Issue #23369: Fixed possible integer overflow in
6961  _json.encode_basestring_ascii.
6962
6963- Issue #23353: Fix the exception handling of generators in
6964  PyEval_EvalFrameEx(). At entry, save or swap the exception state even if
6965  PyEval_EvalFrameEx() is called with throwflag=0. At exit, the exception state
6966  is now always restored or swapped, not only if why is WHY_YIELD or
6967  WHY_RETURN. Patch co-written with Antoine Pitrou.
6968
6969- Issue #14099: Restored support of writing ZIP files to tellable but
6970  non-seekable streams.
6971
6972- Issue #14099: Writing to ZipFile and reading multiple ZipExtFiles is
6973  threadsafe now.
6974
6975- Issue #19361: JSON decoder now raises JSONDecodeError instead of ValueError.
6976
6977- Issue #18518: timeit now rejects statements which can't be compiled outside
6978  a function or a loop (e.g. "return" or "break").
6979
6980- Issue #23094: Fixed readline with frames in Python implementation of pickle.
6981
6982- Issue #23268: Fixed bugs in the comparison of ipaddress classes.
6983
6984- Issue #21408: Removed incorrect implementations of __ne__() which didn't
6985  returned NotImplemented if __eq__() returned NotImplemented.  The default
6986  __ne__() now works correctly.
6987
6988- Issue #19996: :class:`email.feedparser.FeedParser` now handles (malformed)
6989  headers with no key rather than assuming the body has started.
6990
6991- Issue #20188: Support Application-Layer Protocol Negotiation (ALPN) in the ssl
6992  module.
6993
6994- Issue #23133: Pickling of ipaddress objects now produces more compact and
6995  portable representation.
6996
6997- Issue #23248: Update ssl error codes from latest OpenSSL git master.
6998
6999- Issue #23266: Much faster implementation of ipaddress.collapse_addresses()
7000  when there are many non-consecutive addresses.
7001
7002- Issue #23098: 64-bit dev_t is now supported in the os module.
7003
7004- Issue #21817: When an exception is raised in a task submitted to a
7005  ProcessPoolExecutor, the remote traceback is now displayed in the
7006  parent process.  Patch by Claudiu Popa.
7007
7008- Issue #15955: Add an option to limit output size when decompressing LZMA
7009  data.  Patch by Nikolaus Rath and Martin Panter.
7010
7011- Issue #23250: In the http.cookies module, capitalize "HttpOnly" and "Secure"
7012  as they are written in the standard.
7013
7014- Issue #23063: In the disutils' check command, fix parsing of reST with code or
7015  code-block directives.
7016
7017- Issue #23209, #23225: selectors.BaseSelector.get_key() now raises a
7018  RuntimeError if the selector is closed. And selectors.BaseSelector.close()
7019  now clears its internal reference to the selector mapping to break a
7020  reference cycle. Initial patch written by Martin Richard.
7021
7022- Issue #17911: Provide a way to seed the linecache for a PEP-302 module
7023  without actually loading the code.
7024
7025- Issue #17911: Provide a new object API for traceback, including the ability
7026  to not lookup lines at all until the traceback is actually rendered, without
7027  any trace of the original objects being kept alive.
7028
7029- Issue #19777: Provide a home() classmethod on Path objects.  Contributed
7030  by Victor Salgado and Mayank Tripathi.
7031
7032- Issue #23206: Make ``json.dumps(..., ensure_ascii=False)`` as fast as the
7033  default case of ``ensure_ascii=True``.  Patch by Naoki Inada.
7034
7035- Issue #23185: Add math.inf and math.nan constants.
7036
7037- Issue #23186: Add ssl.SSLObject.shared_ciphers() and
7038  ssl.SSLSocket.shared_ciphers() to fetch the client's list ciphers sent at
7039  handshake.
7040
7041- Issue #23143: Remove compatibility with OpenSSLs older than 0.9.8.
7042
7043- Issue #23132: Improve performance and introspection support of comparison
7044  methods created by functool.total_ordering.
7045
7046- Issue #19776: Add an expanduser() method on Path objects.
7047
7048- Issue #23112: Fix SimpleHTTPServer to correctly carry the query string and
7049  fragment when it redirects to add a trailing slash.
7050
7051- Issue #21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK,
7052  HTTPStatus.NOT_FOUND).  Patch by Demian Brecht.
7053
7054- Issue #23093: In the io, module allow more operations to work on detached
7055  streams.
7056
7057- Issue #23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol
7058  version.
7059
7060- Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
7061  instead of reading /dev/urandom, to get pseudo-random bytes.
7062
7063- Issue #19104: pprint now produces evaluable output for wrapped strings.
7064
7065- Issue #23071: Added missing names to codecs.__all__.  Patch by Martin Panter.
7066
7067- Issue #22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
7068  opcode if possible.
7069
7070- Issue #15513: Added a __sizeof__ implementation for pickle classes.
7071
7072- Issue #19858: pickletools.optimize() now aware of the MEMOIZE opcode, can
7073  produce more compact result and no longer produces invalid output if input
7074  data contains MEMOIZE opcodes together with PUT or BINPUT opcodes.
7075
7076- Issue #22095: Fixed HTTPConnection.set_tunnel with default port.  The port
7077  value in the host header was set to "None".  Patch by Demian Brecht.
7078
7079- Issue #23016: A warning no longer produces an AttributeError when the program
7080  is run with pythonw.exe.
7081
7082- Issue #21775: shutil.copytree(): fix crash when copying to VFAT. An exception
7083  handler assumed that OSError objects always have a 'winerror' attribute.
7084  That is not the case, so the exception handler itself raised AttributeError
7085  when run on Linux (and, presumably, any other non-Windows OS).
7086  Patch by Greg Ward.
7087
7088- Issue #1218234: Fix inspect.getsource() to load updated source of
7089  reloaded module. Initial patch by Berker Peksag.
7090
7091- Issue #21740: Support wrapped callables in doctest. Patch by Claudiu Popa.
7092
7093- Issue #23009: Make sure selectors.EpollSelecrtor.select() works when no
7094  FD is registered.
7095
7096- Issue #22959: In the constructor of http.client.HTTPSConnection, prefer the
7097  context's check_hostname attribute over the *check_hostname* parameter.
7098
7099- Issue #22696: Add function :func:`sys.is_finalizing` to know about
7100  interpreter shutdown.
7101
7102- Issue #16043: Add a default limit for the amount of data xmlrpclib.gzip_decode
7103  will return. This resolves CVE-2013-1753.
7104
7105- Issue #14099: ZipFile.open() no longer reopen the underlying file.  Objects
7106  returned by ZipFile.open() can now operate independently of the ZipFile even
7107  if the ZipFile was created by passing in a file-like object as the first
7108  argument to the constructor.
7109
7110- Issue #22966: Fix __pycache__ pyc file name clobber when pyc_compile is
7111  asked to compile a source file containing multiple dots in the source file
7112  name.
7113
7114- Issue #21971: Update turtledemo doc and add module to the index.
7115
7116- Issue #21032: Fixed socket leak if HTTPConnection.getresponse() fails.
7117  Original patch by Martin Panter.
7118
7119- Issue #22407: Deprecated the use of re.LOCALE flag with str patterns or
7120  re.ASCII. It was newer worked.
7121
7122- Issue #22902: The "ip" command is now used on Linux to determine MAC address
7123  in uuid.getnode().  Pach by Bruno Cauet.
7124
7125- Issue #22960: Add a context argument to xmlrpclib.ServerProxy constructor.
7126
7127- Issue #22389: Add contextlib.redirect_stderr().
7128
7129- Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
7130  availability of the function is checked during the compilation. Patch written
7131  by Bernard Spil.
7132
7133- Issue #22915: SAX parser now supports files opened with file descriptor or
7134  bytes path.
7135
7136- Issue #22609: Constructors and update methods of mapping classes in the
7137  collections module now accept the self keyword argument.
7138
7139- Issue #22940: Add readline.append_history_file.
7140
7141- Issue #19676: Added the "namereplace" error handler.
7142
7143- Issue #22788: Add *context* parameter to logging.handlers.HTTPHandler.
7144
7145- Issue #22921: Allow SSLContext to take the *hostname* parameter even if
7146  OpenSSL doesn't support SNI.
7147
7148- Issue #22894: TestCase.subTest() would cause the test suite to be stopped
7149  when in failfast mode, even in the absence of failures.
7150
7151- Issue #22796: HTTP cookie parsing is now stricter, in order to protect
7152  against potential injection attacks.
7153
7154- Issue #22370: Windows detection in pathlib is now more robust.
7155
7156- Issue #22841: Reject coroutines in asyncio add_signal_handler().
7157  Patch by Ludovic.Gasc.
7158
7159- Issue #19494: Added urllib.request.HTTPBasicPriorAuthHandler. Patch by
7160  Matej Cepl.
7161
7162- Issue #22578: Added attributes to the re.error class.
7163
7164- Issue #22849: Fix possible double free in the io.TextIOWrapper constructor.
7165
7166- Issue #12728: Different Unicode characters having the same uppercase but
7167  different lowercase are now matched in case-insensitive regular expressions.
7168
7169- Issue #22821: Fixed fcntl() with integer argument on 64-bit big-endian
7170  platforms.
7171
7172- Issue #21650: Add an `--sort-keys` option to json.tool CLI.
7173
7174- Issue #22824: Updated reprlib output format for sets to use set literals.
7175  Patch contributed by Berker Peksag.
7176
7177- Issue #22824: Updated reprlib output format for arrays to display empty
7178  arrays without an unnecessary empty list.  Suggested by Serhiy Storchaka.
7179
7180- Issue #22406: Fixed the uu_codec codec incorrectly ported to 3.x.
7181  Based on patch by Martin Panter.
7182
7183- Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
7184  Based on patch by Aivars Kalvāns.
7185
7186- Issue #22769: Fixed ttk.Treeview.tag_has() when called without arguments.
7187
7188- Issue #22417: Verify certificates by default in httplib (PEP 476).
7189
7190- Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
7191  and above.  Patch by Tim Graham.
7192
7193- Issue #22776: Brought excluded code into the scope of a try block in
7194  SysLogHandler.emit().
7195
7196- Issue #22665: Add missing get_terminal_size and SameFileError to
7197  shutil.__all__.
7198
7199- Issue #6623: Remove deprecated Netrc class in the ftplib module. Patch by
7200  Matt Chaput.
7201
7202- Issue #17381: Fixed handling of case-insensitive ranges in regular
7203  expressions.
7204
7205- Issue #22410: Module level functions in the re module now cache compiled
7206  locale-dependent regular expressions taking into account the locale.
7207
7208- Issue #22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.)
7209  now return False when the underlying stat call raises NotADirectoryError.
7210
7211- Issue #8876: distutils now falls back to copying files when hard linking
7212  doesn't work.  This allows use with special filesystems such as VirtualBox
7213  shared folders.
7214
7215- Issue #22217: Implemented reprs of classes in the zipfile module.
7216
7217- Issue #22457: Honour load_tests in the start_dir of discovery.
7218
7219- Issue #18216: gettext now raises an error when a .mo file has an
7220  unsupported major version number.  Patch by Aaron Hill.
7221
7222- Issue #13918: Provide a locale.delocalize() function which can remove
7223  locale-specific number formatting from a string representing a number,
7224  without then converting it to a specific type.  Patch by Cédric Krier.
7225
7226- Issue #22676: Make the pickling of global objects which don't have a
7227  __module__ attribute less slow.
7228
7229- Issue #18853: Fixed ResourceWarning in shlex.__nain__.
7230
7231- Issue #9351: Defaults set with set_defaults on an argparse subparser
7232  are no longer ignored when also set on the parent parser.
7233
7234- Issue #7559: unittest test loading ImportErrors are reported as import errors
7235  with their import exception rather than as attribute errors after the import
7236  has already failed.
7237
7238- Issue #19746: Make it possible to examine the errors from unittest
7239  discovery without executing the test suite. The new `errors` attribute
7240  on TestLoader exposes these non-fatal errors encountered during discovery.
7241
7242- Issue #21991: Make email.headerregistry's header 'params' attributes
7243  be read-only (MappingProxyType).  Previously the dictionary was modifiable
7244  but a new one was created on each access of the attribute.
7245
7246- Issue #22638: SSLv3 is now disabled throughout the standard library.
7247  It can still be enabled by instantiating a SSLContext manually.
7248
7249- Issue #22641: In asyncio, the default SSL context for client connections
7250  is now created using ssl.create_default_context(), for stronger security.
7251
7252- Issue #17401: Include closefd in io.FileIO repr.
7253
7254- Issue #21338: Add silent mode for compileall. quiet parameters of
7255  compile_{dir, file, path} functions now have a multilevel value. Also,
7256  -q option of the CLI now have a multilevel value. Patch by Thomas Kluyver.
7257
7258- Issue #20152: Convert the array and cmath modules to Argument Clinic.
7259
7260- Issue #18643: Add socket.socketpair() on Windows.
7261
7262- Issue #22435: Fix a file descriptor leak when socketserver bind fails.
7263
7264- Issue #13096: Fixed segfault in CTypes POINTER handling of large
7265  values.
7266
7267- Issue #11694: Raise ConversionError in xdrlib as documented.  Patch
7268  by Filip Gruszczyński and Claudiu Popa.
7269
7270- Issue #19380: Optimized parsing of regular expressions.
7271
7272- Issue #1519638: Now unmatched groups are replaced with empty strings in re.sub()
7273  and re.subn().
7274
7275- Issue #18615: sndhdr.what/whathdr now return a namedtuple.
7276
7277- Issue #22462: Fix pyexpat's creation of a dummy frame to make it
7278  appear in exception tracebacks.
7279
7280- Issue #21965: Add support for in-memory SSL to the ssl module.  Patch
7281  by Geert Jansen.
7282
7283- Issue #21173: Fix len() on a WeakKeyDictionary when .clear() was called
7284  with an iterator alive.
7285
7286- Issue #11866: Eliminated race condition in the computation of names
7287  for new threads.
7288
7289- Issue #21905: Avoid RuntimeError in pickle.whichmodule() when sys.modules
7290  is mutated while iterating.  Patch by Olivier Grisel.
7291
7292- Issue #11271: concurrent.futures.Executor.map() now takes a *chunksize*
7293  argument to allow batching of tasks in child processes and improve
7294  performance of ProcessPoolExecutor.  Patch by Dan O'Reilly.
7295
7296- Issue #21883: os.path.join() and os.path.relpath() now raise a TypeError with
7297  more helpful error message for unsupported or mismatched types of arguments.
7298
7299- Issue #22219: The zipfile module CLI now adds entries for directories
7300  (including empty directories) in ZIP file.
7301
7302- Issue #22449: In the ssl.SSLContext.load_default_certs, consult the
7303  environmental variables SSL_CERT_DIR and SSL_CERT_FILE on Windows.
7304
7305- Issue #22508: The email.__version__ variable has been removed; the email
7306  code is no longer shipped separately from the stdlib, and __version__
7307  hasn't been updated in several releases.
7308
7309- Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
7310
7311- Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
7312
7313- Issue #20218: Added convenience methods read_text/write_text and read_bytes/
7314  write_bytes to pathlib.Path objects.
7315
7316- Issue #22396: On 32-bit AIX platform, don't expose os.posix_fadvise() nor
7317  os.posix_fallocate() because their prototypes in system headers are wrong.
7318
7319- Issue #22517: When an io.BufferedRWPair object is deallocated, clear its
7320  weakrefs.
7321
7322- Issue #22437: Number of capturing groups in regular expression is no longer
7323  limited by 100.
7324
7325- Issue #17442: InteractiveInterpreter now displays the full chained traceback
7326  in its showtraceback method, to match the built in interactive interpreter.
7327
7328- Issue #23392: Added tests for marshal C API that works with FILE*.
7329
7330
7331- Issue #10510: distutils register and upload methods now use HTML standards
7332  compliant CRLF line endings.
7333
7334- Issue #9850: Fixed macpath.join() for empty first component.  Patch by
7335  Oleg Oshmyan.
7336
7337- Issue #5309: distutils' build and build_ext commands now accept a ``-j``
7338  option to enable parallel building of extension modules.
7339
7340- Issue #22448: Improve canceled timer handles cleanup to prevent
7341  unbound memory usage. Patch by Joshua Moore-Oliva.
7342
7343- Issue #22427: TemporaryDirectory no longer attempts to clean up twice when
7344  used in the with statement in generator.
7345
7346- Issue #22362: Forbidden ambiguous octal escapes out of range 0-0o377 in
7347  regular expressions.
7348
7349- Issue #20912: Now directories added to ZIP file have correct Unix and MS-DOS
7350  directory attributes.
7351
7352- Issue #21866: ZipFile.close() no longer writes ZIP64 central directory
7353  records if allowZip64 is false.
7354
7355- Issue #22278: Fix urljoin problem with relative urls, a regression observed
7356  after changes to issue22118 were submitted.
7357
7358- Issue #22415: Fixed debugging output of the GROUPREF_EXISTS opcode in the re
7359  module.  Removed trailing spaces in debugging output.
7360
7361- Issue #22423: Unhandled exception in thread no longer causes unhandled
7362  AttributeError when sys.stderr is None.
7363
7364- Issue #21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects
7365  line buffering, rather than block buffering.  Patch by Akira Li.
7366
7367- Issue #21091: Fix API bug: email.message.EmailMessage.is_attachment is now
7368  a method.
7369
7370- Issue #21079: Fix email.message.EmailMessage.is_attachment to return the
7371  correct result when the header has parameters as well as a value.
7372
7373- Issue #22247: Add NNTPError to nntplib.__all__.
7374
7375- Issue #22366: urllib.request.urlopen will accept a context object
7376  (SSLContext) as an argument which will then be used for HTTPS connection.
7377  Patch by Alex Gaynor.
7378
7379- Issue #4180: The warnings registries are now reset when the filters
7380  are modified.
7381
7382- Issue #22419: Limit the length of incoming HTTP request in wsgiref server to
7383  65536 bytes and send a 414 error code for higher lengths. Patch contributed
7384  by Devin Cook.
7385
7386- Lax cookie parsing in http.cookies could be a security issue when combined
7387  with non-standard cookie handling in some Web browsers.  Reported by
7388  Sergey Bobrov.
7389
7390- Issue #20537: logging methods now accept an exception instance as well as a
7391  Boolean value or exception tuple. Thanks to Yury Selivanov for the patch.
7392
7393- Issue #22384: An exception in Tkinter callback no longer crashes the program
7394  when it is run with pythonw.exe.
7395
7396- Issue #22168: Prevent turtle AttributeError with non-default Canvas on OS X.
7397
7398- Issue #21147: sqlite3 now raises an exception if the request contains a null
7399  character instead of truncating it.  Based on patch by Victor Stinner.
7400
7401- Issue #13968: The glob module now supports recursive search in
7402  subdirectories using the "**" pattern.
7403
7404- Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
7405  empty string or tuple argument.
7406
7407- Issue #21951: Tkinter now most likely raises MemoryError instead of crash
7408  if the memory allocation fails.
7409
7410- Issue #22338: Fix a crash in the json module on memory allocation failure.
7411
7412- Issue #12410: imaplib.IMAP4 now supports the context management protocol.
7413  Original patch by Tarek Ziadé.
7414
7415- Issue #21270: We now override tuple methods in mock.call objects so that
7416  they can be used as normal call attributes.
7417
7418- Issue #16662: load_tests() is now unconditionally run when it is present in
7419  a package's __init__.py.  TestLoader.loadTestsFromModule() still accepts
7420  use_load_tests, but it is deprecated and ignored.  A new keyword-only
7421  attribute `pattern` is added and documented.  Patch given by Robert Collins,
7422  tweaked by Barry Warsaw.
7423
7424- Issue #22226: First letter no longer is stripped from the "status" key in
7425  the result of Treeview.heading().
7426
7427- Issue #19524: Fixed resource leak in the HTTP connection when an invalid
7428  response is received.  Patch by Martin Panter.
7429
7430- Issue #20421: Add a .version() method to SSL sockets exposing the actual
7431  protocol version in use.
7432
7433- Issue #19546: configparser exceptions no longer expose implementation details.
7434  Chained KeyErrors are removed, which leads to cleaner tracebacks.  Patch by
7435  Claudiu Popa.
7436
7437- Issue #22051: turtledemo no longer reloads examples to re-run them.
7438  Initialization of variables and gui setup should be done in main(),
7439  which is called each time a demo is run, but not on import.
7440
7441- Issue #21933: Turtledemo users can change the code font size with a menu
7442  selection or control(command) '-' or '+' or control-mousewheel.
7443  Original patch by Lita Cho.
7444
7445- Issue #21597: The separator between the turtledemo text pane and the drawing
7446  canvas can now be grabbed and dragged with a mouse.  The code text pane can
7447  be widened to easily view or copy the full width of the text.  The canvas
7448  can be widened on small screens.  Original patches by Jan Kanis and Lita Cho.
7449
7450- Issue #18132: Turtledemo buttons no longer disappear when the window is
7451  shrunk.  Original patches by Jan Kanis and Lita Cho.
7452
7453- Issue #22043: time.monotonic() is now always available.
7454  ``threading.Lock.acquire()``, ``threading.RLock.acquire()`` and socket
7455  operations now use a monotonic clock, instead of the system clock, when a
7456  timeout is used.
7457
7458- Issue #21527: Add a default number of workers to ThreadPoolExecutor equal
7459  to 5 times the number of CPUs.  Patch by Claudiu Popa.
7460
7461- Issue #22216: smtplib now resets its state more completely after a quit.  The
7462  most obvious consequence of the previous behavior was a STARTTLS failure
7463  during a connect/starttls/quit/connect/starttls sequence.
7464
7465- Issue #22098: ctypes' BigEndianStructure and LittleEndianStructure now
7466  define an empty __slots__ so that subclasses don't always get an instance
7467  dict.  Patch by Claudiu Popa.
7468
7469- Issue #22185: Fix an occasional RuntimeError in threading.Condition.wait()
7470  caused by mutation of the waiters queue without holding the lock.  Patch
7471  by Doug Zongker.
7472
7473- Issue #22287: On UNIX, _PyTime_gettimeofday() now uses
7474  clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now
7475  depends on the librt library on Solaris and on Linux (only with glibc older
7476  than 2.17).
7477
7478- Issue #22182: Use e.args to unpack exceptions correctly in
7479  distutils.file_util.move_file. Patch by Claudiu Popa.
7480
7481- The webbrowser module now uses subprocess's start_new_session=True rather
7482  than a potentially risky preexec_fn=os.setsid call.
7483
7484- Issue #22042: signal.set_wakeup_fd(fd) now raises an exception if the file
7485  descriptor is in blocking mode.
7486
7487- Issue #16808: inspect.stack() now returns a named tuple instead of a tuple.
7488  Patch by Daniel Shahaf.
7489
7490- Issue #22236: Fixed Tkinter images copying operations in NoDefaultRoot mode.
7491
7492- Issue #2527: Add a *globals* argument to timeit functions, in order to
7493  override the globals namespace in which the timed code is executed.
7494  Patch by Ben Roberts.
7495
7496- Issue #22118: Switch urllib.parse to use RFC 3986 semantics for the
7497  resolution of relative URLs, rather than RFCs 1808 and 2396.
7498  Patch by Demian Brecht.
7499
7500- Issue #21549: Added the "members" parameter to TarFile.list().
7501
7502- Issue #19628: Allow compileall recursion depth to be specified with a -r
7503  option.
7504
7505- Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows.
7506
7507- Issue #22068: Avoided reference loops with Variables and Fonts in Tkinter.
7508
7509- Issue #22165: SimpleHTTPRequestHandler now supports undecodable file names.
7510
7511- Issue #15381: Optimized line reading in io.BytesIO.
7512
7513- Issue #8797: Raise HTTPError on failed Basic Authentication immediately.
7514  Initial patch by Sam Bull.
7515
7516- Issue #20729: Restored the use of lazy iterkeys()/itervalues()/iteritems()
7517  in the mailbox module.
7518
7519- Issue #21448: Changed FeedParser feed() to avoid O(N**2) behavior when
7520  parsing long line.  Original patch by Raymond Hettinger.
7521
7522- Issue #22184: The functools LRU Cache decorator factory now gives an earlier
7523  and clearer error message when the user forgets the required parameters.
7524
7525- Issue #17923: glob() patterns ending with a slash no longer match non-dirs on
7526  AIX.  Based on patch by Delhallt.
7527
7528- Issue #21725: Added support for RFC 6531 (SMTPUTF8) in smtpd.
7529
7530- Issue #22176: Update the ctypes module's libffi to v3.1.  This release
7531  adds support for the Linux AArch64 and POWERPC ELF ABIv2 little endian
7532  architectures.
7533
7534- Issue #5411: Added support for the "xztar" format in the shutil module.
7535
7536- Issue #21121: Don't force 3rd party C extensions to be built with
7537  -Werror=declaration-after-statement.
7538
7539- Issue #21975: Fixed crash when using uninitialized sqlite3.Row (in particular
7540  when unpickling pickled sqlite3.Row).  sqlite3.Row is now initialized in the
7541  __new__() method.
7542
7543- Issue #20170: Convert posixmodule to use Argument Clinic.
7544
7545- Issue #21539: Add an *exists_ok* argument to `Pathlib.mkdir()` to mimic
7546  `mkdir -p` and `os.makedirs()` functionality.  When true, ignore
7547  FileExistsErrors.  Patch by Berker Peksag.
7548
7549- Issue #22127: Bypass IDNA for pure-ASCII host names in the socket module
7550  (in particular for numeric IPs).
7551
7552- Issue #21047: set the default value for the *convert_charrefs* argument
7553  of HTMLParser to True.  Patch by Berker Peksag.
7554
7555- Add an __all__ to html.entities.
7556
7557- Issue #15114: the strict mode and argument of HTMLParser, HTMLParser.error,
7558  and the HTMLParserError exception have been removed.
7559
7560- Issue #22085: Dropped support of Tk 8.3 in Tkinter.
7561
7562- Issue #21580: Now Tkinter correctly handles bytes arguments passed to Tk.
7563  In particular this allows initializing images from binary data.
7564
7565- Issue #22003: When initialized from a bytes object, io.BytesIO() now
7566  defers making a copy until it is mutated, improving performance and
7567  memory use on some use cases.  Patch by David Wilson.
7568
7569- Issue #22018: On Windows, signal.set_wakeup_fd() now also supports sockets.
7570  A side effect is that Python depends to the WinSock library.
7571
7572- Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get
7573  and set the blocking mode of a file descriptor (False if the O_NONBLOCK flag
7574  is set, True otherwise). These functions are not available on Windows.
7575
7576- Issue #17172: Make turtledemo start as active on OS X even when run with
7577  subprocess.  Patch by Lita Cho.
7578
7579- Issue #21704: Fix build error for _multiprocessing when semaphores
7580  are not available.  Patch by Arfrever Frehtes Taifersar Arahesis.
7581
7582- Issue #20173: Convert sha1, sha256, sha512 and md5 to ArgumentClinic.
7583  Patch by Vajrasky Kok.
7584
7585- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError
7586  on closed socket. repr(socket.socket) already works fine.
7587
7588- Issue #22033: Reprs of most Python implemened classes now contain actual
7589  class name instead of hardcoded one.
7590
7591- Issue #21947: The dis module can now disassemble generator-iterator
7592  objects based on their gi_code attribute. Patch by Clement Rouault.
7593
7594- Issue #16133: The asynchat.async_chat.handle_read() method now ignores
7595  BlockingIOError exceptions.
7596
7597- Issue #22044: Fixed premature DECREF in call_tzinfo_method.
7598  Patch by Tom Flanagan.
7599
7600- Issue #19884: readline: Disable the meta modifier key if stdout is not
7601  a terminal to not write the ANSI sequence ``"\033[1034h"`` into stdout. This
7602  sequence is used on some terminal (ex: TERM=xterm-256color") to enable
7603  support of 8 bit characters.
7604
7605- Issue #4350: Removed a number of out-of-dated and non-working for a long time
7606  Tkinter methods.
7607
7608- Issue #6167: Scrollbar.activate() now returns the name of active element if
7609  the argument is not specified.  Scrollbar.set() now always accepts only 2
7610  arguments.
7611
7612- Issue #15275: Clean up and speed up the ntpath module.
7613
7614- Issue #21888: plistlib's load() and loads() now work if the fmt parameter is
7615  specified.
7616
7617- Issue #22032: __qualname__ instead of __name__ is now always used to format
7618  fully qualified class names of Python implemented classes.
7619
7620- Issue #22031: Reprs now always use hexadecimal format with the "0x" prefix
7621  when contain an id in form " at 0x...".
7622
7623- Issue #22018: signal.set_wakeup_fd() now raises an OSError instead of a
7624  ValueError on ``fstat()`` failure.
7625
7626- Issue #21044: tarfile.open() now handles fileobj with an integer 'name'
7627  attribute.  Based on patch by Antoine Pietri.
7628
7629- Issue #21966: Respect -q command-line option when code module is ran.
7630
7631- Issue #19076: Don't pass the redundant 'file' argument to self.error().
7632
7633- Issue #16382: Improve exception message of warnings.warn() for bad
7634  category. Initial patch by Phil Elson.
7635
7636- Issue #21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of
7637  :c:type:`int` for the size to support reading more than 2 GB at once. On
7638  Windows, the size is truncted to INT_MAX. As any call to os.read(), the OS
7639  may read less bytes than the number of requested bytes.
7640
7641- Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
7642
7643- Issue #11259: asynchat.async_chat().set_terminator() now raises a ValueError
7644  if the number of received bytes is negative.
7645
7646- Issue #12523: asynchat.async_chat.push() now raises a TypeError if it doesn't
7647  get a bytes string
7648
7649- Issue #21707: Add missing kwonlyargcount argument to
7650  ModuleFinder.replace_paths_in_code().
7651
7652- Issue #20639: calling Path.with_suffix('') allows removing the suffix
7653  again.  Patch by July Tikhonov.
7654
7655- Issue #21714: Disallow the construction of invalid paths using
7656  Path.with_name().  Original patch by Antony Lee.
7657
7658- Issue #15014: Added 'auth' method to smtplib to make implementing auth
7659  mechanisms simpler, and used it internally in the login method.
7660
7661- Issue #21151: Fixed a segfault in the winreg module when ``None`` is passed
7662  as a ``REG_BINARY`` value to SetValueEx.  Patch by John Ehresman.
7663
7664- Issue #21090: io.FileIO.readall() does not ignore I/O errors anymore. Before,
7665  it ignored I/O errors if at least the first C call read() succeed.
7666
7667- Issue #5800: headers parameter of wsgiref.headers.Headers is now optional.
7668  Initial patch by Pablo Torres Navarrete and SilentGhost.
7669
7670- Issue #21781: ssl.RAND_add() now supports strings longer than 2 GB.
7671
7672- Issue #21679: Prevent extraneous fstat() calls during open().  Patch by
7673  Bohuslav Kabrda.
7674
7675- Issue #21863: cProfile now displays the module name of C extension functions,
7676  in addition to their own name.
7677
7678- Issue #11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper
7679  object is destroyed. The destructor now closes the file if needed. The
7680  close() method can now be called twice: the second call does nothing.
7681
7682- Issue #21858: Better handling of Python exceptions in the sqlite3 module.
7683
7684- Issue #21476: Make sure the email.parser.BytesParser TextIOWrapper is
7685  discarded after parsing, so the input file isn't unexpectedly closed.
7686
7687- Issue #20295: imghdr now recognizes OpenEXR format images.
7688
7689- Issue #21729: Used the "with" statement in the dbm.dumb module to ensure
7690  files closing.  Patch by Claudiu Popa.
7691
7692- Issue #21491: socketserver: Fix a race condition in child processes reaping.
7693
7694- Issue #21719: Added the ``st_file_attributes`` field to os.stat_result on
7695  Windows.
7696
7697- Issue #21832: Require named tuple inputs to be exact strings.
7698
7699- Issue #21722: The distutils "upload" command now exits with a non-zero
7700  return code when uploading fails.  Patch by Martin Dengler.
7701
7702- Issue #21723: asyncio.Queue: support any type of number (ex: float) for the
7703  maximum size. Patch written by Vajrasky Kok.
7704
7705- Issue #21711: support for "site-python" directories has now been removed
7706  from the site module (it was deprecated in 3.4).
7707
7708- Issue #17552: new socket.sendfile() method allowing a file to be sent over a
7709  socket by using high-performance os.sendfile() on UNIX.
7710  Patch by Giampaolo Rodola'.
7711
7712- Issue #18039: dbm.dump.open() now always creates a new database when the
7713  flag has the value 'n'.  Patch by Claudiu Popa.
7714
7715- Issue #21326: Add a new is_closed() method to asyncio.BaseEventLoop.
7716  run_forever() and run_until_complete() methods of asyncio.BaseEventLoop now
7717  raise an exception if the event loop was closed.
7718
7719- Issue #21766: Prevent a security hole in CGIHTTPServer by URL unquoting paths
7720  before checking for a CGI script at that path.
7721
7722- Issue #21310: Fixed possible resource leak in failed open().
7723
7724- Issue #21256: Printout of keyword args should be in deterministic order in
7725  a mock function call. This will help to write better doctests.
7726
7727- Issue #21677: Fixed chaining nonnormalized exceptions in io close() methods.
7728
7729- Issue #11709: Fix the pydoc.help function to not fail when sys.stdin is not a
7730  valid file.
7731
7732- Issue #21515: tempfile.TemporaryFile now uses os.O_TMPFILE flag is available.
7733
7734- Issue #13223: Fix pydoc.writedoc so that the HTML documentation for methods
7735  that use 'self' in the example code is generated correctly.
7736
7737- Issue #21463: In urllib.request, fix pruning of the FTP cache.
7738
7739- Issue #21618: The subprocess module could fail to close open fds that were
7740  inherited by the calling process and already higher than POSIX resource
7741  limits would otherwise allow.  On systems with a functioning /proc/self/fd
7742  or /dev/fd interface the max is now ignored and all fds are closed.
7743
7744- Issue #20383: Introduce importlib.util.module_from_spec() as the preferred way
7745  to create a new module.
7746
7747- Issue #21552: Fixed possible integer overflow of too long string lengths in
7748  the tkinter module on 64-bit platforms.
7749
7750- Issue #14315: The zipfile module now ignores extra fields in the central
7751  directory that are too short to be parsed instead of letting a struct.unpack
7752  error bubble up as this "bad data" appears in many real world zip files in
7753  the wild and is ignored by other zip tools.
7754
7755- Issue #13742: Added "key" and "reverse" parameters to heapq.merge().
7756  (First draft of patch contributed by Simon Sapin.)
7757
7758- Issue #21402: tkinter.ttk now works when default root window is not set.
7759
7760- Issue #3015: _tkinter.create() now creates tkapp object with wantobject=1 by
7761  default.
7762
7763- Issue #10203: sqlite3.Row now truly supports sequence protocol.  In particular
7764  it supports reverse() and negative indices.  Original patch by Claudiu Popa.
7765
7766- Issue #18807: If copying (no symlinks) specified for a venv, then the python
7767  interpreter aliases (python, python3) are now created by copying rather than
7768  symlinking.
7769
7770- Issue #20197: Added support for the WebP image type in the imghdr module.
7771  Patch by Fabrice Aneche and Claudiu Popa.
7772
7773- Issue #21513: Speedup some properties of IP addresses (IPv4Address,
7774  IPv6Address) such as .is_private or .is_multicast.
7775
7776- Issue #21137: Improve the repr for threading.Lock() and its variants
7777  by showing the "locked" or "unlocked" status.  Patch by Berker Peksag.
7778
7779- Issue #21538: The plistlib module now supports loading of binary plist files
7780  when reference or offset size is not a power of two.
7781
7782- Issue #21455: Add a default backlog to socket.listen().
7783
7784- Issue #21525: Most Tkinter methods which accepted tuples now accept lists too.
7785
7786- Issue #22166: With the assistance of a new internal _codecs._forget_codec
7787  helping function, test_codecs now clears the encoding caches to avoid the
7788  appearance of a reference leak
7789
7790- Issue #22236: Tkinter tests now don't reuse default root window.  New root
7791  window is created for every test class.
7792
7793- Issue #10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial
7794  shape.
7795
7796- Issue #20826: Optimize ipaddress.collapse_addresses().
7797
7798- Issue #21487: Optimize ipaddress.summarize_address_range() and
7799  ipaddress.{IPv4Network,IPv6Network}.subnets().
7800
7801- Issue #21486: Optimize parsing of netmasks in ipaddress.IPv4Network and
7802  ipaddress.IPv6Network.
7803
7804- Issue #13916: Disallowed the surrogatepass error handler for non UTF-\*
7805  encodings.
7806
7807- Issue #20998: Fixed re.fullmatch() of repeated single character pattern
7808  with ignore case.  Original patch by Matthew Barnett.
7809
7810- Issue #21075: fileinput.FileInput now reads bytes from standard stream if
7811  binary mode is specified.  Patch by Sam Kimbrel.
7812
7813- Issue #19775: Add a samefile() method to pathlib Path objects.  Initial
7814  patch by Vajrasky Kok.
7815
7816- Issue #21226: Set up modules properly in PyImport_ExecCodeModuleObject
7817  (and friends).
7818
7819- Issue #21398: Fix a unicode error in the pydoc pager when the documentation
7820  contains characters not encodable to the stdout encoding.
7821
7822- Issue #16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept
7823  an (address, netmask) tuple argument, so as to easily construct network
7824  objects from existing addresses.
7825
7826- Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a
7827  staticmethod.
7828
7829- Issue #21424: Simplified and optimized heaqp.nlargest() and nmsmallest()
7830  to make fewer tuple comparisons.
7831
7832- Issue #21396: Fix TextIOWrapper(..., write_through=True) to not force a
7833  flush() on the underlying binary stream.  Patch by akira.
7834
7835- Issue #18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman
7836
7837- Issue #21088: Bugfix for curses.window.addch() regression in 3.4.0.
7838  In porting to Argument Clinic, the first two arguments were reversed.
7839
7840- Issue #21407: _decimal: The module now supports function signatures.
7841
7842- Issue #10650: Remove the non-standard 'watchexp' parameter from the
7843  Decimal.quantize() method in the Python version.  It had never been
7844  present in the C version.
7845
7846- Issue #21469: Reduced the risk of false positives in robotparser by
7847  checking to make sure that robots.txt has been read or does not exist
7848  prior to returning True in can_fetch().
7849
7850- Issue #19414: Have the OrderedDict mark deleted links as unusable.
7851  This gives an early failure if the link is deleted during iteration.
7852
7853- Issue #21421: Add __slots__ to the MappingViews ABC.
7854  Patch by Josh Rosenberg.
7855
7856- Issue #21101: Eliminate double hashing in the C speed-up code for
7857  collections.Counter().
7858
7859- Issue #21321: itertools.islice() now releases the reference to the source
7860  iterator when the slice is exhausted.  Patch by Anton Afanasyev.
7861
7862- Issue #21057: TextIOWrapper now allows the underlying binary stream's
7863  read() or read1() method to return an arbitrary bytes-like object
7864  (such as a memoryview).  Patch by Nikolaus Rath.
7865
7866- Issue #20951: SSLSocket.send() now raises either SSLWantReadError or
7867  SSLWantWriteError on a non-blocking socket if the operation would block.
7868  Previously, it would return 0.  Patch by Nikolaus Rath.
7869
7870- Issue #13248: removed previously deprecated asyncore.dispatcher __getattr__
7871  cheap inheritance hack.
7872
7873- Issue #9815: assertRaises now tries to clear references to local variables
7874  in the exception's traceback.
7875
7876- Issue #19940: ssl.cert_time_to_seconds() now interprets the given time
7877  string in the UTC timezone (as specified in RFC 5280), not the local
7878  timezone.
7879
7880- Issue #13204: Calling sys.flags.__new__ would crash the interpreter,
7881  now it raises a TypeError.
7882
7883- Issue #19385: Make operations on a closed dbm.dumb database always raise the
7884  same exception.
7885
7886- Issue #21207: Detect when the os.urandom cached fd has been closed or
7887  replaced, and open it anew.
7888
7889- Issue #21291: subprocess's Popen.wait() is now thread safe so that
7890  multiple threads may be calling wait() or poll() on a Popen instance
7891  at the same time without losing the Popen.returncode value.
7892
7893- Issue #21127: Path objects can now be instantiated from str subclass
7894  instances (such as ``numpy.str_``).
7895
7896- Issue #15002: urllib.response object to use _TemporaryFileWrapper (and
7897  _TemporaryFileCloser) facility. Provides a better way to handle file
7898  descriptor close. Patch contributed by Christian Theune.
7899
7900- Issue #12220: mindom now raises a custom ValueError indicating it doesn't
7901  support spaces in URIs instead of letting a 'split' ValueError bubble up.
7902
7903- Issue #21068: The ssl.PROTOCOL* constants are now enum members.
7904
7905- Issue #21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd.
7906
7907- Issue #21262: New method assert_not_called for Mock.
7908  It raises AssertionError if the mock has been called.
7909
7910- Issue #21238: New keyword argument `unsafe` to Mock. It raises
7911  `AttributeError` incase of an attribute startswith assert or assret.
7912
7913- Issue #20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not
7914  PROTOCOL_SSLv3, for maximum compatibility.
7915
7916- Issue #21239: patch.stopall() didn't work deterministically when the same
7917  name was patched more than once.
7918
7919- Issue #21203: Updated fileConfig and dictConfig to remove inconsistencies.
7920  Thanks to Jure Koren for the patch.
7921
7922- Issue #21222: Passing name keyword argument to mock.create_autospec now
7923  works.
7924
7925- Issue #21197: Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX.
7926
7927- Issue #17498: Some SMTP servers disconnect after certain errors, violating
7928  strict RFC conformance.  Instead of losing the error code when we issue the
7929  subsequent RSET, smtplib now returns the error code and defers raising the
7930  SMTPServerDisconnected error until the next command is issued.
7931
7932- Issue #17826: setting an iterable side_effect on a mock function created by
7933  create_autospec now works. Patch by Kushal Das.
7934
7935- Issue #7776: Fix ``Host:`` header and reconnection when using
7936  http.client.HTTPConnection.set_tunnel(). Patch by Nikolaus Rath.
7937
7938- Issue #20968: unittest.mock.MagicMock now supports division.
7939  Patch by Johannes Baiter.
7940
7941- Issue #21529 (CVE-2014-4616): Fix arbitrary memory access in
7942  JSONDecoder.raw_decode with a negative second parameter. Bug reported by Guido
7943  Vranken.
7944
7945- Issue #21169: getpass now handles non-ascii characters that the
7946  input stream encoding cannot encode by re-encoding using the
7947  replace error handler.
7948
7949- Issue #21171: Fixed undocumented filter API of the rot13 codec.
7950  Patch by Berker Peksag.
7951
7952- Issue #20539: Improved math.factorial error message for large positive inputs
7953  and changed exception type (OverflowError -> ValueError) for large negative
7954  inputs.
7955
7956- Issue #21172: isinstance check relaxed from dict to collections.Mapping.
7957
7958- Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError
7959  if path and sock are specified at the same time.
7960
7961- Issue #21136: Avoid unnecessary normalization of Fractions resulting from
7962  power and other operations.  Patch by Raymond Hettinger.
7963
7964- Issue #17621: Introduce importlib.util.LazyLoader.
7965
7966- Issue #21076: signal module constants were turned into enums.
7967  Patch by Giampaolo Rodola'.
7968
7969- Issue #20636: Improved the repr of Tkinter widgets.
7970
7971- Issue #19505: The items, keys, and values views of OrderedDict now support
7972  reverse iteration using reversed().
7973
7974- Issue #21149: Improved thread-safety in logging cleanup during interpreter
7975  shutdown. Thanks to Devin Jeanpierre for the patch.
7976
7977- Issue #21058: Fix a leak of file descriptor in
7978  :func:`tempfile.NamedTemporaryFile`, close the file descriptor if
7979  :func:`io.open` fails
7980
7981- Issue #21200: Return None from pkgutil.get_loader() when __spec__ is missing.
7982
7983- Issue #21013: Enhance ssl.create_default_context() when used for server side
7984  sockets to provide better security by default.
7985
7986- Issue #20145: `assertRaisesRegex` and `assertWarnsRegex` now raise a
7987  TypeError if the second argument is not a string or compiled regex.
7988
7989- Issue #20633: Replace relative import by absolute import.
7990
7991- Issue #20980: Stop wrapping exception when using ThreadPool.
7992
7993- Issue #21082: In os.makedirs, do not set the process-wide umask. Note this
7994  changes behavior of makedirs when exist_ok=True.
7995
7996- Issue #20990: Fix issues found by pyflakes for multiprocessing.
7997
7998- Issue #21015: SSL contexts will now automatically select an elliptic
7999  curve for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise
8000  default to "prime256v1".
8001
8002- Issue #21000: Improve the command-line interface of json.tool.
8003
8004- Issue #20995: Enhance default ciphers used by the ssl module to enable
8005  better security and prioritize perfect forward secrecy.
8006
8007- Issue #20884: Don't assume that __file__ is defined on importlib.__init__.
8008
8009- Issue #21499: Ignore __builtins__ in several test_importlib.test_api tests.
8010
8011- Issue #20627: xmlrpc.client.ServerProxy is now a context manager.
8012
8013- Issue #19165: The formatter module now raises DeprecationWarning instead of
8014  PendingDeprecationWarning.
8015
8016- Issue #13936: Remove the ability of datetime.time instances to be considered
8017  false in boolean contexts.
8018
8019- Issue #18931: selectors module now supports /dev/poll on Solaris.
8020  Patch by Giampaolo Rodola'.
8021
8022- Issue #19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale),
8023  :py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the
8024  ``surrogateescape`` error handler, instead of the ``strict`` error handler.
8025
8026- Issue #20574: Implement incremental decoder for cp65001 code (Windows code
8027  page 65001, Microsoft UTF-8).
8028
8029- Issue #20879: Delay the initialization of encoding and decoding tables for
8030  base32, ascii85 and base85 codecs in the base64 module, and delay the
8031  initialization of the unquote_to_bytes() table of the urllib.parse module, to
8032  not waste memory if these modules are not used.
8033
8034- Issue #19157: Include the broadcast address in the usuable hosts for IPv6
8035  in ipaddress.
8036
8037- Issue #11599: When an external command (e.g. compiler) fails, distutils now
8038  prints out the whole command line (instead of just the command name) if the
8039  environment variable DISTUTILS_DEBUG is set.
8040
8041- Issue #4931: distutils should not produce unhelpful "error: None" messages
8042  anymore.  distutils.util.grok_environment_error is kept but doc-deprecated.
8043
8044- Issue #20875: Prevent possible gzip "'read' is not defined" NameError.
8045  Patch by Claudiu Popa.
8046
8047- Issue #11558: ``email.message.Message.attach`` now returns a more
8048  useful error message if ``attach`` is called on a message for which
8049  ``is_multipart`` is False.
8050
8051- Issue #20283: RE pattern methods now accept the string keyword parameters
8052  as documented.  The pattern and source keyword parameters are left as
8053  deprecated aliases.
8054
8055- Issue #20778: Fix modulefinder to work with bytecode-only modules.
8056
8057- Issue #20791: copy.copy() now doesn't make a copy when the input is
8058  a bytes object.  Initial patch by Peter Otten.
8059
8060- Issue #19748: On AIX, time.mktime() now raises an OverflowError for year
8061  outsize range [1902; 2037].
8062
8063- Issue #19573: inspect.signature: Use enum for parameter kind constants.
8064
8065- Issue #20726: inspect.signature: Make Signature and Parameter picklable.
8066
8067- Issue #17373: Add inspect.Signature.from_callable method.
8068
8069- Issue #20378: Improve repr of inspect.Signature and inspect.Parameter.
8070
8071- Issue #20816: Fix inspect.getcallargs() to raise correct TypeError for
8072  missing keyword-only arguments. Patch by Jeremiah Lowin.
8073
8074- Issue #20817: Fix inspect.getcallargs() to fail correctly if more
8075  than 3 arguments are missing. Patch by Jeremiah Lowin.
8076
8077- Issue #6676: Ensure a meaningful exception is raised when attempting
8078  to parse more than one XML document per pyexpat xmlparser instance.
8079  (Original patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with
8080  suggested wording by David Gutteridge)
8081
8082- Issue #21117: Fix inspect.signature to better support functools.partial.
8083  Due to the specifics of functools.partial implementation,
8084  positional-or-keyword arguments passed as keyword arguments become
8085  keyword-only.
8086
8087- Issue #20334: inspect.Signature and inspect.Parameter are now hashable.
8088  Thanks to Antony Lee for bug reports and suggestions.
8089
8090- Issue #15916: doctest.DocTestSuite returns an empty unittest.TestSuite instead
8091  of raising ValueError if it finds no tests
8092
8093- Issue #21209: Fix asyncio.tasks.CoroWrapper to workaround a bug
8094  in yield-from implementation in CPythons prior to 3.4.1.
8095
8096- asyncio: Add gi_{frame,running,code} properties to CoroWrapper
8097  (upstream issue #163).
8098
8099- Issue #21311: Avoid exception in _osx_support with non-standard compiler
8100  configurations.  Patch by John Szakmeister.
8101
8102- Issue #11571: Ensure that the turtle window becomes the topmost window
8103  when launched on OS X.
8104
8105- Issue #21801: Validate that __signature__ is None or an instance of Signature.
8106
8107- Issue #21923: Prevent AttributeError in distutils.sysconfig.customize_compiler
8108  due to possible uninitialized _config_vars.
8109
8110- Issue #21323: Fix http.server to again handle scripts in CGI subdirectories,
8111  broken by the fix for security issue #19435.  Patch by Zach Byrne.
8112
8113- Issue #22733: Fix ffi_prep_args not zero-extending argument values correctly
8114  on 64-bit Windows.
8115
8116- Issue #23302: Default to TCP_NODELAY=1 upon establishing an HTTPConnection.
8117  Removed use of hard-coded MSS as it's an optimization that's no longer needed
8118  with Nagle disabled.
8119
8120IDLE
8121----
8122
8123- Issue #20577: Configuration of the max line length for the FormatParagraph
8124  extension has been moved from the General tab of the Idle preferences dialog
8125  to the FormatParagraph tab of the Config Extensions dialog.
8126  Patch by Tal Einat.
8127
8128- Issue #16893: Update Idle doc chapter to match current Idle and add new
8129  information.
8130
8131- Issue #3068: Add Idle extension configuration dialog to Options menu.
8132  Changes are written to HOME/.idlerc/config-extensions.cfg.
8133  Original patch by Tal Einat.
8134
8135- Issue #16233: A module browser (File : Class Browser, Alt+C) requires an
8136  editor window with a filename.  When Class Browser is requested otherwise,
8137  from a shell, output window, or 'Untitled' editor, Idle no longer displays
8138  an error box.  It now pops up an Open Module box (Alt+M). If a valid name
8139  is entered and a module is opened, a corresponding browser is also opened.
8140
8141- Issue #4832: Save As to type Python files automatically adds .py to the
8142  name you enter (even if your system does not display it).  Some systems
8143  automatically add .txt when type is Text files.
8144
8145- Issue #21986: Code objects are not normally pickled by the pickle module.
8146  To match this, they are no longer pickled when running under Idle.
8147
8148- Issue #17390: Adjust Editor window title; remove 'Python',
8149  move version to end.
8150
8151- Issue #14105: Idle debugger breakpoints no longer disappear
8152  when inserting or deleting lines.
8153
8154- Issue #17172: Turtledemo can now be run from Idle.
8155  Currently, the entry is on the Help menu, but it may move to Run.
8156  Patch by Ramchandra Apt and Lita Cho.
8157
8158- Issue #21765: Add support for non-ascii identifiers to HyperParser.
8159
8160- Issue #21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav
8161  Heblikar.
8162
8163- Issue #18592: Add unittest for SearchDialogBase. Patch by Phil Webster.
8164
8165- Issue #21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar.
8166
8167- Issue #21686: add unittest for HyperParser. Original patch by Saimadhav
8168  Heblikar.
8169
8170- Issue #12387: Add missing upper(lower)case versions of default Windows key
8171  bindings for Idle so Caps Lock does not disable them. Patch by Roger Serwy.
8172
8173- Issue #21695: Closing a Find-in-files output window while the search is
8174  still in progress no longer closes Idle.
8175
8176- Issue #18910: Add unittest for textView. Patch by Phil Webster.
8177
8178- Issue #18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar.
8179
8180- Issue #18409: Add unittest for AutoComplete. Patch by Phil Webster.
8181
8182- Issue #21477: htest.py - Improve framework, complete set of tests.
8183  Patches by Saimadhav Heblikar
8184
8185- Issue #18104: Add idlelib/idle_test/htest.py with a few sample tests to begin
8186  consolidating and improving human-validated tests of Idle. Change other files
8187  as needed to work with htest.  Running the module as __main__ runs all tests.
8188
8189- Issue #21139: Change default paragraph width to 72, the PEP 8 recommendation.
8190
8191- Issue #21284: Paragraph reformat test passes after user changes reformat width.
8192
8193- Issue #17654: Ensure IDLE menus are customized properly on OS X for
8194  non-framework builds and for all variants of Tk.
8195
8196- Issue #23180: Rename IDLE "Windows" menu item to "Window".
8197  Patch by Al Sweigart.
8198
8199Build
8200-----
8201
8202- Issue #15506: Use standard PKG_PROG_PKG_CONFIG autoconf macro in the configure
8203  script.
8204
8205- Issue #22935: Allow the ssl module to be compiled if openssl doesn't support
8206  SSL 3.
8207
8208- Issue #22592: Drop support of the Borland C compiler to build Python. The
8209  distutils module still supports it to build extensions.
8210
8211- Issue #22591: Drop support of MS-DOS, especially of the DJGPP compiler
8212  (MS-DOS port of GCC).
8213
8214- Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
8215  Jonathan Hosmer.
8216
8217- Issue #22359: Remove incorrect uses of recursive make.  Patch by Jonas
8218  Wagner.
8219
8220- Issue #21958: Define HAVE_ROUND when building with Visual Studio 2013 and
8221  above.  Patch by Zachary Turner.
8222
8223- Issue #18093: the programs that embed the CPython runtime are now in a
8224  separate "Programs" directory, rather than being kept in the Modules
8225  directory.
8226
8227- Issue #15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/
8228  now display special message when and only when there are failures.
8229
8230- Issue #21141: The Windows build process no longer attempts to find Perl,
8231  instead relying on OpenSSL source being configured and ready to build.  The
8232  ``PCbuild\build_ssl.py`` script has been re-written and re-named to
8233  ``PCbuild\prepare_ssl.py``, and takes care of configuring OpenSSL source
8234  for both 32 and 64 bit platforms.  OpenSSL sources obtained from
8235  svn.python.org will always be pre-configured and ready to build.
8236
8237- Issue #21037: Add a build option to enable AddressSanitizer support.
8238
8239- Issue #19962: The Windows build process now creates "python.bat" in the
8240  root of the source tree, which passes all arguments through to the most
8241  recently built interpreter.
8242
8243- Issue #21285: Refactor and fix curses configure check to always search
8244  in a ncursesw directory.
8245
8246- Issue #15234: For BerkelyDB and Sqlite, only add the found library and
8247  include directories if they aren't already being searched. This avoids
8248  an explicit runtime library dependency.
8249
8250- Issue #17861: Tools/scripts/generate_opcode_h.py automatically regenerates
8251  Include/opcode.h from Lib/opcode.py if the latter gets any change.
8252
8253- Issue #20644: OS X installer build support for documentation build changes
8254  in 3.4.1: assume externally supplied sphinx-build is available in /usr/bin.
8255
8256- Issue #20022: Eliminate use of deprecated bundlebuilder in OS X builds.
8257
8258- Issue #15968: Incorporated Tcl, Tk, and Tix builds into the Windows build
8259  solution.
8260
8261- Issue #17095: Fix Modules/Setup *shared* support.
8262
8263- Issue #21811: Anticipated fixes to support OS X versions > 10.9.
8264
8265- Issue #21166: Prevent possible segfaults and other random failures of
8266  python --generate-posix-vars in pybuilddir.txt build target.
8267
8268- Issue #18096: Fix library order returned by python-config.
8269
8270- Issue #17219: Add library build dir for Python extension cross-builds.
8271
8272- Issue #22919: Windows build updated to support VC 14.0 (Visual Studio 2015),
8273  which will be used for the official release.
8274
8275- Issue #21236: Build _msi.pyd with cabinet.lib instead of fci.lib
8276
8277- Issue #17128: Use private version of OpenSSL for OS X 10.5+ installer.
8278
8279C API
8280-----
8281
8282- Issue #14203: Remove obsolete support for view==NULL in PyBuffer_FillInfo(),
8283  bytearray_getbuffer(), bytesiobuf_getbuffer() and array_buffer_getbuf().
8284  All functions now raise BufferError in that case.
8285
8286- Issue #22445: PyBuffer_IsContiguous() now implements precise contiguity
8287  tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation
8288  flag.  Previously the function reported false negatives for corner cases.
8289
8290- Issue #22079: PyType_Ready() now checks that statically allocated type has
8291  no dynamically allocated bases.
8292
8293- Issue #22453: Removed non-documented macro PyObject_REPR().
8294
8295- Issue #18395: Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`,
8296  rename ``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document
8297  these functions.
8298
8299- Issue #21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(),
8300  PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) is now using
8301  ``calloc()`` instead of ``malloc()`` for large objects which is faster and
8302  use less memory.
8303
8304- Issue #20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to
8305  match what importlib does; this affects _frozen_importlib as well as any
8306  module loaded using imp.init_frozen().
8307
8308Documentation
8309-------------
8310
8311- Issue #19548: Update the codecs module documentation to better cover the
8312  distinction between text encodings and other codecs, together with other
8313  clarifications. Patch by Martin Panter.
8314
8315- Issue #22394: Doc/Makefile now supports ``make venv PYTHON=../python`` to
8316  create a venv for generating the documentation, e.g.,
8317  ``make html PYTHON=venv/bin/python3``.
8318
8319- Issue #21514: The documentation of the json module now refers to new JSON RFC
8320  7159 instead of obsoleted RFC 4627.
8321
8322- Issue #21777: The binary sequence methods on bytes and bytearray are now
8323  documented explicitly, rather than assuming users will be able to derive
8324  the expected behaviour from the behaviour of the corresponding str methods.
8325
8326- Issue #6916: undocument deprecated asynchat.fifo class.
8327
8328- Issue #17386: Expanded functionality of the ``Doc/make.bat`` script to make
8329  it much more comparable to ``Doc/Makefile``.
8330
8331- Issue #21312: Update the thread_foobar.h template file to include newer
8332  threading APIs.  Patch by Jack McCracken.
8333
8334- Issue #21043: Remove the recommendation for specific CA organizations and to
8335  mention the ability to load the OS certificates.
8336
8337- Issue #20765: Add missing documentation for PurePath.with_name() and
8338  PurePath.with_suffix().
8339
8340- Issue #19407: New package installation and distribution guides based on
8341  the Python Packaging Authority tools. Existing guides have been retained
8342  as legacy links from the distutils docs, as they still contain some
8343  required reference material for tool developers that isn't recorded
8344  anywhere else.
8345
8346- Issue #19697: Document cases where __main__.__spec__ is None.
8347
8348Tests
8349-----
8350
8351- Issue #18982: Add tests for CLI of the calendar module.
8352
8353- Issue #19548: Added some additional checks to test_codecs to ensure that
8354  statements in the updated documentation remain accurate. Patch by Martin
8355  Panter.
8356
8357- Issue #22838: All test_re tests now work with unittest test discovery.
8358
8359- Issue #22173: Update lib2to3 tests to use unittest test discovery.
8360
8361- Issue #16000: Convert test_curses to use unittest.
8362
8363- Issue #21456: Skip two tests in test_urllib2net.py if _ssl module not
8364  present. Patch by Remi Pointel.
8365
8366- Issue #20746: Fix test_pdb to run in refleak mode (-R).  Patch by Xavier
8367  de Gaye.
8368
8369- Issue #22060: test_ctypes has been somewhat cleaned up and simplified; it
8370  now uses unittest test discovery to find its tests.
8371
8372- Issue #22104: regrtest.py no longer holds a reference to the suite of tests
8373  loaded from test modules that don't define test_main().
8374
8375- Issue #22111: Assorted cleanups in test_imaplib.  Patch by Milan Oberkirch.
8376
8377- Issue #22002: Added ``load_package_tests`` function to test.support and used
8378  it to implement/augment test discovery in test_asyncio, test_email,
8379  test_importlib, test_json, and test_tools.
8380
8381- Issue #21976: Fix test_ssl to accept LibreSSL version strings.  Thanks
8382  to William Orr.
8383
8384- Issue #21918: Converted test_tools from a module to a package containing
8385  separate test files for each tested script.
8386
8387- Issue #9554: Use modern unittest features in test_argparse. Initial patch by
8388  Denver Coneybeare and Radu Voicilas.
8389
8390- Issue #20155: Changed HTTP method names in failing tests in test_httpservers
8391  so that packet filtering software (specifically Windows Base Filtering Engine)
8392  does not interfere with the transaction semantics expected by the tests.
8393
8394- Issue #19493: Refactored the ctypes test package to skip tests explicitly
8395  rather than silently.
8396
8397- Issue #18492: All resources are now allowed when tests are not run by
8398  regrtest.py.
8399
8400- Issue #21634: Fix pystone micro-benchmark: use floor division instead of true
8401  division to benchmark integers instead of floating point numbers. Set pystone
8402  version to 1.2. Patch written by Lennart Regebro.
8403
8404- Issue #21605: Added tests for Tkinter images.
8405
8406- Issue #21493: Added test for ntpath.expanduser().  Original patch by
8407  Claudiu Popa.
8408
8409- Issue #19925: Added tests for the spwd module. Original patch by Vajrasky Kok.
8410
8411- Issue #21522: Added Tkinter tests for Listbox.itemconfigure(),
8412  PanedWindow.paneconfigure(), and Menu.entryconfigure().
8413
8414- Issue #17756: Fix test_code test when run from the installed location.
8415
8416- Issue #17752: Fix distutils tests when run from the installed location.
8417
8418- Issue #18604: Consolidated checks for GUI availability.  All platforms now
8419  at least check whether Tk can be instantiated when the GUI resource is
8420  requested.
8421
8422- Issue #21275: Fix a socket test on KFreeBSD.
8423
8424- Issue #21223: Pass test_site/test_startup_imports when some of the extensions
8425  are built as builtins.
8426
8427- Issue #20635: Added tests for Tk geometry managers.
8428
8429- Add test case for freeze.
8430
8431- Issue #20743: Fix a reference leak in test_tcl.
8432
8433- Issue #21097: Move test_namespace_pkgs into test_importlib.
8434
8435- Issue #21503: Use test_both() consistently in test_importlib.
8436
8437- Issue #20939: Avoid various network test failures due to new
8438  redirect of http://www.python.org/ to https://www.python.org:
8439  use http://www.example.com instead.
8440
8441- Issue #20668: asyncio tests no longer rely on tests.txt file.
8442  (Patch by Vajrasky Kok)
8443
8444- Issue #21093: Prevent failures of ctypes test_macholib on OS X if a
8445  copy of libz exists in $HOME/lib or /usr/local/lib.
8446
8447- Issue #22770: Prevent some Tk segfaults on OS X when running gui tests.
8448
8449- Issue #23211: Workaround test_logging failure on some OS X 10.6 systems.
8450
8451- Issue #23345: Prevent test_ssl failures with large OpenSSL patch level
8452  values (like 0.9.8zc).
8453
8454Tools/Demos
8455-----------
8456
8457- Issue #22314: pydoc now works when the LINES environment variable is set.
8458
8459- Issue #22615: Argument Clinic now supports the "type" argument for the
8460  int converter.  This permits using the int converter with enums and
8461  typedefs.
8462
8463- Issue #20076: The makelocalealias.py script no longer ignores UTF-8 mapping.
8464
8465- Issue #20079: The makelocalealias.py script now can parse the SUPPORTED file
8466  from glibc sources and supports command line options for source paths.
8467
8468- Issue #22201: Command-line interface of the zipfile module now correctly
8469  extracts ZIP files with directory entries.  Patch by Ryan Wilson.
8470
8471- Issue #22120: For functions using an unsigned integer return converter,
8472  Argument Clinic now generates a cast to that type for the comparison
8473  to -1 in the generated code.  (This suppresses a compilation warning.)
8474
8475- Issue #18974: Tools/scripts/diff.py now uses argparse instead of optparse.
8476
8477- Issue #21906: Make Tools/scripts/md5sum.py work in Python 3.
8478  Patch by Zachary Ware.
8479
8480- Issue #21629: Fix Argument Clinic's "--converters" feature.
8481
8482- Add support for ``yield from`` to 2to3.
8483
8484- Add support for the PEP 465 matrix multiplication operator to 2to3.
8485
8486- Issue #16047: Fix module exception list and __file__ handling in freeze.
8487  Patch by Meador Inge.
8488
8489- Issue #11824: Consider ABI tags in freeze. Patch by Meador Inge.
8490
8491- Issue #20535: PYTHONWARNING no longer affects the run_tests.py script.
8492  Patch by Arfrever Frehtes Taifersar Arahesis.
8493
8494Windows
8495-------
8496
8497- Issue #23260: Update Windows installer
8498
8499- The bundled version of Tcl/Tk has been updated to 8.6.3.  The most visible
8500  result of this change is the addition of new native file dialogs when
8501  running on Windows Vista or newer.  See Tcl/Tk's TIP 432 for more
8502  information.  Also, this version of Tcl/Tk includes support for Windows 10.
8503
8504- Issue #17896: The Windows build scripts now expect external library sources
8505  to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``.
8506
8507- Issue #17717: The Windows build scripts now use a copy of NASM pulled from
8508  svn.python.org to build OpenSSL.
8509
8510- Issue #21907: Improved the batch scripts provided for building Python.
8511
8512- Issue #22644: The bundled version of OpenSSL has been updated to 1.0.1j.
8513
8514- Issue #10747: Use versioned labels in the Windows start menu.
8515  Patch by Olive Kilburn.
8516
8517- Issue #22980: .pyd files with a version and platform tag (for example,
8518  ".cp35-win32.pyd") will now be loaded in preference to those without tags.
8519
8520
8521**(For information about older versions, consult the HISTORY file.)**
8522