1.. bpo: 46940 2.. date: 2022-03-06-20-16-13 3.. nonce: _X47Hx 4.. release date: 2022-03-07 5.. section: Core and Builtins 6 7Avoid overriding :exc:`AttributeError` metadata information for nested 8attribute access calls. Patch by Pablo Galindo. 9 10.. 11 12.. bpo: 46927 13.. date: 2022-03-05-12-23-58 14.. nonce: URbHBi 15.. section: Core and Builtins 16 17Include the type's name in the error message for subscripting non-generic 18types. 19 20.. 21 22.. bpo: 46921 23.. date: 2022-03-05-00-43-22 24.. nonce: tyuPeB 25.. section: Core and Builtins 26 27Support vectorcall for ``super()``. Patch by Ken Jin. 28 29.. 30 31.. bpo: 46841 32.. date: 2022-03-03-14-31-53 33.. nonce: agf-3X 34.. section: Core and Builtins 35 36Fix incorrect handling of inline cache entries when specializing 37:opcode:`BINARY_OP`. 38 39.. 40 41.. bpo: 46841 42.. date: 2022-03-03-12-36-15 43.. nonce: apPev2 44.. section: Core and Builtins 45 46Use an oparg to simplify the construction of helpful error messages in 47:opcode:`GET_AWAITABLE`. 48 49.. 50 51.. bpo: 46903 52.. date: 2022-03-03-12-02-41 53.. nonce: OzgaFZ 54.. section: Core and Builtins 55 56Make sure that str subclasses can be used as attribute names for instances 57with virtual dictionaries. Fixes regression in 3.11alpha 58 59.. 60 61.. bpo: 46841 62.. date: 2022-03-03-10-46-13 63.. nonce: 7CkuZx 64.. section: Core and Builtins 65 66Add more detailed specialization failure stats for :opcode:`COMPARE_OP` 67followed by :opcode:`EXTENDED_ARG`. 68 69.. 70 71.. bpo: 46891 72.. date: 2022-03-02-15-04-08 73.. nonce: aIAgTD 74.. section: Core and Builtins 75 76Fix bug introduced during 3.11alpha where subclasses of ``types.ModuleType`` 77with ``__slots__`` were not initialized correctly, resulting in an 78interpreter crash. 79 80.. 81 82.. bpo: 46841 83.. date: 2022-03-01-17-47-58 84.. nonce: inYQlU 85.. section: Core and Builtins 86 87Use inline caching for :opcode:`LOAD_ATTR`, :opcode:`LOAD_METHOD`, and 88:opcode:`STORE_ATTR`. 89 90.. 91 92.. bpo: 46841 93.. date: 2022-02-28-15-46-36 94.. nonce: MDQoty 95.. section: Core and Builtins 96 97Use inline cache for :opcode:`BINARY_SUBSCR`. 98 99.. 100 101.. bpo: 46841 102.. date: 2022-02-28-12-01-04 103.. nonce: r60AMJ 104.. section: Core and Builtins 105 106Use inline caching for :opcode:`COMPARE_OP`. 107 108.. 109 110.. bpo: 46864 111.. date: 2022-02-26-19-26-36 112.. nonce: EmLgFp 113.. section: Core and Builtins 114 115Deprecate ``PyBytesObject.ob_shash``. It will be removed in Python 3.13. 116 117.. 118 119.. bpo: 46841 120.. date: 2022-02-25-15-18-40 121.. nonce: tmLpgC 122.. section: Core and Builtins 123 124Use inline caching for :opcode:`UNPACK_SEQUENCE`. 125 126.. 127 128.. bpo: 46845 129.. date: 2022-02-25-14-57-21 130.. nonce: TUvaMG 131.. section: Core and Builtins 132 133Reduces dict size by removing hash value from hash table when all inserted 134keys are Unicode. For example, ``sys.getsizeof(dict.fromkeys("abcdefg"))`` 135becomes 272 bytes from 352 bytes on 64bit platform. 136 137.. 138 139.. bpo: 46841 140.. date: 2022-02-25-13-18-18 141.. nonce: 86QiQu 142.. section: Core and Builtins 143 144Use inline cache for :opcode:`LOAD_GLOBAL`. 145 146.. 147 148.. bpo: 46852 149.. date: 2022-02-25-02-01-42 150.. nonce: _3zg8D 151.. section: Core and Builtins 152 153Rename the private undocumented ``float.__set_format__()`` method to 154``float.__setformat__()`` to fix a typo introduced in Python 3.7. The method 155is only used by test_float. Patch by Victor Stinner. 156 157.. 158 159.. bpo: 46852 160.. date: 2022-02-25-01-42-45 161.. nonce: nkRDvV 162.. section: Core and Builtins 163 164Remove the undocumented private ``float.__set_format__()`` method, 165previously known as ``float.__setformat__()`` in Python 3.7. Its docstring 166said: "You probably don't want to use this function. It exists mainly to be 167used in Python's test suite." Patch by Victor Stinner. 168 169.. 170 171.. bpo: 40116 172.. date: 2022-02-24-16-34-17 173.. nonce: AeVGG2 174.. section: Core and Builtins 175 176Fix regression that dict.update(other) may don't respect iterate order of 177other when other is key sharing dict. 178 179.. 180 181.. bpo: 46712 182.. date: 2022-02-24-07-50-43 183.. nonce: pw7vQV 184.. section: Core and Builtins 185 186Share global string identifiers in deep-frozen modules. 187 188.. 189 190.. bpo: 46430 191.. date: 2022-02-24-07-33-29 192.. nonce: c91TAg 193.. section: Core and Builtins 194 195Fix memory leak in interned strings of deep-frozen modules. 196 197.. 198 199.. bpo: 46841 200.. date: 2022-02-23-18-17-30 201.. nonce: fns8HB 202.. section: Core and Builtins 203 204Store :opcode:`BINARY_OP` caches inline using a new :opcode:`CACHE` 205instruction. 206 207.. 208 209.. bpo: 45107 210.. date: 2022-02-23-15-26-02 211.. nonce: axcgHn 212.. section: Core and Builtins 213 214Specialize ``LOAD_METHOD`` for instances with a dict. 215 216.. 217 218.. bpo: 44337 219.. date: 2022-02-22-17-19-45 220.. nonce: XA-egu 221.. section: Core and Builtins 222 223Reduce the memory usage of specialized :opcode:`LOAD_ATTR` and 224:opcode:`STORE_ATTR` instructions. 225 226.. 227 228.. bpo: 46729 229.. date: 2022-02-22-17-18-36 230.. nonce: ZwGTFq 231.. section: Core and Builtins 232 233Add number of sub-exceptions to :meth:`BaseException.__str__`. 234 235.. 236 237.. bpo: 45885 238.. date: 2022-02-22-15-48-32 239.. nonce: W2vkaI 240.. section: Core and Builtins 241 242Don't un-adapt :opcode:`COMPARE_OP` when collecting specialization stats. 243 244.. 245 246.. bpo: 46329 247.. date: 2022-02-22-14-03-56 248.. nonce: RX_AzJ 249.. section: Core and Builtins 250 251Fix specialization stats gathering for :opcode:`PRECALL` instructions. 252 253.. 254 255.. bpo: 46794 256.. date: 2022-02-22-12-07-53 257.. nonce: 6WvJ9o 258.. section: Core and Builtins 259 260Bump up the libexpat version into 2.4.6 261 262.. 263 264.. bpo: 46823 265.. date: 2022-02-22-05-14-25 266.. nonce: z9NZC9 267.. section: Core and Builtins 268 269Implement a specialized combined opcode 270``LOAD_FAST__LOAD_ATTR_INSTANCE_VALUE``. Patch by Dennis Sweeney. 271 272.. 273 274.. bpo: 46820 275.. date: 2022-02-21-21-55-23 276.. nonce: 4RfUZh 277.. section: Core and Builtins 278 279Fix parsing a numeric literal immediately (without spaces) followed by "not 280in" keywords, like in ``1not in x``. Now the parser only emits a warning, 281not a syntax error. 282 283.. 284 285.. bpo: 46329 286.. date: 2022-02-21-10-29-20 287.. nonce: cbkt7u 288.. section: Core and Builtins 289 290Move ``KW_NAMES`` before ``PRECALL`` instruction in call sequence. Change 291``operand`` of ``CALL`` to match ``PRECALL`` for easier specialization. 292 293.. 294 295.. bpo: 46808 296.. date: 2022-02-20-23-10-14 297.. nonce: vouNSF 298.. section: Core and Builtins 299 300Remove the ``NEXT_BLOCK`` macro from compile.c, and make the compiler 301automatically generate implicit blocks when they are needed. 302 303.. 304 305.. bpo: 46329 306.. date: 2022-02-16-13-15-16 307.. nonce: 8aIuz9 308.. section: Core and Builtins 309 310Add ``PUSH_NULL`` instruction. This is used as a prefix when evaluating a 311callable, so that the stack has the same shape for methods and other calls. 312``PRECALL_FUNCTION`` and ``PRECALL_METHOD`` are merged into a single 313``PRECALL`` instruction. 314 315There is no change in semantics. 316 317.. 318 319.. bpo: 46762 320.. date: 2022-02-15-20-26-46 321.. nonce: 1H7vab 322.. section: Core and Builtins 323 324Fix an assert failure in debug builds when a '<', '>', or '=' is the last 325character in an f-string that's missing a closing right brace. 326 327.. 328 329.. bpo: 46730 330.. date: 2022-02-14-21-04-43 331.. nonce: rYJ1w5 332.. section: Core and Builtins 333 334Message of AttributeError caused by getting, setting or deleting a property 335without the corresponding function now mentions that the attribute is in 336fact a property and also specifies type of the class that it belongs to. 337 338.. 339 340.. bpo: 46724 341.. date: 2022-02-14-14-44-06 342.. nonce: jym_K6 343.. section: Core and Builtins 344 345Make sure that all backwards jumps use the ``JUMP_ABSOLUTE`` instruction, 346rather than ``JUMP_FORWARD`` with an argument of ``(2**32)+offset``. 347 348.. 349 350.. bpo: 46732 351.. date: 2022-02-12-11-16-40 352.. nonce: 3Z_qxd 353.. section: Core and Builtins 354 355Correct the docstring for the :meth:`__bool__` method. Patch by Jelle 356Zijlstra. 357 358.. 359 360.. bpo: 46072 361.. date: 2022-02-11-13-47-58 362.. nonce: PDS6Ke 363.. section: Core and Builtins 364 365Add more detailed specialization failure statistics for :opcode:`BINARY_OP`. 366 367.. 368 369.. bpo: 46707 370.. date: 2022-02-10-03-13-18 371.. nonce: xeSEh0 372.. section: Core and Builtins 373 374Avoid potential exponential backtracking when producing some syntax errors 375involving lots of brackets. Patch by Pablo Galindo. 376 377.. 378 379.. bpo: 46323 380.. date: 2022-02-10-02-29-12 381.. nonce: HK_cs0 382.. section: Core and Builtins 383 384:mod:`ctypes` now allocates memory on the stack instead of on the heap to 385pass arguments while calling a Python callback function. Patch by Dong-hee 386Na. 387 388.. 389 390.. bpo: 45923 391.. date: 2022-02-09-20-21-43 392.. nonce: tJ4gDX 393.. section: Core and Builtins 394 395Add a quickened form of :opcode:`RESUME` that skips quickening checks. 396 397.. 398 399.. bpo: 46702 400.. date: 2022-02-09-16-36-11 401.. nonce: LcaEuC 402.. section: Core and Builtins 403 404Specialize :opcode:`UNPACK_SEQUENCE` for :class:`tuple` and :class:`list` 405unpackings. 406 407.. 408 409.. bpo: 46072 410.. date: 2022-02-07-14-38-54 411.. nonce: 6ebLyN 412.. section: Core and Builtins 413 414Opcode pair stats are now gathered with ``--enable-pystats``. Defining 415``DYNAMIC_EXECUTION_PROFILE`` or ``DXPAIRS`` no longer has any effect. 416 417.. 418 419.. bpo: 46675 420.. date: 2022-02-07-14-33-45 421.. nonce: ZPbdMp 422.. section: Core and Builtins 423 424Allow more than 16 items in a split dict before it is combined. The limit is 425now 254. 426 427.. 428 429.. bpo: 40479 430.. date: 2022-02-06-23-08-30 431.. nonce: zED3Zu 432.. section: Core and Builtins 433 434Add a missing call to ``va_end()`` in ``Modules/_hashopenssl.c``. 435 436.. 437 438.. bpo: 46323 439.. date: 2022-02-05-14-46-21 440.. nonce: FC1OJg 441.. section: Core and Builtins 442 443Use :c:func:`PyObject_Vectorcall` while calling ctypes callback function. 444Patch by Dong-hee Na. 445 446.. 447 448.. bpo: 46615 449.. date: 2022-02-04-04-33-18 450.. nonce: puArY9 451.. section: Core and Builtins 452 453When iterating over sets internally in ``setobject.c``, acquire strong 454references to the resulting items from the set. This prevents crashes in 455corner-cases of various set operations where the set gets mutated. 456 457.. 458 459.. bpo: 45828 460.. date: 2022-01-27-14-20-18 461.. nonce: kzk4fl 462.. section: Core and Builtins 463 464The bytecode compiler now attempts to apply runtime stack manipulations at 465compile-time (whenever it is feasible to do so). 466 467.. 468 469.. bpo: 30496 470.. date: 2022-01-09-11-59-04 471.. nonce: KvuuGT 472.. section: Core and Builtins 473 474Fixed a minor portability issue in the implementation of 475:c:func:`PyLong_FromLong`, and added a fast path for single-digit integers 476to :c:func:`PyLong_FromLongLong`. 477 478.. 479 480.. bpo: 25707 481.. date: 2022-03-05-09-43-53 482.. nonce: gTlclP 483.. section: Library 484 485Fixed a file leak in :func:`xml.etree.ElementTree.iterparse` when the 486iterator is not exhausted. Patch by Jacob Walls. 487 488.. 489 490.. bpo: 46877 491.. date: 2022-03-03-06-58-52 492.. nonce: BKgjpD 493.. section: Library 494 495Export :func:`unittest.doModuleCleanups` in :mod:`unittest`. Patch by Kumar 496Aditya. 497 498.. 499 500.. bpo: 46848 501.. date: 2022-03-01-01-16-13 502.. nonce: BB01Fr 503.. section: Library 504 505For performance, use the optimized string-searching implementations from 506:meth:`~bytes.find` and :meth:`~bytes.rfind` for :meth:`~mmap.find` and 507:meth:`~mmap.rfind`. 508 509.. 510 511.. bpo: 46736 512.. date: 2022-02-24-01-49-38 513.. nonce: NJcoWO 514.. section: Library 515 516:class:`~http.server.SimpleHTTPRequestHandler` now uses HTML5 grammar. Patch 517by Dong-hee Na. 518 519.. 520 521.. bpo: 44886 522.. date: 2022-02-23-00-55-59 523.. nonce: I40Mbr 524.. section: Library 525 526Inherit asyncio proactor datagram transport from 527:class:`asyncio.DatagramTransport`. 528 529.. 530 531.. bpo: 46827 532.. date: 2022-02-22-15-08-30 533.. nonce: hvj38S 534.. section: Library 535 536Support UDP sockets in :meth:`asyncio.loop.sock_connect` for selector-based 537event loops. Patch by Thomas Grainger. 538 539.. 540 541.. bpo: 46811 542.. date: 2022-02-20-21-03-31 543.. nonce: 8BxgdQ 544.. section: Library 545 546Make test suite support Expat >=2.4.5 547 548.. 549 550.. bpo: 46252 551.. date: 2022-02-20-12-59-46 552.. nonce: KG1SqA 553.. section: Library 554 555Raise :exc:`TypeError` if :class:`ssl.SSLSocket` is passed to 556transport-based APIs. 557 558.. 559 560.. bpo: 46784 561.. date: 2022-02-18-22-10-30 562.. nonce: SVOQJx 563.. section: Library 564 565Fix libexpat symbols collisions with user dynamically loaded or statically 566linked libexpat in embedded Python. 567 568.. 569 570.. bpo: 46786 571.. date: 2022-02-18-12-10-26 572.. nonce: P0xRvS 573.. section: Library 574 575The HTML serialisation in xml.etree.ElementTree now writes ``embed``, 576``source``, ``track`` and ``wbr`` as empty tags, as defined in HTML 5. 577 578.. 579 580.. bpo: 39327 581.. date: 2022-02-17-13-10-50 582.. nonce: ytIT7Z 583.. section: Library 584 585:func:`shutil.rmtree` can now work with VirtualBox shared folders when 586running from the guest operating-system. 587 588.. 589 590.. bpo: 45390 591.. date: 2022-02-17-11-00-16 592.. nonce: sVhG6M 593.. section: Library 594 595Propagate :exc:`asyncio.CancelledError` message from inner task to outer 596awaiter. 597 598.. 599 600.. bpo: 46756 601.. date: 2022-02-15-11-57-53 602.. nonce: AigSPi 603.. section: Library 604 605Fix a bug in :meth:`urllib.request.HTTPPasswordMgr.find_user_password` and 606:meth:`urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated` which 607allowed to bypass authorization. For example, access to URI 608``example.org/foobar`` was allowed if the user was authorized for URI 609``example.org/foo``. 610 611.. 612 613.. bpo: 46737 614.. date: 2022-02-15-07-39-43 615.. nonce: 6Pnblt 616.. section: Library 617 618:func:`random.gauss` and :func:`random.normalvariate` now have default 619arguments. 620 621.. 622 623.. bpo: 46752 624.. date: 2022-02-14-21-21-49 625.. nonce: m6ldTm 626.. section: Library 627 628Add task groups to asyncio (structured concurrency, inspired by Trio's 629nurseries). This also introduces a change to task cancellation, where a 630cancelled task can't be cancelled again until it calls .uncancel(). 631 632.. 633 634.. bpo: 46724 635.. date: 2022-02-11-20-41-17 636.. nonce: eU52_N 637.. section: Library 638 639Fix :mod:`dis` behavior on negative jump offsets. 640 641.. 642 643.. bpo: 46333 644.. date: 2022-02-11-20-01-49 645.. nonce: PMTBY9 646.. section: Library 647 648The :meth:`__repr__` method of :class:`typing.ForwardRef` now includes the 649``module`` parameter of :class:`typing.ForwardRef` when it is set. 650 651.. 652 653.. bpo: 46643 654.. date: 2022-02-09-22-40-11 655.. nonce: aBlIx1 656.. section: Library 657 658In :func:`typing.get_type_hints`, support evaluating stringified 659``ParamSpecArgs`` and ``ParamSpecKwargs`` annotations. Patch by Gregory 660Beauregard. 661 662.. 663 664.. bpo: 45863 665.. date: 2022-02-09-00-53-23 666.. nonce: zqQXVv 667.. section: Library 668 669When the :mod:`tarfile` module creates a pax format archive, it will put an 670integer representation of timestamps in the ustar header (if possible) for 671the benefit of older unarchivers, in addition to the existing full-precision 672timestamps in the pax extended header. 673 674.. 675 676.. bpo: 46066 677.. date: 2022-02-08-16-42-20 678.. nonce: m32Hl0 679.. section: Library 680 681Deprecate kwargs-based syntax for :class:`typing.TypedDict` definitions. It 682had confusing semantics when specifying totality, and was largely unused. 683Patch by Jingchen Ye. 684 685.. 686 687.. bpo: 46676 688.. date: 2022-02-07-19-20-42 689.. nonce: 3Aws1o 690.. section: Library 691 692Make :data:`typing.ParamSpec` args and kwargs equal to themselves. Patch by 693Gregory Beauregard. 694 695.. 696 697.. bpo: 46323 698.. date: 2022-02-07-13-27-59 699.. nonce: 7UENAj 700.. section: Library 701 702``ctypes.CFUNCTYPE()`` and ``ctypes.WINFUNCTYPE()`` now fail to create the 703type if its ``_argtypes_`` member contains too many arguments. Previously, 704the error was only raised when calling a function. Patch by Victor Stinner. 705 706.. 707 708.. bpo: 46672 709.. date: 2022-02-07-13-15-16 710.. nonce: 4swIjx 711.. section: Library 712 713Fix ``NameError`` in :func:`asyncio.gather` when initial type check fails. 714 715.. 716 717.. bpo: 46659 718.. date: 2022-02-06-19-13-02 719.. nonce: q-vNL9 720.. section: Library 721 722The :class:`calendar.LocaleTextCalendar` and 723:class:`calendar.LocaleHTMLCalendar` classes now use 724:func:`locale.getlocale`, instead of using :func:`locale.getdefaultlocale`, 725if no locale is specified. Patch by Victor Stinner. 726 727.. 728 729.. bpo: 46659 730.. date: 2022-02-06-17-57-45 731.. nonce: zTmkoQ 732.. section: Library 733 734The :func:`locale.getdefaultlocale` function is deprecated and will be 735removed in Python 3.13. Use :func:`locale.setlocale`, 736:func:`locale.getpreferredencoding(False) <locale.getpreferredencoding>` and 737:func:`locale.getlocale` functions instead. Patch by Victor Stinner. 738 739.. 740 741.. bpo: 46655 742.. date: 2022-02-06-08-54-03 743.. nonce: DiLzYv 744.. section: Library 745 746In :func:`typing.get_type_hints`, support evaluating bare stringified 747``TypeAlias`` annotations. Patch by Gregory Beauregard. 748 749.. 750 751.. bpo: 45948 752.. date: 2022-02-05-18-22-05 753.. nonce: w4mCnE 754.. section: Library 755 756Fixed a discrepancy in the C implementation of the 757:mod:`xml.etree.ElementTree` module. Now, instantiating an 758:class:`xml.etree.ElementTree.XMLParser` with a ``target=None`` keyword 759provides a default :class:`xml.etree.ElementTree.TreeBuilder` target as the 760Python implementation does. 761 762.. 763 764.. bpo: 46626 765.. date: 2022-02-03-10-22-42 766.. nonce: r2e-n_ 767.. section: Library 768 769Expose Linux's ``IP_BIND_ADDRESS_NO_PORT`` option in :mod:`socket`. 770 771.. 772 773.. bpo: 46521 774.. date: 2022-02-01-19-34-28 775.. nonce: IMUIrs 776.. section: Library 777 778Fix a bug in the :mod:`codeop` module that was incorrectly identifying 779invalid code involving string quotes as valid code. 780 781.. 782 783.. bpo: 46571 784.. date: 2022-02-01-11-21-34 785.. nonce: L40xUJ 786.. section: Library 787 788Improve :func:`typing.no_type_check`. 789 790Now it does not modify external classes and functions. We also now correctly 791mark classmethods as not to be type checked. 792 793.. 794 795.. bpo: 46400 796.. date: 2022-01-30-15-16-12 797.. nonce: vweUiO 798.. section: Library 799 800expat: Update libexpat from 2.4.1 to 2.4.4 801 802.. 803 804.. bpo: 46556 805.. date: 2022-01-27-23-20-30 806.. nonce: tlpAgS 807.. section: Library 808 809Deprecate undocumented support for using a :class:`pathlib.Path` object as a 810context manager. 811 812.. 813 814.. bpo: 46534 815.. date: 2022-01-26-18-06-08 816.. nonce: vhzUM4 817.. section: Library 818 819Implement :pep:`673` :class:`typing.Self`. Patch by James Hilton-Balfe. 820 821.. 822 823.. bpo: 46522 824.. date: 2022-01-25-15-31-04 825.. nonce: tYAlX4 826.. section: Library 827 828Make various module ``__getattr__`` AttributeErrors more closely match a 829typical AttributeError 830 831.. 832 833.. bpo: 46475 834.. date: 2022-01-23-15-35-07 835.. nonce: UCe18S 836.. section: Library 837 838Add :data:`typing.Never` and :func:`typing.assert_never`. Patch by Jelle 839Zijlstra. 840 841.. 842 843.. bpo: 46333 844.. date: 2022-01-11-15-54-15 845.. nonce: B1faiF 846.. section: Library 847 848The :meth:`__eq__` and :meth:`__hash__` methods of 849:class:`typing.ForwardRef` now honor the ``module`` parameter of 850:class:`typing.ForwardRef`. Forward references from different modules are 851now differentiated. 852 853.. 854 855.. bpo: 46246 856.. date: 2022-01-07-13-27-53 857.. nonce: CTLx32 858.. section: Library 859 860Add missing ``__slots__`` to ``importlib.metadata.DeprecatedList``. Patch by 861Arie Bovenberg. 862 863.. 864 865.. bpo: 46232 866.. date: 2022-01-03-09-46-44 867.. nonce: s0KlyI 868.. section: Library 869 870The :mod:`ssl` module now handles certificates with bit strings in DN 871correctly. 872 873.. 874 875.. bpo: 46195 876.. date: 2021-12-30-21-38-51 877.. nonce: jFKGq_ 878.. section: Library 879 880:func:`typing.get_type_hints` no longer adds ``Optional`` to parameters with 881``None`` as a default. This aligns to changes to PEP 484 in 882https://github.com/python/peps/pull/689 883 884.. 885 886.. bpo: 31369 887.. date: 2021-12-27-18-28-44 888.. nonce: b9yM94 889.. section: Library 890 891Add :class:`~re.RegexFlag` to ``re.__all__`` and documented it. Add 892:data:`~re.RegexFlag.NOFLAG` to indicate no flags being set. 893 894.. 895 896.. bpo: 45898 897.. date: 2021-11-26-10-46-09 898.. nonce: UIfhsb 899.. section: Library 900 901:mod:`ctypes` no longer defines ``ffi_type_*`` symbols in ``cfield.c``. The 902symbols have been provided by libffi for over a decade. 903 904.. 905 906.. bpo: 44953 907.. date: 2021-08-19-09-29-43 908.. nonce: 27ZyUd 909.. section: Library 910 911Calling ``operator.itemgetter`` objects and ``operator.attrgetter`` objects 912is now faster due to use of the vectorcall calling convention. 913 914.. 915 916.. bpo: 44289 917.. date: 2021-06-02-19-47-46 918.. nonce: xC5kuV 919.. section: Library 920 921Fix an issue with :meth:`~tarfile.is_tarfile` method when using *fileobj* 922argument: position in the *fileobj* was advanced forward which made it 923unreadable with :meth:`tarfile.TarFile.open`. 924 925.. 926 927.. bpo: 44011 928.. date: 2021-05-02-23-44-21 929.. nonce: hd8iUO 930.. section: Library 931 932Reimplement SSL/TLS support in asyncio, borrow the implementation from 933uvloop library. 934 935.. 936 937.. bpo: 41086 938.. date: 2020-06-23-01-50-24 939.. nonce: YnOvpS 940.. section: Library 941 942Make the :class:`configparser.ConfigParser` constructor raise 943:exc:`TypeError` if the ``interpolation`` parameter is not of type 944:class:`configparser.Interpolation` 945 946.. 947 948.. bpo: 29418 949.. date: 2020-03-31-20-53-11 950.. nonce: 8Qa9cQ 951.. section: Library 952 953Implement :func:`inspect.ismethodwrapper` and fix :func:`inspect.isroutine` 954for cases where methodwrapper is given. Patch by Hakan Çelik. 955 956.. 957 958.. bpo: 14156 959.. date: 2019-05-07-14-25-45 960.. nonce: 0FaHXE 961.. section: Library 962 963argparse.FileType now supports an argument of '-' in binary mode, returning 964the .buffer attribute of sys.stdin/sys.stdout as appropriate. Modes 965including 'x' and 'a' are treated equivalently to 'w' when argument is '-'. 966Patch contributed by Josh Rosenberg 967 968.. 969 970.. bpo: 42238 971.. date: 2022-02-03-11-24-59 972.. nonce: yJcMa8 973.. section: Documentation 974 975``Doc/tools/rstlint.py`` has moved to its own repository and is now packaged 976on PyPI as ``sphinx-lint``. 977 978.. 979 980.. bpo: 46913 981.. date: 2022-03-03-17-36-24 982.. nonce: vxETIE 983.. section: Tests 984 985Fix test_faulthandler.test_sigfpe() if Python is built with undefined 986behavior sanitizer (UBSAN): disable UBSAN on the faulthandler_sigfpe() 987function. Patch by Victor Stinner. 988 989.. 990 991.. bpo: 46760 992.. date: 2022-02-16-10-38-18 993.. nonce: O3ovJo 994.. section: Tests 995 996Remove bytecode offsets from expected values in test.test_dis module. 997Reduces the obstacles to modifying the VM or compiler. 998 999.. 1000 1001.. bpo: 46708 1002.. date: 2022-02-10-14-33-47 1003.. nonce: avLfCb 1004.. section: Tests 1005 1006Prevent default asyncio event loop policy modification warning after 1007``test_asyncio`` execution. 1008 1009.. 1010 1011.. bpo: 46678 1012.. date: 2022-02-07-12-40-45 1013.. nonce: zfOrgL 1014.. section: Tests 1015 1016The function ``make_legacy_pyc`` in ``Lib/test/support/import_helper.py`` no 1017longer fails when ``PYTHONPYCACHEPREFIX`` is set to a directory on a 1018different device from where tempfiles are stored. 1019 1020.. 1021 1022.. bpo: 46623 1023.. date: 2022-02-03-09-45-26 1024.. nonce: vxzuhV 1025.. section: Tests 1026 1027Skip test_pair() and test_speech128() of test_zlib on s390x since they fail 1028if zlib uses the s390x hardware accelerator. Patch by Victor Stinner. 1029 1030.. 1031 1032.. bpo: 46860 1033.. date: 2022-02-25-16-19-40 1034.. nonce: jfciLG 1035.. section: Build 1036 1037Respect `--with-suffix` when building on case-insensitive file systems. 1038 1039.. 1040 1041.. bpo: 46656 1042.. date: 2022-02-25-00-51-16 1043.. nonce: MD783M 1044.. section: Build 1045 1046Building Python now requires a C11 compiler. Optional C11 features are not 1047required. 1048Patch by Victor Stinner. 1049 1050.. 1051 1052.. bpo: 46656 1053.. date: 2022-02-06-14-04-20 1054.. nonce: ajJjkh 1055.. section: Build 1056 1057Building Python now requires support for floating point Not-a-Number (NaN): 1058remove the ``Py_NO_NAN`` macro. Patch by Victor Stinner. 1059 1060.. 1061 1062.. bpo: 46640 1063.. date: 2022-02-04-21-26-50 1064.. nonce: HXUmQp 1065.. section: Build 1066 1067Building Python now requires a C99 ``<math.h>`` header file providing a 1068``NAN`` constant, or the ``__builtin_nan()`` built-in function. Patch by 1069Victor Stinner. 1070 1071.. 1072 1073.. bpo: 46608 1074.. date: 2022-02-02-11-26-46 1075.. nonce: cXH9po 1076.. section: Build 1077 1078Exclude marshalled-frozen data if deep-freezing to save 300 KB disk space. 1079This includes adding a new ``is_package`` field to :c:struct:`_frozen`. 1080Patch by Kumar Aditya. 1081 1082.. 1083 1084.. bpo: 40280 1085.. date: 2022-01-31-15-15-08 1086.. nonce: r1AYNW 1087.. section: Build 1088 1089Fix wasm32-emscripten test failures and platform issues. - Disable syscalls 1090that are not supported or don't work, e.g. wait, getrusage, prlimit, 1091mkfifo, mknod, setres[gu]id, setgroups. - Use fd_count to cound open fds. - 1092Add more checks for subprocess and fork. - Add workarounds for missing 1093_multiprocessing and failing socket.accept(). - Enable bzip2. - Disable 1094large file support. - Disable signal.alarm. 1095 1096.. 1097 1098.. bpo: 46430 1099.. date: 2022-01-19-11-08-32 1100.. nonce: k403m_ 1101.. section: Build 1102 1103Intern strings in deep-frozen modules. Patch by Kumar Aditya. 1104 1105.. 1106 1107.. bpo: 46744 1108.. date: 2022-03-04-00-24-55 1109.. nonce: tneWFr 1110.. section: Windows 1111 1112The default all users install directory for ARM64 is now under the native 1113``Program Files`` folder, rather than ``Program Files (Arm)`` which is 1114intended for ARM (32-bit) files. 1115 1116.. 1117 1118.. bpo: 46567 1119.. date: 2022-02-25-01-22-31 1120.. nonce: 37WEue 1121.. section: Windows 1122 1123Adds Tcl and Tk support for Windows ARM64. This also adds IDLE to the 1124installation. 1125 1126.. 1127 1128.. bpo: 46638 1129.. date: 2022-02-04-18-02-33 1130.. nonce: mSJOSX 1131.. section: Windows 1132 1133Ensures registry virtualization is consistently disabled. For 3.10 and 1134earlier, it remains enabled (some registry writes are protected), while for 11353.11 and later it is disabled (registry modifications affect all 1136applications). 1137 1138.. 1139 1140.. bpo: 46630 1141.. date: 2022-02-03-15-47-53 1142.. nonce: tREOjo 1143.. section: IDLE 1144 1145Make query dialogs on Windows start with a cursor in the entry box. 1146 1147.. 1148 1149.. bpo: 45447 1150.. date: 2021-10-14-16-55-03 1151.. nonce: FhiH5P 1152.. section: IDLE 1153 1154Apply IDLE syntax highlighting to `.pyi` files. Patch by Alex Waygood and 1155Terry Jan Reedy. 1156 1157.. 1158 1159.. bpo: 46748 1160.. date: 2022-02-24-13-13-16 1161.. nonce: aG1zb3 1162.. section: C API 1163 1164Python's public headers no longer import ``<stdbool.h>``, leaving code that 1165embedd/extends Python free to define ``bool``, ``true`` and ``false``. 1166 1167.. 1168 1169.. bpo: 46836 1170.. date: 2022-02-23-16-13-17 1171.. nonce: ZYyPF_ 1172.. section: C API 1173 1174Move the :c:type:`PyFrameObject` type definition (``struct _frame``) to the 1175internal C API ``pycore_frame.h`` header file. Patch by Victor Stinner. 1176 1177.. 1178 1179.. bpo: 45459 1180.. date: 2022-02-07-18-47-00 1181.. nonce: 0FCWM8 1182.. section: C API 1183 1184Rename ``Include/buffer.h`` header file to ``Include/pybuffer.h`` to avoid 1185conflits with projects having an existing ``buffer.h`` header file. Patch by 1186Victor Stinner. 1187 1188.. 1189 1190.. bpo: 45412 1191.. date: 2022-02-06-20-14-21 1192.. nonce: XJVaGW 1193.. section: C API 1194 1195Remove the ``HAVE_PY_SET_53BIT_PRECISION`` macro (moved to the internal C 1196API). Patch by Victor Stinner. 1197 1198.. 1199 1200.. bpo: 46613 1201.. date: 2022-02-02-17-58-49 1202.. nonce: __ZdpH 1203.. section: C API 1204 1205Added function :c:func:`PyType_GetModuleByDef`, which allows accesss to 1206module state when a method's defining class is not available. 1207