1.. bpo: 42268 2.. date: 2021-11-26-22-31-22 3.. nonce: 3wl-09 4.. release date: 2021-12-06 5.. section: Core and Builtins 6 7Fail the configure step if the selected compiler doesn't support memory 8sanitizer. Patch by Pablo Galindo 9 10.. 11 12.. bpo: 45727 13.. date: 2021-11-24-18-24-49 14.. nonce: _xVbbo 15.. section: Core and Builtins 16 17Refine the custom syntax error that suggests that a comma may be missing to 18trigger only when the expressions are detected between parentheses or 19brackets. Patch by Pablo Galindo 20 21.. 22 23.. bpo: 45614 24.. date: 2021-11-23-12-06-41 25.. nonce: fIekgI 26.. section: Core and Builtins 27 28Fix :mod:`traceback` display for exceptions with invalid module name. 29 30.. 31 32.. bpo: 45848 33.. date: 2021-11-19-22-57-42 34.. nonce: HgVBJ5 35.. section: Core and Builtins 36 37Allow the parser to obtain error lines directly from encoded files. Patch by 38Pablo Galindo 39 40.. 41 42.. bpo: 45826 43.. date: 2021-11-17-08-05-27 44.. nonce: OERoTm 45.. section: Core and Builtins 46 47Fixed a crash when calling ``.with_traceback(None)`` on ``NameError``. This 48occurs internally in ``unittest.TestCase.assertRaises()``. 49 50.. 51 52.. bpo: 45822 53.. date: 2021-11-16-19-41-04 54.. nonce: OT6ueS 55.. section: Core and Builtins 56 57Fixed a bug in the parser that was causing it to not respect :pep:`263` 58coding cookies when no flags are provided. Patch by Pablo Galindo 59 60.. 61 62.. bpo: 45820 63.. date: 2021-11-16-19-00-27 64.. nonce: 2X6Psr 65.. section: Core and Builtins 66 67Fix a segfault when the parser fails without reading any input. Patch by 68Pablo Galindo 69 70.. 71 72.. bpo: 42540 73.. date: 2021-11-15-12-08-27 74.. nonce: V2w107 75.. section: Core and Builtins 76 77Fix crash when :func:`os.fork` is called with an active non-default memory 78allocator. 79 80.. 81 82.. bpo: 45738 83.. date: 2021-11-14-00-14-45 84.. nonce: e0cgKd 85.. section: Core and Builtins 86 87Fix computation of error location for invalid continuation characters in the 88parser. Patch by Pablo Galindo. 89 90.. 91 92.. bpo: 45773 93.. date: 2021-11-09-13-01-35 94.. nonce: POU8A4 95.. section: Core and Builtins 96 97Fix a compiler hang when attempting to optimize certain jump patterns. 98 99.. 100 101.. bpo: 45716 102.. date: 2021-11-04-20-19-07 103.. nonce: 5C0pA1 104.. section: Core and Builtins 105 106Improve the :exc:`SyntaxError` message when using ``True``, ``None`` or 107``False`` as keywords in a function call. Patch by Pablo Galindo. 108 109.. 110 111.. bpo: 45688 112.. date: 2021-11-02-09-27-46 113.. nonce: v5Der1 114.. section: Core and Builtins 115 116:data:`sys.stdlib_module_names` now contains the macOS-specific module 117:mod:`_scproxy`. 118 119.. 120 121.. bpo: 30570 122.. date: 2021-10-19-01-04-08 123.. nonce: _G30Ms 124.. section: Core and Builtins 125 126Fixed a crash in ``issubclass()`` from infinite recursion when searching 127pathological ``__bases__`` tuples. 128 129.. 130 131.. bpo: 45521 132.. date: 2021-10-18-22-40-33 133.. nonce: GdMiuW 134.. section: Core and Builtins 135 136Fix a bug in the obmalloc radix tree code. On 64-bit machines, the bug 137causes the tree to hold 46-bits of virtual addresses, rather than the 138intended 48-bits. 139 140.. 141 142.. bpo: 45494 143.. date: 2021-10-16-17-27-48 144.. nonce: vMt1g4 145.. section: Core and Builtins 146 147Fix parser crash when reporting errors involving invalid continuation 148characters. Patch by Pablo Galindo. 149 150.. 151 152.. bpo: 45408 153.. date: 2021-10-07-21-26-44 154.. nonce: qUqzcd 155.. section: Core and Builtins 156 157Fix a crash in the parser when reporting tokenizer errors that occur at the 158same time unclosed parentheses are detected. Patch by Pablo Galindo. 159 160.. 161 162.. bpo: 45385 163.. date: 2021-10-06-21-20-11 164.. nonce: CTUT8s 165.. section: Core and Builtins 166 167Fix reference leak from descr_check. Patch by Dong-hee Na. 168 169.. 170 171.. bpo: 45167 172.. date: 2021-09-14-09-23-59 173.. nonce: CPSSoV 174.. section: Core and Builtins 175 176Fix deepcopying of :class:`types.GenericAlias` objects. 177 178.. 179 180.. bpo: 44219 181.. date: 2021-09-09-10-32-33 182.. nonce: WiYyjz 183.. section: Core and Builtins 184 185Release the GIL while performing ``isatty`` system calls on arbitrary file 186descriptors. In particular, this affects :func:`os.isatty`, 187:func:`os.device_encoding` and :class:`io.TextIOWrapper`. By extension, 188:func:`io.open` in text mode is also affected. This change solves a deadlock 189in :func:`os.isatty`. Patch by Vincent Michel in :issue:`44219`. 190 191.. 192 193.. bpo: 44959 194.. date: 2021-09-08-08-29-41 195.. nonce: OSwwPf 196.. section: Core and Builtins 197 198Added fallback to extension modules with '.sl' suffix on HP-UX 199 200.. 201 202.. bpo: 44050 203.. date: 2021-09-08-00-30-09 204.. nonce: mFI15u 205.. section: Core and Builtins 206 207Extensions that indicate they use global state (by setting ``m_size`` to -1) 208can again be used in multiple interpreters. This reverts to behavior of 209Python 3.8. 210 211.. 212 213.. bpo: 45121 214.. date: 2021-09-07-17-10-16 215.. nonce: iG-Hsf 216.. section: Core and Builtins 217 218Fix issue where ``Protocol.__init__`` raises ``RecursionError`` when it's 219called directly or via ``super()``. Patch provided by Yurii Karabas. 220 221.. 222 223.. bpo: 45083 224.. date: 2021-09-01-23-55-49 225.. nonce: cLi9G3 226.. section: Core and Builtins 227 228When the interpreter renders an exception, its name now has a complete 229qualname. Previously only the class name was concatenated to the module 230name, which sometimes resulted in an incorrect full name being displayed. 231 232(This issue impacted only the C code exception rendering, the 233:mod:`traceback` module was using qualname already). 234 235.. 236 237.. bpo: 45056 238.. date: 2021-09-01-16-55-43 239.. nonce: 7AK2d9 240.. section: Core and Builtins 241 242Compiler now removes trailing unused constants from co_consts. 243 244.. 245 246.. bpo: 27946 247.. date: 2021-12-04-20-08-42 248.. nonce: -Vuarf 249.. section: Library 250 251Fix possible crash when getting an attribute of 252class:`xml.etree.ElementTree.Element` simultaneously with replacing the 253``attrib`` dict. 254 255.. 256 257.. bpo: 37658 258.. date: 2021-11-28-15-30-34 259.. nonce: 8Hno7d 260.. section: Library 261 262Fix issue when on certain conditions ``asyncio.wait_for()`` may allow a 263coroutine to complete successfully, but fail to return the result, 264potentially causing memory leaks or other issues. 265 266.. 267 268.. bpo: 44649 269.. date: 2021-11-21-20-50-42 270.. nonce: E8M936 271.. section: Library 272 273Handle dataclass(slots=True) with a field that has default a default value, 274but for which init=False. 275 276.. 277 278.. bpo: 45803 279.. date: 2021-11-20-17-04-25 280.. nonce: wSgFOy 281.. section: Library 282 283Added missing kw_only parameter to dataclasses.make_dataclass(). 284 285.. 286 287.. bpo: 45831 288.. date: 2021-11-17-19-25-37 289.. nonce: 9-TojK 290.. section: Library 291 292:mod:`faulthandler` can now write ASCII-only strings (like filenames and 293function names) with a single write() syscall when dumping a traceback. It 294reduces the risk of getting an unreadable dump when two threads or two 295processes dump a traceback to the same file (like stderr) at the same time. 296Patch by Victor Stinner. 297 298.. 299 300.. bpo: 41735 301.. date: 2021-11-16-18-13-49 302.. nonce: D72UY1 303.. section: Library 304 305Fix thread lock in ``zlib.Decompress.flush()`` method before 306``PyObject_GetBuffer``. 307 308.. 309 310.. bpo: 45235 311.. date: 2021-11-11-13-03-17 312.. nonce: 8ZbkHa 313.. section: Library 314 315Reverted an argparse bugfix that caused regression in the handling of 316default arguments for subparsers. This prevented leaf level arguments from 317taking precedence over root level arguments. 318 319.. 320 321.. bpo: 45765 322.. date: 2021-11-09-09-04-19 323.. nonce: JVobxK 324.. section: Library 325 326In importlib.metadata, fix distribution discovery for an empty path. 327 328.. 329 330.. bpo: 45757 331.. date: 2021-11-08-23-22-14 332.. nonce: MHZHt3 333.. section: Library 334 335Fix bug where :mod:`dis` produced an incorrect oparg when 336:opcode:`EXTENDED_ARG` is followed by an opcode that does not use its 337argument. 338 339.. 340 341.. bpo: 45644 342.. date: 2021-11-06-17-47-46 343.. nonce: ZMqHD_ 344.. section: Library 345 346In-place JSON file formatting using ``python3 -m json.tool infile infile`` 347now works correctly, previously it left the file empty. Patch by Chris 348Wesseling. 349 350.. 351 352.. bpo: 45679 353.. date: 2021-10-30-21-11-37 354.. nonce: Dq8Cpu 355.. section: Library 356 357Fix caching of multi-value :data:`typing.Literal`. ``Literal[True, 2]`` is 358no longer equal to ``Literal[1, 2]``. 359 360.. 361 362.. bpo: 45664 363.. date: 2021-10-28-23-40-54 364.. nonce: 7dqtxQ 365.. section: Library 366 367Fix :func:`types.resolve_bases` and :func:`types.new_class` for 368:class:`types.GenericAlias` instance as a base. 369 370.. 371 372.. bpo: 45663 373.. date: 2021-10-28-23-11-59 374.. nonce: J90N5R 375.. section: Library 376 377Fix :func:`dataclasses.is_dataclass` for dataclasses which are subclasses of 378:class:`types.GenericAlias`. 379 380.. 381 382.. bpo: 45662 383.. date: 2021-10-28-22-58-14 384.. nonce: sJd7Ir 385.. section: Library 386 387Fix the repr of :data:`dataclasses.InitVar` with a type alias to the 388built-in class, e.g. ``InitVar[list[int]]``. 389 390.. 391 392.. bpo: 45438 393.. date: 2021-10-27-10-05-39 394.. nonce: Xz5lGU 395.. section: Library 396 397Fix typing.Signature string representation for generic builtin types. 398 399.. 400 401.. bpo: 45574 402.. date: 2021-10-22-23-06-33 403.. nonce: svqA84 404.. section: Library 405 406Fix warning about ``print_escape`` being unused. 407 408.. 409 410.. bpo: 45581 411.. date: 2021-10-22-21-57-02 412.. nonce: rlH6ay 413.. section: Library 414 415:meth:`sqlite3.connect` now correctly raises :exc:`MemoryError` if the 416underlying SQLite API signals memory error. Patch by Erlend E. Aasland. 417 418.. 419 420.. bpo: 45557 421.. date: 2021-10-21-16-18-51 422.. nonce: 4MQt4r 423.. section: Library 424 425pprint.pprint() now handles underscore_numbers correctly. Previously it was 426always setting it to False. 427 428.. 429 430.. bpo: 45515 431.. date: 2021-10-18-14-52-48 432.. nonce: aXdvm_ 433.. section: Library 434 435Add references to :mod:`zoneinfo` in the :mod:`datetime` documentation, 436mostly replacing outdated references to ``dateutil.tz``. Change by Paul 437Ganssle. 438 439.. 440 441.. bpo: 45475 442.. date: 2021-10-18-10-46-47 443.. nonce: sb9KDF 444.. section: Library 445 446Reverted optimization of iterating :class:`gzip.GzipFile`, 447:class:`bz2.BZ2File`, and :class:`lzma.LZMAFile` (see bpo-43787) because it 448caused regression when user iterate them without having reference of them. 449Patch by Inada Naoki. 450 451.. 452 453.. bpo: 45428 454.. date: 2021-10-14-18-04-17 455.. nonce: mM2War 456.. section: Library 457 458Fix a regression in py_compile when reading filenames from standard input. 459 460.. 461 462.. bpo: 45467 463.. date: 2021-10-14-13-31-19 464.. nonce: Q7Ma6A 465.. section: Library 466 467Fix incremental decoder and stream reader in the "raw-unicode-escape" codec. 468Previously they failed if the escape sequence was split. 469 470.. 471 472.. bpo: 45461 473.. date: 2021-10-14-00-19-02 474.. nonce: 4LB_tJ 475.. section: Library 476 477Fix incremental decoder and stream reader in the "unicode-escape" codec. 478Previously they failed if the escape sequence was split. 479 480.. 481 482.. bpo: 45239 483.. date: 2021-10-13-17-52-48 484.. nonce: 7li1_0 485.. section: Library 486 487Fixed :func:`email.utils.parsedate_tz` crashing with 488:exc:`UnboundLocalError` on certain invalid input instead of returning 489``None``. Patch by Ben Hoyt. 490 491.. 492 493.. bpo: 45249 494.. date: 2021-10-10-16-14-33 495.. nonce: xqLliz 496.. section: Library 497 498Fix the behaviour of :func:`traceback.print_exc` when displaying the caret 499when the ``end_offset`` in the exception is set to 0. Patch by Pablo Galindo 500 501.. 502 503.. bpo: 45416 504.. date: 2021-10-10-09-42-34 505.. nonce: n35O0_ 506.. section: Library 507 508Fix use of :class:`asyncio.Condition` with explicit :class:`asyncio.Lock` 509objects, which was a regression due to removal of explicit loop arguments. 510Patch by Joongi Kim. 511 512.. 513 514.. bpo: 45419 515.. date: 2021-10-09-20-53-13 516.. nonce: CauCgt 517.. section: Library 518 519Correct interfaces on DegenerateFiles.Path. 520 521.. 522 523.. bpo: 44904 524.. date: 2021-10-09-18-42-27 525.. nonce: RlW5h8 526.. section: Library 527 528Fix bug in the :mod:`doctest` module that caused it to fail if a docstring 529included an example with a ``classmethod`` ``property``. Patch by Alex 530Waygood. 531 532.. 533 534.. bpo: 45406 535.. date: 2021-10-08-19-24-48 536.. nonce: Qh_Mz4 537.. section: Library 538 539Make :func:`inspect.getmodule` catch ``FileNotFoundError`` raised by 540:'func:`inspect.getabsfile`, and return ``None`` to indicate that the module 541could not be determined. 542 543.. 544 545.. bpo: 45262 546.. date: 2021-10-07-14-04-10 547.. nonce: HqF71Z 548.. section: Library 549 550Prevent use-after-free in asyncio. Make sure the cached running loop holder 551gets cleared on dealloc to prevent use-after-free in get_running_loop 552 553.. 554 555.. bpo: 45386 556.. date: 2021-10-07-00-05-05 557.. nonce: q9ORpA 558.. section: Library 559 560Make :mod:`xmlrpc.client` more robust to C runtimes where the underlying C 561``strftime`` function results in a ``ValueError`` when testing for year 562formatting options. 563 564.. 565 566.. bpo: 45371 567.. date: 2021-10-05-11-03-48 568.. nonce: NOwcDJ 569.. section: Library 570 571Fix clang rpath issue in :mod:`distutils`. The UnixCCompiler now uses 572correct clang option to add a runtime library directory (rpath) to a shared 573library. 574 575.. 576 577.. bpo: 20028 578.. date: 2021-10-03-21-14-37 579.. nonce: zBA4RK 580.. section: Library 581 582Improve error message of :class:`csv.Dialect` when initializing. Patch by 583Vajrasky Kok and Dong-hee Na. 584 585.. 586 587.. bpo: 45343 588.. date: 2021-10-01-23-07-02 589.. nonce: ixmctD 590.. section: Library 591 592Update bundled pip to 21.2.4 and setuptools to 58.1.0 593 594.. 595 596.. bpo: 45329 597.. date: 2021-10-01-13-09-53 598.. nonce: 9iMYaO 599.. section: Library 600 601Fix freed memory access in :class:`pyexpat.xmlparser` when building it with 602an installed expat library <= 2.2.0. 603 604.. 605 606.. bpo: 41710 607.. date: 2021-09-30-23-00-18 608.. nonce: svuloZ 609.. section: Library 610 611On Unix, if the ``sem_clockwait()`` function is available in the C library 612(glibc 2.30 and newer), the :meth:`threading.Lock.acquire` method now uses 613the monotonic clock (:data:`time.CLOCK_MONOTONIC`) for the timeout, rather 614than using the system clock (:data:`time.CLOCK_REALTIME`), to not be 615affected by system clock changes. Patch by Victor Stinner. 616 617.. 618 619.. bpo: 45328 620.. date: 2021-09-30-08-22-44 621.. nonce: 8Z-Q0B 622.. section: Library 623 624Fixed :class:`http.client.HTTPConnection` to work properly in OSs that don't 625support the ``TCP_NODELAY`` socket option. 626 627.. 628 629.. bpo: 1596321 630.. date: 2021-09-24-17-20-23 631.. nonce: 3nhPUk 632.. section: Library 633 634Fix the :func:`threading._shutdown` function when the :mod:`threading` 635module was imported first from a thread different than the main thread: no 636longer log an error at Python exit. 637 638.. 639 640.. bpo: 45274 641.. date: 2021-09-23-22-17-26 642.. nonce: gPpa4E 643.. section: Library 644 645Fix a race condition in the :meth:`Thread.join() <threading.Thread.join>` 646method of the :mod:`threading` module. If the function is interrupted by a 647signal and the signal handler raises an exception, make sure that the thread 648remains in a consistent state to prevent a deadlock. Patch by Victor 649Stinner. 650 651.. 652 653.. bpo: 45238 654.. date: 2021-09-18-16-56-33 655.. nonce: Hng_9V 656.. section: Library 657 658Fix :meth:`unittest.IsolatedAsyncioTestCase.debug`: it runs now asynchronous 659methods and callbacks. 660 661.. 662 663.. bpo: 36674 664.. date: 2021-09-18-13-14-57 665.. nonce: a2k5Zb 666.. section: Library 667 668:meth:`unittest.TestCase.debug` raises now a :class:`unittest.SkipTest` if 669the class or the test method are decorated with the skipping decorator. 670 671.. 672 673.. bpo: 45235 674.. date: 2021-09-17-16-55-37 675.. nonce: sXnmPA 676.. section: Library 677 678Fix an issue where argparse would not preserve values in a provided 679namespace when using a subparser with defaults. 680 681.. 682 683.. bpo: 45183 684.. date: 2021-09-17-15-58-53 685.. nonce: Vv_vch 686.. section: Library 687 688Have zipimport.zipimporter.find_spec() not raise an exception when the 689underlying zip file has been deleted and the internal cache has been reset 690via invalidate_cache(). 691 692.. 693 694.. bpo: 45234 695.. date: 2021-09-17-11-20-55 696.. nonce: qUcTVt 697.. section: Library 698 699Fixed a regression in :func:`~shutil.copyfile`, :func:`~shutil.copy`, 700:func:`~shutil.copy2` raising :exc:`FileNotFoundError` when source is a 701directory, which should raise :exc:`IsADirectoryError` 702 703.. 704 705.. bpo: 45228 706.. date: 2021-09-17-09-59-33 707.. nonce: WV1dcT 708.. section: Library 709 710Fix stack buffer overflow in parsing J1939 network address. 711 712.. 713 714.. bpo: 45192 715.. date: 2021-09-14-15-52-47 716.. nonce: DjA-BI 717.. section: Library 718 719Fix the ``tempfile._infer_return_type`` function so that the ``dir`` 720argument of the :mod:`tempfile` functions accepts an object implementing the 721``os.PathLike`` protocol. 722 723Patch by Kyungmin Lee. 724 725.. 726 727.. bpo: 42135 728.. date: 2021-09-13-19-32-58 729.. nonce: 1ZAHqR 730.. section: Library 731 732Fix typo: ``importlib.find_loader`` is really slated for removal in Python 7333.12 not 3.10, like the others in GH-25169. 734 735Patch by Hugo van Kemenade. 736 737.. 738 739.. bpo: 45160 740.. date: 2021-09-11-14-47-05 741.. nonce: VzMXbW 742.. section: Library 743 744When tracing a tkinter variable used by a ttk OptionMenu, callbacks are no 745longer made twice. 746 747.. 748 749.. bpo: 35474 750.. date: 2021-09-11-10-45-12 751.. nonce: tEY3SD 752.. section: Library 753 754Calling :func:`mimetypes.guess_all_extensions` with ``strict=False`` no 755longer affects the result of the following call with ``strict=True``. Also, 756mutating the returned list no longer affects the global state. 757 758.. 759 760.. bpo: 45166 761.. date: 2021-09-10-21-35-53 762.. nonce: UHipXF 763.. section: Library 764 765:func:`typing.get_type_hints` now works with :data:`~typing.Final` wrapped 766in :class:`~typing.ForwardRef`. 767 768.. 769 770.. bpo: 20499 771.. date: 2021-09-08-01-19-31 772.. nonce: tSxx8Y 773.. section: Library 774 775Improve the speed and accuracy of statistics.pvariance(). 776 777.. 778 779.. bpo: 24444 780.. date: 2021-08-30-00-19-23 781.. nonce: Ki4bgz 782.. section: Library 783 784Fixed an error raised in :mod:`argparse` help display when help for an 785option is set to 1+ blank spaces or when *choices* arg is an empty 786container. 787 788.. 789 790.. bpo: 45021 791.. date: 2021-08-28-13-00-12 792.. nonce: rReeaj 793.. section: Library 794 795Fix a potential deadlock at shutdown of forked children when using 796:mod:`concurrent.futures` module 797 798.. 799 800.. bpo: 39039 801.. date: 2021-08-18-10-36-14 802.. nonce: A63LYh 803.. section: Library 804 805tarfile.open raises :exc:`~tarfile.ReadError` when a zlib error occurs 806during file extraction. 807 808.. 809 810.. bpo: 44594 811.. date: 2021-07-12-10-32-48 812.. nonce: eEa5zi 813.. section: Library 814 815Fix an edge case of :class:`ExitStack` and :class:`AsyncExitStack` exception 816chaining. They will now match ``with`` block behavior when ``__context__`` 817is explicitly set to ``None`` when the exception is in flight. 818 819.. 820 821.. bpo: 44295 822.. date: 2021-06-02-16-39-42 823.. nonce: erg01m 824.. section: Library 825 826Ensure deprecation warning from :func:`assertDictContainsSubset` points at 827calling code - by Anthony Sottile. 828 829.. 830 831.. bpo: 43498 832.. date: 2021-04-20-14-14-16 833.. nonce: L_Hq-8 834.. section: Library 835 836Avoid a possible *"RuntimeError: dictionary changed size during iteration"* 837when adjusting the process count of :class:`ProcessPoolExecutor`. 838 839.. 840 841.. bpo: 45640 842.. date: 2021-11-18-16-44-12 843.. nonce: lSpc2A 844.. section: Documentation 845 846Properly marked-up grammar tokens in the documentation are now clickable and 847take you to the definition of a given piece of grammar. Patch by Arthur 848Milchior. 849 850.. 851 852.. bpo: 45788 853.. date: 2021-11-18-00-07-40 854.. nonce: qibUoB 855.. section: Documentation 856 857Link doc for sys.prefix to sysconfig doc on installation paths. 858 859.. 860 861.. bpo: 45772 862.. date: 2021-11-09-13-10-55 863.. nonce: EdrM3t 864.. section: Documentation 865 866``socket.socket`` documentation is corrected to a class from a function. 867 868.. 869 870.. bpo: 45392 871.. date: 2021-11-06-10-54-17 872.. nonce: JZnVOz 873.. section: Documentation 874 875Update the docstring of the :class:`type` built-in to remove a redundant 876line and to mention keyword arguments for the constructor. 877 878.. 879 880.. bpo: 45726 881.. date: 2021-11-05-12-15-24 882.. nonce: GwRr7e 883.. section: Documentation 884 885Improve documentation for :func:`functools.singledispatch` and 886:class:`functools.singledispatchmethod`. 887 888.. 889 890.. bpo: 45680 891.. date: 2021-11-03-14-51-03 892.. nonce: 9_NTFU 893.. section: Documentation 894 895Amend the docs on ``GenericAlias`` objects to clarify that non-container 896classes can also implement ``__class_getitem__``. Patch contributed by Alex 897Waygood. 898 899.. 900 901.. bpo: 45655 902.. date: 2021-10-28-19-22-55 903.. nonce: aPYGaS 904.. section: Documentation 905 906Add a new "relevant PEPs" section to the top of the documentation for the 907``typing`` module. Patch by Alex Waygood. 908 909.. 910 911.. bpo: 45604 912.. date: 2021-10-26-10-00-45 913.. nonce: Dm-YhV 914.. section: Documentation 915 916Add ``level`` argument to ``multiprocessing.log_to_stderr`` function docs. 917 918.. 919 920.. bpo: 45250 921.. date: 2021-10-22-12-09-18 922.. nonce: Iit5-Y 923.. section: Documentation 924 925Update the documentation to note that CPython does not consistently require 926iterators to define ``__iter__``. 927 928.. 929 930.. bpo: 45464 931.. date: 2021-10-20-16-26-53 932.. nonce: mOISBs 933.. section: Documentation 934 935Mention in the documentation of :ref:`Built-in Exceptions 936<bltin-exceptions>` that inheriting from multiple exception types in a 937single subclass is not recommended due to possible memory layout 938incompatibility. 939 940.. 941 942.. bpo: 45449 943.. date: 2021-10-19-01-41-40 944.. nonce: fjHZJc 945.. section: Documentation 946 947Add note about :pep:`585` in :mod:`collections.abc`. 948 949.. 950 951.. bpo: 45516 952.. date: 2021-10-18-20-12-18 953.. nonce: EJh4K8 954.. section: Documentation 955 956Add protocol description to the :class:`importlib.abc.Traversable` 957documentation. 958 959.. 960 961.. bpo: 20692 962.. date: 2021-10-13-00-42-54 963.. nonce: K5rGtP 964.. section: Documentation 965 966Add Programming FAQ entry explaining that int literal attribute access 967requires either a space after or parentheses around the literal. 968 969.. 970 971.. bpo: 45216 972.. date: 2021-09-18-13-45-19 973.. nonce: o56nyt 974.. section: Documentation 975 976Remove extra documentation listing methods in ``difflib``. It was rendering 977twice in pydoc and was outdated in some places. 978 979.. 980 981.. bpo: 45024 982.. date: 2021-09-08-17-20-19 983.. nonce: dkNPNi 984.. section: Documentation 985 986:mod:`collections.abc` documentation has been expanded to explicitly cover 987how instance and subclass checks work, with additional doctest examples and 988an exhaustive list of ABCs which test membership purely by presence of the 989right :term:`special method`\s. Patch by Raymond Hettinger. 990 991.. 992 993.. bpo: 25381 994.. date: 2021-06-21-17-51-51 995.. nonce: 7Kn-_H 996.. section: Documentation 997 998In the extending chapter of the extending doc, update a paragraph about the 999global variables containing exception information. 1000 1001.. 1002 1003.. bpo: 43905 1004.. date: 2021-05-24-05-00-12 1005.. nonce: tBIndE 1006.. section: Documentation 1007 1008Expanded :func:`~dataclasses.astuple` and :func:`~dataclasses.asdict` docs, 1009warning about deepcopy being applied and providing a workaround. 1010 1011.. 1012 1013.. bpo: 19460 1014.. date: 2021-11-28-15-25-02 1015.. nonce: lr0aWs 1016.. section: Tests 1017 1018Add new Test for :class:`email.mime.nonmultipart.MIMENonMultipart`. 1019 1020.. 1021 1022.. bpo: 45835 1023.. date: 2021-11-17-14-28-08 1024.. nonce: Mgyhjx 1025.. section: Tests 1026 1027Fix race condition in test_queue tests with multiple "feeder" threads. 1028 1029.. 1030 1031.. bpo: 45678 1032.. date: 2021-11-04-20-03-32 1033.. nonce: 1xNMjN 1034.. section: Tests 1035 1036Add tests for scenarios in which :class:`functools.singledispatchmethod` is 1037stacked on top of a method that has already been wrapped by two other 1038decorators. Patch by Alex Waygood. 1039 1040.. 1041 1042.. bpo: 45578 1043.. date: 2021-10-30-19-00-25 1044.. nonce: bvu6X2 1045.. section: Tests 1046 1047Add tests for :func:`dis.distb` 1048 1049.. 1050 1051.. bpo: 45678 1052.. date: 2021-10-30-13-12-20 1053.. nonce: bKrYeS 1054.. section: Tests 1055 1056Add tests to ensure that ``functools.singledispatchmethod`` correctly wraps 1057the attributes of the target function. 1058 1059.. 1060 1061.. bpo: 45577 1062.. date: 2021-10-22-19-44-13 1063.. nonce: dSaNvK 1064.. section: Tests 1065 1066Add subtests for all ``pickle`` protocols in ``test_zoneinfo``. 1067 1068.. 1069 1070.. bpo: 45566 1071.. date: 2021-10-22-12-05-21 1072.. nonce: 2gQ3ZB 1073.. section: Tests 1074 1075Fix ``test_frozen_pickle`` in ``test_dataclasses`` to check all ``pickle`` 1076versions. 1077 1078.. 1079 1080.. bpo: 43592 1081.. date: 2021-10-21-17-22-26 1082.. nonce: kHRsra 1083.. section: Tests 1084 1085:mod:`test.libregrtest` now raises the soft resource limit for the maximum 1086number of file descriptors when the default is too low for our test suite as 1087was often the case on macOS. 1088 1089.. 1090 1091.. bpo: 39679 1092.. date: 2021-10-18-16-18-41 1093.. nonce: F18qcE 1094.. section: Tests 1095 1096Add more test cases for `@functools.singledispatchmethod` when combined with 1097`@classmethod` or `@staticmethod`. 1098 1099.. 1100 1101.. bpo: 45400 1102.. date: 2021-10-07-13-11-45 1103.. nonce: h3iT7V 1104.. section: Tests 1105 1106Fix test_name_error_suggestions_do_not_trigger_for_too_many_locals() of 1107test_exceptions if a directory name contains "a1" (like "Python-3.11.0a1"): 1108use a stricter regular expression. Patch by Victor Stinner. 1109 1110.. 1111 1112.. bpo: 40173 1113.. date: 2021-09-30-16-54-39 1114.. nonce: J_slCw 1115.. section: Tests 1116 1117Fix :func:`test.support.import_helper.import_fresh_module`. 1118 1119.. 1120 1121.. bpo: 45280 1122.. date: 2021-09-25-11-05-31 1123.. nonce: 3MA6lC 1124.. section: Tests 1125 1126Add a test case for empty :class:`typing.NamedTuple`. 1127 1128.. 1129 1130.. bpo: 45269 1131.. date: 2021-09-24-10-41-49 1132.. nonce: 8jKEr8 1133.. section: Tests 1134 1135Cover case when invalid ``markers`` type is supplied to ``c_make_encoder``. 1136 1137.. 1138 1139.. bpo: 45128 1140.. date: 2021-09-16-17-22-35 1141.. nonce: Jz6fl2 1142.. section: Tests 1143 1144Fix ``test_multiprocessing_fork`` failure due to ``test_logging`` and 1145``sys.modules`` manipulation. 1146 1147.. 1148 1149.. bpo: 45209 1150.. date: 2021-09-15-23-32-39 1151.. nonce: 55ntL5 1152.. section: Tests 1153 1154Fix ``UserWarning: resource_tracker`` warning in 1155``_test_multiprocessing._TestSharedMemory.test_shared_memory_cleaned_after_process_termination`` 1156 1157.. 1158 1159.. bpo: 45195 1160.. date: 2021-09-14-13-16-18 1161.. nonce: EyQR1G 1162.. section: Tests 1163 1164Fix test_readline.test_nonascii(): sometimes, the newline character is not 1165written at the end, so don't expect it in the output. Patch by Victor 1166Stinner. 1167 1168.. 1169 1170.. bpo: 45156 1171.. date: 2021-09-13-00-28-17 1172.. nonce: 8oomV3 1173.. section: Tests 1174 1175Fixes infinite loop on :func:`unittest.mock.seal` of mocks created by 1176:func:`~unittest.create_autospec`. 1177 1178.. 1179 1180.. bpo: 45125 1181.. date: 2021-09-11-22-08-18 1182.. nonce: FVSzs2 1183.. section: Tests 1184 1185Improves pickling tests and docs of ``SharedMemory`` and ``SharableList`` 1186objects. 1187 1188.. 1189 1190.. bpo: 44860 1191.. date: 2021-09-08-13-01-37 1192.. nonce: qXd0kx 1193.. section: Tests 1194 1195Update ``test_sysconfig.test_user_similar()`` for the posix_user scheme: 1196``platlib`` doesn't use :data:`sys.platlibdir`. Patch by Victor Stinner. 1197 1198.. 1199 1200.. bpo: 25130 1201.. date: 2021-08-27-22-37-19 1202.. nonce: ig4oJe 1203.. section: Tests 1204 1205Add calls of :func:`gc.collect` in tests to support PyPy. 1206 1207.. 1208 1209.. bpo: 44035 1210.. date: 2021-12-06-09-31-27 1211.. nonce: BiO4XC 1212.. section: Build 1213 1214CI now verifies that autoconf files have been regenerated with a current and 1215unpatched autoconf package. 1216 1217.. 1218 1219.. bpo: 33393 1220.. date: 2021-11-25-20-26-06 1221.. nonce: 24YNtM 1222.. section: Build 1223 1224Update ``config.guess`` to 2021-06-03 and ``config.sub`` to 2021-08-14. 1225``Makefile`` now has an ``update-config`` target to make updating more 1226convenient. 1227 1228.. 1229 1230.. bpo: 45866 1231.. date: 2021-11-25-13-53-36 1232.. nonce: ZH1W8N 1233.. section: Build 1234 1235``make regen-all`` now produces the same output when run from a directory 1236other than the source tree: when building Python out of the source tree. 1237pegen now strips directory of the "generated by pygen from <FILENAME>" 1238header Patch by Victor Stinner. 1239 1240.. 1241 1242.. bpo: 41498 1243.. date: 2021-11-25-09-15-04 1244.. nonce: qAk5eo 1245.. section: Build 1246 1247Python now compiles on platforms without ``sigset_t``. Several functions in 1248:mod:`signal` are not available when ``sigset_t`` is missing. 1249 1250Based on patch by Roman Yurchak for pyodide. 1251 1252.. 1253 1254.. bpo: 45881 1255.. date: 2021-11-24-17-14-06 1256.. nonce: GTXXLk 1257.. section: Build 1258 1259``setup.py`` now uses ``CC`` from environment first to discover multiarch 1260and cross compile paths. 1261 1262.. 1263 1264.. bpo: 43158 1265.. date: 2021-11-01-12-51-46 1266.. nonce: fghS6w 1267.. section: Build 1268 1269``setup.py`` now uses values from configure script to build the ``_uuid`` 1270extension module. Configure now detects util-linux's ``libuuid``, too. 1271 1272.. 1273 1274.. bpo: 45571 1275.. date: 2021-10-22-15-28-29 1276.. nonce: yY8NsJ 1277.. section: Build 1278 1279``Modules/Setup`` now use ``PY_CFLAGS_NODIST`` instead of ``PY_CFLAGS`` to 1280compile shared modules. 1281 1282.. 1283 1284.. bpo: 45561 1285.. date: 2021-10-21-14-38-30 1286.. nonce: PVqhZE 1287.. section: Build 1288 1289Run smelly.py tool from $(srcdir). 1290 1291.. 1292 1293.. bpo: 45532 1294.. date: 2021-10-20-16-07-39 1295.. nonce: kyhvis 1296.. section: Build 1297 1298Update :data:`sys.version` to use ``main`` as fallback information. Patch by 1299Jeong YunWon. 1300 1301.. 1302 1303.. bpo: 45536 1304.. date: 2021-10-20-12-42-39 1305.. nonce: oQNYHB 1306.. section: Build 1307 1308The ``configure`` script now checks whether OpenSSL headers and libraries 1309provide required APIs. Most common APIs are verified. The check detects 1310outdated or missing OpenSSL. Failures do not stop configure. 1311 1312.. 1313 1314.. bpo: 45221 1315.. date: 2021-10-18-10-25-56 1316.. nonce: rnulhf 1317.. section: Build 1318 1319Fixed regression in handling of ``LDFLAGS`` and ``CPPFLAGS`` options where 1320:meth:`argparse.parse_known_args` could interpret an option as one of the 1321built-in command line argument, for example ``-h`` for help. 1322 1323.. 1324 1325.. bpo: 45405 1326.. date: 2021-10-11-16-27-38 1327.. nonce: iSfdW5 1328.. section: Build 1329 1330Prevent ``internal configure error`` when running ``configure`` with recent 1331versions of non-Apple clang. Patch by David Bohman. 1332 1333.. 1334 1335.. bpo: 45220 1336.. date: 2021-09-16-18-00-43 1337.. nonce: TgbkvW 1338.. section: Build 1339 1340Avoid building with the Windows 11 SDK previews automatically. This may be 1341overridden by setting the ``DefaultWindowsSDKVersion`` environment variable 1342before building. 1343 1344.. 1345 1346.. bpo: 45067 1347.. date: 2021-09-09-16-45-26 1348.. nonce: mFmY92 1349.. section: Build 1350 1351The ncurses function extended_color_content was introduced in 2017 1352 1353(https://invisible-island.net/ncurses/NEWS.html#index-t20170401). The 1354 1355ncurses-devel package in CentOS 7 had a older version ncurses resulted in 1356compilation error. For compiling ncurses with extended color support, we 1357verify the version of the ncurses library >= 20170401. 1358 1359.. 1360 1361.. bpo: 45901 1362.. date: 2021-11-26-18-17-41 1363.. nonce: c5IBqM 1364.. section: Windows 1365 1366When installed through the Microsoft Store and set as the default app for 1367:file:`*.py` files, command line arguments will now be passed to Python when 1368invoking a script without explicitly launching Python (that is, ``script.py 1369args`` rather than ``python script.py args``). 1370 1371.. 1372 1373.. bpo: 45616 1374.. date: 2021-11-23-11-44-42 1375.. nonce: K52PLZ 1376.. section: Windows 1377 1378Fix Python Launcher's ability to distinguish between versions 3.1 and 3.10 1379when either one is explicitly requested. Previously, 3.1 would be used if 13803.10 was requested but not installed, and 3.10 would be used if 3.1 was 1381requested but 3.10 was installed. 1382 1383.. 1384 1385.. bpo: 45732 1386.. date: 2021-11-08-21-53-11 1387.. nonce: idl5kx 1388.. section: Windows 1389 1390Updates bundled Tcl/Tk to 8.6.12. 1391 1392.. 1393 1394.. bpo: 45720 1395.. date: 2021-11-05-01-05-46 1396.. nonce: 47Nc5I 1397.. section: Windows 1398 1399Internal reference to :file:`shlwapi.dll` was dropped to help improve 1400startup time. This DLL will no longer be loaded at the start of every Python 1401process. 1402 1403.. 1404 1405.. bpo: 43652 1406.. date: 2021-11-04-00-41-50 1407.. nonce: RnqV7I 1408.. section: Windows 1409 1410Update Tcl/Tk to 8.6.11, actually this time. The previous update incorrectly 1411included 8.6.10. 1412 1413.. 1414 1415.. bpo: 45337 1416.. date: 2021-09-30-23-17-27 1417.. nonce: qg7U_h 1418.. section: Windows 1419 1420venv now warns when the created environment may need to be accessed at a 1421different path, due to redirections, links or junctions. It also now 1422correctly installs or upgrades components when the alternate path is 1423required. 1424 1425.. 1426 1427.. bpo: 45732 1428.. date: 2021-12-05-23-52-03 1429.. nonce: -BWrnh 1430.. section: macOS 1431 1432Update python.org macOS installer to use Tcl/Tk 8.6.12. 1433 1434.. 1435 1436.. bpo: 44828 1437.. date: 2021-10-25-02-02-21 1438.. nonce: XBdXlJ 1439.. section: macOS 1440 1441Avoid tkinter file dialog failure on macOS 12 Monterey when using the Tk 14428.6.11 provided by python.org macOS installers. Patch by Marc Culler of the 1443Tk project. 1444 1445.. 1446 1447.. bpo: 34602 1448.. date: 2021-08-27-16-55-10 1449.. nonce: ZjHsYJ 1450.. section: macOS 1451 1452When building CPython on macOS with ``./configure 1453--with-undefined-behavior-sanitizer --with-pydebug``, the stack size is now 1454quadrupled to allow for the entire test suite to pass. 1455 1456.. 1457 1458.. bpo: 45495 1459.. date: 2021-10-16-17-20-32 1460.. nonce: ST8RFt 1461.. section: IDLE 1462 1463Add context keywords 'case' and 'match' to completions list. 1464 1465.. 1466 1467.. bpo: 45296 1468.. date: 2021-09-27-01-21-59 1469.. nonce: 9H8rdY 1470.. section: IDLE 1471 1472On Windows, change exit/quit message to suggest Ctrl-D, which works, instead 1473of <Ctrl-Z Return>, which does not work in IDLE. 1474 1475.. 1476 1477.. bpo: 45193 1478.. date: 2021-09-15-03-20-06 1479.. nonce: G61_GV 1480.. section: IDLE 1481 1482Make completion boxes appear on Ubuntu again. 1483 1484.. 1485 1486.. bpo: 44786 1487.. date: 2021-09-14-11-44-26 1488.. nonce: DU0LC0 1489.. section: Tools/Demos 1490 1491Fix a warning in regular expression in the c-analyzer script. 1492 1493.. 1494 1495.. bpo: 39026 1496.. date: 2021-11-09-15-42-11 1497.. nonce: sUnYWn 1498.. section: C API 1499 1500Fix Python.h to build C extensions with Xcode: remove a relative include 1501from ``Include/cpython/pystate.h``. 1502 1503.. 1504 1505.. bpo: 45307 1506.. date: 2021-09-28-12-00-55 1507.. nonce: 3ETFfX 1508.. section: C API 1509 1510Restore the private C API function :func:`_PyImport_FindExtensionObject`. It 1511will be removed in Python 3.11. 1512 1513.. 1514 1515.. bpo: 44687 1516.. date: 2021-09-19-17-18-25 1517.. nonce: 3fqDRC 1518.. section: C API 1519 1520:meth:`BufferedReader.peek` no longer raises :exc:`ValueError` when the 1521entire file has already been buffered. 1522 1523.. 1524 1525.. bpo: 44751 1526.. date: 2021-07-27-17-29-12 1527.. nonce: 4qmbDG 1528.. section: C API 1529 1530Remove ``crypt.h`` include from the public ``Python.h`` header. 1531