1.. date: 2023-05-02-17-56-32 2.. gh-issue: 99889 3.. nonce: l664SU 4.. release date: 2023-05-22 5.. section: Security 6 7Fixed a security in flaw in :func:`!uu.decode` that could allow for directory 8traversal based on the input if no ``out_file`` was specified. 9 10.. 11 12.. date: 2023-05-01-15-03-25 13.. gh-issue: 104049 14.. nonce: b01Y3g 15.. section: Security 16 17Do not expose the local on-disk location in directory indexes produced by 18:class:`http.client.SimpleHTTPRequestHandler`. 19 20.. 21 22.. date: 2023-04-17-14-38-12 23.. gh-issue: 99108 24.. nonce: 720lG8 25.. section: Security 26 27Upgrade built-in :mod:`hashlib` SHA3 implementation to a verified 28implementation from the ``HACL*`` project. Used when OpenSSL is not present 29or lacks SHA3. 30 31.. 32 33.. date: 2023-03-07-20-59-17 34.. gh-issue: 102153 35.. nonce: 14CLSZ 36.. section: Security 37 38:func:`urllib.parse.urlsplit` now strips leading C0 control and space 39characters following the specification for URLs defined by WHATWG in 40response to :cve:`2023-24329`. Patch by Illia Volochii. 41 42.. 43 44.. date: 2023-05-20-23-08-48 45.. gh-issue: 102856 46.. nonce: Knv9WT 47.. section: Core and Builtins 48 49Implement PEP 701 changes in the :mod:`tokenize` module. Patch by Marta 50Gómez Macías and Pablo Galindo Salgado 51 52.. 53 54.. date: 2023-05-18-13-00-21 55.. gh-issue: 104615 56.. nonce: h_rtw2 57.. section: Core and Builtins 58 59Fix wrong ordering of assignments in code like ``a, a = x, y``. Contributed 60by Carl Meyer. 61 62.. 63 64.. date: 2023-05-16-19-17-48 65.. gh-issue: 104572 66.. nonce: eBZQYS 67.. section: Core and Builtins 68 69Improve syntax error message for invalid constructs in :pep:`695` contexts 70and in annotations when ``from __future__ import annotations`` is active. 71 72.. 73 74.. date: 2023-05-14-18-56-54 75.. gh-issue: 104482 76.. nonce: yaQsv8 77.. section: Core and Builtins 78 79Fix three error handling bugs in ast.c's validation of pattern matching 80statements. 81 82.. 83 84.. date: 2023-05-12-13-30-04 85.. gh-issue: 102818 86.. nonce: rnv1mH 87.. section: Core and Builtins 88 89Do not add a frame to the traceback in the ``sys.setprofile`` and 90``sys.settrace`` trampoline functions. This ensures that frames are not 91duplicated if an exception is raised in the callback function, and ensures 92that frames are not omitted if a C callback is used and that does not add 93the frame. 94 95.. 96 97.. date: 2023-05-11-15-56-07 98.. gh-issue: 104405 99.. nonce: tXV5fn 100.. section: Core and Builtins 101 102Fix an issue where some :term:`bytecode` instructions could ignore 103:pep:`523` when "inlining" calls. 104 105.. 106 107.. date: 2023-05-10-20-52-29 108.. gh-issue: 103082 109.. nonce: y3LG5Q 110.. section: Core and Builtins 111 112Change behavior of ``sys.monitoring.events.LINE`` events in 113``sys.monitoring``: Line events now occur when a new line is reached 114dynamically, instead of using a static approximation, as before. This makes 115the behavior very similar to that of "line" events in ``sys.settrace``. This 116should ease porting of tools from 3.11 to 3.12. 117 118.. 119 120.. date: 2023-05-08-10-34-55 121.. gh-issue: 104263 122.. nonce: ctHWI8 123.. section: Core and Builtins 124 125Fix ``float("nan")`` to produce a quiet NaN on platforms (like MIPS) where 126the meaning of the signalling / quiet bit is inverted from its usual 127meaning. Also introduce a new macro ``Py_INFINITY`` matching C99's 128``INFINITY``, and refactor internals to rely on C99's ``NAN`` and 129``INFINITY`` macros instead of hard-coding bit patterns for infinities and 130NaNs. Thanks Sebastian Berg. 131 132.. 133 134.. date: 2023-05-05-13-18-56 135.. gh-issue: 99113 136.. nonce: hT1ajK 137.. section: Core and Builtins 138 139Multi-phase init extension modules may now indicate that they support 140running in subinterpreters that have their own GIL. This is done by using 141``Py_MOD_PER_INTERPRETER_GIL_SUPPORTED`` as the value for the 142``Py_mod_multiple_interpreters`` module def slot. Otherwise the module, by 143default, cannot be imported in such subinterpreters. (This does not affect 144the main interpreter or subinterpreters that do not have their own GIL.) In 145addition to the isolation that multi-phase init already normally requires, 146support for per-interpreter GIL involves one additional constraint: 147thread-safety. If the module has external (linked) dependencies and those 148libraries have any state that isn't thread-safe then the module must do the 149additional work to add thread-safety. This should be an uncommon case. 150 151.. 152 153.. date: 2023-05-05-12-14-47 154.. gh-issue: 99113 155.. nonce: -RAdnv 156.. section: Core and Builtins 157 158The GIL is now (optionally) per-interpreter. This is the fundamental change 159for PEP 684. This is all made possible by virtue of the isolated state of 160each interpreter in the process. The behavior of the main interpreter 161remains unchanged. Likewise, interpreters created using 162``Py_NewInterpreter()`` are not affected. To get an interpreter with its 163own GIL, call ``Py_NewInterpreterFromConfig()``. 164 165.. 166 167.. date: 2023-05-03-17-46-47 168.. gh-issue: 104108 169.. nonce: GOxAYt 170.. section: Core and Builtins 171 172Multi-phase init extension modules may now indicate whether or not they 173actually support multiple interpreters. By default such modules are 174expected to support use in multiple interpreters. In the uncommon case that 175one does not, it may use the new ``Py_mod_multiple_interpreters`` module def 176slot. A value of ``0`` means the module does not support them. ``1`` means 177it does. The default is ``1``. 178 179.. 180 181.. date: 2023-05-02-18-29-49 182.. gh-issue: 104142 183.. nonce: _5Et6I 184.. section: Core and Builtins 185 186Fix an issue where :class:`list` or :class:`tuple` repetition could fail to 187respect :pep:`683`. 188 189.. 190 191.. date: 2023-05-01-21-05-47 192.. gh-issue: 104078 193.. nonce: vRaBsU 194.. section: Core and Builtins 195 196Improve the performance of :c:func:`PyObject_HasAttrString` 197 198.. 199 200.. date: 2023-05-01-14-48-29 201.. gh-issue: 104066 202.. nonce: pzoUZQ 203.. section: Core and Builtins 204 205Improve the performance of :func:`hasattr` for module objects with a missing 206attribute. 207 208.. 209 210.. date: 2023-05-01-14-10-38 211.. gh-issue: 104028 212.. nonce: dxfh13 213.. section: Core and Builtins 214 215Reduce object creation while calling callback function from gc. Patch by 216Donghee Na. 217 218.. 219 220.. date: 2023-05-01-12-03-52 221.. gh-issue: 104018 222.. nonce: PFxGS4 223.. section: Core and Builtins 224 225Disallow the "z" format specifier in %-format of bytes objects. 226 227.. 228 229.. date: 2023-05-01-08-08-05 230.. gh-issue: 102213 231.. nonce: nfH-4C 232.. section: Core and Builtins 233 234Fix performance loss when accessing an object's attributes with 235``__getattr__`` defined. 236 237.. 238 239.. date: 2023-04-26-17-56-18 240.. gh-issue: 103895 241.. nonce: ESB6tn 242.. section: Core and Builtins 243 244Improve handling of edge cases in showing ``Exception.__notes__``. Ensures 245that the messages always end with a newline and that string/bytes are not 246exploded over multiple lines. Patch by Carey Metcalfe. 247 248.. 249 250.. date: 2023-04-26-16-26-35 251.. gh-issue: 103907 252.. nonce: kiONZQ 253.. section: Core and Builtins 254 255Don't modify the refcounts of known immortal objects (:const:`True`, 256:const:`False`, and :const:`None`) in the main interpreter loop. 257 258.. 259 260.. date: 2023-04-26-15-14-23 261.. gh-issue: 103899 262.. nonce: 1pqKPF 263.. section: Core and Builtins 264 265Provide a helpful hint in the :exc:`TypeError` message when accidentally 266calling a :term:`module` object that has a callable attribute of the same 267name (such as :func:`dis.dis` or :class:`datetime.datetime`). 268 269.. 270 271.. date: 2023-04-25-20-56-01 272.. gh-issue: 103845 273.. nonce: V7NYFn 274.. section: Core and Builtins 275 276Remove both line and instruction instrumentation before adding new ones for 277monitoring, to avoid newly added instrumentation being removed immediately. 278 279.. 280 281.. date: 2023-04-25-08-43-11 282.. gh-issue: 103763 283.. nonce: ZLBZk1 284.. section: Core and Builtins 285 286Implement :pep:`695`, adding syntactic support for generic classes, generic 287functions, and type aliases. 288 289A new ``type X = ...`` syntax is added for type aliases, which resolves at 290runtime to an instance of the new class ``typing.TypeAliasType``. The value 291is lazily evaluated and is accessible through the ``.__value__`` attribute. 292This is implemented as a new AST node ``ast.TypeAlias``. 293 294New syntax (``class X[T]: ...``, ``def func[T](): ...``) is added for 295defining generic functions and classes. This is implemented as a new 296``type_params`` attribute on the AST nodes for classes and functions. This 297node holds instances of the new AST classes ``ast.TypeVar``, 298``ast.ParamSpec``, and ``ast.TypeVarTuple``. 299 300``typing.TypeVar``, ``typing.ParamSpec``, ``typing.ParamSpecArgs``, 301``typing.ParamSpecKwargs``, ``typing.TypeVarTuple``, and ``typing.Generic`` 302are now implemented in C rather than Python. 303 304There are new bytecode instructions ``LOAD_LOCALS``, 305``LOAD_CLASSDICT_OR_GLOBAL``, and ``LOAD_CLASSDICT_OR_DEREF`` to support 306correct resolution of names in class namespaces. 307 308Patch by Eric Traut, Larry Hastings, and Jelle Zijlstra. 309 310.. 311 312.. date: 2023-04-24-21-47-38 313.. gh-issue: 103801 314.. nonce: WaBanq 315.. section: Core and Builtins 316 317Adds three minor linting fixes to the wasm module caught that were caught by 318ruff. 319 320.. 321 322.. date: 2023-04-24-14-38-16 323.. gh-issue: 103793 324.. nonce: kqoH6Q 325.. section: Core and Builtins 326 327Optimized asyncio Task creation by deferring expensive string formatting 328(task name generation) from Task creation to the first time ``get_name`` is 329called. This makes asyncio benchmarks up to 5% faster. 330 331.. 332 333.. date: 2023-04-21-17-03-14 334.. gh-issue: 102310 335.. nonce: anLjDx 336.. section: Core and Builtins 337 338Change the error range for invalid bytes literals. 339 340.. 341 342.. date: 2023-04-21-16-12-41 343.. gh-issue: 103590 344.. nonce: 7DHDOE 345.. section: Core and Builtins 346 347Do not wrap a single exception raised from a ``try-except*`` construct in an 348:exc:`ExceptionGroup`. 349 350.. 351 352.. date: 2023-04-20-16-17-51 353.. gh-issue: 103650 354.. nonce: K1MFXR 355.. section: Core and Builtins 356 357Change the perf map format to remove the '0x' prefix from the addresses 358 359.. 360 361.. date: 2023-04-17-16-00-32 362.. gh-issue: 102856 363.. nonce: UunJ7y 364.. section: Core and Builtins 365 366Implement the required C tokenizer changes for PEP 701. Patch by Pablo 367Galindo Salgado, Lysandros Nikolaou, Batuhan Taskaya, Marta Gómez Macías and 368sunmy2019. 369 370.. 371 372.. date: 2023-04-16-14-38-39 373.. gh-issue: 100530 374.. nonce: OR6-sn 375.. section: Core and Builtins 376 377Clarify the error message raised when the called part of a class pattern 378isn't actually a class. 379 380.. 381 382.. date: 2023-04-14-22-35-23 383.. gh-issue: 101517 384.. nonce: 5EqM-S 385.. section: Core and Builtins 386 387Fix bug in line numbers of instructions emitted for :keyword:`except* 388<except_star>`. 389 390.. 391 392.. date: 2023-04-13-00-58-55 393.. gh-issue: 103492 394.. nonce: P4k0Ay 395.. section: Core and Builtins 396 397Clarify :exc:`SyntaxWarning` with literal ``is`` comparison by specifying 398which literal is problematic, since comparisons using ``is`` with e.g. ``None`` 399and bool literals are idiomatic. 400 401.. 402 403.. date: 2023-04-12-20-22-03 404.. gh-issue: 87729 405.. nonce: 99A7UO 406.. section: Core and Builtins 407 408Add :opcode:`LOAD_SUPER_ATTR` (and a specialization for 409``super().method()``) to speed up ``super().method()`` and ``super().attr``. 410This makes ``super().method()`` roughly 2.3x faster and brings it within 20% 411of the performance of a simple method call. Patch by Vladimir Matveev and 412Carl Meyer. 413 414.. 415 416.. date: 2023-04-12-20-18-51 417.. gh-issue: 103488 418.. nonce: vYvlHD 419.. section: Core and Builtins 420 421Change the internal offset distinguishing yield and return target addresses, 422so that the instruction pointer is correct for exception handling and other 423stack unwinding. 424 425.. 426 427.. date: 2023-04-12-19-55-24 428.. gh-issue: 82012 429.. nonce: FlcJAh 430.. section: Core and Builtins 431 432The bitwise inversion operator (``~``) on bool is deprecated. It returns the 433bitwise inversion of the underlying ``int`` representation such that 434``bool(~True) == True``, which can be confusing. Use ``not`` for logical 435negation of bools. In the rare case that you really need the bitwise 436inversion of the underlying ``int``, convert to int explicitly ``~int(x)``. 437 438.. 439 440.. date: 2023-04-09-22-21-57 441.. gh-issue: 77757 442.. nonce: _Ow-u2 443.. section: Core and Builtins 444 445Exceptions raised in a typeobject's ``__set_name__`` method are no longer 446wrapped by a :exc:`RuntimeError`. Context information is added to the 447exception as a :pep:`678` note. 448 449.. 450 451.. date: 2023-04-09-04-30-02 452.. gh-issue: 103333 453.. nonce: gKOetS 454.. section: Core and Builtins 455 456:exc:`AttributeError` now retains the ``name`` attribute when pickled and 457unpickled. 458 459.. 460 461.. date: 2023-04-08-17-13-07 462.. gh-issue: 103242 463.. nonce: ysI1b3 464.. section: Core and Builtins 465 466Migrate :meth:`~ssl.SSLContext.set_ecdh_curve` method not to use deprecated 467OpenSSL APIs. Patch by Donghee Na. 468 469.. 470 471.. date: 2023-04-07-12-18-41 472.. gh-issue: 103323 473.. nonce: 9802br 474.. section: Core and Builtins 475 476We've replaced our use of ``_PyRuntime.tstate_current`` with a thread-local 477variable. This is a fairly low-level implementation detail, and there 478should be no change in behavior. 479 480.. 481 482.. date: 2023-04-02-22-14-57 483.. gh-issue: 84436 484.. nonce: hvMgwF 485.. section: Core and Builtins 486 487The implementation of PEP-683 which adds Immortal Objects by using a fixed 488reference count that skips reference counting to make objects truly 489immutable. 490 491.. 492 493.. date: 2023-04-01-00-46-31 494.. gh-issue: 102700 495.. nonce: 493NB4 496.. section: Core and Builtins 497 498Allow built-in modules to be submodules. This allows submodules to be 499statically linked into a CPython binary. 500 501.. 502 503.. date: 2023-03-31-17-24-03 504.. gh-issue: 103082 505.. nonce: isRUcV 506.. section: Core and Builtins 507 508Implement :pep:`669` Low Impact Monitoring for CPython. 509 510.. 511 512.. date: 2023-03-25-23-24-38 513.. gh-issue: 88691 514.. nonce: 2SWBd1 515.. section: Core and Builtins 516 517Reduce the number of inline :opcode:`CACHE` entries for :opcode:`CALL`. 518 519.. 520 521.. date: 2023-03-07-17-37-00 522.. gh-issue: 102500 523.. nonce: RUSQhz 524.. section: Core and Builtins 525 526Make the buffer protocol accessible in Python code using the new 527``__buffer__`` and ``__release_buffer__`` magic methods. See :pep:`688` for 528details. Patch by Jelle Zijlstra. 529 530.. 531 532.. date: 2023-01-30-15-40-29 533.. gh-issue: 97933 534.. nonce: nUlp3r 535.. section: Core and Builtins 536 537:pep:`709`: inline list, dict and set comprehensions to improve performance 538and reduce bytecode size. 539 540.. 541 542.. date: 2022-11-08-12-36-25 543.. gh-issue: 99184 544.. nonce: KIaqzz 545.. section: Core and Builtins 546 547Bypass instance attribute access of ``__name__`` in ``repr`` of 548:class:`weakref.ref`. 549 550.. 551 552.. date: 2022-10-06-23-32-11 553.. gh-issue: 98003 554.. nonce: xWE0Yu 555.. section: Core and Builtins 556 557Complex function calls are now faster and consume no C stack space. 558 559.. 560 561.. bpo: 39610 562.. date: 2020-02-11-15-54-40 563.. nonce: fvgsCl 564.. section: Core and Builtins 565 566``len()`` for 0-dimensional :class:`memoryview` objects (such as 567``memoryview(ctypes.c_uint8(42))``) now raises a :exc:`TypeError`. 568Previously this returned ``1``, which was not consistent with ``mem_0d[0]`` 569raising an :exc:`IndexError`. 570 571.. 572 573.. bpo: 31821 574.. date: 2019-12-01-12-58-31 575.. nonce: 1FNmwk 576.. section: Core and Builtins 577 578Fix :func:`!pause_reading` to work when called from :func:`!connection_made` 579in :mod:`asyncio`. 580 581.. 582 583.. date: 2023-05-17-21-01-48 584.. gh-issue: 104600 585.. nonce: E6CK35 586.. section: Library 587 588:func:`functools.update_wrapper` now sets the ``__type_params__`` attribute 589(added by :pep:`695`). 590 591.. 592 593.. date: 2023-05-17-20-03-01 594.. gh-issue: 104340 595.. nonce: kp_XmX 596.. section: Library 597 598When an ``asyncio`` pipe protocol loses its connection due to an error, and 599the caller doesn't await ``wait_closed()`` on the corresponding 600``StreamWriter``, don't log a warning about an exception that was never 601retrieved. After all, according to the ``StreamWriter.close()`` docs, the 602``wait_closed()`` call is optional ("not mandatory"). 603 604.. 605 606.. date: 2023-05-17-16-58-23 607.. gh-issue: 104555 608.. nonce: 5rb5oM 609.. section: Library 610 611Fix issue where an :func:`issubclass` check comparing a class ``X`` against 612a :func:`runtime-checkable protocol <typing.runtime_checkable>` ``Y`` with 613non-callable members would not cause :exc:`TypeError` to be raised if an 614:func:`isinstance` call had previously been made comparing an instance of 615``X`` to ``Y``. This issue was present in edge cases on Python 3.11, but 616became more prominent in 3.12 due to some unrelated changes that were made 617to runtime-checkable protocols. Patch by Alex Waygood. 618 619.. 620 621.. date: 2023-05-17-08-01-36 622.. gh-issue: 104372 623.. nonce: jpoWs6 624.. section: Library 625 626Refactored the ``_posixsubprocess`` internals to avoid Python C API usage 627between fork and exec when marking ``pass_fds=`` file descriptors 628inheritable. 629 630.. 631 632.. date: 2023-05-17-03-14-07 633.. gh-issue: 104484 634.. nonce: y6KxL6 635.. section: Library 636 637Added *case_sensitive* argument to :meth:`pathlib.PurePath.match` 638 639.. 640 641.. date: 2023-05-16-11-02-44 642.. gh-issue: 75367 643.. nonce: qLWR35 644.. section: Library 645 646Fix data descriptor detection in :func:`inspect.getattr_static`. 647 648.. 649 650.. date: 2023-05-16-10-07-16 651.. gh-issue: 104536 652.. nonce: hFWD8f 653.. section: Library 654 655Fix a race condition in the internal :mod:`multiprocessing.process` cleanup 656logic that could manifest as an unintended ``AttributeError`` when calling 657``process.close()``. 658 659.. 660 661.. date: 2023-05-12-19-29-28 662.. gh-issue: 103857 663.. nonce: 0IzSxr 664.. section: Library 665 666Update datetime deprecations' stracktrace to point to the calling line 667 668.. 669 670.. date: 2023-05-11-21-32-18 671.. gh-issue: 101520 672.. nonce: l9MjRE 673.. section: Library 674 675Move the core functionality of the ``tracemalloc`` module in the ``Python/`` 676folder, leaving just the module wrapper in ``Modules/``. 677 678.. 679 680.. date: 2023-05-11-07-50-00 681.. gh-issue: 104392 682.. nonce: YSllzt 683.. section: Library 684 685Remove undocumented and unused ``_paramspec_tvars`` attribute from some 686classes in :mod:`typing`. 687 688.. 689 690.. date: 2023-05-11-01-07-42 691.. gh-issue: 102613 692.. nonce: uMsokt 693.. section: Library 694 695Fix issue where :meth:`pathlib.Path.glob` raised :exc:`RecursionError` when 696walking deep directory trees. 697 698.. 699 700.. date: 2023-05-10-19-33-36 701.. gh-issue: 103000 702.. nonce: j0KSfD 703.. section: Library 704 705Improve performance of :func:`dataclasses.asdict` for the common case where 706*dict_factory* is ``dict``. Patch by David C Ellis. 707 708.. 709 710.. date: 2023-05-09-18-46-24 711.. gh-issue: 104301 712.. nonce: gNnbId 713.. section: Library 714 715Allow leading whitespace in disambiguated statements in :mod:`pdb`. 716 717.. 718 719.. date: 2023-05-08-23-01-59 720.. gh-issue: 104139 721.. nonce: 83Tnt- 722.. section: Library 723 724Teach :func:`urllib.parse.unsplit` to retain the ``"//"`` when assembling 725``itms-services://?action=generate-bugs`` style `Apple Platform Deployment 726<https://support.apple.com/en-gb/guide/deployment/depce7cefc4d/web>`_ URLs. 727 728.. 729 730.. date: 2023-05-08-20-57-17 731.. gh-issue: 104307 732.. nonce: DSB93G 733.. section: Library 734 735:func:`socket.getnameinfo` now releases the GIL while contacting the DNS 736server 737 738.. 739 740.. date: 2023-05-08-15-50-59 741.. gh-issue: 104310 742.. nonce: fXVSPY 743.. section: Library 744 745Users may now use ``importlib.util.allowing_all_extensions()`` (a context 746manager) to temporarily disable the strict compatibility checks for 747importing extension modules in subinterpreters. 748 749.. 750 751.. date: 2023-05-08-15-39-00 752.. gh-issue: 87695 753.. nonce: f6iO7v 754.. section: Library 755 756Fix issue where :meth:`pathlib.Path.glob` raised :exc:`OSError` when it 757encountered a symlink to an overly long path. 758 759.. 760 761.. date: 2023-05-07-19-56-45 762.. gh-issue: 104265 763.. nonce: fVblry 764.. section: Library 765 766Prevent possible crash by disallowing instantiation of the 767:class:`!_csv.Reader` and :class:`!_csv.Writer` types. The regression was 768introduced in 3.10.0a4 with PR 23224 (:issue:`14935`). Patch by Radislav 769Chugunov. 770 771.. 772 773.. date: 2023-05-06-20-37-46 774.. gh-issue: 102613 775.. nonce: QZG9iX 776.. section: Library 777 778Improve performance of :meth:`pathlib.Path.glob` when expanding recursive 779wildcards ("``**``") by merging adjacent wildcards and de-duplicating 780results only when necessary. 781 782.. 783 784.. date: 2023-05-05-18-52-22 785.. gh-issue: 65772 786.. nonce: w5P5Wv 787.. section: Library 788 789Remove unneeded comments and code in turtle.py. 790 791.. 792 793.. date: 2023-05-03-19-22-24 794.. gh-issue: 90208 795.. nonce: tI00da 796.. section: Library 797 798Fixed issue where :meth:`pathlib.Path.glob` returned incomplete results when 799it encountered a :exc:`PermissionError`. This method now suppresses all 800:exc:`OSError` exceptions, except those raised from calling 801:meth:`~pathlib.Path.is_dir` on the top-level path. 802 803.. 804 805.. date: 2023-05-03-16-51-53 806.. gh-issue: 104144 807.. nonce: 653Q0P 808.. section: Library 809 810Optimize :class:`asyncio.TaskGroup` when using 811:func:`asyncio.eager_task_factory`. Skip scheduling a done callback if a 812TaskGroup task completes eagerly. 813 814.. 815 816.. date: 2023-05-03-16-50-24 817.. gh-issue: 104144 818.. nonce: yNkjL8 819.. section: Library 820 821Optimize :func:`asyncio.gather` when using 822:func:`asyncio.eager_task_factory` to complete eagerly if all fututres 823completed eagerly. Avoid scheduling done callbacks for futures that complete 824eagerly. 825 826.. 827 828.. date: 2023-05-03-03-14-33 829.. gh-issue: 104114 830.. nonce: RG26RD 831.. section: Library 832 833Fix issue where :meth:`pathlib.Path.glob` returns paths using the case of 834non-wildcard segments for corresponding path segments, rather than the real 835filesystem case. 836 837.. 838 839.. date: 2023-05-02-21-05-30 840.. gh-issue: 104104 841.. nonce: 9tjplT 842.. section: Library 843 844Improve performance of :meth:`pathlib.Path.glob` by using 845:const:`re.IGNORECASE` to implement case-insensitive matching. 846 847.. 848 849.. date: 2023-05-02-20-43-03 850.. gh-issue: 104102 851.. nonce: vgSdEJ 852.. section: Library 853 854Improve performance of :meth:`pathlib.Path.glob` when evaluating patterns 855that contain ``'../'`` segments. 856 857.. 858 859.. date: 2023-05-02-04-49-45 860.. gh-issue: 103822 861.. nonce: m0QdAO 862.. section: Library 863 864Update the return type of ``weekday`` to the newly added Day attribute 865 866.. 867 868.. date: 2023-05-01-19-10-05 869.. gh-issue: 103629 870.. nonce: 81bpZz 871.. section: Library 872 873Update the ``repr`` of :class:`typing.Unpack` according to :pep:`692`. 874 875.. 876 877.. date: 2023-05-01-17-58-28 878.. gh-issue: 103963 879.. nonce: XWlHx7 880.. section: Library 881 882Make :mod:`dis` display the names of the args for 883:opcode:`!CALL_INTRINSIC_*`. 884 885.. 886 887.. date: 2023-05-01-16-43-28 888.. gh-issue: 104035 889.. nonce: MrJBw8 890.. section: Library 891 892Do not ignore user-defined ``__getstate__`` and ``__setstate__`` methods for 893slotted frozen dataclasses. 894 895.. 896 897.. date: 2023-04-29-18-23-16 898.. gh-issue: 103987 899.. nonce: sRgALL 900.. section: Library 901 902In :mod:`mmap`, fix several bugs that could lead to access to memory-mapped 903files after they have been invalidated. 904 905.. 906 907.. date: 2023-04-28-19-08-50 908.. gh-issue: 103977 909.. nonce: msF70A 910.. section: Library 911 912Improve import time of :mod:`platform` module. 913 914.. 915 916.. date: 2023-04-28-18-04-23 917.. gh-issue: 88773 918.. nonce: xXCNJw 919.. section: Library 920 921Added :func:`turtle.teleport` to the :mod:`turtle` module to move a turtle 922to a new point without tracing a line, visible or invisible. Patch by Liam 923Gersten. 924 925.. 926 927.. date: 2023-04-27-20-03-08 928.. gh-issue: 103935 929.. nonce: Uaf2M0 930.. section: Library 931 932Use :func:`io.open_code` for files to be executed instead of raw 933:func:`open` 934 935.. 936 937.. date: 2023-04-27-18-46-31 938.. gh-issue: 68968 939.. nonce: E3tnhy 940.. section: Library 941 942Fixed garbled output of :meth:`~unittest.TestCase.assertEqual` when an input 943lacks final newline. 944 945.. 946 947.. date: 2023-04-27-00-45-41 948.. gh-issue: 100370 949.. nonce: MgZ3KY 950.. section: Library 951 952Fix potential :exc:`OverflowError` in :meth:`sqlite3.Connection.blobopen` 953for 32-bit builds. Patch by Erlend E. Aasland. 954 955.. 956 957.. date: 2023-04-27-00-05-32 958.. gh-issue: 102628 959.. nonce: X230E- 960.. section: Library 961 962Substitute CTRL-D with CTRL-Z in :mod:`sqlite3` CLI banner when running on 963Windows. 964 965.. 966 967.. date: 2023-04-26-18-12-13 968.. gh-issue: 103636 969.. nonce: -KvCgO 970.. section: Library 971 972Module-level attributes ``January`` and ``February`` are deprecated from 973:mod:`calendar`. 974 975.. 976 977.. date: 2023-04-26-15-14-36 978.. gh-issue: 103583 979.. nonce: iCMDFt 980.. section: Library 981 982Isolate :mod:`!_multibytecodec` and codecs extension modules. Patches by 983Erlend E. Aasland. 984 985.. 986 987.. date: 2023-04-26-09-54-25 988.. gh-issue: 103848 989.. nonce: aDSnpR 990.. section: Library 991 992Add checks to ensure that ``[`` bracketed ``]`` hosts found by 993:func:`urllib.parse.urlsplit` are of IPv6 or IPvFuture format. 994 995.. 996 997.. date: 2023-04-26-09-38-47 998.. gh-issue: 103872 999.. nonce: 8LBsDz 1000.. section: Library 1001 1002Update the bundled copy of pip to version 23.1.2. 1003 1004.. 1005 1006.. date: 2023-04-25-22-59-06 1007.. gh-issue: 99944 1008.. nonce: pst8iT 1009.. section: Library 1010 1011Make :mod:`dis` display the value of oparg of :opcode:`!KW_NAMES`. 1012 1013.. 1014 1015.. date: 2023-04-25-22-06-00 1016.. gh-issue: 74940 1017.. nonce: TOacQ9 1018.. section: Library 1019 1020The C.UTF-8 locale is no longer converted to en_US.UTF-8, enabling the use 1021of UTF-8 encoding on systems which have no locales installed. 1022 1023.. 1024 1025.. date: 2023-04-25-19-58-13 1026.. gh-issue: 103861 1027.. nonce: JeozgD 1028.. section: Library 1029 1030Fix ``zipfile.Zipfile`` creating invalid zip files when ``force_zip64`` was 1031used to add files to them. Patch by Carey Metcalfe. 1032 1033.. 1034 1035.. date: 2023-04-25-17-03-18 1036.. gh-issue: 103857 1037.. nonce: Mr2Cak 1038.. section: Library 1039 1040Deprecated :meth:`datetime.datetime.utcnow` and 1041:meth:`datetime.datetime.utcfromtimestamp`. (Patch by Paul Ganssle) 1042 1043.. 1044 1045.. date: 2023-04-25-16-31-00 1046.. gh-issue: 103839 1047.. nonce: tpyLhI 1048.. section: Library 1049 1050Avoid compilation error due to tommath.h not being found when building 1051Tkinter against Tcl 8.7 built with bundled libtommath. 1052 1053.. 1054 1055.. date: 2023-04-24-23-07-56 1056.. gh-issue: 103791 1057.. nonce: bBPWdS 1058.. section: Library 1059 1060:class:`contextlib.suppress` now supports suppressing exceptions raised as 1061part of an :exc:`ExceptionGroup`. If other exceptions exist on the group, 1062they are re-raised in a group that does not contain the suppressed 1063exceptions. 1064 1065.. 1066 1067.. date: 2023-04-24-16-00-28 1068.. gh-issue: 90750 1069.. nonce: da0Xi8 1070.. section: Library 1071 1072Use :meth:`datetime.datetime.fromisocalendar` in the implementation of 1073:meth:`datetime.datetime.strptime`, which should now accept only valid ISO 1074dates. (Patch by Paul Ganssle) 1075 1076.. 1077 1078.. date: 2023-04-24-00-34-23 1079.. gh-issue: 103685 1080.. nonce: U14jBM 1081.. section: Library 1082 1083Prepare :meth:`tkinter.Menu.index` for Tk 8.7 so that it does not raise 1084``TclError: expected integer but got ""`` when it should return ``None``. 1085 1086.. 1087 1088.. date: 2023-04-23-15-39-17 1089.. gh-issue: 81403 1090.. nonce: zVz9Td 1091.. section: Library 1092 1093:class:`urllib.request.CacheFTPHandler` no longer raises :class:`URLError` 1094if a cached FTP instance is reused. ftplib's endtransfer method calls 1095voidresp to drain the connection to handle FTP instance reuse properly. 1096 1097.. 1098 1099.. date: 2023-04-22-22-37-39 1100.. gh-issue: 103699 1101.. nonce: NizCjc 1102.. section: Library 1103 1104Add ``__orig_bases__`` to non-generic TypedDicts, call-based TypedDicts, and 1105call-based NamedTuples. Other TypedDicts and NamedTuples already had the 1106attribute. 1107 1108.. 1109 1110.. date: 2023-04-22-21-34-13 1111.. gh-issue: 103693 1112.. nonce: SBtuLQ 1113.. section: Library 1114 1115Add convenience variable feature to :mod:`pdb` 1116 1117.. 1118 1119.. date: 2023-04-22-12-30-10 1120.. gh-issue: 92248 1121.. nonce: NcVTKR 1122.. section: Library 1123 1124Deprecate ``type``, ``choices``, and ``metavar`` parameters of 1125``argparse.BooleanOptionalAction``. 1126 1127.. 1128 1129.. date: 2023-04-22-11-20-27 1130.. gh-issue: 89415 1131.. nonce: YHk760 1132.. section: Library 1133 1134Add :mod:`socket` constants for source-specific multicast. Patch by Reese 1135Hyde. 1136 1137.. 1138 1139.. date: 2023-04-22-02-41-06 1140.. gh-issue: 103673 1141.. nonce: oE7S_k 1142.. section: Library 1143 1144:mod:`socketserver` gains ``ForkingUnixStreamServer`` and 1145``ForkingUnixDatagramServer`` classes. Patch by Jay Berry. 1146 1147.. 1148 1149.. date: 2023-04-21-10-25-39 1150.. gh-issue: 103636 1151.. nonce: YK6NEa 1152.. section: Library 1153 1154Added Enum for months and days in the calendar module. 1155 1156.. 1157 1158.. date: 2023-04-19-16-08-53 1159.. gh-issue: 84976 1160.. nonce: HwbzlD 1161.. section: Library 1162 1163Create a new ``Lib/_pydatetime.py`` file that defines the Python version of 1164the ``datetime`` module, and make ``datetime`` import the contents of the 1165new library only if the C implementation is missing. Currently, the full 1166Python implementation is defined and then deleted if the C implementation is 1167not available, slowing down ``import datetime`` unnecessarily. 1168 1169.. 1170 1171.. date: 2023-04-17-14-47-28 1172.. gh-issue: 103596 1173.. nonce: ME1y3_ 1174.. section: Library 1175 1176Attributes/methods are no longer shadowed by same-named enum members, 1177although they may be shadowed by enum.property's. 1178 1179.. 1180 1181.. date: 2023-04-16-19-48-21 1182.. gh-issue: 103584 1183.. nonce: 3mBTuM 1184.. section: Library 1185 1186Updated ``importlib.metadata`` with changes from ``importlib_metadata`` 5.2 1187through 6.5.0, including: Support ``installed-files.txt`` for 1188``Distribution.files`` when present. ``PackageMetadata`` now stipulates an 1189additional ``get`` method allowing for easy querying of metadata keys that 1190may not be present. ``packages_distributions`` now honors packages and 1191modules with Python modules that not ``.py`` sources (e.g. ``.pyc``, 1192``.so``). Expand protocol for ``PackageMetadata.get_all`` to match the 1193upstream implementation of ``email.message.Message.get_all`` in 1194python/typeshed#9620. Deprecated use of ``Distribution`` without defining 1195abstract methods. Deprecated expectation that 1196``PackageMetadata.__getitem__`` will return ``None`` for missing keys. In 1197the future, it will raise a ``KeyError``. 1198 1199.. 1200 1201.. date: 2023-04-16-18-29-04 1202.. gh-issue: 103578 1203.. nonce: fly1wc 1204.. section: Library 1205 1206Fixed a bug where :mod:`pdb` crashes when reading source file with different 1207encoding by replacing :func:`io.open` with :func:`io.open_code`. The new 1208method would also call into the hook set by :c:func:`PyFile_SetOpenCodeHook`. 1209 1210.. 1211 1212.. date: 2023-04-15-12-19-14 1213.. gh-issue: 103556 1214.. nonce: TEf-2m 1215.. section: Library 1216 1217Now creating :class:`inspect.Signature` objects with positional-only 1218parameter with a default followed by a positional-or-keyword parameter 1219without one is impossible. 1220 1221.. 1222 1223.. date: 2023-04-15-11-21-38 1224.. gh-issue: 103559 1225.. nonce: a9rYHG 1226.. section: Library 1227 1228Update the bundled copy of pip to version 23.1.1. 1229 1230.. 1231 1232.. date: 2023-04-14-21-16-05 1233.. gh-issue: 103548 1234.. nonce: lagdpp 1235.. section: Library 1236 1237Improve performance of :meth:`pathlib.Path.absolute` and 1238:meth:`~pathlib.Path.cwd` by joining paths only when necessary. Also improve 1239performance of :meth:`pathlib.PurePath.is_absolute` on Posix by skipping 1240path parsing and normalization. 1241 1242.. 1243 1244.. date: 2023-04-14-21-12-32 1245.. gh-issue: 103538 1246.. nonce: M4FK_v 1247.. section: Library 1248 1249Remove ``_tkinter`` module code guarded by definition of the ``TK_AQUA`` 1250macro which was only needed for Tk 8.4.7 or earlier and was never actually 1251defined by any build system or documented for manual use. 1252 1253.. 1254 1255.. date: 2023-04-14-06-32-54 1256.. gh-issue: 103533 1257.. nonce: n_AfcS 1258.. section: Library 1259 1260Update :mod:`cProfile` to use PEP 669 API 1261 1262.. 1263 1264.. date: 2023-04-13-19-43-15 1265.. gh-issue: 103525 1266.. nonce: uY4VYg 1267.. section: Library 1268 1269Fix misleading exception message when mixed ``str`` and ``bytes`` arguments 1270are supplied to :class:`pathlib.PurePath` and :class:`~pathlib.Path`. 1271 1272.. 1273 1274.. date: 2023-04-13-13-17-47 1275.. gh-issue: 103489 1276.. nonce: ZSZgmu 1277.. section: Library 1278 1279Add :meth:`~sqlite3.Connection.getconfig` and 1280:meth:`~sqlite3.Connection.setconfig` to :class:`~sqlite3.Connection` to 1281make configuration changes to a database connection. Patch by Erlend E. 1282Aasland. 1283 1284.. 1285 1286.. date: 2023-04-12-17-59-55 1287.. gh-issue: 103365 1288.. nonce: UBEE0U 1289.. section: Library 1290 1291Set default Flag boundary to ``STRICT`` and fix bitwise operations. 1292 1293.. 1294 1295.. date: 2023-04-12-13-04-16 1296.. gh-issue: 103472 1297.. nonce: C6bOHv 1298.. section: Library 1299 1300Avoid a potential :exc:`ResourceWarning` in 1301:class:`http.client.HTTPConnection` by closing the proxy / tunnel's CONNECT 1302response explicitly. 1303 1304.. 1305 1306.. date: 2023-04-12-06-00-02 1307.. gh-issue: 103462 1308.. nonce: w6yBlM 1309.. section: Library 1310 1311Fixed an issue with using :meth:`~asyncio.WriteTransport.writelines` in 1312:mod:`asyncio` to send very large payloads that exceed the amount of data 1313that can be written in one call to :meth:`socket.socket.send` or 1314:meth:`socket.socket.sendmsg`, resulting in the remaining buffer being left 1315unwritten. 1316 1317.. 1318 1319.. date: 2023-04-11-21-38-39 1320.. gh-issue: 103449 1321.. nonce: -nxmhb 1322.. section: Library 1323 1324Fix a bug in doc string generation in :func:`dataclasses.dataclass`. 1325 1326.. 1327 1328.. date: 2023-04-09-06-59-36 1329.. gh-issue: 103092 1330.. nonce: vskbro 1331.. section: Library 1332 1333Isolate :mod:`!_collections` (apply :pep:`687`). Patch by Erlend E. Aasland. 1334 1335.. 1336 1337.. date: 2023-04-08-01-33-12 1338.. gh-issue: 103357 1339.. nonce: vjin28 1340.. section: Library 1341 1342Added support for :class:`logging.Formatter` ``defaults`` parameter to 1343:func:`logging.config.dictConfig` and :func:`logging.config.fileConfig`. 1344Patch by Bar Harel. 1345 1346.. 1347 1348.. date: 2023-04-08-00-48-40 1349.. gh-issue: 103092 1350.. nonce: 5EFts0 1351.. section: Library 1352 1353Adapt the :mod:`winreg` extension module to :pep:`687`. 1354 1355.. 1356 1357.. date: 2023-04-07-15-15-40 1358.. gh-issue: 74690 1359.. nonce: un84hh 1360.. section: Library 1361 1362The performance of :func:`isinstance` checks against 1363:func:`runtime-checkable protocols <typing.runtime_checkable>` has been 1364considerably improved for protocols that only have a few members. To achieve 1365this improvement, several internal implementation details of the 1366:mod:`typing` module have been refactored, including 1367``typing._ProtocolMeta.__instancecheck__``, 1368``typing._is_callable_members_only``, and ``typing._get_protocol_attrs``. 1369Patches by Alex Waygood. 1370 1371.. 1372 1373.. date: 2023-04-07-15-09-26 1374.. gh-issue: 74690 1375.. nonce: 0f886b 1376.. section: Library 1377 1378The members of a runtime-checkable protocol are now considered "frozen" at 1379runtime as soon as the class has been created. See :ref:`"What's new in 1380Python 3.12" <whatsnew-typing-py312>` for more details. 1381 1382.. 1383 1384.. date: 2023-04-06-17-28-36 1385.. gh-issue: 103256 1386.. nonce: 1syxfs 1387.. section: Library 1388 1389Fixed a bug that caused :mod:`hmac` to raise an exception when the requested 1390hash algorithm was not available in OpenSSL despite being available 1391separately as part of ``hashlib`` itself. It now falls back properly to the 1392built-in. This could happen when, for example, your OpenSSL does not include 1393SHA3 support and you want to compute ``hmac.digest(b'K', b'M', 1394'sha3_256')``. 1395 1396.. 1397 1398.. date: 2023-04-06-16-55-51 1399.. gh-issue: 102778 1400.. nonce: BWeAmE 1401.. section: Library 1402 1403Support ``sys.last_exc`` in :mod:`idlelib`. 1404 1405.. 1406 1407.. date: 2023-04-06-04-35-59 1408.. gh-issue: 103285 1409.. nonce: rCZ9-G 1410.. section: Library 1411 1412Improve performance of :func:`ast.get_source_segment`. 1413 1414.. 1415 1416.. date: 2023-04-05-01-28-53 1417.. gh-issue: 103225 1418.. nonce: QD3JVU 1419.. section: Library 1420 1421Fix a bug in :mod:`pdb` when displaying line numbers of module-level source 1422code. 1423 1424.. 1425 1426.. date: 2023-04-04-21-44-25 1427.. gh-issue: 103092 1428.. nonce: Dz0_Xn 1429.. section: Library 1430 1431Adapt the :mod:`msvcrt` extension module to :pep:`687`. 1432 1433.. 1434 1435.. date: 2023-04-04-21-27-51 1436.. gh-issue: 103092 1437.. nonce: 7s7Bzf 1438.. section: Library 1439 1440Adapt the :mod:`winsound` extension module to :pep:`687`. 1441 1442.. 1443 1444.. date: 2023-04-04-12-43-38 1445.. gh-issue: 93910 1446.. nonce: jurMzv 1447.. section: Library 1448 1449Remove deprecation of enum ``member.member`` access. 1450 1451.. 1452 1453.. date: 2023-04-03-23-44-34 1454.. gh-issue: 102978 1455.. nonce: gy9eVk 1456.. section: Library 1457 1458Fixes :func:`unittest.mock.patch` not enforcing function signatures for 1459methods decorated with ``@classmethod`` or ``@staticmethod`` when patch is 1460called with ``autospec=True``. 1461 1462.. 1463 1464.. date: 2023-04-03-23-43-12 1465.. gh-issue: 103092 1466.. nonce: 3xqk4y 1467.. section: Library 1468 1469Isolate :mod:`!_socket` (apply :pep:`687`). Patch by Erlend E. Aasland. 1470 1471.. 1472 1473.. date: 2023-04-03-22-02-35 1474.. gh-issue: 100479 1475.. nonce: kNBjQm 1476.. section: Library 1477 1478Add :meth:`pathlib.PurePath.with_segments`, which creates a path object from 1479arguments. This method is called whenever a derivative path is created, such 1480as from :attr:`pathlib.PurePath.parent`. Subclasses may override this method 1481to share information between path objects. 1482 1483.. 1484 1485.. date: 2023-04-03-21-08-53 1486.. gh-issue: 103220 1487.. nonce: OW_Bj5 1488.. section: Library 1489 1490Fix issue where :func:`os.path.join` added a slash when joining onto an 1491incomplete UNC drive with a trailing slash on Windows. 1492 1493.. 1494 1495.. date: 2023-04-02-23-05-22 1496.. gh-issue: 103204 1497.. nonce: bbDmu0 1498.. section: Library 1499 1500Fixes :mod:`http.server` accepting HTTP requests with HTTP version numbers 1501preceded by '+', or '-', or with digit-separating '_' characters. The 1502length of the version numbers is also constrained. 1503 1504.. 1505 1506.. date: 2023-04-02-22-04-26 1507.. gh-issue: 75586 1508.. nonce: 526iJm 1509.. section: Library 1510 1511Fix various Windows-specific issues with ``shutil.which``. 1512 1513.. 1514 1515.. date: 2023-04-02-17-51-08 1516.. gh-issue: 103193 1517.. nonce: xrZbM1 1518.. section: Library 1519 1520Improve performance of :func:`inspect.getattr_static`. Patch by Alex 1521Waygood. 1522 1523.. 1524 1525.. date: 2023-04-01-23-01-31 1526.. gh-issue: 103176 1527.. nonce: FBsdxa 1528.. section: Library 1529 1530:func:`sys._current_exceptions` now returns a mapping from thread-id to an 1531exception instance, rather than to a ``(typ, exc, tb)`` tuple. 1532 1533.. 1534 1535.. date: 2023-03-31-01-13-00 1536.. gh-issue: 103143 1537.. nonce: 6eMluy 1538.. section: Library 1539 1540Polish the help messages and docstrings of :mod:`pdb`. 1541 1542.. 1543 1544.. date: 2023-03-28-09-13-31 1545.. gh-issue: 103015 1546.. nonce: ETTfNf 1547.. section: Library 1548 1549Add *entrypoint* keyword-only parameter to 1550:meth:`sqlite3.Connection.load_extension`, for overriding the SQLite 1551extension entry point. Patch by Erlend E. Aasland. 1552 1553.. 1554 1555.. date: 2023-03-24-20-49-48 1556.. gh-issue: 103000 1557.. nonce: 6eVNZI 1558.. section: Library 1559 1560Improve performance of :func:`dataclasses.astuple` and 1561:func:`dataclasses.asdict` in cases where the contents are common Python 1562types. 1563 1564.. 1565 1566.. date: 2023-03-23-15-24-38 1567.. gh-issue: 102953 1568.. nonce: YR4KaK 1569.. section: Library 1570 1571The extraction methods in :mod:`tarfile`, and :func:`shutil.unpack_archive`, 1572have a new a *filter* argument that allows limiting tar features than may be 1573surprising or dangerous, such as creating files outside the destination 1574directory. See :ref:`tarfile-extraction-filter` for details. 1575 1576.. 1577 1578.. date: 2023-03-15-12-18-07 1579.. gh-issue: 97696 1580.. nonce: DtnpIC 1581.. section: Library 1582 1583Implemented an eager task factory in asyncio. When used as a task factory on 1584an event loop, it performs eager execution of coroutines. Coroutines that 1585are able to complete synchronously (e.g. return or raise without blocking) 1586are returned immediately as a finished task, and the task is never scheduled 1587to the event loop. If the coroutine blocks, the (pending) task is scheduled 1588and returned. 1589 1590.. 1591 1592.. date: 2023-03-15-00-37-43 1593.. gh-issue: 81079 1594.. nonce: heTAod 1595.. section: Library 1596 1597Add *case_sensitive* keyword-only argument to :meth:`pathlib.Path.glob` and 1598:meth:`~pathlib.Path.rglob`. 1599 1600.. 1601 1602.. date: 2023-03-14-11-20-19 1603.. gh-issue: 101819 1604.. nonce: 0-h0it 1605.. section: Library 1606 1607Isolate the :mod:`io` extension module by applying :pep:`687`. Patch by 1608Kumar Aditya, Victor Stinner, and Erlend E. Aasland. 1609 1610.. 1611 1612.. date: 2023-03-08-02-45-46 1613.. gh-issue: 91896 1614.. nonce: kgON_a 1615.. section: Library 1616 1617Deprecate :class:`collections.abc.ByteString` 1618 1619.. 1620 1621.. date: 2023-03-06-18-49-57 1622.. gh-issue: 101362 1623.. nonce: eSSy6L 1624.. section: Library 1625 1626Speed up :class:`pathlib.Path` construction by omitting the path anchor from 1627the internal list of path parts. 1628 1629.. 1630 1631.. date: 2023-02-21-14-57-34 1632.. gh-issue: 102114 1633.. nonce: uUDQzb 1634.. section: Library 1635 1636Functions in the :mod:`dis` module that accept a source code string as 1637argument now print a more concise traceback when the string contains a 1638syntax or indentation error. 1639 1640.. 1641 1642.. date: 2023-02-19-12-37-08 1643.. gh-issue: 62432 1644.. nonce: GnBFIB 1645.. section: Library 1646 1647The :mod:`unittest` runner will now exit with status code 5 if no tests were 1648run. It is common for test runner misconfiguration to fail to find any 1649tests, this should be an error. 1650 1651.. 1652 1653.. date: 2023-02-17-21-14-40 1654.. gh-issue: 78079 1655.. nonce: z3Szr6 1656.. section: Library 1657 1658Fix incorrect normalization of UNC device path roots, and partial UNC share 1659path roots, in :class:`pathlib.PurePath`. Pathlib no longer appends a 1660trailing slash to such paths. 1661 1662.. 1663 1664.. date: 2023-02-11-21-18-10 1665.. gh-issue: 85984 1666.. nonce: nvzOD0 1667.. section: Library 1668 1669Add :func:`tty.cfmakeraw` and :func:`tty.cfmakecbreak` to :mod:`tty` and 1670modernize, the behavior of :func:`tty.setraw` and :func:`tty.setcbreak` to 1671use POSIX.1-2017 Chapter 11 "General Terminal Interface" flag masks by 1672default. 1673 1674.. 1675 1676.. date: 2023-02-11-15-01-32 1677.. gh-issue: 101688 1678.. nonce: kwXmfM 1679.. section: Library 1680 1681Implement :func:`types.get_original_bases` to provide further introspection 1682for types. 1683 1684.. 1685 1686.. date: 2023-02-09-22-24-34 1687.. gh-issue: 101640 1688.. nonce: oFuEpB 1689.. section: Library 1690 1691:class:`argparse.ArgumentParser` now catches errors when writing messages, 1692such as when :data:`sys.stderr` is ``None``. Patch by Oleg Iarygin. 1693 1694.. 1695 1696.. date: 2023-02-06-16-45-18 1697.. gh-issue: 83861 1698.. nonce: mMbIU3 1699.. section: Library 1700 1701Fix datetime.astimezone method return value when invoked on a naive datetime 1702instance that represents local time falling in a timezone transition gap. 1703PEP 495 requires that instances with fold=1 produce earlier times than those 1704with fold=0 in this case. 1705 1706.. 1707 1708.. date: 2023-01-22-14-53-12 1709.. gh-issue: 89550 1710.. nonce: c1U23f 1711.. section: Library 1712 1713Decrease execution time of some :mod:`gzip` file writes by 15% by adding 1714more appropriate buffering. 1715 1716.. 1717 1718.. date: 2023-01-14-17-54-56 1719.. gh-issue: 95299 1720.. nonce: vUhpKz 1721.. section: Library 1722 1723Remove the bundled setuptools wheel from ``ensurepip``, and stop installing 1724setuptools in environments created by ``venv``. 1725 1726.. 1727 1728.. date: 2022-11-10-16-26-47 1729.. gh-issue: 99353 1730.. nonce: DQFjnt 1731.. section: Library 1732 1733Respect the :class:`http.client.HTTPConnection` ``.debuglevel`` flag in 1734:class:`urllib.request.AbstractHTTPHandler` when its constructor parameter 1735``debuglevel`` is not set. And do the same for ``*HTTPS*``. 1736 1737.. 1738 1739.. date: 2022-10-21-17-20-57 1740.. gh-issue: 98040 1741.. nonce: 3btbmA 1742.. section: Library 1743 1744Remove the long-deprecated ``imp`` module. 1745 1746.. 1747 1748.. date: 2022-10-21-16-23-31 1749.. gh-issue: 97850 1750.. nonce: N46coo 1751.. section: Library 1752 1753Deprecate :func:`pkgutil.find_loader` and :func:`pkgutil.get_loader` in 1754favor of :func:`importlib.util.find_spec`. 1755 1756.. 1757 1758.. date: 2022-10-20-14-03-58 1759.. gh-issue: 94473 1760.. nonce: pzGX73 1761.. section: Library 1762 1763Flatten arguments in :meth:`tkinter.Canvas.coords`. It now accepts not only 1764``x1, y1, x2, y2, ...`` and ``[x1, y1, x2, y2, ...]``, but also ``(x1, y1), 1765(x2, y2), ...`` and ``[(x1, y1), (x2, y2), ...]``. 1766 1767.. 1768 1769.. date: 2022-10-09-14-47-42 1770.. gh-issue: 98040 1771.. nonce: IN3qab 1772.. section: Library 1773 1774Remove more deprecated importlib APIs: ``find_loader()``, ``find_module()``, 1775``importlib.abc.Finder``, ``pkgutil.ImpImporter``, ``pkgutil.ImpLoader``. 1776 1777.. 1778 1779.. date: 2022-09-07-09-32-07 1780.. gh-issue: 96522 1781.. nonce: t73oqp 1782.. section: Library 1783 1784Fix potential deadlock in pty.spawn() 1785 1786.. 1787 1788.. date: 2022-09-03-09-24-02 1789.. gh-issue: 96534 1790.. nonce: EU4Oxv 1791.. section: Library 1792 1793Support divert(4) added in FreeBSD 14. 1794 1795.. 1796 1797.. date: 2022-08-27-21-41-41 1798.. gh-issue: 87474 1799.. nonce: 9X-kxt 1800.. section: Library 1801 1802Fix potential file descriptor leaks in :class:`subprocess.Popen`. 1803 1804.. 1805 1806.. date: 2022-07-16-17-15-29 1807.. gh-issue: 94906 1808.. nonce: C4G8DG 1809.. section: Library 1810 1811Support multiple steps in :func:`math.nextafter`. Patch by Shantanu Jain and 1812Matthias Gorgens. 1813 1814.. 1815 1816.. date: 2022-07-06-11-10-37 1817.. gh-issue: 51574 1818.. nonce: sveUeD 1819.. section: Library 1820 1821Make :func:`tempfile.mkdtemp` return absolute paths when its *dir* parameter 1822is relative. 1823 1824.. 1825 1826.. date: 2022-07-03-23-13-28 1827.. gh-issue: 94518 1828.. nonce: 511Tbh 1829.. section: Library 1830 1831Convert private :meth:`!_posixsubprocess.fork_exec` to use Argument Clinic. 1832 1833.. 1834 1835.. date: 2022-05-02-16-21-05 1836.. gh-issue: 92184 1837.. nonce: hneGVW 1838.. section: Library 1839 1840When creating zip files using :mod:`zipfile`, ``os.altsep``, if not 1841``None``, will always be treated as a path separator even when it is not 1842``/``. Patch by Carey Metcalfe. 1843 1844.. 1845 1846.. bpo: 46797 1847.. date: 2022-02-19-14-19-34 1848.. nonce: 6BXZX4 1849.. section: Library 1850 1851Deprecation warnings are now emitted for :class:`!ast.Num`, 1852:class:`!ast.Bytes`, :class:`!ast.Str`, :class:`!ast.NameConstant` and 1853:class:`!ast.Ellipsis`. These have been documented as deprecated since 1854Python 3.8, and will be removed in Python 3.14. 1855 1856.. 1857 1858.. bpo: 44844 1859.. date: 2021-12-03-23-00-56 1860.. nonce: tvg2VY 1861.. section: Library 1862 1863Enables :mod:`webbrowser` to detect and launch Microsoft Edge browser. 1864 1865.. 1866 1867.. bpo: 45606 1868.. date: 2021-11-19-23-37-18 1869.. nonce: UW5XE1 1870.. section: Library 1871 1872Fixed the bug in :meth:`pathlib.Path.glob` -- previously a dangling symlink 1873would not be found by this method when the pattern is an exact match, but 1874would be found when the pattern contains a wildcard or the recursive 1875wildcard (``**``). With this change, a dangling symlink will be found in 1876both cases. 1877 1878.. 1879 1880.. bpo: 23041 1881.. date: 2021-11-07-15-31-25 1882.. nonce: 564i32 1883.. section: Library 1884 1885Add :const:`~csv.QUOTE_STRINGS` and :const:`~csv.QUOTE_NOTNULL` to the suite 1886of :mod:`csv` module quoting styles. 1887 1888.. 1889 1890.. bpo: 24964 1891.. date: 2021-05-16-14-28-30 1892.. nonce: Oa5Ie_ 1893.. section: Library 1894 1895Added :meth:`http.client.HTTPConnection.get_proxy_response_headers` that 1896provides access to the HTTP headers on a proxy server response to the 1897``CONNECT`` request. 1898 1899.. 1900 1901.. bpo: 17258 1902.. date: 2020-05-25-12-42-36 1903.. nonce: lf2554 1904.. section: Library 1905 1906:mod:`multiprocessing` now supports stronger HMAC algorithms for 1907inter-process connection authentication rather than only HMAC-MD5. 1908 1909.. 1910 1911.. bpo: 39744 1912.. date: 2020-02-25-00-43-22 1913.. nonce: hgK689 1914.. section: Library 1915 1916Make :func:`asyncio.subprocess.Process.communicate` close the subprocess's 1917stdin even when called with ``input=None``. 1918 1919.. 1920 1921.. bpo: 22708 1922.. date: 2018-07-16-14-10-29 1923.. nonce: 592iRR 1924.. section: Library 1925 1926http.client CONNECT method tunnel improvements: Use HTTP 1.1 protocol; send 1927a matching Host: header with CONNECT, if one is not provided; convert IDN 1928domain names to Punycode. Patch by Michael Handler. 1929 1930.. 1931 1932.. date: 2023-05-14-12-11-28 1933.. gh-issue: 67056 1934.. nonce: nVC2Rf 1935.. section: Documentation 1936 1937Document that the effect of registering or unregistering an :mod:`atexit` 1938cleanup function from within a registered cleanup function is undefined. 1939 1940.. 1941 1942.. date: 2023-04-26-23-55-31 1943.. gh-issue: 103629 1944.. nonce: -0reqn 1945.. section: Documentation 1946 1947Mention the new way of typing ``**kwargs`` with ``Unpack`` and ``TypedDict`` 1948introduced in :pep:`692`. 1949 1950.. 1951 1952.. date: 2023-04-25-22-58-08 1953.. gh-issue: 48241 1954.. nonce: l1Gxxh 1955.. section: Documentation 1956 1957Clarifying documentation about the url parameter to urllib.request.urlopen 1958and urllib.request.Request needing to be encoded properly. 1959 1960.. 1961 1962.. date: 2023-03-10-04-59-35 1963.. gh-issue: 86094 1964.. nonce: zOYdy8 1965.. section: Documentation 1966 1967Add support for Unicode Path Extra Field in ZipFile. Patch by Yeojin Kim and 1968Andrea Giudiceandrea 1969 1970.. 1971 1972.. date: 2023-03-07-23-30-29 1973.. gh-issue: 99202 1974.. nonce: hhiAJF 1975.. section: Documentation 1976 1977Fix extension type from documentation for compiling in C++20 mode 1978 1979.. 1980 1981.. date: 2023-05-15-02-22-44 1982.. gh-issue: 104494 1983.. nonce: Bkrbfn 1984.. section: Tests 1985 1986Update ``test_pack_configure_in`` and ``test_place_configure_in`` for 1987changes to error message formatting in Tk 8.7. 1988 1989.. 1990 1991.. date: 2023-05-14-03-00-00 1992.. gh-issue: 104461 1993.. nonce: Rmex11 1994.. section: Tests 1995 1996Run test_configure_screen on X11 only, since the ``DISPLAY`` environment 1997variable and ``-screen`` option for toplevels are not useful on Tk for Win32 1998or Aqua. 1999 2000.. 2001 2002.. date: 2023-04-25-12-19-37 2003.. gh-issue: 86275 2004.. nonce: -RoLIt 2005.. section: Tests 2006 2007Added property-based tests to the :mod:`zoneinfo` tests, along with stubs 2008for the ``hypothesis`` interface. (Patch by Paul Ganssle) 2009 2010.. 2011 2012.. date: 2023-04-08-00-50-23 2013.. gh-issue: 103329 2014.. nonce: M38tqF 2015.. section: Tests 2016 2017Regression tests for the behaviour of ``unittest.mock.PropertyMock`` were 2018added. 2019 2020.. 2021 2022.. date: 2023-03-17-22-00-47 2023.. gh-issue: 102795 2024.. nonce: z21EoC 2025.. section: Tests 2026 2027fix use of poll in test_epoll's test_control_and_wait 2028 2029.. 2030 2031.. date: 2022-11-06-18-42-38 2032.. gh-issue: 75729 2033.. nonce: uGYJrv 2034.. section: Tests 2035 2036Fix the :func:`os.spawn* <os.spawnl>` tests failing on Windows when the 2037working directory or interpreter path contains spaces. 2038 2039.. 2040 2041.. date: 2023-05-20-16-09-59 2042.. gh-issue: 101282 2043.. nonce: FvRARb 2044.. section: Build 2045 2046BOLT optimization is now applied to the libpython shared library if building 2047a shared library. BOLT instrumentation and application settings can now be 2048influenced via the ``BOLT_INSTRUMENT_FLAGS`` and ``BOLT_APPLY_FLAGS`` 2049configure variables. 2050 2051.. 2052 2053.. date: 2023-05-15-09-34-08 2054.. gh-issue: 99017 2055.. nonce: nToOQu 2056.. section: Build 2057 2058``PYTHON_FOR_REGEN`` now require Python 3.10 or newer. 2059 2060.. 2061 2062.. date: 2023-05-14-19-00-19 2063.. gh-issue: 104490 2064.. nonce: 1tA4AF 2065.. section: Build 2066 2067Define ``.PHONY`` / virtual make targets consistently and properly. 2068 2069.. 2070 2071.. date: 2023-05-04-10-56-14 2072.. gh-issue: 104106 2073.. nonce: -W9BJS 2074.. section: Build 2075 2076Add gcc fallback of mkfifoat/mknodat for macOS. Patch by Donghee Na. 2077 2078.. 2079 2080.. date: 2023-04-14-10-24-37 2081.. gh-issue: 103532 2082.. nonce: H1djkd 2083.. section: Build 2084 2085The ``TKINTER_PROTECT_LOADTK`` macro is no longer defined or used in the 2086``_tkinter`` module. It was previously only defined when building against 2087Tk 8.4.13 and older, but Tk older than 8.5.12 has been unsupported since 2088gh-issue-91152. 2089 2090.. 2091 2092.. date: 2023-02-11-05-31-05 2093.. gh-issue: 99069 2094.. nonce: X4LDvY 2095.. section: Build 2096 2097Extended workaround defining ``static_assert`` when missing from the libc 2098headers to all clang and gcc builds. In particular, this fixes building on 2099macOS <= 10.10. 2100 2101.. 2102 2103.. date: 2022-12-18-07-24-44 2104.. gh-issue: 100220 2105.. nonce: BgSV7C 2106.. section: Build 2107 2108Changed the default value of the ``SHELL`` Makefile variable from 2109``/bin/sh`` to ``/bin/sh -e`` to ensure that complex recipes correctly fail 2110after an error. Previously, ``make install`` could fail to install some 2111files and yet return a successful result. 2112 2113.. 2114 2115.. date: 2022-06-20-15-15-11 2116.. gh-issue: 90656 2117.. nonce: kFBbKe 2118.. section: Build 2119 2120Add platform triplets for 64-bit LoongArch: 2121 2122* loongarch64-linux-gnusf 2123* loongarch64-linux-gnuf32 2124* loongarch64-linux-gnu 2125 2126Patch by Zhang Na. 2127 2128.. 2129 2130.. date: 2023-05-18-22-46-03 2131.. gh-issue: 104623 2132.. nonce: HJZhm1 2133.. section: Windows 2134 2135Update Windows installer to use SQLite 3.42.0. 2136 2137.. 2138 2139.. date: 2023-04-24-15-51-11 2140.. gh-issue: 82814 2141.. nonce: GI3UkZ 2142.. section: Windows 2143 2144Fix a potential ``[Errno 13] Permission denied`` when using 2145:func:`shutil.copystat` within Windows Subsystem for Linux (WSL) on a 2146mounted filesystem by adding ``errno.EACCES`` to the list of ignored errors 2147within the internal implementation. 2148 2149.. 2150 2151.. date: 2023-04-12-10-49-21 2152.. gh-issue: 103088 2153.. nonce: Yjj-qJ 2154.. section: Windows 2155 2156Fix virtual environment :file:`activate` script having incorrect line 2157endings for Cygwin. 2158 2159.. 2160 2161.. date: 2023-04-11-09-22-22 2162.. gh-issue: 103088 2163.. nonce: 6AJEuR 2164.. section: Windows 2165 2166Fixes venvs not working in bash on Windows across different disks 2167 2168.. 2169 2170.. date: 2023-03-24-11-25-28 2171.. gh-issue: 102997 2172.. nonce: dredy2 2173.. section: Windows 2174 2175Update Windows installer to use SQLite 3.41.2. 2176 2177.. 2178 2179.. date: 2023-03-18-21-38-00 2180.. gh-issue: 88013 2181.. nonce: Z3loxC 2182.. section: Windows 2183 2184Fixed a bug where :exc:`TypeError` was raised when calling 2185:func:`ntpath.realpath` with a bytes parameter in some cases. 2186 2187.. 2188 2189.. date: 2023-05-21-23-54-52 2190.. gh-issue: 99834 2191.. nonce: 6ANPts 2192.. section: macOS 2193 2194Update macOS installer to Tcl/Tk 8.6.13. 2195 2196.. 2197 2198.. date: 2023-05-18-22-31-49 2199.. gh-issue: 104623 2200.. nonce: 6h7Xfx 2201.. section: macOS 2202 2203Update macOS installer to SQLite 3.42.0. 2204 2205.. 2206 2207.. date: 2023-05-18-08-52-04 2208.. gh-issue: 103545 2209.. nonce: pi5k2N 2210.. section: macOS 2211 2212Add ``os.PRIO_DARWIN_THREAD``, ``os.PRIO_DARWIN_PROCESS``, 2213``os.PRIO_DARWIN_BG`` and ``os.PRIO_DARWIN_NONUI``. These can be used with 2214``os.setpriority`` to run the process at a lower priority and make use of 2215the efficiency cores on Apple Silicon systems. 2216 2217.. 2218 2219.. date: 2023-05-04-21-47-59 2220.. gh-issue: 104180 2221.. nonce: lEJCwd 2222.. section: macOS 2223 2224Support reading SOCKS proxy configuration from macOS System Configuration. 2225Patch by Sam Schott. 2226 2227.. 2228 2229.. date: 2023-04-24-18-37-48 2230.. gh-issue: 60436 2231.. nonce: in-IyF 2232.. section: macOS 2233 2234update curses textbox to additionally handle backspace using the 2235``curses.ascii.DEL`` key press. 2236 2237.. 2238 2239.. date: 2023-03-24-11-20-47 2240.. gh-issue: 102997 2241.. nonce: ZgQkbq 2242.. section: macOS 2243 2244Update macOS installer to SQLite 3.41.2. 2245 2246.. 2247 2248.. date: 2023-05-17-17-32-21 2249.. gh-issue: 104499 2250.. nonce: hNeqV4 2251.. section: IDLE 2252 2253Fix completions for Tk Aqua 8.7 (currently blank). 2254 2255.. 2256 2257.. date: 2023-05-17-15-11-11 2258.. gh-issue: 104496 2259.. nonce: wjav-y 2260.. section: IDLE 2261 2262About prints both tcl and tk versions if different (expected someday). 2263 2264.. 2265 2266.. date: 2023-04-30-20-01-18 2267.. gh-issue: 88496 2268.. nonce: y65vUb 2269.. section: IDLE 2270 2271Fix IDLE test hang on macOS. 2272 2273.. 2274 2275.. date: 2023-05-11-15-12-11 2276.. gh-issue: 104389 2277.. nonce: EiOhB3 2278.. section: Tools/Demos 2279 2280Argument Clinic C converters now accept the ``unused`` keyword, for wrapping 2281a parameter with :c:macro:`Py_UNUSED`. Patch by Erlend E. Aasland. 2282 2283.. 2284 2285.. date: 2023-05-18-20-53-05 2286.. gh-issue: 101291 2287.. nonce: ZBh9aR 2288.. section: C API 2289 2290Added unstable C API for extracting the value of "compact" integers: 2291:c:func:`PyUnstable_Long_IsCompact` and 2292:c:func:`PyUnstable_Long_CompactValue`. 2293 2294.. 2295 2296.. date: 2023-05-02-21-05-54 2297.. gh-issue: 104109 2298.. nonce: 0tnDZV 2299.. section: C API 2300 2301We've added ``Py_NewInterpreterFromConfig()`` and ``PyInterpreterConfig`` to 2302the public C-API (but not the stable ABI; not yet at least). The new 2303function may be used to create a new interpreter with various features 2304configured. The function was added to support PEP 684 (per-interpreter 2305GIL). 2306 2307.. 2308 2309.. date: 2023-04-28-18-04-38 2310.. gh-issue: 103968 2311.. nonce: EnVvOx 2312.. section: C API 2313 2314:c:func:`PyType_FromSpec` and its variants now allow creating classes whose 2315metaclass overrides :c:member:`~PyTypeObject.tp_new`. The ``tp_new`` is 2316ignored. This behavior is deprecated and will be disallowed in 3.14+. The 2317new :c:func:`PyType_FromMetaclass` already disallows it. 2318 2319.. 2320 2321.. date: 2023-04-24-10-31-59 2322.. gh-issue: 103743 2323.. nonce: 2xYA1K 2324.. section: C API 2325 2326Add :c:func:`PyUnstable_Object_GC_NewWithExtraData` function that can be 2327used to allocate additional memory after an object for data not managed by 2328Python. 2329 2330.. 2331 2332.. date: 2023-04-14-23-05-52 2333.. gh-issue: 103295 2334.. nonce: GRHY1Z 2335.. section: C API 2336 2337Introduced :c:func:`PyUnstable_WritePerfMapEntry`, 2338:c:func:`PyUnstable_PerfMapState_Init` and 2339:c:func:`PyUnstable_PerfMapState_Fini`. These allow extension modules (JIT 2340compilers in particular) to write to perf-map files in a thread safe manner. 2341The :doc:`../howto/perf_profiling` also uses these APIs to write entries in 2342the perf-map file. 2343 2344.. 2345 2346.. date: 2023-04-13-16-54-00 2347.. gh-issue: 103509 2348.. nonce: A26Qu8 2349.. section: C API 2350 2351Added C API for extending types whose instance memory layout is opaque: 2352:c:member:`PyType_Spec.basicsize` can now be zero or negative, 2353:c:func:`PyObject_GetTypeData` can be used to get subclass-specific data, 2354and :c:macro:`Py_TPFLAGS_ITEMS_AT_END` can be used to safely extend 2355variable-size objects. See :pep:`697` for details. 2356 2357.. 2358 2359.. date: 2023-03-28-12-31-51 2360.. gh-issue: 103091 2361.. nonce: CzZyaZ 2362.. section: C API 2363 2364Add a new C-API function to eagerly assign a version tag to a PyTypeObject: 2365``PyUnstable_Type_AssignVersionTag()``. 2366 2367.. 2368 2369.. date: 2023-02-09-23-09-29 2370.. gh-issue: 101408 2371.. nonce: _paFIF 2372.. section: C API 2373 2374:c:macro:`PyObject_GC_Resize` should calculate preheader size if needed. 2375Patch by Donghee Na. 2376 2377.. 2378 2379.. date: 2022-10-29-10-13-20 2380.. gh-issue: 98836 2381.. nonce: Cy5h_z 2382.. section: C API 2383 2384Add support of more formatting options (left aligning, octals, uppercase 2385hexadecimals, :c:type:`intmax_t`, :c:type:`ptrdiff_t`, :c:type:`wchar_t` C 2386strings, variable width and precision) in :c:func:`PyUnicode_FromFormat` and 2387:c:func:`PyUnicode_FromFormatV`. 2388 2389.. 2390 2391.. date: 2022-09-15-15-21-34 2392.. gh-issue: 96803 2393.. nonce: ynBKIS 2394.. section: C API 2395 2396Add unstable C-API functions to get the code object, lasti and line number 2397from the internal ``_PyInterpreterFrame`` in the limited API. The functions 2398are: 2399 2400* ``PyCodeObject * PyUnstable_InterpreterFrame_GetCode(struct _PyInterpreterFrame *frame)`` 2401* ``int PyUnstable_InterpreterFrame_GetLasti(struct _PyInterpreterFrame *frame)`` 2402* ``int PyUnstable_InterpreterFrame_GetLine(struct _PyInterpreterFrame *frame)`` 2403