1.. bpo: 44022 2.. date: 2021-05-05-17-37-04 3.. nonce: bS3XJ9 4.. release date: 2021-05-31 5.. section: Security 6 7mod:`http.client` now avoids infinitely reading potential HTTP headers after 8a ``100 Continue`` status response from the server. 9 10.. 11 12.. bpo: 43667 13.. date: 2021-05-27-17-34-29 14.. nonce: ND9jP3 15.. section: Core and Builtins 16 17Improve Unicode support in non-UTF locales on Oracle Solaris. This issue 18does not affect other Solaris systems. 19 20.. 21 22.. bpo: 44232 23.. date: 2021-05-25-18-20-10 24.. nonce: DMcCCf 25.. section: Core and Builtins 26 27Fix a regression in :func:`type` when a metaclass raises an exception. The C 28function :c:func:`type_new` must properly report the exception when a 29metaclass constructor raises an exception and the winner class is not the 30metaclass. Patch by Victor Stinner. 31 32.. 33 34.. bpo: 44201 35.. date: 2021-05-21-21-16-03 36.. nonce: bGaSjt 37.. section: Core and Builtins 38 39Avoid side effects of checking for specialized syntax errors in the REPL 40that was causing it to ask for extra tokens after a syntax error had been 41detected. Patch by Pablo Galindo 42 43.. 44 45.. bpo: 44184 46.. date: 2021-05-21-01-42-45 47.. nonce: 9qOptC 48.. section: Core and Builtins 49 50Fix a crash at Python exit when a deallocator function removes the last 51strong reference to a heap type. Patch by Victor Stinner. 52 53.. 54 55.. bpo: 44180 56.. date: 2021-05-19-20-33-36 57.. nonce: mQVaAs 58.. section: Core and Builtins 59 60The parser doesn't report generic syntax errors that happen in a position 61further away that the one it reached in the first pass. Patch by Pablo 62Galindo 63 64.. 65 66.. bpo: 44168 67.. date: 2021-05-18-11-27-02 68.. nonce: mgB-rt 69.. section: Core and Builtins 70 71Fix error message in the parser involving keyword arguments with invalid 72expressions. Patch by Pablo Galindo 73 74.. 75 76.. bpo: 44143 77.. date: 2021-05-15-17-30-57 78.. nonce: 7UTS6H 79.. section: Core and Builtins 80 81Fixed a crash in the parser that manifest when raising tokenizer errors when 82an existing exception was present. Patch by Pablo Galindo. 83 84.. 85 86.. bpo: 44114 87.. date: 2021-05-12-14-26-16 88.. nonce: p-WfAE 89.. section: Core and Builtins 90 91Fix incorrect dictkeys_reversed and dictitems_reversed function signatures 92in C code, which broke webassembly builds. 93 94.. 95 96.. bpo: 43149 97.. date: 2021-05-08-17-18-37 98.. nonce: Kp5FxD 99.. section: Core and Builtins 100 101Corrent the syntax error message regarding multiple exception types to not 102refer to "exception groups". Patch by Pablo Galindo 103 104.. 105 106.. bpo: 44056 107.. date: 2021-05-06-12-43-04 108.. nonce: 4LWcJW 109.. section: Core and Builtins 110 111Syntax errors when default ``except`` is not the last ``except`` are 112reported with the correct location. Patch by Mark Shannon. 113 114.. 115 116.. bpo: 43822 117.. date: 2021-05-04-01-01-04 118.. nonce: 9VeCg0 119.. section: Core and Builtins 120 121The parser will prioritize tokenizer errors over custom syntax errors when 122raising exceptions. Patch by Pablo Galindo. 123 124.. 125 126.. bpo: 28146 127.. date: 2021-01-13-19-34-41 128.. nonce: AZBBkH 129.. section: Core and Builtins 130 131Fix a confusing error message in :func:`str.format`. 132 133.. 134 135.. bpo: 44254 136.. date: 2021-05-29-01-05-43 137.. nonce: f06xDm 138.. section: Library 139 140On Mac, give turtledemo button text a color that works on both light or dark 141background. Programmers cannot control the latter. 142 143.. 144 145.. bpo: 38693 146.. date: 2021-05-26-14-50-06 147.. nonce: NkMacJ 148.. section: Library 149 150Prefer f-strings to ``.format`` in importlib.resources. 151 152.. 153 154.. bpo: 33693 155.. date: 2021-05-26-13-34-37 156.. nonce: 3okzdo 157.. section: Library 158 159Importlib.metadata now prefers f-strings to .format. 160 161.. 162 163.. bpo: 44241 164.. date: 2021-05-26-13-15-51 165.. nonce: TBqej8 166.. section: Library 167 168Incorporate minor tweaks from importlib_metadata 4.1: SimplePath protocol, 169support for Metadata 2.2. 170 171.. 172 173.. bpo: 44210 174.. date: 2021-05-21-21-23-43 175.. nonce: 5afQ3K 176.. section: Library 177 178Make importlib.metadata._meta.PackageMetadata public. 179 180.. 181 182.. bpo: 43643 183.. date: 2021-05-21-12-12-35 184.. nonce: GWnmcF 185.. section: Library 186 187Declare readers.MultiplexedPath.name as a property per the spec. 188 189.. 190 191.. bpo: 33433 192.. date: 2021-05-16-17-48-24 193.. nonce: MyzO71 194.. section: Library 195 196For IPv4 mapped IPv6 addresses (:rfc:`4291` Section 2.5.5.2), the 197:mod:`ipaddress.IPv6Address.is_private` check is deferred to the mapped IPv4 198address. This solves a bug where public mapped IPv4 addresses were 199considered private by the IPv6 check. 200 201.. 202 203.. bpo: 44145 204.. date: 2021-05-16-00-00-38 205.. nonce: ko5SJ7 206.. section: Library 207 208:mod:`hmac` computations were not releasing the GIL while calling the 209OpenSSL ``HMAC_Update`` C API (a new feature in 3.9). This unintentionally 210prevented parallel computation as other :mod:`hashlib` algorithms support. 211 212.. 213 214.. bpo: 37788 215.. date: 2021-05-13-19-07-28 216.. nonce: adeFcf 217.. section: Library 218 219Fix a reference leak when a Thread object is never joined. 220 221.. 222 223.. bpo: 38908 224.. date: 2021-05-12-16-43-21 225.. nonce: nM2_rO 226.. section: Library 227 228Subclasses of ``typing.Protocol`` which only have data variables declared 229will now raise a ``TypeError`` when checked with ``isinstance`` unless they 230are decorated with :func:`runtime_checkable`. Previously, these checks 231passed silently. Patch provided by Yurii Karabas. 232 233.. 234 235.. bpo: 44098 236.. date: 2021-05-10-17-45-00 237.. nonce: _MoxuZ 238.. section: Library 239 240``typing.ParamSpec`` will no longer be found in the ``__parameters__`` of 241most :mod:`typing` generics except in valid use locations specified by 242:pep:`612`. This prevents incorrect usage like ``typing.List[P][int]``. This 243change means incorrect usage which may have passed silently in 3.10 beta 1 244and earlier will now error. 245 246.. 247 248.. bpo: 44089 249.. date: 2021-05-09-22-52-34 250.. nonce: IoANsN 251.. section: Library 252 253Allow subclassing ``csv.Error`` in 3.10 (it was allowed in 3.9 and earlier 254but was disallowed in early versions of 3.10). 255 256.. 257 258.. bpo: 44059 259.. date: 2021-05-06-16-01-55 260.. nonce: GF5r6O 261.. section: Library 262 263Register the SerenityOS Browser in the :mod:`webbrowser` module. 264 265.. 266 267.. bpo: 36515 268.. date: 2021-05-05-11-44-49 269.. nonce: uOSa3q 270.. section: Library 271 272The :mod:`hashlib` module no longer does unaligned memory accesses when 273compiled for ARM platforms. 274 275.. 276 277.. bpo: 44018 278.. date: 2021-05-03-10-07-43 279.. nonce: VDyW8f 280.. section: Library 281 282random.seed() no longer mutates bytearray inputs. 283 284.. 285 286.. bpo: 38352 287.. date: 2021-05-02-13-54-25 288.. nonce: N9MlhV 289.. section: Library 290 291Add ``IO``, ``BinaryIO``, ``TextIO``, ``Match``, and ``Pattern`` to 292``typing.__all__``. Patch by Jelle Zijlstra. 293 294.. 295 296.. bpo: 43972 297.. date: 2021-04-30-16-58-24 298.. nonce: Y2r9lg 299.. section: Library 300 301When :class:`http.server.SimpleHTTPRequestHandler` sends a ``301 (Moved 302Permanently)`` for a directory path not ending with `/`, add a 303``Content-Length: 0`` header. This improves the behavior for certain 304clients. 305 306.. 307 308.. bpo: 28528 309.. date: 2021-04-29-00-48-00 310.. nonce: JLAVWj 311.. section: Library 312 313Fix a bug in :mod:`pdb` where :meth:`~pdb.Pdb.checkline` raises 314:exc:`AttributeError` if it is called after :meth:`~pdb.Pdb.reset`. 315 316.. 317 318.. bpo: 43650 319.. date: 2021-03-29-00-23-30 320.. nonce: v01tic 321.. section: Library 322 323Fix :exc:`MemoryError` in :func:`shutil.unpack_archive` which fails inside 324:func:`shutil._unpack_zipfile` on large files. Patch by Igor Bolshakov. 325 326.. 327 328.. bpo: 41730 329.. date: 2020-09-10-07-23-24 330.. nonce: DyKFi9 331.. section: Library 332 333``DeprecationWarning`` is now raised when importing :mod:`tkinter.tix`, 334which has been deprecated in documentation since Python 3.6. 335 336.. 337 338.. bpo: 42392 339.. date: 2021-05-26-11-16-33 340.. nonce: oxRx6E 341.. section: Documentation 342 343Document the deprecation and removal of the ``loop`` parameter for many 344functions and classes in :mod:`asyncio`. 345 346.. 347 348.. bpo: 44195 349.. date: 2021-05-23-09-11-28 350.. nonce: 1bqkOs 351.. section: Documentation 352 353Corrected references to ``TraversableResources`` in docs. There is no 354``TraversableReader``. 355 356.. 357 358.. bpo: 41963 359.. date: 2021-05-17-20-03-47 360.. nonce: eUz9_o 361.. section: Documentation 362 363Document that ``ConfigParser`` strips off comments when reading 364configuration files. 365 366.. 367 368.. bpo: 44072 369.. date: 2021-05-08-09-48-05 370.. nonce: fb2x5I 371.. section: Documentation 372 373Correct where in the numeric ABC hierarchy ``**`` support is added, i.e., in 374numbers.Complex, not numbers.Integral. 375 376.. 377 378.. bpo: 43558 379.. date: 2021-05-07-12-27-09 380.. nonce: UGhA8R 381.. section: Documentation 382 383Add the remark to :mod:`dataclasses` documentation that the :meth:`__init__` 384of any base class has to be called in :meth:`__post_init__`, along with a 385code example. 386 387.. 388 389.. bpo: 44025 390.. date: 2021-05-03-22-08-08 391.. nonce: gcB7iP 392.. section: Documentation 393 394Clarify when '_' in match statements is a keyword, and when not. 395 396.. 397 398.. bpo: 31904 399.. date: 2021-05-07-15-46-04 400.. nonce: 8dk3la 401.. section: Tests 402 403Ignore error string case in test_py_compile ``test_file_not_exists()``. 404 405.. 406 407.. bpo: 42083 408.. date: 2021-05-04-18-10-57 409.. nonce: EMS2TK 410.. section: Tests 411 412Add test to check that ``PyStructSequence_NewType`` accepts a 413``PyStructSequence_Desc`` with ``doc`` field set to ``NULL``. 414 415.. 416 417.. bpo: 35753 418.. date: 2020-10-25-19-20-26 419.. nonce: 2LT-hO 420.. section: Tests 421 422Fix crash in doctest when doctest parses modules that include unwrappable 423functions by skipping those functions. 424 425.. 426 427.. bpo: 41282 428.. date: 2021-05-24-03-31-17 429.. nonce: L8nP44 430.. section: Build 431 432Fix broken ``make install`` that caused standard library extension modules 433to be unnecessarily and incorrectly rebuilt during the install phase of 434cpython. 435 436.. 437 438.. bpo: 42686 439.. date: 2021-01-01-21-21-03 440.. nonce: G_f-TC 441.. section: Windows 442 443Build :mod:`sqlite3` with math functions enabled. Patch by Erlend E. 444Aasland. 445 446.. 447 448.. bpo: 43109 449.. date: 2021-05-24-21-15-41 450.. nonce: npKJ9c 451.. section: macOS 452 453Allow --with-lto configure option to work with Apple-supplied Xcode or 454Command Line Tools. 455 456.. 457 458.. bpo: 41611 459.. date: 2021-05-27-18-22-46 460.. nonce: jOKpfc 461.. section: IDLE 462 463Avoid uncaught exceptions in ``AutoCompleteWindow.winconfig_event()``. 464 465.. 466 467.. bpo: 41611 468.. date: 2021-05-27-13-39-43 469.. nonce: liNQqj 470.. section: IDLE 471 472Fix IDLE sometimes freezing upon tab-completion on macOS. 473 474.. 475 476.. bpo: 44010 477.. date: 2021-05-09-09-02-09 478.. nonce: TaLe9x 479.. section: IDLE 480 481Highlight the new :ref:`match <match>` statement's :ref:`soft keywords 482<soft-keywords>`: :keyword:`match`, :keyword:`case <match>`, and :keyword:`_ 483<wildcard-patterns>`. However, this highlighting is not perfect and will be 484incorrect in some rare cases, including some ``_``-s in ``case`` patterns. 485 486.. 487 488.. bpo: 44026 489.. date: 2021-05-05-09-45-24 490.. nonce: m2Z0zR 491.. section: IDLE 492 493Include interpreter's typo fix suggestions in message line for NameErrors 494and AttributeErrors. Patch by E. Paine. 495 496.. 497 498.. bpo: 44074 499.. date: 2021-05-08-13-57-00 500.. nonce: F09kCK 501.. section: Tools/Demos 502 503Make patchcheck automatically detect the correct base branch name 504(previously it was hardcoded to 'master') 505 506.. 507 508.. bpo: 43795 509.. date: 2021-05-19-15-09-47 510.. nonce: WAHRxt 511.. section: C API 512 513The undocumented function :c:func:`Py_FrozenMain` is removed from the 514Limited API. 515 516.. 517 518.. bpo: 43795 519.. date: 2021-05-05-19-04-50 520.. nonce: 9Ojj73 521.. section: C API 522 523:c:func:`PyCodec_Unregister` is now properly exported as a function in the 524Windows Stable ABI DLL. 525