1.. bpo: 41304 2.. date: 2020-07-15-20-15-08 3.. nonce: vNEeYA 4.. release date: 2020-10-05 5.. section: Security 6 7Fixes `python3x._pth` being ignored on Windows, caused by the fix for 8:issue:`29778` (CVE-2020-15801). 9 10.. 11 12.. bpo: 41162 13.. date: 2020-07-03-20-41-29 14.. nonce: tb8pVj 15.. section: Security 16 17Audit hooks are now cleared later during finalization to avoid missing 18events. 19 20.. 21 22.. bpo: 29778 23.. date: 2020-07-03-17-21-37 24.. nonce: cR_fGS 25.. section: Security 26 27Ensure :file:`python3.dll` is loaded from correct locations when Python is 28embedded (CVE-2020-15523). 29 30.. 31 32.. bpo: 41004 33.. date: 2020-06-29-16-02-29 34.. nonce: ovF0KZ 35.. section: Security 36 37The __hash__() methods of ipaddress.IPv4Interface and 38ipaddress.IPv6Interface incorrectly generated constant hash values of 32 and 39128 respectively. This resulted in always causing hash collisions. The fix 40uses hash() to generate hash values for the tuple of (address, mask length, 41network address). 42 43.. 44 45.. bpo: 39603 46.. date: 2020-02-12-14-17-39 47.. nonce: Gt3RSg 48.. section: Security 49 50Prevent http header injection by rejecting control characters in 51http.client.putrequest(...). 52 53.. 54 55.. bpo: 41909 56.. date: 2020-10-04-10-55-12 57.. nonce: BqHPcm 58.. section: Core and Builtins 59 60Fixed stack overflow in :func:`issubclass` and :func:`isinstance` when 61getting the ``__bases__`` attribute leads to infinite recursion. 62 63.. 64 65.. bpo: 41922 66.. date: 2020-10-04-01-02-58 67.. nonce: kHGT8I 68.. section: Core and Builtins 69 70Speed up calls to ``reversed()`` by using the :pep:`590` ``vectorcall`` 71calling convention. Patch by Dong-hee Na. 72 73.. 74 75.. bpo: 41873 76.. date: 2020-09-28-08-58-28 77.. nonce: VzEDhA 78.. section: Core and Builtins 79 80Calls to ``float()`` are now faster due to the ``vectorcall`` calling 81convention. Patch by Dennis Sweeney. 82 83.. 84 85.. bpo: 41870 86.. date: 2020-09-27-22-23-14 87.. nonce: 2v6_v4 88.. section: Core and Builtins 89 90Speed up calls to ``bool()`` by using the :pep:`590` ``vectorcall`` calling 91convention. Patch by Dong-hee Na. 92 93.. 94 95.. bpo: 1635741 96.. date: 2020-09-26-14-43-30 97.. nonce: aJS9B3 98.. section: Core and Builtins 99 100Port the :mod:`_bisect` module to the multi-phase initialization API 101(:pep:`489`). 102 103.. 104 105.. bpo: 39934 106.. date: 2020-09-24-12-15-45 107.. nonce: YVHTCF 108.. section: Core and Builtins 109 110Correctly count control blocks in 'except' in compiler. Ensures that a 111syntax error, rather a fatal error, occurs for deeply nested, named 112exception handlers. 113 114.. 115 116.. bpo: 41780 117.. date: 2020-09-15-23-29-49 118.. nonce: bOBUIH 119.. section: Core and Builtins 120 121Fix :meth:`__dir__` of :class:`types.GenericAlias`. Patch by Batuhan 122Taskaya. 123 124.. 125 126.. bpo: 1635741 127.. date: 2020-09-12-18-34-34 128.. nonce: lh335O 129.. section: Core and Builtins 130 131Port the :mod:`_lsprof` extension module to multi-phase initialization 132(:pep:`489`). 133 134.. 135 136.. bpo: 1635741 137.. date: 2020-09-08-21-58-47 138.. nonce: vdjSLH 139.. section: Core and Builtins 140 141Port the :mod:`cmath` extension module to multi-phase initialization 142(:pep:`489`). 143 144.. 145 146.. bpo: 1635741 147.. date: 2020-09-08-20-39-43 148.. nonce: jiXmyT 149.. section: Core and Builtins 150 151Port the :mod:`_scproxy` extension module to multi-phase initialization 152(:pep:`489`). 153 154.. 155 156.. bpo: 1635741 157.. date: 2020-09-07-11-35-02 158.. nonce: rvIexb 159.. section: Core and Builtins 160 161Port the :mod:`termios` extension module to multi-phase initialization 162(:pep:`489`). 163 164.. 165 166.. bpo: 1635741 167.. date: 2020-09-07-09-45-47 168.. nonce: QuDIut 169.. section: Core and Builtins 170 171Convert the :mod:`_sha256` extension module types to heap types. 172 173.. 174 175.. bpo: 41690 176.. date: 2020-09-02-12-00-57 177.. nonce: Ny-Sfy 178.. section: Core and Builtins 179 180Fix a possible stack overflow in the parser when parsing functions and 181classes with a huge amount of arguments. Patch by Pablo Galindo. 182 183.. 184 185.. bpo: 1635741 186.. date: 2020-09-01-17-22-35 187.. nonce: CnRME3 188.. section: Core and Builtins 189 190Port the :mod:`_overlapped` extension module to multi-phase initialization 191(:pep:`489`). 192 193.. 194 195.. bpo: 1635741 196.. date: 2020-09-01-17-08-07 197.. nonce: X9CZgo 198.. section: Core and Builtins 199 200Port the :mod:`_curses_panel` extension module to multi-phase initialization 201(:pep:`489`). 202 203.. 204 205.. bpo: 1635741 206.. date: 2020-09-01-17-06-02 207.. nonce: 5jZymK 208.. section: Core and Builtins 209 210Port the :mod:`_opcode` extension module to multi-phase initialization 211(:pep:`489`). 212 213.. 214 215.. bpo: 41681 216.. date: 2020-08-31-17-49-02 217.. nonce: 3-VJiH 218.. section: Core and Builtins 219 220Fixes the wrong error description in the error raised by using 2 `,` in 221format string in f-string and :meth:`str.format`. 222 223.. 224 225.. bpo: 41675 226.. date: 2020-08-31-14-53-17 227.. nonce: VSoqWU 228.. section: Core and Builtins 229 230The implementation of :func:`signal.siginterrupt` now uses 231:c:func:`sigaction` (if it is available in the system) instead of the 232deprecated :c:func:`siginterrupt`. Patch by Pablo Galindo. 233 234.. 235 236.. bpo: 41670 237.. date: 2020-08-31-11-37-59 238.. nonce: vmRJRx 239.. section: Core and Builtins 240 241Prevent line trace being skipped on platforms not compiled with 242``USE_COMPUTED_GOTOS``. Fixes issue where some lines nested within a 243try-except block were not being traced on Windows. 244 245.. 246 247.. bpo: 41654 248.. date: 2020-08-30-20-38-33 249.. nonce: HtnhAM 250.. section: Core and Builtins 251 252Fix a crash that occurred when destroying subclasses of 253:class:`MemoryError`. Patch by Pablo Galindo. 254 255.. 256 257.. bpo: 1635741 258.. date: 2020-08-28-20-54-04 259.. nonce: 7ijlcI 260.. section: Core and Builtins 261 262Port the :mod:`zlib` extension module to multi-phase initialization 263(:pep:`489`). 264 265.. 266 267.. bpo: 41631 268.. date: 2020-08-26-11-23-31 269.. nonce: 3jZcd9 270.. section: Core and Builtins 271 272The ``_ast`` module uses again a global state. Using a module state per 273module instance is causing subtle practical problems. For example, the 274Mercurial project replaces the ``__import__()`` function to implement lazy 275import, whereas Python expected that ``import _ast`` always return a fully 276initialized ``_ast`` module. 277 278.. 279 280.. bpo: 40077 281.. date: 2020-08-25-22-43-33 282.. nonce: vcxSUa 283.. section: Core and Builtins 284 285Convert :mod:`_operator` to use :c:func:`PyType_FromSpec`. 286 287.. 288 289.. bpo: 1653741 290.. date: 2020-08-13-07-19-21 291.. nonce: fubBkb 292.. section: Core and Builtins 293 294Port :mod:`_sha3` to multi-phase init. Convert static types to heap types. 295 296.. 297 298.. bpo: 1635741 299.. date: 2020-08-13-07-18-05 300.. nonce: FC13e7 301.. section: Core and Builtins 302 303Port the :mod:`_blake2` extension module to the multi-phase initialization 304API (:pep:`489`). 305 306.. 307 308.. bpo: 41533 309.. date: 2020-08-12-20-29-57 310.. nonce: 4pcVAc 311.. section: Core and Builtins 312 313Free the stack allocated in ``va_build_stack`` if ``do_mkstack`` fails and 314the stack is not a ``small_stack``. 315 316.. 317 318.. bpo: 41531 319.. date: 2020-08-12-19-32-15 320.. nonce: WgPzjT 321.. section: Core and Builtins 322 323Fix a bug that was dropping keys when compiling dict literals with more than 3240xFFFF elements. Patch by Pablo Galindo. 325 326.. 327 328.. bpo: 41525 329.. date: 2020-08-12-07-35-07 330.. nonce: d9q3XL 331.. section: Core and Builtins 332 333The output of ``python --help`` contains now only ASCII characters. 334 335.. 336 337.. bpo: 1635741 338.. date: 2020-08-10-16-11-32 339.. nonce: O0d3ym 340.. section: Core and Builtins 341 342Port the :mod:`_sha1`, :mod:`_sha512`, and :mod:`_md5` extension modules to 343multi-phase initialization API (:pep:`489`). 344 345.. 346 347.. bpo: 41431 348.. date: 2020-08-02-15-53-12 349.. nonce: TblUBT 350.. section: Core and Builtins 351 352Optimize ``dict_merge()`` for copying dict (e.g. ``dict(d)`` and 353``{}.update(d)``). 354 355.. 356 357.. bpo: 41428 358.. date: 2020-07-28-22-43-27 359.. nonce: FM6xsI 360.. section: Core and Builtins 361 362Implement PEP 604. This supports (int | str) etc. in place of Union[str, 363int]. 364 365.. 366 367.. bpo: 41340 368.. date: 2020-07-27-01-50-06 369.. nonce: pZXfcF 370.. section: Core and Builtins 371 372Removed fallback implementation for ``strdup``. 373 374.. 375 376.. bpo: 38156 377.. date: 2020-07-20-17-01-17 378.. nonce: ptcdRy 379.. section: Core and Builtins 380 381Handle interrupts that come after EOF correctly in ``PyOS_StdioReadline``. 382 383.. 384 385.. bpo: 41342 386.. date: 2020-07-19-15-40-52 387.. nonce: RRk_m_ 388.. section: Core and Builtins 389 390:func:`round` with integer argument is now faster (9--60%). 391 392.. 393 394.. bpo: 41334 395.. date: 2020-07-18-18-01-10 396.. nonce: t5xMGp 397.. section: Core and Builtins 398 399Constructors :func:`str`, :func:`bytes` and :func:`bytearray` are now faster 400(around 30--40% for small objects). 401 402.. 403 404.. bpo: 41295 405.. date: 2020-07-18-08-15-32 406.. nonce: pu8Ezo 407.. section: Core and Builtins 408 409Resolve a regression in CPython 3.8.4 where defining "__setattr__" in a 410multi-inheritance setup and calling up the hierarchy chain could fail if 411builtins/extension types were involved in the base types. 412 413.. 414 415.. bpo: 41323 416.. date: 2020-07-17-11-31-54 417.. nonce: ChbZHh 418.. section: Core and Builtins 419 420Bytecode optimizations are performed directly on the control flow graph. 421This will result in slightly more compact code objects in some 422circumstances. 423 424.. 425 426.. bpo: 41247 427.. date: 2020-07-08-22-03-54 428.. nonce: PndYIk 429.. section: Core and Builtins 430 431Always cache the running loop holder when running 432``asyncio.set_running_loop``. 433 434.. 435 436.. bpo: 41252 437.. date: 2020-07-08-21-55-23 438.. nonce: nBWL-Y 439.. section: Core and Builtins 440 441Fix incorrect refcounting in _ssl.c's ``_servername_callback()``. 442 443.. 444 445.. bpo: 1635741 446.. date: 2020-07-07-16-10-52 447.. nonce: zU-H_n 448.. section: Core and Builtins 449 450Port :mod:`multiprocessing` to multi-phase initialization 451 452.. 453 454.. bpo: 1635741 455.. date: 2020-07-06-20-43-19 456.. nonce: LYhsni 457.. section: Core and Builtins 458 459Port :mod:`winapi` to multiphase initialization 460 461.. 462 463.. bpo: 41215 464.. date: 2020-07-06-18-36-33 465.. nonce: vFGFIz 466.. section: Core and Builtins 467 468Use non-NULL default values in the PEG parser keyword list to overcome a bug 469that was preventing Python from being properly compiled when using the XLC 470compiler. Patch by Pablo Galindo. 471 472.. 473 474.. bpo: 41218 475.. date: 2020-07-06-13-35-17 476.. nonce: oKnSr2 477.. section: Core and Builtins 478 479Python 3.8.3 had a regression where compiling with 480ast.PyCF_ALLOW_TOP_LEVEL_AWAIT would aggressively mark list comprehension 481with CO_COROUTINE. Now only list comprehension making use of async/await 482will tagged as so. 483 484.. 485 486.. bpo: 1635741 487.. date: 2020-07-03-23-10-02 488.. nonce: F5coWe 489.. section: Core and Builtins 490 491Port :mod:`faulthandler` to multiphase initialization. 492 493.. 494 495.. bpo: 1635741 496.. date: 2020-07-01-20-17-38 497.. nonce: -AtPYu 498.. section: Core and Builtins 499 500Port :mod:`sha256` to multiphase initialization 501 502.. 503 504.. bpo: 41175 505.. date: 2020-06-30-20-17-31 506.. nonce: acJoXB 507.. section: Core and Builtins 508 509Guard against a NULL pointer dereference within bytearrayobject triggered by 510the ``bytearray() + bytearray()`` operation. 511 512.. 513 514.. bpo: 41100 515.. date: 2020-06-30-04-44-29 516.. nonce: PJwA6F 517.. section: Core and Builtins 518 519add arm64 to the allowable Mac OS arches in mpdecimal.h 520 521.. 522 523.. bpo: 41094 524.. date: 2020-06-23-23-26-42 525.. nonce: zEIJse 526.. section: Core and Builtins 527 528Fix decoding errors with audit when open files with non-ASCII names on 529non-UTF-8 locale. 530 531.. 532 533.. bpo: 39960 534.. date: 2020-06-23-18-32-41 535.. nonce: Kez3fP 536.. section: Core and Builtins 537 538The "hackcheck" that prevents sneaking around a type's __setattr__() by 539calling the superclass method was rewritten to allow C implemented heap 540types. 541 542.. 543 544.. bpo: 41084 545.. date: 2020-06-23-15-10-19 546.. nonce: pt3y7F 547.. section: Core and Builtins 548 549Prefix the error message with 'f-string: ', when parsing an f-string 550expression which throws a :exc:`SyntaxError`. 551 552.. 553 554.. bpo: 40521 555.. date: 2020-06-23-07-35-11 556.. nonce: dMNA6k 557.. section: Core and Builtins 558 559Empty frozensets are no longer singletons. 560 561.. 562 563.. bpo: 41076 564.. date: 2020-06-22-13-22-30 565.. nonce: eWYw2N 566.. section: Core and Builtins 567 568Pre-feed the parser with the location of the f-string expression, not the 569f-string itself, which allows us to skip the shifting of the AST node 570locations after the parsing is completed. 571 572.. 573 574.. bpo: 41056 575.. date: 2020-06-21-19-53-33 576.. nonce: IDu_EK 577.. section: Core and Builtins 578 579Fixes a reference to deallocated stack space during startup when 580constructing sys.path involving a relative symlink when code was supplied 581via -c. (discovered via Coverity) 582 583.. 584 585.. bpo: 41061 586.. date: 2020-06-21-10-54-02 587.. nonce: AHf9MU 588.. section: Core and Builtins 589 590Fix incorrect expressions and asserts in hashtable code and tests. 591 592.. 593 594.. bpo: 41052 595.. date: 2020-06-20-22-46-18 596.. nonce: 46MPeF 597.. section: Core and Builtins 598 599Opt out serialization/deserialization for _random.Random 600 601.. 602 603.. bpo: 40939 604.. date: 2020-06-20-19-27-47 605.. nonce: jxJ4yn 606.. section: Core and Builtins 607 608Rename `PyPegen*` functions to `PyParser*`, so that we can remove the old 609set of `PyParser*` functions that were using the old parser, but keep 610everything backwards-compatible. 611 612.. 613 614.. bpo: 35975 615.. date: 2020-06-20-17-00-44 616.. nonce: UDHCHp 617.. section: Core and Builtins 618 619Stefan Behnel reported that cf_feature_version is used even when 620PyCF_ONLY_AST is not set. This is against the intention and against the 621documented behavior, so it's been fixed. 622 623.. 624 625.. bpo: 40939 626.. date: 2020-06-20-16-59-02 627.. nonce: 6810Ak 628.. section: Core and Builtins 629 630Remove the remaining files from the old parser and the :mod:`symbol` module. 631 632.. 633 634.. bpo: 40077 635.. date: 2020-06-18-19-04-30 636.. nonce: _yI-ax 637.. section: Core and Builtins 638 639Convert :mod:`_bz2` to use :c:func:`PyType_FromSpec`. 640 641.. 642 643.. bpo: 41006 644.. date: 2020-06-18-00-07-09 645.. nonce: H-wN-d 646.. section: Core and Builtins 647 648The ``encodings.latin_1`` module is no longer imported at startup. Now it is 649only imported when it is the filesystem encoding or the stdio encoding. 650 651.. 652 653.. bpo: 40636 654.. date: 2020-06-17-10-27-17 655.. nonce: MYaCIe 656.. section: Core and Builtins 657 658:func:`zip` now supports :pep:`618`'s ``strict`` parameter, which raises a 659:exc:`ValueError` if the arguments are exhausted at different lengths. Patch 660by Brandt Bucher. 661 662.. 663 664.. bpo: 1635741 665.. date: 2020-06-17-00-52-21 666.. nonce: 61iyYh 667.. section: Core and Builtins 668 669Port :mod:`_gdbm` to multiphase initialization. 670 671.. 672 673.. bpo: 40985 674.. date: 2020-06-15-16-29-55 675.. nonce: IIN_xX 676.. section: Core and Builtins 677 678Fix a bug that caused the :exc:`SyntaxError` text to be empty when a file 679ends with a line ending in a line continuation character (i.e. backslash). 680The error text should contain the text of the last line. 681 682.. 683 684.. bpo: 40958 685.. date: 2020-06-15-01-20-44 686.. nonce: 7O2Wh1 687.. section: Core and Builtins 688 689Fix a possible buffer overflow in the PEG parser when gathering information 690for emitting syntax errors. Patch by Pablo Galindo. 691 692.. 693 694.. bpo: 1635741 695.. date: 2020-06-12-22-56-17 696.. nonce: mmlp3Q 697.. section: Core and Builtins 698 699Port :mod:`_dbm` to multiphase initialization. 700 701.. 702 703.. bpo: 40957 704.. date: 2020-06-12-12-21-54 705.. nonce: Z8n6I6 706.. section: Core and Builtins 707 708Fix refleak in _Py_fopen_obj() when PySys_Audit() fails 709 710.. 711 712.. bpo: 40950 713.. date: 2020-06-12-00-12-28 714.. nonce: tzMy7m 715.. section: Core and Builtins 716 717Add a state to the :mod:`nis` module (:pep:`3121`) and apply the multiphase 718initialization. Patch by Dong-hee Na. 719 720.. 721 722.. bpo: 40947 723.. date: 2020-06-11-16-06-49 724.. nonce: 72cZcR 725.. section: Core and Builtins 726 727The Python :ref:`Path Configuration <init-path-config>` now takes 728:c:member:`PyConfig.platlibdir` in account. 729 730.. 731 732.. bpo: 40939 733.. date: 2020-06-10-11-27-15 734.. nonce: DO-wAI 735.. section: Core and Builtins 736 737Remove the old parser, the :mod:`parser` module and all associated support 738code, command-line options and environment variables. Patch by Pablo 739Galindo. 740 741.. 742 743.. bpo: 40847 744.. date: 2020-06-09-23-52-32 745.. nonce: 4XAACw 746.. section: Core and Builtins 747 748Fix a bug where a line with only a line continuation character is not 749considered a blank line at tokenizer level. In such cases, more than a 750single `NEWLINE` token was emitted. The old parser was working around the 751issue, but the new parser threw a :exc:`SyntaxError` for valid input due to 752this. For example, an empty line following a line continuation character was 753interpreted as a :exc:`SyntaxError`. 754 755.. 756 757.. bpo: 40890 758.. date: 2020-06-09-00-20-13 759.. nonce: LoRV-g 760.. section: Core and Builtins 761 762Each dictionary view now has a ``mapping`` attribute that provides a 763:class:`types.MappingProxyType` wrapping the original dictionary. Patch 764contributed by Dennis Sweeney. 765 766.. 767 768.. bpo: 40889 769.. date: 2020-06-08-22-46-33 770.. nonce: vIBl-W 771.. section: Core and Builtins 772 773Improved the performance of symmetric difference operations on dictionary 774item views. Patch by Dennis Sweeney. 775 776.. 777 778.. bpo: 40904 779.. date: 2020-06-08-01-08-57 780.. nonce: 76qQzo 781.. section: Core and Builtins 782 783Fix possible segfault in the new PEG parser when parsing f-string containing 784yield statements with no value (:code:`f"{yield}"`). Patch by Pablo Galindo 785 786.. 787 788.. bpo: 40903 789.. date: 2020-06-07-22-50-10 790.. nonce: 7dWejS 791.. section: Core and Builtins 792 793Fixed a possible segfault in the new PEG parser when producing error 794messages for invalid assignments of the form :code:`p=p=`. Patch by Pablo 795Galindo 796 797.. 798 799.. bpo: 40880 800.. date: 2020-06-06-00-23-19 801.. nonce: fjdzSh 802.. section: Core and Builtins 803 804Fix invalid memory read in the new parser when checking newlines in string 805literals. Patch by Pablo Galindo. 806 807.. 808 809.. bpo: 40883 810.. date: 2020-06-05-23-25-00 811.. nonce: M6sQ-Q 812.. section: Core and Builtins 813 814Fix memory leak in when parsing f-strings in the new parser. Patch by Pablo 815Galindo 816 817.. 818 819.. bpo: 40870 820.. date: 2020-06-05-12-48-28 821.. nonce: 9cd2sk 822.. section: Core and Builtins 823 824Raise :exc:`ValueError` when validating custom AST's where the constants 825``True``, ``False`` and ``None`` are used within a :class:`ast.Name` node. 826 827.. 828 829.. bpo: 40854 830.. date: 2020-06-03-13-53-24 831.. nonce: O6vfQU 832.. section: Core and Builtins 833 834Allow overriding :data:`sys.platlibdir` via a new :envvar:`PYTHONPLATLIBDIR` 835environment variable. 836 837.. 838 839.. bpo: 40826 840.. date: 2020-06-01-20-31-07 841.. nonce: XCI4M2 842.. section: Core and Builtins 843 844Fix GIL usage in :c:func:`PyOS_Readline`: lock the GIL to set an exception 845and pass the Python thread state when checking if there is a pending signal. 846 847.. 848 849.. bpo: 1635741 850.. date: 2020-05-30-23-23-35 851.. nonce: 0D-laM 852.. section: Core and Builtins 853 854Port :mod:`fcntl` to multiphase initialization. 855 856.. 857 858.. bpo: 19468 859.. date: 2020-05-30-23-18-35 860.. nonce: S-TA7p 861.. section: Core and Builtins 862 863Delete unnecessary instance check in importlib.reload(). Patch by Furkan 864Önder. 865 866.. 867 868.. bpo: 40824 869.. date: 2020-05-30-14-37-18 870.. nonce: XR3V5s 871.. section: Core and Builtins 872 873Unexpected errors in calling the ``__iter__`` method are no longer masked by 874``TypeError`` in the :keyword:`in` operator and functions 875:func:`~operator.contains`, :func:`~operator.indexOf` and 876:func:`~operator.countOf` of the :mod:`operator` module. 877 878.. 879 880.. bpo: 40792 881.. date: 2020-05-27-22-37-58 882.. nonce: WEDqqU 883.. section: Core and Builtins 884 885Attributes ``start``, ``stop`` and ``step`` of the :class:`range` object now 886always has exact type :class:`int`. Previously, they could have been an 887instance of a subclass of ``int``. 888 889.. 890 891.. bpo: 40780 892.. date: 2020-05-26-17-43-58 893.. nonce: 3Ckdgm 894.. section: Core and Builtins 895 896Fix a corner case where g-style string formatting of a float failed to 897remove trailing zeros. 898 899.. 900 901.. bpo: 38964 902.. date: 2020-05-25-21-49-11 903.. nonce: lrml90 904.. section: Core and Builtins 905 906When there's a :exc:`SyntaxError` in the expression part of an fstring, the 907filename attribute of the :exc:`SyntaxError` gets correctly set to the name 908of the file the fstring resides in. 909 910.. 911 912.. bpo: 40750 913.. date: 2020-05-24-02-42-26 914.. nonce: ZmO9Ev 915.. section: Core and Builtins 916 917Support the "-d" debug flag in the new PEG parser. Patch by Pablo Galindo 918 919.. 920 921.. bpo: 40217 922.. date: 2020-05-23-01-15-51 923.. nonce: jZsHTc 924.. section: Core and Builtins 925 926Instances of types created with :c:func:`PyType_FromSpecWithBases` will no 927longer automatically visit their class object when traversing references in 928the garbage collector. The user is expected to manually visit the object's 929class. Patch by Pablo Galindo. 930 931.. 932 933.. bpo: 39573 934.. date: 2020-05-22-00-34-34 935.. nonce: QO2QHj 936.. section: Core and Builtins 937 938:c:func:`Py_TYPE()` is changed to the inline static function. Patch by 939Dong-hee Na. 940 941.. 942 943.. bpo: 40696 944.. date: 2020-05-21-01-54-00 945.. nonce: u3n8Wx 946.. section: Core and Builtins 947 948Fix a hang that can arise after :meth:`generator.throw` due to a cycle in 949the exception context chain. 950 951.. 952 953.. bpo: 40521 954.. date: 2020-05-20-01-17-34 955.. nonce: wvAehI 956.. section: Core and Builtins 957 958Each interpreter now its has own free lists, singletons and caches: 959 960* Free lists: float, tuple, list, dict, frame, context, 961 asynchronous generator, MemoryError. 962* Singletons: empty tuple, empty bytes string, empty Unicode string, 963 single byte character, single Unicode (latin1) character. 964* Slice cache. 965 966They are no longer shared by all interpreters. 967 968.. 969 970.. bpo: 40679 971.. date: 2020-05-19-19-39-49 972.. nonce: SVzz9p 973.. section: Core and Builtins 974 975Certain :exc:`TypeError` messages about missing or extra arguments now 976include the function's :term:`qualified name`. Patch by Dennis Sweeney. 977 978.. 979 980.. bpo: 29590 981.. date: 2020-05-03-22-26-00 982.. nonce: aRz3l7 983.. section: Core and Builtins 984 985Make the stack trace correct after calling :meth:`generator.throw` on a 986generator that has yielded from a ``yield from``. 987 988.. 989 990.. bpo: 4022 991.. date: 2020-04-11-13-07-49 992.. nonce: Ctpn_F 993.. section: Core and Builtins 994 995Improve performance of generators by not raising internal StopIteration. 996 997.. 998 999.. bpo: 1635741 1000.. date: 2020-04-10-23-54-57 1001.. nonce: ZURqoN 1002.. section: Core and Builtins 1003 1004Port :mod:`mmap` to multiphase initialization. 1005 1006.. 1007 1008.. bpo: 1635741 1009.. date: 2020-04-05-02-35-08 1010.. nonce: Kfe9fT 1011.. section: Core and Builtins 1012 1013Port :mod:`_lzma` to multiphase initialization. 1014 1015.. 1016 1017.. bpo: 37999 1018.. date: 2019-09-01-14-26-02 1019.. nonce: XPl6dn 1020.. section: Core and Builtins 1021 1022Builtin and extension functions that take integer arguments no longer accept 1023:class:`~decimal.Decimal`\ s, :class:`~fractions.Fraction`\ s and other 1024objects that can be converted to integers only with a loss (e.g. that have 1025the :meth:`~object.__int__` method but do not have the 1026:meth:`~object.__index__` method). 1027 1028.. 1029 1030.. bpo: 29882 1031.. date: 2019-06-02-11-29-15 1032.. nonce: AkRzjb 1033.. section: Core and Builtins 1034 1035Add :meth:`int.bit_count()`, counting the number of ones in the binary 1036representation of an integer. Patch by Niklas Fiekas. 1037 1038.. 1039 1040.. bpo: 36982 1041.. date: 2019-05-25-05-27-39 1042.. nonce: 0UHgfB 1043.. section: Core and Builtins 1044 1045Use ncurses extended color functions when available to support terminals 1046with 256 colors, and add the new function 1047:func:`curses.has_extended_color_support` to indicate whether extended color 1048support is provided by the underlying ncurses library. 1049 1050.. 1051 1052.. bpo: 19569 1053.. date: 2018-08-29-15-57-07 1054.. nonce: RGu2Kb 1055.. section: Core and Builtins 1056 1057Add the private macros ``_Py_COMP_DIAG_PUSH``, 1058``_Py_COMP_DIAG_IGNORE_DEPR_DECLS``, and ``_Py_COMP_DIAG_POP``. 1059 1060.. 1061 1062.. bpo: 26680 1063.. date: 2018-03-15-11-51-36 1064.. nonce: wOWYps 1065.. section: Core and Builtins 1066 1067The int type now supports the x.is_integer() method for compatibility with 1068float. 1069 1070.. 1071 1072.. bpo: 41900 1073.. date: 2020-10-01-10-50-12 1074.. nonce: Cho7oh 1075.. section: Library 1076 1077C14N 2.0 serialisation in xml.etree.ElementTree failed for unprefixed 1078attributes when a default namespace was defined. 1079 1080.. 1081 1082.. bpo: 41887 1083.. date: 2020-09-30-23-49-42 1084.. nonce: -ee2S- 1085.. section: Library 1086 1087Strip leading spaces and tabs on :func:`ast.literal_eval`. Also document 1088stripping of spaces and tabs for :func:`eval`. 1089 1090.. 1091 1092.. bpo: 41773 1093.. date: 2020-09-28-23-22-25 1094.. nonce: oKkus0 1095.. section: Library 1096 1097Note in documentation that :func:`random.choices` doesn't support non-finite 1098weights, raise :exc:`ValueError` when given non-finite weights. 1099 1100.. 1101 1102.. bpo: 41840 1103.. date: 2020-09-23-23-17-59 1104.. nonce: QRFr4L 1105.. section: Library 1106 1107Fix a bug in the :mod:`symtable` module that was causing module-scope global 1108variables to not be reported as both local and global. Patch by Pablo 1109Galindo. 1110 1111.. 1112 1113.. bpo: 41842 1114.. date: 2020-09-23-22-52-24 1115.. nonce: lIuhC9 1116.. section: Library 1117 1118Add :func:`codecs.unregister` function to unregister a codec search 1119function. 1120 1121.. 1122 1123.. bpo: 40564 1124.. date: 2020-09-23-03-33-37 1125.. nonce: iXQqMq 1126.. section: Library 1127 1128In ``zipfile.Path``, mutate the passed ZipFile object type instead of making 1129a copy. Prevents issues when both the local copy and the caller’s copy 1130attempt to close the same file handle. 1131 1132.. 1133 1134.. bpo: 40670 1135.. date: 2020-09-22-14-55-34 1136.. nonce: R5sm68 1137.. section: Library 1138 1139More reliable validation of statements in :class:`timeit.Timer`. It now 1140accepts "empty" statements (only whitespaces and comments) and rejects 1141misindentent statements. 1142 1143.. 1144 1145.. bpo: 41833 1146.. date: 2020-09-22-13-51-14 1147.. nonce: 6HVDjT 1148.. section: Library 1149 1150The :class:`threading.Thread` constructor now uses the target name if the 1151*target* argument is specified but the *name* argument is omitted. 1152 1153.. 1154 1155.. bpo: 41817 1156.. date: 2020-09-22-00-23-30 1157.. nonce: bnh-VG 1158.. section: Library 1159 1160fix `tkinter.EventType` Enum so all members are strings, and none are tuples 1161 1162.. 1163 1164.. bpo: 41810 1165.. date: 2020-09-20-15-14-05 1166.. nonce: 7l8lyV 1167.. section: Library 1168 1169:data:`types.EllipsisType`, :data:`types.NotImplementedType` and 1170:data:`types.NoneType` have been reintroduced, providing a new set of types 1171readily interpretable by static type checkers. 1172 1173.. 1174 1175.. bpo: 41815 1176.. date: 2020-09-19-23-14-54 1177.. nonce: RNpuX3 1178.. section: Library 1179 1180Fix SQLite3 segfault when backing up closed database. Patch contributed by 1181Peter David McCormick. 1182 1183.. 1184 1185.. bpo: 41816 1186.. date: 2020-09-19-12-22-08 1187.. nonce: ynynXJ 1188.. section: Library 1189 1190StrEnum added: it ensures that all members are already strings or string 1191candidates 1192 1193.. 1194 1195.. bpo: 41517 1196.. date: 2020-09-15-22-43-30 1197.. nonce: sLBH7g 1198.. section: Library 1199 1200fix bug allowing Enums to be extended via multiple inheritance 1201 1202.. 1203 1204.. bpo: 39587 1205.. date: 2020-09-15-14-56-13 1206.. nonce: 69xzuh 1207.. section: Library 1208 1209use the correct mix-in data type when constructing Enums 1210 1211.. 1212 1213.. bpo: 41792 1214.. date: 2020-09-15-07-55-35 1215.. nonce: qMpSlU 1216.. section: Library 1217 1218Add is_typeddict function to typing.py to check if a type is a TypedDict 1219class 1220 1221Previously there was no way to check that without using private API. See the 1222`relevant issue in python/typing 1223<https://github.com/python/typing/issues/751>` 1224 1225.. 1226 1227.. bpo: 41789 1228.. date: 2020-09-14-19-27-46 1229.. nonce: pI_uZQ 1230.. section: Library 1231 1232Honor `object` overrides in `Enum` class creation (specifically, `__str__`, 1233`__repr__`, `__format__`, and `__reduce_ex__`). 1234 1235.. 1236 1237.. bpo: 32218 1238.. date: 2020-09-12-16-18-42 1239.. nonce: IpYkEe 1240.. section: Library 1241 1242`enum.Flag` and `enum.IntFlag` members are now iterable 1243 1244.. 1245 1246.. bpo: 39651 1247.. date: 2020-09-11-12-38-55 1248.. nonce: JMp9l2 1249.. section: Library 1250 1251Fix a race condition in the ``call_soon_threadsafe()`` method of 1252``asyncio.ProactorEventLoop``: do nothing if the self-pipe socket has been 1253closed. 1254 1255.. 1256 1257.. bpo: 1635741 1258.. date: 2020-09-08-13-55-34 1259.. nonce: 56MLP- 1260.. section: Library 1261 1262Port the ``mashal`` extension module to the multi-phase initialization API 1263(:pep:`489`). 1264 1265.. 1266 1267.. bpo: 1635741 1268.. date: 2020-09-08-13-51-16 1269.. nonce: wkPeoT 1270.. section: Library 1271 1272Port the ``_string`` extension module to the multi-phase initialization API 1273(:pep:`489`). 1274 1275.. 1276 1277.. bpo: 41732 1278.. date: 2020-09-06-20-27-10 1279.. nonce: 1SKv26 1280.. section: Library 1281 1282Added an :term:`iterator` to :class:`memoryview`. 1283 1284.. 1285 1286.. bpo: 41720 1287.. date: 2020-09-04-20-45-38 1288.. nonce: PW9MzZ 1289.. section: Library 1290 1291Fixed :meth:`turtle.Vec2D.__rmul__` for arguments which are not int or 1292float. 1293 1294.. 1295 1296.. bpo: 41696 1297.. date: 2020-09-03-01-35-32 1298.. nonce: zkYGre 1299.. section: Library 1300 1301Fix handling of debug mode in :func:`asyncio.run`. This allows setting 1302``PYTHONASYNCIODEBUG`` or ``-X dev`` to enable asyncio debug mode when using 1303:func:`asyncio.run`. 1304 1305.. 1306 1307.. bpo: 41687 1308.. date: 2020-09-01-15-57-51 1309.. nonce: m1b1KA 1310.. section: Library 1311 1312Fix implementation of sendfile to be compatible with Solaris. 1313 1314.. 1315 1316.. bpo: 41662 1317.. date: 2020-08-30-21-38-57 1318.. nonce: 6e9iZn 1319.. section: Library 1320 1321No longer override exceptions raised in ``__len__()`` of a sequence of 1322parameters in :mod:`sqlite3` with :exc:`~sqlite3.ProgrammingError`. 1323 1324.. 1325 1326.. bpo: 39010 1327.. date: 2020-08-30-10-24-26 1328.. nonce: _mzXJW 1329.. section: Library 1330 1331Restarting a ``ProactorEventLoop`` on Windows no longer logs spurious 1332``ConnectionResetErrors``. 1333 1334.. 1335 1336.. bpo: 41638 1337.. date: 2020-08-29-16-45-12 1338.. nonce: iZfW5N 1339.. section: Library 1340 1341:exc:`~sqlite3.ProgrammingError` message for absent parameter in 1342:mod:`sqlite3` contains now the name of the parameter instead of its index 1343when parameters are supplied as a dict. 1344 1345.. 1346 1347.. bpo: 41662 1348.. date: 2020-08-29-16-07-36 1349.. nonce: Mn79zh 1350.. section: Library 1351 1352Fixed crash when mutate list of parameters during iteration in 1353:mod:`sqlite3`. 1354 1355.. 1356 1357.. bpo: 41513 1358.. date: 2020-08-23-14-23-18 1359.. nonce: DGqc_I 1360.. section: Library 1361 1362Improved the accuracy of math.hypot(). Internally, each step is computed 1363with extra precision so that the result is now almost always correctly 1364rounded. 1365 1366.. 1367 1368.. bpo: 41609 1369.. date: 2020-08-21-15-51-15 1370.. nonce: JmiUKG 1371.. section: Library 1372 1373The pdb whatis command correctly reports instance methods as 'Method' rather 1374than 'Function'. 1375 1376.. 1377 1378.. bpo: 39994 1379.. date: 2020-08-15-18-17-21 1380.. nonce: dOgPOh 1381.. section: Library 1382 1383Fixed pprint's handling of dict subclasses that override __repr__. 1384 1385.. 1386 1387.. bpo: 32751 1388.. date: 2020-08-15-15-50-12 1389.. nonce: 85je5X 1390.. section: Library 1391 1392When cancelling the task due to a timeout, :meth:`asyncio.wait_for` will now 1393wait until the cancellation is complete also in the case when *timeout* is 1394<= 0, like it does with positive timeouts. 1395 1396.. 1397 1398.. bpo: 37658 1399.. date: 2020-08-15-15-21-40 1400.. nonce: f9nivB 1401.. section: Library 1402 1403:meth:`asyncio.wait_for` now properly handles races between cancellation of 1404itself and the completion of the wrapped awaitable. 1405 1406.. 1407 1408.. bpo: 40782 1409.. date: 2020-08-13-08-07-25 1410.. nonce: aGZqmB 1411.. section: Library 1412 1413Change the method asyncio.AbstractEventLoop.run_in_executor to not be a 1414coroutine. 1415 1416.. 1417 1418.. bpo: 41520 1419.. date: 2020-08-12-13-25-16 1420.. nonce: BEUWa4 1421.. section: Library 1422 1423Fix :mod:`codeop` regression that prevented turning compile warnings into 1424errors. 1425 1426.. 1427 1428.. bpo: 41528 1429.. date: 2020-08-12-07-43-31 1430.. nonce: bu83oD 1431.. section: Library 1432 1433turtle uses math module functions to convert degrees to radians and vice 1434versa and to calculate vector norm 1435 1436.. 1437 1438.. bpo: 41513 1439.. date: 2020-08-09-18-16-05 1440.. nonce: e6K6EK 1441.. section: Library 1442 1443Minor algorithmic improvement to math.hypot() and math.dist() giving small 1444gains in speed and accuracy. 1445 1446.. 1447 1448.. bpo: 41503 1449.. date: 2020-08-07-15-18-16 1450.. nonce: IYftcu 1451.. section: Library 1452 1453Fixed a race between setTarget and flush in logging.handlers.MemoryHandler. 1454 1455.. 1456 1457.. bpo: 41497 1458.. date: 2020-08-07-06-06-29 1459.. nonce: aBtsWz 1460.. section: Library 1461 1462Fix potential UnicodeDecodeError in dis module. 1463 1464.. 1465 1466.. bpo: 41467 1467.. date: 2020-08-04-00-20-30 1468.. nonce: Z8DgTL 1469.. section: Library 1470 1471On Windows, fix asyncio ``recv_into()`` return value when the socket/pipe is 1472closed (:exc:`BrokenPipeError`): return ``0`` rather than an empty byte 1473string (``b''``). 1474 1475.. 1476 1477.. bpo: 41425 1478.. date: 2020-08-03-01-59-48 1479.. nonce: KJo6zF 1480.. section: Library 1481 1482Make tkinter doc example runnable. 1483 1484.. 1485 1486.. bpo: 41421 1487.. date: 2020-08-01-00-51-15 1488.. nonce: dHKRVB 1489.. section: Library 1490 1491Make an algebraic simplification to random.paretovariate(). It now is 1492slightly less subject to round-off error and is slightly faster. Inputs that 1493used to cause ZeroDivisionError now cause an OverflowError instead. 1494 1495.. 1496 1497.. bpo: 41440 1498.. date: 2020-07-30-14-56-58 1499.. nonce: rju34k 1500.. section: Library 1501 1502Add :func:`os.cpu_count()` support for VxWorks RTOS. 1503 1504.. 1505 1506.. bpo: 41316 1507.. date: 2020-07-28-12-08-58 1508.. nonce: bSCbK4 1509.. section: Library 1510 1511Fix the :mod:`tarfile` module to write only basename of TAR file to GZIP 1512compression header. 1513 1514.. 1515 1516.. bpo: 41384 1517.. date: 2020-07-26-21-18-43 1518.. nonce: MlzIgV 1519.. section: Library 1520 1521Raise TclError instead of TypeError when an unknown option is passed to 1522tkinter.OptionMenu. 1523 1524.. 1525 1526.. bpo: 41317 1527.. date: 2020-07-23-01-18-34 1528.. nonce: O17Z6x 1529.. section: Library 1530 1531Use add_done_callback() in asyncio.loop.sock_accept() to unsubscribe reader 1532early on cancellation. 1533 1534.. 1535 1536.. bpo: 41364 1537.. date: 2020-07-21-21-45-55 1538.. nonce: 5O-k7A 1539.. section: Library 1540 1541Reduce import overhead of :mod:`uuid`. 1542 1543.. 1544 1545.. bpo: 35328 1546.. date: 2020-07-21-16-20-55 1547.. nonce: jXovHb 1548.. section: Library 1549 1550Set the environment variable ``VIRTUAL_ENV_PROMPT`` at :mod:`venv` 1551activation. 1552 1553.. 1554 1555.. bpo: 41341 1556.. date: 2020-07-20-19-13-17 1557.. nonce: wqrj8C 1558.. section: Library 1559 1560Recursive evaluation of `typing.ForwardRef` in `get_type_hints`. 1561 1562.. 1563 1564.. bpo: 41344 1565.. date: 2020-07-20-13-27-48 1566.. nonce: iKipNd 1567.. section: Library 1568 1569Prevent creating :class:`shared_memory.SharedMemory` objects with 1570:code:`size=0`. 1571 1572.. 1573 1574.. bpo: 41333 1575.. date: 2020-07-18-18-07-40 1576.. nonce: upkHIm 1577.. section: Library 1578 1579:meth:`collections.OrderedDict.pop` is now 2 times faster. 1580 1581.. 1582 1583.. bpo: 41288 1584.. date: 2020-07-13-15-06-35 1585.. nonce: 8mn5P- 1586.. section: Library 1587 1588Unpickling invalid NEWOBJ_EX opcode with the C implementation raises now 1589UnpicklingError instead of crashing. 1590 1591.. 1592 1593.. bpo: 39017 1594.. date: 2020-07-12-22-16-58 1595.. nonce: x3Cg-9 1596.. section: Library 1597 1598Avoid infinite loop when reading specially crafted TAR files using the 1599tarfile module (CVE-2019-20907). 1600 1601.. 1602 1603.. bpo: 41273 1604.. date: 2020-07-11-00-15-01 1605.. nonce: SVrsJh 1606.. section: Library 1607 1608Speed up any transport using ``_ProactorReadPipeTransport`` by calling 1609``recv_into`` instead of ``recv``, thus not creating a new buffer for each 1610``recv`` call in the transport's read loop. 1611 1612.. 1613 1614.. bpo: 41235 1615.. date: 2020-07-07-21-56-26 1616.. nonce: H2csMU 1617.. section: Library 1618 1619Fix the error handling in :meth:`ssl.SSLContext.load_dh_params`. 1620 1621.. 1622 1623.. bpo: 41207 1624.. date: 2020-07-06-16-58-53 1625.. nonce: Emw7Nk 1626.. section: Library 1627 1628In distutils.spawn, restore expectation that DistutilsExecError is raised 1629when the command is not found. 1630 1631.. 1632 1633.. bpo: 29727 1634.. date: 2020-07-05-19-16-02 1635.. nonce: Q6Z2rg 1636.. section: Library 1637 1638Register :class:`array.array` as a 1639:class:`~collections.abc.MutableSequence`. Patch by Pablo Galindo. 1640 1641.. 1642 1643.. bpo: 39168 1644.. date: 2020-07-04-21-56-46 1645.. nonce: DQWsXj 1646.. section: Library 1647 1648Remove the ``__new__`` method of :class:`typing.Generic`. 1649 1650.. 1651 1652.. bpo: 41194 1653.. date: 2020-07-03-13-15-08 1654.. nonce: djrKjs 1655.. section: Library 1656 1657Fix a crash in the ``_ast`` module: it can no longer be loaded more than 1658once. It now uses a global state rather than a module state. 1659 1660.. 1661 1662.. bpo: 41195 1663.. date: 2020-07-02-15-03-04 1664.. nonce: cEnpO3 1665.. section: Library 1666 1667Add read-only ssl.SSLContext.security_level attribute to retrieve the 1668context's security level. 1669 1670.. 1671 1672.. bpo: 41193 1673.. date: 2020-07-02-11-53-45 1674.. nonce: 8-Tnql 1675.. section: Library 1676 1677The ``write_history()`` atexit function of the readline completer now 1678ignores any :exc:`OSError` to ignore error if the filesystem is read-only, 1679instead of only ignoring :exc:`FileNotFoundError` and 1680:exc:`PermissionError`. 1681 1682.. 1683 1684.. bpo: 41182 1685.. date: 2020-07-01-17-33-50 1686.. nonce: FPFI0N 1687.. section: Library 1688 1689selector: use DefaultSelector based upon implementation 1690 1691.. 1692 1693.. bpo: 41161 1694.. date: 2020-06-30-20-50-51 1695.. nonce: QTdJjz 1696.. section: Library 1697 1698The decimal module now requires libmpdec-2.5.0. Users of 1699--with-system-libmpdec should update their system library. 1700 1701.. 1702 1703.. bpo: 40874 1704.. date: 2020-06-28-21-16-51 1705.. nonce: YImvzA 1706.. section: Library 1707 1708The decimal module now requires libmpdec-2.5.0. 1709 1710.. 1711 1712.. bpo: 41138 1713.. date: 2020-06-27-13-51-36 1714.. nonce: bIpf7g 1715.. section: Library 1716 1717Fixed the :mod:`trace` module CLI for Python source files with non-UTF-8 1718encoding. 1719 1720.. 1721 1722.. bpo: 31082 1723.. date: 2020-06-25-10-11-47 1724.. nonce: HsgDkx 1725.. section: Library 1726 1727Use the term "iterable" in the docstring for :func:`functools.reduce`. 1728 1729.. 1730 1731.. bpo: 40521 1732.. date: 2020-06-23-06-09-59 1733.. nonce: HUfxP7 1734.. section: Library 1735 1736Remove freelist from collections.deque(). 1737 1738.. 1739 1740.. bpo: 31938 1741.. date: 2020-06-22-20-08-40 1742.. nonce: EVuko9 1743.. section: Library 1744 1745Fix default-value signatures of several functions in the :mod:`select` 1746module - by Anthony Sottile. 1747 1748.. 1749 1750.. bpo: 41068 1751.. date: 2020-06-22-10-25-39 1752.. nonce: _bX2BW 1753.. section: Library 1754 1755Fixed reading files with non-ASCII names from ZIP archive directly after 1756writing them. 1757 1758.. 1759 1760.. bpo: 41058 1761.. date: 2020-06-20-21-03-55 1762.. nonce: gztdZy 1763.. section: Library 1764 1765:func:`pdb.find_function` now correctly determines the source file encoding. 1766 1767.. 1768 1769.. bpo: 41056 1770.. date: 2020-06-20-18-37-29 1771.. nonce: d9v_uL 1772.. section: Library 1773 1774Invalid file descriptor values are now prevented from being passed to 1775os.fpathconf. (discovered by Coverity) 1776 1777.. 1778 1779.. bpo: 41056 1780.. date: 2020-06-20-18-35-43 1781.. nonce: Garcle 1782.. section: Library 1783 1784Fix a NULL pointer dereference within the ssl module during a MemoryError in 1785the keylog callback. (discovered by Coverity) 1786 1787.. 1788 1789.. bpo: 41056 1790.. date: 2020-06-20-18-33-03 1791.. nonce: gTH4Bq 1792.. section: Library 1793 1794Fixed an instance where a MemoryError within the zoneinfo module might not 1795be reported or not reported at its source. (found by Coverity) 1796 1797.. 1798 1799.. bpo: 41048 1800.. date: 2020-06-20-10-16-57 1801.. nonce: hEXB-B 1802.. section: Library 1803 1804:func:`mimetypes.read_mime_types` function reads the rule file using UTF-8 1805encoding, not the locale encoding. Patch by Srinivas Reddy Thatiparthy. 1806 1807.. 1808 1809.. bpo: 41043 1810.. date: 2020-06-20-00-19-30 1811.. nonce: p-Pk-H 1812.. section: Library 1813 1814Fixed the use of :func:`~glob.glob` in the stdlib: literal part of the path 1815is now always correctly escaped. 1816 1817.. 1818 1819.. bpo: 41025 1820.. date: 2020-06-18-10-34-59 1821.. nonce: elf_nz 1822.. section: Library 1823 1824Fixed an issue preventing the C implementation of :class:`zoneinfo.ZoneInfo` 1825from being subclassed. 1826 1827.. 1828 1829.. bpo: 35018 1830.. date: 2020-06-17-23-49-45 1831.. nonce: NP5_Qk 1832.. section: Library 1833 1834Add the :class:`xml.sax.handler.LexicalHandler` class that is present in 1835other SAX XML implementations. 1836 1837.. 1838 1839.. bpo: 41002 1840.. date: 2020-06-17-17-26-24 1841.. nonce: NPBItE 1842.. section: Library 1843 1844Improve performance of HTTPResponse.read with a given amount. Patch by Bruce 1845Merry. 1846 1847.. 1848 1849.. bpo: 40448 1850.. date: 2020-06-15-12-22-53 1851.. nonce: 1dk8Bu 1852.. section: Library 1853 1854:mod:`ensurepip` now disables the use of `pip` cache when installing the 1855bundled versions of `pip` and `setuptools`. Patch by Krzysztof Konopko. 1856 1857.. 1858 1859.. bpo: 40967 1860.. date: 2020-06-15-00-13-57 1861.. nonce: _dx3OO 1862.. section: Library 1863 1864Removed :meth:`asyncio.Task.current_task` and 1865:meth:`asyncio.Task.all_tasks`. Patch contributed by Rémi Lapeyre. 1866 1867.. 1868 1869.. bpo: 40924 1870.. date: 2020-06-13-12-04-50 1871.. nonce: SM_luS 1872.. section: Library 1873 1874Ensure ``importlib.resources.path`` returns an extant path for the 1875SourceFileLoader's resource reader. Avoids the regression identified in 1876master while a long-term solution is devised. 1877 1878.. 1879 1880.. bpo: 40955 1881.. date: 2020-06-12-11-55-30 1882.. nonce: huixCg 1883.. section: Library 1884 1885Fix a minor memory leak in :mod:`subprocess` module when extra_groups was 1886specified. 1887 1888.. 1889 1890.. bpo: 40855 1891.. date: 2020-06-12-10-44-15 1892.. nonce: jSot83 1893.. section: Library 1894 1895The standard deviation and variance functions in the statistics module were 1896ignoring their mu and xbar arguments. 1897 1898.. 1899 1900.. bpo: 40939 1901.. date: 2020-06-11-11-07-10 1902.. nonce: -D5Asl 1903.. section: Library 1904 1905Use the new PEG parser when generating the stdlib :mod:`keyword` module. 1906 1907.. 1908 1909.. bpo: 23427 1910.. date: 2020-06-08-18-59-16 1911.. nonce: ilg1Cz 1912.. section: Library 1913 1914Add :data:`sys.orig_argv` attribute: the list of the original command line 1915arguments passed to the Python executable. 1916 1917.. 1918 1919.. bpo: 33689 1920.. date: 2020-06-06-14-09-55 1921.. nonce: EFUDH7 1922.. section: Library 1923 1924Ignore empty or whitespace-only lines in .pth files. This matches the 1925documentated behavior. Before, empty lines caused the site-packages dir to 1926appear multiple times in sys.path. By Ido Michael, contributors Malcolm 1927Smith and Tal Einat. 1928 1929.. 1930 1931.. bpo: 40884 1932.. date: 2020-06-06-02-42-26 1933.. nonce: n7fOwS 1934.. section: Library 1935 1936Added a `defaults` parameter to :class:`logging.Formatter`, to allow 1937specifying default values for custom fields. Patch by Asaf Alon and Bar 1938Harel. 1939 1940.. 1941 1942.. bpo: 40876 1943.. date: 2020-06-05-20-00-18 1944.. nonce: zDhiZj 1945.. section: Library 1946 1947Clarify error message in the :mod:`csv` module. 1948 1949.. 1950 1951.. bpo: 39791 1952.. date: 2020-06-05-19-29-10 1953.. nonce: _CcO3d 1954.. section: Library 1955 1956Refresh importlib.metadata from importlib_metadata 1.6.1. 1957 1958.. 1959 1960.. bpo: 40807 1961.. date: 2020-06-04-16-25-15 1962.. nonce: yYyLWx 1963.. section: Library 1964 1965Stop codeop._maybe_compile, used by code.InteractiveInterpreter (and IDLE). 1966from emitting each warning three times. 1967 1968.. 1969 1970.. bpo: 32604 1971.. date: 2020-06-02-23-49-07 1972.. nonce: ZN4V4l 1973.. section: Library 1974 1975Fix reference leak in the :mod:`select` module when the module is imported 1976in a subinterpreter. 1977 1978.. 1979 1980.. bpo: 39791 1981.. date: 2020-06-02-02-16-02 1982.. nonce: StCJlA 1983.. section: Library 1984 1985Built-in loaders (SourceFileLoader and ZipImporter) now supply 1986``TraversableResources`` implementations for ``ResourceReader``, and the 1987fallback function has been removed. 1988 1989.. 1990 1991.. bpo: 39314 1992.. date: 2020-06-01-02-16-29 1993.. nonce: 0T9hlA 1994.. section: Library 1995 1996:class:`rlcompleter.Completer` and the standard Python shell now close the 1997parenthesis for functions that take no arguments. Patch contributed by Rémi 1998Lapeyre. 1999 2000.. 2001 2002.. bpo: 17005 2003.. date: 2020-05-31-23-32-36 2004.. nonce: JlRUGB 2005.. section: Library 2006 2007The topological sort functionality that was introduced initially in the 2008:mod:`functools` module has been moved to a new :mod:`graphlib` module to 2009better accommodate the new tools and keep the original scope of the 2010:mod:`functools` module. Patch by Pablo Galindo 2011 2012.. 2013 2014.. bpo: 40834 2015.. date: 2020-05-31-15-52-18 2016.. nonce: MO9_hb 2017.. section: Library 2018 2019Fix truncate when sending str object with_xxsubinterpreters.channel_send. 2020 2021.. 2022 2023.. bpo: 40755 2024.. date: 2020-05-30-18-48-58 2025.. nonce: IyOe2J 2026.. section: Library 2027 2028Add rich comparisons to collections.Counter(). 2029 2030.. 2031 2032.. bpo: 26407 2033.. date: 2020-05-30-14-19-47 2034.. nonce: MjWLO1 2035.. section: Library 2036 2037Unexpected errors in calling the ``__iter__`` method are no longer masked by 2038``TypeError`` in :func:`csv.reader`, :func:`csv.writer.writerow` and 2039:meth:`csv.writer.writerows`. 2040 2041.. 2042 2043.. bpo: 39384 2044.. date: 2020-05-30-12-44-29 2045.. nonce: Iqxy3q 2046.. section: Library 2047 2048Fixed email.contentmanager to allow set_content() to set a null string. 2049 2050.. 2051 2052.. bpo: 40744 2053.. date: 2020-05-30-08-10-23 2054.. nonce: jKURVV 2055.. section: Library 2056 2057The :mod:`sqlite3` module uses SQLite API functions that require SQLite 2058v3.7.3 or higher. This patch removes support for older SQLite versions, and 2059explicitly requires SQLite 3.7.3 both at build, compile and runtime. Patch 2060by Sergey Fedoseev and Erlend E. Aasland. 2061 2062.. 2063 2064.. bpo: 40777 2065.. date: 2020-05-28-17-32-29 2066.. nonce: 1kJU6N 2067.. section: Library 2068 2069Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time to avoid 2070errors on some compilers. 2071 2072.. 2073 2074.. bpo: 38488 2075.. date: 2020-05-28-16-51-00 2076.. nonce: hFQNgA 2077.. section: Library 2078 2079Update ensurepip to install pip 20.1.1 and setuptools 47.1.0. 2080 2081.. 2082 2083.. bpo: 40792 2084.. date: 2020-05-27-22-19-42 2085.. nonce: 87Yx01 2086.. section: Library 2087 2088The result of :func:`operator.index` now always has exact type :class:`int`. 2089Previously, the result could have been an instance of a subclass of ``int``. 2090 2091.. 2092 2093.. bpo: 40767 2094.. date: 2020-05-27-21-27-01 2095.. nonce: L5MnVV 2096.. section: Library 2097 2098:mod:`webbrowser` now properly finds the default browser in pure Wayland 2099systems by checking the WAYLAND_DISPLAY environment variable. Patch 2100contributed by Jérémy Attali. 2101 2102.. 2103 2104.. bpo: 40791 2105.. date: 2020-05-27-18-04-52 2106.. nonce: IzpNor 2107.. section: Library 2108 2109:func:`hashlib.compare_digest` uses OpenSSL's ``CRYPTO_memcmp()`` function 2110when OpenSSL is available. 2111 2112.. 2113 2114.. bpo: 40795 2115.. date: 2020-05-27-17-00-18 2116.. nonce: eZSnHA 2117.. section: Library 2118 2119:mod:`ctypes` module: If ctypes fails to convert the result of a callback or 2120if a ctypes callback function raises an exception, sys.unraisablehook is now 2121called with an exception set. Previously, the error was logged into stderr 2122by :c:func:`PyErr_Print`. 2123 2124.. 2125 2126.. bpo: 16995 2127.. date: 2020-05-27-00-09-52 2128.. nonce: 4niOT7 2129.. section: Library 2130 2131Add :func:`base64.b32hexencode` and :func:`base64.b32hexdecode` to support 2132the Base32 Encoding with Extended Hex Alphabet. 2133 2134.. 2135 2136.. bpo: 30008 2137.. date: 2020-05-25-22-18-38 2138.. nonce: CKC3td 2139.. section: Library 2140 2141Fix :mod:`ssl` code to be compatible with OpenSSL 1.1.x builds that use 2142``no-deprecated`` and ``--api=1.1.0``. 2143 2144.. 2145 2146.. bpo: 30064 2147.. date: 2020-05-25-11-52-23 2148.. nonce: 6CICsH 2149.. section: Library 2150 2151Fix asyncio ``loop.sock_*`` race condition issue 2152 2153.. 2154 2155.. bpo: 40759 2156.. date: 2020-05-24-23-52-35 2157.. nonce: DdZdaw 2158.. section: Library 2159 2160Deprecate the :mod:`symbol` module. 2161 2162.. 2163 2164.. bpo: 40756 2165.. date: 2020-05-24-11-06-37 2166.. nonce: 7ZH83z 2167.. section: Library 2168 2169The second argument (extra) of ``LoggerAdapter.__init__`` now defaults to 2170None. 2171 2172.. 2173 2174.. bpo: 37129 2175.. date: 2020-05-23-04-18-00 2176.. nonce: YoYoYo 2177.. section: Library 2178 2179Add a new :data:`os.RWF_APPEND` flag for :func:`os.pwritev`. 2180 2181.. 2182 2183.. bpo: 40737 2184.. date: 2020-05-23-00-22-11 2185.. nonce: iph-CM 2186.. section: Library 2187 2188Fix possible reference leak for :mod:`sqlite3` initialization. 2189 2190.. 2191 2192.. bpo: 40726 2193.. date: 2020-05-22-12-45-58 2194.. nonce: 7oBdMw 2195.. section: Library 2196 2197Handle cases where the ``end_lineno`` is ``None`` on 2198:func:`ast.increment_lineno`. 2199 2200.. 2201 2202.. bpo: 40698 2203.. date: 2020-05-20-14-38-04 2204.. nonce: zwl5Hc 2205.. section: Library 2206 2207:mod:`distutils` upload creates SHA2-256 and Blake2b-256 digests. MD5 2208digests is skipped if platform blocks MD5. 2209 2210.. 2211 2212.. bpo: 40695 2213.. date: 2020-05-20-13-03-28 2214.. nonce: lr4aIS 2215.. section: Library 2216 2217:mod:`hashlib` no longer falls back to builtin hash implementations when 2218OpenSSL provides a hash digest and the algorithm is blocked by security 2219policy. 2220 2221.. 2222 2223.. bpo: 9216 2224.. date: 2020-05-20-12-53-20 2225.. nonce: ps7Yf1 2226.. section: Library 2227 2228func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor 2229``_hashlib.new()``. test_hashlib and test_smtplib handle strict security 2230policy better. 2231 2232.. 2233 2234.. bpo: 40614 2235.. date: 2020-05-18-22-41-02 2236.. nonce: 8j3kmq 2237.. section: Library 2238 2239:func:`ast.parse` will not parse self documenting expressions in f-strings 2240when passed ``feature_version`` is less than ``(3, 8)``. 2241 2242.. 2243 2244.. bpo: 40626 2245.. date: 2020-05-18-17-29-30 2246.. nonce: NeZufF 2247.. section: Library 2248 2249Add h5 file extension as MIME Type application/x-hdf5, as per HDF Group 2250recommendation for HDF5 formatted data files. Patch contributed by Mark 2251Schwab. 2252 2253.. 2254 2255.. bpo: 25920 2256.. date: 2020-05-18-15-38-25 2257.. nonce: PxrLY8 2258.. section: Library 2259 2260On macOS, when building Python for macOS 10.4 and older, which wasn't the 2261case for python.org macOS installer, :func:`socket.getaddrinfo` no longer 2262uses an internal lock to prevent race conditions when calling 2263``getaddrinfo()`` which is thread-safe since macOS 10.5. Python 3.9 requires 2264macOS 10.6 or newer. The internal lock caused random hang on fork when 2265another thread was calling :func:`socket.getaddrinfo`. The lock was also 2266used on FreeBSD older than 5.3, OpenBSD older than 201311 and NetBSD older 2267than 4. 2268 2269.. 2270 2271.. bpo: 40671 2272.. date: 2020-05-18-15-26-31 2273.. nonce: NeZ9Cy 2274.. section: Library 2275 2276Prepare ``_hashlib`` for :pep:`489` and use :c:func:`PyModule_AddType`. 2277 2278.. 2279 2280.. bpo: 32309 2281.. date: 2020-05-17-02-03-09 2282.. nonce: KM9psl 2283.. section: Library 2284 2285Added a new :term:`coroutine` :func:`asyncio.to_thread`. It is mainly used 2286for running IO-bound functions in a separate thread to avoid blocking the 2287event loop, and essentially works as a high-level version of 2288:meth:`~asyncio.loop.run_in_executor` that can directly take keyword 2289arguments. 2290 2291.. 2292 2293.. bpo: 36543 2294.. date: 2020-05-15-21-14-45 2295.. nonce: Jt-eSX 2296.. section: Library 2297 2298Restored the deprecated :mod:`xml.etree.cElementTree` module. 2299 2300.. 2301 2302.. bpo: 40611 2303.. date: 2020-05-13-16-28-33 2304.. nonce: ZCk0_c 2305.. section: Library 2306 2307:data:`~mmap.MAP_POPULATE` constant has now been added to the list of 2308exported :mod:`mmap` module flags. 2309 2310.. 2311 2312.. bpo: 39881 2313.. date: 2020-05-07-22-00-12 2314.. nonce: E1xsNv 2315.. section: Library 2316 2317PEP 554 for use in the test suite. (Patch By Joannah Nanjekye) 2318 2319.. 2320 2321.. bpo: 13097 2322.. date: 2020-05-06-02-01-25 2323.. nonce: Wh5xSK 2324.. section: Library 2325 2326``ctypes`` now raises an ``ArgumentError`` when a callback is invoked with 2327more than 1024 arguments. 2328 2329.. 2330 2331.. bpo: 39385 2332.. date: 2020-04-23-18-21-19 2333.. nonce: MIAyS7 2334.. section: Library 2335 2336A new test assertion context-manager, :func:`unittest.assertNoLogs` will 2337ensure a given block of code emits no log messages using the logging module. 2338Contributed by Kit Yan Choi. 2339 2340.. 2341 2342.. bpo: 23082 2343.. date: 2020-04-20-22-08-36 2344.. nonce: iX90Id 2345.. section: Library 2346 2347Updated the error message and docs of PurePath.relative_to() to better 2348reflect the function behaviour. 2349 2350.. 2351 2352.. bpo: 40318 2353.. date: 2020-04-18-14-16-02 2354.. nonce: K2UdRx 2355.. section: Library 2356 2357Use SQLite3 trace v2 API, if it is available. 2358 2359.. 2360 2361.. bpo: 40105 2362.. date: 2020-04-03-16-13-59 2363.. nonce: hfM2c0 2364.. section: Library 2365 2366ZipFile truncates files to avoid corruption when a shorter comment is 2367provided in append ("a") mode. Patch by Jan Mazur. 2368 2369.. 2370 2371.. bpo: 40084 2372.. date: 2020-03-29-21-32-00 2373.. nonce: MCYwcv 2374.. section: Library 2375 2376Fix ``Enum.__dir__``: dir(Enum.member) now includes attributes as well as 2377methods. 2378 2379.. 2380 2381.. bpo: 31122 2382.. date: 2020-03-11-07-44-06 2383.. nonce: zIQ80l 2384.. section: Library 2385 2386ssl.wrap_socket() now raises ssl.SSLEOFError rather than OSError when peer 2387closes connection during TLS negotiation 2388 2389.. 2390 2391.. bpo: 39728 2392.. date: 2020-02-24-10-58-34 2393.. nonce: kOOaHn 2394.. section: Library 2395 2396fix default `_missing_` so a duplicate `ValueError` is not set as the 2397`__context__` of the original `ValueError` 2398 2399.. 2400 2401.. bpo: 39244 2402.. date: 2020-02-23-15-09-47 2403.. nonce: aBK5IM 2404.. section: Library 2405 2406Fixed :class:`multiprocessing.context.get_all_start_methods` to properly 2407return the default method first on macOS. 2408 2409.. 2410 2411.. bpo: 39040 2412.. date: 2019-12-15-18-47-20 2413.. nonce: tKa0Qs 2414.. section: Library 2415 2416Fix parsing of invalid mime headers parameters by collapsing whitespace 2417between encoded words in a bare-quote-string. 2418 2419.. 2420 2421.. bpo: 38731 2422.. date: 2019-11-13-07-37-11 2423.. nonce: 9qmcSx 2424.. section: Library 2425 2426Add ``--quiet`` option to command-line interface of :mod:`py_compile`. Patch 2427by Gregory Schevchenko. 2428 2429.. 2430 2431.. bpo: 35714 2432.. date: 2019-10-25-23-45-49 2433.. nonce: fw3xb7 2434.. section: Library 2435 2436:exc:`struct.error` is now raised if there is a null character in a 2437:mod:`struct` format string. 2438 2439.. 2440 2441.. bpo: 38144 2442.. date: 2019-09-12-21-34-03 2443.. nonce: 8uQCdd 2444.. section: Library 2445 2446Added the *root_dir* and *dir_fd* parameters in :func:`glob.glob`. 2447 2448.. 2449 2450.. bpo: 26543 2451.. date: 2019-08-11-16-28-03 2452.. nonce: X-TJZO 2453.. section: Library 2454 2455Fix :meth:`IMAP4.noop()` when debug mode is enabled (ex: ``imaplib.Debug = 24563``). 2457 2458.. 2459 2460.. bpo: 12178 2461.. date: 2019-05-31-23-54-28 2462.. nonce: N6FLCZ 2463.. section: Library 2464 2465:func:`csv.writer` now correctly escapes *escapechar* when input contains 2466*escapechar*. Patch by Catalin Iacob, Berker Peksag, and Itay Elbirt. 2467 2468.. 2469 2470.. bpo: 36290 2471.. date: 2019-03-17-19-01-53 2472.. nonce: 7VXo_K 2473.. section: Library 2474 2475AST nodes are now raising :exc:`TypeError` on conflicting keyword arguments. 2476Patch contributed by Rémi Lapeyre. 2477 2478.. 2479 2480.. bpo: 33944 2481.. date: 2019-03-01-01-56-23 2482.. nonce: -82Pkt 2483.. section: Library 2484 2485Added site.py site-packages tracing in verbose mode. 2486 2487.. 2488 2489.. bpo: 35078 2490.. date: 2018-10-27-09-37-03 2491.. nonce: kweA3R 2492.. section: Library 2493 2494Refactor formatweekday, formatmonthname methods in LocaleHTMLCalendar and 2495LocaleTextCalendar classes in calendar module to call the base class 2496methods.This enables customizable CSS classes for LocaleHTMLCalendar. Patch 2497by Srinivas Reddy Thatiparthy 2498 2499.. 2500 2501.. bpo: 29620 2502.. date: 2018-08-21-16-20-33 2503.. nonce: xxx666 2504.. section: Library 2505 2506:func:`~unittest.TestCase.assertWarns` no longer raises a 2507``RuntimeException`` when accessing a module's ``__warningregistry__`` 2508causes importation of a new module, or when a new module is imported in 2509another thread. Patch by Kernc. 2510 2511.. 2512 2513.. bpo: 31844 2514.. date: 2018-07-30-12-48-17 2515.. nonce: 0_GKsD 2516.. section: Library 2517 2518Remove ``ParserBase.error()`` method from the private and undocumented 2519``_markupbase`` module. :class:`html.parser.HTMLParser` is the only 2520subclass of ``ParserBase`` and its ``error()`` implementation was deprecated 2521in Python 3.4 and removed in Python 3.5. 2522 2523.. 2524 2525.. bpo: 34226 2526.. date: 2018-07-29-12-14-54 2527.. nonce: BE7zbu 2528.. section: Library 2529 2530Fix `cgi.parse_multipart` without content_length. Patch by Roger Duran 2531 2532.. 2533 2534.. bpo: 33660 2535.. date: 2018-06-12-23-30-41 2536.. nonce: AdDn5Z 2537.. section: Library 2538 2539Fix pathlib.PosixPath to resolve a relative path located on the root 2540directory properly. 2541 2542.. 2543 2544.. bpo: 28557 2545.. date: 2018-06-07-22-04-01 2546.. nonce: ViNJnK 2547.. section: Library 2548 2549Improve the error message for a misbehaving ``rawio.readinto`` 2550 2551.. 2552 2553.. bpo: 26680 2554.. date: 2018-03-15-11-56-48 2555.. nonce: Udkhn4 2556.. section: Library 2557 2558The d.is_integer() method is added to the Decimal type, for compatibility 2559with other number types. 2560 2561.. 2562 2563.. bpo: 26680 2564.. date: 2018-03-15-11-55-04 2565.. nonce: eKAi85 2566.. section: Library 2567 2568The x.is_integer() method is incorporated into the abstract types of the 2569numeric tower, Real, Rational and Integral, with appropriate default 2570implementations. 2571 2572.. 2573 2574.. bpo: 41428 2575.. date: 2020-10-03-18-20-46 2576.. nonce: _ju1NE 2577.. section: Documentation 2578 2579Add documentation for :pep:`604` (Allow writing union types as ``X | Y``). 2580 2581.. 2582 2583.. bpo: 41774 2584.. date: 2020-09-24-15-35-13 2585.. nonce: 5IqdGP 2586.. section: Documentation 2587 2588In Programming FAQ "Sequences (Tuples/Lists)" section, add "How do you 2589remove multiple items from a list". 2590 2591.. 2592 2593.. bpo: 35293 2594.. date: 2020-09-12-17-37-13 2595.. nonce: _cOwPD 2596.. section: Documentation 2597 2598Fix RemovedInSphinx40Warning when building the documentation. Patch by 2599Dong-hee Na. 2600 2601.. 2602 2603.. bpo: 37149 2604.. date: 2020-09-10-07-48-02 2605.. nonce: VD0rCv 2606.. section: Documentation 2607 2608Change Shipman tkinter doc link from archive.org to TkDocs. (The doc has 2609been removed from the NMT server.) The new link responds much faster and 2610includes a short explanatory note. 2611 2612.. 2613 2614.. bpo: 41726 2615.. date: 2020-09-08-16-57-09 2616.. nonce: g0UXrn 2617.. section: Documentation 2618 2619Update the refcounts info of ``PyType_FromModuleAndSpec``. 2620 2621.. 2622 2623.. bpo: 41624 2624.. date: 2020-08-25-15-11-23 2625.. nonce: ddjJlN 2626.. section: Documentation 2627 2628Fix the signature of :class:`typing.Coroutine`. 2629 2630.. 2631 2632.. bpo: 40204 2633.. date: 2020-08-12-18-35-40 2634.. nonce: C8A_pe 2635.. section: Documentation 2636 2637Enable Sphinx 3.2 ``c_allow_pre_v3`` option and disable 2638``c_warn_on_allowed_pre_v3`` option to make the documentation compatible 2639with Sphinx 2 and Sphinx 3. 2640 2641.. 2642 2643.. bpo: 41045 2644.. date: 2020-07-27-20-46-17 2645.. nonce: GFF6Ul 2646.. section: Documentation 2647 2648Add documentation for debug feature of f-strings. 2649 2650.. 2651 2652.. bpo: 41314 2653.. date: 2020-07-25-14-20-00 2654.. nonce: yrjko0 2655.. section: Documentation 2656 2657Changed the release when ``from __future__ import annotations`` becomes the 2658default from ``4.0`` to ``3.10`` (following a change in PEP 563). 2659 2660.. 2661 2662.. bpo: 40979 2663.. date: 2020-07-21-15-23-30 2664.. nonce: pLA8rO 2665.. section: Documentation 2666 2667Refactored typing.rst, arranging more than 70 classes, functions, and 2668decorators into new sub-sections. 2669 2670.. 2671 2672.. bpo: 40552 2673.. date: 2020-05-09-12-10-31 2674.. nonce: _0uB73 2675.. section: Documentation 2676 2677Fix in tutorial section 4.2. Code snippet is now correct. 2678 2679.. 2680 2681.. bpo: 39883 2682.. date: 2020-03-07-03-53-39 2683.. nonce: 1tnb4- 2684.. section: Documentation 2685 2686Make code, examples, and recipes in the Python documentation be licensed 2687under the more permissive BSD0 license in addition to the existing Python 26882.0 license. 2689 2690.. 2691 2692.. bpo: 37703 2693.. date: 2019-08-16-20-25-42 2694.. nonce: Qm_l_H 2695.. section: Documentation 2696 2697Updated Documentation to comprehensively elaborate on the behaviour of 2698gather.cancel() 2699 2700.. 2701 2702.. bpo: 41939 2703.. date: 2020-10-05-09-37-43 2704.. nonce: P4OlbA 2705.. section: Tests 2706 2707Fix test_site.test_license_exists_at_url(): call 2708``urllib.request.urlcleanup()`` to reset the global 2709``urllib.request._opener``. Patch by Victor Stinner. 2710 2711.. 2712 2713.. bpo: 41731 2714.. date: 2020-09-11-19-12-31 2715.. nonce: Ivxh4U 2716.. section: Tests 2717 2718Make test_cmd_line_script pass with option '-vv'. 2719 2720.. 2721 2722.. bpo: 41602 2723.. date: 2020-08-25-19-25-36 2724.. nonce: Z64s0I 2725.. section: Tests 2726 2727Add tests for SIGINT handling in the runpy module. 2728 2729.. 2730 2731.. bpo: 41521 2732.. date: 2020-08-11-14-59-13 2733.. nonce: w2UYK7 2734.. section: Tests 2735 2736:mod:`test.support`: Rename ``blacklist`` parameter of 2737:func:`~test.support.check__all__` to ``not_exported``. 2738 2739.. 2740 2741.. bpo: 41477 2742.. date: 2020-08-07-17-28-49 2743.. nonce: GrFexU 2744.. section: Tests 2745 2746Make ctypes optional in test_genericalias. 2747 2748.. 2749 2750.. bpo: 41085 2751.. date: 2020-06-23-12-02-45 2752.. nonce: JZKsyz 2753.. section: Tests 2754 2755Fix integer overflow in the :meth:`array.array.index` method on 64-bit 2756Windows for index larger than ``2**31``. 2757 2758.. 2759 2760.. bpo: 41069 2761.. date: 2020-06-22-00-21-12 2762.. nonce: bLZkX- 2763.. section: Tests 2764 2765:data:`test.support.TESTFN` and the current directory for tests when run via 2766``test.regrtest`` contain now non-ascii characters if possible. 2767 2768.. 2769 2770.. bpo: 38377 2771.. date: 2020-06-17-18-00-21 2772.. nonce: jfg4TH 2773.. section: Tests 2774 2775On Linux, skip tests using multiprocessing if the current user cannot create 2776a file in ``/dev/shm/`` directory. Add the 2777:func:`~test.support.skip_if_broken_multiprocessing_synchronize` function to 2778the :mod:`test.support` module. 2779 2780.. 2781 2782.. bpo: 41009 2783.. date: 2020-06-17-17-27-07 2784.. nonce: Rvn6OQ 2785.. section: Tests 2786 2787Fix use of ``support.require_{linux|mac|freebsd}_version()`` decorators as 2788class decorator. 2789 2790.. 2791 2792.. bpo: 41003 2793.. date: 2020-06-17-15-07-14 2794.. nonce: tiH_Fy 2795.. section: Tests 2796 2797Fix ``test_copyreg`` when ``numpy`` is installed: ``test.pickletester`` now 2798saves/restores warnings filters when importing ``numpy``, to ignore filters 2799installed by ``numpy``. 2800 2801.. 2802 2803.. bpo: 40964 2804.. date: 2020-06-12-20-46-23 2805.. nonce: OBzf2c 2806.. section: Tests 2807 2808Disable remote :mod:`imaplib` tests, host cyrus.andrew.cmu.edu is blocking 2809incoming connections. 2810 2811.. 2812 2813.. bpo: 40927 2814.. date: 2020-06-09-18-48-18 2815.. nonce: 67ylLg 2816.. section: Tests 2817 2818Fix test_binhex when run twice: it now uses import_fresh_module() to ensure 2819that it raises DeprecationWarning each time. 2820 2821.. 2822 2823.. bpo: 17258 2824.. date: 2020-05-26-07-53-31 2825.. nonce: X_IKTQ 2826.. section: Tests 2827 2828Skip some :mod:`multiprocessing` tests when MD5 hash digest is blocked. 2829 2830.. 2831 2832.. bpo: 31904 2833.. date: 2020-04-09-15-40-03 2834.. nonce: TJ4k3d 2835.. section: Tests 2836 2837Increase LOOPBACK_TIMEOUT to 10 for VxWorks RTOS. 2838 2839.. 2840 2841.. bpo: 38169 2842.. date: 2019-09-14-13-20-27 2843.. nonce: hurq4B 2844.. section: Tests 2845 2846Increase code coverage for SharedMemory and ShareableList 2847 2848.. 2849 2850.. bpo: 34401 2851.. date: 2018-08-20-09-38-52 2852.. nonce: eGxMPm 2853.. section: Tests 2854 2855Make test_gdb properly run on HP-UX. Patch by Michael Osipov. 2856 2857.. 2858 2859.. bpo: 38249 2860.. date: 2020-09-28-21-56-51 2861.. nonce: uzMCaZ 2862.. section: Build 2863 2864Update :c:macro:`Py_UNREACHABLE` to use __builtin_unreachable() if only the 2865compiler is able to use it. Patch by Dong-hee Na. 2866 2867.. 2868 2869.. bpo: 41617 2870.. date: 2020-08-24-18-34-01 2871.. nonce: sKKXz7 2872.. section: Build 2873 2874Fix ``pycore_bitutils.h`` header file to support old clang versions: 2875``__builtin_bswap16()`` is not available in LLVM clang 3.0. 2876 2877.. 2878 2879.. bpo: 40204 2880.. date: 2020-06-25-06-59-13 2881.. nonce: GpD04D 2882.. section: Build 2883 2884Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. 2885 2886.. 2887 2888.. bpo: 36020 2889.. date: 2020-06-15-22-14-25 2890.. nonce: wbiv0P 2891.. section: Build 2892 2893The C99 functions :c:func:`snprintf` and :c:func:`vsnprintf` are now 2894required to build Python. 2895 2896.. 2897 2898.. bpo: 40684 2899.. date: 2020-06-08-19-57-05 2900.. nonce: WIY2-i 2901.. section: Build 2902 2903``make install`` now uses the ``PLATLIBDIR`` variable for the destination 2904``lib-dynload/`` directory when ``./configure --with-platlibdir`` is used. 2905 2906.. 2907 2908.. bpo: 40683 2909.. date: 2020-05-19-10-54-08 2910.. nonce: W8JHrr 2911.. section: Build 2912 2913Fixed an issue where the :mod:`zoneinfo` module and its tests were not 2914included when Python is installed with ``make``. 2915 2916.. 2917 2918.. bpo: 41744 2919.. date: 2020-09-11-17-59-33 2920.. nonce: e_ugDQ 2921.. section: Windows 2922 2923Fixes automatic import of props file when using the Nuget package. 2924 2925.. 2926 2927.. bpo: 41627 2928.. date: 2020-09-04-21-35-28 2929.. nonce: sx2KN1 2930.. section: Windows 2931 2932The user site directory for 32-bit now includes a ``-32`` suffix to 2933distinguish it from the 64-bit interpreter's directory. 2934 2935.. 2936 2937.. bpo: 41526 2938.. date: 2020-08-13-22-40-58 2939.. nonce: -i2bwb 2940.. section: Windows 2941 2942Fixed layout of final page of the installer by removing the special thanks 2943to Mark Hammond (with his permission). 2944 2945.. 2946 2947.. bpo: 41492 2948.. date: 2020-08-06-16-59-10 2949.. nonce: 2FQ9cM 2950.. section: Windows 2951 2952Fixes the description that appears in UAC prompts. 2953 2954.. 2955 2956.. bpo: 40948 2957.. date: 2020-07-28-12-39-32 2958.. nonce: ISUFO6 2959.. section: Windows 2960 2961Improve post-install message to direct people to the "py" command. 2962 2963.. 2964 2965.. bpo: 41412 2966.. date: 2020-07-28-11-55-43 2967.. nonce: ME20KB 2968.. section: Windows 2969 2970The installer will now fail to install on Windows 7 and Windows 8. Further, 2971the UCRT dependency is now always downloaded on demand. 2972 2973.. 2974 2975.. bpo: 40741 2976.. date: 2020-07-20-23-26-26 2977.. nonce: C9sc_d 2978.. section: Windows 2979 2980Update Windows release to include SQLite 3.32.3. 2981 2982.. 2983 2984.. bpo: 41142 2985.. date: 2020-06-28-12-40-41 2986.. nonce: jpZzzh 2987.. section: Windows 2988 2989:mod:`msilib` now supports creating CAB files with non-ASCII file path and 2990adding files with non-ASCII file path to them. 2991 2992.. 2993 2994.. bpo: 41074 2995.. date: 2020-06-24-21-30-42 2996.. nonce: gaQc3C 2997.. section: Windows 2998 2999Fixed support of non-ASCII names in functions :func:`msilib.OpenDatabase` 3000and :func:`msilib.init_database` and non-ASCII SQL in method 3001:meth:`msilib.Database.OpenView`. 3002 3003.. 3004 3005.. bpo: 41039 3006.. date: 2020-06-23-03-12-57 3007.. nonce: 0hgd0s 3008.. section: Windows 3009 3010Stable ABI redirection DLL (python3.dll) now uses ``#pragma 3011comment(linker)`` for re-exporting. 3012 3013.. 3014 3015.. bpo: 40164 3016.. date: 2020-06-12-13-13-44 3017.. nonce: SPrSn5 3018.. section: Windows 3019 3020Updates Windows OpenSSL to 1.1.1g 3021 3022.. 3023 3024.. bpo: 39631 3025.. date: 2020-05-19-14-43-33 3026.. nonce: Z5yXam 3027.. section: Windows 3028 3029Changes the registered MIME type for ``.py`` files on Windows to 3030``text/x-python`` instead of ``text/plain``. 3031 3032.. 3033 3034.. bpo: 40677 3035.. date: 2020-05-19-04-11-12 3036.. nonce: qQbLW8 3037.. section: Windows 3038 3039Manually define IO_REPARSE_TAG_APPEXECLINK in case some old Windows SDK 3040doesn't have it. 3041 3042.. 3043 3044.. bpo: 37556 3045.. date: 2019-07-11-06-11-09 3046.. nonce: sygMUU 3047.. section: Windows 3048 3049Extend py.exe help to mention overrides via venv, shebang, environmental 3050variables & ini files. 3051 3052.. 3053 3054.. bpo: 41557 3055.. date: 2020-08-26-09-31-37 3056.. nonce: mcQ75z 3057.. section: macOS 3058 3059Update macOS installer to use SQLite 3.33.0. 3060 3061.. 3062 3063.. bpo: 39580 3064.. date: 2020-06-25-06-09-00 3065.. nonce: N_vJ9h 3066.. section: macOS 3067 3068Avoid opening Finder window if running installer from the command line. 3069Patch contributed by Rick Heil. 3070 3071.. 3072 3073.. bpo: 41100 3074.. date: 2020-06-24-13-51-57 3075.. nonce: mcHdc5 3076.. section: macOS 3077 3078Fix configure error when building on macOS 11. Note that the current Python 3079release was released shortly after the first developer preview of macOS 11 3080(Big Sur); there are other known issues with building and running on the 3081developer preview. Big Sur is expected to be fully supported in a future 3082bugfix release of Python 3.8.x and with 3.9.0. 3083 3084.. 3085 3086.. bpo: 40741 3087.. date: 2020-06-19-14-19-08 3088.. nonce: L7yTbm 3089.. section: macOS 3090 3091Update macOS installer to use SQLite 3.32.3. 3092 3093.. 3094 3095.. bpo: 41005 3096.. date: 2020-06-17-13-45-15 3097.. nonce: zZegdV 3098.. section: macOS 3099 3100fixed an XDG settings issue not allowing macos to open browser in 3101webbrowser.py 3102 3103.. 3104 3105.. bpo: 40741 3106.. date: 2020-06-07-20-10-56 3107.. nonce: 80A2BW 3108.. section: macOS 3109 3110Update macOS installer to use SQLite 3.32.2. 3111 3112.. 3113 3114.. bpo: 41775 3115.. date: 2020-09-24-14-31-16 3116.. nonce: sB8Vre 3117.. section: IDLE 3118 3119Use 'IDLE Shell' as shell title 3120 3121.. 3122 3123.. bpo: 35764 3124.. date: 2020-09-22-11-13-45 3125.. nonce: VoNa8y 3126.. section: IDLE 3127 3128Rewrite the Calltips doc section. 3129 3130.. 3131 3132.. bpo: 40181 3133.. date: 2020-09-22-00-45-40 3134.. nonce: hhQi3z 3135.. section: IDLE 3136 3137In calltips, stop reminding that '/' marks the end of positional-only 3138arguments. 3139 3140.. 3141 3142.. bpo: 41468 3143.. date: 2020-08-09-13-42-55 3144.. nonce: zkP0_Y 3145.. section: IDLE 3146 3147Improve IDLE run crash error message (which users should never see). 3148 3149.. 3150 3151.. bpo: 41373 3152.. date: 2020-07-24-17-49-58 3153.. nonce: YQIPu_ 3154.. section: IDLE 3155 3156Save files loaded with no line ending, as when blank, or different line 3157endings, by setting its line ending to the system default. Fix regression in 31583.8.4 and 3.9.0b4. 3159 3160.. 3161 3162.. bpo: 41300 3163.. date: 2020-07-16-17-39-06 3164.. nonce: wRixNb 3165.. section: IDLE 3166 3167Save files with non-ascii chars. Fix regression released in 3.9.0b4 and 31683.8.4. 3169 3170.. 3171 3172.. bpo: 37765 3173.. date: 2020-07-07-18-44-30 3174.. nonce: umc1o8 3175.. section: IDLE 3176 3177Add keywords to module name completion list. Rewrite Completions section of 3178IDLE doc. 3179 3180.. 3181 3182.. bpo: 41152 3183.. date: 2020-06-29-14-51-15 3184.. nonce: d6mV0C 3185.. section: IDLE 3186 3187The encoding of ``stdin``, ``stdout`` and ``stderr`` in IDLE is now always 3188UTF-8. 3189 3190.. 3191 3192.. bpo: 41144 3193.. date: 2020-06-27-17-02-00 3194.. nonce: JoFGIX 3195.. section: IDLE 3196 3197Make Open Module open a special module such as os.path. 3198 3199.. 3200 3201.. bpo: 39885 3202.. date: 2020-05-29-18-21-58 3203.. nonce: zB_-bN 3204.. section: IDLE 3205 3206Make context menu Cut and Copy work again when right-clicking within a 3207selection. 3208 3209.. 3210 3211.. bpo: 40723 3212.. date: 2020-05-24-06-19-43 3213.. nonce: AJLd4U 3214.. section: IDLE 3215 3216Make test_idle pass when run after import. 3217 3218.. 3219 3220.. bpo: 41936 3221.. date: 2020-10-05-01-25-23 3222.. nonce: 1gb5ra 3223.. section: C API 3224 3225Removed undocumented macros ``Py_ALLOW_RECURSION`` and 3226``Py_END_ALLOW_RECURSION`` and the ``recursion_critical`` field of the 3227:c:type:`PyInterpreterState` structure. 3228 3229.. 3230 3231.. bpo: 41692 3232.. date: 2020-10-02-00-57-34 3233.. nonce: fDScsF 3234.. section: C API 3235 3236The ``PyUnicode_InternImmortal()`` function is now deprecated and will be 3237removed in Python 3.12: use :c:func:`PyUnicode_InternInPlace` instead. Patch 3238by Victor Stinner. 3239 3240.. 3241 3242.. bpo: 41842 3243.. date: 2020-09-27-20-43-16 3244.. nonce: bCakAj 3245.. section: C API 3246 3247Add :c:func:`PyCodec_Unregister` function to unregister a codec search 3248function. 3249 3250.. 3251 3252.. bpo: 41834 3253.. date: 2020-09-22-14-47-12 3254.. nonce: nrOrDU 3255.. section: C API 3256 3257Remove the ``_Py_CheckRecursionLimit`` variable: it has been replaced by 3258``ceval.recursion_limit`` of the :c:type:`PyInterpreterState` structure. 3259Patch by Victor Stinner. 3260 3261.. 3262 3263.. bpo: 41689 3264.. date: 2020-09-01-23-39-45 3265.. nonce: zxHbLB 3266.. section: C API 3267 3268Types created with :c:func:`PyType_FromSpec` now make any signature in their 3269``tp_doc`` slot accessible from ``__text_signature__``. 3270 3271.. 3272 3273.. bpo: 41524 3274.. date: 2020-08-12-17-09-06 3275.. nonce: u6Xfr2 3276.. section: C API 3277 3278Fix bug in PyOS_mystrnicmp and PyOS_mystricmp that incremented pointers 3279beyond the end of a string. 3280 3281.. 3282 3283.. bpo: 41324 3284.. date: 2020-08-10-16-05-08 3285.. nonce: waZD35 3286.. section: C API 3287 3288Add a minimal decimal capsule API. The API supports fast conversions 3289between Decimals up to 38 digits and their triple representation as a C 3290struct. 3291 3292.. 3293 3294.. bpo: 30155 3295.. date: 2020-07-26-19-39-45 3296.. nonce: rHZRJ_ 3297.. section: C API 3298 3299Add :c:func:`PyDateTime_DATE_GET_TZINFO` and 3300:c:func:`PyDateTime_TIME_GET_TZINFO` macros for accessing the ``tzinfo`` 3301attributes of :class:`datetime.datetime` and :class:`datetime.time` objects. 3302 3303.. 3304 3305.. bpo: 40170 3306.. date: 2020-07-08-10-14-52 3307.. nonce: N6Qx1i 3308.. section: C API 3309 3310Revert :c:func:`PyType_HasFeature` change: it reads again directly the 3311:c:member:`PyTypeObject.tp_flags` member when the limited C API is not used, 3312rather than always calling :c:func:`PyType_GetFlags` which hides 3313implementation details. 3314 3315.. 3316 3317.. bpo: 41123 3318.. date: 2020-06-29-15-49-36 3319.. nonce: wYY4E1 3320.. section: C API 3321 3322Remove ``PyUnicode_AsUnicodeCopy``. 3323 3324.. 3325 3326.. bpo: 41123 3327.. date: 2020-06-29-11-33-49 3328.. nonce: qFevek 3329.. section: C API 3330 3331Removed ``PyLong_FromUnicode()``. 3332 3333.. 3334 3335.. bpo: 41123 3336.. date: 2020-06-28-11-39-22 3337.. nonce: sjJWjQ 3338.. section: C API 3339 3340Removed ``PyUnicode_GetMax()``. 3341 3342.. 3343 3344.. bpo: 41123 3345.. date: 2020-06-26-13-29-25 3346.. nonce: bRa1oy 3347.. section: C API 3348 3349Removed ``Py_UNICODE_str*`` functions manipulating ``Py_UNICODE*`` strings. 3350 3351.. 3352 3353.. bpo: 41103 3354.. date: 2020-06-24-22-57-07 3355.. nonce: doojgE 3356.. section: C API 3357 3358``PyObject_AsCharBuffer()``, ``PyObject_AsReadBuffer()``, 3359``PyObject_CheckReadBuffer()``, and ``PyObject_AsWriteBuffer()`` are 3360removed. Please migrate to new buffer protocol; :c:func:`PyObject_GetBuffer` 3361and :c:func:`PyBuffer_Release`. 3362 3363.. 3364 3365.. bpo: 36346 3366.. date: 2020-06-17-20-31-12 3367.. nonce: mwIyxi 3368.. section: C API 3369 3370Raises DeprecationWarning for ``PyUnicode_FromUnicode(NULL, size)`` and 3371``PyUnicode_FromStringAndSize(NULL, size)`` with ``size > 0``. 3372 3373.. 3374 3375.. bpo: 36346 3376.. date: 2020-06-17-11-24-00 3377.. nonce: fTMr3S 3378.. section: C API 3379 3380Mark ``Py_UNICODE_COPY``, ``Py_UNICODE_FILL``, ``PyUnicode_WSTR_LENGTH``, 3381``PyUnicode_FromUnicode``, ``PyUnicode_AsUnicode``, and 3382``PyUnicode_AsUnicodeAndSize`` as deprecated in C. Remove 3383``Py_UNICODE_MATCH`` which was deprecated and broken since Python 3.3. 3384 3385.. 3386 3387.. bpo: 40989 3388.. date: 2020-06-15-23-17-51 3389.. nonce: tlzG3r 3390.. section: C API 3391 3392The :c:func:`PyObject_INIT` and :c:func:`PyObject_INIT_VAR` macros become 3393aliases to, respectively, :c:func:`PyObject_Init` and 3394:c:func:`PyObject_InitVar` functions. 3395 3396.. 3397 3398.. bpo: 36020 3399.. date: 2020-06-15-16-46-01 3400.. nonce: djI6jw 3401.. section: C API 3402 3403On Windows, ``#include "pyerrors.h"`` no longer defines ``snprintf`` and 3404``vsnprintf`` macros. 3405 3406.. 3407 3408.. bpo: 40943 3409.. date: 2020-06-10-18-37-26 3410.. nonce: i4q7rK 3411.. section: C API 3412 3413The ``PY_SSIZE_T_CLEAN`` macro must now be defined to use 3414:c:func:`PyArg_ParseTuple` and :c:func:`Py_BuildValue` formats which use 3415``#``: ``es#``, ``et#``, ``s#``, ``u#``, ``y#``, ``z#``, ``U#`` and ``Z#``. 3416See :ref:`Parsing arguments and building values <arg-parsing>` and the 3417:pep:`353`. 3418 3419.. 3420 3421.. bpo: 40910 3422.. date: 2020-06-08-15-59-06 3423.. nonce: L56oI0 3424.. section: C API 3425 3426Export explicitly the :c:func:`Py_GetArgcArgv` function to the C API and 3427document the function. Previously, it was exported implicitly which no 3428longer works since Python is built with ``-fvisibility=hidden``. 3429 3430.. 3431 3432.. bpo: 40724 3433.. date: 2020-06-04-08-01-23 3434.. nonce: qIIdSi 3435.. section: C API 3436 3437Allow defining buffer slots in type specs. 3438 3439.. 3440 3441.. bpo: 40679 3442.. date: 2020-06-03-17-48-13 3443.. nonce: 3sgWma 3444.. section: C API 3445 3446Fix a ``_PyEval_EvalCode()`` crash if *qualname* argument is NULL. 3447 3448.. 3449 3450.. bpo: 40839 3451.. date: 2020-06-01-20-47-49 3452.. nonce: bAi52Z 3453.. section: C API 3454 3455Calling :c:func:`PyDict_GetItem` without :term:`GIL` held had been allowed 3456for historical reason. It is no longer allowed. 3457 3458.. 3459 3460.. bpo: 40826 3461.. date: 2020-06-01-16-12-37 3462.. nonce: zQzFoK 3463.. section: C API 3464 3465:c:func:`PyOS_InterruptOccurred` now fails with a fatal error if it is 3466called with the GIL released. 3467 3468.. 3469 3470.. bpo: 40792 3471.. date: 2020-05-27-11-02-15 3472.. nonce: pBw2Bb 3473.. section: C API 3474 3475The result of :c:func:`PyNumber_Index` now always has exact type 3476:class:`int`. Previously, the result could have been an instance of a 3477subclass of ``int``. 3478 3479.. 3480 3481.. bpo: 39573 3482.. date: 2020-05-26-16-21-47 3483.. nonce: depAgq 3484.. section: C API 3485 3486Convert :c:func:`Py_REFCNT` and :c:func:`Py_SIZE` macros to static inline 3487functions. They cannot be used as l-value anymore: use 3488:c:func:`Py_SET_REFCNT` and :c:func:`Py_SET_SIZE` to set an object reference 3489count and size. This change is backward incompatible on purpose, to prepare 3490the C API for an opaque :c:type:`PyObject` structure. 3491 3492.. 3493 3494.. bpo: 40703 3495.. date: 2020-05-20-19-11-12 3496.. nonce: qQXfW8 3497.. section: C API 3498 3499The PyType_FromSpec*() functions no longer overwrite the type's "__module__" 3500attribute if it is set via "Py_tp_members" or "Py_tp_getset". 3501 3502.. 3503 3504.. bpo: 39583 3505.. date: 2020-02-08-08-01-35 3506.. nonce: qURKSl 3507.. section: C API 3508 3509Remove superfluous "extern C" declarations from ``Include/cpython/*.h``. 3510