1.. bpo: 32703 2.. date: 2018-01-29-01-15-17 3.. nonce: mwrF4- 4.. release date: 2018-01-30 5.. section: Core and Builtins 6 7Fix coroutine's ResourceWarning when there's an active error set when it's 8being finalized. 9 10.. 11 12.. bpo: 32650 13.. date: 2018-01-28-23-01-39 14.. nonce: Bbi7ek 15.. section: Core and Builtins 16 17Pdb and other debuggers dependent on bdb.py will correctly step over (next 18command) native coroutines. Patch by Pablo Galindo. 19 20.. 21 22.. bpo: 28685 23.. date: 2018-01-28-15-09-33 24.. nonce: cHThLM 25.. section: Core and Builtins 26 27Optimize list.sort() and sorted() by using type specialized comparisons when 28possible. 29 30.. 31 32.. bpo: 32685 33.. date: 2018-01-28-12-25-06 34.. nonce: nGctze 35.. section: Core and Builtins 36 37Improve suggestion when the Python 2 form of print statement is either 38present on the same line as the header of a compound statement or else 39terminated by a semi-colon instead of a newline. Patch by Nitish Chandra. 40 41.. 42 43.. bpo: 32697 44.. date: 2018-01-28-09-52-12 45.. nonce: RHlu6k 46.. section: Core and Builtins 47 48Python now explicitly preserves the definition order of keyword-only 49parameters. It's always preserved their order, but this behavior was never 50guaranteed before; this behavior is now guaranteed and tested. 51 52.. 53 54.. bpo: 32690 55.. date: 2018-01-28-09-26-07 56.. nonce: 8i9g5P 57.. section: Core and Builtins 58 59The locals() dictionary now displays in the lexical order that variables 60were defined. Previously, the order was reversed. 61 62.. 63 64.. bpo: 32677 65.. date: 2018-01-26-20-11-09 66.. nonce: xTGfCq 67.. section: Core and Builtins 68 69Add ``.isascii()`` method to ``str``, ``bytes`` and ``bytearray``. It can be 70used to test that string contains only ASCII characters. 71 72.. 73 74.. bpo: 32670 75.. date: 2018-01-25-17-03-46 76.. nonce: YsqJUC 77.. section: Core and Builtins 78 79Enforce :pep:`479` for all code. 80 81This means that manually raising a StopIteration exception from a generator 82is prohibited for all code, regardless of whether 'from __future__ import 83generator_stop' was used or not. 84 85.. 86 87.. bpo: 32591 88.. date: 2018-01-20-00-50-33 89.. nonce: 666kl6 90.. section: Core and Builtins 91 92Added built-in support for tracking the origin of coroutine objects; see 93sys.set_coroutine_origin_tracking_depth and CoroutineType.cr_origin. This 94replaces the asyncio debug mode's use of coroutine wrapping for native 95coroutine objects. 96 97.. 98 99.. bpo: 31368 100.. date: 2018-01-19-01-54-22 101.. nonce: kzKqUR 102.. section: Core and Builtins 103 104Expose preadv and pwritev system calls in the os module. Patch by Pablo 105Galindo 106 107.. 108 109.. bpo: 32544 110.. date: 2018-01-16-18-51-58 111.. nonce: ga-cFE 112.. section: Core and Builtins 113 114``hasattr(obj, name)`` and ``getattr(obj, name, default)`` are about 4 times 115faster than before when ``name`` is not found and ``obj`` doesn't override 116``__getattr__`` or ``__getattribute__``. 117 118.. 119 120.. bpo: 26163 121.. date: 2018-01-14-20-32-47 122.. nonce: xv9Iuv 123.. section: Core and Builtins 124 125Improved frozenset() hash to create more distinct hash values when faced 126with datasets containing many similar values. 127 128.. 129 130.. bpo: 32550 131.. date: 2018-01-14-12-42-17 132.. nonce: k0EK-4 133.. section: Core and Builtins 134 135Remove the STORE_ANNOTATION bytecode. 136 137.. 138 139.. bpo: 20104 140.. date: 2018-01-06-01-14-53 141.. nonce: 9DkKb8 142.. section: Core and Builtins 143 144Expose posix_spawn as a low level API in the os module. 145(removed before 3.7.0rc1) 146 147.. 148 149.. bpo: 24340 150.. date: 2018-01-01-21-59-31 151.. nonce: hmKBvg 152.. section: Core and Builtins 153 154Fixed estimation of the code stack size. 155 156.. 157 158.. bpo: 32436 159.. date: 2017-12-28-00-20-42 160.. nonce: H159Jv 161.. section: Core and Builtins 162 163Implement :pep:`567` Context Variables. 164 165.. 166 167.. bpo: 18533 168.. date: 2017-12-13-16-46-23 169.. nonce: Dlk8d7 170.. section: Core and Builtins 171 172``repr()`` on a dict containing its own ``values()`` or ``items()`` no 173longer raises ``RecursionError``; OrderedDict similarly. Instead, use 174``...``, as for other recursive structures. Patch by Ben North. 175 176.. 177 178.. bpo: 20891 179.. date: 2017-12-04-18-34-11 180.. nonce: C2TsfR 181.. section: Core and Builtins 182 183Py_Initialize() now creates the GIL. The GIL is no longer created "on 184demand" to fix a race condition when PyGILState_Ensure() is called in a 185non-Python thread. 186 187.. 188 189.. bpo: 32028 190.. date: 2017-12-03-22-29-13 191.. nonce: KC2w4Q 192.. section: Core and Builtins 193 194Leading whitespace is now correctly ignored when generating suggestions for 195converting Py2 print statements to Py3 builtin print function calls. Patch 196by Sanyam Khurana. 197 198.. 199 200.. bpo: 31179 201.. date: 2017-08-10-17-32-48 202.. nonce: XcgLYI 203.. section: Core and Builtins 204 205Make dict.copy() up to 5.5 times faster. 206 207.. 208 209.. bpo: 31113 210.. date: 2017-08-07-16-46-56 211.. nonce: XgNEFg 212.. section: Core and Builtins 213 214Get rid of recursion in the compiler for normal control flow. 215 216.. 217 218.. bpo: 25988 219.. date: 2018-01-28-23-48-45 220.. nonce: I9uBct 221.. section: Library 222 223Deprecate exposing the contents of collections.abc in the regular 224collections module. 225 226.. 227 228.. bpo: 31429 229.. date: 2018-01-28-22-40-05 230.. nonce: qNt8rQ 231.. section: Library 232 233The default cipher suite selection of the ssl module now uses a blacklist 234approach rather than a hard-coded whitelist. Python no longer re-enables 235ciphers that have been blocked by OpenSSL security update. Default cipher 236suite selection can be configured on compile time. 237 238.. 239 240.. bpo: 30306 241.. date: 2018-01-28-14-10-51 242.. nonce: TmKMXi 243.. section: Library 244 245contextlib.contextmanager now releases the arguments passed to the 246underlying generator as soon as the context manager is entered. Previously 247it would keep them alive for as long as the context manager was alive, even 248when not being used as a function decorator. Patch by Martin Teichmann. 249 250.. 251 252.. bpo: 21417 253.. date: 2018-01-28-07-55-10 254.. nonce: JFnV99 255.. section: Library 256 257Added support for setting the compression level for zipfile.ZipFile. 258 259.. 260 261.. bpo: 32251 262.. date: 2018-01-28-01-21-47 263.. nonce: fOA5qB 264.. section: Library 265 266Implement asyncio.BufferedProtocol (provisional API). 267 268.. 269 270.. bpo: 32513 271.. date: 2018-01-27-11-20-16 272.. nonce: ak-iD2 273.. section: Library 274 275In dataclasses, allow easier overriding of dunder methods without specifying 276decorator parameters. 277 278.. 279 280.. bpo: 32660 281.. date: 2018-01-26-01-26-00 282.. nonce: tVJIWV 283.. section: Library 284 285:mod:`termios` makes available ``FIONREAD``, ``FIONCLEX``, ``FIOCLEX``, 286``FIOASYNC`` and ``FIONBIO`` also under Solaris/derivatives. 287 288.. 289 290.. bpo: 27931 291.. date: 2018-01-25-21-04-11 292.. nonce: e4r52t 293.. section: Library 294 295Fix email address header parsing error when the username is an empty quoted 296string. Patch by Xiang Zhang. 297 298.. 299 300.. bpo: 32659 301.. date: 2018-01-25-03-46-00 302.. nonce: VHYoON 303.. section: Library 304 305Under Solaris and derivatives, :class:`os.stat_result` provides a st_fstype 306attribute. 307 308.. 309 310.. bpo: 32662 311.. date: 2018-01-25-01-45-30 312.. nonce: oabhd8 313.. section: Library 314 315Implement Server.start_serving(), Server.serve_forever(), and 316Server.is_serving() methods. Add 'start_serving' keyword parameter to 317loop.create_server() and loop.create_unix_server(). 318 319.. 320 321.. bpo: 32391 322.. date: 2018-01-24-15-20-12 323.. nonce: 0f8MY9 324.. section: Library 325 326Implement :meth:`asyncio.StreamWriter.wait_closed` and 327:meth:`asyncio.StreamWriter.is_closing` methods 328 329.. 330 331.. bpo: 32643 332.. date: 2018-01-24-00-32-58 333.. nonce: VWipsW 334.. section: Library 335 336Make Task._step, Task._wakeup and Future._schedule_callbacks methods 337private. 338 339.. 340 341.. bpo: 32630 342.. date: 2018-01-23-01-57-36 343.. nonce: 6KRHBs 344.. section: Library 345 346Refactor decimal module to use contextvars to store decimal context. 347 348.. 349 350.. bpo: 32622 351.. date: 2018-01-22-18-18-44 352.. nonce: A1D6FP 353.. section: Library 354 355Add :meth:`asyncio.AbstractEventLoop.sendfile` method. 356 357.. 358 359.. bpo: 32304 360.. date: 2018-01-21-16-33-53 361.. nonce: TItrNv 362.. section: Library 363 364distutils' upload command no longer corrupts tar files ending with a CR 365byte, and no longer tries to convert CR to CRLF in any of the upload text 366fields. 367 368.. 369 370.. bpo: 32502 371.. date: 2018-01-20-17-15-34 372.. nonce: OXJfn7 373.. section: Library 374 375uuid.uuid1 no longer raises an exception if a 64-bit hardware address is 376encountered. 377 378.. 379 380.. bpo: 32596 381.. date: 2018-01-19-19-57-45 382.. nonce: 4aVIie 383.. section: Library 384 385``concurrent.futures`` imports ``ThreadPoolExecutor`` and 386``ProcessPoolExecutor`` lazily (using :pep:`562`). It makes ``import 387asyncio`` about 15% faster because asyncio uses only ``ThreadPoolExecutor`` 388by default. 389 390.. 391 392.. bpo: 31801 393.. date: 2018-01-18-13-47-40 394.. nonce: 3UGH1h 395.. section: Library 396 397Add ``_ignore_`` to ``Enum`` so temporary variables can be used during class 398construction without being turned into members. 399 400.. 401 402.. bpo: 32576 403.. date: 2018-01-17-13-04-16 404.. nonce: iDL09t 405.. section: Library 406 407Use queue.SimpleQueue() in places where it can be invoked from a weakref 408callback. 409 410.. 411 412.. bpo: 32574 413.. date: 2018-01-16-20-37-28 414.. nonce: ru8eZ9 415.. section: Library 416 417Fix memory leak in asyncio.Queue, when the queue has limited size and it is 418full, the cancelation of queue.put() can cause a memory leak. Patch by: José 419Melero. 420 421.. 422 423.. bpo: 32521 424.. date: 2018-01-15-12-53-13 425.. nonce: IxX4Ba 426.. section: Library 427 428The nis module is now compatible with new libnsl and headers location. 429 430.. 431 432.. bpo: 32467 433.. date: 2018-01-11-00-33-42 434.. nonce: YVEOv6 435.. section: Library 436 437collections.abc.ValuesView now inherits from collections.abc.Collection. 438 439.. 440 441.. bpo: 32473 442.. date: 2018-01-10-20-37-59 443.. nonce: mP_yJG 444.. section: Library 445 446Improve ABCMeta._dump_registry() output readability 447 448.. 449 450.. bpo: 32102 451.. date: 2018-01-10-18-04-21 452.. nonce: 9-CZgD 453.. section: Library 454 455New argument ``capture_output`` for subprocess.run 456 457.. 458 459.. bpo: 32521 460.. date: 2018-01-08-18-02-33 461.. nonce: Kh-KoN 462.. section: Library 463 464glibc has removed Sun RPC. Use replacement libtirpc headers and library in 465nis module. 466 467.. 468 469.. bpo: 32493 470.. date: 2018-01-08-15-53-37 471.. nonce: vTXxGN 472.. section: Library 473 474UUID module fixes build for FreeBSD/OpenBSD 475 476.. 477 478.. bpo: 32503 479.. date: 2018-01-07-09-22-26 480.. nonce: ViMxpD 481.. section: Library 482 483Pickling with protocol 4 no longer creates too small frames. 484 485.. 486 487.. bpo: 29237 488.. date: 2018-01-04-14-45-33 489.. nonce: zenYA6 490.. section: Library 491 492Create enum for pstats sorting options 493 494.. 495 496.. bpo: 32454 497.. date: 2017-12-30-10-38-05 498.. nonce: wsZnl- 499.. section: Library 500 501Add close(fd) function to the socket module. 502 503.. 504 505.. bpo: 25942 506.. date: 2017-12-27-20-15-51 507.. nonce: Giyr8v 508.. section: Library 509 510The subprocess module is now more graceful when handling a Ctrl-C 511KeyboardInterrupt during subprocess.call, subprocess.run, or a Popen context 512manager. It now waits a short amount of time for the child (presumed to 513have also gotten the SIGINT) to exit, before continuing the 514KeyboardInterrupt exception handling. This still includes a SIGKILL in the 515call() and run() APIs, but at least the child had a chance first. 516 517.. 518 519.. bpo: 32433 520.. date: 2017-12-27-20-09-27 521.. nonce: vmxsVI 522.. section: Library 523 524The hmac module now has hmac.digest(), which provides an optimized HMAC 525digest. 526 527.. 528 529.. bpo: 28134 530.. date: 2017-12-24-20-01-09 531.. nonce: HJ8Beb 532.. section: Library 533 534Sockets now auto-detect family, type and protocol from file descriptor by 535default. 536 537.. 538 539.. bpo: 32404 540.. date: 2017-12-23-14-54-05 541.. nonce: yJqtlJ 542.. section: Library 543 544Fix bug where :meth:`datetime.datetime.fromtimestamp` did not call __new__ 545in :class:`datetime.datetime` subclasses. 546 547.. 548 549.. bpo: 32403 550.. date: 2017-12-23-14-51-46 551.. nonce: CVFapH 552.. section: Library 553 554Improved speed of :class:`datetime.date` and :class:`datetime.datetime` 555alternate constructors. 556 557.. 558 559.. bpo: 32228 560.. date: 2017-12-22-16-47-41 561.. nonce: waPx3q 562.. section: Library 563 564Ensure that ``truncate()`` preserves the file position (as reported by 565``tell()``) after writes longer than the buffer size. 566 567.. 568 569.. bpo: 32410 570.. date: 2017-12-22-16-05-01 571.. nonce: 8JzhvH 572.. section: Library 573 574Implement ``loop.sock_sendfile`` for asyncio event loop. 575 576.. 577 578.. bpo: 22908 579.. date: 2017-12-21-22-00-11 580.. nonce: cVm89I 581.. section: Library 582 583Added seek and tell to the ZipExtFile class. This only works if the file 584object used to open the zipfile is seekable. 585 586.. 587 588.. bpo: 32373 589.. date: 2017-12-19-09-23-46 590.. nonce: 8qAkoW 591.. section: Library 592 593Add socket.getblocking() method. 594 595.. 596 597.. bpo: 32248 598.. date: 2017-12-15-15-34-12 599.. nonce: zmO8G2 600.. section: Library 601 602Add :mod:`importlib.resources` and :class:`importlib.abc.ResourceReader` as 603the unified API for reading resources contained within packages. Loaders 604wishing to support resource reading must implement the 605:meth:`get_resource_reader()` method. File-based and zipimport-based 606loaders both implement these APIs. :class:`importlib.abc.ResourceLoader` is 607deprecated in favor of these new APIs. 608 609.. 610 611.. bpo: 32320 612.. date: 2017-12-14-01-36-25 613.. nonce: jwOZlr 614.. section: Library 615 616collections.namedtuple() now supports default values. 617 618.. 619 620.. bpo: 29302 621.. date: 2017-12-11-15-14-55 622.. nonce: Nczj9l 623.. section: Library 624 625Add contextlib.AsyncExitStack. Patch by Alexander Mohr and Ilya Kulakov. 626 627.. 628 629.. bpo: 31961 630.. date: 2017-11-08-03-38-20 631.. nonce: x5Sv0R 632.. section: Library 633 634*Removed in Python 3.7.0b2.* 635The *args* argument of subprocess.Popen can now be a :term:`path-like 636object`. If *args* is given as a sequence, it's first element can now be a 637:term:`path-like object` as well. 638 639.. 640 641.. bpo: 31900 642.. date: 2017-10-30-15-55-32 643.. nonce: -S9xc4 644.. section: Library 645 646The :func:`locale.localeconv` function now sets temporarily the ``LC_CTYPE`` 647locale to the ``LC_NUMERIC`` locale to decode ``decimal_point`` and 648``thousands_sep`` byte strings if they are non-ASCII or longer than 1 byte, 649and the ``LC_NUMERIC`` locale is different than the ``LC_CTYPE`` locale. 650This temporary change affects other threads. 651 652Same change for the :meth:`str.format` method when formatting a number 653(:class:`int`, :class:`float`, :class:`float` and subclasses) with the ``n`` 654type (ex: ``'{:n}'.format(1234)``). 655 656.. 657 658.. bpo: 31853 659.. date: 2017-10-23-22-55-51 660.. nonce: h5fjrP 661.. section: Library 662 663Use super().method instead of socket.method in SSLSocket. They were there 664most likely for legacy reasons. 665 666.. 667 668.. bpo: 31399 669.. date: 2017-09-08-14-05-33 670.. nonce: FtBrrt 671.. section: Library 672 673The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and 674X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses. Subject 675common name fallback can be disabled with 676SSLContext.hostname_checks_common_name. 677 678.. 679 680.. bpo: 14976 681.. date: 2017-09-07-19-12-47 682.. nonce: dx0Zxb 683.. section: Library 684 685Add a queue.SimpleQueue class, an unbounded FIFO queue with a reentrant C 686implementation of put(). 687 688.. 689 690.. bpo: 32724 691.. date: 2018-01-30-09-00-19 692.. nonce: qPIaM- 693.. section: Documentation 694 695Add references to some commands in the documentation of Pdb. Patch by 696Stéphane Wirtel 697 698.. 699 700.. bpo: 32649 701.. date: 2018-01-27-23-36-31 702.. nonce: o7qOjF 703.. section: Documentation 704 705Complete the C API documentation, profiling and tracing part with the newly 706added per-opcode events. 707 708.. 709 710.. bpo: 17799 711.. date: 2018-01-22-21-13-46 712.. nonce: rdZ-Vk 713.. section: Documentation 714 715Explain real behaviour of sys.settrace and sys.setprofile and their C-API 716counterparts regarding which type of events are received in each function. 717Patch by Pablo Galindo Salgado. 718 719.. 720 721.. bpo: 32721 722.. date: 2018-01-29-21-30-44 723.. nonce: 2Bebm1 724.. section: Tests 725 726Fix test_hashlib to not fail if the _md5 module is not built. 727 728.. 729 730.. bpo: 28414 731.. date: 2018-01-28-21-19-13 732.. nonce: a6Onzt 733.. section: Tests 734 735Add test cases for IDNA 2003 and 2008 host names. IDNA 2003 736internationalized host names are working since bpo-31399 has landed. IDNA 7372008 are still broken. 738 739.. 740 741.. bpo: 32604 742.. date: 2018-01-26-21-29-09 743.. nonce: 7iazNx 744.. section: Tests 745 746Add a new "_xxsubinterpreters" extension module that exposes the existing 747subinterpreter C-API and a new cross-interpreter data sharing mechanism. The 748module is primarily intended for more thorough testing of the existing 749subinterpreter support. 750 751Note that the _xxsubinterpreters module has been removed in 3.7.0rc1. 752 753.. 754 755.. bpo: 32602 756.. date: 2018-01-19-20-47-11 757.. nonce: dz41pq 758.. section: Tests 759 760Add test certs and test for ECDSA cert and EC/RSA dual mode. 761 762.. 763 764.. bpo: 32549 765.. date: 2018-01-14-11-40-22 766.. nonce: fLwbVA 767.. section: Tests 768 769On Travis CI, Python now Compiles and uses a local copy of OpenSSL 1.1.0g 770for testing. 771 772.. 773 774.. bpo: 32635 775.. date: 2018-01-23-15-33-40 776.. nonce: qHwIZy 777.. section: Build 778 779Fix segfault of the crypt module when libxcrypt is provided instead of 780libcrypt at the system. 781 782.. 783 784.. bpo: 32598 785.. date: 2018-01-19-14-50-19 786.. nonce: hP7bMV 787.. section: Build 788 789Use autoconf to detect OpenSSL libs, headers and supported features. The 790ax_check_openssl M4 macro uses pkg-config to locate OpenSSL and falls back 791to manual search. 792 793.. 794 795.. bpo: 32593 796.. date: 2018-01-18-11-10-52 797.. nonce: XIrf3v 798.. section: Build 799 800Drop support of FreeBSD 9 and older. 801 802.. 803 804.. bpo: 29708 805.. date: 2018-01-16-08-32-49 806.. nonce: YCaHEx 807.. section: Build 808 809If the :envvar:`SOURCE_DATE_EPOCH` environment variable is set, 810:mod:`py_compile` will always create hash-based ``.pyc`` files. 811 812.. 813 814.. bpo: 32588 815.. date: 2018-01-18-14-56-45 816.. nonce: vHww6F 817.. section: Windows 818 819Create standalone _distutils_findvs module and add missing _queue module to 820installer. 821 822.. 823 824.. bpo: 29911 825.. date: 2018-01-07-12-33-21 826.. nonce: ewSJKb 827.. section: Windows 828 829Ensure separate Modify and Uninstall buttons are displayed. 830 831.. 832 833.. bpo: 32507 834.. date: 2018-01-07-12-32-49 835.. nonce: vB4gxk 836.. section: Windows 837 838Use app-local UCRT install rather than the proper update for old versions of 839Windows. 840 841.. 842 843.. bpo: 32726 844.. date: 2018-01-30-07-13-10 845.. nonce: tcARLK 846.. section: macOS 847 848Provide an additional, more modern macOS installer variant that supports 849macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied third-party 850libraries to OpenSSL 1.1.0g and to SQLite 3.22.0. The 10.9+ installer now 851links with and supplies its own copy of Tcl/Tk 8.6. 852 853.. 854 855.. bpo: 28440 856.. date: 2018-01-30-04-40-12 857.. nonce: W_BUWU 858.. section: macOS 859 860No longer add /Library/Python/3.x/site-packages to sys.path for macOS 861framework builds to avoid future conflicts. 862 863.. 864 865.. bpo: 32681 866.. date: 2018-01-26-17-29-29 867.. nonce: N1ruWa 868.. section: C API 869 870Fix uninitialized variable 'res' in the C implementation of os.dup2. Patch 871by Stéphane Wirtel 872 873.. 874 875.. bpo: 10381 876.. date: 2017-12-28-15-22-05 877.. nonce: a1E6aF 878.. section: C API 879 880Add C API access to the ``datetime.timezone`` constructor and 881``datetime.timzone.UTC`` singleton. 882