1.. date: 2022-05-25-12-30-12 2.. gh-issue: 84694 3.. nonce: 5sjy2w 4.. release date: 2022-05-30 5.. section: Core and Builtins 6 7The ``--experimental-isolated-subinterpreters`` configure option and 8``EXPERIMENTAL_ISOLATED_SUBINTERPRETERS`` macro have been removed. 9 10.. 11 12.. date: 2022-05-25-04-07-22 13.. gh-issue: 91924 14.. nonce: -UyO4q 15.. section: Core and Builtins 16 17Fix ``__lltrace__`` debug feature if the stdout encoding is not UTF-8. Patch 18by Victor Stinner. 19 20.. 21 22.. date: 2022-05-22-02-37-50 23.. gh-issue: 93061 24.. nonce: r70Imp 25.. section: Core and Builtins 26 27Backward jumps after ``async for`` loops are no longer given dubious line 28numbers. 29 30.. 31 32.. date: 2022-05-21-23-21-37 33.. gh-issue: 93065 34.. nonce: 5I18WC 35.. section: Core and Builtins 36 37Fix contextvars HAMT implementation to handle iteration over deep trees. 38 39The bug was discovered and fixed by Eli Libman. See 40`MagicStack/immutables#84 41<https://github.com/MagicStack/immutables/issues/84>`_ for more details. 42 43.. 44 45.. date: 2022-05-15-15-25-05 46.. gh-issue: 90473 47.. nonce: MoPHYW 48.. section: Core and Builtins 49 50Decrease default recursion limit on WASI to address limited call stack size. 51 52.. 53 54.. date: 2022-05-14-13-22-11 55.. gh-issue: 92804 56.. nonce: rAqpI2 57.. section: Core and Builtins 58 59Fix memory leak in ``memoryview`` iterator as it was not finalized at exit. 60Patch by Kumar Aditya. 61 62.. 63 64.. date: 2022-05-12-13-23-19 65.. gh-issue: 92236 66.. nonce: sDRzUe 67.. section: Core and Builtins 68 69Remove spurious "LINE" event when starting a generator or coroutine, visible 70tracing functions implemented in C. 71 72.. 73 74.. date: 2022-05-10-11-34-35 75.. gh-issue: 92619 76.. nonce: u0V0lY 77.. section: Core and Builtins 78 79Make the compiler duplicate an exit block only if none of its instructions 80have a lineno (previously only the first instruction in the block was 81checked, leading to unnecessarily duplicated blocks). 82 83.. 84 85.. date: 2022-05-03-20-12-18 86.. gh-issue: 92261 87.. nonce: aigLnb 88.. section: Core and Builtins 89 90Fix hang when trying to iterate over a ``typing.Union``. 91 92.. 93 94.. date: 2022-05-27-13-18-18 95.. gh-issue: 93297 96.. nonce: e2zuHz 97.. section: Library 98 99Make asyncio task groups prevent child tasks from being GCed 100 101.. 102 103.. date: 2022-05-25-02-45-41 104.. gh-issue: 90817 105.. nonce: yxANgU 106.. section: Library 107 108The :func:`locale.resetlocale` function is deprecated and will be removed in 109Python 3.13. Use ``locale.setlocale(locale.LC_ALL, "")`` instead. Patch by 110Victor Stinner. 111 112.. 113 114.. date: 2022-05-24-10-59-02 115.. gh-issue: 92728 116.. nonce: zxTifq 117.. section: Library 118 119The :func:`re.template` function and the corresponding :const:`re.TEMPLATE` 120and :const:`re.T` flags are restored after they were removed in 3.11.0b1, 121but they are now deprecated, so they might be removed from Python 3.13. 122 123.. 124 125.. date: 2022-05-21-13-16-16 126.. gh-issue: 93044 127.. nonce: eJ_XkZ 128.. section: Library 129 130No longer convert the database argument of :func:`sqlite3.connect` to bytes 131before passing it to the factory. 132 133.. 134 135.. date: 2022-05-20-15-52-43 136.. gh-issue: 93010 137.. nonce: WF-cAc 138.. section: Library 139 140In a very special case, the email package tried to append the nonexistent 141``InvalidHeaderError`` to the defect list. It should have been 142``InvalidHeaderDefect``. 143 144.. 145 146.. date: 2022-05-19-13-33-18 147.. gh-issue: 92675 148.. nonce: ZeerMZ 149.. section: Library 150 151Fix :func:`venv.ensure_directories` to accept :class:`pathlib.Path` 152arguments in addition to :class:`str` paths. Patch by David Foster. 153 154.. 155 156.. date: 2022-05-18-21-04-09 157.. gh-issue: 87901 158.. nonce: lnf041 159.. section: Library 160 161Removed the ``encoding`` argument from :func:`os.popen` that was added in 1623.11b1. 163 164.. 165 166.. date: 2022-05-18-17-18-41 167.. gh-issue: 91922 168.. nonce: DwWIsJ 169.. section: Library 170 171Fix function :func:`sqlite.connect` and the :class:`sqlite.Connection` 172constructor on non-UTF-8 locales. Also, they now support bytes paths 173non-decodable with the current FS encoding. 174 175.. 176 177.. date: 2022-05-16-14-35-39 178.. gh-issue: 92839 179.. nonce: owSMyo 180.. section: Library 181 182Fixed crash resulting from calling bisect.insort() or bisect.insort_left() 183with the key argument not equal to None. 184 185.. 186 187.. date: 2022-05-14-11-41-23 188.. gh-issue: 90473 189.. nonce: kPdOZl 190.. section: Library 191 192:mod:`subprocess` now fails early on Emscripten and WASI platforms to work 193around missing :func:`os.pipe` on WASI. 194 195.. 196 197.. date: 2022-05-11-19-33-27 198.. gh-issue: 92671 199.. nonce: KE4v6a 200.. section: Library 201 202Fixed :func:`ast.unparse` for empty tuples in the assignment target context. 203 204.. 205 206.. date: 2022-05-11-14-34-09 207.. gh-issue: 91581 208.. nonce: glkou2 209.. section: Library 210 211:meth:`~datetime.datetime.utcfromtimestamp` no longer attempts to resolve 212``fold`` in the pure Python implementation, since the fold is never 1 in 213UTC. In addition to being slightly faster in the common case, this also 214prevents some errors when the timestamp is close to :attr:`datetime.min 215<datetime.datetime.min>`. Patch by Paul Ganssle. 216 217.. 218 219.. date: 2022-05-10-07-57-27 220.. gh-issue: 92550 221.. nonce: Rk_UzM 222.. section: Library 223 224Fix :meth:`pathlib.Path.rglob` for empty pattern. 225 226.. 227 228.. date: 2022-05-09-09-28-02 229.. gh-issue: 92530 230.. nonce: M4Q1RS 231.. section: Library 232 233Fix an issue that occurred after interrupting 234:func:`threading.Condition.notify`. 235 236.. 237 238.. date: 2022-05-09-01-27-25 239.. gh-issue: 92531 240.. nonce: vV7S_O 241.. section: Library 242 243The statistics.median_grouped() function now always return a float. 244Formerly, it did not convert the input type when for sequences of length 245one. 246 247.. 248 249.. date: 2022-04-25-10-23-01 250.. gh-issue: 91810 251.. nonce: DOHa6B 252.. section: Library 253 254:class:`~xml.etree.ElementTree.ElementTree` method 255:meth:`~xml.etree.ElementTree.ElementTree.write` and function 256:func:`~xml.etree.ElementTree.tostring` now use the text file's encoding 257("UTF-8" if not available) instead of locale encoding in XML declaration 258when ``encoding="unicode"`` is specified. 259 260.. 261 262.. date: 2022-04-15-22-07-36 263.. gh-issue: 90622 264.. nonce: 0C6l8h 265.. section: Library 266 267Worker processes for :class:`concurrent.futures.ProcessPoolExecutor` are no 268longer spawned on demand (a feature added in 3.9) when the multiprocessing 269context start method is ``"fork"`` as that can lead to deadlocks in the 270child processes due to a fork happening while threads are running. 271 272.. 273 274.. date: 2022-04-15-13-16-25 275.. gh-issue: 91581 276.. nonce: 9OGsrN 277.. section: Library 278 279Remove an unhandled error case in the C implementation of calls to 280:meth:`datetime.fromtimestamp <datetime.datetime.fromtimestamp>` with no 281time zone (i.e. getting a local time from an epoch timestamp). This should 282have no user-facing effect other than giving a possibly more accurate error 283message when called with timestamps that fall on 10000-01-01 in the local 284time. Patch by Paul Ganssle. 285 286.. 287 288.. bpo: 39064 289.. date: 2022-04-03-19-40-09 290.. nonce: 76PbIz 291.. section: Library 292 293:class:`zipfile.ZipFile` now raises :exc:`zipfile.BadZipFile` instead of 294``ValueError`` when reading a corrupt zip file in which the central 295directory offset is negative. 296 297.. 298 299.. bpo: 45393 300.. date: 2022-02-09-23-44-27 301.. nonce: 9v5Y8U 302.. section: Library 303 304Fix the formatting for ``await x`` and ``not x`` in the operator precedence 305table when using the :func:`help` system. 306 307.. 308 309.. bpo: 28249 310.. date: 2022-01-09-14-23-00 311.. nonce: 4dzB80 312.. section: Library 313 314Set :attr:`doctest.DocTest.lineno` to ``None`` when object does not have 315:attr:`__doc__`. 316 317.. 318 319.. bpo: 45046 320.. date: 2021-08-29-19-59-16 321.. nonce: eGq0NC 322.. section: Library 323 324Add support of context managers in :mod:`unittest`: methods 325:meth:`~unittest.TestCase.enterContext` and 326:meth:`~unittest.TestCase.enterClassContext` of class 327:class:`~unittest.TestCase`, method 328:meth:`~unittest.IsolatedAsyncioTestCase.enterAsyncContext` of class 329:class:`~unittest.IsolatedAsyncioTestCase` and function 330:func:`unittest.enterModuleContext`. 331 332.. 333 334.. bpo: 42627 335.. date: 2021-05-22-07-58-59 336.. nonce: EejtD0 337.. section: Library 338 339Fix incorrect parsing of Windows registry proxy settings 340 341.. 342 343.. date: 2022-05-26-11-33-23 344.. gh-issue: 86438 345.. nonce: kEGGmK 346.. section: Documentation 347 348Clarify that :option:`-W` and :envvar:`PYTHONWARNINGS` are matched literally 349and case-insensitively, rather than as regular expressions, in 350:mod:`warnings`. 351 352.. 353 354.. date: 2022-05-18-23-58-26 355.. gh-issue: 92240 356.. nonce: bHvYiz 357.. section: Documentation 358 359Added release dates for "What's New in Python 3.X" for 3.0, 3.1, 3.2, 3.8 360and 3.10 361 362.. 363 364.. bpo: 40838 365.. date: 2022-01-13-16-03-15 366.. nonce: k3NVCf 367.. section: Documentation 368 369Document that :func:`inspect.getdoc`, :func:`inspect.getmodule`, and 370:func:`inspect.getsourcefile` might return ``None``. 371 372.. 373 374.. bpo: 38056 375.. date: 2019-09-12-08-28-17 376.. nonce: 6ktYkc 377.. section: Documentation 378 379Overhaul the :ref:`error-handlers` documentation in :mod:`codecs`. 380 381.. 382 383.. bpo: 13553 384.. date: 2017-12-10-19-13-39 385.. nonce: gQbZs4 386.. section: Documentation 387 388Document tkinter.Tk args. 389 390.. 391 392.. date: 2022-05-12-05-51-06 393.. gh-issue: 92670 394.. nonce: 7L43Z_ 395.. section: Tests 396 397Skip ``test_shutil.TestCopy.test_copyfile_nonexistent_dir`` test on AIX as 398the test uses a trailing slash to force the OS consider the path as a 399directory, but on AIX the trailing slash has no effect and is considered as 400a file. 401 402.. 403 404.. date: 2022-05-12-10-19-15 405.. gh-issue: 90473 406.. nonce: -syvqK 407.. section: Build 408 409Disable pymalloc and increase stack size on ``wasm32-wasi``. 410 411.. 412 413.. bpo: 34449 414.. date: 2018-08-21-11-10-18 415.. nonce: Z3qm3c 416.. section: Build 417 418Drop invalid compiler switch ``-fPIC`` for HP aCC on HP-UX. Patch by Michael 419Osipov. 420 421.. 422 423.. date: 2022-05-19-21-44-25 424.. gh-issue: 92817 425.. nonce: Jrf-Kv 426.. section: Windows 427 428Ensures that :file:`py.exe` will prefer an active virtual environment over 429default tags specified with environment variables or through a 430:file:`py.ini` file. 431 432.. 433 434.. date: 2022-05-19-14-01-30 435.. gh-issue: 92984 436.. nonce: Dsxnlr 437.. section: Windows 438 439Explicitly disable incremental linking for non-Debug builds 440 441.. 442 443.. date: 2022-05-16-11-45-06 444.. gh-issue: 92841 445.. nonce: NQx107 446.. section: Windows 447 448:mod:`asyncio` no longer throws ``RuntimeError: Event loop is closed`` on 449interpreter exit after asynchronous socket activity. Patch by Oleg Iarygin. 450 451.. 452 453.. bpo: 46907 454.. date: 2022-05-05-06-27-59 455.. nonce: IW-uvT 456.. section: Windows 457 458Update Windows installer to use SQLite 3.38.4. 459 460.. 461 462.. date: 2022-05-23-15-22-18 463.. gh-issue: 92898 464.. nonce: Qjc9d3 465.. section: C API 466 467Fix C++ compiler warnings when casting function arguments to ``PyObject*``. 468Patch by Serge Guelton. 469 470.. 471 472.. date: 2022-05-19-18-05-51 473.. gh-issue: 92913 474.. nonce: Ass1Hv 475.. section: C API 476 477Ensures changes to :c:member:`PyConfig.module_search_paths` are ignored 478unless :c:member:`PyConfig.module_search_paths_set` is set 479 480.. 481 482.. date: 2022-05-13-18-17-48 483.. gh-issue: 92781 484.. nonce: TVDr3- 485.. section: C API 486 487Avoid mixing declarations and code in the C API to fix the compiler warning: 488"ISO C90 forbids mixed declarations and code" 489[-Werror=declaration-after-statement]. Patch by Victor Stinner. 490