1.. date: 2024-02-13-15-14-39 2.. gh-issue: 115399 3.. nonce: xT-scP 4.. release date: 2024-02-15 5.. section: Security 6 7Update bundled libexpat to 2.6.0 8 9.. 10 11.. date: 2024-02-12-00-33-01 12.. gh-issue: 115243 13.. nonce: e1oGX8 14.. section: Security 15 16Fix possible crashes in :meth:`collections.deque.index` when the deque is 17concurrently modified. 18 19.. 20 21.. date: 2024-02-14-23-50-55 22.. gh-issue: 112087 23.. nonce: H_4W_v 24.. section: Core and Builtins 25 26For an empty reverse iterator for list will be reduced to :func:`reversed`. 27Patch by Donghee Na 28 29.. 30 31.. date: 2024-02-12-17-18-26 32.. gh-issue: 114570 33.. nonce: BzwMlJ 34.. section: Core and Builtins 35 36Add :exc:`PythonFinalizationError` exception. This exception derived from 37:exc:`RuntimeError` is raised when an operation is blocked during the 38:term:`Python finalization <interpreter shutdown>`. Patch by Victor Stinner. 39 40.. 41 42.. date: 2024-02-07-18-04-36 43.. gh-issue: 114695 44.. nonce: o9wP5P 45.. section: Core and Builtins 46 47Add :func:`sys._clear_internal_caches`, which clears all internal 48performance-related caches (and deprecate the less-general 49:func:`sys._clear_type_cache` function). 50 51.. 52 53.. date: 2024-02-07-07-50-12 54.. gh-issue: 114828 55.. nonce: nSXwMi 56.. section: Core and Builtins 57 58Fix compilation crashes in uncommon code examples using :func:`super` inside 59a comprehension in a class body. 60 61.. 62 63.. date: 2024-02-07-00-18-42 64.. gh-issue: 112069 65.. nonce: jRDRR5 66.. section: Core and Builtins 67 68Adapt :class:`set` and :class:`frozenset` methods to Argument Clinic. 69 70.. 71 72.. date: 2024-02-05-12-40-26 73.. gh-issue: 115011 74.. nonce: L1AKF5 75.. section: Core and Builtins 76 77Setters for members with an unsigned integer type now support the same range 78of valid values for objects that has a :meth:`~object.__index__` method as 79for :class:`int`. 80 81.. 82 83.. date: 2024-02-03-04-07-18 84.. gh-issue: 114887 85.. nonce: uLSFmN 86.. section: Core and Builtins 87 88Changed socket type validation in 89:meth:`~asyncio.loop.create_datagram_endpoint` to accept all non-stream 90sockets. This fixes a regression in compatibility with raw sockets. 91 92.. 93 94.. date: 2024-02-03-01-48-38 95.. gh-issue: 114944 96.. nonce: 4J5ELD 97.. section: Core and Builtins 98 99Fixes a race between ``PyParkingLot_Park`` and ``_PyParkingLot_UnparkAll``. 100 101.. 102 103.. date: 2024-02-02-05-27-48 104.. gh-issue: 113462 105.. nonce: VMml8q 106.. section: Core and Builtins 107 108Limit the number of versions that a single class can use. Prevents a few 109wayward classes using up all the version numbers. 110 111.. 112 113.. date: 2024-02-01-23-43-49 114.. gh-issue: 76763 115.. nonce: o_2J6i 116.. section: Core and Builtins 117 118The :func:`chr` builtin function now always raises :exc:`ValueError` for 119values outside the valid range. Previously it raised :exc:`OverflowError` 120for very large or small values. 121 122.. 123 124.. date: 2024-02-01-18-16-52 125.. gh-issue: 114806 126.. nonce: wrH2J6 127.. section: Core and Builtins 128 129No longer specialize calls to classes, if those classes have metaclasses. 130Fixes bug where the ``__call__`` method of the metaclass was not being 131called. 132 133.. 134 135.. date: 2024-01-31-09-10-10 136.. gh-issue: 107944 137.. nonce: XWm1B- 138.. section: Core and Builtins 139 140Improve error message for function calls with bad keyword arguments via 141getargs 142 143.. 144 145.. date: 2024-01-25-18-50-49 146.. gh-issue: 112529 147.. nonce: IbbApA 148.. section: Core and Builtins 149 150The free-threaded build no longer allocates space for the ``PyGC_Head`` 151structure in objects that support cyclic garbage collection. A number of 152other fields and data structures are used as replacements, including 153``ob_gc_bits``, ``ob_tid``, and mimalloc internal data structures. 154 155.. 156 157.. date: 2024-01-22-15-10-01 158.. gh-issue: 114456 159.. nonce: fBFEJF 160.. section: Core and Builtins 161 162Lower the recursion limit under a debug build of WASI. 163 164.. 165 166.. date: 2024-01-22-09-49-02 167.. gh-issue: 114083 168.. nonce: hf1-ku 169.. section: Core and Builtins 170 171Compiler applies folding of LOAD_CONST with following instruction in a 172separate pass before other optimisations. This enables jump threading in 173certain circumstances. 174 175.. 176 177.. date: 2024-01-21-17-29-32 178.. gh-issue: 114388 179.. nonce: UVGO4K 180.. section: Core and Builtins 181 182Fix a :exc:`RuntimeWarning` emitted when assign an integer-like value that 183is not an instance of :class:`int` to an attribute that corresponds to a C 184struct member of :ref:`type <PyMemberDef-types>` T_UINT and T_ULONG. Fix a 185double :exc:`RuntimeWarning` emitted when assign a negative integer value to 186an attribute that corresponds to a C struct member of type T_UINT. 187 188.. 189 190.. date: 2024-01-19-13-18-13 191.. gh-issue: 114265 192.. nonce: 7HAi-- 193.. section: Core and Builtins 194 195Compiler propagates line numbers before optimization, leading to more 196optimization opportunities and removing the need for the 197``guarantee_lineno_for_exits`` hack. 198 199.. 200 201.. date: 2024-01-18-20-20-37 202.. gh-issue: 112529 203.. nonce: oVNvDG 204.. section: Core and Builtins 205 206The free-threaded build now has its own thread-safe GC implementation that 207uses mimalloc to find GC tracked objects. It is non-generational, unlike the 208existing GC implementation. 209 210.. 211 212.. date: 2024-01-17-23-39-20 213.. gh-issue: 114050 214.. nonce: Lnv1oq 215.. section: Core and Builtins 216 217Fix segmentation fault caused by an incorrect format string in ``TypeError`` 218exception when more than two arguments are passed to ``int``. 219 220.. 221 222.. date: 2024-01-17-05-09-32 223.. gh-issue: 112354 224.. nonce: Run9ko 225.. section: Core and Builtins 226 227The ``END_FOR`` instruction now pops only one value. This is to better 228support side exits in loops. 229 230.. 231 232.. date: 2024-01-17-00-52-57 233.. gh-issue: 113884 234.. nonce: CvEjUE 235.. section: Core and Builtins 236 237Make :class:`queue.SimpleQueue` thread safe when the GIL is disabled. 238 239.. 240 241.. date: 2024-01-16-14-41-54 242.. gh-issue: 114058 243.. nonce: Cb2b8h 244.. section: Core and Builtins 245 246Implement the foundations of the Tier 2 redundancy eliminator. 247 248.. 249 250.. date: 2024-01-12-16-40-07 251.. gh-issue: 113939 252.. nonce: Yi3L-e 253.. section: Core and Builtins 254 255frame.clear(): Clear frame.f_locals as well, and not only the fast locals. 256This is relevant once frame.f_locals was accessed, which would contain also 257references to all the locals. 258 259.. 260 261.. date: 2024-01-11-22-58-45 262.. gh-issue: 112050 263.. nonce: hDuvDW 264.. section: Core and Builtins 265 266Convert :class:`collections.deque` to use Argument Clinic. 267 268.. 269 270.. date: 2024-01-08-21-57-41 271.. gh-issue: 112050 272.. nonce: qwgjx1 273.. section: Core and Builtins 274 275Make methods on :class:`collections.deque` thread-safe when the GIL is 276disabled. 277 278.. 279 280.. date: 2023-12-24-03-25-28 281.. gh-issue: 113464 282.. nonce: dvjQmA 283.. section: Core and Builtins 284 285Add an option (``--enable-experimental-jit`` for ``configure``-based builds 286or ``--experimental-jit`` for ``PCbuild``-based ones) to build an 287*experimental* just-in-time compiler, based on `copy-and-patch 288<https://fredrikbk.com/publications/copy-and-patch.pdf>`_ 289 290.. 291 292.. date: 2023-12-22-13-21-39 293.. gh-issue: 113055 294.. nonce: 47xBMF 295.. section: Core and Builtins 296 297Make interp->obmalloc a pointer. For interpreters that share state with the 298main interpreter, this points to the same static memory structure. For 299interpreters with their own obmalloc state, it is heap allocated. Add 300free_obmalloc_arenas() which will free the obmalloc arenas and radix tree 301structures for interpreters with their own obmalloc state. 302 303.. 304 305.. date: 2023-06-06-19-09-00 306.. gh-issue: 55664 307.. nonce: vYYl0V 308.. section: Core and Builtins 309 310Add warning when creating :class:`type` using a namespace dictionary with 311non-string keys. Patched by Daniel Urban and Furkan Onder. 312 313.. 314 315.. date: 2023-05-16-06-52-34 316.. gh-issue: 104530 317.. nonce: mJnA0W 318.. section: Core and Builtins 319 320Use native Win32 condition variables. 321 322.. 323 324.. date: 2024-02-13-18-27-03 325.. gh-issue: 115392 326.. nonce: gle5tp 327.. section: Library 328 329Fix a bug in :mod:`doctest` where incorrect line numbers would be reported 330for decorated functions. 331 332.. 333 334.. date: 2024-02-11-20-23-36 335.. gh-issue: 114563 336.. nonce: RzxNYT 337.. section: Library 338 339Fix several :func:`format` bugs when using the C implementation of 340:class:`~decimal.Decimal`: * memory leak in some rare cases when using the 341``z`` format option (coerce negative 0) * incorrect output when applying the 342``z`` format option to type ``F`` (fixed-point with capital ``NAN`` / 343``INF``) * incorrect output when applying the ``#`` format option (alternate 344form) 345 346.. 347 348.. date: 2024-02-10-15-24-20 349.. gh-issue: 102840 350.. nonce: 4mnDq1 351.. section: Library 352 353Fix confused traceback when floordiv, mod, or divmod operations happens 354between instances of :class:`fractions.Fraction` and :class:`complex`. 355 356.. 357 358.. date: 2024-02-09-07-20-16 359.. gh-issue: 115165 360.. nonce: yfJLXA 361.. section: Library 362 363Most exceptions are now ignored when attempting to set the 364``__orig_class__`` attribute on objects returned when calling :mod:`typing` 365generic aliases (including generic aliases created using 366:data:`typing.Annotated`). Previously only :exc:`AttributeError` was 367ignored. Patch by Dave Shawley. 368 369.. 370 371.. date: 2024-02-08-17-04-58 372.. gh-issue: 112903 373.. nonce: SN_vUs 374.. section: Library 375 376Fix "issubclass() arg 1 must be a class" errors in certain cases of multiple 377inheritance with generic aliases (regression in early 3.13 alpha releases). 378 379.. 380 381.. date: 2024-02-08-14-21-28 382.. gh-issue: 115133 383.. nonce: ycl4ko 384.. section: Library 385 386Fix tests for :class:`~xml.etree.ElementTree.XMLPullParser` with Expat 3872.6.0. 388 389.. 390 391.. date: 2024-02-08-13-26-14 392.. gh-issue: 115059 393.. nonce: DqP9dr 394.. section: Library 395 396:meth:`io.BufferedRandom.read1` now flushes the underlying write buffer. 397 398.. 399 400.. date: 2024-02-07-12-37-52 401.. gh-issue: 79382 402.. nonce: Yz_5WB 403.. section: Library 404 405Trailing ``**`` no longer allows to match files and non-existing paths in 406recursive :func:`~glob.glob`. 407 408.. 409 410.. date: 2024-02-06-15-16-28 411.. gh-issue: 67837 412.. nonce: _JKa73 413.. section: Library 414 415Avoid race conditions in the creation of directories during concurrent 416extraction in :mod:`tarfile` and :mod:`zipfile`. 417 418.. 419 420.. date: 2024-02-06-03-55-46 421.. gh-issue: 115060 422.. nonce: EkWRpP 423.. section: Library 424 425Speed up :meth:`pathlib.Path.glob` by removing redundant regex matching. 426 427.. 428 429.. date: 2024-02-05-16-48-06 430.. gh-issue: 97928 431.. nonce: JZCies 432.. section: Library 433 434Partially revert the behavior of :meth:`tkinter.Text.count`. By default it 435preserves the behavior of older Python versions, except that setting 436``wantobjects`` to 0 no longer has effect. Add a new parameter 437*return_ints*: specifying ``return_ints=True`` makes ``Text.count()`` always 438returning the single count as an integer instead of a 1-tuple or ``None``. 439 440.. 441 442.. date: 2024-02-04-13-17-33 443.. gh-issue: 114628 444.. nonce: WJpqqS 445.. section: Library 446 447When csv.Error is raised when handling TypeError, do not print the TypeError 448traceback. 449 450.. 451 452.. date: 2024-02-04-02-28-37 453.. gh-issue: 85984 454.. nonce: NHZVTQ 455.. section: Library 456 457Added ``_POSIX_VDISABLE`` from C's ``<unistd.h>`` to :mod:`termios`. 458 459.. 460 461.. date: 2024-02-03-17-54-17 462.. gh-issue: 114965 463.. nonce: gHksCK 464.. section: Library 465 466Update bundled pip to 24.0 467 468.. 469 470.. date: 2024-02-03-16-59-25 471.. gh-issue: 114959 472.. nonce: dCfAG2 473.. section: Library 474 475:mod:`tarfile` no longer ignores errors when trying to extract a directory 476on top of a file. 477 478.. 479 480.. date: 2024-02-02-15-50-13 481.. gh-issue: 114894 482.. nonce: DF-dSd 483.. section: Library 484 485Add :meth:`array.array.clear`. 486 487.. 488 489.. date: 2024-02-01-10-19-11 490.. gh-issue: 114071 491.. nonce: vkm2G_ 492.. section: Library 493 494Support tuple subclasses using auto() for enum member value. 495 496.. 497 498.. date: 2024-01-31-20-07-11 499.. gh-issue: 109475 500.. nonce: lmTb9S 501.. section: Library 502 503Fix support of explicit option value "--" in :mod:`argparse` (e.g. 504``--option=--``). 505 506.. 507 508.. date: 2024-01-30-22-10-50 509.. gh-issue: 49766 510.. nonce: yulJL_ 511.. section: Library 512 513Fix :class:`~datetime.date`-:class:`~datetime.datetime` comparison. Now the 514special comparison methods like ``__eq__`` and ``__lt__`` return 515:data:`NotImplemented` if one of comparands is :class:`!date` and other is 516:class:`!datetime` instead of ignoring the time part and the time zone or 517forcefully return "not equal" or raise :exc:`TypeError`. It makes comparison 518of :class:`!date` and :class:`!datetime` subclasses more symmetric and 519allows to change the default behavior by overriding the special comparison 520methods in subclasses. 521 522.. 523 524.. date: 2024-01-30-15-34-08 525.. gh-issue: 110190 526.. nonce: Z5PQQX 527.. section: Library 528 529Fix ctypes structs with array on Windows ARM64 platform by setting 530``MAX_STRUCT_SIZE`` to 32 in stgdict. Patch by Diego Russo 531 532.. 533 534.. date: 2024-01-28-19-40-40 535.. gh-issue: 114678 536.. nonce: kYKcJw 537.. section: Library 538 539Ensure that deprecation warning for 'N' specifier in 540:class:`~decimal.Decimal` format is not raised for cases where 'N' appears 541in other places in the format specifier. Based on patch by Stefan Krah. 542 543.. 544 545.. date: 2024-01-28-18-38-18 546.. gh-issue: 70303 547.. nonce: _Lt_pj 548.. section: Library 549 550Return both files and directories from :meth:`pathlib.Path.glob` if a 551pattern ends with "``**``". Previously only directories were returned. 552 553.. 554 555.. date: 2024-01-28-00-48-12 556.. gh-issue: 109653 557.. nonce: vF4exe 558.. section: Library 559 560Improve import time of :mod:`importlib.metadata` and :mod:`email.utils`. 561 562.. 563 564.. date: 2024-01-27-20-11-24 565.. gh-issue: 113280 566.. nonce: CZPQMf 567.. section: Library 568 569Fix a leak of open socket in rare cases when error occurred in 570:class:`ssl.SSLSocket` creation. 571 572.. 573 574.. date: 2024-01-26-16-46-21 575.. gh-issue: 77749 576.. nonce: NY_7TS 577.. section: Library 578 579:meth:`email.policy.EmailPolicy.fold` now always encodes non-ASCII 580characters in headers if :attr:`~email.policy.EmailPolicy.utf8` is false. 581 582.. 583 584.. date: 2024-01-25-19-22-17 585.. gh-issue: 83383 586.. nonce: 3GwO9v 587.. section: Library 588 589Synchronization of the :mod:`dbm.dumb` database is now no-op if there was no 590modification since opening or last synchronization. The directory file for a 591newly created empty :mod:`dbm.dumb` database is now created immediately 592after opening instead of deferring this until synchronizing or closing. 593 594.. 595 596.. date: 2024-01-24-20-51-49 597.. gh-issue: 91602 598.. nonce: 8fOH8l 599.. section: Library 600 601Add *filter* keyword-only parameter to :meth:`sqlite3.Connection.iterdump` 602for filtering database objects to dump. Patch by Mariusz Felisiak. 603 604.. 605 606.. date: 2024-01-24-20-11-46 607.. gh-issue: 112451 608.. nonce: 7YrG4p 609.. section: Library 610 611Prohibit subclassing pure-Python :class:`datetime.timezone`. This is 612consistent with C-extension implementation. Patch by Mariusz Felisiak. 613 614.. 615 616.. date: 2024-01-24-17-25-18 617.. gh-issue: 69893 618.. nonce: PQq5fR 619.. section: Library 620 621Add the :meth:`!close` method for the iterator returned by 622:func:`xml.etree.ElementTree.iterparse`. 623 624.. 625 626.. date: 2024-01-23-23-13-47 627.. gh-issue: 109653 628.. nonce: KLBHmT 629.. section: Library 630 631Reduce the import time of :mod:`threading` module by ~50%. Patch by Daniel 632Hollas. 633 634.. 635 636.. date: 2024-01-23-21-20-40 637.. gh-issue: 114492 638.. nonce: vKxl5o 639.. section: Library 640 641Make the result of :func:`termios.tcgetattr` reproducible on Alpine Linux. 642Previously it could leave a random garbage in some fields. 643 644.. 645 646.. date: 2024-01-23-14-11-49 647.. gh-issue: 114315 648.. nonce: KeVdzl 649.. section: Library 650 651Make :class:`threading.Lock` a real class, not a factory function. Add 652``__new__`` to ``_thread.lock`` type. 653 654.. 655 656.. date: 2024-01-23-13-03-22 657.. gh-issue: 100414 658.. nonce: 5kTdU5 659.. section: Library 660 661Add :mod:`dbm.sqlite3` as a backend to :mod:`dbm`, and make it the new 662default :mod:`!dbm` backend. Patch by Raymond Hettinger and Erlend E. 663Aasland. 664 665.. 666 667.. date: 2024-01-23-11-04-21 668.. gh-issue: 113267 669.. nonce: xe_Pxe 670.. section: Library 671 672Revert changes in :gh:`106584` which made calls of ``TestResult`` methods 673``startTest()`` and ``stopTest()`` unbalanced. 674 675.. 676 677.. date: 2024-01-22-12-10-34 678.. gh-issue: 75128 679.. nonce: 4FGlRS 680.. section: Library 681 682Ignore an :exc:`OSError` in :meth:`asyncio.BaseEventLoop.create_server` when 683IPv6 is available but the interface cannot actually support it. 684 685.. 686 687.. date: 2024-01-22-11-43-38 688.. gh-issue: 114423 689.. nonce: 6mMoPH 690.. section: Library 691 692``_DummyThread`` entries in ``threading._active`` are now automatically 693removed when the related thread dies. 694 695.. 696 697.. date: 2024-01-21-16-32-55 698.. gh-issue: 114257 699.. nonce: bCFld5 700.. section: Library 701 702Dismiss the :exc:`FileNotFound` error in :func:`ctypes.util.find_library` 703and just return ``None`` on Linux. 704 705.. 706 707.. date: 2024-01-19-18-41-02 708.. gh-issue: 114321 709.. nonce: yj_Xw3 710.. section: Library 711 712Expose more platform specific constants in the :mod:`fcntl` module on Linux, 713macOS, FreeBSD and NetBSD. 714 715.. 716 717.. date: 2024-01-19-15-48-06 718.. gh-issue: 114328 719.. nonce: hixxW3 720.. section: Library 721 722The :func:`tty.setcbreak` and new :func:`tty.cfmakecbreak` no longer clears 723the terminal input ICRLF flag. This fixes a regression introduced in 3.12 724that no longer matched how OSes define cbreak mode in their ``stty(1)`` 725manual pages. 726 727.. 728 729.. date: 2024-01-19-12-05-22 730.. gh-issue: 114281 731.. nonce: H5JQe4 732.. section: Library 733 734Remove type hints from ``Lib/asyncio/staggered.py``. The annotations in the 735`typeshed <https://github.com/python/typeshed>`__ project should be used 736instead. 737 738.. 739 740.. date: 2024-01-18-22-29-28 741.. gh-issue: 101438 742.. nonce: 1-uUi_ 743.. section: Library 744 745Avoid reference cycle in ElementTree.iterparse. The iterator returned by 746``ElementTree.iterparse`` may hold on to a file descriptor. The reference 747cycle prevented prompt clean-up of the file descriptor if the returned 748iterator was not exhausted. 749 750.. 751 752.. date: 2024-01-18-10-07-52 753.. gh-issue: 114198 754.. nonce: lK4Iif 755.. section: Library 756 757The signature for the ``__replace__`` method on :mod:`dataclasses` now has 758the first argument named ``self``, rather than ``obj``. 759 760.. 761 762.. date: 2024-01-17-18-53-51 763.. gh-issue: 104522 764.. nonce: 3NyDf4 765.. section: Library 766 767:exc:`OSError` raised when run a subprocess now only has *filename* 768attribute set to *cwd* if the error was caused by a failed attempt to change 769the current directory. 770 771.. 772 773.. date: 2024-01-16-15-59-06 774.. gh-issue: 114149 775.. nonce: LJ8IPm 776.. section: Library 777 778Enum: correctly handle tuple subclasses in custom ``__new__``. 779 780.. 781 782.. date: 2024-01-15-20-21-33 783.. gh-issue: 83648 784.. nonce: HzD_fY 785.. section: Library 786 787Support deprecation of options, positional arguments and subcommands in 788:mod:`argparse`. 789 790.. 791 792.. date: 2024-01-15-19-54-41 793.. gh-issue: 114087 794.. nonce: Xic5vY 795.. section: Library 796 797Speed up ``dataclasses.asdict`` up to 1.35x. 798 799.. 800 801.. date: 2024-01-15-18-42-44 802.. gh-issue: 109534 803.. nonce: wYaLMZ 804.. section: Library 805 806Fix a reference leak in 807:class:`asyncio.selector_events.BaseSelectorEventLoop` when SSL handshakes 808fail. Patch contributed by Jamie Phan. 809 810.. 811 812.. date: 2024-01-12-17-32-36 813.. gh-issue: 79634 814.. nonce: uTSTRI 815.. section: Library 816 817Accept :term:`path-like objects <path-like object>` as patterns in 818:meth:`pathlib.Path.glob` and :meth:`~pathlib.Path.rglob`. 819 820.. 821 822.. date: 2024-01-12-09-35-07 823.. gh-issue: 112202 824.. nonce: t_0V1m 825.. section: Library 826 827Ensure that a :func:`asyncio.Condition.notify` call does not get lost if the 828awakened ``Task`` is simultaneously cancelled or encounters any other error. 829 830.. 831 832.. date: 2024-01-11-20-47-49 833.. gh-issue: 113951 834.. nonce: AzlqFK 835.. section: Library 836 837Fix the behavior of ``tag_unbind()`` methods of :class:`tkinter.Text` and 838:class:`tkinter.Canvas` classes with three arguments. Previously, 839``widget.tag_unbind(tag, sequence, funcid)`` destroyed the current binding 840for *sequence*, leaving *sequence* unbound, and deleted the *funcid* 841command. Now it removes only *funcid* from the binding for *sequence*, 842keeping other commands, and deletes the *funcid* command. It leaves 843*sequence* unbound only if *funcid* was the last bound command. 844 845.. 846 847.. date: 2024-01-11-15-10-53 848.. gh-issue: 97959 849.. nonce: UOj6d4 850.. section: Library 851 852Fix rendering class methods, bound methods, method and function aliases in 853:mod:`pydoc`. Class methods no longer have "method of builtins.type 854instance" note. Corresponding notes are now added for class and unbound 855methods. Method and function aliases now have references to the module or 856the class where the origin was defined if it differs from the current. Bound 857methods are now listed in the static methods section. Methods of builtin 858classes are now supported as well as methods of Python classes. 859 860.. 861 862.. date: 2024-01-07-21-04-24 863.. gh-issue: 113796 864.. nonce: 6iNsCR 865.. section: Library 866 867Add more validation checks in the :class:`csv.Dialect` constructor. 868:exc:`ValueError` is now raised if the same character is used in different 869roles. 870 871.. 872 873.. date: 2024-01-05-16-27-34 874.. gh-issue: 113732 875.. nonce: fgDRXA 876.. section: Library 877 878Fix support of :data:`~csv.QUOTE_NOTNULL` and :data:`~csv.QUOTE_STRINGS` in 879:func:`csv.reader`. 880 881.. 882 883.. date: 2024-01-04-20-58-17 884.. gh-issue: 113225 885.. nonce: -nyJM4 886.. section: Library 887 888Speed up :meth:`pathlib.Path.walk` by using :attr:`os.DirEntry.path` where 889possible. 890 891.. 892 893.. date: 2023-12-18-20-10-50 894.. gh-issue: 89039 895.. nonce: gqFdtU 896.. section: Library 897 898When replace() method is called on a subclass of datetime, date or time, 899properly call derived constructor. Previously, only the base class's 900constructor was called. 901 902Also, make sure to pass non-zero fold values when creating subclasses in 903various methods. Previously, fold was silently ignored. 904 905.. 906 907.. date: 2023-12-09-23-31-17 908.. gh-issue: 112919 909.. nonce: S5k9QN 910.. section: Library 911 912Speed-up :func:`datetime.datetime.replace`, :func:`datetime.date.replace` 913and :func:`datetime.time.replace`. 914 915.. 916 917.. date: 2023-11-27-19-54-43 918.. gh-issue: 59013 919.. nonce: chpQ0e 920.. section: Library 921 922Set breakpoint on the first executable line of the function, instead of the 923line of function definition when the user do ``break func`` using :mod:`pdb` 924 925.. 926 927.. date: 2023-11-24-19-08-50 928.. gh-issue: 112343 929.. nonce: RarGFC 930.. section: Library 931 932Improve handling of pdb convenience variables to avoid replacing string 933contents. 934 935.. 936 937.. date: 2023-11-18-16-30-21 938.. gh-issue: 112240 939.. nonce: YXS0tj 940.. section: Library 941 942Add option to calendar module CLI to specify the weekday to start each week. 943Patch by Steven Ward. 944 945.. 946 947.. date: 2023-11-04-22-32-27 948.. gh-issue: 111741 949.. nonce: f1ufr8 950.. section: Library 951 952Recognise ``image/webp`` as a standard format in the :mod:`mimetypes` 953module. 954 955.. 956 957.. date: 2023-10-27-19-24-58 958.. gh-issue: 43457 959.. nonce: 84lx9H 960.. section: Library 961 962Fix the :mod:`tkinter` widget method :meth:`!wm_attributes`. It now accepts 963the attribute name without the minus prefix to get window attributes and 964allows to specify attributes and values to set as keyword arguments. Add new 965optional keyword argument *return_python_dict*: calling 966``w.wm_attributes(return_python_dict=True)`` returns the attributes as a 967dict instead of a tuple. Calling ``w.wm_attributes()`` now returns a tuple 968instead of string if *wantobjects* was set to 0. 969 970.. 971 972.. date: 2023-10-24-19-19-54 973.. gh-issue: 82626 974.. nonce: _hfLRf 975.. section: Library 976 977Many functions now emit a warning if a boolean value is passed as a file 978descriptor argument. 979 980.. 981 982.. date: 2023-10-19-02-08-12 983.. gh-issue: 111051 984.. nonce: 8h1Dpk 985.. section: Library 986 987Added check for file modification during debugging with :mod:`pdb` 988 989.. 990 991.. date: 2023-10-04-11-09-30 992.. gh-issue: 110345 993.. nonce: fZU1ud 994.. section: Library 995 996Show the Tcl/Tk patchlevel (rather than version) in :meth:`tkinter._test`. 997 998.. 999 1000.. date: 2023-09-22-22-17-45 1001.. gh-issue: 38807 1002.. nonce: m9McRN 1003.. section: Library 1004 1005Fix race condition in :mod:`trace`. Instead of checking if a directory 1006exists and creating it, directly call :func:`os.makedirs` with the kwarg 1007``exist_ok=True``. 1008 1009.. 1010 1011.. date: 2023-07-23-12-28-26 1012.. gh-issue: 75705 1013.. nonce: aB2-Ww 1014.. section: Library 1015 1016Set unixfrom envelope in :class:`mailbox.mbox` and :class:`mailbox.MMDF`. 1017 1018.. 1019 1020.. date: 2023-06-29-14-26-56 1021.. gh-issue: 106233 1022.. nonce: Aqw2HI 1023.. section: Library 1024 1025Fix stacklevel in ``InvalidTZPathWarning`` during :mod:`zoneinfo` module 1026import. 1027 1028.. 1029 1030.. date: 2023-05-30-18-30-11 1031.. gh-issue: 105102 1032.. nonce: SnpK04 1033.. section: Library 1034 1035Allow :class:`ctypes.Union` to be nested in :class:`ctypes.Structure` when 1036the system endianness is the opposite of the classes. 1037 1038.. 1039 1040.. date: 2023-05-08-09-30-00 1041.. gh-issue: 104282 1042.. nonce: h4c6Eb 1043.. section: Library 1044 1045Fix null pointer dereference in :func:`lzma._decode_filter_properties` due 1046to improper handling of BCJ filters with properties of zero length. Patch by 1047Radislav Chugunov. 1048 1049.. 1050 1051.. date: 2023-05-06-04-57-10 1052.. gh-issue: 96471 1053.. nonce: C9wAU7 1054.. section: Library 1055 1056Add :py:class:`queue.Queue` termination with 1057:py:meth:`~queue.Queue.shutdown`. 1058 1059.. 1060 1061.. date: 2023-04-08-11-41-07 1062.. gh-issue: 101599 1063.. nonce: PaWNFh 1064.. section: Library 1065 1066Changed argparse flag options formatting to remove redundancy. 1067 1068.. 1069 1070.. date: 2023-03-15-03-21-18 1071.. gh-issue: 85984 1072.. nonce: Xaq6ZN 1073.. section: Library 1074 1075Add POSIX pseudo-terminal functions :func:`os.posix_openpt`, 1076:func:`os.grantpt`, :func:`os.unlockpt`, and :func:`os.ptsname`. 1077 1078.. 1079 1080.. date: 2023-03-08-00-02-30 1081.. gh-issue: 102512 1082.. nonce: LiugDr 1083.. section: Library 1084 1085When :func:`os.fork` is called from a foreign thread (aka ``_DummyThread``), 1086the type of the thread in a child process is changed to ``_MainThread``. 1087Also changed its name and daemonic status, it can be now joined. 1088 1089.. 1090 1091.. date: 2022-07-31-01-24-40 1092.. gh-issue: 88569 1093.. nonce: eU0--b 1094.. section: Library 1095 1096Add :func:`os.path.isreserved`, which identifies reserved pathnames such as 1097"NUL", "AUX" and "CON". This function is only available on Windows. 1098 1099Deprecate :meth:`pathlib.PurePath.is_reserved`. 1100 1101.. 1102 1103.. bpo: 38364 1104.. date: 2019-10-05-22-56-50 1105.. nonce: sYTCWF 1106.. section: Library 1107 1108The ``inspect`` functions ``isgeneratorfunction``, ``iscoroutinefunction``, 1109``isasyncgenfunction`` now support ``functools.partialmethod`` wrapped 1110functions the same way they support ``functools.partial``. 1111 1112.. 1113 1114.. date: 2024-02-12-12-26-17 1115.. gh-issue: 115233 1116.. nonce: aug6r9 1117.. section: Documentation 1118 1119Fix an example for :class:`~logging.LoggerAdapter` in the Logging Cookbook. 1120 1121.. 1122 1123.. date: 2024-01-17-11-40-03 1124.. gh-issue: 114123 1125.. nonce: LuueXf 1126.. section: Documentation 1127 1128Move the :mod:`csv` module docstring to the :mod:`!csv` module instead of 1129reexporting it from the internal :mod:`!_csv` module, and remove ``__doc__`` 1130from ``csv.__all__``. 1131 1132Move :attr:`!csv.__version__` to the :mod:`!csv` module instead of 1133reexporting it from the internal :mod:`!_csv` module, and remove 1134``__version__`` from ``csv.__all__``. 1135 1136.. 1137 1138.. date: 2024-02-02-13-18-55 1139.. gh-issue: 114099 1140.. nonce: C_ycWg 1141.. section: Tests 1142 1143Added test exclusions required to run the test suite on iOS. 1144 1145.. 1146 1147.. date: 2023-06-02-05-04-15 1148.. gh-issue: 105089 1149.. nonce: KaZFtU 1150.. section: Tests 1151 1152Fix 1153``test.test_zipfile.test_core.TestWithDirectory.test_create_directory_with_write`` 1154test in AIX by doing a bitwise AND of 0xFFFF on mode , so that it will be in 1155sync with ``zinfo.external_attr`` 1156 1157.. 1158 1159.. date: 2024-02-08-19-36-20 1160.. gh-issue: 115167 1161.. nonce: LB9nDK 1162.. section: Build 1163 1164Avoid vendoring ``vcruntime140_threads.dll`` when building with Visual 1165Studio 2022 version 17.8. 1166 1167.. 1168 1169.. date: 2024-02-08-17-38-56 1170.. gh-issue: 113632 1171.. nonce: y9KIGb 1172.. section: Build 1173 1174Promote WASI to a tier 2 platform and drop Emscripten from tier 3 in 1175configure.ac. 1176 1177.. 1178 1179.. date: 2024-02-07-08-23-48 1180.. gh-issue: 114099 1181.. nonce: XcEXEZ 1182.. section: Build 1183 1184configure and Makefile were refactored to accommodate framework builds on 1185Apple platforms other than macOS. 1186 1187.. 1188 1189.. date: 2024-02-01-20-08-11 1190.. gh-issue: 114875 1191.. nonce: x_2iZ9 1192.. section: Build 1193 1194Add :c:func:`!getgrent` as a prerequisite for building the :mod:`grp` 1195module. 1196 1197.. 1198 1199.. date: 2024-02-08-21-37-22 1200.. gh-issue: 115049 1201.. nonce: X1ObpJ 1202.. section: Windows 1203 1204Fixes ``py.exe`` launcher failing when run as users without user profiles. 1205 1206.. 1207 1208.. date: 2024-02-06-09-05-13 1209.. gh-issue: 115009 1210.. nonce: ShMjZs 1211.. section: Windows 1212 1213Update Windows installer to use SQLite 3.45.1. 1214 1215.. 1216 1217.. date: 2024-02-05-16-53-12 1218.. gh-issue: 109991 1219.. nonce: YqjnDz 1220.. section: Windows 1221 1222Update Windows build to use OpenSSL 3.0.13. 1223 1224.. 1225 1226.. date: 2024-02-01-14-35-05 1227.. gh-issue: 111239 1228.. nonce: SO7SUF 1229.. section: Windows 1230 1231Update Windows builds to use zlib v1.3.1. 1232 1233.. 1234 1235.. date: 2024-01-23-00-05-05 1236.. gh-issue: 100107 1237.. nonce: lkbP_Q 1238.. section: Windows 1239 1240The ``py.exe`` launcher will no longer attempt to run the Microsoft Store 1241redirector when launching a script containing a ``/usr/bin/env`` shebang 1242 1243.. 1244 1245.. date: 2023-12-19-22-32-28 1246.. gh-issue: 112984 1247.. nonce: F7kFMl 1248.. section: Windows 1249 1250Adds free-threaded binaries to Windows installer as an optional component. 1251 1252.. 1253 1254.. date: 2023-08-11-18-21-38 1255.. gh-issue: 89240 1256.. nonce: dtSOLG 1257.. section: Windows 1258 1259Allows :mod:`multiprocessing` to create pools of greater than 62 processes. 1260 1261.. 1262 1263.. date: 2024-02-06-09-01-10 1264.. gh-issue: 115009 1265.. nonce: ysau7e 1266.. section: macOS 1267 1268Update macOS installer to use SQLite 3.45.1. 1269 1270.. 1271 1272.. date: 2024-02-05-18-30-27 1273.. gh-issue: 109991 1274.. nonce: tun6Yu 1275.. section: macOS 1276 1277Update macOS installer to use OpenSSL 3.0.13. 1278 1279.. 1280 1281.. date: 2024-01-23-11-35-26 1282.. gh-issue: 114490 1283.. nonce: FrQOQ0 1284.. section: macOS 1285 1286Add Mach-O linkage support for :func:`platform.architecture`. 1287 1288.. 1289 1290.. date: 2022-11-18-10-05-35 1291.. gh-issue: 87804 1292.. nonce: rhlDmD 1293.. section: macOS 1294 1295On macOS the result of ``os.statvfs`` and ``os.fstatvfs`` now correctly 1296report the size of very large disks, in previous versions the reported 1297number of blocks was wrong for disks with at least 2**32 blocks. 1298 1299.. 1300 1301.. date: 2024-01-17-23-18-15 1302.. gh-issue: 96905 1303.. nonce: UYaxoU 1304.. section: IDLE 1305 1306In idlelib code, stop redefining built-ins 'dict' and 'object'. 1307 1308.. 1309 1310.. date: 2023-04-25-03-01-23 1311.. gh-issue: 103820 1312.. nonce: LCSpza 1313.. section: IDLE 1314 1315Revise IDLE bindings so that events from mouse button 4/5 on non-X11 1316windowing systems (i.e. Win32 and Aqua) are not mistaken for scrolling. 1317 1318.. 1319 1320.. date: 2024-02-14-15-58-13 1321.. gh-issue: 113516 1322.. nonce: TyIHWx 1323.. section: Tools/Demos 1324 1325Don't set ``LDSHARED`` when building for WASI. 1326 1327.. 1328 1329.. date: 2024-02-05-19-00-32 1330.. gh-issue: 109991 1331.. nonce: yJSEkw 1332.. section: Tools/Demos 1333 1334Update GitHub CI workflows to use OpenSSL 3.0.13 and multissltests to use 13351.1.1w, 3.0.13, 3.1.5, and 3.2.1. 1336 1337.. 1338 1339.. date: 2024-02-05-02-45-51 1340.. gh-issue: 115015 1341.. nonce: rgtiDB 1342.. section: Tools/Demos 1343 1344Fix a bug in Argument Clinic that generated incorrect code for methods with 1345no parameters that use the :ref:`METH_METHOD | METH_FASTCALL | METH_KEYWORDS 1346<METH_METHOD-METH_FASTCALL-METH_KEYWORDS>` calling convention. Only the 1347positional parameter count was checked; any keyword argument passed would be 1348silently accepted. 1349 1350.. 1351 1352.. date: 2024-02-05-17-11-15 1353.. gh-issue: 111140 1354.. nonce: WMEjid 1355.. section: C API 1356 1357Adds :c:func:`PyLong_AsNativeBytes`, :c:func:`PyLong_FromNativeBytes` and 1358:c:func:`PyLong_FromUnsignedNativeBytes` functions. 1359 1360.. 1361 1362.. date: 2024-01-31-15-43-35 1363.. gh-issue: 114685 1364.. nonce: n7aRmX 1365.. section: C API 1366 1367:c:func:`PyBuffer_FillInfo` now raises a :exc:`SystemError` if called with 1368:c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE` as flags. These flags should 1369only be used with the ``PyMemoryView_*`` C API. 1370 1371.. 1372 1373.. date: 2024-01-29-12-13-24 1374.. gh-issue: 114685 1375.. nonce: B07RME 1376.. section: C API 1377 1378:c:func:`PyObject_GetBuffer` now raises a :exc:`SystemError` if called with 1379:c:macro:`PyBUF_READ` or :c:macro:`PyBUF_WRITE` as flags. These flags should 1380only be used with the ``PyMemoryView_*`` C API. 1381 1382.. 1383 1384.. date: 2024-01-26-21-54-42 1385.. gh-issue: 114626 1386.. nonce: SKhbh_ 1387.. section: C API 1388 1389Add ``PyCFunctionFast`` and ``PyCFunctionFastWithKeywords`` typedefs 1390(identical to the existing ``_PyCFunctionFast`` and 1391``_PyCFunctionFastWithKeywords`` typedefs, just without a leading ``_`` 1392prefix). 1393 1394.. 1395 1396.. date: 2024-01-23-21-45-02 1397.. gh-issue: 114329 1398.. nonce: YRaBoe 1399.. section: C API 1400 1401Add :c:func:`PyList_GetItemRef`, which is similar to 1402:c:func:`PyList_GetItem` but returns a :term:`strong reference` instead of a 1403:term:`borrowed reference`. 1404 1405.. 1406 1407.. date: 2023-11-16-02-07-48 1408.. gh-issue: 110850 1409.. nonce: DQGNfF 1410.. section: C API 1411 1412Add PyTime C API: 1413 1414* :c:type:`PyTime_t` type. 1415* :c:var:`PyTime_MIN` and :c:var:`PyTime_MAX` constants. 1416* :c:func:`PyTime_AsSecondsDouble`, 1417 :c:func:`PyTime_Monotonic`, :c:func:`PyTime_PerfCounter`, and 1418 :c:func:`PyTime_Time` functions. 1419 1420Patch by Victor Stinner. 1421 1422.. 1423 1424.. date: 2023-11-15-13-47-48 1425.. gh-issue: 112066 1426.. nonce: 22WsqR 1427.. section: C API 1428 1429Add :c:func:`PyDict_SetDefaultRef`: insert a key and value into a dictionary 1430if the key is not already present. This is similar to 1431:meth:`dict.setdefault`, but returns an integer value indicating if the key 1432was already present. It is also similar to :c:func:`PyDict_SetDefault`, but 1433returns a strong reference instead of a borrowed reference. 1434