1.. bpo: 35907 2.. date: 2019-05-21-23-20-18 3.. nonce: NC_zNK 4.. release date: 2019-06-04 5.. section: Security 6 7CVE-2019-9948: Avoid file reading by disallowing ``local-file://`` and 8``local_file://`` URL schemes in ``URLopener().open()`` and 9``URLopener().retrieve()`` of :mod:`urllib.request`. 10 11.. 12 13.. bpo: 33529 14.. date: 2019-02-24-18-48-16 15.. nonce: wpNNBD 16.. section: Security 17 18Prevent fold function used in email header encoding from entering infinite 19loop when there are too many non-ASCII characters in a header. 20 21.. 22 23.. bpo: 33164 24.. date: 2018-03-30-12-26-47 25.. nonce: aO29Cx 26.. section: Security 27 28Updated blake2 implementation which uses secure memset implementation 29provided by platform. 30 31.. 32 33.. bpo: 35814 34.. date: 2019-06-03-00-51-02 35.. nonce: Cf7sGY 36.. section: Core and Builtins 37 38Allow unpacking in the right hand side of annotated assignments. In 39particular, ``t: Tuple[int, ...] = x, y, *z`` is now allowed. 40 41.. 42 43.. bpo: 37126 44.. date: 2019-06-01-20-03-13 45.. nonce: tP6lL4 46.. section: Core and Builtins 47 48All structseq objects are now tracked by the garbage collector. Patch by 49Pablo Galindo. 50 51.. 52 53.. bpo: 37122 54.. date: 2019-06-01-16-53-41 55.. nonce: dZ3-NY 56.. section: Core and Builtins 57 58Make the *co_argcount* attribute of code objects represent the total number 59of positional arguments (including positional-only arguments). The value of 60*co_posonlyargcount* can be used to distinguish which arguments are 61positional only, and the difference (*co_argcount* - *co_posonlyargcount*) 62is the number of positional-or-keyword arguments. Patch by Pablo Galindo. 63 64.. 65 66.. bpo: 20092 67.. date: 2019-05-31-11-55-49 68.. nonce: KIMjBW 69.. section: Core and Builtins 70 71Constructors of :class:`int`, :class:`float` and :class:`complex` will now 72use the :meth:`~object.__index__` special method, if available and the 73corresponding method :meth:`~object.__int__`, :meth:`~object.__float__` or 74:meth:`~object.__complex__` is not available. 75 76.. 77 78.. bpo: 37087 79.. date: 2019-05-30-17-33-55 80.. nonce: vElenE 81.. section: Core and Builtins 82 83Add native thread ID (TID) support to OpenBSD. 84 85.. 86 87.. bpo: 26219 88.. date: 2019-05-29-22-03-09 89.. nonce: Ovf1Qs 90.. section: Core and Builtins 91 92Implemented per opcode cache mechanism and ``LOAD_GLOBAL`` instruction use 93it. ``LOAD_GLOBAL`` is now about 40% faster. Contributed by Yury Selivanov, 94and Inada Naoki. 95 96.. 97 98.. bpo: 37072 99.. date: 2019-05-28-18-18-55 100.. nonce: 1Hewl3 101.. section: Core and Builtins 102 103Fix crash in PyAST_FromNodeObject() when flags is NULL. 104 105.. 106 107.. bpo: 37029 108.. date: 2019-05-28-17-02-46 109.. nonce: MxpgfJ 110.. section: Core and Builtins 111 112Freeing a great many small objects could take time quadratic in the number 113of arenas, due to using linear search to keep ``obmalloc.c``'s list of 114usable arenas sorted by order of number of free memory pools. This is 115accomplished without search now, leaving the worst-case time linear in the 116number of arenas. For programs where this quite visibly matters (typically 117with more than 100 thousand small objects alive simultaneously), this can 118greatly reduce the time needed to release their memory. 119 120.. 121 122.. bpo: 26423 123.. date: 2019-05-27-18-00-19 124.. nonce: RgUOE8 125.. section: Core and Builtins 126 127Fix possible overflow in ``wrap_lenfunc()`` when ``sizeof(long) < 128sizeof(Py_ssize_t)`` (e.g., 64-bit Windows). 129 130.. 131 132.. bpo: 37050 133.. date: 2019-05-27-14-46-24 134.. nonce: 7MyZGg 135.. section: Core and Builtins 136 137Improve the AST for "debug" f-strings, which use '=' to print out the source 138of the expression being evaluated. Delete expr_text from the FormattedValue 139node, and instead use a Constant string node (possibly merged with adjacent 140constant expressions inside the f-string). 141 142.. 143 144.. bpo: 22385 145.. date: 2019-05-25-17-18-26 146.. nonce: VeVvhJ 147.. section: Core and Builtins 148 149The `bytes.hex`, `bytearray.hex`, and `memoryview.hex` methods as well as 150the `binascii.hexlify` and `b2a_hex` functions now have the ability to 151include an optional separator between hex bytes. This functionality was 152inspired by MicroPython's hexlify implementation. 153 154.. 155 156.. bpo: 26836 157.. date: 2019-05-25-08-18-01 158.. nonce: rplYWW 159.. section: Core and Builtins 160 161Add :func:`os.memfd_create`. 162 163.. 164 165.. bpo: 37032 166.. date: 2019-05-24-12-38-40 167.. nonce: T8rSH8 168.. section: Core and Builtins 169 170Added new ``replace()`` method to the code type (:class:`types.CodeType`). 171 172.. 173 174.. bpo: 37007 175.. date: 2019-05-23-04-19-13 176.. nonce: d1SOtF 177.. section: Core and Builtins 178 179Implement :func:`socket.if_nameindex()`, :func:`socket.if_nametoindex()`, 180and :func:`socket.if_indextoname()` on Windows. 181 182.. 183 184.. bpo: 36829 185.. date: 2019-05-22-23-01-29 186.. nonce: MfOcUg 187.. section: Core and Builtins 188 189:c:func:`PyErr_WriteUnraisable` now creates a traceback object if there is 190no current traceback. Moreover, call :c:func:`PyErr_NormalizeException` and 191:c:func:`PyException_SetTraceback` to normalize the exception value. Ignore 192any error. 193 194.. 195 196.. bpo: 36878 197.. date: 2019-05-22-11-16-16 198.. nonce: QwLa3P 199.. section: Core and Builtins 200 201Only accept text after `# type: ignore` if the first character is ASCII. 202This is to disallow things like `# type: ignoreé`. 203 204.. 205 206.. bpo: 36878 207.. date: 2019-05-21-16-21-22 208.. nonce: EFRHZ3 209.. section: Core and Builtins 210 211Store text appearing after a `# type: ignore` comment in the AST. For 212example a type ignore like `# type: ignore[E1000]` will have the string 213`"[E1000]"` stored in its AST node. 214 215.. 216 217.. bpo: 2180 218.. date: 2019-05-17-18-34-30 219.. nonce: aBqHeW 220.. section: Core and Builtins 221 222Treat line continuation at EOF as a ``SyntaxError`` by Anthony Sottile. 223 224.. 225 226.. bpo: 36907 227.. date: 2019-05-17-12-28-24 228.. nonce: rk7kgp 229.. section: Core and Builtins 230 231Fix a crash when calling a C function with a keyword dict (``f(**kwargs)``) 232and changing the dict ``kwargs`` while that function is running. 233 234.. 235 236.. bpo: 36946 237.. date: 2019-05-16-23-53-45 238.. nonce: qjxr0Y 239.. section: Core and Builtins 240 241Fix possible signed integer overflow when handling slices. 242 243.. 244 245.. bpo: 36826 246.. date: 2019-05-15-14-01-09 247.. nonce: GLrO3W 248.. section: Core and Builtins 249 250Add NamedExpression kind support to ast_unparse.c 251 252.. 253 254.. bpo: 1875 255.. date: 2019-05-15-01-29-29 256.. nonce: 9oxXFX 257.. section: Core and Builtins 258 259A :exc:`SyntaxError` is now raised if a code blocks that will be optimized 260away (e.g. if conditions that are always false) contains syntax errors. 261Patch by Pablo Galindo. 262 263.. 264 265.. bpo: 36027 266.. date: 2019-05-12-18-46-50 267.. nonce: Q4YatQ 268.. section: Core and Builtins 269 270Allow computation of modular inverses via three-argument ``pow``: the second 271argument is now permitted to be negative in the case where the first and 272third arguments are relatively prime. 273 274.. 275 276.. bpo: 36861 277.. date: 2019-05-08-20-42-40 278.. nonce: 72mvZM 279.. section: Core and Builtins 280 281Update the Unicode database to version 12.1.0. 282 283.. 284 285.. bpo: 28866 286.. date: 2019-05-08-16-36-51 287.. nonce: qCv_bj 288.. section: Core and Builtins 289 290Avoid caching attributes of classes which type defines mro() to avoid a hard 291cache invalidation problem. 292 293.. 294 295.. bpo: 36851 296.. date: 2019-05-08-11-42-06 297.. nonce: J7DiCW 298.. section: Core and Builtins 299 300The ``FrameType`` stack is now correctly cleaned up if the execution ends 301with a return and the stack is not empty. 302 303.. 304 305.. bpo: 34616 306.. date: 2019-05-07-17-12-37 307.. nonce: 0Y0_9r 308.. section: Core and Builtins 309 310The ``compile()`` builtin functions now support the 311``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag, which allow to compile sources 312that contains top-level ``await``, ``async with`` or ``async for``. This is 313useful to evaluate async-code from with an already async functions; for 314example in a custom REPL. 315 316.. 317 318.. bpo: 36842 319.. date: 2019-05-07-16-50-12 320.. nonce: NYww_N 321.. section: Core and Builtins 322 323Implement PEP 578, adding sys.audit, io.open_code and related APIs. 324 325.. 326 327.. bpo: 27639 328.. date: 2019-05-07-15-49-17 329.. nonce: b1Ah87 330.. section: Core and Builtins 331 332Correct return type for UserList slicing operations. Patch by Michael 333Blahay, Erick Cervantes, and vaultah 334 335.. 336 337.. bpo: 36737 338.. date: 2019-05-07-12-18-11 339.. nonce: XAo6LY 340.. section: Core and Builtins 341 342Move PyRuntimeState.warnings into per-interpreter state (via "module 343state"). 344 345.. 346 347.. bpo: 36793 348.. date: 2019-05-04-16-15-33 349.. nonce: Izog4Z 350.. section: Core and Builtins 351 352Removed ``__str__`` implementations from builtin types :class:`bool`, 353:class:`int`, :class:`float`, :class:`complex` and few classes from the 354standard library. They now inherit ``__str__()`` from :class:`object`. 355 356.. 357 358.. bpo: 36817 359.. date: 2019-05-02-11-48-08 360.. nonce: ZqbJ1J 361.. section: Core and Builtins 362 363Add a ``=`` feature f-strings for debugging. This can precede ``!s``, 364``!r``, or ``!a``. It produces the text of the expression, followed by an 365equal sign, followed by the repr of the value of the expression. So 366``f'{3*9+15=}'`` would be equal to the string ``'3*9+15=42'``. If ``=`` is 367specified, the default conversion is set to ``!r``, unless a format spec is 368given, in which case the formatting behavior is unchanged, and __format__ 369will be used. 370 371.. 372 373.. bpo: 24048 374.. date: 2019-04-29-03-27-22 375.. nonce: vXxUDQ 376.. section: Core and Builtins 377 378Save the live exception during import.c's ``remove_module()``. 379 380.. 381 382.. bpo: 27987 383.. date: 2019-04-16-11-52-21 384.. nonce: n2_DcQ 385.. section: Core and Builtins 386 387pymalloc returns memory blocks aligned by 16 bytes, instead of 8 bytes, on 38864-bit platforms to conform x86-64 ABI. Recent compilers assume this 389alignment more often. Patch by Inada Naoki. 390 391.. 392 393.. bpo: 36601 394.. date: 2019-04-13-16-14-16 395.. nonce: mIgS7t 396.. section: Core and Builtins 397 398A long-since-meaningless check for ``getpid() == main_pid`` was removed from 399Python's internal C signal handler. 400 401.. 402 403.. bpo: 36594 404.. date: 2019-04-10-18-12-11 405.. nonce: fbnJAc 406.. section: Core and Builtins 407 408Fix incorrect use of ``%p`` in format strings. Patch by Zackery Spytz. 409 410.. 411 412.. bpo: 36045 413.. date: 2019-02-24-12-44-46 414.. nonce: RO20OV 415.. section: Core and Builtins 416 417builtins.help() now prefixes `async` for async functions 418 419.. 420 421.. bpo: 36084 422.. date: 2019-02-22-23-03-20 423.. nonce: 86Eh4X 424.. section: Core and Builtins 425 426Add native thread ID (TID) to threading.Thread objects (supported platforms: 427Windows, FreeBSD, Linux, macOS) 428 429.. 430 431.. bpo: 36035 432.. date: 2019-02-22-14-30-19 433.. nonce: -6dy1y 434.. section: Core and Builtins 435 436Added fix for broken symlinks in combination with pathlib 437 438.. 439 440.. bpo: 35983 441.. date: 2019-02-13-16-47-19 442.. nonce: bNxsXv 443.. section: Core and Builtins 444 445Added new trashcan macros to deal with a double deallocation that could 446occur when the `tp_dealloc` of a subclass calls the `tp_dealloc` of a base 447class and that base class uses the trashcan mechanism. Patch by Jeroen 448Demeyer. 449 450.. 451 452.. bpo: 20602 453.. date: 2018-07-04-16-57-59 454.. nonce: sDLElw 455.. section: Core and Builtins 456 457Do not clear :data:`sys.flags` and :data:`sys.float_info` during shutdown. 458Patch by Zackery Spytz. 459 460.. 461 462.. bpo: 26826 463.. date: 2018-05-30-23-43-03 464.. nonce: NkRzjb 465.. section: Core and Builtins 466 467Expose :func:`copy_file_range` as a low level API in the :mod:`os` module. 468 469.. 470 471.. bpo: 32388 472.. date: 2017-12-21-20-37-40 473.. nonce: 6w-i5t 474.. section: Core and Builtins 475 476Remove cross-version binary compatibility requirement in tp_flags. 477 478.. 479 480.. bpo: 31862 481.. date: 2017-10-24-17-26-58 482.. nonce: 5Gea8L 483.. section: Core and Builtins 484 485Port binascii to PEP 489 multiphase initialization. Patch by Marcel Plch. 486 487.. 488 489.. bpo: 37128 490.. date: 2019-06-01-22-54-03 491.. nonce: oGXBWN 492.. section: Library 493 494Added :func:`math.perm`. 495 496.. 497 498.. bpo: 37120 499.. date: 2019-06-01-09-03-32 500.. nonce: FOKQLU 501.. section: Library 502 503Add SSLContext.num_tickets to control the number of TLSv1.3 session tickets. 504 505.. 506 507.. bpo: 12202 508.. date: 2019-05-31-15-53-34 509.. nonce: nobzc9 510.. section: Library 511 512Fix the error handling in :meth:`msilib.SummaryInformation.GetProperty`. 513Patch by Zackery Spytz. 514 515.. 516 517.. bpo: 26835 518.. date: 2019-05-31-11-33-11 519.. nonce: xGbUX0 520.. section: Library 521 522The fcntl module now contains file sealing constants for sealing of memfds. 523 524.. 525 526.. bpo: 29262 527.. date: 2019-05-30-21-25-14 528.. nonce: LdIzun 529.. section: Library 530 531Add ``get_origin()`` and ``get_args()`` introspection helpers to ``typing`` 532module. 533 534.. 535 536.. bpo: 12639 537.. date: 2019-05-30-16-16-47 538.. nonce: TQFOR4 539.. section: Library 540 541:meth:`msilib.Directory.start_component()` no longer fails if *keyfile* is 542not ``None``. 543 544.. 545 546.. bpo: 36999 547.. date: 2019-05-30-13-30-46 548.. nonce: EjY_L2 549.. section: Library 550 551Add the ``asyncio.Task.get_coro()`` method to publicly expose the tasks's 552coroutine object. 553 554.. 555 556.. bpo: 35246 557.. date: 2019-05-28-23-17-35 558.. nonce: oXT21d 559.. section: Library 560 561Make :func:`asyncio.create_subprocess_exec` accept path-like arguments. 562 563.. 564 565.. bpo: 35279 566.. date: 2019-05-28-19-14-29 567.. nonce: PX7yl9 568.. section: Library 569 570Change default *max_workers* of ``ThreadPoolExecutor`` from ``cpu_count() * 5715`` to ``min(32, cpu_count() + 4)``. Previous value was unreasonably large 572on many cores machines. 573 574.. 575 576.. bpo: 37076 577.. date: 2019-05-28-12-17-10 578.. nonce: Bk2xOs 579.. section: Library 580 581:func:`_thread.start_new_thread` now logs uncaught exception raised by the 582function using :func:`sys.unraisablehook`, rather than 583:func:`sys.excepthook`, so the hook gets access to the function which raised 584the exception. 585 586.. 587 588.. bpo: 33725 589.. date: 2019-05-28-01-17-42 590.. nonce: fFZoDG 591.. section: Library 592 593On macOS, the :mod:`multiprocessing` module now uses *spawn* start method by 594default. 595 596.. 597 598.. bpo: 37054 599.. date: 2019-05-28-01-06-44 600.. nonce: sLULGQ 601.. section: Library 602 603Fix destructor :class:`_pyio.BytesIO` and :class:`_pyio.TextIOWrapper`: 604initialize their ``_buffer`` attribute as soon as possible (in the class 605body), because it's used by ``__del__()`` which calls ``close()``. 606 607.. 608 609.. bpo: 37058 610.. date: 2019-05-26-19-05-24 611.. nonce: jmRu_g 612.. section: Library 613 614PEP 544: Add ``Protocol`` and ``@runtime_checkable`` to the ``typing`` 615module. 616 617.. 618 619.. bpo: 36933 620.. date: 2019-05-26-10-16-55 621.. nonce: 4w3eP9 622.. section: Library 623 624The functions ``sys.set_coroutine_wrapper`` and 625``sys.get_coroutine_wrapper`` that were deprecated and marked for removal in 6263.8 have been removed. 627 628.. 629 630.. bpo: 37047 631.. date: 2019-05-26-01-20-06 632.. nonce: K9epi8 633.. section: Library 634 635Handle late binding and attribute access in :class:`unittest.mock.AsyncMock` 636setup for autospeccing. Document newly implemented async methods in 637:class:`unittest.mock.MagicMock`. 638 639.. 640 641.. bpo: 37049 642.. date: 2019-05-25-19-48-42 643.. nonce: an2LXJ 644.. section: Library 645 646PEP 589: Add ``TypedDict`` to the ``typing`` module. 647 648.. 649 650.. bpo: 37046 651.. date: 2019-05-25-19-12-53 652.. nonce: iuhQQj 653.. section: Library 654 655PEP 586: Add ``Literal`` to the ``typing`` module. 656 657.. 658 659.. bpo: 37045 660.. date: 2019-05-25-18-36-50 661.. nonce: suHdVJ 662.. section: Library 663 664PEP 591: Add ``Final`` qualifier and ``@final`` decorator to the ``typing`` 665module. 666 667.. 668 669.. bpo: 37035 670.. date: 2019-05-24-18-16-07 671.. nonce: HFbJVT 672.. section: Library 673 674Don't log OSError based exceptions if a fatal error has occurred in asyncio 675transport. Peer can generate almost any OSError, user cannot avoid these 676exceptions by fixing own code. Errors are still propagated to user code, 677it's just logging them is pointless and pollute asyncio logs. 678 679.. 680 681.. bpo: 37001 682.. date: 2019-05-23-21-10-57 683.. nonce: DoLvTK 684.. section: Library 685 686:func:`symtable.symtable` now accepts the same input types for source code 687as the built-in :func:`compile` function. Patch by Dino Viehland. 688 689.. 690 691.. bpo: 37028 692.. date: 2019-05-23-18-57-34 693.. nonce: Vse6Pj 694.. section: Library 695 696Implement asyncio REPL 697 698.. 699 700.. bpo: 37027 701.. date: 2019-05-23-18-46-56 702.. nonce: iH4eut 703.. section: Library 704 705Return safe to use proxy socket object from 706transport.get_extra_info('socket') 707 708.. 709 710.. bpo: 32528 711.. date: 2019-05-23-17-37-22 712.. nonce: sGnkcl 713.. section: Library 714 715Make asyncio.CancelledError a BaseException. 716 717This will address the common mistake many asyncio users make: an "except 718Exception" clause breaking Tasks cancellation. 719 720In addition to this change, we stop inheriting asyncio.TimeoutError and 721asyncio.InvalidStateError from their concurrent.futures.* counterparts. 722There's no point for these exceptions to share the inheritance chain. 723 724.. 725 726.. bpo: 1230540 727.. date: 2019-05-23-01-48-39 728.. nonce: oKTNEQ 729.. section: Library 730 731Add a new :func:`threading.excepthook` function which handles uncaught 732:meth:`threading.Thread.run` exception. It can be overridden to control how 733uncaught :meth:`threading.Thread.run` exceptions are handled. 734 735.. 736 737.. bpo: 36996 738.. date: 2019-05-22-22-55-18 739.. nonce: XQx08d 740.. section: Library 741 742Handle :func:`unittest.mock.patch` used as a decorator on async functions. 743 744.. 745 746.. bpo: 37008 747.. date: 2019-05-22-15-26-08 748.. nonce: WPbv31 749.. section: Library 750 751Add support for calling :func:`next` with the mock resulting from 752:func:`unittest.mock.mock_open` 753 754.. 755 756.. bpo: 27737 757.. date: 2019-05-22-02-25-31 758.. nonce: 7bgKpa 759.. section: Library 760 761Allow whitespace only header encoding in ``email.header`` - by Batuhan 762Taskaya 763 764.. 765 766.. bpo: 36969 767.. date: 2019-05-21-12-31-21 768.. nonce: u7cxu7 769.. section: Library 770 771PDB command `args` now display positional only arguments. Patch contributed 772by Rémi Lapeyre. 773 774.. 775 776.. bpo: 36969 777.. date: 2019-05-20-23-31-20 778.. nonce: JkZORP 779.. section: Library 780 781PDB command `args` now display keyword only arguments. Patch contributed by 782Rémi Lapeyre. 783 784.. 785 786.. bpo: 36983 787.. date: 2019-05-20-20-41-30 788.. nonce: hz-fLr 789.. section: Library 790 791Add missing names to ``typing.__all__``: ``ChainMap``, ``ForwardRef``, 792``OrderedDict`` - by Anthony Sottile. 793 794.. 795 796.. bpo: 36972 797.. date: 2019-05-20-17-08-26 798.. nonce: 3l3SGc 799.. section: Library 800 801Add SupportsIndex protocol to the typing module to allow type checking to 802detect classes that can be passed to `hex()`, `oct()` and `bin()`. 803 804.. 805 806.. bpo: 32972 807.. date: 2019-05-20-14-47-55 808.. nonce: LoeUNh 809.. section: Library 810 811Implement ``unittest.IsolatedAsyncioTestCase`` to help testing asyncio-based code. 812 813.. 814 815.. bpo: 36952 816.. date: 2019-05-20-11-01-28 817.. nonce: MgZi7- 818.. section: Library 819 820:func:`fileinput.input` and :class:`fileinput.FileInput` **bufsize** 821argument has been removed (was deprecated and ignored since Python 3.6), and 822as a result the **mode** and **openhook** arguments have been made 823keyword-only. 824 825.. 826 827.. bpo: 36952 828.. date: 2019-05-20-08-54-41 829.. nonce: I_glok 830.. section: Library 831 832Starting with Python 3.3, importing ABCs from :mod:`collections` is 833deprecated, and import should be done from :mod:`collections.abc`. Still 834being able to import from :mod:`collections` was marked for removal in 3.8, 835but has been delayed to 3.9; documentation and ``DeprecationWarning`` 836clarified. 837 838.. 839 840.. bpo: 36949 841.. date: 2019-05-19-06-54-26 842.. nonce: jBlG9F 843.. section: Library 844 845Implement __repr__ for WeakSet objects. 846 847.. 848 849.. bpo: 36948 850.. date: 2019-05-17-21-42-58 851.. nonce: vnUDvk 852.. section: Library 853 854Fix :exc:`NameError` in :meth:`urllib.request.URLopener.retrieve`. Patch by 855Karthikeyan Singaravelan. 856 857.. 858 859.. bpo: 33524 860.. date: 2019-05-17-11-44-21 861.. nonce: 8y_xUU 862.. section: Library 863 864Fix the folding of email header when the max_line_length is 0 or None and 865the header contains non-ascii characters. Contributed by Licht Takeuchi 866(@Licht-T). 867 868.. 869 870.. bpo: 24564 871.. date: 2019-05-16-23-40-36 872.. nonce: lIwV_7 873.. section: Library 874 875:func:`shutil.copystat` now ignores :const:`errno.EINVAL` on 876:func:`os.setxattr` which may occur when copying files on filesystems 877without extended attributes support. 878 879Original patch by Giampaolo Rodola, updated by Ying Wang. 880 881.. 882 883.. bpo: 36888 884.. date: 2019-05-16-18-02-08 885.. nonce: -H2Dkm 886.. section: Library 887 888Python child processes can now access the status of their parent process 889using multiprocessing.process.parent_process 890 891.. 892 893.. bpo: 36921 894.. date: 2019-05-15-21-35-23 895.. nonce: kA1306 896.. section: Library 897 898Deprecate ``@coroutine`` for sake of ``async def``. 899 900.. 901 902.. bpo: 25652 903.. date: 2019-05-14-21-39-52 904.. nonce: xLw42k 905.. section: Library 906 907Fix bug in ``__rmod__`` of ``UserString`` - by Batuhan Taskaya. 908 909.. 910 911.. bpo: 36916 912.. date: 2019-05-14-15-39-34 913.. nonce: _GPsTt 914.. section: Library 915 916Remove a message about an unhandled exception in a task when writer.write() 917is used without await and writer.drain() fails with an exception. 918 919.. 920 921.. bpo: 36889 922.. date: 2019-05-14-12-25-44 923.. nonce: MChPqP 924.. section: Library 925 926Introduce :class:`asyncio.Stream` class that merges 927:class:`asyncio.StreamReader` and :class:`asyncio.StreamWriter` 928functionality. :class:`asyncio.Stream` can work in readonly, writeonly and 929readwrite modes. Provide :func:`asyncio.connect`, 930:func:`asyncio.connect_unix`, :func:`asyncio.connect_read_pipe` and 931:func:`asyncio.connect_write_pipe` factories to open :class:`asyncio.Stream` 932connections. Provide :class:`asyncio.StreamServer` and 933:class:`UnixStreamServer` to serve servers with asyncio.Stream API. Modify 934:func:`asyncio.create_subprocess_shell` and 935:func:`asyncio.create_subprocess_exec` to use :class:`asyncio.Stream` 936instead of deprecated :class:`StreamReader` and :class:`StreamWriter`. 937Deprecate :class:`asyncio.StreamReader` and :class:`asyncio.StreamWriter`. 938Deprecate usage of private classes, e.g. :class:`asyncio.FlowControlMixing` 939and :class:`asyncio.StreamReaderProtocol` outside of asyncio package. 940 941.. 942 943.. bpo: 36845 944.. date: 2019-05-14-07-57-02 945.. nonce: _GtFFf 946.. section: Library 947 948Added validation of integer prefixes to the construction of IP networks and 949interfaces in the ipaddress module. 950 951.. 952 953.. bpo: 23378 954.. date: 2019-05-14-05-38-22 955.. nonce: R25teI 956.. section: Library 957 958Add an extend action to argparser. 959 960.. 961 962.. bpo: 36867 963.. date: 2019-05-13-13-02-43 964.. nonce: Qh-6mX 965.. section: Library 966 967Fix a bug making a SharedMemoryManager instance and its parent process use 968two separate resource_tracker processes. 969 970.. 971 972.. bpo: 23896 973.. date: 2019-05-13-05-49-15 974.. nonce: 8TtUKo 975.. section: Library 976 977Adds a grammar to lib2to3.pygram that contains exec as a function not as 978statement. 979 980.. 981 982.. bpo: 36895 983.. date: 2019-05-12-14-49-13 984.. nonce: ZZuuY7 985.. section: Library 986 987The function ``time.clock()`` was deprecated in 3.3 in favor of 988``time.perf_counter()`` and marked for removal in 3.8, it has removed. 989 990.. 991 992.. bpo: 35545 993.. date: 2019-05-11-16-21-29 994.. nonce: FcvJvP 995.. section: Library 996 997Fix asyncio discarding IPv6 scopes when ensuring hostname resolutions 998internally 999 1000.. 1001 1002.. bpo: 36887 1003.. date: 2019-05-11-14-50-59 1004.. nonce: XD3f22 1005.. section: Library 1006 1007Add new function :func:`math.isqrt` to compute integer square roots. 1008 1009.. 1010 1011.. bpo: 34632 1012.. date: 2019-05-11-02-30-45 1013.. nonce: 8MXa7T 1014.. section: Library 1015 1016Introduce the ``importlib.metadata`` module with (provisional) support for 1017reading metadata from third-party packages. 1018 1019.. 1020 1021.. bpo: 36878 1022.. date: 2019-05-10-22-00-06 1023.. nonce: iigeqk 1024.. section: Library 1025 1026When using `type_comments=True` in `ast.parse`, treat `# type: ignore` 1027followed by a non-alphanumeric character and then arbitrary text as a type 1028ignore, instead of requiring nothing but whitespace or another comment. This 1029is to permit formations such as `# type: ignore[E1000]`. 1030 1031.. 1032 1033.. bpo: 36778 1034.. date: 2019-05-10-01-06-36 1035.. nonce: GRqeiS 1036.. section: Library 1037 1038``cp65001`` encoding (Windows code page 65001) becomes an alias to ``utf_8`` 1039encoding. 1040 1041.. 1042 1043.. bpo: 36867 1044.. date: 2019-05-09-18-12-55 1045.. nonce: FuwVTi 1046.. section: Library 1047 1048The multiprocessing.resource_tracker replaces the 1049multiprocessing.semaphore_tracker module. Other than semaphores, 1050resource_tracker also tracks shared_memory segments. 1051 1052.. 1053 1054.. bpo: 30262 1055.. date: 2019-05-09-12-38-40 1056.. nonce: Tu74ak 1057.. section: Library 1058 1059The ``Cache`` and ``Statement`` objects of the :mod:`sqlite3` module are not 1060exposed to the user. Patch by Aviv Palivoda. 1061 1062.. 1063 1064.. bpo: 24538 1065.. date: 2019-05-09-08-35-18 1066.. nonce: WK8Y-k 1067.. section: Library 1068 1069In `shutil.copystat()`, first copy extended file attributes and then file 1070permissions, since extended attributes can only be set on the destination 1071while it is still writeable. 1072 1073.. 1074 1075.. bpo: 36829 1076.. date: 2019-05-08-12-51-37 1077.. nonce: 8enFMA 1078.. section: Library 1079 1080Add new :func:`sys.unraisablehook` function which can be overridden to 1081control how "unraisable exceptions" are handled. It is called when an 1082exception has occurred but there is no way for Python to handle it. For 1083example, when a destructor raises an exception or during garbage collection 1084(:func:`gc.collect`). 1085 1086.. 1087 1088.. bpo: 36832 1089.. date: 2019-05-07-15-00-45 1090.. nonce: TExgqb 1091.. section: Library 1092 1093Introducing ``zipfile.Path``, a pathlib-compatible wrapper for traversing 1094zip files. 1095 1096.. 1097 1098.. bpo: 36814 1099.. date: 2019-05-06-23-13-26 1100.. nonce: dSeMz_ 1101.. section: Library 1102 1103Fix an issue where os.posix_spawnp() would incorrectly raise a TypeError 1104when file_actions is None. 1105 1106.. 1107 1108.. bpo: 33110 1109.. date: 2019-05-06-22-34-47 1110.. nonce: rSJSCh 1111.. section: Library 1112 1113Handle exceptions raised by functions added by concurrent.futures 1114add_done_callback correctly when the Future has already completed. 1115 1116.. 1117 1118.. bpo: 26903 1119.. date: 2019-05-06-19-17-04 1120.. nonce: 4payXb 1121.. section: Library 1122 1123Limit `max_workers` in `ProcessPoolExecutor` to 61 to work around a 1124WaitForMultipleObjects limitation. 1125 1126.. 1127 1128.. bpo: 36813 1129.. date: 2019-05-06-18-28-38 1130.. nonce: NXD0KZ 1131.. section: Library 1132 1133Fix :class:`~logging.handlers.QueueListener` to call ``queue.task_done()`` 1134upon stopping. Patch by Bar Harel. 1135 1136.. 1137 1138.. bpo: 36806 1139.. date: 2019-05-05-16-14-38 1140.. nonce: rAzF-x 1141.. section: Library 1142 1143Forbid creation of asyncio stream objects like StreamReader, StreamWriter, 1144Process, and their protocols outside of asyncio package. 1145 1146.. 1147 1148.. bpo: 36802 1149.. date: 2019-05-05-10-12-23 1150.. nonce: HYMc8P 1151.. section: Library 1152 1153Provide both sync and async calls for StreamWriter.write() and 1154StreamWriter.close() 1155 1156.. 1157 1158.. bpo: 36801 1159.. date: 2019-05-05-09-45-44 1160.. nonce: XrlFFs 1161.. section: Library 1162 1163Properly handle SSL connection closing in asyncio StreamWriter.drain() call. 1164 1165.. 1166 1167.. bpo: 36785 1168.. date: 2019-05-03-20-47-55 1169.. nonce: PQLnPq 1170.. section: Library 1171 1172Implement PEP 574 (pickle protocol 5 with out-of-band buffers). 1173 1174.. 1175 1176.. bpo: 36772 1177.. date: 2019-05-01-20-41-53 1178.. nonce: fV2K0F 1179.. section: Library 1180 1181functools.lru_cache() can now be used as a straight decorator in addition to 1182its existing usage as a function that returns a decorator. 1183 1184.. 1185 1186.. bpo: 6584 1187.. date: 2019-04-30-04-34-53 1188.. nonce: Hzp9-P 1189.. section: Library 1190 1191Add a :exc:`~gzip.BadGzipFile` exception to the :mod:`gzip` module. 1192 1193.. 1194 1195.. bpo: 36748 1196.. date: 2019-04-29-15-18-13 1197.. nonce: YBKWps 1198.. section: Library 1199 1200Optimized write buffering in C implementation of ``TextIOWrapper``. Writing 1201ASCII string to ``TextIOWrapper`` with ascii, latin1, or utf-8 encoding is 1202about 20% faster. Patch by Inada Naoki. 1203 1204.. 1205 1206.. bpo: 8138 1207.. date: 2019-04-27-02-54-23 1208.. nonce: osBRGI 1209.. section: Library 1210 1211Don't mark ``wsgiref.simple_server.SimpleServer`` as multi-threaded since 1212``wsgiref.simple_server.WSGIServer`` is single-threaded. 1213 1214.. 1215 1216.. bpo: 22640 1217.. date: 2019-04-26-22-13-26 1218.. nonce: p3rheW 1219.. section: Library 1220 1221:func:`py_compile.compile` now supports silent mode. Patch by Joannah 1222Nanjekye 1223 1224.. 1225 1226.. bpo: 29183 1227.. date: 2019-04-22-22-55-29 1228.. nonce: MILvsk 1229.. section: Library 1230 1231Fix double exceptions in :class:`wsgiref.handlers.BaseHandler` by calling 1232its :meth:`~wsgiref.handlers.BaseHandler.close` method only when no 1233exception is raised. 1234 1235.. 1236 1237.. bpo: 36548 1238.. date: 2019-04-07-14-30-10 1239.. nonce: CJQiYw 1240.. section: Library 1241 1242Improved the repr of regular expression flags. 1243 1244.. 1245 1246.. bpo: 36542 1247.. date: 2019-04-06-12-36-09 1248.. nonce: Q0qyYV 1249.. section: Library 1250 1251The signature of Python functions can now be overridden by specifying the 1252``__text_signature__`` attribute. 1253 1254.. 1255 1256.. bpo: 36533 1257.. date: 2019-04-06-00-55-09 1258.. nonce: kzMyRH 1259.. section: Library 1260 1261Reinitialize logging.Handler locks in forked child processes instead of 1262attempting to acquire them all in the parent before forking only to be 1263released in the child process. The acquire/release pattern was leading to 1264deadlocks in code that has implemented any form of chained logging handlers 1265that depend upon one another as the lock acquisition order cannot be 1266guaranteed. 1267 1268.. 1269 1270.. bpo: 35252 1271.. date: 2019-04-02-19-23-12 1272.. nonce: VooTVv 1273.. section: Library 1274 1275Throw a TypeError instead of an AssertionError when using an invalid type 1276annotation with singledispatch. 1277 1278.. 1279 1280.. bpo: 35900 1281.. date: 2019-03-27-15-09-00 1282.. nonce: fh56UU 1283.. section: Library 1284 1285Allow reduction methods to return a 6-item tuple where the 6th item 1286specifies a custom state-setting method that's called instead of the regular 1287``__setstate__`` method. 1288 1289.. 1290 1291.. bpo: 35900 1292.. date: 2019-03-22-22-40-00 1293.. nonce: oiee0o 1294.. section: Library 1295 1296enable custom reduction callback registration for functions and classes in 1297_pickle.c, using the new Pickler's attribute ``reducer_override`` 1298 1299.. 1300 1301.. bpo: 36368 1302.. date: 2019-03-21-16-00-00 1303.. nonce: zsRT1 1304.. section: Library 1305 1306Fix a bug crashing SharedMemoryManager instances in interactive sessions 1307after a ctrl-c (KeyboardInterrupt) was sent 1308 1309.. 1310 1311.. bpo: 31904 1312.. date: 2019-03-18-14-25-36 1313.. nonce: ds3d67 1314.. section: Library 1315 1316Fix mmap fail for VxWorks 1317 1318.. 1319 1320.. bpo: 27497 1321.. date: 2019-03-13-10-57-41 1322.. nonce: JDmIe_ 1323.. section: Library 1324 1325:meth:`csv.DictWriter.writeheader` now returns the return value of the 1326underlying :meth:`csv.Writer.writerow` method. Patch contributed by Ashish 1327Nitin Patil. 1328 1329.. 1330 1331.. bpo: 36239 1332.. date: 2019-03-09-23-51-27 1333.. nonce: BHJ3Ln 1334.. section: Library 1335 1336Parsing .mo files now ignores comments starting and ending with #-#-#-#-#. 1337 1338.. 1339 1340.. bpo: 26707 1341.. date: 2019-03-04-01-28-33 1342.. nonce: QY4kRZ 1343.. section: Library 1344 1345Enable plistlib to read and write binary plist files that were created as a 1346KeyedArchive file. Specifically, this allows the plistlib to process 0x80 1347tokens as UID objects. 1348 1349.. 1350 1351.. bpo: 31904 1352.. date: 2019-03-01-17-59-39 1353.. nonce: 38djdk 1354.. section: Library 1355 1356Add posix module support for VxWorks. 1357 1358.. 1359 1360.. bpo: 35125 1361.. date: 2019-02-15-17-18-50 1362.. nonce: h0xk0f 1363.. section: Library 1364 1365Asyncio: Remove inner callback on outer cancellation in shield 1366 1367.. 1368 1369.. bpo: 35721 1370.. date: 2019-01-18-16-23-00 1371.. nonce: d8djAJ 1372.. section: Library 1373 1374Fix :meth:`asyncio.SelectorEventLoop.subprocess_exec()` leaks file 1375descriptors if ``Popen`` fails and called with ``stdin=subprocess.PIPE``. 1376Patch by Niklas Fiekas. 1377 1378.. 1379 1380.. bpo: 31855 1381.. date: 2019-01-11-17-09-15 1382.. nonce: PlhfsX 1383.. section: Library 1384 1385:func:`unittest.mock.mock_open` results now respects the argument of 1386read([size]). Patch contributed by Rémi Lapeyre. 1387 1388.. 1389 1390.. bpo: 35431 1391.. date: 2019-01-02-19-48-23 1392.. nonce: FhG6QA 1393.. section: Library 1394 1395Implement :func:`math.comb` that returns binomial coefficient, that computes 1396the number of ways to choose k items from n items without repetition and 1397without order. Patch by Yash Aggarwal and Keller Fuchs. 1398 1399.. 1400 1401.. bpo: 26660 1402.. date: 2018-11-04-16-39-46 1403.. nonce: RdXz8a 1404.. section: Library 1405 1406Fixed permission errors in :class:`~tempfile.TemporaryDirectory` clean up. 1407Previously ``TemporaryDirectory.cleanup()`` failed when non-writeable or 1408non-searchable files or directories were created inside a temporary 1409directory. 1410 1411.. 1412 1413.. bpo: 34271 1414.. date: 2018-10-21-17-39-32 1415.. nonce: P15VLM 1416.. section: Library 1417 1418Add debugging helpers to ssl module. It's now possible to dump key material 1419and to trace TLS protocol. The default and stdlib contexts also support 1420SSLKEYLOGFILE env var. 1421 1422.. 1423 1424.. bpo: 26467 1425.. date: 2018-09-13-20-33-24 1426.. nonce: cahAk3 1427.. section: Library 1428 1429Added AsyncMock to support using unittest to mock asyncio coroutines. Patch 1430by Lisa Roach. 1431 1432.. 1433 1434.. bpo: 33569 1435.. date: 2018-08-28-03-00-12 1436.. nonce: 45YlGG 1437.. section: Library 1438 1439dataclasses.InitVar: Exposes the type used to create the init var. 1440 1441.. 1442 1443.. bpo: 34424 1444.. date: 2018-08-18-14-47-00 1445.. nonce: wAlRuS 1446.. section: Library 1447 1448Fix serialization of messages containing encoded strings when the 1449policy.linesep is set to a multi-character string. Patch by Jens Troeger. 1450 1451.. 1452 1453.. bpo: 34303 1454.. date: 2018-08-03-09-47-20 1455.. nonce: tOE2HP 1456.. section: Library 1457 1458Performance of :func:`functools.reduce` is slightly improved. Patch by 1459Sergey Fedoseev. 1460 1461.. 1462 1463.. bpo: 33361 1464.. date: 2018-07-13-20-17-17 1465.. nonce: dx2NVn 1466.. section: Library 1467 1468Fix a bug in :class:`codecs.StreamRecoder` where seeking might leave old 1469data in a buffer and break subsequent read calls. Patch by Ammar Askar. 1470 1471.. 1472 1473.. bpo: 22454 1474.. date: 2018-06-10-17-48-07 1475.. nonce: qeiy_X 1476.. section: Library 1477 1478The :mod:`shlex` module now exposes :func:`shlex.join`, the inverse of 1479:func:`shlex.split`. Patch by Bo Bayles. 1480 1481.. 1482 1483.. bpo: 31922 1484.. date: 2018-05-30-01-05-50 1485.. nonce: fobsXJ 1486.. section: Library 1487 1488:meth:`asyncio.AbstractEventLoop.create_datagram_endpoint`: Do not connect 1489UDP socket when broadcast is allowed. This allows to receive replies after a 1490UDP broadcast. 1491 1492.. 1493 1494.. bpo: 24882 1495.. date: 2018-04-04-14-54-30 1496.. nonce: urybpa 1497.. section: Library 1498 1499Change ThreadPoolExecutor to use existing idle threads before spinning up 1500new ones. 1501 1502.. 1503 1504.. bpo: 31961 1505.. date: 2018-03-27-13-28-16 1506.. nonce: GjLoYu 1507.. section: Library 1508 1509Added support for bytes and path-like objects in :func:`subprocess.Popen` on 1510Windows. The *args* parameter now accepts a :term:`path-like object` if 1511*shell* is ``False`` and a sequence containing bytes and path-like objects. 1512The *executable* parameter now accepts a bytes and :term:`path-like object`. 1513The *cwd* parameter now accepts a bytes object. Based on patch by Anders 1514Lorentsen. 1515 1516.. 1517 1518.. bpo: 33123 1519.. date: 2018-03-22-19-13-19 1520.. nonce: _Y5ooE 1521.. section: Library 1522 1523:class:`pathlib.Path.unlink` now accepts a *missing_ok* parameter to avoid a 1524:exc:`FileNotFoundError` from being raised. Patch by Robert Buchholz. 1525 1526.. 1527 1528.. bpo: 32941 1529.. date: 2018-03-20-20-57-00 1530.. nonce: 9FU0gL 1531.. section: Library 1532 1533Allow :class:`mmap.mmap` objects to access the madvise() system call 1534(through :meth:`mmap.mmap.madvise`). 1535 1536.. 1537 1538.. bpo: 22102 1539.. date: 2018-03-08-16-15-00 1540.. nonce: th33uD 1541.. section: Library 1542 1543Added support for ZIP files with disks set to 0. Such files are commonly 1544created by builtin tools on Windows when use ZIP64 extension. Patch by 1545Francisco Facioni. 1546 1547.. 1548 1549.. bpo: 32515 1550.. date: 2018-01-07-21-04-50 1551.. nonce: D8_Wcb 1552.. section: Library 1553 1554trace.py can now run modules via python3 -m trace -t --module module_name 1555 1556.. 1557 1558.. bpo: 32299 1559.. date: 2017-12-13-17-49-56 1560.. nonce: eqAPWs 1561.. section: Library 1562 1563Changed :func:`unittest.mock.patch.dict` to return the patched dictionary 1564when used as context manager. Patch by Vadim Tsander. 1565 1566.. 1567 1568.. bpo: 27141 1569.. date: 2017-10-24-00-42-14 1570.. nonce: zbAgSs 1571.. section: Library 1572 1573Added a ``__copy__()`` to ``collections.UserList`` and 1574``collections.UserDict`` in order to correctly implement shallow copying of 1575the objects. Patch by Bar Harel. 1576 1577.. 1578 1579.. bpo: 31829 1580.. date: 2017-10-21-12-07-56 1581.. nonce: 6IhP-O 1582.. section: Library 1583 1584``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) are now escaped in 1585protocol 0 pickles of Unicode strings. This allows to load them without loss 1586from files open in text mode in Python 2. 1587 1588.. 1589 1590.. bpo: 23395 1591.. date: 2016-07-27-11-06-43 1592.. nonce: MuCEX9 1593.. section: Library 1594 1595``_thread.interrupt_main()`` now avoids setting the Python error status if 1596the ``SIGINT`` signal is ignored or not handled by Python. 1597 1598.. 1599 1600.. bpo: 36896 1601.. date: 2019-05-31-10-46-36 1602.. nonce: wkXTW9 1603.. section: Documentation 1604 1605Clarify that some types have unstable constructor signature between Python 1606versions. 1607 1608.. 1609 1610.. bpo: 36686 1611.. date: 2019-05-27-17-28-58 1612.. nonce: Zot4sx 1613.. section: Documentation 1614 1615Improve documentation of the stdin, stdout, and stderr arguments of the 1616``asyncio.subprocess_exec`` function to specify which values are supported. 1617Also mention that decoding as text is not supported. 1618 1619Add a few tests to verify that the various values passed to the std* 1620arguments actually work. 1621 1622.. 1623 1624.. bpo: 36984 1625.. date: 2019-05-20-22-21-17 1626.. nonce: IjZlmS 1627.. section: Documentation 1628 1629Improve version added references in ``typing`` module - by Anthony Sottile. 1630 1631.. 1632 1633.. bpo: 36868 1634.. date: 2019-05-11-17-42-15 1635.. nonce: yioL0R 1636.. section: Documentation 1637 1638What's new now mentions SSLContext.hostname_checks_common_name instead of 1639SSLContext.host_flags. 1640 1641.. 1642 1643.. bpo: 35924 1644.. date: 2019-05-08-13-17-44 1645.. nonce: lqbNpW 1646.. section: Documentation 1647 1648Add a note to the ``curses.addstr()`` documentation to warn that multiline 1649strings can cause segfaults because of an ncurses bug. 1650 1651.. 1652 1653.. bpo: 36783 1654.. date: 2019-05-07-02-30-51 1655.. nonce: gpC8E2 1656.. section: Documentation 1657 1658Added C API Documentation for Time_FromTimeAndFold and 1659PyDateTime_FromDateAndTimeAndFold as per PEP 495. Patch by Edison Abahurire. 1660 1661.. 1662 1663.. bpo: 36797 1664.. date: 2019-05-05-07-58-50 1665.. nonce: W1X4On 1666.. section: Documentation 1667 1668More of the legacy distutils documentation has been either pruned, or else 1669more clearly marked as being retained solely until the setuptools 1670documentation covers it independently. 1671 1672.. 1673 1674.. bpo: 22865 1675.. date: 2019-02-21-18-13-50 1676.. nonce: 6hg6J8 1677.. section: Documentation 1678 1679Add detail to the documentation on the `pty.spawn` function. 1680 1681.. 1682 1683.. bpo: 35397 1684.. date: 2019-01-09-17-56-35 1685.. nonce: ZMreIz 1686.. section: Documentation 1687 1688Remove deprecation and document urllib.parse.unwrap(). Patch contributed by 1689Rémi Lapeyre. 1690 1691.. 1692 1693.. bpo: 32995 1694.. date: 2018-10-07-03-04-57 1695.. nonce: TXN9ur 1696.. section: Documentation 1697 1698Added the context variable in glossary. 1699 1700.. 1701 1702.. bpo: 33519 1703.. date: 2018-05-17-21-02-00 1704.. nonce: Q7s2FB 1705.. section: Documentation 1706 1707Clarify that `copy()` is not part of the `MutableSequence` ABC. 1708 1709.. 1710 1711.. bpo: 33482 1712.. date: 2018-05-13-10-36-37 1713.. nonce: jalAaQ 1714.. section: Documentation 1715 1716Make `codecs.StreamRecoder.writelines` take a list of bytes. 1717 1718.. 1719 1720.. bpo: 25735 1721.. date: 2018-04-08-19-09-22 1722.. nonce: idVQBD 1723.. section: Documentation 1724 1725Added documentation for func factorial to indicate that returns integer 1726values 1727 1728.. 1729 1730.. bpo: 20285 1731.. date: 2017-12-08-20-30-37 1732.. nonce: cfnp0J 1733.. section: Documentation 1734 1735Expand object.__doc__ (docstring) to make it clearer. Modify pydoc.py so 1736that help(object) lists object methods (for other classes, help omits 1737methods of the object base class.) 1738 1739.. 1740 1741.. bpo: 37069 1742.. date: 2019-06-03-02-30-36 1743.. nonce: rVtdLk 1744.. section: Tests 1745 1746Modify test_coroutines, test_cprofile, test_generators, test_raise, test_ssl 1747and test_yield_from to use :func:`test.support.catch_unraisable_exception` 1748rather than :func:`test.support.captured_stderr`. 1749 1750.. 1751 1752.. bpo: 37098 1753.. date: 2019-05-30-10-57-39 1754.. nonce: SfXt1M 1755.. section: Tests 1756 1757Fix test_memfd_create on older Linux Kernels. 1758 1759.. 1760 1761.. bpo: 37081 1762.. date: 2019-05-28-17-48-22 1763.. nonce: qxB-1l 1764.. section: Tests 1765 1766Test with OpenSSL 1.1.1c 1767 1768.. 1769 1770.. bpo: 36829 1771.. date: 2019-05-22-12-57-15 1772.. nonce: e9mRWC 1773.. section: Tests 1774 1775Add :func:`test.support.catch_unraisable_exception`: context manager 1776catching unraisable exception using :func:`sys.unraisablehook`. 1777 1778.. 1779 1780.. bpo: 36915 1781.. date: 2019-05-14-14-12-24 1782.. nonce: 58b7pH 1783.. section: Tests 1784 1785The main regrtest process now always removes all temporary directories of 1786worker processes even if they crash or if they are killed on 1787KeyboardInterrupt (CTRL+c). 1788 1789.. 1790 1791.. bpo: 36719 1792.. date: 2019-05-10-01-50-30 1793.. nonce: O84ZWv 1794.. section: Tests 1795 1796"python3 -m test -jN ..." now continues the execution of next tests when a 1797worker process crash (CHILD_ERROR state). Previously, the test suite stopped 1798immediately. Use --failfast to stop at the first error. 1799 1800.. 1801 1802.. bpo: 36816 1803.. date: 2019-05-08-15-55-46 1804.. nonce: WBKRGZ 1805.. section: Tests 1806 1807Update Lib/test/selfsigned_pythontestdotnet.pem to match 1808self-signed.pythontest.net's new TLS certificate. 1809 1810.. 1811 1812.. bpo: 35925 1813.. date: 2019-05-06-18-29-54 1814.. nonce: gwQPuC 1815.. section: Tests 1816 1817Skip httplib and nntplib networking tests when they would otherwise fail due 1818to a modern OS or distro with a default OpenSSL policy of rejecting 1819connections to servers with weak certificates. 1820 1821.. 1822 1823.. bpo: 36782 1824.. date: 2019-05-04-21-25-19 1825.. nonce: h3oPIb 1826.. section: Tests 1827 1828Add tests for several C API functions in the :mod:`datetime` module. Patch 1829by Edison Abahurire. 1830 1831.. 1832 1833.. bpo: 36342 1834.. date: 2019-03-23-13-58-49 1835.. nonce: q6Quiq 1836.. section: Tests 1837 1838Fix test_multiprocessing in test_venv if platform lacks functioning 1839sem_open. 1840 1841.. 1842 1843.. bpo: 36721 1844.. date: 2019-05-22-16-19-18 1845.. nonce: 9aRwfZ 1846.. section: Build 1847 1848To embed Python into an application, a new ``--embed`` option must be passed 1849to ``python3-config --libs --embed`` to get ``-lpython3.8`` (link the 1850application to libpython). To support both 3.8 and older, try 1851``python3-config --libs --embed`` first and fallback to ``python3-config 1852--libs`` (without ``--embed``) if the previous command fails. 1853 1854Add a pkg-config ``python-3.8-embed`` module to embed Python into an 1855application: ``pkg-config python-3.8-embed --libs`` includes 1856``-lpython3.8``. To support both 3.8 and older, try ``pkg-config 1857python-X.Y-embed --libs`` first and fallback to ``pkg-config python-X.Y 1858--libs`` (without ``--embed``) if the previous command fails (replace 1859``X.Y`` with the Python version). 1860 1861On the other hand, ``pkg-config python3.8 --libs`` no longer contains 1862``-lpython3.8``. C extensions must not be linked to libpython (except on 1863Android, case handled by the script); this change is backward incompatible 1864on purpose. 1865 1866.. 1867 1868.. bpo: 36786 1869.. date: 2019-05-03-21-08-06 1870.. nonce: gOLFbD 1871.. section: Build 1872 1873"make install" now runs compileall in parallel. 1874 1875.. 1876 1877.. bpo: 36965 1878.. date: 2019-05-20-20-26-36 1879.. nonce: KsfI-N 1880.. section: Windows 1881 1882include of STATUS_CONTROL_C_EXIT without depending on MSC compiler 1883 1884.. 1885 1886.. bpo: 35926 1887.. date: 2019-03-01-16-43-45 1888.. nonce: mLszHo 1889.. section: Windows 1890 1891Update to OpenSSL 1.1.1b for Windows. 1892 1893.. 1894 1895.. bpo: 29883 1896.. date: 2018-09-15-11-36-55 1897.. nonce: HErerE 1898.. section: Windows 1899 1900Add Windows support for UDP transports for the Proactor Event Loop. Patch by 1901Adam Meily. 1902 1903.. 1904 1905.. bpo: 33407 1906.. date: 2018-08-28-17-23-49 1907.. nonce: ARG0W_ 1908.. section: Windows 1909 1910The :c:macro:`Py_DEPRECATED()` macro has been implemented for MSVC. 1911 1912.. 1913 1914.. bpo: 36231 1915.. date: 2019-06-03-05-49-49 1916.. nonce: RfmW_p 1917.. section: macOS 1918 1919Support building Python on macOS without /usr/include installed. As of macOS 192010.14, system header files are only available within an SDK provided by 1921either the Command Line Tools or the Xcode app. 1922 1923.. 1924 1925.. bpo: 35610 1926.. date: 2019-06-02-14-10-52 1927.. nonce: 0w_v6Y 1928.. section: IDLE 1929 1930Replace now redundant .context_use_ps1 with .prompt_last_line. This finishes 1931change started in bpo-31858. 1932 1933.. 1934 1935.. bpo: 37038 1936.. date: 2019-05-24-18-57-57 1937.. nonce: AJ3RwQ 1938.. section: IDLE 1939 1940Make idlelib.run runnable; add test clause. 1941 1942.. 1943 1944.. bpo: 36958 1945.. date: 2019-05-19-22-02-22 1946.. nonce: DZUC6G 1947.. section: IDLE 1948 1949Print any argument other than None or int passed to SystemExit or 1950sys.exit(). 1951 1952.. 1953 1954.. bpo: 36807 1955.. date: 2019-05-05-16-27-53 1956.. nonce: AGNWYJ 1957.. section: IDLE 1958 1959When saving a file, call os.fsync() so bits are flushed to e.g. USB drive. 1960 1961.. 1962 1963.. bpo: 32411 1964.. date: 2017-12-25-18-48-50 1965.. nonce: vNwDhe 1966.. section: IDLE 1967 1968In browser.py, remove extraneous sorting by line number since dictionary was 1969created in line number order. 1970 1971.. 1972 1973.. bpo: 37053 1974.. date: 2019-05-26-16-47-06 1975.. nonce: -EYRuz 1976.. section: Tools/Demos 1977 1978Handle strings like u"bar" correctly in Tools/parser/unparse.py. Patch by 1979Chih-Hsuan Yen. 1980 1981.. 1982 1983.. bpo: 36763 1984.. date: 2019-05-27-12-25-25 1985.. nonce: bHCA9j 1986.. section: C API 1987 1988Implement the :pep:`587` "Python Initialization Configuration". 1989 1990.. 1991 1992.. bpo: 36379 1993.. date: 2019-05-24-07-11-08 1994.. nonce: 8zgoKe 1995.. section: C API 1996 1997Fix crashes when attempting to use the *modulo* parameter when ``__ipow__`` 1998is implemented in C. 1999 2000.. 2001 2002.. bpo: 37107 2003.. date: 2019-05-22-17-33-52 2004.. nonce: 8BVPR- 2005.. section: C API 2006 2007Update :c:func:`PyObject_CallMethodObjArgs` and 2008``_PyObject_CallMethodIdObjArgs`` to use ``_PyObject_GetMethod`` to avoid 2009creating a bound method object in many cases. Patch by Michael J. Sullivan. 2010 2011.. 2012 2013.. bpo: 36974 2014.. date: 2019-05-22-15-24-08 2015.. nonce: TkySRe 2016.. section: C API 2017 2018Implement :pep:`590`: Vectorcall: a fast calling protocol for CPython. This 2019is a new protocol to optimize calls of custom callable objects. 2020 2021.. 2022 2023.. bpo: 36763 2024.. date: 2019-05-17-19-23-24 2025.. nonce: TswmDy 2026.. section: C API 2027 2028``Py_Main()`` now returns the exitcode rather than calling 2029``Py_Exit(exitcode)`` when calling ``PyErr_Print()`` if the current 2030exception type is ``SystemExit``. 2031 2032.. 2033 2034.. bpo: 36922 2035.. date: 2019-05-15-10-46-55 2036.. nonce: J3EFK_ 2037.. section: C API 2038 2039Add new type flag ``Py_TPFLAGS_METHOD_DESCRIPTOR`` for objects behaving like 2040unbound methods. These are objects supporting the optimization given by the 2041``LOAD_METHOD``/``CALL_METHOD`` opcodes. See PEP 590. 2042 2043.. 2044 2045.. bpo: 36728 2046.. date: 2019-05-11-03-56-23 2047.. nonce: FR-dMP 2048.. section: C API 2049 2050The :c:func:`PyEval_ReInitThreads` function has been removed from the C API. 2051It should not be called explicitly: use :c:func:`PyOS_AfterFork_Child` 2052instead. 2053