1.. date: 2022-12-05-01-39-10 2.. gh-issue: 100001 3.. nonce: uD05Fc 4.. release date: 2022-12-06 5.. section: Security 6 7``python -m http.server`` no longer allows terminal control characters sent 8within a garbage request to be printed to the stderr server log. 9 10This is done by changing the :mod:`http.server` 11:class:`BaseHTTPRequestHandler` ``.log_message`` method to replace control 12characters with a ``\xHH`` hex escape before printing. 13 14.. 15 16.. date: 2022-11-11-12-50-28 17.. gh-issue: 87604 18.. nonce: OtwH5L 19.. section: Security 20 21Avoid publishing list of active per-interpreter audit hooks via the 22:mod:`gc` module 23 24.. 25 26.. date: 2022-11-04-09-29-36 27.. gh-issue: 98433 28.. nonce: l76c5G 29.. section: Security 30 31The IDNA codec decoder used on DNS hostnames by :mod:`socket` or 32:mod:`asyncio` related name resolution functions no longer involves a 33quadratic algorithm. This prevents a potential CPU denial of service if an 34out-of-spec excessive length hostname involving bidirectional characters 35were decoded. Some protocols such as :mod:`urllib` http ``3xx`` redirects 36potentially allow for an attacker to supply such a name. 37 38.. 39 40.. date: 2022-10-26-21-04-23 41.. gh-issue: 98739 42.. nonce: keBWcY 43.. section: Security 44 45Update bundled libexpat to 2.5.0 46 47.. 48 49.. date: 2022-09-28-12-10-57 50.. gh-issue: 97612 51.. nonce: y6NvOQ 52.. section: Security 53 54Fix a shell code injection vulnerability in the 55``get-remote-certificate.py`` example script. The script no longer uses a 56shell to run ``openssl`` commands. Issue reported and initial fix by Caleb 57Shortt. Patch by Victor Stinner. 58 59.. 60 61.. date: 2022-11-30-15-29-08 62.. gh-issue: 99886 63.. nonce: feJkSv 64.. section: Core and Builtins 65 66Fix a crash when an object which does not have a dictionary frees its 67instance values. 68 69.. 70 71.. date: 2022-11-30-11-09-40 72.. gh-issue: 99891 73.. nonce: 9VomwB 74.. section: Core and Builtins 75 76Fix a bug in the tokenizer that could cause infinite recursion when showing 77syntax warnings that happen in the first line of the source. Patch by Pablo 78Galindo 79 80.. 81 82.. date: 2022-11-26-05-34-00 83.. gh-issue: 99729 84.. nonce: A3ovwQ 85.. section: Core and Builtins 86 87Fix an issue that could cause frames to be visible to Python code as they 88are being torn down, possibly leading to memory corruption or hard crashes 89of the interpreter. 90 91.. 92 93.. date: 2022-11-21-11-27-14 94.. gh-issue: 99578 95.. nonce: DcKoBJ 96.. section: Core and Builtins 97 98Fix a reference bug in :func:`_imp.create_builtin()` after the creation of 99the first sub-interpreter for modules ``builtins`` and ``sys``. Patch by 100Victor Stinner. 101 102.. 103 104.. date: 2022-11-19-22-27-52 105.. gh-issue: 99581 106.. nonce: yKYPbf 107.. section: Core and Builtins 108 109Fixed a bug that was causing a buffer overflow if the tokenizer copies a 110line missing the newline caracter from a file that is as long as the 111available tokenizer buffer. Patch by Pablo galindo 112 113.. 114 115.. date: 2022-11-18-11-24-25 116.. gh-issue: 99553 117.. nonce: F64h-n 118.. section: Core and Builtins 119 120Fix bug where an :exc:`ExceptionGroup` subclass can wrap a 121:exc:`BaseException`. 122 123.. 124 125.. date: 2022-11-12-01-39-57 126.. gh-issue: 99370 127.. nonce: _cu32j 128.. section: Core and Builtins 129 130Fix zip path for venv created from a non-installed python on POSIX 131platforms. 132 133.. 134 135.. date: 2022-11-10-02-11-23 136.. gh-issue: 99298 137.. nonce: NeArAJ 138.. section: Core and Builtins 139 140Fix an issue that could potentially cause incorrect error handling for some 141bytecode instructions. 142 143.. 144 145.. date: 2022-11-08-16-35-25 146.. gh-issue: 99205 147.. nonce: 2YOoFT 148.. section: Core and Builtins 149 150Fix an issue that prevented :c:type:`PyThreadState` and 151:c:type:`PyInterpreterState` memory from being freed properly. 152 153.. 154 155.. date: 2022-11-07-10-29-41 156.. gh-issue: 99181 157.. nonce: bfG4bI 158.. section: Core and Builtins 159 160Fix failure in :keyword:`except* <except_star>` with unhashable exceptions. 161 162.. 163 164.. date: 2022-11-07-08-17-12 165.. gh-issue: 99204 166.. nonce: Mf4hMD 167.. section: Core and Builtins 168 169Fix calculation of :data:`sys._base_executable` when inside a POSIX virtual 170environment using copies of the python binary when the base installation 171does not provide the executable name used by the venv. Calculation will fall 172back to alternative names ("python<MAJOR>", "python<MAJOR>.<MINOR>"). 173 174.. 175 176.. date: 2022-11-06-22-59-02 177.. gh-issue: 96055 178.. nonce: TmQuJn 179.. section: Core and Builtins 180 181Update :mod:`faulthandler` to emit an error message with the proper 182unexpected signal number. Patch by Dong-hee Na. 183 184.. 185 186.. date: 2022-11-06-13-25-01 187.. gh-issue: 99153 188.. nonce: uE3CVL 189.. section: Core and Builtins 190 191Fix location of :exc:`SyntaxError` for a :keyword:`try` block with both 192:keyword:`except` and :keyword:`except* <except_star>`. 193 194.. 195 196.. date: 2022-11-06-00-17-58 197.. gh-issue: 99103 198.. nonce: bFA9BX 199.. section: Core and Builtins 200 201Fix the error reporting positions of specialized traceback anchors when the 202source line contains Unicode characters. 203 204.. 205 206.. date: 2022-10-31-21-01-35 207.. gh-issue: 98852 208.. nonce: MYaRN6 209.. section: Core and Builtins 210 211Fix subscription of type aliases containing bare generic types or types like 212:class:`~typing.TypeVar`: for example ``tuple[A, T][int]`` and 213``tuple[TypeVar, T][int]``, where ``A`` is a generic type, and ``T`` is a 214type variable. 215 216.. 217 218.. date: 2022-10-31-18-03-10 219.. gh-issue: 98925 220.. nonce: zpdjVd 221.. section: Core and Builtins 222 223Lower the recursion depth for marshal on WASI to support wasmtime 2.0/main. 224 225.. 226 227.. date: 2022-10-28-14-52-55 228.. gh-issue: 98783 229.. nonce: iG0kMs 230.. section: Core and Builtins 231 232Fix multiple crashes in debug mode when ``str`` subclasses are used instead 233of ``str`` itself. 234 235.. 236 237.. date: 2022-10-21-11-28-53 238.. gh-issue: 99257 239.. nonce: nmcuf- 240.. section: Core and Builtins 241 242Fix an issue where member descriptors (such as those for 243:attr:`~object.__slots__`) could behave incorrectly or crash instead of 244raising a :exc:`TypeError` when accessed via an instance of an invalid type. 245 246.. 247 248.. date: 2022-10-19-23-48-46 249.. gh-issue: 98374 250.. nonce: eOBh8M 251.. section: Core and Builtins 252 253Suppress ImportError for invalid query for help() command. Patch by Dong-hee 254Na. 255 256.. 257 258.. date: 2022-10-19-01-01-08 259.. gh-issue: 98415 260.. nonce: ZS2eWh 261.. section: Core and Builtins 262 263Fix detection of MAC addresses for :mod:`uuid` on certain OSs. Patch by 264Chaim Sanders 265 266.. 267 268.. date: 2022-10-15-23-15-14 269.. gh-issue: 92119 270.. nonce: PMSwwG 271.. section: Core and Builtins 272 273Print exception class name instead of its string representation when raising 274errors from :mod:`ctypes` calls. 275 276.. 277 278.. date: 2022-10-06-15-45-57 279.. gh-issue: 96078 280.. nonce: fS-6mU 281.. section: Core and Builtins 282 283:func:`os.sched_yield` now release the GIL while calling sched_yield(2). 284Patch by Dong-hee Na. 285 286.. 287 288.. date: 2022-10-06-05-41-01 289.. gh-issue: 93354 290.. nonce: 6BpHl2 291.. section: Core and Builtins 292 293Fix an issue that could delay the specialization of :opcode:`PRECALL` 294instructions. 295 296.. 297 298.. date: 2022-10-05-17-02-22 299.. gh-issue: 97943 300.. nonce: LYAWlE 301.. section: Core and Builtins 302 303Bugfix: :func:`PyFunction_GetAnnotations` should return a borrowed 304reference. It was returning a new reference. 305 306.. 307 308.. date: 2022-10-04-02-00-10 309.. gh-issue: 97779 310.. nonce: f3N1hI 311.. section: Core and Builtins 312 313Ensure that all Python frame objects are backed by "complete" frames. 314 315.. 316 317.. date: 2022-10-01-08-55-09 318.. gh-issue: 97591 319.. nonce: pw6kkH 320.. section: Core and Builtins 321 322Fixed a missing incref/decref pair in ``Exception.__setstate__()``. Patch by 323Ofey Chan. 324 325.. 326 327.. date: 2022-09-29-15-19-29 328.. gh-issue: 94526 329.. nonce: wq5m6T 330.. section: Core and Builtins 331 332Fix the Python path configuration used to initialized :data:`sys.path` at 333Python startup. Paths are no longer encoded to UTF-8/strict to avoid 334encoding errors if it contains surrogate characters (bytes paths are decoded 335with the surrogateescape error handler). Patch by Victor Stinner. 336 337.. 338 339.. date: 2022-09-20-11-06-45 340.. gh-issue: 95921 341.. nonce: dkcRQn 342.. section: Core and Builtins 343 344Fix overly-broad source position information for chained comparisons used as 345branching conditions. 346 347.. 348 349.. date: 2022-09-16-16-54-35 350.. gh-issue: 96387 351.. nonce: GRzewg 352.. section: Core and Builtins 353 354At Python exit, sometimes a thread holding the GIL can wait forever for a 355thread (usually a daemon thread) which requested to drop the GIL, whereas 356the thread already exited. To fix the race condition, the thread which 357requested the GIL drop now resets its request before exiting. Issue 358discovered and analyzed by Mingliang ZHAO. Patch by Victor Stinner. 359 360.. 361 362.. date: 2022-09-16-12-36-13 363.. gh-issue: 96864 364.. nonce: PLU3i8 365.. section: Core and Builtins 366 367Fix a possible assertion failure, fatal error, or :exc:`SystemError` if a 368line tracing event raises an exception while opcode tracing is enabled. 369 370.. 371 372.. date: 2022-09-13-12-06-46 373.. gh-issue: 96678 374.. nonce: NqGFyb 375.. section: Core and Builtins 376 377Fix undefined behaviour in C code of null pointer arithmetic. 378 379.. 380 381.. date: 2022-09-12-16-58-22 382.. gh-issue: 96754 383.. nonce: 0GRme5 384.. section: Core and Builtins 385 386Make sure that all frame objects created are created from valid interpreter 387frames. Prevents the possibility of invalid frames in backtraces and signal 388handlers. 389 390.. 391 392.. date: 2022-08-29-13-06-58 393.. gh-issue: 95196 394.. nonce: eGRR4b 395.. section: Core and Builtins 396 397Disable incorrect pickling of the C implemented classmethod descriptors. 398 399.. 400 401.. date: 2022-08-15-21-08-11 402.. gh-issue: 96005 403.. nonce: 6eoc8k 404.. section: Core and Builtins 405 406On WASI :data:`~errno.ENOTCAPABLE` is now mapped to :exc:`PermissionError`. 407The :mod:`errno` modules exposes the new error number. ``getpath.py`` now 408ignores :exc:`PermissionError` when it cannot open landmark files 409``pybuilddir.txt`` and ``pyenv.cfg``. 410 411.. 412 413.. date: 2022-06-10-16-37-44 414.. gh-issue: 93696 415.. nonce: 65BI2R 416.. section: Core and Builtins 417 418Allow :mod:`pdb` to locate source for frozen modules in the standard 419library. 420 421.. 422 423.. bpo: 31718 424.. date: 2020-02-23-23-48-15 425.. nonce: sXko5e 426.. section: Core and Builtins 427 428Raise :exc:`ValueError` instead of :exc:`SystemError` when methods of 429uninitialized :class:`io.IncrementalNewlineDecoder` objects are called. 430Patch by Oren Milman. 431 432.. 433 434.. bpo: 38031 435.. date: 2019-09-04-19-09-49 436.. nonce: Yq4L72 437.. section: Core and Builtins 438 439Fix a possible assertion failure in :class:`io.FileIO` when the opener 440returns an invalid file descriptor. 441 442.. 443 444.. date: 2022-12-05-13-40-15 445.. gh-issue: 100001 446.. nonce: 78ReYp 447.. section: Library 448 449Also \ escape \s in the http.server BaseHTTPRequestHandler.log_message so 450that it is technically possible to parse the line and reconstruct what the 451original data was. Without this a \xHH is ambiguious as to if it is a hex 452replacement we put in or the characters r"\x" came through in the original 453request line. 454 455.. 456 457.. date: 2022-12-02-13-05-00 458.. gh-issue: 93453 459.. nonce: EFj1NN 460.. section: Library 461 462:func:`asyncio.get_event_loop` now only emits a deprecation warning when a 463new event loop was created implicitly. It no longer emits a deprecation 464warning if the current event loop was set. 465 466.. 467 468.. date: 2022-11-21-17-56-18 469.. gh-issue: 51524 470.. nonce: nTykx8 471.. section: Library 472 473Fix bug when calling trace.CoverageResults with valid infile. 474 475.. 476 477.. date: 2022-11-21-13-49-03 478.. gh-issue: 99645 479.. nonce: 9w1QKq 480.. section: Library 481 482Fix a bug in handling class cleanups in :class:`unittest.TestCase`. Now 483``addClassCleanup()`` uses separate lists for different ``TestCase`` 484subclasses, and ``doClassCleanups()`` only cleans up the particular class. 485 486.. 487 488.. date: 2022-11-15-10-55-24 489.. gh-issue: 97001 490.. nonce: KeQuVF 491.. section: Library 492 493Release the GIL when calling termios APIs to avoid blocking threads. 494 495.. 496 497.. date: 2022-11-13-02-06-56 498.. gh-issue: 99341 499.. nonce: 8-OlwB 500.. section: Library 501 502Fix :func:`ast.increment_lineno` to also cover :class:`ast.TypeIgnore` when 503changing line numbers. 504 505.. 506 507.. date: 2022-11-12-15-45-51 508.. gh-issue: 99418 509.. nonce: FxfAXS 510.. section: Library 511 512Fix bug in :func:`urllib.parse.urlparse` that causes URL schemes that begin 513with a digit, a plus sign, or a minus sign to be parsed incorrectly. 514 515.. 516 517.. date: 2022-11-12-12-15-30 518.. gh-issue: 99382 519.. nonce: dKg_rW 520.. section: Library 521 522Check the number of arguments in substitution in user generics containing a 523:class:`~typing.TypeVarTuple` and one or more :class:`~typing.TypeVar`. 524 525.. 526 527.. date: 2022-11-12-12-10-23 528.. gh-issue: 99379 529.. nonce: bcGhxF 530.. section: Library 531 532Fix substitution of :class:`~typing.ParamSpec` followed by 533:class:`~typing.TypeVarTuple` in generic aliases. 534 535.. 536 537.. date: 2022-11-12-12-08-34 538.. gh-issue: 99344 539.. nonce: 7M_u8G 540.. section: Library 541 542Fix substitution of :class:`~typing.TypeVarTuple` and 543:class:`~typing.ParamSpec` together in user generics. 544 545.. 546 547.. date: 2022-11-09-20-48-42 548.. gh-issue: 74044 549.. nonce: zBj26K 550.. section: Library 551 552Fixed bug where :func:`inspect.signature` reported incorrect arguments for 553decorated methods. 554 555.. 556 557.. date: 2022-11-09-12-16-35 558.. gh-issue: 99275 559.. nonce: klOqoL 560.. section: Library 561 562Fix ``SystemError`` in :mod:`ctypes` when exception was not set during 563``__initsubclass__``. 564 565.. 566 567.. date: 2022-11-09-08-40-52 568.. gh-issue: 99277 569.. nonce: J1P44O 570.. section: Library 571 572Remove older version of ``_SSLProtocolTransport.get_write_buffer_limits`` in 573:mod:`!asyncio.sslproto` 574 575.. 576 577.. date: 2022-11-08-11-15-37 578.. gh-issue: 99248 579.. nonce: 1vt8xI 580.. section: Library 581 582fix negative numbers failing in verify() 583 584.. 585 586.. date: 2022-11-06-12-44-51 587.. gh-issue: 99155 588.. nonce: vLZOzi 589.. section: Library 590 591Fix :class:`statistics.NormalDist` pickle with ``0`` and ``1`` protocols. 592 593.. 594 595.. date: 2022-11-05-23-16-15 596.. gh-issue: 93464 597.. nonce: ucd4vP 598.. section: Library 599 600``enum.auto()`` is now correctly activated when combined with other 601assignment values. E.g. ``ONE = auto(), 'some text'`` will now evaluate as 602``(1, 'some text')``. 603 604.. 605 606.. date: 2022-11-05-17-16-40 607.. gh-issue: 99134 608.. nonce: Msgspf 609.. section: Library 610 611Update the bundled copy of pip to version 22.3.1. 612 613.. 614 615.. date: 2022-11-02-05-54-02 616.. gh-issue: 83004 617.. nonce: 0v8iyw 618.. section: Library 619 620Clean up refleak on failed module initialisation in :mod:`_zoneinfo` 621 622.. 623 624.. date: 2022-11-02-05-53-25 625.. gh-issue: 83004 626.. nonce: qc_KHr 627.. section: Library 628 629Clean up refleaks on failed module initialisation in in :mod:`_pickle` 630 631.. 632 633.. date: 2022-11-02-05-52-36 634.. gh-issue: 83004 635.. nonce: LBl79O 636.. section: Library 637 638Clean up refleak on failed module initialisation in :mod:`_io`. 639 640.. 641 642.. date: 2022-10-31-12-34-03 643.. gh-issue: 98897 644.. nonce: rgNn4x 645.. section: Library 646 647Fix memory leak in :func:`math.dist` when both points don't have the same 648dimension. Patch by Kumar Aditya. 649 650.. 651 652.. date: 2022-10-30-12-22-24 653.. gh-issue: 98706 654.. nonce: v1Kuy5 655.. section: Library 656 657[3.11] Applied changes from importlib_metadata `4.11.4 through 4.13 658<https://importlib-metadata.readthedocs.io/en/latest/history.html#v4-13-0>`_, 659including compatibility and robustness fixes for ``Distribution`` objects 660without ``_normalized_name``, disallowing invalid inputs to 661``Distribution.from_name``, and refined behaviors in 662``PathDistribution._name_from_stem`` and 663``PathDistribution._normalized_name``. 664 665.. 666 667.. date: 2022-10-29-03-40-18 668.. gh-issue: 98793 669.. nonce: WSPB4A 670.. section: Library 671 672Fix argument typechecks in :func:`!_overlapped.WSAConnect` and 673:func:`!_overlapped.Overlapped.WSASendTo` functions. 674 675.. 676 677.. date: 2022-10-28-23-44-17 678.. gh-issue: 98744 679.. nonce: sGHDWm 680.. section: Library 681 682Prevent crashing in :mod:`traceback` when retrieving the byte-offset for 683some source files that contain certain unicode characters. 684 685.. 686 687.. date: 2022-10-27-12-56-38 688.. gh-issue: 98740 689.. nonce: ZoqqGM 690.. section: Library 691 692Fix internal error in the :mod:`re` module which in very rare circumstances 693prevented compilation of a regular expression containing a :ref:`conditional 694expression <re-conditional-expression>` without the "else" branch. 695 696.. 697 698.. date: 2022-10-26-07-51-55 699.. gh-issue: 98703 700.. nonce: 0hW773 701.. section: Library 702 703Fix :meth:`asyncio.StreamWriter.drain` to call ``protocol.connection_lost`` 704callback only once on Windows. 705 706.. 707 708.. date: 2022-10-25-20-17-34 709.. gh-issue: 98624 710.. nonce: YQUPFy 711.. section: Library 712 713Add a mutex to unittest.mock.NonCallableMock to protect concurrent access to 714mock attributes. 715 716.. 717 718.. date: 2022-10-23-18-30-39 719.. gh-issue: 89237 720.. nonce: kBui30 721.. section: Library 722 723Fix hang on Windows in ``subprocess.wait_closed()`` in :mod:`asyncio` with 724:class:`~asyncio.ProactorEventLoop`. Patch by Kumar Aditya. 725 726.. 727 728.. date: 2022-10-19-18-31-53 729.. gh-issue: 98458 730.. nonce: vwyq7O 731.. section: Library 732 733Fix infinite loop in unittest when a self-referencing chained exception is 734raised 735 736.. 737 738.. date: 2022-10-19-09-29-12 739.. gh-issue: 97928 740.. nonce: xj3im7 741.. section: Library 742 743:meth:`tkinter.Text.count` raises now an exception for options starting with 744"-" instead of silently ignoring them. 745 746.. 747 748.. date: 2022-10-16-18-52-00 749.. gh-issue: 97966 750.. nonce: humlhz 751.. section: Library 752 753On ``uname_result``, restored expectation that ``_fields`` and ``_asdict`` 754would include all six properties including ``processor``. 755 756.. 757 758.. date: 2022-10-16-06-18-59 759.. gh-issue: 98307 760.. nonce: b2_CDu 761.. section: Library 762 763A :meth:`~logging.handlers.SysLogHandler.createSocket` method was added to 764:class:`~logging.handlers.SysLogHandler`. 765 766.. 767 768.. date: 2022-10-14-19-57-37 769.. gh-issue: 96035 770.. nonce: 0xcX-p 771.. section: Library 772 773Fix bug in :func:`urllib.parse.urlparse` that causes certain port numbers 774containing whitespace, underscores, plus and minus signs, or non-ASCII 775digits to be incorrectly accepted. 776 777.. 778 779.. date: 2022-10-14-11-46-31 780.. gh-issue: 98251 781.. nonce: Uxc9al 782.. section: Library 783 784Allow :mod:`venv` to pass along :envvar:`PYTHON*` variables to ``ensurepip`` 785and ``pip`` when they do not impact path resolution 786 787.. 788 789.. date: 2022-10-12-10-00-40 790.. gh-issue: 98178 791.. nonce: hspH51 792.. section: Library 793 794On macOS, fix a crash in :func:`syslog.syslog` in multi-threaded 795applications. On macOS, the libc ``syslog()`` function is not thread-safe, 796so :func:`syslog.syslog` no longer releases the GIL to call it. Patch by 797Victor Stinner. 798 799.. 800 801.. date: 2022-10-10-07-07-31 802.. gh-issue: 96151 803.. nonce: K9fwoq 804.. section: Library 805 806Allow ``BUILTINS`` to be a valid field name for frozen dataclasses. 807 808.. 809 810.. date: 2022-10-09-12-12-38 811.. gh-issue: 87730 812.. nonce: ClgP3f 813.. section: Library 814 815Wrap network errors consistently in urllib FTP support, so the test suite 816doesn't fail when a network is available but the public internet is not 817reachable. 818 819.. 820 821.. date: 2022-10-08-19-39-27 822.. gh-issue: 98086 823.. nonce: y---WC 824.. section: Library 825 826Make sure ``patch.dict()`` can be applied on async functions. 827 828.. 829 830.. date: 2022-10-06-23-42-00 831.. gh-issue: 90985 832.. nonce: s280JY 833.. section: Library 834 835Earlier in 3.11 we deprecated ``asyncio.Task.cancel("message")``. We 836realized we were too harsh, and have undeprecated it. 837 838.. 839 840.. date: 2022-10-04-21-21-41 841.. gh-issue: 97837 842.. nonce: 19q-eg 843.. section: Library 844 845Change deprecate warning message in :mod:`unittest` from 846 847``It is deprecated to return a value!=None`` 848 849to 850 851``It is deprecated to return a value that is not None from a test case`` 852 853.. 854 855.. date: 2022-10-04-07-55-19 856.. gh-issue: 97825 857.. nonce: mNdv1l 858.. section: Library 859 860Fixes :exc:`AttributeError` when :meth:`subprocess.check_output` is used 861with argument ``input=None`` and either of the arguments *encoding* or 862*errors* are used. 863 864.. 865 866.. date: 2022-10-02-12-38-22 867.. gh-issue: 82836 868.. nonce: OvYLmC 869.. section: Library 870 871Fix :attr:`~ipaddress.IPv4Address.is_private` properties in the 872:mod:`ipaddress` module. Previously non-private networks (0.0.0.0/0) would 873return True from this method; now they correctly return False. 874 875.. 876 877.. date: 2022-09-30-15-56-20 878.. gh-issue: 96827 879.. nonce: lzy1iw 880.. section: Library 881 882Avoid spurious tracebacks from :mod:`asyncio` when default executor cleanup 883is delayed until after the event loop is closed (e.g. as the result of a 884keyboard interrupt). 885 886.. 887 888.. date: 2022-09-29-23-22-24 889.. gh-issue: 97592 890.. nonce: tpJg_J 891.. section: Library 892 893Avoid a crash in the C version of 894:meth:`asyncio.Future.remove_done_callback` when an evil argument is passed. 895 896.. 897 898.. date: 2022-09-29-08-15-55 899.. gh-issue: 97639 900.. nonce: JSjWYW 901.. section: Library 902 903Remove ``tokenize.NL`` check from :mod:`tabnanny`. 904 905.. 906 907.. date: 2022-09-25-20-42-33 908.. gh-issue: 73588 909.. nonce: uVtjEA 910.. section: Library 911 912Fix generation of the default name of :class:`tkinter.Checkbutton`. 913Previously, checkbuttons in different parent widgets could have the same 914short name and share the same state if arguments "name" and "variable" are 915not specified. Now they are globally unique. 916 917.. 918 919.. date: 2022-09-22-14-35-02 920.. gh-issue: 97005 921.. nonce: yf21Q7 922.. section: Library 923 924Update bundled libexpat to 2.4.9 925 926.. 927 928.. date: 2022-09-22-11-50-29 929.. gh-issue: 85760 930.. nonce: DETTPd 931.. section: Library 932 933Fix race condition in :mod:`asyncio` where 934:meth:`~asyncio.SubprocessProtocol.process_exited` called before the 935:meth:`~asyncio.SubprocessProtocol.pipe_data_received` leading to 936inconsistent output. Patch by Kumar Aditya. 937 938.. 939 940.. date: 2022-09-17-13-15-10 941.. gh-issue: 96819 942.. nonce: 6RfqM7 943.. section: Library 944 945Fixed check in :mod:`multiprocessing.resource_tracker` that guarantees that 946the length of a write to a pipe is not greater than ``PIPE_BUF``. 947 948.. 949 950.. date: 2022-09-15-00-37-33 951.. gh-issue: 96741 952.. nonce: 4b6czN 953.. section: Library 954 955Corrected type annotation for dataclass attribute 956``pstats.FunctionProfile.ncalls`` to be ``str``. 957 958.. 959 960.. date: 2022-08-30-11-46-36 961.. gh-issue: 95987 962.. nonce: CV7_u4 963.. section: Library 964 965Fix ``repr`` of ``Any`` subclasses. 966 967.. 968 969.. date: 2022-08-29-16-54-36 970.. gh-issue: 96388 971.. nonce: dCpJcu 972.. section: Library 973 974Work around missing socket functions in :class:`~socket.socket`'s 975``__repr__``. 976 977.. 978 979.. date: 2022-08-29-12-35-28 980.. gh-issue: 96073 981.. nonce: WaGstf 982.. section: Library 983 984In :mod:`inspect`, fix overeager replacement of "``typing.``" in formatting 985annotations. 986 987.. 988 989.. date: 2022-08-23-03-13-18 990.. gh-issue: 96192 991.. nonce: TJywOF 992.. section: Library 993 994Fix handling of ``bytes`` :term:`path-like objects <path-like object>` in 995:func:`os.ismount()`. 996 997.. 998 999.. date: 2022-08-20-10-31-01 1000.. gh-issue: 96052 1001.. nonce: a6FhaD 1002.. section: Library 1003 1004Fix handling compiler warnings (SyntaxWarning and DeprecationWarning) in 1005:func:`codeop.compile_command` when checking for incomplete input. 1006Previously it emitted warnings and raised a SyntaxError. Now it always 1007returns ``None`` for incomplete input without emitting any warnings. 1008 1009.. 1010 1011.. date: 2022-08-06-12-18-07 1012.. gh-issue: 88863 1013.. nonce: NnqsuJ 1014.. section: Library 1015 1016To avoid apparent memory leaks when :func:`asyncio.open_connection` raises, 1017break reference cycles generated by local exception and future instances 1018(which has exception instance as its member var). Patch by Dong Uk, Kang. 1019 1020.. 1021 1022.. date: 2022-07-22-09-09-08 1023.. gh-issue: 91212 1024.. nonce: 53O8Ab 1025.. section: Library 1026 1027Fixed flickering of the turtle window when the tracer is turned off. Patch 1028by Shin-myoung-serp. 1029 1030.. 1031 1032.. date: 2022-07-08-08-39-35 1033.. gh-issue: 88050 1034.. nonce: 0aOC_m 1035.. section: Library 1036 1037Fix :mod:`asyncio` subprocess transport to kill process cleanly when process 1038is blocked and avoid ``RuntimeError`` when loop is closed. Patch by Kumar 1039Aditya. 1040 1041.. 1042 1043.. date: 2022-06-17-12-02-30 1044.. gh-issue: 93858 1045.. nonce: R49ARc 1046.. section: Library 1047 1048Prevent error when activating venv in nested fish instances. 1049 1050.. 1051 1052.. date: 2022-04-23-03-46-37 1053.. gh-issue: 91078 1054.. nonce: 87-hkp 1055.. section: Library 1056 1057:meth:`TarFile.next` now returns ``None`` when called on an empty tarfile. 1058 1059.. 1060 1061.. bpo: 47220 1062.. date: 2022-04-04-22-54-11 1063.. nonce: L9jYu4 1064.. section: Library 1065 1066Document the optional *callback* parameter of :class:`WeakMethod`. Patch by 1067Géry Ogam. 1068 1069.. 1070 1071.. bpo: 46364 1072.. date: 2022-01-14-10-49-20 1073.. nonce: SzhlU9 1074.. section: Library 1075 1076Restrict use of sockets instead of pipes for stdin of subprocesses created 1077by :mod:`asyncio` to AIX platform only. 1078 1079.. 1080 1081.. bpo: 38523 1082.. date: 2020-10-23-22-20-52 1083.. nonce: CrkxLh 1084.. section: Library 1085 1086:func:`shutil.copytree` now applies the *ignore_dangling_symlinks* argument 1087recursively. 1088 1089.. 1090 1091.. bpo: 36267 1092.. date: 2019-09-03-15-45-19 1093.. nonce: z42Ex7 1094.. section: Library 1095 1096Fix IndexError in :class:`argparse.ArgumentParser` when a ``store_true`` 1097action is given an explicit argument. 1098 1099.. 1100 1101.. date: 2022-11-16-12-52-23 1102.. gh-issue: 92892 1103.. nonce: TS-P0j 1104.. section: Documentation 1105 1106Document that calling variadic functions with ctypes requires special care 1107on macOS/arm64 (and possibly other platforms). 1108 1109.. 1110 1111.. date: 2022-10-16-17-34-45 1112.. gh-issue: 85525 1113.. nonce: DvkD0v 1114.. section: Documentation 1115 1116Remove extra row 1117 1118.. 1119 1120.. date: 2022-08-12-01-12-52 1121.. gh-issue: 95588 1122.. nonce: PA0FI7 1123.. section: Documentation 1124 1125Clarified the conflicting advice given in the :mod:`ast` documentation about 1126:func:`ast.literal_eval` being "safe" for use on untrusted input while at 1127the same time warning that it can crash the process. The latter statement is 1128true and is deemed unfixable without a large amount of work unsuitable for a 1129bugfix. So we keep the warning and no longer claim that ``literal_eval`` is 1130safe. 1131 1132.. 1133 1134.. bpo: 41825 1135.. date: 2020-09-22-12-32-16 1136.. nonce: npcaCb 1137.. section: Documentation 1138 1139Restructured the documentation for the :func:`os.wait* <os.wait>` family of 1140functions, and improved the docs for :func:`os.waitid` with more explanation 1141of the possible argument constants. 1142 1143.. 1144 1145.. date: 2022-12-05-16-12-56 1146.. gh-issue: 99892 1147.. nonce: sz_eW8 1148.. section: Tests 1149 1150Skip test_normalization() of test_unicodedata if it fails to download 1151NormalizationTest.txt file from pythontest.net. Patch by Victor Stinner. 1152 1153.. 1154 1155.. date: 2022-12-01-18-55-18 1156.. gh-issue: 99934 1157.. nonce: Ox3Fqf 1158.. section: Tests 1159 1160Correct test_marsh on (32 bit) x86: test_deterministic sets was failing. 1161 1162.. 1163 1164.. date: 2022-11-21-19-21-30 1165.. gh-issue: 99659 1166.. nonce: 4gP0nm 1167.. section: Tests 1168 1169Optional big memory tests in ``test_sqlite3`` now catch the correct 1170:exc:`sqlite.DataError` exception type in case of too large strings and/or 1171blobs passed. 1172 1173.. 1174 1175.. date: 2022-10-26-15-19-20 1176.. gh-issue: 98713 1177.. nonce: Lnu32R 1178.. section: Tests 1179 1180Fix a bug in the :mod:`typing` tests where a test relying on 1181CPython-specific implementation details was not decorated with 1182``@cpython_only`` and was not skipped on other implementations. 1183 1184.. 1185 1186.. date: 2022-10-15-07-46-48 1187.. gh-issue: 87390 1188.. nonce: asR-Zo 1189.. section: Tests 1190 1191Add tests for star-unpacking with PEP 646, and some other miscellaneous PEP 1192646 tests. 1193 1194.. 1195 1196.. date: 2022-10-12-14-57-06 1197.. gh-issue: 96853 1198.. nonce: ANe-bw 1199.. section: Tests 1200 1201Added explicit coverage of ``Py_Initialize`` (and hence ``Py_InitializeEx``) 1202back to the embedding tests (all other embedding tests migrated to 1203``Py_InitializeFromConfig`` in Python 3.11) 1204 1205.. 1206 1207.. bpo: 34272 1208.. date: 2018-07-29-15-59-51 1209.. nonce: lVX2uR 1210.. section: Tests 1211 1212Some C API tests were moved into the new Lib/test/test_capi/ directory. 1213 1214.. 1215 1216.. date: 2022-11-24-02-58-10 1217.. gh-issue: 99086 1218.. nonce: DV_4Br 1219.. section: Build 1220 1221Fix ``-Wimplicit-int``, ``-Wstrict-prototypes``, and 1222``-Wimplicit-function-declaration`` compiler warnings in 1223:program:`configure` checks. 1224 1225.. 1226 1227.. date: 2022-11-15-08-40-22 1228.. gh-issue: 99337 1229.. nonce: 5LoQDE 1230.. section: Build 1231 1232Fix a compilation issue with GCC 12 on macOS. 1233 1234.. 1235 1236.. date: 2022-11-04-02-58-10 1237.. gh-issue: 99086 1238.. nonce: DV_4Br 1239.. section: Build 1240 1241Fix ``-Wimplicit-int`` compiler warning in :program:`configure` check for 1242``PTHREAD_SCOPE_SYSTEM``. 1243 1244.. 1245 1246.. date: 2022-11-03-08-10-49 1247.. gh-issue: 98872 1248.. nonce: gdsR8X 1249.. section: Build 1250 1251Fix a possible fd leak in ``Programs/_freeze_module.c`` introduced in Python 12523.11. 1253 1254.. 1255 1256.. date: 2022-11-02-19-25-07 1257.. gh-issue: 99016 1258.. nonce: R05NkD 1259.. section: Build 1260 1261Fix build with ``PYTHON_FOR_REGEN=python3.8``. 1262 1263.. 1264 1265.. date: 2022-11-02-18-45-35 1266.. gh-issue: 97731 1267.. nonce: zKpTlj 1268.. section: Build 1269 1270Specify the full path to the source location for ``make docclean`` (needed 1271for cross-builds). 1272 1273.. 1274 1275.. date: 2022-10-26-12-37-52 1276.. gh-issue: 98707 1277.. nonce: eVXGEx 1278.. section: Build 1279 1280Don't use vendored ``libmpdec`` headers if :option:`--with-system-libmpdec` 1281is passed to :program:`configure`. Don't use vendored ``libexpat`` headers 1282if :option:`--with-system-expat` is passed to :program:`!configure`. 1283 1284.. 1285 1286.. date: 2022-09-20-12-43-44 1287.. gh-issue: 96761 1288.. nonce: IF29kR 1289.. section: Build 1290 1291Fix the build process of clang compiler for :program:`_bootstrap_python` if 1292LTO optimization is applied. Patch by Matthias Görgens and Dong-hee Na. 1293 1294.. 1295 1296.. date: 2022-09-17-11-19-24 1297.. gh-issue: 96883 1298.. nonce: p_gr62 1299.. section: Build 1300 1301``wasm32-emscripten`` builds for browsers now include 1302:mod:`concurrent.futures` for :mod:`asyncio` and :mod:`unittest.mock`. 1303 1304.. 1305 1306.. date: 2022-08-26-11-09-11 1307.. gh-issue: 84461 1308.. nonce: Nsdn_R 1309.. section: Build 1310 1311``wasm32-emscripten`` platform no longer builds :mod:`resource` module, 1312:func:`~os.getresuid`, :func:`~os.getresgid`, and their setters. The APIs 1313are stubs and not functional. 1314 1315.. 1316 1317.. date: 2022-06-25-23-25-47 1318.. gh-issue: 94280 1319.. nonce: YhEyW_ 1320.. section: Build 1321 1322Updated pegen regeneration script on Windows to find and use Python 3.9 or 1323higher. Prior to this, pegen regeneration already required 3.9 or higher, 1324but the script may have used lower versions of Python. 1325 1326.. 1327 1328.. date: 2022-11-23-17-17-16 1329.. gh-issue: 99345 1330.. nonce: jOa3-f 1331.. section: Windows 1332 1333Use faster initialization functions to detect install location for Windows 1334Store package 1335 1336.. 1337 1338.. date: 2022-11-21-19-50-18 1339.. gh-issue: 98629 1340.. nonce: tMmB_B 1341.. section: Windows 1342 1343Fix initialization of :data:`sys.version` and ``sys._git`` on Windows 1344 1345.. 1346 1347.. date: 2022-11-16-19-03-21 1348.. gh-issue: 99442 1349.. nonce: 6Dgk3Q 1350.. section: Windows 1351 1352Fix handling in :ref:`launcher` when ``argv[0]`` does not include a file 1353extension. 1354 1355.. 1356 1357.. date: 2022-11-01-11-07-33 1358.. gh-issue: 98689 1359.. nonce: 0f6e_N 1360.. section: Windows 1361 1362Update Windows builds to zlib v1.2.13. v1.2.12 has CVE-2022-37434, but the 1363vulnerable ``inflateGetHeader`` API is not used by Python. 1364 1365.. 1366 1367.. date: 2022-11-01-00-37-13 1368.. gh-issue: 98790 1369.. nonce: fpaPAx 1370.. section: Windows 1371 1372Assumes that a missing ``DLLs`` directory means that standard extension 1373modules are in the executable's directory. 1374 1375.. 1376 1377.. date: 2022-10-27-20-30-16 1378.. gh-issue: 98745 1379.. nonce: v06p4r 1380.. section: Windows 1381 1382Update :file:`py.exe` launcher to install 3.11 by default and 3.12 on 1383request. 1384 1385.. 1386 1387.. date: 2022-10-26-17-43-09 1388.. gh-issue: 98692 1389.. nonce: bOopfZ 1390.. section: Windows 1391 1392Fix the :ref:`launcher` ignoring unrecognized shebang lines instead of 1393treating them as local paths 1394 1395.. 1396 1397.. date: 2022-10-25-10-34-17 1398.. gh-issue: 94328 1399.. nonce: 19NhdU 1400.. section: Windows 1401 1402Update Windows installer to use SQLite 3.39.4. 1403 1404.. 1405 1406.. date: 2022-10-02-11-59-23 1407.. gh-issue: 97728 1408.. nonce: dIdlPE 1409.. section: Windows 1410 1411Fix possible crashes caused by the use of uninitialized variables when pass 1412invalid arguments in :func:`os.system` on Windows and in Windows-specific 1413modules (like ``winreg``). 1414 1415.. 1416 1417.. date: 2022-09-23-15-40-04 1418.. gh-issue: 96965 1419.. nonce: CsnEGs 1420.. section: Windows 1421 1422Update libffi to 3.4.3 1423 1424.. 1425 1426.. date: 2022-08-30-12-01-51 1427.. gh-issue: 94781 1428.. nonce: OxO-Gr 1429.. section: Windows 1430 1431Fix :file:`pcbuild.proj` to clean previous instances of ouput files in 1432``Python\deepfreeze`` and ``Python\frozen_modules`` directories on Windows. 1433Patch by Charlie Zhao. 1434 1435.. 1436 1437.. bpo: 40882 1438.. date: 2020-06-06-15-10-37 1439.. nonce: UvNbdj 1440.. section: Windows 1441 1442Fix a memory leak in :class:`multiprocessing.shared_memory.SharedMemory` on 1443Windows. 1444 1445.. 1446 1447.. date: 2022-11-25-09-23-20 1448.. gh-issue: 87235 1449.. nonce: SifjCD 1450.. section: macOS 1451 1452On macOS ``python3 /dev/fd/9 9</path/to/script.py`` failed for any script 1453longer than a couple of bytes. 1454 1455.. 1456 1457.. date: 2022-11-01-10-32-23 1458.. gh-issue: 98940 1459.. nonce: W3YzC_ 1460.. section: macOS 1461 1462Fix ``Mac/Extras.install.py`` file filter bug. 1463 1464.. 1465 1466.. date: 2022-10-25-10-32-23 1467.. gh-issue: 94328 1468.. nonce: W3YNC_ 1469.. section: macOS 1470 1471Update macOS installer to SQLite 3.39.4. 1472 1473.. 1474 1475.. date: 2022-10-15-21-20-40 1476.. gh-issue: 97527 1477.. nonce: otAHJM 1478.. section: IDLE 1479 1480Fix a bug in the previous bugfix that caused IDLE to not start when run with 14813.10.8, 3.12.0a1, and at least Microsoft Python 3.10.2288.0 installed 1482without the Lib/test package. 3.11.0 was never affected. 1483 1484.. 1485 1486.. date: 2022-08-29-17-25-13 1487.. gh-issue: 95853 1488.. nonce: Ce17cT 1489.. section: Tools/Demos 1490 1491The ``wasm_build.py`` script now pre-builds Emscripten ports, checks for 1492broken EMSDK versions, and warns about pkg-config env vars. 1493 1494.. 1495 1496.. date: 2022-08-10-17-08-43 1497.. gh-issue: 95853 1498.. nonce: HCjC2m 1499.. section: Tools/Demos 1500 1501The new tool ``Tools/wasm/wasm_builder.py`` automates configure, compile, 1502and test steps for building CPython on WebAssembly platforms. 1503 1504.. 1505 1506.. date: 2022-08-05-23-25-59 1507.. gh-issue: 95731 1508.. nonce: N2KohU 1509.. section: Tools/Demos 1510 1511Fix handling of module docstrings in :file:`Tools/i18n/pygettext.py`. 1512 1513.. 1514 1515.. date: 2022-12-05-17-30-13 1516.. gh-issue: 98680 1517.. nonce: FiMCxZ 1518.. section: C API 1519 1520``PyBUF_*`` constants were marked as part of Limited API of Python 3.11+. 1521These were available in 3.11.0 with :c:macro:`Py_LIMITED_API` defined for 15223.11, and are necessary to use the buffer API. 1523 1524.. 1525 1526.. date: 2022-11-03-17-46-41 1527.. gh-issue: 98978 1528.. nonce: KJjBvv 1529.. section: C API 1530 1531Fix use-after-free in ``Py_SetPythonHome(NULL)``, 1532``Py_SetProgramName(NULL)`` and ``_Py_SetProgramFullPath(NULL)`` function 1533calls. Issue reported by Benedikt Reinartz. Patch by Victor Stinner. 1534 1535.. 1536 1537.. date: 2022-10-16-15-00-25 1538.. gh-issue: 96853 1539.. nonce: V0wiXP 1540.. section: C API 1541 1542``Py_InitializeEx`` now correctly calls ``PyConfig_Clear`` after 1543initializing the interpreter (the omission didn't cause a memory leak only 1544because none of the dynamically allocated config fields are populated by the 1545wrapper function) 1546