1.. bpo: 42967 2.. date: 2021-02-14-15-59-16 3.. nonce: YApqDS 4.. release date: 2021-03-01 5.. section: Security 6 7Fix web cache poisoning vulnerability by defaulting the query args separator 8to ``&``, and allowing the user to choose a custom separator. 9 10.. 11 12.. bpo: 43321 13.. date: 2021-02-26-13-17-52 14.. nonce: TCS3ph 15.. section: Core and Builtins 16 17Fix ``SystemError`` raised when ``PyArg_Parse*()`` is used with ``#`` but 18without ``PY_SSIZE_T_CLEAN`` defined. 19 20.. 21 22.. bpo: 36346 23.. date: 2021-02-22-19-00-00 24.. nonce: uAoni0 25.. section: Core and Builtins 26 27``PyArg_Parse*()`` functions now emits ``DeprecationWarning`` when ``u`` or 28``Z`` format is used. See :pep:`623` for detail. 29 30.. 31 32.. bpo: 43277 33.. date: 2021-02-20-16-50-22 34.. nonce: FXkRXk 35.. section: Core and Builtins 36 37Add a new :c:func:`PySet_CheckExact` function to the C-API to check if an 38object is an instance of :class:`set` but not an instance of a subtype. 39Patch by Pablo Galindo. 40 41.. 42 43.. bpo: 42990 44.. date: 2021-02-18-15-12-30 45.. nonce: toAqBH 46.. section: Core and Builtins 47 48The :data:`types.FunctionType` constructor now inherits the current builtins 49if the *globals* dictionary has no ``"__builtins__"`` key, rather than using 50``{"None": None}`` as builtins: same behavior as :func:`eval` and 51:func:`exec` functions. Defining a function with ``def function(...): ...`` 52in Python is not affected, globals cannot be overridden with this syntax: it 53also inherits the current builtins. Patch by Victor Stinner. 54 55.. 56 57.. bpo: 42990 58.. date: 2021-02-17-19-02-21 59.. nonce: SKXHiI 60.. section: Core and Builtins 61 62Functions have a new ``__builtins__`` attribute which is used to look for 63builtin symbols when a function is executed, instead of looking into 64``__globals__['__builtins__']``. Patch by Mark Shannon and Victor Stinner. 65 66.. 67 68.. bpo: 43149 69.. date: 2021-02-07-03-27-14 70.. nonce: 0umPKD 71.. section: Core and Builtins 72 73Improve the error message in the parser for exception groups without 74parentheses. Patch by Pablo Galindo. 75 76.. 77 78.. bpo: 43121 79.. date: 2021-02-03-22-33-05 80.. nonce: jqcViq 81.. section: Core and Builtins 82 83Fixed an incorrect :exc:`SyntaxError` message for missing comma in literals. 84Patch by Pablo Galindo. 85 86.. 87 88.. bpo: 42819 89.. date: 2021-01-04-23-54-34 90.. nonce: 4KO6wU 91.. section: Core and Builtins 92 93:mod:`readline`: Explicitly disable bracketed paste in the interactive 94interpreter, even if it's set in the inputrc, is enabled by default (eg GNU 95Readline 8.1), or a user calls ``readline.read_init_file()``. The Python 96REPL has not implemented bracketed paste support. Also, bracketed mode 97writes the ``"\x1b[?2004h"`` escape sequence into stdout which causes test 98failures in applications that don't support it. It can still be explicitly 99enabled by calling ``readline.parse_and_bind("set enable-bracketed-paste 100on")``. Patch by Dustin Rodrigues. 101 102.. 103 104.. bpo: 42808 105.. date: 2021-01-02-05-10-58 106.. nonce: AOxgxl 107.. section: Core and Builtins 108 109Simple calls to ``type(object)`` are now faster due to the ``vectorcall`` 110calling convention. Patch by Dennis Sweeney. 111 112.. 113 114.. bpo: 42217 115.. date: 2020-10-31-16-54-00 116.. nonce: GdcHe5 117.. section: Core and Builtins 118 119Make the compiler merges same co_code and co_linetable objects in a module 120like already did for co_consts. 121 122.. 123 124.. bpo: 41972 125.. date: 2020-10-23-23-17-23 126.. nonce: kbAwg4 127.. section: Core and Builtins 128 129Substring search functions such as ``str1 in str2`` and ``str2.find(str1)`` 130now sometimes use the "Two-Way" string comparison algorithm to avoid 131quadratic behavior on long strings. 132 133.. 134 135.. bpo: 42128 136.. date: 2020-10-23-08-54-04 137.. nonce: SWmVEm 138.. section: Core and Builtins 139 140Implement :pep:`634` (structural pattern matching). Patch by Brandt Bucher. 141 142.. 143 144.. bpo: 40692 145.. date: 2020-05-19-22-10-05 146.. nonce: ajEhrR 147.. section: Core and Builtins 148 149In the :class:`concurrent.futures.ProcessPoolExecutor`, validate that 150:func:`multiprocess.synchronize` is available on a given platform and rely 151on that check in the :mod:`concurrent.futures` test suite so we can run 152tests that are unrelated to :class:`ProcessPoolExecutor` on those platforms. 153 154.. 155 156.. bpo: 38302 157.. date: 2019-09-28-12-23-23 158.. nonce: hsCNgX 159.. section: Core and Builtins 160 161If :func:`object.__ipow__` returns :const:`NotImplemented`, the operator 162will correctly fall back to :func:`object.__pow__` and 163:func:`object.__rpow__` as expected. 164 165.. 166 167.. bpo: 43316 168.. date: 2021-02-25-09-44-36 169.. nonce: k9Gyqn 170.. section: Library 171 172The ``python -m gzip`` command line application now properly fails when 173detecting an unsupported extension. It exits with a non-zero exit code and 174prints an error message to stderr. 175 176.. 177 178.. bpo: 43317 179.. date: 2021-02-25-09-08-55 180.. nonce: qrOOpB 181.. section: Library 182 183Set the chunk size for the ``gzip`` module main function to 184io.DEFAULT_BUFFER_SIZE. This is slightly faster than the 1024 bytes constant 185that was used previously. 186 187.. 188 189.. bpo: 43146 190.. date: 2021-02-23-17-20-16 191.. nonce: JAFplg 192.. section: Library 193 194Handle None in single-arg versions of :func:`~traceback.print_exception` and 195:func:`~traceback.format_exception`. 196 197.. 198 199.. bpo: 43260 200.. date: 2021-02-20-12-15-29 201.. nonce: 6znAas 202.. section: Library 203 204Fix TextIOWrapper can not flush internal buffer forever after very large 205text is written. 206 207.. 208 209.. bpo: 43258 210.. date: 2021-02-18-23-30-52 211.. nonce: LeU-q8 212.. section: Library 213 214Prevent needless allocation of :mod:`sqlite3` aggregate function context 215when no rows match an aggregate query. Patch by Erlend E. Aasland. 216 217.. 218 219.. bpo: 43251 220.. date: 2021-02-18-14-24-42 221.. nonce: n6WZDw 222.. section: Library 223 224Improve :mod:`sqlite3` error handling: ``sqlite3_column_name()`` failures 225now result in :exc:`MemoryError`. Patch by Erlend E. Aasland. 226 227.. 228 229.. bpo: 40956 230.. date: 2021-02-10-23-29-50 231.. nonce: LcAbwG 232.. section: Library 233 234Fix segfault in :meth:`sqlite3.Connection.backup` if no argument was 235provided. The regression was introduced by GH-23838. Patch by Erlend E. 236Aasland. 237 238.. 239 240.. bpo: 43172 241.. date: 2021-02-10-06-00-53 242.. nonce: ZMCJni 243.. section: Library 244 245The readline module now passes its tests when built directly against 246libedit. Existing irreconcilable API differences remain in 247:func:`readline.get_begidx` and :func:`readline.get_endidx` behavior based 248on libreadline vs libedit use. 249 250.. 251 252.. bpo: 43163 253.. date: 2021-02-08-21-13-51 254.. nonce: E2MgzH 255.. section: Library 256 257Fix a bug in :mod:`codeop` that was causing it to not ask for more input 258when multi-line snippets have unclosed parentheses. Patch by Pablo Galindo 259 260.. 261 262.. bpo: 43162 263.. date: 2021-02-08-16-27-00 264.. nonce: t-W7h3 265.. section: Library 266 267deprecate unsupported ability to access enum members as attributes of other 268enum members 269 270.. 271 272.. bpo: 43146 273.. date: 2021-02-06-21-21-35 274.. nonce: MHtb2v 275.. section: Library 276 277Fix recent regression in None argument handling in :mod:`~traceback` module 278functions. 279 280.. 281 282.. bpo: 43102 283.. date: 2021-02-03-22-55-27 284.. nonce: TSlZ6J 285.. section: Library 286 287The namedtuple __new__ method had its __builtins__ set to None instead of an 288actual dictionary. This created problems for introspection tools. 289 290.. 291 292.. bpo: 43106 293.. date: 2021-02-03-17-06-38 294.. nonce: SwcSuU 295.. section: Library 296 297Added :data:`~os.O_EVTONLY`, :data:`~os.O_FSYNC`, :data:`~os.O_SYMLINK` and 298:data:`~os.O_NOFOLLOW_ANY` for macOS. Patch by Dong-hee Na. 299 300.. 301 302.. bpo: 42960 303.. date: 2021-01-18-21-07-20 304.. nonce: a7Dote 305.. section: Library 306 307Adds :data:`resource.RLIMIT_KQUEUES` constant from FreeBSD to the 308:mod:`resource` module. 309 310.. 311 312.. bpo: 42151 313.. date: 2020-10-26-18-01-09 314.. nonce: et5f7s 315.. section: Library 316 317Make the pure Python implementation of :mod:`xml.etree.ElementTree` behave 318the same as the C implementation (:mod:`_elementree`) regarding default 319attribute values (by not setting ``specified_attributes=1``). 320 321.. 322 323.. bpo: 29753 324.. date: 2020-05-02-01-01-30 325.. nonce: n2M-AF 326.. section: Library 327 328In ctypes, now packed bitfields are calculated properly and the first item 329of packed bitfields is now shrank correctly. 330 331.. 332 333.. bpo: 27646 334.. date: 2021-02-20-00-09-13 335.. nonce: HRsmo- 336.. section: Documentation 337 338Clarify that 'yield from <expr>' works with any iterable, not just 339iterators. 340 341.. 342 343.. bpo: 36346 344.. date: 2020-06-15-10-45-45 345.. nonce: H0sS_i 346.. section: Documentation 347 348Update some deprecated unicode APIs which are documented as "will be removed 349in 4.0" to "3.12". See :pep:`623` for detail. 350 351.. 352 353.. bpo: 43288 354.. date: 2021-02-21-11-11-53 355.. nonce: LfTvL- 356.. section: Tests 357 358Fix test_importlib to correctly skip Unicode file tests if the filesystem 359does not support them. 360 361.. 362 363.. bpo: 43174 364.. date: 2021-02-10-14-11-53 365.. nonce: F9zwXQ 366.. section: Build 367 368Windows build now uses ``/utf-8`` compiler option. 369 370.. 371 372.. bpo: 43103 373.. date: 2021-02-02-16-26-44 374.. nonce: VWeyP_ 375.. section: Build 376 377Add a new configure ``--without-static-libpython`` option to not build the 378``libpythonMAJOR.MINOR.a`` static library and not install the ``python.o`` 379object file. 380 381.. 382 383.. bpo: 13501 384.. date: 2021-01-10-22-25-23 385.. nonce: g4L-6R 386.. section: Build 387 388The configure script can now use *libedit* instead of *readline* with the 389command line option ``--with-readline=editline``. 390 391.. 392 393.. bpo: 42603 394.. date: 2020-12-08-19-25-20 395.. nonce: mXs2dB 396.. section: Build 397 398Make configure script use pkg-config to detect the location of Tcl/Tk 399headers and libraries, used to build tkinter. 400 401On macOS, a Tcl/Tk configuration provided by pkg-config will be preferred 402over Tcl/Tk frameworks installed in ``/{System/,}Library/Frameworks``. If 403both exist and the latter is preferred, the appropriate ``--with-tcltk-*`` 404configuration options need to be explicitly set. 405 406.. 407 408.. bpo: 39448 409.. date: 2020-01-24-12-54-22 410.. nonce: k4pv14 411.. section: Build 412 413Add the "regen-frozen" makefile target that regenerates the code for the 414frozen ``__hello__`` module. 415 416.. 417 418.. bpo: 43155 419.. date: 2021-02-10-04-16-51 420.. nonce: O1tURk 421.. section: Windows 422 423:c:func:`PyCMethod_New` is now present in ``python3.lib``. 424 425.. 426 427.. bpo: 41837 428.. date: 2021-02-28-22-49-46 429.. nonce: 9fqyXC 430.. section: macOS 431 432Update macOS installer build to use OpenSSL 1.1.1j. 433 434.. 435 436.. bpo: 43283 437.. date: 2021-02-21-16-30-10 438.. nonce: DLBwYn 439.. section: IDLE 440 441Document why printing to IDLE's Shell is often slower than printing to a 442system terminal and that it can be made faster by pre-formatting a single 443string before printing. 444 445.. 446 447.. bpo: 43278 448.. date: 2021-02-21-15-30-38 449.. nonce: DMPaWH 450.. section: C API 451 452Always put compiler and system information on the first line of the REPL 453welcome message. 454 455.. 456 457.. bpo: 43270 458.. date: 2021-02-19-14-28-26 459.. nonce: UKx4XN 460.. section: C API 461 462Remove the private ``_PyErr_OCCURRED()`` macro: use the public 463:c:func:`PyErr_Occurred` function instead. 464 465.. 466 467.. bpo: 35134 468.. date: 2021-02-18-18-46-42 469.. nonce: dFpEDT 470.. section: C API 471 472Move odictobject.h, parser_interface.h, picklebufobject.h, pydebug.h, and 473pyfpe.h into the cpython/ directory. They must not be included directly, as 474they are already included by Python.h: :ref:`Include Files <api-includes>`. 475 476.. 477 478.. bpo: 35134 479.. date: 2021-02-17-18-51-26 480.. nonce: YoQdk8 481.. section: C API 482 483Move pyarena.h, pyctype.h, and pytime.h into the cpython/ directory. They 484must not be included directly, as they are already included by Python.h: 485:ref:`Include Files <api-includes>`. 486 487.. 488 489.. bpo: 40170 490.. date: 2021-02-16-22-29-39 491.. nonce: ahHmOo 492.. section: C API 493 494:c:func:`PyExceptionClass_Name` is now always declared as a function, in 495order to hide implementation details. The macro accessed 496:c:member:`PyTypeObject.tp_name` directly. Patch by Erlend E. Aasland. 497 498.. 499 500.. bpo: 43239 501.. date: 2021-02-16-17-30-16 502.. nonce: FQqOGz 503.. section: C API 504 505The :c:func:`PyCFunction_New` function is now exported in the ABI when 506compiled with ``-fvisibility=hidden``. 507 508.. 509 510.. bpo: 40170 511.. date: 2021-02-15-15-06-43 512.. nonce: ZYeSii 513.. section: C API 514 515:c:func:`PyIter_Check` is now always declared as a function, in order to 516hide implementation details. The macro accessed 517:c:member:`PyTypeObject.tp_iternext` directly. Patch by Erlend E. Aasland. 518 519.. 520 521.. bpo: 40170 522.. date: 2021-02-15-13-41-14 523.. nonce: r2FAtl 524.. section: C API 525 526Convert :c:func:`PyDescr_IsData` macro to a function to hide implementation 527details: The macro accessed :c:member:`PyTypeObject.tp_descr_set` directly. 528Patch by Erlend E. Aasland. 529 530.. 531 532.. bpo: 43181 533.. date: 2021-02-11-11-37-14 534.. nonce: ydv33S 535.. section: C API 536 537Convert :c:func:`PyObject_TypeCheck` macro to a static inline function. 538Patch by Erlend E. Aasland. 539