1.. date: 2023-01-06-02-02-11 2.. gh-issue: 100776 3.. nonce: pP8xux 4.. release date: 2023-01-10 5.. section: Core and Builtins 6 7Fix misleading default value in :func:`input`'s ``__text_signature__``. 8 9.. 10 11.. date: 2023-01-05-17-54-29 12.. gh-issue: 99005 13.. nonce: cmGwxv 14.. section: Core and Builtins 15 16Remove :opcode:`!UNARY_POSITIVE`, :opcode:`!ASYNC_GEN_WRAP` and 17:opcode:`!LIST_TO_TUPLE`, replacing them with intrinsics. 18 19.. 20 21.. date: 2023-01-05-13-54-00 22.. gh-issue: 99005 23.. nonce: D7H6j4 24.. section: Core and Builtins 25 26Add new :opcode:`CALL_INTRINSIC_1` instruction. Remove 27:opcode:`IMPORT_STAR`, :opcode:`PRINT_EXPR` and 28:opcode:`STOPITERATION_ERROR`, replacing them with the 29:opcode:`CALL_INTRINSIC_1` instruction. 30 31.. 32 33.. date: 2023-01-04-16-40-55 34.. gh-issue: 100288 35.. nonce: hRSRaT 36.. section: Core and Builtins 37 38Remove the LOAD_ATTR_METHOD_WITH_DICT specialized instruction. Stats show it 39is not useful. 40 41.. 42 43.. date: 2023-01-03-16-50-42 44.. gh-issue: 100720 45.. nonce: UhE7P- 46.. section: Core and Builtins 47 48Added ``_PyFrame_NumSlotsForCodeObject``, which returns the number of slots 49needed in a frame for a given code object. 50 51.. 52 53.. date: 2023-01-03-16-38-18 54.. gh-issue: 100719 55.. nonce: 2C--ko 56.. section: Core and Builtins 57 58Removed the co_nplaincellvars field from the code object, as it is 59redundant. 60 61.. 62 63.. date: 2023-01-01-15-59-48 64.. gh-issue: 100637 65.. nonce: M2n6Kg 66.. section: Core and Builtins 67 68Fix :func:`int.__sizeof__` calculation to include the 1-element ``ob_digit`` 69array for ``0`` and ``False``. 70 71.. 72 73.. date: 2022-12-31-23-32-09 74.. gh-issue: 100649 75.. nonce: C0fY4S 76.. section: Core and Builtins 77 78Update the native_thread_id field of PyThreadState after fork. 79 80.. 81 82.. date: 2022-12-29-04-39-38 83.. gh-issue: 100126 84.. nonce: pfFJd- 85.. section: Core and Builtins 86 87Fix an issue where "incomplete" frames could be briefly visible to C code 88while other frames are being torn down, possibly resulting in corruption or 89hard crashes of the interpreter while running finalizers. 90 91.. 92 93.. date: 2022-12-28-15-02-53 94.. gh-issue: 87447 95.. nonce: 7-aekA 96.. section: Core and Builtins 97 98Fix :exc:`SyntaxError` on comprehension rebind checking with names that are 99not actually redefined. 100 101Now reassigning ``b`` in ``[(b := 1) for a, b.prop in some_iter]`` is 102allowed. Reassigning ``a`` is still disallowed as per :pep:`572`. 103 104.. 105 106.. date: 2022-12-22-21-56-08 107.. gh-issue: 100268 108.. nonce: xw_phB 109.. section: Core and Builtins 110 111Add :meth:`int.is_integer` to improve duck type compatibility between 112:class:`int` and :class:`float`. 113 114.. 115 116.. date: 2022-12-21-22-48-41 117.. gh-issue: 100425 118.. nonce: U64yLu 119.. section: Core and Builtins 120 121Improve the accuracy of ``sum()`` with compensated summation. 122 123.. 124 125.. date: 2022-12-20-16-14-19 126.. gh-issue: 100374 127.. nonce: YRrVHT 128.. section: Core and Builtins 129 130Fix incorrect result and delay in :func:`socket.getfqdn`. Patch by Dominic 131Socular. 132 133.. 134 135.. date: 2022-12-20-09-56-56 136.. gh-issue: 100357 137.. nonce: hPyTwY 138.. section: Core and Builtins 139 140Convert ``vars``, ``dir``, ``next``, ``getattr``, and ``iter`` to argument 141clinic. 142 143.. 144 145.. date: 2022-12-17-19-44-57 146.. gh-issue: 100117 147.. nonce: yRWQ1y 148.. section: Core and Builtins 149 150Improve the output of :meth:`codeobject.co_lines` by emitting only one entry 151for each line range. 152 153.. 154 155.. date: 2022-12-15-00-50-25 156.. gh-issue: 90043 157.. nonce: gyoKdx 158.. section: Core and Builtins 159 160Handle NaNs when specializing :opcode:`COMPARE_OP` for :class:`float` 161values. 162 163.. 164 165.. date: 2022-12-13-16-05-18 166.. gh-issue: 100222 167.. nonce: OVVvYe 168.. section: Core and Builtins 169 170Redefine the ``_Py_CODEUNIT`` typedef as a union to describe its layout to 171the C compiler, avoiding type punning and improving clarity. 172 173.. 174 175.. date: 2022-12-12-11-27-54 176.. gh-issue: 99955 177.. nonce: Ix5Rrg 178.. section: Core and Builtins 179 180Internal compiler functions (in compile.c) now consistently return -1 on 181error and 0 on success. 182 183.. 184 185.. date: 2022-12-12-05-30-12 186.. gh-issue: 100188 187.. nonce: sGCSMR 188.. section: Core and Builtins 189 190The ``BINARY_SUBSCR_LIST_INT`` and ``BINARY_SUBSCR_TUPLE_INT`` instructions 191are no longer used for negative integers because those instructions always 192miss when encountering negative integers. 193 194.. 195 196.. date: 2022-12-12-01-05-16 197.. gh-issue: 99110 198.. nonce: 1JqtIg 199.. section: Core and Builtins 200 201Initialize frame->previous in frameobject.c to fix a segmentation fault when 202accessing frames created by :c:func:`PyFrame_New`. 203 204.. 205 206.. date: 2022-12-12-00-59-11 207.. gh-issue: 94155 208.. nonce: LWE9y_ 209.. section: Core and Builtins 210 211Improved the hashing algorithm for code objects, mitigating some hash 212collisions. 213 214.. 215 216.. date: 2022-12-10-20-00-13 217.. gh-issue: 99540 218.. nonce: ZZZHeP 219.. section: Core and Builtins 220 221``None`` now hashes to a constant value. This is not a requirements change. 222 223.. 224 225.. date: 2022-12-09-14-27-36 226.. gh-issue: 100143 227.. nonce: 5g9rb4 228.. section: Core and Builtins 229 230When built with ``--enable-pystats``, stats collection is now off by 231default. To enable it early at startup, pass the ``-Xpystats`` flag. Stats 232are now always dumped, even if switched off. 233 234.. 235 236.. date: 2022-12-09-13-18-42 237.. gh-issue: 100146 238.. nonce: xLVKg0 239.. section: Core and Builtins 240 241Improve ``BUILD_LIST`` opcode so that it works similarly to the 242``BUILD_TUPLE`` opcode, by stealing references from the stack rather than 243repeatedly using stack operations to set list elements. Implementation 244details are in a new private API :c:func:`!_PyList_FromArraySteal`. 245 246.. 247 248.. date: 2022-12-08-12-26-34 249.. gh-issue: 100110 250.. nonce: ertac- 251.. section: Core and Builtins 252 253Specialize ``FOR_ITER`` for tuples. 254 255.. 256 257.. date: 2022-12-06-22-24-01 258.. gh-issue: 100050 259.. nonce: lcrPqQ 260.. section: Core and Builtins 261 262Honor existing errors obtained when searching for mismatching parentheses in 263the tokenizer. Patch by Pablo Galindo 264 265.. 266 267.. date: 2022-12-04-00-38-33 268.. gh-issue: 92216 269.. nonce: CJXuWB 270.. section: Core and Builtins 271 272Improve the performance of :func:`hasattr` for type objects with a missing 273attribute. 274 275.. 276 277.. date: 2022-11-19-01-11-06 278.. gh-issue: 99582 279.. nonce: wvOBVy 280.. section: Core and Builtins 281 282Freeze :mod:`zipimport` module into ``_bootstrap_python``. 283 284.. 285 286.. date: 2022-11-16-05-57-24 287.. gh-issue: 99554 288.. nonce: A_Ywd2 289.. section: Core and Builtins 290 291Pack debugging location tables more efficiently during bytecode compilation. 292 293.. 294 295.. date: 2022-10-21-16-10-39 296.. gh-issue: 98522 297.. nonce: s_SixG 298.. section: Core and Builtins 299 300Add an internal version number to code objects, to give better versioning of 301inner functions and comprehensions, and thus better specialization of those 302functions. This change is invisible to both Python and C extensions. 303 304.. 305 306.. date: 2022-07-06-18-44-00 307.. gh-issue: 94603 308.. nonce: Q_03xV 309.. section: Core and Builtins 310 311Improve performance of ``list.pop`` for small lists. 312 313.. 314 315.. date: 2022-06-17-08-00-34 316.. gh-issue: 89051 317.. nonce: yP4Na0 318.. section: Core and Builtins 319 320Add :const:`ssl.OP_LEGACY_SERVER_CONNECT` 321 322.. 323 324.. bpo: 32782 325.. date: 2018-02-06-23-21-13 326.. nonce: EJVSfR 327.. section: Core and Builtins 328 329``ctypes`` arrays of length 0 now report a correct itemsize when a 330``memoryview`` is constructed from them, rather than always giving a value 331of 0. 332 333.. 334 335.. date: 2023-01-08-12-10-17 336.. gh-issue: 100833 337.. nonce: f6cT7E 338.. section: Library 339 340Speed up :func:`math.fsum` by removing defensive ``volatile`` qualifiers. 341 342.. 343 344.. date: 2023-01-07-15-13-47 345.. gh-issue: 100805 346.. nonce: 05rBz9 347.. section: Library 348 349Modify :func:`random.choice` implementation to once again work with NumPy 350arrays. 351 352.. 353 354.. date: 2023-01-06-22-36-27 355.. gh-issue: 100813 356.. nonce: mHRdQn 357.. section: Library 358 359Add :const:`socket.IP_PKTINFO` constant. 360 361.. 362 363.. date: 2023-01-06-14-05-15 364.. gh-issue: 100792 365.. nonce: CEOJth 366.. section: Library 367 368Make :meth:`email.message.Message.__contains__` twice as fast. 369 370.. 371 372.. date: 2023-01-05-23-04-15 373.. gh-issue: 91851 374.. nonce: AuCzU5 375.. section: Library 376 377Microoptimizations for :meth:`fractions.Fraction.__round__`, 378:meth:`fractions.Fraction.__ceil__` and 379:meth:`fractions.Fraction.__floor__`. 380 381.. 382 383.. date: 2023-01-04-22-10-31 384.. gh-issue: 90104 385.. nonce: yZk5EX 386.. section: Library 387 388Avoid RecursionError on ``repr`` if a dataclass field definition has a 389cyclic reference. 390 391.. 392 393.. date: 2023-01-04-12-58-59 394.. gh-issue: 100689 395.. nonce: Ce0ITG 396.. section: Library 397 398Fix crash in :mod:`pyexpat` by statically allocating ``PyExpat_CAPI`` 399capsule. 400 401.. 402 403.. date: 2023-01-04-09-53-38 404.. gh-issue: 100740 405.. nonce: -j5UjI 406.. section: Library 407 408Fix ``unittest.mock.Mock`` not respecting the spec for attribute names 409prefixed with ``assert``. 410 411.. 412 413.. date: 2023-01-03-11-06-28 414.. gh-issue: 91219 415.. nonce: s5IFCw 416.. section: Library 417 418Change ``SimpleHTTPRequestHandler`` to support subclassing to provide a 419different set of index file names instead of using ``__init__`` parameters. 420 421.. 422 423.. date: 2023-01-02-16-59-49 424.. gh-issue: 100690 425.. nonce: 2EgWPS 426.. section: Library 427 428``Mock`` objects which are not unsafe will now raise an ``AttributeError`` 429when accessing an attribute that matches the name of an assertion but 430without the prefix ``assert_``, e.g. accessing ``called_once`` instead of 431``assert_called_once``. This is in addition to this already happening for 432accessing attributes with prefixes ``assert``, ``assret``, ``asert``, 433``aseert``, and ``assrt``. 434 435.. 436 437.. date: 2023-01-01-23-57-00 438.. gh-issue: 89727 439.. nonce: ojedHN 440.. section: Library 441 442Simplify and optimize :func:`os.walk` by using :func:`isinstance` checks to 443check the top of the stack. 444 445.. 446 447.. date: 2023-01-01-21-54-46 448.. gh-issue: 100485 449.. nonce: geNrHS 450.. section: Library 451 452Add math.sumprod() to compute the sum of products. 453 454.. 455 456.. date: 2022-12-30-07-49-08 457.. gh-issue: 86508 458.. nonce: nGZDzC 459.. section: Library 460 461Fix :func:`asyncio.open_connection` to skip binding to local addresses of 462different family. Patch by Kumar Aditya. 463 464.. 465 466.. date: 2022-12-29-11-45-22 467.. gh-issue: 97930 468.. nonce: hrtmJe 469.. section: Library 470 471``importlib.resources.files`` now accepts a module as an anchor instead of 472only accepting packages. If a module is passed, resources are resolved 473adjacent to that module (in the same package or at the package root). The 474parameter was renamed from ``package`` to ``anchor`` with a compatibility 475shim for those passing by keyword. Additionally, the new ``anchor`` 476parameter is now optional and will default to the caller's module. 477 478.. 479 480.. date: 2022-12-28-17-38-39 481.. gh-issue: 100585 482.. nonce: BiiTlG 483.. section: Library 484 485Fixed a bug where importlib.resources.as_file was leaving file pointers open 486 487.. 488 489.. date: 2022-12-28-00-28-43 490.. gh-issue: 100562 491.. nonce: Hic0Z0 492.. section: Library 493 494Improve performance of :meth:`pathlib.Path.absolute` by nearly 2x. This 495comes at the cost of a performance regression in :meth:`pathlib.Path.cwd`, 496which is generally used less frequently in user code. 497 498.. 499 500.. date: 2022-12-24-16-39-53 501.. gh-issue: 100519 502.. nonce: G_dZLP 503.. section: Library 504 505Small simplification of :func:`http.cookiejar.eff_request_host` that 506improves readability and better matches the RFC wording. 507 508.. 509 510.. date: 2022-12-24-08-42-05 511.. gh-issue: 100287 512.. nonce: n0oEuG 513.. section: Library 514 515Fix the interaction of :func:`unittest.mock.seal` with 516:class:`unittest.mock.AsyncMock`. 517 518.. 519 520.. date: 2022-12-24-04-13-54 521.. gh-issue: 100488 522.. nonce: Ut8HbE 523.. section: Library 524 525Add :meth:`Fraction.is_integer` to check whether a 526:class:`fractions.Fraction` is an integer. This improves duck type 527compatibility with :class:`float` and :class:`int`. 528 529.. 530 531.. date: 2022-12-23-21-02-43 532.. gh-issue: 100474 533.. nonce: gppA4U 534.. section: Library 535 536:mod:`http.server` now checks that an index page is actually a regular file 537before trying to serve it. This avoids issues with directories named 538``index.html``. 539 540.. 541 542.. date: 2022-12-20-11-07-30 543.. gh-issue: 100363 544.. nonce: Wo_Beg 545.. section: Library 546 547Speed up :func:`asyncio.get_running_loop` by removing redundant ``getpid`` 548checks. Patch by Kumar Aditya. 549 550.. 551 552.. date: 2022-12-19-20-54-04 553.. gh-issue: 78878 554.. nonce: JrkYqJ 555.. section: Library 556 557Fix crash when creating an instance of :class:`!_ctypes.CField`. 558 559.. 560 561.. date: 2022-12-19-19-30-06 562.. gh-issue: 100348 563.. nonce: o7IAHh 564.. section: Library 565 566Fix ref cycle in :class:`!asyncio._SelectorSocketTransport` by removing 567``_read_ready_cb`` in ``close``. 568 569.. 570 571.. date: 2022-12-19-12-18-28 572.. gh-issue: 100344 573.. nonce: lfCqpE 574.. section: Library 575 576Provide C implementation for :func:`asyncio.current_task` for a 4x-6x 577speedup. 578 579.. 580 581.. date: 2022-12-15-18-28-13 582.. gh-issue: 100272 583.. nonce: D1O9Ey 584.. section: Library 585 586Fix JSON serialization of OrderedDict. It now preserves the order of keys. 587 588.. 589 590.. date: 2022-12-14-17-37-01 591.. gh-issue: 83076 592.. nonce: NaYzWT 593.. section: Library 594 595Instantiation of ``Mock()`` and ``AsyncMock()`` is now 3.8x faster. 596 597.. 598 599.. date: 2022-12-14-11-45-38 600.. gh-issue: 100234 601.. nonce: kn6yWV 602.. section: Library 603 604Set a default value of 1.0 for the ``lambd`` parameter in 605random.expovariate(). 606 607.. 608 609.. date: 2022-12-13-17-29-09 610.. gh-issue: 100228 611.. nonce: bgtzMV 612.. section: Library 613 614A :exc:`DeprecationWarning` may be raised when :func:`os.fork` or 615:func:`os.forkpty` is called from multi-threaded processes. Forking with 616threads is unsafe and can cause deadlocks, crashes and subtle problems. Lack 617of a warning does not indicate that the fork call was actually safe, as 618Python may not be aware of all threads. 619 620.. 621 622.. date: 2022-12-10-20-52-28 623.. gh-issue: 100039 624.. nonce: zDqjT4 625.. section: Library 626 627Improve signatures for enums and flags. 628 629.. 630 631.. date: 2022-12-10-08-36-07 632.. gh-issue: 100133 633.. nonce: g-zQlp 634.. section: Library 635 636Fix regression in :mod:`asyncio` where a subprocess would sometimes lose 637data received from pipe. 638 639.. 640 641.. bpo: 44592 642.. date: 2022-12-09-10-35-36 643.. nonce: z-P3oe 644.. section: Library 645 646Fixes inconsistent handling of case sensitivity of *extrasaction* arg in 647:class:`csv.DictWriter`. 648 649.. 650 651.. date: 2022-12-08-06-18-06 652.. gh-issue: 100098 653.. nonce: uBvPlp 654.. section: Library 655 656Fix ``tuple`` subclasses being cast to ``tuple`` when used as enum values. 657 658.. 659 660.. date: 2022-12-04-16-12-04 661.. gh-issue: 85432 662.. nonce: l_ehmI 663.. section: Library 664 665Rename the *fmt* parameter of the pure-Python implementation of 666:meth:`datetime.time.strftime` to *format*. Rename the *t* parameter of 667:meth:`datetime.datetime.fromtimestamp` to *timestamp*. These changes mean 668the parameter names in the pure-Python implementation now match the 669parameter names in the C implementation. Patch by Alex Waygood. 670 671.. 672 673.. date: 2022-12-03-20-06-16 674.. gh-issue: 98778 675.. nonce: t5U9uc 676.. section: Library 677 678Update :exc:`~urllib.error.HTTPError` to be initialized properly, even if 679the ``fp`` is ``None``. Patch by Donghee Na. 680 681.. 682 683.. date: 2022-12-01-15-44-58 684.. gh-issue: 99925 685.. nonce: x4y6pF 686.. section: Library 687 688Unify error messages in JSON serialization between 689``json.dumps(float('nan'), allow_nan=False)`` and ``json.dumps(float('nan'), 690allow_nan=False, indent=<SOMETHING>)``. Now both include the representation 691of the value that could not be serialized. 692 693.. 694 695.. date: 2022-11-29-20-44-54 696.. gh-issue: 89727 697.. nonce: UJZjkk 698.. section: Library 699 700Fix issue with :func:`os.walk` where a :exc:`RecursionError` would occur on 701deep directory structures by adjusting the implementation of :func:`os.walk` 702to be iterative instead of recursive. 703 704.. 705 706.. date: 2022-11-23-23-58-45 707.. gh-issue: 94943 708.. nonce: Oog0Zo 709.. section: Library 710 711Add :ref:`enum-dataclass-support` to the :class:`~enum.Enum` 712:meth:`~enum.Enum.__repr__`. When inheriting from a 713:class:`~dataclasses.dataclass`, only show the field names in the value 714section of the member :func:`repr`, and not the dataclass' class name. 715 716.. 717 718.. date: 2022-11-21-16-24-01 719.. gh-issue: 83035 720.. nonce: qZIujU 721.. section: Library 722 723Fix :func:`inspect.getsource` handling of decorator calls with nested 724parentheses. 725 726.. 727 728.. date: 2022-11-20-11-59-54 729.. gh-issue: 99576 730.. nonce: ZD7jU6 731.. section: Library 732 733Fix ``.save()`` method for ``LWPCookieJar`` and ``MozillaCookieJar``: saved 734file was not truncated on repeated save. 735 736.. 737 738.. date: 2022-11-17-10-02-18 739.. gh-issue: 94912 740.. nonce: G2aa-E 741.. section: Library 742 743Add :func:`inspect.markcoroutinefunction` decorator which manually marks a 744function as a coroutine for the benefit of :func:`iscoroutinefunction`. 745 746.. 747 748.. date: 2022-11-15-18-45-01 749.. gh-issue: 99509 750.. nonce: FLK0xU 751.. section: Library 752 753Add :pep:`585` support for :class:`multiprocessing.queues.Queue`. 754 755.. 756 757.. date: 2022-11-14-19-58-36 758.. gh-issue: 99482 759.. nonce: XmZyUr 760.. section: Library 761 762Remove ``Jython`` partial compatibility code from several stdlib modules. 763 764.. 765 766.. date: 2022-11-13-15-32-19 767.. gh-issue: 99433 768.. nonce: Ys6y0A 769.. section: Library 770 771Fix :mod:`doctest` failure on :class:`types.MethodWrapperType` in modules. 772 773.. 774 775.. date: 2022-10-28-07-24-34 776.. gh-issue: 85267 777.. nonce: xUy_Wm 778.. section: Library 779 780Several improvements to :func:`inspect.signature`'s handling of 781``__text_signature``. - Fixes a case where :func:`inspect.signature` dropped 782parameters - Fixes a case where :func:`inspect.signature` raised 783:exc:`tokenize.TokenError` - Allows :func:`inspect.signature` to understand 784defaults involving binary operations of constants - 785:func:`inspect.signature` is documented as only raising :exc:`TypeError` or 786:exc:`ValueError`, but sometimes raised :exc:`RuntimeError`. These cases now 787raise :exc:`ValueError` - Removed a dead code path 788 789.. 790 791.. date: 2022-10-24-07-31-11 792.. gh-issue: 91166 793.. nonce: -IG06R 794.. section: Library 795 796:mod:`asyncio` is optimized to avoid excessive copying when writing to 797socket and use :meth:`~socket.socket.sendmsg` if the platform supports it. 798Patch by Kumar Aditya. 799 800.. 801 802.. date: 2022-10-07-18-16-00 803.. gh-issue: 98030 804.. nonce: 2oQCZy 805.. section: Library 806 807Add missing TCP socket options from Linux: ``TCP_MD5SIG``, 808``TCP_THIN_LINEAR_TIMEOUTS``, ``TCP_THIN_DUPACK``, ``TCP_REPAIR``, 809``TCP_REPAIR_QUEUE``, ``TCP_QUEUE_SEQ``, ``TCP_REPAIR_OPTIONS``, 810``TCP_TIMESTAMP``, ``TCP_CC_INFO``, ``TCP_SAVE_SYN``, ``TCP_SAVED_SYN``, 811``TCP_REPAIR_WINDOW``, ``TCP_FASTOPEN_CONNECT``, ``TCP_ULP``, 812``TCP_MD5SIG_EXT``, ``TCP_FASTOPEN_KEY``, ``TCP_FASTOPEN_NO_COOKIE``, 813``TCP_ZEROCOPY_RECEIVE``, ``TCP_INQ``, ``TCP_TX_DELAY``. 814 815.. 816 817.. date: 2022-09-16-08-21-46 818.. gh-issue: 88500 819.. nonce: jQ0pCc 820.. section: Library 821 822Reduced the memory usage of :func:`urllib.parse.unquote` and 823:func:`urllib.parse.unquote_to_bytes` on large values. 824 825.. 826 827.. date: 2022-08-27-10-35-50 828.. gh-issue: 96127 829.. nonce: 8RdLre 830.. section: Library 831 832``inspect.signature`` was raising ``TypeError`` on call with mock objects. 833Now it correctly returns ``(*args, **kwargs)`` as inferred signature. 834 835.. 836 837.. date: 2022-08-11-10-02-19 838.. gh-issue: 95882 839.. nonce: FsUr72 840.. section: Library 841 842Fix a 3.11 regression in :func:`~contextlib.asynccontextmanager`, which 843caused it to propagate exceptions with incorrect tracebacks and fix a 3.11 844regression in :func:`~contextlib.contextmanager`, which caused it to 845propagate exceptions with incorrect tracebacks for :exc:`StopIteration`. 846 847.. 848 849.. date: 2022-07-01-00-01-22 850.. gh-issue: 78707 851.. nonce: fHGSuM 852.. section: Library 853 854Deprecate passing more than one positional argument to 855:meth:`pathlib.PurePath.relative_to` and 856:meth:`~pathlib.PurePath.is_relative_to`. 857 858.. 859 860.. date: 2022-05-06-01-53-34 861.. gh-issue: 92122 862.. nonce: 96Lf2p 863.. section: Library 864 865Fix reStructuredText syntax errors in docstrings in the :mod:`enum` module. 866 867.. 868 869.. date: 2022-04-23-08-12-14 870.. gh-issue: 91851 871.. nonce: Jd47V6 872.. section: Library 873 874Optimize the :class:`~fractions.Fraction` arithmetics for small components. 875 876.. 877 878.. bpo: 24132 879.. date: 2022-03-05-02-14-09 880.. nonce: W6iORO 881.. section: Library 882 883Make :class:`pathlib.PurePath` and :class:`~pathlib.Path` subclassable 884(private to start). Previously, attempting to instantiate a subclass 885resulted in an :exc:`AttributeError` being raised. Patch by Barney Gale. 886 887.. 888 889.. bpo: 40447 890.. date: 2020-05-03-12-55-55 891.. nonce: oKR0Lj 892.. section: Library 893 894Accept :class:`os.PathLike` (such as :class:`pathlib.Path`) in the 895``stripdir`` arguments of :meth:`compileall.compile_file` and 896:meth:`compileall.compile_dir`. 897 898.. 899 900.. bpo: 36880 901.. date: 2019-05-13-11-37-30 902.. nonce: ZgBgH0 903.. section: Library 904 905Fix a reference counting issue when a :mod:`ctypes` callback with return 906type :class:`~ctypes.py_object` returns ``None``, which could cause crashes. 907 908.. 909 910.. date: 2022-12-30-00-42-23 911.. gh-issue: 100616 912.. nonce: eu80ij 913.. section: Documentation 914 915Document existing ``attr`` parameter to :func:`curses.window.vline` function 916in :mod:`curses`. 917 918.. 919 920.. date: 2022-12-23-21-42-26 921.. gh-issue: 100472 922.. nonce: NNixfO 923.. section: Documentation 924 925Remove claim in documentation that the ``stripdir``, ``prependdir`` and 926``limit_sl_dest`` parameters of :func:`compileall.compile_dir` and 927:func:`compileall.compile_file` could be :class:`bytes`. 928 929.. 930 931.. bpo: 25377 932.. date: 2020-06-17-14-47-48 933.. nonce: CTxC6o 934.. section: Documentation 935 936Clarify use of octal format of mode argument in help(os.chmod) as well as 937help(os.fchmod) 938 939.. 940 941.. date: 2022-12-23-13-29-55 942.. gh-issue: 100454 943.. nonce: 3no0cW 944.. section: Tests 945 946Start running SSL tests with OpenSSL 3.1.0-beta1. 947 948.. 949 950.. date: 2022-12-08-00-03-37 951.. gh-issue: 100086 952.. nonce: 1zYpto 953.. section: Tests 954 955The Python test runner (libregrtest) now logs Python build information like 956"debug" vs "release" build, or LTO and PGO optimizations. Patch by Victor 957Stinner. 958 959.. 960 961.. date: 2022-06-16-13-26-31 962.. gh-issue: 93018 963.. nonce: wvNx76 964.. section: Tests 965 966Make two tests forgiving towards host system libexpat with backported 967security fixes applied. 968 969.. 970 971.. date: 2022-12-26-15-07-48 972.. gh-issue: 100540 973.. nonce: l6ToSY 974.. section: Build 975 976Removed the ``--with-system-ffi`` ``configure`` option; ``libffi`` must now 977always be supplied by the system on all non-Windows platforms. The option 978has had no effect on non-Darwin platforms for several releases, and in 3.11 979only had the non-obvious effect of invoking ``pkg-config`` to find 980``libffi`` and never setting ``-DUSING_APPLE_OS_LIBFFI``. Now on Darwin 981platforms ``configure`` will first check for the OS ``libffi`` and then fall 982back to the same processing as other platforms if it is not found. 983 984.. 985 986.. date: 2022-12-08-14-00-04 987.. gh-issue: 88267 988.. nonce: MqtRbm 989.. section: Build 990 991Avoid exporting Python symbols in linked Windows applications when the core 992is built as static. 993 994.. 995 996.. bpo: 41916 997.. date: 2022-03-04-10-47-23 998.. nonce: 1d2GLU 999.. section: Build 1000 1001Allow override of ac_cv_cxx_thread so that cross compiled python can set 1002-pthread for CXX. 1003 1004.. 1005 1006.. date: 2023-01-09-23-03-57 1007.. gh-issue: 100180 1008.. nonce: b5phrg 1009.. section: Windows 1010 1011Update Windows installer to OpenSSL 1.1.1s 1012 1013.. 1014 1015.. date: 2022-12-20-18-36-17 1016.. gh-issue: 99191 1017.. nonce: 0cfRja 1018.. section: Windows 1019 1020Use ``_MSVC_LANG >= 202002L`` instead of less-precise ``_MSC_VER >=1929`` to 1021more accurately test for C++20 support in :file:`PC/_wmimodule.cpp`. 1022 1023.. 1024 1025.. date: 2022-12-09-22-47-42 1026.. gh-issue: 79218 1027.. nonce: Yiot2e 1028.. section: Windows 1029 1030Define ``MS_WIN64`` for Mingw-w64 64bit, fix cython compilation failure. 1031 1032.. 1033 1034.. date: 2022-12-06-11-16-46 1035.. gh-issue: 99941 1036.. nonce: GmUQ6o 1037.. section: Windows 1038 1039Ensure that :func:`asyncio.Protocol.data_received` receives an immutable 1040:class:`bytes` object (as documented), instead of :class:`bytearray`. 1041 1042.. 1043 1044.. bpo: 43984 1045.. date: 2021-05-02-15-29-33 1046.. nonce: U92jiv 1047.. section: Windows 1048 1049:meth:`winreg.SetValueEx` now leaves the target value untouched in the case 1050of conversion errors. Previously, ``-1`` would be written in case of such 1051errors. 1052 1053.. 1054 1055.. bpo: 34816 1056.. date: 2021-04-08-00-36-37 1057.. nonce: 4Xe0id 1058.. section: Windows 1059 1060``hasattr(ctypes.windll, 'nonexistant')`` now returns ``False`` instead of 1061raising :exc:`OSError`. 1062 1063.. 1064 1065.. date: 2023-01-09-22-04-21 1066.. gh-issue: 100180 1067.. nonce: WVhCny 1068.. section: macOS 1069 1070Update macOS installer to OpenSSL 1.1.1s 1071 1072.. 1073 1074.. date: 2022-12-26-14-52-37 1075.. gh-issue: 100540 1076.. nonce: kYZLtX 1077.. section: macOS 1078 1079Removed obsolete ``dlfcn.h`` shim from the ``_ctypes`` extension module, 1080which has not been necessary since Mac OS X 10.2. 1081 1082.. 1083 1084.. bpo: 45256 1085.. date: 2022-12-29-19-22-11 1086.. nonce: a0ee_H 1087.. section: Tools/Demos 1088 1089Fix a bug that caused an :exc:`AttributeError` to be raised in 1090``python-gdb.py`` when ``py-locals`` is used without a frame. 1091 1092.. 1093 1094.. date: 2022-12-19-10-08-53 1095.. gh-issue: 100342 1096.. nonce: qDFlQG 1097.. section: Tools/Demos 1098 1099Add missing ``NULL`` check for possible allocation failure in ``*args`` 1100parsing in Argument Clinic. 1101 1102.. 1103 1104.. date: 2022-12-02-09-31-19 1105.. gh-issue: 99947 1106.. nonce: Ski7OC 1107.. section: C API 1108 1109Raising SystemError on import will now have its cause be set to the original 1110unexpected exception. 1111 1112.. 1113 1114.. date: 2022-11-30-16-39-22 1115.. gh-issue: 99240 1116.. nonce: 67nAX- 1117.. section: C API 1118 1119In argument parsing, after deallocating newly allocated memory, reset its 1120pointer to NULL. 1121 1122.. 1123 1124.. date: 2022-11-04-16-13-35 1125.. gh-issue: 98724 1126.. nonce: p0urWO 1127.. section: C API 1128 1129The :c:macro:`Py_CLEAR`, :c:macro:`Py_SETREF` and :c:macro:`Py_XSETREF` 1130macros now only evaluate their arguments once. If an argument has side 1131effects, these side effects are no longer duplicated. Patch by Victor 1132Stinner. 1133