1.. bpo: 33136 2.. date: 2018-03-25-12-05-43 3.. nonce: TzSN4x 4.. release date: 2018-03-29 5.. section: Security 6 7Harden ssl module against LibreSSL CVE-2018-8970. 8X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new test 9ensures that NULL bytes are not allowed. 10 11.. 12 13.. bpo: 33001 14.. date: 2018-03-05-10-09-51 15.. nonce: elj4Aa 16.. section: Security 17 18Minimal fix to prevent buffer overrun in os.symlink on Windows 19 20.. 21 22.. bpo: 32981 23.. date: 2018-03-02-10-24-52 24.. nonce: O_qDyj 25.. section: Security 26 27Regexes in difflib and poplib were vulnerable to catastrophic backtracking. 28These regexes formed potential DOS vectors (REDOS). They have been 29refactored. This resolves CVE-2018-1060 and CVE-2018-1061. Patch by Jamie 30Davis. 31 32.. 33 34.. bpo: 33053 35.. date: 2018-03-25-19-49-06 36.. nonce: V3xlsH 37.. section: Core and Builtins 38 39When using the -m switch, sys.path[0] is now explicitly expanded as the 40*starting* working directory, rather than being left as the empty path 41(which allows imports from the current working directory at the time of the 42import) 43 44.. 45 46.. bpo: 33018 47.. date: 2018-03-22-23-09-06 48.. nonce: 0ncEJV 49.. section: Core and Builtins 50 51Improve consistency of errors raised by ``issubclass()`` when called with a 52non-class and an abstract base class as the first and second arguments, 53respectively. Patch by Josh Bronson. 54 55.. 56 57.. bpo: 33041 58.. date: 2018-03-18-13-56-14 59.. nonce: XwPhI2 60.. section: Core and Builtins 61 62Fixed jumping when the function contains an ``async for`` loop. 63 64.. 65 66.. bpo: 33026 67.. date: 2018-03-08-09-48-38 68.. nonce: QZA3Ba 69.. section: Core and Builtins 70 71Fixed jumping out of "with" block by setting f_lineno. 72 73.. 74 75.. bpo: 33005 76.. date: 2018-03-06-12-19-19 77.. nonce: LP-V2U 78.. section: Core and Builtins 79 80Fix a crash on fork when using a custom memory allocator (ex: using 81PYTHONMALLOC env var). _PyGILState_Reinit() and _PyInterpreterState_Enable() 82now use the default RAW memory allocator to allocate a new interpreters 83mutex on fork. 84 85.. 86 87.. bpo: 17288 88.. date: 2018-02-27-13-36-21 89.. nonce: Gdj24S 90.. section: Core and Builtins 91 92Prevent jumps from 'return' and 'exception' trace events. 93 94.. 95 96.. bpo: 32836 97.. date: 2018-02-14-12-35-47 98.. nonce: bThJnx 99.. section: Core and Builtins 100 101Don't use temporary variables in cases of list/dict/set comprehensions 102 103.. 104 105.. bpo: 33141 106.. date: 2018-03-26-12-33-13 107.. nonce: 23wlxf 108.. section: Library 109 110Have Field objects pass through __set_name__ to their default values, if 111they have their own __set_name__. 112 113.. 114 115.. bpo: 33096 116.. date: 2018-03-25-13-18-16 117.. nonce: ofdbe7 118.. section: Library 119 120Allow ttk.Treeview.insert to insert iid that has a false boolean value. Note 121iid=0 and iid=False would be same. Patch by Garvit Khatri. 122 123.. 124 125.. bpo: 32873 126.. date: 2018-03-24-19-54-48 127.. nonce: cHyoAm 128.. section: Library 129 130Treat type variables and special typing forms as immutable by copy and 131pickle. This fixes several minor issues and inconsistencies, and improves 132backwards compatibility with Python 3.6. 133 134.. 135 136.. bpo: 33134 137.. date: 2018-03-24-19-34-26 138.. nonce: hbVeIX 139.. section: Library 140 141When computing dataclass's __hash__, use the lookup table to contain the 142function which returns the __hash__ value. This is an improvement over 143looking up a string, and then testing that string to see what to do. 144 145.. 146 147.. bpo: 33127 148.. date: 2018-03-24-15-08-24 149.. nonce: olJmHv 150.. section: Library 151 152The ssl module now compiles with LibreSSL 2.7.1. 153 154.. 155 156.. bpo: 32505 157.. date: 2018-03-22-16-05-56 158.. nonce: YK1N8v 159.. section: Library 160 161Raise TypeError if a member variable of a dataclass is of type Field, but 162doesn't have a type annotation. 163 164.. 165 166.. bpo: 33078 167.. date: 2018-03-21-17-59-39 168.. nonce: PQOniT 169.. section: Library 170 171Fix the failure on OSX caused by the tests relying on sem_getvalue 172 173.. 174 175.. bpo: 33116 176.. date: 2018-03-21-16-52-26 177.. nonce: Tvzerj 178.. section: Library 179 180Add 'Field' to dataclasses.__all__. 181 182.. 183 184.. bpo: 32896 185.. date: 2018-03-20-20-53-21 186.. nonce: ewW3Ln 187.. section: Library 188 189Fix an error where subclassing a dataclass with a field that uses a 190default_factory would generate an incorrect class. 191 192.. 193 194.. bpo: 33100 195.. date: 2018-03-19-20-47-00 196.. nonce: chyIO4 197.. section: Library 198 199Dataclasses: If a field has a default value that's a MemberDescriptorType, 200then it's from that field being in __slots__, not an actual default value. 201 202.. 203 204.. bpo: 32953 205.. date: 2018-03-18-17-38-48 206.. nonce: t8WAWN 207.. section: Library 208 209If a non-dataclass inherits from a frozen dataclass, allow attributes to be 210added to the derived class. Only attributes from the frozen dataclass 211cannot be assigned to. Require all dataclasses in a hierarchy to be either 212all frozen or all non-frozen. 213 214.. 215 216.. bpo: 33061 217.. date: 2018-03-16-16-07-33 218.. nonce: TRTTek 219.. section: Library 220 221Add missing ``NoReturn`` to ``__all__`` in typing.py 222 223.. 224 225.. bpo: 33078 226.. date: 2018-03-15-07-38-00 227.. nonce: RmjUF5 228.. section: Library 229 230Fix the size handling in multiprocessing.Queue when a pickling error occurs. 231 232.. 233 234.. bpo: 33064 235.. date: 2018-03-12-19-58-25 236.. nonce: LO2KIY 237.. section: Library 238 239lib2to3 now properly supports trailing commas after ``*args`` and 240``**kwargs`` in function signatures. 241 242.. 243 244.. bpo: 33056 245.. date: 2018-03-12-16-40-00 246.. nonce: lNN9Eh 247.. section: Library 248 249FIX properly close leaking fds in concurrent.futures.ProcessPoolExecutor. 250 251.. 252 253.. bpo: 33021 254.. date: 2018-03-12-00-27-56 255.. nonce: m19B9T 256.. section: Library 257 258Release the GIL during fstat() calls, avoiding hang of all threads when 259calling mmap.mmap(), os.urandom(), and random.seed(). Patch by Nir Soffer. 260 261.. 262 263.. bpo: 31804 264.. date: 2018-03-11-19-03-52 265.. nonce: i8KUMp 266.. section: Library 267 268Avoid failing in multiprocessing.Process if the standard streams are closed 269or None at exit. 270 271.. 272 273.. bpo: 33037 274.. date: 2018-03-09-23-07-07 275.. nonce: nAJ3at 276.. section: Library 277 278Skip sending/receiving data after SSL transport closing. 279 280.. 281 282.. bpo: 27683 283.. date: 2018-03-07-22-28-17 284.. nonce: 572Rv4 285.. section: Library 286 287Fix a regression in :mod:`ipaddress` that result of :meth:`hosts` is empty 288when the network is constructed by a tuple containing an integer mask and 289only 1 bit left for addresses. 290 291.. 292 293.. bpo: 32999 294.. date: 2018-03-06-20-30-20 295.. nonce: lgFXWl 296.. section: Library 297 298Fix C implementation of ``ABC.__subclasscheck__(cls, subclass)`` crashed when 299``subclass`` is not a type object. 300 301.. 302 303.. bpo: 33009 304.. date: 2018-03-06-11-54-59 305.. nonce: -Ekysb 306.. section: Library 307 308Fix inspect.signature() for single-parameter partialmethods. 309 310.. 311 312.. bpo: 32969 313.. date: 2018-03-06-00-19-41 314.. nonce: rGTKa0 315.. section: Library 316 317Expose several missing constants in zlib and fix corresponding 318documentation. 319 320.. 321 322.. bpo: 32056 323.. date: 2018-03-01-17-49-56 324.. nonce: IlpfgE 325.. section: Library 326 327Improved exceptions raised for invalid number of channels and sample width 328when read an audio file in modules :mod:`aifc`, :mod:`wave` and 329:mod:`sunau`. 330 331.. 332 333.. bpo: 32844 334.. date: 2018-02-28-13-08-00 335.. nonce: u8tnAe 336.. section: Library 337 338Fix wrong redirection of a low descriptor (0 or 1) to stderr in subprocess 339if another low descriptor is closed. 340 341.. 342 343.. bpo: 32857 344.. date: 2018-02-16-14-37-14 345.. nonce: -XljAx 346.. section: Library 347 348In :mod:`tkinter`, ``after_cancel(None)`` now raises a :exc:`ValueError` 349instead of canceling the first scheduled function. Patch by Cheryl Sabella. 350 351.. 352 353.. bpo: 31639 354.. date: 2017-12-27-21-55-19 355.. nonce: l3avDJ 356.. section: Library 357 358http.server now exposes a ThreadedHTTPServer class and uses it when the 359module is run with ``-m`` to cope with web browsers pre-opening sockets. 360 361.. 362 363.. bpo: 27645 364.. date: 2017-10-05-20-41-48 365.. nonce: 1Y_Wag 366.. section: Library 367 368:class:`sqlite3.Connection` now exposes a 369:class:`~sqlite3.Connection.backup` method, if the underlying SQLite library 370is at version 3.6.11 or higher. Patch by Lele Gaifax. 371 372.. 373 374.. bpo: 33126 375.. date: 2018-03-28-17-03-17 376.. nonce: 5UGkNv 377.. section: Documentation 378 379Document PyBuffer_ToContiguous(). 380 381.. 382 383.. bpo: 27212 384.. date: 2018-03-22-19-23-04 385.. nonce: wrE5KR 386.. section: Documentation 387 388Modify documentation for the :func:`islice` recipe to consume initial values 389up to the start index. 390 391.. 392 393.. bpo: 28247 394.. date: 2018-03-20-20-11-05 395.. nonce: -V-WS- 396.. section: Documentation 397 398Update :mod:`zipapp` documentation to describe how to make standalone 399applications. 400 401.. 402 403.. bpo: 18802 404.. date: 2018-03-11-18-53-47 405.. nonce: JhAqH3 406.. section: Documentation 407 408Documentation changes for ipaddress. Patch by Jon Foster and Berker Peksag. 409 410.. 411 412.. bpo: 27428 413.. date: 2018-03-11-00-16-56 414.. nonce: B7A8FT 415.. section: Documentation 416 417Update documentation to clarify that ``WindowsRegistryFinder`` implements 418``MetaPathFinder``. (Patch by Himanshu Lakhara) 419 420.. 421 422.. bpo: 32872 423.. date: 2018-03-28-01-35-02 424.. nonce: J5NDUj 425.. section: Tests 426 427Avoid regrtest compatibility issue with namespace packages. 428 429.. 430 431.. bpo: 32517 432.. date: 2018-03-09-07-05-12 433.. nonce: ugc1iW 434.. section: Tests 435 436Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport of 437``KqueueSelector`` loop was not being closed. 438 439.. 440 441.. bpo: 19417 442.. date: 2018-01-08-13-33-47 443.. nonce: 2asoXy 444.. section: Tests 445 446Add test_bdb.py. 447 448.. 449 450.. bpo: 33163 451.. date: 2018-03-28-04-15-03 452.. nonce: hfpWuU 453.. section: Build 454 455Upgrade pip to 9.0.3 and setuptools to v39.0.1. 456 457.. 458 459.. bpo: 33016 460.. date: 2018-03-07-01-33-33 461.. nonce: Z_Med0 462.. section: Windows 463 464Fix potential use of uninitialized memory in nt._getfinalpathname 465 466.. 467 468.. bpo: 32903 469.. date: 2018-02-28-11-03-24 470.. nonce: 1SXY4t 471.. section: Windows 472 473Fix a memory leak in os.chdir() on Windows if the current directory is set 474to a UNC path. 475 476.. 477 478.. bpo: 32726 479.. date: 2018-03-29-06-56-12 480.. nonce: urS9uX 481.. section: macOS 482 483Build and link with private copy of Tcl/Tk 8.6 for the macOS 10.6+ 484installer. The 10.9+ installer variant already does this. This means that 485the Python 3.7 provided by the python.org macOS installers no longer need or 486use any external versions of Tcl/Tk, either system-provided or 487user-installed, such as ActiveTcl. 488 489.. 490 491.. bpo: 32984 492.. date: 2018-03-05-01-29-05 493.. nonce: NGjgT4 494.. section: IDLE 495 496Set ``__file__`` while running a startup file. Like Python, IDLE optionally 497runs one startup file in the Shell window before presenting the first 498interactive input prompt. For IDLE, ``-s`` runs a file named in 499environmental variable :envvar:`IDLESTARTUP` or :envvar:`PYTHONSTARTUP`; 500``-r file`` runs ``file``. Python sets ``__file__`` to the startup file 501name before running the file and unsets it before the first prompt. IDLE 502now does the same when run normally, without the ``-n`` option. 503 504.. 505 506.. bpo: 32940 507.. date: 2018-02-24-18-20-50 508.. nonce: ZaJ1Rf 509.. section: IDLE 510 511Simplify and rename StringTranslatePseudoMapping in pyparse. 512 513.. 514 515.. bpo: 32885 516.. date: 2018-02-20-12-16-47 517.. nonce: dL5x7C 518.. section: Tools/Demos 519 520Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable automatic 521backup creation (files with ``~`` suffix). 522 523.. 524 525.. bpo: 33042 526.. date: 2018-03-20-21-43-09 527.. nonce: FPFp64 528.. section: C API 529 530Embedding applications may once again call PySys_ResetWarnOptions, 531PySys_AddWarnOption, and PySys_AddXOption prior to calling Py_Initialize. 532 533.. 534 535.. bpo: 32374 536.. date: 2018-01-09-17-03-54 537.. nonce: SwwLoz 538.. section: C API 539 540Document that m_traverse for multi-phase initialized modules can be called 541with m_state=NULL, and add a sanity check 542