1.. date: 2022-09-28-17-09-37 2.. gh-issue: 97616 3.. nonce: K1e3Xs 4.. release date: 2022-10-25 5.. section: Security 6 7Fix multiplying a list by an integer (``list *= int``): detect the integer 8overflow when the new allocated length is close to the maximum size. Issue 9reported by Jordan Limor. Patch by Victor Stinner. 10 11.. 12 13.. date: 2022-09-07-10-42-00 14.. gh-issue: 97514 15.. nonce: Yggdsl 16.. section: Security 17 18On Linux the :mod:`multiprocessing` module returns to using filesystem 19backed unix domain sockets for communication with the *forkserver* process 20instead of the Linux abstract socket namespace. Only code that chooses to 21use the :ref:`"forkserver" start method <multiprocessing-start-methods>` is 22affected. 23 24Abstract sockets have no permissions and could allow any user on the system 25in the same `network namespace 26<https://man7.org/linux/man-pages/man7/network_namespaces.7.html>`_ (often 27the whole system) to inject code into the multiprocessing *forkserver* 28process. This was a potential privilege escalation. Filesystem based socket 29permissions restrict this to the *forkserver* process user as was the 30default in Python 3.8 and earlier. 31 32This prevents Linux :cve:`2022-42919`. 33 34.. 35 36.. date: 2022-06-15-20-09-23 37.. gh-issue: 87389 38.. nonce: QVaC3f 39.. section: Security 40 41:mod:`http.server`: Fix an open redirection vulnerability in the HTTP server 42when an URI path starts with ``//``. Vulnerability discovered, and initial 43fix proposed, by Hamza Avvan. 44 45.. 46 47.. date: 2022-06-03-12-52-53 48.. gh-issue: 79096 49.. nonce: YVoxgC 50.. section: Security 51 52LWPCookieJar and MozillaCookieJar create files with file mode 600 instead of 53644 (Microsoft Windows is not affected) 54 55.. 56 57.. date: 2022-05-19-08-53-07 58.. gh-issue: 92888 59.. nonce: TLtR9W 60.. section: Security 61 62Fix ``memoryview`` use after free when accessing the backing buffer in 63certain cases. 64 65.. 66 67.. date: 2022-04-27-18-25-30 68.. gh-issue: 68966 69.. nonce: gjS8zs 70.. section: Security 71 72The deprecated mailcap module now refuses to inject unsafe text (filenames, 73MIME types, parameters) into shell commands. Instead of using such text, it 74will warn and act as if a match was not found (or for test commands, as if 75the test failed). 76 77.. 78 79.. date: 2022-10-19-23-48-46 80.. gh-issue: 98374 81.. nonce: eOBh8M 82.. section: Core and Builtins 83 84Suppress ImportError for invalid query for help() command. Patch by Donghee 85Na. 86 87.. 88 89.. date: 2022-10-19-20-53-38 90.. gh-issue: 98461 91.. nonce: iNmPDV 92.. section: Core and Builtins 93 94Fix source location in bytecode for list, set and dict comprehensions as 95well as generator expressions. 96 97.. 98 99.. date: 2022-10-19-18-03-28 100.. gh-issue: 98354 101.. nonce: GRGta3 102.. section: Core and Builtins 103 104Added unicode check for ``name`` attribute of ``spec`` argument passed in 105:func:`!_imp.create_builtin` function. 106 107.. 108 109.. date: 2022-10-18-16-17-44 110.. gh-issue: 98398 111.. nonce: x4rYK_ 112.. section: Core and Builtins 113 114Fix source location of 'assert' bytecodes. 115 116.. 117 118.. date: 2022-10-18-14-11-32 119.. gh-issue: 98390 120.. nonce: H1sxJu 121.. section: Core and Builtins 122 123Fix location of sub-expressions of boolean expressions, by reducing their 124scope to that of the sub-expression. 125 126.. 127 128.. date: 2022-10-13-23-23-01 129.. gh-issue: 98254 130.. nonce: bC8IKt 131.. section: Core and Builtins 132 133Modules from the standard library are now potentially suggested as part of 134the error messages displayed by the interpreter when an :exc:`NameError` is 135raised to the top level. Patch by Pablo Galindo 136 137.. 138 139.. date: 2022-10-06-23-13-34 140.. gh-issue: 97997 141.. nonce: JQaJKF 142.. section: Core and Builtins 143 144Add running column offset to the tokenizer state to avoid calculating AST 145column information with pointer arithmetic. 146 147.. 148 149.. date: 2022-10-06-20-41-29 150.. gh-issue: 97973 151.. nonce: gB-xWi 152.. section: Core and Builtins 153 154Modify the tokenizer to return all necessary information the parser needs to 155set location information in the AST nodes, so that the parser does not have 156to calculate those doing pointer arithmetic. 157 158.. 159 160.. date: 2022-10-06-15-45-57 161.. gh-issue: 96078 162.. nonce: fS-6mU 163.. section: Core and Builtins 164 165:func:`os.sched_yield` now release the GIL while calling sched_yield(2). 166Patch by Donghee Na. 167 168.. 169 170.. date: 2022-10-06-14-14-28 171.. gh-issue: 97955 172.. nonce: Nq5VXD 173.. section: Core and Builtins 174 175Migrate :mod:`zoneinfo` to Argument Clinic. 176 177.. 178 179.. date: 2022-10-06-06-36-29 180.. gh-issue: 97912 181.. nonce: jGRJpa 182.. section: Core and Builtins 183 184The compiler now avoids quadratic behavior when finding which instructions 185should use the :opcode:`LOAD_FAST_CHECK` opcode. 186 187.. 188 189.. date: 2022-10-06-02-11-34 190.. gh-issue: 97002 191.. nonce: Zvsk71 192.. section: Core and Builtins 193 194Fix an issue where several frame objects could be backed by the same 195interpreter frame, possibly leading to corrupted memory and hard crashes of 196the interpreter. 197 198.. 199 200.. date: 2022-10-05-17-02-22 201.. gh-issue: 97943 202.. nonce: LYAWlE 203.. section: Core and Builtins 204 205Bugfix: :c:func:`PyFunction_GetAnnotations` should return a borrowed 206reference. It was returning a new reference. 207 208.. 209 210.. date: 2022-10-05-11-37-15 211.. gh-issue: 97922 212.. nonce: Zu9Bge 213.. section: Core and Builtins 214 215The Garbage Collector now runs only on the eval breaker mechanism of the 216Python bytecode evaluation loop instead on object allocations. The GC can 217also run when :c:func:`PyErr_CheckSignals` is called so C extensions that 218need to run for a long time without executing any Python code also have a 219chance to execute the GC periodically. 220 221.. 222 223.. date: 2022-10-05-00-37-27 224.. gh-issue: 65961 225.. nonce: z0Ys0y 226.. section: Core and Builtins 227 228When ``__package__`` is different than ``__spec__.parent``, raise a 229``DeprecationWarning`` instead of ``ImportWarning``. 230 231Also remove ``importlib.util.set_package()`` which was scheduled for 232removal. 233 234.. 235 236.. date: 2022-10-04-17-02-18 237.. gh-issue: 97850 238.. nonce: E3QTRA 239.. section: Core and Builtins 240 241Long deprecated, ``module_repr()`` should now be completely eradicated. 242 243.. 244 245.. date: 2022-10-04-14-04-40 246.. gh-issue: 86298 247.. nonce: QVM7G1 248.. section: Core and Builtins 249 250In cases where ``warnings.warn_explicit()`` consults the module's loader, an 251``DeprecationWarning`` is issued when ``m.__loader__`` differs from 252``m.__spec__.loader``. 253 254.. 255 256.. date: 2022-10-04-02-00-10 257.. gh-issue: 97779 258.. nonce: f3N1hI 259.. section: Core and Builtins 260 261Ensure that all Python frame objects are backed by "complete" frames. 262 263.. 264 265.. date: 2022-10-03-16-12-39 266.. gh-issue: 91052 267.. nonce: MsYL9d 268.. section: Core and Builtins 269 270Add API for subscribing to modification events on selected dictionaries. 271 272.. 273 274.. date: 2022-10-03-13-35-48 275.. gh-issue: 97752 276.. nonce: 0xTjJY 277.. section: Core and Builtins 278 279Fix possible data corruption or crashes when accessing the ``f_back`` member 280of newly-created generator or coroutine frames. 281 282.. 283 284.. date: 2022-10-01-08-55-09 285.. gh-issue: 97591 286.. nonce: pw6kkH 287.. section: Core and Builtins 288 289Fixed a missing incref/decref pair in ``Exception.__setstate__()``. Patch by 290Ofey Chan. 291 292.. 293 294.. date: 2022-09-30-13-26-58 295.. gh-issue: 97670 296.. nonce: n61vMR 297.. section: Core and Builtins 298 299Remove the :func:`sys.getdxp` function and the 300``Tools/scripts/analyze_dxp.py`` script. DXP stands for "dynamic execution 301pairs". They were related to ``DYNAMIC_EXECUTION_PROFILE`` and ``DXPAIRS`` 302macros which have been removed in Python 3.11. Python can now be built with 303:option:`./configure --enable-pystats <--enable-pystats>` to gather 304statistics on Python opcodes. Patch by Victor Stinner. 305 306.. 307 308.. date: 2022-09-29-15-19-29 309.. gh-issue: 94526 310.. nonce: wq5m6T 311.. section: Core and Builtins 312 313Fix the Python path configuration used to initialized :data:`sys.path` at 314Python startup. Paths are no longer encoded to UTF-8/strict to avoid 315encoding errors if it contains surrogate characters (bytes paths are decoded 316with the surrogateescape error handler). Patch by Victor Stinner. 317 318.. 319 320.. date: 2022-09-27-11-59-13 321.. gh-issue: 96670 322.. nonce: XrBBit 323.. section: Core and Builtins 324 325The parser now raises :exc:`SyntaxError` when parsing source code containing 326null bytes. Patch by Pablo Galindo 327 328.. 329 330.. date: 2022-09-21-16-06-37 331.. gh-issue: 96975 332.. nonce: BmE0XY 333.. section: Core and Builtins 334 335Fix a crash occurring when :c:func:`PyEval_GetFrame` is called while the 336topmost Python frame is in a partially-initialized state. 337 338.. 339 340.. date: 2022-09-21-14-38-31 341.. gh-issue: 96848 342.. nonce: WuoLzU 343.. section: Core and Builtins 344 345Fix command line parsing: reject :option:`-X int_max_str_digits <-X>` option 346with no value (invalid) when the :envvar:`PYTHONINTMAXSTRDIGITS` environment 347variable is set to a valid limit. Patch by Victor Stinner. 348 349.. 350 351.. date: 2022-09-20-11-06-45 352.. gh-issue: 95921 353.. nonce: dkcRQn 354.. section: Core and Builtins 355 356Fix overly-broad source position information for chained comparisons used as 357branching conditions. 358 359.. 360 361.. date: 2022-09-19-03-35-01 362.. gh-issue: 96821 363.. nonce: izK6JA 364.. section: Core and Builtins 365 366Fix undefined behaviour in ``audioop.c``. 367 368.. 369 370.. date: 2022-09-18-08-47-40 371.. gh-issue: 96821 372.. nonce: Co2iOq 373.. section: Core and Builtins 374 375Fix undefined behaviour in ``_testcapimodule.c``. 376 377.. 378 379.. date: 2022-09-16-19-02-40 380.. gh-issue: 95778 381.. nonce: cJmnst 382.. section: Core and Builtins 383 384When :exc:`ValueError` is raised if an integer is larger than the limit, 385mention the :func:`sys.set_int_max_str_digits` function in the error 386message. Patch by Victor Stinner. 387 388.. 389 390.. date: 2022-09-16-16-54-35 391.. gh-issue: 96387 392.. nonce: GRzewg 393.. section: Core and Builtins 394 395At Python exit, sometimes a thread holding the GIL can wait forever for a 396thread (usually a daemon thread) which requested to drop the GIL, whereas 397the thread already exited. To fix the race condition, the thread which 398requested the GIL drop now resets its request before exiting. Issue 399discovered and analyzed by Mingliang ZHAO. Patch by Victor Stinner. 400 401.. 402 403.. date: 2022-09-16-12-36-13 404.. gh-issue: 96864 405.. nonce: PLU3i8 406.. section: Core and Builtins 407 408Fix a possible assertion failure, fatal error, or :exc:`SystemError` if a 409line tracing event raises an exception while opcode tracing is enabled. 410 411.. 412 413.. date: 2022-09-13-21-45-07 414.. gh-issue: 95778 415.. nonce: Oll4_5 416.. section: Core and Builtins 417 418The ``PyLong_FromString`` function was refactored to make it more 419maintainable and extensible. 420 421.. 422 423.. date: 2022-09-13-12-06-46 424.. gh-issue: 96678 425.. nonce: NqGFyb 426.. section: Core and Builtins 427 428Fix undefined behaviour in C code of null pointer arithmetic. 429 430.. 431 432.. date: 2022-09-12-16-58-22 433.. gh-issue: 96754 434.. nonce: 0GRme5 435.. section: Core and Builtins 436 437Make sure that all frame objects created are created from valid interpreter 438frames. Prevents the possibility of invalid frames in backtraces and signal 439handlers. 440 441.. 442 443.. date: 2022-09-12-15-15-04 444.. gh-issue: 90997 445.. nonce: sZO8c9 446.. section: Core and Builtins 447 448Improve the performance of reading and writing inline bytecode caches on 449some platforms. 450 451.. 452 453.. date: 2022-09-11-12-43-43 454.. gh-issue: 96751 455.. nonce: anRT6a 456.. section: Core and Builtins 457 458Remove dead code from ``CALL_FUNCTION_EX`` opcode. 459 460.. 461 462.. date: 2022-09-11-00-37-50 463.. gh-issue: 90751 464.. nonce: VE8-zf 465.. section: Core and Builtins 466 467:class:`memoryview` now supports half-floats. Patch by Donghee Na and 468Antoine Pitrou. 469 470.. 471 472.. date: 2022-09-09-13-13-27 473.. gh-issue: 96678 474.. nonce: vMxi9F 475.. section: Core and Builtins 476 477Fix case of undefined behavior in ceval.c 478 479.. 480 481.. date: 2022-09-08-20-58-10 482.. gh-issue: 64373 483.. nonce: AfCi36 484.. section: Core and Builtins 485 486Convert :mod:`!_functools` to argument clinic. 487 488.. 489 490.. date: 2022-09-07-13-38-37 491.. gh-issue: 96641 492.. nonce: wky0Fc 493.. section: Core and Builtins 494 495Do not expose ``KeyWrapper`` in :mod:`!_functools`. 496 497.. 498 499.. date: 2022-09-07-12-02-11 500.. gh-issue: 96636 501.. nonce: YvN-K6 502.. section: Core and Builtins 503 504Ensure that tracing, ``sys.setrace()``, is turned on immediately. In 505pre-release versions of 3.11, some tracing events might have been lost when 506turning on tracing in a ``__del__`` method or interrupt. 507 508.. 509 510.. date: 2022-09-06-16-54-49 511.. gh-issue: 96572 512.. nonce: 8DRsaW 513.. section: Core and Builtins 514 515Fix use after free in trace refs build mode. Patch by Kumar Aditya. 516 517.. 518 519.. date: 2022-09-06-16-22-13 520.. gh-issue: 96611 521.. nonce: 14wIX8 522.. section: Core and Builtins 523 524When loading a file with invalid UTF-8 inside a multi-line string, a correct 525SyntaxError is emitted. 526 527.. 528 529.. date: 2022-09-06-14-26-36 530.. gh-issue: 96612 531.. nonce: P4ZbeY 532.. section: Core and Builtins 533 534Make sure that incomplete frames do not show up in tracemalloc traces. 535 536.. 537 538.. date: 2022-09-06-11-19-03 539.. gh-issue: 90230 540.. nonce: YOtzs5 541.. section: Core and Builtins 542 543Fix compiler warnings and test failures when building with 544``--enable-pystats``. 545 546.. 547 548.. date: 2022-09-05-19-20-44 549.. gh-issue: 96587 550.. nonce: bVxhX2 551.. section: Core and Builtins 552 553Correctly raise ``SyntaxError`` on exception groups (:pep:`654`) on python 554versions prior to 3.11 555 556.. 557 558.. date: 2022-09-05-16-43-44 559.. gh-issue: 96569 560.. nonce: 9lmTCC 561.. section: Core and Builtins 562 563Remove two cases of undefined behavior, by adding NULL checks. 564 565.. 566 567.. date: 2022-09-05-15-07-25 568.. gh-issue: 96582 569.. nonce: HEsL5s 570.. section: Core and Builtins 571 572Fix possible ``NULL`` pointer dereference in ``_PyThread_CurrentFrames``. 573Patch by Kumar Aditya. 574 575.. 576 577.. date: 2022-09-05-09-56-32 578.. gh-issue: 91079 579.. nonce: H4-DdU 580.. section: Core and Builtins 581 582Separate Python recursion checking from C recursion checking which reduces 583the chance of C stack overflow and allows the recursion limit to be 584increased safely. 585 586.. 587 588.. date: 2022-09-02-16-47-52 589.. gh-issue: 93911 590.. nonce: vF-GWe 591.. section: Core and Builtins 592 593Fix an issue that could prevent :opcode:`LOAD_ATTR` from specializing 594properly when accessing properties. 595 596.. 597 598.. date: 2022-08-31-18-46-13 599.. gh-issue: 96348 600.. nonce: xzCoTP 601.. section: Core and Builtins 602 603Emit a DeprecationWarning when :meth:`~generator.throw`, 604:meth:`~coroutine.throw` or :meth:`~agen.athrow` are called with more than 605one argument. 606 607.. 608 609.. date: 2022-08-29-13-06-58 610.. gh-issue: 95196 611.. nonce: eGRR4b 612.. section: Core and Builtins 613 614Disable incorrect pickling of the C implemented classmethod descriptors. 615 616.. 617 618.. date: 2022-08-29-00-37-21 619.. gh-issue: 96364 620.. nonce: c-IVyb 621.. section: Core and Builtins 622 623Fix text signatures of ``list.__getitem__`` and ``dict.__getitem__``. 624 625.. 626 627.. date: 2022-08-28-10-51-19 628.. gh-issue: 96352 629.. nonce: jTLD2d 630.. section: Core and Builtins 631 632Fix :exc:`AttributeError` missing ``name`` and ``obj`` attributes in 633:meth:`object.__getattribute__`. Patch by Philip Georgi. 634 635.. 636 637.. date: 2022-08-26-18-46-32 638.. gh-issue: 93554 639.. nonce: QEaCcK 640.. section: Core and Builtins 641 642Change the jump opcodes so that all conditional jumps are forward jumps. 643Backward jumps are converted by the assembler into a conditional forward 644jump whose target is the fallthrough block (and with a reversed condition), 645followed by an unconditional backward jump. For example: 646 647``POP_JUMP_IF_TRUE BACKWARD_TARGET`` becomes ``POP_JUMP_IF_FALSE NEXT_BLOCK; 648JUMP BACKWARD_TARGET``. 649 650All the directed conditional jump opcodes were removed: 651``POP_JUMP_FORWARD_IF_TRUE``, ``POP_JUMP_BACKWARD_IF_TRUE``, 652``POP_JUMP_FORWARD_IF_FALSE``, ``POP_JUMP_BACKWARD_IF_FALSE``, 653``POP_JUMP_FORWARD_IF_NONE``, ``POP_JUMP_BACKWARD_IF_NONE``, 654``POP_JUMP_FORWARD_IF_NOT_NONE``, ``POP_JUMP_BACKWARD_IF_NOT_NONE``. 655 656The corresponding opcodes without direction are no longer 657pseudo-instructions, and they implement the forward conditional jumps. 658 659.. 660 661.. date: 2022-08-25-10-19-34 662.. gh-issue: 96268 663.. nonce: AbYrLB 664.. section: Core and Builtins 665 666Loading a file with invalid UTF-8 will now report the broken character at 667the correct location. 668 669.. 670 671.. date: 2022-08-24-14-30-26 672.. gh-issue: 96237 673.. nonce: msif5f 674.. section: Core and Builtins 675 676The internal field ``_PyInterpreterFrame.f_func`` is renamed to 677``_PyInterpreterFrame.f_funcobj`` and may be any object. The ``f_globals`` 678and ``f_builtin`` fields may hold junk values. 679 680It is safest to treat the ``_PyInterpreterFrame`` struct as opaque. 681 682.. 683 684.. date: 2022-08-22-21-33-28 685.. gh-issue: 96187 686.. nonce: W_6SRG 687.. section: Core and Builtins 688 689Fixed a bug that caused ``_PyCode_GetExtra`` to return garbage for negative 690indexes. Patch by Pablo Galindo 691 692.. 693 694.. date: 2022-08-20-18-36-40 695.. gh-issue: 96143 696.. nonce: nh3GFM 697.. section: Core and Builtins 698 699Add a new ``-X perf`` Python command line option as well as 700:func:`sys.activate_stack_trampoline` and 701:func:`sys.deactivate_stack_trampoline` function in the :mod:`sys` module 702that allows to set/unset the interpreter in a way that the Linux ``perf`` 703profiler can detect Python calls. The new 704:func:`sys.is_stack_trampoline_active` function allows to query the state of 705the perf trampoline. Design by Pablo Galindo. Patch by Pablo Galindo and 706Christian Heimes with contributions from Gregory P. Smith [Google] and Mark 707Shannon. 708 709.. 710 711.. date: 2022-08-19-06-51-17 712.. gh-issue: 96071 713.. nonce: mVgPAo 714.. section: Core and Builtins 715 716Fix a deadlock in :c:func:`PyGILState_Ensure` when allocating new thread 717state. Patch by Kumar Aditya. 718 719.. 720 721.. date: 2022-08-18-13-47-59 722.. gh-issue: 96046 723.. nonce: 5Hqbka 724.. section: Core and Builtins 725 726:c:func:`PyType_Ready` now initializes ``ht_cached_keys`` and performs 727additional checks to ensure that type objects are properly configured. This 728avoids crashes in 3rd party packages that don't use regular API to create 729new types. 730 731.. 732 733.. date: 2022-08-15-21-08-11 734.. gh-issue: 96005 735.. nonce: 6eoc8k 736.. section: Core and Builtins 737 738On WASI :const:`~errno.ENOTCAPABLE` is now mapped to :exc:`PermissionError`. 739The :mod:`errno` modules exposes the new error number. ``getpath.py`` now 740ignores :exc:`PermissionError` when it cannot open landmark files 741``pybuilddir.txt`` and ``pyenv.cfg``. 742 743.. 744 745.. date: 2022-08-15-20-52-41 746.. gh-issue: 93678 747.. nonce: X7GuIJ 748.. section: Core and Builtins 749 750Added test a harness for direct unit tests of the compiler's optimization 751stage. The ``_testinternalcapi.optimize_cfg()`` function runs the optimiser 752on a sequence of instructions. The ``CfgOptimizationTestCase`` class in 753``test.support`` has utilities for invoking the optimizer and checking the 754output. 755 756.. 757 758.. date: 2022-08-15-12-41-14 759.. gh-issue: 95245 760.. nonce: N4gOUV 761.. section: Core and Builtins 762 763Reduces the size of a "simple" Python object from 8 to 6 words by moving the 764weakreflist pointer into the pre-header directly before the object's 765dict/values pointer. 766 767.. 768 769.. date: 2022-08-15-11-58-05 770.. gh-issue: 90997 771.. nonce: bWwV8Q 772.. section: Core and Builtins 773 774Compile virtual :keyword:`try`/:keyword:`except` blocks to handle exceptions 775raised during :meth:`~generator.close` or :meth:`~generator.throw` calls 776through a suspended frame. 777 778.. 779 780.. date: 2022-08-14-10-04-44 781.. gh-issue: 95977 782.. nonce: gCTZb9 783.. section: Core and Builtins 784 785Optimized calling :meth:`~object.__get__` with vectorcall. Patch by Kumar 786Aditya. 787 788.. 789 790.. date: 2022-08-12-18-13-49 791.. gh-issue: 91210 792.. nonce: AWMSLj 793.. section: Core and Builtins 794 795Improve error message when a parameter without a default value follows one 796with a default value, and show the same message, even when the 797non-default/default sequence is preceded by positional-only parameters. 798 799.. 800 801.. date: 2022-08-12-13-04-25 802.. gh-issue: 95922 803.. nonce: YNCtyX 804.. section: Core and Builtins 805 806Fixed bug where the compiler's ``eliminate_empty_basic_blocks`` function 807ignores the last block of the code unit. 808 809.. 810 811.. date: 2022-08-11-11-01-56 812.. gh-issue: 95818 813.. nonce: iClLdl 814.. section: Core and Builtins 815 816Skip over incomplete frames in :c:func:`PyThreadState_GetFrame`. 817 818.. 819 820.. date: 2022-08-11-09-19-55 821.. gh-issue: 95876 822.. nonce: YpQfoV 823.. section: Core and Builtins 824 825Fix format string in ``_PyPegen_raise_error_known_location`` that can lead 826to memory corruption on some 64bit systems. The function was building a 827tuple with ``i`` (int) instead of ``n`` (Py_ssize_t) for Py_ssize_t 828arguments. 829 830.. 831 832.. date: 2022-08-04-18-46-54 833.. gh-issue: 95605 834.. nonce: FbpCoG 835.. section: Core and Builtins 836 837Fix misleading contents of error message when converting an all-whitespace 838string to :class:`float`. 839 840.. 841 842.. date: 2022-07-31-13-23-12 843.. gh-issue: 95150 844.. nonce: 67FXVo 845.. section: Core and Builtins 846 847Update code object hashing and equality to consider all debugging and 848exception handling tables. This fixes an issue where certain non-identical 849code objects could be "deduplicated" during compilation. 850 851.. 852 853.. date: 2022-07-31-03-22-58 854.. gh-issue: 91146 855.. nonce: Y2Hziy 856.. section: Core and Builtins 857 858Reduce allocation size of :class:`list` from :meth:`str.split` and 859:meth:`str.rsplit`. Patch by Donghee Na and Inada Naoki. 860 861.. 862 863.. date: 2022-07-28-19-07-06 864.. gh-issue: 87092 865.. nonce: 73IPS1 866.. section: Core and Builtins 867 868Create a 'jump target label' abstraction in the compiler so that the 869compiler's codegen stage does not work directly with basic blocks. This 870prepares the code for changes to the underlying CFG generation mechanism. 871 872.. 873 874.. date: 2022-07-28-08-33-31 875.. gh-issue: 95355 876.. nonce: yN4XVk 877.. section: Core and Builtins 878 879``_PyPegen_Parser_New`` now properly detects token memory allocation errors. 880Patch by Honglin Zhu. 881 882.. 883 884.. date: 2022-07-27-14-21-57 885.. gh-issue: 90081 886.. nonce: HVAS5x 887.. section: Core and Builtins 888 889Run Python code in tracer/profiler function at full speed. Fixes slowdown in 890earlier versions of 3.11. 891 892.. 893 894.. date: 2022-07-27-14-05-07 895.. gh-issue: 95324 896.. nonce: 28Q5u7 897.. section: Core and Builtins 898 899Emit a warning in debug mode if an object does not call 900:c:func:`PyObject_GC_UnTrack` before deallocation. Patch by Pablo Galindo. 901 902.. 903 904.. date: 2022-07-26-12-59-03 905.. gh-issue: 95245 906.. nonce: GHWczn 907.. section: Core and Builtins 908 909Merge managed dict and values pointer into a single tagged pointer to save 910one word in the pre-header. 911 912.. 913 914.. date: 2022-07-26-09-31-12 915.. gh-issue: 93678 916.. nonce: W8vvgT 917.. section: Core and Builtins 918 919Add cfg_builder struct and refactor the relevant code so that a cfg can be 920constructed without an instance of the compiler struct. 921 922.. 923 924.. date: 2022-07-24-00-27-47 925.. gh-issue: 95185 926.. nonce: ghYTZx 927.. section: Core and Builtins 928 929Prevented crashes in the AST constructor when compiling some absurdly long 930expressions like ``"+0"*1000000``. :exc:`RecursionError` is now raised 931instead. Patch by Pablo Galindo 932 933.. 934 935.. date: 2022-07-23-19-16-25 936.. gh-issue: 93351 937.. nonce: 0Jyvu- 938.. section: Core and Builtins 939 940:class:`ast.AST` node positions are now validated when provided to 941:func:`compile` and other related functions. If invalid positions are 942detected, a :exc:`ValueError` will be raised. 943 944.. 945 946.. date: 2022-07-22-12-53-34 947.. gh-issue: 94438 948.. nonce: hNqACc 949.. section: Core and Builtins 950 951Fix an issue that caused extended opcode arguments and some conditional pops 952to be ignored when calculating valid jump targets for assignments to the 953``f_lineno`` attribute of frame objects. In some cases, this could cause 954inconsistent internal state, resulting in a hard crash of the interpreter. 955 956.. 957 958.. date: 2022-07-21-19-19-20 959.. gh-issue: 95060 960.. nonce: 4xdT1f 961.. section: Core and Builtins 962 963Undocumented ``PyCode_Addr2Location`` function now properly returns when 964``addrq`` argument is less than zero. 965 966.. 967 968.. date: 2022-07-21-17-54-52 969.. gh-issue: 95113 970.. nonce: NnSLpT 971.. section: Core and Builtins 972 973Replace all ``EXTENDED_ARG_QUICK`` instructions with basic 974:opcode:`EXTENDED_ARG` instructions in unquickened code. Consumers of 975non-adaptive bytecode should be able to handle extended arguments the same 976way they were handled in CPython 3.10 and older. 977 978.. 979 980.. date: 2022-07-20-13-46-01 981.. gh-issue: 91409 982.. nonce: dhL8Zo 983.. section: Core and Builtins 984 985Fix incorrect source location info caused by certain optimizations in the 986bytecode compiler. 987 988.. 989 990.. date: 2022-07-20-09-04-55 991.. gh-issue: 95023 992.. nonce: bs-xd7 993.. section: Core and Builtins 994 995Implement :func:`os.setns` and :func:`os.unshare` for Linux. Patch by Noam 996Cohen. 997 998.. 999 1000.. date: 2022-07-19-16-30-59 1001.. gh-issue: 94036 1002.. nonce: _6Utkm 1003.. section: Core and Builtins 1004 1005Fix incorrect source location info for some multi-line attribute accesses 1006and method calls. 1007 1008.. 1009 1010.. date: 2022-07-19-09-41-55 1011.. gh-issue: 94938 1012.. nonce: xYBlM7 1013.. section: Core and Builtins 1014 1015Fix error detection in some builtin functions when keyword argument name is 1016an instance of a str subclass with overloaded ``__eq__`` and ``__hash__``. 1017Previously it could cause SystemError or other undesired behavior. 1018 1019.. 1020 1021.. date: 2022-07-19-04-34-56 1022.. gh-issue: 94996 1023.. nonce: dV564A 1024.. section: Core and Builtins 1025 1026:func:`ast.parse` will no longer parse function definitions with 1027positional-only params when passed ``feature_version`` less than ``(3, 8)``. 1028Patch by Shantanu Jain. 1029 1030.. 1031 1032.. date: 2022-07-18-14-19-21 1033.. gh-issue: 94739 1034.. nonce: NQJQi7 1035.. section: Core and Builtins 1036 1037Allow jumping within, out of, and across exception handlers in the debugger. 1038 1039.. 1040 1041.. date: 2022-07-18-05-10-29 1042.. gh-issue: 94949 1043.. nonce: OsZ7_s 1044.. section: Core and Builtins 1045 1046:func:`ast.parse` will no longer parse parenthesized context managers when 1047passed ``feature_version`` less than ``(3, 9)``. Patch by Shantanu Jain. 1048 1049.. 1050 1051.. date: 2022-07-18-04-48-34 1052.. gh-issue: 94947 1053.. nonce: df9gUw 1054.. section: Core and Builtins 1055 1056:func:`ast.parse` will no longer parse assignment expressions when passed 1057``feature_version`` less than ``(3, 8)``. Patch by Shantanu Jain. 1058 1059.. 1060 1061.. date: 2022-07-17-15-54-29 1062.. gh-issue: 91256 1063.. nonce: z7i7Q5 1064.. section: Core and Builtins 1065 1066Ensures the program name is known for help text during interpreter startup. 1067 1068.. 1069 1070.. date: 2022-07-16-08-14-17 1071.. gh-issue: 94869 1072.. nonce: eRwMsX 1073.. section: Core and Builtins 1074 1075Fix the column offsets for some expressions in multi-line f-strings 1076:mod:`ast` nodes. Patch by Pablo Galindo. 1077 1078.. 1079 1080.. date: 2022-07-15-22-47-44 1081.. gh-issue: 94893 1082.. nonce: YiJYcW 1083.. section: Core and Builtins 1084 1085Fix an issue where frame object manipulations could corrupt inline bytecode 1086caches. 1087 1088.. 1089 1090.. date: 2022-07-15-22-16-08 1091.. gh-issue: 94822 1092.. nonce: zRRzBN 1093.. section: Core and Builtins 1094 1095Fix an issue where lookups of metaclass descriptors may be ignored when an 1096identically-named attribute also exists on the class itself. 1097 1098.. 1099 1100.. date: 2022-07-15-16-15-04 1101.. gh-issue: 91153 1102.. nonce: HiBmtt 1103.. section: Core and Builtins 1104 1105Fix an issue where a :class:`bytearray` item assignment could crash if it's 1106resized by the new value's :meth:`__index__` method. 1107 1108.. 1109 1110.. date: 2022-07-14-10-07-53 1111.. gh-issue: 90699 1112.. nonce: x3aG9m 1113.. section: Core and Builtins 1114 1115Fix reference counting bug in :meth:`bool.__repr__`. Patch by Kumar Aditya. 1116 1117.. 1118 1119.. date: 2022-07-08-16-44-11 1120.. gh-issue: 94694 1121.. nonce: VkL2CM 1122.. section: Core and Builtins 1123 1124Fix an issue that could cause code with multi-line method lookups to have 1125misleading or incorrect column offset information. In some cases (when 1126compiling a hand-built AST) this could have resulted in a hard crash of the 1127interpreter. 1128 1129.. 1130 1131.. date: 2022-07-08-11-44-45 1132.. gh-issue: 93252 1133.. nonce: i2358c 1134.. section: Core and Builtins 1135 1136Fix an issue that caused internal frames to outlive failed Python function 1137calls, possibly resulting in memory leaks or hard interpreter crashes. 1138 1139.. 1140 1141.. date: 2022-07-07-21-13-25 1142.. gh-issue: 94215 1143.. nonce: _Sv9Ms 1144.. section: Core and Builtins 1145 1146Fix an issue where exceptions raised by line-tracing events would cause 1147frames to be left in an invalid state, possibly resulting in a hard crash of 1148the interpreter. 1149 1150.. 1151 1152.. date: 2022-07-06-14-02-26 1153.. gh-issue: 92228 1154.. nonce: 44Cbly 1155.. section: Core and Builtins 1156 1157Disable the compiler's inline-small-exit-blocks optimization for exit blocks 1158that are associated with source code lines. This fixes a bug where the 1159debugger cannot tell where an exception handler ends and the following code 1160block begins. 1161 1162.. 1163 1164.. date: 2022-07-01-20-00-19 1165.. gh-issue: 94485 1166.. nonce: mo5st7 1167.. section: Core and Builtins 1168 1169Line number of a module's ``RESUME`` instruction is set to 0 as specified in 1170:pep:`626`. 1171 1172.. 1173 1174.. date: 2022-06-30-15-07-26 1175.. gh-issue: 94438 1176.. nonce: btzHSk 1177.. section: Core and Builtins 1178 1179Account for instructions that can push NULL to the stack when setting line 1180number in a frame. Prevents some (unlikely) crashes. 1181 1182.. 1183 1184.. date: 2022-06-29-22-18-36 1185.. gh-issue: 91719 1186.. nonce: 3APYYI 1187.. section: Core and Builtins 1188 1189Reload ``opcode`` when raising ``unknown opcode error`` in the interpreter 1190main loop, for C compilers to generate dispatching code independently. 1191 1192.. 1193 1194.. date: 2022-06-29-15-45-04 1195.. gh-issue: 94329 1196.. nonce: olUQyk 1197.. section: Core and Builtins 1198 1199Compile and run code with unpacking of extremely large sequences (1000s of 1200elements). Such code failed to compile. It now compiles and runs correctly. 1201 1202.. 1203 1204.. date: 2022-06-28-14-20-36 1205.. gh-issue: 94360 1206.. nonce: DiEnen 1207.. section: Core and Builtins 1208 1209Fixed a tokenizer crash when reading encoded files with syntax errors from 1210``stdin`` with non utf-8 encoded text. Patch by Pablo Galindo 1211 1212.. 1213 1214.. date: 2022-06-28-12-41-17 1215.. gh-issue: 88116 1216.. nonce: A7fEl_ 1217.. section: Core and Builtins 1218 1219Fix an issue when reading line numbers from code objects if the encoded line 1220numbers are close to ``INT_MIN``. Patch by Pablo Galindo 1221 1222.. 1223 1224.. date: 2022-06-28-10-08-06 1225.. gh-issue: 94262 1226.. nonce: m-HWUZ 1227.. section: Core and Builtins 1228 1229Don't create frame objects for incomplete frames. Prevents the creation of 1230generators and closures from being observable to Python and C extensions, 1231restoring the behavior of 3.10 and earlier. 1232 1233.. 1234 1235.. date: 2022-06-26-14-37-03 1236.. gh-issue: 94192 1237.. nonce: ab7tn7 1238.. section: Core and Builtins 1239 1240Fix error for dictionary literals with invalid expression as value. 1241 1242.. 1243 1244.. date: 2022-06-25-10-19-43 1245.. gh-issue: 87995 1246.. nonce: aMDHnp 1247.. section: Core and Builtins 1248 1249:class:`types.MappingProxyType` instances are now hashable if the underlying 1250mapping is hashable. 1251 1252.. 1253 1254.. date: 2022-06-24-14-06-20 1255.. gh-issue: 93883 1256.. nonce: 8jVQQ4 1257.. section: Core and Builtins 1258 1259Revise the display strategy of traceback enhanced error locations. The 1260indicators are only shown when the location doesn't span the whole line. 1261 1262.. 1263 1264.. date: 2022-06-23-12-10-39 1265.. gh-issue: 94163 1266.. nonce: SqAfQq 1267.. section: Core and Builtins 1268 1269Add :opcode:`BINARY_SLICE` and :opcode:`STORE_SLICE` instructions for more 1270efficient handling and better specialization of slicing operations, where 1271the slice is explicit in the source code. 1272 1273.. 1274 1275.. date: 2022-06-20-13-48-57 1276.. gh-issue: 94021 1277.. nonce: o78q3G 1278.. section: Core and Builtins 1279 1280Fix unreachable code warning in ``Python/specialize.c``. 1281 1282.. 1283 1284.. date: 2022-06-18-17-00-33 1285.. gh-issue: 93911 1286.. nonce: y286of 1287.. section: Core and Builtins 1288 1289Specialize ``LOAD_ATTR`` for objects with custom ``__getattribute__``. 1290 1291.. 1292 1293.. date: 2022-06-17-16-30-24 1294.. gh-issue: 93955 1295.. nonce: LmiAe9 1296.. section: Core and Builtins 1297 1298Improve performance of attribute lookups on objects with custom 1299``__getattribute__`` and ``__getattr__``. Patch by Ken Jin. 1300 1301.. 1302 1303.. date: 2022-06-16-16-53-22 1304.. gh-issue: 93911 1305.. nonce: RDwIiK 1306.. section: Core and Builtins 1307 1308Specialize ``LOAD_ATTR`` for ``property()`` attributes. 1309 1310.. 1311 1312.. date: 2022-06-15-16-45-53 1313.. gh-issue: 93678 1314.. nonce: 1I_ZT3 1315.. section: Core and Builtins 1316 1317Refactor compiler optimisation code so that it no longer needs the ``struct 1318assembler`` and ``struct compiler`` passed around. Instead, each function 1319takes the CFG and other data that it actually needs. This will make it 1320possible to test this code directly. 1321 1322.. 1323 1324.. date: 2022-06-15-11-16-13 1325.. gh-issue: 93841 1326.. nonce: 06zqX3 1327.. section: Core and Builtins 1328 1329When built with ``-enable-pystats``, ``sys._stats_on()``, 1330``sys._stats_off()``, ``sys._stats_clear()`` and ``sys._stats_dump()`` 1331functions have been added to enable gathering stats for parts of programs. 1332 1333.. 1334 1335.. date: 2022-06-13-13-55-34 1336.. gh-issue: 93516 1337.. nonce: HILrDl 1338.. section: Core and Builtins 1339 1340Store offset of first traceable instruction in code object to avoid having 1341to recompute it for each instruction when tracing. 1342 1343.. 1344 1345.. date: 2022-06-13-10-48-09 1346.. gh-issue: 93516 1347.. nonce: yJSait 1348.. section: Core and Builtins 1349 1350Lazily create a table mapping bytecode offsets to line numbers to speed up 1351calculation of line numbers when tracing. 1352 1353.. 1354 1355.. date: 2022-06-12-19-31-56 1356.. gh-issue: 89828 1357.. nonce: bq02M7 1358.. section: Core and Builtins 1359 1360:class:`types.GenericAlias` no longer relays the ``__class__`` attribute. 1361For example, ``isinstance(list[int], type)`` no longer returns ``True``. 1362 1363.. 1364 1365.. date: 2022-06-10-16-57-35 1366.. gh-issue: 93678 1367.. nonce: 1WBnHt 1368.. section: Core and Builtins 1369 1370Refactor the compiler to reduce boilerplate and repetition. 1371 1372.. 1373 1374.. date: 2022-06-10-12-03-17 1375.. gh-issue: 93671 1376.. nonce: idkQqG 1377.. section: Core and Builtins 1378 1379Fix some exponential backtrace case happening with deeply nested sequence 1380patterns in match statements. Patch by Pablo Galindo 1381 1382.. 1383 1384.. date: 2022-06-10-10-31-18 1385.. gh-issue: 93662 1386.. nonce: -7RSC1 1387.. section: Core and Builtins 1388 1389Make sure that the end column offsets are correct in multi-line method 1390calls. Previously, the end column could precede the column offset. 1391 1392.. 1393 1394.. date: 2022-06-09-19-19-02 1395.. gh-issue: 93461 1396.. nonce: 5DqP1e 1397.. section: Core and Builtins 1398 1399:func:`importlib.invalidate_caches` now drops entries from 1400:data:`sys.path_importer_cache` with a relative path as name. This solves a 1401caching issue when a process changes its current working directory. 1402 1403``FileFinder`` no longer inserts a dot in the path, e.g. ``/egg/./spam`` is 1404now ``/egg/spam``. 1405 1406.. 1407 1408.. date: 2022-06-09-09-08-29 1409.. gh-issue: 93621 1410.. nonce: -_Pn1d 1411.. section: Core and Builtins 1412 1413Change order of bytecode instructions emitted for :keyword:`with` and 1414:keyword:`async with` to reduce the number of entries in the exception 1415table. 1416 1417.. 1418 1419.. date: 2022-06-06-14-28-24 1420.. gh-issue: 93533 1421.. nonce: lnC0CC 1422.. section: Core and Builtins 1423 1424Reduce the size of the inline cache for ``LOAD_METHOD`` by 2 bytes. 1425 1426.. 1427 1428.. date: 2022-06-02-23-00-08 1429.. gh-issue: 93444 1430.. nonce: m63DIs 1431.. section: Core and Builtins 1432 1433Removed redundant fields from the compiler's basicblock struct: 1434``b_nofallthrough``, ``b_exit``, ``b_return``. They can be easily calculated 1435from the opcode of the last instruction of the block. 1436 1437.. 1438 1439.. date: 2022-06-02-08-28-55 1440.. gh-issue: 93429 1441.. nonce: DZTWHx 1442.. section: Core and Builtins 1443 1444``LOAD_METHOD`` instruction has been removed. It was merged back into 1445``LOAD_ATTR``. 1446 1447.. 1448 1449.. date: 2022-06-01-17-47-40 1450.. gh-issue: 93418 1451.. nonce: 24dJuc 1452.. section: Core and Builtins 1453 1454Fixed an assert where an f-string has an equal sign '=' following an 1455expression, but there's no trailing brace. For example, f"{i=". 1456 1457.. 1458 1459.. date: 2022-05-31-16-36-30 1460.. gh-issue: 93382 1461.. nonce: Jf6gAj 1462.. section: Core and Builtins 1463 1464Cache the result of :c:func:`PyCode_GetCode` function to restore the *O*\ (1) 1465lookup of the :attr:`~types.CodeType.co_code` attribute. 1466 1467.. 1468 1469.. date: 2022-05-30-19-00-38 1470.. gh-issue: 93359 1471.. nonce: zXV3A0 1472.. section: Core and Builtins 1473 1474Ensure that custom :mod:`ast` nodes without explicit end positions can be 1475compiled. Patch by Pablo Galindo. 1476 1477.. 1478 1479.. date: 2022-05-30-15-51-11 1480.. gh-issue: 93356 1481.. nonce: l5wnzW 1482.. section: Core and Builtins 1483 1484Code for exception handlers is emitted at the end of the code unit's 1485bytecode. This avoids one jump when no exception is raised. 1486 1487.. 1488 1489.. date: 2022-05-30-15-35-42 1490.. gh-issue: 93354 1491.. nonce: RZk8gs 1492.. section: Core and Builtins 1493 1494Use exponential backoff for specialization counters in the interpreter. Can 1495reduce the number of failed specializations significantly and avoid slowdown 1496for those parts of a program that are not suitable for specialization. 1497 1498.. 1499 1500.. date: 2022-05-30-14-50-03 1501.. gh-issue: 93283 1502.. nonce: XDO2ZQ 1503.. section: Core and Builtins 1504 1505Improve error message for invalid syntax of conversion character in f-string 1506expressions. 1507 1508.. 1509 1510.. date: 2022-05-30-10-22-46 1511.. gh-issue: 93345 1512.. nonce: gi1A4L 1513.. section: Core and Builtins 1514 1515Fix a crash in substitution of a ``TypeVar`` in nested generic alias after 1516``TypeVarTuple``. 1517 1518.. 1519 1520.. date: 2022-05-25-21-56-25 1521.. gh-issue: 93223 1522.. nonce: gTOGVZ 1523.. section: Core and Builtins 1524 1525When a bytecode instruction jumps to an unconditional jump instruction, the 1526first instruction can often be optimized to target the unconditional jump's 1527target directly. For tracing reasons, this would previously only occur if 1528both instructions have the same line number. This also now occurs if the 1529unconditional jump is artificial, i.e., if it has no associated line number. 1530 1531.. 1532 1533.. date: 2022-05-25-12-30-12 1534.. gh-issue: 84694 1535.. nonce: 5sjy2w 1536.. section: Core and Builtins 1537 1538The ``--experimental-isolated-subinterpreters`` configure option and 1539``EXPERIMENTAL_ISOLATED_SUBINTERPRETERS`` macro have been removed. 1540 1541.. 1542 1543.. date: 2022-05-25-04-07-22 1544.. gh-issue: 91924 1545.. nonce: -UyO4q 1546.. section: Core and Builtins 1547 1548Fix ``__lltrace__`` debug feature if the stdout encoding is not UTF-8. Patch 1549by Victor Stinner. 1550 1551.. 1552 1553.. date: 2022-05-24-14-35-48 1554.. gh-issue: 93040 1555.. nonce: 9X6Ofu 1556.. section: Core and Builtins 1557 1558Wraps unused parameters in ``Objects/obmalloc.c`` with ``Py_UNUSED``. 1559 1560.. 1561 1562.. date: 2022-05-23-18-36-07 1563.. gh-issue: 93143 1564.. nonce: X1Yqxm 1565.. section: Core and Builtins 1566 1567Avoid ``NULL`` checks for uninitialized local variables by determining at 1568compile time which variables must be initialized. 1569 1570.. 1571 1572.. date: 2022-05-22-02-37-50 1573.. gh-issue: 93061 1574.. nonce: r70Imp 1575.. section: Core and Builtins 1576 1577Backward jumps after ``async for`` loops are no longer given dubious line 1578numbers. 1579 1580.. 1581 1582.. date: 2022-05-21-23-21-37 1583.. gh-issue: 93065 1584.. nonce: 5I18WC 1585.. section: Core and Builtins 1586 1587Fix contextvars HAMT implementation to handle iteration over deep trees. 1588 1589The bug was discovered and fixed by Eli Libman. See 1590`MagicStack/immutables#84 1591<https://github.com/MagicStack/immutables/issues/84>`_ for more details. 1592 1593.. 1594 1595.. date: 2022-05-20-13-32-24 1596.. gh-issue: 93012 1597.. nonce: e9B-pv 1598.. section: Core and Builtins 1599 1600Added the new function :c:func:`PyType_FromMetaclass`, which generalizes the 1601existing :c:func:`PyType_FromModuleAndSpec` using an additional metaclass 1602argument. This is useful for language binding tools, where it can be used to 1603intercept type-related operations like subclassing or static attribute 1604access by specifying a metaclass with custom slots. 1605 1606Importantly, :c:func:`PyType_FromMetaclass` is available in the Limited API, 1607which provides a path towards migrating more binding tools onto the Stable 1608ABI. 1609 1610.. 1611 1612.. date: 2022-05-20-09-25-34 1613.. gh-issue: 93021 1614.. nonce: k3Aji2 1615.. section: Core and Builtins 1616 1617Fix the :attr:`__text_signature__` for :meth:`__get__` methods implemented 1618in C. Patch by Jelle Zijlstra. 1619 1620.. 1621 1622.. date: 2022-05-19-15-29-53 1623.. gh-issue: 89914 1624.. nonce: 8bAffH 1625.. section: Core and Builtins 1626 1627The operand of the ``YIELD_VALUE`` instruction is set to the stack depth. 1628This is done to help frame handling on ``yield`` and may assist debuggers. 1629 1630.. 1631 1632.. date: 2022-05-19-13-25-50 1633.. gh-issue: 92955 1634.. nonce: kmNV33 1635.. section: Core and Builtins 1636 1637Fix memory leak in code object's lines and positions iterators as they were 1638not finalized at exit. Patch by Kumar Aditya. 1639 1640.. 1641 1642.. date: 2022-05-18-18-34-45 1643.. gh-issue: 92930 1644.. nonce: kpYPOb 1645.. section: Core and Builtins 1646 1647Fixed a crash in ``_pickle.c`` from mutating collections during 1648``__reduce__`` or ``persistent_id``. 1649 1650.. 1651 1652.. date: 2022-05-18-12-55-35 1653.. gh-issue: 90690 1654.. nonce: TKuoTa 1655.. section: Core and Builtins 1656 1657The PRECALL instruction has been removed. It offered only a small advantage 1658for specialization and is not needed in the vast majority of cases. 1659 1660.. 1661 1662.. date: 2022-05-18-08-32-33 1663.. gh-issue: 92914 1664.. nonce: tJUeTD 1665.. section: Core and Builtins 1666 1667Always round the allocated size for lists up to the nearest even number. 1668 1669.. 1670 1671.. date: 2022-05-17-20-41-43 1672.. gh-issue: 92858 1673.. nonce: eIXJTn 1674.. section: Core and Builtins 1675 1676Improve error message for some suites with syntax error before ':' 1677 1678.. 1679 1680.. date: 2022-05-15-15-25-05 1681.. gh-issue: 90473 1682.. nonce: MoPHYW 1683.. section: Core and Builtins 1684 1685Decrease default recursion limit on WASI to address limited call stack size. 1686 1687.. 1688 1689.. date: 2022-05-14-13-22-11 1690.. gh-issue: 92804 1691.. nonce: rAqpI2 1692.. section: Core and Builtins 1693 1694Fix memory leak in ``memoryview`` iterator as it was not finalized at exit. 1695Patch by Kumar Aditya. 1696 1697.. 1698 1699.. date: 2022-05-13-12-36-10 1700.. gh-issue: 92777 1701.. nonce: Odo4vP 1702.. section: Core and Builtins 1703 1704Specialize ``LOAD_METHOD`` for objects with lazy dictionaries. Patch by Ken 1705Jin. 1706 1707.. 1708 1709.. date: 2022-05-13-00-57-18 1710.. gh-issue: 92658 1711.. nonce: YdhFE2 1712.. section: Core and Builtins 1713 1714Add support for connecting and binding to Hyper-V sockets on Windows Hyper-V 1715hosts and guests. 1716 1717.. 1718 1719.. date: 2022-05-12-13-23-19 1720.. gh-issue: 92236 1721.. nonce: sDRzUe 1722.. section: Core and Builtins 1723 1724Remove spurious "LINE" event when starting a generator or coroutine, visible 1725tracing functions implemented in C. 1726 1727.. 1728 1729.. date: 2022-05-11-09-16-54 1730.. gh-issue: 91102 1731.. nonce: lenv9h 1732.. section: Core and Builtins 1733 1734:meth:`!_warnings.warn_explicit` is ported to Argument Clinic. 1735 1736.. 1737 1738.. date: 2022-05-10-11-34-35 1739.. gh-issue: 92619 1740.. nonce: u0V0lY 1741.. section: Core and Builtins 1742 1743Make the compiler duplicate an exit block only if none of its instructions 1744have a lineno (previously only the first instruction in the block was 1745checked, leading to unnecessarily duplicated blocks). 1746 1747.. 1748 1749.. date: 2022-05-08-19-43-31 1750.. gh-issue: 88750 1751.. nonce: 1BjJg- 1752.. section: Core and Builtins 1753 1754The deprecated debug build only ``PYTHONTHREADDEBUG`` environment variable 1755no longer does anything. 1756 1757.. 1758 1759.. date: 2022-05-03-20-12-18 1760.. gh-issue: 92261 1761.. nonce: aigLnb 1762.. section: Core and Builtins 1763 1764Fix hang when trying to iterate over a ``typing.Union``. 1765 1766.. 1767 1768.. date: 2022-04-24-02-22-10 1769.. gh-issue: 91432 1770.. nonce: YPJAK6 1771.. section: Core and Builtins 1772 1773Specialized the :opcode:`FOR_ITER` opcode using the PEP 659 machinery 1774 1775.. 1776 1777.. date: 2022-04-16-15-37-55 1778.. gh-issue: 91399 1779.. nonce: trLbK6 1780.. section: Core and Builtins 1781 1782Removed duplicate '{0, 0, 0, 0, 0, 0}' entry in 'Objects/unicodetype_db.h'. 1783 1784.. 1785 1786.. date: 2022-04-15-22-12-53 1787.. gh-issue: 91578 1788.. nonce: rDOtyK 1789.. section: Core and Builtins 1790 1791Updates the error message for abstract class. 1792 1793.. 1794 1795.. bpo: 47091 1796.. date: 2022-03-22-13-12-27 1797.. nonce: tJcy-P 1798.. section: Core and Builtins 1799 1800Improve performance of repetition of :class:`list` and :class:`tuple` by 1801using ``memcpy`` to copy data and performing the reference increments in one 1802step. 1803 1804.. 1805 1806.. bpo: 46142 1807.. date: 2022-01-02-14-53-59 1808.. nonce: WayjgT 1809.. section: Core and Builtins 1810 1811Make ``--help`` output shorter by moving some info to the new ``--help-env`` 1812and ``--help-xoptions`` command-line options. Also add ``--help-all`` option 1813to print complete usage. 1814 1815.. 1816 1817.. bpo: 42316 1818.. date: 2020-11-15-02-08-43 1819.. nonce: LqdkWK 1820.. section: Core and Builtins 1821 1822Document some places where an assignment expression needs parentheses. 1823 1824.. 1825 1826.. date: 2022-10-23-18-30-39 1827.. gh-issue: 89237 1828.. nonce: kBui30 1829.. section: Library 1830 1831Fix hang on Windows in ``subprocess.wait_closed()`` in :mod:`asyncio` with 1832:class:`~asyncio.ProactorEventLoop`. Patch by Kumar Aditya. 1833 1834.. 1835 1836.. date: 2022-10-19-09-29-12 1837.. gh-issue: 97928 1838.. nonce: xj3im7 1839.. section: Library 1840 1841:meth:`tkinter.Text.count` raises now an exception for options starting with 1842"-" instead of silently ignoring them. 1843 1844.. 1845 1846.. date: 2022-10-18-15-41-37 1847.. gh-issue: 98393 1848.. nonce: vhPu4L 1849.. section: Library 1850 1851The :mod:`os` module no longer accepts bytes-like paths, like 1852:class:`bytearray` and :class:`memoryview` types: only the exact 1853:class:`bytes` type is accepted for bytes strings. Patch by Victor Stinner. 1854 1855.. 1856 1857.. date: 2022-10-17-12-49-02 1858.. gh-issue: 98363 1859.. nonce: aFmSP- 1860.. section: Library 1861 1862Added itertools.batched() to batch data into lists of a given length with 1863the last list possibly being shorter than the others. 1864 1865.. 1866 1867.. date: 2022-10-16-15-31-50 1868.. gh-issue: 98331 1869.. nonce: Y5kPOX 1870.. section: Library 1871 1872Update the bundled copies of pip and setuptools to versions 22.3 and 65.5.0 1873respectively. 1874 1875.. 1876 1877.. date: 2022-10-16-06-18-59 1878.. gh-issue: 98307 1879.. nonce: b2_CDu 1880.. section: Library 1881 1882A :meth:`~logging.handlers.SysLogHandler.createSocket` method was added to 1883:class:`~logging.handlers.SysLogHandler`. 1884 1885.. 1886 1887.. date: 2022-10-14-19-57-37 1888.. gh-issue: 96035 1889.. nonce: 0xcX-p 1890.. section: Library 1891 1892Fix bug in :func:`urllib.parse.urlparse` that causes certain port numbers 1893containing whitespace, underscores, plus and minus signs, or non-ASCII 1894digits to be incorrectly accepted. 1895 1896.. 1897 1898.. date: 2022-10-14-12-29-05 1899.. gh-issue: 98257 1900.. nonce: aMSMs2 1901.. section: Library 1902 1903Make :func:`sys.setprofile` and :func:`sys.settrace` functions reentrant. 1904They can no long fail with: ``RuntimeError("Cannot install a trace function 1905while another trace function is being installed")``. Patch by Victor 1906Stinner. 1907 1908.. 1909 1910.. date: 2022-10-14-11-46-31 1911.. gh-issue: 98251 1912.. nonce: Uxc9al 1913.. section: Library 1914 1915Allow :mod:`venv` to pass along :envvar:`!PYTHON*` variables to ``ensurepip`` 1916and ``pip`` when they do not impact path resolution 1917 1918.. 1919 1920.. date: 2022-10-12-11-20-54 1921.. gh-issue: 94597 1922.. nonce: GYJZlb 1923.. section: Library 1924 1925Deprecated :meth:`asyncio.AbstractEventLoopPolicy.get_child_watcher` and 1926:meth:`asyncio.AbstractEventLoopPolicy.set_child_watcher` methods to be 1927removed in Python 3.14. Patch by Kumar Aditya. 1928 1929.. 1930 1931.. date: 2022-10-12-10-00-40 1932.. gh-issue: 98178 1933.. nonce: hspH51 1934.. section: Library 1935 1936On macOS, fix a crash in :func:`syslog.syslog` in multi-threaded 1937applications. On macOS, the libc ``syslog()`` function is not thread-safe, 1938so :func:`syslog.syslog` no longer releases the GIL to call it. Patch by 1939Victor Stinner. 1940 1941.. 1942 1943.. date: 2022-10-10-09-52-21 1944.. gh-issue: 44098 1945.. nonce: okcqJt 1946.. section: Library 1947 1948Release the GIL when creating :class:`mmap.mmap` objects on Unix. 1949 1950.. 1951 1952.. date: 2022-10-09-12-12-38 1953.. gh-issue: 87730 1954.. nonce: ClgP3f 1955.. section: Library 1956 1957Wrap network errors consistently in urllib FTP support, so the test suite 1958doesn't fail when a network is available but the public internet is not 1959reachable. 1960 1961.. 1962 1963.. date: 2022-10-08-06-59-46 1964.. gh-issue: 94597 1965.. nonce: TsS0oT 1966.. section: Library 1967 1968The child watcher classes :class:`~asyncio.MultiLoopChildWatcher`, 1969:class:`~asyncio.FastChildWatcher` and :class:`~asyncio.SafeChildWatcher` 1970are deprecated and will be removed in Python 3.14. Patch by Kumar Aditya. 1971 1972.. 1973 1974.. date: 2022-10-07-09-52-37 1975.. gh-issue: 98023 1976.. nonce: aliEcl 1977.. section: Library 1978 1979Change default child watcher to :class:`~asyncio.PidfdChildWatcher` on Linux 1980systems which supports it. Patch by Kumar Aditya. 1981 1982.. 1983 1984.. date: 2022-10-06-23-42-00 1985.. gh-issue: 90985 1986.. nonce: s280JY 1987.. section: Library 1988 1989Earlier in 3.11 we deprecated ``asyncio.Task.cancel("message")``. We 1990realized we were too harsh, and have undeprecated it. 1991 1992.. 1993 1994.. date: 2022-10-06-17-59-22 1995.. gh-issue: 65961 1996.. nonce: SXlQnI 1997.. section: Library 1998 1999Do not rely solely on ``__cached__`` on modules; code will also support 2000``__spec__.cached``. 2001 2002.. 2003 2004.. date: 2022-10-05-20-52-17 2005.. gh-issue: 97646 2006.. nonce: Q4fVww 2007.. section: Library 2008 2009Replace deprecated ``application/javascript`` with ``text/javascript`` in 2010:mod:`mimetypes`. See :rfc:`9239`. Patch by Noam Cohen. 2011 2012.. 2013 2014.. date: 2022-10-05-16-10-24 2015.. gh-issue: 97930 2016.. nonce: NPSrzE 2017.. section: Library 2018 2019Apply changes from importlib_resources 5.8 and 5.9: ``Traversable.joinpath`` 2020provides a concrete implementation. ``as_file`` now supports directories of 2021resources. 2022 2023.. 2024 2025.. date: 2022-10-05-11-40-02 2026.. gh-issue: 97850 2027.. nonce: NzdREm 2028.. section: Library 2029 2030Remove deprecated :func:`!importlib.util.set_loader` and 2031:func:`!importlib.util.module_for_loader` from :mod:`importlib.util`. 2032 2033.. 2034 2035.. date: 2022-10-04-21-21-41 2036.. gh-issue: 97837 2037.. nonce: 19q-eg 2038.. section: Library 2039 2040Change deprecate warning message in :mod:`unittest` from 2041 2042``It is deprecated to return a value!=None`` 2043 2044to 2045 2046``It is deprecated to return a value that is not None from a test case`` 2047 2048.. 2049 2050.. date: 2022-10-04-07-55-19 2051.. gh-issue: 97825 2052.. nonce: mNdv1l 2053.. section: Library 2054 2055Fixes :exc:`AttributeError` when :meth:`subprocess.check_output` is used 2056with argument ``input=None`` and either of the arguments *encoding* or 2057*errors* are used. 2058 2059.. 2060 2061.. date: 2022-10-04-00-43-43 2062.. gh-issue: 97008 2063.. nonce: 3rjtt6 2064.. section: Library 2065 2066:exc:`NameError` and :exc:`AttributeError` spelling suggestions provided 2067since :gh:`82711` are now also emitted by the pure Python :mod:`traceback` 2068module. Tests for those suggestions now exercise both implementations to 2069ensure they are equivalent. Patch by Carl Friedrich Bolz-Tereick and Łukasz 2070Langa. 2071 2072.. 2073 2074.. date: 2022-10-03-14-42-13 2075.. gh-issue: 97799 2076.. nonce: Y1iJvf 2077.. section: Library 2078 2079:mod:`dataclass` now uses :func:`inspect.get_annotations` to examine the 2080annotations on class objects. 2081 2082.. 2083 2084.. date: 2022-10-03-13-25-19 2085.. gh-issue: 97781 2086.. nonce: gCLLef 2087.. section: Library 2088 2089Removed deprecated interfaces in ``importlib.metadata`` (entry points 2090accessed as dictionary, implicit dictionary construction of sequence of 2091``EntryPoint`` objects, mutablility of ``EntryPoints`` result, access of 2092entry point by index). ``entry_points`` now has a simpler, more 2093straightforward API (returning ``EntryPoints``). 2094 2095.. 2096 2097.. date: 2022-09-30-15-56-20 2098.. gh-issue: 96827 2099.. nonce: lzy1iw 2100.. section: Library 2101 2102Avoid spurious tracebacks from :mod:`asyncio` when default executor cleanup 2103is delayed until after the event loop is closed (e.g. as the result of a 2104keyboard interrupt). 2105 2106.. 2107 2108.. date: 2022-09-30-09-22-37 2109.. gh-issue: 95534 2110.. nonce: ndEfPj 2111.. section: Library 2112 2113:meth:`gzip.GzipFile.read` reads 10% faster. 2114 2115.. 2116 2117.. date: 2022-09-29-23-22-24 2118.. gh-issue: 97592 2119.. nonce: tpJg_J 2120.. section: Library 2121 2122Avoid a crash in the C version of 2123:meth:`asyncio.Future.remove_done_callback` when an evil argument is passed. 2124 2125.. 2126 2127.. date: 2022-09-29-08-15-55 2128.. gh-issue: 97639 2129.. nonce: JSjWYW 2130.. section: Library 2131 2132Remove ``tokenize.NL`` check from :mod:`tabnanny`. 2133 2134.. 2135 2136.. date: 2022-09-25-23-24-52 2137.. gh-issue: 97545 2138.. nonce: HZLSNt 2139.. section: Library 2140 2141Make Semaphore run faster. 2142 2143.. 2144 2145.. date: 2022-09-25-20-42-33 2146.. gh-issue: 73588 2147.. nonce: uVtjEA 2148.. section: Library 2149 2150Fix generation of the default name of :class:`tkinter.Checkbutton`. 2151Previously, checkbuttons in different parent widgets could have the same 2152short name and share the same state if arguments "name" and "variable" are 2153not specified. Now they are globally unique. 2154 2155.. 2156 2157.. date: 2022-09-24-18-56-23 2158.. gh-issue: 96865 2159.. nonce: o9WUkW 2160.. section: Library 2161 2162fix Flag to use boundary CONFORM 2163 2164This restores previous Flag behavior of allowing flags with non-sequential 2165values to be combined; e.g. 2166 2167class Skip(Flag): TWO = 2 EIGHT = 8 2168 2169Skip.TWO | Skip.EIGHT -> <Skip.TWO|EIGHT: 10> 2170 2171.. 2172 2173.. date: 2022-09-22-14-35-02 2174.. gh-issue: 97005 2175.. nonce: yf21Q7 2176.. section: Library 2177 2178Update bundled libexpat to 2.4.9 2179 2180.. 2181 2182.. date: 2022-09-22-11-50-29 2183.. gh-issue: 85760 2184.. nonce: DETTPd 2185.. section: Library 2186 2187Fix race condition in :mod:`asyncio` where 2188:meth:`~asyncio.SubprocessProtocol.process_exited` called before the 2189:meth:`~asyncio.SubprocessProtocol.pipe_data_received` leading to 2190inconsistent output. Patch by Kumar Aditya. 2191 2192.. 2193 2194.. date: 2022-09-18-04-51-30 2195.. gh-issue: 96704 2196.. nonce: DmamRX 2197.. section: Library 2198 2199Pass the correct ``contextvars.Context`` when a ``asyncio`` exception 2200handler is called on behalf of a task or callback handle. This adds a new 2201``Task`` method, ``get_context``, and also a new ``Handle`` method with the 2202same name. If this method is not found on a task object (perhaps because it 2203is a third-party library that does not yet provide this method), the context 2204prevailing at the time the exception handler is called is used. 2205 2206.. 2207 2208.. date: 2022-09-17-13-15-10 2209.. gh-issue: 96819 2210.. nonce: 6RfqM7 2211.. section: Library 2212 2213Fixed check in :mod:`multiprocessing.resource_tracker` that guarantees that 2214the length of a write to a pipe is not greater than ``PIPE_BUF``. 2215 2216.. 2217 2218.. date: 2022-09-16-07-53-29 2219.. gh-issue: 95865 2220.. nonce: oHjX0A 2221.. section: Library 2222 2223Reduce :func:`urllib.parse.quote_from_bytes` memory use on large values. 2224 2225Contributed by Dennis Sweeney. 2226 2227.. 2228 2229.. date: 2022-09-15-00-37-33 2230.. gh-issue: 96741 2231.. nonce: 4b6czN 2232.. section: Library 2233 2234Corrected type annotation for dataclass attribute 2235``pstats.FunctionProfile.ncalls`` to be ``str``. 2236 2237.. 2238 2239.. date: 2022-09-13-15-12-31 2240.. gh-issue: 96734 2241.. nonce: G08vjz 2242.. section: Library 2243 2244Update :mod:`unicodedata` database to Unicode 15.0.0. 2245 2246.. 2247 2248.. date: 2022-09-10-16-46-16 2249.. gh-issue: 96735 2250.. nonce: 0YzJuG 2251.. section: Library 2252 2253Fix undefined behaviour in :func:`struct.unpack`. 2254 2255.. 2256 2257.. date: 2022-09-08-20-12-48 2258.. gh-issue: 46412 2259.. nonce: r_cfTh 2260.. section: Library 2261 2262Improve performance of ``bool(db)`` for large ndb/gdb databases. Previously 2263this would call ``len(db)`` which would iterate over all keys -- the answer 2264(empty or not) is known after the first key. 2265 2266.. 2267 2268.. date: 2022-09-07-22-49-37 2269.. gh-issue: 96652 2270.. nonce: YqOKxI 2271.. section: Library 2272 2273Fix the faulthandler implementation of ``faulthandler.register(signal, 2274chain=True)`` if the ``sigaction()`` function is not available: don't call 2275the previous signal handler if it's NULL. Patch by Victor Stinner. 2276 2277.. 2278 2279.. date: 2022-09-04-12-32-52 2280.. gh-issue: 68163 2281.. nonce: h6TJCc 2282.. section: Library 2283 2284Correct conversion of :class:`numbers.Rational`'s to :class:`float`. 2285 2286.. 2287 2288.. date: 2022-09-03-18-39-05 2289.. gh-issue: 96538 2290.. nonce: W156-D 2291.. section: Library 2292 2293Speed up ``bisect.bisect()`` functions by taking advantage of 2294type-stability. 2295 2296.. 2297 2298.. date: 2022-09-01-13-54-38 2299.. gh-issue: 96465 2300.. nonce: 0IJmrH 2301.. section: Library 2302 2303Fraction hashes are now cached. 2304 2305.. 2306 2307.. date: 2022-08-31-11-10-21 2308.. gh-issue: 96079 2309.. nonce: uqrXdJ 2310.. section: Library 2311 2312In :mod:`typing`, fix missing field ``name`` and incorrect ``__module__`` in 2313_AnnotatedAlias. 2314 2315.. 2316 2317.. date: 2022-08-30-12-32-00 2318.. gh-issue: 96415 2319.. nonce: 6W7ORH 2320.. section: Library 2321 2322Remove ``types._cell_factory`` from module namespace. 2323 2324.. 2325 2326.. date: 2022-08-30-11-46-36 2327.. gh-issue: 95987 2328.. nonce: CV7_u4 2329.. section: Library 2330 2331Fix ``repr`` of ``Any`` subclasses. 2332 2333.. 2334 2335.. date: 2022-08-29-16-54-36 2336.. gh-issue: 96388 2337.. nonce: dCpJcu 2338.. section: Library 2339 2340Work around missing socket functions in :class:`~socket.socket`'s 2341``__repr__``. 2342 2343.. 2344 2345.. date: 2022-08-29-15-28-39 2346.. gh-issue: 96385 2347.. nonce: uLRTsf 2348.. section: Library 2349 2350Fix ``TypeVarTuple.__typing_prepare_subst__``. ``TypeError`` was not raised 2351when using more than one ``TypeVarTuple``, like ``[*T, *V]`` in type alias 2352substitutions. 2353 2354.. 2355 2356.. date: 2022-08-29-12-49-30 2357.. gh-issue: 96142 2358.. nonce: PdCMez 2359.. section: Library 2360 2361Add ``match_args``, ``kw_only``, ``slots``, and ``weakref_slot`` to 2362``_DataclassParams``. 2363 2364.. 2365 2366.. date: 2022-08-29-12-35-28 2367.. gh-issue: 96073 2368.. nonce: WaGstf 2369.. section: Library 2370 2371In :mod:`inspect`, fix overeager replacement of "``typing.``" in formatting 2372annotations. 2373 2374.. 2375 2376.. date: 2022-08-29-07-04-03 2377.. gh-issue: 89258 2378.. nonce: ri7ncj 2379.. section: Library 2380 2381Added a :meth:`~logging.Logger.getChildren` method to 2382:class:`logging.Logger`, to get the immediate child loggers of a logger. 2383 2384.. 2385 2386.. date: 2022-08-27-23-16-09 2387.. gh-issue: 96346 2388.. nonce: jJX14I 2389.. section: Library 2390 2391Use double caching for compiled RE patterns. 2392 2393.. 2394 2395.. date: 2022-08-27-21-26-52 2396.. gh-issue: 96349 2397.. nonce: XyYLlO 2398.. section: Library 2399 2400Fixed a minor performance regression in :func:`threading.Event.__init__` 2401 2402.. 2403 2404.. date: 2022-08-27-14-38-49 2405.. gh-issue: 90467 2406.. nonce: VOOB0p 2407.. section: Library 2408 2409Fix :class:`asyncio.streams.StreamReaderProtocol` to keep a strong reference 2410to the created task, so that it's not garbage collected 2411 2412.. 2413 2414.. date: 2022-08-23-13-30-30 2415.. gh-issue: 96172 2416.. nonce: 7WTHer 2417.. section: Library 2418 2419Fix a bug in ``unicodedata``: ``east_asian_width`` used to return the wrong 2420value for unassigned characters; and for yet unassigned, but reserved 2421characters. 2422 2423.. 2424 2425.. date: 2022-08-22-18-42-17 2426.. gh-issue: 96159 2427.. nonce: 3bFU39 2428.. section: Library 2429 2430Fix a performance regression in logging TimedRotatingFileHandler. Only check 2431for special files when the rollover time has passed. 2432 2433.. 2434 2435.. date: 2022-08-22-13-54-20 2436.. gh-issue: 96175 2437.. nonce: bH7zGU 2438.. section: Library 2439 2440Fix unused ``localName`` parameter in the ``Attr`` class in 2441:mod:`xml.dom.minidom`. 2442 2443.. 2444 2445.. date: 2022-08-20-12-56-15 2446.. gh-issue: 96145 2447.. nonce: 8ah3pE 2448.. section: Library 2449 2450Add AttrDict to JSON module for use with object_hook. 2451 2452.. 2453 2454.. date: 2022-08-20-10-31-01 2455.. gh-issue: 96052 2456.. nonce: a6FhaD 2457.. section: Library 2458 2459Fix handling compiler warnings (SyntaxWarning and DeprecationWarning) in 2460:func:`codeop.compile_command` when checking for incomplete input. 2461Previously it emitted warnings and raised a SyntaxError. Now it always 2462returns ``None`` for incomplete input without emitting any warnings. 2463 2464.. 2465 2466.. date: 2022-08-19-18-21-01 2467.. gh-issue: 96125 2468.. nonce: ODcF1Y 2469.. section: Library 2470 2471Fix incorrect condition that causes ``sys.thread_info.name`` to be wrong on 2472pthread platforms. 2473 2474.. 2475 2476.. date: 2022-08-19-10-19-32 2477.. gh-issue: 96019 2478.. nonce: b7uAVP 2479.. section: Library 2480 2481Fix a bug in the ``makeunicodedata.py`` script leading to about 13 KiB of 2482space saving in the ``unicodedata`` module, specifically the character 2483decomposition data. 2484 2485.. 2486 2487.. date: 2022-08-18-14-53-53 2488.. gh-issue: 95463 2489.. nonce: GpP05c 2490.. section: Library 2491 2492Remove an incompatible change from :issue:`28080` that caused a regression 2493that ignored the utf8 in ``ZipInfo.flag_bits``. Patch by Pablo Galindo. 2494 2495.. 2496 2497.. date: 2022-08-14-18-59-54 2498.. gh-issue: 69142 2499.. nonce: 6is5Pq 2500.. section: Library 2501 2502Add ``%:z`` strftime format code (generates tzoffset with colons as 2503separator), see :ref:`strftime-strptime-behavior`. 2504 2505.. 2506 2507.. date: 2022-08-11-18-52-17 2508.. gh-issue: 95899 2509.. nonce: _Bi4uG 2510.. section: Library 2511 2512Fix :class:`asyncio.Runner` to call :func:`asyncio.set_event_loop` only once 2513to avoid calling :meth:`~asyncio.AbstractChildWatcher.attach_loop` multiple 2514times on child watchers. Patch by Kumar Aditya. 2515 2516.. 2517 2518.. date: 2022-08-11-18-22-29 2519.. gh-issue: 95736 2520.. nonce: LzRZXe 2521.. section: Library 2522 2523Fix :class:`unittest.IsolatedAsyncioTestCase` to set event loop before 2524calling setup functions. Patch by Kumar Aditya. 2525 2526.. 2527 2528.. date: 2022-08-11-03-16-48 2529.. gh-issue: 95865 2530.. nonce: 0IOkFP 2531.. section: Library 2532 2533Speed up :func:`urllib.parse.quote_from_bytes` by replacing a list 2534comprehension with ``map()``. 2535 2536.. 2537 2538.. date: 2022-08-10-17-34-07 2539.. gh-issue: 95861 2540.. nonce: qv-T5s 2541.. section: Library 2542 2543Add support for computing Spearman's correlation coefficient to the existing 2544statistics.correlation() function. 2545 2546.. 2547 2548.. date: 2022-08-10-11-54-04 2549.. gh-issue: 95804 2550.. nonce: i5FCFK 2551.. section: Library 2552 2553Fix ``logging`` shutdown handler so it respects 2554``MemoryHandler.flushOnClose``. 2555 2556.. 2557 2558.. date: 2022-08-08-01-42-11 2559.. gh-issue: 95704 2560.. nonce: MOPFfX 2561.. section: Library 2562 2563When a task catches :exc:`asyncio.CancelledError` and raises some other 2564error, the other error should generally not silently be suppressed. 2565 2566.. 2567 2568.. date: 2022-08-07-14-56-23 2569.. gh-issue: 95149 2570.. nonce: U0c6Ib 2571.. section: Library 2572 2573The :class:`HTTPStatus <http.HTTPStatus>` enum offers a couple of properties 2574to indicate the HTTP status category e.g. ``HTTPStatus.OK.is_success``. 2575 2576.. 2577 2578.. date: 2022-08-03-21-01-17 2579.. gh-issue: 95609 2580.. nonce: xxyjyX 2581.. section: Library 2582 2583Update bundled pip to 22.2.2. 2584 2585.. 2586 2587.. date: 2022-08-03-16-52-32 2588.. gh-issue: 95289 2589.. nonce: FMnHlV 2590.. section: Library 2591 2592Fix :class:`asyncio.TaskGroup` to propagate exception when 2593:exc:`asyncio.CancelledError` was replaced with another exception by a 2594context manager. Patch by Kumar Aditya and Guido van Rossum. 2595 2596.. 2597 2598.. date: 2022-07-29-20-58-37 2599.. gh-issue: 94909 2600.. nonce: YjMusj 2601.. section: Library 2602 2603Fix incorrect joining of relative Windows paths with drives in 2604:class:`pathlib.PurePath` initializer. 2605 2606.. 2607 2608.. date: 2022-07-28-17-14-38 2609.. gh-issue: 95385 2610.. nonce: 6YlsDI 2611.. section: Library 2612 2613Faster ``json.dumps()`` when sorting of keys is not requested (default). 2614 2615.. 2616 2617.. date: 2022-07-27-19-47-51 2618.. gh-issue: 83901 2619.. nonce: OSw06c 2620.. section: Library 2621 2622Improve :meth:`Signature.bind <inspect.Signature.bind>` error message for 2623missing keyword-only arguments. 2624 2625.. 2626 2627.. date: 2022-07-27-19-43-07 2628.. gh-issue: 95339 2629.. nonce: NuVQ68 2630.. section: Library 2631 2632Update bundled pip to 22.2.1. 2633 2634.. 2635 2636.. date: 2022-07-27-11-35-45 2637.. gh-issue: 95045 2638.. nonce: iysT-Q 2639.. section: Library 2640 2641Fix GC crash when deallocating ``_lsprof.Profiler`` by untracking it before 2642calling any callbacks. Patch by Kumar Aditya. 2643 2644.. 2645 2646.. date: 2022-07-25-15-45-06 2647.. gh-issue: 95231 2648.. nonce: i807-g 2649.. section: Library 2650 2651Fail gracefully if :const:`~errno.EPERM` or :const:`~errno.ENOSYS` is raised 2652when loading :mod:`!crypt` methods. This may happen when trying to load 2653``MD5`` on a Linux kernel with :abbr:`FIPS (Federal Information Processing 2654Standard)` enabled. 2655 2656.. 2657 2658.. date: 2022-07-24-18-00-42 2659.. gh-issue: 95097 2660.. nonce: lu5qNf 2661.. section: Library 2662 2663Fix :func:`asyncio.run` for :class:`asyncio.Task` implementations without 2664:meth:`~asyncio.Task.uncancel` method. Patch by Kumar Aditya. 2665 2666.. 2667 2668.. date: 2022-07-24-12-59-02 2669.. gh-issue: 95087 2670.. nonce: VvqXkN 2671.. section: Library 2672 2673Fix IndexError in parsing invalid date in the :mod:`email` module. 2674 2675.. 2676 2677.. date: 2022-07-24-12-00-06 2678.. gh-issue: 95199 2679.. nonce: -5A64k 2680.. section: Library 2681 2682Upgrade bundled setuptools to 63.2.0. 2683 2684.. 2685 2686.. date: 2022-07-24-09-15-35 2687.. gh-issue: 95194 2688.. nonce: ERVmqG 2689.. section: Library 2690 2691Upgrade bundled pip to 22.2. 2692 2693.. 2694 2695.. date: 2022-07-23-10-50-05 2696.. gh-issue: 93899 2697.. nonce: VT34A5 2698.. section: Library 2699 2700Fix check for existence of :const:`os.EFD_CLOEXEC`, :const:`os.EFD_NONBLOCK` 2701and :const:`os.EFD_SEMAPHORE` flags on older kernel versions where these 2702flags are not present. Patch by Kumar Aditya. 2703 2704.. 2705 2706.. date: 2022-07-23-10-42-05 2707.. gh-issue: 95166 2708.. nonce: xw6p3C 2709.. section: Library 2710 2711Fix :meth:`concurrent.futures.Executor.map` to cancel the currently waiting 2712on future on an error - e.g. TimeoutError or KeyboardInterrupt. 2713 2714.. 2715 2716.. date: 2022-07-22-21-18-17 2717.. gh-issue: 95132 2718.. nonce: n9anlw 2719.. section: Library 2720 2721Fix a :mod:`sqlite3` regression where ``*args`` and ``**kwds`` were 2722incorrectly relayed from :py:func:`~sqlite3.connect` to the 2723:class:`~sqlite3.Connection` factory. The regression was introduced in 27243.11a1 with PR 24421 (:gh:`85128`). Patch by Erlend E. Aasland. 2725 2726.. 2727 2728.. date: 2022-07-22-17-19-57 2729.. gh-issue: 93157 2730.. nonce: RXByAk 2731.. section: Library 2732 2733Fix :mod:`fileinput` module didn't support ``errors`` option when 2734``inplace`` is true. 2735 2736.. 2737 2738.. date: 2022-07-22-09-09-08 2739.. gh-issue: 91212 2740.. nonce: 53O8Ab 2741.. section: Library 2742 2743Fixed flickering of the turtle window when the tracer is turned off. Patch 2744by Shin-myoung-serp. 2745 2746.. 2747 2748.. date: 2022-07-22-00-58-49 2749.. gh-issue: 95077 2750.. nonce: 4Z6CNC 2751.. section: Library 2752 2753Add deprecation warning for enum ``member.member`` access (e.g. 2754``Color.RED.BLUE``). Remove ``EnumMeta.__getattr__``. 2755 2756.. 2757 2758.. date: 2022-07-21-22-59-22 2759.. gh-issue: 95109 2760.. nonce: usxA9r 2761.. section: Library 2762 2763Ensure that timeouts scheduled with :class:`asyncio.Timeout` that have 2764already expired are delivered promptly. 2765 2766.. 2767 2768.. date: 2022-07-21-19-55-49 2769.. gh-issue: 95105 2770.. nonce: BIX2Km 2771.. section: Library 2772 2773:meth:`wsgiref.types.InputStream.__iter__` should return 2774``Iterator[bytes]``, not ``Iterable[bytes]``. Patch by Shantanu Jain. 2775 2776.. 2777 2778.. date: 2022-07-20-22-49-48 2779.. gh-issue: 95066 2780.. nonce: TuCu0E 2781.. section: Library 2782 2783Replaced assert with exception in :func:`ast.parse`, when 2784``feature_version`` has an invalid major version. Patch by Shantanu Jain. 2785 2786.. 2787 2788.. date: 2022-07-20-00-23-58 2789.. gh-issue: 77617 2790.. nonce: XGaqSQ 2791.. section: Library 2792 2793Add :mod:`sqlite3` :ref:`command-line interface <sqlite3-cli>`. Patch by 2794Erlend Aasland. 2795 2796.. 2797 2798.. date: 2022-07-19-15-37-11 2799.. gh-issue: 95005 2800.. nonce: iRmZ74 2801.. section: Library 2802 2803Replace :c:expr:`_PyAccu` with :c:expr:`_PyUnicodeWriter` in JSON encoder 2804and StringIO and remove the :c:expr:`_PyAccu` implementation. 2805 2806.. 2807 2808.. date: 2022-07-17-22-31-32 2809.. gh-issue: 90085 2810.. nonce: c4FWcS 2811.. section: Library 2812 2813Remove ``-c/--clock`` and ``-t/--time`` CLI options of :mod:`timeit`. The 2814options had been deprecated since Python 3.3 and the functionality was 2815removed in Python 3.7. Patch by Shantanu Jain. 2816 2817.. 2818 2819.. date: 2022-07-15-08-13-51 2820.. gh-issue: 94857 2821.. nonce: 9_KvZJ 2822.. section: Library 2823 2824Fix refleak in ``_io.TextIOWrapper.reconfigure``. Patch by Kumar Aditya. 2825 2826.. 2827 2828.. date: 2022-07-14-00-43-52 2829.. gh-issue: 94821 2830.. nonce: e17ghU 2831.. section: Library 2832 2833Fix binding of unix socket to empty address on Linux to use an available 2834address from the abstract namespace, instead of "\0". 2835 2836.. 2837 2838.. date: 2022-07-11-10-41-48 2839.. gh-issue: 94736 2840.. nonce: EbsgeK 2841.. section: Library 2842 2843Fix crash when deallocating an instance of a subclass of 2844``_multiprocessing.SemLock``. Patch by Kumar Aditya. 2845 2846.. 2847 2848.. date: 2022-07-09-15-17-02 2849.. gh-issue: 81620 2850.. nonce: L0O_bV 2851.. section: Library 2852 2853Add random.binomialvariate(). 2854 2855.. 2856 2857.. date: 2022-07-09-08-55-04 2858.. gh-issue: 74116 2859.. nonce: 0XwYC1 2860.. section: Library 2861 2862Allow :meth:`asyncio.StreamWriter.drain` to be awaited concurrently by 2863multiple tasks. Patch by Kumar Aditya. 2864 2865.. 2866 2867.. date: 2022-07-08-17-49-12 2868.. gh-issue: 87822 2869.. nonce: F9dzkf 2870.. section: Library 2871 2872When called with ``capture_locals=True``, the :mod:`traceback` module 2873functions swallow exceptions raised from calls to ``repr()`` on local 2874variables of frames. This is in order to prioritize the original exception 2875over rendering errors. An indication of the failure is printed in place of 2876the missing value. (Patch by Simon-Martin Schroeder). 2877 2878.. 2879 2880.. date: 2022-07-08-08-39-35 2881.. gh-issue: 88050 2882.. nonce: 0aOC_m 2883.. section: Library 2884 2885Fix :mod:`asyncio` subprocess transport to kill process cleanly when process 2886is blocked and avoid ``RuntimeError`` when loop is closed. Patch by Kumar 2887Aditya. 2888 2889.. 2890 2891.. date: 2022-07-07-15-46-55 2892.. gh-issue: 94637 2893.. nonce: IYEiUM 2894.. section: Library 2895 2896:meth:`SSLContext.set_default_verify_paths` now releases the GIL around 2897``SSL_CTX_set_default_verify_paths`` call. The function call performs I/O 2898and CPU intensive work. 2899 2900.. 2901 2902.. date: 2022-07-06-22-41-51 2903.. gh-issue: 94309 2904.. nonce: _XswsX 2905.. section: Library 2906 2907Deprecate aliases :class:`typing.Hashable` and :class:`typing.Sized` 2908 2909.. 2910 2911.. date: 2022-07-06-21-24-03 2912.. gh-issue: 92546 2913.. nonce: s5Upkh 2914.. section: Library 2915 2916An undocumented ``python -m pprint`` benchmark is moved into ``pprint`` 2917suite of pyperformance. Patch by Oleg Iarygin. 2918 2919.. 2920 2921.. date: 2022-07-06-16-01-08 2922.. gh-issue: 94607 2923.. nonce: Q6RYfz 2924.. section: Library 2925 2926Fix subclassing complex generics with type variables in :mod:`typing`. 2927Previously an error message saying ``Some type variables ... are not listed 2928in Generic[...]`` was shown. :mod:`typing` no longer populates 2929``__parameters__`` with the ``__parameters__`` of a Python class. 2930 2931.. 2932 2933.. date: 2022-07-06-14-57-33 2934.. gh-issue: 94619 2935.. nonce: PRqKVX 2936.. section: Library 2937 2938Remove the long-deprecated ``module_repr()`` from :mod:`importlib`. 2939 2940.. 2941 2942.. date: 2022-07-06-14-45-12 2943.. gh-issue: 93910 2944.. nonce: iZcp67 2945.. section: Library 2946 2947The ability to access the other values of an enum on an enum (e.g. 2948``Color.RED.BLUE``) has been restored in order to fix a performance 2949regression. 2950 2951.. 2952 2953.. date: 2022-07-06-06-02-02 2954.. gh-issue: 93896 2955.. nonce: vIgWGr 2956.. section: Library 2957 2958Fix :func:`asyncio.run` and :class:`unittest.IsolatedAsyncioTestCase` to 2959always the set event loop as it was done in Python 3.10 and earlier. Patch 2960by Kumar Aditya. 2961 2962.. 2963 2964.. date: 2022-07-05-17-22-00 2965.. gh-issue: 94343 2966.. nonce: kf4H5r 2967.. section: Library 2968 2969Allow setting the attributes of ``reprlib.Repr`` during object 2970initialization 2971 2972.. 2973 2974.. date: 2022-07-03-16-41-03 2975.. gh-issue: 94382 2976.. nonce: zuVZeM 2977.. section: Library 2978 2979Port static types of ``_multiprocessing`` module to heap types. Patch by 2980Kumar Aditya. 2981 2982.. 2983 2984.. date: 2022-07-03-16-26-35 2985.. gh-issue: 78724 2986.. nonce: XNiJzf 2987.. section: Library 2988 2989Fix crash in :class:`struct.Struct` when it was not completely initialized 2990by initializing it in :meth:`~object.__new__`. Patch by Kumar Aditya. 2991 2992.. 2993 2994.. date: 2022-07-02-19-46-30 2995.. gh-issue: 94510 2996.. nonce: xOatDC 2997.. section: Library 2998 2999Re-entrant calls to :func:`sys.setprofile` and :func:`sys.settrace` now 3000raise :exc:`RuntimeError`. Patch by Pablo Galindo. 3001 3002.. 3003 3004.. date: 2022-06-29-09-48-37 3005.. gh-issue: 92336 3006.. nonce: otA6c6 3007.. section: Library 3008 3009Fix bug where :meth:`linecache.getline` fails on bad files with 3010:exc:`UnicodeDecodeError` or :exc:`SyntaxError`. It now returns an empty 3011string as per the documentation. 3012 3013.. 3014 3015.. date: 2022-06-29-04-42-56 3016.. gh-issue: 94398 3017.. nonce: YOq_bJ 3018.. section: Library 3019 3020Once a :class:`asyncio.TaskGroup` has started shutting down (i.e., at least 3021one task has failed and the task group has started cancelling the remaining 3022tasks), it should not be possible to add new tasks to the task group. 3023 3024.. 3025 3026.. date: 2022-06-28-14-41-22 3027.. gh-issue: 94383 3028.. nonce: CXnquo 3029.. section: Library 3030 3031:mod:`xml.etree`: Remove the ``ElementTree.Element.copy()`` method of the 3032pure Python implementation, deprecated in Python 3.10, use the 3033:func:`copy.copy` function instead. The C implementation of :mod:`xml.etree` 3034has no ``copy()`` method, only a ``__copy__()`` method. Patch by Victor 3035Stinner. 3036 3037.. 3038 3039.. date: 2022-06-28-14-29-21 3040.. gh-issue: 94379 3041.. nonce: RrgKfh 3042.. section: Library 3043 3044:mod:`zipimport`: Remove ``find_loader()`` and ``find_module()`` methods, 3045deprecated in Python 3.10: use the ``find_spec()`` method instead. See 3046:pep:`451` for the rationale. Patch by Victor Stinner. 3047 3048.. 3049 3050.. date: 2022-06-28-00-24-48 3051.. gh-issue: 94352 3052.. nonce: JY1Ayt 3053.. section: Library 3054 3055:func:`shlex.split`: Passing ``None`` for *s* argument now raises an 3056exception, rather than reading :data:`sys.stdin`. The feature was deprecated 3057in Python 3.9. Patch by Victor Stinner. 3058 3059.. 3060 3061.. date: 2022-06-27-10-33-18 3062.. gh-issue: 94318 3063.. nonce: jR4_QV 3064.. section: Library 3065 3066Strip trailing spaces in :mod:`pydoc` text output. 3067 3068.. 3069 3070.. date: 2022-06-26-10-59-15 3071.. gh-issue: 89988 3072.. nonce: K8rnmt 3073.. section: Library 3074 3075Fix memory leak in :class:`pickle.Pickler` when looking up 3076:attr:`dispatch_table`. Patch by Kumar Aditya. 3077 3078.. 3079 3080.. date: 2022-06-25-23-44-44 3081.. gh-issue: 90016 3082.. nonce: EB409s 3083.. section: Library 3084 3085Deprecate :mod:`sqlite3` :ref:`default adapters and converters 3086<sqlite3-default-converters>`. Patch by Erlend E. Aasland. 3087 3088.. 3089 3090.. date: 2022-06-25-16-27-02 3091.. gh-issue: 94254 3092.. nonce: beP16v 3093.. section: Library 3094 3095Fixed types of :mod:`struct` module to be immutable. Patch by Kumar Aditya. 3096 3097.. 3098 3099.. date: 2022-06-25-13-38-53 3100.. gh-issue: 93259 3101.. nonce: FAGw-2 3102.. section: Library 3103 3104Now raise ``ValueError`` when ``None`` or an empty string are passed to 3105``Distribution.from_name`` (and other callers). 3106 3107.. 3108 3109.. date: 2022-06-25-09-12-23 3110.. gh-issue: 74696 3111.. nonce: fxC9ua 3112.. section: Library 3113 3114:func:`shutil.make_archive` now passes the *root_dir* argument to custom 3115archivers which support it. 3116 3117.. 3118 3119.. date: 2022-06-24-20-00-57 3120.. gh-issue: 94216 3121.. nonce: hxnQPu 3122.. section: Library 3123 3124The :mod:`dis` module now has the opcodes for pseudo instructions (those 3125which are used by the compiler during code generation but then removed or 3126replaced by real opcodes before the final bytecode is emitted). 3127 3128.. 3129 3130.. date: 2022-06-24-19-40-40 3131.. gh-issue: 93096 3132.. nonce: 3RlK2d 3133.. section: Library 3134 3135Removed undocumented ``python -m codecs``. Use ``python -m unittest 3136test.test_codecs.EncodedFileTest`` instead. 3137 3138.. 3139 3140.. date: 2022-06-24-19-23-59 3141.. gh-issue: 94207 3142.. nonce: VhS1eS 3143.. section: Library 3144 3145Made :class:`!_struct.Struct` GC-tracked in order to fix a reference leak in 3146the :mod:`!_struct` module. 3147 3148.. 3149 3150.. date: 2022-06-24-19-16-09 3151.. gh-issue: 93096 3152.. nonce: r1_oIc 3153.. section: Library 3154 3155Removed undocumented ``-t`` argument of ``python -m base64``. Use ``python 3156-m unittest test.test_base64.LegacyBase64TestCase.test_encodebytes`` 3157instead. 3158 3159.. 3160 3161.. date: 2022-06-24-18-20-42 3162.. gh-issue: 94226 3163.. nonce: 8ZL4Fm 3164.. section: Library 3165 3166Remove the :func:`locale.format` function, deprecated in Python 3.7: use 3167:func:`locale.format_string` instead. Patch by Victor Stinner. 3168 3169.. 3170 3171.. date: 2022-06-24-17-11-33 3172.. gh-issue: 94199 3173.. nonce: 7releN 3174.. section: Library 3175 3176Remove the :func:`ssl.match_hostname` function. The 3177:func:`ssl.match_hostname` was deprecated in Python 3.7. OpenSSL performs 3178hostname matching since Python 3.7, Python no longer uses the 3179:func:`ssl.match_hostname` function. Patch by Victor Stinner. 3180 3181.. 3182 3183.. date: 2022-06-24-14-25-26 3184.. gh-issue: 94214 3185.. nonce: 03pXR5 3186.. section: Library 3187 3188Document the ``context`` object used in the ``venv.EnvBuilder`` class, and 3189add the new environment's library path to it. 3190 3191.. 3192 3193.. date: 2022-06-24-10-39-56 3194.. gh-issue: 94199 3195.. nonce: MIuckY 3196.. section: Library 3197 3198Remove the :func:`ssl.wrap_socket` function, deprecated in Python 3.7: 3199instead, create a :class:`ssl.SSLContext` object and call its 3200:class:`ssl.SSLContext.wrap_socket` method. Any package that still uses 3201:func:`ssl.wrap_socket` is broken and insecure. The function neither sends a 3202SNI TLS extension nor validates server hostname. Code is subject to :cwe:`295` 3203Improper Certificate Validation. Patch by Victor Stinner. 3204 3205.. 3206 3207.. date: 2022-06-24-10-29-19 3208.. gh-issue: 94199 3209.. nonce: pfehmz 3210.. section: Library 3211 3212Remove the :func:`ssl.RAND_pseudo_bytes` function, deprecated in Python 3.6: 3213use :func:`os.urandom` or :func:`ssl.RAND_bytes` instead. Patch by Victor 3214Stinner. 3215 3216.. 3217 3218.. date: 2022-06-24-10-18-59 3219.. gh-issue: 94199 3220.. nonce: kYOo8g 3221.. section: Library 3222 3223:mod:`hashlib`: Remove the pure Python implementation of 3224:func:`hashlib.pbkdf2_hmac`, deprecated in Python 3.10. Python 3.10 and 3225newer requires OpenSSL 1.1.1 (:pep:`644`): this OpenSSL version provides a C 3226implementation of :func:`~hashlib.pbkdf2_hmac` which is faster. Patch by 3227Victor Stinner. 3228 3229.. 3230 3231.. date: 2022-06-24-09-41-41 3232.. gh-issue: 94196 3233.. nonce: r2KyfS 3234.. section: Library 3235 3236:mod:`gzip`: Remove the ``filename`` attribute of :class:`gzip.GzipFile`, 3237deprecated since Python 2.6, use the :attr:`~gzip.GzipFile.name` attribute 3238instead. In write mode, the ``filename`` attribute added ``'.gz'`` file 3239extension if it was not present. Patch by Victor Stinner. 3240 3241.. 3242 3243.. date: 2022-06-24-08-49-47 3244.. gh-issue: 94182 3245.. nonce: Wknau0 3246.. section: Library 3247 3248run the :class:`asyncio.PidfdChildWatcher` on the running loop, this allows 3249event loops to run subprocesses when there is no default event loop running 3250on the main thread 3251 3252.. 3253 3254.. date: 2022-06-23-14-35-10 3255.. gh-issue: 94169 3256.. nonce: jeba90 3257.. section: Library 3258 3259Remove ``io.OpenWrapper`` and ``_pyio.OpenWrapper``, deprecated in Python 32603.10: just use :func:`open` instead. The :func:`open` (:func:`io.open`) 3261function is a built-in function. Since Python 3.10, :func:`!_pyio.open` is 3262also a static method. Patch by Victor Stinner. 3263 3264.. 3265 3266.. date: 2022-06-23-13-12-05 3267.. gh-issue: 91742 3268.. nonce: sNytVX 3269.. section: Library 3270 3271Fix :mod:`pdb` crash after jump caused by a null pointer dereference. Patch 3272by Kumar Aditya. 3273 3274.. 3275 3276.. date: 2022-06-22-11-16-11 3277.. gh-issue: 94101 3278.. nonce: V9vDG8 3279.. section: Library 3280 3281Manual instantiation of :class:`ssl.SSLSession` objects is no longer allowed 3282as it lead to misconfigured instances that crashed the interpreter when 3283attributes where accessed on them. 3284 3285.. 3286 3287.. date: 2022-06-21-11-40-31 3288.. gh-issue: 84753 3289.. nonce: FW1pxO 3290.. section: Library 3291 3292:func:`inspect.iscoroutinefunction`, :func:`inspect.isgeneratorfunction`, 3293and :func:`inspect.isasyncgenfunction` now properly return ``True`` for 3294duck-typed function-like objects like instances of 3295:class:`unittest.mock.AsyncMock`. 3296 3297This makes :func:`inspect.iscoroutinefunction` consistent with the behavior 3298of :func:`asyncio.iscoroutinefunction`. Patch by Mehdi ABAAKOUK. 3299 3300.. 3301 3302.. date: 2022-06-20-23-14-43 3303.. gh-issue: 94028 3304.. nonce: UofEcX 3305.. section: Library 3306 3307Fix a regression in the :mod:`sqlite3` where statement objects were not 3308properly cleared and reset after use in cursor iters. The regression was 3309introduced by PR 27884 in Python 3.11a1. Patch by Erlend E. Aasland. 3310 3311.. 3312 3313.. date: 2022-06-18-15-06-54 3314.. gh-issue: 93973 3315.. nonce: 4y6UQT 3316.. section: Library 3317 3318Add keyword argument ``all_errors`` to ``asyncio.create_connection`` so that 3319multiple connection errors can be raised as an ``ExceptionGroup``. 3320 3321.. 3322 3323.. date: 2022-06-17-16-00-55 3324.. gh-issue: 93963 3325.. nonce: 8YYZ-2 3326.. section: Library 3327 3328Officially deprecate from ``importlib.abc`` classes moved to 3329``importlib.resources.abc``. 3330 3331.. 3332 3333.. date: 2022-06-17-12-02-30 3334.. gh-issue: 93858 3335.. nonce: R49ARc 3336.. section: Library 3337 3338Prevent error when activating venv in nested fish instances. 3339 3340.. 3341 3342.. date: 2022-06-16-11-16-53 3343.. gh-issue: 93820 3344.. nonce: 00X0Y5 3345.. section: Library 3346 3347Pickle :class:`enum.Flag` by name. 3348 3349.. 3350 3351.. date: 2022-06-16-09-24-50 3352.. gh-issue: 93847 3353.. nonce: kuv8bN 3354.. section: Library 3355 3356Fix repr of enum of generic aliases. 3357 3358.. 3359 3360.. date: 2022-06-15-21-35-11 3361.. gh-issue: 91404 3362.. nonce: 39TZzW 3363.. section: Library 3364 3365Revert the :mod:`re` memory leak when a match is terminated by a signal or 3366memory allocation failure as the implemented fix caused a major performance 3367regression. 3368 3369.. 3370 3371.. date: 2022-06-15-21-28-16 3372.. gh-issue: 83499 3373.. nonce: u3DQJ- 3374.. section: Library 3375 3376Fix double closing of file description in :mod:`tempfile`. 3377 3378.. 3379 3380.. date: 2022-06-15-21-20-02 3381.. gh-issue: 93820 3382.. nonce: FAMLY8 3383.. section: Library 3384 3385Fixed a regression when :func:`copy.copy`-ing :class:`enum.Flag` with 3386multiple flag members. 3387 3388.. 3389 3390.. date: 2022-06-11-13-32-17 3391.. gh-issue: 79512 3392.. nonce: A1KTDr 3393.. section: Library 3394 3395Fixed names and ``__module__`` value of :mod:`weakref` classes 3396:class:`~weakref.ReferenceType`, :class:`~weakref.ProxyType`, 3397:class:`~weakref.CallableProxyType`. It makes them pickleable. 3398 3399.. 3400 3401.. date: 2022-06-09-17-15-26 3402.. gh-issue: 91389 3403.. nonce: OE4vS5 3404.. section: Library 3405 3406Fix an issue where :mod:`dis` utilities could report missing or incorrect 3407position information in the presence of ``CACHE`` entries. 3408 3409.. 3410 3411.. date: 2022-06-09-14-44-21 3412.. gh-issue: 93626 3413.. nonce: sfghs46 3414.. section: Library 3415 3416Set ``__future__.annotations`` to have a ``None`` mandatoryRelease to 3417indicate that it is currently 'TBD'. 3418 3419.. 3420 3421.. date: 2022-06-09-10-12-55 3422.. gh-issue: 90473 3423.. nonce: 683m_C 3424.. section: Library 3425 3426Emscripten and WASI have no home directory and cannot provide :pep:`370` 3427user site directory. 3428 3429.. 3430 3431.. date: 2022-06-08-20-11-02 3432.. gh-issue: 90494 3433.. nonce: LIZT85 3434.. section: Library 3435 3436:func:`copy.copy` and :func:`copy.deepcopy` now always raise a TypeError if 3437``__reduce__()`` returns a tuple with length 6 instead of silently ignore 3438the 6th item or produce incorrect result. 3439 3440.. 3441 3442.. date: 2022-06-07-14-53-46 3443.. gh-issue: 90549 3444.. nonce: T4FMKY 3445.. section: Library 3446 3447Fix a multiprocessing bug where a global named resource (such as a 3448semaphore) could leak when a child process is spawned (as opposed to 3449forked). 3450 3451.. 3452 3453.. date: 2022-06-06-13-19-43 3454.. gh-issue: 93521 3455.. nonce: _vE8m9 3456.. section: Library 3457 3458Fixed a case where dataclasses would try to add ``__weakref__`` into the 3459``__slots__`` for a dataclass that specified ``weakref_slot=True`` when it 3460was already defined in one of its bases. This resulted in a ``TypeError`` 3461upon the new class being created. 3462 3463.. 3464 3465.. date: 2022-06-06-12-58-27 3466.. gh-issue: 79579 3467.. nonce: e8rB-M 3468.. section: Library 3469 3470:mod:`sqlite3` now correctly detects DML queries with leading comments. 3471Patch by Erlend E. Aasland. 3472 3473.. 3474 3475.. date: 2022-06-05-22-22-42 3476.. gh-issue: 93421 3477.. nonce: 43UO_8 3478.. section: Library 3479 3480Update :data:`sqlite3.Cursor.rowcount` when a DML statement has run to 3481completion. This fixes the row count for SQL queries like ``UPDATE ... 3482RETURNING``. Patch by Erlend E. Aasland. 3483 3484.. 3485 3486.. date: 2022-06-04-00-11-54 3487.. gh-issue: 93475 3488.. nonce: vffFw1 3489.. section: Library 3490 3491Expose ``FICLONE`` and ``FICLONERANGE`` constants in :mod:`fcntl`. Patch by 3492Illia Volochii. 3493 3494.. 3495 3496.. date: 2022-06-03-22-13-28 3497.. gh-issue: 93370 3498.. nonce: tjfu9L 3499.. section: Library 3500 3501Deprecate :data:`sqlite3.version` and :data:`sqlite3.version_info`. 3502 3503.. 3504 3505.. date: 2022-06-02-08-40-58 3506.. gh-issue: 91810 3507.. nonce: Gtk44w 3508.. section: Library 3509 3510Suppress writing an XML declaration in open files in ``ElementTree.write()`` 3511with ``encoding='unicode'`` and ``xml_declaration=None``. 3512 3513.. 3514 3515.. date: 2022-06-01-11-24-13 3516.. gh-issue: 91162 3517.. nonce: NxvU_u 3518.. section: Library 3519 3520Support splitting of unpacked arbitrary-length tuple over ``TypeVar`` and 3521``TypeVarTuple`` parameters. For example: 3522 3523* ``A[T, *Ts][*tuple[int, ...]]`` -> ``A[int, *tuple[int, ...]]`` 3524* ``A[*Ts, T][*tuple[int, ...]]`` -> ``A[*tuple[int, ...], int]`` 3525 3526.. 3527 3528.. date: 2022-05-31-14-58-40 3529.. gh-issue: 93353 3530.. nonce: 9Hvm6o 3531.. section: Library 3532 3533Fix the :func:`importlib.resources.as_file` context manager to remove the 3534temporary file if destroyed late during Python finalization: keep a local 3535reference to the :func:`os.remove` function. Patch by Victor Stinner. 3536 3537.. 3538 3539.. date: 2022-05-30-21-42-50 3540.. gh-issue: 83658 3541.. nonce: 01Ntx0 3542.. section: Library 3543 3544Make :class:`multiprocessing.Pool` raise an exception if 3545``maxtasksperchild`` is not ``None`` or a positive int. 3546 3547.. 3548 3549.. date: 2022-05-28-08-02-55 3550.. gh-issue: 93312 3551.. nonce: HY0Uzj 3552.. section: Library 3553 3554Add :const:`os.PIDFD_NONBLOCK` flag to open a file descriptor for a process 3555with :func:`os.pidfd_open` in non-blocking mode. Patch by Kumar Aditya. 3556 3557.. 3558 3559.. date: 2022-05-27-22-17-11 3560.. gh-issue: 88123 3561.. nonce: mkYl5q 3562.. section: Library 3563 3564Implement ``Enum.__contains__`` that returns ``True`` or ``False`` to replace the 3565deprecated behaviour that would sometimes raise a :exc:`TypeError`. 3566 3567.. 3568 3569.. date: 2022-05-27-13-18-18 3570.. gh-issue: 93297 3571.. nonce: e2zuHz 3572.. section: Library 3573 3574Make asyncio task groups prevent child tasks from being GCed 3575 3576.. 3577 3578.. date: 2022-05-27-10-52-06 3579.. gh-issue: 85308 3580.. nonce: K6r-tJ 3581.. section: Library 3582 3583Changed :class:`argparse.ArgumentParser` to use :term:`filesystem encoding 3584and error handler` instead of default text encoding to read arguments from 3585file (e.g. ``fromfile_prefix_chars`` option). This change affects Windows; 3586argument file should be encoded with UTF-8 instead of ANSI Codepage. 3587 3588.. 3589 3590.. date: 2022-05-26-23-10-55 3591.. gh-issue: 93156 3592.. nonce: 4XfDVN 3593.. section: Library 3594 3595Accessing the :attr:`pathlib.PurePath.parents` sequence of an absolute path 3596using negative index values produced incorrect results. 3597 3598.. 3599 3600.. date: 2022-05-26-09-24-41 3601.. gh-issue: 93162 3602.. nonce: W1VuhU 3603.. section: Library 3604 3605Add the ability for :func:`logging.config.dictConfig` to usefully configure 3606:class:`~logging.handlers.QueueHandler` and 3607:class:`~logging.handlers.QueueListener` as a pair, and add 3608:func:`logging.getHandlerByName` and :func:`logging.getHandlerNames` APIs to 3609allow access to handlers by name. 3610 3611.. 3612 3613.. date: 2022-05-26-08-41-34 3614.. gh-issue: 93243 3615.. nonce: uw6x5z 3616.. section: Library 3617 3618The :mod:`!smtpd` module was removed per the schedule in :pep:`594`. 3619 3620.. 3621 3622.. date: 2022-05-25-22-09-38 3623.. gh-issue: 92886 3624.. nonce: ylwDSc 3625.. section: Library 3626 3627Replace ``assert`` statements with ``raise AssertionError()`` in 3628:class:`~wsgiref.BaseHandler` so that the tested behaviour is maintained 3629running with optimizations ``(-O)``. 3630 3631.. 3632 3633.. date: 2022-05-25-15-57-39 3634.. gh-issue: 90155 3635.. nonce: YMstB5 3636.. section: Library 3637 3638Fix broken :class:`asyncio.Semaphore` when acquire is cancelled. 3639 3640.. 3641 3642.. date: 2022-05-25-02-45-41 3643.. gh-issue: 90817 3644.. nonce: yxANgU 3645.. section: Library 3646 3647The :func:`locale.resetlocale` function is deprecated and will be removed in 3648Python 3.13. Use ``locale.setlocale(locale.LC_ALL, "")`` instead. Patch by 3649Victor Stinner. 3650 3651.. 3652 3653.. date: 2022-05-25-00-21-28 3654.. gh-issue: 91513 3655.. nonce: 9VyCT4 3656.. section: Library 3657 3658Added ``taskName`` attribute to :mod:`logging` module for use with 3659:mod:`asyncio` tasks. 3660 3661.. 3662 3663.. date: 2022-05-24-11-19-04 3664.. gh-issue: 74696 3665.. nonce: -cnf-A 3666.. section: Library 3667 3668:func:`shutil.make_archive` no longer temporarily changes the current 3669working directory during creation of standard ``.zip`` or tar archives. 3670 3671.. 3672 3673.. date: 2022-05-24-10-59-02 3674.. gh-issue: 92728 3675.. nonce: zxTifq 3676.. section: Library 3677 3678The :func:`re.template` function and the corresponding :const:`re.TEMPLATE` 3679and :const:`re.T` flags are restored after they were removed in 3.11.0b1, 3680but they are now deprecated, so they might be removed from Python 3.13. 3681 3682.. 3683 3684.. date: 2022-05-22-23-46-18 3685.. gh-issue: 93033 3686.. nonce: wZfiL- 3687.. section: Library 3688 3689Search in some strings (platform dependent i.e [U+0xFFFF, U+0x0100] on 3690Windows or [U+0xFFFFFFFF, U+0x00010000] on Linux 64-bit) are now up to 10 3691times faster. 3692 3693.. 3694 3695.. date: 2022-05-22-16-08-01 3696.. gh-issue: 89973 3697.. nonce: jc-Q4g 3698.. section: Library 3699 3700Fix :exc:`re.error` raised in :mod:`fnmatch` if the pattern contains a 3701character range with upper bound lower than lower bound (e.g. ``[c-a]``). 3702Now such ranges are interpreted as empty ranges. 3703 3704.. 3705 3706.. date: 2022-05-21-13-16-16 3707.. gh-issue: 93044 3708.. nonce: eJ_XkZ 3709.. section: Library 3710 3711No longer convert the database argument of :func:`sqlite3.connect` to bytes 3712before passing it to the factory. 3713 3714.. 3715 3716.. date: 2022-05-20-15-52-43 3717.. gh-issue: 93010 3718.. nonce: WF-cAc 3719.. section: Library 3720 3721In a very special case, the email package tried to append the nonexistent 3722``InvalidHeaderError`` to the defect list. It should have been 3723``InvalidHeaderDefect``. 3724 3725.. 3726 3727.. date: 2022-05-19-22-34-42 3728.. gh-issue: 92986 3729.. nonce: e6uKxj 3730.. section: Library 3731 3732Fix :func:`ast.unparse` when ``ImportFrom.level`` is ``None`` 3733 3734.. 3735 3736.. date: 2022-05-19-17-49-58 3737.. gh-issue: 92932 3738.. nonce: o2peTh 3739.. section: Library 3740 3741Now :func:`~dis.dis` and :func:`~dis.get_instructions` handle operand values 3742for instructions prefixed by ``EXTENDED_ARG_QUICK``. Patch by Sam Gross and 3743Donghee Na. 3744 3745.. 3746 3747.. date: 2022-05-19-13-33-18 3748.. gh-issue: 92675 3749.. nonce: ZeerMZ 3750.. section: Library 3751 3752Fix :func:`venv.ensure_directories` to accept :class:`pathlib.Path` 3753arguments in addition to :class:`str` paths. Patch by David Foster. 3754 3755.. 3756 3757.. date: 2022-05-18-21-04-09 3758.. gh-issue: 87901 3759.. nonce: lnf041 3760.. section: Library 3761 3762Removed the ``encoding`` argument from :func:`os.popen` that was added in 37633.11b1. 3764 3765.. 3766 3767.. date: 2022-05-18-17-18-41 3768.. gh-issue: 91922 3769.. nonce: DwWIsJ 3770.. section: Library 3771 3772Fix function :func:`sqlite.connect` and the :class:`sqlite.Connection` 3773constructor on non-UTF-8 locales. Also, they now support bytes paths 3774non-decodable with the current FS encoding. 3775 3776.. 3777 3778.. date: 2022-05-17-06-27-39 3779.. gh-issue: 92869 3780.. nonce: t8oBkw 3781.. section: Library 3782 3783Added :class:`~ctypes.c_time_t` to :mod:`ctypes`, which has the same size as 3784the :c:type:`time_t` type in C. 3785 3786.. 3787 3788.. date: 2022-05-16-14-35-39 3789.. gh-issue: 92839 3790.. nonce: owSMyo 3791.. section: Library 3792 3793Fixed crash resulting from calling bisect.insort() or bisect.insort_left() 3794with the key argument not equal to ``None``. 3795 3796.. 3797 3798.. date: 2022-05-14-11-41-23 3799.. gh-issue: 90473 3800.. nonce: kPdOZl 3801.. section: Library 3802 3803:mod:`subprocess` now fails early on Emscripten and WASI platforms to work 3804around missing :func:`os.pipe` on WASI. 3805 3806.. 3807 3808.. date: 2022-05-14-09-01-38 3809.. gh-issue: 89325 3810.. nonce: ys-2BZ 3811.. section: Library 3812 3813Removed many old deprecated :mod:`unittest` features: 3814:class:`~unittest.TestCase` method aliases, undocumented and broken 3815:class:`~unittest.TestCase` method ``assertDictContainsSubset``, 3816undocumented :meth:`TestLoader.loadTestsFromModule 3817<unittest.TestLoader.loadTestsFromModule>` parameter *use_load_tests*, and 3818an underscored alias of the :class:`~unittest.TextTestResult` class. 3819 3820.. 3821 3822.. date: 2022-05-12-15-19-00 3823.. gh-issue: 92734 3824.. nonce: d0wjDt 3825.. section: Library 3826 3827Allow multi-element reprs emitted by :mod:`reprlib` to be pretty-printed 3828using configurable indentation. 3829 3830.. 3831 3832.. date: 2022-05-11-19-33-27 3833.. gh-issue: 92671 3834.. nonce: KE4v6a 3835.. section: Library 3836 3837Fixed :func:`ast.unparse` for empty tuples in the assignment target context. 3838 3839.. 3840 3841.. date: 2022-05-11-14-34-09 3842.. gh-issue: 91581 3843.. nonce: glkou2 3844.. section: Library 3845 3846:meth:`~datetime.datetime.utcfromtimestamp` no longer attempts to resolve 3847``fold`` in the pure Python implementation, since the fold is never 1 in 3848UTC. In addition to being slightly faster in the common case, this also 3849prevents some errors when the timestamp is close to :attr:`datetime.min 3850<datetime.datetime.min>`. Patch by Paul Ganssle. 3851 3852.. 3853 3854.. date: 2022-05-11-10-06-31 3855.. gh-issue: 86388 3856.. nonce: 7ivUtT 3857.. section: Library 3858 3859Removed randrange() functionality deprecated since Python 3.10. Formerly, 3860randrange(10.0) losslessly converted to randrange(10). Now, it raises a 3861TypeError. Also, the exception raised for non-integral values such as 3862randrange(10.5) or randrange('10') has been changed from ValueError to 3863TypeError. 3864 3865.. 3866 3867.. date: 2022-05-10-16-30-40 3868.. gh-issue: 90385 3869.. nonce: 1_wBRQ 3870.. section: Library 3871 3872Add :meth:`pathlib.Path.walk` as an alternative to :func:`os.walk`. 3873 3874.. 3875 3876.. date: 2022-05-10-07-57-27 3877.. gh-issue: 92550 3878.. nonce: Rk_UzM 3879.. section: Library 3880 3881Fix :meth:`pathlib.Path.rglob` for empty pattern. 3882 3883.. 3884 3885.. date: 2022-05-09-22-27-11 3886.. gh-issue: 92591 3887.. nonce: V7RCk2 3888.. section: Library 3889 3890Allow :mod:`logging` filters to return a :class:`logging.LogRecord` instance 3891so that filters attached to :class:`logging.Handler`\ s can enrich records 3892without side effects on other handlers. 3893 3894.. 3895 3896.. date: 2022-05-09-21-31-41 3897.. gh-issue: 92445 3898.. nonce: tJosdm 3899.. section: Library 3900 3901Fix a bug in :mod:`argparse` where ``nargs="*"`` would raise an error 3902instead of returning an empty list when 0 arguments were supplied if choice 3903was also defined in ``parser.add_argument``. 3904 3905.. 3906 3907.. date: 2022-05-09-11-55-04 3908.. gh-issue: 92547 3909.. nonce: CzVZft 3910.. section: Library 3911 3912Remove undocumented :mod:`sqlite3` features deprecated in Python 3.10: 3913 3914* ``sqlite3.enable_shared_cache()`` 3915* ``sqlite3.OptimizedUnicode`` 3916 3917Patch by Erlend E. Aasland. 3918 3919.. 3920 3921.. date: 2022-05-09-09-28-02 3922.. gh-issue: 92530 3923.. nonce: M4Q1RS 3924.. section: Library 3925 3926Fix an issue that occurred after interrupting 3927:func:`threading.Condition.notify`. 3928 3929.. 3930 3931.. date: 2022-05-09-01-27-25 3932.. gh-issue: 92531 3933.. nonce: vV7S_O 3934.. section: Library 3935 3936The statistics.median_grouped() function now always return a float. 3937Formerly, it did not convert the input type when for sequences of length 3938one. 3939 3940.. 3941 3942.. date: 2022-05-08-19-21-14 3943.. gh-issue: 84131 3944.. nonce: rG5kI7 3945.. section: Library 3946 3947The :class:`pathlib.Path` deprecated method ``link_to`` has been removed. 3948Use 3.10's :meth:`~pathlib.Path.hardlink_to` method instead as its semantics 3949are consistent with that of :meth:`~pathlib.Path.symlink_to`. 3950 3951.. 3952 3953.. date: 2022-05-08-18-51-14 3954.. gh-issue: 89336 3955.. nonce: TL6ip7 3956.. section: Library 3957 3958Removed :mod:`configparser` module APIs: the ``SafeConfigParser`` class 3959alias, the ``ParsingError.filename`` property and parameter, and the 3960``ConfigParser.readfp`` method, all of which were deprecated since Python 39613.2. 3962 3963.. 3964 3965.. date: 2022-05-06-13-00-57 3966.. gh-issue: 92391 3967.. nonce: s-Lase 3968.. section: Library 3969 3970Add :meth:`~object.__class_getitem__` to :class:`csv.DictReader` and 3971:class:`csv.DictWriter`, allowing them to be parameterized at runtime. Patch 3972by Marc Mueller. 3973 3974.. 3975 3976.. date: 2022-04-26-18-37-24 3977.. gh-issue: 91968 3978.. nonce: fuuH1_ 3979.. section: Library 3980 3981Add ``SO_RTABLE`` and ``SO_USER_COOKIE`` constants to :mod:`socket`. 3982 3983.. 3984 3985.. date: 2022-04-25-10-23-01 3986.. gh-issue: 91810 3987.. nonce: DOHa6B 3988.. section: Library 3989 3990:class:`~xml.etree.ElementTree.ElementTree` method 3991:meth:`~xml.etree.ElementTree.ElementTree.write` and function 3992:func:`~xml.etree.ElementTree.tostring` now use the text file's encoding 3993("UTF-8" if not available) instead of locale encoding in XML declaration 3994when ``encoding="unicode"`` is specified. 3995 3996.. 3997 3998.. date: 2022-04-24-22-26-45 3999.. gh-issue: 81790 4000.. nonce: M5Rvpm 4001.. section: Library 4002 4003:func:`os.path.splitdrive` now understands DOS device paths with UNC links 4004(beginning ``\\?\UNC\``). Contributed by Barney Gale. 4005 4006.. 4007 4008.. date: 2022-04-21-19-14-29 4009.. gh-issue: 91760 4010.. nonce: 54AR-m 4011.. section: Library 4012 4013Apply more strict rules for numerical group references and group names in 4014regular expressions. Only sequence of ASCII digits is now accepted as a 4015numerical reference. The group name in bytes patterns and replacement 4016strings can now only contain ASCII letters and digits and underscore. 4017 4018.. 4019 4020.. date: 2022-04-15-22-07-36 4021.. gh-issue: 90622 4022.. nonce: 0C6l8h 4023.. section: Library 4024 4025Worker processes for :class:`concurrent.futures.ProcessPoolExecutor` are no 4026longer spawned on demand (a feature added in 3.9) when the multiprocessing 4027context start method is ``"fork"`` as that can lead to deadlocks in the 4028child processes due to a fork happening while threads are running. 4029 4030.. 4031 4032.. date: 2022-04-15-17-38-55 4033.. gh-issue: 91577 4034.. nonce: Ah7cLL 4035.. section: Library 4036 4037Move imports in :class:`~multiprocessing.SharedMemory` methods to module 4038level so that they can be executed late in python finalization. 4039 4040.. 4041 4042.. date: 2022-04-15-13-16-25 4043.. gh-issue: 91581 4044.. nonce: 9OGsrN 4045.. section: Library 4046 4047Remove an unhandled error case in the C implementation of calls to 4048:meth:`datetime.fromtimestamp <datetime.datetime.fromtimestamp>` with no 4049time zone (i.e. getting a local time from an epoch timestamp). This should 4050have no user-facing effect other than giving a possibly more accurate error 4051message when called with timestamps that fall on 10000-01-01 in the local 4052time. Patch by Paul Ganssle. 4053 4054.. 4055 4056.. date: 2022-04-15-11-29-38 4057.. gh-issue: 91539 4058.. nonce: 7WgVuA 4059.. section: Library 4060 4061Improve performance of ``urllib.request.getproxies_environment`` when there 4062are many environment variables 4063 4064.. 4065 4066.. date: 2022-04-14-08-37-16 4067.. gh-issue: 91524 4068.. nonce: g8PiIu 4069.. section: Library 4070 4071Speed up the regular expression substitution (functions :func:`re.sub` and 4072:func:`re.subn` and corresponding :class:`re.Pattern` methods) for 4073replacement strings containing group references by 2--3 times. 4074 4075.. 4076 4077.. date: 2022-04-12-18-05-40 4078.. gh-issue: 91447 4079.. nonce: N_Fs4H 4080.. section: Library 4081 4082Fix findtext in the xml module to only give an empty string when the text 4083attribute is set to ``None``. 4084 4085.. 4086 4087.. date: 2022-04-11-16-55-41 4088.. gh-issue: 91456 4089.. nonce: DK3KKl 4090.. section: Library 4091 4092Deprecate current default auto() behavior: In 3.13 the default will be for 4093for auto() to always return the largest member value incremented by 1, and 4094to raise if incompatible value types are used. 4095 4096.. 4097 4098.. bpo: 47231 4099.. date: 2022-04-08-22-12-11 4100.. nonce: lvyglt 4101.. section: Library 4102 4103Fixed an issue with inconsistent trailing slashes in tarfile longname 4104directories. 4105 4106.. 4107 4108.. bpo: 39064 4109.. date: 2022-04-03-19-40-09 4110.. nonce: 76PbIz 4111.. section: Library 4112 4113:class:`zipfile.ZipFile` now raises :exc:`zipfile.BadZipFile` instead of 4114``ValueError`` when reading a corrupt zip file in which the central 4115directory offset is negative. 4116 4117.. 4118 4119.. bpo: 41287 4120.. date: 2022-04-03-11-25-02 4121.. nonce: 8CTdwf 4122.. section: Library 4123 4124Fix handling of the ``doc`` argument in subclasses of :func:`property`. 4125 4126.. 4127 4128.. date: 2022-04-01-12-35-44 4129.. gh-issue: 90005 4130.. nonce: pvaLHQ 4131.. section: Library 4132 4133:mod:`ctypes` dependency ``libffi`` is now detected with ``pkg-config``. 4134 4135.. 4136 4137.. bpo: 32547 4138.. date: 2022-04-01-09-43-54 4139.. nonce: NIUiNC 4140.. section: Library 4141 4142The constructors for :class:`~csv.DictWriter` and :class:`~csv.DictReader` 4143now coerce the ``fieldnames`` argument to a :class:`list` if it is an 4144iterator. 4145 4146.. 4147 4148.. bpo: 35540 4149.. date: 2022-03-22-18-28-55 4150.. nonce: nyijX9 4151.. section: Library 4152 4153Fix :func:`dataclasses.asdict` crash when :class:`collections.defaultdict` 4154is present in the attributes. 4155 4156.. 4157 4158.. bpo: 47063 4159.. date: 2022-03-19-04-41-42 4160.. nonce: nwRfUo 4161.. section: Library 4162 4163Add an index_pages parameter to support using non-default index page names. 4164 4165.. 4166 4167.. bpo: 47025 4168.. date: 2022-03-16-14-24-14 4169.. nonce: qtT3CE 4170.. section: Library 4171 4172Drop support for :class:`bytes` on :data:`sys.path`. 4173 4174.. 4175 4176.. bpo: 46951 4177.. date: 2022-03-08-04-46-44 4178.. nonce: SWAz97 4179.. section: Library 4180 4181Order the contents of zipapp archives, to make builds more reproducible. 4182 4183.. 4184 4185.. bpo: 42777 4186.. date: 2022-02-21-01-37-00 4187.. nonce: nWK3E6 4188.. section: Library 4189 4190Implement :meth:`pathlib.Path.is_mount` for Windows paths. 4191 4192.. 4193 4194.. bpo: 46755 4195.. date: 2022-02-15-12-40-48 4196.. nonce: zePJfx 4197.. section: Library 4198 4199In :class:`QueueHandler`, clear ``stack_info`` from :class:`LogRecord` to 4200prevent stack trace from being written twice. 4201 4202.. 4203 4204.. bpo: 45393 4205.. date: 2022-02-09-23-44-27 4206.. nonce: 9v5Y8U 4207.. section: Library 4208 4209Fix the formatting for ``await x`` and ``not x`` in the operator precedence 4210table when using the :func:`help` system. 4211 4212.. 4213 4214.. bpo: 46642 4215.. date: 2022-02-05-18-46-54 4216.. nonce: YI6nHQ 4217.. section: Library 4218 4219Improve error message when trying to subclass an instance of 4220:data:`typing.TypeVar`, :data:`typing.ParamSpec`, 4221:data:`typing.TypeVarTuple`, etc. Based on patch by Gregory Beauregard. 4222 4223.. 4224 4225.. bpo: 46364 4226.. date: 2022-01-14-10-49-20 4227.. nonce: SzhlU9 4228.. section: Library 4229 4230Restrict use of sockets instead of pipes for stdin of subprocesses created 4231by :mod:`asyncio` to AIX platform only. 4232 4233.. 4234 4235.. bpo: 28249 4236.. date: 2022-01-09-14-23-00 4237.. nonce: 4dzB80 4238.. section: Library 4239 4240Set :attr:`doctest.DocTest.lineno` to ``None`` when an object does not have 4241:attr:`~definition.__doc__`. 4242 4243.. 4244 4245.. bpo: 46197 4246.. date: 2022-01-03-15-07-06 4247.. nonce: Z0djv6 4248.. section: Library 4249 4250Fix :mod:`ensurepip` environment isolation for subprocess running ``pip``. 4251 4252.. 4253 4254.. bpo: 45924 4255.. date: 2021-12-27-15-32-15 4256.. nonce: 0ZpHX2 4257.. section: Library 4258 4259Fix :mod:`asyncio` incorrect traceback when future's exception is raised 4260multiple times. Patch by Kumar Aditya. 4261 4262.. 4263 4264.. bpo: 45046 4265.. date: 2021-08-29-19-59-16 4266.. nonce: eGq0NC 4267.. section: Library 4268 4269Add support of context managers in :mod:`unittest`: methods 4270:meth:`~unittest.TestCase.enterContext` and 4271:meth:`~unittest.TestCase.enterClassContext` of class 4272:class:`~unittest.TestCase`, method 4273:meth:`~unittest.IsolatedAsyncioTestCase.enterAsyncContext` of class 4274:class:`~unittest.IsolatedAsyncioTestCase` and function 4275:func:`unittest.enterModuleContext`. 4276 4277.. 4278 4279.. bpo: 44173 4280.. date: 2021-08-27-18-07-35 4281.. nonce: oW92Ev 4282.. section: Library 4283 4284Enable fast seeking of uncompressed unencrypted :class:`zipfile.ZipExtFile` 4285 4286.. 4287 4288.. bpo: 42627 4289.. date: 2021-05-22-07-58-59 4290.. nonce: EejtD0 4291.. section: Library 4292 4293Fix incorrect parsing of Windows registry proxy settings 4294 4295.. 4296 4297.. bpo: 42047 4298.. date: 2020-10-15-18-37-12 4299.. nonce: XDdoSF 4300.. section: Library 4301 4302Add :func:`threading.get_native_id` support for DragonFly BSD. Patch by 4303David Carlier. 4304 4305.. 4306 4307.. bpo: 14243 4308.. date: 2020-09-28-04-56-04 4309.. nonce: YECnxv 4310.. section: Library 4311 4312The :class:`tempfile.NamedTemporaryFile` function has a new optional 4313parameter *delete_on_close* 4314 4315.. 4316 4317.. bpo: 41246 4318.. date: 2020-07-08-20-32-13 4319.. nonce: 2trYf3 4320.. section: Library 4321 4322Give the same callback function for when the overlapped operation is done to 4323the functions ``recv``, ``recv_into``, ``recvfrom``, ``sendto``, ``send`` 4324and ``sendfile`` inside ``IocpProactor``. 4325 4326.. 4327 4328.. bpo: 39264 4329.. date: 2020-01-09-01-57-12 4330.. nonce: GsBL9- 4331.. section: Library 4332 4333Fixed :meth:`collections.UserDict.get` to not call :meth:`__missing__` when 4334a value is not found. This matches the behavior of :class:`dict`. Patch by 4335Bar Harel. 4336 4337.. 4338 4339.. bpo: 38693 4340.. date: 2019-11-04-22-21-27 4341.. nonce: w_OAov 4342.. section: Library 4343 4344:mod:`importlib` now uses f-strings internally instead of ``str.format``. 4345 4346.. 4347 4348.. bpo: 38267 4349.. date: 2019-09-25-00-37-51 4350.. nonce: X9Jb5V 4351.. section: Library 4352 4353Add *timeout* parameter to :meth:`asyncio.loop.shutdown_default_executor`. 4354The default value is ``None``, which means the executor will be given an 4355unlimited amount of time. When called from :class:`asyncio.Runner` or 4356:func:`asyncio.run`, the default timeout is 5 minutes. 4357 4358.. 4359 4360.. bpo: 34828 4361.. date: 2018-09-28-22-18-03 4362.. nonce: 5Zyi_S 4363.. section: Library 4364 4365:meth:`sqlite3.Connection.iterdump` now handles databases that use 4366``AUTOINCREMENT`` in one or more tables. 4367 4368.. 4369 4370.. bpo: 32990 4371.. date: 2018-09-23-07-47-29 4372.. nonce: 2FVVTU 4373.. section: Library 4374 4375Support reading wave files with the ``WAVE_FORMAT_EXTENSIBLE`` format in the 4376:mod:`wave` module. 4377 4378.. 4379 4380.. bpo: 26253 4381.. date: 2017-07-31-13-35-28 4382.. nonce: 8v_sCs 4383.. section: Library 4384 4385Allow adjustable compression level for tarfile streams in 4386:func:`tarfile.open`. 4387 4388.. 4389 4390.. date: 2022-10-16-17-34-45 4391.. gh-issue: 85525 4392.. nonce: DvkD0v 4393.. section: Documentation 4394 4395Remove extra row 4396 4397.. 4398 4399.. date: 2022-10-11-09-40-50 4400.. gh-issue: 86404 4401.. nonce: dEAb8W 4402.. section: Documentation 4403 4404Deprecated tools ``make suspicious`` and ``rstlint.py`` are now removed. 4405They have been replaced by :pypi:`sphinx-lint`. 4406 4407.. 4408 4409.. date: 2022-10-02-10-58-52 4410.. gh-issue: 97741 4411.. nonce: 39l023 4412.. section: Documentation 4413 4414Fix ``!`` in c domain ref target syntax via a ``conf.py`` patch, so it works 4415as intended to disable ref target resolution. 4416 4417.. 4418 4419.. date: 2022-09-01-17-03-04 4420.. gh-issue: 96432 4421.. nonce: 1EJ1-4 4422.. section: Documentation 4423 4424Fraction literals now support whitespace around the forward slash, 4425``Fraction('2 / 3')``. 4426 4427.. 4428 4429.. date: 2022-08-19-17-07-45 4430.. gh-issue: 96098 4431.. nonce: nDp43u 4432.. section: Documentation 4433 4434Improve discoverability of the higher level concurrent.futures module by 4435providing clearer links from the lower level threading and multiprocessing 4436modules. 4437 4438.. 4439 4440.. date: 2022-08-13-20-34-51 4441.. gh-issue: 95957 4442.. nonce: W9ZZAx 4443.. section: Documentation 4444 4445What's New 3.11 now has instructions for how to provide compiler and linker 4446flags for Tcl/Tk and OpenSSL on RHEL 7 and CentOS 7. 4447 4448.. 4449 4450.. date: 2022-08-12-01-12-52 4451.. gh-issue: 95588 4452.. nonce: PA0FI7 4453.. section: Documentation 4454 4455Clarified the conflicting advice given in the :mod:`ast` documentation about 4456:func:`ast.literal_eval` being "safe" for use on untrusted input while at 4457the same time warning that it can crash the process. The latter statement is 4458true and is deemed unfixable without a large amount of work unsuitable for a 4459bugfix. So we keep the warning and no longer claim that ``literal_eval`` is 4460safe. 4461 4462.. 4463 4464.. date: 2022-08-03-13-35-08 4465.. gh-issue: 91207 4466.. nonce: eJ4pPf 4467.. section: Documentation 4468 4469Fix stylesheet not working in Windows CHM htmlhelp docs and add warning that 4470they are deprecated. Contributed by C.A.M. Gerlach. 4471 4472.. 4473 4474.. date: 2022-07-30-00-23-11 4475.. gh-issue: 95454 4476.. nonce: we7AFm 4477.. section: Documentation 4478 4479Replaced incorrectly written true/false values in documentation. Patch by 4480Robert O'Shea 4481 4482.. 4483 4484.. date: 2022-07-29-23-02-19 4485.. gh-issue: 95451 4486.. nonce: -tgB93 4487.. section: Documentation 4488 4489Update library documentation with :ref:`availability information 4490<wasm-availability>` on WebAssembly platforms ``wasm32-emscripten`` and 4491``wasm32-wasi``. 4492 4493.. 4494 4495.. date: 2022-07-29-09-04-02 4496.. gh-issue: 95415 4497.. nonce: LKTyw6 4498.. section: Documentation 4499 4500Use consistent syntax for platform availability. The directive now supports 4501a content body and emits a warning when it encounters an unknown platform. 4502 4503.. 4504 4505.. date: 2022-07-07-08-42-05 4506.. gh-issue: 94321 4507.. nonce: pmCIPb 4508.. section: Documentation 4509 4510Document the :pep:`246` style protocol type 4511:class:`sqlite3.PrepareProtocol`. 4512 4513.. 4514 4515.. date: 2022-06-19-18-18-22 4516.. gh-issue: 86128 4517.. nonce: 39DDTD 4518.. section: Documentation 4519 4520Document a limitation in ThreadPoolExecutor where its exit handler is 4521executed before any handlers in atexit. 4522 4523.. 4524 4525.. date: 2022-06-16-10-10-59 4526.. gh-issue: 61162 4527.. nonce: 1ypkG8 4528.. section: Documentation 4529 4530Clarify :mod:`sqlite3` behavior when 4531:ref:`sqlite3-connection-context-manager`. 4532 4533.. 4534 4535.. date: 2022-06-15-12-12-49 4536.. gh-issue: 87260 4537.. nonce: epyI7D 4538.. section: Documentation 4539 4540Align :mod:`sqlite3` argument specs with the actual implementation. 4541 4542.. 4543 4544.. date: 2022-05-29-21-22-54 4545.. gh-issue: 86986 4546.. nonce: lFXw8j 4547.. section: Documentation 4548 4549The minimum Sphinx version required to build the documentation is now 3.2. 4550 4551.. 4552 4553.. date: 2022-05-26-14-51-25 4554.. gh-issue: 88831 4555.. nonce: 5Cccr5 4556.. section: Documentation 4557 4558Augmented documentation of asyncio.create_task(). Clarified the need to keep 4559strong references to tasks and added a code snippet detailing how to do this. 4560 4561.. 4562 4563.. date: 2022-05-26-11-33-23 4564.. gh-issue: 86438 4565.. nonce: kEGGmK 4566.. section: Documentation 4567 4568Clarify that :option:`-W` and :envvar:`PYTHONWARNINGS` are matched literally 4569and case-insensitively, rather than as regular expressions, in 4570:mod:`warnings`. 4571 4572.. 4573 4574.. date: 2022-05-20-18-42-10 4575.. gh-issue: 93031 4576.. nonce: c2RdJe 4577.. section: Documentation 4578 4579Update tutorial introduction output to use 3.10+ SyntaxError invalid range. 4580 4581.. 4582 4583.. date: 2022-05-18-23-58-26 4584.. gh-issue: 92240 4585.. nonce: bHvYiz 4586.. section: Documentation 4587 4588Added release dates for "What's New in Python 3.X" for 3.0, 3.1, 3.2, 3.8 4589and 3.10 4590 4591.. 4592 4593.. bpo: 47161 4594.. date: 2022-03-30-17-56-01 4595.. nonce: gesHfS 4596.. section: Documentation 4597 4598Document that :class:`pathlib.PurePath` does not collapse initial double 4599slashes because they denote UNC paths. 4600 4601.. 4602 4603.. bpo: 40838 4604.. date: 2022-01-13-16-03-15 4605.. nonce: k3NVCf 4606.. section: Documentation 4607 4608Document that :func:`inspect.getdoc`, :func:`inspect.getmodule`, and 4609:func:`inspect.getsourcefile` might return ``None``. 4610 4611.. 4612 4613.. bpo: 43689 4614.. date: 2021-04-01-08-09-34 4615.. nonce: mqCfLe 4616.. section: Documentation 4617 4618The ``Differ`` documentation now also mentions other whitespace characters, 4619which make it harder to understand the diff output. 4620 4621.. 4622 4623.. bpo: 38056 4624.. date: 2019-09-12-08-28-17 4625.. nonce: 6ktYkc 4626.. section: Documentation 4627 4628Overhaul the :ref:`error-handlers` documentation in :mod:`codecs`. 4629 4630.. 4631 4632.. bpo: 13553 4633.. date: 2017-12-10-19-13-39 4634.. nonce: gQbZs4 4635.. section: Documentation 4636 4637Document tkinter.Tk args. 4638 4639.. 4640 4641.. date: 2022-10-20-17-49-50 4642.. gh-issue: 95027 4643.. nonce: viRpJB 4644.. section: Tests 4645 4646On Windows, when the Python test suite is run with the ``-jN`` option, the 4647ANSI code page is now used as the encoding for the stdout temporary file, 4648rather than using UTF-8 which can lead to decoding errors. Patch by Victor 4649Stinner. 4650 4651.. 4652 4653.. date: 2022-09-08-18-31-26 4654.. gh-issue: 96624 4655.. nonce: 5cANM1 4656.. section: Tests 4657 4658Fixed the failure of repeated runs of ``test.test_unittest`` caused by side 4659effects in ``test_dotted_but_module_not_loaded``. 4660 4661.. 4662 4663.. date: 2022-08-22-14-59-42 4664.. gh-issue: 95243 4665.. nonce: DeD66V 4666.. section: Tests 4667 4668Mitigate the inherent race condition from using find_unused_port() in 4669testSockName() by trying to find an unused port a few times before failing. 4670Patch by Ross Burton. 4671 4672.. 4673 4674.. date: 2022-08-05-09-57-43 4675.. gh-issue: 95573 4676.. nonce: edMdQB 4677.. section: Tests 4678 4679:source:`Lib/test/test_asyncio/test_ssl.py` exposed a bug in the macOS 4680kernel where intense concurrent load on non-blocking sockets occasionally 4681causes :const:`errno.ENOBUFS` ("No buffer space available") to be emitted. 4682FB11063974 filed with Apple, in the mean time as a workaround buffer size 4683used in tests on macOS is decreased to avoid intermittent failures. Patch 4684by Fantix King. 4685 4686.. 4687 4688.. date: 2022-07-26-15-22-19 4689.. gh-issue: 95280 4690.. nonce: h8HvbP 4691.. section: Tests 4692 4693Fix problem with ``test_ssl`` ``test_get_ciphers`` on systems that require 4694perfect forward secrecy (PFS) ciphers. 4695 4696.. 4697 4698.. date: 2022-07-24-20-19-05 4699.. gh-issue: 95212 4700.. nonce: fHiU4e 4701.. section: Tests 4702 4703Make multiprocessing test case ``test_shared_memory_recreate`` 4704parallel-safe. 4705 4706.. 4707 4708.. date: 2022-07-24-17-24-42 4709.. gh-issue: 95218 4710.. nonce: zfBLtu 4711.. section: Tests 4712 4713Move tests for importlib.resources into test_importlib.resources. 4714 4715.. 4716 4717.. date: 2022-07-24-16-28-31 4718.. gh-issue: 93963 4719.. nonce: UB9azu 4720.. section: Tests 4721 4722Updated tests to use preferred location for ``importlib.resources`` ABCs. 4723 4724.. 4725 4726.. date: 2022-07-08-12-22-00 4727.. gh-issue: 94675 4728.. nonce: IiTs5f 4729.. section: Tests 4730 4731Add a regression test for :mod:`re` exponentional slowdown when using 4732rjsmin. 4733 4734.. 4735 4736.. date: 2022-07-05-17-53-13 4737.. gh-issue: 91330 4738.. nonce: Qys5IL 4739.. section: Tests 4740 4741Added more tests for :mod:`dataclasses` to cover behavior with data 4742descriptor-based fields. 4743 4744.. 4745 4746.. date: 2022-06-27-21-27-20 4747.. gh-issue: 94208 4748.. nonce: VR6HX- 4749.. section: Tests 4750 4751``test_ssl`` is now checking for supported TLS version and protocols in more 4752tests. 4753 4754.. 4755 4756.. date: 2022-06-27-08-53-40 4757.. gh-issue: 94315 4758.. nonce: MoZT9t 4759.. section: Tests 4760 4761Tests now check for DAC override capability instead of relying on 4762:func:`os.geteuid`. 4763 4764.. 4765 4766.. date: 2022-06-21-17-37-46 4767.. gh-issue: 54781 4768.. nonce: BjVAVg 4769.. section: Tests 4770 4771Rename test_tk to test_tkinter, and rename test_ttk_guionly to test_ttk. 4772Patch by Victor Stinner. 4773 4774.. 4775 4776.. date: 2022-06-20-23-04-52 4777.. gh-issue: 93839 4778.. nonce: OE3Ybk 4779.. section: Tests 4780 4781Move ``Lib/ctypes/test/`` to ``Lib/test/test_ctypes/``. Patch by Victor 4782Stinner. 4783 4784.. 4785 4786.. date: 2022-06-17-15-20-09 4787.. gh-issue: 93951 4788.. nonce: CW1Vv4 4789.. section: Tests 4790 4791In test_bdb.StateTestCase.test_skip, avoid including auxiliary importers. 4792 4793.. 4794 4795.. date: 2022-06-17-13-55-11 4796.. gh-issue: 93957 4797.. nonce: X4ovYV 4798.. section: Tests 4799 4800Provide nicer error reporting from subprocesses in 4801test_venv.EnsurePipTest.test_with_pip. 4802 4803.. 4804 4805.. date: 2022-06-17-13-27-21 4806.. gh-issue: 93884 4807.. nonce: 5pvPvl 4808.. section: Tests 4809 4810Add test cases for :c:func:`PyNumber_ToBase` that take a large number or a 4811non-int object as parameter. 4812 4813.. 4814 4815.. date: 2022-06-16-21-38-18 4816.. gh-issue: 93852 4817.. nonce: U_Hl6s 4818.. section: Tests 4819 4820test_asyncio, test_logging, test_socket and test_socketserver now create 4821AF_UNIX domains in the current directory to no longer fail with 4822``OSError("AF_UNIX path too long")`` if the temporary directory (the 4823:envvar:`TMPDIR` environment variable) is too long. Patch by Victor Stinner. 4824 4825.. 4826 4827.. date: 2022-06-16-17-50-58 4828.. gh-issue: 93353 4829.. nonce: JdpATx 4830.. section: Tests 4831 4832regrtest now checks if a test leaks temporary files or directories if run 4833with -jN option. Patch by Victor Stinner. 4834 4835.. 4836 4837.. date: 2022-06-10-21-18-14 4838.. gh-issue: 84461 4839.. nonce: 9TAb26 4840.. section: Tests 4841 4842``run_tests.py`` now handles cross compiling env vars correctly and pass 4843``HOSTRUNNER`` to regression tests. 4844 4845.. 4846 4847.. date: 2022-06-08-22-32-56 4848.. gh-issue: 93616 4849.. nonce: e5Kkx2 4850.. section: Tests 4851 4852``test_modulefinder`` now creates a temporary directory in 4853``ModuleFinderTest.setUp()`` instead of module scope. 4854 4855.. 4856 4857.. date: 2022-06-08-14-17-59 4858.. gh-issue: 93575 4859.. nonce: Xb2LNB 4860.. section: Tests 4861 4862Fix issue with test_unicode test_raiseMemError. The test case now use 4863``test.support.calcobjsize`` to calculate size of PyUnicode structs. 4864:func:`sys.getsizeof` may return different size when string has UTF-8 4865memory. 4866 4867.. 4868 4869.. date: 2022-06-05-10-16-45 4870.. gh-issue: 90473 4871.. nonce: QMu7A8 4872.. section: Tests 4873 4874WASI does not have a ``chmod(2)`` syscall. :func:`os.chmod` is now a dummy 4875function on WASI. Skip all tests that depend on working :func:`os.chmod`. 4876 4877.. 4878 4879.. date: 2022-06-04-12-05-31 4880.. gh-issue: 90473 4881.. nonce: RSpjF7 4882.. section: Tests 4883 4884Skip tests on WASI that require symlinks with absolute paths. 4885 4886.. 4887 4888.. date: 2022-06-03-16-26-04 4889.. gh-issue: 57539 4890.. nonce: HxWgYO 4891.. section: Tests 4892 4893Increase calendar test coverage for 4894:meth:`calendar.LocaleTextCalendar.formatweekday`. 4895 4896.. 4897 4898.. date: 2022-06-03-14-18-37 4899.. gh-issue: 90473 4900.. nonce: 7iXVRK 4901.. section: Tests 4902 4903Skip symlink tests on WASI. wasmtime uses ``openat2(2)`` with 4904``RESOLVE_BENEATH`` flag, which prevents symlinks with absolute paths. 4905 4906.. 4907 4908.. date: 2022-06-03-12-22-44 4909.. gh-issue: 89858 4910.. nonce: ftBvjE 4911.. section: Tests 4912 4913Fix ``test_embed`` for out-of-tree builds. Patch by Kumar Aditya. 4914 4915.. 4916 4917.. date: 2022-05-25-23-07-15 4918.. gh-issue: 92886 4919.. nonce: Aki63_ 4920.. section: Tests 4921 4922Fixing tests that fail when running with optimizations (``-O``) in 4923``test_imaplib.py``. 4924 4925.. 4926 4927.. date: 2022-05-25-23-00-35 4928.. gh-issue: 92886 4929.. nonce: Y-vrWj 4930.. section: Tests 4931 4932Fixing tests that fail when running with optimizations (``-O``) in 4933``test_zipimport.py`` 4934 4935.. 4936 4937.. date: 2022-05-25-22-53-30 4938.. gh-issue: 92886 4939.. nonce: mIfdtz 4940.. section: Tests 4941 4942Fixing tests that fail when running with optimizations (``-O``) in 4943``test_py_compile.py`` 4944 4945.. 4946 4947.. date: 2022-05-25-22-43-11 4948.. gh-issue: 92886 4949.. nonce: 9HQb9e 4950.. section: Tests 4951 4952Fixing tests that fail when running with optimizations (``-O``) in 4953``test_sys_settrace.py``. 4954 4955.. 4956 4957.. date: 2022-05-25-22-34-10 4958.. gh-issue: 92886 4959.. nonce: 1Lkt8S 4960.. section: Tests 4961 4962Fixing tests that fail when running with optimizations (``-O``) in 4963``_test_multiprocessing.py`` 4964 4965.. 4966 4967.. date: 2022-05-12-05-51-06 4968.. gh-issue: 92670 4969.. nonce: 7L43Z_ 4970.. section: Tests 4971 4972Skip ``test_shutil.TestCopy.test_copyfile_nonexistent_dir`` test on AIX as 4973the test uses a trailing slash to force the OS consider the path as a 4974directory, but on AIX the trailing slash has no effect and is considered as 4975a file. 4976 4977.. 4978 4979.. date: 2022-05-08-15-40-41 4980.. gh-issue: 92514 4981.. nonce: Xbf5JY 4982.. section: Tests 4983 4984Remove unused ``test.support.BasicTestRunner``. Patch by Jelle Zijlstra. 4985 4986.. 4987 4988.. bpo: 47016 4989.. date: 2022-03-14-23-28-17 4990.. nonce: K-t2QX 4991.. section: Tests 4992 4993Create a GitHub Actions workflow for verifying bundled pip and setuptools. 4994Patch by Illia Volochii and Adam Turner. 4995 4996.. 4997 4998.. date: 2022-09-20-12-43-44 4999.. gh-issue: 96761 5000.. nonce: IF29kR 5001.. section: Build 5002 5003Fix the build process of clang compiler for :program:`_bootstrap_python` if 5004LTO optimization is applied. Patch by Matthias Görgens and Donghee Na. 5005 5006.. 5007 5008.. date: 2022-09-17-11-19-24 5009.. gh-issue: 96883 5010.. nonce: p_gr62 5011.. section: Build 5012 5013``wasm32-emscripten`` builds for browsers now include 5014:mod:`concurrent.futures` for :mod:`asyncio` and :mod:`unittest.mock`. 5015 5016.. 5017 5018.. date: 2022-09-12-18-34-51 5019.. gh-issue: 85936 5020.. nonce: tX4VCU 5021.. section: Build 5022 5023CPython now uses the ThinLTO option as the default policy if the Clang 5024compiler accepts the flag. Patch by Donghee Na. 5025 5026.. 5027 5028.. date: 2022-09-11-14-23-49 5029.. gh-issue: 96729 5030.. nonce: W4uBWL 5031.. section: Build 5032 5033Ensure that Windows releases built with ``Tools\msi\buildrelease.bat`` are 5034upgradable to and from official Python releases. 5035 5036.. 5037 5038.. date: 2022-08-26-11-50-03 5039.. gh-issue: 96269 5040.. nonce: x_J5h0 5041.. section: Build 5042 5043Shared module targets now depend on new ``MODULE_DEPS`` variable, which 5044includes ``EXPORTSYMS``. This fixes a build order issue on unsupported AIX 5045platform. 5046 5047.. 5048 5049.. date: 2022-08-26-11-09-11 5050.. gh-issue: 84461 5051.. nonce: Nsdn_R 5052.. section: Build 5053 5054``wasm32-emscripten`` platform no longer builds :mod:`resource` module, 5055:func:`~os.getresuid`, :func:`~os.getresgid`, and their setters. The APIs 5056are stubs and not functional. 5057 5058.. 5059 5060.. date: 2022-08-15-10-56-07 5061.. gh-issue: 95973 5062.. nonce: Bsswsc 5063.. section: Build 5064 5065Add a new ``--with-dsymutil`` configure option to link debug information 5066in macOS. Patch by Pablo Galindo. 5067 5068.. 5069 5070.. date: 2022-08-12-13-06-03 5071.. gh-issue: 90536 5072.. nonce: qMpF6p 5073.. section: Build 5074 5075Use the BOLT post-link optimizer to improve performance, particularly on 5076medium-to-large applications. 5077 5078.. 5079 5080.. date: 2022-08-04-15-29-35 5081.. gh-issue: 93744 5082.. nonce: svRuqm 5083.. section: Build 5084 5085Remove the ``configure --with-cxx-main`` build option: it didn't work for 5086many years. Remove the ``MAINCC`` variable from ``configure`` and 5087``Makefile``. Patch by Victor Stinner. 5088 5089.. 5090 5091.. date: 2022-07-26-18-13-34 5092.. gh-issue: 94801 5093.. nonce: 9fREfy 5094.. section: Build 5095 5096Fix a regression in ``configure`` script that caused some header checks to 5097ignore custom ``CPPFLAGS``. The regression was introduced in :gh:`94802`. 5098 5099.. 5100 5101.. date: 2022-07-25-09-48-43 5102.. gh-issue: 95145 5103.. nonce: ZNS3dj 5104.. section: Build 5105 5106wasm32-wasi builds no longer depend on WASIX's pthread stubs. Python now has 5107its own stubbed pthread API. 5108 5109.. 5110 5111.. date: 2022-07-25-08-59-35 5112.. gh-issue: 95174 5113.. nonce: g8woUW 5114.. section: Build 5115 5116Python now detects missing ``dup`` function in WASI and works around some 5117missing :mod:`errno`, :mod:`select`, and :mod:`socket` constants. 5118 5119.. 5120 5121.. date: 2022-07-23-21-39-09 5122.. gh-issue: 95174 5123.. nonce: 7cYMZR 5124.. section: Build 5125 5126Python now skips missing :mod:`socket` functions and methods on WASI. WASI 5127can only create sockets from existing fd / accept and has no netdb. 5128 5129.. 5130 5131.. date: 2022-07-21-09-17-01 5132.. gh-issue: 95085 5133.. nonce: E9x2S_ 5134.. section: Build 5135 5136Platforms ``wasm32-unknown-emscripten`` and ``wasm32-unknown-wasi`` have 5137been promoted to :pep:`11` tier 3 platform support. 5138 5139.. 5140 5141.. date: 2022-07-14-11-13-26 5142.. gh-issue: 94847 5143.. nonce: s3Kr5p 5144.. section: Build 5145 5146Fixed ``_decimal`` module build issue on GCC when compiling with LTO and 5147pydebug. Debug builds no longer force inlining of functions. 5148 5149.. 5150 5151.. date: 2022-07-14-02-45-44 5152.. gh-issue: 94841 5153.. nonce: lLRTdf 5154.. section: Build 5155 5156Fix the possible performance regression of :c:func:`PyObject_Free` compiled 5157with MSVC version 1932. 5158 5159.. 5160 5161.. date: 2022-07-13-10-13-10 5162.. gh-issue: 94801 5163.. nonce: 3xUB24 5164.. section: Build 5165 5166``configure`` now uses custom flags like ``ZLIB_CFLAGS`` and ``ZLIB_LIBS`` 5167when searching for headers and libraries. 5168 5169.. 5170 5171.. date: 2022-07-12-13-39-18 5172.. gh-issue: 94773 5173.. nonce: koHKm5 5174.. section: Build 5175 5176``deepfreeze.py`` now supports code object with frozensets that contain 5177incompatible, unsortable types. 5178 5179.. 5180 5181.. date: 2022-07-08-10-28-23 5182.. gh-issue: 94682 5183.. nonce: ZtGt_0 5184.. section: Build 5185 5186Build and test with OpenSSL 1.1.1q 5187 5188.. 5189 5190.. date: 2022-06-30-17-18-23 5191.. gh-issue: 90005 5192.. nonce: EIOOla 5193.. section: Build 5194 5195Dependencies of :mod:`readline` and :mod:`curses` module are now detected in 5196``configure`` script with ``pkg-config``. Only ``ncurses`` / ``ncursesw`` 5197are detected automatically. The old ``curses`` library is not configured 5198automatically. Workaround for missing ``termcap`` or ``tinfo`` library has 5199been removed. 5200 5201.. 5202 5203.. date: 2022-06-30-17-00-54 5204.. gh-issue: 90005 5205.. nonce: iiq5qD 5206.. section: Build 5207 5208Fix building ``_ctypes`` extension without ``pkg-config``. 5209 5210.. 5211 5212.. date: 2022-06-30-09-57-39 5213.. gh-issue: 90005 5214.. nonce: 9-pQyR 5215.. section: Build 5216 5217``_dbm`` module dependencies are now detected by configure. 5218 5219.. 5220 5221.. date: 2022-06-29-08-58-31 5222.. gh-issue: 94404 5223.. nonce: 3MadM6 5224.. section: Build 5225 5226``makesetup`` now works around an issue with sed on macOS and uses correct 5227CFLAGS for object files that end up in a shared extension. Module CFLAGS are 5228used before PY_STDMODULE_CFLAGS to avoid clashes with system headers. 5229 5230.. 5231 5232.. date: 2022-06-28-09-42-10 5233.. gh-issue: 93939 5234.. nonce: _VWxKW 5235.. section: Build 5236 5237C extension modules are now built by ``configure`` and ``make`` instead of 5238``distutils`` and ``setup.py``. 5239 5240.. 5241 5242.. date: 2022-06-27-11-57-15 5243.. gh-issue: 93939 5244.. nonce: rv7s8W 5245.. section: Build 5246 5247The ``2to3``, ``idle``, and ``pydoc`` scripts are now generated and 5248installed by ``Makefile`` instead of ``setup.py``. 5249 5250.. 5251 5252.. date: 2022-06-25-23-25-47 5253.. gh-issue: 94280 5254.. nonce: YhEyW_ 5255.. section: Build 5256 5257Updated pegen regeneration script on Windows to find and use Python 3.9 or 5258higher. Prior to this, pegen regeneration already required 3.9 or higher, 5259but the script may have used lower versions of Python. 5260 5261.. 5262 5263.. date: 2022-06-08-14-28-03 5264.. gh-issue: 93584 5265.. nonce: 0xfHOK 5266.. section: Build 5267 5268Address race condition in ``Makefile`` when installing a PGO build. All 5269``test`` and ``install`` targets now depend on ``all`` target. 5270 5271.. 5272 5273.. date: 2022-06-04-12-53-53 5274.. gh-issue: 93491 5275.. nonce: ehM211 5276.. section: Build 5277 5278``configure`` now detects and reports :pep:`11` support tiers. 5279 5280.. 5281 5282.. date: 2022-05-31-18-04-58 5283.. gh-issue: 69093 5284.. nonce: 6lSa0C 5285.. section: Build 5286 5287Fix ``Modules/Setup.stdlib.in`` rule for ``_sqlite3`` extension. 5288 5289.. 5290 5291.. date: 2022-05-25-13-56-00 5292.. gh-issue: 93207 5293.. nonce: B9Rubf 5294.. section: Build 5295 5296``va_start()`` with two parameters, like ``va_start(args, format),`` is now 5297required to build Python. ``va_start()`` is no longer called with a single 5298parameter. Patch by Kumar Aditya. 5299 5300.. 5301 5302.. date: 2022-05-25-05-46-00 5303.. gh-issue: 93202 5304.. nonce: T37jtj 5305.. section: Build 5306 5307Python now always use the ``%zu`` and ``%zd`` printf formats to format a 5308:c:type:`size_t` or ``Py_ssize_t`` number. Building Python 3.12 requires a C11 5309compiler, so these printf formats are now always supported. Patch by Victor 5310Stinner. 5311 5312.. 5313 5314.. date: 2022-05-12-10-19-15 5315.. gh-issue: 90473 5316.. nonce: -syvqK 5317.. section: Build 5318 5319Disable pymalloc and increase stack size on ``wasm32-wasi``. 5320 5321.. 5322 5323.. bpo: 34449 5324.. date: 2018-08-21-11-10-18 5325.. nonce: Z3qm3c 5326.. section: Build 5327 5328Drop invalid compiler switch ``-fPIC`` for HP aCC on HP-UX. Patch by Michael 5329Osipov. 5330 5331.. 5332 5333.. date: 2022-10-19-20-00-28 5334.. gh-issue: 98360 5335.. nonce: O2m6YG 5336.. section: Windows 5337 5338Fixes :mod:`multiprocessing` spawning child processes on Windows from a 5339virtual environment to ensure that child processes that also use 5340:mod:`multiprocessing` to spawn more children will recognize that they are 5341in a virtual environment. 5342 5343.. 5344 5345.. date: 2022-10-19-19-35-37 5346.. gh-issue: 98414 5347.. nonce: FbHZuS 5348.. section: Windows 5349 5350Fix :file:`py.exe` launcher handling of :samp:`-V:{<company>}/` option when 5351default preferences have been set in environment variables or configuration 5352files. 5353 5354.. 5355 5356.. date: 2022-10-02-11-59-23 5357.. gh-issue: 97728 5358.. nonce: dIdlPE 5359.. section: Windows 5360 5361Fix possible crashes caused by the use of uninitialized variables when pass 5362invalid arguments in :func:`os.system` on Windows and in Windows-specific 5363modules (like ``winreg``). 5364 5365.. 5366 5367.. date: 2022-09-29-23-08-49 5368.. gh-issue: 90989 5369.. nonce: no89Q2 5370.. section: Windows 5371 5372Made :ref:`launcher` install per-user by default (unless an all users 5373install already exists), and clarify some text in the installer. 5374 5375.. 5376 5377.. date: 2022-09-29-22-27-04 5378.. gh-issue: 97649 5379.. nonce: bI7OQU 5380.. section: Windows 5381 5382The ``Tools`` directory is no longer installed on Windows 5383 5384.. 5385 5386.. date: 2022-09-23-15-40-04 5387.. gh-issue: 96965 5388.. nonce: CsnEGs 5389.. section: Windows 5390 5391Update libffi to 3.4.3 5392 5393.. 5394 5395.. date: 2022-09-07-00-11-33 5396.. gh-issue: 96577 5397.. nonce: kV4K_1 5398.. section: Windows 5399 5400Fixes a potential buffer overrun in :mod:`!msilib`. 5401 5402.. 5403 5404.. date: 2022-09-05-18-32-47 5405.. gh-issue: 96559 5406.. nonce: 561sUd 5407.. section: Windows 5408 5409Fixes the Windows launcher not using the compatible interpretation of 5410default tags found in configuration files when no tag was passed to the 5411command. 5412 5413.. 5414 5415.. date: 2022-08-30-12-01-51 5416.. gh-issue: 94781 5417.. nonce: OxO-Gr 5418.. section: Windows 5419 5420Fix :file:`pcbuild.proj` to clean previous instances of output files in 5421``Python\deepfreeze`` and ``Python\frozen_modules`` directories on Windows. 5422Patch by Charlie Zhao. 5423 5424.. 5425 5426.. date: 2022-08-26-00-11-18 5427.. gh-issue: 89545 5428.. nonce: zmJMY_ 5429.. section: Windows 5430 5431Updates :mod:`platform` code getting the Windows version to use native 5432Windows Management Instrumentation (WMI) queries to determine OS version, 5433type, and architecture. 5434 5435.. 5436 5437.. date: 2022-08-10-22-46-48 5438.. gh-issue: 95733 5439.. nonce: 2_urOp 5440.. section: Windows 5441 5442Make certain requirements of the Windows Store package optional to allow 5443installing on earlier updates of Windows. 5444 5445.. 5446 5447.. date: 2022-08-04-18-47-54 5448.. gh-issue: 95656 5449.. nonce: VJ1d13 5450.. section: Windows 5451 5452Enable the :meth:`~sqlite3.Connection.enable_load_extension` :mod:`sqlite3` 5453API. 5454 5455.. 5456 5457.. date: 2022-08-04-01-12-27 5458.. gh-issue: 95587 5459.. nonce: Fvdv5q 5460.. section: Windows 5461 5462Fixes some issues where the Windows installer would incorrectly detect 5463certain features of an existing install when upgrading. 5464 5465.. 5466 5467.. date: 2022-08-03-00-49-46 5468.. gh-issue: 94399 5469.. nonce: KvxHc0 5470.. section: Windows 5471 5472Restores the behaviour of :ref:`launcher` for ``/usr/bin/env`` shebang 5473lines, which will now search :envvar:`PATH` for an executable matching the 5474given command. If none is found, the usual search process is used. 5475 5476.. 5477 5478.. date: 2022-07-30-14-18-33 5479.. gh-issue: 95445 5480.. nonce: mjrTaq 5481.. section: Windows 5482 5483Fixes the unsuccessful removal of the HTML document directory when 5484uninstalling with Windows msi. 5485 5486.. 5487 5488.. date: 2022-07-28-20-21-38 5489.. gh-issue: 95359 5490.. nonce: ywMrgu 5491.. section: Windows 5492 5493Fix :ref:`launcher` handling of :file:`py.ini` commands (it was incorrectly 5494expecting a ``py_`` prefix on keys) and crashes when reading per-user 5495configuration file. 5496 5497.. 5498 5499.. date: 2022-07-26-20-33-12 5500.. gh-issue: 95285 5501.. nonce: w6fa22 5502.. section: Windows 5503 5504Fix :ref:`launcher` handling of command lines where it is only passed a 5505short executable name. 5506 5507.. 5508 5509.. date: 2022-07-16-16-18-32 5510.. gh-issue: 90844 5511.. nonce: vwITT3 5512.. section: Windows 5513 5514Allow virtual environments to correctly launch when they have spaces in the 5515path. 5516 5517.. 5518 5519.. date: 2022-07-12-20-45-43 5520.. gh-issue: 94772 5521.. nonce: uNMmdG 5522.. section: Windows 5523 5524Fix incorrect handling of shebang lines in py.exe launcher 5525 5526.. 5527 5528.. date: 2022-06-20-22-32-14 5529.. gh-issue: 94018 5530.. nonce: bycC3A 5531.. section: Windows 5532 5533:mod:`zipfile` will now remove trailing spaces from path components when 5534extracting files on Windows. 5535 5536.. 5537 5538.. date: 2022-06-15-01-03-52 5539.. gh-issue: 93824 5540.. nonce: mR4mxu 5541.. section: Windows 5542 5543Drag and drop of files onto Python files in Windows Explorer has been 5544enabled for Windows ARM64. 5545 5546.. 5547 5548.. date: 2022-05-28-19-36-13 5549.. gh-issue: 43414 5550.. nonce: NGMJ3g 5551.. section: Windows 5552 5553:func:`os.get_terminal_size` now attempts to read the size from any provided 5554handle, rather than only supporting file descriptors 0, 1 and 2. 5555 5556.. 5557 5558.. date: 2022-05-19-21-44-25 5559.. gh-issue: 92817 5560.. nonce: Jrf-Kv 5561.. section: Windows 5562 5563Ensures that :file:`py.exe` will prefer an active virtual environment over 5564default tags specified with environment variables or through a 5565:file:`py.ini` file. 5566 5567.. 5568 5569.. date: 2022-05-19-14-01-30 5570.. gh-issue: 92984 5571.. nonce: Dsxnlr 5572.. section: Windows 5573 5574Explicitly disable incremental linking for non-Debug builds 5575 5576.. 5577 5578.. date: 2022-05-16-11-45-06 5579.. gh-issue: 92841 5580.. nonce: NQx107 5581.. section: Windows 5582 5583:mod:`asyncio` no longer throws ``RuntimeError: Event loop is closed`` on 5584interpreter exit after asynchronous socket activity. Patch by Oleg Iarygin. 5585 5586.. 5587 5588.. bpo: 46907 5589.. date: 2022-05-05-06-27-59 5590.. nonce: IW-uvT 5591.. section: Windows 5592 5593Update Windows installer to use SQLite 3.38.4. 5594 5595.. 5596 5597.. date: 2022-04-12-18-35-20 5598.. gh-issue: 91061 5599.. nonce: x40hSK 5600.. section: Windows 5601 5602Accept os.PathLike for the argument to winsound.PlaySound 5603 5604.. 5605 5606.. bpo: 42658 5607.. date: 2022-03-20-15-47-35 5608.. nonce: 16eXtb 5609.. section: Windows 5610 5611Support native Windows case-insensitive path comparisons by using 5612``LCMapStringEx`` instead of :func:`str.lower` in :func:`ntpath.normcase`. 5613Add ``LCMapStringEx`` to the :mod:`!_winapi` module. 5614 5615.. 5616 5617.. bpo: 38704 5618.. date: 2020-01-10-23-33-03 5619.. nonce: 2Idtdn 5620.. section: Windows 5621 5622Prevent installation on unsupported Windows versions. 5623 5624.. 5625 5626.. date: 2022-10-05-15-26-58 5627.. gh-issue: 97897 5628.. nonce: Rf-C6u 5629.. section: macOS 5630 5631The macOS 13 SDK includes support for the ``mkfifoat`` and ``mknodat`` 5632system calls. Using the ``dir_fd`` option with either :func:`os.mkfifo` or 5633:func:`os.mknod` could result in a segfault if cpython is built with the 5634macOS 13 SDK but run on an earlier version of macOS. Prevent this by adding 5635runtime support for detection of these system calls ("weaklinking") as is 5636done for other newer syscalls on macOS. 5637 5638.. 5639 5640.. date: 2022-10-15-21-20-40 5641.. gh-issue: 97527 5642.. nonce: otAHJM 5643.. section: IDLE 5644 5645Fix a bug in the previous bugfix that caused IDLE to not start when run with 56463.10.8, 3.12.0a1, and at least Microsoft Python 3.10.2288.0 installed 5647without the Lib/test package. 3.11.0 was never affected. 5648 5649.. 5650 5651.. date: 2022-08-04-20-07-51 5652.. gh-issue: 65802 5653.. nonce: xnThWe 5654.. section: IDLE 5655 5656Document handling of extensions in Save As dialogs. 5657 5658.. 5659 5660.. date: 2022-08-01-23-31-48 5661.. gh-issue: 95191 5662.. nonce: U7vryB 5663.. section: IDLE 5664 5665Include prompts when saving Shell (interactive input and output). 5666 5667.. 5668 5669.. date: 2022-07-31-22-15-14 5670.. gh-issue: 95511 5671.. nonce: WX6PmB 5672.. section: IDLE 5673 5674Fix the Shell context menu copy-with-prompts bug of copying an extra line 5675when one selects whole lines. 5676 5677.. 5678 5679.. date: 2022-07-30-15-10-39 5680.. gh-issue: 95471 5681.. nonce: z3scVG 5682.. section: IDLE 5683 5684In the Edit menu, move ``Select All`` and add a new separator. 5685 5686.. 5687 5688.. date: 2022-07-29-11-08-52 5689.. gh-issue: 95411 5690.. nonce: dazlqH 5691.. section: IDLE 5692 5693Enable using IDLE's module browser with .pyw files. 5694 5695.. 5696 5697.. date: 2022-07-28-18-56-57 5698.. gh-issue: 89610 5699.. nonce: hcosiM 5700.. section: IDLE 5701 5702Add .pyi as a recognized extension for IDLE on macOS. This allows opening 5703stub files by double clicking on them in the Finder. 5704 5705.. 5706 5707.. date: 2022-10-07-22-06-11 5708.. gh-issue: 68686 5709.. nonce: 6KNIQ4 5710.. section: Tools/Demos 5711 5712Remove ptags and eptags scripts. 5713 5714.. 5715 5716.. date: 2022-09-30-18-35-11 5717.. gh-issue: 97681 5718.. nonce: -KO1Ba 5719.. section: Tools/Demos 5720 5721Remove the ``Tools/demo/`` directory which contained old demo scripts. A 5722copy can be found in the `old-demos project 5723<https://github.com/gvanrossum/old-demos>`_. Patch by Victor Stinner. 5724 5725.. 5726 5727.. date: 2022-09-30-14-30-12 5728.. gh-issue: 97669 5729.. nonce: gvbgcg 5730.. section: Tools/Demos 5731 5732Remove outdated example scripts of the ``Tools/scripts/`` directory. A copy 5733can be found in the `old-demos project 5734<https://github.com/gvanrossum/old-demos>`_. Patch by Victor Stinner. 5735 5736.. 5737 5738.. date: 2022-08-29-17-25-13 5739.. gh-issue: 95853 5740.. nonce: Ce17cT 5741.. section: Tools/Demos 5742 5743The ``wasm_build.py`` script now pre-builds Emscripten ports, checks for 5744broken EMSDK versions, and warns about pkg-config env vars. 5745 5746.. 5747 5748.. date: 2022-08-10-17-08-43 5749.. gh-issue: 95853 5750.. nonce: HCjC2m 5751.. section: Tools/Demos 5752 5753The new tool ``Tools/wasm/wasm_builder.py`` automates configure, compile, 5754and test steps for building CPython on WebAssembly platforms. 5755 5756.. 5757 5758.. date: 2022-08-05-23-25-59 5759.. gh-issue: 95731 5760.. nonce: N2KohU 5761.. section: Tools/Demos 5762 5763Fix handling of module docstrings in :file:`Tools/i18n/pygettext.py`. 5764 5765.. 5766 5767.. date: 2022-07-04-10-02-02 5768.. gh-issue: 93939 5769.. nonce: U6sW6H 5770.. section: Tools/Demos 5771 5772Add script ``Tools/scripts/check_modules.py`` to check and validate builtin 5773and shared extension modules. The script also handles ``Modules/Setup`` and 5774will eventually replace ``setup.py``. 5775 5776.. 5777 5778.. date: 2022-07-04-01-37-42 5779.. gh-issue: 94538 5780.. nonce: 1rgy1Y 5781.. section: Tools/Demos 5782 5783Fix Argument Clinic output to custom file destinations. Patch by Erlend E. 5784Aasland. 5785 5786.. 5787 5788.. date: 2022-06-29-22-47-11 5789.. gh-issue: 94430 5790.. nonce: hdov8L 5791.. section: Tools/Demos 5792 5793Allow parameters named ``module`` and ``self`` with custom C names in 5794Argument Clinic. Patch by Erlend E. Aasland 5795 5796.. 5797 5798.. date: 2022-06-19-14-56-33 5799.. gh-issue: 86087 5800.. nonce: R8MkRy 5801.. section: Tools/Demos 5802 5803The ``Tools/scripts/parseentities.py`` script used to parse HTML4 entities 5804has been removed. 5805 5806.. 5807 5808.. date: 2022-10-18-16-16-27 5809.. gh-issue: 98393 5810.. nonce: 55u4BF 5811.. section: C API 5812 5813The :c:func:`PyUnicode_FSDecoder` function no longer accepts bytes-like 5814paths, like :class:`bytearray` and :class:`memoryview` types: only the exact 5815:class:`bytes` type is accepted for bytes strings. Patch by Victor Stinner. 5816 5817.. 5818 5819.. date: 2022-10-05-10-43-32 5820.. gh-issue: 91051 5821.. nonce: ODDRsQ 5822.. section: C API 5823 5824Add :c:func:`PyType_Watch` and related APIs to allow callbacks on 5825:c:func:`PyType_Modified`. 5826 5827.. 5828 5829.. date: 2022-10-03-20-33-24 5830.. gh-issue: 95756 5831.. nonce: SSmXlG 5832.. section: C API 5833 5834Lazily create and cache ``co_`` attributes for better performance for code 5835getters. 5836 5837.. 5838 5839.. date: 2022-09-20-01-04-57 5840.. gh-issue: 96512 5841.. nonce: msZTjF 5842.. section: C API 5843 5844Configuration for the :ref:`integer string conversion length limitation 5845<int_max_str_digits>` now lives in the PyConfig C API struct. 5846 5847.. 5848 5849.. date: 2022-08-16-16-54-42 5850.. gh-issue: 95589 5851.. nonce: 6xE1ar 5852.. section: C API 5853 5854Extensions classes that set ``tp_dictoffset`` and ``tp_weaklistoffset`` lose 5855the support for multiple inheritance, but are now safe. Extension classes 5856should use :c:macro:`Py_TPFLAGS_MANAGED_DICT` and 5857:c:macro:`Py_TPFLAGS_MANAGED_WEAKREF` instead. 5858 5859.. 5860 5861.. date: 2022-08-08-14-36-31 5862.. gh-issue: 95781 5863.. nonce: W_G8YW 5864.. section: C API 5865 5866An unrecognized format character in :c:func:`PyUnicode_FromFormat` and 5867:c:func:`PyUnicode_FromFormatV` now sets a :exc:`SystemError`. In previous 5868versions it caused all the rest of the format string to be copied as-is to 5869the result string, and any extra arguments discarded. 5870 5871.. 5872 5873.. date: 2022-08-03-14-39-08 5874.. gh-issue: 92678 5875.. nonce: ozFTEx 5876.. section: C API 5877 5878Restore the 3.10 behavior for multiple inheritance of C extension classes 5879that store their dictionary at the end of the struct. 5880 5881.. 5882 5883.. date: 2022-08-03-13-01-57 5884.. gh-issue: 92678 5885.. nonce: DLwONN 5886.. section: C API 5887 5888Support C extensions using managed dictionaries by setting the 5889``Py_TPFLAGS_MANAGED_DICT`` flag. 5890 5891.. 5892 5893.. date: 2022-08-01-16-21-39 5894.. gh-issue: 93274 5895.. nonce: QoDHEu 5896.. section: C API 5897 5898API for implementing vectorcall (:c:macro:`Py_TPFLAGS_HAVE_VECTORCALL`, 5899:c:func:`PyVectorcall_NARGS` and :c:func:`PyVectorcall_Call`) was added to 5900the limited API and stable ABI. 5901 5902.. 5903 5904.. date: 2022-07-31-21-58-27 5905.. gh-issue: 95504 5906.. nonce: wy7B1F 5907.. section: C API 5908 5909Fix sign placement when specifying width or precision in 5910:c:func:`PyUnicode_FromFormat` and :c:func:`PyUnicode_FromFormatV`. Patch by 5911Philip Georgi. 5912 5913.. 5914 5915.. date: 2022-07-29-15-24-45 5916.. gh-issue: 93012 5917.. nonce: -DdGEy 5918.. section: C API 5919 5920The :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag is now removed from a class 5921when the class's :py:meth:`~object.__call__` method is reassigned. This 5922makes vectorcall safe to use with mutable types (i.e. heap types without the 5923:const:`immutable <Py_TPFLAGS_IMMUTABLETYPE>` flag). Mutable types that do 5924not override :c:member:`~PyTypeObject.tp_call` now inherit the 5925:c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` flag. 5926 5927.. 5928 5929.. date: 2022-07-29-10-41-59 5930.. gh-issue: 95388 5931.. nonce: aiRSgr 5932.. section: C API 5933 5934Creating :c:macro:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable 5935bases is deprecated and is planned to be disabled in Python 3.14. 5936 5937.. 5938 5939.. date: 2022-07-25-15-54-27 5940.. gh-issue: 92678 5941.. nonce: ziZpxz 5942.. section: C API 5943 5944Adds unstable C-API functions ``_PyObject_VisitManagedDict`` and 5945``_PyObject_ClearManagedDict`` to allow C extensions to allow the VM to 5946manage their object's dictionaries. 5947 5948.. 5949 5950.. date: 2022-07-19-22-37-40 5951.. gh-issue: 94936 5952.. nonce: LGlmKv 5953.. section: C API 5954 5955Added :c:func:`PyCode_GetVarnames`, :c:func:`PyCode_GetCellvars` and 5956:c:func:`PyCode_GetFreevars` for accessing ``co_varnames``, ``co_cellvars`` 5957and ``co_freevars`` respectively via the C API. 5958 5959.. 5960 5961.. date: 2022-07-17-18-21-40 5962.. gh-issue: 94930 5963.. nonce: gPFGDL 5964.. section: C API 5965 5966Fix ``SystemError`` raised when :c:func:`PyArg_ParseTupleAndKeywords` is 5967used with ``#`` in ``(...)`` but without ``PY_SSIZE_T_CLEAN`` defined. 5968 5969.. 5970 5971.. date: 2022-07-12-17-39-32 5972.. gh-issue: 94731 5973.. nonce: 9CPJNU 5974.. section: C API 5975 5976Python again uses C-style casts for most casting operations when compiled 5977with C++. This may trigger compiler warnings, if they are enabled with e.g. 5978``-Wold-style-cast`` or ``-Wzero-as-null-pointer-constant`` options for 5979``g++``. 5980 5981.. 5982 5983.. date: 2022-06-17-13-41-38 5984.. gh-issue: 93937 5985.. nonce: uKVTEh 5986.. section: C API 5987 5988The following frame functions and type are now directly available with 5989``#include <Python.h>``, it's no longer needed to add ``#include 5990<frameobject.h>``: 5991 5992* :c:func:`PyFrame_Check` 5993* :c:func:`PyFrame_GetBack` 5994* :c:func:`PyFrame_GetBuiltins` 5995* :c:func:`PyFrame_GetGenerator` 5996* :c:func:`PyFrame_GetGlobals` 5997* :c:func:`PyFrame_GetLasti` 5998* :c:func:`PyFrame_GetLocals` 5999* :c:type:`PyFrame_Type` 6000 6001Patch by Victor Stinner. 6002 6003.. 6004 6005.. date: 2022-06-13-21-37-31 6006.. gh-issue: 91321 6007.. nonce: DgJFvS 6008.. section: C API 6009 6010Fix the compatibility of the Python C API with C++ older than C++11. Patch 6011by Victor Stinner. 6012 6013.. 6014 6015.. date: 2022-06-10-23-41-48 6016.. gh-issue: 91731 6017.. nonce: fhYUQG 6018.. section: C API 6019 6020Avoid defining the ``static_assert`` when compiling with C++ 11, where this 6021is a keyword and redefining it can lead to undefined behavior. Patch by 6022Pablo Galindo 6023 6024.. 6025 6026.. date: 2022-06-10-16-50-27 6027.. gh-issue: 89546 6028.. nonce: mX1f10 6029.. section: C API 6030 6031:c:func:`PyType_FromMetaclass` (and other ``PyType_From*`` functions) now 6032check that offsets and the base class's 6033:c:member:`~PyTypeObject.tp_basicsize` fit in the new class's 6034``tp_basicsize``. 6035 6036.. 6037 6038.. date: 2022-06-06-16-04-14 6039.. gh-issue: 93503 6040.. nonce: MHJTu8 6041.. section: C API 6042 6043Add two new public functions to the public C-API, 6044:c:func:`PyEval_SetProfileAllThreads` and 6045:c:func:`PyEval_SetTraceAllThreads`, that allow to set tracing and profiling 6046functions in all running threads in addition to the calling one. Also, two 6047analogous functions to the :mod:`threading` module 6048(:func:`threading.setprofile_all_threads` and 6049:func:`threading.settrace_all_threads`) that allow to do the same from 6050Python. Patch by Pablo Galindo 6051 6052.. 6053 6054.. date: 2022-06-04-13-15-41 6055.. gh-issue: 93442 6056.. nonce: 4M4NDb 6057.. section: C API 6058 6059Add C++ overloads for _Py_CAST_impl() to handle 0/NULL. This will allow C++ 6060extensions that pass 0 or NULL to macros using _Py_CAST() to continue to 6061compile. 6062 6063.. 6064 6065.. date: 2022-06-03-14-54-41 6066.. gh-issue: 93466 6067.. nonce: DDtH0X 6068.. section: C API 6069 6070Slot IDs in PyType_Spec may not be repeated. The documentation was updated 6071to mention this. For some cases of repeated slots, PyType_FromSpec and 6072related functions will now raise an exception. 6073 6074.. 6075 6076.. date: 2022-05-23-15-22-18 6077.. gh-issue: 92898 6078.. nonce: Qjc9d3 6079.. section: C API 6080 6081Fix C++ compiler warnings when casting function arguments to ``PyObject*``. 6082Patch by Serge Guelton. 6083 6084.. 6085 6086.. date: 2022-05-23-13-33-18 6087.. gh-issue: 93103 6088.. nonce: ooD3Eb 6089.. section: C API 6090 6091Deprecate global configuration variables, like 6092:c:var:`Py_IgnoreEnvironmentFlag`, in the documentation: the 6093:c:func:`Py_InitializeFromConfig` API should be instead. Patch by Victor 6094Stinner. 6095 6096.. 6097 6098.. date: 2022-05-23-12-31-04 6099.. gh-issue: 77782 6100.. nonce: ugC8dn 6101.. section: C API 6102 6103Deprecate global configuration variable like 6104:c:var:`Py_IgnoreEnvironmentFlag`: the :c:func:`Py_InitializeFromConfig` API 6105should be instead. Patch by Victor Stinner. 6106 6107.. 6108 6109.. date: 2022-05-19-18-05-51 6110.. gh-issue: 92913 6111.. nonce: Ass1Hv 6112.. section: C API 6113 6114Ensures changes to :c:member:`PyConfig.module_search_paths` are ignored 6115unless :c:member:`PyConfig.module_search_paths_set` is set 6116 6117.. 6118 6119.. date: 2022-05-13-18-17-48 6120.. gh-issue: 92781 6121.. nonce: TVDr3- 6122.. section: C API 6123 6124Avoid mixing declarations and code in the C API to fix the compiler warning: 6125"ISO C90 forbids mixed declarations and code" 6126[-Werror=declaration-after-statement]. Patch by Victor Stinner. 6127 6128.. 6129 6130.. date: 2022-05-11-02-33-10 6131.. gh-issue: 92651 6132.. nonce: FIXLf0 6133.. section: C API 6134 6135Remove the ``token.h`` header file. There was never any public tokenizer C 6136API. The ``token.h`` header file was only designed to be used by Python 6137internals. Patch by Victor Stinner. 6138 6139.. 6140 6141.. date: 2022-05-10-12-35-42 6142.. gh-issue: 92536 6143.. nonce: cAoRCZ 6144.. section: C API 6145 6146Remove legacy Unicode APIs based on ``Py_UNICODE*``. 6147 6148.. 6149 6150.. date: 2022-05-09-23-16-38 6151.. gh-issue: 85858 6152.. nonce: VIcNDL 6153.. section: C API 6154 6155Remove the ``PyUnicode_InternImmortal()`` function and the 6156``SSTATE_INTERNED_IMMORTAL`` macro. Patch by Victor Stinner. 6157 6158.. 6159 6160.. date: 2022-05-03-19-35-37 6161.. gh-issue: 92193 6162.. nonce: 61VoFL 6163.. section: C API 6164 6165Add new function :c:func:`PyFunction_SetVectorcall` to the C API which sets 6166the vectorcall field of a given :c:type:`PyFunctionObject`. 6167 6168Warning: extensions using this API must preserve the behavior of the 6169unaltered function! 6170 6171.. 6172 6173.. date: 2022-04-13-16-10-55 6174.. gh-issue: 59121 6175.. nonce: -B7mKp 6176.. section: C API 6177 6178Fixed an assert that prevented ``PyRun_InteractiveOne`` from providing 6179tracebacks when parsing from the provided FD. 6180 6181.. 6182 6183.. bpo: 45383 6184.. date: 2021-10-05-21-59-43 6185.. nonce: TVClgf 6186.. section: C API 6187 6188The :c:func:`PyType_FromSpec` API will now find and use a metaclass based on 6189the provided bases. An error will be raised if there is a metaclass 6190conflict. 6191