1.. bpo: 38576 2.. date: 2020-03-14-14-57-44 3.. nonce: OowwQn 4.. release date: 2020-03-23 5.. section: Security 6 7Disallow control characters in hostnames in http.client, addressing 8CVE-2019-18348. Such potentially malicious header injection URLs now cause a 9InvalidURL to be raised. 10 11.. 12 13.. bpo: 40010 14.. date: 2020-03-20-13-51-55 15.. nonce: QGf5s8 16.. section: Core and Builtins 17 18Optimize pending calls in multithreaded applications. If a thread different 19than the main thread schedules a pending call (:c:func:`Py_AddPendingCall`), 20the bytecode evaluation loop is no longer interrupted at each bytecode 21instruction to check for pending calls which cannot be executed. Only the 22main thread can execute pending calls. 23 24Previously, the bytecode evaluation loop was interrupted at each instruction 25until the main thread executes pending calls. 26 27.. 28 29.. bpo: 1635741 30.. date: 2020-03-20-13-42-35 31.. nonce: bhIu5M 32.. section: Core and Builtins 33 34Port _weakref extension module to multiphase initialization (:pep:`489`). 35 36.. 37 38.. bpo: 1635741 39.. date: 2020-03-19-23-34-22 40.. nonce: ayunLM 41.. section: Core and Builtins 42 43Port _collections module to multiphase initialization (:pep:`489`). 44 45.. 46 47.. bpo: 40010 48.. date: 2020-03-19-02-26-13 49.. nonce: Y-LIR0 50.. section: Core and Builtins 51 52Optimize signal handling in multithreaded applications. If a thread 53different than the main thread gets a signal, the bytecode evaluation loop 54is no longer interrupted at each bytecode instruction to check for pending 55signals which cannot be handled. Only the main thread of the main 56interpreter can handle signals. 57 58Previously, the bytecode evaluation loop was interrupted at each instruction 59until the main thread handles signals. 60 61.. 62 63.. bpo: 39984 64.. date: 2020-03-19-00-45-37 65.. nonce: u-bHIq 66.. section: Core and Builtins 67 68If :c:func:`Py_AddPendingCall` is called in a subinterpreter, the function 69is now scheduled to be called from the subinterpreter, rather than being 70called from the main interpreter. Each subinterpreter now has its own list 71of scheduled calls. 72 73.. 74 75.. bpo: 1635741 76.. date: 2020-03-18-19-48-53 77.. nonce: ELEihr 78.. section: Core and Builtins 79 80Port _heapq module to multiphase initialization. 81 82.. 83 84.. bpo: 1635741 85.. date: 2020-03-18-00-17-26 86.. nonce: 7AtdhP 87.. section: Core and Builtins 88 89Port itertools module to multiphase initialization (:pep:`489`). 90 91.. 92 93.. bpo: 37207 94.. date: 2020-03-17-22-35-29 95.. nonce: sBAV1j 96.. section: Core and Builtins 97 98Speed up calls to ``frozenset()`` by using the :pep:`590` ``vectorcall`` 99calling convention. Patch by Dong-hee Na. 100 101.. 102 103.. bpo: 39984 104.. date: 2020-03-17-01-55-33 105.. nonce: y5Chgb 106.. section: Core and Builtins 107 108subinterpreters: Move ``_PyRuntimeState.ceval.tracing_possible`` to 109``PyInterpreterState.ceval.tracing_possible``: each interpreter now has its 110own variable. 111 112.. 113 114.. bpo: 37207 115.. date: 2020-03-15-23-16-00 116.. nonce: 6XbnQA 117.. section: Core and Builtins 118 119Speed up calls to ``set()`` by using the :pep:`590` ``vectorcall`` calling 120convention. Patch by Dong-hee Na. 121 122.. 123 124.. bpo: 1635741 125.. date: 2020-03-15-20-51-15 126.. nonce: iH0JND 127.. section: Core and Builtins 128 129Port _statistics module to multiphase initialization (:pep:`489`). 130 131.. 132 133.. bpo: 39968 134.. date: 2020-03-15-13-51-10 135.. nonce: f-Xi39 136.. section: Core and Builtins 137 138Use inline function to replace extension modules' get_module_state macros. 139 140.. 141 142.. bpo: 39965 143.. date: 2020-03-15-03-52-01 144.. nonce: Od3ZdP 145.. section: Core and Builtins 146 147Correctly raise ``SyntaxError`` if *await* is used inside non-async 148functions and ``PyCF_ALLOW_TOP_LEVEL_AWAIT`` is set (like in the asyncio 149REPL). Patch by Pablo Galindo. 150 151.. 152 153.. bpo: 39562 154.. date: 2020-03-12-22-13-50 155.. nonce: E2u273 156.. section: Core and Builtins 157 158Allow executing asynchronous comprehensions on the top level when the 159``PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag is given. Patch by Batuhan Taskaya. 160 161.. 162 163.. bpo: 37207 164.. date: 2020-03-12-02-41-12 165.. nonce: ye7OM3 166.. section: Core and Builtins 167 168Speed up calls to ``tuple()`` by using the :pep:`590` ``vectorcall`` calling 169convention. Patch by Dong-hee Na. 170 171.. 172 173.. bpo: 38373 174.. date: 2020-03-11-12-28-16 175.. nonce: FE9S21 176.. section: Core and Builtins 177 178Changed list overallocation strategy. It no longer overallocates if the new 179size is closer to overallocated size than to the old size and adds padding. 180 181.. 182 183.. bpo: 39926 184.. date: 2020-03-10-19-14-42 185.. nonce: H19bAa 186.. section: Core and Builtins 187 188Update Unicode database to Unicode version 13.0.0. 189 190.. 191 192.. bpo: 19466 193.. date: 2020-03-08-12-11-38 194.. nonce: OdOpXP 195.. section: Core and Builtins 196 197Clear the frames of daemon threads earlier during the Python shutdown to 198call objects destructors. So "unclosed file" resource warnings are now 199emitted for daemon threads in a more reliable way. 200 201.. 202 203.. bpo: 38894 204.. date: 2020-03-06-21-04-39 205.. nonce: nfcGKv 206.. section: Core and Builtins 207 208Fix a bug that was causing incomplete results when calling 209``pathlib.Path.glob`` in the presence of symlinks that point to files where 210the user does not have read access. Patch by Pablo Galindo and Matt 211Wozniski. 212 213.. 214 215.. bpo: 39877 216.. date: 2020-03-06-18-30-00 217.. nonce: bzd1y0 218.. section: Core and Builtins 219 220Fix :c:func:`PyEval_RestoreThread` random crash at exit with daemon threads. 221It now accesses the ``_PyRuntime`` variable directly instead of using 222``tstate->interp->runtime``, since ``tstate`` can be a dangling pointer 223after :c:func:`Py_Finalize` has been called. Moreover, the daemon thread now 224exits before trying to take the GIL. 225 226.. 227 228.. bpo: 39871 229.. date: 2020-03-06-06-12-37 230.. nonce: dCAj_2 231.. section: Core and Builtins 232 233Fix a possible :exc:`SystemError` in ``math.{atan2,copysign,remainder}()`` 234when the first argument cannot be converted to a :class:`float`. Patch by 235Zackery Spytz. 236 237.. 238 239.. bpo: 39776 240.. date: 2020-03-02-20-12-33 241.. nonce: fNaxi_ 242.. section: Core and Builtins 243 244Fix race condition where threads created by PyGILState_Ensure() could get a 245duplicate id. 246 247This affects consumers of tstate->id like the contextvar caching machinery, 248which could return invalid cached objects under heavy thread load (observed 249in embedded scenarios). 250 251.. 252 253.. bpo: 39778 254.. date: 2020-03-02-19-21-21 255.. nonce: _YGLEc 256.. section: Core and Builtins 257 258Fixed a crash due to incorrect handling of weak references in 259``collections.OrderedDict`` classes. Patch by Pablo Galindo. 260 261.. 262 263.. bpo: 1635741 264.. date: 2020-02-22-14-33-59 265.. nonce: BTJ0cX 266.. section: Core and Builtins 267 268Port audioop extension module to multiphase initialization (:pep:`489`). 269 270.. 271 272.. bpo: 39702 273.. date: 2020-02-20-08-12-52 274.. nonce: 4_AmyF 275.. section: Core and Builtins 276 277Relax :term:`decorator` grammar restrictions to allow any valid expression 278(:pep:`614`). 279 280.. 281 282.. bpo: 38091 283.. date: 2020-02-14-23-10-07 284.. nonce: pwR0K7 285.. section: Core and Builtins 286 287Tweak import deadlock detection code to not deadlock itself. 288 289.. 290 291.. bpo: 1635741 292.. date: 2020-02-05-07-55-57 293.. nonce: H_tCC9 294.. section: Core and Builtins 295 296Port _locale extension module to multiphase initialization (:pep:`489`). 297 298.. 299 300.. bpo: 39087 301.. date: 2020-02-03-21-12-39 302.. nonce: YnbUpL 303.. section: Core and Builtins 304 305Optimize :c:func:`PyUnicode_AsUTF8` and :c:func:`PyUnicode_AsUTF8AndSize` 306slightly when they need to create internal UTF-8 cache. 307 308.. 309 310.. bpo: 39520 311.. date: 2020-02-02-00-12-07 312.. nonce: uicBq6 313.. section: Core and Builtins 314 315Fix unparsing of ext slices with no items (``foo[:,]``). Patch by Batuhan 316Taskaya. 317 318.. 319 320.. bpo: 39220 321.. date: 2020-01-06-13-58-37 322.. nonce: KGFovE 323.. section: Core and Builtins 324 325Do not optimize annotations if 'from __future__ import annotations' is used. 326Patch by Pablo Galindo. 327 328.. 329 330.. bpo: 35712 331.. date: 2019-05-08-11-11-45 332.. nonce: KJthus 333.. section: Core and Builtins 334 335Using :data:`NotImplemented` in a boolean context has been deprecated. Patch 336contributed by Josh Rosenberg. 337 338.. 339 340.. bpo: 22490 341.. date: 2018-09-23-16-32-58 342.. nonce: 8e0YDf 343.. section: Core and Builtins 344 345Don't leak environment variable ``__PYVENV_LAUNCHER__`` into the interpreter 346session on macOS. 347 348.. 349 350.. bpo: 39830 351.. date: 2020-03-23-05-21-13 352.. nonce: IkqU1Y 353.. section: Library 354 355Add :class:`zipfile.Path` to ``__all__`` in the :mod:`zipfile` module. 356 357.. 358 359.. bpo: 40000 360.. date: 2020-03-18-12-54-25 361.. nonce: FnsPZC 362.. section: Library 363 364Improved error messages for validation of ``ast.Constant`` nodes. Patch by 365Batuhan Taskaya. 366 367.. 368 369.. bpo: 39999 370.. date: 2020-03-18-11-50-25 371.. nonce: 8aOXDT 372.. section: Library 373 374``__module__`` of the AST node classes is now set to "ast" instead of 375"_ast". Added docstrings for dummy AST node classes and deprecated 376attributes. 377 378.. 379 380.. bpo: 39991 381.. date: 2020-03-17-12-40-38 382.. nonce: hLPPs4 383.. section: Library 384 385:func:`uuid.getnode` now skips IPv6 addresses with the same string length 386than a MAC address (17 characters): only use MAC addresses. 387 388.. 389 390.. bpo: 39988 391.. date: 2020-03-17-09-35-00 392.. nonce: kXGl35 393.. section: Library 394 395Deprecated ``ast.AugLoad`` and ``ast.AugStore`` node classes because they 396are no longer used. 397 398.. 399 400.. bpo: 39656 401.. date: 2020-03-16-11-38-45 402.. nonce: MaNOgm 403.. section: Library 404 405Ensure ``bin/python3.#`` is always present in virtual environments on POSIX 406platforms - by Anthony Sottile. 407 408.. 409 410.. bpo: 39969 411.. date: 2020-03-15-17-56-48 412.. nonce: 6snm0c 413.. section: Library 414 415Deprecated ``ast.Param`` node class because it's no longer used. Patch by 416Batuhan Taskaya. 417 418.. 419 420.. bpo: 39360 421.. date: 2020-03-15-05-41-05 422.. nonce: cmcU5p 423.. section: Library 424 425Ensure all workers exit when finalizing a :class:`multiprocessing.Pool` 426implicitly via the module finalization handlers of multiprocessing. This 427fixes a deadlock situation that can be experienced when the Pool is not 428properly finalized via the context manager or a call to 429``multiprocessing.Pool.terminate``. Patch by Batuhan Taskaya and Pablo 430Galindo. 431 432.. 433 434.. bpo: 35370 435.. date: 2020-03-13-14-41-28 436.. nonce: df50Q7 437.. section: Library 438 439sys.settrace(), sys.setprofile() and _lsprof.Profiler.enable() now properly 440report :c:func:`PySys_Audit` error if "sys.setprofile" or "sys.settrace" 441audit event is denied. 442 443.. 444 445.. bpo: 39936 446.. date: 2020-03-12-21-59-47 447.. nonce: Ca9IKe 448.. section: Library 449 450AIX: Fix _aix_support module when the subprocess is not available, when 451building Python from scratch. It now uses new private _bootsubprocess 452module, rather than having two implementations depending if subprocess is 453available or not. So _aix_support.aix_platform() result is now the same if 454subprocess is available or not. 455 456.. 457 458.. bpo: 36144 459.. date: 2020-03-12-11-55-16 460.. nonce: 9bxGH_ 461.. section: Library 462 463:class:`collections.OrderedDict` now implements ``|`` and ``|=`` 464(:pep:`584`). 465 466.. 467 468.. bpo: 39652 469.. date: 2020-03-11-23-08-25 470.. nonce: gbasrk 471.. section: Library 472 473The column name found in ``sqlite3.Cursor.description`` is now truncated on 474the first '[' only if the PARSE_COLNAMES option is set. 475 476.. 477 478.. bpo: 39915 479.. date: 2020-03-10-19-38-47 480.. nonce: CjPeiY 481.. section: Library 482 483Ensure :attr:`unittest.mock.AsyncMock.await_args_list` has call objects in 484the order of awaited arguments instead of using 485:attr:`unittest.mock.Mock.call_args` which has the last value of the call. 486Patch by Karthikeyan Singaravelan. 487 488.. 489 490.. bpo: 36144 491.. date: 2020-03-10-19-22-31 492.. nonce: LABm7W 493.. section: Library 494 495Updated :data:`os.environ` and :data:`os.environb` to support :pep:`584`'s 496merge (``|``) and update (``|=``) operators. 497 498.. 499 500.. bpo: 38662 501.. date: 2020-03-10-15-32-31 502.. nonce: o1DMXj 503.. section: Library 504 505The ``ensurepip`` module now invokes ``pip`` via the ``runpy`` module. Hence 506it is no longer tightly coupled with the internal API of the bundled ``pip`` 507version, allowing easier updates to a newer ``pip`` version both internally 508and for distributors. 509 510.. 511 512.. bpo: 38075 513.. date: 2020-03-10-12-52-06 514.. nonce: qbESAF 515.. section: Library 516 517Fix the :meth:`random.Random.seed` method when a :class:`bool` is passed as 518the seed. 519 520.. 521 522.. bpo: 39916 523.. date: 2020-03-09-18-56-27 524.. nonce: BHHyp3 525.. section: Library 526 527More reliable use of ``os.scandir()`` in ``Path.glob()``. It no longer emits 528a ResourceWarning when interrupted. 529 530.. 531 532.. bpo: 39850 533.. date: 2020-03-09-01-45-06 534.. nonce: eaJNIE 535.. section: Library 536 537:mod:`multiprocessing` now supports abstract socket addresses (if abstract 538sockets are supported in the running platform). When creating arbitrary 539addresses (like when default-constructing 540:class:`multiprocessing.connection.Listener` objects) abstract sockets are 541preferred to avoid the case when the temporary-file-generated address is too 542large for an AF_UNIX socket address. Patch by Pablo Galindo. 543 544.. 545 546.. bpo: 36287 547.. date: 2020-03-08-09-53-55 548.. nonce: mxr5m8 549.. section: Library 550 551:func:`ast.dump()` no longer outputs optional fields and attributes with 552default values. The default values for optional fields and attributes of AST 553nodes are now set as class attributes (e.g. ``Constant.kind`` is set to 554``None``). 555 556.. 557 558.. bpo: 39889 559.. date: 2020-03-07-16-44-51 560.. nonce: 3RYqeX 561.. section: Library 562 563Fixed :func:`ast.unparse` for extended slices containing a single element 564(e.g. ``a[i:j,]``). Remove redundant tuples when index with a tuple (e.g. 565``a[i, j]``). 566 567.. 568 569.. bpo: 39828 570.. date: 2020-03-05-00-57-49 571.. nonce: yWq9NJ 572.. section: Library 573 574Fix :mod:`json.tool` to catch :exc:`BrokenPipeError`. Patch by Dong-hee Na. 575 576.. 577 578.. bpo: 13487 579.. date: 2020-03-04-16-10-59 580.. nonce: gqe4Fb 581.. section: Library 582 583Avoid a possible *"RuntimeError: dictionary changed size during iteration"* 584from :func:`inspect.getmodule` when it tried to loop through 585:attr:`sys.modules`. 586 587.. 588 589.. bpo: 39674 590.. date: 2020-03-03-16-21-41 591.. nonce: HJVkD5 592.. section: Library 593 594Revert "bpo-37330: open() no longer accept 'U' in file mode". The "U" mode 595of open() is kept in Python 3.9 to ease transition from Python 2.7, but will 596be removed in Python 3.10. 597 598.. 599 600.. bpo: 28577 601.. date: 2020-03-02-23-52-38 602.. nonce: EK91ae 603.. section: Library 604 605The hosts method on 32-bit prefix length IPv4Networks and 128-bit prefix 606IPv6Networks now returns a list containing the single Address instead of an 607empty list. 608 609.. 610 611.. bpo: 39826 612.. date: 2020-03-02-15-15-01 613.. nonce: DglHk7 614.. section: Library 615 616Add getConnection method to logging HTTPHandler to enable custom 617connections. 618 619.. 620 621.. bpo: 39763 622.. date: 2020-03-02-14-43-19 623.. nonce: 5a822c 624.. section: Library 625 626Reimplement :func:`distutils.spawn.spawn` function with the 627:mod:`subprocess` module. 628 629.. 630 631.. bpo: 39794 632.. date: 2020-02-29-19-17-39 633.. nonce: 7VjatS 634.. section: Library 635 636Add --without-decimal-contextvar build option. This enables a thread-local 637rather than a coroutine local context. 638 639.. 640 641.. bpo: 36144 642.. date: 2020-02-29-15-54-08 643.. nonce: 4GgTZs 644.. section: Library 645 646:class:`collections.defaultdict` now implements ``|`` (:pep:`584`). 647 648.. 649 650.. bpo: 39517 651.. date: 2020-02-29-11-20-50 652.. nonce: voQZb8 653.. section: Library 654 655Fix runpy.run_path() when using pathlike objects 656 657.. 658 659.. bpo: 39775 660.. date: 2020-02-28-16-42-16 661.. nonce: IuSvVb 662.. section: Library 663 664Change ``inspect.Signature.parameters`` back to ``collections.OrderedDict``. 665This was changed to ``dict`` in Python 3.9.0a4. 666 667.. 668 669.. bpo: 39678 670.. date: 2020-02-28-12-59-30 671.. nonce: 3idfxM 672.. section: Library 673 674Refactor queue_manager in :class:`concurrent.futures.ProcessPoolExecutor` to 675make it easier to maintain. 676 677.. 678 679.. bpo: 39764 680.. date: 2020-02-27-18-21-07 681.. nonce: wqPk68 682.. section: Library 683 684Fix AttributeError when calling get_stack on a PyAsyncGenObject Task 685 686.. 687 688.. bpo: 39769 689.. date: 2020-02-27-00-40-21 690.. nonce: hJmxu4 691.. section: Library 692 693The :func:`compileall.compile_dir` function's *ddir* parameter and the 694compileall command line flag `-d` no longer write the wrong pathname to the 695generated pyc file for submodules beneath the root of the directory tree 696being compiled. This fixes a regression introduced with Python 3.5. 697 698.. 699 700.. bpo: 36144 701.. date: 2020-02-25-09-28-06 702.. nonce: Rbvvi7 703.. section: Library 704 705:class:`types.MappingProxyType` objects now support the merge (``|``) 706operator from :pep:`584`. 707 708.. 709 710.. bpo: 38691 711.. date: 2020-02-23-02-09-03 712.. nonce: oND8Sk 713.. section: Library 714 715The :mod:`importlib` module now ignores the :envvar:`PYTHONCASEOK` 716environment variable when the :option:`-E` or :option:`-I` command line 717options are being used. 718 719.. 720 721.. bpo: 39719 722.. date: 2020-02-21-22-35-57 723.. nonce: 2jLy1C 724.. section: Library 725 726Remove :meth:`tempfile.SpooledTemporaryFile.softspace` as files no longer 727have the ``softspace`` attribute in Python 3. Patch by Shantanu. 728 729.. 730 731.. bpo: 39667 732.. date: 2020-02-17-22-38-15 733.. nonce: QuzEHH 734.. section: Library 735 736Improve pathlib.Path compatibility on zipfile.Path and correct performance 737degradation as found in zipp 3.0. 738 739.. 740 741.. bpo: 39638 742.. date: 2020-02-15-20-38-11 743.. nonce: wm_RS3 744.. section: Library 745 746Keep ASDL signatures in the docstrings for ``AST`` nodes. Patch by Batuhan 747Taskaya 748 749.. 750 751.. bpo: 39639 752.. date: 2020-02-15-15-29-34 753.. nonce: 3mqJjm 754.. section: Library 755 756Deprecated ``ast.Suite`` node class because it's no longer used. Patch by 757Batuhan Taskaya. 758 759.. 760 761.. bpo: 39609 762.. date: 2020-02-11-19-45-31 763.. nonce: dk40Uw 764.. section: Library 765 766Add thread_name_prefix to default asyncio executor 767 768.. 769 770.. bpo: 39548 771.. date: 2020-02-06-05-33-52 772.. nonce: DF4FFe 773.. section: Library 774 775Fix handling of header in :class:`urllib.request.AbstractDigestAuthHandler` 776when the optional ``qop`` parameter is not present. 777 778.. 779 780.. bpo: 39509 781.. date: 2020-02-01-00-03-06 782.. nonce: -YxUSf 783.. section: Library 784 785HTTP status codes ``103 EARLY_HINTS`` and ``425 TOO_EARLY`` are added to 786:class:`http.HTTPStatus`. Patch by Dong-hee Na. 787 788.. 789 790.. bpo: 39507 791.. date: 2020-01-31-14-24-05 792.. nonce: 3oln1a 793.. section: Library 794 795Adding HTTP status 418 "I'm a Teapot" to HTTPStatus in http library. Patch 796by Ross Rhodes. 797 798.. 799 800.. bpo: 39495 801.. date: 2020-01-30-07-02-02 802.. nonce: 8LsIRN 803.. section: Library 804 805Remove default value from *attrs* parameter of 806:meth:`xml.etree.ElementTree.TreeBuilder.start` for consistency between 807Python and C implementations. 808 809.. 810 811.. bpo: 38971 812.. date: 2019-12-20-16-06-28 813.. nonce: fKRYlF 814.. section: Library 815 816Open issue in the BPO indicated a desire to make the implementation of 817codecs.open() at parity with io.open(), which implements a try/except to 818assure file stream gets closed before an exception is raised. 819 820.. 821 822.. bpo: 38641 823.. date: 2019-10-30-15-31-09 824.. nonce: HrTL9k 825.. section: Library 826 827Added starred expressions support to ``return`` and ``yield`` statements for 828``lib2to3``. Patch by Vlad Emelianov. 829 830.. 831 832.. bpo: 37534 833.. date: 2019-08-20-00-02-37 834.. nonce: TvjAUi 835.. section: Library 836 837When using minidom module to generate XML documents the ability to add 838Standalone Document Declaration is added. All the changes are made to 839generate a document in compliance with Extensible Markup Language (XML) 1.0 840(Fifth Edition) W3C Recommendation (available here: 841https://www.w3.org/TR/xml/#sec-prolog-dtd). 842 843.. 844 845.. bpo: 34788 846.. date: 2019-07-17-08-26-14 847.. nonce: pwV1OK 848.. section: Library 849 850Add support for scoped IPv6 addresses to :mod:`ipaddress`. Patch by 851Oleksandr Pavliuk. 852 853.. 854 855.. bpo: 34822 856.. date: 2018-09-27-19-31-47 857.. nonce: EztBhL 858.. section: Library 859 860Simplified AST for subscription. Simple indices are now represented by their 861value, extended slices are represented as tuples. :mod:`ast` classes 862``Index`` and ``ExtSlice`` are considered deprecated and will be removed in 863future Python versions. In the meantime, ``Index(value)`` now returns a 864``value`` itself, ``ExtSlice(slices)`` returns ``Tuple(slices, Load())``. 865 866.. 867 868.. bpo: 39868 869.. date: 2020-03-05-16-29-03 870.. nonce: JQoHhO 871.. section: Documentation 872 873Updated the Language Reference for :pep:`572`. 874 875.. 876 877.. bpo: 13790 878.. date: 2020-02-28-14-39-25 879.. nonce: hvLaRI 880.. section: Documentation 881 882Change 'string' to 'specification' in format doc. 883 884.. 885 886.. bpo: 17422 887.. date: 2020-02-27-17-35-27 888.. nonce: eS1hVh 889.. section: Documentation 890 891The language reference no longer restricts default class namespaces to dicts 892only. 893 894.. 895 896.. bpo: 39530 897.. date: 2020-02-23-13-26-40 898.. nonce: _bCvzQ 899.. section: Documentation 900 901Fix misleading documentation about mixed-type numeric comparisons. 902 903.. 904 905.. bpo: 39718 906.. date: 2020-02-21-22-05-20 907.. nonce: xtBoSi 908.. section: Documentation 909 910Update :mod:`token` documentation to reflect additions in Python 3.8 911 912.. 913 914.. bpo: 39677 915.. date: 2020-02-18-14-28-31 916.. nonce: vNHqoX 917.. section: Documentation 918 919Changed operand name of **MAKE_FUNCTION** from *argc* to *flags* for module 920:mod:`dis` 921 922.. 923 924.. bpo: 40019 925.. date: 2020-03-20-00-30-36 926.. nonce: zOqHpQ 927.. section: Tests 928 929test_gdb now skips tests if it detects that gdb failed to read debug 930information because the Python binary is optimized. 931 932.. 933 934.. bpo: 27807 935.. date: 2020-03-18-16-04-33 936.. nonce: 9gKjET 937.. section: Tests 938 939``test_site.test_startup_imports()`` is now skipped if a path of 940:data:`sys.path` contains a ``.pth`` file. 941 942.. 943 944.. bpo: 26067 945.. date: 2020-03-16-20-54-55 946.. nonce: m18_VV 947.. section: Tests 948 949Do not fail test_shutil test_chown test when uid or gid of user cannot be 950resolved to a name. 951 952.. 953 954.. bpo: 39855 955.. date: 2020-03-04-23-03-01 956.. nonce: Ql5xv8 957.. section: Tests 958 959test_subprocess.test_user() now skips the test on an user name if the user 960name doesn't exist. For example, skip the test if the user "nobody" doesn't 961exist on Linux. 962 963.. 964 965.. bpo: 39761 966.. date: 2020-03-03-15-56-07 967.. nonce: k10aGe 968.. section: Build 969 970Fix build with DTrace but without additional DFLAGS. 971 972.. 973 974.. bpo: 39763 975.. date: 2020-03-02-14-44-09 976.. nonce: GGEwhH 977.. section: Build 978 979setup.py now uses a basic implementation of the :mod:`subprocess` module if 980the :mod:`subprocess` module is not available: before required C extension 981modules are built. 982 983.. 984 985.. bpo: 1294959 986.. date: 2020-02-06-18-08-25 987.. nonce: AZPg4R 988.. section: Build 989 990Add ``--with-platlibdir`` option to the configure script: name of the 991platform-specific library directory, stored in the new 992:attr:`sys.platlibdir` attribute. It is used to build the path of 993platform-specific extension modules and the path of the standard library. It 994is equal to ``"lib"`` on most platforms. On Fedora and SuSE, it is equal to 995``"lib64"`` on 64-bit platforms. Patch by Jan Matějek, Matěj Cepl, 996Charalampos Stratakis and Victor Stinner. 997 998.. 999 1000.. bpo: 39930 1001.. date: 2020-03-11-10-15-56 1002.. nonce: LGHw1j 1003.. section: Windows 1004 1005Ensures the required :file:`vcruntime140.dll` is included in install 1006packages. 1007 1008.. 1009 1010.. bpo: 39847 1011.. date: 2020-03-04-17-05-11 1012.. nonce: C3N2m3 1013.. section: Windows 1014 1015Avoid hang when computer is hibernated whilst waiting for a mutex (for 1016lock-related objects from :mod:`threading`) around 49-day uptime. 1017 1018.. 1019 1020.. bpo: 38597 1021.. date: 2020-03-01-15-04-54 1022.. nonce: MnHdYl 1023.. section: Windows 1024 1025:mod:`distutils` will no longer statically link :file:`vcruntime140.dll` 1026when a redistributable version is unavailable. All future releases of 1027CPython will include a copy of this DLL to ensure distributed extensions can 1028continue to load. 1029 1030.. 1031 1032.. bpo: 38380 1033.. date: 2020-02-28-23-51-27 1034.. nonce: TpOBCj 1035.. section: Windows 1036 1037Update Windows builds to use SQLite 3.31.1 1038 1039.. 1040 1041.. bpo: 39789 1042.. date: 2020-02-28-22-46-09 1043.. nonce: 67XRoP 1044.. section: Windows 1045 1046Update Windows release build machines to Visual Studio 2019 (MSVC 14.2). 1047 1048.. 1049 1050.. bpo: 34803 1051.. date: 2020-02-25-18-43-34 1052.. nonce: S3VcS0 1053.. section: Windows 1054 1055Package for nuget.org now includes repository reference and bundled icon 1056image. 1057 1058.. 1059 1060.. bpo: 38380 1061.. date: 2020-02-28-23-51-47 1062.. nonce: u-ySyA 1063.. section: macOS 1064 1065Update macOS builds to use SQLite 3.31.1 1066 1067.. 1068 1069.. bpo: 27115 1070.. date: 2020-03-09-02-45-12 1071.. nonce: 8hSHMo 1072.. section: IDLE 1073 1074For 'Go to Line', use a Query box subclass with IDLE standard behavior and 1075improved error checking. 1076 1077.. 1078 1079.. bpo: 39885 1080.. date: 2020-03-08-14-27-36 1081.. nonce: 29ERiR 1082.. section: IDLE 1083 1084Since clicking to get an IDLE context menu moves the cursor, any text 1085selection should be and now is cleared. 1086 1087.. 1088 1089.. bpo: 39852 1090.. date: 2020-03-06-01-55-14 1091.. nonce: QjA1qF 1092.. section: IDLE 1093 1094Edit "Go to line" now clears any selection, preventing accidental deletion. 1095It also updates Ln and Col on the status bar. 1096 1097.. 1098 1099.. bpo: 39781 1100.. date: 2020-02-27-22-17-09 1101.. nonce: bbYBeL 1102.. section: IDLE 1103 1104Selecting code context lines no longer causes a jump. 1105 1106.. 1107 1108.. bpo: 36184 1109.. date: 2020-03-09-13-28-13 1110.. nonce: BMPJ0D 1111.. section: Tools/Demos 1112 1113Port python-gdb.py to FreeBSD. python-gdb.py now checks for "take_gil" 1114function name to check if a frame tries to acquire the GIL, instead of 1115checking for "pthread_cond_timedwait" which is specific to Linux and can be 1116a different condition than the GIL. 1117 1118.. 1119 1120.. bpo: 38080 1121.. date: 2019-09-18-13-49-56 1122.. nonce: Nbl7lF 1123.. section: Tools/Demos 1124 1125Added support to fix ``getproxies`` in the :mod:`lib2to3.fixes.fix_urllib` 1126module. Patch by José Roberto Meza Cabrera. 1127 1128.. 1129 1130.. bpo: 40024 1131.. date: 2020-03-20-18-41-33 1132.. nonce: 9zHpve 1133.. section: C API 1134 1135Add :c:func:`PyModule_AddType` helper function: add a type to a module. 1136Patch by Dong-hee Na. 1137 1138.. 1139 1140.. bpo: 39946 1141.. date: 2020-03-20-17-05-52 1142.. nonce: 3NS-Ls 1143.. section: C API 1144 1145Remove ``_PyRuntime.getframe`` hook and remove ``_PyThreadState_GetFrame`` 1146macro which was an alias to ``_PyRuntime.getframe``. They were only exposed 1147by the internal C API. Remove also ``PyThreadFrameGetter`` type. 1148 1149.. 1150 1151.. bpo: 39947 1152.. date: 2020-03-20-14-55-09 1153.. nonce: W7uCJ3 1154.. section: C API 1155 1156Add :c:func:`PyThreadState_GetFrame` function: get the current frame of a 1157Python thread state. 1158 1159.. 1160 1161.. bpo: 37207 1162.. date: 2020-03-14-01-56-03 1163.. nonce: R3jaTy 1164.. section: C API 1165 1166Add _PyArg_NoKwnames helper function. Patch by Dong-hee Na. 1167 1168.. 1169 1170.. bpo: 39947 1171.. date: 2020-03-13-18-10-58 1172.. nonce: gmEAaU 1173.. section: C API 1174 1175Add :c:func:`PyThreadState_GetInterpreter`: get the interpreter of a Python 1176thread state. 1177 1178.. 1179 1180.. bpo: 39947 1181.. date: 2020-03-13-17-43-00 1182.. nonce: 1Cu_d2 1183.. section: C API 1184 1185Add :c:func:`PyInterpreterState_Get` function to the limited C API. 1186 1187.. 1188 1189.. bpo: 35370 1190.. date: 2020-03-13-16-44-23 1191.. nonce: sXRA-r 1192.. section: C API 1193 1194If :c:func:`PySys_Audit` fails in :c:func:`PyEval_SetProfile` or 1195:c:func:`PyEval_SetTrace`, log the error as an unraisable exception. 1196 1197.. 1198 1199.. bpo: 39947 1200.. date: 2020-03-13-00-15-19 1201.. nonce: w3dIru 1202.. section: C API 1203 1204Move the static inline function flavor of Py_EnterRecursiveCall() and 1205Py_LeaveRecursiveCall() to the internal C API: they access PyThreadState 1206attributes. The limited C API provides regular functions which hide 1207implementation details. 1208 1209.. 1210 1211.. bpo: 39947 1212.. date: 2020-03-12-23-47-57 1213.. nonce: -nCdFV 1214.. section: C API 1215 1216Py_TRASHCAN_BEGIN_CONDITION and Py_TRASHCAN_END macro no longer access 1217PyThreadState attributes, but call new private _PyTrash_begin() and 1218_PyTrash_end() functions which hide implementation details. 1219 1220.. 1221 1222.. bpo: 39884 1223.. date: 2020-03-12-00-27-26 1224.. nonce: CGOJBO 1225.. section: C API 1226 1227:c:func:`PyDescr_NewMethod` and :c:func:`PyCFunction_NewEx` now include the 1228method name in the SystemError "bad call flags" error message to ease debug. 1229 1230.. 1231 1232.. bpo: 39877 1233.. date: 2020-03-10-00-18-16 1234.. nonce: GOYtIm 1235.. section: C API 1236 1237Deprecated :c:func:`PyEval_InitThreads` and 1238:c:func:`PyEval_ThreadsInitialized`. Calling :c:func:`PyEval_InitThreads` 1239now does nothing. 1240 1241.. 1242 1243.. bpo: 38249 1244.. date: 2020-03-09-20-27-19 1245.. nonce: IxYbQy 1246.. section: C API 1247 1248:c:macro:`Py_UNREACHABLE` is now implemented with 1249``__builtin_unreachable()`` and analogs in release mode. 1250 1251.. 1252 1253.. bpo: 38643 1254.. date: 2020-03-08-22-56-22 1255.. nonce: k2ixx6 1256.. section: C API 1257 1258:c:func:`PyNumber_ToBase` now raises a :exc:`SystemError` instead of 1259crashing when called with invalid base. 1260 1261.. 1262 1263.. bpo: 39882 1264.. date: 2020-03-06-23-56-04 1265.. nonce: Iqhcqm 1266.. section: C API 1267 1268The :c:func:`Py_FatalError` function is replaced with a macro which logs 1269automatically the name of the current function, unless the 1270``Py_LIMITED_API`` macro is defined. 1271 1272.. 1273 1274.. bpo: 39824 1275.. date: 2020-03-02-11-29-45 1276.. nonce: 71_ZMn 1277.. section: C API 1278 1279Extension modules: :c:member:`~PyModuleDef.m_traverse`, 1280:c:member:`~PyModuleDef.m_clear` and :c:member:`~PyModuleDef.m_free` 1281functions of :c:type:`PyModuleDef` are no longer called if the module state 1282was requested but is not allocated yet. This is the case immediately after 1283the module is created and before the module is executed 1284(:c:data:`Py_mod_exec` function). More precisely, these functions are not 1285called if :c:member:`~PyModuleDef.m_size` is greater than 0 and the module 1286state (as returned by :c:func:`PyModule_GetState`) is ``NULL``. 1287 1288Extension modules without module state (``m_size <= 0``) are not affected. 1289 1290.. 1291 1292.. bpo: 38913 1293.. date: 2020-02-25-20-10-34 1294.. nonce: siF1lS 1295.. section: C API 1296 1297Fixed segfault in ``Py_BuildValue()`` called with a format containing "#" 1298and undefined PY_SSIZE_T_CLEAN whwn an exception is set. 1299 1300.. 1301 1302.. bpo: 38500 1303.. date: 2019-11-22-14-06-28 1304.. nonce: nPEdjH 1305.. section: C API 1306 1307Add a private API to get and set the frame evaluation function: add 1308:c:func:`_PyInterpreterState_GetEvalFrameFunc` and 1309:c:func:`_PyInterpreterState_SetEvalFrameFunc` C functions. The 1310:c:type:`_PyFrameEvalFunction` function type now takes a *tstate* parameter. 1311