1.. bpo: 30682 2.. date: 9989 3.. nonce: zZm88E 4.. release date: 2017-06-17 5.. section: Core and Builtins 6 7Removed a too-strict assertion that failed for certain f-strings, such as 8eval("f'\\\n'") and eval("f'\\\r'"). 9 10.. 11 12.. bpo: 30604 13.. date: 9988 14.. nonce: W47hPY 15.. section: Core and Builtins 16 17Move co_extra_freefuncs to not be per-thread to avoid crashes 18 19.. 20 21.. bpo: 29104 22.. date: 9987 23.. nonce: u26yCx 24.. section: Core and Builtins 25 26Fixed parsing backslashes in f-strings. 27 28.. 29 30.. bpo: 27945 31.. date: 9986 32.. nonce: p29r3O 33.. section: Core and Builtins 34 35Fixed various segfaults with dict when input collections are mutated during 36searching, inserting or comparing. Based on patches by Duane Griffin and 37Tim Mitchell. 38 39.. 40 41.. bpo: 25794 42.. date: 9985 43.. nonce: xfPwqm 44.. section: Core and Builtins 45 46Fixed type.__setattr__() and type.__delattr__() for non-interned attribute 47names. Based on patch by Eryk Sun. 48 49.. 50 51.. bpo: 30039 52.. date: 9984 53.. nonce: e0u4DG 54.. section: Core and Builtins 55 56If a KeyboardInterrupt happens when the interpreter is in the middle of 57resuming a chain of nested 'yield from' or 'await' calls, it's now correctly 58delivered to the innermost frame. 59 60.. 61 62.. bpo: 12414 63.. date: 9983 64.. nonce: T9ix8O 65.. section: Core and Builtins 66 67sys.getsizeof() on a code object now returns the sizes which includes the 68code struct and sizes of objects which it references. Patch by Dong-hee Na. 69 70.. 71 72.. bpo: 29949 73.. date: 9982 74.. nonce: DevGPS 75.. section: Core and Builtins 76 77Fix memory usage regression of set and frozenset object. 78 79.. 80 81.. bpo: 29935 82.. date: 9981 83.. nonce: vgjdJo 84.. section: Core and Builtins 85 86Fixed error messages in the index() method of tuple, list and deque when 87pass indices of wrong type. 88 89.. 90 91.. bpo: 29859 92.. date: 9980 93.. nonce: Z1MLcA 94.. section: Core and Builtins 95 96Show correct error messages when any of the pthread_* calls in 97thread_pthread.h fails. 98 99.. 100 101.. bpo: 28876 102.. date: 9979 103.. nonce: cU-sGT 104.. section: Core and Builtins 105 106``bool(range)`` works even if ``len(range)`` raises :exc:`OverflowError`. 107 108.. 109 110.. bpo: 29600 111.. date: 9978 112.. nonce: 77wQ6C 113.. section: Core and Builtins 114 115Fix wrapping coroutine return values in StopIteration. 116 117.. 118 119.. bpo: 28856 120.. date: 9977 121.. nonce: AFRmo4 122.. section: Core and Builtins 123 124Fix an oversight that %b format for bytes should support objects follow the 125buffer protocol. 126 127.. 128 129.. bpo: 29714 130.. date: 9976 131.. nonce: z-BhVd 132.. section: Core and Builtins 133 134Fix a regression that bytes format may fail when containing zero bytes 135inside. 136 137.. 138 139.. bpo: 29478 140.. date: 9975 141.. nonce: rTQ-qy 142.. section: Core and Builtins 143 144If max_line_length=None is specified while using the Compat32 policy, it is 145no longer ignored. Patch by Mircea Cosbuc. 146 147.. 148 149.. bpo: 30616 150.. date: 9974 151.. nonce: I2mDTz 152.. section: Library 153 154Functional API of enum allows to create empty enums. Patched by Dong-hee Na 155 156.. 157 158.. bpo: 30038 159.. date: 9973 160.. nonce: vb4DWk 161.. section: Library 162 163Fix race condition between signal delivery and wakeup file descriptor. 164Patch by Nathaniel Smith. 165 166.. 167 168.. bpo: 23894 169.. date: 9972 170.. nonce: k2pADV 171.. section: Library 172 173lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings. 174 175.. 176 177.. bpo: 23890 178.. date: 9971 179.. nonce: GCFAAZ 180.. section: Library 181 182unittest.TestCase.assertRaises() now manually breaks a reference cycle to 183not keep objects alive longer than expected. 184 185.. 186 187.. bpo: 30149 188.. date: 9970 189.. nonce: hE649r 190.. section: Library 191 192inspect.signature() now supports callables with variable-argument parameters 193wrapped with partialmethod. Patch by Dong-hee Na. 194 195.. 196 197.. bpo: 30645 198.. date: 9969 199.. nonce: oYzbbW 200.. section: Library 201 202Fix path calculation in imp.load_package(), fixing it for cases when a 203package is only shipped with bytecodes. Patch by Alexandru Ardelean. 204 205.. 206 207.. bpo: 29931 208.. date: 9968 209.. nonce: tfcTwK 210.. section: Library 211 212Fixed comparison check for ipaddress.ip_interface objects. Patch by Sanjay 213Sundaresan. 214 215.. 216 217.. bpo: 30605 218.. date: 9967 219.. nonce: XqGz1r 220.. section: Library 221 222re.compile() no longer raises a BytesWarning when compiling a bytes instance 223with misplaced inline modifier. Patch by Roy Williams. 224 225.. 226 227.. bpo: 29591 228.. date: 9966 229.. nonce: ExKblw 230.. original section: Library 231.. section: Security 232 233Update expat copy from 2.1.1 to 2.2.0 to get fixes of CVE-2016-0718 and 234CVE-2016-4472. See https://sourceforge.net/p/expat/bugs/537/ for more 235information. 236 237.. 238 239.. bpo: 24484 240.. date: 9965 241.. nonce: fNS32j 242.. section: Library 243 244Avoid race condition in multiprocessing cleanup (#2159) 245 246.. 247 248.. bpo: 28994 249.. date: 9964 250.. nonce: 9vzun1 251.. section: Library 252 253The traceback no longer displayed for SystemExit raised in a callback 254registered by atexit. 255 256.. 257 258.. bpo: 30508 259.. date: 9963 260.. nonce: wNWRS2 261.. section: Library 262 263Don't log exceptions if Task/Future "cancel()" method was called. 264 265.. 266 267.. bpo: 28556 268.. date: 9962 269.. nonce: mESP7G 270.. section: Library 271 272Updates to typing module: Add generic AsyncContextManager, add support for 273ContextManager on all versions. Original PRs by Jelle Zijlstra and Ivan 274Levkivskyi 275 276.. 277 278.. bpo: 29870 279.. date: 9961 280.. nonce: p960Ih 281.. section: Library 282 283Fix ssl sockets leaks when connection is aborted in asyncio/ssl 284implementation. Patch by Michaël Sghaïer. 285 286.. 287 288.. bpo: 29743 289.. date: 9960 290.. nonce: en2P4s 291.. section: Library 292 293Closing transport during handshake process leaks open socket. Patch by 294Nikolay Kim 295 296.. 297 298.. bpo: 27585 299.. date: 9959 300.. nonce: 0Ugqqu 301.. section: Library 302 303Fix waiter cancellation in asyncio.Lock. Patch by Mathieu Sornay. 304 305.. 306 307.. bpo: 30418 308.. date: 9958 309.. nonce: EwISQm 310.. section: Library 311 312On Windows, subprocess.Popen.communicate() now also ignore EINVAL on 313stdin.write() if the child process is still running but closed the pipe. 314 315.. 316 317.. bpo: 29822 318.. date: 9957 319.. nonce: G7dX13 320.. section: Library 321 322inspect.isabstract() now works during __init_subclass__. Patch by Nate 323Soares. 324 325.. 326 327.. bpo: 29581 328.. date: 9956 329.. nonce: gHCrxP 330.. section: Library 331 332ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract base classes to 333use keyword parameters in __init_subclass__. Patch by Nate Soares. 334 335.. 336 337.. bpo: 30557 338.. date: 9955 339.. nonce: uykrLf 340.. section: Library 341 342faulthandler now correctly filters and displays exception codes on Windows 343 344.. 345 346.. bpo: 30378 347.. date: 9954 348.. nonce: R_19_5 349.. section: Library 350 351Fix the problem that logging.handlers.SysLogHandler cannot handle IPv6 352addresses. 353 354.. 355 356.. bpo: 29960 357.. date: 9953 358.. nonce: g0wr3r 359.. section: Library 360 361Preserve generator state when _random.Random.setstate() raises an exception. 362Patch by Bryan Olson. 363 364.. 365 366.. bpo: 30414 367.. date: 9952 368.. nonce: jGl1Lb 369.. section: Library 370 371multiprocessing.Queue._feed background running thread do not break from main 372loop on exception. 373 374.. 375 376.. bpo: 30003 377.. date: 9951 378.. nonce: BOl9HE 379.. section: Library 380 381Fix handling escape characters in HZ codec. Based on patch by Ma Lin. 382 383.. 384 385.. bpo: 30301 386.. date: 9950 387.. nonce: ywOkjN 388.. section: Library 389 390Fix AttributeError when using SimpleQueue.empty() under *spawn* and 391*forkserver* start methods. 392 393.. 394 395.. bpo: 30329 396.. date: 9949 397.. nonce: EuT36N 398.. section: Library 399 400imaplib and poplib now catch the Windows socket WSAEINVAL error (code 10022) 401on shutdown(SHUT_RDWR): An invalid operation was attempted. This error 402occurs sometimes on SSL connections. 403 404.. 405 406.. bpo: 30375 407.. date: 9948 408.. nonce: 9c8qM7 409.. section: Library 410 411Warnings emitted when compile a regular expression now always point to the 412line in the user code. Previously they could point into inners of the re 413module if emitted from inside of groups or conditionals. 414 415.. 416 417.. bpo: 30048 418.. date: 9947 419.. nonce: ELRx8R 420.. section: Library 421 422Fixed ``Task.cancel()`` can be ignored when the task is running coroutine 423and the coroutine returned without any more ``await``. 424 425.. 426 427.. bpo: 30266 428.. date: 9946 429.. nonce: YJzHAH 430.. section: Library 431 432contextlib.AbstractContextManager now supports anti-registration by setting 433__enter__ = None or __exit__ = None, following the pattern introduced in 434bpo-25958. Patch by Jelle Zijlstra. 435 436.. 437 438.. bpo: 30298 439.. date: 9945 440.. nonce: ZN-bWo 441.. section: Library 442 443Weaken the condition of deprecation warnings for inline modifiers. Now 444allowed several subsequential inline modifiers at the start of the pattern 445(e.g. ``'(?i)(?s)...'``). In verbose mode whitespaces and comments now are 446allowed before and between inline modifiers (e.g. ``'(?x) (?i) (?s)...'``). 447 448.. 449 450.. bpo: 29990 451.. date: 9944 452.. nonce: HWV6KE 453.. section: Library 454 455Fix range checking in GB18030 decoder. Original patch by Ma Lin. 456 457.. 458 459.. bpo: 26293 460.. date: 9943 461.. nonce: wig0YG 462.. section: Library 463 464Change resulted because of zipfile breakage. (See also: bpo-29094) 465 466.. 467 468.. bpo: 30243 469.. date: 9942 470.. nonce: RHQt0v 471.. section: Library 472 473Removed the __init__ methods of _json's scanner and encoder. Misusing them 474could cause memory leaks or crashes. Now scanner and encoder objects are 475completely initialized in the __new__ methods. 476 477.. 478 479.. bpo: 30185 480.. date: 9941 481.. nonce: Tiu1n8 482.. section: Library 483 484Avoid KeyboardInterrupt tracebacks in forkserver helper process when Ctrl-C 485is received. 486 487.. 488 489.. bpo: 28556 490.. date: 9940 491.. nonce: 51gjbP 492.. section: Library 493 494Various updates to typing module: add typing.NoReturn type, use 495WrapperDescriptorType, minor bug-fixes. Original PRs by Jim 496Fasarakis-Hilliard and Ivan Levkivskyi. 497 498.. 499 500.. bpo: 30205 501.. date: 9939 502.. nonce: BsxO34 503.. section: Library 504 505Fix getsockname() for unbound AF_UNIX sockets on Linux. 506 507.. 508 509.. bpo: 30070 510.. date: 9938 511.. nonce: XM_B41 512.. section: Library 513 514Fixed leaks and crashes in errors handling in the parser module. 515 516.. 517 518.. bpo: 30061 519.. date: 9937 520.. nonce: 2w_dX9 521.. section: Library 522 523Fixed crashes in IOBase methods __next__() and readlines() when readline() 524or __next__() respectively return non-sizeable object. Fixed possible other 525errors caused by not checking results of PyObject_Size(), PySequence_Size(), 526or PyMapping_Size(). 527 528.. 529 530.. bpo: 30017 531.. date: 9936 532.. nonce: cKBuhU 533.. section: Library 534 535Allowed calling the close() method of the zip entry writer object multiple 536times. Writing to a closed writer now always produces a ValueError. 537 538.. 539 540.. bpo: 30068 541.. date: 9935 542.. nonce: n4q47r 543.. section: Library 544 545_io._IOBase.readlines will check if it's closed first when hint is present. 546 547.. 548 549.. bpo: 29694 550.. date: 9934 551.. nonce: LWKxb1 552.. section: Library 553 554Fixed race condition in pathlib mkdir with flags parents=True. Patch by 555Armin Rigo. 556 557.. 558 559.. bpo: 29692 560.. date: 9933 561.. nonce: oyWrAE 562.. section: Library 563 564Fixed arbitrary unchaining of RuntimeError exceptions in 565contextlib.contextmanager. Patch by Siddharth Velankar. 566 567.. 568 569.. bpo: 29998 570.. date: 9932 571.. nonce: poeIKD 572.. section: Library 573 574Pickling and copying ImportError now preserves name and path attributes. 575 576.. 577 578.. bpo: 29953 579.. date: 9931 580.. nonce: Q1hSt- 581.. section: Library 582 583Fixed memory leaks in the replace() method of datetime and time objects when 584pass out of bound fold argument. 585 586.. 587 588.. bpo: 29942 589.. date: 9930 590.. nonce: CsGNuT 591.. section: Library 592 593Fix a crash in itertools.chain.from_iterable when encountering long runs of 594empty iterables. 595 596.. 597 598.. bpo: 27863 599.. date: 9929 600.. nonce: pPYHHI 601.. section: Library 602 603Fixed multiple crashes in ElementTree caused by race conditions and wrong 604types. 605 606.. 607 608.. bpo: 28699 609.. date: 9928 610.. nonce: wZztZP 611.. section: Library 612 613Fixed a bug in pools in multiprocessing.pool that raising an exception at 614the very first of an iterable may swallow the exception or make the program 615hang. Patch by Davin Potts and Xiang Zhang. 616 617.. 618 619.. bpo: 25803 620.. date: 9927 621.. nonce: CPDR0W 622.. section: Library 623 624Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when the OS gives 625priority to errors such as EACCES over EEXIST. 626 627.. 628 629.. bpo: 29861 630.. date: 9926 631.. nonce: t2ZoRK 632.. section: Library 633 634Release references to tasks, their arguments and their results as soon as 635they are finished in multiprocessing.Pool. 636 637.. 638 639.. bpo: 29884 640.. date: 9925 641.. nonce: kWXR8W 642.. section: Library 643 644faulthandler: Restore the old sigaltstack during teardown. Patch by 645Christophe Zeitouny. 646 647.. 648 649.. bpo: 25455 650.. date: 9924 651.. nonce: ZsahHN 652.. section: Library 653 654Fixed crashes in repr of recursive buffered file-like objects. 655 656.. 657 658.. bpo: 29800 659.. date: 9923 660.. nonce: d2xASa 661.. section: Library 662 663Fix crashes in partial.__repr__ if the keys of partial.keywords are not 664strings. Patch by Michael Seifert. 665 666.. 667 668.. bpo: 29742 669.. date: 9922 670.. nonce: 8hqfEO 671.. section: Library 672 673get_extra_info() raises exception if get called on closed ssl transport. 674Patch by Nikolay Kim. 675 676.. 677 678.. bpo: 8256 679.. date: 9921 680.. nonce: jAwGQH 681.. section: Library 682 683Fixed possible failing or crashing input() if attributes "encoding" or 684"errors" of sys.stdin or sys.stdout are not set or are not strings. 685 686.. 687 688.. bpo: 28298 689.. date: 9920 690.. nonce: xfm84U 691.. section: Library 692 693Fix a bug that prevented array 'Q', 'L' and 'I' from accepting big intables 694(objects that have __int__) as elements. Patch by Oren Milman. 695 696.. 697 698.. bpo: 28231 699.. date: 9919 700.. nonce: MG1X09 701.. section: Library 702 703The zipfile module now accepts path-like objects for external paths. 704 705.. 706 707.. bpo: 26915 708.. date: 9918 709.. nonce: qShJZO 710.. section: Library 711 712index() and count() methods of collections.abc.Sequence now check identity 713before checking equality when do comparisons. 714 715.. 716 717.. bpo: 29615 718.. date: 9917 719.. nonce: OpFKzg 720.. section: Library 721 722SimpleXMLRPCDispatcher no longer chains KeyError (or any other exception) to 723exception(s) raised in the dispatched methods. Patch by Petr Motejlek. 724 725.. 726 727.. bpo: 30177 728.. date: 9916 729.. nonce: JGIJNL 730.. section: Library 731 732path.resolve(strict=False) no longer cuts the path after the first element 733not present in the filesystem. Patch by Antoine Pietri. 734 735.. 736 737.. bpo: 15786 738.. date: 9915 739.. nonce: _XRbaR 740.. section: IDLE 741 742Fix several problems with IDLE's autocompletion box. The following should 743now work: clicking on selection box items; using the scrollbar; selecting an 744item by hitting Return. Hangs on MacOSX should no longer happen. Patch by 745Louie Lu. 746 747.. 748 749.. bpo: 25514 750.. date: 9914 751.. nonce: 882pXa 752.. section: IDLE 753 754Add doc subsubsection about IDLE failure to start. Popup no-connection 755message directs users to this section. 756 757.. 758 759.. bpo: 30642 760.. date: 9913 761.. nonce: 3Zujzt 762.. section: IDLE 763 764Fix reference leaks in IDLE tests. Patches by Louie Lu and Terry Jan Reedy. 765 766.. 767 768.. bpo: 30495 769.. date: 9912 770.. nonce: I3i5vL 771.. section: IDLE 772 773Add docstrings for textview.py and use PEP8 names. Patches by Cheryl Sabella 774and Terry Jan Reedy. 775 776.. 777 778.. bpo: 30290 779.. date: 9911 780.. nonce: fZ3kod 781.. section: IDLE 782 783Help-about: use pep8 names and add tests. Increase coverage to 100%. Patches 784by Louie Lu, Cheryl Sabella, and Terry Jan Reedy. 785 786.. 787 788.. bpo: 30303 789.. date: 9910 790.. nonce: 2L2F-4 791.. section: IDLE 792 793Add _utest option to textview; add new tests. Increase coverage to 100%. 794Patches by Louie Lu and Terry Jan Reedy. 795 796.. 797 798.. bpo: 27867 799.. date: 9909 800.. nonce: B46BRE 801.. section: C API 802 803Function PySlice_GetIndicesEx() no longer replaced with a macro if 804Py_LIMITED_API is not set. 805 806.. 807 808.. bpo: 29941 809.. date: 9908 810.. nonce: ylh45A 811.. section: Build 812 813Add ``--with-assertions`` configure flag to explicitly enable C ``assert()`` 814checks. Defaults to off. ``--with-pydebug`` implies ``--with-assertions``. 815 816.. 817 818.. bpo: 28787 819.. date: 9907 820.. nonce: vhH_6a 821.. section: Build 822 823Fix out-of-tree builds of Python when configured with ``--with--dtrace``. 824 825.. 826 827.. bpo: 29243 828.. date: 9906 829.. nonce: WDK4hT 830.. section: Build 831 832Prevent unnecessary rebuilding of Python during ``make test``, ``make 833install`` and some other make targets when configured with 834``--enable-optimizations``. 835 836.. 837 838.. bpo: 23404 839.. date: 9905 840.. nonce: PdYVWg 841.. section: Build 842 843Don't regenerate generated files based on file modification time anymore: 844the action is now explicit. Replace ``make touch`` with ``make regen-all``. 845 846.. 847 848.. bpo: 29643 849.. date: 9904 850.. nonce: 4WLIJQ 851.. section: Build 852 853Fix ``--enable-optimization`` didn't work. 854 855.. 856 857.. bpo: 30176 858.. date: 9903 859.. nonce: VivmCg 860.. section: Documentation 861 862Add missing attribute related constants in curses documentation. 863 864.. 865 866.. bpo: 30052 867.. date: 9902 868.. nonce: TpmpaF 869.. section: Documentation 870 871the link targets for :func:`bytes` and :func:`bytearray` are now their 872respective type definitions, rather than the corresponding builtin function 873entries. Use :ref:`bytes <func-bytes>` and :ref:`bytearray <func-bytearray>` 874to reference the latter. 875 876In order to ensure this and future cross-reference updates are applied 877automatically, the daily documentation builds now disable the default output 878caching features in Sphinx. 879 880.. 881 882.. bpo: 26985 883.. date: 9901 884.. nonce: NB5_9S 885.. section: Documentation 886 887Add missing info of code object in inspect documentation. 888 889.. 890 891.. bpo: 29367 892.. date: 9900 893.. nonce: 4dOKL0 894.. section: Tools/Demos 895 896python-gdb.py now supports also ``method-wrapper`` (``wrapperobject``) 897objects. 898 899.. 900 901.. bpo: 30357 902.. date: 9899 903.. nonce: n4CPEa 904.. section: Tests 905 906test_thread: setUp() now uses support.threading_setup() and 907support.threading_cleanup() to wait until threads complete to avoid random 908side effects on following tests. Initial patch written by Grzegorz Grzywacz. 909 910.. 911 912.. bpo: 30197 913.. date: 9898 914.. nonce: c5wRfu 915.. section: Tests 916 917Enhanced functions swap_attr() and swap_item() in the test.support module. 918They now work when delete replaced attribute or item inside the with 919statement. The old value of the attribute or item (or None if it doesn't 920exist) now will be assigned to the target of the "as" clause, if there is 921one. 922 923.. 924 925.. bpo: 30687 926.. date: 9897 927.. nonce: 8mqHnu 928.. section: Windows 929 930Locate msbuild.exe on Windows when building rather than vcvarsall.bat 931 932.. 933 934.. bpo: 30450 935.. date: 9896 936.. nonce: qsaK8y 937.. section: Windows 938 939The build process on Windows no longer depends on Subversion, instead 940pulling external code from GitHub via a Python script. If Python 3.6 is not 941found on the system (via ``py -3.6``), NuGet is used to download a copy of 94232-bit Python. 943