1+++++++++++ 2Python News 3+++++++++++ 4 5What's New in Python 3.7.12 final? 6================================== 7 8*Release date: 2021-09-03* 9 10Security 11-------- 12 13- bpo-44394: Update the vendored copy of libexpat to 2.4.1 (from 2.2.8) to 14 get the fix for the CVE-2013-0340 "Billion Laughs" vulnerability. This 15 copy is most used on Windows and macOS. 16 17- bpo-43124: Made the internal ``putcmd`` function in :mod:`smtplib` 18 sanitize input for presence of ``\r`` and ``\n`` characters to avoid 19 (unlikely) command injection. 20 21Library 22------- 23 24- bpo-45001: Made email date parsing more robust against malformed input, 25 namely a whitespace-only ``Date:`` header. Patch by Wouter Bolsterlee. 26 27 28What's New in Python 3.7.11 final? 29================================== 30 31*Release date: 2021-06-28* 32 33Security 34-------- 35 36- bpo-44022: :mod:`http.client` now avoids infinitely reading potential HTTP 37 headers after a ``100 Continue`` status response from the server. 38 39- bpo-43882: The presence of newline or tab characters in parts of a URL 40 could allow some forms of attacks. 41 42 Following the controlling specification for URLs defined by WHATWG 43 :func:`urllib.parse` now removes ASCII newlines and tabs from URLs, 44 preventing such attacks. 45 46- bpo-42988: CVE-2021-3426: Remove the ``getfile`` feature of the 47 :mod:`pydoc` module which could be abused to read arbitrary files on the 48 disk (directory traversal vulnerability). Moreover, even source code of 49 Python modules can contain sensitive data like passwords. Vulnerability 50 reported by David Schwörer. 51 52- bpo-43285: :mod:`ftplib` no longer trusts the IP address value returned 53 from the server in response to the PASV command by default. This prevents 54 a malicious FTP server from using the response to probe IPv4 address and 55 port combinations on the client network. 56 57 Code that requires the former vulnerable behavior may set a 58 ``trust_server_pasv_ipv4_address`` attribute on their :class:`ftplib.FTP` 59 instances to ``True`` to re-enable it. 60 61- bpo-43075: Fix Regular Expression Denial of Service (ReDoS) vulnerability 62 in :class:`urllib.request.AbstractBasicAuthHandler`. The ReDoS-vulnerable 63 regex has quadratic worst-case complexity and it allows cause a denial of 64 service when identifying crafted invalid RFCs. This ReDoS issue is on the 65 client side and needs remote attackers to control the HTTP server. 66 67Core and Builtins 68----------------- 69 70- bpo-43660: Fix crash that happens when replacing ``sys.stderr`` with a 71 callable that can remove the object while an exception is being printed. 72 Patch by Pablo Galindo. 73 74Tests 75----- 76 77- bpo-41561: Add workaround for Ubuntu's custom OpenSSL security level 78 policy. 79 80 81What's New in Python 3.7.10 final? 82================================== 83 84*Release date: 2021-02-15* 85 86Security 87-------- 88 89- bpo-42967: Fix web cache poisoning vulnerability by defaulting the query 90 args separator to ``&``, and allowing the user to choose a custom 91 separator. 92 93- bpo-42938: Avoid static buffers when computing the repr of 94 :class:`ctypes.c_double` and :class:`ctypes.c_longdouble` values. 95 96- bpo-42103: Prevented potential DoS attack via CPU and RAM exhaustion when 97 processing malformed Apple Property List files in binary format. 98 99- bpo-42051: The :mod:`plistlib` module no longer accepts entity 100 declarations in XML plist files to avoid XML vulnerabilities. This should 101 not affect users as entity declarations are not used in regular plist 102 files. 103 104- bpo-40791: Add ``volatile`` to the accumulator variable in 105 ``hmac.compare_digest``, making constant-time-defeating optimizations less 106 likely. 107 108Library 109------- 110 111- bpo-42103: :exc:`~plistlib.InvalidFileException` and :exc:`RecursionError` 112 are now the only errors caused by loading malformed binary Plist file 113 (previously ValueError and TypeError could be raised in some specific 114 cases). 115 116- bpo-41976: Fixed a bug that was causing :func:`ctypes.util.find_library` 117 to return ``None`` when triying to locate a library in an environment when 118 gcc>=9 is available and ``ldconfig`` is not. Patch by Pablo Galindo 119 120Documentation 121------------- 122 123- bpo-17140: Add documentation for the 124 :class:`multiprocessing.pool.ThreadPool` class. 125 126Tests 127----- 128 129- bpo-42794: Update test_nntplib to use offical group name of news.aioe.org 130 for testing. Patch by Dong-hee Na. 131 132- bpo-41944: Tests for CJK codecs no longer call ``eval()`` on content 133 received via HTTP. 134 135 136What's New in Python 3.7.9 final? 137================================= 138 139*Release date: 2020-08-15* 140 141Security 142-------- 143 144- bpo-41304: Fixes `python3x._pth` being ignored on Windows, caused by the 145 fix for :issue:`29778` (CVE-2020-15801). 146 147- bpo-29778: Ensure :file:`python3.dll` is loaded from correct locations 148 when Python is embedded (CVE-2020-15523). 149 150- bpo-41004: CVE-2020-14422: The __hash__() methods of 151 ipaddress.IPv4Interface and ipaddress.IPv6Interface incorrectly generated 152 constant hash values of 32 and 128 respectively. This resulted in always 153 causing hash collisions. The fix uses hash() to generate hash values for 154 the tuple of (address, mask length, network address). 155 156- bpo-39603: Prevent http header injection by rejecting control characters 157 in http.client.putrequest(...). 158 159Core and Builtins 160----------------- 161 162- bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() 163 correctly 164 165Library 166------- 167 168- bpo-41288: Unpickling invalid NEWOBJ_EX opcode with the C implementation 169 raises now UnpicklingError instead of crashing. 170 171- bpo-39017: Avoid infinite loop when reading specially crafted TAR files 172 using the tarfile module (CVE-2019-20907). 173 174- bpo-41235: Fix the error handling in 175 :meth:`ssl.SSLContext.load_dh_params`. 176 177macOS 178----- 179 180- bpo-41100: Additional fixes for testing on macOS 11 Big Sur Intel. Note: 181 macOS 11 is not yet released, this release of Python is not fully 182 supported on 11.0, and not all tests pass. 183 184 185What's New in Python 3.7.8 final? 186================================= 187 188*Release date: 2020-06-27* 189 190Tests 191----- 192 193- bpo-41009: Fix use of ``support.require_{linux|mac|freebsd}_version()`` 194 decorators as class decorator. 195 196macOS 197----- 198 199- bpo-41100: Fix configure error when building on macOS 11. Note that 3.7.8 200 was released shortly after the first developer preview of macOS 11 (Big 201 Sur); there are other known issues with building and running on the 202 developer preview. Big Sur is expected to be fully supported in a future 203 bugfix release of Python 3.8.x and with 3.9.0. 204 205 206What's New in Python 3.7.8 release candidate 1? 207=============================================== 208 209*Release date: 2020-06-17* 210 211Security 212-------- 213 214- bpo-39073: Disallow CR or LF in email.headerregistry.Address arguments to 215 guard against header injection attacks. 216 217- bpo-38576: Disallow control characters in hostnames in http.client, 218 addressing CVE-2019-18348. Such potentially malicious header injection 219 URLs now cause a InvalidURL to be raised. 220 221- bpo-39503: CVE-2020-8492: The 222 :class:`~urllib.request.AbstractBasicAuthHandler` class of the 223 :mod:`urllib.request` module uses an inefficient regular expression which 224 can be exploited by an attacker to cause a denial of service. Fix the 225 regex to prevent the catastrophic backtracking. Vulnerability reported by 226 Ben Caller and Matt Schwager. 227 228Core and Builtins 229----------------- 230 231- bpo-40663: Correctly generate annotations where parentheses are omitted 232 but required (e.g: ``Type[(str, int, *other))]``. 233 234- bpo-40417: Fix imp module deprecation warning when PyImport_ReloadModule 235 is called. Patch by Robert Rouhani. 236 237- bpo-20526: Fix :c:func:`PyThreadState_Clear()`. ``PyThreadState.frame`` is 238 a borrowed reference, not a strong reference: ``PyThreadState_Clear()`` 239 must not call ``Py_CLEAR(tstate->frame)``. 240 241- bpo-38894: Fix a bug that was causing incomplete results when calling 242 ``pathlib.Path.glob`` in the presence of symlinks that point to files 243 where the user does not have read access. Patch by Pablo Galindo and Matt 244 Wozniski. 245 246- bpo-39871: Fix a possible :exc:`SystemError` in 247 ``math.{atan2,copysign,remainder}()`` when the first argument cannot be 248 converted to a :class:`float`. Patch by Zachary Spytz. 249 250- bpo-39520: Fix unparsing of ext slices with no items (``foo[:,]``). Patch 251 by Batuhan Taskaya. 252 253- bpo-24048: Save the live exception during import.c's ``remove_module()``. 254 255- bpo-22490: Don't leak environment variable ``__PYVENV_LAUNCHER__`` into 256 the interpreter session on macOS. 257 258Library 259------- 260 261- bpo-40448: :mod:`ensurepip` now disables the use of `pip` cache when 262 installing the bundled versions of `pip` and `setuptools`. Patch by 263 Krzysztof Konopko. 264 265- bpo-40807: Stop codeop._maybe_compile, used by code.InteractiveInterpreter 266 (and IDLE). from from emitting each warning three times. 267 268- bpo-38488: Update ensurepip to install pip 20.1.1 and setuptools 47.1.0. 269 270- bpo-40767: :mod:`webbrowser` now properly finds the default browser in 271 pure Wayland systems by checking the WAYLAND_DISPLAY environment variable. 272 Patch contributed by Jérémy Attali. 273 274- bpo-30008: Fix :mod:`ssl` code to be compatible with OpenSSL 1.1.x builds 275 that use ``no-deprecated`` and ``--api=1.1.0``. 276 277- bpo-25872: :mod:`linecache` could crash with a :exc:`KeyError` when 278 accessed from multiple threads. Fix by Michael Graczyk. 279 280- bpo-40515: The :mod:`ssl` and :mod:`hashlib` modules now actively check 281 that OpenSSL is build with thread support. Python 3.7.0 made thread 282 support mandatory and no longer works safely with a no-thread builds. 283 284- bpo-13097: ``ctypes`` now raises an ``ArgumentError`` when a callback is 285 invoked with more than 1024 arguments. 286 287- bpo-40559: Fix possible memory leak in the C implementation of 288 :class:`asyncio.Task`. 289 290- bpo-40457: The ssl module now support OpenSSL builds without TLS 1.0 and 291 1.1 methods. 292 293- bpo-40459: :func:`platform.win32_ver` now produces correct *ptype* strings 294 instead of empty strings. 295 296- bpo-40138: Fix the Windows implementation of :func:`os.waitpid` for exit 297 code larger than ``INT_MAX >> 8``. The exit status is now interpreted as 298 an unsigned number. 299 300- bpo-39942: Set "__main__" as the default module name when "__name__" is 301 missing in :class:`typing.TypeVar`. Patch by Weipeng Hong. 302 303- bpo-40287: Fixed ``SpooledTemporaryFile.seek()`` to return the position. 304 305- bpo-40196: Fix a bug in the :mod:`symtable` module that was causing 306 incorrectly report global variables as local. Patch by Pablo Galindo. 307 308- bpo-40126: Fixed reverting multiple patches in unittest.mock. Patcher's 309 ``__exit__()`` is now never called if its ``__enter__()`` is failed. 310 Returning true from ``__exit__()`` silences now the exception. 311 312- bpo-40089: Fix threading._after_fork(): if fork was not called by a thread 313 spawned by threading.Thread, threading._after_fork() now creates a 314 _MainThread instance for _main_thread, instead of a _DummyThread instance. 315 316- bpo-39503: :class:`~urllib.request.AbstractBasicAuthHandler` of 317 :mod:`urllib.request` now parses all WWW-Authenticate HTTP headers and 318 accepts multiple challenges per header: use the realm of the first Basic 319 challenge. 320 321- bpo-40014: Fix ``os.getgrouplist()``: if ``getgrouplist()`` function fails 322 because the group list is too small, retry with a larger group list. On 323 failure, the glibc implementation of ``getgrouplist()`` sets ``ngroups`` 324 to the total number of groups. For other implementations, double the group 325 list size. 326 327- bpo-40025: Raise TypeError when _generate_next_value_ is defined after 328 members. Patch by Ethan Onstott. 329 330- bpo-40016: In re docstring, clarify the relationship between inline and 331 argument compile flags. 332 333- bpo-39652: The column name found in ``sqlite3.Cursor.description`` is now 334 truncated on the first '[' only if the PARSE_COLNAMES option is set. 335 336- bpo-38662: The ``ensurepip`` module now invokes ``pip`` via the ``runpy`` 337 module. Hence it is no longer tightly coupled with the internal API of the 338 bundled ``pip`` version, allowing easier updates to a newer ``pip`` 339 version both internally and for distributors. 340 341- bpo-39916: More reliable use of ``os.scandir()`` in ``Path.glob()``. It no 342 longer emits a ResourceWarning when interrupted. 343 344- bpo-39850: :mod:`multiprocessing` now supports abstract socket addresses 345 (if abstract sockets are supported in the running platform). Patch by 346 Pablo Galindo. 347 348- bpo-39828: Fix :mod:`json.tool` to catch :exc:`BrokenPipeError`. Patch by 349 Dong-hee Na. 350 351- bpo-39040: Fix parsing of invalid mime headers parameters by collapsing 352 whitespace between encoded words in a bare-quote-string. 353 354- bpo-35714: :exc:`struct.error` is now raised if there is a null character 355 in a :mod:`struct` format string. 356 357- bpo-36541: lib2to3 now recognizes named assignment expressions (the walrus 358 operator, ``:=``) 359 360- bpo-29620: :func:`~unittest.TestCase.assertWarns` no longer raises a 361 ``RuntimeException`` when accessing a module's ``__warningregistry__`` 362 causes importation of a new module, or when a new module is imported in 363 another thread. Patch by Kernc. 364 365- bpo-34226: Fix `cgi.parse_multipart` without content_length. Patch by 366 Roger Duran 367 368- bpo-31758: Prevent crashes when using an uninitialized 369 ``_elementtree.XMLParser`` object. Patch by Oren Milman. 370 371Documentation 372------------- 373 374- bpo-40561: Provide docstrings for webbrowser open functions. 375 376- bpo-27635: The pickle documentation incorrectly claimed that ``__new__`` 377 isn't called by default when unpickling. 378 379- bpo-39879: Updated :ref:`datamodel` docs to include :func:`dict` insertion 380 order preservation. Patch by Furkan Onder and Samy Lahfa. 381 382- bpo-39677: Changed operand name of **MAKE_FUNCTION** from *argc* to 383 *flags* for module :mod:`dis` 384 385- bpo-39435: Fix an incorrect signature for :func:`pickle.loads` in the docs 386 387- bpo-38387: Document :c:macro:`PyDoc_STRVAR` macro in the C-API reference. 388 389Tests 390----- 391 392- bpo-40964: Disable remote :mod:`imaplib` tests, host cyrus.andrew.cmu.edu 393 is blocking incoming connections. 394 395- bpo-40055: distutils.tests now saves/restores warnings filters to leave 396 them unchanged. Importing tests imports docutils which imports 397 pkg_resources which adds a warnings filter. 398 399- bpo-40436: test_gdb and test.pythoninfo now check gdb command exit code. 400 401- bpo-39932: Fix multiprocessing test_heap(): a new Heap object is now 402 created for each test run. 403 404- bpo-40162: Update Travis CI configuration to OpenSSL 1.1.1f. 405 406- bpo-40146: Update OpenSSL to 1.1.1f in Azure Pipelines. 407 408- bpo-40019: test_gdb now skips tests if it detects that gdb failed to read 409 debug information because the Python binary is optimized. 410 411- bpo-27807: ``test_site.test_startup_imports()`` is now skipped if a path 412 of :data:`sys.path` contains a ``.pth`` file. 413 414- bpo-39793: Use the same domain when testing ``make_msgid``. Patch by 415 Batuhan Taskaya. 416 417- bpo-1812: Fix newline handling in doctest.testfile when loading from a 418 package whose loader has a get_data method. Patch by Peter Donis. 419 420- bpo-37957: test.regrtest now can receive a list of test patterns to ignore 421 (using the -i/--ignore argument) or a file with a list of patterns to 422 ignore (using the --ignore-file argument). Patch by Pablo Galindo. 423 424- bpo-38502: test.regrtest now uses process groups in the multiprocessing 425 mode (-jN command line option) if process groups are available: if 426 :func:`os.setsid` and :func:`os.killpg` functions are available. 427 428- bpo-37421: multiprocessing tests now stop the ForkServer instance if it's 429 running: close the "alive" file descriptor to ask the server to stop and 430 then remove its UNIX address. 431 432- bpo-37421: multiprocessing tests now explicitly call ``_run_finalizers()`` 433 to immediately remove temporary directories created by tests. 434 435Build 436----- 437 438- bpo-40653: Move _dirnameW out of HAVE_SYMLINK to fix a potential compiling 439 issue. 440 441- bpo-38360: Support single-argument form of macOS -isysroot flag. 442 443- bpo-40204: Pin Sphinx version to 2.3.1 in ``Doc/Makefile``. 444 445- bpo-40158: Fix CPython MSBuild Properties in NuGet Package 446 (build/native/python.props) 447 448Windows 449------- 450 451- bpo-40164: Updates Windows OpenSSL to 1.1.1g 452 453- bpo-39631: Changes the registered MIME type for ``.py`` files on Windows 454 to ``text/x-python`` instead of ``text/plain``. 455 456- bpo-40650: Include winsock2.h in pytime.c for timeval. 457 458- bpo-39930: Ensures the required :file:`vcruntime140.dll` is included in 459 install packages. 460 461- bpo-39847: Avoid hang when computer is hibernated whilst waiting for a 462 mutex (for lock-related objects from :mod:`threading`) around 49-day 463 uptime. 464 465- bpo-38492: Remove ``pythonw.exe`` dependency on the Microsoft C++ runtime. 466 467macOS 468----- 469 470- bpo-39580: Avoid opening Finder window if running installer from the 471 command line. 472 473- bpo-40400: Update the macOS installer build scripts to build with Python 474 3.x and to build correctly on newer macOS systems with SIP. 475 476- bpo-40741: Update macOS installer to use SQLite 3.32.2. 477 478- bpo-38329: python.org macOS installers now update the Current version 479 symlink of /Library/Frameworks/Python.framework/Versions for 3.9 installs. 480 Previously, Current was only updated for Python 2.x installs. This should 481 make it easier to embed Python 3 into other macOS applications. 482 483- bpo-40164: Update macOS installer builds to use OpenSSL 1.1.1g. 484 485IDLE 486---- 487 488- bpo-39885: Make context menu Cut and Copy work again when right-clicking 489 within a selection. 490 491- bpo-40723: Make test_idle pass when run after import. 492 493- bpo-27115: For 'Go to Line', use a Query box subclass with IDLE standard 494 behavior and improved error checking. 495 496- bpo-39885: Since clicking to get an IDLE context menu moves the cursor, 497 any text selection should be and now is cleared. 498 499- bpo-39852: Edit "Go to line" now clears any selection, preventing 500 accidental deletion. It also updates Ln and Col on the status bar. 501 502- bpo-38439: Add a 256×256 pixel IDLE icon to support more modern 503 environments. Created by Andrew Clover. Delete the unused macOS idle.icns 504 icon file. 505 506- bpo-38689: IDLE will no longer freeze when inspect.signature fails when 507 fetching a calltip. 508 509Tools/Demos 510----------- 511 512- bpo-40479: Update multissltest helper to test with latest OpenSSL 1.0.2, 513 1.1.0, 1.1.1, and 3.0.0-alpha. 514 515- bpo-40179: Fixed translation of ``#elif`` in Argument Clinic. 516 517- bpo-40163: Fix multissltest tool. OpenSSL has changed download URL for old 518 releases. The multissltest tool now tries to download from current and old 519 download URLs. 520 521- bpo-36184: Port python-gdb.py to FreeBSD. python-gdb.py now checks for 522 "take_gil" function name to check if a frame tries to acquire the GIL, 523 instead of checking for "pthread_cond_timedwait" which is specific to 524 Linux and can be a different condition than the GIL. 525 526- bpo-39889: Fixed ``unparse.py`` for extended slices containing a single 527 element (e.g. ``a[i:j,]``). Remove redundant tuples when index with a 528 tuple (e.g. ``a[i, j]``). 529 530C API 531----- 532 533- bpo-39884: :c:func:`_PyMethodDef_RawFastCallDict` and 534 :c:func:`_PyMethodDef_RawFastCallKeywords` now include the method name in 535 the SystemError "bad call flags" error message to ease debug. 536 537- bpo-38643: :c:func:`PyNumber_ToBase` now raises a :exc:`SystemError` 538 instead of crashing when called with invalid base. 539 540 541What's New in Python 3.7.7 final? 542================================= 543 544*Release date: 2020-03-10* 545 546Library 547------- 548 549- bpo-13487: Avoid a possible *"RuntimeError: dictionary changed size during 550 iteration"* from :func:`inspect.getmodule` when it tried to loop through 551 :attr:`sys.modules`. 552 553Documentation 554------------- 555 556- bpo-17422: The language reference no longer restricts default class 557 namespaces to dicts only. 558 559 560What's New in Python 3.7.7 release candidate 1? 561=============================================== 562 563*Release date: 2020-03-04* 564 565Security 566-------- 567 568- bpo-39401: Avoid unsafe load of ``api-ms-win-core-path-l1-1-0.dll`` at 569 startup on Windows 7. 570 571Core and Builtins 572----------------- 573 574- bpo-39776: Fix race condition where threads created by PyGILState_Ensure() 575 could get a duplicate id. 576 577 This affects consumers of tstate->id like the contextvar caching 578 machinery, which could return invalid cached objects under heavy thread 579 load (observed in embedded scenarios). 580 581- bpo-39778: Fixed a crash due to incorrect handling of weak references in 582 ``collections.OrderedDict`` classes. Patch by Pablo Galindo. 583 584- bpo-39382: Fix a use-after-free in the single inheritance path of 585 ``issubclass()``, when the ``__bases__`` of an object has a single 586 reference, and so does its first item. Patch by Yonatan Goldschmidt. 587 588- bpo-39606: Fix regression caused by fix for bpo-39386, that prevented 589 calling ``aclose`` on an async generator that had already been closed or 590 exhausted. 591 592- bpo-39510: Fix segfault in ``readinto()`` method on closed BufferedReader. 593 594- bpo-39453: Fixed a possible crash in :meth:`list.__contains__` when a list 595 is changed during comparing items. Patch by Dong-hee Na. 596 597- bpo-39427: Document all possibilities for the ``-X`` options in the 598 command line help section. Patch by Pablo Galindo. 599 600- bpo-39421: Fix possible crashes when operating with the functions in the 601 :mod:`heapq` module and custom comparison operators. 602 603- bpo-39386: Prevent double awaiting of async iterator. 604 605- bpo-38588: Fix possible crashes in dict and list when calling 606 :c:func:`PyObject_RichCompareBool`. 607 608- bpo-39031: When parsing an "elif" node, lineno and col_offset of the node 609 now point to the "elif" keyword and not to its condition, making it 610 consistent with the "if" node. Patch by Lysandros Nikolaou. 611 612- bpo-38610: Fix possible crashes in several list methods by holding strong 613 references to list elements when calling 614 :c:func:`PyObject_RichCompareBool`. 615 616Library 617------- 618 619- bpo-39794: Add --without-decimal-contextvar build option. This enables a 620 thread-local rather than a coroutine local context. 621 622- bpo-39769: The :func:`compileall.compile_dir` function's *ddir* parameter 623 and the compileall command line flag `-d` no longer write the wrong 624 pathname to the generated pyc file for submodules beneath the root of the 625 directory tree being compiled. This fixes a regression introduced with 626 Python 3.5. 627 628- bpo-30566: Fix :exc:`IndexError` when trying to decode an invalid string 629 with punycode codec. 630 631- bpo-39649: Remove obsolete check for `__args__` in 632 bdb.Bdb.format_stack_entry. 633 634- bpo-27657: The original fix for bpo-27657, "Fix urlparse() with numeric 635 paths" (GH-16839) included in 3.7.6, inadvertently introduced a behavior 636 change that broke several third-party packages relying on the original 637 undefined parsing behavior. The change is reverted in 3.7.7, restoring the 638 behavior of 3.7.5 and earlier releases. 639 640- bpo-21016: The :mod:`pydoc` and :mod:`trace` modules now use the 641 :mod:`sysconfig` module to get the path to the Python standard library, to 642 support uncommon installation path like ``/usr/lib64/python3.9/`` on 643 Fedora. Patch by Jan Matějek. 644 645- bpo-39548: Fix handling of header in 646 :class:`urllib.request.AbstractDigestAuthHandler` when the optional 647 ``qop`` parameter is not present. 648 649- bpo-39450: Striped whitespace from docstring before returning it from 650 :func:`unittest.case.shortDescription`. 651 652- bpo-39493: Mark ``typing.IO.closed`` as a property 653 654- bpo-39485: Fix a bug in :func:`unittest.mock.create_autospec` that would 655 complain about the wrong number of arguments for custom descriptors 656 defined in an extension module returning functions. 657 658- bpo-39430: Fixed race condition in lazy imports in :mod:`tarfile`. 659 660- bpo-39389: Write accurate compression level metadata in :mod:`gzip` 661 archives, rather than always signaling maximum compression. 662 663- bpo-39274: ``bool(fraction.Fraction)`` now returns a boolean even if 664 (numerator != 0) does not return a boolean (ex: numpy number). 665 666- bpo-39242: Updated the Gmane domain from news.gmane.org to news.gmane.io 667 which is used for examples of :class:`~nntplib.NNTP` news reader server 668 and nntplib tests. 669 670- bpo-39152: Fix ttk.Scale.configure([name]) to return configuration tuple 671 for name or all options. Giovanni Lombardo contributed part of the patch. 672 673- bpo-39198: If an exception were to be thrown in `Logger.isEnabledFor` 674 (say, by asyncio timeouts or stopit) , the `logging` global lock may not 675 be released appropriately, resulting in deadlock. This change wraps that 676 block of code with `try...finally` to ensure the lock is released. 677 678- bpo-39191: Perform a check for running loop before starting a new task in 679 ``loop.run_until_complete()`` to fail fast; it prevents the side effect of 680 new task spawning before exception raising. 681 682- bpo-38871: Correctly parenthesize filter-based statements that contain 683 lambda expressions in mod:`lib2to3`. Patch by Dong-hee Na. 684 685- bpo-39142: A change was made to logging.config.dictConfig to avoid 686 converting instances of named tuples to ConvertingTuple. It's assumed that 687 named tuples are too specialised to be treated like ordinary tuples; if a 688 user of named tuples requires ConvertingTuple functionality, they will 689 have to implement that themselves in their named tuple class. 690 691- bpo-38971: Open issue in the BPO indicated a desire to make the 692 implementation of codecs.open() at parity with io.open(), which implements 693 a try/except to assure file stream gets closed before an exception is 694 raised. 695 696- bpo-39057: :func:`urllib.request.proxy_bypass_environment` now ignores 697 leading dots and no longer ignores a trailing newline. 698 699- bpo-39056: Fixed handling invalid warning category in the -W option. No 700 longer import the re module if it is not needed. 701 702- bpo-39055: :func:`base64.b64decode` with ``validate=True`` raises now a 703 binascii.Error if the input ends with a single ``\n``. 704 705- bpo-38878: Fixed __subclasshook__ of :class:`os.PathLike` to return a 706 correct result upon inheritence. Patch by Bar Harel. 707 708- bpo-35182: Fixed :func:`Popen.communicate` subsequent call crash when the 709 child process has already closed any piped standard stream, but still 710 continues to be running. Patch by Andriy Maletsky. 711 712- bpo-38473: Use signature from inner mock for autospecced methods attached 713 with :func:`unittest.mock.attach_mock`. Patch by Karthikeyan Singaravelan. 714 715- bpo-38293: Add :func:`copy.copy` and :func:`copy.deepcopy` support to 716 :func:`property` objects. 717 718- bpo-37953: In :mod:`typing`, improved the ``__hash__`` and ``__eq__`` 719 methods for :class:`ForwardReferences`. 720 721- bpo-36406: Handle namespace packages in :mod:`doctest`. Patch by 722 Karthikeyan Singaravelan. 723 724Documentation 725------------- 726 727- bpo-13790: Change 'string' to 'specification' in format doc. 728 729- bpo-39530: Fix misleading documentation about mixed-type numeric 730 comparisons. 731 732- bpo-17422: The language reference now specifies restrictions on class 733 namespaces. Adapted from a patch by Ethan Furman. 734 735- bpo-39654: In pyclbr doc, update 'class' to 'module' where appropriate and 736 add readmodule comment. Patch by Hakan Çelik. 737 738- bpo-39392: Explain that when filling with turtle, overlap regions may be 739 left unfilled. 740 741- bpo-39381: Mention in docs that :func:`asyncio.get_event_loop` implicitly 742 creates new event loop only if called from the main thread. 743 744- bpo-38918: Add an entry for ``__module__`` in the "function" & "method" 745 sections of the `inspect docs types and members table 746 <https://docs.python.org/3/library/inspect.html#types-and-members>`_ 747 748- bpo-3530: In the :mod:`ast` module documentation, fix a misleading 749 ``NodeTransformer`` example and add advice on when to use the 750 ``fix_missing_locations`` function. 751 752Tests 753----- 754 755- bpo-38546: Fix test_ressources_gced_in_workers() of 756 test_concurrent_futures: explicitly stop the manager to prevent leaking a 757 child process running in the background after the test completes. 758 759Build 760----- 761 762- bpo-39144: The ctags and etags build targets both include Modules/_ctypes 763 and Python standard library source files. 764 765Windows 766------- 767 768- bpo-38597: :mod:`distutils` will no longer statically link 769 :file:`vcruntime140.dll` when a redistributable version is unavailable. 770 All future releases of CPython will include a copy of this DLL to ensure 771 distributed extensions can continue to load. 772 773- bpo-38380: Update Windows builds to use SQLite 3.31.1 774 775- bpo-39439: Reduce overhead when using multiprocessing in a Windows virtual 776 environment 777 778- bpo-39185: The build.bat script has additional options for very-quiet 779 output (-q) and very-verbose output (-vv) 780 781macOS 782----- 783 784- bpo-38380: Update macOS builds to use SQLite 3.31.1 785 786IDLE 787---- 788 789- bpo-39781: Selecting code context lines no longer causes a jump. 790 791- bpo-39663: Add tests for pyparse find_good_parse_start(). 792 793- bpo-39600: In the font configuration window, remove duplicated font names. 794 795- bpo-30780: Add remaining configdialog tests for buttons and highlights and 796 keys tabs. 797 798- bpo-39388: IDLE Settings Cancel button now cancels pending changes 799 800- bpo-39050: Make IDLE Settings dialog Help button work again. 801 802- bpo-34118: Tag memoryview, range, and tuple as classes, the same as list, 803 etcetera, in the library manual built-in functions list. 804 805- bpo-38792: Close an IDLE shell calltip if a :exc:`KeyboardInterrupt` or 806 shell restart occurs. Patch by Zackery Spytz. 807 808- bpo-32989: Add tests for editor newline_and_indent_event method. Remove 809 dead code from pyparse find_good_parse_start method. 810 811 812What's New in Python 3.7.6 final? 813================================= 814 815*Release date: 2019-12-18* 816 817macOS 818----- 819 820- bpo-38295: Prevent failure of test_relative_path in test_py_compile on 821 macOS Catalina. 822 823 824What's New in Python 3.7.6 release candidate 1? 825=============================================== 826 827*Release date: 2019-12-11* 828 829Security 830-------- 831 832- bpo-38945: Newline characters have been escaped when performing uu 833 encoding to prevent them from overflowing into to content section of the 834 encoded file. This prevents malicious or accidental modification of data 835 during the decoding process. 836 837- bpo-37228: Due to significant security concerns, the *reuse_address* 838 parameter of :meth:`asyncio.loop.create_datagram_endpoint` is no longer 839 supported. This is because of the behavior of ``SO_REUSEADDR`` in UDP. For 840 more details, see the documentation for 841 ``loop.create_datagram_endpoint()``. (Contributed by Kyle Stanley, Antoine 842 Pitrou, and Yury Selivanov in :issue:`37228`.) 843 844- bpo-38804: Fixes a ReDoS vulnerability in :mod:`http.cookiejar`. Patch by 845 Ben Caller. 846 847Core and Builtins 848----------------- 849 850- bpo-38673: In REPL mode, don't switch to PS2 if the line starts with 851 comment or whitespace. Based on work by Batuhan Taşkaya. 852 853- bpo-38535: Fixed line numbers and column offsets for AST nodes for calls 854 without arguments in decorators. 855 856- bpo-38379: When cyclic garbage collection (gc) runs finalizers that 857 resurrect unreachable objects, the current gc run ends, without collecting 858 any cyclic trash. However, the statistics reported by ``collect()`` and 859 ``get_stats()`` claimed that all cyclic trash found was collected, and 860 that the resurrected objects were collected. Changed the stats to report 861 that none were collected. 862 863- bpo-35409: Ignore GeneratorExit exceptions when throwing an exception into 864 the aclose coroutine of an asynchronous generator. 865 866Library 867------- 868 869- bpo-39006: Fix asyncio when the ssl module is missing: only check for 870 ssl.SSLSocket instance if the ssl module is available. 871 872- bpo-38979: Return class from ``ContextVar.__class_getitem__`` to simplify 873 subclassing. 874 875- bpo-38986: Make repr of C accelerated TaskWakeupMethWrapper the same as of 876 pure Python version. 877 878- bpo-33684: Fix ``json.tool`` failed to read a JSON file with non-ASCII 879 characters when locale encoding is not UTF-8. 880 881- bpo-26730: Fix ``SpooledTemporaryFile.rollover()`` might corrupt the file 882 when it is in text mode. Patch by Serhiy Storchaka. 883 884- bpo-37838: :meth:`typing.get_type_hints` properly handles functions 885 decorated with :meth:`functools.wraps`. 886 887- bpo-38821: Fix unhandled exceptions in :mod:`argparse` when 888 internationalizing error messages for arguments with ``nargs`` set to 889 special (non-integer) values. Patch by Federico Bond. 890 891- bpo-38820: Make Python compatible with OpenSSL 3.0.0. 892 :func:`ssl.SSLSocket.getpeercert` no longer returns IPv6 addresses with a 893 trailing new line. 894 895- bpo-38785: Prevent asyncio from crashing if parent ``__init__`` is not 896 called from a constructor of object derived from ``asyncio.Future``. 897 898- bpo-27805: Allow opening pipes and other non-seekable files in append mode 899 with :func:`open`. 900 901- bpo-38686: Added support for multiple ``qop`` values in 902 :class:`urllib.request.AbstractDigestAuthHandler`. 903 904- bpo-38334: Fixed seeking backward on an encrypted 905 :class:`zipfile.ZipExtFile`. 906 907- bpo-31202: The case the result of :func:`pathlib.WindowsPath.glob` matches 908 now the case of the pattern for literal parts. 909 910- bpo-38109: Add missing :data:`stat.S_IFDOOR`, :data:`stat.S_IFPORT`, 911 :data:`stat.S_IFWHT`, :func:`stat.S_ISDOOR`, :func:`stat.S_ISPORT`, and 912 :func:`stat.S_ISWHT` values to the Python implementation of :mod:`stat`. 913 914- bpo-38422: Clarify docstrings of pathlib suffix(es) 915 916- bpo-38405: Nested subclasses of :class:`typing.NamedTuple` are now 917 pickleable. 918 919- bpo-38332: Prevent :exc:`KeyError` thrown by :func:`_encoded_words.decode` 920 when given an encoded-word with invalid content-type encoding from 921 propagating all the way to :func:`email.message.get`. 922 923- bpo-38341: Add :exc:`smtplib.SMTPNotSupportedError` to the :mod:`smtplib` 924 exported names. 925 926- bpo-13153: OS native encoding is now used for converting between Python 927 strings and Tcl objects. This allows to display, copy and paste to 928 clipboard emoji and other non-BMP characters. Converting strings from Tcl 929 to Python and back now never fails (except MemoryError). 930 931- bpo-36993: Improve error reporting for corrupt zip files with bad zip64 932 extra data. Patch by Daniel Hillier. 933 934- bpo-36952: Starting with Python 3.3, importing ABCs from 935 :mod:`collections` is deprecated, and import should be done from 936 :mod:`collections.abc`. Still being able to import from :mod:`collections` 937 was marked for removal in 3.8, but has been delayed to 3.9; documentation 938 and ``DeprecationWarning`` clarified. 939 940- bpo-36820: Break cycle generated when saving an exception in socket.py, 941 codeop.py and dyld.py as they keep alive not only the exception but user 942 objects through the ``__traceback__`` attribute. Patch by Mario Corchero. 943 944- bpo-34776: Fix dataclasses to support forward references in type 945 annotations 946 947- bpo-33348: lib2to3 now recognizes expressions after ``*`` and `**` like in 948 ``f(*[] or [])``. 949 950- bpo-27657: Fix urllib.parse.urlparse() with numeric paths. A string like 951 "path:80" is no longer parsed as a path but as a scheme ("path") and a 952 path ("80"). 953 954Documentation 955------------- 956 957- bpo-38351: Modernize :mod:`email` examples from %-formatting to f-strings. 958 959- bpo-38592: Add Brazilian Portuguese to the language switcher at Python 960 Documentation website. 961 962- bpo-38294: Add list of no-longer-escaped chars to re.escape documentation 963 964Tests 965----- 966 967- bpo-38547: Fix test_pty: if the process is the session leader, closing the 968 master file descriptor raises a SIGHUP signal: simply ignore SIGHUP when 969 running the tests. 970 971- bpo-38965: Fix test_faulthandler on GCC 10. Use the "volatile" keyword in 972 ``faulthandler._stack_overflow()`` to prevent tail call optimization on 973 any compiler, rather than relying on compiler specific pragma. 974 975- bpo-38669: Raise :exc:`TypeError` when passing target as a string with 976 :meth:`unittest.mock.patch.object`. 977 978- bpo-35998: Fix a race condition in test_asyncio.test_start_tls_server_1(). 979 Previously, there was a race condition between the test main() function 980 which replaces the protocol and the test ServerProto protocol which sends 981 ANSWER once it gets HELLO. Now, only the test main() function is 982 responsible to send data, ServerProto no longer sends data. 983 984- bpo-37531: On timeout, regrtest no longer attempts to call 985 ``popen.communicate()`` again: it can hang until all child processes using 986 stdout and stderr pipes completes. Kill the worker process and ignores its 987 output. Change also the faulthandler timeout of the main process from 1 988 minute to 5 minutes, for Python slowest buildbots. 989 990Build 991----- 992 993- bpo-37404: :mod:`asyncio` now raises :exc:`TyperError` when calling 994 incompatible methods with an :class:`ssl.SSLSocket` socket. Patch by Ido 995 Michael. 996 997- bpo-38809: On Windows, build scripts will now recognize and use python.exe 998 from an active virtual env. 999 1000- bpo-37415: Fix stdatomic.h header check for ICC compiler: the ICC 1001 implementation lacks atomic_uintptr_t type which is needed by Python. 1002 1003Windows 1004------- 1005 1006- bpo-38589: Fixes HTML Help shortcut when Windows is not installed to C 1007 drive 1008 1009IDLE 1010---- 1011 1012- bpo-38944: Excape key now closes IDLE completion windows. Patch by Johnny 1013 Najera. 1014 1015- bpo-38943: Fix IDLE autocomplete windows not always appearing on some 1016 systems. Patch by Johnny Najera. 1017 1018- bpo-38862: 'Strip Trailing Whitespace' on the Format menu removes extra 1019 newlines at the end of non-shell files. 1020 1021- bpo-26353: Stop adding newline when saving an IDLE shell window. 1022 1023- bpo-38636: Fix IDLE Format menu tab toggle and file indent width. These 1024 functions (default shortcuts Alt-T and Alt-U) were mistakenly disabled in 1025 3.7.5 and 3.8.0. 1026 1027- bpo-4630: Add an option to toggle IDLE's cursor blink for shell, editor, 1028 and output windows. See Settings, General, Window Preferences, Cursor 1029 Blink. Patch by Zachary Spytz. 1030 1031- bpo-38598: Do not try to compile IDLE shell or output windows 1032 1033- bpo-36698: IDLE no longer fails when write non-encodable characters to 1034 stderr. It now escapes them with a backslash, as the regular Python 1035 interpreter. Added the ``errors`` field to the standard streams. 1036 1037Tools/Demos 1038----------- 1039 1040- bpo-38118: Update Valgrind suppression file to ignore a false alarm in 1041 :c:func:`PyUnicode_Decode` when using GCC builtin strcmp(). 1042 1043- bpo-38347: pathfix.py: Assume all files that end on '.py' are Python 1044 scripts when working recursively. 1045 1046C API 1047----- 1048 1049- bpo-38540: Fixed possible leak in :c:func:`PyArg_Parse` and similar 1050 functions for format units ``"es#"`` and ``"et#"`` when the macro 1051 :c:macro:`PY_SSIZE_T_CLEAN` is not defined. 1052 1053- bpo-38395: Fix a crash in :class:`weakref.proxy` objects due to incorrect 1054 lifetime management when calling some associated methods that may delete 1055 the last reference to object being referenced by the proxy. Patch by Pablo 1056 Galindo. 1057 1058 1059What's New in Python 3.7.5 final? 1060================================= 1061 1062*Release date: 2019-10-14* 1063 1064Library 1065------- 1066 1067- bpo-38368: Prevent ctypes crash when handling arrays in structs/unions. 1068 1069- bpo-38449: Revert GH-15522, which introduces a regression in 1070 :meth:`mimetypes.guess_type` due to improper handling of filenames as 1071 urls. 1072 1073Windows 1074------- 1075 1076- bpo-38344: Fix syntax in activate.bat. 1077 1078 1079What's New in Python 3.7.5 release candidate 1? 1080=============================================== 1081 1082*Release date: 2019-10-01* 1083 1084Security 1085-------- 1086 1087- bpo-38243: Escape the server title of 1088 :class:`xmlrpc.server.DocXMLRPCServer` when rendering the document page as 1089 HTML. (Contributed by Dong-hee Na in :issue:`38243`.) 1090 1091- bpo-38174: Update vendorized expat library version to 2.2.8, which 1092 resolves CVE-2019-15903. 1093 1094- bpo-37764: Fixes email._header_value_parser.get_unstructured going into an 1095 infinite loop for a specific case in which the email header does not have 1096 trailing whitespace, and the case in which it contains an invalid encoded 1097 word. Patch by Ashwin Ramaswami. 1098 1099- bpo-37461: Fix an infinite loop when parsing specially crafted email 1100 headers. Patch by Abhilash Raj. 1101 1102- bpo-34155: Fix parsing of invalid email addresses with more than one ``@`` 1103 (e.g. a@b@c.com.) to not return the part before 2nd ``@`` as valid email 1104 address. Patch by maxking & jpic. 1105 1106Core and Builtins 1107----------------- 1108 1109- bpo-36871: Improve error handling for the assert_has_calls method of 1110 mocks. Fixed a bug where any errors encountered while binding the expected 1111 calls to the mock's spec were silently swallowed, leading to misleading 1112 error output. 1113 1114- bpo-38013: Allow to call ``async_generator_athrow().throw(...)`` even for 1115 non-started async generator helper. It fixes annoying warning at the end 1116 of :func:`asyncio.run` call. 1117 1118- bpo-38124: Fix an off-by-one error in PyState_AddModule that could cause 1119 out-of-bounds memory access. 1120 1121- bpo-36946: Fix possible signed integer overflow when handling slices. 1122 Patch by hongweipeng. 1123 1124- bpo-37409: Ensure explicit relative imports from interactive sessions and 1125 scripts (having no parent package) always raise ImportError, rather than 1126 treating the current module as the package. Patch by Ben Lewis. 1127 1128- bpo-36311: Decoding bytes objects larger than 2GiB is faster and no longer 1129 fails when a multibyte characters spans a chunk boundary. 1130 1131- bpo-37467: Fix :func:`sys.excepthook` and :c:func:`PyErr_Display` if a 1132 filename is a bytes string. For example, for a SyntaxError exception where 1133 the filename attribute is a bytes string. 1134 1135- bpo-37417: :meth:`bytearray.extend` now correctly handles errors that 1136 arise during iteration. Patch by Brandt Bucher. 1137 1138- bpo-20523: ``pdb.Pdb`` supports ~/.pdbrc in Windows 7. Patch by Tim Hopper 1139 and Dan Lidral-Porter. 1140 1141Library 1142------- 1143 1144- bpo-38019: Correctly handle pause/resume reading of closed asyncio unix 1145 pipe. 1146 1147- bpo-38216: Allow the rare code that wants to send invalid http requests 1148 from the `http.client` library a way to do so. The fixes for bpo-30458 1149 led to breakage for some projects that were relying on this ability to 1150 test their own behavior in the face of bad requests. 1151 1152- bpo-38191: Constructor of :class:`~typing.NamedTuple` type now accepts 1153 arbitrary keyword argument names, including "cls", "self", "typename" and 1154 "fields". 1155 1156- bpo-38185: Fixed case-insensitive string comparison in 1157 :class:`sqlite3.Row` indexing. 1158 1159- bpo-38175: Fix a memory leak in comparison of :class:`sqlite3.Row` 1160 objects. 1161 1162- bpo-33936: _hashlib no longer calls obsolete OpenSSL initialization 1163 function with OpenSSL 1.1.0+. 1164 1165- bpo-34706: Preserve subclassing in inspect.Signature.from_callable. 1166 1167- bpo-38059: inspect.py now uses sys.exit() instead of exit() 1168 1169- bpo-38006: weakref.WeakValueDictionary defines a local remove() function 1170 used as callback for weak references. This function was created with a 1171 closure. Modify the implementation to avoid the closure. 1172 1173- bpo-34410: Fixed a crash in the :func:`tee` iterator when re-enter it. 1174 RuntimeError is now raised in this case. 1175 1176- bpo-37965: Fix C compiler warning caused by 1177 distutils.ccompiler.CCompiler.has_function. 1178 1179- bpo-36205: Fix the rusage implementation of time.process_time() to 1180 correctly report the sum of the system and user CPU time. 1181 1182- bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs 1183 with only a host name. Patch by Dong-hee Na. 1184 1185- bpo-37950: Fix :func:`ast.dump` when call with incompletely initialized 1186 node. 1187 1188- bpo-37915: Fix a segmentation fault that appeared when comparing instances 1189 of ``datetime.timezone`` and ``datetime.tzinfo`` objects. Patch by Pablo 1190 Galindo. 1191 1192- bpo-37885: venv: Don't generate unset variable warning on deactivate. 1193 1194- bpo-37868: Fix dataclasses.is_dataclass when given an instance that never 1195 raises AttributeError in __getattr__. That is, an object that returns 1196 something for __dataclass_fields__ even if it's not a dataclass. 1197 1198- bpo-37811: Fix ``socket`` module's ``socket.connect(address)`` function 1199 being unable to establish connection in case of interrupted system call. 1200 The problem was observed on all OSes which ``poll(2)`` system call can 1201 take only non-negative integers and -1 as a timeout value. 1202 1203- bpo-21131: Fix ``faulthandler.register(chain=True)`` stack. faulthandler 1204 now allocates a dedicated stack of ``SIGSTKSZ*2`` bytes, instead of just 1205 ``SIGSTKSZ`` bytes. Calling the previous signal handler in faulthandler 1206 signal handler uses more than ``SIGSTKSZ`` bytes of stack memory on some 1207 platforms. 1208 1209- bpo-34621: Fixed unpickle-ability in older Python versions (<3.7) of UUID 1210 objects with ``is_safe`` set to ``SafeUUID.unknown``. 1211 1212- bpo-37738: Fix the implementation of curses ``addch(str, color_pair)``: 1213 pass the color pair to ``setcchar()``, instead of always passing 0 as the 1214 color pair. 1215 1216- bpo-37723: Fix performance regression on regular expression parsing with 1217 huge character sets. Patch by Yann Vaginay. 1218 1219- bpo-32178: Fix IndexError in :mod:`email` package when trying to parse 1220 invalid address fields starting with ``:``. 1221 1222- bpo-37685: Fixed comparisons of :class:`datetime.timedelta` and 1223 :class:`datetime.timezone`. 1224 1225- bpo-37695: Correct :func:`curses.unget_wch` error message. Patch by 1226 Anthony Sottile. 1227 1228- bpo-29553: Fixed :meth:`argparse.ArgumentParser.format_usage` for mutually 1229 exclusive groups. Patch by Andrew Nester. 1230 1231- bpo-37664: Update wheels bundled with ensurepip (pip 19.2.3 and setuptools 1232 41.2.0) 1233 1234- bpo-37642: Allowed the pure Python implementation of 1235 :class:`datetime.timezone` to represent sub-minute offsets close to 1236 minimum and maximum boundaries, specifically in the ranges (23:59, 24:00) 1237 and (-23:59, 24:00). Patch by Ngalim Siregar 1238 1239- bpo-37491: Fix ``IndexError`` when parsing email headers with unexpectedly 1240 ending bare-quoted string value. Patch by Abhilash Raj. 1241 1242- bpo-18378: Recognize "UTF-8" as a valid value for LC_CTYPE in 1243 locale._parse_localename. 1244 1245- bpo-37579: Return :exc:`NotImplemented` in Python implementation of 1246 ``__eq__`` for :class:`~datetime.timedelta` and :class:`~datetime.time` 1247 when the other object being compared is not of the same type to match C 1248 implementation. Patch by Karthikeyan Singaravelan. 1249 1250- bpo-21478: Record calls to parent when autospecced object is attached to a 1251 mock using :func:`unittest.mock.attach_mock`. Patch by Karthikeyan 1252 Singaravelan. 1253 1254- bpo-37531: "python3 -m test -jN --timeout=TIMEOUT" now kills a worker 1255 process if it runs longer than *TIMEOUT* seconds. 1256 1257- bpo-37482: Fix serialization of display name in originator or destination 1258 address fields with both encoded words and special chars. 1259 1260- bpo-37424: Fixes a possible hang when using a timeout on 1261 `subprocess.run()` while capturing output. If the child process spawned 1262 its own children or otherwise connected its stdout or stderr handles with 1263 another process, we could hang after the timeout was reached and our child 1264 was killed when attempting to read final output from the pipes. 1265 1266- bpo-37421: Fix :func:`multiprocessing.util.get_temp_dir` finalizer: clear 1267 also the 'tempdir' configuration of the current process, so next call to 1268 ``get_temp_dir()`` will create a new temporary directory, rather than 1269 reusing the removed temporary directory. 1270 1271- bpo-37420: :func:`os.sched_setaffinity` now correctly handles errors that 1272 arise during iteration over its ``mask`` argument. Patch by Brandt Bucher. 1273 1274- bpo-29412: Fix IndexError in parsing a header value ending unexpectedly. 1275 Patch by Abhilash Raj. 1276 1277- bpo-37372: Fix error unpickling datetime.time objects from Python 2 with 1278 seconds>=24. Patch by Justin Blanchard. 1279 1280- bpo-27860: Fix ``IPv4Interface`` and ``IPv6Interface`` didn't accept 1281 string mask when the argument is tuple. 1282 1283- bpo-33972: Email with single part but content-type set to ``multipart/*`` 1284 doesn't raise AttributeError anymore. 1285 1286- bpo-21872: Fix :mod:`lzma`: module decompresses data incompletely. When 1287 decompressing a FORMAT_ALONE format file, and it doesn't have the end 1288 marker, sometimes the last one to dozens bytes can't be output. Patch by 1289 Ma Lin. 1290 1291- bpo-12144: Ensure cookies with ``expires`` attribute are handled in 1292 :meth:`CookieJar.make_cookies`. 1293 1294- bpo-37163: :func:`dataclasses.replace` now supports the field named "obj". 1295 1296- bpo-36871: Ensure method signature is used instead of constructor 1297 signature of a class while asserting mock object against method calls. 1298 Patch by Karthikeyan Singaravelan. 1299 1300- bpo-36564: Fix infinite loop in email header folding logic that would be 1301 triggered when an email policy's max_line_length is not long enough to 1302 include the required markup and any values in the message. Patch by Paul 1303 Ganssle 1304 1305- bpo-35168: :attr:`shlex.shlex.punctuation_chars` is now a read-only 1306 property. 1307 1308- bpo-20504: Fixes a bug in :mod:`cgi` module when a multipart/form-data 1309 request has no `Content-Length` header. 1310 1311- bpo-4963: Fixed non-deterministic behavior related to mimetypes extension 1312 mapping and module reinitialization. 1313 1314Documentation 1315------------- 1316 1317- bpo-26868: Fix example usage of :c:func:`PyModule_AddObject` to properly 1318 handle errors. 1319 1320- bpo-37979: Added a link to dateutil.parser.isoparse in the 1321 datetime.fromisoformat documentation. Patch by Paul Ganssle 1322 1323- bpo-37937: Mention ``frame.f_trace`` in :func:`sys.settrace` docs. 1324 1325- bpo-37726: Stop recommending getopt in the tutorial for command line 1326 argument parsing and promote argparse. 1327 1328- bpo-32910: Remove implementation-specific behaviour of how venv's 1329 Deactivate works. 1330 1331- bpo-37256: Fix wording of arguments for :class:`Request` in 1332 :mod:`urllib.request` 1333 1334- bpo-37284: Add a brief note to indicate that any new 1335 ``sys.implementation`` required attributes must go through the PEP 1336 process. 1337 1338- bpo-30088: Documented that :class:`mailbox.Maildir` constructor doesn't 1339 attempt to verify the maildir folder layout correctness. Patch by 1340 Sviatoslav Sydorenko. 1341 1342- bpo-37487: Fix PyList_GetItem index description to include 0. 1343 1344- bpo-37478: Added possible exceptions to the description of os.chdir(). 1345 1346- bpo-37004: In the documentation for difflib, a note was added explicitly 1347 warning that the results of SequenceMatcher's ratio method may depend on 1348 the order of the input strings. 1349 1350- bpo-35803: Document and test that ``tempfile`` functions may accept a 1351 :term:`path-like object` for the ``dir`` argument. Patch by Anthony 1352 Sottile. 1353 1354- bpo-34293: Fix the Doc/Makefile regarding PAPER environment variable and 1355 PDF builds 1356 1357Tests 1358----- 1359 1360- bpo-38239: Fix test_gdb for Link Time Optimization (LTO) builds. 1361 1362- bpo-38275: test_ssl now handles disabled TLS/SSL versions better. 1363 OpenSSL's crypto policy and run-time settings are recognized and tests for 1364 disabled versions are skipped. Tests also accept more TLS minimum_versions 1365 for platforms that override OpenSSL's default with strict settings. 1366 1367- bpo-38271: The private keys for test_ssl were encrypted with 3DES in 1368 traditional PKCS#5 format. 3DES and the digest algorithm of PKCS#5 are 1369 blocked by some strict crypto policies. Use PKCS#8 format with AES256 1370 encryption instead. 1371 1372- bpo-37123: Multiprocessing test test_mymanager() now also expects 1373 -SIGTERM, not only exitcode 0. BaseManager._finalize_manager() sends 1374 SIGTERM to the manager process if it takes longer than 1 second to stop, 1375 which happens on slow buildbots. 1376 1377- bpo-38212: Multiprocessing tests: increase 1378 test_queue_feeder_donot_stop_onexc() timeout from 1 to 60 seconds. 1379 1380- bpo-38117: Test with OpenSSL 1.1.1d 1381 1382- bpo-37805: Add tests for json.dump(..., skipkeys=True). Patch by Dong-hee 1383 Na. 1384 1385- bpo-37531: Enhance regrtest multiprocess timeout: write a message when 1386 killing a worker process, catch popen.kill() and popen.wait() exceptions, 1387 put a timeout on the second call to popen.communicate(). 1388 1389- bpo-37335: Improve locale coercion tests by using codec lookup instead of 1390 more fragile replace(). 1391 1392- bpo-37411: Fix test_wsgiref.testEnviron() to no longer depend on the 1393 environment variables (don't fail if "X" variable is set). 1394 1395- bpo-37400: Fix test_os.test_chown(): use os.getgroups() rather than 1396 grp.getgrall() to get groups. Rename also the test to test_chown_gid(). 1397 1398- bpo-37359: Add --cleanup option to python3 -m test to remove 1399 ``test_python_*`` directories of previous failed jobs. Add "make 1400 cleantest" to run ``python3 -m test --cleanup``. 1401 1402- bpo-37362: test_gdb no longer fails if it gets an "unexpected" message on 1403 stderr: it now ignores stderr. The purpose of test_gdb is to test that 1404 python-gdb.py commands work as expected, not to test gdb. 1405 1406- bpo-36919: Make ``test_source_encoding.test_issue2301`` implementation 1407 independent. The test will work now for both CPython and IronPython. 1408 1409- bpo-34720: Assert m_state != NULL to mimic GC traversal functions that do 1410 not correctly handle module creation when the module state has not been 1411 created. 1412 1413- bpo-34347: Fix ``test_utf8_mode.test_cmd_line`` for AIX. Patch by M. Felt 1414 1415Build 1416----- 1417 1418- bpo-38301: In Solaris family, we must be sure to use ``-D_REENTRANT``. 1419 Patch by Jesús Cea Avión. 1420 1421- bpo-36002: Locate ``llvm-profdata`` and ``llvm-ar`` binaries using 1422 ``AC_PATH_TOOL`` rather than ``AC_PATH_TARGET_TOOL``. 1423 1424- bpo-37936: The :file:`.gitignore` file no longer applies to any files that 1425 are in fact tracked in the Git repository. Patch by Greg Price. 1426 1427Windows 1428------- 1429 1430- bpo-38117: Update bundled OpenSSL to 1.1.1d 1431 1432- bpo-36634: venv activate.bat now works when the existing variables contain 1433 double quote characters. 1434 1435- bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath. 1436 1437- bpo-38088: Fixes distutils not finding vcruntime140.dll with only the v142 1438 toolset installed. 1439 1440- bpo-37283: Ensure command-line and unattend.xml setting override 1441 previously detected states in Windows installer. 1442 1443- bpo-37705: Improve the implementation of ``winerror_to_errno()``. 1444 1445- bpo-37549: :func:`os.dup` no longer fails for standard streams on Windows 1446 7. 1447 1448- bpo-37702: Fix memory leak on Windows in creating an SSLContext object or 1449 running urllib.request.urlopen('https://...'). 1450 1451- bpo-10945: Officially drop support for creating bdist_wininst installers 1452 on non-Windows systems. 1453 1454- bpo-37445: Include the ``FORMAT_MESSAGE_IGNORE_INSERTS`` flag in 1455 ``FormatMessageW()`` calls. 1456 1457- bpo-37380: Don't collect unfinished processes with ``subprocess._active`` 1458 on Windows to cleanup later. Patch by Ruslan Kuprieiev. 1459 1460- bpo-32587: Make :data:`winreg.REG_MULTI_SZ` support zero-length strings. 1461 1462macOS 1463----- 1464 1465- bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. 1466 1467- bpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests 1468 optional 1469 1470IDLE 1471---- 1472 1473- bpo-35379: When exiting IDLE, catch any AttributeError. One happens when 1474 EditorWindow.close is called twice. Printing a traceback, when IDLE is 1475 run from a terminal, is useless and annoying. 1476 1477- bpo-38183: To avoid problems, test_idle ignores the user config directory. 1478 It no longer tries to create or access .idlerc or any files within. Users 1479 must run IDLE to discover problems with saving settings. 1480 1481- bpo-38077: IDLE no longer adds 'argv' to the user namespace when 1482 initializing it. This bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4. 1483 1484- bpo-38041: Shell restart lines now fill the window width, always start 1485 with '=', and avoid wrapping unnecessarily. The line will still wrap if 1486 the included file name is long relative to the width. 1487 1488- bpo-35771: To avoid occasional spurious test_idle failures on slower 1489 machines, increase the ``hover_delay`` in test_tooltip. 1490 1491- bpo-37824: Properly handle user input warnings in IDLE shell. Cease 1492 turning SyntaxWarnings into SyntaxErrors. 1493 1494- bpo-37929: IDLE Settings dialog now closes properly when there is no shell 1495 window. 1496 1497- bpo-37902: Add mousewheel scrolling for IDLE module, path, and stack 1498 browsers. Patch by George Zhang. 1499 1500- bpo-37849: Fixed completions list appearing too high or low when shown 1501 above the current line. 1502 1503- bpo-36419: Refactor IDLE autocomplete and improve testing. 1504 1505- bpo-37748: Reorder the Run menu. Put the most common choice, Run Module, 1506 at the top. 1507 1508- bpo-37692: Improve highlight config sample with example shell interaction 1509 and better labels for shell elements. 1510 1511- bpo-37628: Settings dialog no longer expands with font size. 1512 1513- bpo-37627: Initialize the Customize Run dialog with the command line 1514 arguments most recently entered before. The user can optionally edit 1515 before submitting them. 1516 1517- bpo-33610: Fix code context not showing the correct context when first 1518 toggled on. 1519 1520- bpo-37530: Optimize code context to reduce unneeded background activity. 1521 Font and highlight changes now occur along with text changes instead of 1522 after a random delay. 1523 1524- bpo-27452: Cleanup ``config.py`` by inlining ``RemoveFile`` and 1525 simplifying the handling of ``file`` in ``CreateConfigHandlers``. 1526 1527- bpo-37325: Fix tab focus traversal order for help source and custom run 1528 dialogs. 1529 1530- bpo-17535: Add optional line numbers for IDLE editor windows. Windows 1531 open without line numbers unless set otherwise in the General tab of the 1532 configuration dialog. 1533 1534- bpo-26806: To compensate for stack frames added by IDLE and avoid possible 1535 problems with low recursion limits, add 30 to limits in the user code 1536 execution process. Subtract 30 when reporting recursion limits to make 1537 this addition mostly transparent. 1538 1539- bpo-36390: Gather Format menu functions into format.py. Combine 1540 paragraph.py, rstrip.py, and format methods from editor.py. 1541 1542Tools/Demos 1543----------- 1544 1545- bpo-37803: pdb's ``--help`` and ``--version`` long options now work. 1546 1547- bpo-37675: 2to3 now works when run from a zipped standard library. 1548 1549 1550What's New in Python 3.7.4 final? 1551================================= 1552 1553*Release date: 2019-07-08* 1554 1555Core and Builtins 1556----------------- 1557 1558- bpo-37500: Due to unintended side effects, revert the change introduced by 1559 :issue:`1875` in 3.7.4rc1 to check for syntax errors in dead conditional 1560 code blocks. 1561 1562Documentation 1563------------- 1564 1565- bpo-37149: Replace the dead link to the Tkinter 8.5 reference by John 1566 Shipman, New Mexico Tech, with a link to the archive.org copy. 1567 1568 1569What's New in Python 3.7.4 release candidate 2? 1570=============================================== 1571 1572*Release date: 2019-07-02* 1573 1574Security 1575-------- 1576 1577- bpo-37463: ssl.match_hostname() no longer accepts IPv4 addresses with 1578 additional text after the address and only quad-dotted notation without 1579 trailing whitespaces. Some inet_aton() implementations ignore whitespace 1580 and all data after whitespace, e.g. '127.0.0.1 whatever'. 1581 1582Core and Builtins 1583----------------- 1584 1585- bpo-24214: Improved support of the surrogatepass error handler in the 1586 UTF-8 and UTF-16 incremental decoders. 1587 1588Library 1589------- 1590 1591- bpo-37440: http.client now enables TLS 1.3 post-handshake authentication 1592 for default context or if a cert_file is passed to HTTPSConnection. 1593 1594- bpo-37437: Update vendorized expat version to 2.2.7. 1595 1596- bpo-37428: SSLContext.post_handshake_auth = True no longer sets 1597 SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the 1598 option is documented as ignored for clients, OpenSSL implicitly enables 1599 cert chain validation when the flag is set. 1600 1601- bpo-32627: Fix compile error when ``_uuid`` headers conflicting included. 1602 1603Windows 1604------- 1605 1606- bpo-37369: Fixes path for :data:`sys.executable` when running from the 1607 Microsoft Store. 1608 1609- bpo-35360: Update Windows builds to use SQLite 3.28.0. 1610 1611macOS 1612----- 1613 1614- bpo-34602: Avoid test suite failures on macOS by no longer calling 1615 resource.setrlimit to increase the process stack size limit at runtime. 1616 The runtime change is no longer needed since the interpreter is being 1617 built with a larger default stack size. 1618 1619 1620What's New in Python 3.7.4 release candidate 1? 1621=============================================== 1622 1623*Release date: 2019-06-18* 1624 1625Security 1626-------- 1627 1628- bpo-35907: CVE-2019-9948: Avoid file reading by disallowing 1629 ``local-file://`` and ``local_file://`` URL schemes in 1630 ``URLopener().open()`` and ``URLopener().retrieve()`` of 1631 :mod:`urllib.request`. 1632 1633- bpo-36742: Fixes mishandling of pre-normalization characters in 1634 urlsplit(). 1635 1636- bpo-30458: Address CVE-2019-9740 by disallowing URL paths with embedded 1637 whitespace or control characters through into the underlying http client 1638 request. Such potentially malicious header injection URLs now cause an 1639 http.client.InvalidURL exception to be raised. 1640 1641- bpo-33529: Prevent fold function used in email header encoding from 1642 entering infinite loop when there are too many non-ASCII characters in a 1643 header. 1644 1645- bpo-35755: :func:`shutil.which` now uses ``os.confstr("CS_PATH")`` if 1646 available and if the :envvar:`PATH` environment variable is not set. 1647 Remove also the current directory from :data:`posixpath.defpath`. On Unix, 1648 :func:`shutil.which` and the :mod:`subprocess` module no longer search the 1649 executable in the current directory if the :envvar:`PATH` environment 1650 variable is not set. 1651 1652Core and Builtins 1653----------------- 1654 1655- bpo-37269: Fix a bug in the peephole optimizer that was not treating 1656 correctly constant conditions with binary operators. Patch by Pablo 1657 Galindo. 1658 1659- bpo-37219: Remove errorneous optimization for empty set differences. 1660 1661- bpo-26423: Fix possible overflow in ``wrap_lenfunc()`` when ``sizeof(long) 1662 < sizeof(Py_ssize_t)`` (e.g., 64-bit Windows). 1663 1664- bpo-36829: :c:func:`PyErr_WriteUnraisable` now displays the exception even 1665 if displaying the traceback failed. Moreover, hold a strong reference to 1666 :data:`sys.stderr` while using it. Document that an exception must be set 1667 when calling :c:func:`PyErr_WriteUnraisable`. 1668 1669- bpo-36907: Fix a crash when calling a C function with a keyword dict 1670 (``f(**kwargs)``) and changing the dict ``kwargs`` while that function is 1671 running. 1672 1673- bpo-36946: Fix possible signed integer overflow when handling slices. 1674 1675- bpo-27987: ``PyGC_Head`` structure is aligned to ``long double``. This is 1676 needed to ensure GC-ed objects are aligned properly. Patch by Inada 1677 Naoki. 1678 1679- bpo-1875: A :exc:`SyntaxError` is now raised if a code blocks that will be 1680 optimized away (e.g. if conditions that are always false) contains syntax 1681 errors. Patch by Pablo Galindo. (Reverted in 3.7.4 final by 1682 :issue:`37500`.) 1683 1684- bpo-28866: Avoid caching attributes of classes which type defines mro() to 1685 avoid a hard cache invalidation problem. 1686 1687- bpo-27639: Correct return type for UserList slicing operations. Patch by 1688 Michael Blahay, Erick Cervantes, and vaultah 1689 1690- bpo-32849: Fix Python Initialization code on FreeBSD to detect properly 1691 when stdin file descriptor (fd 0) is invalid. 1692 1693- bpo-27987: pymalloc returns memory blocks aligned by 16 bytes, instead of 1694 8 bytes, on 64-bit platforms to conform x86-64 ABI. Recent compilers 1695 assume this alignment more often. Patch by Inada Naoki. 1696 1697- bpo-36504: Fix signed integer overflow in _ctypes.c's 1698 ``PyCArrayType_new()``. 1699 1700- bpo-20844: Fix running script with encoding cookie and LF line ending may 1701 fail on Windows. 1702 1703- bpo-24214: Fixed support of the surrogatepass error handler in the UTF-8 1704 incremental decoder. 1705 1706- bpo-36459: Fix a possible double ``PyMem_FREE()`` due to tokenizer.c's 1707 ``tok_nextc()``. 1708 1709- bpo-36433: Fixed TypeError message in classmethoddescr_call. 1710 1711- bpo-36430: Fix a possible reference leak in :func:`itertools.count`. 1712 1713- bpo-36440: Include node names in ``ParserError`` messages, instead of 1714 numeric IDs. Patch by A. Skrobov. 1715 1716- bpo-36421: Fix a possible double decref in _ctypes.c's 1717 ``PyCArrayType_new()``. 1718 1719- bpo-36256: Fix bug in parsermodule when parsing a state in a DFA that has 1720 two or more arcs with labels of the same type. Patch by Pablo Galindo. 1721 1722- bpo-36236: At Python initialization, the current directory is no longer 1723 prepended to :data:`sys.path` if it has been removed. 1724 1725- bpo-36262: Fix an unlikely memory leak on conversion from string to float 1726 in the function ``_Py_dg_strtod()`` used by ``float(str)``, 1727 ``complex(str)``, :func:`pickle.load`, :func:`marshal.load`, etc. 1728 1729- bpo-36218: Fix a segfault occuring when sorting a list of heterogeneous 1730 values. Patch contributed by Rémi Lapeyre and Elliot Gorokhovsky. 1731 1732- bpo-36035: Added fix for broken symlinks in combination with pathlib 1733 1734- bpo-18372: Add missing :c:func:`PyObject_GC_Track` calls in the 1735 :mod:`pickle` module. Patch by Zackery Spytz. 1736 1737- bpo-34408: Prevent a null pointer dereference and resource leakage in 1738 ``PyInterpreterState_New()``. 1739 1740Library 1741------- 1742 1743- bpo-37280: Use threadpool for reading from file for sendfile fallback 1744 mode. 1745 1746- bpo-37279: Fix asyncio sendfile support when sendfile sends extra data in 1747 fallback mode. 1748 1749- bpo-19865: :func:`ctypes.create_unicode_buffer()` now also supports 1750 non-BMP characters on platforms with 16-bit :c:type:`wchar_t` (for 1751 example, Windows and AIX). 1752 1753- bpo-35922: Fix :meth:`RobotFileParser.crawl_delay` and 1754 :meth:`RobotFileParser.request_rate` to return ``None`` rather than raise 1755 :exc:`AttributeError` when no relevant rule is defined in the robots.txt 1756 file. Patch by Rémi Lapeyre. 1757 1758- bpo-36607: Eliminate :exc:`RuntimeError` raised by 1759 :func:`asyncio.all_tasks()` if internal tasks weak set is changed by 1760 another thread during iteration. 1761 1762- bpo-36402: Fix a race condition at Python shutdown when waiting for 1763 threads. Wait until the Python thread state of all non-daemon threads get 1764 deleted (join all non-daemon threads), rather than just wait until 1765 non-daemon Python threads complete. 1766 1767- bpo-34886: Fix an unintended ValueError from :func:`subprocess.run` when 1768 checking for conflicting `input` and `stdin` or `capture_output` and 1769 `stdout` or `stderr` args when they were explicitly provided but with 1770 `None` values within a passed in `**kwargs` dict rather than as passed 1771 directly by name. Patch contributed by Rémi Lapeyre. 1772 1773- bpo-37173: The exception message for ``inspect.getfile()`` now correctly 1774 reports the passed class rather than the builtins module. 1775 1776- bpo-12639: :meth:`msilib.Directory.start_component()` no longer fails if 1777 *keyfile* is not ``None``. 1778 1779- bpo-36520: Lengthy email headers with UTF-8 characters are now properly 1780 encoded when they are folded. Patch by Jeffrey Kintscher. 1781 1782- bpo-37054: Fix destructor :class:`_pyio.BytesIO` and 1783 :class:`_pyio.TextIOWrapper`: initialize their ``_buffer`` attribute as 1784 soon as possible (in the class body), because it's used by ``__del__()`` 1785 which calls ``close()``. 1786 1787- bpo-30835: Fixed a bug in email parsing where a message with invalid bytes 1788 in content-transfer-encoding of a multipart message can cause an 1789 AttributeError. Patch by Andrew Donnellan. 1790 1791- bpo-37035: Don't log OSError based exceptions if a fatal error has 1792 occurred in asyncio transport. Peer can generate almost any OSError, user 1793 cannot avoid these exceptions by fixing own code. Errors are still 1794 propagated to user code, it's just logging them is pointless and pollute 1795 asyncio logs. 1796 1797- bpo-37008: Add support for calling :func:`next` with the mock resulting 1798 from :func:`unittest.mock.mock_open` 1799 1800- bpo-27737: Allow whitespace only header encoding in ``email.header`` - by 1801 Batuhan Taskaya 1802 1803- bpo-36969: PDB command `args` now display keyword only arguments. Patch 1804 contributed by Rémi Lapeyre. 1805 1806- bpo-36983: Add missing names to ``typing.__all__``: ``ChainMap``, 1807 ``ForwardRef``, ``OrderedDict`` - by Anthony Sottile. 1808 1809- bpo-21315: Email headers containing RFC2047 encoded words are parsed 1810 despite the missing whitespace, and a defect registered. Also missing 1811 trailing whitespace after encoded words is now registered as a defect. 1812 1813- bpo-33524: Fix the folding of email header when the max_line_length is 0 1814 or None and the header contains non-ascii characters. Contributed by 1815 Licht Takeuchi (@Licht-T). 1816 1817- bpo-24564: :func:`shutil.copystat` now ignores :const:`errno.EINVAL` on 1818 :func:`os.setxattr` which may occur when copying files on filesystems 1819 without extended attributes support. 1820 1821 Original patch by Giampaolo Rodola, updated by Ying Wang. 1822 1823- bpo-36845: Added validation of integer prefixes to the construction of IP 1824 networks and interfaces in the ipaddress module. 1825 1826- bpo-35545: Fix asyncio discarding IPv6 scopes when ensuring hostname 1827 resolutions internally 1828 1829- bpo-35070: posix.getgrouplist() now works correctly when the user belongs 1830 to NGROUPS_MAX supplemental groups. Patch by Jeffrey Kintscher. 1831 1832- bpo-24538: In `shutil.copystat()`, first copy extended file attributes and 1833 then file permissions, since extended attributes can only be set on the 1834 destination while it is still writeable. 1835 1836- bpo-33110: Handle exceptions raised by functions added by 1837 concurrent.futures add_done_callback correctly when the Future has already 1838 completed. 1839 1840- bpo-26903: Limit `max_workers` in `ProcessPoolExecutor` to 61 to work 1841 around a WaitForMultipleObjects limitation. 1842 1843- bpo-36813: Fix :class:`~logging.handlers.QueueListener` to call 1844 ``queue.task_done()`` upon stopping. Patch by Bar Harel. 1845 1846- bpo-36734: Fix compilation of ``faulthandler.c`` on HP-UX. Initialize 1847 ``stack_t current_stack`` to zero using ``memset()``. 1848 1849- bpo-29183: Fix double exceptions in :class:`wsgiref.handlers.BaseHandler` 1850 by calling its :meth:`~wsgiref.handlers.BaseHandler.close` method only 1851 when no exception is raised. 1852 1853- bpo-36650: The C version of functools.lru_cache() was treating calls with 1854 an empty ``**kwargs`` dictionary as being distinct from calls with no 1855 keywords at all. This did not result in an incorrect answer, but it did 1856 trigger an unexpected cache miss. 1857 1858- bpo-28552: Fix :mod:`distutils.sysconfig` if :data:`sys.executable` is 1859 ``None`` or an empty string: use :func:`os.getcwd` to initialize 1860 ``project_base``. Fix also the distutils build command: don't use 1861 :data:`sys.executable` if it is ``None`` or an empty string. 1862 1863- bpo-35755: :func:`shutil.which` and 1864 :func:`distutils.spawn.find_executable` now use ``os.confstr("CS_PATH")`` 1865 if available instead of :data:`os.defpath`, if the ``PATH`` environment 1866 variable is not set. Moreover, don't use ``os.confstr("CS_PATH")`` nor 1867 :data:`os.defpath` if the ``PATH`` environment variable is set to an empty 1868 string. 1869 1870- bpo-36613: Fix :mod:`asyncio` wait() not removing callback if exception 1871 1872- bpo-36598: Fix ``isinstance`` check for Mock objects with spec when the 1873 code is executed under tracing. Patch by Karthikeyan Singaravelan. 1874 1875- bpo-36533: Reinitialize logging.Handler locks in forked child processes 1876 instead of attempting to acquire them all in the parent before forking 1877 only to be released in the child process. The acquire/release pattern was 1878 leading to deadlocks in code that has implemented any form of chained 1879 logging handlers that depend upon one another as the lock acquision order 1880 cannot be guaranteed. 1881 1882- bpo-36522: If *debuglevel* is set to >0 in :mod:`http.client`, print all 1883 values for headers with multiple values for the same header name. Patch by 1884 Matt Houglum. 1885 1886- bpo-36492: Arbitrary keyword arguments (even with names "self" and "func") 1887 can now be passed to some functions which should accept arbitrary keyword 1888 arguments and pass them to other function (for example partialmethod(), 1889 TestCase.addCleanup() and Profile.runcall()) if the required arguments are 1890 passed as positional arguments. 1891 1892- bpo-36434: Errors during writing to a ZIP file no longer prevent to 1893 properly close it. 1894 1895- bpo-34745: Fix :mod:`asyncio` ssl memory issues caused by circular 1896 references 1897 1898- bpo-36321: collections.namedtuple() misspelled the name of an attribute. 1899 To be consistent with typing.NamedTuple, the attribute name should have 1900 been "_field_defaults" instead of "_fields_defaults". For backwards 1901 compatibility, both spellings are now created. The misspelled version may 1902 be removed in the future. 1903 1904- bpo-36272: :mod:`logging` does not silently ignore RecursionError anymore. 1905 Patch contributed by Rémi Lapeyre. 1906 1907- bpo-36235: Fix ``CFLAGS`` in ``customize_compiler()`` of 1908 ``distutils.sysconfig``: when the ``CFLAGS`` environment variable is 1909 defined, don't override ``CFLAGS`` variable with the ``OPT`` variable 1910 anymore. Initial patch written by David Malcolm. 1911 1912- bpo-35125: Asyncio: Remove inner callback on outer cancellation in shield 1913 1914- bpo-35802: Clean up code which checked presence of ``os.stat`` / 1915 ``os.lstat`` / ``os.chmod`` which are always present. Patch by Anthony 1916 Sottile. 1917 1918- bpo-23078: Add support for :func:`classmethod` and :func:`staticmethod` to 1919 :func:`unittest.mock.create_autospec`. Initial patch by Felipe Ochoa. 1920 1921- bpo-35721: Fix :meth:`asyncio.SelectorEventLoop.subprocess_exec()` leaks 1922 file descriptors if ``Popen`` fails and called with 1923 ``stdin=subprocess.PIPE``. Patch by Niklas Fiekas. 1924 1925- bpo-35726: QueueHandler.prepare() now makes a copy of the record before 1926 modifying and enqueueing it, to avoid affecting other handlers in the 1927 chain. 1928 1929- bpo-31855: :func:`unittest.mock.mock_open` results now respects the 1930 argument of read([size]). Patch contributed by Rémi Lapeyre. 1931 1932- bpo-35082: Don't return deleted attributes when calling dir on a 1933 :class:`unittest.mock.Mock`. 1934 1935- bpo-34547: :class:`wsgiref.handlers.BaseHandler` now handles abrupt client 1936 connection terminations gracefully. Patch by Petter Strandmark. 1937 1938- bpo-34424: Fix serialization of messages containing encoded strings when 1939 the policy.linesep is set to a multi-character string. Patch by Jens 1940 Troeger. 1941 1942- bpo-33361: Fix a bug in :class:`codecs.StreamRecoder` where seeking might 1943 leave old data in a buffer and break subsequent read calls. Patch by Ammar 1944 Askar. 1945 1946- bpo-31922: :meth:`asyncio.AbstractEventLoop.create_datagram_endpoint`: Do 1947 not connect UDP socket when broadcast is allowed. This allows to receive 1948 replies after a UDP broadcast. 1949 1950- bpo-22102: Added support for ZIP files with disks set to 0. Such files are 1951 commonly created by builtin tools on Windows when use ZIP64 extension. 1952 Patch by Francisco Facioni. 1953 1954- bpo-27141: Added a ``__copy__()`` to ``collections.UserList`` and 1955 ``collections.UserDict`` in order to correctly implement shallow copying 1956 of the objects. Patch by Bar Harel. 1957 1958- bpo-31829: ``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) are now 1959 escaped in protocol 0 pickles of Unicode strings. This allows to load them 1960 without loss from files open in text mode in Python 2. 1961 1962- bpo-31292: Fix ``setup.py check --restructuredtext`` for files containing 1963 ``include`` directives. 1964 1965- bpo-23395: ``_thread.interrupt_main()`` now avoids setting the Python 1966 error status if the ``SIGINT`` signal is ignored or not handled by Python. 1967 1968Documentation 1969------------- 1970 1971- bpo-34903: Documented that in :meth:`datetime.datetime.strptime()`, the 1972 leading zero in some two-digit formats is optional. Patch by Mike Gleen. 1973 1974- bpo-36984: Improve version added references in ``typing`` module - by 1975 Anthony Sottile. 1976 1977- bpo-36868: What's new now mentions SSLContext.hostname_checks_common_name 1978 instead of SSLContext.host_flags. 1979 1980- bpo-36783: Added C API Documentation for Time_FromTimeAndFold and 1981 PyDateTime_FromDateAndTimeAndFold as per PEP 495. Patch by Edison 1982 Abahurire. 1983 1984- bpo-30840: Document relative imports 1985 1986- bpo-36523: Add docstring for io.IOBase.writelines(). 1987 1988- bpo-36425: New documentation translation: `Simplified Chinese 1989 <https://docs.python.org/zh-cn/>`_. 1990 1991- bpo-36157: Added Documention for PyInterpreterState_Main(). 1992 1993- bpo-36138: Improve documentation about converting datetime.timedelta to 1994 scalars. 1995 1996- bpo-22865: Add detail to the documentation on the `pty.spawn` function. 1997 1998- bpo-35581: @typing.type_check_only now allows type stubs to mark functions 1999 and classes not available during runtime. 2000 2001- bpo-35564: Explicitly set master_doc variable in conf.py for compliance 2002 with Sphinx 2.0 2003 2004- bpo-10536: Enhance the gettext docs. Patch by Éric Araujo 2005 2006- bpo-32995: Added the context variable in glossary. 2007 2008- bpo-33832: Add glossary entry for 'magic method'. 2009 2010- bpo-33482: Make `codecs.StreamRecoder.writelines` take a list of bytes. 2011 2012- bpo-25735: Added documentation for func factorial to indicate that returns 2013 integer values 2014 2015Tests 2016----- 2017 2018- bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() 2019 2020- bpo-37153: ``test_venv.test_mutiprocessing()`` now explicitly calls 2021 ``pool.terminate()`` to wait until the pool completes. 2022 2023- bpo-37081: Test with OpenSSL 1.1.1c 2024 2025- bpo-36915: The main regrtest process now always removes all temporary 2026 directories of worker processes even if they crash or if they are killed 2027 on KeyboardInterrupt (CTRL+c). 2028 2029- bpo-36719: "python3 -m test -jN ..." now continues the execution of next 2030 tests when a worker process crash (CHILD_ERROR state). Previously, the 2031 test suite stopped immediately. Use --failfast to stop at the first error. 2032 2033- bpo-36816: Update Lib/test/selfsigned_pythontestdotnet.pem to match 2034 self-signed.pythontest.net's new TLS certificate. 2035 2036- bpo-35925: Skip httplib and nntplib networking tests when they would 2037 otherwise fail due to a modern OS or distro with a default OpenSSL policy 2038 of rejecting connections to servers with weak certificates. 2039 2040- bpo-36719: regrtest now always detects uncollectable objects. Previously, 2041 the check was only enabled by ``--findleaks``. The check now also works 2042 with ``-jN/--multiprocess N``. ``--findleaks`` becomes a deprecated alias 2043 to ``--fail-env-changed``. 2044 2045- bpo-36725: When using mulitprocessing mode (-jN), regrtest now better 2046 reports errors if a worker process fails, and it exits immediately on a 2047 worker thread failure or when interrupted. 2048 2049- bpo-36454: Change test_time.test_monotonic() to test only the lower bound 2050 of elapsed time after a sleep command rather than the upper bound. This 2051 prevents unnecessary test failures on slow buildbots. Patch by Victor 2052 Stinner. 2053 2054- bpo-36629: Fix ``test_imap4_host_default_value()`` of ``test_imaplib``: 2055 catch also :data:`errno.ENETUNREACH` error. 2056 2057- bpo-36611: Fix ``test_sys.test_getallocatedblocks()`` when 2058 :mod:`tracemalloc` is enabled. 2059 2060- bpo-36560: Fix reference leak hunting in regrtest: compute also deltas (of 2061 reference count, allocated memory blocks, file descriptor count) during 2062 warmup, to ensure that everything is initialized before starting to hunt 2063 reference leaks. 2064 2065- bpo-36565: Fix reference hunting (``python3 -m test -R 3:3``) when Python 2066 has no built-in abc module. 2067 2068- bpo-36436: Fix ``_testcapi.pymem_buffer_overflow()``: handle memory 2069 allocation failure. 2070 2071Build 2072----- 2073 2074- bpo-36605: ``make tags`` and ``make TAGS`` now also parse 2075 ``Modules/_io/*.c`` and ``Modules/_io/*.h``. 2076 2077- bpo-36508: ``python-config --ldflags`` no longer includes flags of the 2078 ``LINKFORSHARED`` variable. The ``LINKFORSHARED`` variable must only be 2079 used to build executables. 2080 2081Windows 2082------- 2083 2084- bpo-34631: Updated OpenSSL to 1.1.1c in Windows installer 2085 2086- bpo-37267: On Windows, :func:`os.dup` no longer creates an inheritable fd 2087 when handling a character file. 2088 2089- bpo-36779: Ensure ``time.tzname`` is correct on Windows when the active 2090 code page is set to CP_UTF7 or CP_UTF8. 2091 2092- bpo-36965: include of STATUS_CONTROL_C_EXIT without depending on MSC 2093 compiler 2094 2095- bpo-36649: Remove trailing spaces for registry keys when installed via the 2096 Store. 2097 2098- bpo-34144: Fixed activate.bat to correctly update codepage when chcp.com 2099 returns dots in output. Patch by Lorenz Mende. 2100 2101- bpo-35941: enum_certificates function of the ssl module now returns 2102 certificates from all available certificate stores inside windows in a 2103 query instead of returning only certificates from the system wide 2104 certificate store. This includes certificates from these certificate 2105 stores: local machine, local machine enterprise, local machine group 2106 policy, current user, current user group policy, services, users. 2107 ssl.enum_crls() function is changed in the same way to return all 2108 certificate revocation lists inside the windows certificate revocation 2109 list stores. 2110 2111- bpo-36441: Fixes creating a venv when debug binaries are installed. 2112 2113- bpo-36312: Fixed decoders for the following code pages: 50220, 50221, 2114 50222, 50225, 50227, 50229, 57002 through 57011, 65000 and 42. 2115 2116- bpo-36010: Add the venv standard library module to the nuget distribution 2117 for Windows. 2118 2119- bpo-34060: Report system load when running test suite on Windows. Patch by 2120 Ammar Askar. Based on prior work by Jeremy Kloth. 2121 2122macOS 2123----- 2124 2125- bpo-35360: Update macOS installer to use SQLite 3.28.0. 2126 2127- bpo-34631: Updated OpenSSL to 1.1.1c in macOS installer. 2128 2129- bpo-36231: Support building Python on macOS without /usr/include 2130 installed. As of macOS 10.14, system header files are only available 2131 within an SDK provided by either the Command Line Tools or the Xcode app. 2132 2133- bpo-34602: Avoid failures setting macOS stack resource limit with 2134 resource.setrlimit. This reverts an earlier fix for bpo-18075 which forced 2135 a non-default stack size when building the interpreter executable on 2136 macOS. 2137 2138IDLE 2139---- 2140 2141- bpo-37321: Both subprocess connection error messages now refer to the 2142 'Startup failure' section of the IDLE doc. 2143 2144- bpo-37177: Properly 'attach' search dialogs to their main window so that 2145 they behave like other dialogs and do not get hidden behind their main 2146 window. 2147 2148- bpo-37039: Adjust "Zoom Height" to individual screens by momemtarily 2149 maximizing the window on first use with a particular screen. Changing 2150 screen settings may invalidate the saved height. While a window is 2151 maximized, "Zoom Height" has no effect. 2152 2153- bpo-35763: Make calltip reminder about '/' meaning positional-only less 2154 obtrusive by only adding it when there is room on the first line. 2155 2156- bpo-5680: Add 'Run... Customized' to the Run menu to run a module with 2157 customized settings. Any 'command line arguments' entered are added to 2158 sys.argv. One can suppress the normal Shell main module restart. 2159 2160- bpo-35610: Replace now redundant .context_use_ps1 with .prompt_last_line. 2161 This finishes change started in bpo-31858. 2162 2163- bpo-37038: Make idlelib.run runnable; add test clause. 2164 2165- bpo-36958: Print any argument other than None or int passed to SystemExit 2166 or sys.exit(). 2167 2168- bpo-13102: When saving a file, call os.fsync() so bits are flushed to e.g. 2169 USB drive. 2170 2171- bpo-36429: Fix starting IDLE with pyshell. Add idlelib.pyshell alias at 2172 top; remove pyshell alias at bottom. Remove obsolete __name__=='__main__' 2173 command. 2174 2175- bpo-36405: Use dict unpacking in idlelib. 2176 2177- bpo-36396: Remove fgBg param of idlelib.config.GetHighlight(). This param 2178 was only used twice and changed the return type. 2179 2180- bpo-23205: For the grep module, add tests for findfiles, refactor 2181 findfiles to be a module-level function, and refactor findfiles to use 2182 os.walk. 2183 2184- bpo-23216: Add docstrings to IDLE search modules. 2185 2186- bpo-30348: Increase test coverage of idlelib.autocomplete by 30%. 2187 2188- bpo-32411: In browser.py, remove extraneous sorting by line number since 2189 dictionary was created in line number order. 2190 2191Tools/Demos 2192----------- 2193 2194- bpo-14546: Fix the argument handling in Tools/scripts/lll.py. 2195 2196- bpo-32217: Fix freeze script on Windows. 2197 2198C API 2199----- 2200 2201- bpo-28805: The :const:`METH_FASTCALL` calling convention has been 2202 documented. 2203 2204- bpo-37170: Fix the cast on error in 2205 :c:func:`PyLong_AsUnsignedLongLongMask()`. 2206 2207- bpo-36389: Change the value of ``CLEANBYTE``, ``DEADDYTE`` and 2208 ``FORBIDDENBYTE`` internal constants used by debug hooks on Python memory 2209 allocators (:c:func:`PyMem_SetupDebugHooks` function). Byte patterns 2210 ``0xCB``, ``0xDB`` and ``0xFB`` have been replaced with ``0xCD``, ``0xDD`` 2211 and ``0xFD`` to use the same values than Windows CRT debug ``malloc()`` 2212 and ``free()``. 2213 2214 2215What's New in Python 3.7.3 final? 2216================================= 2217 2218*Release date: 2019-03-25* 2219 2220There were no new changes in version 3.7.3. 2221 2222 2223 2224What's New in Python 3.7.3 release candidate 1? 2225=============================================== 2226 2227*Release date: 2019-03-12* 2228 2229Security 2230-------- 2231 2232- bpo-36216: Changes urlsplit() to raise ValueError when the URL contains 2233 characters that decompose under IDNA encoding (NFKC-normalization) into 2234 characters that affect how the URL is parsed. 2235 2236- bpo-35746: [CVE-2019-5010] Fix a NULL pointer deref in ssl module. The 2237 cert parser did not handle CRL distribution points with empty DP or URI 2238 correctly. A malicious or buggy certificate can result into segfault. 2239 Vulnerability (TALOS-2018-0758) reported by Colin Read and Nicolas Edet of 2240 Cisco. 2241 2242- bpo-35121: Don't send cookies of domain A without Domain attribute to 2243 domain B when domain A is a suffix match of domain B while using a 2244 cookiejar with :class:`http.cookiejar.DefaultCookiePolicy` policy. Patch 2245 by Karthikeyan Singaravelan. 2246 2247Core and Builtins 2248----------------- 2249 2250- bpo-35942: The error message emitted when returning invalid types from 2251 ``__fspath__`` in interfaces that allow passing :class:`~os.PathLike` 2252 objects has been improved and now it does explain the origin of the error. 2253 2254- bpo-35992: Fix ``__class_getitem__()`` not being called on a class with a 2255 custom non-subscriptable metaclass. 2256 2257- bpo-35991: Fix a potential double free in Modules/_randommodule.c. 2258 2259- bpo-35961: Fix a crash in slice_richcompare(): use strong references 2260 rather than stolen references for the two temporary internal tuples. 2261 2262- bpo-31506: Clarify the errors reported when ``object.__new__`` and 2263 ``object.__init__`` receive more than one argument. Contributed by Sanyam 2264 Khurana. 2265 2266- bpo-35720: Fixed a minor memory leak in pymain_parse_cmdline_impl function 2267 in Modules/main.c 2268 2269- bpo-35623: Fix a crash when sorting very long lists. Patch by Stephan 2270 Hohe. 2271 2272- bpo-35214: clang Memory Sanitizer build instrumentation was added to work 2273 around false positives from posix, socket, time, test_io, and 2274 test_faulthandler. 2275 2276- bpo-35560: Fix an assertion error in :func:`format` in debug build for 2277 floating point formatting with "n" format, zero padding and small width. 2278 Release build is not impacted. Patch by Karthikeyan Singaravelan. 2279 2280- bpo-35552: Format characters ``%s`` and ``%V`` in 2281 :c:func:`PyUnicode_FromFormat` and ``%s`` in :c:func:`PyBytes_FromFormat` 2282 no longer read memory past the limit if *precision* is specified. 2283 2284- bpo-35504: Fix segfaults and :exc:`SystemError`\ s when deleting certain 2285 attributes. Patch by Zackery Spytz. 2286 2287- bpo-33989: Fix a possible crash in :meth:`list.sort` when sorting objects 2288 with ``ob_type->tp_richcompare == NULL``. Patch by Zackery Spytz. 2289 2290Library 2291------- 2292 2293- bpo-35931: The :mod:`pdb` ``debug`` command now gracefully handles all 2294 exceptions. 2295 2296- bpo-36251: Fix format strings used for stderrprinter and re.Match reprs. 2297 Patch by Stephan Hohe. 2298 2299- bpo-35807: Update ensurepip to install pip 19.0.3 and setuptools 40.8.0. 2300 2301- bpo-36179: Fix two unlikely reference leaks in _hashopenssl. The leaks 2302 only occur in out-of-memory cases. 2303 2304- bpo-35178: Ensure custom :func:`warnings.formatwarning` function can 2305 receive `line` as positional argument. Based on patch by Tashrif Billah. 2306 2307- bpo-36106: Resolve potential name clash with libm's sinpi(). Patch by 2308 Dmitrii Pasechnik. 2309 2310- bpo-35512: :func:`unittest.mock.patch.dict` used as a decorator with 2311 string target resolves the target during function call instead of during 2312 decorator construction. Patch by Karthikeyan Singaravelan. 2313 2314- bpo-36091: Clean up reference to async generator in Lib/types. Patch by 2315 Henry Chen. 2316 2317- bpo-35899: Enum has been fixed to correctly handle empty strings and 2318 strings with non-Latin characters (ie. 'α', 'א') without crashing. 2319 Original patch contributed by Maxwell. Assisted by Stéphane Wirtel. 2320 2321- bpo-35918: Removed broken ``has_key`` method from 2322 multiprocessing.managers.SyncManager.dict. Contributed by Rémi Lapeyre. 2323 2324- bpo-35960: Fix :func:`dataclasses.field` throwing away empty mapping 2325 objects passed as metadata. 2326 2327- bpo-35847: RISC-V needed the CTYPES_PASS_BY_REF_HACK. Fixes ctypes 2328 Structure test_pass_by_value. 2329 2330- bpo-35780: Fix lru_cache() errors arising in recursive, reentrant, or 2331 multi-threaded code. These errors could result in orphan links and in the 2332 cache being trapped in a state with fewer than the specified maximum 2333 number of links. Fix handling of negative maxsize which should have been 2334 treated as zero. Fix errors in toggling the "full" status flag. Fix 2335 misordering of links when errors are encountered. Sync-up the C code and 2336 pure Python code for the space saving path in functions with a single 2337 positional argument. In this common case, the space overhead of an lru 2338 cache entry is reduced by almost half. Fix counting of cache misses. In 2339 error cases, the miss count was out of sync with the actual number of 2340 times the underlying user function was called. 2341 2342- bpo-23846: :class:`asyncio.ProactorEventLoop` now catches and logs send 2343 errors when the self-pipe is full. 2344 2345- bpo-34323: :mod:`asyncio`: Enhance ``IocpProactor.close()`` log: wait 1 2346 second before the first log, then log every second. Log also the number of 2347 seconds since ``close()`` was called. 2348 2349- bpo-34294: re module, fix wrong capturing groups in rare cases. 2350 :func:`re.search`, :func:`re.findall`, :func:`re.sub` and other functions 2351 that scan through string looking for a match, should reset capturing 2352 groups between two match attempts. Patch by Ma Lin. 2353 2354- bpo-35717: Fix KeyError exception raised when using enums and compile. 2355 Patch contributed by Rémi Lapeyre. 2356 2357- bpo-35699: Fixed detection of Visual Studio Build Tools 2017 in distutils 2358 2359- bpo-32710: Fix memory leaks in asyncio ProactorEventLoop on overlapped 2360 operation failure. 2361 2362- bpo-32710: Fix a memory leak in asyncio in the ProactorEventLoop when 2363 ``ReadFile()`` or ``WSASend()`` overlapped operation fail immediately: 2364 release the internal buffer. 2365 2366- bpo-35682: Fix ``asyncio.ProactorEventLoop.sendfile()``: don't attempt to 2367 set the result of an internal future if it's already done. 2368 2369- bpo-35283: Add a pending deprecated warning for the 2370 :meth:`threading.Thread.isAlive` method. Patch by Dong-hee Na. 2371 2372- bpo-35643: Fixed a SyntaxWarning: invalid escape sequence in 2373 Modules/_sha3/cleanup.py. Patch by Mickaël Schoentgen. 2374 2375- bpo-35615: :mod:`weakref`: Fix a RuntimeError when copying a 2376 WeakKeyDictionary or a WeakValueDictionary, due to some keys or values 2377 disappearing while iterating. 2378 2379- bpo-28503: The `crypt` module now internally uses the `crypt_r()` library 2380 function instead of `crypt()` when available. 2381 2382- bpo-35121: Don't set cookie for a request when the request path is a 2383 prefix match of the cookie's path attribute but doesn't end with "/". 2384 Patch by Karthikeyan Singaravelan. 2385 2386- bpo-35585: Speed-up building enums by value, e.g. http.HTTPStatus(200). 2387 2388- bpo-21478: Calls to a child function created with 2389 :func:`unittest.mock.create_autospec` should propagate to the parent. 2390 Patch by Karthikeyan Singaravelan. 2391 2392- bpo-35513: :class:`~unittest.runner.TextTestRunner` of 2393 :mod:`unittest.runner` now uses :func:`time.perf_counter` rather than 2394 :func:`time.time` to measure the execution time of a test: 2395 :func:`time.time` can go backwards, whereas :func:`time.perf_counter` is 2396 monotonic. 2397 2398- bpo-35502: Fixed reference leaks in 2399 :class:`xml.etree.ElementTree.TreeBuilder` in case of unfinished building 2400 of the tree (in particular when an error was raised during parsing XML). 2401 2402- bpo-31446: Copy command line that was passed to CreateProcessW since this 2403 function can change the content of the input buffer. 2404 2405- bpo-20239: Allow repeated assignment deletion of 2406 :class:`unittest.mock.Mock` attributes. Patch by Pablo Galindo. 2407 2408- bpo-17185: Set ``__signature__`` on mock for :mod:`inspect` to get 2409 signature. Patch by Karthikeyan Singaravelan. 2410 2411- bpo-10496: :func:`~distutils.utils.check_environ` of 2412 :mod:`distutils.utils` now catches :exc:`KeyError` on calling 2413 :func:`pwd.getpwuid`: don't create the ``HOME`` environment variable in 2414 this case. 2415 2416- bpo-35066: Previously, calling the strftime() method on a datetime object 2417 with a trailing '%' in the format string would result in an exception. 2418 However, this only occured when the datetime C module was being used; the 2419 python implementation did not match this behavior. Datetime is now PEP-399 2420 compliant, and will not throw an exception on a trailing '%'. 2421 2422- bpo-24746: Avoid stripping trailing whitespace in doctest fancy diff. 2423 Orignial patch by R. David Murray & Jairo Trad. Enhanced by Sanyam 2424 Khurana. 2425 2426- bpo-35198: Fix C++ extension compilation on AIX 2427 2428- bpo-28441: On Cygwin and MinGW, ensure that ``sys.executable`` always 2429 includes the full filename in the path, including the ``.exe`` suffix 2430 (unless it is a symbolic link). 2431 2432- bpo-34572: Fix C implementation of pickle.loads to use importlib's locking 2433 mechanisms, and thereby avoid using partially-loaded modules. Patch by Tim 2434 Burgess. 2435 2436- bpo-33687: Fix the call to ``os.chmod()`` for ``uu.decode()`` if a mode is 2437 given or decoded. Patch by Timo Furrer. 2438 2439- bpo-32146: Document the interaction between frozen executables and the 2440 spawn and forkserver start methods in multiprocessing. 2441 2442Documentation 2443------------- 2444 2445- bpo-36083: Fix formatting of --check-hash-based-pycs options in the 2446 manpage Synopsis. 2447 2448- bpo-34764: Improve example of iter() with 2nd sentinel argument. 2449 2450- bpo-21314: A new entry was added to the Core Language Section of the 2451 Programming FAQ, which explaines the usage of slash(/) in the signature of 2452 a function. Patch by Lysandros Nikolaou 2453 2454- bpo-22062: Update documentation and docstrings for pathlib. Original patch 2455 by Mike Short. 2456 2457Tests 2458----- 2459 2460- bpo-36234: test_posix.PosixUidGidTests: add tests for invalid uid/gid type 2461 (str). Initial patch written by David Malcolm. 2462 2463- bpo-29571: Fix ``test_re.test_locale_flag()``: use 2464 ``locale.getpreferredencoding()`` rather than ``locale.getlocale()`` to 2465 get the locale encoding. With some locales, ``locale.getlocale()`` returns 2466 the wrong encoding. On Windows, set temporarily the ``LC_CTYPE`` locale to 2467 the user preferred encoding to ensure that it uses the ANSI code page, to 2468 be consistent with ``locale.getpreferredencoding()``. 2469 2470- bpo-36123: Fix race condition in test_socket. 2471 2472- bpo-27313: Avoid test_ttk_guionly ComboboxTest failure with macOS Cocoa 2473 Tk. 2474 2475- bpo-36019: Add test.support.TEST_HTTP_URL and replace references of 2476 http://www.example.com by this new constant. Contributed by Stéphane 2477 Wirtel. 2478 2479- bpo-36037: Fix test_ssl for strict OpenSSL configuration like RHEL8 strict 2480 crypto policy. Use older TLS version for minimum TLS version of the server 2481 SSL context if needed, to test TLS version older than default minimum TLS 2482 version. 2483 2484- bpo-35505: Make test_imap4_host_default_value independent on whether the 2485 local IMAP server is running. 2486 2487- bpo-35917: multiprocessing: provide unit tests for SyncManager and 2488 SharedMemoryManager classes + all the shareable types which are supposed 2489 to be supported by them. (patch by Giampaolo Rodola) 2490 2491- bpo-35772: Fix sparse file tests of test_tarfile on ppc64 with the tmpfs 2492 filesystem. Fix the function testing if the filesystem supports sparse 2493 files: create a file which contains data and "holes", instead of creating 2494 a file which contains no data. tmpfs effective block size is a page size 2495 (tmpfs lives in the page cache). RHEL uses 64 KiB pages on aarch64, ppc64, 2496 ppc64le, only s390x and x86_64 use 4 KiB pages, whereas the test punch 2497 holes of 4 KiB. 2498 2499- bpo-35045: Make ssl tests less strict and also accept TLSv1 as system 2500 default. The changes unbreaks test_min_max_version on Fedora 29. 2501 2502- bpo-31731: Fix a race condition in ``check_interrupted_write()`` of 2503 test_io: create directly the thread with SIGALRM signal blocked, rather 2504 than blocking the signal later from the thread. Previously, it was 2505 possible that the thread gets the signal before the signal is blocked. 2506 2507- bpo-35424: Fix test_multiprocessing_main_handling: use 2508 :class:`multiprocessing.Pool` with a context manager and then explicitly 2509 join the pool. 2510 2511- bpo-35519: Rename :mod:`test.bisect` module to :mod:`test.bisect_cmd` to 2512 avoid conflict with :mod:`bisect` module when running directly a test like 2513 ``./python Lib/test/test_xmlrpc.py``. 2514 2515- bpo-35513: Replace :func:`time.time` with :func:`time.monotonic` in tests 2516 to measure time delta. 2517 2518- bpo-34279: :func:`test.support.run_unittest` no longer raise 2519 :exc:`TestDidNotRun` if the test result contains skipped tests. The 2520 exception is now only raised if no test have been run and no test have 2521 been skipped. 2522 2523- bpo-35412: Add testcase to ``test_future4``: check unicode literal. 2524 2525- bpo-26704: Added test demonstrating double-patching of an instance method. 2526 Patch by Anthony Sottile. 2527 2528Build 2529----- 2530 2531- bpo-34691: The _contextvars module is now built into the core Python 2532 library on Windows. 2533 2534- bpo-35683: Improved Azure Pipelines build steps and now verifying layouts 2535 correctly 2536 2537- bpo-35642: Remove asynciomodule.c from pythoncore.vcxproj 2538 2539- bpo-35550: Fix incorrect Solaris #ifdef checks to look for __sun && __SVR4 2540 instead of sun when compiling. 2541 2542Windows 2543------- 2544 2545- bpo-24643: Fix name collisions due to ``#define timezone _timezone`` in 2546 PC/pyconfig.h. 2547 2548- bpo-35692: ``pathlib`` no longer raises when checking file and directory 2549 existence on drives that are not ready 2550 2551- bpo-35872: Uses the base Python executable when invoking venv in a virtual 2552 environment 2553 2554- bpo-35873: Prevents venv paths being inherited by child processes 2555 2556- bpo-35299: Fix sysconfig detection of the source directory and distutils 2557 handling of pyconfig.h during PGO profiling 2558 2559- bpo-32560: The ``py`` launcher now forwards its ``STARTUPINFO`` structure 2560 to child processes. 2561 2562- bpo-35854: Fix EnvBuilder and --symlinks in venv on Windows 2563 2564- bpo-35811: Avoid propagating venv settings when launching via py.exe 2565 2566- bpo-35797: Fix default executable used by the multiprocessing module 2567 2568- bpo-29734: Fix handle leaks in os.stat on Windows. 2569 2570- bpo-35596: Use unchecked PYCs for the embeddable distro to avoid zipimport 2571 restrictions. 2572 2573- bpo-35596: Fix vcruntime140.dll being added to embeddable distro multiple 2574 times. 2575 2576- bpo-35402: Update Windows build to use Tcl and Tk 8.6.9 2577 2578- bpo-33316: PyThread_release_lock always fails 2579 2580- bpo-1104: Correctly handle string length in 2581 ``msilib.SummaryInfo.GetProperty()`` to prevent it from truncating the 2582 last character. 2583 2584IDLE 2585---- 2586 2587- bpo-36176: Fix IDLE autocomplete & calltip popup colors. Prevent conflicts 2588 with Linux dark themes (and slightly darken calltip background). 2589 2590- bpo-36152: Remove colorizer.ColorDelegator.close_when_done and the 2591 corresponding argument of .close(). In IDLE, both have always been None 2592 or False since 2007. 2593 2594- bpo-32129: Avoid blurry IDLE application icon on macOS with Tk 8.6. Patch 2595 by Kevin Walzer. 2596 2597- bpo-24310: IDLE -- Document settings dialog font tab sample. 2598 2599- bpo-36096: Refactor class variables to instance variables in colorizer. 2600 2601- bpo-35833: Revise IDLE doc for control codes sent to Shell. Add a code 2602 example block. 2603 2604- bpo-35770: IDLE macosx deletes Options => Configure IDLE. It previously 2605 deleted Window => Zoom Height by mistake. (Zoom Height is now on the 2606 Options menu). On Mac, the settings dialog is accessed via Preferences on 2607 the IDLE menu. 2608 2609- bpo-35769: Change IDLE's new file name from 'Untitled' to 'untitled' 2610 2611- bpo-35689: Add docstrings and unittests for colorizer.py. 2612 2613- bpo-35660: Fix imports in idlelib.window. 2614 2615- bpo-35641: Proper format `calltip` when the function has no docstring. 2616 2617- bpo-33987: Use ttk Frame for ttk widgets. 2618 2619- bpo-34055: Fix erroneous 'smart' indents and newlines in IDLE Shell. 2620 2621- bpo-35591: Find Selection now works when selection not found. 2622 2623- bpo-35196: Speed up squeezer line counting. 2624 2625- bpo-35598: Update config_key: use PEP 8 names and ttk widgets, make some 2626 objects global, and add tests. 2627 2628- bpo-28097: Add Previous/Next History entries to Shell menu. 2629 2630- bpo-35208: Squeezer now properly counts wrapped lines before newlines. 2631 2632- bpo-35555: Gray out Code Context menu entry when it's not applicable. 2633 2634- bpo-35521: Document the IDLE editor code context feature. Add some 2635 internal references within the IDLE doc. 2636 2637- bpo-22703: The Code Context menu label now toggles between Show/Hide Code 2638 Context. The Zoom Height menu now toggles between Zoom/Restore Height. 2639 Zoom Height has moved from the Window menu to the Options menu. 2640 2641Tools/Demos 2642----------- 2643 2644- bpo-35132: Fix py-list and py-bt commands of python-gdb.py on gdb7. 2645 2646C API 2647----- 2648 2649- bpo-33817: Fixed :c:func:`_PyBytes_Resize` for empty bytes objects. 2650 2651 2652What's New in Python 3.7.2 final? 2653================================= 2654 2655*Release date: 2018-12-23* 2656 2657Library 2658------- 2659 2660- bpo-31715: Associate ``.mjs`` file extension with 2661 ``application/javascript`` MIME Type. 2662 2663Build 2664----- 2665 2666- bpo-35499: ``make profile-opt`` no longer replaces ``CFLAGS_NODIST`` with 2667 ``CFLAGS``. It now adds profile-guided optimization (PGO) flags to 2668 ``CFLAGS_NODIST``: existing ``CFLAGS_NODIST`` flags are kept. 2669 2670- bpo-35257: Avoid leaking the linker flags from Link Time Optimizations 2671 (LTO) into distutils when compiling C extensions. 2672 2673C API 2674----- 2675 2676- bpo-35259: Conditionally declare :c:func:`Py_FinalizeEx()` (new in 3.6) 2677 based on Py_LIMITED_API. Patch by Arthur Neufeld. 2678 2679 2680What's New in Python 3.7.2 release candidate 1? 2681=============================================== 2682 2683*Release date: 2018-12-11* 2684 2685Security 2686-------- 2687 2688- bpo-34812: The :option:`-I` command line option (run Python in isolated 2689 mode) is now also copied by the :mod:`multiprocessing` and 2690 :mod:`distutils` modules when spawning child processes. Previously, only 2691 :option:`-E` and :option:`-s` options (enabled by :option:`-I`) were 2692 copied. 2693 2694- bpo-34791: The xml.sax and xml.dom.domreg no longer use environment 2695 variables to override parser implementations when 2696 sys.flags.ignore_environment is set by -E or -I arguments. 2697 2698Core and Builtins 2699----------------- 2700 2701- bpo-35444: Fixed error handling in pickling methods when fail to look up 2702 builtin "getattr". 2703 2704- bpo-35436: Fix various issues with memory allocation error handling. 2705 Patch by Zackery Spytz. 2706 2707- bpo-35357: Internal attributes' names of unittest.mock._Call and 2708 unittest.mock.MagicProxy (name, parent & from_kall) are now prefixed with 2709 _mock_ in order to prevent clashes with widely used object attributes. 2710 Fixed minor typo in test function name. 2711 2712- bpo-35372: Fixed the code page decoder for input longer than 2 GiB 2713 containing undecodable bytes. 2714 2715- bpo-35336: Fix PYTHONCOERCECLOCALE=1 environment variable: only coerce the 2716 C locale if the LC_CTYPE locale is "C". 2717 2718- bpo-33954: For :meth:`str.format`, :meth:`float.__format__` and 2719 :meth:`complex.__format__` methods for non-ASCII decimal point when using 2720 the "n" formatter. 2721 2722- bpo-35269: Fix a possible segfault involving a newly-created coroutine. 2723 Patch by Zackery Spytz. 2724 2725- bpo-35214: Fixed an out of bounds memory access when parsing a truncated 2726 unicode escape sequence at the end of a string such as ``'\N'``. It would 2727 read one byte beyond the end of the memory allocation. 2728 2729- bpo-35214: The interpreter and extension modules have had annotations 2730 added so that they work properly under clang's Memory Sanitizer. A new 2731 configure flag --with-memory-sanitizer has been added to make test builds 2732 of this nature easier to perform. 2733 2734- bpo-35193: Fix an off by one error in the bytecode peephole optimizer 2735 where it could read bytes beyond the end of bounds of an array when 2736 removing unreachable code. This bug was present in every release of Python 2737 3.6 and 3.7 until now. 2738 2739- bpo-29341: Clarify in the docstrings of :mod:`os` methods that path-like 2740 objects are also accepted as input parameters. 2741 2742- bpo-35050: :mod:`socket`: Fix off-by-one bug in length check for 2743 ``AF_ALG`` name and type. 2744 2745- bpo-34974: :class:`bytes` and :class:`bytearray` constructors no longer 2746 convert unexpected exceptions (e.g. :exc:`MemoryError` and 2747 :exc:`KeyboardInterrupt`) to :exc:`TypeError`. 2748 2749- bpo-34973: Fixed crash in :func:`bytes` when the :class:`list` argument is 2750 mutated while it is iterated. 2751 2752- bpo-34824: Fix a possible null pointer dereference in Modules/_ssl.c. 2753 Patch by Zackery Spytz. 2754 2755- bpo-1621: Do not assume signed integer overflow behavior (C undefined 2756 behavior) when performing set hash table resizing. 2757 2758Library 2759------- 2760 2761- bpo-35052: Fix xml.dom.minidom cloneNode() on a document with an entity: 2762 pass the correct arguments to the user data handler of an entity. 2763 2764- bpo-35330: When a :class:`Mock` instance was used to wrap an object, if 2765 `side_effect` is used in one of the mocks of it methods, don't call the 2766 original implementation and return the result of using the side effect the 2767 same way that it is done with return_value. 2768 2769- bpo-34172: Revert the fix for this issue previously released in 3.7.1 2770 pending further investigation: Fix a reference issue inside 2771 multiprocessing.Pool that caused the pool to remain alive if it was 2772 deleted without being closed or terminated explicitly. 2773 2774- bpo-10496: :func:`posixpath.expanduser` now returns the input *path* 2775 unchanged if the ``HOME`` environment variable is not set and the current 2776 user has no home directory (if the current user identifier doesn't exist 2777 in the password database). This change fix the :mod:`site` module if the 2778 current user doesn't exist in the password database (if the user has no 2779 home directory). 2780 2781- bpo-35310: Fix a bug in :func:`select.select` where, in some cases, the 2782 file descriptor sequences were returned unmodified after a signal 2783 interruption, even though the file descriptors might not be ready yet. 2784 :func:`select.select` will now always return empty lists if a timeout has 2785 occurred. Patch by Oran Avraham. 2786 2787- bpo-35380: Enable TCP_NODELAY on Windows for proactor asyncio event loop. 2788 2789- bpo-35341: Add generic version of ``collections.OrderedDict`` to the 2790 ``typing`` module. Patch by Ismo Toijala. 2791 2792- bpo-35371: Fixed possible crash in ``os.utime()`` on Windows when pass 2793 incorrect arguments. 2794 2795- bpo-27903: Fix ``ResourceWarning`` in :func:`platform.dist` on SuSE and 2796 Caldera OpenLinux. Patch by Ville Skyttä. 2797 2798- bpo-35308: Fix regression in ``webbrowser`` where default browsers may be 2799 preferred over browsers in the ``BROWSER`` environment variable. 2800 2801- bpo-28604: :func:`locale.localeconv` now sets temporarily the ``LC_CTYPE`` 2802 locale to the ``LC_MONETARY`` locale if the two locales are different and 2803 monetary strings are non-ASCII. This temporary change affects other 2804 threads. 2805 2806- bpo-35277: Update ensurepip to install pip 18.1 and setuptools 40.6.2. 2807 2808- bpo-35226: Recursively check arguments when testing for equality of 2809 :class:`unittest.mock.call` objects and add note that tracking of 2810 parameters used to create ancestors of mocks in ``mock_calls`` is not 2811 possible. 2812 2813- bpo-29564: The warnings module now suggests to enable tracemalloc if the 2814 source is specified, the tracemalloc module is available, but tracemalloc 2815 is not tracing memory allocations. 2816 2817- bpo-35189: Modify the following fnctl function to retry if interrupted by 2818 a signal (EINTR): flock, lockf, fnctl 2819 2820- bpo-35062: Fix incorrect parsing of 2821 :class:`_io.IncrementalNewlineDecoder`'s *translate* argument. 2822 2823- bpo-35079: Improve difflib.SequenceManager.get_matching_blocks doc by 2824 adding 'non-overlapping' and changing '!=' to '<'. 2825 2826- bpo-35017: :meth:`socketserver.BaseServer.serve_forever` now exits 2827 immediately if it's :meth:`~socketserver.BaseServer.shutdown` method is 2828 called while it is polling for new events. 2829 2830- bpo-31047: Fix ``ntpath.abspath`` regression where it didn't remove a 2831 trailing separator on Windows. Patch by Tim Graham. 2832 2833- bpo-34794: Fixed a leak in Tkinter when pass the Python wrapper around 2834 Tcl_Obj back to Tcl/Tk. 2835 2836- bpo-35008: Fixed references leaks when call the ``__setstate__()`` method 2837 of :class:`xml.etree.ElementTree.Element` in the C implementation for 2838 already initialized element. 2839 2840- bpo-23420: Verify the value for the parameter '-s' of the cProfile CLI. 2841 Patch by Robert Kuska 2842 2843- bpo-33947: dataclasses now handle recursive reprs without raising 2844 RecursionError. 2845 2846- bpo-16965: The :term:`2to3` :2to3fixer:`execfile` fixer now opens the file 2847 with mode ``'rb'``. Patch by Zackery Spytz. 2848 2849- bpo-34966: :mod:`pydoc` now supports aliases not only to methods defined 2850 in the end class, but also to inherited methods. The docstring is not 2851 duplicated for aliases. 2852 2853- bpo-34941: Methods ``find()``, ``findtext()`` and ``findall()`` of the 2854 ``Element`` class in the :mod:`xml.etree.ElementTree` module are now able 2855 to find children which are instances of ``Element`` subclasses. 2856 2857- bpo-34936: Fix ``TclError`` in ``tkinter.Spinbox.selection_element()``. 2858 Patch by Juliette Monsel. 2859 2860- bpo-34866: Adding ``max_num_fields`` to ``cgi.FieldStorage`` to make DOS 2861 attacks harder by limiting the number of ``MiniFieldStorage`` objects 2862 created by ``FieldStorage``. 2863 2864- bpo-34022: The :envvar:`SOURCE_DATE_EPOCH` environment variable no longer 2865 overrides the value of the *invalidation_mode* argument to 2866 :func:`py_compile.compile`, and determines its default value instead. 2867 2868- bpo-34738: ZIP files created by :mod:`distutils` will now include entries 2869 for directories. 2870 2871- bpo-31177: Fix bug that prevented using :meth:`reset_mock 2872 <unittest.mock.Mock.reset_mock>` on mock instances with deleted attributes 2873 2874- bpo-34536: `Enum._missing_`: raise `ValueError` if None returned and 2875 `TypeError` if non-member is returned. 2876 2877- bpo-34604: Fix possible mojibake in the error message of `pwd.getpwnam` 2878 and `grp.getgrnam` using string representation because of invisible 2879 characters or trailing whitespaces. Patch by William Grzybowski. 2880 2881- bpo-34574: OrderedDict iterators are not exhausted during pickling 2882 anymore. Patch by Sergey Fedoseev. 2883 2884- bpo-34052: :meth:`sqlite3.Connection.create_aggregate`, 2885 :meth:`sqlite3.Connection.create_function`, 2886 :meth:`sqlite3.Connection.set_authorizer`, 2887 :meth:`sqlite3.Connection.set_progress_handler` methods raises TypeError 2888 when unhashable objects are passed as callable. These methods now don't 2889 pass such objects to SQLite API. Previous behavior could lead to 2890 segfaults. Patch by Sergey Fedoseev. 2891 2892- bpo-29877: compileall: import ProcessPoolExecutor only when needed, 2893 preventing hangs on low resource platforms 2894 2895- bpo-22005: Implemented unpickling instances of 2896 :class:`~datetime.datetime`, :class:`~datetime.date` and 2897 :class:`~datetime.time` pickled by Python 2. ``encoding='latin1'`` should 2898 be used for successful decoding. 2899 2900Documentation 2901------------- 2902 2903- bpo-35089: Remove mention of ``typing.io`` and ``typing.re``. Their types 2904 should be imported from ``typing`` directly. 2905 2906- bpo-35038: Fix the documentation about an unexisting `f_restricted` 2907 attribute in the frame object. Patch by Stéphane Wirtel 2908 2909- bpo-35044: Fix the documentation with the role ``exc`` for the 2910 appropriated exception. Patch by Stéphane Wirtel 2911 2912- bpo-35035: Rename documentation for :mod:`email.utils` to 2913 ``email.utils.rst``. 2914 2915- bpo-34967: Use app.add_object_type() instead of the deprecated Sphinx 2916 function app.description_unit() 2917 2918- bpo-11233: Create availability directive for documentation. Original 2919 patch by Georg Brandl. 2920 2921- bpo-33594: Document ``getargspec``, ``from_function`` and ``from_builtin`` 2922 as deprecated in their respective docstring, and include version since 2923 deprecation in DeprecationWarning message. 2924 2925- bpo-32613: Update the faq/windows.html to use the py command from PEP 397 2926 instead of python. 2927 2928Tests 2929----- 2930 2931- bpo-33725: test_multiprocessing_fork may crash on recent versions of 2932 macOS. Until the issue is resolved, skip the test on macOS. 2933 2934- bpo-35352: Modify test_asyncio to use the certificate set from the test 2935 directory. 2936 2937- bpo-35317: Fix ``mktime()`` overflow error in ``test_email``: run 2938 ``test_localtime_daylight_true_dst_true()`` and 2939 ``test_localtime_daylight_false_dst_true()`` with a specific timezone. 2940 2941- bpo-21263: After several reports that test_gdb does not work properly on 2942 macOS and since gdb is not shipped by default anymore, test_gdb is now 2943 skipped on macOS when LLVM Clang has been used to compile Python. Patch by 2944 Lysandros Nikolaou 2945 2946- bpo-34279: regrtest issue a warning when no tests have been executed in a 2947 particular test file. Also, a new final result state is issued if no test 2948 have been executed across all test files. Patch by Pablo Galindo. 2949 2950Build 2951----- 2952 2953- bpo-35296: The Windows installer (MSI) now also install internal header 2954 files (``Include/internal/`` subdirectory). 2955 2956- bpo-35351: When building Python with clang and LTO, LTO flags are no 2957 longer passed into CFLAGS to build third-party C extensions through 2958 distutils. 2959 2960- bpo-35139: Fix a compiler error when statically linking `pyexpat` in 2961 `Modules/Setup`. 2962 2963- bpo-35011: Restores the use of pyexpatns.h to isolate our embedded copy of 2964 the expat C library so that its symbols do not conflict at link or dynamic 2965 loading time with an embedding application or other extension modules with 2966 their own version of libexpat. 2967 2968- bpo-28015: Have --with-lto works correctly with clang. 2969 2970- bpo-33015: Fix an undefined behaviour in the pthread implementation of 2971 :c:func:`PyThread_start_new_thread`: add a function wrapper to always 2972 return ``NULL``. 2973 2974Windows 2975------- 2976 2977- bpo-35401: Updates Windows build to OpenSSL 1.1.0j 2978 2979- bpo-34977: venv on Windows will now use a python.exe redirector rather 2980 than copying the actual binaries from the base environment. 2981 2982- bpo-34977: Adds support for building a Windows App Store package 2983 2984- bpo-35067: Remove _distutils_findvs module and use vswhere.exe instead. 2985 2986- bpo-34532: Fixes exit code of list version arguments for py.exe. 2987 2988- bpo-32890: Fix usage of GetLastError() instead of errno in os.execve() and 2989 os.truncate(). 2990 2991macOS 2992----- 2993 2994- bpo-35402: Update macOS installer to use Tcl/Tk 8.6.9.1. [NOTE: This 2995 change was reverted for the released python.org 3.7.2 macOS installers due 2996 to regressions found in Tk 8.6.9.1. For now, the installers provide 2997 Tcl/Tk 8.6.8.] 2998 2999- bpo-35401: Update macOS installer to use OpenSSL 1.1.0j. 3000 3001- bpo-35025: Properly guard the use of the ``CLOCK_GETTIME`` et al. macros 3002 in ``timemodule`` on macOS. 3003 3004- bpo-24658: On macOS, fix reading from and writing into a file with a size 3005 larger than 2 GiB. 3006 3007IDLE 3008---- 3009 3010- bpo-35213: Where appropriate, use 'macOS' in idlelib. 3011 3012- bpo-34864: On macOS, warn if the system preference "Prefer tabs when 3013 opening documents" is set to "Always". 3014 3015- bpo-34864: Document two IDLE on MacOS issues. The System Preferences Dock 3016 "prefer tabs always" setting disables some IDLE features. Menus are a bit 3017 different than as described for Windows and Linux. 3018 3019- bpo-35202: Remove unused imports from lib/idlelib 3020 3021- bpo-33000: Document that IDLE's shell has no line limit. A program that 3022 runs indefinitely can overfill memory. 3023 3024- bpo-23220: Explain how IDLE's Shell displays output. 3025 3026- bpo-35099: Improve the doc about IDLE running user code. The section is 3027 renamed from "IDLE -- console differences" is renamed "Running user code". 3028 It mostly covers the implications of using custom sys.stdxxx objects. 3029 3030- bpo-35097: Add IDLE doc subsection explaining editor windows. Topics 3031 include opening, title and status bar, .py* extension, and running. 3032 3033- bpo-35093: Document the IDLE document viewer in the IDLE doc. Add a 3034 paragraph in "Help and preferences", "Help sources" subsection. 3035 3036- bpo-35088: Update idlelib.help.copy_string docstring. We now use git and 3037 backporting instead of hg and forward merging. 3038 3039- bpo-35087: Update idlelib help files for the current doc build. The main 3040 change is the elimination of chapter-section numbers. 3041 3042Tools/Demos 3043----------- 3044 3045- bpo-34989: python-gdb.py now handles errors on computing the line number 3046 of a Python frame. 3047 3048C API 3049----- 3050 3051- bpo-35322: Fix memory leak in :c:func:`PyUnicode_EncodeLocale` and 3052 :c:func:`PyUnicode_EncodeFSDefault` on error handling. 3053 3054- bpo-35296: ``make install`` now also installs the internal API: 3055 ``Include/internal/*.h`` header files. 3056 3057- bpo-34725: Adds _Py_SetProgramFullPath so embedders may override 3058 sys.executable 3059 3060 3061What's New in Python 3.7.1 final? 3062================================= 3063 3064*Release date: 2018-10-20* 3065 3066Library 3067------- 3068 3069- bpo-34970: Protect tasks weak set manipulation in ``asyncio.all_tasks()`` 3070 3071 3072What's New in Python 3.7.1 release candidate 2? 3073=============================================== 3074 3075*Release date: 2018-10-13* 3076 3077Core and Builtins 3078----------------- 3079 3080- bpo-34879: Fix a possible null pointer dereference in bytesobject.c. 3081 Patch by Zackery Spytz. 3082 3083- bpo-34854: Fixed a crash in compiling string annotations containing a 3084 lambda with a keyword-only argument that doesn't have a default value. 3085 3086- bpo-34320: Fix ``dict(od)`` didn't copy iteration order of OrderedDict. 3087 3088Library 3089------- 3090 3091- bpo-34769: Fix for async generators not finalizing when event loop is in 3092 debug mode and garbage collector runs in another thread. 3093 3094- bpo-34922: Fixed integer overflow in the :meth:`~hashlib.shake.digest()` 3095 and :meth:`~hashlib.shake.hexdigest()` methods for the SHAKE algorithm in 3096 the :mod:`hashlib` module. 3097 3098- bpo-34909: Enum: fix grandchildren subclassing when parent mixed with 3099 concrete data types. 3100 3101- bpo-34900: Fixed :meth:`unittest.TestCase.debug` when used to call test 3102 methods with subtests. Patch by Bruno Oliveira. 3103 3104- bpo-34871: Fix inspect module polluted ``sys.modules`` when parsing 3105 ``__text_signature__`` of callable. 3106 3107- bpo-34872: Fix self-cancellation in C implementation of asyncio.Task 3108 3109- bpo-34819: Use a monotonic clock to compute timeouts in 3110 :meth:`Executor.map` and :func:`as_completed`, in order to prevent 3111 timeouts from deviating when the system clock is adjusted. 3112 3113- bpo-34521: Use :func:`socket.CMSG_SPACE` to calculate ancillary data size 3114 instead of :func:`socket.CMSG_LEN` in 3115 :func:`multiprocessing.reduction.recvfds` as :rfc:`3542` requires the use 3116 of the former for portable applications. 3117 3118- bpo-34334: In :class:`QueueHandler`, clear `exc_text` from 3119 :class:`LogRecord` to prevent traceback from being written twice. 3120 3121- bpo-6721: Acquire the logging module's commonly used internal locks while 3122 fork()ing to avoid deadlocks in the child process. 3123 3124- bpo-34172: Fix a reference issue inside multiprocessing.Pool that caused 3125 the pool to remain alive if it was deleted without being closed or 3126 terminated explicitly. 3127 3128Documentation 3129------------- 3130 3131- bpo-32174: chm document displays non-ASCII charaters properly on some MBCS 3132 Windows systems. 3133 3134Tests 3135----- 3136 3137- bpo-32962: Fixed test_gdb when Python is compiled with flags -mcet 3138 -fcf-protection -O0. 3139 3140macOS 3141----- 3142 3143- bpo-34370: Revert to using the released Tk 8.6.8 with macOS installers 3144 instead of the Tk 8.6.x development snapshot used with 3.7.1rc1 and 3145 3.6.7rc1. The snapshot introduced at least one significant regression 3146 (bpo-34927). 3147 3148C API 3149----- 3150 3151- bpo-34910: Ensure that :c:func:`PyObject_Print` always returns ``-1`` on 3152 error. Patch by Zackery Spytz. 3153 3154 3155What's New in Python 3.7.1 release candidate 1? 3156=============================================== 3157 3158*Release date: 2018-09-26* 3159 3160Security 3161-------- 3162 3163- bpo-17239: The xml.sax and xml.dom.minidom parsers no longer processes 3164 external entities by default. External DTD and ENTITY declarations no 3165 longer load files or create network connections. 3166 3167- bpo-34623: CVE-2018-14647: The C accelerated _elementtree module now 3168 initializes hash randomization salt from _Py_HashSecret instead of 3169 libexpat's default CSPRNG. 3170 3171- bpo-34405: Updated to OpenSSL 1.1.0i for Windows builds. 3172 3173- bpo-33871: Fixed sending the part of the file in :func:`os.sendfile` on 3174 macOS. Using the *trailers* argument could cause sending more bytes from 3175 the input file than was specified. 3176 3177- bpo-32533: Fixed thread-safety of error handling in _ssl. 3178 3179Core and Builtins 3180----------------- 3181 3182- bpo-34783: Fix a crash with musl libc (on Alpine Linux) when the script 3183 filename specified on the command line doesn't exist. 3184 3185- bpo-34762: Fix contextvars C API to use PyObject* pointer types. 3186 3187- bpo-34735: Fix a memory leak in Modules/timemodule.c. Patch by Zackery 3188 Spytz. 3189 3190- bpo-34588: Fix an off-by-one in the recursive call pruning feature of 3191 traceback formatting. 3192 3193- bpo-34485: Standard streams like sys.stdout now use the "surrogateescape" 3194 error handler, instead of "strict", on the POSIX locale (when the C locale 3195 is not coerced and the UTF-8 Mode is disabled). 3196 3197- bpo-34485: Fix the error handler of standard streams like sys.stdout: 3198 PYTHONIOENCODING=":" is now ignored instead of setting the error handler 3199 to "strict". 3200 3201- bpo-34527: On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also 3202 forces the ASCII encoding if the LC_CTYPE locale is "POSIX", not only if 3203 the LC_CTYPE locale is "C". 3204 3205- bpo-34527: The UTF-8 Mode is now also enabled by the "POSIX" locale, not 3206 only by the "C" locale. 3207 3208- bpo-34400: Fix undefined behavior in parsetok.c. Patch by Zackery Spytz. 3209 3210- bpo-34377: Update valgrind suppression list to use 3211 ``_PyObject_Free``/``_PyObject_Realloc`` instead of 3212 ``PyObject_Free``/``PyObject_Realloc``. 3213 3214- bpo-34170: -X dev: it is now possible to override the memory allocator 3215 using PYTHONMALLOC even if the developer mode is enabled. 3216 3217- bpo-34126: Fix crashes when profiling certain invalid calls of unbound 3218 methods. Patch by Jeroen Demeyer. 3219 3220- bpo-24618: Fixed reading invalid memory when create the code object with 3221 too small varnames tuple or too large argument counts. 3222 3223- bpo-34068: In :meth:`io.IOBase.close`, ensure that the 3224 :attr:`~io.IOBase.closed` attribute is not set with a live exception. 3225 Patch by Zackery Spytz and Serhiy Storchaka. 3226 3227- bpo-34087: Fix buffer overflow while converting unicode to numeric values. 3228 3229- bpo-34080: Fixed a memory leak in the compiler when it raised some 3230 uncommon errors during tokenizing. 3231 3232- bpo-34066: Disabled interruption by Ctrl-C between calling ``open()`` and 3233 entering a **with** block in ``with open()``. 3234 3235- bpo-34042: Fix dict.copy() to maintain correct total refcount (as reported 3236 by sys.gettotalrefcount()). 3237 3238- bpo-33985: Implement contextvars.ContextVar.name attribute. 3239 3240- bpo-33956: Update vendored Expat library copy to version 2.2.5. 3241 3242- bpo-24596: Decref the module object in :c:func:`PyRun_SimpleFileExFlags` 3243 before calling :c:func:`PyErr_Print()`. Patch by Zackery Spytz. 3244 3245- bpo-33451: Close directly executed pyc files before calling 3246 ``PyEval_EvalCode()``. 3247 3248- bpo-33824: Fix "LC_ALL=C python3.7 -V": reset properly the command line 3249 parser when the encoding changes after reading the Python configuration. 3250 3251- bpo-25750: Fix rare Python crash due to bad refcounting in 3252 ``type_getattro()`` if a descriptor deletes itself from the class. Patch 3253 by Jeroen Demeyer. 3254 3255- bpo-31902: Fix the ``col_offset`` attribute for ast nodes 3256 ``ast.AsyncFor``, ``ast.AsyncFunctionDef``, and ``ast.AsyncWith``. 3257 Previously, ``col_offset`` pointed to the keyword after ``async``. 3258 3259- bpo-25862: Fix assertion failures in the ``tell()`` method of 3260 ``io.TextIOWrapper``. Patch by Zackery Spytz. 3261 3262- bpo-31577: Fix a crash in `os.utime()` in case of a bad ns argument. Patch 3263 by Oren Milman. 3264 3265Library 3266------- 3267 3268- bpo-29577: Support multiple mixin classes when creating Enums. 3269 3270- bpo-34670: Add SSLContext.post_handshake_auth and 3271 SSLSocket.verify_client_post_handshake for TLS 1.3's post handshake 3272 authentication feature. 3273 3274- bpo-34658: Fix a rare interpreter unhandled exception state SystemError 3275 only seen when using subprocess with a preexec_fn while an after_parent 3276 handler has been registered with os.register_at_fork and the fork system 3277 call fails. 3278 3279- bpo-34652: Ensure :func:`os.lchmod` is never defined on Linux. 3280 3281- bpo-34363: dataclasses.asdict() and .astuple() now handle namedtuples 3282 correctly. 3283 3284- bpo-34625: Update vendorized expat library version to 2.2.6. 3285 3286- bpo-34621: Fix un/pickling compatbility of uuid.UUID objects with older 3287 versions of Python (<3.7). 3288 3289- bpo-32270: The subprocess module no longer mistakenly closes redirected 3290 fds even when they were in pass_fds when outside of the default {0, 1, 2} 3291 set. 3292 3293- bpo-34610: Fixed iterator of :class:`multiprocessing.managers.DictProxy`. 3294 3295- bpo-34421: Fix distutils logging for non-ASCII strings. This caused 3296 installation issues on Windows. 3297 3298- bpo-34604: Fix possible mojibake in the error message of `pwd.getpwnam` 3299 and `grp.getgrnam`. Patch by William Grzybowski. 3300 3301- bpo-34530: ``distutils.spawn.find_executable()`` now falls back on 3302 :data:`os.defpath` if the ``PATH`` environment variable is not set. 3303 3304- bpo-34282: Fix enum members getting shadowed by parent attributes. 3305 3306- bpo-34563: On Windows, fix multiprocessing.Connection for very large read: 3307 fix _winapi.PeekNamedPipe() and _winapi.ReadFile() for read larger than 3308 INT_MAX (usually 2^31-1). 3309 3310- bpo-34558: Correct typo in Lib/ctypes/_aix.py 3311 3312- bpo-34515: Fix parsing non-ASCII identifiers in 3313 :mod:`lib2to3.pgen2.tokenize` (PEP 3131). 3314 3315- bpo-13312: Avoids a possible integer underflow (undefined behavior) in the 3316 time module's year handling code when passed a very low negative year 3317 value. 3318 3319- bpo-34472: Improved compatibility for streamed files in :mod:`zipfile`. 3320 Previously an optional signature was not being written and certain ZIP 3321 applications were not supported. Patch by Silas Sewell. 3322 3323- bpo-34454: Fix the .fromisoformat() methods of datetime types crashing 3324 when given unicode with non-UTF-8-encodable code points. Specifically, 3325 datetime.fromisoformat() now accepts surrogate unicode code points used as 3326 the separator. Report and tests by Alexey Izbyshev, patch by Paul Ganssle. 3327 3328- bpo-6700: Fix inspect.getsourcelines for module level frames/tracebacks. 3329 Patch by Vladimir Matveev. 3330 3331- bpo-34171: Running the :mod:`trace` module no longer creates the 3332 ``trace.cover`` file. 3333 3334- bpo-34441: Fix crash when an ``ABC``-derived class with invalid 3335 ``__subclasses__`` is passed as the second argument to 3336 :func:`issubclass()`. Patch by Alexey Izbyshev. 3337 3338- bpo-34341: Appending to the ZIP archive with the ZIP64 extension no longer 3339 grows the size of extra fields of existing entries. 3340 3341- bpo-34333: Fix %-formatting in :meth:`pathlib.PurePath.with_suffix` when 3342 formatting an error message. 3343 3344- bpo-18540: The :class:`imaplib.IMAP4` and :class:`imaplib.IMAP4_SSL` 3345 classes now resolve to the local host IP correctly when the default value 3346 of *host* parameter (``''``) is used. 3347 3348- bpo-34246: :meth:`smtplib.SMTP.send_message` no longer modifies the 3349 content of the *mail_options* argument. Patch by Pablo S. Blum de Aguiar. 3350 3351- bpo-31047: Fix ``ntpath.abspath`` for invalid paths on windows. Patch by 3352 Franz Woellert. 3353 3354- bpo-34263: asyncio's event loop will not pass timeouts longer than one day 3355 to epoll/select etc. 3356 3357- bpo-34035: Fix several AttributeError in zipfile seek() methods. Patch by 3358 Mickaël Schoentgen. 3359 3360- bpo-32215: Fix performance regression in :mod:`sqlite3` when a DML 3361 statement appeared in a different line than the rest of the SQL query. 3362 3363- bpo-34251: Restore ``msilib.Win64`` to preserve backwards compatibility 3364 since it's already used by :mod:`distutils`' ``bdist_msi`` command. 3365 3366- bpo-19891: Ignore errors caused by missing / non-writable homedir while 3367 writing history during exit of an interactive session. Patch by Anthony 3368 Sottile. 3369 3370- bpo-34213: Allow frozen dataclasses to have a field named "object". 3371 Previously this conflicted with an internal use of "object". 3372 3373- bpo-21446: The :2to3fixer:`reload` fixer now uses :func:`importlib.reload` 3374 instead of deprecated :func:`imp.reload`. 3375 3376- bpo-940286: pydoc's ``Helper.showtopic()`` method now prints the cross 3377 references of a topic correctly. 3378 3379- bpo-34164: :func:`base64.b32decode` could raise UnboundLocalError or 3380 OverflowError for incorrect padding. Now it always raises 3381 :exc:`base64.Error` in these cases. 3382 3383- bpo-33729: Fixed issues with arguments parsing in :mod:`hashlib`. 3384 3385- bpo-34108: Remove extraneous CR in 2to3 refactor. 3386 3387- bpo-27494: Reverted :issue:`27494`. 2to3 rejects now a trailing comma in 3388 generator expressions. 3389 3390- bpo-33967: functools.singledispatch now raises TypeError instead of 3391 IndexError when no positional arguments are passed. 3392 3393- bpo-34056: Ensure the loader shim created by ``imp.load_module`` always 3394 returns bytes from its ``get_data()`` function. This fixes using 3395 ``imp.load_module`` with :pep:`552` hash-based pycs. 3396 3397- bpo-34054: The multiprocessing module now uses the monotonic clock 3398 :func:`time.monotonic` instead of the system clock :func:`time.time` to 3399 implement timeout. 3400 3401- bpo-34044: ``subprocess.Popen`` now copies the *startupinfo* argument to 3402 leave it unchanged: it will modify the copy, so that the same 3403 ``STARTUPINFO`` object can be used multiple times. 3404 3405- bpo-34010: Fixed a performance regression for reading streams with 3406 tarfile. The buffered read should use a list, instead of appending to a 3407 bytes object. 3408 3409- bpo-34019: webbrowser: Correct the arguments passed to Opera Browser when 3410 opening a new URL using the ``webbrowser`` module. Patch by Bumsik Kim. 3411 3412- bpo-33978: Closed existing logging handlers before reconfiguration via 3413 fileConfig and dictConfig. Patch by Karthikeyan Singaravelan. 3414 3415- bpo-14117: Make minor tweaks to turtledemo. The 'wikipedia' example is now 3416 'rosette', decribing what it draws. The 'penrose' print output is 3417 reduced. The'1024' output of 'tree' is eliminated. 3418 3419- bpo-33974: Fixed passing lists and tuples of strings containing special 3420 characters ``"``, ``\``, ``{``, ``}`` and ``\n`` as options to 3421 :mod:`~tkinter.ttk` widgets. 3422 3423- bpo-27500: Fix getaddrinfo to resolve IPv6 addresses correctly. 3424 3425- bpo-24567: Improve random.choices() to handle subnormal input weights that 3426 could occasionally trigger an IndexError. 3427 3428- bpo-33871: Fixed integer overflow in :func:`os.readv`, :func:`os.writev`, 3429 :func:`os.preadv` and :func:`os.pwritev` and in :func:`os.sendfile` with 3430 *headers* or *trailers* arguments (on BSD-based OSes and macOS). 3431 3432- bpo-33899: Tokenize module now implicitly emits a NEWLINE when provided 3433 with input that does not have a trailing new line. This behavior now 3434 matches what the C tokenizer does internally. Contributed by Ammar Askar. 3435 3436- bpo-33916: bz2 and lzma: When Decompressor.__init__() is called twice, 3437 free the old lock to not leak memory. 3438 3439- bpo-32568: Make select.epoll() and its documentation consistent regarding 3440 *sizehint* and *flags*. 3441 3442- bpo-33833: Fixed bug in asyncio where ProactorSocketTransport logs 3443 AssertionError if force closed during write. 3444 3445- bpo-33663: Convert content length to string before putting to header. 3446 3447- bpo-26544: Fixed implementation of :func:`platform.libc_ver`. It almost 3448 always returned version '2.9' for glibc. 3449 3450- bpo-33805: Improve error message of dataclasses.replace() when an InitVar 3451 is not specified 3452 3453- bpo-27397: Make email module properly handle invalid-length base64 3454 strings. 3455 3456- bpo-33476: Fix _header_value_parser.py when address group is missing final 3457 ';'. Contributed by Enrique Perez-Terron 3458 3459- bpo-31014: Fixed creating a controller for :mod:`webbrowser` when a user 3460 specifies a path to an entry in the BROWSER environment variable. Based 3461 on patch by John Still. 3462 3463- bpo-33365: Print the header values besides the header keys instead just 3464 the header keys if *debuglevel* is set to >0 in :mod:`http.client`. Patch 3465 by Marco Strigl. 3466 3467- bpo-32933: :func:`unittest.mock.mock_open` now supports iteration over the 3468 file contents. Patch by Tony Flury. 3469 3470- bpo-33336: ``imaplib`` now allows ``MOVE`` command in ``IMAP4.uid()`` (RFC 3471 6851: IMAP MOVE Extension) and potentially as a name of supported method 3472 of ``IMAP4`` object. 3473 3474- bpo-31608: Raise a ``TypeError`` instead of crashing if a 3475 ``collections.deque`` subclass returns a non-deque from ``__new__``. Patch 3476 by Oren Milman. 3477 3478- bpo-29456: Fix bugs in hangul normalization: u1176, u11a7 and u11c3 3479 3480Documentation 3481------------- 3482 3483- bpo-34790: Document how passing coroutines to asyncio.wait() can be 3484 confusing. 3485 3486- bpo-28617: Fixed info in the stdtypes docs concerning the types that 3487 support membership tests. 3488 3489- bpo-34065: Fix wrongly written basicConfig documentation markup syntax 3490 3491- bpo-33460: replaced ellipsis with correct error codes in tutorial chapter 3492 3. 3493 3494- bpo-33847: Add '@' operator entry to index. 3495 3496- bpo-25041: Document ``AF_PACKET`` in the :mod:`socket` module. 3497 3498Tests 3499----- 3500 3501- bpo-34537: Fix ``test_gdb.test_strings()`` when ``LC_ALL=C`` and GDB was 3502 compiled with Python 3.6 or earlier. 3503 3504- bpo-34587: test_socket: Remove RDSTest.testCongestion(). The test tries to 3505 fill the receiver's socket buffer and expects an error. But the RDS 3506 protocol doesn't require that. Moreover, the Linux implementation of RDS 3507 expects that the producer of the messages reduces its rate, it's not the 3508 role of the receiver to trigger an error. The test fails on Fedora 28 by 3509 design, so just remove it. 3510 3511- bpo-34661: Fix test_shutil if unzip doesn't support -t. 3512 3513- bpo-34200: Fixed non-deterministic flakiness of test_pkg by not using the 3514 scary test.support.module_cleanup() logic to save and restore sys.modules 3515 contents between test cases. 3516 3517- bpo-34594: Fix usage of hardcoded ``errno`` values in the tests. 3518 3519- bpo-34542: Use 3072 RSA keys and SHA-256 signature for test certs and 3520 keys. 3521 3522- bpo-11193: Remove special condition for AIX in 3523 `test_subprocess.test_undecodable_env` 3524 3525- bpo-34490: On AIX with AF_UNIX family sockets getsockname() does not 3526 provide 'sockname', so skip calls to transport.get_extra_info('sockname') 3527 3528- bpo-34391: Fix ftplib test for TLS 1.3 by reading from data socket. 3529 3530- bpo-34399: Update all RSA keys and DH params to use at least 2048 bits. 3531 3532- bpo-33746: Fix test_unittest when run in verbose mode. 3533 3534- bpo-33901: Fix test_dbm_gnu on macOS with gdbm 1.15: add a larger value to 3535 make sure that the file size changes. 3536 3537- bpo-33873: Fix a bug in ``regrtest`` that caused an extra test to run if 3538 --huntrleaks/-R was used. Exit with error in case that invalid parameters 3539 are specified to --huntrleaks/-R (at least one warmup run and one 3540 repetition must be used). 3541 3542- bpo-32663: Making sure the `SMTPUTF8SimTests` class of tests gets run in 3543 test_smtplib.py. 3544 3545Build 3546----- 3547 3548- bpo-34710: Fixed SSL module build with OpenSSL & pedantic CFLAGS. 3549 3550- bpo-34582: Add JUnit XML output for regression tests and update Azure 3551 DevOps builds. 3552 3553- bpo-34555: Fix for case where it was not possible to have both 3554 ``HAVE_LINUX_VM_SOCKETS_H`` and ``HAVE_SOCKADDR_ALG`` be undefined. 3555 3556- bpo-34121: Fix detection of C11 atomic support on clang. 3557 3558- bpo-30345: Add -g to LDFLAGS when compiling with LTO to get debug symbols. 3559 3560- bpo-33648: The --with-c-locale-warning configuration flag has been 3561 removed. It has had no effect for about a year. 3562 3563Windows 3564------- 3565 3566- bpo-34770: Fix a possible null pointer dereference in pyshellext.cpp. 3567 3568- bpo-34603: Fix returning structs from functions produced by MSVC 3569 3570- bpo-34581: Guard MSVC-specific code in socketmodule.c with ``#ifdef 3571 _MSC_VER``. 3572 3573- bpo-34062: Fixed the '--list' and '--list-paths' arguments for the py.exe 3574 launcher 3575 3576- bpo-34225: Ensure INCLUDE and LIB directories do not end with a backslash. 3577 3578- bpo-34006: Revert line length limit for Windows help docs. The line-length 3579 limit is not needed because the pages appear in a separate app rather than 3580 on a browser tab. It can also interact badly with the DPI setting. 3581 3582- bpo-31546: Restore running PyOS_InputHook while waiting for user input at 3583 the prompt. The restores integration of interactive GUI windows (such as 3584 Matplotlib figures) with the prompt on Windows. 3585 3586- bpo-30237: Output error when ReadConsole is canceled by 3587 CancelSynchronousIo instead of crashing. 3588 3589- bpo-29097: Fix bug where :meth:`datetime.fromtimestamp` erronously throws 3590 an :exc:`OSError` on Windows for values between 0 and 86400. Patch by 3591 Ammar Askar. 3592 3593macOS 3594----- 3595 3596- bpo-34370: Have macOS 10.9+ installer builds for 3.7.1rc and 3.6.7rc use a 3597 development snapshot of Tk 8.6 (post-8.6.8) to mitigate certain scroller 3598 issues seen with IDLE and tkinter apps. 3599 3600- bpo-34405: Update to OpenSSL 1.1.0i for macOS installer builds. 3601 3602- bpo-33635: In macOS stat on some file descriptors (/dev/fd/3 f.e) will 3603 result in bad file descriptor OSError. Guard against this exception was 3604 added in is_dir, is_file and similar methods. DirEntry.is_dir can also 3605 throw this exception so _RecursiveWildcardSelector._iterate_directories 3606 was also extended with the same error ignoring pattern. 3607 3608- bpo-31903: In :mod:`_scproxy`, drop the GIL when calling into 3609 ``SystemConfiguration`` to avoid deadlocks. 3610 3611IDLE 3612---- 3613 3614- bpo-34548: Use configured color theme for read-only text views. 3615 3616- bpo-1529353: Enable "squeezing" of long outputs in the shell, to avoid 3617 performance degradation and to clean up the history without losing it. 3618 Squeezed outputs may be copied, viewed in a separate window, and 3619 "unsqueezed". 3620 3621- bpo-34047: Fixed mousewheel scrolling direction on macOS. 3622 3623- bpo-34275: Make IDLE calltips always visible on Mac. Some MacOS-tk 3624 combinations need .update_idletasks(). Patch by Kevin Walzer. 3625 3626- bpo-34120: Fix unresponsiveness after closing certain windows and dialogs. 3627 3628- bpo-33975: Avoid small type when running htests. Since part of the purpose 3629 of human-viewed tests is to determine that widgets look right, it is 3630 important that they look the same for testing as when running IDLE. 3631 3632- bpo-33905: Add test for idlelib.stackview.StackBrowser. 3633 3634- bpo-33924: Change mainmenu.menudefs key 'windows' to 'window'. Every other 3635 menudef key is lowercase version of main menu entry. 3636 3637- bpo-33906: Rename idlelib.windows as window Match Window on the main menu 3638 and remove last plural module name. 3639 3640- bpo-33917: Fix and document idlelib/idle_test/template.py. The revised 3641 file compiles, runs, and tests OK. idle_test/README.txt explains how to 3642 use it to create new IDLE test files. 3643 3644- bpo-33904: IDLE: In rstrip, rename class RstripExtension as Rstrip 3645 3646- bpo-33907: For consistency and clarity, rename an IDLE module and classes. 3647 Module calltips and its class CallTips are now calltip and Calltip. In 3648 module calltip_w, class CallTip is now CalltipWindow. 3649 3650- bpo-33856: Add "help" in the welcome message of IDLE 3651 3652- bpo-33839: IDLE: refactor ToolTip and CallTip and add documentation and 3653 tests 3654 3655- bpo-33855: Minimally test all IDLE modules. Add missing files, import 3656 module, instantiate classes, and check coverage. Check existing files. 3657 3658Tools/Demos 3659----------- 3660 3661- bpo-32962: python-gdb now catches ``UnicodeDecodeError`` exceptions when 3662 calling ``string()``. 3663 3664- bpo-32962: python-gdb now catches ValueError on read_var(): when Python 3665 has no debug symbols for example. 3666 3667C API 3668----- 3669 3670- bpo-34247: Fix Py_Initialize() regression introduced in 3.7.0: read 3671 environment variables like PYTHONOPTIMIZE. 3672 3673- bpo-23927: Fixed :exc:`SystemError` in 3674 :c:func:`PyArg_ParseTupleAndKeywords` when the ``w*`` format unit is used 3675 for optional parameter. 3676 3677- bpo-34008: Py_Main() can again be called after Py_Initialize(), as in 3678 Python 3.6. 3679 3680 3681What's New in Python 3.7.0 final? 3682================================= 3683 3684*Release date: 2018-06-27* 3685 3686Library 3687------- 3688 3689- bpo-33851: Fix :func:`ast.get_docstring` for a node that lacks a 3690 docstring. 3691 3692C API 3693----- 3694 3695- bpo-33932: Calling Py_Initialize() twice does nothing, instead of failing 3696 with a fatal error: restore the Python 3.6 behaviour. 3697 3698 3699What's New in Python 3.7.0 release candidate 1? 3700=============================================== 3701 3702*Release date: 2018-06-12* 3703 3704Core and Builtins 3705----------------- 3706 3707- bpo-33803: Fix a crash in hamt.c caused by enabling GC tracking for an 3708 object that hadn't all of its fields set to NULL. 3709 3710- bpo-33706: Fix a crash in Python initialization when parsing the command 3711 line options. Thanks Christoph Gohlke for the bug report and the fix! 3712 3713- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter 3714 shutdown even when there was a custom handler set previously. Patch by 3715 Philipp Kerling. 3716 3717- bpo-31849: Fix signed/unsigned comparison warning in pyhash.c. 3718 3719Library 3720------- 3721 3722- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by 3723 Steve Weber. 3724 3725- bpo-33812: Datetime instance d with non-None tzinfo, but with 3726 d.tzinfo.utcoffset(d) returning None is now treated as naive by the 3727 astimezone() method. 3728 3729- bpo-30805: Avoid race condition with debug logging 3730 3731- bpo-33694: asyncio: Fix a race condition causing data loss on 3732 pause_reading()/resume_reading() when using the ProactorEventLoop. 3733 3734- bpo-32493: Correct test for ``uuid_enc_be`` availability in 3735 ``configure.ac``. Patch by Michael Felt. 3736 3737- bpo-33792: Add asyncio.WindowsSelectorEventLoopPolicy and 3738 asyncio.WindowsProactorEventLoopPolicy. 3739 3740- bpo-33778: Update ``unicodedata``'s database to Unicode version 11.0.0. 3741 3742- bpo-33770: improve base64 exception message for encoded inputs of invalid 3743 length 3744 3745- bpo-33769: asyncio/start_tls: Fix error message; cancel callbacks in case 3746 of an unhandled error; mark SSLTransport as closed if it is aborted. 3747 3748- bpo-33767: The concatenation (``+``) and repetition (``*``) sequence 3749 operations now raise :exc:`TypeError` instead of :exc:`SystemError` when 3750 performed on :class:`mmap.mmap` objects. Patch by Zackery Spytz. 3751 3752- bpo-33734: asyncio/ssl: Fix AttributeError, increase default handshake 3753 timeout 3754 3755- bpo-11874: Use a better regex when breaking usage into wrappable parts. 3756 Avoids bogus assertion errors from custom metavar strings. 3757 3758- bpo-33582: Emit a deprecation warning for inspect.formatargspec 3759 3760Documentation 3761------------- 3762 3763- bpo-33409: Clarified the relationship between PEP 538's 3764 PYTHONCOERCECLOCALE and PEP 540's PYTHONUTF8 mode. 3765 3766- bpo-33736: Improve the documentation of :func:`asyncio.open_connection`, 3767 :func:`asyncio.start_server` and their UNIX socket counterparts. 3768 3769- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED 3770 flags for ssl.SSLContext.verify_mode. 3771 3772Build 3773----- 3774 3775- bpo-5755: Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from 3776 ``OPT``. This option emitted annoying warnings when building extension 3777 modules written in C++. 3778 3779Windows 3780------- 3781 3782- bpo-33720: Reduces maximum marshal recursion depth on release builds. 3783 3784IDLE 3785---- 3786 3787- bpo-33656: On Windows, add API call saying that tk scales for DPI. On 3788 Windows 8.1+ or 10, with DPI compatibility properties of the Python binary 3789 unchanged, and a monitor resolution greater than 96 DPI, this should make 3790 text and lines sharper. It should otherwise have no effect. 3791 3792- bpo-33768: Clicking on a context line moves that line to the top of the 3793 editor window. 3794 3795- bpo-33763: IDLE: Use read-only text widget for code context instead of 3796 label widget. 3797 3798- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel 3799 and scrollbar slider moved text by a fixed number of pixels, resulting in 3800 partial lines at the top of the editor box. The change also applies to 3801 the shell and grep output windows, but not to read-only text views. 3802 3803- bpo-33679: Enable theme-specific color configuration for Code Context. Use 3804 the Highlights tab to see the setting for built-in themes or add settings 3805 to custom themes. 3806 3807- bpo-33642: Display up to maxlines non-blank lines for Code Context. If 3808 there is no current context, show a single blank line. 3809 3810 3811What's New in Python 3.7.0 beta 5? 3812================================== 3813 3814*Release date: 2018-05-30* 3815 3816Core and Builtins 3817----------------- 3818 3819- bpo-33622: Fixed a leak when the garbage collector fails to add an object 3820 with the ``__del__`` method or referenced by it into the 3821 :data:`gc.garbage` list. :c:func:`PyGC_Collect` can now be called when an 3822 exception is set and preserves it. 3823 3824- bpo-33509: Fix module_globals parameter of warnings.warn_explicit(): don't 3825 crash if module_globals is not a dict. 3826 3827- bpo-20104: The new `os.posix_spawn` added in 3.7.0b1 was removed as we are 3828 still working on what the API should look like. Expect this in 3.8 3829 instead. 3830 3831- bpo-33475: Fixed miscellaneous bugs in converting annotations to strings 3832 and optimized parentheses in the string representation. 3833 3834- bpo-33391: Fix a leak in set_symmetric_difference(). 3835 3836- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer. 3837 3838- bpo-32911: Due to unexpected compatibility issues discovered during 3839 downstream beta testing, reverted :issue:`29463`. ``docstring`` field is 3840 removed from Module, ClassDef, FunctionDef, and AsyncFunctionDef ast nodes 3841 which was added in 3.7a1. Docstring expression is restored as a first 3842 statement in their body. Based on patch by Inada Naoki. 3843 3844- bpo-21983: Fix a crash in `ctypes.cast()` in case the type argument is a 3845 ctypes structured data type. Patch by Eryk Sun and Oren Milman. 3846 3847Library 3848------- 3849 3850- bpo-32751: When cancelling the task due to a timeout, 3851 :meth:`asyncio.wait_for` will now wait until the cancellation is complete. 3852 3853- bpo-32684: Fix gather to propagate cancellation of itself even with 3854 return_exceptions. 3855 3856- bpo-33654: Support protocol type switching in SSLTransport.set_protocol(). 3857 3858- bpo-33674: Pause the transport as early as possible to further reduce the 3859 risk of data_received() being called before connection_made(). 3860 3861- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of 3862 asyncio.sslproto: start immediately the handshake instead of using 3863 call_soon(). Previously, data_received() could be called before the 3864 handshake started, causing the handshake to hang or fail. 3865 3866- bpo-31647: Fixed bug where calling write_eof() on a 3867 _SelectorSocketTransport after it's already closed raises AttributeError. 3868 3869- bpo-32610: Make asyncio.all_tasks() return only pending tasks. 3870 3871- bpo-32410: Avoid blocking on file IO in sendfile fallback code 3872 3873- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor 3874 3875- bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines 3876 3877- bpo-33654: Fix transport.set_protocol() to support switching between 3878 asyncio.Protocol and asyncio.BufferedProtocol. Fix loop.start_tls() to 3879 work with asyncio.BufferedProtocols. 3880 3881- bpo-33652: Pickles of type variables and subscripted generics are now 3882 future-proof and compatible with older Python versions. 3883 3884- bpo-32493: Fixed :func:`uuid.uuid1` on FreeBSD. 3885 3886- bpo-33618: Finalize and document preliminary and experimental TLS 1.3 3887 support with OpenSSL 1.1.1 3888 3889- bpo-33623: Fix possible SIGSGV when asyncio.Future is created in __del__ 3890 3891- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder 3892 that prevented the cache of parsed strings from clearing after finishing 3893 the decoding. Based on patch by c-fos. 3894 3895- bpo-33570: Change TLS 1.3 cipher suite settings for compatibility with 3896 OpenSSL 1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 ciphers 3897 enabled by default. 3898 3899- bpo-28556: Do not simplify arguments to `typing.Union`. Now 3900 `Union[Manager, Employee]` is not simplified to `Employee` at runtime. 3901 Such simplification previously caused several bugs and limited 3902 possibilities for introspection. 3903 3904- bpo-33540: Add a new ``block_on_close`` class attribute to 3905 ``ForkingMixIn`` and ``ThreadingMixIn`` classes of :mod:`socketserver`. 3906 3907- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP 3908 locations 3909 3910- bpo-33109: argparse subparsers are once again not required by default, 3911 reverting the change in behavior introduced by bpo-26510 in 3.7.0a2. 3912 3913- bpo-33536: dataclasses.make_dataclass now checks for invalid field names 3914 and duplicate fields. Also, added a check for invalid field 3915 specifications. 3916 3917- bpo-33542: Prevent ``uuid.get_node`` from using a DUID instead of a MAC on 3918 Windows. Patch by Zvi Effron 3919 3920- bpo-26819: Fix race condition with `ReadTransport.resume_reading` in 3921 Windows proactor event loop. 3922 3923- Fix failure in `typing.get_type_hints()` when ClassVar was provided as a 3924 string forward reference. 3925 3926- bpo-33505: Optimize asyncio.ensure_future() by reordering if checks: 1.17x 3927 faster. 3928 3929- bpo-33497: Add errors param to cgi.parse_multipart and make an encoding in 3930 FieldStorage use the given errors (needed for Twisted). Patch by Amber 3931 Brown. 3932 3933- bpo-33495: Change dataclasses.Fields repr to use the repr of each of its 3934 members, instead of str. This makes it more clear what each field 3935 actually represents. This is especially true for the 'type' member. 3936 3937- bpo-33453: Fix dataclasses to work if using literal string type 3938 annotations or if using PEP 563 "Postponed Evaluation of Annotations". 3939 Only specific string prefixes are detected for both ClassVar ("ClassVar" 3940 and "typing.ClassVar") and InitVar ("InitVar" and "dataclasses.InitVar"). 3941 3942- bpo-28556: Minor fixes in typing module: add annotations to 3943 ``NamedTuple.__new__``, pass ``*args`` and ``**kwds`` in 3944 ``Generic.__new__``. Original PRs by Paulius Šarka and Chad Dombrova. 3945 3946- bpo-20087: Updated alias mapping with glibc 2.27 supported locales. 3947 3948- bpo-33422: Fix trailing quotation marks getting deleted when looking up 3949 byte/string literals on pydoc. Patch by Andrés Delfino. 3950 3951- bpo-28167: The function ``platform.linux_distribution`` and 3952 ``platform.dist`` now trigger a ``DeprecationWarning`` and have been 3953 marked for removal in Python 3.8 3954 3955- bpo-33197: Update error message when constructing invalid 3956 inspect.Parameters Patch by Dong-hee Na. 3957 3958- bpo-33263: Fix FD leak in `_SelectorSocketTransport` Patch by Vlad 3959 Starostin. 3960 3961- bpo-32861: The urllib.robotparser's ``__str__`` representation now 3962 includes wildcard entries and the "Crawl-delay" and "Request-rate" fields. 3963 Patch by Michael Lazar. 3964 3965- bpo-32257: The ssl module now contains OP_NO_RENEGOTIATION constant, 3966 available with OpenSSL 1.1.0h or 1.1.1. 3967 3968- bpo-16865: Support arrays >=2GiB in :mod:`ctypes`. Patch by Segev Finer. 3969 3970Documentation 3971------------- 3972 3973- bpo-23859: Document that `asyncio.wait()` does not cancel its futures on 3974 timeout. 3975 3976- bpo-32436: Document PEP 567 changes to asyncio. 3977 3978- bpo-33604: Update HMAC md5 default to a DeprecationWarning, bump removal 3979 to 3.8. 3980 3981- bpo-33503: Fix broken pypi link 3982 3983- bpo-33421: Add missing documentation for ``typing.AsyncContextManager``. 3984 3985Tests 3986----- 3987 3988- bpo-33655: Ignore test_posix_fallocate failures on BSD platforms that 3989 might be due to running on ZFS. 3990 3991- bpo-32604: Remove the _xxsubinterpreters module (meant for testing) and 3992 associated helpers. This module was originally added recently in 3.7b1. 3993 3994Build 3995----- 3996 3997- bpo-33614: Ensures module definition files for the stable ABI on Windows 3998 are correctly regenerated. 3999 4000- bpo-33522: Enable CI builds on Visual Studio Team Services at 4001 https://python.visualstudio.com/cpython 4002 4003- bpo-33012: Add ``-Wno-cast-function-type`` for gcc 8 for silencing 4004 warnings about function casts like casting to PyCFunction in method 4005 definition lists. 4006 4007macOS 4008----- 4009 4010- bpo-13631: The .editrc file in user's home directory is now processed 4011 correctly during the readline initialization through editline emulation on 4012 macOS. 4013 4014IDLE 4015---- 4016 4017- bpo-33628: IDLE: Cleanup codecontext.py and its test. 4018 4019- bpo-33564: IDLE's code context now recognizes async as a block opener. 4020 4021- bpo-32831: Add docstrings and tests for codecontext. 4022 4023 4024What's New in Python 3.7.0 beta 4? 4025================================== 4026 4027*Release date: 2018-05-02* 4028 4029Core and Builtins 4030----------------- 4031 4032- bpo-33363: Raise a SyntaxError for ``async with`` and ``async for`` 4033 statements outside of async functions. 4034 4035- bpo-33128: Fix a bug that causes PathFinder to appear twice on 4036 sys.meta_path. Patch by Pablo Galindo Salgado. 4037 4038- bpo-33312: Fixed clang ubsan (undefined behavior sanitizer) warnings in 4039 dictobject.c by adjusting how the internal struct _dictkeysobject shared 4040 keys structure is declared. 4041 4042- bpo-33231: Fix potential memory leak in ``normalizestring()``. 4043 4044- bpo-33205: Change dict growth function from 4045 ``round_up_to_power_2(used*2+hashtable_size/2)`` to 4046 ``round_up_to_power_2(used*3)``. Previously, dict is shrinked only when 4047 ``used == 0``. Now dict has more chance to be shrinked. 4048 4049- bpo-29922: Improved error messages in 'async with' when ``__aenter__()`` 4050 or ``__aexit__()`` return non-awaitable object. 4051 4052- bpo-33199: Fix ``ma_version_tag`` in dict implementation is uninitialized 4053 when copying from key-sharing dict. 4054 4055Library 4056------- 4057 4058- bpo-33281: Fix ctypes.util.find_library regression on macOS. 4059 4060- bpo-33383: Fixed crash in the get() method of the :mod:`dbm.ndbm` database 4061 object when it is called with a single argument. 4062 4063- bpo-33329: Fix multiprocessing regression on newer glibcs 4064 4065- bpo-991266: Fix quoting of the ``Comment`` attribute of 4066 :class:`http.cookies.SimpleCookie`. 4067 4068- bpo-33131: Upgrade bundled version of pip to 10.0.1. 4069 4070- bpo-33308: Fixed a crash in the :mod:`parser` module when converting an ST 4071 object to a tree of tuples or lists with ``line_info=False`` and 4072 ``col_info=True``. 4073 4074- bpo-33266: lib2to3 now recognizes ``rf'...'`` strings. 4075 4076- bpo-11594: Ensure line-endings are respected when using lib2to3. 4077 4078- bpo-33254: Have :func:`importlib.resources.contents` and 4079 :meth:`importlib.abc.ResourceReader.contents` return an :term:`iterable` 4080 instead of an :term:`iterator`. 4081 4082- bpo-33256: Fix display of ``<module>`` call in the html produced by 4083 ``cgitb.html()``. Patch by Stéphane Blondon. 4084 4085- bpo-33185: Fixed regression when running pydoc with the :option:`-m` 4086 switch. (The regression was introduced in 3.7.0b3 by the resolution of 4087 :issue:`33053`) 4088 4089 This fix also changed pydoc to add ``os.getcwd()`` to :data:`sys.path` 4090 when necessary, rather than adding ``"."``. 4091 4092- bpo-33169: Delete entries of ``None`` in :data:`sys.path_importer_cache` 4093 when :meth:`importlib.machinery.invalidate_caches` is called. 4094 4095- bpo-33217: Deprecate looking up non-Enum objects in Enum classes and Enum 4096 members (will raise :exc:`TypeError` in 3.8+). 4097 4098- bpo-33203: ``random.Random.choice()`` now raises ``IndexError`` for empty 4099 sequences consistently even when called from subclasses without a 4100 ``getrandbits()`` implementation. 4101 4102- bpo-33224: Update difflib.mdiff() for PEP 479. Convert an uncaught 4103 StopIteration in a generator into a return-statement. 4104 4105- bpo-33209: End framing at the end of C implementation of 4106 :func:`pickle.Pickler.dump`. 4107 4108- bpo-20104: Improved error handling and fixed a reference leak in 4109 :func:`os.posix_spawn()`. 4110 4111- bpo-33175: In dataclasses, Field.__set_name__ now looks up the 4112 __set_name__ special method on the class, not the instance, of the default 4113 value. 4114 4115- bpo-33097: Raise RuntimeError when ``executor.submit`` is called during 4116 interpreter shutdown. 4117 4118- bpo-31908: Fix output of cover files for ``trace`` module command-line 4119 tool. Previously emitted cover files only when ``--missing`` option was 4120 used. Patch by Michael Selik. 4121 4122Documentation 4123------------- 4124 4125- bpo-33378: Add Korean language switcher for https://docs.python.org/3/ 4126 4127- bpo-33276: Clarify that the ``__path__`` attribute on modules cannot be 4128 just any value. 4129 4130- bpo-33201: Modernize documentation for writing C extension types. 4131 4132- bpo-33195: Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document. 4133 ``Py_UNICODE`` related APIs are deprecated since Python 3.3, but it is 4134 missed in the document. 4135 4136- bpo-8243: Add a note about curses.addch and curses.addstr exception 4137 behavior when writing outside a window, or pad. 4138 4139- bpo-32337: Update documentation related with ``dict`` order. 4140 4141Tests 4142----- 4143 4144- bpo-33358: Fix ``test_embed.test_pre_initialization_sys_options()`` when 4145 the interpreter is built with ``--enable-shared``. 4146 4147Build 4148----- 4149 4150- bpo-33394: Enable the verbose build for extension modules, when GNU make 4151 is passed macros on the command line. 4152 4153- bpo-33393: Update config.guess and config.sub files. 4154 4155- bpo-33377: Add new triplets for mips r6 and riscv variants (used in 4156 extension suffixes). 4157 4158- bpo-32232: By default, modules configured in `Modules/Setup` are no longer 4159 built with `-DPy_BUILD_CORE`. Instead, modules that specifically need that 4160 preprocessor definition include it in their individual entries. 4161 4162- bpo-33182: The embedding tests can once again be built with clang 6.0 4163 4164Windows 4165------- 4166 4167- bpo-33184: Update Windows installer to use OpenSSL 1.1.0h. 4168 4169macOS 4170----- 4171 4172- bpo-33184: Update macOS installer build to use OpenSSL 1.1.0h. 4173 4174IDLE 4175---- 4176 4177- bpo-21474: Update word/identifier definition from ascii to unicode. In 4178 text and entry boxes, this affects selection by double-click, movement 4179 left/right by control-left/right, and deletion left/right by 4180 control-BACKSPACE/DEL. 4181 4182- bpo-33204: IDLE: consistently color invalid string prefixes. A 'u' string 4183 prefix cannot be paired with either 'r' or 'f'. Consistently color as much 4184 of the prefix, starting at the right, as is valid. Revise and extend 4185 colorizer test. 4186 4187Tools/Demos 4188----------- 4189 4190- bpo-33189: :program:`pygettext.py` now recognizes only literal strings as 4191 docstrings and translatable strings, and rejects bytes literals and 4192 f-string expressions. 4193 4194- bpo-31920: Fixed handling directories as arguments in the ``pygettext`` 4195 script. Based on patch by Oleg Krasnikov. 4196 4197- bpo-29673: Fix pystackv and pystack gdbinit macros. 4198 4199- bpo-31583: Fix 2to3 for using with --add-suffix option but without 4200 --output-dir option for relative path to files in current directory. 4201 4202 4203What's New in Python 3.7.0 beta 3? 4204================================== 4205 4206*Release date: 2018-03-29* 4207 4208Security 4209-------- 4210 4211- bpo-33136: Harden ssl module against LibreSSL CVE-2018-8970. 4212 X509_VERIFY_PARAM_set1_host() is called with an explicit namelen. A new 4213 test ensures that NULL bytes are not allowed. 4214 4215- bpo-33001: Minimal fix to prevent buffer overrun in os.symlink on Windows 4216 4217- bpo-32981: Regexes in difflib and poplib were vulnerable to catastrophic 4218 backtracking. These regexes formed potential DOS vectors (REDOS). They 4219 have been refactored. This resolves CVE-2018-1060 and CVE-2018-1061. Patch 4220 by Jamie Davis. 4221 4222Core and Builtins 4223----------------- 4224 4225- bpo-33053: When using the -m switch, sys.path[0] is now explicitly 4226 expanded as the *starting* working directory, rather than being left as 4227 the empty path (which allows imports from the current working directory at 4228 the time of the import) 4229 4230- bpo-33018: Improve consistency of errors raised by ``issubclass()`` when 4231 called with a non-class and an abstract base class as the first and second 4232 arguments, respectively. Patch by Josh Bronson. 4233 4234- bpo-33041: Fixed jumping when the function contains an ``async for`` loop. 4235 4236- bpo-33026: Fixed jumping out of "with" block by setting f_lineno. 4237 4238- bpo-33005: Fix a crash on fork when using a custom memory allocator (ex: 4239 using PYTHONMALLOC env var). _PyGILState_Reinit() and 4240 _PyInterpreterState_Enable() now use the default RAW memory allocator to 4241 allocate a new interpreters mutex on fork. 4242 4243- bpo-17288: Prevent jumps from 'return' and 'exception' trace events. 4244 4245- bpo-32836: Don't use temporary variables in cases of list/dict/set 4246 comprehensions 4247 4248Library 4249------- 4250 4251- bpo-33141: Have Field objects pass through __set_name__ to their default 4252 values, if they have their own __set_name__. 4253 4254- bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false 4255 boolean value. Note iid=0 and iid=False would be same. Patch by Garvit 4256 Khatri. 4257 4258- bpo-32873: Treat type variables and special typing forms as immutable by 4259 copy and pickle. This fixes several minor issues and inconsistencies, and 4260 improves backwards compatibility with Python 3.6. 4261 4262- bpo-33134: When computing dataclass's __hash__, use the lookup table to 4263 contain the function which returns the __hash__ value. This is an 4264 improvement over looking up a string, and then testing that string to see 4265 what to do. 4266 4267- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1. 4268 4269- bpo-32505: Raise TypeError if a member variable of a dataclass is of type 4270 Field, but doesn't have a type annotation. 4271 4272- bpo-33078: Fix the failure on OSX caused by the tests relying on 4273 sem_getvalue 4274 4275- bpo-33116: Add 'Field' to dataclasses.__all__. 4276 4277- bpo-32896: Fix an error where subclassing a dataclass with a field that 4278 uses a default_factory would generate an incorrect class. 4279 4280- bpo-33100: Dataclasses: If a field has a default value that's a 4281 MemberDescriptorType, then it's from that field being in __slots__, not an 4282 actual default value. 4283 4284- bpo-32953: If a non-dataclass inherits from a frozen dataclass, allow 4285 attributes to be added to the derived class. Only attributes from the 4286 frozen dataclass cannot be assigned to. Require all dataclasses in a 4287 hierarchy to be either all frozen or all non-frozen. 4288 4289- bpo-33061: Add missing ``NoReturn`` to ``__all__`` in typing.py 4290 4291- bpo-33078: Fix the size handling in multiprocessing.Queue when a pickling 4292 error occurs. 4293 4294- bpo-33064: lib2to3 now properly supports trailing commas after ``*args`` 4295 and ``**kwargs`` in function signatures. 4296 4297- bpo-33056: FIX properly close leaking fds in 4298 concurrent.futures.ProcessPoolExecutor. 4299 4300- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all 4301 threads when calling mmap.mmap(), os.urandom(), and random.seed(). Patch 4302 by Nir Soffer. 4303 4304- bpo-31804: Avoid failing in multiprocessing.Process if the standard 4305 streams are closed or None at exit. 4306 4307- bpo-33037: Skip sending/receiving data after SSL transport closing. 4308 4309- bpo-27683: Fix a regression in :mod:`ipaddress` that result of 4310 :meth:`hosts` is empty when the network is constructed by a tuple 4311 containing an integer mask and only 1 bit left for addresses. 4312 4313- bpo-32999: Fix C implementation of ``ABC.__subclasscheck__(cls, 4314 subclass)`` crashed when ``subclass`` is not a type object. 4315 4316- bpo-33009: Fix inspect.signature() for single-parameter partialmethods. 4317 4318- bpo-32969: Expose several missing constants in zlib and fix corresponding 4319 documentation. 4320 4321- bpo-32056: Improved exceptions raised for invalid number of channels and 4322 sample width when read an audio file in modules :mod:`aifc`, :mod:`wave` 4323 and :mod:`sunau`. 4324 4325- bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in 4326 subprocess if another low descriptor is closed. 4327 4328- bpo-32857: In :mod:`tkinter`, ``after_cancel(None)`` now raises a 4329 :exc:`ValueError` instead of canceling the first scheduled function. 4330 Patch by Cheryl Sabella. 4331 4332- bpo-31639: http.server now exposes a ThreadedHTTPServer class and uses it 4333 when the module is run with ``-m`` to cope with web browsers pre-opening 4334 sockets. 4335 4336- bpo-27645: :class:`sqlite3.Connection` now exposes a 4337 :class:`~sqlite3.Connection.backup` method, if the underlying SQLite 4338 library is at version 3.6.11 or higher. Patch by Lele Gaifax. 4339 4340Documentation 4341------------- 4342 4343- bpo-33126: Document PyBuffer_ToContiguous(). 4344 4345- bpo-27212: Modify documentation for the :func:`islice` recipe to consume 4346 initial values up to the start index. 4347 4348- bpo-28247: Update :mod:`zipapp` documentation to describe how to make 4349 standalone applications. 4350 4351- bpo-18802: Documentation changes for ipaddress. Patch by Jon Foster and 4352 Berker Peksag. 4353 4354- bpo-27428: Update documentation to clarify that ``WindowsRegistryFinder`` 4355 implements ``MetaPathFinder``. (Patch by Himanshu Lakhara) 4356 4357Tests 4358----- 4359 4360- bpo-32872: Avoid regrtest compatibility issue with namespace packages. 4361 4362- bpo-32517: Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport 4363 of ``KqueueSelector`` loop was not being closed. 4364 4365- bpo-19417: Add test_bdb.py. 4366 4367Build 4368----- 4369 4370- bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. 4371 4372Windows 4373------- 4374 4375- bpo-33016: Fix potential use of uninitialized memory in 4376 nt._getfinalpathname 4377 4378- bpo-32903: Fix a memory leak in os.chdir() on Windows if the current 4379 directory is set to a UNC path. 4380 4381macOS 4382----- 4383 4384- bpo-32726: Build and link with private copy of Tcl/Tk 8.6 for the macOS 4385 10.6+ installer. The 10.9+ installer variant already does this. This 4386 means that the Python 3.7 provided by the python.org macOS installers no 4387 longer need or use any external versions of Tcl/Tk, either system-provided 4388 or user-installed, such as ActiveTcl. 4389 4390IDLE 4391---- 4392 4393- bpo-32984: Set ``__file__`` while running a startup file. Like Python, 4394 IDLE optionally runs one startup file in the Shell window before 4395 presenting the first interactive input prompt. For IDLE, ``-s`` runs a 4396 file named in environmental variable :envvar:`IDLESTARTUP` or 4397 :envvar:`PYTHONSTARTUP`; ``-r file`` runs ``file``. Python sets 4398 ``__file__`` to the startup file name before running the file and unsets 4399 it before the first prompt. IDLE now does the same when run normally, 4400 without the ``-n`` option. 4401 4402- bpo-32940: Simplify and rename StringTranslatePseudoMapping in pyparse. 4403 4404Tools/Demos 4405----------- 4406 4407- bpo-32885: Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable 4408 automatic backup creation (files with ``~`` suffix). 4409 4410C API 4411----- 4412 4413- bpo-33042: Embedding applications may once again call 4414 PySys_ResetWarnOptions, PySys_AddWarnOption, and PySys_AddXOption prior to 4415 calling Py_Initialize. 4416 4417- bpo-32374: Document that m_traverse for multi-phase initialized modules 4418 can be called with m_state=NULL, and add a sanity check 4419 4420 4421What's New in Python 3.7.0 beta 2? 4422================================== 4423 4424*Release date: 2018-02-27* 4425 4426Security 4427-------- 4428 4429- bpo-28414: The ssl module now allows users to perform their own IDN 4430 en/decoding when using SNI. 4431 4432Core and Builtins 4433----------------- 4434 4435- bpo-32889: Update Valgrind suppression list to account for the rename of 4436 ``Py_ADDRESS_IN_RANG`` to ``address_in_range``. 4437 4438- bpo-31356: Remove the new API added in bpo-31356 (gc.ensure_disabled() 4439 context manager). 4440 4441- bpo-32305: For namespace packages, ensure that both ``__file__`` and 4442 ``__spec__.origin`` are set to None. 4443 4444- bpo-32303: Make sure ``__spec__.loader`` matches ``__loader__`` for 4445 namespace packages. 4446 4447- bpo-32711: Fix the warning messages for Python/ast_unparse.c. Patch by 4448 Stéphane Wirtel 4449 4450- bpo-32583: Fix possible crashing in builtin Unicode decoders caused by 4451 write out-of-bound errors when using customized decode error handlers. 4452 4453Library 4454------- 4455 4456- bpo-32960: For dataclasses, disallow inheriting frozen from non-frozen 4457 classes, and also disallow inheriting non-frozen from frozen classes. This 4458 restriction will be relaxed at a future date. 4459 4460- bpo-32713: Fixed tarfile.itn handling of out-of-bounds float values. Patch 4461 by Joffrey Fuhrer. 4462 4463- bpo-32951: Direct instantiation of SSLSocket and SSLObject objects is now 4464 prohibited. The constructors were never documented, tested, or designed as 4465 public constructors. Users were suppose to use ssl.wrap_socket() or 4466 SSLContext. 4467 4468- bpo-32929: Remove the tri-state parameter "hash", and add the boolean 4469 "unsafe_hash". If unsafe_hash is True, add a __hash__ function, but if a 4470 __hash__ exists, raise TypeError. If unsafe_hash is False, add a __hash__ 4471 based on the values of eq= and frozen=. The unsafe_hash=False behavior is 4472 the same as the old hash=None behavior. unsafe_hash=False is the default, 4473 just as hash=None used to be. 4474 4475- bpo-32947: Add OP_ENABLE_MIDDLEBOX_COMPAT and test workaround for TLSv1.3 4476 for future compatibility with OpenSSL 1.1.1. 4477 4478- bpo-30622: The ssl module now detects missing NPN support in LibreSSL. 4479 4480- bpo-32922: dbm.open() now encodes filename with the filesystem encoding 4481 rather than default encoding. 4482 4483- bpo-32859: In ``os.dup2``, don't check every call whether the ``dup3`` 4484 syscall exists or not. 4485 4486- bpo-32556: nt._getfinalpathname, nt._getvolumepathname and 4487 nt._getdiskusage now correctly convert from bytes. 4488 4489- bpo-25988: Emit a :exc:`DeprecationWarning` when using or importing an ABC 4490 directly from :mod:`collections` rather than from :mod:`collections.abc`. 4491 4492- bpo-21060: Rewrite confusing message from setup.py upload from "No dist 4493 file created in earlier command" to the more helpful "Must create and 4494 upload files in one command". 4495 4496- bpo-32852: Make sure sys.argv remains as a list when running trace. 4497 4498- bpo-31333: ``_abc`` module is added. It is a speedup module with C 4499 implementations for various functions and methods in ``abc``. Creating an 4500 ABC subclass and calling ``isinstance`` or ``issubclass`` with an ABC 4501 subclass are up to 1.5x faster. In addition, this makes Python start-up up 4502 to 10% faster. 4503 4504 Note that the new implementation hides internal registry and caches, 4505 previously accessible via private attributes ``_abc_registry``, 4506 ``_abc_cache``, and ``_abc_negative_cache``. There are three debugging 4507 helper methods that can be used instead ``_dump_registry``, 4508 ``_abc_registry_clear``, and ``_abc_caches_clear``. 4509 4510- bpo-32841: Fixed `asyncio.Condition` issue which silently ignored 4511 cancellation after notifying and cancelling a conditional lock. Patch by 4512 Bar Harel. 4513 4514- bpo-32819: ssl.match_hostname() has been simplified and no longer depends 4515 on re and ipaddress module for wildcard and IP addresses. Error reporting 4516 for invalid wildcards has been improved. 4517 4518- bpo-32394: socket: Remove 4519 TCP_FASTOPEN,TCP_KEEPCNT,TCP_KEEPIDLE,TCP_KEEPINTVL flags on older version 4520 Windows during run-time. 4521 4522- bpo-31787: Fixed refleaks of ``__init__()`` methods in various modules. 4523 (Contributed by Oren Milman) 4524 4525- bpo-30157: Fixed guessing quote and delimiter in csv.Sniffer.sniff() when 4526 only the last field is quoted. Patch by Jake Davis. 4527 4528- bpo-32792: collections.ChainMap() preserves the order of the underlying 4529 mappings. 4530 4531- bpo-32775: :func:`fnmatch.translate()` no longer produces patterns which 4532 contain set operations. Sets starting with '[' or containing '--', '&&', 4533 '~~' or '||' will be interpreted differently in regular expressions in 4534 future versions. Currently they emit warnings. fnmatch.translate() now 4535 avoids producing patterns containing such sets by accident. 4536 4537- bpo-32622: Implement native fast sendfile for Windows proactor event loop. 4538 4539- bpo-32777: Fix a rare but potential pre-exec child process deadlock in 4540 subprocess on POSIX systems when marking file descriptors inheritable on 4541 exec in the child process. This bug appears to have been introduced in 4542 3.4. 4543 4544- bpo-32647: The ctypes module used to depend on indirect linking for 4545 dlopen. The shared extension is now explicitly linked against libdl on 4546 platforms with dl. 4547 4548- bpo-32741: Implement ``asyncio.TimerHandle.when()`` method. 4549 4550- bpo-32691: Use mod_spec.parent when running modules with pdb 4551 4552- bpo-32734: Fixed ``asyncio.Lock()`` safety issue which allowed acquiring 4553 and locking the same lock multiple times, without it being free. Patch by 4554 Bar Harel. 4555 4556- bpo-32727: Do not include name field in SMTP envelope from address. Patch 4557 by Stéphane Wirtel 4558 4559- bpo-31453: Add TLSVersion constants and SSLContext.maximum_version / 4560 minimum_version attributes. The new API wraps OpenSSL 1.1 4561 https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html 4562 feature. 4563 4564- bpo-24334: Internal implementation details of ssl module were cleaned up. 4565 The SSLSocket has one less layer of indirection. Owner and session 4566 information are now handled by the SSLSocket and SSLObject constructor. 4567 Channel binding implementation has been simplified. 4568 4569- bpo-31848: Fix the error handling in Aifc_read.initfp() when the SSND 4570 chunk is not found. Patch by Zackery Spytz. 4571 4572- bpo-32585: Add Ttk spinbox widget to :mod:`tkinter.ttk`. Patch by Alan D 4573 Moore. 4574 4575- bpo-32221: Various functions returning tuple containing IPv6 addresses now 4576 omit ``%scope`` part since the same information is already encoded in 4577 *scopeid* tuple item. Especially this speeds up :func:`socket.recvfrom` 4578 when it receives multicast packet since useless resolving of network 4579 interface name is omitted. 4580 4581- bpo-30693: The TarFile class now recurses directories in a reproducible 4582 way. 4583 4584- bpo-30693: The ZipFile class now recurses directories in a reproducible 4585 way. 4586 4587Documentation 4588------------- 4589 4590- bpo-28124: The ssl module function ssl.wrap_socket() has been 4591 de-emphasized and deprecated in favor of the more secure and efficient 4592 SSLContext.wrap_socket() method. 4593 4594- bpo-17232: Clarify docs for -O and -OO. Patch by Terry Reedy. 4595 4596- bpo-32436: Add documentation for the contextvars module (PEP 567). 4597 4598- bpo-32800: Update link to w3c doc for xml default namespaces. 4599 4600- bpo-11015: Update :mod:`test.support` documentation. 4601 4602- bpo-8722: Document :meth:`__getattr__` behavior when property :meth:`get` 4603 method raises :exc:`AttributeError`. 4604 4605- bpo-32614: Modify RE examples in documentation to use raw strings to 4606 prevent :exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight 4607 the deprecation. 4608 4609- bpo-31972: Improve docstrings for `pathlib.PurePath` subclasses. 4610 4611Tests 4612----- 4613 4614- bpo-31809: Add tests to verify connection with secp ECDH curves. 4615 4616Build 4617----- 4618 4619- bpo-32898: Fix the python debug build when using COUNT_ALLOCS. 4620 4621Windows 4622------- 4623 4624- bpo-32901: Update Tcl and Tk versions to 8.6.8 4625 4626- bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. 4627 4628- bpo-32409: Ensures activate.bat can handle Unicode contents. 4629 4630- bpo-32457: Improves handling of denormalized executable path when 4631 launching Python. 4632 4633- bpo-32370: Use the correct encoding for ipconfig output in the uuid 4634 module. Patch by Segev Finer. 4635 4636- bpo-29248: Fix :func:`os.readlink` on Windows, which was mistakenly 4637 treating the ``PrintNameOffset`` field of the reparse data buffer as a 4638 number of characters instead of bytes. Patch by Craig Holmquist and SSE4. 4639 4640macOS 4641----- 4642 4643- bpo-32901: Update macOS 10.9+ installer to Tcl/Tk 8.6.8. 4644 4645IDLE 4646---- 4647 4648- bpo-32916: Change ``str`` to ``code`` in pyparse. 4649 4650- bpo-32905: Remove unused code in pyparse module. 4651 4652- bpo-32874: Add tests for pyparse. 4653 4654- bpo-32837: Using the system and place-dependent default encoding for 4655 open() is a bad idea for IDLE's system and location-independent files. 4656 4657- bpo-32826: Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI 4658 test test_file_buttons() only looks at initial ascii-only lines, but 4659 failed on systems where open() defaults to 'ascii' because readline() 4660 internally reads and decodes far enough ahead to encounter a non-ascii 4661 character in CREDITS.txt. 4662 4663- bpo-32765: Update configdialog General tab docstring to add new widgets to 4664 the widget list. 4665 4666Tools/Demos 4667----------- 4668 4669- bpo-32222: Fix pygettext not extracting docstrings for functions with type 4670 annotated arguments. Patch by Toby Harradine. 4671 4672 4673What's New in Python 3.7.0 beta 1? 4674================================== 4675 4676*Release date: 2018-01-30* 4677 4678Core and Builtins 4679----------------- 4680 4681- bpo-32703: Fix coroutine's ResourceWarning when there's an active error 4682 set when it's being finalized. 4683 4684- bpo-32650: Pdb and other debuggers dependent on bdb.py will correctly step 4685 over (next command) native coroutines. Patch by Pablo Galindo. 4686 4687- bpo-28685: Optimize list.sort() and sorted() by using type specialized 4688 comparisons when possible. 4689 4690- bpo-32685: Improve suggestion when the Python 2 form of print statement is 4691 either present on the same line as the header of a compound statement or 4692 else terminated by a semi-colon instead of a newline. Patch by Nitish 4693 Chandra. 4694 4695- bpo-32697: Python now explicitly preserves the definition order of 4696 keyword-only parameters. It's always preserved their order, but this 4697 behavior was never guaranteed before; this behavior is now guaranteed and 4698 tested. 4699 4700- bpo-32690: The locals() dictionary now displays in the lexical order that 4701 variables were defined. Previously, the order was reversed. 4702 4703- bpo-32677: Add ``.isascii()`` method to ``str``, ``bytes`` and 4704 ``bytearray``. It can be used to test that string contains only ASCII 4705 characters. 4706 4707- bpo-32670: Enforce :pep:`479` for all code. 4708 4709 This means that manually raising a StopIteration exception from a 4710 generator is prohibited for all code, regardless of whether 'from 4711 __future__ import generator_stop' was used or not. 4712 4713- bpo-32591: Added built-in support for tracking the origin of coroutine 4714 objects; see sys.set_coroutine_origin_tracking_depth and 4715 CoroutineType.cr_origin. This replaces the asyncio debug mode's use of 4716 coroutine wrapping for native coroutine objects. 4717 4718- bpo-31368: Expose preadv and pwritev system calls in the os module. Patch 4719 by Pablo Galindo 4720 4721- bpo-32544: ``hasattr(obj, name)`` and ``getattr(obj, name, default)`` are 4722 about 4 times faster than before when ``name`` is not found and ``obj`` 4723 doesn't override ``__getattr__`` or ``__getattribute__``. 4724 4725- bpo-26163: Improved frozenset() hash to create more distinct hash values 4726 when faced with datasets containing many similar values. 4727 4728- bpo-32550: Remove the STORE_ANNOTATION bytecode. 4729 4730- bpo-20104: Expose posix_spawn as a low level API in the os module. 4731 (removed before 3.7.0rc1) 4732 4733- bpo-24340: Fixed estimation of the code stack size. 4734 4735- bpo-32436: Implement :pep:`567` Context Variables. 4736 4737- bpo-18533: ``repr()`` on a dict containing its own ``values()`` or 4738 ``items()`` no longer raises ``RecursionError``; OrderedDict similarly. 4739 Instead, use ``...``, as for other recursive structures. Patch by Ben 4740 North. 4741 4742- bpo-20891: Py_Initialize() now creates the GIL. The GIL is no longer 4743 created "on demand" to fix a race condition when PyGILState_Ensure() is 4744 called in a non-Python thread. 4745 4746- bpo-32028: Leading whitespace is now correctly ignored when generating 4747 suggestions for converting Py2 print statements to Py3 builtin print 4748 function calls. Patch by Sanyam Khurana. 4749 4750- bpo-31179: Make dict.copy() up to 5.5 times faster. 4751 4752- bpo-31113: Get rid of recursion in the compiler for normal control flow. 4753 4754Library 4755------- 4756 4757- bpo-25988: Deprecate exposing the contents of collections.abc in the 4758 regular collections module. 4759 4760- bpo-31429: The default cipher suite selection of the ssl module now uses a 4761 blacklist approach rather than a hard-coded whitelist. Python no longer 4762 re-enables ciphers that have been blocked by OpenSSL security update. 4763 Default cipher suite selection can be configured on compile time. 4764 4765- bpo-30306: contextlib.contextmanager now releases the arguments passed to 4766 the underlying generator as soon as the context manager is entered. 4767 Previously it would keep them alive for as long as the context manager was 4768 alive, even when not being used as a function decorator. Patch by Martin 4769 Teichmann. 4770 4771- bpo-21417: Added support for setting the compression level for 4772 zipfile.ZipFile. 4773 4774- bpo-32251: Implement asyncio.BufferedProtocol (provisional API). 4775 4776- bpo-32513: In dataclasses, allow easier overriding of dunder methods 4777 without specifying decorator parameters. 4778 4779- bpo-32660: :mod:`termios` makes available ``FIONREAD``, ``FIONCLEX``, 4780 ``FIOCLEX``, ``FIOASYNC`` and ``FIONBIO`` also under Solaris/derivatives. 4781 4782- bpo-27931: Fix email address header parsing error when the username is an 4783 empty quoted string. Patch by Xiang Zhang. 4784 4785- bpo-32659: Under Solaris and derivatives, :class:`os.stat_result` provides 4786 a st_fstype attribute. 4787 4788- bpo-32662: Implement Server.start_serving(), Server.serve_forever(), and 4789 Server.is_serving() methods. Add 'start_serving' keyword parameter to 4790 loop.create_server() and loop.create_unix_server(). 4791 4792- bpo-32391: Implement :meth:`asyncio.StreamWriter.wait_closed` and 4793 :meth:`asyncio.StreamWriter.is_closing` methods 4794 4795- bpo-32643: Make Task._step, Task._wakeup and Future._schedule_callbacks 4796 methods private. 4797 4798- bpo-32630: Refactor decimal module to use contextvars to store decimal 4799 context. 4800 4801- bpo-32622: Add :meth:`asyncio.AbstractEventLoop.sendfile` method. 4802 4803- bpo-32304: distutils' upload command no longer corrupts tar files ending 4804 with a CR byte, and no longer tries to convert CR to CRLF in any of the 4805 upload text fields. 4806 4807- bpo-32502: uuid.uuid1 no longer raises an exception if a 64-bit hardware 4808 address is encountered. 4809 4810- bpo-32596: ``concurrent.futures`` imports ``ThreadPoolExecutor`` and 4811 ``ProcessPoolExecutor`` lazily (using :pep:`562`). It makes ``import 4812 asyncio`` about 15% faster because asyncio uses only 4813 ``ThreadPoolExecutor`` by default. 4814 4815- bpo-31801: Add ``_ignore_`` to ``Enum`` so temporary variables can be used 4816 during class construction without being turned into members. 4817 4818- bpo-32576: Use queue.SimpleQueue() in places where it can be invoked from 4819 a weakref callback. 4820 4821- bpo-32574: Fix memory leak in asyncio.Queue, when the queue has limited 4822 size and it is full, the cancelation of queue.put() can cause a memory 4823 leak. Patch by: José Melero. 4824 4825- bpo-32521: The nis module is now compatible with new libnsl and headers 4826 location. 4827 4828- bpo-32467: collections.abc.ValuesView now inherits from 4829 collections.abc.Collection. 4830 4831- bpo-32473: Improve ABCMeta._dump_registry() output readability 4832 4833- bpo-32102: New argument ``capture_output`` for subprocess.run 4834 4835- bpo-32521: glibc has removed Sun RPC. Use replacement libtirpc headers and 4836 library in nis module. 4837 4838- bpo-32493: UUID module fixes build for FreeBSD/OpenBSD 4839 4840- bpo-32503: Pickling with protocol 4 no longer creates too small frames. 4841 4842- bpo-29237: Create enum for pstats sorting options 4843 4844- bpo-32454: Add close(fd) function to the socket module. 4845 4846- bpo-25942: The subprocess module is now more graceful when handling a 4847 Ctrl-C KeyboardInterrupt during subprocess.call, subprocess.run, or a 4848 Popen context manager. It now waits a short amount of time for the child 4849 (presumed to have also gotten the SIGINT) to exit, before continuing the 4850 KeyboardInterrupt exception handling. This still includes a SIGKILL in 4851 the call() and run() APIs, but at least the child had a chance first. 4852 4853- bpo-32433: The hmac module now has hmac.digest(), which provides an 4854 optimized HMAC digest. 4855 4856- bpo-28134: Sockets now auto-detect family, type and protocol from file 4857 descriptor by default. 4858 4859- bpo-32404: Fix bug where :meth:`datetime.datetime.fromtimestamp` did not 4860 call __new__ in :class:`datetime.datetime` subclasses. 4861 4862- bpo-32403: Improved speed of :class:`datetime.date` and 4863 :class:`datetime.datetime` alternate constructors. 4864 4865- bpo-32228: Ensure that ``truncate()`` preserves the file position (as 4866 reported by ``tell()``) after writes longer than the buffer size. 4867 4868- bpo-32410: Implement ``loop.sock_sendfile`` for asyncio event loop. 4869 4870- bpo-22908: Added seek and tell to the ZipExtFile class. This only works if 4871 the file object used to open the zipfile is seekable. 4872 4873- bpo-32373: Add socket.getblocking() method. 4874 4875- bpo-32248: Add :mod:`importlib.resources` and 4876 :class:`importlib.abc.ResourceReader` as the unified API for reading 4877 resources contained within packages. Loaders wishing to support resource 4878 reading must implement the :meth:`get_resource_reader()` method. 4879 File-based and zipimport-based loaders both implement these APIs. 4880 :class:`importlib.abc.ResourceLoader` is deprecated in favor of these new 4881 APIs. 4882 4883- bpo-32320: collections.namedtuple() now supports default values. 4884 4885- bpo-29302: Add contextlib.AsyncExitStack. Patch by Alexander Mohr and Ilya 4886 Kulakov. 4887 4888- bpo-31961: *Removed in Python 3.7.0b2.* The *args* argument of 4889 subprocess.Popen can now be a :term:`path-like object`. If *args* is given 4890 as a sequence, it's first element can now be a :term:`path-like object` as 4891 well. 4892 4893- bpo-31900: The :func:`locale.localeconv` function now sets temporarily the 4894 ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale to decode 4895 ``decimal_point`` and ``thousands_sep`` byte strings if they are non-ASCII 4896 or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the 4897 ``LC_CTYPE`` locale. This temporary change affects other threads. 4898 4899 Same change for the :meth:`str.format` method when formatting a number 4900 (:class:`int`, :class:`float`, :class:`float` and subclasses) with the 4901 ``n`` type (ex: ``'{:n}'.format(1234)``). 4902 4903- bpo-31853: Use super().method instead of socket.method in SSLSocket. They 4904 were there most likely for legacy reasons. 4905 4906- bpo-31399: The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() 4907 and X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses. 4908 Subject common name fallback can be disabled with 4909 SSLContext.hostname_checks_common_name. 4910 4911- bpo-14976: Add a queue.SimpleQueue class, an unbounded FIFO queue with a 4912 reentrant C implementation of put(). 4913 4914Documentation 4915------------- 4916 4917- bpo-32724: Add references to some commands in the documentation of Pdb. 4918 Patch by Stéphane Wirtel 4919 4920- bpo-32649: Complete the C API documentation, profiling and tracing part 4921 with the newly added per-opcode events. 4922 4923- bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile and 4924 their C-API counterparts regarding which type of events are received in 4925 each function. Patch by Pablo Galindo Salgado. 4926 4927Tests 4928----- 4929 4930- bpo-32721: Fix test_hashlib to not fail if the _md5 module is not built. 4931 4932- bpo-28414: Add test cases for IDNA 2003 and 2008 host names. IDNA 2003 4933 internationalized host names are working since bpo-31399 has landed. IDNA 4934 2008 are still broken. 4935 4936- bpo-32604: Add a new "_xxsubinterpreters" extension module that exposes 4937 the existing subinterpreter C-API and a new cross-interpreter data sharing 4938 mechanism. The module is primarily intended for more thorough testing of 4939 the existing subinterpreter support. 4940 4941 Note that the _xxsubinterpreters module has been removed in 3.7.0rc1. 4942 4943- bpo-32602: Add test certs and test for ECDSA cert and EC/RSA dual mode. 4944 4945- bpo-32549: On Travis CI, Python now Compiles and uses a local copy of 4946 OpenSSL 1.1.0g for testing. 4947 4948Build 4949----- 4950 4951- bpo-32635: Fix segfault of the crypt module when libxcrypt is provided 4952 instead of libcrypt at the system. 4953 4954- bpo-32598: Use autoconf to detect OpenSSL libs, headers and supported 4955 features. The ax_check_openssl M4 macro uses pkg-config to locate OpenSSL 4956 and falls back to manual search. 4957 4958- bpo-32593: Drop support of FreeBSD 9 and older. 4959 4960- bpo-29708: If the :envvar:`SOURCE_DATE_EPOCH` environment variable is set, 4961 :mod:`py_compile` will always create hash-based ``.pyc`` files. 4962 4963Windows 4964------- 4965 4966- bpo-32588: Create standalone _distutils_findvs module and add missing 4967 _queue module to installer. 4968 4969- bpo-29911: Ensure separate Modify and Uninstall buttons are displayed. 4970 4971- bpo-32507: Use app-local UCRT install rather than the proper update for 4972 old versions of Windows. 4973 4974macOS 4975----- 4976 4977- bpo-32726: Provide an additional, more modern macOS installer variant that 4978 supports macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied 4979 third-party libraries to OpenSSL 1.1.0g and to SQLite 3.22.0. The 10.9+ 4980 installer now links with and supplies its own copy of Tcl/Tk 8.6. 4981 4982- bpo-28440: No longer add /Library/Python/3.x/site-packages to sys.path for 4983 macOS framework builds to avoid future conflicts. 4984 4985C API 4986----- 4987 4988- bpo-32681: Fix uninitialized variable 'res' in the C implementation of 4989 os.dup2. Patch by Stéphane Wirtel 4990 4991- bpo-10381: Add C API access to the ``datetime.timezone`` constructor and 4992 ``datetime.timzone.UTC`` singleton. 4993 4994 4995What's New in Python 3.7.0 alpha 4? 4996=================================== 4997 4998*Release date: 2018-01-08* 4999 5000Core and Builtins 5001----------------- 5002 5003- bpo-31975: The default warning filter list now starts with a 5004 "default::DeprecationWarning:__main__" entry, so deprecation warnings are 5005 once again shown by default in single-file scripts and at the interactive 5006 prompt. 5007 5008- bpo-32226: ``__class_getitem__`` is now an automatic class method. 5009 5010- bpo-32399: Add AIX uuid library support for RFC4122 using uuid_create() in 5011 libc.a 5012 5013- bpo-32390: Fix the compilation failure on AIX after the f_fsid field has 5014 been added to the object returned by os.statvfs() (issue #32143). Original 5015 patch by Michael Felt. 5016 5017- bpo-32379: Make MRO computation faster when a class inherits from a single 5018 base. 5019 5020- bpo-32259: The error message of a TypeError raised when unpack 5021 non-iterable is now more specific. 5022 5023- bpo-27169: The ``__debug__`` constant is now optimized out at compile 5024 time. This fixes also bpo-22091. 5025 5026- bpo-32329: The :option:`-R` option now turns on hash randomization when 5027 the :envvar:`PYTHONHASHSEED` environment variable is set to ``0``. 5028 Previously, the option was ignored. Moreover, 5029 ``sys.flags.hash_randomization`` is now properly set to 0 when hash 5030 randomization is turned off by ``PYTHONHASHSEED=0``. 5031 5032- bpo-30416: The optimizer is now protected from spending much time doing 5033 complex calculations and consuming much memory for creating large 5034 constants in constant folding. Increased limits for constants that can be 5035 produced in constant folding. 5036 5037- bpo-32282: Fix an unnecessary ifdef in the include of VersionHelpers.h in 5038 socketmodule on Windows. 5039 5040- bpo-30579: Implement TracebackType.__new__ to allow Python-level creation 5041 of traceback objects, and make TracebackType.tb_next mutable. 5042 5043- bpo-32260: Don't byte swap the input keys to the SipHash algorithm on 5044 big-endian platforms. This should ensure siphash gives consistent results 5045 across platforms. 5046 5047- bpo-31506: Improve the error message logic for object.__new__ and 5048 object.__init__. Patch by Sanyam Khurana. 5049 5050- bpo-20361: ``-b`` and ``-bb`` now inject ``'default::BytesWarning'`` and 5051 ``error::BytesWarning`` entries into ``sys.warnoptions``, ensuring that 5052 they take precedence over any other warning filters configured via the 5053 ``-W`` option or the ``PYTHONWARNINGS`` environment variable. 5054 5055- bpo-32230: `-X dev` now injects a ``'default'`` entry into 5056 sys.warnoptions, ensuring that it behaves identically to actually passing 5057 ``-Wdefault`` at the command line. 5058 5059- bpo-29240: Add a new UTF-8 mode: implementation of the :pep:`540`. 5060 5061- bpo-32226: :pep:`560`: Add support for ``__mro_entries__`` and 5062 ``__class_getitem__``. Implemented by Ivan Levkivskyi. 5063 5064- bpo-32225: :pep:`562`: Add support for module ``__getattr__`` and 5065 ``__dir__``. Implemented by Ivan Levkivskyi. 5066 5067- bpo-31901: The `atexit` module now has its callback stored per 5068 interpreter. 5069 5070- bpo-31650: Implement :pep:`552` (Deterministic pycs). Python now supports 5071 invalidating bytecode cache files bashed on a source content hash rather 5072 than source last-modified time. 5073 5074- bpo-29469: Move constant folding from bytecode layer to AST layer. 5075 Original patch by Eugene Toder. 5076 5077Library 5078------- 5079 5080- bpo-32506: Now that dict is defined as keeping insertion order, drop 5081 OrderedDict and just use plain dict. 5082 5083- bpo-32279: Add params to dataclasses.make_dataclasses(): init, repr, eq, 5084 order, hash, and frozen. Pass them through to dataclass(). 5085 5086- bpo-32278: Make type information optional on dataclasses.make_dataclass(). 5087 If omitted, the string 'typing.Any' is used. 5088 5089- bpo-32499: Add dataclasses.is_dataclass(obj), which returns True if obj is 5090 a dataclass or an instance of one. 5091 5092- bpo-32468: Improve frame repr() to mention filename, code name and current 5093 line number. 5094 5095- bpo-23749: asyncio: Implement loop.start_tls() 5096 5097- bpo-32441: Return the new file descriptor (i.e., the second argument) from 5098 ``os.dup2``. Previously, ``None`` was always returned. 5099 5100- bpo-32422: ``functools.lru_cache`` uses less memory (3 words for each 5101 cached key) and takes about 1/3 time for cyclic GC. 5102 5103- bpo-31721: Prevent Python crash from happening when Future._log_traceback 5104 is set to True manually. Now it can only be set to False, or a ValueError 5105 is raised. 5106 5107- bpo-32415: asyncio: Add Task.get_loop() and Future.get_loop() 5108 5109- bpo-26133: Don't unsubscribe signals in asyncio UNIX event loop on 5110 interpreter shutdown. 5111 5112- bpo-32363: Make asyncio.Task.set_exception() and set_result() raise 5113 NotImplementedError. Task._step() and Future.__await__() raise proper 5114 exceptions when they are in an invalid state, instead of raising an 5115 AssertionError. 5116 5117- bpo-32357: Optimize asyncio.iscoroutine() and loop.create_task() for 5118 non-native coroutines (e.g. async/await compiled with Cython). 5119 5120 'loop.create_task(python_coroutine)' used to be 20% faster than 5121 'loop.create_task(cython_coroutine)'. Now, the latter is as fast. 5122 5123- bpo-32356: asyncio.transport.resume_reading() and pause_reading() are now 5124 idempotent. New transport.is_reading() method is added. 5125 5126- bpo-32355: Optimize asyncio.gather(); now up to 15% faster. 5127 5128- bpo-32351: Use fastpath in asyncio.sleep if delay<0 (2x boost) 5129 5130- bpo-32348: Optimize asyncio.Future schedule/add/remove callback. The 5131 optimization shows 3-6% performance improvements of async/await code. 5132 5133- bpo-32331: Fix socket.settimeout() and socket.setblocking() to keep 5134 socket.type as is. Fix socket.socket() constructor to reset any bit flags 5135 applied to socket's type. This change only affects OSes that have 5136 SOCK_NONBLOCK and/or SOCK_CLOEXEC. 5137 5138- bpo-32248: Add :class:`importlib.abc.ResourceReader` as an ABC for loaders 5139 to provide a unified API for reading resources contained within packages. 5140 Also add :mod:`importlib.resources` as the port of 5141 ``importlib_resources``. 5142 5143- bpo-32311: Implement asyncio.create_task(coro) shortcut 5144 5145- bpo-32327: Convert asyncio functions that were documented as coroutines to 5146 coroutines. Affected functions: loop.sock_sendall, loop.sock_recv, 5147 loop.sock_accept, loop.getaddrinfo, loop.getnameinfo. 5148 5149- bpo-32323: :func:`urllib.parse.urlsplit()` does not convert zone-id 5150 (scope) to lower case for scoped IPv6 addresses in hostnames now. 5151 5152- bpo-32302: Fix bdist_wininst of distutils for CRT v142: it binary 5153 compatible with CRT v140. 5154 5155- bpo-29711: Fix ``stop_serving`` in asyncio proactor loop kill all 5156 listening servers 5157 5158- bpo-32308: :func:`re.sub()` now replaces empty matches adjacent to a 5159 previous non-empty match. 5160 5161- bpo-29970: Abort asyncio SSLProtocol connection if handshake not complete 5162 within 10s 5163 5164- bpo-32314: Implement asyncio.run(). 5165 5166- bpo-17852: Revert incorrect fix based on misunderstanding of 5167 _Py_PyAtExit() semantics. 5168 5169- bpo-32296: Implement asyncio._get_running_loop() and get_event_loop() in 5170 C. This makes them 4x faster. 5171 5172- bpo-32250: Implement ``asyncio.current_task()`` and 5173 ``asyncio.all_tasks()``. Add helpers intended to be used by alternative 5174 task implementations: ``asyncio._register_task``, ``asyncio._enter_task``, 5175 ``asyncio._leave_task`` and ``asyncio._unregister_task``. Deprecate 5176 ``asyncio.Task.current_task()`` and ``asyncio.Task.all_tasks()``. 5177 5178- bpo-32255: A single empty field is now always quoted when written into a 5179 CSV file. This allows to distinguish an empty row from a row consisting of 5180 a single empty field. Patch by Licht Takeuchi. 5181 5182- bpo-32277: Raise ``NotImplementedError`` instead of ``SystemError`` on 5183 platforms where ``chmod(..., follow_symlinks=False)`` is not supported. 5184 Patch by Anthony Sottile. 5185 5186- bpo-30050: New argument warn_on_full_buffer to signal.set_wakeup_fd lets 5187 you control whether Python prints a warning on stderr when the wakeup fd 5188 buffer overflows. 5189 5190- bpo-29137: The ``fpectl`` library has been removed. It was never enabled 5191 by default, never worked correctly on x86-64, and it changed the Python 5192 ABI in ways that caused unexpected breakage of C extensions. 5193 5194- bpo-32273: Move asyncio.test_utils to test.test_asyncio. 5195 5196- bpo-32272: Remove asyncio.async() function. 5197 5198- bpo-32269: Add asyncio.get_running_loop() function. 5199 5200- bpo-32265: All class and static methods of builtin types now are correctly 5201 classified by inspect.classify_class_attrs() and grouped in pydoc ouput. 5202 Added types.ClassMethodDescriptorType for unbound class methods of builtin 5203 types. 5204 5205- bpo-32253: Deprecate ``yield from lock``, ``await lock``, ``with (yield 5206 from lock)`` and ``with await lock`` for asyncio synchronization 5207 primitives. 5208 5209- bpo-22589: Changed MIME type of .bmp from 'image/x-ms-bmp' to 'image/bmp' 5210 5211- bpo-32193: Convert asyncio to use *async/await* syntax. Old styled ``yield 5212 from`` is still supported too. 5213 5214- bpo-32206: Add support to run modules with pdb 5215 5216- bpo-32227: ``functools.singledispatch`` now supports registering 5217 implementations using type annotations. 5218 5219- bpo-15873: Added new alternate constructors 5220 :meth:`datetime.datetime.fromisoformat`, 5221 :meth:`datetime.time.fromisoformat` and 5222 :meth:`datetime.date.fromisoformat` as the inverse operation of each 5223 classes's respective ``isoformat`` methods. 5224 5225- bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link 5226 list'. 5227 5228- bpo-32143: os.statvfs() includes the f_fsid field from statvfs(2) 5229 5230- bpo-26439: Fix ctypes.util.find_library() for AIX by implementing 5231 ctypes._aix.find_library() Patch by: Michael Felt 5232 5233- bpo-31993: The pickler now uses less memory when serializing large bytes 5234 and str objects into a file. Pickles created with protocol 4 will require 5235 less memory for unpickling large bytes and str objects. 5236 5237- bpo-27456: Ensure TCP_NODELAY is set on Linux. Tests by Victor Stinner. 5238 5239- bpo-31778: ast.literal_eval() is now more strict. Addition and subtraction 5240 of arbitrary numbers no longer allowed. 5241 5242- bpo-31802: Importing native path module (``posixpath``, ``ntpath``) now 5243 works even if the ``os`` module still is not imported. 5244 5245- bpo-30241: Add contextlib.AbstractAsyncContextManager. Patch by Jelle 5246 Zijlstra. 5247 5248- bpo-31699: Fix deadlocks in 5249 :class:`concurrent.futures.ProcessPoolExecutor` when task arguments or 5250 results cause pickling or unpickling errors. This should make sure that 5251 calls to the :class:`ProcessPoolExecutor` API always eventually return. 5252 5253- bpo-15216: ``TextIOWrapper.reconfigure()`` supports changing *encoding*, 5254 *errors*, and *newline*. 5255 5256Documentation 5257------------- 5258 5259- bpo-32418: Add get_loop() method to Server and AbstractServer classes. 5260 5261Tests 5262----- 5263 5264- bpo-32252: Fix faulthandler_suppress_crash_report() used to prevent core 5265 dump files when testing crashes. getrlimit() returns zero on success. 5266 5267- bpo-32002: Adjust C locale coercion testing for the empty locale and POSIX 5268 locale cases to more readily adjust to platform dependent behaviour. 5269 5270Windows 5271------- 5272 5273- bpo-19764: Implement support for `subprocess.Popen(close_fds=True)` on 5274 Windows. Patch by Segev Finer. 5275 5276Tools/Demos 5277----------- 5278 5279- bpo-24960: 2to3 and lib2to3 can now read pickled grammar files using 5280 pkgutil.get_data() rather than probing the filesystem. This lets 2to3 and 5281 lib2to3 work when run from a zipfile. 5282 5283C API 5284----- 5285 5286- bpo-32030: Py_Initialize() doesn't reset the memory allocators to default 5287 if the ``PYTHONMALLOC`` environment variable is not set. 5288 5289- bpo-29084: Undocumented C API for OrderedDict has been excluded from the 5290 limited C API. It was added by mistake and actually never worked in the 5291 limited C API. 5292 5293- bpo-32264: Moved the pygetopt.h header into internal/, since it has no 5294 public APIs. 5295 5296- bpo-32241: :c:func:`Py_SetProgramName` and :c:func:`Py_SetPythonHome` now 5297 take the ``const wchar *`` arguments instead of ``wchar *``. 5298 5299 5300What's New in Python 3.7.0 alpha 3? 5301=================================== 5302 5303*Release date: 2017-12-05* 5304 5305Core and Builtins 5306----------------- 5307 5308- bpo-32176: co_flags.CO_NOFREE is now always set correctly by the code 5309 object constructor based on freevars and cellvars, rather than needing to 5310 be set correctly by the caller. This ensures it will be cleared 5311 automatically when additional cell references are injected into a modified 5312 code object and function. 5313 5314- bpo-10544: Yield expressions are now deprecated in comprehensions and 5315 generator expressions. They are still permitted in the definition of the 5316 outermost iterable, as that is evaluated directly in the enclosing scope. 5317 5318- bpo-32137: The repr of deeply nested dict now raises a RecursionError 5319 instead of crashing due to a stack overflow. 5320 5321- bpo-32096: Revert memory allocator changes in the C API: move structures 5322 back from _PyRuntime to Objects/obmalloc.c. The memory allocators are once 5323 again initialized statically, and so PyMem_RawMalloc() and 5324 Py_DecodeLocale() can be called before _PyRuntime_Initialize(). 5325 5326- bpo-32043: Add a new "developer mode": new "-X dev" command line option to 5327 enable debug checks at runtime. 5328 5329- bpo-32023: SyntaxError is now correctly raised when a generator expression 5330 without parenthesis is used instead of an inheritance list in a class 5331 definition. The duplication of the parentheses can be omitted only on 5332 calls. 5333 5334- bpo-32012: SyntaxError is now correctly raised when a generator expression 5335 without parenthesis is passed as an argument, but followed by a trailing 5336 comma. A generator expression always needs to be directly inside a set of 5337 parentheses and cannot have a comma on either side. 5338 5339- bpo-28180: A new internal ``_Py_SetLocaleFromEnv(category)`` helper 5340 function has been added in order to improve the consistency of behaviour 5341 across different ``libc`` implementations (e.g. Android doesn't support 5342 setting the locale from the environment by default). 5343 5344- bpo-31949: Fixed several issues in printing tracebacks 5345 (PyTraceBack_Print()). 5346 5347 * Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks. 5348 * Setting sys.tracebacklimit to None now causes using the default limit. 5349 * Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using 5350 the limit LONG_MAX rather than the default limit. 5351 * Fixed integer overflows in the case of more than 2**31 traceback items on 5352 Windows. 5353 * Fixed output errors handling. 5354 5355- bpo-30696: Fix the interactive interpreter looping endlessly when no 5356 memory. 5357 5358- bpo-20047: Bytearray methods partition() and rpartition() now accept only 5359 bytes-like objects as separator, as documented. In particular they now 5360 raise TypeError rather of returning a bogus result when an integer is 5361 passed as a separator. 5362 5363- bpo-21720: BytesWarning no longer emitted when the *fromlist* argument of 5364 ``__import__()`` or the ``__all__`` attribute of the module contain bytes 5365 instances. 5366 5367- bpo-31845: Environment variables are once more read correctly at 5368 interpreter startup. 5369 5370- bpo-28936: Ensure that lexically first syntax error involving a parameter 5371 and ``global`` or ``nonlocal`` is detected first at a given scope. Patch 5372 by Ivan Levkivskyi. 5373 5374- bpo-31825: Fixed OverflowError in the 'unicode-escape' codec and in 5375 codecs.escape_decode() when decode an escaped non-ascii byte. 5376 5377- bpo-31618: The per-frame tracing logic added in 3.7a1 has been altered so 5378 that ``frame->f_lineno`` is updated before either ``"line"`` or 5379 ``"opcode"`` events are emitted. Previously, opcode events were emitted 5380 first, and therefore would occasionally see stale line numbers on the 5381 frame. The behavior of this feature has changed slightly as a result: when 5382 both ``f_trace_lines`` and ``f_trace_opcodes`` are enabled, line events 5383 now occur first. 5384 5385- bpo-28603: Print the full context/cause chain of exceptions on interpreter 5386 exit, even if an exception in the chain is unhashable or compares equal to 5387 later ones. Patch by Zane Bitter. 5388 5389- bpo-31786: Fix timeout rounding in the select module to round correctly 5390 negative timeouts between -1.0 and 0.0. The functions now block waiting 5391 for events as expected. Previously, the call was incorrectly non-blocking. 5392 Patch by Pablo Galindo. 5393 5394- bpo-31781: Prevent crashes when calling methods of an uninitialized 5395 ``zipimport.zipimporter`` object. Patch by Oren Milman. 5396 5397- bpo-30399: Standard repr() of BaseException with a single argument no 5398 longer contains redundant trailing comma. 5399 5400- bpo-31626: Fixed a bug in debug memory allocator. There was a write to 5401 freed memory after shrinking a memory block. 5402 5403- bpo-30817: `PyErr_PrintEx()` clears now the ignored exception that may be 5404 raised by `_PySys_SetObjectId()`, for example when no memory. 5405 5406Library 5407------- 5408 5409- bpo-28556: Two minor fixes for ``typing`` module: allow shallow copying 5410 instances of generic classes, improve interaction of ``__init_subclass__`` 5411 with generics. Original PRs by Ivan Levkivskyi. 5412 5413- bpo-32214: PEP 557, Data Classes. Provides a decorator which adds 5414 boilerplate methods to classes which use type annotations so specify 5415 fields. 5416 5417- bpo-27240: The header folding algorithm for the new email policies has 5418 been rewritten, which also fixes bpo-30788, bpo-31831, and bpo-32182. In 5419 particular, RFC2231 folding is now done correctly. 5420 5421- bpo-32186: io.FileIO.readall() and io.FileIO.read() now release the GIL 5422 when getting the file size. Fixed hang of all threads with inaccessible 5423 NFS server. Patch by Nir Soffer. 5424 5425- bpo-321010: Add :attr:`sys.flags.dev_mode` flag 5426 5427- bpo-32154: The ``asyncio.windows_utils.socketpair()`` function has been 5428 removed: use directly :func:`socket.socketpair` which is available on all 5429 platforms since Python 3.5 (before, it wasn't available on Windows). 5430 ``asyncio.windows_utils.socketpair()`` was just an alias to 5431 ``socket.socketpair`` on Python 3.5 and newer. 5432 5433- bpo-32089: warnings: In development (-X dev) and debug mode (pydebug 5434 build), use the "default" action for ResourceWarning, rather than the 5435 "always" action, in the default warnings filters. 5436 5437- bpo-32107: ``uuid.getnode()`` now preferentially returns universally 5438 administered MAC addresses if available, over locally administered MAC 5439 addresses. This makes a better guarantee for global uniqueness of UUIDs 5440 returned from ``uuid.uuid1()``. If only locally administered MAC 5441 addresses are available, the first such one found is returned. 5442 5443- bpo-23033: Wildcard is now supported in hostname when it is one and only 5444 character in the left most segment of hostname in second argument of 5445 :meth:`ssl.match_hostname`. Patch by Mandeep Singh. 5446 5447- bpo-12239: Make :meth:`msilib.SummaryInformation.GetProperty` return 5448 ``None`` when the value of property is ``VT_EMPTY``. Initial patch by 5449 Mark Mc Mahon. 5450 5451- bpo-28334: Use :func:`os.path.expanduser` to find the ``~/.netrc`` file in 5452 :class:`netrc.netrc`. If it does not exist, :exc:`FileNotFoundError` is 5453 raised. Patch by Dimitri Merejkowsky. 5454 5455- bpo-32121: Made ``tracemalloc.Traceback`` behave more like the traceback 5456 module, sorting the frames from oldest to most recent. 5457 ``Traceback.format()`` now accepts negative *limit*, truncating the result 5458 to the ``abs(limit)`` oldest frames. To get the old behaviour, one can use 5459 the new *most_recent_first* argument to ``Traceback.format()``. (Patch by 5460 Jesse Bakker.) 5461 5462- bpo-31325: Fix wrong usage of :func:`collections.namedtuple` in the 5463 :meth:`RobotFileParser.parse() <urllib.robotparser.RobotFileParser.parse>` 5464 method. 5465 5466 Initial patch by Robin Wellner. 5467 5468- bpo-12382: :func:`msilib.OpenDatabase` now raises a better exception 5469 message when it couldn't open or create an MSI file. Initial patch by 5470 William Tisäter. 5471 5472- bpo-19610: ``setup()`` now warns about invalid types for some fields. 5473 5474 The ``distutils.dist.Distribution`` class now warns when ``classifiers``, 5475 ``keywords`` and ``platforms`` fields are not specified as a list or a 5476 string. 5477 5478- bpo-32071: Added the ``-k`` command-line option to ``python -m unittest`` 5479 to run only tests that match the given pattern(s). 5480 5481- bpo-10049: Added *nullcontext* no-op context manager to contextlib. This 5482 provides a simpler and faster alternative to ExitStack() when handling 5483 optional context managers. 5484 5485- bpo-28684: The new test.support.skip_unless_bind_unix_socket() decorator 5486 is used here to skip asyncio tests that fail because the platform lacks a 5487 functional bind() function for unix domain sockets (as it is the case for 5488 non root users on the recent Android versions that run now SELinux in 5489 enforcing mode). 5490 5491- bpo-32110: ``codecs.StreamReader.read(n)`` now returns not more than *n* 5492 characters/bytes for non-negative *n*. This makes it compatible with 5493 ``read()`` methods of other file-like objects. 5494 5495- bpo-27535: The warnings module doesn't leak memory anymore in the hidden 5496 warnings registry for the "ignore" action of warnings filters. 5497 warn_explicit() function doesn't add the warning key to the registry 5498 anymore for the "ignore" action. 5499 5500- bpo-32088: warnings: When Python is build is debug mode (``Py_DEBUG``), 5501 :exc:`DeprecationWarning`, :exc:`PendingDeprecationWarning` and 5502 :exc:`ImportWarning` warnings are now displayed by default. 5503 5504- bpo-1647489: Fixed searching regular expression patterns that could match 5505 an empty string. Non-empty string can now be correctly found after 5506 matching an empty string. 5507 5508- bpo-25054: Added support of splitting on a pattern that could match an 5509 empty string. 5510 5511- bpo-32072: Fixed issues with binary plists: 5512 5513 * Fixed saving bytearrays. 5514 * Identical objects will be saved only once. 5515 * Equal references will be load as identical objects. 5516 * Added support for saving and loading recursive data structures. 5517 5518- bpo-32069: Drop legacy SSL transport from asyncio, ssl.MemoryBIO is always 5519 used anyway. 5520 5521- bpo-32066: asyncio: Support pathlib.Path in create_unix_connection; sock 5522 arg should be optional 5523 5524- bpo-32046: Updates 2to3 to convert from operator.isCallable(obj) to 5525 callable(obj). Patch by Dong-hee Na. 5526 5527- bpo-32018: inspect.signature should follow PEP 8, if the parameter has an 5528 annotation and a default value. Patch by Dong-hee Na. 5529 5530- bpo-32025: Add time.thread_time() and time.thread_time_ns() 5531 5532- bpo-32037: Integers that fit in a signed 32-bit integer will be now 5533 pickled with protocol 0 using the INT opcode. This will decrease the size 5534 of a pickle, speed up pickling and unpickling, and make these integers be 5535 unpickled as int instances in Python 2. 5536 5537- bpo-32034: Make asyncio.IncompleteReadError and LimitOverrunError 5538 pickleable. 5539 5540- bpo-32015: Fixed the looping of asyncio in the case of reconnection the 5541 socket during waiting async read/write from/to the socket. 5542 5543- bpo-32011: Restored support of loading marshal files with the TYPE_INT64 5544 code. These files can be produced in Python 2.7. 5545 5546- bpo-28369: Enhance add_reader/writer check that socket is not used by some 5547 transport. Before, only cases when add_reader/writer were called with an 5548 int FD were supported. Now the check is implemented correctly for all 5549 file-like objects. 5550 5551- bpo-31976: Fix race condition when flushing a file is slow, which can 5552 cause a segfault if closing the file from another thread. 5553 5554- bpo-31985: Formally deprecated aifc.openfp, sunau.openfp, and wave.openfp. 5555 Since change 7bc817d5ba917528e8bd07ec461c635291e7b06a in 1993, openfp in 5556 each of the three modules had been pointing to that module's open function 5557 as a matter of backwards compatibility, though it had been both untested 5558 and undocumented. 5559 5560- bpo-21862: cProfile command line now accepts `-m module_name` as an 5561 alternative to script path. Patch by Sanyam Khurana. 5562 5563- bpo-31970: Reduce performance overhead of asyncio debug mode. 5564 5565- bpo-31843: *database* argument of sqlite3.connect() now accepts a 5566 :term:`path-like object`, instead of just a string. 5567 5568- bpo-31945: Add Configurable *blocksize* to ``HTTPConnection`` and 5569 ``HTTPSConnection`` for improved upload throughput. Patch by Nir Soffer. 5570 5571- bpo-31943: Add a ``cancelled()`` method to :class:`asyncio.Handle`. Patch 5572 by Marat Sharafutdinov. 5573 5574- bpo-9678: Fixed determining the MAC address in the uuid module: 5575 5576 * Using ifconfig on NetBSD and OpenBSD. 5577 * Using arp on Linux, FreeBSD, NetBSD and OpenBSD. 5578 5579 Based on patch by Takayuki Shimizukawa. 5580 5581- bpo-30057: Fix potential missed signal in signal.signal(). 5582 5583- bpo-31933: Fix Blake2 params leaf_size and node_offset on big endian 5584 platforms. Patch by Jack O'Connor. 5585 5586- bpo-21423: Add an initializer argument to {Process,Thread}PoolExecutor 5587 5588- bpo-31927: Fixed compilation of the socket module on NetBSD 8. Fixed 5589 assertion failure or reading arbitrary data when parse a AF_BLUETOOTH 5590 address on NetBSD and DragonFly BSD. 5591 5592- bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse() 5593 when the size of types chtype or mmask_t is less than the size of C long. 5594 curses.box() now accepts characters as arguments. Based on patch by Steve 5595 Fink. 5596 5597- bpo-31917: Add 3 new clock identifiers: :data:`time.CLOCK_BOOTTIME`, 5598 :data:`time.CLOCK_PROF` and :data:`time.CLOCK_UPTIME`. 5599 5600- bpo-31897: plistlib now catches more errors when read binary plists and 5601 raises InvalidFileException instead of unexpected exceptions. 5602 5603- bpo-25720: Fix the method for checking pad state of curses WINDOW. Patch 5604 by Masayuki Yamamoto. 5605 5606- bpo-31893: Fixed the layout of the kqueue_event structure on OpenBSD and 5607 NetBSD. Fixed the comparison of the kqueue_event objects. 5608 5609- bpo-31891: Fixed building the curses module on NetBSD. 5610 5611- bpo-31884: added required constants to subprocess module for setting 5612 priority on windows 5613 5614- bpo-28281: Remove year (1-9999) limits on the Calendar.weekday() function. 5615 5616 Patch by Mark Gollahon. 5617 5618- bpo-31702: crypt.mksalt() now allows to specify the number of rounds for 5619 SHA-256 and SHA-512 hashing. 5620 5621- bpo-30639: :func:`inspect.getfile` no longer computes the repr of unknown 5622 objects to display in an error message, to protect against badly behaved 5623 custom reprs. 5624 5625- bpo-30768: Fix the pthread+semaphore implementation of 5626 PyThread_acquire_lock_timed() when called with timeout > 0 and 5627 intr_flag=0: recompute the timeout if sem_timedwait() is interrupted by a 5628 signal (EINTR). See also the :pep:`475`. 5629 5630- bpo-31854: Add ``mmap.ACCESS_DEFAULT`` constant. 5631 5632- bpo-31834: Use optimized code for BLAKE2 only with SSSE3+. The pure SSE2 5633 implementation is slower than the pure C reference implementation. 5634 5635- bpo-28292: Calendar.itermonthdates() will now consistently raise an 5636 exception when a date falls outside of the 0001-01-01 through 9999-12-31 5637 range. To support applications that cannot tolerate such exceptions, the 5638 new methods itermonthdays3() and itermonthdays4() are added. The new 5639 methods return tuples and are not restricted by the range supported by 5640 datetime.date. 5641 5642- bpo-28564: The shutil.rmtree() function has been sped up to 20--40%. This 5643 was done using the os.scandir() function. 5644 5645- bpo-28416: Instances of pickle.Pickler subclass with the persistent_id() 5646 method and pickle.Unpickler subclass with the persistent_load() method no 5647 longer create reference cycles. 5648 5649- bpo-31653: Don't release the GIL if we can acquire a multiprocessing 5650 semaphore immediately. 5651 5652- bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed 5653 or None. 5654 5655- bpo-20825: Add `subnet_of` and `superset_of` containment tests to 5656 :class:`ipaddress.IPv6Network` and :class:`ipaddress.IPv4Network`. Patch 5657 by Michel Albert and Cheryl Sabella. 5658 5659- bpo-31827: Remove the os.stat_float_times() function. It was introduced in 5660 Python 2.3 for backward compatibility with Python 2.2, and was deprecated 5661 since Python 3.1. 5662 5663- bpo-31756: Add a ``subprocess.Popen(text=False)`` keyword argument to 5664 `subprocess` functions to be more explicit about when the library should 5665 attempt to decode outputs into text. Patch by Andrew Clegg. 5666 5667- bpo-31819: Add AbstractEventLoop.sock_recv_into(). 5668 5669- bpo-31457: If nested log adapters are used, the inner ``process()`` 5670 methods are no longer omitted. 5671 5672- bpo-31457: The ``manager`` property on LoggerAdapter objects is now 5673 properly settable. 5674 5675- bpo-31806: Fix timeout rounding in time.sleep(), threading.Lock.acquire() 5676 and socket.socket.settimeout() to round correctly negative timeouts 5677 between -1.0 and 0.0. The functions now block waiting for events as 5678 expected. Previously, the call was incorrectly non-blocking. Patch by 5679 Pablo Galindo. 5680 5681- bpo-31803: time.clock() and time.get_clock_info('clock') now emit a 5682 DeprecationWarning warning. 5683 5684- bpo-31800: Extended support for parsing UTC offsets. strptime '%z' can now 5685 parse the output generated by datetime.isoformat, including seconds and 5686 microseconds. 5687 5688- bpo-28603: traceback: Fix a TypeError that occurred during printing of 5689 exception tracebacks when either the current exception or an exception in 5690 its context/cause chain is unhashable. Patch by Zane Bitter. 5691 5692- bpo-30541: Add new function to seal a mock and prevent the automatically 5693 creation of child mocks. Patch by Mario Corchero. 5694 5695- bpo-31784: Implement the :pep:`564`, add new 6 new functions with 5696 nanosecond resolution to the :mod:`time` module: 5697 :func:`~time.clock_gettime_ns`, :func:`~time.clock_settime_ns`, 5698 :func:`~time.monotonic_ns`, :func:`~time.perf_counter_ns`, 5699 :func:`~time.process_time_ns`, :func:`~time.time_ns`. 5700 5701- bpo-30143: 2to3 now generates a code that uses abstract collection classes 5702 from collections.abc rather than collections. 5703 5704- bpo-31770: Prevent a crash when calling the ``__init__()`` method of a 5705 ``sqlite3.Cursor`` object more than once. Patch by Oren Milman. 5706 5707- bpo-31764: Prevent a crash in ``sqlite3.Cursor.close()`` in case the 5708 ``Cursor`` object is uninitialized. Patch by Oren Milman. 5709 5710- bpo-31752: Fix possible crash in timedelta constructor called with custom 5711 integers. 5712 5713- bpo-31620: an empty asyncio.Queue now doesn't leak memory when queue.get 5714 pollers timeout 5715 5716- bpo-31690: Allow the flags re.ASCII, re.LOCALE, and re.UNICODE to be used 5717 as group flags for regular expressions. 5718 5719- bpo-30349: FutureWarning is now emitted if a regular expression contains 5720 character set constructs that will change semantically in the future 5721 (nested sets and set operations). 5722 5723- bpo-31664: Added support for the Blowfish hashing in the crypt module. 5724 5725- bpo-31632: Fix method set_protocol() of class _SSLProtocolTransport in 5726 asyncio module. This method was previously modifying a wrong reference to 5727 the protocol. 5728 5729- bpo-15037: Added a workaround for getkey() in curses for ncurses 5.7 and 5730 earlier. 5731 5732- bpo-31307: Allow use of bytes objects for arguments to 5733 :meth:`configparser.ConfigParser.read`. Patch by Vincent Michel. 5734 5735- bpo-31334: Fix ``poll.poll([timeout])`` in the ``select`` module for 5736 arbitrary negative timeouts on all OSes where it can only be a 5737 non-negative integer or -1. Patch by Riccardo Coccioli. 5738 5739- bpo-31310: multiprocessing's semaphore tracker should be launched again if 5740 crashed. 5741 5742- bpo-31308: Make multiprocessing's forkserver process immune to Ctrl-C and 5743 other user interruptions. If it crashes, restart it when necessary. 5744 5745- bpo-31245: Added support for AF_UNIX socket in asyncio 5746 `create_datagram_endpoint`. 5747 5748- bpo-30553: Add HTTP/2 status code 421 (Misdirected Request) to 5749 :class:`http.HTTPStatus`. Patch by Vitor Pereira. 5750 5751Documentation 5752------------- 5753 5754- bpo-32105: Added asyncio.BaseEventLoop.connect_accepted_socket 5755 versionadded marker. 5756 5757Tests 5758----- 5759 5760- bpo-31380: Skip test_httpservers test_undecodable_file on macOS: fails on 5761 APFS. 5762 5763- bpo-31705: Skip test_socket.test_sha256() on Linux kernel older than 4.5. 5764 The test fails with ENOKEY on kernel 3.10 (on ppc64le). A fix was merged 5765 into the kernel 4.5. 5766 5767- bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV and 5768 remove the test.support.requires_android_level decorator. 5769 5770- bpo-32136: The runtime embedding tests have been split out from 5771 ``Lib/test/test_capi.py`` into a new ``Lib/test/test_embed.py`` file. 5772 5773- bpo-28668: test.support.requires_multiprocessing_queue is removed. Skip 5774 tests with test.support.import_module('multiprocessing.synchronize') 5775 instead when the semaphore implementation is broken or missing. 5776 5777- bpo-32126: Skip test_get_event_loop_new_process in 5778 test.test_asyncio.test_events when sem_open() is not functional. 5779 5780- bpo-31174: Fix test_tools.test_unparse: DirectoryTestCase now stores the 5781 names sample to always test the same files. It prevents false alarms when 5782 hunting reference leaks. 5783 5784Build 5785----- 5786 5787- bpo-28538: Revert the previous changes, the if_nameindex structure is 5788 defined by Unified Headers. 5789 5790- bpo-28762: Revert the last commit, the F_LOCK macro is defined by Android 5791 Unified Headers. 5792 5793- bpo-29040: Support building Android with Unified Headers. The first NDK 5794 release to support Unified Headers is android-ndk-r14. 5795 5796- bpo-32059: ``detect_modules()`` in ``setup.py`` now also searches the 5797 sysroot paths when cross-compiling. 5798 5799- bpo-31957: Fixes Windows SDK version detection when building for Windows. 5800 5801- bpo-31609: Fixes quotes in PCbuild/clean.bat 5802 5803- bpo-31934: Abort the build when building out of a not clean source tree. 5804 5805- bpo-31926: Fixed Argument Clinic sometimes causing compilation errors when 5806 there was more than one function and/or method in a .c file with the same 5807 name. 5808 5809- bpo-28791: Update Windows builds to use SQLite 3.21.0. 5810 5811- bpo-28791: Update OS X installer to use SQLite 3.21.0. 5812 5813- bpo-28643: Record profile-opt build progress with stamp files. 5814 5815- bpo-31866: Finish removing support for AtheOS. 5816 5817Windows 5818------- 5819 5820- bpo-1102: Return ``None`` when ``View.Fetch()`` returns 5821 ``ERROR_NO_MORE_ITEMS`` instead of raising ``MSIError``. 5822 5823 Initial patch by Anthony Tuininga. 5824 5825- bpo-31944: Fixes Modify button in Apps and Features dialog. 5826 5827- bpo-20486: Implement the ``Database.Close()`` method to help closing MSI 5828 database objects. 5829 5830- bpo-31857: Make the behavior of USE_STACKCHECK deterministic in a 5831 multi-threaded environment. 5832 5833macOS 5834----- 5835 5836- bpo-31392: Update macOS installer to use OpenSSL 1.0.2m 5837 5838IDLE 5839---- 5840 5841- bpo-32207: Improve tk event exception tracebacks in IDLE. When tk event 5842 handling is driven by IDLE's run loop, a confusing and distracting 5843 queue.EMPTY traceback context is no longer added to tk event exception 5844 tracebacks. The traceback is now the same as when event handling is 5845 driven by user code. Patch based on a suggestion by Serhiy Storchaka. 5846 5847- bpo-32164: Delete unused file idlelib/tabbedpages.py. Use of TabbedPageSet 5848 in configdialog was replaced by ttk.Notebook. 5849 5850- bpo-32100: IDLE: Fix old and new bugs in pathbrowser; improve tests. Patch 5851 mostly by Cheryl Sabella. 5852 5853- bpo-31858: IDLE -- Restrict shell prompt manipulation to the shell. Editor 5854 and output windows only see an empty last prompt line. This simplifies 5855 the code and fixes a minor bug when newline is inserted. Sys.ps1, if 5856 present, is read on Shell start-up, but is not set or changed. 5857 5858- bpo-31860: The font sample in the IDLE configuration dialog is now 5859 editable. Changes persist while IDLE remains open 5860 5861- bpo-31836: Test_code_module now passes if run after test_idle, which sets 5862 ps1. 5863 5864 The code module uses sys.ps1 if present or sets it to '>>> ' if not. 5865 Test_code_module now properly tests both behaviors. Ditto for ps2. 5866 5867- bpo-28603: Fix a TypeError that caused a shell restart when printing a 5868 traceback that includes an exception that is unhashable. Patch by Zane 5869 Bitter. 5870 5871- bpo-13802: Use non-Latin characters in the IDLE's Font settings sample. 5872 Even if one selects a font that defines a limited subset of the unicode 5873 Basic Multilingual Plane, tcl/tk will use other fonts that define a 5874 character. The expanded example give users of non-Latin characters a 5875 better idea of what they might see in IDLE's shell and editors. 5876 5877 To make room for the expanded sample, frames on the Font tab are 5878 re-arranged. The Font/Tabs help explains a bit about the additions. 5879 5880Tools/Demos 5881----------- 5882 5883- bpo-32159: Remove CVS and Subversion tools: remove svneol.py and 5884 treesync.py scripts. CPython migrated from CVS to Subversion, to 5885 Mercurial, and then to Git. CVS and Subversion are no longer used to 5886 develop CPython. 5887 5888- bpo-30722: Make redemo work with Python 3.6 and newer versions. 5889 5890 Also, remove the ``LOCALE`` option since it doesn't work with string 5891 patterns in Python 3. 5892 5893 Patch by Christoph Sarnowski. 5894 5895C API 5896----- 5897 5898- bpo-20891: Fix PyGILState_Ensure(). When PyGILState_Ensure() is called in 5899 a non-Python thread before PyEval_InitThreads(), only call 5900 PyEval_InitThreads() after calling PyThreadState_New() to fix a crash. 5901 5902- bpo-32125: The ``Py_UseClassExceptionsFlag`` flag has been removed. It was 5903 deprecated and wasn't used anymore since Python 2.0. 5904 5905- bpo-25612: Move the current exception state from the frame object to the 5906 co-routine. This simplifies the interpreter and fixes a couple of obscure 5907 bugs caused by having swap exception state when entering or exiting a 5908 generator. 5909 5910- bpo-23699: Add Py_RETURN_RICHCOMPARE macro to reduce boilerplate code in 5911 rich comparison functions. 5912 5913- bpo-30697: The `PyExc_RecursionErrorInst` singleton is removed and 5914 `PyErr_NormalizeException()` does not use it anymore. This singleton is 5915 persistent and its members being never cleared may cause a segfault during 5916 finalization of the interpreter. See also issue #22898. 5917 5918 5919What's New in Python 3.7.0 alpha 2? 5920=================================== 5921 5922*Release date: 2017-10-16* 5923 5924Core and Builtins 5925----------------- 5926 5927- bpo-31558: ``gc.freeze()`` is a new API that allows for moving all objects 5928 currently tracked by the garbage collector to a permanent generation, 5929 effectively removing them from future collection events. This can be used 5930 to protect those objects from having their PyGC_Head mutated. In effect, 5931 this enables great copy-on-write stability at fork(). 5932 5933- bpo-31642: Restored blocking "from package import module" by setting 5934 sys.modules["package.module"] to None. 5935 5936- bpo-31708: Allow use of asynchronous generator expressions in synchronous 5937 functions. 5938 5939- bpo-31709: Drop support of asynchronous __aiter__. 5940 5941- bpo-30404: The -u option now makes the stdout and stderr streams 5942 unbuffered rather than line-buffered. 5943 5944- bpo-31619: Fixed a ValueError when convert a string with large number of 5945 underscores to integer with binary base. 5946 5947- bpo-31602: Fix an assertion failure in `zipimporter.get_source()` in case 5948 of a bad `zlib.decompress()`. Patch by Oren Milman. 5949 5950- bpo-31592: Fixed an assertion failure in Python parser in case of a bad 5951 `unicodedata.normalize()`. Patch by Oren Milman. 5952 5953- bpo-31588: Raise a `TypeError` with a helpful error message when class 5954 creation fails due to a metaclass with a bad ``__prepare__()`` method. 5955 Patch by Oren Milman. 5956 5957- bpo-31574: Importlib was instrumented with two dtrace probes to profile 5958 import timing. 5959 5960- bpo-31566: Fix an assertion failure in `_warnings.warn()` in case of a bad 5961 ``__name__`` global. Patch by Oren Milman. 5962 5963- bpo-31506: Improved the error message logic for object.__new__ and 5964 object.__init__. 5965 5966- bpo-31505: Fix an assertion failure in `json`, in case 5967 `_json.make_encoder()` received a bad `encoder()` argument. Patch by Oren 5968 Milman. 5969 5970- bpo-31492: Fix assertion failures in case of failing to import from a 5971 module with a bad ``__name__`` attribute, and in case of failing to access 5972 an attribute of such a module. Patch by Oren Milman. 5973 5974- bpo-31478: Fix an assertion failure in `_random.Random.seed()` in case the 5975 argument has a bad ``__abs__()`` method. Patch by Oren Milman. 5976 5977- bpo-31336: Speed up class creation by 10-20% by reducing the overhead in 5978 the necessary special method lookups. Patch by Stefan Behnel. 5979 5980- bpo-31415: Add ``-X importtime`` option to show how long each import 5981 takes. It can be used to optimize application's startup time. Support the 5982 :envvar:`PYTHONPROFILEIMPORTTIME` as an equivalent way to enable this. 5983 5984- bpo-31410: Optimized calling wrapper and classmethod descriptors. 5985 5986- bpo-31353: :pep:`553` - Add a new built-in called ``breakpoint()`` which 5987 calls ``sys.breakpointhook()``. By default this imports ``pdb`` and calls 5988 ``pdb.set_trace()``, but users may override ``sys.breakpointhook()`` to 5989 call whatever debugger they want. The original value of the hook is saved 5990 in ``sys.__breakpointhook__``. 5991 5992- bpo-17852: Maintain a list of open buffered files, flush them before 5993 exiting the interpreter. Based on a patch from Armin Rigo. 5994 5995- bpo-31315: Fix an assertion failure in imp.create_dynamic(), when 5996 spec.name is not a string. Patch by Oren Milman. 5997 5998- bpo-31311: Fix a crash in the ``__setstate__()`` method of 5999 `ctypes._CData`, in case of a bad ``__dict__``. Patch by Oren Milman. 6000 6001- bpo-31293: Fix crashes in true division and multiplication of a timedelta 6002 object by a float with a bad as_integer_ratio() method. Patch by Oren 6003 Milman. 6004 6005- bpo-31285: Fix an assertion failure in `warnings.warn_explicit`, when the 6006 return value of the received loader's get_source() has a bad splitlines() 6007 method. Patch by Oren Milman. 6008 6009- bpo-30406: Make ``async`` and ``await`` proper keywords, as specified in 6010 PEP 492. 6011 6012Library 6013------- 6014 6015- bpo-30058: Fixed buffer overflow in select.kqueue.control(). 6016 6017- bpo-31672: ``idpattern`` in ``string.Template`` matched some non-ASCII 6018 characters. Now it uses ``-i`` regular expression local flag to avoid 6019 non-ASCII characters. 6020 6021- bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM 6022 exceptions. 6023 6024- bpo-31728: Prevent crashes in `_elementtree` due to unsafe cleanup of 6025 `Element.text` and `Element.tail`. Patch by Oren Milman. 6026 6027- bpo-31671: Now ``re.compile()`` converts passed RegexFlag to normal int 6028 object before compiling. bm_regex_compile benchmark shows 14% performance 6029 improvements. 6030 6031- bpo-30397: The types of compiled regular objects and match objects are now 6032 exposed as `re.Pattern` and `re.Match`. This adds information in pydoc 6033 output for the re module. 6034 6035- bpo-31675: Fixed memory leaks in Tkinter's methods splitlist() and split() 6036 when pass a string larger than 2 GiB. 6037 6038- bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). 6039 6040- bpo-31648: Improvements to path predicates in ElementTree: 6041 6042 * Allow whitespace around predicate parts, i.e. "[a = 'text']" instead of requiring the less readable "[a='text']". 6043 * Add support for text comparison of the current node, like "[.='text']". 6044 6045 Patch by Stefan Behnel. 6046 6047- bpo-30806: Fix the string representation of a netrc object. 6048 6049- bpo-31638: Add optional argument ``compressed`` to 6050 ``zipapp.create_archive``, and add option ``--compress`` to the command 6051 line interface of ``zipapp``. 6052 6053- bpo-25351: Avoid venv activate failures with undefined variables 6054 6055- bpo-20519: Avoid ctypes use (if possible) and improve import time for 6056 uuid. 6057 6058- bpo-28293: The regular expression cache is no longer completely dumped 6059 when it is full. 6060 6061- bpo-31596: Added pthread_getcpuclockid() to the time module 6062 6063- bpo-27494: Make 2to3 accept a trailing comma in generator expressions. For 6064 example, ``set(x for x in [],)`` is now allowed. 6065 6066- bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() 6067 iterators. 6068 6069- bpo-30346: An iterator produced by itertools.groupby() iterator now 6070 becomes exhausted after advancing the groupby iterator. 6071 6072- bpo-31556: Cancel asyncio.wait_for future faster if timeout <= 0 6073 6074- bpo-31540: Allow passing a context object in 6075 :class:`concurrent.futures.ProcessPoolExecutor` constructor. Also, free 6076 job resources in :class:`concurrent.futures.ProcessPoolExecutor` earlier 6077 to improve memory usage when a worker waits for new jobs. 6078 6079- bpo-31516: ``threading.current_thread()`` should not return a dummy thread 6080 at shutdown. 6081 6082- bpo-31525: In the sqlite module, require the sqlite3_prepare_v2 API. Thus, 6083 the sqlite module now requires sqlite version at least 3.3.9. 6084 6085- bpo-26510: argparse subparsers are now required by default. This matches 6086 behaviour in Python 2. For optional subparsers, use the new parameter 6087 ``add_subparsers(required=False)``. Patch by Anthony Sottile. (As of 6088 3.7.0rc1, the default was changed to not required as had been the case 6089 since Python 3.3.) 6090 6091- bpo-27541: Reprs of subclasses of some collection and iterator classes 6092 (`bytearray`, `array.array`, `collections.deque`, 6093 `collections.defaultdict`, `itertools.count`, `itertools.repeat`) now 6094 contain actual type name insteads of hardcoded name of the base class. 6095 6096- bpo-31351: python -m ensurepip now exits with non-zero exit code if pip 6097 bootstrapping has failed. 6098 6099- bpo-31389: ``pdb.set_trace()`` now takes an optional keyword-only argument 6100 ``header``. If given, this is printed to the console just before debugging 6101 begins. 6102 6103Documentation 6104------------- 6105 6106- bpo-31537: Fix incorrect usage of ``get_history_length`` in readline 6107 documentation example code. Patch by Brad Smith. 6108 6109- bpo-30085: The operator functions without double underscores are preferred 6110 for clarity. The one with underscores are only kept for 6111 back-compatibility. 6112 6113Build 6114----- 6115 6116- bpo-31696: Improve compiler version information in :data:`sys.version` 6117 when Python is built with Clang. 6118 6119- bpo-31625: Stop using ranlib on static libraries. Instead, we assume ar 6120 supports the 's' flag. 6121 6122- bpo-31624: Remove support for BSD/OS. 6123 6124- bpo-22140: Prevent double substitution of prefix in python-config.sh. 6125 6126- bpo-31569: Correct PCBuild/ case to PCbuild/ in build scripts and 6127 documentation. 6128 6129- bpo-31536: Avoid wholesale rebuild after `make regen-all` if nothing 6130 changed. 6131 6132IDLE 6133---- 6134 6135- bpo-31460: Simplify the API of IDLE's Module Browser. 6136 6137 Passing a widget instead of an flist with a root widget opens the option 6138 of creating a browser frame that is only part of a window. Passing a full 6139 file name instead of pieces assumed to come from a .py file opens the 6140 possibility of browsing python files that do not end in .py. 6141 6142- bpo-31649: IDLE - Make _htest, _utest parameters keyword only. 6143 6144- bpo-31559: Remove test order dependence in idle_test.test_browser. 6145 6146- bpo-31459: Rename IDLE's module browser from Class Browser to Module 6147 Browser. The original module-level class and method browser became a 6148 module browser, with the addition of module-level functions, years ago. 6149 Nested classes and functions were added yesterday. For 6150 back-compatibility, the virtual event <<open-class-browser>>, which 6151 appears on the Keys tab of the Settings dialog, is not changed. Patch by 6152 Cheryl Sabella. 6153 6154- bpo-31500: Default fonts now are scaled on HiDPI displays. 6155 6156- bpo-1612262: IDLE module browser now shows nested classes and functions. 6157 Original patches for code and tests by Guilherme Polo and Cheryl Sabella, 6158 respectively. 6159 6160C API 6161----- 6162 6163- bpo-28280: Make `PyMapping_Keys()`, `PyMapping_Values()` and 6164 `PyMapping_Items()` always return a `list` (rather than a `list` or a 6165 `tuple`). Patch by Oren Milman. 6166 6167- bpo-31532: Fix memory corruption due to allocator mix in getpath.c between 6168 Py_GetPath() and Py_SetPath() 6169 6170- bpo-25658: Implement PEP 539 for Thread Specific Storage (TSS) API: it is 6171 a new Thread Local Storage (TLS) API to CPython which would supersede use 6172 of the existing TLS API within the CPython interpreter, while deprecating 6173 the existing API. PEP written by Erik M. Bray, patch by Masayuki Yamamoto. 6174 6175 6176What's New in Python 3.7.0 alpha 1? 6177=================================== 6178 6179*Release date: 2017-09-19* 6180 6181Security 6182-------- 6183 6184- bpo-29781: SSLObject.version() now correctly returns None when handshake 6185 over BIO has not been performed yet. 6186 6187- bpo-29505: Add fuzz tests for float(str), int(str), unicode(str); for 6188 oss-fuzz. 6189 6190- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to 6191 get security fixes. 6192 6193- bpo-30730: Prevent environment variables injection in subprocess on 6194 Windows. Prevent passing other environment variables and command 6195 arguments. 6196 6197- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple 6198 security vulnerabilities including: CVE-2017-9233 (External entity 6199 infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix), 6200 CVE-2016-0718 (Fix regression bugs from 2.2.0's fix to CVE-2016-0718) and 6201 CVE-2012-0876 (Counter hash flooding with SipHash). Note: the 6202 CVE-2016-5300 (Use os-specific entropy sources like getrandom) doesn't 6203 impact Python, since Python already gets entropy from the OS to set the 6204 expat secret using ``XML_SetHashSalt()``. 6205 6206- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For 6207 example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the 6208 ``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an 6209 authentication (``login@host``). 6210 6211- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of 6212 CVE-2016-0718 and CVE-2016-4472. See 6213 https://sourceforge.net/p/expat/bugs/537/ for more information. 6214 6215Core and Builtins 6216----------------- 6217 6218- bpo-31490: Fix an assertion failure in `ctypes` class definition, in case 6219 the class has an attribute whose name is specified in ``_anonymous_`` but 6220 not in ``_fields_``. Patch by Oren Milman. 6221 6222- bpo-31471: Fix an assertion failure in `subprocess.Popen()` on Windows, in 6223 case the env argument has a bad keys() method. Patch by Oren Milman. 6224 6225- bpo-31418: Fix an assertion failure in `PyErr_WriteUnraisable()` in case 6226 of an exception with a bad ``__module__`` attribute. Patch by Oren Milman. 6227 6228- bpo-31416: Fix assertion failures in case of a bad warnings.filters or 6229 warnings.defaultaction. Patch by Oren Milman. 6230 6231- bpo-28411: Change direct usage of PyInterpreterState.modules to 6232 PyImport_GetModuleDict(). Also introduce more uniformity in other code 6233 that deals with sys.modules. This helps reduce complications when working 6234 on sys.modules. 6235 6236- bpo-28411: Switch to the abstract API when dealing with 6237 ``PyInterpreterState.modules``. This allows later support for all dict 6238 subclasses and other Mapping implementations. Also add a 6239 ``PyImport_GetModule()`` function to reduce a bunch of duplicated code. 6240 6241- bpo-31411: Raise a TypeError instead of SystemError in case 6242 warnings.onceregistry is not a dictionary. Patch by Oren Milman. 6243 6244- bpo-31344: For finer control of tracing behaviour when testing the 6245 interpreter, two new frame attributes have been added to control the 6246 emission of particular trace events: ``f_trace_lines`` (``True`` by 6247 default) to turn off per-line trace events; and ``f_trace_opcodes`` 6248 (``False`` by default) to turn on per-opcode trace events. 6249 6250- bpo-31373: Fix several possible instances of undefined behavior due to 6251 floating-point demotions. 6252 6253- bpo-30465: Location information (``lineno`` and ``col_offset``) in 6254 f-strings is now (mostly) correct. This fixes tools like flake8 from 6255 showing warnings on the wrong line (typically the first line of the file). 6256 6257- bpo-30860: Consolidate CPython's global runtime state under a single 6258 struct. This improves discoverability of the runtime state. 6259 6260- bpo-31347: Fix possible undefined behavior in _PyObject_FastCall_Prepend. 6261 6262- bpo-31343: Include sys/sysmacros.h for major(), minor(), and makedev(). 6263 GNU C libray plans to remove the functions from sys/types.h. 6264 6265- bpo-31291: Fix an assertion failure in `zipimport.zipimporter.get_data` on 6266 Windows, when the return value of ``pathname.replace('/','\\')`` isn't a 6267 string. Patch by Oren Milman. 6268 6269- bpo-31271: Fix an assertion failure in the write() method of 6270 `io.TextIOWrapper`, when the encoder doesn't return a bytes object. Patch 6271 by Oren Milman. 6272 6273- bpo-31243: Fix a crash in some methods of `io.TextIOWrapper`, when the 6274 decoder's state is invalid. Patch by Oren Milman. 6275 6276- bpo-30721: ``print`` now shows correct usage hint for using Python 2 6277 redirection syntax. Patch by Sanyam Khurana. 6278 6279- bpo-31070: Fix a race condition in importlib _get_module_lock(). 6280 6281- bpo-30747: Add a non-dummy implementation of _Py_atomic_store and 6282 _Py_atomic_load on MSVC. 6283 6284- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which 6285 doesn't call ``PyObject_GC_UnTrack()``. 6286 6287- bpo-31071: Avoid masking original TypeError in call with * unpacking when 6288 other arguments are passed. 6289 6290- bpo-30978: str.format_map() now passes key lookup exceptions through. 6291 Previously any exception was replaced with a KeyError exception. 6292 6293- bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state. 6294 6295- bpo-30876: Relative import from unloaded package now reimports the package 6296 instead of failing with SystemError. Relative import from non-package now 6297 fails with ImportError rather than SystemError. 6298 6299- bpo-30703: Improve signal delivery. 6300 6301 Avoid using Py_AddPendingCall from signal handler, to avoid calling 6302 signal-unsafe functions. The tests I'm adding here fail without the rest 6303 of the patch, on Linux and OS X. This means our signal delivery logic had 6304 defects (some signals could be lost). 6305 6306- bpo-30765: Avoid blocking in pthread_mutex_lock() when 6307 PyThread_acquire_lock() is asked not to block. 6308 6309- bpo-31161: Make sure the 'Missing parentheses' syntax error message is 6310 only applied to SyntaxError, not to subclasses. Patch by Martijn Pieters. 6311 6312- bpo-30814: Fixed a race condition when import a submodule from a package. 6313 6314- bpo-30736: The internal unicodedata database has been upgraded to Unicode 6315 10.0. 6316 6317- bpo-30604: Move co_extra_freefuncs from per-thread to per-interpreter to 6318 avoid crashes. 6319 6320- bpo-30597: ``print`` now shows expected input in custom error message when 6321 used as a Python 2 statement. Patch by Sanyam Khurana. 6322 6323- bpo-30682: Removed a too-strict assertion that failed for certain 6324 f-strings, such as eval("f'\\\n'") and eval("f'\\\r'"). 6325 6326- bpo-30501: The compiler now produces more optimal code for complex 6327 condition expressions in the "if", "while" and "assert" statement, the 6328 "if" expression, and generator expressions and comprehensions. 6329 6330- bpo-28180: Implement PEP 538 (legacy C locale coercion). This means that 6331 when a suitable coercion target locale is available, both the core 6332 interpreter and locale-aware C extensions will assume the use of UTF-8 as 6333 the default text encoding, rather than ASCII. 6334 6335- bpo-30486: Allows setting cell values for __closure__. Patch by Lisa 6336 Roach. 6337 6338- bpo-30537: itertools.islice now accepts integer-like objects (having an 6339 __index__ method) as start, stop, and slice arguments 6340 6341- bpo-25324: Tokens needed for parsing in Python moved to C. ``COMMENT``, 6342 ``NL`` and ``ENCODING``. This way the tokens and tok_names in the token 6343 module don't get changed when you import the tokenize module. 6344 6345- bpo-29104: Fixed parsing backslashes in f-strings. 6346 6347- bpo-27945: Fixed various segfaults with dict when input collections are 6348 mutated during searching, inserting or comparing. Based on patches by 6349 Duane Griffin and Tim Mitchell. 6350 6351- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for 6352 non-interned attribute names. Based on patch by Eryk Sun. 6353 6354- bpo-30039: If a KeyboardInterrupt happens when the interpreter is in the 6355 middle of resuming a chain of nested 'yield from' or 'await' calls, it's 6356 now correctly delivered to the innermost frame. 6357 6358- bpo-28974: ``object.__format__(x, '')`` is now equivalent to ``str(x)`` 6359 rather than ``format(str(self), '')``. 6360 6361- bpo-30024: Circular imports involving absolute imports with binding a 6362 submodule to a name are now supported. 6363 6364- bpo-12414: sys.getsizeof() on a code object now returns the sizes which 6365 includes the code struct and sizes of objects which it references. Patch 6366 by Dong-hee Na. 6367 6368- bpo-29839: len() now raises ValueError rather than OverflowError if 6369 __len__() returned a large negative integer. 6370 6371- bpo-11913: README.rst is now included in the list of distutils standard 6372 READMEs and therefore included in source distributions. 6373 6374- bpo-29914: Fixed default implementations of __reduce__ and 6375 __reduce_ex__(). object.__reduce__() no longer takes arguments, 6376 object.__reduce_ex__() now requires one argument. 6377 6378- bpo-29949: Fix memory usage regression of set and frozenset object. 6379 6380- bpo-29935: Fixed error messages in the index() method of tuple, list and 6381 deque when pass indices of wrong type. 6382 6383- bpo-29816: Shift operation now has less opportunity to raise 6384 OverflowError. ValueError always is raised rather than OverflowError for 6385 negative counts. Shifting zero with non-negative count always returns 6386 zero. 6387 6388- bpo-24821: Fixed the slowing down to 25 times in the searching of some 6389 unlucky Unicode characters. 6390 6391- bpo-29102: Add a unique ID to PyInterpreterState. This makes it easier to 6392 identify each subinterpreter. 6393 6394- bpo-29894: The deprecation warning is emitted if __complex__ returns an 6395 instance of a strict subclass of complex. In a future versions of Python 6396 this can be an error. 6397 6398- bpo-29859: Show correct error messages when any of the pthread_* calls in 6399 thread_pthread.h fails. 6400 6401- bpo-29849: Fix a memory leak when an ImportError is raised during from 6402 import. 6403 6404- bpo-28856: Fix an oversight that %b format for bytes should support 6405 objects follow the buffer protocol. 6406 6407- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused 6408 a regression by revealing an inconsistency in how sys.path is initialized 6409 when executing ``__main__`` from a zipfile, directory, or other import 6410 location. The interpreter now consistently avoids ever adding the import 6411 location's parent directory to ``sys.path``, and ensures no other 6412 ``sys.path`` entries are inadvertently modified when inserting the import 6413 location named on the command line. 6414 6415- bpo-29568: Escaped percent "%%" in the format string for classic string 6416 formatting no longer allows any characters between two percents. 6417 6418- bpo-29714: Fix a regression that bytes format may fail when containing 6419 zero bytes inside. 6420 6421- bpo-29695: bool(), float(), list() and tuple() no longer take keyword 6422 arguments. The first argument of int() can now be passes only as 6423 positional argument. 6424 6425- bpo-28893: Set correct __cause__ for errors about invalid awaitables 6426 returned from __aiter__ and __anext__. 6427 6428- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises 6429 :exc:`OverflowError`. 6430 6431- bpo-29683: Fixes to memory allocation in _PyCode_SetExtra. Patch by Brian 6432 Coleman. 6433 6434- bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords. It 6435 should raise TypeError when kwargs is not a dict. But it might cause segv 6436 when args=NULL and kwargs is not a dict. 6437 6438- bpo-28598: Support __rmod__ for subclasses of str being called before 6439 str.__mod__. Patch by Martijn Pieters. 6440 6441- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX. Patch by 6442 Matthieu Dartiailh. 6443 6444- bpo-29602: Fix incorrect handling of signed zeros in complex constructor 6445 for complex subclasses and for inputs having a __complex__ method. Patch 6446 by Serhiy Storchaka. 6447 6448- bpo-29347: Fixed possibly dereferencing undefined pointers when creating 6449 weakref objects. 6450 6451- bpo-29463: Add ``docstring`` field to Module, ClassDef, FunctionDef, and 6452 AsyncFunctionDef ast nodes. docstring is not first stmt in their body 6453 anymore. It affects ``co_firstlineno`` and ``co_lnotab`` of code object 6454 for module and class. (Reverted in :issue:`32911`.) 6455 6456- bpo-29438: Fixed use-after-free problem in key sharing dict. 6457 6458- bpo-29546: Set the 'path' and 'name' attribute on ImportError for ``from 6459 ... import ...``. 6460 6461- bpo-29546: Improve from-import error message with location 6462 6463- bpo-29478: If max_line_length=None is specified while using the Compat32 6464 policy, it is no longer ignored. Patch by Mircea Cosbuc. 6465 6466- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0]. 6467 6468- bpo-29337: Fixed possible BytesWarning when compare the code objects. 6469 Warnings could be emitted at compile time. 6470 6471- bpo-29327: Fixed a crash when pass the iterable keyword argument to 6472 sorted(). 6473 6474- bpo-29034: Fix memory leak and use-after-free in os module 6475 (path_converter). 6476 6477- bpo-29159: Fix regression in bytes(x) when x.__index__() raises Exception. 6478 6479- bpo-29049: Call _PyObject_GC_TRACK() lazily when calling Python function. 6480 Calling function is up to 5% faster. 6481 6482- bpo-28927: bytes.fromhex() and bytearray.fromhex() now ignore all ASCII 6483 whitespace, not only spaces. Patch by Robert Xiao. 6484 6485- bpo-28932: Do not include <sys/random.h> if it does not exist. 6486 6487- bpo-25677: Correct the positioning of the syntax error caret for indented 6488 blocks. Based on patch by Michael Layzell. 6489 6490- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate 6491 form. 6492 6493- bpo-18896: Python function can now have more than 255 parameters. 6494 collections.namedtuple() now supports tuples with more than 255 elements. 6495 6496- bpo-28596: The preferred encoding is UTF-8 on Android. Patch written by 6497 Chi Hsuan Yen. 6498 6499- bpo-22257: Clean up interpreter startup (see PEP 432). 6500 6501- bpo-26919: On Android, operating system data is now always encoded/decoded 6502 to/from UTF-8, instead of the locale encoding to avoid inconsistencies 6503 with os.fsencode() and os.fsdecode() which are already using UTF-8. 6504 6505- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy 6506 bug triggerable by a monkey-patched len() function. 6507 6508- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must 6509 not convert combined table into split table. Patch written by INADA Naoki. 6510 6511- bpo-28739: f-string expressions are no longer accepted as docstrings and 6512 by ast.literal_eval() even if they do not include expressions. 6513 6514- bpo-28512: Fixed setting the offset attribute of SyntaxError by 6515 PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject(). 6516 6517- bpo-28918: Fix the cross compilation of xxlimited when Python has been 6518 built with Py_DEBUG defined. 6519 6520- bpo-23722: Rather than silently producing a class that doesn't support 6521 zero-argument ``super()`` in methods, failing to pass the new 6522 ``__classcell__`` namespace entry up to ``type.__new__`` now results in a 6523 ``DeprecationWarning`` and a class that supports zero-argument 6524 ``super()``. 6525 6526- bpo-28797: Modifying the class __dict__ inside the __set_name__ method of 6527 a descriptor that is used inside that class no longer prevents calling the 6528 __set_name__ method of other descriptors. 6529 6530- bpo-28799: Remove the ``PyEval_GetCallStats()`` function and deprecate the 6531 untested and undocumented ``sys.callstats()`` function. Remove the 6532 ``CALL_PROFILE`` special build: use the :func:`sys.setprofile` function, 6533 :mod:`cProfile` or :mod:`profile` to profile function calls. 6534 6535- bpo-12844: More than 255 arguments can now be passed to a function. 6536 6537- bpo-28782: Fix a bug in the implementation ``yield from`` when checking if 6538 the next instruction is YIELD_FROM. Regression introduced by WORDCODE 6539 (issue #26647). 6540 6541- bpo-28774: Fix error position of the unicode error in ASCII and Latin1 6542 encoders when a string returned by the error handler contains multiple 6543 non-encodable characters (non-ASCII for the ASCII codec, characters out of 6544 the U+0000-U+00FF range for Latin1). 6545 6546- bpo-28731: Optimize _PyDict_NewPresized() to create correct size dict. 6547 Improve speed of dict literal with constant keys up to 30%. 6548 6549- bpo-28532: Show sys.version when -V option is supplied twice. 6550 6551- bpo-27100: The with-statement now checks for __enter__ before it checks 6552 for __exit__. This gives less confusing error messages when both methods 6553 are missing. Patch by Jonathan Ellington. 6554 6555- bpo-28746: Fix the set_inheritable() file descriptor method on platforms 6556 that do not have the ioctl FIOCLEX and FIONCLEX commands. 6557 6558- bpo-26920: Fix not getting the locale's charset upon initializing the 6559 interpreter, on platforms that do not have langinfo. 6560 6561- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X 6562 when decode astral characters. Patch by Xiang Zhang. 6563 6564- bpo-28665: Improve speed of the STORE_DEREF opcode by 40%. 6565 6566- bpo-19398: Extra slash no longer added to sys.path components in case of 6567 empty compile-time PYTHONPATH components. 6568 6569- bpo-28621: Sped up converting int to float by reusing faster bits counting 6570 implementation. Patch by Adrian Wielgosik. 6571 6572- bpo-28580: Optimize iterating split table values. Patch by Xiang Zhang. 6573 6574- bpo-28583: PyDict_SetDefault didn't combine split table when needed. Patch 6575 by Xiang Zhang. 6576 6577- bpo-28128: Deprecation warning for invalid str and byte escape sequences 6578 now prints better information about where the error occurs. Patch by 6579 Serhiy Storchaka and Eric Smith. 6580 6581- bpo-28509: dict.update() no longer allocate unnecessary large memory. 6582 6583- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug 6584 build. 6585 6586- bpo-28517: Fixed of-by-one error in the peephole optimizer that caused 6587 keeping unreachable code. 6588 6589- bpo-28214: Improved exception reporting for problematic __set_name__ 6590 attributes. 6591 6592- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception 6593 loss in PyTraceBack_Here(). 6594 6595- bpo-28183: Optimize and cleanup dict iteration. 6596 6597- bpo-26081: Added C implementation of asyncio.Future. Original patch by 6598 Yury Selivanov. 6599 6600- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). 6601 Patch by Xiang Zhang. 6602 6603- bpo-28376: The type of long range iterator is now registered as Iterator. 6604 Patch by Oren Milman. 6605 6606- bpo-28376: Creating instances of range_iterator by calling range_iterator 6607 type now is disallowed. Calling iter() on range instance is the only way. 6608 Patch by Oren Milman. 6609 6610- bpo-26906: Resolving special methods of uninitialized type now causes 6611 implicit initialization of the type instead of a fail. 6612 6613- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original 6614 patch by Niklas Koep. 6615 6616- bpo-24098: Fixed possible crash when AST is changed in process of 6617 compiling it. 6618 6619- bpo-28201: Dict reduces possibility of 2nd conflict in hash table when 6620 hashes have same lower bits. 6621 6622- bpo-28350: String constants with null character no longer interned. 6623 6624- bpo-26617: Fix crash when GC runs during weakref callbacks. 6625 6626- bpo-27942: String constants now interned recursively in tuples and 6627 frozensets. 6628 6629- bpo-28289: ImportError.__init__ now resets not specified attributes. 6630 6631- bpo-21578: Fixed misleading error message when ImportError called with 6632 invalid keyword args. 6633 6634- bpo-28203: Fix incorrect type in complex(1.0, {2:3}) error message. Patch 6635 by Soumya Sharma. 6636 6637- bpo-28086: Single var-positional argument of tuple subtype was passed 6638 unscathed to the C-defined function. Now it is converted to exact tuple. 6639 6640- bpo-28214: Now __set_name__ is looked up on the class instead of the 6641 instance. 6642 6643- bpo-27955: Fallback on reading /dev/urandom device when the getrandom() 6644 syscall fails with EPERM, for example when blocked by SECCOMP. 6645 6646- bpo-28192: Don't import readline in isolated mode. 6647 6648- bpo-27441: Remove some redundant assignments to ob_size in longobject.c. 6649 Thanks Oren Milman. 6650 6651- bpo-27222: Clean up redundant code in long_rshift function. Thanks Oren 6652 Milman. 6653 6654- Upgrade internal unicode databases to Unicode version 9.0.0. 6655 6656- bpo-28131: Fix a regression in zipimport's compile_source(). zipimport 6657 should use the same optimization level as the interpreter. 6658 6659- bpo-28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly 6660 optimize memcpy(). 6661 6662- bpo-28120: Fix dict.pop() for splitted dictionary when trying to remove a 6663 "pending key" (Not yet inserted in split-table). Patch by Xiang Zhang. 6664 6665- bpo-26182: Raise DeprecationWarning when async and await keywords are used 6666 as variable/attribute/class/function name. 6667 6668- bpo-26182: Fix a refleak in code that raises DeprecationWarning. 6669 6670- bpo-28721: Fix asynchronous generators aclose() and athrow() to handle 6671 StopAsyncIteration propagation properly. 6672 6673- bpo-26110: Speed-up method calls: add LOAD_METHOD and CALL_METHOD opcodes. 6674 6675Library 6676------- 6677 6678- bpo-31499: xml.etree: Fix a crash when a parser is part of a reference 6679 cycle. 6680 6681- bpo-31482: ``random.seed()`` now works with bytes in version=1 6682 6683- bpo-28556: typing.get_type_hints now finds the right globalns for classes 6684 and modules by default (when no ``globalns`` was specified by the caller). 6685 6686- bpo-28556: Speed improvements to the ``typing`` module. Original PRs by 6687 Ivan Levkivskyi and Mitar. 6688 6689- bpo-31544: The C accelerator module of ElementTree ignored exceptions 6690 raised when looking up TreeBuilder target methods in XMLParser(). 6691 6692- bpo-31234: socket.create_connection() now fixes manually a reference 6693 cycle: clear the variable storing the last exception on success. 6694 6695- bpo-31457: LoggerAdapter objects can now be nested. 6696 6697- bpo-31431: SSLContext.check_hostname now automatically sets 6698 SSLContext.verify_mode to ssl.CERT_REQUIRED instead of failing with a 6699 ValueError. 6700 6701- bpo-31233: socketserver.ThreadingMixIn now keeps a list of non-daemonic 6702 threads to wait until all these threads complete in server_close(). 6703 6704- bpo-28638: Changed the implementation strategy for 6705 collections.namedtuple() to substantially reduce the use of exec() in 6706 favor of precomputed methods. As a result, the *verbose* parameter and 6707 *_source* attribute are no longer supported. The benefits include 1) 6708 having a smaller memory footprint for applications using multiple named 6709 tuples, 2) faster creation of the named tuple class (approx 4x to 6x 6710 depending on how it is measured), and 3) minor speed-ups for instance 6711 creation using __new__, _make, and _replace. (The primary patch 6712 contributor is Jelle Zijlstra with further improvements by INADA Naoki, 6713 Serhiy Storchaka, and Raymond Hettinger.) 6714 6715- bpo-31400: Improves SSL error handling to avoid losing error numbers. 6716 6717- bpo-27629: Make return types of SSLContext.wrap_bio() and 6718 SSLContext.wrap_socket() customizable. 6719 6720- bpo-28958: ssl.SSLContext() now uses OpenSSL error information when a 6721 context cannot be instantiated. 6722 6723- bpo-28182: The SSL module now raises SSLCertVerificationError when OpenSSL 6724 fails to verify the peer's certificate. The exception contains more 6725 information about the error. 6726 6727- bpo-27340: SSLSocket.sendall() now uses memoryview to create slices of 6728 data. This fixes support for all bytes-like object. It is also more 6729 efficient and avoids costly copies. 6730 6731- bpo-14191: A new function 6732 ``argparse.ArgumentParser.parse_intermixed_args`` provides the ability to 6733 parse command lines where there user intermixes options and positional 6734 arguments. 6735 6736- bpo-31178: Fix string concatenation bug in rare error path in the 6737 subprocess module 6738 6739- bpo-31350: Micro-optimize :func:`asyncio._get_running_loop` to become up 6740 to 10% faster. 6741 6742- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of 6743 partial characters for UTF-8 input (libexpat bug 115): 6744 https://github.com/libexpat/libexpat/issues/115 6745 6746- bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3. 6747 6748- bpo-1198569: ``string.Template`` subclasses can optionally define 6749 ``braceidpattern`` if they want to specify different placeholder patterns 6750 inside and outside the braces. If None (the default) it falls back to 6751 ``idpattern``. 6752 6753- bpo-31326: concurrent.futures.ProcessPoolExecutor.shutdown() now 6754 explicitly closes the call queue. Moreover, shutdown(wait=True) now also 6755 join the call queue thread, to prevent leaking a dangling thread. 6756 6757- bpo-27144: The ``map()`` and ``as_completed()`` iterators in 6758 ``concurrent.futures`` now avoid keeping a reference to yielded objects. 6759 6760- bpo-31281: Fix ``fileinput.FileInput(files, inplace=True)`` when ``files`` 6761 contain ``pathlib.Path`` objects. 6762 6763- bpo-10746: Fix ctypes producing wrong PEP 3118 type codes for integer 6764 types. 6765 6766- bpo-27584: ``AF_VSOCK`` has been added to the socket interface which 6767 allows communication between virtual machines and their host. 6768 6769- bpo-22536: The subprocess module now sets the filename when 6770 FileNotFoundError is raised on POSIX systems due to the executable or cwd 6771 not being found. 6772 6773- bpo-29741: Update some methods in the _pyio module to also accept integer 6774 types. Patch by Oren Milman. 6775 6776- bpo-31249: concurrent.futures: WorkItem.run() used by ThreadPoolExecutor 6777 now breaks a reference cycle between an exception object and the WorkItem 6778 object. 6779 6780- bpo-31247: xmlrpc.server now explicitly breaks reference cycles when using 6781 sys.exc_info() in code handling exceptions. 6782 6783- bpo-23835: configparser: reading defaults in the ``ConfigParser()`` 6784 constructor is now using ``read_dict()``, making its behavior consistent 6785 with the rest of the parser. Non-string keys and values in the defaults 6786 dictionary are now being implicitly converted to strings. Patch by James 6787 Tocknell. 6788 6789- bpo-31238: pydoc: the stop() method of the private ServerThread class now 6790 waits until DocServer.serve_until_quit() completes and then explicitly 6791 sets its docserver attribute to None to break a reference cycle. 6792 6793- bpo-5001: Many asserts in `multiprocessing` are now more informative, and 6794 some error types have been changed to more specific ones. 6795 6796- bpo-31109: Convert zipimport to use Argument Clinic. 6797 6798- bpo-30102: The ssl and hashlib modules now call 6799 OPENSSL_add_all_algorithms_noconf() on OpenSSL < 1.1.0. The function 6800 detects CPU features and enables optimizations on some CPU architectures 6801 such as POWER8. Patch is based on research from Gustavo Serra Scalet. 6802 6803- bpo-18966: Non-daemonic threads created by a multiprocessing.Process are 6804 now joined on child exit. 6805 6806- bpo-31183: `dis` now works with asynchronous generator and coroutine 6807 objects. Patch by George Collins based on diagnosis by Luciano Ramalho. 6808 6809- bpo-5001: There are a number of uninformative asserts in the 6810 `multiprocessing` module, as noted in issue 5001. This change fixes two of 6811 the most potentially problematic ones, since they are in error-reporting 6812 code, in the `multiprocessing.managers.convert_to_error` function. (It 6813 also makes more informative a ValueError message.) The only potentially 6814 problematic change is that the AssertionError is now a TypeError; however, 6815 this should also help distinguish it from an AssertionError being 6816 *reported* by the function/its caller (such as in issue 31169). - Patch by 6817 Allen W. Smith (drallensmith on github). 6818 6819- bpo-31185: Fixed miscellaneous errors in asyncio speedup module. 6820 6821- bpo-31151: socketserver.ForkingMixIn.server_close() now waits until all 6822 child processes completed to prevent leaking zombie processes. 6823 6824- bpo-31072: Add an ``include_file`` parameter to 6825 ``zipapp.create_archive()`` 6826 6827- bpo-24700: Optimize array.array comparison. It is now from 10x up to 70x 6828 faster when comparing arrays holding values of the same integer type. 6829 6830- bpo-31135: ttk: fix the destroy() method of LabeledScale and OptionMenu 6831 classes. Call the parent destroy() method even if the used attribute 6832 doesn't exist. The LabeledScale.destroy() method now also explicitly 6833 clears label and scale attributes to help the garbage collector to destroy 6834 all widgets. 6835 6836- bpo-31107: Fix `copyreg._slotnames()` mangled attribute calculation for 6837 classes whose name begins with an underscore. Patch by Shane Harvey. 6838 6839- bpo-31080: Allow `logging.config.fileConfig` to accept kwargs and/or args. 6840 6841- bpo-30897: ``pathlib.Path`` objects now include an ``is_mount()`` method 6842 (only implemented on POSIX). This is similar to ``os.path.ismount(p)``. 6843 Patch by Cooper Ry Lees. 6844 6845- bpo-31061: Fixed a crash when using asyncio and threads. 6846 6847- bpo-30987: Added support for CAN ISO-TP protocol in the socket module. 6848 6849- bpo-30522: Added a ``setStream`` method to ``logging.StreamHandler`` to 6850 allow the stream to be set after creation. 6851 6852- bpo-30502: Fix handling of long oids in ssl. Based on patch by Christian 6853 Heimes. 6854 6855- bpo-5288: Support tzinfo objects with sub-minute offsets. 6856 6857- bpo-30919: Fix shared memory performance regression in multiprocessing in 6858 3.x. 6859 6860 Shared memory used anonymous memory mappings in 2.x, while 3.x mmaps 6861 actual files. Try to be careful to do as little disk I/O as possible. 6862 6863- bpo-26732: Fix too many fds in processes started with the "forkserver" 6864 method. 6865 6866 A child process would inherit as many fds as the number of still-running 6867 children. 6868 6869- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound 6870 builtin functions. Patch by Aaron Gallagher. 6871 6872- bpo-30961: Fix decrementing a borrowed reference in tracemalloc. 6873 6874- bpo-19896: Fix multiprocessing.sharedctypes to recognize typecodes ``'q'`` 6875 and ``'Q'``. 6876 6877- bpo-30946: Remove obsolete code in readline module for platforms where GNU 6878 readline is older than 2.1 or where select() is not available. 6879 6880- bpo-25684: Change ``ttk.OptionMenu`` radiobuttons to be unique across 6881 instances of ``OptionMenu``. 6882 6883- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the 6884 thread completes, even if the thread was started by the same process which 6885 created the queue. 6886 6887- bpo-29854: Fix segfault in readline when using readline's history-size 6888 option. Patch by Nir Soffer. 6889 6890- bpo-30794: Added multiprocessing.Process.kill method to terminate using 6891 the SIGKILL signal on Unix. 6892 6893- bpo-30319: socket.close() now ignores ECONNRESET error. 6894 6895- bpo-30828: Fix out of bounds write in 6896 `asyncio.CFuture.remove_done_callback()`. 6897 6898- bpo-30302: Use keywords in the ``repr`` of ``datetime.timedelta``. 6899 6900- bpo-30807: signal.setitimer() may disable the timer when passed a tiny 6901 value. 6902 6903 Tiny values (such as 1e-6) are valid non-zero values for setitimer(), 6904 which is specified as taking microsecond-resolution intervals. However, on 6905 some platform, our conversion routine could convert 1e-6 into a zero 6906 interval, therefore disabling the timer instead of (re-)scheduling it. 6907 6908- bpo-30441: Fix bug when modifying os.environ while iterating over it 6909 6910- bpo-29585: Avoid importing ``sysconfig`` from ``site`` to improve startup 6911 speed. Python startup is about 5% faster on Linux and 30% faster on macOS. 6912 6913- bpo-29293: Add missing parameter "n" on 6914 multiprocessing.Condition.notify(). 6915 6916 The doc claims multiprocessing.Condition behaves like threading.Condition, 6917 but its notify() method lacked the optional "n" argument (to specify the 6918 number of sleepers to wake up) that threading.Condition.notify() accepts. 6919 6920- bpo-30532: Fix email header value parser dropping folding white space in 6921 certain cases. 6922 6923- bpo-30596: Add a ``close()`` method to ``multiprocessing.Process``. 6924 6925- bpo-9146: Fix a segmentation fault in _hashopenssl when standard hash 6926 functions such as md5 are not available in the linked OpenSSL library. As 6927 in some special FIPS-140 build environments. 6928 6929- bpo-29169: Update zlib to 1.2.11. 6930 6931- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that 6932 contains CR or LF. Patch by Dong-hee Na. 6933 6934- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called 6935 with bytes-like argument. 6936 6937- bpo-30746: Prohibited the '=' character in environment variable names in 6938 ``os.putenv()`` and ``os.spawn*()``. 6939 6940- bpo-30664: The description of a unittest subtest now preserves the order 6941 of keyword arguments of TestCase.subTest(). 6942 6943- bpo-21071: struct.Struct.format type is now :class:`str` instead of 6944 :class:`bytes`. 6945 6946- bpo-29212: Fix concurrent.futures.thread.ThreadPoolExecutor threads to 6947 have a non repr() based thread name by default when no thread_name_prefix 6948 is supplied. They will now identify themselves as 6949 "ThreadPoolExecutor-y_n". 6950 6951- bpo-29755: Fixed the lgettext() family of functions in the gettext module. 6952 They now always return bytes. 6953 6954- bpo-30616: Functional API of enum allows to create empty enums. Patched by 6955 Dong-hee Na 6956 6957- bpo-30038: Fix race condition between signal delivery and wakeup file 6958 descriptor. Patch by Nathaniel Smith. 6959 6960- bpo-23894: lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings. 6961 6962- bpo-24744: pkgutil.walk_packages function now raises ValueError if *path* 6963 is a string. Patch by Sanyam Khurana. 6964 6965- bpo-24484: Avoid race condition in multiprocessing cleanup. 6966 6967- bpo-30589: Fix multiprocessing.Process.exitcode to return the opposite of 6968 the signal number when the process is killed by a signal (instead of 255) 6969 when using the "forkserver" method. 6970 6971- bpo-28994: The traceback no longer displayed for SystemExit raised in a 6972 callback registered by atexit. 6973 6974- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was 6975 called. 6976 6977- bpo-30645: Fix path calculation in `imp.load_package()`, fixing it for 6978 cases when a package is only shipped with bytecodes. Patch by Alexandru 6979 Ardelean. 6980 6981- bpo-11822: The dis.dis() function now is able to disassemble nested code 6982 objects. 6983 6984- bpo-30624: selectors does not take KeyboardInterrupt and SystemExit into 6985 account, leaving a fd in a bad state in case of error. Patch by Giampaolo 6986 Rodola'. 6987 6988- bpo-30595: multiprocessing.Queue.get() with a timeout now polls its reader 6989 in non-blocking mode if it succeeded to acquire the lock but the acquire 6990 took longer than the timeout. 6991 6992- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add 6993 support for ContextManager on all versions. Original PRs by Jelle Zijlstra 6994 and Ivan Levkivskyi 6995 6996- bpo-30605: re.compile() no longer raises a BytesWarning when compiling a 6997 bytes instance with misplaced inline modifier. Patch by Roy Williams. 6998 6999- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl 7000 implementation. Patch by Michaël Sghaïer. 7001 7002- bpo-29743: Closing transport during handshake process leaks open socket. 7003 Patch by Nikolay Kim 7004 7005- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu 7006 Sornay. 7007 7008- bpo-30014: modify() method of poll(), epoll() and devpoll() based classes 7009 of selectors module is around 10% faster. Patch by Giampaolo Rodola'. 7010 7011- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore 7012 EINVAL on stdin.write() if the child process is still running but closed 7013 the pipe. 7014 7015- bpo-30463: Addded empty __slots__ to abc.ABC. This allows subclassers to 7016 deny __dict__ and __weakref__ creation. Patch by Aaron Hall. 7017 7018- bpo-30520: Loggers are now pickleable. 7019 7020- bpo-30557: faulthandler now correctly filters and displays exception codes 7021 on Windows 7022 7023- bpo-30526: Add TextIOWrapper.reconfigure() and a 7024 TextIOWrapper.write_through attribute. 7025 7026- bpo-30245: Fix possible overflow when organize struct.pack_into error 7027 message. Patch by Yuan Liu. 7028 7029- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot 7030 handle IPv6 addresses. 7031 7032- bpo-16500: Allow registering at-fork handlers. 7033 7034- bpo-30470: Deprecate invalid ctypes call protection on Windows. Patch by 7035 Mariatta Wijaya. 7036 7037- bpo-30414: multiprocessing.Queue._feed background running thread do not 7038 break from main loop on exception. 7039 7040- bpo-30003: Fix handling escape characters in HZ codec. Based on patch by 7041 Ma Lin. 7042 7043- bpo-30149: inspect.signature() now supports callables with 7044 variable-argument parameters wrapped with partialmethod. Patch by Dong-hee 7045 Na. 7046 7047- bpo-30436: importlib.find_spec() raises ModuleNotFoundError instead of 7048 AttributeError if the specified parent module is not a package (i.e. lacks 7049 a __path__ attribute). 7050 7051- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn* 7052 and *forkserver* start methods. 7053 7054- bpo-30375: Warnings emitted when compile a regular expression now always 7055 point to the line in the user code. Previously they could point into 7056 inners of the re module if emitted from inside of groups or conditionals. 7057 7058- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error 7059 (code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted. 7060 This error occurs sometimes on SSL connections. 7061 7062- bpo-29196: Removed previously deprecated in Python 2.4 classes Plist, Dict 7063 and _InternalDict in the plistlib module. Dict values in the result of 7064 functions readPlist() and readPlistFromBytes() are now normal dicts. You 7065 no longer can use attribute access to access items of these dictionaries. 7066 7067- bpo-9850: The :mod:`macpath` is now deprecated and will be removed in 7068 Python 3.8. 7069 7070- bpo-30299: Compiling regular expression in debug mode on CPython now 7071 displays the compiled bytecode in human readable form. 7072 7073- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running 7074 coroutine and the coroutine returned without any more ``await``. 7075 7076- bpo-30266: contextlib.AbstractContextManager now supports 7077 anti-registration by setting __enter__ = None or __exit__ = None, 7078 following the pattern introduced in bpo-25958. Patch by Jelle Zijlstra. 7079 7080- bpo-30340: Enhanced regular expressions optimization. This increased the 7081 performance of matching some patterns up to 25 times. 7082 7083- bpo-30298: Weaken the condition of deprecation warnings for inline 7084 modifiers. Now allowed several subsequential inline modifiers at the start 7085 of the pattern (e.g. ``'(?i)(?s)...'``). In verbose mode whitespaces and 7086 comments now are allowed before and between inline modifiers (e.g. ``'(?x) 7087 (?i) (?s)...'``). 7088 7089- bpo-30285: Optimized case-insensitive matching and searching of regular 7090 expressions. 7091 7092- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma 7093 Lin. 7094 7095- bpo-29979: rewrite cgi.parse_multipart, reusing the FieldStorage class and 7096 making its results consistent with those of FieldStorage for 7097 multipart/form-data requests. Patch by Pierre Quentel. 7098 7099- bpo-30243: Removed the __init__ methods of _json's scanner and encoder. 7100 Misusing them could cause memory leaks or crashes. Now scanner and 7101 encoder objects are completely initialized in the __new__ methods. 7102 7103- bpo-30215: Compiled regular expression objects with the re.LOCALE flag no 7104 longer depend on the locale at compile time. Only the locale at matching 7105 time affects the result of matching. 7106 7107- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process 7108 when Ctrl-C is received. 7109 7110- bpo-30103: binascii.b2a_uu() and uu.encode() now support using ``'`'`` as 7111 zero instead of space. 7112 7113- bpo-28556: Various updates to typing module: add typing.NoReturn type, use 7114 WrapperDescriptorType, minor bug-fixes. Original PRs by Jim 7115 Fasarakis-Hilliard and Ivan Levkivskyi. 7116 7117- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux. 7118 7119- bpo-30228: The seek() and tell() methods of io.FileIO now set the internal 7120 seekable attribute to avoid one syscall on open() (in buffered or text 7121 mode). 7122 7123- bpo-30190: unittest's assertAlmostEqual and assertNotAlmostEqual provide a 7124 better message in case of failure which includes the difference between 7125 left and right arguments. (patch by Giampaolo Rodola') 7126 7127- bpo-30101: Add support for curses.A_ITALIC. 7128 7129- bpo-29822: inspect.isabstract() now works during __init_subclass__. Patch 7130 by Nate Soares. 7131 7132- bpo-29960: Preserve generator state when _random.Random.setstate() raises 7133 an exception. Patch by Bryan Olson. 7134 7135- bpo-30070: Fixed leaks and crashes in errors handling in the parser 7136 module. 7137 7138- bpo-22352: Column widths in the output of dis.dis() are now adjusted for 7139 large line numbers and instruction offsets. 7140 7141- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when 7142 readline() or __next__() respectively return non-sizeable object. Fixed 7143 possible other errors caused by not checking results of PyObject_Size(), 7144 PySequence_Size(), or PyMapping_Size(). 7145 7146- bpo-30218: Fix PathLike support for shutil.unpack_archive. Patch by Jelle 7147 Zijlstra. 7148 7149- bpo-10076: Compiled regular expression and match objects in the re module 7150 now support copy.copy() and copy.deepcopy() (they are considered atomic). 7151 7152- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint 7153 is present. 7154 7155- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True. 7156 Patch by Armin Rigo. 7157 7158- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in 7159 contextlib.contextmanager. Patch by Siddharth Velankar. 7160 7161- bpo-26187: Test that sqlite3 trace callback is not called multiple times 7162 when schema is changing. Indirectly fixed by switching to use 7163 sqlite3_prepare_v2() in bpo-9303. Patch by Aviv Palivoda. 7164 7165- bpo-30017: Allowed calling the close() method of the zip entry writer 7166 object multiple times. Writing to a closed writer now always produces a 7167 ValueError. 7168 7169- bpo-29998: Pickling and copying ImportError now preserves name and path 7170 attributes. 7171 7172- bpo-29995: re.escape() now escapes only regex special characters. 7173 7174- bpo-29962: Add math.remainder operation, implementing remainder as 7175 specified in IEEE 754. 7176 7177- bpo-29649: Improve struct.pack_into() exception messages for problems with 7178 the buffer size and offset. Patch by Andrew Nester. 7179 7180- bpo-29654: Support If-Modified-Since HTTP header (browser cache). Patch 7181 by Pierre Quentel. 7182 7183- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects. 7184 Patch by Sanjay Sundaresan. 7185 7186- bpo-29953: Fixed memory leaks in the replace() method of datetime and time 7187 objects when pass out of bound fold argument. 7188 7189- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering 7190 long runs of empty iterables. 7191 7192- bpo-10030: Sped up reading encrypted ZIP files by 2 times. 7193 7194- bpo-29204: Element.getiterator() and the html parameter of XMLParser() 7195 were deprecated only in the documentation (since Python 3.2 and 3.4 7196 correspondintly). Now using them emits a deprecation warning. 7197 7198- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions 7199 and wrong types. 7200 7201- bpo-25996: Added support of file descriptors in os.scandir() on Unix. 7202 os.fwalk() is sped up by 2 times by using os.scandir(). 7203 7204- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an 7205 exception at the very first of an iterable may swallow the exception or 7206 make the program hang. Patch by Davin Potts and Xiang Zhang. 7207 7208- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a 7209 reference cycle to not keep objects alive longer than expected. 7210 7211- bpo-29901: The zipapp module now supports general path-like objects, not 7212 just pathlib.Path. 7213 7214- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when 7215 the OS gives priority to errors such as EACCES over EEXIST. 7216 7217- bpo-29861: Release references to tasks, their arguments and their results 7218 as soon as they are finished in multiprocessing.Pool. 7219 7220- bpo-19930: The mode argument of os.makedirs() no longer affects the file 7221 permission bits of newly-created intermediate-level directories. 7222 7223- bpo-29884: faulthandler: Restore the old sigaltstack during teardown. 7224 Patch by Christophe Zeitouny. 7225 7226- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. 7227 7228- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords 7229 are not strings. Patch by Michael Seifert. 7230 7231- bpo-8256: Fixed possible failing or crashing input() if attributes 7232 "encoding" or "errors" of sys.stdin or sys.stdout are not set or are not 7233 strings. 7234 7235- bpo-28692: Using non-integer value for selecting a plural form in gettext 7236 is now deprecated. 7237 7238- bpo-26121: Use C library implementation for math functions erf() and 7239 erfc(). 7240 7241- bpo-29619: os.stat() and os.DirEntry.inode() now convert inode (st_ino) 7242 using unsigned integers. 7243 7244- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting 7245 big intables (objects that have __int__) as elements. 7246 7247- bpo-29645: Speed up importing the webbrowser module. 7248 webbrowser.register() is now thread-safe. 7249 7250- bpo-28231: The zipfile module now accepts path-like objects for external 7251 paths. 7252 7253- bpo-26915: index() and count() methods of collections.abc.Sequence now 7254 check identity before checking equality when do comparisons. 7255 7256- bpo-28682: Added support for bytes paths in os.fwalk(). 7257 7258- bpo-29728: Add new :data:`socket.TCP_NOTSENT_LOWAT` (Linux 3.12) constant. 7259 Patch by Nathaniel J. Smith. 7260 7261- bpo-29623: Allow use of path-like object as a single argument in 7262 ConfigParser.read(). Patch by David Ellis. 7263 7264- bpo-9303: Migrate sqlite3 module to _v2 API. Patch by Aviv Palivoda. 7265 7266- bpo-28963: Fix out of bound iteration in 7267 asyncio.Future.remove_done_callback implemented in C. 7268 7269- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes 7270 before all pipes are closed. 7271 7272- bpo-29271: Fix Task.current_task and Task.all_tasks implemented in C to 7273 accept None argument as their pure Python implementation. 7274 7275- bpo-29703: Fix asyncio to support instantiation of new event loops in 7276 child processes. 7277 7278- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other 7279 exception) to exception(s) raised in the dispatched methods. Patch by Petr 7280 Motejlek. 7281 7282- bpo-7769: Method register_function() of 7283 xmlrpc.server.SimpleXMLRPCDispatcher and its subclasses can now be used as 7284 a decorator. 7285 7286- bpo-29376: Fix assertion error in threading._DummyThread.is_alive(). 7287 7288- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts 7289 PathLike objects. Patch by Sayan Chowdhury. 7290 7291- bpo-28518: Start a transaction implicitly before a DML statement. Patch by 7292 Aviv Palivoda. 7293 7294- bpo-29742: get_extra_info() raises exception if get called on closed ssl 7295 transport. Patch by Nikolay Kim. 7296 7297- bpo-16285: urllib.parse.quote is now based on RFC 3986 and hence includes 7298 '~' in the set of characters that is not quoted by default. Patch by 7299 Christian Theune and Ratnadeep Debnath. 7300 7301- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no 7302 longer affects a partial object after creation. 7303 7304- bpo-29110: Fix file object leak in aifc.open() when file is given as a 7305 filesystem path and is not in valid AIFF format. Patch by Anthony Zhang. 7306 7307- bpo-22807: Add uuid.SafeUUID and uuid.UUID.is_safe to relay information 7308 from the platform about whether generated UUIDs are generated with a 7309 multiprocessing safe method. 7310 7311- bpo-29576: Improve some deprecations in importlib. Some deprecated methods 7312 now emit DeprecationWarnings and have better descriptive messages. 7313 7314- bpo-29534: Fixed different behaviour of Decimal.from_float() for _decimal 7315 and _pydecimal. Thanks Andrew Nester. 7316 7317- bpo-10379: locale.format_string now supports the 'monetary' keyword 7318 argument, and locale.format is deprecated. 7319 7320- bpo-29851: importlib.reload() now raises ModuleNotFoundError if the module 7321 lacks a spec. 7322 7323- bpo-28556: Various updates to typing module: typing.Counter, 7324 typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle 7325 Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa. 7326 7327- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python 7328 3.6.0: check minimum and maximum years. 7329 7330- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir 7331 7332- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the 7333 match object. Based on patch by WGH. 7334 7335- bpo-29377: Add WrapperDescriptorType, MethodWrapperType, and 7336 MethodDescriptorType built-in types to types module. Original patch by 7337 Manuel Krebber. 7338 7339- bpo-29218: Unused install_misc command is now removed. It has been 7340 documented as unused since 2000. Patch by Eric N. Vander Weele. 7341 7342- bpo-29368: The extend() method is now called instead of the append() 7343 method when unpickle collections.deque and other list-like objects. This 7344 can speed up unpickling to 2 times. 7345 7346- bpo-29338: The help of a builtin or extension class now includes the 7347 constructor signature if __text_signature__ is provided for the class. 7348 7349- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited 7350 to a stopped instead of terminated state (ex: when under ptrace). 7351 7352- bpo-29290: Fix a regression in argparse that help messages would wrap at 7353 non-breaking spaces. 7354 7355- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY. 7356 7357- bpo-29197: Removed deprecated function ntpath.splitunc(). 7358 7359- bpo-29210: Removed support of deprecated argument "exclude" in 7360 tarfile.TarFile.add(). 7361 7362- bpo-29219: Fixed infinite recursion in the repr of uninitialized 7363 ctypes.CDLL instances. 7364 7365- bpo-29192: Removed deprecated features in the http.cookies module. 7366 7367- bpo-29193: A format string argument for string.Formatter.format() is now 7368 positional-only. 7369 7370- bpo-29195: Removed support of deprecated undocumented keyword arguments in 7371 methods of regular expression objects. 7372 7373- bpo-28969: Fixed race condition in C implementation of 7374 functools.lru_cache. KeyError could be raised when cached function with 7375 full cache was simultaneously called from differen threads with the same 7376 uncached arguments. 7377 7378- bpo-20804: The unittest.mock.sentinel attributes now preserve their 7379 identity when they are copied or pickled. 7380 7381- bpo-29142: In urllib.request, suffixes in no_proxy environment variable 7382 with leading dots could match related hostnames again (e.g. .b.c matches 7383 a.b.c). Patch by Milan Oberkirch. 7384 7385- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter 7386 anymore. Patch written by Jiajun Huang. 7387 7388- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a 7389 context. Patch by Sam Breese. 7390 7391- bpo-28985: Update authorizer constants in sqlite3 module. Patch by 7392 Dingyuan Wang. 7393 7394- bpo-29079: Prevent infinite loop in pathlib.resolve() on Windows 7395 7396- bpo-13051: Fixed recursion errors in large or resized 7397 curses.textpad.Textbox. Based on patch by Tycho Andersen. 7398 7399- bpo-9770: curses.ascii predicates now work correctly with negative 7400 integers. 7401 7402- bpo-28427: old keys should not remove new values from WeakValueDictionary 7403 when collecting from another thread. 7404 7405- bpo-28923: Remove editor artifacts from Tix.py. 7406 7407- bpo-28871: Fixed a crash when deallocate deep ElementTree. 7408 7409- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and 7410 WeakValueDictionary.pop() when a GC collection happens in another thread. 7411 7412- bpo-20191: Fixed a crash in resource.prlimit() when passing a sequence 7413 that doesn't own its elements as limits. 7414 7415- bpo-16255: subprocess.Popen uses /system/bin/sh on Android as the shell, 7416 instead of /bin/sh. 7417 7418- bpo-28779: multiprocessing.set_forkserver_preload() would crash the 7419 forkserver process if a preloaded module instantiated some multiprocessing 7420 objects such as locks. 7421 7422- bpo-26937: The chown() method of the tarfile.TarFile class does not fail 7423 now when the grp module cannot be imported, as for example on Android 7424 platforms. 7425 7426- bpo-28847: dbm.dumb now supports reading read-only files and no longer 7427 writes the index file when it is not changed. A deprecation warning is 7428 now emitted if the index file is missed and recreated in the 'r' and 'w' 7429 modes (will be an error in future Python releases). 7430 7431- bpo-27030: Unknown escapes consisting of ``'\'`` and an ASCII letter in 7432 re.sub() replacement templates regular expressions now are errors. 7433 7434- bpo-28835: Fix a regression introduced in warnings.catch_warnings(): call 7435 warnings.showwarning() if it was overridden inside the context manager. 7436 7437- bpo-27172: To assist with upgrades from 2.7, the previously documented 7438 deprecation of ``inspect.getfullargspec()`` has been reversed. This 7439 decision may be revisited again after the Python 2.7 branch is no longer 7440 officially supported. 7441 7442- bpo-28740: Add sys.getandroidapilevel(): return the build time API version 7443 of Android as an integer. Function only available on Android. 7444 7445- bpo-26273: Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and 7446 :data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by 7447 Omar Sandoval. 7448 7449- bpo-28752: Restored the __reduce__() methods of datetime objects. 7450 7451- bpo-28727: Regular expression patterns, _sre.SRE_Pattern objects created 7452 by re.compile(), become comparable (only x==y and x!=y operators). This 7453 change should fix the issue #18383: don't duplicate warning filters when 7454 the warnings module is reloaded (thing usually only done in unit tests). 7455 7456- bpo-20572: Remove the subprocess.Popen.wait endtime parameter. It was 7457 deprecated in 3.4 and undocumented prior to that. 7458 7459- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and 7460 from_buffer_copy() methods on abstract classes like Array. 7461 7462- bpo-28548: In the "http.server" module, parse the protocol version if 7463 possible, to avoid using HTTP 0.9 in some error responses. 7464 7465- bpo-19717: Makes Path.resolve() succeed on paths that do not exist. Patch 7466 by Vajrasky Kok 7467 7468- bpo-28563: Fixed possible DoS and arbitrary code execution when handle 7469 plural form selections in the gettext module. The expression parser now 7470 supports exact syntax supported by GNU gettext. 7471 7472- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the 7473 garbage collector is invoked in other thread. Based on patch by Sebastian 7474 Cufre. 7475 7476- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if 7477 given empty data twice. Patch by Benjamin Fogle. 7478 7479- bpo-28549: Fixed segfault in curses's addch() with ncurses6. 7480 7481- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar 7482 file with compression before trying to open it without compression. 7483 Otherwise it had 50% chance failed with ignore_zeros=True. 7484 7485- bpo-23262: The webbrowser module now supports Firefox 36+ and derived 7486 browsers. Based on patch by Oleg Broytman. 7487 7488- bpo-24241: The webbrowser in an X environment now prefers using the 7489 default browser directly. Also, the webbrowser register() function now has 7490 a documented 'preferred' argument, to specify browsers to be returned by 7491 get() with no arguments. Patch by David Steele 7492 7493- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused 7494 by representing the scale as float value internally in Tk. tkinter.IntVar 7495 now works if float value is set to underlying Tk variable. 7496 7497- bpo-28255: calendar.TextCalendar.prweek() no longer prints a space after a 7498 weeks's calendar. calendar.TextCalendar.pryear() no longer prints 7499 redundant newline after a year's calendar. Based on patch by Xiang Zhang. 7500 7501- bpo-28255: calendar.TextCalendar.prmonth() no longer prints a space at the 7502 start of new line after printing a month's calendar. Patch by Xiang 7503 Zhang. 7504 7505- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces. 7506 Based on patch by Kaarle Ritvanen. 7507 7508- bpo-28353: os.fwalk() no longer fails on broken links. 7509 7510- bpo-28430: Fix iterator of C implemented asyncio.Future doesn't accept 7511 non-None value is passed to it.send(val). 7512 7513- bpo-27025: Generated names for Tkinter widgets now start by the "!" prefix 7514 for readability. 7515 7516- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a 7517 workaround to Tix library bug. 7518 7519- bpo-28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. 7520 7521- bpo-25953: re.sub() now raises an error for invalid numerical group 7522 reference in replacement template even if the pattern is not found in the 7523 string. Error message for invalid group reference now includes the group 7524 index and the position of the reference. Based on patch by SilentGhost. 7525 7526- bpo-28469: timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead of 7527 1, 10, 100,... for autoranging. 7528 7529- bpo-28115: Command-line interface of the zipfile module now uses argparse. 7530 Added support of long options. 7531 7532- bpo-18219: Optimize csv.DictWriter for large number of columns. Patch by 7533 Mariatta Wijaya. 7534 7535- bpo-28448: Fix C implemented asyncio.Future didn't work on Windows. 7536 7537- bpo-23214: In the "io" module, the argument to BufferedReader and 7538 BytesIO's read1() methods is now optional and can be -1, matching the 7539 BufferedIOBase specification. 7540 7541- bpo-28480: Fix error building socket module when multithreading is 7542 disabled. 7543 7544- bpo-28240: timeit: remove ``-c/--clock`` and ``-t/--time`` command line 7545 options which were deprecated since Python 3.3. 7546 7547- bpo-28240: timeit now repeats the benchmarks 5 times instead of only 3 to 7548 make benchmarks more reliable. 7549 7550- bpo-28240: timeit autorange now uses a single loop iteration if the 7551 benchmark takes less than 10 seconds, instead of 10 iterations. "python3 7552 -m timeit -s 'import time' 'time.sleep(1)'" now takes 4 seconds instead of 7553 40 seconds. 7554 7555- Distutils.sdist now looks for README and setup.py files with case 7556 sensitivity. This behavior matches that found in Setuptools 6.0 and later. 7557 See `setuptools 100 <https://github.com/pypa/setuptools/issues/100>`_ for 7558 rationale. 7559 7560- bpo-24452: Make webbrowser support Chrome on Mac OS X. Patch by Ned 7561 Batchelder. 7562 7563- bpo-20766: Fix references leaked by pdb in the handling of SIGINT 7564 handlers. 7565 7566- bpo-27998: Fixed bytes path support in os.scandir() on Windows. Patch by 7567 Eryk Sun. 7568 7569- bpo-28317: The disassembler now decodes FORMAT_VALUE argument. 7570 7571- bpo-28380: unittest.mock Mock autospec functions now properly support 7572 assert_called, assert_not_called, and assert_called_once. 7573 7574- bpo-28229: lzma module now supports pathlib. 7575 7576- bpo-28321: Fixed writing non-BMP characters with binary format in 7577 plistlib. 7578 7579- bpo-28225: bz2 module now supports pathlib. Initial patch by Ethan 7580 Furman. 7581 7582- bpo-28227: gzip now supports pathlib. Patch by Ethan Furman. 7583 7584- bpo-28332: Deprecated silent truncations in socket.htons and socket.ntohs. 7585 Original patch by Oren Milman. 7586 7587- bpo-27358: Optimized merging var-keyword arguments and improved error 7588 message when passing a non-mapping as a var-keyword argument. 7589 7590- bpo-28257: Improved error message when passing a non-iterable as a 7591 var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL. 7592 7593- bpo-28322: Fixed possible crashes when unpickle itertools objects from 7594 incorrect pickle data. Based on patch by John Leitch. 7595 7596- bpo-28228: imghdr now supports pathlib. 7597 7598- bpo-28226: compileall now supports pathlib. 7599 7600- bpo-28314: Fix function declaration (C flags) for the getiterator() method 7601 of xml.etree.ElementTree.Element. 7602 7603- bpo-28148: Stop using localtime() and gmtime() in the time module. 7604 7605 Introduced platform independent _PyTime_localtime API that is similar to 7606 POSIX localtime_r, but available on all platforms. Patch by Ed Schouten. 7607 7608- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and 7609 9999-12. 7610 7611 Methods itermonthdays() and itermonthdays2() are reimplemented so that 7612 they don't call itermonthdates() which can cause datetime.date 7613 under/overflow. 7614 7615- bpo-28275: Fixed possible use after free in the decompress() methods of 7616 the LZMADecompressor and BZ2Decompressor classes. Original patch by John 7617 Leitch. 7618 7619- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation() 7620 if pass invalid string-like object as a name. Patch by Xiang Zhang. 7621 7622- bpo-18844: random.choices() now has k as a keyword-only argument to 7623 improve the readability of common cases and come into line with the 7624 signature used in other languages. 7625 7626- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py. 7627 Patch by Madison May. 7628 7629- bpo-27611: Fixed support of default root window in the tkinter.tix module. 7630 Added the master parameter in the DisplayStyle constructor. 7631 7632- bpo-27348: In the traceback module, restore the formatting of exception 7633 messages like "Exception: None". This fixes a regression introduced in 7634 3.5a2. 7635 7636- bpo-25651: Allow falsy values to be used for msg parameter of subTest(). 7637 7638- bpo-27778: Fix a memory leak in os.getrandom() when the getrandom() is 7639 interrupted by a signal and a signal handler raises a Python exception. 7640 7641- bpo-28200: Fix memory leak on Windows in the os module (fix 7642 path_converter() function). 7643 7644- bpo-25400: RobotFileParser now correctly returns default values for 7645 crawl_delay and request_rate. Initial patch by Peter Wirtz. 7646 7647- bpo-27932: Prevent memory leak in win32_ver(). 7648 7649- Fix UnboundLocalError in socket._sendfile_use_sendfile. 7650 7651- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of 7652 os.stat(). Patch by Eryk Sun. 7653 7654- bpo-22493: Warning message emitted by using inline flags in the middle of 7655 regular expression now contains a (truncated) regex pattern. Patch by Tim 7656 Graham. 7657 7658- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an 7659 empty bytestring is passed. 7660 7661- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam. 7662 7663- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by 7664 Gergely Imreh and Markus Holtermann. 7665 7666- bpo-28114: Fix a crash in parse_envlist() when env contains byte strings. 7667 Patch by Eryk Sun. 7668 7669- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and 7670 binascii.a2b_qp(). 7671 7672- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by 7673 Kevin Conway. 7674 7675- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by 7676 Seth Michael Larson. 7677 7678- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by 7679 iceboy. 7680 7681- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki. 7682 7683- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect. 7684 7685- bpo-27759: Fix selectors incorrectly retain invalid file descriptors. 7686 Patch by Mark Williams. 7687 7688- bpo-28325: Remove vestigial MacOS 9 macurl2path module and its tests. 7689 7690- bpo-28368: Refuse monitoring processes if the child watcher has no loop 7691 attached. Patch by Vincent Michel. 7692 7693- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader, 7694 add_writer, etc. 7695 7696- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг 7697 Марк. 7698 7699- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor. 7700 7701- bpo-28372: Fix asyncio to support formatting of non-python coroutines. 7702 7703- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг 7704 Марк. 7705 7706- bpo-27972: Prohibit Tasks to await on themselves. 7707 7708- bpo-24142: Reading a corrupt config file left configparser in an invalid 7709 state. Original patch by Florian Höch. 7710 7711- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract 7712 base classes to use keyword parameters in __init_subclass__. Patch by Nate 7713 Soares. 7714 7715- bpo-25532: inspect.unwrap() will now only try to unwrap an object 7716 sys.getrecursionlimit() times, to protect against objects which create a 7717 new object on every attribute access. 7718 7719- bpo-30177: path.resolve(strict=False) no longer cuts the path after the 7720 first element not present in the filesystem. Patch by Antoine Pietri. 7721 7722Documentation 7723------------- 7724 7725- bpo-31294: Fix incomplete code snippet in the ZeroMQSocketListener and 7726 ZeroMQSocketHandler examples and adapt them to Python 3. 7727 7728- bpo-21649: Add RFC 7525 and Mozilla server side TLS links to SSL 7729 documentation. 7730 7731- bpo-31128: Allow the pydoc server to bind to arbitrary hostnames. 7732 7733- bpo-30803: Clarify doc on truth value testing. Original patch by Peter 7734 Thomassen. 7735 7736- bpo-30176: Add missing attribute related constants in curses 7737 documentation. 7738 7739- bpo-30052: the link targets for :func:`bytes` and :func:`bytearray` are 7740 now their respective type definitions, rather than the corresponding 7741 builtin function entries. Use :ref:`bytes <func-bytes>` and 7742 :ref:`bytearray <func-bytearray>` to reference the latter. 7743 7744 In order to ensure this and future cross-reference updates are applied 7745 automatically, the daily documentation builds now disable the default 7746 output caching features in Sphinx. 7747 7748- bpo-26985: Add missing info of code object in inspect documentation. 7749 7750- bpo-19824: Improve the documentation for, and links to, template strings 7751 by emphasizing their utility for internationalization, and by clarifying 7752 some usage constraints. (See also: bpo-20314, bpo-12518) 7753 7754- bpo-28929: Link the documentation to its source file on GitHub. 7755 7756- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer 7757 to aiosmtpd, a third-party asyncio-based replacement. 7758 7759- bpo-26355: Add canonical header link on each page to corresponding major 7760 version of the documentation. Patch by Matthias Bussonnier. 7761 7762- bpo-29349: Fix Python 2 syntax in code for building the documentation. 7763 7764- bpo-23722: The data model reference and the porting section in the 3.6 7765 What's New guide now cover the additional ``__classcell__`` handling 7766 needed for custom metaclasses to fully support PEP 487 and zero-argument 7767 ``super()``. 7768 7769- bpo-28513: Documented command-line interface of zipfile. 7770 7771Tests 7772----- 7773 7774- bpo-29639: test.support.HOST is now "localhost", a new HOSTv4 constant has 7775 been added for your ``127.0.0.1`` needs, similar to the existing HOSTv6 7776 constant. 7777 7778- bpo-31320: Silence traceback in test_ssl 7779 7780- bpo-31346: Prefer PROTOCOL_TLS_CLIENT and PROTOCOL_TLS_SERVER protocols 7781 for SSLContext. 7782 7783- bpo-25674: Remove sha256.tbs-internet.com ssl test 7784 7785- bpo-30715: Address ALPN callback changes for OpenSSL 1.1.0f. The latest 7786 version behaves like OpenSSL 1.0.2 and no longer aborts handshake. 7787 7788- bpo-30822: regrtest: Exclude tzdata from regrtest --all. When running the 7789 test suite using --use=all / -u all, exclude tzdata since it makes 7790 test_datetime too slow (15-20 min on some buildbots) which then times out 7791 on some buildbots. Fix also regrtest command line parser to allow passing 7792 -u extralargefile to run test_zipfile64. 7793 7794- bpo-30695: Add the `set_nomemory(start, stop)` and `remove_mem_hooks()` 7795 functions to the _testcapi module. 7796 7797- bpo-30357: test_thread: setUp() now uses support.threading_setup() and 7798 support.threading_cleanup() to wait until threads complete to avoid random 7799 side effects on following tests. Initial patch written by Grzegorz 7800 Grzywacz. 7801 7802- bpo-30197: Enhanced functions swap_attr() and swap_item() in the 7803 test.support module. They now work when delete replaced attribute or item 7804 inside the with statement. The old value of the attribute or item (or 7805 None if it doesn't exist) now will be assigned to the target of the "as" 7806 clause, if there is one. 7807 7808- bpo-24932: Use proper command line parsing in _testembed 7809 7810- bpo-28950: Disallow -j0 to be combined with -T/-l in regrtest command line 7811 arguments. 7812 7813- bpo-28683: Fix the tests that bind() a unix socket and raise 7814 PermissionError on Android for a non-root user. 7815 7816- bpo-26936: Fix the test_socket failures on Android - getservbyname(), 7817 getservbyport() and getaddrinfo() are broken on some Android API levels. 7818 7819- bpo-28666: Now test.support.rmtree is able to remove unwritable or 7820 unreadable directories. 7821 7822- bpo-23839: Various caches now are cleared before running every test file. 7823 7824- bpo-26944: Fix test_posix for Android where 'id -G' is entirely wrong or 7825 missing the effective gid. 7826 7827- bpo-28409: regrtest: fix the parser of command line arguments. 7828 7829- bpo-28217: Adds _testconsole module to test console input. 7830 7831- bpo-26939: Add the support.setswitchinterval() function to fix 7832 test_functools hanging on the Android armv7 qemu emulator. 7833 7834Build 7835----- 7836 7837- bpo-31354: Allow --with-lto to be used on all builds, not just `make 7838 profile-opt`. 7839 7840- bpo-31370: Remove support for building --without-threads. 7841 7842 This option is not really useful anymore in the 21st century. Removing 7843 lots of conditional paths allows us to simplify the code base, including 7844 in difficult to maintain low-level internal code. 7845 7846- bpo-31341: Per PEP 11, support for the IRIX operating system was removed. 7847 7848- bpo-30854: Fix compile error when compiling --without-threads. Patch by 7849 Masayuki Yamamoto. 7850 7851- bpo-30687: Locate msbuild.exe on Windows when building rather than 7852 vcvarsall.bat 7853 7854- bpo-20210: Support the *disabled* marker in Setup files. Extension modules 7855 listed after this marker are not built at all, neither by the Makefile nor 7856 by setup.py. 7857 7858- bpo-29941: Add ``--with-assertions`` configure flag to explicitly enable C 7859 ``assert()`` checks. Defaults to off. ``--with-pydebug`` implies 7860 ``--with-assertions``. 7861 7862- bpo-28787: Fix out-of-tree builds of Python when configured with 7863 ``--with--dtrace``. 7864 7865- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``, 7866 ``make install`` and some other make targets when configured with 7867 ``--enable-optimizations``. 7868 7869- bpo-23404: Don't regenerate generated files based on file modification 7870 time anymore: the action is now explicit. Replace ``make touch`` with 7871 ``make regen-all``. 7872 7873- bpo-29643: Fix ``--enable-optimization`` didn't work. 7874 7875- bpo-27593: sys.version and the platform module python_build(), 7876 python_branch(), and python_revision() functions now use git information 7877 rather than hg when building from a repo. 7878 7879- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k. 7880 7881- bpo-27659: Prohibit implicit C function declarations: use 7882 ``-Werror=implicit-function-declaration`` when possible (GCC and Clang, 7883 but it depends on the compiler version). Patch written by Chi Hsuan Yen. 7884 7885- bpo-29384: Remove old Be OS helper scripts. 7886 7887- bpo-26851: Set Android compilation and link flags. 7888 7889- bpo-28768: Fix implicit declaration of function _setmode. Patch by 7890 Masayuki Yamamoto 7891 7892- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat 7893 7894- bpo-23903: Added missed names to PC/python3.def. 7895 7896- bpo-28762: lockf() is available on Android API level 24, but the F_LOCK 7897 macro is not defined in android-ndk-r13. 7898 7899- bpo-28538: Fix the compilation error that occurs because if_nameindex() is 7900 available on Android API level 24, but the if_nameindex structure is not 7901 defined. 7902 7903- bpo-20211: Do not add the directory for installing C header files and the 7904 directory for installing object code libraries to the cross compilation 7905 search paths. Original patch by Thomas Petazzoni. 7906 7907- bpo-28849: Do not define sys.implementation._multiarch on Android. 7908 7909- bpo-10656: Fix out-of-tree building on AIX. Patch by Tristan Carel and 7910 Michael Haubenwallner. 7911 7912- bpo-26359: Rename --with-optimiations to --enable-optimizations. 7913 7914- bpo-28444: Fix missing extensions modules when cross compiling. 7915 7916- bpo-28208: Update Windows build and OS X installers to use SQLite 3.14.2. 7917 7918- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j. 7919 7920- bpo-21124: Fix building the _struct module on Cygwin by passing ``NULL`` 7921 instead of ``&PyType_Type`` to PyVarObject_HEAD_INIT. Patch by Masayuki 7922 Yamamoto. 7923 7924- bpo-13756: Fix building extensions modules on Cygwin. Patch by Roumen 7925 Petrov, based on original patch by Jason Tishler. 7926 7927- bpo-21085: Add configure check for siginfo_t.si_band, which Cygwin does 7928 not provide. Patch by Masayuki Yamamoto with review and rebase by Erik 7929 Bray. 7930 7931- bpo-28258: Fixed build with Estonian locale (python-config and distclean 7932 targets in Makefile). Patch by Arfrever Frehtes Taifersar Arahesis. 7933 7934- bpo-26661: setup.py now detects system libffi with multiarch wrapper. 7935 7936- bpo-27979: A full copy of libffi is no longer bundled for use when 7937 building _ctypes on non-OSX UNIX platforms. An installed copy of libffi 7938 is now required when building _ctypes on such platforms. 7939 7940- bpo-15819: Remove redundant include search directory option for building 7941 outside the source tree. 7942 7943- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS. 7944 Patch by Gareth Rees. 7945 7946Windows 7947------- 7948 7949- bpo-31392: Update Windows build to use OpenSSL 1.1.0f 7950 7951- bpo-30389: Adds detection of Visual Studio 2017 to distutils on Windows. 7952 7953- bpo-31358: zlib is no longer bundled in the CPython source, instead it is 7954 downloaded on demand just like bz2, lzma, OpenSSL, Tcl/Tk, and SQLite. 7955 7956- bpo-31340: Change to building with MSVC v141 (included with Visual Studio 7957 2017) 7958 7959- bpo-30581: os.cpu_count() now returns the correct number of processors on 7960 Windows when the number of logical processors is greater than 64. 7961 7962- bpo-30916: Pre-build OpenSSL, Tcl and Tk and include the binaries in the 7963 build. 7964 7965- bpo-30731: Add a missing xmlns to python.manifest so that it matches the 7966 schema. 7967 7968- bpo-30291: Allow requiring 64-bit interpreters from py.exe using -64 7969 suffix. Contributed by Steve (Gadget) Barnes. 7970 7971- bpo-30362: Adds list options (-0, -0p) to py.exe launcher. Contributed by 7972 Steve Barnes. 7973 7974- bpo-23451: Fix socket deprecation warnings in socketmodule.c. Patch by 7975 Segev Finer. 7976 7977- bpo-30450: The build process on Windows no longer depends on Subversion, 7978 instead pulling external code from GitHub via a Python script. If Python 7979 3.6 is not found on the system (via ``py -3.6``), NuGet is used to 7980 download a copy of 32-bit Python. 7981 7982- bpo-29579: Removes readme.txt from the installer. 7983 7984- bpo-25778: winreg does not truncate string correctly (Patch by Eryk Sun) 7985 7986- bpo-28896: Deprecate WindowsRegistryFinder and disable it by default 7987 7988- bpo-28522: Fixes mishandled buffer reallocation in getpathp.c 7989 7990- bpo-28402: Adds signed catalog files for stdlib on Windows. 7991 7992- bpo-28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk 7993 Sun) 7994 7995- bpo-28251: Improvements to help manuals on Windows. 7996 7997- bpo-28110: launcher.msi has different product codes between 32-bit and 7998 64-bit 7999 8000- bpo-28161: Opening CON for write access fails 8001 8002- bpo-28162: WindowsConsoleIO readall() fails if first line starts with 8003 Ctrl+Z 8004 8005- bpo-28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle 8006 8007- bpo-28164: _PyIO_get_console_type fails for various paths 8008 8009- bpo-28137: Renames Windows path file to ._pth 8010 8011- bpo-28138: Windows ._pth file should allow import site 8012 8013IDLE 8014---- 8015 8016- bpo-31493: IDLE code context -- fix code update and font update timers. 8017 8018 Canceling timers prevents a warning message when test_idle completes. 8019 8020- bpo-31488: IDLE - Update non-key options in former extension classes. When 8021 applying configdialog changes, call .reload for each feature class. Change 8022 ParenMatch so updated options affect existing instances attached to 8023 existing editor windows. 8024 8025- bpo-31477: IDLE - Improve rstrip entry in doc. Strip trailing whitespace 8026 strips more than blank spaces. Multiline string literals are not skipped. 8027 8028- bpo-31480: IDLE - make tests pass with zzdummy extension disabled by 8029 default. 8030 8031- bpo-31421: Document how IDLE runs tkinter programs. IDLE calls tcl/tk 8032 update in the background in order to make live 8033 8034 interaction and experimentation with tkinter applications much easier. 8035 8036- bpo-31414: IDLE -- fix tk entry box tests by deleting first. Adding to an 8037 int entry is not the same as deleting and inserting because int('') will 8038 fail. 8039 8040- bpo-31051: Rearrange IDLE configdialog GenPage into Window, Editor, and 8041 Help sections. 8042 8043- bpo-30617: IDLE - Add docstrings and tests for outwin subclass of editor. 8044 8045 Move some data and functions from the class to module level. Patch by 8046 Cheryl Sabella. 8047 8048- bpo-31287: IDLE - Do not modify tkinter.message in test_configdialog. 8049 8050- bpo-27099: Convert IDLE's built-in 'extensions' to regular features. 8051 8052 About 10 IDLE features were implemented as supposedly optional extensions. 8053 Their different behavior could be confusing or worse for users and not 8054 good for maintenance. Hence the conversion. 8055 8056 The main difference for users is that user configurable key bindings for 8057 builtin features are now handled uniformly. Now, editing a binding in a 8058 keyset only affects its value in the keyset. All bindings are defined 8059 together in the system-specific default keysets in config-extensions.def. 8060 All custom keysets are saved as a whole in config-extension.cfg. All take 8061 effect as soon as one clicks Apply or Ok. 8062 8063 The affected events are '<<force-open-completions>>', '<<expand-word>>', 8064 '<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>', 8065 '<<run-module>>', '<<check-module>>', and '<<zoom-height>>'. Any (global) 8066 customizations made before 3.6.3 will not affect their keyset-specific 8067 customization after 3.6.3. and vice versa. 8068 8069 Initial patch by Charles Wohlganger. 8070 8071- bpo-31206: IDLE: Factor HighPage(Frame) class from ConfigDialog. Patch by 8072 Cheryl Sabella. 8073 8074- bpo-31001: Add tests for configdialog highlight tab. Patch by Cheryl 8075 Sabella. 8076 8077- bpo-31205: IDLE: Factor KeysPage(Frame) class from ConfigDialog. The 8078 slightly modified tests continue to pass. Patch by Cheryl Sabella. 8079 8080- bpo-31130: IDLE -- stop leaks in test_configdialog. Initial patch by 8081 Victor Stinner. 8082 8083- bpo-31002: Add tests for configdialog keys tab. Patch by Cheryl Sabella. 8084 8085- bpo-19903: IDLE: Calltips use `inspect.signature` instead of 8086 `inspect.getfullargspec`. This improves calltips for builtins converted to 8087 use Argument Clinic. Patch by Louie Lu. 8088 8089- bpo-31083: IDLE - Add an outline of a TabPage class in configdialog. 8090 Update existing classes to match outline. Initial patch by Cheryl Sabella. 8091 8092- bpo-31050: Factor GenPage(Frame) class from ConfigDialog. The slightly 8093 modified tests continue to pass. Patch by Cheryl Sabella. 8094 8095- bpo-31004: IDLE - Factor FontPage(Frame) class from ConfigDialog. 8096 8097 Slightly modified tests continue to pass. Fix General tests. Patch mostly 8098 by Cheryl Sabella. 8099 8100- bpo-30781: IDLE - Use ttk widgets in ConfigDialog. Patches by Terry Jan 8101 Reedy and Cheryl Sabella. 8102 8103- bpo-31060: IDLE - Finish rearranging methods of ConfigDialog Grouping 8104 methods pertaining to each tab and the buttons will aid writing tests and 8105 improving the tabs and will enable splitting the groups into classes. 8106 8107- bpo-30853: IDLE -- Factor a VarTrace class out of ConfigDialog. 8108 8109 Instance tracers manages pairs consisting of a tk variable and a callback 8110 function. When tracing is turned on, setting the variable calls the 8111 function. Test coverage for the new class is 100%. 8112 8113- bpo-31003: IDLE: Add more tests for General tab. 8114 8115- bpo-30993: IDLE - Improve configdialog font page and tests. 8116 8117 In configdialog: Document causal pathways in create_font_tab docstring. 8118 Simplify some attribute names. Move set_samples calls to var_changed_font 8119 (idea from Cheryl Sabella). Move related functions to positions after the 8120 create widgets function. 8121 8122 In test_configdialog: Fix test_font_set so not order dependent. Fix 8123 renamed test_indent_scale so it tests the widget. Adjust tests for 8124 movement of set_samples call. Add tests for load functions. Put all font 8125 tests in one class and tab indent tests in another. Except for two lines, 8126 these tests completely cover the related functions. 8127 8128- bpo-30981: IDLE -- Add more configdialog font page tests. 8129 8130- bpo-28523: IDLE: replace 'colour' with 'color' in configdialog. 8131 8132- bpo-30917: Add tests for idlelib.config.IdleConf. Increase coverage from 8133 46% to 96%. Patch by Louie Lu. 8134 8135- bpo-30934: Document coverage details for idlelib tests. 8136 8137 * Add section to idlelib/idle-test/README.txt. 8138 8139 * Include check that branches are taken both ways. 8140 8141 * Exclude IDLE-specific code that does not run during unit tests. 8142 8143- bpo-30913: IDLE: Document ConfigDialog tk Vars, methods, and widgets in 8144 docstrings This will facilitate improving the dialog and splitting up the 8145 class. Original patch by Cheryl Sabella. 8146 8147- bpo-30899: IDLE: Add tests for ConfigParser subclasses in config. Patch by 8148 Louie Lu. 8149 8150- bpo-30881: IDLE: Add docstrings to browser.py. Patch by Cheryl Sabella. 8151 8152- bpo-30851: IDLE: Remove unused variables in configdialog. One is a 8153 duplicate, one is set but cannot be altered by users. Patch by Cheryl 8154 Sabella. 8155 8156- bpo-30870: IDLE: In Settings dialog, select font with Up, Down keys as 8157 well as mouse. Initial patch by Louie Lu. 8158 8159- bpo-8231: IDLE: call config.IdleConf.GetUserCfgDir only once. 8160 8161- bpo-30779: IDLE: Factor ConfigChanges class from configdialog, put in 8162 config; test. * In config, put dump test code in a function; run it and 8163 unittest in 'if __name__ == '__main__'. * Add class config.ConfigChanges 8164 based on changes_class_v4.py on bpo issue. * Add class 8165 test_config.ChangesTest, partly using configdialog_tests_v1.py. * Revise 8166 configdialog to use ConfigChanges; see tracker msg297804. * Revise 8167 test_configdialog to match configdialog changes. * Remove configdialog 8168 functions unused or moved to ConfigChanges. Cheryl Sabella contributed 8169 parts of the patch. 8170 8171- bpo-30777: IDLE: configdialog - Add docstrings and fix comments. Patch by 8172 Cheryl Sabella. 8173 8174- bpo-30495: IDLE: Improve textview with docstrings, PEP8 names, and more 8175 tests. Patch by Cheryl Sabella. 8176 8177- bpo-30723: IDLE: Make several improvements to parenmatch. Add 'parens' 8178 style to highlight both opener and closer. Make 'default' style, which is 8179 not default, a synonym for 'opener'. Make time-delay work the same with 8180 all styles. Add help for config dialog extensions tab, including help for 8181 parenmatch. Add new tests. Original patch by Charles Wohlganger. 8182 8183- bpo-30674: IDLE: add docstrings to grep module. Patch by Cheryl Sabella 8184 8185- bpo-21519: IDLE's basic custom key entry dialog now detects duplicates 8186 properly. Original patch by Saimadhav Heblikar. 8187 8188- bpo-29910: IDLE no longer deletes a character after commenting out a 8189 region by a key shortcut. Add ``return 'break'`` for this and other 8190 potential conflicts between IDLE and default key bindings. 8191 8192- bpo-30728: Review and change idlelib.configdialog names. Lowercase method 8193 and attribute names. Replace 'colour' with 'color', expand overly cryptic 8194 names, delete unneeded underscores. Replace ``import *`` with specific 8195 imports. Patches by Cheryl Sabella. 8196 8197- bpo-6739: IDLE: Verify user-entered key sequences by trying to bind them 8198 with tk. Add tests for all 3 validation functions. Original patch by G 8199 Polo. Tests added by Cheryl Sabella. 8200 8201- bpo-15786: Fix several problems with IDLE's autocompletion box. The 8202 following should now work: clicking on selection box items; using the 8203 scrollbar; selecting an item by hitting Return. Hangs on MacOSX should no 8204 longer happen. Patch by Louie Lu. 8205 8206- bpo-25514: Add doc subsubsection about IDLE failure to start. Popup 8207 no-connection message directs users to this section. 8208 8209- bpo-30642: Fix reference leaks in IDLE tests. Patches by Louie Lu and 8210 Terry Jan Reedy. 8211 8212- bpo-30495: Add docstrings for textview.py and use PEP8 names. Patches by 8213 Cheryl Sabella and Terry Jan Reedy. 8214 8215- bpo-30290: Help-about: use pep8 names and add tests. Increase coverage to 8216 100%. Patches by Louie Lu, Cheryl Sabella, and Terry Jan Reedy. 8217 8218- bpo-30303: Add _utest option to textview; add new tests. Increase coverage 8219 to 100%. Patches by Louie Lu and Terry Jan Reedy. 8220 8221- bpo-29071: IDLE colors f-string prefixes (but not invalid ur prefixes). 8222 8223- bpo-28572: Add 10% to coverage of IDLE's test_configdialog. Update and 8224 augment description of the configuration system. 8225 8226Tools/Demos 8227----------- 8228 8229- bpo-30983: gdb integration commands (py-bt, etc.) work on optimized shared 8230 builds now, too. PEP 523 introduced _PyEval_EvalFrameDefault which 8231 inlines PyEval_EvalFrameEx on non-debug shared builds. This broke the 8232 ability to use py-bt, py-up, and a few other Python-specific gdb 8233 integrations. The problem is fixed by only looking for 8234 _PyEval_EvalFrameDefault frames in python-gdb.py. Original patch by Bruno 8235 "Polaco" Penteado. 8236 8237- bpo-29748: Added the slice index converter in Argument Clinic. 8238 8239- bpo-24037: Argument Clinic now uses the converter `bool(accept={int})` 8240 rather than `int` for semantical booleans. This avoids repeating the 8241 default value for Python and C and will help in converting to `bool` in 8242 future. 8243 8244- bpo-29367: python-gdb.py now supports also ``method-wrapper`` 8245 (``wrapperobject``) objects. 8246 8247- bpo-28023: Fix python-gdb.py didn't support new dict implementation. 8248 8249- bpo-15369: The pybench and pystone microbenchmark have been removed from 8250 Tools. Please use the new Python benchmark suite 8251 https://github.com/python/performance which is more reliable and includes 8252 a portable version of pybench working on Python 2 and Python 3. 8253 8254- bpo-28102: The zipfile module CLI now prints usage to stderr. Patch by 8255 Stephen J. Turnbull. 8256 8257C API 8258----- 8259 8260- bpo-31338: Added the ``Py_UNREACHABLE()`` macro for code paths which are 8261 never expected to be reached. This and a few other useful macros are now 8262 documented in the C API manual. 8263 8264- bpo-30832: Remove own implementation for thread-local storage. 8265 8266 CPython has provided the own implementation for thread-local storage (TLS) 8267 on Python/thread.c, it's used in the case which a platform has not 8268 supplied native TLS. However, currently all supported platforms (Windows 8269 and pthreads) have provided native TLS and defined the Py_HAVE_NATIVE_TLS 8270 macro with unconditional in any case. 8271 8272- bpo-30708: PyUnicode_AsWideCharString() now raises a ValueError if the 8273 second argument is NULL and the wchar_t\* string contains null characters. 8274 8275- bpo-16500: Deprecate PyOS_AfterFork() and add PyOS_BeforeFork(), 8276 PyOS_AfterFork_Parent() and PyOS_AfterFork_Child(). 8277 8278- bpo-6532: The type of results of PyThread_start_new_thread() and 8279 PyThread_get_thread_ident(), and the id parameter of 8280 PyThreadState_SetAsyncExc() changed from "long" to "unsigned long". 8281 8282- bpo-27867: Function PySlice_GetIndicesEx() is deprecated and replaced with 8283 a macro if Py_LIMITED_API is not set or set to the value between 8284 0x03050400 and 0x03060000 (not including) or 0x03060100 or higher. Added 8285 functions PySlice_Unpack() and PySlice_AdjustIndices(). 8286 8287- bpo-29083: Fixed the declaration of some public API functions. 8288 PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in 8289 limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and 8290 Py_BuildValue() were not available in limited API of version < 3.3 when 8291 PY_SSIZE_T_CLEAN is defined. 8292 8293- bpo-28769: The result of PyUnicode_AsUTF8AndSize() and PyUnicode_AsUTF8() 8294 is now of type ``const char *`` rather of ``char *``. 8295 8296- bpo-29058: All stable API extensions added after Python 3.2 are now 8297 available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of 8298 the minimum Python version supporting this API. 8299 8300- bpo-28822: The index parameters *start* and *end* of PyUnicode_FindChar() 8301 are now adjusted to behave like ``str[start:end]``. 8302 8303- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions. 8304 8305- bpo-28761: The fields name and doc of structures PyMemberDef, PyGetSetDef, 8306 PyStructSequence_Field, PyStructSequence_Desc, and wrapperbase are now of 8307 type ``const char *`` rather of ``char *``. 8308 8309- bpo-28748: Private variable _Py_PackageContext is now of type ``const char 8310 *`` rather of ``char *``. 8311 8312- bpo-19569: Compiler warnings are now emitted if use most of deprecated 8313 functions. 8314 8315- bpo-28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(), 8316 PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and 8317 PyUnicode_AsEncodedUnicode(). 8318 8319 8320What's New in Python 3.6.6 final? 8321================================= 8322 8323*Release date: 2018-06-27* 8324 8325There were no new changes in version 3.6.6. 8326 8327 8328 8329What's New in Python 3.6.6 release candidate 1? 8330=============================================== 8331 8332*Release date: 2018-06-11* 8333 8334Core and Builtins 8335----------------- 8336 8337- bpo-33786: Fix asynchronous generators to handle GeneratorExit in athrow() 8338 correctly 8339 8340- bpo-30654: Fixed reset of the SIGINT handler to SIG_DFL on interpreter 8341 shutdown even when there was a custom handler set previously. Patch by 8342 Philipp Kerling. 8343 8344- bpo-33622: Fixed a leak when the garbage collector fails to add an object 8345 with the ``__del__`` method or referenced by it into the 8346 :data:`gc.garbage` list. :c:func:`PyGC_Collect` can now be called when an 8347 exception is set and preserves it. 8348 8349- bpo-31849: Fix signed/unsigned comparison warning in pyhash.c. 8350 8351- bpo-33391: Fix a leak in set_symmetric_difference(). 8352 8353- bpo-28055: Fix unaligned accesses in siphash24(). Patch by Rolf Eike Beer. 8354 8355- bpo-33231: Fix potential memory leak in ``normalizestring()``. 8356 8357- bpo-29922: Improved error messages in 'async with' when ``__aenter__()`` 8358 or ``__aexit__()`` return non-awaitable object. 8359 8360- bpo-33199: Fix ``ma_version_tag`` in dict implementation is uninitialized 8361 when copying from key-sharing dict. 8362 8363- bpo-33041: Fixed jumping when the function contains an ``async for`` loop. 8364 8365- bpo-32282: Fix an unnecessary ifdef in the include of VersionHelpers.h in 8366 socketmodule on Windows. 8367 8368- bpo-21983: Fix a crash in `ctypes.cast()` in case the type argument is a 8369 ctypes structured data type. Patch by Eryk Sun and Oren Milman. 8370 8371Library 8372------- 8373 8374- bpo-30167: Prevent site.main() exception if PYTHONSTARTUP is set. Patch by 8375 Steve Weber. 8376 8377- bpo-33812: Datetime instance d with non-None tzinfo, but with 8378 d.tzinfo.utcoffset(d) returning None is now treated as naive by the 8379 astimezone() method. 8380 8381- bpo-30805: Avoid race condition with debug logging 8382 8383- bpo-33767: The concatenation (``+``) and repetition (``*``) sequence 8384 operations now raise :exc:`TypeError` instead of :exc:`SystemError` when 8385 performed on :class:`mmap.mmap` objects. Patch by Zackery Spytz. 8386 8387- bpo-32684: Fix gather to propagate cancellation of itself even with 8388 return_exceptions. 8389 8390- bpo-33674: Fix a race condition in SSLProtocol.connection_made() of 8391 asyncio.sslproto: start immediately the handshake instead of using 8392 call_soon(). Previously, data_received() could be called before the 8393 handshake started, causing the handshake to hang or fail. 8394 8395- bpo-31647: Fixed bug where calling write_eof() on a 8396 _SelectorSocketTransport after it's already closed raises AttributeError. 8397 8398- bpo-33672: Fix Task.__repr__ crash with Cython's bogus coroutines 8399 8400- bpo-33469: Fix RuntimeError after closing loop that used run_in_executor 8401 8402- bpo-11874: Use a better regex when breaking usage into wrappable parts. 8403 Avoids bogus assertion errors from custom metavar strings. 8404 8405- bpo-30877: Fixed a bug in the Python implementation of the JSON decoder 8406 that prevented the cache of parsed strings from clearing after finishing 8407 the decoding. Based on patch by c-fos. 8408 8409- bpo-33548: tempfile._candidate_tempdir_list should consider common TEMP 8410 locations 8411 8412- bpo-33542: Prevent ``uuid.get_node`` from using a DUID instead of a MAC on 8413 Windows. Patch by Zvi Effron 8414 8415- bpo-26819: Fix race condition with `ReadTransport.resume_reading` in 8416 Windows proactor event loop. 8417 8418- bpo-28556: Minor fixes in typing module: add annotations to 8419 ``NamedTuple.__new__``, pass ``*args`` and ``**kwds`` in 8420 ``Generic.__new__``. Original PRs by Paulius Šarka and Chad Dombrova. 8421 8422- bpo-20087: Updated alias mapping with glibc 2.27 supported locales. 8423 8424- bpo-33422: Fix trailing quotation marks getting deleted when looking up 8425 byte/string literals on pydoc. Patch by Andrés Delfino. 8426 8427- bpo-33197: Update error message when constructing invalid 8428 inspect.Parameters Patch by Dong-hee Na. 8429 8430- bpo-33383: Fixed crash in the get() method of the :mod:`dbm.ndbm` database 8431 object when it is called with a single argument. 8432 8433- bpo-33329: Fix multiprocessing regression on newer glibcs 8434 8435- bpo-991266: Fix quoting of the ``Comment`` attribute of 8436 :class:`http.cookies.SimpleCookie`. 8437 8438- bpo-33131: Upgrade bundled version of pip to 10.0.1. 8439 8440- bpo-33308: Fixed a crash in the :mod:`parser` module when converting an ST 8441 object to a tree of tuples or lists with ``line_info=False`` and 8442 ``col_info=True``. 8443 8444- bpo-33263: Fix FD leak in `_SelectorSocketTransport` Patch by Vlad 8445 Starostin. 8446 8447- bpo-33256: Fix display of ``<module>`` call in the html produced by 8448 ``cgitb.html()``. Patch by Stéphane Blondon. 8449 8450- bpo-33203: ``random.Random.choice()`` now raises ``IndexError`` for empty 8451 sequences consistently even when called from subclasses without a 8452 ``getrandbits()`` implementation. 8453 8454- bpo-33224: Update difflib.mdiff() for PEP 479. Convert an uncaught 8455 StopIteration in a generator into a return-statement. 8456 8457- bpo-33209: End framing at the end of C implementation of 8458 :func:`pickle.Pickler.dump`. 8459 8460- bpo-32861: The urllib.robotparser's ``__str__`` representation now 8461 includes wildcard entries and the "Crawl-delay" and "Request-rate" fields. 8462 Patch by Michael Lazar. 8463 8464- bpo-33096: Allow ttk.Treeview.insert to insert iid that has a false 8465 boolean value. Note iid=0 and iid=False would be same. Patch by Garvit 8466 Khatri. 8467 8468- bpo-33127: The ssl module now compiles with LibreSSL 2.7.1. 8469 8470- bpo-33021: Release the GIL during fstat() calls, avoiding hang of all 8471 threads when calling mmap.mmap(), os.urandom(), and random.seed(). Patch 8472 by Nir Soffer. 8473 8474- bpo-27683: Fix a regression in :mod:`ipaddress` that result of 8475 :meth:`hosts` is empty when the network is constructed by a tuple 8476 containing an integer mask and only 1 bit left for addresses. 8477 8478- bpo-32844: Fix wrong redirection of a low descriptor (0 or 1) to stderr in 8479 subprocess if another low descriptor is closed. 8480 8481- bpo-31908: Fix output of cover files for ``trace`` module command-line 8482 tool. Previously emitted cover files only when ``--missing`` option was 8483 used. Patch by Michael Selik. 8484 8485- bpo-31457: If nested log adapters are used, the inner ``process()`` 8486 methods are no longer omitted. 8487 8488- bpo-16865: Support arrays >=2GiB in :mod:`ctypes`. Patch by Segev Finer. 8489 8490- bpo-31238: pydoc: the stop() method of the private ServerThread class now 8491 waits until DocServer.serve_until_quit() completes and then explicitly 8492 sets its docserver attribute to None to break a reference cycle. 8493 8494Documentation 8495------------- 8496 8497- bpo-33503: Fix broken pypi link 8498 8499- bpo-33421: Add missing documentation for ``typing.AsyncContextManager``. 8500 8501- bpo-33378: Add Korean language switcher for https://docs.python.org/3/ 8502 8503- bpo-33276: Clarify that the ``__path__`` attribute on modules cannot be 8504 just any value. 8505 8506- bpo-33201: Modernize documentation for writing C extension types. 8507 8508- bpo-33195: Deprecate ``Py_UNICODE`` usage in ``c-api/arg`` document. 8509 ``Py_UNICODE`` related APIs are deprecated since Python 3.3, but it is 8510 missed in the document. 8511 8512- bpo-33126: Document PyBuffer_ToContiguous(). 8513 8514- bpo-27212: Modify documentation for the :func:`islice` recipe to consume 8515 initial values up to the start index. 8516 8517- bpo-28247: Update :mod:`zipapp` documentation to describe how to make 8518 standalone applications. 8519 8520- bpo-18802: Documentation changes for ipaddress. Patch by Jon Foster and 8521 Berker Peksag. 8522 8523- bpo-27428: Update documentation to clarify that ``WindowsRegistryFinder`` 8524 implements ``MetaPathFinder``. (Patch by Himanshu Lakhara) 8525 8526- bpo-8243: Add a note about curses.addch and curses.addstr exception 8527 behavior when writing outside a window, or pad. 8528 8529- bpo-31432: Clarify meaning of CERT_NONE, CERT_OPTIONAL, and CERT_REQUIRED 8530 flags for ssl.SSLContext.verify_mode. 8531 8532Tests 8533----- 8534 8535- bpo-33655: Ignore test_posix_fallocate failures on BSD platforms that 8536 might be due to running on ZFS. 8537 8538- bpo-19417: Add test_bdb.py. 8539 8540Build 8541----- 8542 8543- bpo-5755: Move ``-Wstrict-prototypes`` option to ``CFLAGS_NODIST`` from 8544 ``OPT``. This option emitted annoying warnings when building extension 8545 modules written in C++. 8546 8547- bpo-33614: Ensures module definition files for the stable ABI on Windows 8548 are correctly regenerated. 8549 8550- bpo-33522: Enable CI builds on Visual Studio Team Services at 8551 https://python.visualstudio.com/cpython 8552 8553- bpo-33012: Add ``-Wno-cast-function-type`` for gcc 8 for silencing 8554 warnings about function casts like casting to PyCFunction in method 8555 definition lists. 8556 8557- bpo-33394: Enable the verbose build for extension modules, when GNU make 8558 is passed macros on the command line. 8559 8560Windows 8561------- 8562 8563- bpo-33184: Update Windows installer to OpenSSL 1.0.2o. 8564 8565macOS 8566----- 8567 8568- bpo-33184: Update macOS installer build to use OpenSSL 1.0.2o. 8569 8570IDLE 8571---- 8572 8573- bpo-33656: On Windows, add API call saying that tk scales for DPI. On 8574 Windows 8.1+ or 10, with DPI compatibility properties of the Python binary 8575 unchanged, and a monitor resolution greater than 96 DPI, this should make 8576 text and lines sharper. It should otherwise have no effect. 8577 8578- bpo-33768: Clicking on a context line moves that line to the top of the 8579 editor window. 8580 8581- bpo-33763: IDLE: Use read-only text widget for code context instead of 8582 label widget. 8583 8584- bpo-33664: Scroll IDLE editor text by lines. Previously, the mouse wheel 8585 and scrollbar slider moved text by a fixed number of pixels, resulting in 8586 partial lines at the top of the editor box. The change also applies to 8587 the shell and grep output windows, but not to read-only text views. 8588 8589- bpo-33679: Enable theme-specific color configuration for Code Context. Use 8590 the Highlights tab to see the setting for built-in themes or add settings 8591 to custom themes. 8592 8593- bpo-33642: Display up to maxlines non-blank lines for Code Context. If 8594 there is no current context, show a single blank line. 8595 8596- bpo-33628: IDLE: Cleanup codecontext.py and its test. 8597 8598- bpo-33564: IDLE's code context now recognizes async as a block opener. 8599 8600- bpo-29706: IDLE now colors async and await as keywords in 3.6. They become 8601 full keywords in 3.7. 8602 8603- bpo-21474: Update word/identifier definition from ascii to unicode. In 8604 text and entry boxes, this affects selection by double-click, movement 8605 left/right by control-left/right, and deletion left/right by 8606 control-BACKSPACE/DEL. 8607 8608- bpo-33204: IDLE: consistently color invalid string prefixes. A 'u' string 8609 prefix cannot be paired with either 'r' or 'f'. Consistently color as much 8610 of the prefix, starting at the right, as is valid. Revise and extend 8611 colorizer test. 8612 8613- bpo-32831: Add docstrings and tests for codecontext. 8614 8615Tools/Demos 8616----------- 8617 8618- bpo-33189: :program:`pygettext.py` now recognizes only literal strings as 8619 docstrings and translatable strings, and rejects bytes literals and 8620 f-string expressions. 8621 8622- bpo-31920: Fixed handling directories as arguments in the ``pygettext`` 8623 script. Based on patch by Oleg Krasnikov. 8624 8625- bpo-29673: Fix pystackv and pystack gdbinit macros. 8626 8627- bpo-32885: Add an ``-n`` flag for ``Tools/scripts/pathfix.py`` to disable 8628 automatic backup creation (files with ``~`` suffix). 8629 8630- bpo-31583: Fix 2to3 for using with --add-suffix option but without 8631 --output-dir option for relative path to files in current directory. 8632 8633C API 8634----- 8635 8636- bpo-32374: Document that m_traverse for multi-phase initialized modules 8637 can be called with m_state=NULL, and add a sanity check 8638 8639 8640What's New in Python 3.6.5 final? 8641================================= 8642 8643*Release date: 2018-03-28* 8644 8645Tests 8646----- 8647 8648- bpo-32872: Avoid regrtest compatibility issue with namespace packages. 8649 8650Build 8651----- 8652 8653- bpo-33163: Upgrade pip to 9.0.3 and setuptools to v39.0.1. 8654 8655 8656What's New in Python 3.6.5 release candidate 1? 8657=============================================== 8658 8659*Release date: 2018-03-13* 8660 8661Security 8662-------- 8663 8664- bpo-33001: Minimal fix to prevent buffer overrun in os.symlink on Windows 8665 8666- bpo-32981: Regexes in difflib and poplib were vulnerable to catastrophic 8667 backtracking. These regexes formed potential DOS vectors (REDOS). They 8668 have been refactored. This resolves CVE-2018-1060 and CVE-2018-1061. Patch 8669 by Jamie Davis. 8670 8671Core and Builtins 8672----------------- 8673 8674- bpo-33026: Fixed jumping out of "with" block by setting f_lineno. 8675 8676- bpo-17288: Prevent jumps from 'return' and 'exception' trace events. 8677 8678- bpo-32889: Update Valgrind suppression list to account for the rename of 8679 ``Py_ADDRESS_IN_RANG`` to ``address_in_range``. 8680 8681- bpo-32650: Pdb and other debuggers dependent on bdb.py will correctly step 8682 over (next command) native coroutines. Patch by Pablo Galindo. 8683 8684- bpo-32685: Improve suggestion when the Python 2 form of print statement is 8685 either present on the same line as the header of a compound statement or 8686 else terminated by a semi-colon instead of a newline. Patch by Nitish 8687 Chandra. 8688 8689- bpo-32583: Fix possible crashing in builtin Unicode decoders caused by 8690 write out-of-bound errors when using customized decode error handlers. 8691 8692- bpo-26163: Improved frozenset() hash to create more distinct hash values 8693 when faced with datasets containing many similar values. 8694 8695- bpo-27169: The ``__debug__`` constant is now optimized out at compile 8696 time. This fixes also bpo-22091. 8697 8698- bpo-32329: ``sys.flags.hash_randomization`` is now properly set to 0 when 8699 hash randomization is turned off by ``PYTHONHASHSEED=0``. 8700 8701- bpo-30416: The optimizer is now protected from spending much time doing 8702 complex calculations and consuming much memory for creating large 8703 constants in constant folding. 8704 8705- bpo-18533: ``repr()`` on a dict containing its own ``values()`` or 8706 ``items()`` no longer raises ``RecursionError``; OrderedDict similarly. 8707 Instead, use ``...``, as for other recursive structures. Patch by Ben 8708 North. 8709 8710- bpo-32028: Leading whitespace is now correctly ignored when generating 8711 suggestions for converting Py2 print statements to Py3 builtin print 8712 function calls. Patch by Sanyam Khurana. 8713 8714- bpo-32137: The repr of deeply nested dict now raises a RecursionError 8715 instead of crashing due to a stack overflow. 8716 8717Library 8718------- 8719 8720- bpo-33064: lib2to3 now properly supports trailing commas after ``*args`` 8721 and ``**kwargs`` in function signatures. 8722 8723- bpo-31804: Avoid failing in multiprocessing.Process if the standard 8724 streams are closed or None at exit. 8725 8726- bpo-33037: Skip sending/receiving data after SSL transport closing. 8727 8728- bpo-30353: Fix ctypes pass-by-value for structs on 64-bit Cygwin/MinGW. 8729 8730- bpo-33009: Fix inspect.signature() for single-parameter partialmethods. 8731 8732- bpo-32969: Expose several missing constants in zlib and fix corresponding 8733 documentation. 8734 8735- bpo-32713: Fixed tarfile.itn handling of out-of-bounds float values. Patch 8736 by Joffrey Fuhrer. 8737 8738- bpo-30622: The ssl module now detects missing NPN support in LibreSSL. 8739 8740- bpo-32922: dbm.open() now encodes filename with the filesystem encoding 8741 rather than default encoding. 8742 8743- bpo-32859: In ``os.dup2``, don't check every call whether the ``dup3`` 8744 syscall exists or not. 8745 8746- bpo-21060: Rewrite confusing message from setup.py upload from "No dist 8747 file created in earlier command" to the more helpful "Must create and 8748 upload files in one command". 8749 8750- bpo-32857: In :mod:`tkinter`, ``after_cancel(None)`` now raises a 8751 :exc:`ValueError` instead of canceling the first scheduled function. 8752 Patch by Cheryl Sabella. 8753 8754- bpo-32852: Make sure sys.argv remains as a list when running trace. 8755 8756- bpo-32841: Fixed `asyncio.Condition` issue which silently ignored 8757 cancellation after notifying and cancelling a conditional lock. Patch by 8758 Bar Harel. 8759 8760- bpo-31787: Fixed refleaks of ``__init__()`` methods in various modules. 8761 (Contributed by Oren Milman) 8762 8763- bpo-30157: Fixed guessing quote and delimiter in csv.Sniffer.sniff() when 8764 only the last field is quoted. Patch by Jake Davis. 8765 8766- bpo-32394: socket: Remove TCP_FASTOPEN, TCP_KEEPCNT flags on older version 8767 Windows during run-time. 8768 8769- bpo-32777: Fix a rare but potential pre-exec child process deadlock in 8770 subprocess on POSIX systems when marking file descriptors inheritable on 8771 exec in the child process. This bug appears to have been introduced in 8772 3.4. 8773 8774- bpo-32647: The ctypes module used to depend on indirect linking for 8775 dlopen. The shared extension is now explicitly linked against libdl on 8776 platforms with dl. 8777 8778- bpo-32734: Fixed ``asyncio.Lock()`` safety issue which allowed acquiring 8779 and locking the same lock multiple times, without it being free. Patch by 8780 Bar Harel. 8781 8782- bpo-32727: Do not include name field in SMTP envelope from address. Patch 8783 by Stéphane Wirtel 8784 8785- bpo-27931: Fix email address header parsing error when the username is an 8786 empty quoted string. Patch by Xiang Zhang. 8787 8788- bpo-32304: distutils' upload command no longer corrupts tar files ending 8789 with a CR byte, and no longer tries to convert CR to CRLF in any of the 8790 upload text fields. 8791 8792- bpo-32502: uuid.uuid1 no longer raises an exception if a 64-bit hardware 8793 address is encountered. 8794 8795- bpo-31848: Fix the error handling in Aifc_read.initfp() when the SSND 8796 chunk is not found. Patch by Zackery Spytz. 8797 8798- bpo-32555: On FreeBSD and Solaris, os.strerror() now always decode the 8799 byte string from the current locale encoding, rather than using 8800 ASCII/surrogateescape in some cases. 8801 8802- bpo-32521: The nis module is now compatible with new libnsl and headers 8803 location. 8804 8805- bpo-32473: Improve ABCMeta._dump_registry() output readability 8806 8807- bpo-32521: glibc has removed Sun RPC. Use replacement libtirpc headers and 8808 library in nis module. 8809 8810- bpo-32228: Ensure that ``truncate()`` preserves the file position (as 8811 reported by ``tell()``) after writes longer than the buffer size. 8812 8813- bpo-26133: Don't unsubscribe signals in asyncio UNIX event loop on 8814 interpreter shutdown. 8815 8816- bpo-32185: The SSL module no longer sends IP addresses in SNI TLS 8817 extension on platforms with OpenSSL 1.0.2+ or inet_pton. 8818 8819- bpo-32323: :func:`urllib.parse.urlsplit()` does not convert zone-id 8820 (scope) to lower case for scoped IPv6 addresses in hostnames now. 8821 8822- bpo-32302: Fix bdist_wininst of distutils for CRT v142: it binary 8823 compatible with CRT v140. 8824 8825- bpo-32255: A single empty field is now always quoted when written into a 8826 CSV file. This allows to distinguish an empty row from a row consisting of 8827 a single empty field. Patch by Licht Takeuchi. 8828 8829- bpo-32277: Raise ``NotImplementedError`` instead of ``SystemError`` on 8830 platforms where ``chmod(..., follow_symlinks=False)`` is not supported. 8831 Patch by Anthony Sottile. 8832 8833- bpo-32199: The getnode() ip getter now uses 'ip link' instead of 'ip link 8834 list'. 8835 8836- bpo-27456: Ensure TCP_NODELAY is set on Linux. Tests by Victor Stinner. 8837 8838- bpo-31900: The :func:`locale.localeconv` function now sets temporarily the 8839 ``LC_CTYPE`` locale to the ``LC_NUMERIC`` locale to decode 8840 ``decimal_point`` and ``thousands_sep`` byte strings if they are non-ASCII 8841 or longer than 1 byte, and the ``LC_NUMERIC`` locale is different than the 8842 ``LC_CTYPE`` locale. This temporary change affects other threads. 8843 8844 Same change for the :meth:`str.format` method when formatting a number 8845 (:class:`int`, :class:`float`, :class:`float` and subclasses) with the 8846 ``n`` type (ex: ``'{:n}'.format(1234)``). 8847 8848- bpo-31802: Importing native path module (``posixpath``, ``ntpath``) now 8849 works even if the ``os`` module still is not imported. 8850 8851Documentation 8852------------- 8853 8854- bpo-17232: Clarify docs for -O and -OO. Patch by Terry Reedy. 8855 8856- bpo-32800: Update link to w3c doc for xml default namespaces. 8857 8858- bpo-8722: Document :meth:`__getattr__` behavior when property :meth:`get` 8859 method raises :exc:`AttributeError`. 8860 8861- bpo-32614: Modify RE examples in documentation to use raw strings to 8862 prevent :exc:`DeprecationWarning` and add text to REGEX HOWTO to highlight 8863 the deprecation. 8864 8865- bpo-31972: Improve docstrings for `pathlib.PurePath` subclasses. 8866 8867- bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile and 8868 their C-API counterparts regarding which type of events are received in 8869 each function. Patch by Pablo Galindo Salgado. 8870 8871Tests 8872----- 8873 8874- bpo-32517: Fix failing ``test_asyncio`` on macOS 10.12.2+ due to transport 8875 of ``KqueueSelector`` loop was not being closed. 8876 8877- bpo-32721: Fix test_hashlib to not fail if the _md5 module is not built. 8878 8879- bpo-32252: Fix faulthandler_suppress_crash_report() used to prevent core 8880 dump files when testing crashes. getrlimit() returns zero on success. 8881 8882- bpo-31518: Debian Unstable has disabled TLS 1.0 and 1.1 for 8883 SSLv23_METHOD(). Change TLS/SSL protocol of some tests to PROTOCOL_TLS or 8884 PROTOCOL_TLSv1_2 to make them pass on Debian. 8885 8886Build 8887----- 8888 8889- bpo-32635: Fix segfault of the crypt module when libxcrypt is provided 8890 instead of libcrypt at the system. 8891 8892Windows 8893------- 8894 8895- bpo-33016: Fix potential use of uninitialized memory in 8896 nt._getfinalpathname 8897 8898- bpo-32903: Fix a memory leak in os.chdir() on Windows if the current 8899 directory is set to a UNC path. 8900 8901- bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. 8902 8903- bpo-32409: Ensures activate.bat can handle Unicode contents. 8904 8905- bpo-32457: Improves handling of denormalized executable path when 8906 launching Python. 8907 8908- bpo-32370: Use the correct encoding for ipconfig output in the uuid 8909 module. Patch by Segev Finer. 8910 8911- bpo-29248: Fix :func:`os.readlink` on Windows, which was mistakenly 8912 treating the ``PrintNameOffset`` field of the reparse data buffer as a 8913 number of characters instead of bytes. Patch by Craig Holmquist and SSE4. 8914 8915- bpo-32588: Create standalone _distutils_findvs module. 8916 8917macOS 8918----- 8919 8920- bpo-32726: Provide an additional, more modern macOS installer variant that 8921 supports macOS 10.9+ systems in 64-bit mode only. Upgrade the supplied 8922 third-party libraries to OpenSSL 1.0.2n, XZ 5.2.3, and SQLite 3.22.0. The 8923 10.9+ installer now links with and supplies its own copy of Tcl/Tk 8.6.8. 8924 8925IDLE 8926---- 8927 8928- bpo-32984: Set ``__file__`` while running a startup file. Like Python, 8929 IDLE optionally runs one startup file in the Shell window before 8930 presenting the first interactive input prompt. For IDLE, ``-s`` runs a 8931 file named in environmental variable :envvar:`IDLESTARTUP` or 8932 :envvar:`PYTHONSTARTUP`; ``-r file`` runs ``file``. Python sets 8933 ``__file__`` to the startup file name before running the file and unsets 8934 it before the first prompt. IDLE now does the same when run normally, 8935 without the ``-n`` option. 8936 8937- bpo-32940: Simplify and rename StringTranslatePseudoMapping in pyparse. 8938 8939- bpo-32916: Change ``str`` to ``code`` in pyparse. 8940 8941- bpo-32905: Remove unused code in pyparse module. 8942 8943- bpo-32874: Add tests for pyparse. 8944 8945- bpo-32837: Using the system and place-dependent default encoding for 8946 open() is a bad idea for IDLE's system and location-independent files. 8947 8948- bpo-32826: Add "encoding=utf-8" to open() in IDLE's test_help_about. GUI 8949 test test_file_buttons() only looks at initial ascii-only lines, but 8950 failed on systems where open() defaults to 'ascii' because readline() 8951 internally reads and decodes far enough ahead to encounter a non-ascii 8952 character in CREDITS.txt. 8953 8954- bpo-32765: Update configdialog General tab docstring to add new widgets to 8955 the widget list. 8956 8957Tools/Demos 8958----------- 8959 8960- bpo-24960: 2to3 and lib2to3 can now read pickled grammar files using 8961 pkgutil.get_data() rather than probing the filesystem. This lets 2to3 and 8962 lib2to3 work when run from a zipfile. 8963 8964- bpo-32222: Fix pygettext not extracting docstrings for functions with type 8965 annotated arguments. Patch by Toby Harradine. 8966 8967C API 8968----- 8969 8970- bpo-29084: Undocumented C API for OrderedDict has been excluded from the 8971 limited C API. It was added by mistake and actually never worked in the 8972 limited C API. 8973 8974 8975What's New in Python 3.6.4 final? 8976================================= 8977 8978*Release date: 2017-12-18* 8979 8980There were no new code changes in version 3.6.4 since v3.6.4rc1. 8981 8982 8983 8984What's New in Python 3.6.4 release candidate 1? 8985=============================================== 8986 8987*Release date: 2017-12-05* 8988 8989Core and Builtins 8990----------------- 8991 8992- bpo-32176: co_flags.CO_NOFREE is now always set correctly by the code 8993 object constructor based on freevars and cellvars, rather than needing to 8994 be set correctly by the caller. This ensures it will be cleared 8995 automatically when additional cell references are injected into a modified 8996 code object and function. 8997 8998- bpo-31949: Fixed several issues in printing tracebacks 8999 (PyTraceBack_Print()). 9000 9001 * Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks. 9002 * Setting sys.tracebacklimit to None now causes using the default limit. 9003 * Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using 9004 the limit LONG_MAX rather than the default limit. 9005 * Fixed integer overflows in the case of more than 2**31 traceback items on 9006 Windows. 9007 * Fixed output errors handling. 9008 9009- bpo-30696: Fix the interactive interpreter looping endlessly when no 9010 memory. 9011 9012- bpo-20047: Bytearray methods partition() and rpartition() now accept only 9013 bytes-like objects as separator, as documented. In particular they now 9014 raise TypeError rather of returning a bogus result when an integer is 9015 passed as a separator. 9016 9017- bpo-31852: Fix a segmentation fault caused by a combination of the async 9018 soft keyword and continuation lines. 9019 9020- bpo-21720: BytesWarning no longer emitted when the *fromlist* argument of 9021 ``__import__()`` or the ``__all__`` attribute of the module contain bytes 9022 instances. 9023 9024- bpo-31825: Fixed OverflowError in the 'unicode-escape' codec and in 9025 codecs.escape_decode() when decode an escaped non-ascii byte. 9026 9027- bpo-28603: Print the full context/cause chain of exceptions on interpreter 9028 exit, even if an exception in the chain is unhashable or compares equal to 9029 later ones. Patch by Zane Bitter. 9030 9031- bpo-31786: Fix timeout rounding in the select module to round correctly 9032 negative timeouts between -1.0 and 0.0. The functions now block waiting 9033 for events as expected. Previously, the call was incorrectly non-blocking. 9034 Patch by Pablo Galindo. 9035 9036- bpo-31642: Restored blocking "from package import module" by setting 9037 sys.modules["package.module"] to None. 9038 9039- bpo-31626: Fixed a bug in debug memory allocator. There was a write to 9040 freed memory after shrinking a memory block. 9041 9042- bpo-31619: Fixed a ValueError when convert a string with large number of 9043 underscores to integer with binary base. 9044 9045- bpo-31592: Fixed an assertion failure in Python parser in case of a bad 9046 `unicodedata.normalize()`. Patch by Oren Milman. 9047 9048- bpo-31588: Raise a `TypeError` with a helpful error message when class 9049 creation fails due to a metaclass with a bad ``__prepare__()`` method. 9050 Patch by Oren Milman. 9051 9052- bpo-31566: Fix an assertion failure in `_warnings.warn()` in case of a bad 9053 ``__name__`` global. Patch by Oren Milman. 9054 9055- bpo-31505: Fix an assertion failure in `json`, in case 9056 `_json.make_encoder()` received a bad `encoder()` argument. Patch by Oren 9057 Milman. 9058 9059- bpo-31492: Fix assertion failures in case of failing to import from a 9060 module with a bad ``__name__`` attribute, and in case of failing to access 9061 an attribute of such a module. Patch by Oren Milman. 9062 9063- bpo-31490: Fix an assertion failure in `ctypes` class definition, in case 9064 the class has an attribute whose name is specified in ``_anonymous_`` but 9065 not in ``_fields_``. Patch by Oren Milman. 9066 9067- bpo-31478: Fix an assertion failure in `_random.Random.seed()` in case the 9068 argument has a bad ``__abs__()`` method. Patch by Oren Milman. 9069 9070- bpo-31315: Fix an assertion failure in imp.create_dynamic(), when 9071 spec.name is not a string. Patch by Oren Milman. 9072 9073- bpo-31311: Fix a crash in the ``__setstate__()`` method of 9074 `ctypes._CData`, in case of a bad ``__dict__``. Patch by Oren Milman. 9075 9076- bpo-31293: Fix crashes in true division and multiplication of a timedelta 9077 object by a float with a bad as_integer_ratio() method. Patch by Oren 9078 Milman. 9079 9080- bpo-31285: Fix an assertion failure in `warnings.warn_explicit`, when the 9081 return value of the received loader's get_source() has a bad splitlines() 9082 method. Patch by Oren Milman. 9083 9084- bpo-30817: `PyErr_PrintEx()` clears now the ignored exception that may be 9085 raised by `_PySys_SetObjectId()`, for example when no memory. 9086 9087Library 9088------- 9089 9090- bpo-28556: Two minor fixes for ``typing`` module: allow shallow copying 9091 instances of generic classes, improve interaction of ``__init_subclass__`` 9092 with generics. Original PRs by Ivan Levkivskyi. 9093 9094- bpo-27240: The header folding algorithm for the new email policies has 9095 been rewritten, which also fixes bpo-30788, bpo-31831, and bpo-32182. In 9096 particular, RFC2231 folding is now done correctly. 9097 9098- bpo-32186: io.FileIO.readall() and io.FileIO.read() now release the GIL 9099 when getting the file size. Fixed hang of all threads with inaccessible 9100 NFS server. Patch by Nir Soffer. 9101 9102- bpo-12239: Make :meth:`msilib.SummaryInformation.GetProperty` return 9103 ``None`` when the value of property is ``VT_EMPTY``. Initial patch by 9104 Mark Mc Mahon. 9105 9106- bpo-31325: Fix wrong usage of :func:`collections.namedtuple` in the 9107 :meth:`RobotFileParser.parse() <urllib.robotparser.RobotFileParser.parse>` 9108 method. 9109 9110 Initial patch by Robin Wellner. 9111 9112- bpo-12382: :func:`msilib.OpenDatabase` now raises a better exception 9113 message when it couldn't open or create an MSI file. Initial patch by 9114 William Tisäter. 9115 9116- bpo-32110: ``codecs.StreamReader.read(n)`` now returns not more than *n* 9117 characters/bytes for non-negative *n*. This makes it compatible with 9118 ``read()`` methods of other file-like objects. 9119 9120- bpo-32072: Fixed issues with binary plists: 9121 9122 * Fixed saving bytearrays. 9123 * Identical objects will be saved only once. 9124 * Equal references will be load as identical objects. 9125 * Added support for saving and loading recursive data structures. 9126 9127- bpo-32034: Make asyncio.IncompleteReadError and LimitOverrunError 9128 pickleable. 9129 9130- bpo-32015: Fixed the looping of asyncio in the case of reconnection the 9131 socket during waiting async read/write from/to the socket. 9132 9133- bpo-32011: Restored support of loading marshal files with the TYPE_INT64 9134 code. These files can be produced in Python 2.7. 9135 9136- bpo-31970: Reduce performance overhead of asyncio debug mode. 9137 9138- bpo-9678: Fixed determining the MAC address in the uuid module: 9139 9140 * Using ifconfig on NetBSD and OpenBSD. 9141 * Using arp on Linux, FreeBSD, NetBSD and OpenBSD. 9142 9143 Based on patch by Takayuki Shimizukawa. 9144 9145- bpo-30057: Fix potential missed signal in signal.signal(). 9146 9147- bpo-31933: Fix Blake2 params leaf_size and node_offset on big endian 9148 platforms. Patch by Jack O'Connor. 9149 9150- bpo-31927: Fixed compilation of the socket module on NetBSD 8. Fixed 9151 assertion failure or reading arbitrary data when parse a AF_BLUETOOTH 9152 address on NetBSD and DragonFly BSD. 9153 9154- bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse() 9155 when the size of types chtype or mmask_t is less than the size of C long. 9156 curses.box() now accepts characters as arguments. Based on patch by Steve 9157 Fink. 9158 9159- bpo-31897: plistlib now catches more errors when read binary plists and 9160 raises InvalidFileException instead of unexpected exceptions. 9161 9162- bpo-25720: Fix the method for checking pad state of curses WINDOW. Patch 9163 by Masayuki Yamamoto. 9164 9165- bpo-31893: Fixed the layout of the kqueue_event structure on OpenBSD and 9166 NetBSD. Fixed the comparison of the kqueue_event objects. 9167 9168- bpo-31891: Fixed building the curses module on NetBSD. 9169 9170- bpo-28416: Instances of pickle.Pickler subclass with the persistent_id() 9171 method and pickle.Unpickler subclass with the persistent_load() method no 9172 longer create reference cycles. 9173 9174- bpo-28326: Fix multiprocessing.Process when stdout and/or stderr is closed 9175 or None. 9176 9177- bpo-31457: If nested log adapters are used, the inner ``process()`` 9178 methods are no longer omitted. 9179 9180- bpo-31457: The ``manager`` property on LoggerAdapter objects is now 9181 properly settable. 9182 9183- bpo-31806: Fix timeout rounding in time.sleep(), threading.Lock.acquire() 9184 and socket.socket.settimeout() to round correctly negative timeouts 9185 between -1.0 and 0.0. The functions now block waiting for events as 9186 expected. Previously, the call was incorrectly non-blocking. Patch by 9187 Pablo Galindo. 9188 9189- bpo-28603: traceback: Fix a TypeError that occurred during printing of 9190 exception tracebacks when either the current exception or an exception in 9191 its context/cause chain is unhashable. Patch by Zane Bitter. 9192 9193- bpo-30058: Fixed buffer overflow in select.kqueue.control(). 9194 9195- bpo-31770: Prevent a crash when calling the ``__init__()`` method of a 9196 ``sqlite3.Cursor`` object more than once. Patch by Oren Milman. 9197 9198- bpo-31672: ``idpattern`` in ``string.Template`` matched some non-ASCII 9199 characters. Now it uses ``-i`` regular expression local flag to avoid 9200 non-ASCII characters. 9201 9202- bpo-31764: Prevent a crash in ``sqlite3.Cursor.close()`` in case the 9203 ``Cursor`` object is uninitialized. Patch by Oren Milman. 9204 9205- bpo-31752: Fix possible crash in timedelta constructor called with custom 9206 integers. 9207 9208- bpo-31701: On Windows, faulthandler.enable() now ignores MSC and COM 9209 exceptions. 9210 9211- bpo-31728: Prevent crashes in `_elementtree` due to unsafe cleanup of 9212 `Element.text` and `Element.tail`. Patch by Oren Milman. 9213 9214- bpo-31620: an empty asyncio.Queue now doesn't leak memory when queue.get 9215 pollers timeout 9216 9217- bpo-31632: Fix method set_protocol() of class _SSLProtocolTransport in 9218 asyncio module. This method was previously modifying a wrong reference to 9219 the protocol. 9220 9221- bpo-31675: Fixed memory leaks in Tkinter's methods splitlist() and split() 9222 when pass a string larger than 2 GiB. 9223 9224- bpo-31673: Fixed typo in the name of Tkinter's method adderrorinfo(). 9225 9226- bpo-30806: Fix the string representation of a netrc object. 9227 9228- bpo-15037: Added a workaround for getkey() in curses for ncurses 5.7 and 9229 earlier. 9230 9231- bpo-25351: Avoid venv activate failures with undefined variables 9232 9233- bpo-25532: inspect.unwrap() will now only try to unwrap an object 9234 sys.getrecursionlimit() times, to protect against objects which create a 9235 new object on every attribute access. 9236 9237- bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() 9238 iterators. 9239 9240- bpo-31516: ``threading.current_thread()`` should not return a dummy thread 9241 at shutdown. 9242 9243- bpo-31351: python -m ensurepip now exits with non-zero exit code if pip 9244 bootstrapping has failed. 9245 9246- bpo-31482: ``random.seed()`` now works with bytes in version=1 9247 9248- bpo-31334: Fix ``poll.poll([timeout])`` in the ``select`` module for 9249 arbitrary negative timeouts on all OSes where it can only be a 9250 non-negative integer or -1. Patch by Riccardo Coccioli. 9251 9252- bpo-31310: multiprocessing's semaphore tracker should be launched again if 9253 crashed. 9254 9255- bpo-31308: Make multiprocessing's forkserver process immune to Ctrl-C and 9256 other user interruptions. If it crashes, restart it when necessary. 9257 9258Documentation 9259------------- 9260 9261- bpo-32105: Added asyncio.BaseEventLoop.connect_accepted_socket 9262 versionadded marker. 9263 9264- bpo-31537: Fix incorrect usage of ``get_history_length`` in readline 9265 documentation example code. Patch by Brad Smith. 9266 9267- bpo-30085: The operator functions without double underscores are preferred 9268 for clarity. The one with underscores are only kept for 9269 back-compatibility. 9270 9271Tests 9272----- 9273 9274- bpo-31380: Skip test_httpservers test_undecodable_file on macOS: fails on 9275 APFS. 9276 9277- bpo-31705: Skip test_socket.test_sha256() on Linux kernel older than 4.5. 9278 The test fails with ENOKEY on kernel 3.10 (on ppc64le). A fix was merged 9279 into the kernel 4.5. 9280 9281- bpo-31174: Fix test_tools.test_unparse: DirectoryTestCase now stores the 9282 names sample to always test the same files. It prevents false alarms when 9283 hunting reference leaks. 9284 9285- bpo-30695: Add the `set_nomemory(start, stop)` and `remove_mem_hooks()` 9286 functions to the _testcapi module. 9287 9288Build 9289----- 9290 9291- bpo-32059: ``detect_modules()`` in ``setup.py`` now also searches the 9292 sysroot paths when cross-compiling. 9293 9294- bpo-31957: Fixes Windows SDK version detection when building for Windows. 9295 9296- bpo-31609: Fixes quotes in PCbuild/clean.bat 9297 9298- bpo-31934: Abort the build when building out of a not clean source tree. 9299 9300- bpo-31926: Fixed Argument Clinic sometimes causing compilation errors when 9301 there was more than one function and/or method in a .c file with the same 9302 name. 9303 9304- bpo-28791: Update Windows builds to use SQLite 3.21.0. 9305 9306- bpo-28791: Update OS X installer to use SQLite 3.21.0. 9307 9308- bpo-22140: Prevent double substitution of prefix in python-config.sh. 9309 9310- bpo-31536: Avoid wholesale rebuild after `make regen-all` if nothing 9311 changed. 9312 9313Windows 9314------- 9315 9316- bpo-1102: Return ``None`` when ``View.Fetch()`` returns 9317 ``ERROR_NO_MORE_ITEMS`` instead of raising ``MSIError``. 9318 9319 Initial patch by Anthony Tuininga. 9320 9321- bpo-31944: Fixes Modify button in Apps and Features dialog. 9322 9323macOS 9324----- 9325 9326- bpo-31392: Update macOS installer to use OpenSSL 1.0.2m 9327 9328IDLE 9329---- 9330 9331- bpo-32207: Improve tk event exception tracebacks in IDLE. When tk event 9332 handling is driven by IDLE's run loop, a confusing and distracting 9333 queue.EMPTY traceback context is no longer added to tk event exception 9334 tracebacks. The traceback is now the same as when event handling is 9335 driven by user code. Patch based on a suggestion by Serhiy Storchaka. 9336 9337- bpo-32164: Delete unused file idlelib/tabbedpages.py. Use of TabbedPageSet 9338 in configdialog was replaced by ttk.Notebook. 9339 9340- bpo-32100: IDLE: Fix old and new bugs in pathbrowser; improve tests. Patch 9341 mostly by Cheryl Sabella. 9342 9343- bpo-31858: IDLE -- Restrict shell prompt manipulation to the shell. Editor 9344 and output windows only see an empty last prompt line. This simplifies 9345 the code and fixes a minor bug when newline is inserted. Sys.ps1, if 9346 present, is read on Shell start-up, but is not set or changed. 9347 9348- bpo-31860: The font sample in the IDLE configuration dialog is now 9349 editable. Changes persist while IDLE remains open 9350 9351- bpo-31836: Test_code_module now passes if run after test_idle, which sets 9352 ps1. 9353 9354 The code module uses sys.ps1 if present or sets it to '>>> ' if not. 9355 Test_code_module now properly tests both behaviors. Ditto for ps2. 9356 9357- bpo-28603: Fix a TypeError that caused a shell restart when printing a 9358 traceback that includes an exception that is unhashable. Patch by Zane 9359 Bitter. 9360 9361- bpo-13802: Use non-Latin characters in the IDLE's Font settings sample. 9362 Even if one selects a font that defines a limited subset of the unicode 9363 Basic Multilingual Plane, tcl/tk will use other fonts that define a 9364 character. The expanded example give users of non-Latin characters a 9365 better idea of what they might see in IDLE's shell and editors. To make 9366 room for the expanded sample, frames on the Font tab are re-arranged. The 9367 Font/Tabs help explains a bit about the additions. 9368 9369- bpo-31460: Simplify the API of IDLE's Module Browser. 9370 9371 Passing a widget instead of an flist with a root widget opens the option 9372 of creating a browser frame that is only part of a window. Passing a full 9373 file name instead of pieces assumed to come from a .py file opens the 9374 possibility of browsing python files that do not end in .py. 9375 9376- bpo-31649: IDLE - Make _htest, _utest parameters keyword only. 9377 9378- bpo-31559: Remove test order dependence in idle_test.test_browser. 9379 9380- bpo-31459: Rename IDLE's module browser from Class Browser to Module 9381 Browser. The original module-level class and method browser became a 9382 module browser, with the addition of module-level functions, years ago. 9383 Nested classes and functions were added yesterday. For 9384 back-compatibility, the virtual event <<open-class-browser>>, which 9385 appears on the Keys tab of the Settings dialog, is not changed. Patch by 9386 Cheryl Sabella. 9387 9388- bpo-31500: Default fonts now are scaled on HiDPI displays. 9389 9390- bpo-1612262: IDLE module browser now shows nested classes and functions. 9391 Original patches for code and tests by Guilherme Polo and Cheryl Sabella, 9392 respectively. 9393 9394Tools/Demos 9395----------- 9396 9397- bpo-30722: Make redemo work with Python 3.6 and newer versions. 9398 9399 Also, remove the ``LOCALE`` option since it doesn't work with string 9400 patterns in Python 3. 9401 9402 Patch by Christoph Sarnowski. 9403 9404C API 9405----- 9406 9407- bpo-20891: Fix PyGILState_Ensure(). When PyGILState_Ensure() is called in 9408 a non-Python thread before PyEval_InitThreads(), only call 9409 PyEval_InitThreads() after calling PyThreadState_New() to fix a crash. 9410 9411- bpo-31532: Fix memory corruption due to allocator mix in getpath.c between 9412 Py_GetPath() and Py_SetPath() 9413 9414- bpo-30697: The `PyExc_RecursionErrorInst` singleton is removed and 9415 `PyErr_NormalizeException()` does not use it anymore. This singleton is 9416 persistent and its members being never cleared may cause a segfault during 9417 finalization of the interpreter. See also issue #22898. 9418 9419 9420What's New in Python 3.6.3 final? 9421================================= 9422 9423*Release date: 2017-10-03* 9424 9425Library 9426------- 9427 9428- bpo-31641: Re-allow arbitrary iterables in 9429 `concurrent.futures.as_completed()`. Fixes regression in 3.6.3rc1. 9430 9431Build 9432----- 9433 9434- bpo-31662: Fix typos in Windows ``uploadrelease.bat`` script. Fix Windows 9435 Doc build issues in ``Doc/make.bat``. 9436 9437- bpo-31423: Fix building the PDF documentation with newer versions of 9438 Sphinx. 9439 9440 9441What's New in Python 3.6.3 release candidate 1? 9442=============================================== 9443 9444*Release date: 2017-09-18* 9445 9446Security 9447-------- 9448 9449- bpo-29781: SSLObject.version() now correctly returns None when handshake 9450 over BIO has not been performed yet. 9451 9452- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to 9453 get security fixes. 9454 9455Core and Builtins 9456----------------- 9457 9458- bpo-31471: Fix an assertion failure in `subprocess.Popen()` on Windows, in 9459 case the env argument has a bad keys() method. Patch by Oren Milman. 9460 9461- bpo-31418: Fix an assertion failure in `PyErr_WriteUnraisable()` in case 9462 of an exception with a bad ``__module__`` attribute. Patch by Oren Milman. 9463 9464- bpo-31416: Fix assertion failures in case of a bad warnings.filters or 9465 warnings.defaultaction. Patch by Oren Milman. 9466 9467- bpo-31411: Raise a TypeError instead of SystemError in case 9468 warnings.onceregistry is not a dictionary. Patch by Oren Milman. 9469 9470- bpo-31373: Fix several possible instances of undefined behavior due to 9471 floating-point demotions. 9472 9473- bpo-30465: Location information (``lineno`` and ``col_offset``) in 9474 f-strings is now (mostly) correct. This fixes tools like flake8 from 9475 showing warnings on the wrong line (typically the first line of the file). 9476 9477- bpo-31343: Include sys/sysmacros.h for major(), minor(), and makedev(). 9478 GNU C libray plans to remove the functions from sys/types.h. 9479 9480- bpo-31291: Fix an assertion failure in `zipimport.zipimporter.get_data` on 9481 Windows, when the return value of ``pathname.replace('/','\\')`` isn't a 9482 string. Patch by Oren Milman. 9483 9484- bpo-31271: Fix an assertion failure in the write() method of 9485 `io.TextIOWrapper`, when the encoder doesn't return a bytes object. Patch 9486 by Oren Milman. 9487 9488- bpo-31243: Fix a crash in some methods of `io.TextIOWrapper`, when the 9489 decoder's state is invalid. Patch by Oren Milman. 9490 9491- bpo-30721: ``print`` now shows correct usage hint for using Python 2 9492 redirection syntax. Patch by Sanyam Khurana. 9493 9494- bpo-31070: Fix a race condition in importlib _get_module_lock(). 9495 9496- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which 9497 doesn't call ``PyObject_GC_UnTrack()``. 9498 9499- bpo-31071: Avoid masking original TypeError in call with * unpacking when 9500 other arguments are passed. 9501 9502- bpo-30978: str.format_map() now passes key lookup exceptions through. 9503 Previously any exception was replaced with a KeyError exception. 9504 9505- bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state. 9506 9507- bpo-30876: Relative import from unloaded package now reimports the package 9508 instead of failing with SystemError. Relative import from non-package now 9509 fails with ImportError rather than SystemError. 9510 9511- bpo-30703: Improve signal delivery. 9512 9513 Avoid using Py_AddPendingCall from signal handler, to avoid calling 9514 signal-unsafe functions. The tests I'm adding here fail without the rest 9515 of the patch, on Linux and OS X. This means our signal delivery logic had 9516 defects (some signals could be lost). 9517 9518- bpo-30765: Avoid blocking in pthread_mutex_lock() when 9519 PyThread_acquire_lock() is asked not to block. 9520 9521- bpo-31161: Make sure the 'Missing parentheses' syntax error message is 9522 only applied to SyntaxError, not to subclasses. Patch by Martijn Pieters. 9523 9524- bpo-30814: Fixed a race condition when import a submodule from a package. 9525 9526- bpo-30597: ``print`` now shows expected input in custom error message when 9527 used as a Python 2 statement. Patch by Sanyam Khurana. 9528 9529Library 9530------- 9531 9532- bpo-31499: xml.etree: Fix a crash when a parser is part of a reference 9533 cycle. 9534 9535- bpo-28556: typing.get_type_hints now finds the right globalns for classes 9536 and modules by default (when no ``globalns`` was specified by the caller). 9537 9538- bpo-28556: Speed improvements to the ``typing`` module. Original PRs by 9539 Ivan Levkivskyi and Mitar. 9540 9541- bpo-31544: The C accelerator module of ElementTree ignored exceptions 9542 raised when looking up TreeBuilder target methods in XMLParser(). 9543 9544- bpo-31234: socket.create_connection() now fixes manually a reference 9545 cycle: clear the variable storing the last exception on success. 9546 9547- bpo-31457: LoggerAdapter objects can now be nested. 9548 9549- bpo-31400: Improves SSL error handling to avoid losing error numbers. 9550 9551- bpo-28958: ssl.SSLContext() now uses OpenSSL error information when a 9552 context cannot be instantiated. 9553 9554- bpo-27340: SSLSocket.sendall() now uses memoryview to create slices of 9555 data. This fixes support for all bytes-like object. It is also more 9556 efficient and avoids costly copies. 9557 9558- bpo-31178: Fix string concatenation bug in rare error path in the 9559 subprocess module 9560 9561- bpo-31350: Micro-optimize :func:`asyncio._get_running_loop` to become up 9562 to 10% faster. 9563 9564- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of 9565 partial characters for UTF-8 input (libexpat bug 115): 9566 https://github.com/libexpat/libexpat/issues/115 9567 9568- bpo-29136: Add TLS 1.3 cipher suites and OP_NO_TLSv1_3. 9569 9570- bpo-29212: Fix concurrent.futures.thread.ThreadPoolExecutor threads to 9571 have a non repr() based thread name by default when no thread_name_prefix 9572 is supplied. They will now identify themselves as 9573 "ThreadPoolExecutor-y_n". 9574 9575- bpo-9146: Fix a segmentation fault in _hashopenssl when standard hash 9576 functions such as md5 are not available in the linked OpenSSL library. As 9577 in some special FIPS-140 build environments. 9578 9579- bpo-27144: The ``map()`` and ``as_completed()`` iterators in 9580 ``concurrent.futures`` now avoid keeping a reference to yielded objects. 9581 9582- bpo-10746: Fix ctypes producing wrong PEP 3118 type codes for integer 9583 types. 9584 9585- bpo-22536: The subprocess module now sets the filename when 9586 FileNotFoundError is raised on POSIX systems due to the executable or cwd 9587 not being found. 9588 9589- bpo-31249: concurrent.futures: WorkItem.run() used by ThreadPoolExecutor 9590 now breaks a reference cycle between an exception object and the WorkItem 9591 object. 9592 9593- bpo-31247: xmlrpc.server now explicitly breaks reference cycles when using 9594 sys.exc_info() in code handling exceptions. 9595 9596- bpo-30102: The ssl and hashlib modules now call 9597 OPENSSL_add_all_algorithms_noconf() on OpenSSL < 1.1.0. The function 9598 detects CPU features and enables optimizations on some CPU architectures 9599 such as POWER8. Patch is based on research from Gustavo Serra Scalet. 9600 9601- bpo-31185: Fixed miscellaneous errors in asyncio speedup module. 9602 9603- bpo-31135: ttk: fix the destroy() method of LabeledScale and OptionMenu 9604 classes. Call the parent destroy() method even if the used attribute 9605 doesn't exist. The LabeledScale.destroy() method now also explicitly 9606 clears label and scale attributes to help the garbage collector to destroy 9607 all widgets. 9608 9609- bpo-31107: Fix `copyreg._slotnames()` mangled attribute calculation for 9610 classes whose name begins with an underscore. Patch by Shane Harvey. 9611 9612- bpo-31061: Fixed a crash when using asyncio and threads. 9613 9614- bpo-30502: Fix handling of long oids in ssl. Based on patch by Christian 9615 Heimes. 9616 9617- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that 9618 contains CR or LF. Patch by Dong-hee Na. 9619 9620- bpo-30595: multiprocessing.Queue.get() with a timeout now polls its reader 9621 in non-blocking mode if it succeeded to acquire the lock but the acquire 9622 took longer than the timeout. 9623 9624- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound 9625 builtin functions. Patch by Aaron Gallagher. 9626 9627- bpo-30961: Fix decrementing a borrowed reference in tracemalloc. 9628 9629- bpo-25684: Change ``ttk.OptionMenu`` radiobuttons to be unique across 9630 instances of ``OptionMenu``. 9631 9632- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the 9633 thread completes, even if the thread was started by the same process which 9634 created the queue. 9635 9636- bpo-29854: Fix segfault in readline when using readline's history-size 9637 option. Patch by Nir Soffer. 9638 9639- bpo-30319: socket.close() now ignores ECONNRESET error. 9640 9641- bpo-30828: Fix out of bounds write in 9642 `asyncio.CFuture.remove_done_callback()`. 9643 9644- bpo-30807: signal.setitimer() may disable the timer when passed a tiny 9645 value. 9646 9647 Tiny values (such as 1e-6) are valid non-zero values for setitimer(), 9648 which is specified as taking microsecond-resolution intervals. However, on 9649 some platform, our conversion routine could convert 1e-6 into a zero 9650 interval, therefore disabling the timer instead of (re-)scheduling it. 9651 9652- bpo-30441: Fix bug when modifying os.environ while iterating over it 9653 9654- bpo-30532: Fix email header value parser dropping folding white space in 9655 certain cases. 9656 9657- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called 9658 with bytes-like argument. 9659 9660- bpo-30746: Prohibited the '=' character in environment variable names in 9661 ``os.putenv()`` and ``os.spawn*()``. 9662 9663- bpo-29755: Fixed the lgettext() family of functions in the gettext module. 9664 They now always return bytes. 9665 9666Documentation 9667------------- 9668 9669- bpo-31294: Fix incomplete code snippet in the ZeroMQSocketListener and 9670 ZeroMQSocketHandler examples and adapt them to Python 3. 9671 9672- bpo-21649: Add RFC 7525 and Mozilla server side TLS links to SSL 9673 documentation. 9674 9675- bpo-30803: Clarify doc on truth value testing. Original patch by Peter 9676 Thomassen. 9677 9678Tests 9679----- 9680 9681- bpo-31320: Silence traceback in test_ssl 9682 9683- bpo-25674: Remove sha256.tbs-internet.com ssl test 9684 9685- bpo-30715: Address ALPN callback changes for OpenSSL 1.1.0f. The latest 9686 version behaves like OpenSSL 1.0.2 and no longer aborts handshake. 9687 9688- bpo-30822: regrtest: Exclude tzdata from regrtest --all. When running the 9689 test suite using --use=all / -u all, exclude tzdata since it makes 9690 test_datetime too slow (15-20 min on some buildbots) which then times out 9691 on some buildbots. Fix also regrtest command line parser to allow passing 9692 -u extralargefile to run test_zipfile64. 9693 9694Build 9695----- 9696 9697- bpo-30854: Fix compile error when compiling --without-threads. Patch by 9698 Masayuki Yamamoto. 9699 9700Windows 9701------- 9702 9703- bpo-30389: Adds detection of Visual Studio 2017 to distutils on Windows. 9704 9705- bpo-31340: Change to building with MSVC v141 (included with Visual Studio 9706 2017) 9707 9708- bpo-30581: os.cpu_count() now returns the correct number of processors on 9709 Windows when the number of logical processors is greater than 64. 9710 9711- bpo-30731: Add a missing xmlns to python.manifest so that it matches the 9712 schema. 9713 9714IDLE 9715---- 9716 9717- bpo-31493: IDLE code context -- fix code update and font update timers. 9718 9719 Canceling timers prevents a warning message when test_idle completes. 9720 9721- bpo-31488: IDLE - Update non-key options in former extension classes. When 9722 applying configdialog changes, call .reload for each feature class. Change 9723 ParenMatch so updated options affect existing instances attached to 9724 existing editor windows. 9725 9726- bpo-31477: IDLE - Improve rstrip entry in doc. Strip trailing whitespace 9727 strips more than blank spaces. Multiline string literals are not skipped. 9728 9729- bpo-31480: IDLE - make tests pass with zzdummy extension disabled by 9730 default. 9731 9732- bpo-31421: Document how IDLE runs tkinter programs. IDLE calls tcl/tk 9733 update in the background in order to make live 9734 9735 interaction and experimentation with tkinter applications much easier. 9736 9737- bpo-31414: IDLE -- fix tk entry box tests by deleting first. Adding to an 9738 int entry is not the same as deleting and inserting because int('') will 9739 fail. 9740 9741- bpo-31051: Rearrange IDLE configdialog GenPage into Window, Editor, and 9742 Help sections. 9743 9744- bpo-30617: IDLE - Add docstrings and tests for outwin subclass of editor. 9745 9746 Move some data and functions from the class to module level. Patch by 9747 Cheryl Sabella. 9748 9749- bpo-31287: IDLE - Do not modify tkinter.message in test_configdialog. 9750 9751- bpo-27099: Convert IDLE's built-in 'extensions' to regular features. 9752 9753 About 10 IDLE features were implemented as supposedly optional extensions. 9754 Their different behavior could be confusing or worse for users and not 9755 good for maintenance. Hence the conversion. 9756 9757 The main difference for users is that user configurable key bindings for 9758 builtin features are now handled uniformly. Now, editing a binding in a 9759 keyset only affects its value in the keyset. All bindings are defined 9760 together in the system-specific default keysets in config-extensions.def. 9761 All custom keysets are saved as a whole in config-extension.cfg. All take 9762 effect as soon as one clicks Apply or Ok. 9763 9764 The affected events are '<<force-open-completions>>', '<<expand-word>>', 9765 '<<force-open-calltip>>', '<<flash-paren>>', '<<format-paragraph>>', 9766 '<<run-module>>', '<<check-module>>', and '<<zoom-height>>'. Any (global) 9767 customizations made before 3.6.3 will not affect their keyset-specific 9768 customization after 3.6.3. and vice versa. Initial patch by Charles 9769 Wohlganger. 9770 9771- bpo-31206: IDLE: Factor HighPage(Frame) class from ConfigDialog. Patch by 9772 Cheryl Sabella. 9773 9774- bpo-31001: Add tests for configdialog highlight tab. Patch by Cheryl 9775 Sabella. 9776 9777- bpo-31205: IDLE: Factor KeysPage(Frame) class from ConfigDialog. The 9778 slightly modified tests continue to pass. Patch by Cheryl Sabella. 9779 9780- bpo-31130: IDLE -- stop leaks in test_configdialog. Initial patch by 9781 Victor Stinner. 9782 9783- bpo-31002: Add tests for configdialog keys tab. Patch by Cheryl Sabella. 9784 9785- bpo-19903: IDLE: Calltips use `inspect.signature` instead of 9786 `inspect.getfullargspec`. This improves calltips for builtins converted to 9787 use Argument Clinic. Patch by Louie Lu. 9788 9789- bpo-31083: IDLE - Add an outline of a TabPage class in configdialog. 9790 Update existing classes to match outline. Initial patch by Cheryl Sabella. 9791 9792- bpo-31050: Factor GenPage(Frame) class from ConfigDialog. The slightly 9793 modified tests continue to pass. Patch by Cheryl Sabella. 9794 9795- bpo-31004: IDLE - Factor FontPage(Frame) class from ConfigDialog. 9796 9797 Slightly modified tests continue to pass. Fix General tests. Patch mostly 9798 by Cheryl Sabella. 9799 9800- bpo-30781: IDLE - Use ttk widgets in ConfigDialog. Patches by Terry Jan 9801 Reedy and Cheryl Sabella. 9802 9803- bpo-31060: IDLE - Finish rearranging methods of ConfigDialog Grouping 9804 methods pertaining to each tab and the buttons will aid writing tests and 9805 improving the tabs and will enable splitting the groups into classes. 9806 9807- bpo-30853: IDLE -- Factor a VarTrace class out of ConfigDialog. 9808 9809 Instance tracers manages pairs consisting of a tk variable and a callback 9810 function. When tracing is turned on, setting the variable calls the 9811 function. Test coverage for the new class is 100%. 9812 9813- bpo-31003: IDLE: Add more tests for General tab. 9814 9815- bpo-30993: IDLE - Improve configdialog font page and tests. 9816 9817 In configdialog: Document causal pathways in create_font_tab docstring. 9818 Simplify some attribute names. Move set_samples calls to var_changed_font 9819 (idea from Cheryl Sabella). Move related functions to positions after the 9820 create widgets function. 9821 9822 In test_configdialog: Fix test_font_set so not order dependent. Fix 9823 renamed test_indent_scale so it tests the widget. Adjust tests for 9824 movement of set_samples call. Add tests for load functions. Put all font 9825 tests in one class and tab indent tests in another. Except for two lines, 9826 these tests completely cover the related functions. 9827 9828- bpo-30981: IDLE -- Add more configdialog font page tests. 9829 9830- bpo-28523: IDLE: replace 'colour' with 'color' in configdialog. 9831 9832- bpo-30917: Add tests for idlelib.config.IdleConf. Increase coverage from 9833 46% to 96%. Patch by Louie Lu. 9834 9835- bpo-30934: Document coverage details for idlelib tests. 9836 9837 * Add section to idlelib/idle-test/README.txt. 9838 9839 * Include check that branches are taken both ways. 9840 9841 * Exclude IDLE-specific code that does not run during unit tests. 9842 9843- bpo-30913: IDLE: Document ConfigDialog tk Vars, methods, and widgets in 9844 docstrings This will facilitate improving the dialog and splitting up the 9845 class. Original patch by Cheryl Sabella. 9846 9847- bpo-30899: IDLE: Add tests for ConfigParser subclasses in config. Patch by 9848 Louie Lu. 9849 9850- bpo-30881: IDLE: Add docstrings to browser.py. Patch by Cheryl Sabella. 9851 9852- bpo-30851: IDLE: Remove unused variables in configdialog. One is a 9853 duplicate, one is set but cannot be altered by users. Patch by Cheryl 9854 Sabella. 9855 9856- bpo-30870: IDLE: In Settings dialog, select font with Up, Down keys as 9857 well as mouse. Initial patch by Louie Lu. 9858 9859- bpo-8231: IDLE: call config.IdleConf.GetUserCfgDir only once. 9860 9861- bpo-30779: IDLE: Factor ConfigChanges class from configdialog, put in 9862 config; test. * In config, put dump test code in a function; run it and 9863 unittest in 'if __name__ == '__main__'. * Add class config.ConfigChanges 9864 based on changes_class_v4.py on bpo issue. * Add class 9865 test_config.ChangesTest, partly using configdialog_tests_v1.py. * Revise 9866 configdialog to use ConfigChanges; see tracker msg297804. * Revise 9867 test_configdialog to match configdialog changes. * Remove configdialog 9868 functions unused or moved to ConfigChanges. Cheryl Sabella contributed 9869 parts of the patch. 9870 9871- bpo-30777: IDLE: configdialog - Add docstrings and fix comments. Patch by 9872 Cheryl Sabella. 9873 9874- bpo-30495: IDLE: Improve textview with docstrings, PEP8 names, and more 9875 tests. Patch by Cheryl Sabella. 9876 9877- bpo-30723: IDLE: Make several improvements to parenmatch. Add 'parens' 9878 style to highlight both opener and closer. Make 'default' style, which is 9879 not default, a synonym for 'opener'. Make time-delay work the same with 9880 all styles. Add help for config dialog extensions tab, including help for 9881 parenmatch. Add new tests. Original patch by Charles Wohlganger. 9882 9883- bpo-30674: IDLE: add docstrings to grep module. Patch by Cheryl Sabella 9884 9885- bpo-21519: IDLE's basic custom key entry dialog now detects duplicates 9886 properly. Original patch by Saimadhav Heblikar. 9887 9888- bpo-29910: IDLE no longer deletes a character after commenting out a 9889 region by a key shortcut. Add ``return 'break'`` for this and other 9890 potential conflicts between IDLE and default key bindings. 9891 9892- bpo-30728: Review and change idlelib.configdialog names. Lowercase method 9893 and attribute names. Replace 'colour' with 'color', expand overly cryptic 9894 names, delete unneeded underscores. Replace ``import *`` with specific 9895 imports. Patches by Cheryl Sabella. 9896 9897- bpo-6739: IDLE: Verify user-entered key sequences by trying to bind them 9898 with tk. Add tests for all 3 validation functions. Original patch by G 9899 Polo. Tests added by Cheryl Sabella. 9900 9901Tools/Demos 9902----------- 9903 9904- bpo-30983: gdb integration commands (py-bt, etc.) work on optimized shared 9905 builds now, too. PEP 523 introduced _PyEval_EvalFrameDefault which 9906 inlines PyEval_EvalFrameEx on non-debug shared builds. This broke the 9907 ability to use py-bt, py-up, and a few other Python-specific gdb 9908 integrations. The problem is fixed by only looking for 9909 _PyEval_EvalFrameDefault frames in python-gdb.py. Original patch by Bruno 9910 "Polaco" Penteado. 9911 9912 9913What's New in Python 3.6.2 final? 9914================================= 9915 9916*Release date: 2017-07-17* 9917 9918No changes since release candidate 2 9919 9920 9921 9922What's New in Python 3.6.2 release candidate 2? 9923=============================================== 9924 9925*Release date: 2017-07-07* 9926 9927Security 9928-------- 9929 9930- bpo-30730: Prevent environment variables injection in subprocess on 9931 Windows. Prevent passing other environment variables and command 9932 arguments. 9933 9934- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple 9935 security vulnerabilities including: CVE-2017-9233 (External entity 9936 infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix), 9937 CVE-2016-0718 (Fix regression bugs from 2.2.0's fix to CVE-2016-0718) and 9938 CVE-2012-0876 (Counter hash flooding with SipHash). Note: the 9939 CVE-2016-5300 (Use os-specific entropy sources like getrandom) doesn't 9940 impact Python, since Python already gets entropy from the OS to set the 9941 expat secret using ``XML_SetHashSalt()``. 9942 9943- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For 9944 example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the 9945 ``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an 9946 authentication (``login@host``). 9947 9948 9949What's New in Python 3.6.2 release candidate 1? 9950=============================================== 9951 9952*Release date: 2017-06-17* 9953 9954Core and Builtins 9955----------------- 9956 9957- bpo-30682: Removed a too-strict assertion that failed for certain 9958 f-strings, such as eval("f'\\\n'") and eval("f'\\\r'"). 9959 9960- bpo-30604: Move co_extra_freefuncs to not be per-thread to avoid crashes 9961 9962- bpo-29104: Fixed parsing backslashes in f-strings. 9963 9964- bpo-27945: Fixed various segfaults with dict when input collections are 9965 mutated during searching, inserting or comparing. Based on patches by 9966 Duane Griffin and Tim Mitchell. 9967 9968- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for 9969 non-interned attribute names. Based on patch by Eryk Sun. 9970 9971- bpo-30039: If a KeyboardInterrupt happens when the interpreter is in the 9972 middle of resuming a chain of nested 'yield from' or 'await' calls, it's 9973 now correctly delivered to the innermost frame. 9974 9975- bpo-12414: sys.getsizeof() on a code object now returns the sizes which 9976 includes the code struct and sizes of objects which it references. Patch 9977 by Dong-hee Na. 9978 9979- bpo-29949: Fix memory usage regression of set and frozenset object. 9980 9981- bpo-29935: Fixed error messages in the index() method of tuple, list and 9982 deque when pass indices of wrong type. 9983 9984- bpo-29859: Show correct error messages when any of the pthread_* calls in 9985 thread_pthread.h fails. 9986 9987- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises 9988 :exc:`OverflowError`. 9989 9990- bpo-29600: Fix wrapping coroutine return values in StopIteration. 9991 9992- bpo-28856: Fix an oversight that %b format for bytes should support 9993 objects follow the buffer protocol. 9994 9995- bpo-29714: Fix a regression that bytes format may fail when containing 9996 zero bytes inside. 9997 9998- bpo-29478: If max_line_length=None is specified while using the Compat32 9999 policy, it is no longer ignored. Patch by Mircea Cosbuc. 10000 10001Library 10002------- 10003 10004- bpo-30616: Functional API of enum allows to create empty enums. Patched by 10005 Dong-hee Na 10006 10007- bpo-30038: Fix race condition between signal delivery and wakeup file 10008 descriptor. Patch by Nathaniel Smith. 10009 10010- bpo-23894: lib2to3 now recognizes ``rb'...'`` and ``f'...'`` strings. 10011 10012- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a 10013 reference cycle to not keep objects alive longer than expected. 10014 10015- bpo-30149: inspect.signature() now supports callables with 10016 variable-argument parameters wrapped with partialmethod. Patch by Dong-hee 10017 Na. 10018 10019- bpo-30645: Fix path calculation in imp.load_package(), fixing it for cases 10020 when a package is only shipped with bytecodes. Patch by Alexandru 10021 Ardelean. 10022 10023- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects. 10024 Patch by Sanjay Sundaresan. 10025 10026- bpo-30605: re.compile() no longer raises a BytesWarning when compiling a 10027 bytes instance with misplaced inline modifier. Patch by Roy Williams. 10028 10029Security 10030-------- 10031 10032- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of 10033 CVE-2016-0718 and CVE-2016-4472. See 10034 https://sourceforge.net/p/expat/bugs/537/ for more information. 10035 10036Library 10037------- 10038 10039- bpo-24484: Avoid race condition in multiprocessing cleanup (#2159) 10040 10041- bpo-28994: The traceback no longer displayed for SystemExit raised in a 10042 callback registered by atexit. 10043 10044- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was 10045 called. 10046 10047- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add 10048 support for ContextManager on all versions. Original PRs by Jelle Zijlstra 10049 and Ivan Levkivskyi 10050 10051- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl 10052 implementation. Patch by Michaël Sghaïer. 10053 10054- bpo-29743: Closing transport during handshake process leaks open socket. 10055 Patch by Nikolay Kim 10056 10057- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu 10058 Sornay. 10059 10060- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore 10061 EINVAL on stdin.write() if the child process is still running but closed 10062 the pipe. 10063 10064- bpo-29822: inspect.isabstract() now works during __init_subclass__. Patch 10065 by Nate Soares. 10066 10067- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract 10068 base classes to use keyword parameters in __init_subclass__. Patch by Nate 10069 Soares. 10070 10071- bpo-30557: faulthandler now correctly filters and displays exception codes 10072 on Windows 10073 10074- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot 10075 handle IPv6 addresses. 10076 10077- bpo-29960: Preserve generator state when _random.Random.setstate() raises 10078 an exception. Patch by Bryan Olson. 10079 10080- bpo-30414: multiprocessing.Queue._feed background running thread do not 10081 break from main loop on exception. 10082 10083- bpo-30003: Fix handling escape characters in HZ codec. Based on patch by 10084 Ma Lin. 10085 10086- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn* 10087 and *forkserver* start methods. 10088 10089- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error 10090 (code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted. 10091 This error occurs sometimes on SSL connections. 10092 10093- bpo-30375: Warnings emitted when compile a regular expression now always 10094 point to the line in the user code. Previously they could point into 10095 inners of the re module if emitted from inside of groups or conditionals. 10096 10097- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running 10098 coroutine and the coroutine returned without any more ``await``. 10099 10100- bpo-30266: contextlib.AbstractContextManager now supports 10101 anti-registration by setting __enter__ = None or __exit__ = None, 10102 following the pattern introduced in bpo-25958. Patch by Jelle Zijlstra. 10103 10104- bpo-30298: Weaken the condition of deprecation warnings for inline 10105 modifiers. Now allowed several subsequential inline modifiers at the start 10106 of the pattern (e.g. ``'(?i)(?s)...'``). In verbose mode whitespaces and 10107 comments now are allowed before and between inline modifiers (e.g. ``'(?x) 10108 (?i) (?s)...'``). 10109 10110- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma 10111 Lin. 10112 10113- bpo-26293: Change resulted because of zipfile breakage. (See also: 10114 bpo-29094) 10115 10116- bpo-30243: Removed the __init__ methods of _json's scanner and encoder. 10117 Misusing them could cause memory leaks or crashes. Now scanner and 10118 encoder objects are completely initialized in the __new__ methods. 10119 10120- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process 10121 when Ctrl-C is received. 10122 10123- bpo-28556: Various updates to typing module: add typing.NoReturn type, use 10124 WrapperDescriptorType, minor bug-fixes. Original PRs by Jim 10125 Fasarakis-Hilliard and Ivan Levkivskyi. 10126 10127- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux. 10128 10129- bpo-30070: Fixed leaks and crashes in errors handling in the parser 10130 module. 10131 10132- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when 10133 readline() or __next__() respectively return non-sizeable object. Fixed 10134 possible other errors caused by not checking results of PyObject_Size(), 10135 PySequence_Size(), or PyMapping_Size(). 10136 10137- bpo-30017: Allowed calling the close() method of the zip entry writer 10138 object multiple times. Writing to a closed writer now always produces a 10139 ValueError. 10140 10141- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint 10142 is present. 10143 10144- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True. 10145 Patch by Armin Rigo. 10146 10147- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in 10148 contextlib.contextmanager. Patch by Siddharth Velankar. 10149 10150- bpo-29998: Pickling and copying ImportError now preserves name and path 10151 attributes. 10152 10153- bpo-29953: Fixed memory leaks in the replace() method of datetime and time 10154 objects when pass out of bound fold argument. 10155 10156- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering 10157 long runs of empty iterables. 10158 10159- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions 10160 and wrong types. 10161 10162- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an 10163 exception at the very first of an iterable may swallow the exception or 10164 make the program hang. Patch by Davin Potts and Xiang Zhang. 10165 10166- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when 10167 the OS gives priority to errors such as EACCES over EEXIST. 10168 10169- bpo-29861: Release references to tasks, their arguments and their results 10170 as soon as they are finished in multiprocessing.Pool. 10171 10172- bpo-29884: faulthandler: Restore the old sigaltstack during teardown. 10173 Patch by Christophe Zeitouny. 10174 10175- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. 10176 10177- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords 10178 are not strings. Patch by Michael Seifert. 10179 10180- bpo-29742: get_extra_info() raises exception if get called on closed ssl 10181 transport. Patch by Nikolay Kim. 10182 10183- bpo-8256: Fixed possible failing or crashing input() if attributes 10184 "encoding" or "errors" of sys.stdin or sys.stdout are not set or are not 10185 strings. 10186 10187- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting 10188 big intables (objects that have __int__) as elements. Patch by Oren 10189 Milman. 10190 10191- bpo-28231: The zipfile module now accepts path-like objects for external 10192 paths. 10193 10194- bpo-26915: index() and count() methods of collections.abc.Sequence now 10195 check identity before checking equality when do comparisons. 10196 10197- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other 10198 exception) to exception(s) raised in the dispatched methods. Patch by Petr 10199 Motejlek. 10200 10201- bpo-30177: path.resolve(strict=False) no longer cuts the path after the 10202 first element not present in the filesystem. Patch by Antoine Pietri. 10203 10204IDLE 10205---- 10206 10207- bpo-15786: Fix several problems with IDLE's autocompletion box. The 10208 following should now work: clicking on selection box items; using the 10209 scrollbar; selecting an item by hitting Return. Hangs on MacOSX should no 10210 longer happen. Patch by Louie Lu. 10211 10212- bpo-25514: Add doc subsubsection about IDLE failure to start. Popup 10213 no-connection message directs users to this section. 10214 10215- bpo-30642: Fix reference leaks in IDLE tests. Patches by Louie Lu and 10216 Terry Jan Reedy. 10217 10218- bpo-30495: Add docstrings for textview.py and use PEP8 names. Patches by 10219 Cheryl Sabella and Terry Jan Reedy. 10220 10221- bpo-30290: Help-about: use pep8 names and add tests. Increase coverage to 10222 100%. Patches by Louie Lu, Cheryl Sabella, and Terry Jan Reedy. 10223 10224- bpo-30303: Add _utest option to textview; add new tests. Increase coverage 10225 to 100%. Patches by Louie Lu and Terry Jan Reedy. 10226 10227C API 10228----- 10229 10230- bpo-27867: Function PySlice_GetIndicesEx() no longer replaced with a macro 10231 if Py_LIMITED_API is not set. 10232 10233Build 10234----- 10235 10236- bpo-29941: Add ``--with-assertions`` configure flag to explicitly enable C 10237 ``assert()`` checks. Defaults to off. ``--with-pydebug`` implies 10238 ``--with-assertions``. 10239 10240- bpo-28787: Fix out-of-tree builds of Python when configured with 10241 ``--with--dtrace``. 10242 10243- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``, 10244 ``make install`` and some other make targets when configured with 10245 ``--enable-optimizations``. 10246 10247- bpo-23404: Don't regenerate generated files based on file modification 10248 time anymore: the action is now explicit. Replace ``make touch`` with 10249 ``make regen-all``. 10250 10251- bpo-29643: Fix ``--enable-optimization`` didn't work. 10252 10253Documentation 10254------------- 10255 10256- bpo-30176: Add missing attribute related constants in curses 10257 documentation. 10258 10259- bpo-30052: the link targets for :func:`bytes` and :func:`bytearray` are 10260 now their respective type definitions, rather than the corresponding 10261 builtin function entries. Use :ref:`bytes <func-bytes>` and 10262 :ref:`bytearray <func-bytearray>` to reference the latter. 10263 10264 In order to ensure this and future cross-reference updates are applied 10265 automatically, the daily documentation builds now disable the default 10266 output caching features in Sphinx. 10267 10268- bpo-26985: Add missing info of code object in inspect documentation. 10269 10270Tools/Demos 10271----------- 10272 10273- bpo-29367: python-gdb.py now supports also ``method-wrapper`` 10274 (``wrapperobject``) objects. 10275 10276Tests 10277----- 10278 10279- bpo-30357: test_thread: setUp() now uses support.threading_setup() and 10280 support.threading_cleanup() to wait until threads complete to avoid random 10281 side effects on following tests. Initial patch written by Grzegorz 10282 Grzywacz. 10283 10284- bpo-30197: Enhanced functions swap_attr() and swap_item() in the 10285 test.support module. They now work when delete replaced attribute or item 10286 inside the with statement. The old value of the attribute or item (or 10287 None if it doesn't exist) now will be assigned to the target of the "as" 10288 clause, if there is one. 10289 10290Windows 10291------- 10292 10293- bpo-30687: Locate msbuild.exe on Windows when building rather than 10294 vcvarsall.bat 10295 10296- bpo-30450: The build process on Windows no longer depends on Subversion, 10297 instead pulling external code from GitHub via a Python script. If Python 10298 3.6 is not found on the system (via ``py -3.6``), NuGet is used to 10299 download a copy of 32-bit Python. 10300 10301 10302What's New in Python 3.6.1 final? 10303================================= 10304 10305*Release date: 2017-03-21* 10306 10307Core and Builtins 10308----------------- 10309 10310- bpo-29723: The ``sys.path[0]`` initialization change for bpo-29139 caused 10311 a regression by revealing an inconsistency in how sys.path is initialized 10312 when executing ``__main__`` from a zipfile, directory, or other import 10313 location. The interpreter now consistently avoids ever adding the import 10314 location's parent directory to ``sys.path``, and ensures no other 10315 ``sys.path`` entries are inadvertently modified when inserting the import 10316 location named on the command line. 10317 10318Build 10319----- 10320 10321- bpo-27593: fix format of git information used in sys.version 10322 10323- Fix incompatible comment in python.h 10324 10325 10326What's New in Python 3.6.1 release candidate 1? 10327=============================================== 10328 10329*Release date: 2017-03-04* 10330 10331Core and Builtins 10332----------------- 10333 10334- bpo-28893: Set correct __cause__ for errors about invalid awaitables 10335 returned from __aiter__ and __anext__. 10336 10337- bpo-29683: Fixes to memory allocation in _PyCode_SetExtra. Patch by Brian 10338 Coleman. 10339 10340- bpo-29684: Fix minor regression of PyEval_CallObjectWithKeywords. It 10341 should raise TypeError when kwargs is not a dict. But it might cause segv 10342 when args=NULL and kwargs is not a dict. 10343 10344- bpo-28598: Support __rmod__ for subclasses of str being called before 10345 str.__mod__. Patch by Martijn Pieters. 10346 10347- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX. Patch by 10348 Matthieu Dartiailh. 10349 10350- bpo-29602: Fix incorrect handling of signed zeros in complex constructor 10351 for complex subclasses and for inputs having a __complex__ method. Patch 10352 by Serhiy Storchaka. 10353 10354- bpo-29347: Fixed possibly dereferencing undefined pointers when creating 10355 weakref objects. 10356 10357- bpo-29438: Fixed use-after-free problem in key sharing dict. 10358 10359- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0]. 10360 10361- bpo-29337: Fixed possible BytesWarning when compare the code objects. 10362 Warnings could be emitted at compile time. 10363 10364- bpo-29327: Fixed a crash when pass the iterable keyword argument to 10365 sorted(). 10366 10367- bpo-29034: Fix memory leak and use-after-free in os module 10368 (path_converter). 10369 10370- bpo-29159: Fix regression in bytes(x) when x.__index__() raises Exception. 10371 10372- bpo-28932: Do not include <sys/random.h> if it does not exist. 10373 10374- bpo-25677: Correct the positioning of the syntax error caret for indented 10375 blocks. Based on patch by Michael Layzell. 10376 10377- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate 10378 form. 10379 10380- bpo-26919: On Android, operating system data is now always encoded/decoded 10381 to/from UTF-8, instead of the locale encoding to avoid inconsistencies 10382 with os.fsencode() and os.fsdecode() which are already using UTF-8. 10383 10384- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy 10385 bug triggerable by a monkey-patched len() function. 10386 10387- bpo-28739: f-string expressions are no longer accepted as docstrings and 10388 by ast.literal_eval() even if they do not include expressions. 10389 10390- bpo-28512: Fixed setting the offset attribute of SyntaxError by 10391 PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject(). 10392 10393- bpo-28918: Fix the cross compilation of xxlimited when Python has been 10394 built with Py_DEBUG defined. 10395 10396- bpo-28731: Optimize _PyDict_NewPresized() to create correct size dict. 10397 Improve speed of dict literal with constant keys up to 30%. 10398 10399Library 10400------- 10401 10402- bpo-29169: Update zlib to 1.2.11. 10403 10404- bpo-29623: Allow use of path-like object as a single argument in 10405 ConfigParser.read(). Patch by David Ellis. 10406 10407- bpo-28963: Fix out of bound iteration in 10408 asyncio.Future.remove_done_callback implemented in C. 10409 10410- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes 10411 before all pipes are closed. 10412 10413- bpo-29271: Fix Task.current_task and Task.all_tasks implemented in C to 10414 accept None argument as their pure Python implementation. 10415 10416- bpo-29703: Fix asyncio to support instantiation of new event loops in 10417 child processes. 10418 10419- bpo-29376: Fix assertion error in threading._DummyThread.is_alive(). 10420 10421- bpo-28624: Add a test that checks that cwd parameter of Popen() accepts 10422 PathLike objects. Patch by Sayan Chowdhury. 10423 10424- bpo-28518: Start a transaction implicitly before a DML statement. Patch by 10425 Aviv Palivoda. 10426 10427- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no 10428 longer affects a partial object after creation. 10429 10430- bpo-29110: Fix file object leak in aifc.open() when file is given as a 10431 filesystem path and is not in valid AIFF format. Patch by Anthony Zhang. 10432 10433- bpo-28556: Various updates to typing module: typing.Counter, 10434 typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle 10435 Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa. 10436 10437- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python 10438 3.6.0: check minimum and maximum years. 10439 10440- bpo-29519: Fix weakref spewing exceptions during interpreter shutdown when 10441 used with a rare combination of multiprocessing and custom codecs. 10442 10443- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir 10444 10445- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the 10446 match object. Based on patch by WGH. 10447 10448- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited 10449 to a stopped instead of terminated state (ex: when under ptrace). 10450 10451- bpo-29290: Fix a regression in argparse that help messages would wrap at 10452 non-breaking spaces. 10453 10454- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY. 10455 10456- bpo-29316: Restore the provisional status of typing module, add 10457 corresponding note to documentation. Patch by Ivan L. 10458 10459- bpo-29219: Fixed infinite recursion in the repr of uninitialized 10460 ctypes.CDLL instances. 10461 10462- bpo-29011: Fix an important omission by adding Deque to the typing module. 10463 10464- bpo-28969: Fixed race condition in C implementation of 10465 functools.lru_cache. KeyError could be raised when cached function with 10466 full cache was simultaneously called from differen threads with the same 10467 uncached arguments. 10468 10469- bpo-29142: In urllib.request, suffixes in no_proxy environment variable 10470 with leading dots could match related hostnames again (e.g. .b.c matches 10471 a.b.c). Patch by Milan Oberkirch. 10472 10473- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter 10474 anymore. Patch written by Jiajun Huang. 10475 10476- bpo-29203: functools.lru_cache() now respects PEP 468 and preserves the 10477 order of keyword arguments. f(a=1, b=2) is now cached separately from 10478 f(b=2, a=1) since both calls could potentially give different results. 10479 10480- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a 10481 context. Patch by Sam Breese. 10482 10483- bpo-29094: Offsets in a ZIP file created with extern file object and modes 10484 "w" and "x" now are relative to the start of the file. 10485 10486- bpo-29085: Allow random.Random.seed() to use high quality OS randomness 10487 rather than the pid and time. 10488 10489- bpo-29061: Fixed bug in secrets.randbelow() which would hang when given a 10490 negative input. Patch by Brendan Donegan. 10491 10492- bpo-29079: Prevent infinite loop in pathlib.resolve() on Windows 10493 10494- bpo-13051: Fixed recursion errors in large or resized 10495 curses.textpad.Textbox. Based on patch by Tycho Andersen. 10496 10497- bpo-29119: Fix weakrefs in the pure python version of 10498 collections.OrderedDict move_to_end() method. Contributed by Andra 10499 Bogildea. 10500 10501- bpo-9770: curses.ascii predicates now work correctly with negative 10502 integers. 10503 10504- bpo-28427: old keys should not remove new values from WeakValueDictionary 10505 when collecting from another thread. 10506 10507- bpo-28923: Remove editor artifacts from Tix.py. 10508 10509- bpo-29055: Neaten-up empty population error on random.choice() by 10510 suppressing the upstream exception. 10511 10512- bpo-28871: Fixed a crash when deallocate deep ElementTree. 10513 10514- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and 10515 WeakValueDictionary.pop() when a GC collection happens in another thread. 10516 10517- bpo-20191: Fixed a crash in resource.prlimit() when passing a sequence 10518 that doesn't own its elements as limits. 10519 10520- bpo-28779: multiprocessing.set_forkserver_preload() would crash the 10521 forkserver process if a preloaded module instantiated some multiprocessing 10522 objects such as locks. 10523 10524- bpo-28847: dbm.dumb now supports reading read-only files and no longer 10525 writes the index file when it is not changed. 10526 10527- bpo-26937: The chown() method of the tarfile.TarFile class does not fail 10528 now when the grp module cannot be imported, as for example on Android 10529 platforms. 10530 10531IDLE 10532---- 10533 10534- bpo-29071: IDLE colors f-string prefixes (but not invalid ur prefixes). 10535 10536- bpo-28572: Add 10% to coverage of IDLE's test_configdialog. Update and 10537 augment description of the configuration system. 10538 10539Windows 10540------- 10541 10542- bpo-29579: Removes readme.txt from the installer 10543 10544- bpo-29326: Ignores blank lines in ._pth files (Patch by Alexey Izbyshev) 10545 10546- bpo-28164: Correctly handle special console filenames (patch by Eryk Sun) 10547 10548- bpo-29409: Implement PEP 529 for io.FileIO (Patch by Eryk Sun) 10549 10550- bpo-29392: Prevent crash when passing invalid arguments into msvcrt 10551 module. 10552 10553- bpo-25778: winreg does not truncate string correctly (Patch by Eryk Sun) 10554 10555- bpo-28896: Deprecate WindowsRegistryFinder and disable it by default. 10556 10557C API 10558----- 10559 10560- bpo-27867: Function PySlice_GetIndicesEx() is replaced with a macro if 10561 Py_LIMITED_API is not set or set to the value between 0x03050400 and 10562 0x03060000 (not including) or 0x03060100 or higher. 10563 10564- bpo-29083: Fixed the declaration of some public API functions. 10565 PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in 10566 limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and 10567 Py_BuildValue() were not available in limited API of version < 3.3 when 10568 PY_SSIZE_T_CLEAN is defined. 10569 10570- bpo-29058: All stable API extensions added after Python 3.2 are now 10571 available only when Py_LIMITED_API is set to the PY_VERSION_HEX value of 10572 the minimum Python version supporting this API. 10573 10574Documentation 10575------------- 10576 10577- bpo-28929: Link the documentation to its source file on GitHub. 10578 10579- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer 10580 to aiosmtpd, a third-party asyncio-based replacement. 10581 10582- bpo-26355: Add canonical header link on each page to corresponding major 10583 version of the documentation. Patch by Matthias Bussonnier. 10584 10585- bpo-29349: Fix Python 2 syntax in code for building the documentation. 10586 10587Tests 10588----- 10589 10590- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. Skip 10591 some tests of select.poll when running on macOS due to unresolved issues 10592 with the underlying system poll function on some macOS versions. 10593 10594- bpo-29571: to match the behaviour of the ``re.LOCALE`` flag, 10595 test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` 10596 to determine the candidate encoding for the test regex (allowing it to 10597 correctly skip the test when the default locale encoding is a multi-byte 10598 encoding) 10599 10600- bpo-28950: Disallow -j0 to be combined with -T/-l in regrtest command line 10601 arguments. 10602 10603- bpo-28683: Fix the tests that bind() a unix socket and raise 10604 PermissionError on Android for a non-root user. 10605 10606- bpo-26939: Add the support.setswitchinterval() function to fix 10607 test_functools hanging on the Android armv7 qemu emulator. 10608 10609Build 10610----- 10611 10612- bpo-27593: sys.version and the platform module python_build(), 10613 python_branch(), and python_revision() functions now use git information 10614 rather than hg when building from a repo. 10615 10616- bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k. 10617 10618- bpo-26851: Set Android compilation and link flags. 10619 10620- bpo-28768: Fix implicit declaration of function _setmode. Patch by 10621 Masayuki Yamamoto 10622 10623- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat 10624 10625- bpo-23903: Added missed names to PC/python3.def. 10626 10627- bpo-28762: lockf() is available on Android API level 24, but the F_LOCK 10628 macro is not defined in android-ndk-r13. 10629 10630- bpo-28538: Fix the compilation error that occurs because if_nameindex() is 10631 available on Android API level 24, but the if_nameindex structure is not 10632 defined. 10633 10634- bpo-20211: Do not add the directory for installing C header files and the 10635 directory for installing object code libraries to the cross compilation 10636 search paths. Original patch by Thomas Petazzoni. 10637 10638- bpo-28849: Do not define sys.implementation._multiarch on Android. 10639 10640 10641What's New in Python 3.6.0 final? 10642================================= 10643 10644*Release date: 2016-12-23* 10645 10646No changes since release candidate 2 10647 10648 10649 10650What's New in Python 3.6.0 release candidate 2? 10651=============================================== 10652 10653*Release date: 2016-12-16* 10654 10655Core and Builtins 10656----------------- 10657 10658- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must 10659 not convert combined table into split table. Patch written by INADA Naoki. 10660 10661- bpo-28990: Fix asyncio SSL hanging if connection is closed before 10662 handshake is completed. (Patch by HoHo-Ho) 10663 10664Tools/Demos 10665----------- 10666 10667- bpo-28770: Fix python-gdb.py for fastcalls. 10668 10669Windows 10670------- 10671 10672- bpo-28896: Deprecate WindowsRegistryFinder. 10673 10674Build 10675----- 10676 10677- bpo-28898: Prevent gdb build errors due to HAVE_LONG_LONG redefinition. 10678 10679 10680What's New in Python 3.6.0 release candidate 1? 10681=============================================== 10682 10683*Release date: 2016-12-06* 10684 10685Core and Builtins 10686----------------- 10687 10688- bpo-23722: Rather than silently producing a class that doesn't support 10689 zero-argument ``super()`` in methods, failing to pass the new 10690 ``__classcell__`` namespace entry up to ``type.__new__`` now results in a 10691 ``DeprecationWarning`` and a class that supports zero-argument 10692 ``super()``. 10693 10694- bpo-28797: Modifying the class __dict__ inside the __set_name__ method of 10695 a descriptor that is used inside that class no longer prevents calling the 10696 __set_name__ method of other descriptors. 10697 10698- bpo-28782: Fix a bug in the implementation ``yield from`` when checking if 10699 the next instruction is YIELD_FROM. Regression introduced by WORDCODE 10700 (issue #26647). 10701 10702Library 10703------- 10704 10705- bpo-27030: Unknown escapes in re.sub() replacement template are allowed 10706 again. But they still are deprecated and will be disabled in 3.7. 10707 10708- bpo-28835: Fix a regression introduced in warnings.catch_warnings(): call 10709 warnings.showwarning() if it was overriden inside the context manager. 10710 10711- bpo-27172: To assist with upgrades from 2.7, the previously documented 10712 deprecation of ``inspect.getfullargspec()`` has been reversed. This 10713 decision may be revisited again after the Python 2.7 branch is no longer 10714 officially supported. 10715 10716- bpo-26273: Add new :data:`socket.TCP_CONGESTION` (Linux 2.6.13) and 10717 :data:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37) constants. Patch written by 10718 Omar Sandoval. 10719 10720- bpo-24142: Reading a corrupt config file left configparser in an invalid 10721 state. Original patch by Florian Höch. 10722 10723- bpo-28843: Fix asyncio C Task to handle exceptions __traceback__. 10724 10725C API 10726----- 10727 10728- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions. 10729 10730Documentation 10731------------- 10732 10733- bpo-23722: The data model reference and the porting section in the What's 10734 New guide now cover the additional ``__classcell__`` handling needed for 10735 custom metaclasses to fully support PEP 487 and zero-argument ``super()``. 10736 10737Tools/Demos 10738----------- 10739 10740- bpo-28023: Fix python-gdb.py didn't support new dict implementation. 10741 10742 10743What's New in Python 3.6.0 beta 4? 10744================================== 10745 10746*Release date: 2016-11-21* 10747 10748Core and Builtins 10749----------------- 10750 10751- bpo-28532: Show sys.version when -V option is supplied twice. 10752 10753- bpo-27100: The with-statement now checks for __enter__ before it checks 10754 for __exit__. This gives less confusing error messages when both methods 10755 are missing. Patch by Jonathan Ellington. 10756 10757- bpo-28746: Fix the set_inheritable() file descriptor method on platforms 10758 that do not have the ioctl FIOCLEX and FIONCLEX commands. 10759 10760- bpo-26920: Fix not getting the locale's charset upon initializing the 10761 interpreter, on platforms that do not have langinfo. 10762 10763- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X 10764 when decode astral characters. Patch by Xiang Zhang. 10765 10766- bpo-19398: Extra slash no longer added to sys.path components in case of 10767 empty compile-time PYTHONPATH components. 10768 10769- bpo-28665: Improve speed of the STORE_DEREF opcode by 40%. 10770 10771- bpo-28583: PyDict_SetDefault didn't combine split table when needed. Patch 10772 by Xiang Zhang. 10773 10774- bpo-27243: Change PendingDeprecationWarning -> DeprecationWarning. As it 10775 was agreed in the issue, __aiter__ returning an awaitable should result in 10776 PendingDeprecationWarning in 3.5 and in DeprecationWarning in 3.6. 10777 10778- bpo-26182: Fix a refleak in code that raises DeprecationWarning. 10779 10780- bpo-28721: Fix asynchronous generators aclose() and athrow() to handle 10781 StopAsyncIteration propagation properly. 10782 10783Library 10784------- 10785 10786- bpo-28752: Restored the __reduce__() methods of datetime objects. 10787 10788- bpo-28727: Regular expression patterns, _sre.SRE_Pattern objects created 10789 by re.compile(), become comparable (only x==y and x!=y operators). This 10790 change should fix the issue #18383: don't duplicate warning filters when 10791 the warnings module is reloaded (thing usually only done in unit tests). 10792 10793- bpo-20572: The subprocess.Popen.wait method's undocumented endtime 10794 parameter now raises a DeprecationWarning. 10795 10796- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and 10797 from_buffer_copy() methods on abstract classes like Array. 10798 10799- bpo-19717: Makes Path.resolve() succeed on paths that do not exist. Patch 10800 by Vajrasky Kok 10801 10802- bpo-28563: Fixed possible DoS and arbitrary code execution when handle 10803 plural form selections in the gettext module. The expression parser now 10804 supports exact syntax supported by GNU gettext. 10805 10806- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the 10807 garbage collector is invoked in other thread. Based on patch by Sebastian 10808 Cufre. 10809 10810- bpo-28600: Optimize loop.call_soon. 10811 10812- bpo-28613: Fix get_event_loop() return the current loop if called from 10813 coroutines/callbacks. 10814 10815- bpo-28634: Fix asyncio.isfuture() to support unittest.Mock. 10816 10817- bpo-26081: Fix refleak in _asyncio.Future.__iter__().throw. 10818 10819- bpo-28639: Fix inspect.isawaitable to always return bool Patch by Justin 10820 Mayfield. 10821 10822- bpo-28652: Make loop methods reject socket kinds they do not support. 10823 10824- bpo-28653: Fix a refleak in functools.lru_cache. 10825 10826- bpo-28703: Fix asyncio.iscoroutinefunction to handle Mock objects. 10827 10828- bpo-28704: Fix create_unix_server to support Path-like objects (PEP 519). 10829 10830- bpo-28720: Add collections.abc.AsyncGenerator. 10831 10832Documentation 10833------------- 10834 10835- bpo-28513: Documented command-line interface of zipfile. 10836 10837Tests 10838----- 10839 10840- bpo-28666: Now test.support.rmtree is able to remove unwritable or 10841 unreadable directories. 10842 10843- bpo-23839: Various caches now are cleared before running every test file. 10844 10845Build 10846----- 10847 10848- bpo-10656: Fix out-of-tree building on AIX. Patch by Tristan Carel and 10849 Michael Haubenwallner. 10850 10851- bpo-26359: Rename --with-optimiations to --enable-optimizations. 10852 10853- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS. 10854 Patch by Gareth Rees. 10855 10856 10857What's New in Python 3.6.0 beta 3? 10858================================== 10859 10860*Release date: 2016-10-31* 10861 10862Core and Builtins 10863----------------- 10864 10865- bpo-28128: Deprecation warning for invalid str and byte escape sequences 10866 now prints better information about where the error occurs. Patch by 10867 Serhiy Storchaka and Eric Smith. 10868 10869- bpo-28509: dict.update() no longer allocate unnecessary large memory. 10870 10871- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug 10872 build. 10873 10874- bpo-28517: Fixed of-by-one error in the peephole optimizer that caused 10875 keeping unreachable code. 10876 10877- bpo-28214: Improved exception reporting for problematic __set_name__ 10878 attributes. 10879 10880- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception 10881 loss in PyTraceBack_Here(). 10882 10883- bpo-28471: Fix "Python memory allocator called without holding the GIL" 10884 crash in socket.setblocking. 10885 10886Library 10887------- 10888 10889- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if 10890 given empty data twice. Patch by Benjamin Fogle. 10891 10892- bpo-28549: Fixed segfault in curses's addch() with ncurses6. 10893 10894- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar 10895 file with compression before trying to open it without compression. 10896 Otherwise it had 50% chance failed with ignore_zeros=True. 10897 10898- bpo-23262: The webbrowser module now supports Firefox 36+ and derived 10899 browsers. Based on patch by Oleg Broytman. 10900 10901- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused 10902 by representing the scale as float value internally in Tk. tkinter.IntVar 10903 now works if float value is set to underlying Tk variable. 10904 10905- bpo-18844: The various ways of specifying weights for random.choices() now 10906 produce the same result sequences. 10907 10908- bpo-28255: calendar.TextCalendar().prmonth() no longer prints a space at 10909 the start of new line after printing a month's calendar. Patch by Xiang 10910 Zhang. 10911 10912- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces. 10913 Based on patch by Kaarle Ritvanen. 10914 10915- bpo-28353: os.fwalk() no longer fails on broken links. 10916 10917- bpo-28430: Fix iterator of C implemented asyncio.Future doesn't accept 10918 non-None value is passed to it.send(val). 10919 10920- bpo-27025: Generated names for Tkinter widgets now start by the "!" prefix 10921 for readability. 10922 10923- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a 10924 workaround to Tix library bug. 10925 10926- bpo-28488: shutil.make_archive() no longer adds entry "./" to ZIP archive. 10927 10928- bpo-25953: re.sub() now raises an error for invalid numerical group 10929 reference in replacement template even if the pattern is not found in the 10930 string. Error message for invalid group reference now includes the group 10931 index and the position of the reference. Based on patch by SilentGhost. 10932 10933- bpo-18219: Optimize csv.DictWriter for large number of columns. Patch by 10934 Mariatta Wijaya. 10935 10936- bpo-28448: Fix C implemented asyncio.Future didn't work on Windows. 10937 10938- bpo-28480: Fix error building socket module when multithreading is 10939 disabled. 10940 10941- bpo-24452: Make webbrowser support Chrome on Mac OS X. 10942 10943- bpo-20766: Fix references leaked by pdb in the handling of SIGINT 10944 handlers. 10945 10946- bpo-28492: Fix how StopIteration exception is raised in _asyncio.Future. 10947 10948- bpo-28500: Fix asyncio to handle async gens GC from another thread. 10949 10950- bpo-26923: Fix asyncio.Gather to refuse being cancelled once all children 10951 are done. Patch by Johannes Ebke. 10952 10953- bpo-26796: Don't configure the number of workers for default threadpool 10954 executor. Initial patch by Hans Lawrenz. 10955 10956- bpo-28544: Implement asyncio.Task in C. 10957 10958Windows 10959------- 10960 10961- bpo-28522: Fixes mishandled buffer reallocation in getpathp.c 10962 10963Build 10964----- 10965 10966- bpo-28444: Fix missing extensions modules when cross compiling. 10967 10968- bpo-28208: Update Windows build and OS X installers to use SQLite 3.14.2. 10969 10970- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j. 10971 10972Tests 10973----- 10974 10975- bpo-26944: Fix test_posix for Android where 'id -G' is entirely wrong or 10976 missing the effective gid. 10977 10978- bpo-28409: regrtest: fix the parser of command line arguments. 10979 10980 10981What's New in Python 3.6.0 beta 2? 10982================================== 10983 10984*Release date: 2016-10-10* 10985 10986Core and Builtins 10987----------------- 10988 10989- bpo-28183: Optimize and cleanup dict iteration. 10990 10991- bpo-26081: Added C implementation of asyncio.Future. Original patch by 10992 Yury Selivanov. 10993 10994- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). 10995 Patch by Xiang Zhang. 10996 10997- bpo-28376: The type of long range iterator is now registered as Iterator. 10998 Patch by Oren Milman. 10999 11000- bpo-28376: Creating instances of range_iterator by calling range_iterator 11001 type now is deprecated. Patch by Oren Milman. 11002 11003- bpo-28376: The constructor of range_iterator now checks that step is not 11004 0. Patch by Oren Milman. 11005 11006- bpo-26906: Resolving special methods of uninitialized type now causes 11007 implicit initialization of the type instead of a fail. 11008 11009- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original 11010 patch by Niklas Koep. 11011 11012- bpo-24098: Fixed possible crash when AST is changed in process of 11013 compiling it. 11014 11015- bpo-28201: Dict reduces possibility of 2nd conflict in hash table when 11016 hashes have same lower bits. 11017 11018- bpo-28350: String constants with null character no longer interned. 11019 11020- bpo-26617: Fix crash when GC runs during weakref callbacks. 11021 11022- bpo-27942: String constants now interned recursively in tuples and 11023 frozensets. 11024 11025- bpo-21578: Fixed misleading error message when ImportError called with 11026 invalid keyword args. 11027 11028- bpo-28203: Fix incorrect type in complex(1.0, {2:3}) error message. Patch 11029 by Soumya Sharma. 11030 11031- bpo-28086: Single var-positional argument of tuple subtype was passed 11032 unscathed to the C-defined function. Now it is converted to exact tuple. 11033 11034- bpo-28214: Now __set_name__ is looked up on the class instead of the 11035 instance. 11036 11037- bpo-27955: Fallback on reading /dev/urandom device when the getrandom() 11038 syscall fails with EPERM, for example when blocked by SECCOMP. 11039 11040- bpo-28192: Don't import readline in isolated mode. 11041 11042- Upgrade internal unicode databases to Unicode version 9.0.0. 11043 11044- bpo-28131: Fix a regression in zipimport's compile_source(). zipimport 11045 should use the same optimization level as the interpreter. 11046 11047- bpo-28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly 11048 optimize memcpy(). 11049 11050- bpo-28120: Fix dict.pop() for splitted dictionary when trying to remove a 11051 "pending key" (Not yet inserted in split-table). Patch by Xiang Zhang. 11052 11053- bpo-26182: Raise DeprecationWarning when async and await keywords are used 11054 as variable/attribute/class/function name. 11055 11056Library 11057------- 11058 11059- bpo-27998: Fixed bytes path support in os.scandir() on Windows. Patch by 11060 Eryk Sun. 11061 11062- bpo-28317: The disassembler now decodes FORMAT_VALUE argument. 11063 11064- bpo-26293: Fixed writing ZIP files that starts not from the start of the 11065 file. Offsets in ZIP file now are relative to the start of the archive in 11066 conforming to the specification. 11067 11068- bpo-28380: unittest.mock Mock autospec functions now properly support 11069 assert_called, assert_not_called, and assert_called_once. 11070 11071- bpo-27181: remove statistics.geometric_mean and defer until 3.7. 11072 11073- bpo-28229: lzma module now supports pathlib. 11074 11075- bpo-28321: Fixed writing non-BMP characters with binary format in 11076 plistlib. 11077 11078- bpo-28225: bz2 module now supports pathlib. Initial patch by Ethan 11079 Furman. 11080 11081- bpo-28227: gzip now supports pathlib. Patch by Ethan Furman. 11082 11083- bpo-27358: Optimized merging var-keyword arguments and improved error 11084 message when passing a non-mapping as a var-keyword argument. 11085 11086- bpo-28257: Improved error message when passing a non-iterable as a 11087 var-positional argument. Added opcode BUILD_TUPLE_UNPACK_WITH_CALL. 11088 11089- bpo-28322: Fixed possible crashes when unpickle itertools objects from 11090 incorrect pickle data. Based on patch by John Leitch. 11091 11092- bpo-28228: imghdr now supports pathlib. 11093 11094- bpo-28226: compileall now supports pathlib. 11095 11096- bpo-28314: Fix function declaration (C flags) for the getiterator() method 11097 of xml.etree.ElementTree.Element. 11098 11099- bpo-28148: Stop using localtime() and gmtime() in the time module. 11100 11101 Introduced platform independent _PyTime_localtime API that is similar to 11102 POSIX localtime_r, but available on all platforms. Patch by Ed Schouten. 11103 11104- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and 11105 9999-12. 11106 11107 Methods itermonthdays() and itermonthdays2() are reimplemented so that 11108 they don't call itermonthdates() which can cause datetime.date 11109 under/overflow. 11110 11111- bpo-28275: Fixed possible use after free in the decompress() methods of 11112 the LZMADecompressor and BZ2Decompressor classes. Original patch by John 11113 Leitch. 11114 11115- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation() 11116 if pass invalid string-like object as a name. Patch by Xiang Zhang. 11117 11118- bpo-18844: random.choices() now has k as a keyword-only argument to 11119 improve the readability of common cases and come into line with the 11120 signature used in other languages. 11121 11122- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py. 11123 Patch by Madison May. 11124 11125- bpo-27611: Fixed support of default root window in the tkinter.tix module. 11126 Added the master parameter in the DisplayStyle constructor. 11127 11128- bpo-27348: In the traceback module, restore the formatting of exception 11129 messages like "Exception: None". This fixes a regression introduced in 11130 3.5a2. 11131 11132- bpo-25651: Allow falsy values to be used for msg parameter of subTest(). 11133 11134- bpo-27778: Fix a memory leak in os.getrandom() when the getrandom() is 11135 interrupted by a signal and a signal handler raises a Python exception. 11136 11137- bpo-28200: Fix memory leak on Windows in the os module (fix 11138 path_converter() function). 11139 11140- bpo-25400: RobotFileParser now correctly returns default values for 11141 crawl_delay and request_rate. Initial patch by Peter Wirtz. 11142 11143- bpo-27932: Prevent memory leak in win32_ver(). 11144 11145- Fix UnboundLocalError in socket._sendfile_use_sendfile. 11146 11147- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of 11148 os.stat(). Patch by Eryk Sun. 11149 11150- bpo-22493: Warning message emitted by using inline flags in the middle of 11151 regular expression now contains a (truncated) regex pattern. Patch by Tim 11152 Graham. 11153 11154- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an 11155 empty bytestring is passed. 11156 11157- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam. 11158 11159- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by 11160 Gergely Imreh and Markus Holtermann. 11161 11162- bpo-28114: Fix a crash in parse_envlist() when env contains byte strings. 11163 Patch by Eryk Sun. 11164 11165- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and 11166 binascii.a2b_qp(). 11167 11168- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by 11169 Kevin Conway. 11170 11171- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by 11172 Seth Michael Larson. 11173 11174- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by 11175 iceboy. 11176 11177- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki. 11178 11179- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect. 11180 11181- bpo-27759: Fix selectors incorrectly retain invalid file descriptors. 11182 Patch by Mark Williams. 11183 11184- bpo-28368: Refuse monitoring processes if the child watcher has no loop 11185 attached. Patch by Vincent Michel. 11186 11187- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader, 11188 add_writer, etc. 11189 11190- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг 11191 Марк. 11192 11193- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor. 11194 11195- bpo-28372: Fix asyncio to support formatting of non-python coroutines. 11196 11197- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг 11198 Марк. 11199 11200- bpo-27972: Prohibit Tasks to await on themselves. 11201 11202Windows 11203------- 11204 11205- bpo-28402: Adds signed catalog files for stdlib on Windows. 11206 11207- bpo-28333: Enables Unicode for ps1/ps2 and input() prompts. (Patch by Eryk 11208 Sun) 11209 11210- bpo-28251: Improvements to help manuals on Windows. 11211 11212- bpo-28110: launcher.msi has different product codes between 32-bit and 11213 64-bit 11214 11215- bpo-28161: Opening CON for write access fails 11216 11217- bpo-28162: WindowsConsoleIO readall() fails if first line starts with 11218 Ctrl+Z 11219 11220- bpo-28163: WindowsConsoleIO fileno() passes wrong flags to _open_osfhandle 11221 11222- bpo-28164: _PyIO_get_console_type fails for various paths 11223 11224- bpo-28137: Renames Windows path file to ._pth 11225 11226- bpo-28138: Windows ._pth file should allow import site 11227 11228C API 11229----- 11230 11231- bpo-28426: Deprecated undocumented functions PyUnicode_AsEncodedObject(), 11232 PyUnicode_AsDecodedObject(), PyUnicode_AsDecodedUnicode() and 11233 PyUnicode_AsEncodedUnicode(). 11234 11235Build 11236----- 11237 11238- bpo-28258: Fixed build with Estonian locale (python-config and distclean 11239 targets in Makefile). Patch by Arfrever Frehtes Taifersar Arahesis. 11240 11241- bpo-26661: setup.py now detects system libffi with multiarch wrapper. 11242 11243- bpo-15819: Remove redundant include search directory option for building 11244 outside the source tree. 11245 11246Tests 11247----- 11248 11249- bpo-28217: Adds _testconsole module to test console input. 11250 11251 11252What's New in Python 3.6.0 beta 1? 11253================================== 11254 11255*Release date: 2016-09-12* 11256 11257Core and Builtins 11258----------------- 11259 11260- bpo-23722: The __class__ cell used by zero-argument super() is now 11261 initialized from type.__new__ rather than __build_class__, so class 11262 methods relying on that will now work correctly when called from metaclass 11263 methods during class creation. Patch by Martin Teichmann. 11264 11265- bpo-25221: Fix corrupted result from PyLong_FromLong(0) when Python is 11266 compiled with NSMALLPOSINTS = 0. 11267 11268- bpo-27080: Implement formatting support for PEP 515. Initial patch by 11269 Chris Angelico. 11270 11271- bpo-27199: In tarfile, expose copyfileobj bufsize to improve throughput. 11272 Patch by Jason Fried. 11273 11274- bpo-27948: In f-strings, only allow backslashes inside the braces (where 11275 the expressions are). This is a breaking change from the 3.6 alpha 11276 releases, where backslashes are allowed anywhere in an f-string. Also, 11277 require that expressions inside f-strings be enclosed within literal 11278 braces, and not escapes like ``f'\x7b"hi"\x7d'``. 11279 11280- bpo-28046: Remove platform-specific directories from sys.path. 11281 11282- bpo-28071: Add early-out for differencing from an empty set. 11283 11284- bpo-25758: Prevents zipimport from unnecessarily encoding a filename 11285 (patch by Eryk Sun) 11286 11287- bpo-25856: The __module__ attribute of extension classes and functions now 11288 is interned. This leads to more compact pickle data with protocol 4. 11289 11290- bpo-27213: Rework CALL_FUNCTION* opcodes to produce shorter and more 11291 efficient bytecode. Patch by Demur Rumed, design by Serhiy Storchaka, 11292 reviewed by Serhiy Storchaka and Victor Stinner. 11293 11294- bpo-26331: Implement tokenizing support for PEP 515. Patch by Georg 11295 Brandl. 11296 11297- bpo-27999: Make "global after use" a SyntaxError, and ditto for nonlocal. 11298 Patch by Ivan Levkivskyi. 11299 11300- bpo-28003: Implement PEP 525 -- Asynchronous Generators. 11301 11302- bpo-27985: Implement PEP 526 -- Syntax for Variable Annotations. Patch by 11303 Ivan Levkivskyi. 11304 11305- bpo-26058: Add a new private version to the builtin dict type, incremented 11306 at each dictionary creation and at each dictionary change. Implementation 11307 of the PEP 509. 11308 11309- bpo-27364: A backslash-character pair that is not a valid escape sequence 11310 now generates a DeprecationWarning. Patch by Emanuel Barry. 11311 11312- bpo-27350: `dict` implementation is changed like PyPy. It is more compact 11313 and preserves insertion order. (Concept developed by Raymond Hettinger and 11314 patch by Inada Naoki.) 11315 11316- bpo-27911: Remove unnecessary error checks in 11317 ``exec_builtin_or_dynamic()``. 11318 11319- bpo-27078: Added BUILD_STRING opcode. Optimized f-strings evaluation. 11320 11321- bpo-17884: Python now requires systems with inttypes.h and stdint.h 11322 11323- bpo-27961: Require platforms to support ``long long``. Python hasn't 11324 compiled without ``long long`` for years, so this is basically a 11325 formality. 11326 11327- bpo-27355: Removed support for Windows CE. It was never finished, and 11328 Windows CE is no longer a relevant platform for Python. 11329 11330- Implement PEP 523. 11331 11332- bpo-27870: A left shift of zero by a large integer no longer attempts to 11333 allocate large amounts of memory. 11334 11335- bpo-25402: In int-to-decimal-string conversion, improve the estimate of 11336 the intermediate memory required, and remove an unnecessarily strict 11337 overflow check. Patch by Serhiy Storchaka. 11338 11339- bpo-27214: In long_invert, be more careful about modifying object returned 11340 by long_add, and remove an unnecessary check for small longs. Thanks Oren 11341 Milman for analysis and patch. 11342 11343- bpo-27506: Support passing the bytes/bytearray.translate() "delete" 11344 argument by keyword. 11345 11346- bpo-27812: Properly clear out a generator's frame's backreference to the 11347 generator to prevent crashes in frame.clear(). 11348 11349- bpo-27811: Fix a crash when a coroutine that has not been awaited is 11350 finalized with warnings-as-errors enabled. 11351 11352- bpo-27587: Fix another issue found by PVS-Studio: Null pointer check after 11353 use of 'def' in _PyState_AddModule(). Initial patch by Christian Heimes. 11354 11355- bpo-27792: The modulo operation applied to ``bool`` and other ``int`` 11356 subclasses now always returns an ``int``. Previously the return type 11357 depended on the input values. Patch by Xiang Zhang. 11358 11359- bpo-26984: int() now always returns an instance of exact int. 11360 11361- bpo-25604: Fix a minor bug in integer true division; this bug could 11362 potentially have caused off-by-one-ulp results on platforms with 11363 unreliable ldexp implementations. 11364 11365- bpo-24254: Make class definition namespace ordered by default. 11366 11367- bpo-27662: Fix an overflow check in ``List_New``: the original code was 11368 checking against ``Py_SIZE_MAX`` instead of the correct upper bound of 11369 ``Py_SSIZE_T_MAX``. Patch by Xiang Zhang. 11370 11371- bpo-27782: Multi-phase extension module import now correctly allows the 11372 ``m_methods`` field to be used to add module level functions to instances 11373 of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang. 11374 11375- bpo-27936: The round() function accepted a second None argument for some 11376 types but not for others. Fixed the inconsistency by accepting None for 11377 all numeric types. 11378 11379- bpo-27487: Warn if a submodule argument to "python -m" or 11380 runpy.run_module() is found in sys.modules after parent packages are 11381 imported, but before the submodule is executed. 11382 11383- bpo-27157: Make only type() itself accept the one-argument form. Patch by 11384 Eryk Sun and Emanuel Barry. 11385 11386- bpo-27558: Fix a SystemError in the implementation of "raise" statement. 11387 In a brand new thread, raise a RuntimeError since there is no active 11388 exception to reraise. Patch written by Xiang Zhang. 11389 11390- bpo-28008: Implement PEP 530 -- asynchronous comprehensions. 11391 11392- bpo-27942: Fix memory leak in codeobject.c 11393 11394Library 11395------- 11396 11397- bpo-28732: Fix crash in os.spawnv() with no elements in args 11398 11399- bpo-28485: Always raise ValueError for negative 11400 compileall.compile_dir(workers=...) parameter, even when multithreading is 11401 unavailable. 11402 11403- bpo-28037: Use sqlite3_get_autocommit() instead of setting 11404 Connection->inTransaction manually. 11405 11406- bpo-25283: Attributes tm_gmtoff and tm_zone are now available on all 11407 platforms in the return values of time.localtime() and time.gmtime(). 11408 11409- bpo-24454: Regular expression match object groups are now accessible using 11410 __getitem__. "mo[x]" is equivalent to "mo.group(x)". 11411 11412- bpo-10740: sqlite3 no longer implicitly commit an open transaction before 11413 DDL statements. 11414 11415- bpo-17941: Add a *module* parameter to collections.namedtuple(). 11416 11417- bpo-22493: Inline flags now should be used only at the start of the 11418 regular expression. Deprecation warning is emitted if uses them in the 11419 middle of the regular expression. 11420 11421- bpo-26885: xmlrpc now supports unmarshalling additional data types used by 11422 Apache XML-RPC implementation for numerics and None. 11423 11424- bpo-28070: Fixed parsing inline verbose flag in regular expressions. 11425 11426- bpo-19500: Add client-side SSL session resumption to the ssl module. 11427 11428- bpo-28022: Deprecate ssl-related arguments in favor of SSLContext. The 11429 deprecation include manual creation of SSLSocket and certfile/keyfile (or 11430 similar) in ftplib, httplib, imaplib, smtplib, poplib and urllib. 11431 11432- bpo-28043: SSLContext has improved default settings: OP_NO_SSLv2, 11433 OP_NO_SSLv3, OP_NO_COMPRESSION, OP_CIPHER_SERVER_PREFERENCE, 11434 OP_SINGLE_DH_USE, OP_SINGLE_ECDH_USE and HIGH ciphers without MD5. 11435 11436- bpo-24693: Changed some RuntimeError's in the zipfile module to more 11437 appropriate types. Improved some error messages and debugging output. 11438 11439- bpo-17909: ``json.load`` and ``json.loads`` now support binary input 11440 encoded as UTF-8, UTF-16 or UTF-32. Patch by Serhiy Storchaka. 11441 11442- bpo-27137: the pure Python fallback implementation of 11443 ``functools.partial`` now matches the behaviour of its accelerated C 11444 counterpart for subclassing, pickling and text representation purposes. 11445 Patch by Emanuel Barry and Serhiy Storchaka. 11446 11447- Fix possible integer overflows and crashes in the mmap module with unusual 11448 usage patterns. 11449 11450- bpo-1703178: Fix the ability to pass the --link-objects option to the 11451 distutils build_ext command. 11452 11453- bpo-28019: itertools.count() no longer rounds non-integer step in range 11454 between 1.0 and 2.0 to 1. 11455 11456- bpo-18401: Pdb now supports the 'readrc' keyword argument to control 11457 whether .pdbrc files should be read. Patch by Martin Matusiak and Sam 11458 Kimbrel. 11459 11460- bpo-25969: Update the lib2to3 grammar to handle the unpacking 11461 generalizations added in 3.5. 11462 11463- bpo-14977: mailcap now respects the order of the lines in the mailcap 11464 files ("first match"), as required by RFC 1542. Patch by Michael Lazar. 11465 11466- bpo-28082: Convert re flag constants to IntFlag. 11467 11468- bpo-28025: Convert all ssl module constants to IntEnum and IntFlags. 11469 SSLContext properties now return flags and enums. 11470 11471- bpo-23591: Add Flag, IntFlag, and auto() to enum module. 11472 11473- bpo-433028: Added support of modifier spans in regular expressions. 11474 11475- bpo-24594: Validates persist parameter when opening MSI database 11476 11477- bpo-17582: xml.etree.ElementTree nows preserves whitespaces in attributes 11478 (Patch by Duane Griffin. Reviewed and approved by Stefan Behnel.) 11479 11480- bpo-28047: Fixed calculation of line length used for the base64 CTE in the 11481 new email policies. 11482 11483- bpo-27576: Fix call order in OrderedDict.__init__(). 11484 11485- email.generator.DecodedGenerator now supports the policy keyword. 11486 11487- bpo-28027: Remove undocumented modules from ``Lib/plat-*``: IN, CDROM, 11488 DLFCN, TYPES, CDIO, and STROPTS. 11489 11490- bpo-27445: Don't pass str(_charset) to MIMEText.set_payload(). Patch by 11491 Claude Paroz. 11492 11493- bpo-24277: The new email API is no longer provisional, and the docs have 11494 been reorganized and rewritten to emphasize the new API. 11495 11496- bpo-22450: urllib now includes an ``Accept: */*`` header among the default 11497 headers. This makes the results of REST API requests more consistent and 11498 predictable especially when proxy servers are involved. 11499 11500- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file 11501 between runs given the same Grammar.txt input regardless of the hash 11502 randomization setting. 11503 11504- bpo-28005: Allow ImportErrors in encoding implementation to propagate. 11505 11506- bpo-26667: Support path-like objects in importlib.util. 11507 11508- bpo-27570: Avoid zero-length memcpy() etc calls with null source pointers 11509 in the "ctypes" and "array" modules. 11510 11511- bpo-22233: Break email header lines *only* on the RFC specified CR and LF 11512 characters, not on arbitrary unicode line breaks. This also fixes a bug 11513 in HTTP header parsing. 11514 11515- bpo-27331: The email.mime classes now all accept an optional policy 11516 keyword. 11517 11518- bpo-27988: Fix email iter_attachments incorrect mutation of payload list. 11519 11520- bpo-16113: Add SHA-3 and SHAKE support to hashlib module. 11521 11522- Eliminate a tautological-pointer-compare warning in _scproxy.c. 11523 11524- bpo-27776: The :func:`os.urandom` function does now block on Linux 3.17 11525 and newer until the system urandom entropy pool is initialized to increase 11526 the security. This change is part of the :pep:`524`. 11527 11528- bpo-27778: Expose the Linux ``getrandom()`` syscall as a new 11529 :func:`os.getrandom` function. This change is part of the :pep:`524`. 11530 11531- bpo-27691: Fix ssl module's parsing of GEN_RID subject alternative name 11532 fields in X.509 certs. 11533 11534- bpo-18844: Add random.choices(). 11535 11536- bpo-25761: Improved error reporting about truncated pickle data in C 11537 implementation of unpickler. UnpicklingError is now raised instead of 11538 AttributeError and ValueError in some cases. 11539 11540- bpo-26798: Add BLAKE2 (blake2b and blake2s) to hashlib. 11541 11542- bpo-26032: Optimized globbing in pathlib by using os.scandir(); it is now 11543 about 1.5--4 times faster. 11544 11545- bpo-25596: Optimized glob() and iglob() functions in the glob module; they 11546 are now about 3--6 times faster. 11547 11548- bpo-27928: Add scrypt (password-based key derivation function) to hashlib 11549 module (requires OpenSSL 1.1.0). 11550 11551- bpo-27850: Remove 3DES from ssl module's default cipher list to counter 11552 measure sweet32 attack (CVE-2016-2183). 11553 11554- bpo-27766: Add ChaCha20 Poly1305 to ssl module's default cipher list. 11555 (Required OpenSSL 1.1.0 or LibreSSL). 11556 11557- bpo-25387: Check return value of winsound.MessageBeep. 11558 11559- bpo-27866: Add SSLContext.get_ciphers() method to get a list of all 11560 enabled ciphers. 11561 11562- bpo-27744: Add AF_ALG (Linux Kernel crypto) to socket module. 11563 11564- bpo-26470: Port ssl and hashlib module to OpenSSL 1.1.0. 11565 11566- bpo-11620: Fix support for SND_MEMORY in winsound.PlaySound. Based on a 11567 patch by Tim Lesher. 11568 11569- bpo-11734: Add support for IEEE 754 half-precision floats to the struct 11570 module. Based on a patch by Eli Stevens. 11571 11572- bpo-27919: Deprecated ``extra_path`` distribution option in distutils 11573 packaging. 11574 11575- bpo-23229: Add new ``cmath`` constants: ``cmath.inf`` and ``cmath.nan`` to 11576 match ``math.inf`` and ``math.nan``, and also ``cmath.infj`` and 11577 ``cmath.nanj`` to match the format used by complex repr. 11578 11579- bpo-27842: The csv.DictReader now returns rows of type OrderedDict. 11580 (Contributed by Steve Holden.) 11581 11582- Remove support for passing a file descriptor to os.access. It never worked 11583 but previously didn't raise. 11584 11585- bpo-12885: Fix error when distutils encounters symlink. 11586 11587- bpo-27881: Fixed possible bugs when setting 11588 sqlite3.Connection.isolation_level. Based on patch by Xiang Zhang. 11589 11590- bpo-27861: Fixed a crash in sqlite3.Connection.cursor() when a factory 11591 creates not a cursor. Patch by Xiang Zhang. 11592 11593- bpo-19884: Avoid spurious output on OS X with Gnu Readline. 11594 11595- bpo-27706: Restore deterministic behavior of random.Random().seed() for 11596 string seeds using seeding version 1. Allows sequences of calls to 11597 random() to exactly match those obtained in Python 2. Patch by Nofar 11598 Schnider. 11599 11600- bpo-10513: Fix a regression in Connection.commit(). Statements should not 11601 be reset after a commit. 11602 11603- bpo-12319: Chunked transfer encoding support added to 11604 http.client.HTTPConnection requests. The 11605 urllib.request.AbstractHTTPHandler class does not enforce a Content-Length 11606 header any more. If a HTTP request has a file or iterable body, but no 11607 Content-Length header, the library now falls back to use chunked 11608 transfer-encoding. 11609 11610- A new version of typing.py from https://github.com/python/typing: - 11611 Collection (only for 3.6) (Issue #27598) - Add FrozenSet to __all__ 11612 (upstream #261) - fix crash in _get_type_vars() (upstream #259) - Remove 11613 the dict constraint in ForwardRef._eval_type (upstream #252) 11614 11615- bpo-27832: Make ``_normalize`` parameter to ``Fraction`` constuctor 11616 keyword-only, so that ``Fraction(2, 3, 4)`` now raises ``TypeError``. 11617 11618- bpo-27539: Fix unnormalised ``Fraction.__pow__`` result in the case of 11619 negative exponent and negative base. 11620 11621- bpo-21718: cursor.description is now available for queries using CTEs. 11622 11623- bpo-27819: In distutils sdists, simply produce the "gztar" (gzipped tar 11624 format) distributions on all platforms unless "formats" is supplied. 11625 11626- bpo-2466: posixpath.ismount now correctly recognizes mount points which 11627 the user does not have permission to access. 11628 11629- bpo-9998: On Linux, ctypes.util.find_library now looks in LD_LIBRARY_PATH 11630 for shared libraries. 11631 11632- bpo-27573: exit message for code.interact is now configurable. 11633 11634- bpo-27930: Improved behaviour of logging.handlers.QueueListener. Thanks to 11635 Paulo Andrade and Petr Viktorin for the analysis and patch. 11636 11637- bpo-6766: Distributed reference counting added to multiprocessing to 11638 support nesting of shared values / proxy objects. 11639 11640- bpo-21201: Improves readability of multiprocessing error message. Thanks 11641 to Wojciech Walczak for patch. 11642 11643- asyncio: Add set_protocol / get_protocol to Transports. 11644 11645- bpo-27456: asyncio: Set TCP_NODELAY by default. 11646 11647IDLE 11648---- 11649 11650- bpo-15308: Add 'interrupt execution' (^C) to Shell menu. Patch by Roger 11651 Serwy, updated by Bayard Randel. 11652 11653- bpo-27922: Stop IDLE tests from 'flashing' gui widgets on the screen. 11654 11655- bpo-27891: Consistently group and sort imports within idlelib modules. 11656 11657- bpo-17642: add larger font sizes for classroom projection. 11658 11659- Add version to title of IDLE help window. 11660 11661- bpo-25564: In section on IDLE -- console differences, mention that using 11662 exec means that __builtins__ is defined for each statement. 11663 11664- bpo-27821: Fix 3.6.0a3 regression that prevented custom key sets from 11665 being selected when no custom theme was defined. 11666 11667C API 11668----- 11669 11670- bpo-26900: Excluded underscored names and other private API from limited 11671 API. 11672 11673- bpo-26027: Add support for path-like objects in PyUnicode_FSConverter() & 11674 PyUnicode_FSDecoder(). 11675 11676Tests 11677----- 11678 11679- bpo-27427: Additional tests for the math module. Patch by Francisco Couzo. 11680 11681- bpo-27953: Skip math and cmath tests that fail on OS X 10.4 due to a poor 11682 libm implementation of tan. 11683 11684- bpo-26040: Improve test_math and test_cmath coverage and rigour. Patch by 11685 Jeff Allen. 11686 11687- bpo-27787: Call gc.collect() before checking each test for "dangling 11688 threads", since the dangling threads are weak references. 11689 11690Build 11691----- 11692 11693- bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach) 11694 11695- bpo-27705: Update message in validate_ucrtbase.py 11696 11697- bpo-27976: Deprecate building _ctypes with the bundled copy of libffi on 11698 non-OSX UNIX platforms. 11699 11700- bpo-27983: Cause lack of llvm-profdata tool when using clang as required 11701 for PGO linking to be a configure time error rather than make time when 11702 ``--with-optimizations`` is enabled. Also improve our ability to find the 11703 llvm-profdata tool on MacOS and some Linuxes. 11704 11705- bpo-21590: Support for DTrace and SystemTap probes. 11706 11707- bpo-26307: The profile-opt build now applies PGO to the built-in modules. 11708 11709- bpo-26359: Add the --with-optimizations flag to turn on LTO and PGO build 11710 support when available. 11711 11712- bpo-27917: Set platform triplets for Android builds. 11713 11714- bpo-25825: Update references to the $(LIBPL) installation path on AIX. 11715 This path was changed in 3.2a4. 11716 11717- Update OS X installer to use SQLite 3.14.1 and XZ 5.2.2. 11718 11719- bpo-21122: Fix LTO builds on OS X. 11720 11721- bpo-17128: Build OS X installer with a private copy of OpenSSL. Also 11722 provide a sample Install Certificates command script to install a set of 11723 root certificates from the third-party certifi module. 11724 11725Tools/Demos 11726----------- 11727 11728- bpo-27952: Get Tools/scripts/fixcid.py working with Python 3 and the 11729 current "re" module, avoid invalid Python backslash escapes, and fix a bug 11730 parsing escaped C quote signs. 11731 11732Windows 11733------- 11734 11735- bpo-28065: Update xz dependency to 5.2.2 and build it from source. 11736 11737- bpo-25144: Ensures TargetDir is set before continuing with custom install. 11738 11739- bpo-1602: Windows console doesn't input or print Unicode (PEP 528) 11740 11741- bpo-27781: Change file system encoding on Windows to UTF-8 (PEP 529) 11742 11743- bpo-27731: Opt-out of MAX_PATH on Windows 10 11744 11745- bpo-6135: Adds encoding and errors parameters to subprocess. 11746 11747- bpo-27959: Adds oem encoding, alias ansi to mbcs, move aliasmbcs to codec 11748 lookup. 11749 11750- bpo-27982: The functions of the winsound module now accept keyword 11751 arguments. 11752 11753- bpo-20366: Build full text search support into SQLite on Windows. 11754 11755- bpo-27756: Adds new icons for Python files and processes on Windows. 11756 Designs by Cherry Wang. 11757 11758- bpo-27883: Update sqlite to 3.14.1.0 on Windows. 11759 11760 11761What's New in Python 3.6.0 alpha 4? 11762=================================== 11763 11764*Release date: 2016-08-15* 11765 11766Core and Builtins 11767----------------- 11768 11769- bpo-27704: Optimized creating bytes and bytearray from byte-like objects 11770 and iterables. Speed up to 3 times for short objects. Original patch by 11771 Naoki Inada. 11772 11773- bpo-26823: Large sections of repeated lines in tracebacks are now 11774 abbreviated as "[Previous line repeated {count} more times]" by the 11775 builtin traceback rendering. Patch by Emanuel Barry. 11776 11777- bpo-27574: Decreased an overhead of parsing keyword arguments in functions 11778 implemented with using Argument Clinic. 11779 11780- bpo-22557: Now importing already imported modules is up to 2.5 times 11781 faster. 11782 11783- bpo-17596: Include <wincrypt.h> to help with Min GW building. 11784 11785- bpo-17599: On Windows, rename the privately defined REPARSE_DATA_BUFFER 11786 structure to avoid conflicting with the definition from Min GW. 11787 11788- bpo-27507: Add integer overflow check in bytearray.extend(). Patch by 11789 Xiang Zhang. 11790 11791- bpo-27581: Don't rely on wrapping for overflow check in 11792 PySequence_Tuple(). Patch by Xiang Zhang. 11793 11794- bpo-1621: Avoid signed integer overflow in list and tuple operations. 11795 Patch by Xiang Zhang. 11796 11797- bpo-27419: Standard __import__() no longer look up "__import__" in globals 11798 or builtins for importing submodules or "from import". Fixed a crash if 11799 raise a warning about unabling to resolve package from __spec__ or 11800 __package__. 11801 11802- bpo-27083: Respect the PYTHONCASEOK environment variable under Windows. 11803 11804- bpo-27514: Make having too many statically nested blocks a SyntaxError 11805 instead of SystemError. 11806 11807- bpo-27366: Implemented PEP 487 (Simpler customization of class creation). 11808 Upon subclassing, the __init_subclass__ classmethod is called on the base 11809 class. Descriptors are initialized with __set_name__ after class creation. 11810 11811Library 11812------- 11813 11814- bpo-26027: Add PEP 519/__fspath__() support to the os and os.path modules. 11815 Includes code from Jelle Zijlstra. (See also: bpo-27524) 11816 11817- bpo-27598: Add Collections to collections.abc. Patch by Ivan Levkivskyi, 11818 docs by Neil Girdhar. 11819 11820- bpo-25958: Support "anti-registration" of special methods from various 11821 ABCs, like __hash__, __iter__ or __len__. All these (and several more) 11822 can be set to None in an implementation class and the behavior will be as 11823 if the method is not defined at all. (Previously, this mechanism existed 11824 only for __hash__, to make mutable classes unhashable.) Code contributed 11825 by Andrew Barnert and Ivan Levkivskyi. 11826 11827- bpo-16764: Support keyword arguments to zlib.decompress(). Patch by Xiang 11828 Zhang. 11829 11830- bpo-27736: Prevent segfault after interpreter re-initialization due to ref 11831 count problem introduced in code for Issue #27038 in 3.6.0a3. Patch by 11832 Xiang Zhang. 11833 11834- bpo-25628: The *verbose* and *rename* parameters for 11835 collections.namedtuple are now keyword-only. 11836 11837- bpo-12345: Add mathematical constant tau to math and cmath. See also PEP 11838 628. 11839 11840- bpo-26823: traceback.StackSummary.format now abbreviates large sections of 11841 repeated lines as "[Previous line repeated {count} more times]" (this 11842 change then further affects other traceback display operations in the 11843 module). Patch by Emanuel Barry. 11844 11845- bpo-27664: Add to concurrent.futures.thread.ThreadPoolExecutor() the 11846 ability to specify a thread name prefix. 11847 11848- bpo-27181: Add geometric_mean and harmonic_mean to statistics module. 11849 11850- bpo-27573: code.interact now prints an message when exiting. 11851 11852- bpo-6422: Add autorange method to timeit.Timer objects. 11853 11854- bpo-27773: Correct some memory management errors server_hostname in 11855 _ssl.wrap_socket(). 11856 11857- bpo-26750: unittest.mock.create_autospec() now works properly for 11858 subclasses of property() and other data descriptors. Removes the never 11859 publicly used, never documented unittest.mock.DescriptorTypes tuple. 11860 11861- bpo-26754: Undocumented support of general bytes-like objects as path in 11862 compile() and similar functions is now deprecated. 11863 11864- bpo-26800: Undocumented support of general bytes-like objects as paths in 11865 os functions is now deprecated. 11866 11867- bpo-26981: Add _order_ compatibility shim to enum.Enum for Python 2/3 code 11868 bases. 11869 11870- bpo-27661: Added tzinfo keyword argument to datetime.combine. 11871 11872- In the curses module, raise an error if window.getstr() or window.instr() 11873 is passed a negative value. 11874 11875- bpo-27783: Fix possible usage of uninitialized memory in 11876 operator.methodcaller. 11877 11878- bpo-27774: Fix possible Py_DECREF on unowned object in _sre. 11879 11880- bpo-27760: Fix possible integer overflow in binascii.b2a_qp. 11881 11882- bpo-27758: Fix possible integer overflow in the _csv module for large 11883 record lengths. 11884 11885- bpo-27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the 11886 HTTP_PROXY variable when REQUEST_METHOD environment is set, which 11887 indicates that the script is in CGI mode. 11888 11889- bpo-7063: Remove dead code from the "array" module's slice handling. Patch 11890 by Chuck. 11891 11892- bpo-27656: Do not assume sched.h defines any SCHED_* constants. 11893 11894- bpo-27130: In the "zlib" module, fix handling of large buffers (typically 11895 4 GiB) when compressing and decompressing. Previously, inputs were 11896 limited to 4 GiB, and compression and decompression operations did not 11897 properly handle results of 4 GiB. 11898 11899- bpo-24773: Implemented PEP 495 (Local Time Disambiguation). 11900 11901- Expose the EPOLLEXCLUSIVE constant (when it is defined) in the select 11902 module. 11903 11904- bpo-27567: Expose the EPOLLRDHUP and POLLRDHUP constants in the select 11905 module. 11906 11907- bpo-1621: Avoid signed int negation overflow in the "audioop" module. 11908 11909- bpo-27533: Release GIL in nt._isdir 11910 11911- bpo-17711: Fixed unpickling by the persistent ID with protocol 0. Original 11912 patch by Alexandre Vassalotti. 11913 11914- bpo-27522: Avoid an unintentional reference cycle in email.feedparser. 11915 11916- bpo-27512: Fix a segfault when os.fspath() called an __fspath__() method 11917 that raised an exception. Patch by Xiang Zhang. 11918 11919IDLE 11920---- 11921 11922- bpo-27714: text_textview and test_autocomplete now pass when re-run in the 11923 same process. This occurs when test_idle fails when run with the -w 11924 option but without -jn. Fix warning from test_config. 11925 11926- bpo-27621: Put query response validation error messages in the query box 11927 itself instead of in a separate messagebox. Redo tests to match. Add Mac 11928 OSX refinements. Original patch by Mark Roseman. 11929 11930- bpo-27620: Escape key now closes Query box as cancelled. 11931 11932- bpo-27609: IDLE: tab after initial whitespace should tab, not 11933 autocomplete. This fixes problem with writing docstrings at least twice 11934 indented. 11935 11936- bpo-27609: Explicitly return None when there are also non-None returns. In 11937 a few cases, reverse a condition and eliminate a return. 11938 11939- bpo-25507: IDLE no longer runs buggy code because of its tkinter imports. 11940 Users must include the same imports required to run directly in Python. 11941 11942- bpo-27173: Add 'IDLE Modern Unix' to the built-in key sets. Make the 11943 default key set depend on the platform. Add tests for the changes to the 11944 config module. 11945 11946- bpo-27452: add line counter and crc to IDLE configHandler test dump. 11947 11948Tests 11949----- 11950 11951- bpo-25805: Skip a test in test_pkgutil as needed that doesn't work when 11952 ``__name__ == __main__``. Patch by SilentGhost. 11953 11954- bpo-27472: Add test.support.unix_shell as the path to the default shell. 11955 11956- bpo-27369: In test_pyexpat, avoid testing an error message detail that 11957 changed in Expat 2.2.0. 11958 11959- bpo-27594: Prevent assertion error when running test_ast with coverage 11960 enabled: ensure code object has a valid first line number. Patch suggested 11961 by Ivan Levkivskyi. 11962 11963Windows 11964------- 11965 11966- bpo-27647: Update bundled Tcl/Tk to 8.6.6. 11967 11968- bpo-27610: Adds PEP 514 metadata to Windows installer 11969 11970- bpo-27469: Adds a shell extension to the launcher so that drag and drop 11971 works correctly. 11972 11973- bpo-27309: Enables proper Windows styles in python[w].exe manifest. 11974 11975Build 11976----- 11977 11978- bpo-27713: Suppress spurious build warnings when updating importlib's 11979 bootstrap files. Patch by Xiang Zhang 11980 11981- bpo-25825: Correct the references to Modules/python.exp, which is required 11982 on AIX. The references were accidentally changed in 3.5.0a1. 11983 11984- bpo-27453: CPP invocation in configure must use CPPFLAGS. Patch by Chi 11985 Hsuan Yen. 11986 11987- bpo-27641: The configure script now inserts comments into the makefile to 11988 prevent the pgen and _freeze_importlib executables from being 11989 cross-compiled. 11990 11991- bpo-26662: Set PYTHON_FOR_GEN in configure as the Python program to be 11992 used for file generation during the build. 11993 11994- bpo-10910: Avoid C++ compilation errors on FreeBSD and OS X. Also update 11995 FreedBSD version checks for the original ctype UTF-8 workaround. 11996 11997 11998What's New in Python 3.6.0 alpha 3? 11999=================================== 12000 12001*Release date: 2016-07-11* 12002 12003Core and Builtins 12004----------------- 12005 12006- bpo-27473: Fixed possible integer overflow in bytes and bytearray 12007 concatenations. Patch by Xiang Zhang. 12008 12009- bpo-23034: The output of a special Python build with defined COUNT_ALLOCS, 12010 SHOW_ALLOC_COUNT or SHOW_TRACK_COUNT macros is now off by default. It 12011 can be re-enabled using the "-X showalloccount" option. It now outputs to 12012 stderr instead of stdout. 12013 12014- bpo-27443: __length_hint__() of bytearray iterators no longer return a 12015 negative integer for a resized bytearray. 12016 12017- bpo-27007: The fromhex() class methods of bytes and bytearray subclasses 12018 now return an instance of corresponding subclass. 12019 12020Library 12021------- 12022 12023- bpo-26844: Fix error message for imp.find_module() to refer to 'path' 12024 instead of 'name'. Patch by Lev Maximov. 12025 12026- bpo-23804: Fix SSL zero-length recv() calls to not block and not raise an 12027 error about unclean EOF. 12028 12029- bpo-27466: Change time format returned by http.cookie.time2netscape, 12030 confirming the netscape cookie format and making it consistent with 12031 documentation. 12032 12033- bpo-21708: Deprecated dbm.dumb behavior that differs from common dbm 12034 behavior: creating a database in 'r' and 'w' modes and modifying a 12035 database in 'r' mode. 12036 12037- bpo-26721: Change the socketserver.StreamRequestHandler.wfile attribute to 12038 implement BufferedIOBase. In particular, the write() method no longer does 12039 partial writes. 12040 12041- bpo-22115: Added methods trace_add, trace_remove and trace_info in the 12042 tkinter.Variable class. They replace old methods trace_variable, trace, 12043 trace_vdelete and trace_vinfo that use obsolete Tcl commands and might not 12044 work in future versions of Tcl. Fixed old tracing methods: 12045 trace_vdelete() with wrong mode no longer break tracing, trace_vinfo() now 12046 always returns a list of pairs of strings, tracing in the "u" mode now 12047 works. 12048 12049- bpo-26243: Only the level argument to zlib.compress() is keyword argument 12050 now. The first argument is positional-only. 12051 12052- bpo-27038: Expose the DirEntry type as os.DirEntry. Code patch by Jelle 12053 Zijlstra. 12054 12055- bpo-27186: Update os.fspath()/PyOS_FSPath() to check the return value of 12056 __fspath__() to be either str or bytes. 12057 12058- bpo-18726: All optional parameters of the dump(), dumps(), load() and 12059 loads() functions and JSONEncoder and JSONDecoder class constructors in 12060 the json module are now keyword-only. 12061 12062- bpo-27319: Methods selection_set(), selection_add(), selection_remove() 12063 and selection_toggle() of ttk.TreeView now allow passing multiple items as 12064 multiple arguments instead of passing them as a tuple. Deprecated 12065 undocumented ability of calling the selection() method with arguments. 12066 12067- bpo-27079: Fixed curses.ascii functions isblank(), iscntrl() and 12068 ispunct(). 12069 12070- bpo-27294: Numerical state in the repr for Tkinter event objects is now 12071 represented as a combination of known flags. 12072 12073- bpo-27177: Match objects in the re module now support index-like objects 12074 as group indices. Based on patches by Jeroen Demeyer and Xiang Zhang. 12075 12076- bpo-26754: Some functions (compile() etc) accepted a filename argument 12077 encoded as an iterable of integers. Now only strings and byte-like objects 12078 are accepted. 12079 12080- bpo-26536: socket.ioctl now supports SIO_LOOPBACK_FAST_PATH. Patch by 12081 Daniel Stokes. 12082 12083- bpo-27048: Prevents distutils failing on Windows when environment 12084 variables contain non-ASCII characters 12085 12086- bpo-27330: Fixed possible leaks in the ctypes module. 12087 12088- bpo-27238: Got rid of bare excepts in the turtle module. Original patch 12089 by Jelle Zijlstra. 12090 12091- bpo-27122: When an exception is raised within the context being managed by 12092 a contextlib.ExitStack() and one of the exit stack generators catches and 12093 raises it in a chain, do not re-raise the original exception when exiting, 12094 let the new chained one through. This avoids the PEP 479 bug described in 12095 issue25782. 12096 12097Security 12098-------- 12099 12100- bpo-27278: Fix os.urandom() implementation using getrandom() on Linux. 12101 Truncate size to INT_MAX and loop until we collected enough random bytes, 12102 instead of casting a directly Py_ssize_t to int. 12103 12104Library 12105------- 12106 12107- bpo-16864: sqlite3.Cursor.lastrowid now supports REPLACE statement. 12108 Initial patch by Alex LordThorsen. 12109 12110- bpo-26386: Fixed ttk.TreeView selection operations with item id's 12111 containing spaces. 12112 12113- bpo-8637: Honor a pager set by the env var MANPAGER (in preference to one 12114 set by the env var PAGER). 12115 12116Security 12117-------- 12118 12119- bpo-22636: Avoid shell injection problems with ctypes.util.find_library(). 12120 12121Library 12122------- 12123 12124- bpo-16182: Fix various functions in the "readline" module to use the 12125 locale encoding, and fix get_begidx() and get_endidx() to return code 12126 point indexes. 12127 12128- bpo-27392: Add loop.connect_accepted_socket(). Patch by Jim Fulton. 12129 12130IDLE 12131---- 12132 12133- bpo-27477: IDLE search dialogs now use ttk widgets. 12134 12135- bpo-27173: Add 'IDLE Modern Unix' to the built-in key sets. Make the 12136 default key set depend on the platform. Add tests for the changes to the 12137 config module. 12138 12139- bpo-27452: make command line "idle-test> python test_help.py" work. 12140 __file__ is relative when python is started in the file's directory. 12141 12142- bpo-27452: add line counter and crc to IDLE configHandler test dump. 12143 12144- bpo-27380: IDLE: add query.py with base Query dialog and ttk widgets. 12145 Module had subclasses SectionName, ModuleName, and HelpSource, which are 12146 used to get information from users by configdialog and file =>Load Module. 12147 Each subclass has itw own validity checks. Using ModuleName allows users 12148 to edit bad module names instead of starting over. Add tests and delete 12149 the two files combined into the new one. 12150 12151- bpo-27372: Test_idle no longer changes the locale. 12152 12153- bpo-27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names. 12154 12155- bpo-27245: IDLE: Cleanly delete custom themes and key bindings. 12156 Previously, when IDLE was started from a console or by import, a cascade 12157 of warnings was emitted. Patch by Serhiy Storchaka. 12158 12159- bpo-24137: Run IDLE, test_idle, and htest with tkinter default root 12160 disabled. Fix code and tests that fail with this restriction. Fix htests 12161 to not create a second and redundant root and mainloop. 12162 12163- bpo-27310: Fix IDLE.app failure to launch on OS X due to vestigial import. 12164 12165C API 12166----- 12167 12168- bpo-26754: PyUnicode_FSDecoder() accepted a filename argument encoded as 12169 an iterable of integers. Now only strings and byte-like objects are 12170 accepted. 12171 12172Build 12173----- 12174 12175- bpo-28066: Fix the logic that searches build directories for generated 12176 include files when building outside the source tree. 12177 12178- bpo-27442: Expose the Android API level that python was built against, in 12179 sysconfig.get_config_vars() as 'ANDROID_API_LEVEL'. 12180 12181- bpo-27434: The interpreter that runs the cross-build, found in PATH, must 12182 now be of the same feature version (e.g. 3.6) as the source being built. 12183 12184- bpo-26930: Update Windows builds to use OpenSSL 1.0.2h. 12185 12186- bpo-23968: Rename the platform directory from plat-$(MACHDEP) to 12187 plat-$(PLATFORM_TRIPLET). Rename the config directory (LIBPL) from 12188 config-$(LDVERSION) to config-$(LDVERSION)-$(PLATFORM_TRIPLET). Install 12189 the platform specific _sysconfigdata module into the platform directory 12190 and rename it to include the ABIFLAGS. 12191 12192- Don't use largefile support for GNU/Hurd. 12193 12194Tools/Demos 12195----------- 12196 12197- bpo-27332: Fixed the type of the first argument of module-level functions 12198 generated by Argument Clinic. Patch by Petr Viktorin. 12199 12200- bpo-27418: Fixed Tools/importbench/importbench.py. 12201 12202Documentation 12203------------- 12204 12205- bpo-19489: Moved the search box from the sidebar to the header and footer 12206 of each page. Patch by Ammar Askar. 12207 12208- bpo-27285: Update documentation to reflect the deprecation of ``pyvenv`` 12209 and normalize on the term "virtual environment". Patch by Steve Piercy. 12210 12211Tests 12212----- 12213 12214- bpo-27027: Added test.support.is_android that is True when this is an 12215 Android build. 12216 12217 12218What's New in Python 3.6.0 alpha 2? 12219=================================== 12220 12221*Release date: 2016-06-13* 12222 12223Core and Builtins 12224----------------- 12225 12226- bpo-27095: Simplified MAKE_FUNCTION and removed MAKE_CLOSURE opcodes. 12227 Patch by Demur Rumed. 12228 12229- bpo-27190: Raise NotSupportedError if sqlite3 is older than 3.3.1. Patch 12230 by Dave Sawyer. 12231 12232- bpo-27286: Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode. Calling 12233 function with generalized unpacking (PEP 448) and conflicting keyword 12234 names could cause undefined behavior. 12235 12236- bpo-27140: Added BUILD_CONST_KEY_MAP opcode. 12237 12238- bpo-27186: Add support for os.PathLike objects to open() (part of PEP 12239 519). 12240 12241- bpo-27066: Fixed SystemError if a custom opener (for open()) returns a 12242 negative number without setting an exception. 12243 12244- bpo-26983: float() now always return an instance of exact float. The 12245 deprecation warning is emitted if __float__ returns an instance of a 12246 strict subclass of float. In a future versions of Python this can be an 12247 error. 12248 12249- bpo-27097: Python interpreter is now about 7% faster due to optimized 12250 instruction decoding. Based on patch by Demur Rumed. 12251 12252- bpo-26647: Python interpreter now uses 16-bit wordcode instead of 12253 bytecode. Patch by Demur Rumed. 12254 12255- bpo-23275: Allow assigning to an empty target list in round brackets: () = 12256 iterable. 12257 12258- bpo-27243: Update the __aiter__ protocol: instead of returning an 12259 awaitable that resolves to an asynchronous iterator, the asynchronous 12260 iterator should be returned directly. Doing the former will trigger a 12261 PendingDeprecationWarning. 12262 12263Library 12264------- 12265 12266- Comment out socket (SO_REUSEPORT) and posix (O_SHLOCK, O_EXLOCK) constants 12267 exposed on the API which are not implemented on GNU/Hurd. They would not 12268 work at runtime anyway. 12269 12270- bpo-27025: Generated names for Tkinter widgets are now more meaningful and 12271 recognizable. 12272 12273- bpo-25455: Fixed crashes in repr of recursive ElementTree.Element and 12274 functools.partial objects. 12275 12276- bpo-27294: Improved repr for Tkinter event objects. 12277 12278- bpo-20508: Improve exception message of IPv{4,6}Network.__getitem__. Patch 12279 by Gareth Rees. 12280 12281Security 12282-------- 12283 12284- bpo-26556: Update expat to 2.1.1, fixes CVE-2015-1283. 12285 12286- Fix TLS stripping vulnerability in smtplib, CVE-2016-0772. Reported by 12287 Team Oststrom. 12288 12289Library 12290------- 12291 12292- bpo-21386: Implement missing IPv4Address.is_global property. It was 12293 documented since 07a5610bae9d. Initial patch by Roger Luethi. 12294 12295- bpo-27029: Removed deprecated support of universal newlines mode from 12296 ZipFile.open(). 12297 12298- bpo-27030: Unknown escapes consisting of ``'\'`` and an ASCII letter in 12299 regular expressions now are errors. The re.LOCALE flag now can be used 12300 only with bytes patterns. 12301 12302- bpo-27186: Add os.PathLike support to DirEntry (part of PEP 519). Initial 12303 patch by Jelle Zijlstra. 12304 12305- bpo-20900: distutils register command now decodes HTTP responses 12306 correctly. Initial patch by ingrid. 12307 12308- bpo-27186: Add os.PathLike support to pathlib, removing its provisional 12309 status (part of PEP 519). Initial patch by Dusty Phillips. 12310 12311- bpo-27186: Add support for os.PathLike objects to os.fsencode() and 12312 os.fsdecode() (part of PEP 519). 12313 12314- bpo-27186: Introduce os.PathLike and os.fspath() (part of PEP 519). 12315 12316- A new version of typing.py provides several new classes and features: 12317 @overload outside stubs, Reversible, DefaultDict, Text, ContextManager, 12318 Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some 12319 of the new features are not yet implemented in mypy or other static 12320 analyzers). Also classes for PEP 492 (Awaitable, AsyncIterable, 12321 AsyncIterator) have been added (in fact they made it into 3.5.1 but were 12322 never mentioned). 12323 12324- bpo-25738: Stop http.server.BaseHTTPRequestHandler.send_error() from 12325 sending a message body for 205 Reset Content. Also, don't send Content 12326 header fields in responses that don't have a body. Patch by Susumu 12327 Koshiba. 12328 12329- bpo-21313: Fix the "platform" module to tolerate when sys.version contains 12330 truncated build information. 12331 12332Security 12333-------- 12334 12335- bpo-26839: On Linux, :func:`os.urandom` now calls ``getrandom()`` with 12336 ``GRND_NONBLOCK`` to fall back on reading ``/dev/urandom`` if the urandom 12337 entropy pool is not initialized yet. Patch written by Colm Buckley. 12338 12339Library 12340------- 12341 12342- bpo-23883: Added missing APIs to __all__ to match the documented APIs for 12343 the following modules: cgi, mailbox, mimetypes, plistlib and smtpd. 12344 Patches by Jacek Kołodziej. 12345 12346- bpo-27164: In the zlib module, allow decompressing raw Deflate streams 12347 with a predefined zdict. Based on patch by Xiang Zhang. 12348 12349- bpo-24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely 12350 write data to the client. Previously it could do partial writes and 12351 truncate data. Also, wsgiref.handler.ServerHandler can now handle stdout 12352 doing partial writes, but this is deprecated. 12353 12354- bpo-21272: Use _sysconfigdata.py to initialize distutils.sysconfig. 12355 12356- bpo-19611: :mod:`inspect` now reports the implicit ``.0`` parameters 12357 generated by the compiler for comprehension and generator expression 12358 scopes as if they were positional-only parameters called ``implicit0``. 12359 Patch by Jelle Zijlstra. 12360 12361- bpo-26809: Add ``__all__`` to :mod:`string`. Patch by Emanuel Barry. 12362 12363- bpo-26373: subprocess.Popen.communicate now correctly ignores 12364 BrokenPipeError when the child process dies before .communicate() is 12365 called in more/all circumstances. 12366 12367- signal, socket, and ssl module IntEnum constant name lookups now return a 12368 consistent name for values having multiple names. Ex: signal.Signals(6) 12369 now refers to itself as signal.SIGALRM rather than flipping between that 12370 and signal.SIGIOT based on the interpreter's hash randomization seed. 12371 12372- bpo-27167: Clarify the subprocess.CalledProcessError error message text 12373 when the child process died due to a signal. 12374 12375- bpo-25931: Don't define socketserver.Forking* names on platforms such as 12376 Windows that do not support os.fork(). 12377 12378- bpo-21776: distutils.upload now correctly handles HTTPError. Initial patch 12379 by Claudiu Popa. 12380 12381- bpo-26526: Replace custom parse tree validation in the parser module with 12382 a simple DFA validator. 12383 12384- bpo-27114: Fix SSLContext._load_windows_store_certs fails with 12385 PermissionError 12386 12387- bpo-18383: Avoid creating duplicate filters when using filterwarnings and 12388 simplefilter. Based on patch by Alex Shkop. 12389 12390- bpo-23026: winreg.QueryValueEx() now return an integer for REG_QWORD type. 12391 12392- bpo-26741: subprocess.Popen destructor now emits a ResourceWarning warning 12393 if the child process is still running. 12394 12395- bpo-27056: Optimize pickle.load() and pickle.loads(), up to 10% faster to 12396 deserialize a lot of small objects. 12397 12398- bpo-21271: New keyword only parameters in reset_mock call. 12399 12400IDLE 12401---- 12402 12403- bpo-5124: Paste with text selected now replaces the selection on X11. This 12404 matches how paste works on Windows, Mac, most modern Linux apps, and ttk 12405 widgets. Original patch by Serhiy Storchaka. 12406 12407- bpo-24750: Switch all scrollbars in IDLE to ttk versions. Where needed, 12408 minimal tests are added to cover changes. 12409 12410- bpo-24759: IDLE requires tk 8.5 and availability ttk widgets. Delete now 12411 unneeded tk version tests and code for older versions. Add test for IDLE 12412 syntax colorizer. 12413 12414- bpo-27239: idlelib.macosx.isXyzTk functions initialize as needed. 12415 12416- bpo-27262: move Aqua unbinding code, which enable context menus, to 12417 macosx. 12418 12419- bpo-24759: Make clear in idlelib.idle_test.__init__ that the directory is 12420 a private implementation of test.test_idle and tool for maintainers. 12421 12422- bpo-27196: Stop 'ThemeChanged' warnings when running IDLE tests. These 12423 persisted after other warnings were suppressed in #20567. Apply Serhiy 12424 Storchaka's update_idletasks solution to four test files. Record this 12425 additional advice in idle_test/README.txt 12426 12427- bpo-20567: Revise idle_test/README.txt with advice about avoiding tk 12428 warning messages from tests. Apply advice to several IDLE tests. 12429 12430- bpo-24225: Update idlelib/README.txt with new file names and event 12431 handlers. 12432 12433- bpo-27156: Remove obsolete code not used by IDLE. 12434 12435- bpo-27117: Make colorizer htest and turtledemo work with dark themes. Move 12436 code for configuring text widget colors to a new function. 12437 12438- bpo-24225: Rename many `idlelib/*.py` and `idle_test/test_*.py` files. 12439 Edit files to replace old names with new names when the old name referred 12440 to the module rather than the class it contained. See the issue and IDLE 12441 section in What's New in 3.6 for more. 12442 12443- bpo-26673: When tk reports font size as 0, change to size 10. Such fonts 12444 on Linux prevented the configuration dialog from opening. 12445 12446- bpo-21939: Add test for IDLE's percolator. Original patch by Saimadhav 12447 Heblikar. 12448 12449- bpo-21676: Add test for IDLE's replace dialog. Original patch by Saimadhav 12450 Heblikar. 12451 12452- bpo-18410: Add test for IDLE's search dialog. Original patch by Westley 12453 Martínez. 12454 12455- bpo-21703: Add test for undo delegator. Patch mostly by Saimadhav 12456 Heblikar . 12457 12458- bpo-27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks. 12459 12460- bpo-23977: Add more asserts to test_delegator. 12461 12462Documentation 12463------------- 12464 12465- bpo-16484: Change the default PYTHONDOCS URL to "https:", and fix the 12466 resulting links to use lowercase. Patch by Sean Rodman, test by Kaushik 12467 Nadikuditi. 12468 12469- bpo-24136: Document the new PEP 448 unpacking syntax of 3.5. 12470 12471- bpo-22558: Add remaining doc links to source code for Python-coded 12472 modules. Patch by Yoni Lavi. 12473 12474Tests 12475----- 12476 12477- bpo-25285: regrtest now uses subprocesses when the -j1 command line option 12478 is used: each test file runs in a fresh child process. Before, the -j1 12479 option was ignored. 12480 12481- bpo-25285: Tools/buildbot/test.bat script now uses -j1 by default to run 12482 each test file in fresh child process. 12483 12484Windows 12485------- 12486 12487- bpo-27064: The py.exe launcher now defaults to Python 3. The Windows 12488 launcher ``py.exe`` no longer prefers an installed Python 2 version over 12489 Python 3 by default when used interactively. 12490 12491Build 12492----- 12493 12494- bpo-27229: Fix the cross-compiling pgen rule for in-tree builds. Patch by 12495 Xavier de Gaye. 12496 12497- bpo-26930: Update OS X 10.5+ 32-bit-only installer to build and link with 12498 OpenSSL 1.0.2h. 12499 12500Windows 12501------- 12502 12503- bpo-17500: Remove unused and outdated icons. (See also: 12504 https://github.com/python/pythondotorg/issues/945) 12505 12506C API 12507----- 12508 12509- bpo-27186: Add the PyOS_FSPath() function (part of PEP 519). 12510 12511- bpo-26282: PyArg_ParseTupleAndKeywords() now supports positional-only 12512 parameters. 12513 12514Tools/Demos 12515----------- 12516 12517- bpo-26282: Argument Clinic now supports positional-only and keyword 12518 parameters in the same function. 12519 12520 12521What's New in Python 3.6.0 alpha 1? 12522=================================== 12523 12524*Release date: 2016-05-16* 12525 12526Core and Builtins 12527----------------- 12528 12529- bpo-20041: Fixed TypeError when frame.f_trace is set to None. Patch by 12530 Xavier de Gaye. 12531 12532- bpo-26168: Fixed possible refleaks in failing Py_BuildValue() with the "N" 12533 format unit. 12534 12535- bpo-26991: Fix possible refleak when creating a function with annotations. 12536 12537- bpo-27039: Fixed bytearray.remove() for values greater than 127. Based on 12538 patch by Joe Jevnik. 12539 12540- bpo-23640: int.from_bytes() no longer bypasses constructors for 12541 subclasses. 12542 12543- bpo-27005: Optimized the float.fromhex() class method for exact float. It 12544 is now 2 times faster. 12545 12546- bpo-18531: Single var-keyword argument of dict subtype was passed 12547 unscathed to the C-defined function. Now it is converted to exact dict. 12548 12549- bpo-26811: gc.get_objects() no longer contains a broken tuple with NULL 12550 pointer. 12551 12552- bpo-20120: Use RawConfigParser for .pypirc parsing, removing support for 12553 interpolation unintentionally added with move to Python 3. Behavior no 12554 longer does any interpolation in .pypirc files, matching behavior in 12555 Python 2.7 and Setuptools 19.0. 12556 12557- bpo-26249: Memory functions of the :c:func:`PyMem_Malloc` domain 12558 (:c:data:`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc allocator 12559 <pymalloc>` rather than system :c:func:`malloc`. Applications calling 12560 :c:func:`PyMem_Malloc` without holding the GIL can now crash: use 12561 ``PYTHONMALLOC=debug`` environment variable to validate the usage of 12562 memory allocators in your application. 12563 12564- bpo-26802: Optimize function calls only using unpacking like 12565 ``func(*tuple)`` (no other positional argument, no keyword): avoid copying 12566 the tuple. Patch written by Joe Jevnik. 12567 12568- bpo-26659: Make the builtin slice type support cycle collection. 12569 12570- bpo-26718: super.__init__ no longer leaks memory if called multiple times. 12571 NOTE: A direct call of super.__init__ is not endorsed! 12572 12573- bpo-27138: Fix the doc comment for FileFinder.find_spec(). 12574 12575- bpo-27147: Mention PEP 420 in the importlib docs. 12576 12577- bpo-25339: PYTHONIOENCODING now has priority over locale in setting the 12578 error handler for stdin and stdout. 12579 12580- bpo-26494: Fixed crash on iterating exhausting iterators. Affected classes 12581 are generic sequence iterators, iterators of str, bytes, bytearray, list, 12582 tuple, set, frozenset, dict, OrderedDict, corresponding views and 12583 os.scandir() iterator. 12584 12585- bpo-26574: Optimize ``bytes.replace(b'', b'.')`` and 12586 ``bytearray.replace(b'', b'.')``. Patch written by Josh Snider. 12587 12588- bpo-26581: If coding cookie is specified multiple times on a line in 12589 Python source code file, only the first one is taken to account. 12590 12591- bpo-19711: Add tests for reloading namespace packages. 12592 12593- bpo-21099: Switch applicable importlib tests to use PEP 451 API. 12594 12595- bpo-26563: Debug hooks on Python memory allocators now raise a fatal error 12596 if functions of the :c:func:`PyMem_Malloc` family are called without 12597 holding the GIL. 12598 12599- bpo-26564: On error, the debug hooks on Python memory allocators now use 12600 the :mod:`tracemalloc` module to get the traceback where a memory block 12601 was allocated. 12602 12603- bpo-26558: The debug hooks on Python memory allocator 12604 :c:func:`PyObject_Malloc` now detect when functions are called without 12605 holding the GIL. 12606 12607- bpo-26516: Add :envvar:`PYTHONMALLOC` environment variable to set the 12608 Python memory allocators and/or install debug hooks. 12609 12610- bpo-26516: The :c:func:`PyMem_SetupDebugHooks` function can now also be 12611 used on Python compiled in release mode. 12612 12613- bpo-26516: The :envvar:`PYTHONMALLOCSTATS` environment variable can now 12614 also be used on Python compiled in release mode. It now has no effect if 12615 set to an empty string. 12616 12617- bpo-26516: In debug mode, debug hooks are now also installed on Python 12618 memory allocators when Python is configured without pymalloc. 12619 12620- bpo-26464: Fix str.translate() when string is ASCII and first replacements 12621 removes character, but next replacement uses a non-ASCII character or a 12622 string longer than 1 character. Regression introduced in Python 3.5.0. 12623 12624- bpo-22836: Ensure exception reports from PyErr_Display() and 12625 PyErr_WriteUnraisable() are sensible even when formatting them produces 12626 secondary errors. This affects the reports produced by 12627 sys.__excepthook__() and when __del__() raises an exception. 12628 12629- bpo-26302: Correct behavior to reject comma as a legal character for 12630 cookie names. 12631 12632- bpo-26136: Upgrade the warning when a generator raises StopIteration from 12633 PendingDeprecationWarning to DeprecationWarning. Patch by Anish Shah. 12634 12635- bpo-26204: The compiler now ignores all constant statements: bytes, str, 12636 int, float, complex, name constants (None, False, True), Ellipsis and 12637 ast.Constant; not only str and int. For example, ``1.0`` is now ignored in 12638 ``def f(): 1.0``. 12639 12640- bpo-4806: Avoid masking the original TypeError exception when using star 12641 (``*``) unpacking in function calls. Based on patch by Hagen Fürstenau 12642 and Daniel Urban. 12643 12644- bpo-26146: Add a new kind of AST node: ``ast.Constant``. It can be used by 12645 external AST optimizers, but the compiler does not emit directly such 12646 node. 12647 12648- bpo-23601: Sped-up allocation of dict key objects by using Python's small 12649 object allocator. (Contributed by Julian Taylor.) 12650 12651- bpo-18018: Import raises ImportError instead of SystemError if a relative 12652 import is attempted without a known parent package. 12653 12654- bpo-25843: When compiling code, don't merge constants if they are equal 12655 but have a different types. For example, ``f1, f2 = lambda: 1, lambda: 12656 1.0`` is now correctly compiled to two different functions: ``f1()`` 12657 returns ``1`` (``int``) and ``f2()`` returns ``1.0`` (``float``), even if 12658 ``1`` and ``1.0`` are equal. 12659 12660- bpo-26107: The format of the ``co_lnotab`` attribute of code objects 12661 changes to support negative line number delta. 12662 12663- bpo-26154: Add a new private _PyThreadState_UncheckedGet() function to get 12664 the current Python thread state, but don't issue a fatal error if it is 12665 NULL. This new function must be used instead of accessing directly the 12666 _PyThreadState_Current variable. The variable is no more exposed since 12667 Python 3.5.1 to hide the exact implementation of atomic C types, to avoid 12668 compiler issues. 12669 12670- bpo-25791: If __package__ != __spec__.parent or if neither __package__ or 12671 __spec__ are defined then ImportWarning is raised. 12672 12673- bpo-22995: [UPDATE] Comment out the one of the pickleability tests in 12674 _PyObject_GetState() due to regressions observed in Cython-based projects. 12675 12676- bpo-25961: Disallowed null characters in the type name. 12677 12678- bpo-25973: Fix segfault when an invalid nonlocal statement binds a name 12679 starting with two underscores. 12680 12681- bpo-22995: Instances of extension types with a state that aren't 12682 subclasses of list or dict and haven't implemented any pickle-related 12683 methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or 12684 __getstate__), can no longer be pickled. Including memoryview. 12685 12686- bpo-20440: Massive replacing unsafe attribute setting code with special 12687 macro Py_SETREF. 12688 12689- bpo-25766: Special method __bytes__() now works in str subclasses. 12690 12691- bpo-25421: __sizeof__ methods of builtin types now use dynamic basic size. 12692 This allows sys.getsize() to work correctly with their subclasses with 12693 __slots__ defined. 12694 12695- bpo-25709: Fixed problem with in-place string concatenation and utf-8 12696 cache. 12697 12698- bpo-5319: New Py_FinalizeEx() API allowing Python to set an exit status of 12699 120 on failure to flush buffered streams. 12700 12701- bpo-25485: telnetlib.Telnet is now a context manager. 12702 12703- bpo-24097: Fixed crash in object.__reduce__() if slot name is freed inside 12704 __getattr__. 12705 12706- bpo-24731: Fixed crash on converting objects with special methods 12707 __bytes__, __trunc__, and __float__ returning instances of subclasses of 12708 bytes, int, and float to subclasses of bytes, int, and float 12709 correspondingly. 12710 12711- bpo-25630: Fix a possible segfault during argument parsing in functions 12712 that accept filesystem paths. 12713 12714- bpo-23564: Fixed a partially broken sanity check in the _posixsubprocess 12715 internals regarding how fds_to_pass were passed to the child. The bug had 12716 no actual impact as subprocess.py already avoided it. 12717 12718- bpo-25388: Fixed tokenizer crash when processing undecodable source code 12719 with a null byte. 12720 12721- bpo-25462: The hash of the key now is calculated only once in most 12722 operations in C implementation of OrderedDict. 12723 12724- bpo-22995: Default implementation of __reduce__ and __reduce_ex__ now 12725 rejects builtin types with not defined __new__. 12726 12727- bpo-24802: Avoid buffer overreads when int(), float(), compile(), exec() 12728 and eval() are passed bytes-like objects. These objects are not 12729 necessarily terminated by a null byte, but the functions assumed they 12730 were. 12731 12732- bpo-25555: Fix parser and AST: fill lineno and col_offset of "arg" node 12733 when compiling AST from Python objects. 12734 12735- bpo-24726: Fixed a crash and leaking NULL in repr() of OrderedDict that 12736 was mutated by direct calls of dict methods. 12737 12738- bpo-25449: Iterating OrderedDict with keys with unstable hash now raises 12739 KeyError in C implementations as well as in Python implementation. 12740 12741- bpo-25395: Fixed crash when highly nested OrderedDict structures were 12742 garbage collected. 12743 12744- bpo-25401: Optimize bytes.fromhex() and bytearray.fromhex(): they are now 12745 between 2x and 3.5x faster. 12746 12747- bpo-25399: Optimize bytearray % args using the new private _PyBytesWriter 12748 API. Formatting is now between 2.5 and 5 times faster. 12749 12750- bpo-25274: sys.setrecursionlimit() now raises a RecursionError if the new 12751 recursion limit is too low depending at the current recursion depth. 12752 Modify also the "lower-water mark" formula to make it monotonic. This mark 12753 is used to decide when the overflowed flag of the thread state is reset. 12754 12755- bpo-24402: Fix input() to prompt to the redirected stdout when 12756 sys.stdout.fileno() fails. 12757 12758- bpo-25349: Optimize bytes % args using the new private _PyBytesWriter API. 12759 Formatting is now up to 2 times faster. 12760 12761- bpo-24806: Prevent builtin types that are not allowed to be subclassed 12762 from being subclassed through multiple inheritance. 12763 12764- bpo-25301: The UTF-8 decoder is now up to 15 times as fast for error 12765 handlers: ``ignore``, ``replace`` and ``surrogateescape``. 12766 12767- bpo-24848: Fixed a number of bugs in UTF-7 decoding of misformed data. 12768 12769- bpo-25267: The UTF-8 encoder is now up to 75 times as fast for error 12770 handlers: ``ignore``, ``replace``, ``surrogateescape``, ``surrogatepass``. 12771 Patch co-written with Serhiy Storchaka. 12772 12773- bpo-25280: Import trace messages emitted in verbose (-v) mode are no 12774 longer formatted twice. 12775 12776- bpo-25227: Optimize ASCII and latin1 encoders with the ``surrogateescape`` 12777 error handler: the encoders are now up to 3 times as fast. Initial patch 12778 written by Serhiy Storchaka. 12779 12780- bpo-25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom() 12781 function instead of the getentropy() function. The getentropy() function 12782 is blocking to generate very good quality entropy, os.urandom() doesn't 12783 need such high-quality entropy. 12784 12785- bpo-9232: Modify Python's grammar to allow trailing commas in the argument 12786 list of a function declaration. For example, "def f(\*, a = 3,): pass" is 12787 now legal. Patch from Mark Dickinson. 12788 12789- bpo-24965: Implement PEP 498 "Literal String Interpolation". This allows 12790 you to embed expressions inside f-strings, which are converted to normal 12791 strings at run time. Given x=3, then f'value={x}' == 'value=3'. Patch by 12792 Eric V. Smith. 12793 12794- bpo-26478: Fix semantic bugs when using binary operators with dictionary 12795 views and tuples. 12796 12797- bpo-26171: Fix possible integer overflow and heap corruption in 12798 zipimporter.get_data(). 12799 12800- bpo-25660: Fix TAB key behaviour in REPL with readline. 12801 12802- bpo-26288: Optimize PyLong_AsDouble. 12803 12804- bpo-26289: Optimize floor and modulo division for single-digit longs. 12805 Microbenchmarks show 2-2.5x improvement. Built-in 'divmod' function is 12806 now also ~10% faster. (See also: bpo-26315) 12807 12808- bpo-25887: Raise a RuntimeError when a coroutine object is awaited more 12809 than once. 12810 12811Library 12812------- 12813 12814- bpo-27057: Fix os.set_inheritable() on Android, ioctl() is blocked by 12815 SELinux and fails with EACCESS. The function now falls back to fcntl(). 12816 Patch written by Michał Bednarski. 12817 12818- bpo-27014: Fix infinite recursion using typing.py. Thanks to Kalle Tuure! 12819 12820- bpo-27031: Removed dummy methods in Tkinter widget classes: tk_menuBar() 12821 and tk_bindForTraversal(). 12822 12823- bpo-14132: Fix urllib.request redirect handling when the target only has a 12824 query string. Original fix by Ján Janech. 12825 12826- bpo-17214: The "urllib.request" module now percent-encodes non-ASCII bytes 12827 found in redirect target URLs. Some servers send Location header fields 12828 with non-ASCII bytes, but "http.client" requires the request target to be 12829 ASCII-encodable, otherwise a UnicodeEncodeError is raised. Based on patch 12830 by Christian Heimes. 12831 12832- bpo-27033: The default value of the decode_data parameter for 12833 smtpd.SMTPChannel and smtpd.SMTPServer constructors is changed to False. 12834 12835- bpo-27034: Removed deprecated class asynchat.fifo. 12836 12837- bpo-26870: Added readline.set_auto_history(), which can stop entries being 12838 automatically added to the history list. Based on patch by Tyler 12839 Crompton. 12840 12841- bpo-26039: zipfile.ZipFile.open() can now be used to write data into a ZIP 12842 file, as well as for extracting data. Patch by Thomas Kluyver. 12843 12844- bpo-26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch 12845 contributed by Chi Hsuan Yen. 12846 12847- bpo-22274: In the subprocess module, allow stderr to be redirected to 12848 stdout even when stdout is not redirected. Patch by Akira Li. 12849 12850- bpo-26807: mock_open 'files' no longer error on readline at end of file. 12851 Patch from Yolanda Robla. 12852 12853- bpo-25745: Fixed leaking a userptr in curses panel destructor. 12854 12855- bpo-26977: Removed unnecessary, and ignored, call to sum of squares helper 12856 in statistics.pvariance. 12857 12858- bpo-26002: Use bisect in statistics.median instead of a linear search. 12859 Patch by Upendra Kuma. 12860 12861- bpo-25974: Make use of new Decimal.as_integer_ratio() method in statistics 12862 module. Patch by Stefan Krah. 12863 12864- bpo-26996: Add secrets module as described in PEP 506. 12865 12866- bpo-26881: The modulefinder module now supports extended opcode arguments. 12867 12868- bpo-23815: Fixed crashes related to directly created instances of types in 12869 _tkinter and curses.panel modules. 12870 12871- bpo-17765: weakref.ref() no longer silently ignores keyword arguments. 12872 Patch by Georg Brandl. 12873 12874- bpo-26873: xmlrpc now raises ResponseError on unsupported type tags 12875 instead of silently return incorrect result. 12876 12877- bpo-26915: The __contains__ methods in the collections ABCs now check for 12878 identity before checking equality. This better matches the behavior of 12879 the concrete classes, allows sensible handling of NaNs, and makes it 12880 easier to reason about container invariants. 12881 12882- bpo-26711: Fixed the comparison of plistlib.Data with other types. 12883 12884- bpo-24114: Fix an uninitialized variable in `ctypes.util`. 12885 12886 The bug only occurs on SunOS when the ctypes implementation searches for 12887 the `crle` program. Patch by Xiang Zhang. Tested on SunOS by Kees Bos. 12888 12889- bpo-26864: In urllib.request, change the proxy bypass host checking 12890 against no_proxy to be case-insensitive, and to not match unrelated host 12891 names that happen to have a bypassed hostname as a suffix. Patch by Xiang 12892 Zhang. 12893 12894- bpo-24902: Print server URL on http.server startup. Initial patch by 12895 Felix Kaiser. 12896 12897- bpo-25788: fileinput.hook_encoded() now supports an "errors" argument for 12898 passing to open. Original patch by Joseph Hackman. 12899 12900- bpo-26634: recursive_repr() now sets __qualname__ of wrapper. Patch by 12901 Xiang Zhang. 12902 12903- bpo-26804: urllib.request will prefer lower_case proxy environment 12904 variables over UPPER_CASE or Mixed_Case ones. Patch contributed by 12905 Hans-Peter Jansen. 12906 12907- bpo-26837: assertSequenceEqual() now correctly outputs non-stringified 12908 differing items (like bytes in the -b mode). This affects 12909 assertListEqual() and assertTupleEqual(). 12910 12911- bpo-26041: Remove "will be removed in Python 3.7" from deprecation 12912 messages of platform.dist() and platform.linux_distribution(). Patch by 12913 Kumaripaba Miyurusara Athukorala. 12914 12915- bpo-26822: itemgetter, attrgetter and methodcaller objects no longer 12916 silently ignore keyword arguments. 12917 12918- bpo-26733: Disassembling a class now disassembles class and static 12919 methods. Patch by Xiang Zhang. 12920 12921- bpo-26801: Fix error handling in :func:`shutil.get_terminal_size`, catch 12922 :exc:`AttributeError` instead of :exc:`NameError`. Patch written by 12923 Emanuel Barry. 12924 12925- bpo-24838: tarfile's ustar and gnu formats now correctly calculate name 12926 and link field limits for multibyte character encodings like utf-8. 12927 12928Security 12929-------- 12930 12931- bpo-26657: Fix directory traversal vulnerability with http.server on 12932 Windows. This fixes a regression that was introduced in 3.3.4rc1 and 12933 3.4.0rc1. Based on patch by Philipp Hagemeister. 12934 12935Library 12936------- 12937 12938- bpo-26717: Stop encoding Latin-1-ized WSGI paths with UTF-8. Patch by 12939 Anthony Sottile. 12940 12941- bpo-26782: Add STARTUPINFO to subprocess.__all__ on Windows. 12942 12943- bpo-26404: Add context manager to socketserver. Patch by Aviv Palivoda. 12944 12945- bpo-26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading 12946 more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of 12947 1024 bytes per call. 12948 12949- bpo-26585: Eliminate http.server._quote_html() and use 12950 html.escape(quote=False). Patch by Xiang Zhang. 12951 12952- bpo-26685: Raise OSError if closing a socket fails. 12953 12954- bpo-16329: Add .webm to mimetypes.types_map. Patch by Giampaolo Rodola'. 12955 12956- bpo-13952: Add .csv to mimetypes.types_map. Patch by Geoff Wilson. 12957 12958- bpo-26587: the site module now allows .pth files to specify files to be 12959 added to sys.path (e.g. zip files). 12960 12961- bpo-25609: Introduce contextlib.AbstractContextManager and 12962 typing.ContextManager. 12963 12964- bpo-26709: Fixed Y2038 problem in loading binary PLists. 12965 12966- bpo-23735: Handle terminal resizing with Readline 6.3+ by installing our 12967 own SIGWINCH handler. Patch by Eric Price. 12968 12969- bpo-25951: Change SSLSocket.sendall() to return None, as explicitly 12970 documented for plain socket objects. Patch by Aviv Palivoda. 12971 12972- bpo-26586: In http.server, respond with "413 Request header fields too 12973 large" if there are too many header fields to parse, rather than killing 12974 the connection and raising an unhandled exception. Patch by Xiang Zhang. 12975 12976- bpo-26676: Added missing XMLPullParser to ElementTree.__all__. 12977 12978- bpo-22854: Change BufferedReader.writable() and BufferedWriter.readable() 12979 to always return False. 12980 12981- bpo-26492: Exhausted iterator of array.array now conforms with the 12982 behavior of iterators of other mutable sequences: it lefts exhausted even 12983 if iterated array is extended. 12984 12985- bpo-26641: doctest.DocFileTest and doctest.testfile() now support packages 12986 (module splitted into multiple directories) for the package parameter. 12987 12988- bpo-25195: Fix a regression in mock.MagicMock. _Call is a subclass of 12989 tuple (changeset 3603bae63c13 only works for classes) so we need to 12990 implement __ne__ ourselves. Patch by Andrew Plummer. 12991 12992- bpo-26644: Raise ValueError rather than SystemError when a negative length 12993 is passed to SSLSocket.recv() or read(). 12994 12995- bpo-23804: Fix SSL recv(0) and read(0) methods to return zero bytes 12996 instead of up to 1024. 12997 12998- bpo-26616: Fixed a bug in datetime.astimezone() method. 12999 13000- bpo-26637: The :mod:`importlib` module now emits an :exc:`ImportError` 13001 rather than a :exc:`TypeError` if :func:`__import__` is tried during the 13002 Python shutdown process but :data:`sys.path` is already cleared (set to 13003 ``None``). 13004 13005- bpo-21925: :func:`warnings.formatwarning` now catches exceptions when 13006 calling :func:`linecache.getline` and 13007 :func:`tracemalloc.get_object_traceback` to be able to log 13008 :exc:`ResourceWarning` emitted late during the Python shutdown process. 13009 13010- bpo-23848: On Windows, faulthandler.enable() now also installs an 13011 exception handler to dump the traceback of all Python threads on any 13012 Windows exception, not only on UNIX signals (SIGSEGV, SIGFPE, SIGABRT). 13013 13014- bpo-26530: Add C functions :c:func:`_PyTraceMalloc_Track` and 13015 :c:func:`_PyTraceMalloc_Untrack` to track memory blocks using the 13016 :mod:`tracemalloc` module. Add :c:func:`_PyTraceMalloc_GetTraceback` to 13017 get the traceback of an object. 13018 13019- bpo-26588: The _tracemalloc now supports tracing memory allocations of 13020 multiple address spaces (domains). 13021 13022- bpo-24266: Ctrl+C during Readline history search now cancels the search 13023 mode when compiled with Readline 7. 13024 13025- bpo-26590: Implement a safe finalizer for the _socket.socket type. It now 13026 releases the GIL to close the socket. 13027 13028- bpo-18787: spwd.getspnam() now raises a PermissionError if the user 13029 doesn't have privileges. 13030 13031- bpo-26560: Avoid potential ValueError in BaseHandler.start_response. 13032 Initial patch by Peter Inglesby. 13033 13034- bpo-26567: Add a new function :c:func:`PyErr_ResourceWarning` function to 13035 pass the destroyed object. Add a *source* attribute to 13036 :class:`warnings.WarningMessage`. Add warnings._showwarnmsg() which uses 13037 tracemalloc to get the traceback where source object was allocated. 13038 13039Security 13040-------- 13041 13042- bpo-26313: ssl.py _load_windows_store_certs fails if windows cert store is 13043 empty. Patch by Baji. 13044 13045Library 13046------- 13047 13048- bpo-26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex` 13049 to support importing packages. 13050 13051- bpo-26499: Account for remaining Content-Length in HTTPResponse.readline() 13052 and read1(). Based on patch by Silent Ghost. Also document that 13053 HTTPResponse now supports these methods. 13054 13055- bpo-25320: Handle sockets in directories unittest discovery is scanning. 13056 Patch from Victor van den Elzen. 13057 13058- bpo-16181: cookiejar.http2time() now returns None if year is higher than 13059 datetime.MAXYEAR. 13060 13061- bpo-26513: Fixes platform module detection of Windows Server 13062 13063- bpo-23718: Fixed parsing time in week 0 before Jan 1. Original patch by 13064 Tamás Bence Gedai. 13065 13066- bpo-26323: Add Mock.assert_called() and Mock.assert_called_once() methods 13067 to unittest.mock. Patch written by Amit Saha. 13068 13069- bpo-20589: Invoking Path.owner() and Path.group() on Windows now raise 13070 NotImplementedError instead of ImportError. 13071 13072- bpo-26177: Fixed the keys() method for Canvas and Scrollbar widgets. 13073 13074- bpo-15068: Got rid of excessive buffering in fileinput. The bufsize 13075 parameter is now deprecated and ignored. 13076 13077- bpo-19475: Added an optional argument timespec to the datetime isoformat() 13078 method to choose the precision of the time component. 13079 13080- bpo-2202: Fix UnboundLocalError in 13081 AbstractDigestAuthHandler.get_algorithm_impls. Initial patch by Mathieu 13082 Dupuy. 13083 13084- bpo-26167: Minimized overhead in copy.copy() and copy.deepcopy(). 13085 Optimized copying and deepcopying bytearrays, NotImplemented, slices, 13086 short lists, tuples, dicts, sets. 13087 13088- bpo-25718: Fixed pickling and copying the accumulate() iterator with total 13089 is None. 13090 13091- bpo-26475: Fixed debugging output for regular expressions with the (?x) 13092 flag. 13093 13094- bpo-26482: Allowed pickling recursive dequeues. 13095 13096- bpo-26335: Make mmap.write() return the number of bytes written like other 13097 write methods. Patch by Jakub Stasiak. 13098 13099- bpo-26457: Fixed the subnets() methods in IP network classes for the case 13100 when resulting prefix length is equal to maximal prefix length. Based on 13101 patch by Xiang Zhang. 13102 13103- bpo-26385: Remove the file if the internal open() call in 13104 NamedTemporaryFile() fails. Patch by Silent Ghost. 13105 13106- bpo-26402: Fix XML-RPC client to retry when the server shuts down a 13107 persistent connection. This was a regression related to the new 13108 http.client.RemoteDisconnected exception in 3.5.0a4. 13109 13110- bpo-25913: Leading ``<~`` is optional now in base64.a85decode() with 13111 adobe=True. Patch by Swati Jaiswal. 13112 13113- bpo-26186: Remove an invalid type check in importlib.util.LazyLoader. 13114 13115- bpo-26367: importlib.__import__() raises ImportError like 13116 builtins.__import__() when ``level`` is specified but without an 13117 accompanying package specified. 13118 13119- bpo-26309: In the "socketserver" module, shut down the request (closing 13120 the connected socket) when verify_request() returns false. Patch by Aviv 13121 Palivoda. 13122 13123- bpo-23430: Change the socketserver module to only catch exceptions raised 13124 from a request handler that are derived from Exception (instead of 13125 BaseException). Therefore SystemExit and KeyboardInterrupt no longer 13126 trigger the handle_error() method, and will now to stop a single-threaded 13127 server. 13128 13129Security 13130-------- 13131 13132- bpo-25939: On Windows open the cert store readonly in 13133 ssl.enum_certificates. 13134 13135Library 13136------- 13137 13138- bpo-25995: os.walk() no longer uses FDs proportional to the tree depth. 13139 13140- bpo-25994: Added the close() method and the support of the context manager 13141 protocol for the os.scandir() iterator. 13142 13143- bpo-23992: multiprocessing: make MapResult not fail-fast upon exception. 13144 13145- bpo-26243: Support keyword arguments to zlib.compress(). Patch by Aviv 13146 Palivoda. 13147 13148- bpo-26117: The os.scandir() iterator now closes file descriptor not only 13149 when the iteration is finished, but when it was failed with error. 13150 13151- bpo-25949: __dict__ for an OrderedDict instance is now created only when 13152 needed. 13153 13154- bpo-25911: Restored support of bytes paths in os.walk() on Windows. 13155 13156- bpo-26045: Add UTF-8 suggestion to error message when posting a 13157 non-Latin-1 string with http.client. 13158 13159- bpo-26039: Added zipfile.ZipInfo.from_file() and zipinfo.ZipInfo.is_dir(). 13160 Patch by Thomas Kluyver. 13161 13162- bpo-12923: Reset FancyURLopener's redirect counter even if there is an 13163 exception. Based on patches by Brian Brazil and Daniel Rocco. 13164 13165- bpo-25945: Fixed a crash when unpickle the functools.partial object with 13166 wrong state. Fixed a leak in failed functools.partial constructor. "args" 13167 and "keywords" attributes of functools.partial have now always types tuple 13168 and dict correspondingly. 13169 13170- bpo-26202: copy.deepcopy() now correctly copies range() objects with 13171 non-atomic attributes. 13172 13173- bpo-23076: Path.glob() now raises a ValueError if it's called with an 13174 invalid pattern. Patch by Thomas Nyberg. 13175 13176- bpo-19883: Fixed possible integer overflows in zipimport. 13177 13178- bpo-26227: On Windows, getnameinfo(), gethostbyaddr() and 13179 gethostbyname_ex() functions of the socket module now decode the hostname 13180 from the ANSI code page rather than UTF-8. 13181 13182- bpo-26099: The site module now writes an error into stderr if 13183 sitecustomize module can be imported but executing the module raise an 13184 ImportError. Same change for usercustomize. 13185 13186- bpo-26147: xmlrpc now works with strings not encodable with used non-UTF-8 13187 encoding. 13188 13189- bpo-25935: Garbage collector now breaks reference loops with OrderedDict. 13190 13191- bpo-16620: Fixed AttributeError in msilib.Directory.glob(). 13192 13193- bpo-26013: Added compatibility with broken protocol 2 pickles created in 13194 old Python 3 versions (3.4.3 and lower). 13195 13196- bpo-26129: Deprecated accepting non-integers in grp.getgrgid(). 13197 13198- bpo-25850: Use cross-compilation by default for 64-bit Windows. 13199 13200- bpo-25822: Add docstrings to the fields of urllib.parse results. Patch 13201 contributed by Swati Jaiswal. 13202 13203- bpo-22642: Convert trace module option parsing mechanism to argparse. 13204 Patch contributed by SilentGhost. 13205 13206- bpo-24705: Fix sysconfig._parse_makefile not expanding ${} vars appearing 13207 before $() vars. 13208 13209- bpo-26069: Remove the deprecated apis in the trace module. 13210 13211- bpo-22138: Fix mock.patch behavior when patching descriptors. Restore 13212 original values after patching. Patch contributed by Sean McCully. 13213 13214- bpo-25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode 13215 option if it is safe to do so. 13216 13217- bpo-26012: Don't traverse into symlinks for ``**`` pattern in 13218 pathlib.Path.[r]glob(). 13219 13220- bpo-24120: Ignore PermissionError when traversing a tree with 13221 pathlib.Path.[r]glob(). Patch by Ulrich Petri. 13222 13223- bpo-21815: Accept ] characters in the data portion of imap responses, in 13224 order to handle the flags with square brackets accepted and produced by 13225 servers such as gmail. 13226 13227- bpo-25447: fileinput now uses sys.stdin as-is if it does not have a buffer 13228 attribute (restores backward compatibility). 13229 13230- bpo-25971: Optimized creating Fractions from floats by 2 times and from 13231 Decimals by 3 times. 13232 13233- bpo-25802: Document as deprecated the remaining implementations of 13234 importlib.abc.Loader.load_module(). 13235 13236- bpo-25928: Add Decimal.as_integer_ratio(). 13237 13238- bpo-25447: Copying the lru_cache() wrapper object now always works, 13239 independently from the type of the wrapped object (by returning the 13240 original object unchanged). 13241 13242- bpo-25768: Have the functions in compileall return booleans instead of 13243 ints and add proper documentation and tests for the return values. 13244 13245- bpo-24103: Fixed possible use after free in ElementTree.XMLPullParser. 13246 13247- bpo-25860: os.fwalk() no longer skips remaining directories when error 13248 occurs. Original patch by Samson Lee. 13249 13250- bpo-25914: Fixed and simplified OrderedDict.__sizeof__. 13251 13252- bpo-25869: Optimized deepcopying ElementTree; it is now 20 times faster. 13253 13254- bpo-25873: Optimized iterating ElementTree. Iterating elements 13255 Element.iter() is now 40% faster, iterating text Element.itertext() is now 13256 up to 2.5 times faster. 13257 13258- bpo-25902: Fixed various refcount issues in ElementTree iteration. 13259 13260- bpo-22227: The TarFile iterator is reimplemented using generator. This 13261 implementation is simpler that using class. 13262 13263- bpo-25638: Optimized ElementTree.iterparse(); it is now 2x faster. 13264 Optimized ElementTree parsing; it is now 10% faster. 13265 13266- bpo-25761: Improved detecting errors in broken pickle data. 13267 13268- bpo-25717: Restore the previous behaviour of tolerating most fstat() 13269 errors when opening files. This was a regression in 3.5a1, and stopped 13270 anonymous temporary files from working in special cases. 13271 13272- bpo-24903: Fix regression in number of arguments compileall accepts when 13273 '-d' is specified. The check on the number of arguments has been dropped 13274 completely as it never worked correctly anyway. 13275 13276- bpo-25764: In the subprocess module, preserve any exception caused by 13277 fork() failure when preexec_fn is used. 13278 13279- bpo-25771: Tweak the exception message for importlib.util.resolve_name() 13280 when 'package' isn't specified but necessary. 13281 13282- bpo-6478: _strptime's regexp cache now is reset after changing timezone 13283 with time.tzset(). 13284 13285- bpo-14285: When executing a package with the "python -m package" option, 13286 and package initialization fails, a proper traceback is now reported. The 13287 "runpy" module now lets exceptions from package initialization pass back 13288 to the caller, rather than raising ImportError. 13289 13290- bpo-19771: Also in runpy and the "-m" option, omit the irrelevant message 13291 ". . . is a package and cannot be directly executed" if the package could 13292 not even be initialized (e.g. due to a bad ``*.pyc`` file). 13293 13294- bpo-25177: Fixed problem with the mean of very small and very large 13295 numbers. As a side effect, statistics.mean and statistics.variance should 13296 be significantly faster. 13297 13298- bpo-25718: Fixed copying object with state with boolean value is false. 13299 13300- bpo-10131: Fixed deep copying of minidom documents. Based on patch by 13301 Marian Ganisin. 13302 13303- bpo-7990: dir() on ElementTree.Element now lists properties: "tag", 13304 "text", "tail" and "attrib". Original patch by Santoso Wijaya. 13305 13306- bpo-25725: Fixed a reference leak in pickle.loads() when unpickling 13307 invalid data including tuple instructions. 13308 13309- bpo-25663: In the Readline completer, avoid listing duplicate global 13310 names, and search the global namespace before searching builtins. 13311 13312- bpo-25688: Fixed file leak in ElementTree.iterparse() raising an error. 13313 13314- bpo-23914: Fixed SystemError raised by unpickler on broken pickle data. 13315 13316- bpo-25691: Fixed crash on deleting ElementTree.Element attributes. 13317 13318- bpo-25624: ZipFile now always writes a ZIP_STORED header for directory 13319 entries. Patch by Dingyuan Wang. 13320 13321- bpo-25626: Change three zlib functions to accept sizes that fit in 13322 Py_ssize_t, but internally cap those sizes to UINT_MAX. This resolves a 13323 regression in 3.5 where GzipFile.read() failed to read chunks larger than 13324 2 or 4 GiB. The change affects the zlib.Decompress.decompress() 13325 max_length parameter, the zlib.decompress() bufsize parameter, and the 13326 zlib.Decompress.flush() length parameter. 13327 13328- bpo-25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True) 13329 when the OS gives priority to errors such as EACCES over EEXIST. 13330 13331- bpo-25593: Change semantics of EventLoop.stop() in asyncio. 13332 13333- bpo-6973: When we know a subprocess.Popen process has died, do not allow 13334 the send_signal(), terminate(), or kill() methods to do anything as they 13335 could potentially signal a different process. 13336 13337- bpo-23883: Added missing APIs to __all__ to match the documented APIs for 13338 the following modules: calendar, csv, enum, fileinput, ftplib, logging, 13339 optparse, tarfile, threading and wave. Also added a 13340 test.support.check__all__() helper. Patches by Jacek Kołodziej, Mauro S. 13341 M. Rodrigues and Joel Taddei. 13342 13343- bpo-25590: In the Readline completer, only call getattr() once per 13344 attribute. Also complete names of attributes such as properties and slots 13345 which are listed by dir() but not yet created on an instance. 13346 13347- bpo-25498: Fix a crash when garbage-collecting ctypes objects created by 13348 wrapping a memoryview. This was a regression made in 3.5a1. Based on 13349 patch by Eryksun. 13350 13351- bpo-25584: Added "escape" to the __all__ list in the glob module. 13352 13353- bpo-25584: Fixed recursive glob() with patterns starting with ``**``. 13354 13355- bpo-25446: Fix regression in smtplib's AUTH LOGIN support. 13356 13357- bpo-18010: Fix the pydoc web server's module search function to handle 13358 exceptions from importing packages. 13359 13360- bpo-25554: Got rid of circular references in regular expression parsing. 13361 13362- bpo-18973: Command-line interface of the calendar module now uses argparse 13363 instead of optparse. 13364 13365- bpo-25510: fileinput.FileInput.readline() now returns b'' instead of '' at 13366 the end if the FileInput was opened with binary mode. Patch by Ryosuke 13367 Ito. 13368 13369- bpo-25503: Fixed inspect.getdoc() for inherited docstrings of properties. 13370 Original patch by John Mark Vandenberg. 13371 13372- bpo-25515: Always use os.urandom as a source of randomness in uuid.uuid4. 13373 13374- bpo-21827: Fixed textwrap.dedent() for the case when largest common 13375 whitespace is a substring of smallest leading whitespace. Based on patch 13376 by Robert Li. 13377 13378- bpo-25447: The lru_cache() wrapper objects now can be copied and pickled 13379 (by returning the original object unchanged). 13380 13381- bpo-25390: typing: Don't crash on Union[str, Pattern]. 13382 13383- bpo-25441: asyncio: Raise error from drain() when socket is closed. 13384 13385- bpo-25410: Cleaned up and fixed minor bugs in C implementation of 13386 OrderedDict. 13387 13388- bpo-25411: Improved Unicode support in SMTPHandler through better use of 13389 the email package. Thanks to user simon04 for the patch. 13390 13391- Move the imp module from a PendingDeprecationWarning to 13392 DeprecationWarning. 13393 13394- bpo-25407: Remove mentions of the formatter module being removed in Python 13395 3.6. 13396 13397- bpo-25406: Fixed a bug in C implementation of OrderedDict.move_to_end() 13398 that caused segmentation fault or hang in iterating after moving several 13399 items to the start of ordered dict. 13400 13401- bpo-25382: pickletools.dis() now outputs implicit memo index for the 13402 MEMOIZE opcode. 13403 13404- bpo-25357: Add an optional newline parameter to binascii.b2a_base64(). 13405 base64.b64encode() uses it to avoid a memory copy. 13406 13407- bpo-24164: Objects that need calling ``__new__`` with keyword arguments, 13408 can now be pickled using pickle protocols older than protocol version 4. 13409 13410- bpo-25364: zipfile now works in threads disabled builds. 13411 13412- bpo-25328: smtpd's SMTPChannel now correctly raises a ValueError if both 13413 decode_data and enable_SMTPUTF8 are set to true. 13414 13415- bpo-16099: RobotFileParser now supports Crawl-delay and Request-rate 13416 extensions. Patch by Nikolay Bogoychev. 13417 13418- bpo-25316: distutils raises OSError instead of DistutilsPlatformError when 13419 MSVC is not installed. 13420 13421- bpo-25380: Fixed protocol for the STACK_GLOBAL opcode in 13422 pickletools.opcodes. 13423 13424- bpo-23972: Updates asyncio datagram create method allowing reuseport and 13425 reuseaddr socket options to be set prior to binding the socket. Mirroring 13426 the existing asyncio create_server method the reuseaddr option for 13427 datagram sockets defaults to True if the O/S is 'posix' (except if the 13428 platform is Cygwin). Patch by Chris Laws. 13429 13430- bpo-25304: Add asyncio.run_coroutine_threadsafe(). This lets you submit a 13431 coroutine to a loop from another thread, returning a 13432 concurrent.futures.Future. By Vincent Michel. 13433 13434- bpo-25232: Fix CGIRequestHandler to split the query from the URL at the 13435 first question mark (?) rather than the last. Patch from Xiang Zhang. 13436 13437- bpo-24657: Prevent CGIRequestHandler from collapsing slashes in the query 13438 part of the URL as if it were a path. Patch from Xiang Zhang. 13439 13440- bpo-25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not 13441 supported. Check if it is supported, it may not be supported on OpenBSD 13442 for example. 13443 13444- bpo-23600: Default implementation of tzinfo.fromutc() was returning wrong 13445 results in some cases. 13446 13447- bpo-25203: Failed readline.set_completer_delims() no longer left the 13448 module in inconsistent state. 13449 13450- bpo-25011: rlcompleter now omits private and special attribute names 13451 unless the prefix starts with underscores. 13452 13453- bpo-25209: rlcompleter now can add a space or a colon after completed 13454 keyword. 13455 13456- bpo-22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'. 13457 13458- bpo-23517: fromtimestamp() and utcfromtimestamp() methods of 13459 datetime.datetime now round microseconds to nearest with ties going to 13460 nearest even integer (ROUND_HALF_EVEN), as round(float), instead of 13461 rounding towards -Infinity (ROUND_FLOOR). 13462 13463- bpo-23552: Timeit now warns when there is substantial (4x) variance 13464 between best and worst times. Patch from Serhiy Storchaka. 13465 13466- bpo-24633: site-packages/README -> README.txt. 13467 13468- bpo-24879: help() and pydoc can now list named tuple fields in the order 13469 they were defined rather than alphabetically. The ordering is determined 13470 by the _fields attribute if present. 13471 13472- bpo-24874: Improve speed of itertools.cycle() and make its pickle more 13473 compact. 13474 13475- Fix crash in itertools.cycle.__setstate__() when the first argument wasn't 13476 a list. 13477 13478- bpo-20059: urllib.parse raises ValueError on all invalid ports. Patch by 13479 Martin Panter. 13480 13481- bpo-24360: Improve __repr__ of argparse.Namespace() for invalid 13482 identifiers. Patch by Matthias Bussonnier. 13483 13484- bpo-23426: run_setup was broken in distutils. Patch from Alexander 13485 Belopolsky. 13486 13487- bpo-13938: 2to3 converts StringTypes to a tuple. Patch from Mark Hammond. 13488 13489- bpo-2091: open() accepted a 'U' mode string containing '+', but 'U' can 13490 only be used with 'r'. Patch from Jeff Balogh and John O'Connor. 13491 13492- bpo-8585: improved tests for zipimporter2. Patch from Mark Lawrence. 13493 13494- bpo-18622: unittest.mock.mock_open().reset_mock would recurse infinitely. 13495 Patch from Nicola Palumbo and Laurent De Buyst. 13496 13497- bpo-24426: Fast searching optimization in regular expressions now works 13498 for patterns that starts with capturing groups. Fast searching 13499 optimization now can't be disabled at compile time. 13500 13501- bpo-23661: unittest.mock side_effects can now be exceptions again. This 13502 was a regression vs Python 3.4. Patch from Ignacio Rossi 13503 13504- bpo-13248: Remove deprecated inspect.getmoduleinfo function. 13505 13506- bpo-25578: Fix (another) memory leak in SSLSocket.getpeercer(). 13507 13508- bpo-25530: Disable the vulnerable SSLv3 protocol by default when creating 13509 ssl.SSLContext. 13510 13511- bpo-25569: Fix memory leak in SSLSocket.getpeercert(). 13512 13513- bpo-25471: Sockets returned from accept() shouldn't appear to be 13514 nonblocking. 13515 13516- bpo-25319: When threading.Event is reinitialized, the underlying condition 13517 should use a regular lock rather than a recursive lock. 13518 13519- Skip getaddrinfo if host is already resolved. Patch by A. Jesse Jiryu 13520 Davis. 13521 13522- bpo-26050: Add asyncio.StreamReader.readuntil() method. Patch by Марк 13523 Коренберг. 13524 13525- bpo-25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X 13526 versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis. 13527 13528- bpo-26406: Avoid unnecessary serialization of getaddrinfo(3) calls on 13529 current versions of OpenBSD and NetBSD. Patch by A. Jesse Jiryu Davis. 13530 13531- bpo-26848: Fix asyncio/subprocess.communicate() to handle empty input. 13532 Patch by Jack O'Connor. 13533 13534- bpo-27040: Add loop.get_exception_handler method 13535 13536- bpo-27041: asyncio: Add loop.create_future method 13537 13538IDLE 13539---- 13540 13541- bpo-20640: Add tests for idlelib.configHelpSourceEdit. Patch by Saimadhav 13542 Heblikar. 13543 13544- In the 'IDLE-console differences' section of the IDLE doc, clarify how 13545 running with IDLE affects sys.modules and the standard streams. 13546 13547- bpo-25507: fix incorrect change in IOBinding that prevented printing. 13548 Augment IOBinding htest to include all major IOBinding functions. 13549 13550- bpo-25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION 13551 MARK in README.txt and open this and NEWS.txt with 'ascii'. Re-encode 13552 CREDITS.txt to utf-8 and open it with 'utf-8'. 13553 13554- bpo-15348: Stop the debugger engine (normally in a user process) before 13555 closing the debugger window (running in the IDLE process). This prevents 13556 the RuntimeErrors that were being caught and ignored. 13557 13558- bpo-24455: Prevent IDLE from hanging when a) closing the shell while the 13559 debugger is active (15347); b) closing the debugger with the [X] button 13560 (15348); and c) activating the debugger when already active (24455). The 13561 patch by Mark Roseman does this by making two changes. 1. Suspend and 13562 resume the gui.interaction method with the tcl vwait mechanism intended 13563 for this purpose (instead of root.mainloop & .quit). 2. In gui.run, allow 13564 any existing interaction to terminate first. 13565 13566- Change 'The program' to 'Your program' in an IDLE 'kill program?' message 13567 to make it clearer that the program referred to is the currently running 13568 user program, not IDLE itself. 13569 13570- bpo-24750: Improve the appearance of the IDLE editor window status bar. 13571 Patch by Mark Roseman. 13572 13573- bpo-25313: Change the handling of new built-in text color themes to better 13574 address the compatibility problem introduced by the addition of IDLE Dark. 13575 Consistently use the revised idleConf.CurrentTheme everywhere in idlelib. 13576 13577- bpo-24782: Extension configuration is now a tab in the IDLE Preferences 13578 dialog rather than a separate dialog. The former tabs are now a sorted 13579 list. Patch by Mark Roseman. 13580 13581- bpo-22726: Re-activate the config dialog help button with some content 13582 about the other buttons and the new IDLE Dark theme. 13583 13584- bpo-24820: IDLE now has an 'IDLE Dark' built-in text color theme. It is 13585 more or less IDLE Classic inverted, with a cobalt blue background. 13586 Strings, comments, keywords, ... are still green, red, orange, ... . To 13587 use it with IDLEs released before November 2015, hit the 'Save as New 13588 Custom Theme' button and enter a new name, such as 'Custom Dark'. The 13589 custom theme will work with any IDLE release, and can be modified. 13590 13591- bpo-25224: README.txt is now an idlelib index for IDLE developers and 13592 curious users. The previous user content is now in the IDLE doc chapter. 13593 'IDLE' now means 'Integrated Development and Learning Environment'. 13594 13595- bpo-24820: Users can now set breakpoint colors in Settings -> Custom 13596 Highlighting. Original patch by Mark Roseman. 13597 13598- bpo-24972: Inactive selection background now matches active selection 13599 background, as configured by users, on all systems. Found items are now 13600 always highlighted on Windows. Initial patch by Mark Roseman. 13601 13602- bpo-24570: Idle: make calltip and completion boxes appear on Macs affected 13603 by a tk regression. Initial patch by Mark Roseman. 13604 13605- bpo-24988: Idle ScrolledList context menus (used in debugger) now work on 13606 Mac Aqua. Patch by Mark Roseman. 13607 13608- bpo-24801: Make right-click for context menu work on Mac Aqua. Patch by 13609 Mark Roseman. 13610 13611- bpo-25173: Associate tkinter messageboxes with a specific widget. For Mac 13612 OSX, make them a 'sheet'. Patch by Mark Roseman. 13613 13614- bpo-25198: Enhance the initial html viewer now used for Idle Help. 13615 Properly indent fixed-pitch text (patch by Mark Roseman). Give code 13616 snippet a very Sphinx-like light blueish-gray background. Re-use initial 13617 width and height set by users for shell and editor. When the Table of 13618 Contents (TOC) menu is used, put the section header at the top of the 13619 screen. 13620 13621- bpo-25225: Condense and rewrite Idle doc section on text colors. 13622 13623- bpo-21995: Explain some differences between IDLE and console Python. 13624 13625- bpo-22820: Explain need for *print* when running file from Idle editor. 13626 13627- bpo-25224: Doc: augment Idle feature list and no-subprocess section. 13628 13629- bpo-25219: Update doc for Idle command line options. Some were missing and 13630 notes were not correct. 13631 13632- bpo-24861: Most of idlelib is private and subject to change. Use 13633 idleib.idle.* to start Idle. See idlelib.__init__.__doc__. 13634 13635- bpo-25199: Idle: add synchronization comments for future maintainers. 13636 13637- bpo-16893: Replace help.txt with help.html for Idle doc display. The new 13638 idlelib/help.html is rstripped Doc/build/html/library/idle.html. It looks 13639 better than help.txt and will better document Idle as released. The 13640 tkinter html viewer that works for this file was written by Rose Roseman. 13641 The now unused EditorWindow.HelpDialog class and helt.txt file are 13642 deprecated. 13643 13644- bpo-24199: Deprecate unused idlelib.idlever with possible removal in 3.6. 13645 13646- bpo-24790: Remove extraneous code (which also create 2 & 3 conflicts). 13647 13648Documentation 13649------------- 13650 13651- bpo-26736: Used HTTPS for external links in the documentation if possible. 13652 13653- bpo-6953: Rework the Readline module documentation to group related 13654 functions together, and add more details such as what underlying Readline 13655 functions and variables are accessed. 13656 13657- bpo-23606: Adds note to ctypes documentation regarding cdll.msvcrt. 13658 13659- bpo-24952: Clarify the default size argument of stack_size() in the 13660 "threading" and "_thread" modules. Patch from Mattip. 13661 13662- bpo-26014: Update 3.x packaging documentation: * "See also" links to the 13663 new docs are now provided in the legacy pages * links to setuptools 13664 documentation have been updated 13665 13666Tests 13667----- 13668 13669- bpo-21916: Added tests for the turtle module. Patch by ingrid, Gregory 13670 Loyse and Jelle Zijlstra. 13671 13672- bpo-26295: When using "python3 -m test --testdir=TESTDIR", regrtest 13673 doesn't add "test." prefix to test module names. 13674 13675- bpo-26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) 13676 was untested. 13677 13678- bpo-26015: Added new tests for pickling iterators of mutable sequences. 13679 13680- bpo-26325: Added test.support.check_no_resource_warning() to check that no 13681 ResourceWarning is emitted. 13682 13683- bpo-25940: Changed test_ssl to use its internal local server more. This 13684 avoids relying on svn.python.org, which recently changed root certificate. 13685 13686- bpo-25616: Tests for OrderedDict are extracted from test_collections into 13687 separate file test_ordered_dict. 13688 13689- bpo-25449: Added tests for OrderedDict subclasses. 13690 13691- bpo-25188: Add -P/--pgo to test.regrtest to suppress error output when 13692 running the test suite for the purposes of a PGO build. Initial patch by 13693 Alecsandru Patrascu. 13694 13695- bpo-22806: Add ``python -m test --list-tests`` command to list tests. 13696 13697- bpo-18174: ``python -m test --huntrleaks ...`` now also checks for leak of 13698 file descriptors. Patch written by Richard Oudkerk. 13699 13700- bpo-25260: Fix ``python -m test --coverage`` on Windows. Remove the list 13701 of ignored directories. 13702 13703- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass 13704 along to regrtest.py. Previously there was a limit of 9. 13705 13706- bpo-26583: Skip test_timestamp_overflow in test_import if bytecode files 13707 cannot be written. 13708 13709Build 13710----- 13711 13712- bpo-21277: Don't try to link _ctypes with a ffi_convenience library. 13713 13714- bpo-26884: Fix linking extension modules for cross builds. Patch by Xavier 13715 de Gaye. 13716 13717- bpo-26932: Fixed support of RTLD_* constants defined as enum values, not 13718 via macros (in particular on Android). Patch by Chi Hsuan Yen. 13719 13720- bpo-22359: Disable the rules for running _freeze_importlib and pgen when 13721 cross-compiling. The output of these programs is normally saved with the 13722 source code anyway, and is still regenerated when doing a native build. 13723 Patch by Xavier de Gaye. 13724 13725- bpo-21668: Link audioop, _datetime, _ctypes_test modules to libm, except 13726 on Mac OS X. Patch written by Chi Hsuan Yen. 13727 13728- bpo-25702: A --with-lto configure option has been added that will enable 13729 link time optimizations at build time during a make profile-opt. Some 13730 compilers and toolchains are known to not produce stable code when using 13731 LTO, be sure to test things thoroughly before relying on it. It can 13732 provide a few % speed up over profile-opt alone. 13733 13734- bpo-26624: Adds validation of ucrtbase[d].dll version with warning for old 13735 versions. 13736 13737- bpo-17603: Avoid error about nonexistent fileblocks.o file by using a 13738 lower-level check for st_blocks in struct stat. 13739 13740- bpo-26079: Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern 13741 Thiel. 13742 13743- bpo-26465: Update Windows builds to use OpenSSL 1.0.2g. 13744 13745- bpo-25348: Added ``--pgo`` and ``--pgo-job`` arguments to 13746 ``PCbuild\build.bat`` for building with Profile-Guided Optimization. The 13747 old ``PCbuild\build_pgo.bat`` script is removed. 13748 13749- bpo-25827: Add support for building with ICC to ``configure``, including a 13750 new ``--with-icc`` flag. 13751 13752- bpo-25696: Fix installation of Python on UNIX with make -j9. 13753 13754- bpo-24986: It is now possible to build Python on Windows without errors 13755 when external libraries are not available. 13756 13757- bpo-24421: Compile Modules/_math.c once, before building extensions. 13758 Previously it could fail to compile properly if the math and cmath builds 13759 were concurrent. 13760 13761- bpo-26465: Update OS X 10.5+ 32-bit-only installer to build and link with 13762 OpenSSL 1.0.2g. 13763 13764- bpo-26268: Update Windows builds to use OpenSSL 1.0.2f. 13765 13766- bpo-25136: Support Apple Xcode 7's new textual SDK stub libraries. 13767 13768- bpo-24324: Do not enable unreachable code warnings when using gcc as the 13769 option does not work correctly in older versions of gcc and has been 13770 silently removed as of gcc-4.5. 13771 13772Windows 13773------- 13774 13775- bpo-27053: Updates make_zip.py to correctly generate library ZIP file. 13776 13777- bpo-26268: Update the prepare_ssl.py script to handle OpenSSL releases 13778 that don't include the contents of the include directory (that is, 1.0.2e 13779 and later). 13780 13781- bpo-26071: bdist_wininst created binaries fail to start and find 32bit 13782 Python 13783 13784- bpo-26073: Update the list of magic numbers in launcher 13785 13786- bpo-26065: Excludes venv from library when generating embeddable distro. 13787 13788- bpo-25022: Removed very outdated PC/example_nt/ directory. 13789 13790Tools/Demos 13791----------- 13792 13793- bpo-26799: Fix python-gdb.py: don't get C types once when the Python code 13794 is loaded, but get C types on demand. The C types can change if 13795 python-gdb.py is loaded before the Python executable. Patch written by 13796 Thomas Ilsche. 13797 13798- bpo-26271: Fix the Freeze tool to properly use flags passed through 13799 configure. Patch by Daniel Shaulov. 13800 13801- bpo-26489: Add dictionary unpacking support to Tools/parser/unparse.py. 13802 Patch by Guo Ci Teo. 13803 13804- bpo-26316: Fix variable name typo in Argument Clinic. 13805 13806- bpo-25440: Fix output of python-config --extension-suffix. 13807 13808- bpo-25154: The pyvenv script has been deprecated in favour of `python3 -m 13809 venv`. 13810 13811C API 13812----- 13813 13814- bpo-26312: SystemError is now raised in all programming bugs with using 13815 PyArg_ParseTupleAndKeywords(). RuntimeError did raised before in some 13816 programming bugs. 13817 13818- bpo-26198: ValueError is now raised instead of TypeError on buffer 13819 overflow in parsing "es#" and "et#" format units. SystemError is now 13820 raised instead of TypeError on programmatical error in parsing format 13821 string. 13822 13823 13824What's New in Python 3.5.5 final? 13825================================= 13826 13827*Release date: 2018-02-04* 13828 13829There were no new changes in version 3.5.5. 13830 13831 13832 13833What's New in Python 3.5.5 release candidate 1? 13834=============================================== 13835 13836*Release date: 2018-01-23* 13837 13838Security 13839-------- 13840 13841- bpo-32551: The ``sys.path[0]`` initialization change for bpo-29139 caused 13842 a regression by revealing an inconsistency in how sys.path is initialized 13843 when executing ``__main__`` from a zipfile, directory, or other import 13844 location. This is considered a potential security issue, as it may lead to 13845 privileged processes unexpectedly loading code from user controlled 13846 directories in situations where that was not previously the case. 13847 13848 The interpreter now consistently avoids ever adding the import location's 13849 parent directory to ``sys.path``, and ensures no other ``sys.path`` 13850 entries are inadvertently modified when inserting the import location 13851 named on the command line. (Originally reported as bpo-29723 against 13852 Python 3.6rc1, but it was missed at the time that the then upcoming Python 13853 3.5.4 release would also be affected) 13854 13855- bpo-30657: Fixed possible integer overflow in PyBytes_DecodeEscape, 13856 CVE-2017-1000158. Original patch by Jay Bosamiya; rebased to Python 3 by 13857 Miro Hrončok. 13858 13859- bpo-30947: Upgrade libexpat embedded copy from version 2.2.1 to 2.2.3 to 13860 get security fixes. 13861 13862Core and Builtins 13863----------------- 13864 13865- bpo-31095: Fix potential crash during GC caused by ``tp_dealloc`` which 13866 doesn't call ``PyObject_GC_UnTrack()``. 13867 13868Library 13869------- 13870 13871- bpo-32072: Fixed issues with binary plists: 13872 13873 * Fixed saving bytearrays. 13874 * Identical objects will be saved only once. 13875 * Equal references will be load as identical objects. 13876 * Added support for saving and loading recursive data structures. 13877 13878- bpo-31170: expat: Update libexpat from 2.2.3 to 2.2.4. Fix copying of 13879 partial characters for UTF-8 input (libexpat bug 115): 13880 https://github.com/libexpat/libexpat/issues/115 13881 13882 13883What's New in Python 3.5.4 final? 13884================================= 13885 13886*Release date: 2017-08-07* 13887 13888Library 13889------- 13890 13891- bpo-30119: ftplib.FTP.putline() now throws ValueError on commands that 13892 contains CR or LF. Patch by Dong-hee Na. 13893 13894 13895What's New in Python 3.5.4 release candidate 1? 13896=============================================== 13897 13898*Release date: 2017-07-23* 13899 13900Security 13901-------- 13902 13903- bpo-30730: Prevent environment variables injection in subprocess on 13904 Windows. Prevent passing other environment variables and command 13905 arguments. 13906 13907- bpo-30694: Upgrade expat copy from 2.2.0 to 2.2.1 to get fixes of multiple 13908 security vulnerabilities including: CVE-2017-9233 (External entity 13909 infinite loop DoS), CVE-2016-9063 (Integer overflow, re-fix), 13910 CVE-2016-0718 (Fix regression bugs from 2.2.0's fix to CVE-2016-0718) and 13911 CVE-2012-0876 (Counter hash flooding with SipHash). Note: the 13912 CVE-2016-5300 (Use os-specific entropy sources like getrandom) doesn't 13913 impact Python, since Python already gets entropy from the OS to set the 13914 expat secret using ``XML_SetHashSalt()``. 13915 13916- bpo-30500: Fix urllib.parse.splithost() to correctly parse fragments. For 13917 example, ``splithost('//127.0.0.1#@evil.com/')`` now correctly returns the 13918 ``127.0.0.1`` host, instead of treating ``@evil.com`` as the host in an 13919 authentication (``login@host``). 13920 13921- bpo-29591: Update expat copy from 2.1.1 to 2.2.0 to get fixes of 13922 CVE-2016-0718 and CVE-2016-4472. See 13923 https://sourceforge.net/p/expat/bugs/537/ for more information. 13924 13925Core and Builtins 13926----------------- 13927 13928- bpo-30876: Relative import from unloaded package now reimports the package 13929 instead of failing with SystemError. Relative import from non-package now 13930 fails with ImportError rather than SystemError. 13931 13932- bpo-30765: Avoid blocking in pthread_mutex_lock() when 13933 PyThread_acquire_lock() is asked not to block. 13934 13935- bpo-27945: Fixed various segfaults with dict when input collections are 13936 mutated during searching, inserting or comparing. Based on patches by 13937 Duane Griffin and Tim Mitchell. 13938 13939- bpo-25794: Fixed type.__setattr__() and type.__delattr__() for 13940 non-interned attribute names. Based on patch by Eryk Sun. 13941 13942- bpo-29935: Fixed error messages in the index() method of tuple, list and 13943 deque when pass indices of wrong type. 13944 13945- bpo-28876: ``bool(range)`` works even if ``len(range)`` raises 13946 :exc:`OverflowError`. 13947 13948- bpo-29600: Fix wrapping coroutine return values in StopIteration. 13949 13950- bpo-29537: Restore runtime compatibility with bytecode files generated by 13951 CPython 3.5.0 to 3.5.2, and adjust the eval loop to avoid the problems 13952 that could be caused by the malformed variant of the 13953 BUILD_MAP_UNPACK_WITH_CALL opcode that they may contain. Patch by Petr 13954 Viktorin, Serhiy Storchaka, and Nick Coghlan. 13955 13956- bpo-28598: Support __rmod__ for subclasses of str being called before 13957 str.__mod__. Patch by Martijn Pieters. 13958 13959- bpo-29602: Fix incorrect handling of signed zeros in complex constructor 13960 for complex subclasses and for inputs having a __complex__ method. Patch 13961 by Serhiy Storchaka. 13962 13963- bpo-29347: Fixed possibly dereferencing undefined pointers when creating 13964 weakref objects. 13965 13966- bpo-29438: Fixed use-after-free problem in key sharing dict. 13967 13968- bpo-29319: Prevent RunMainFromImporter overwriting sys.path[0]. 13969 13970- bpo-29337: Fixed possible BytesWarning when compare the code objects. 13971 Warnings could be emitted at compile time. 13972 13973- bpo-29478: If max_line_length=None is specified while using the Compat32 13974 policy, it is no longer ignored. Patch by Mircea Cosbuc. 13975 13976Library 13977------- 13978 13979- bpo-29403: Fix ``unittest.mock``'s autospec to not fail on method-bound 13980 builtin functions. Patch by Aaron Gallagher. 13981 13982- bpo-30961: Fix decrementing a borrowed reference in tracemalloc. 13983 13984- bpo-30886: Fix multiprocessing.Queue.join_thread(): it now waits until the 13985 thread completes, even if the thread was started by the same process which 13986 created the queue. 13987 13988- bpo-29854: Fix segfault in readline when using readline's history-size 13989 option. Patch by Nir Soffer. 13990 13991- bpo-30807: signal.setitimer() may disable the timer when passed a tiny 13992 value. 13993 13994 Tiny values (such as 1e-6) are valid non-zero values for setitimer(), 13995 which is specified as taking microsecond-resolution intervals. However, on 13996 some platform, our conversion routine could convert 1e-6 into a zero 13997 interval, therefore disabling the timer instead of (re-)scheduling it. 13998 13999- bpo-30441: Fix bug when modifying os.environ while iterating over it 14000 14001- bpo-30532: Fix email header value parser dropping folding white space in 14002 certain cases. 14003 14004- bpo-29169: Update zlib to 1.2.11. 14005 14006- bpo-30879: os.listdir() and os.scandir() now emit bytes names when called 14007 with bytes-like argument. 14008 14009- bpo-30746: Prohibited the '=' character in environment variable names in 14010 ``os.putenv()`` and ``os.spawn*()``. 14011 14012- bpo-29755: Fixed the lgettext() family of functions in the gettext module. 14013 They now always return bytes. 14014 14015- bpo-30645: Fix path calculation in imp.load_package(), fixing it for cases 14016 when a package is only shipped with bytecodes. Patch by Alexandru 14017 Ardelean. 14018 14019- bpo-23890: unittest.TestCase.assertRaises() now manually breaks a 14020 reference cycle to not keep objects alive longer than expected. 14021 14022- bpo-30149: inspect.signature() now supports callables with 14023 variable-argument parameters wrapped with partialmethod. Patch by Dong-hee 14024 Na. 14025 14026- bpo-29931: Fixed comparison check for ipaddress.ip_interface objects. 14027 Patch by Sanjay Sundaresan. 14028 14029- bpo-24484: Avoid race condition in multiprocessing cleanup. 14030 14031- bpo-28994: The traceback no longer displayed for SystemExit raised in a 14032 callback registered by atexit. 14033 14034- bpo-30508: Don't log exceptions if Task/Future "cancel()" method was 14035 called. 14036 14037- bpo-28556: Updates to typing module: Add generic AsyncContextManager, add 14038 support for ContextManager on all versions. Original PRs by Jelle Zijlstra 14039 and Ivan Levkivskyi 14040 14041- bpo-29870: Fix ssl sockets leaks when connection is aborted in asyncio/ssl 14042 implementation. Patch by Michaël Sghaïer. 14043 14044- bpo-29743: Closing transport during handshake process leaks open socket. 14045 Patch by Nikolay Kim 14046 14047- bpo-27585: Fix waiter cancellation in asyncio.Lock. Patch by Mathieu 14048 Sornay. 14049 14050- bpo-30418: On Windows, subprocess.Popen.communicate() now also ignore 14051 EINVAL on stdin.write() if the child process is still running but closed 14052 the pipe. 14053 14054- bpo-30378: Fix the problem that logging.handlers.SysLogHandler cannot 14055 handle IPv6 addresses. 14056 14057- bpo-29960: Preserve generator state when _random.Random.setstate() raises 14058 an exception. Patch by Bryan Olson. 14059 14060- bpo-30414: multiprocessing.Queue._feed background running thread do not 14061 break from main loop on exception. 14062 14063- bpo-30003: Fix handling escape characters in HZ codec. Based on patch by 14064 Ma Lin. 14065 14066- bpo-30301: Fix AttributeError when using SimpleQueue.empty() under *spawn* 14067 and *forkserver* start methods. 14068 14069- bpo-30329: imaplib and poplib now catch the Windows socket WSAEINVAL error 14070 (code 10022) on shutdown(SHUT_RDWR): An invalid operation was attempted. 14071 This error occurs sometimes on SSL connections. 14072 14073- bpo-30375: Warnings emitted when compile a regular expression now always 14074 point to the line in the user code. Previously they could point into 14075 inners of the re module if emitted from inside of groups or conditionals. 14076 14077- bpo-30048: Fixed ``Task.cancel()`` can be ignored when the task is running 14078 coroutine and the coroutine returned without any more ``await``. 14079 14080- bpo-29990: Fix range checking in GB18030 decoder. Original patch by Ma 14081 Lin. 14082 14083- bpo-26293: Change resulted because of zipfile breakage. (See also: 14084 bpo-29094) 14085 14086- bpo-30243: Removed the __init__ methods of _json's scanner and encoder. 14087 Misusing them could cause memory leaks or crashes. Now scanner and 14088 encoder objects are completely initialized in the __new__ methods. 14089 14090- bpo-30185: Avoid KeyboardInterrupt tracebacks in forkserver helper process 14091 when Ctrl-C is received. 14092 14093- bpo-28556: Various updates to typing module: add typing.NoReturn type, use 14094 WrapperDescriptorType, minor bug-fixes. Original PRs by Jim 14095 Fasarakis-Hilliard and Ivan Levkivskyi. 14096 14097- bpo-30205: Fix getsockname() for unbound AF_UNIX sockets on Linux. 14098 14099- bpo-30070: Fixed leaks and crashes in errors handling in the parser 14100 module. 14101 14102- bpo-30061: Fixed crashes in IOBase methods __next__() and readlines() when 14103 readline() or __next__() respectively return non-sizeable object. Fixed 14104 possible other errors caused by not checking results of PyObject_Size(), 14105 PySequence_Size(), or PyMapping_Size(). 14106 14107- bpo-30068: _io._IOBase.readlines will check if it's closed first when hint 14108 is present. 14109 14110- bpo-29694: Fixed race condition in pathlib mkdir with flags parents=True. 14111 Patch by Armin Rigo. 14112 14113- bpo-29692: Fixed arbitrary unchaining of RuntimeError exceptions in 14114 contextlib.contextmanager. Patch by Siddharth Velankar. 14115 14116- bpo-29998: Pickling and copying ImportError now preserves name and path 14117 attributes. 14118 14119- bpo-29942: Fix a crash in itertools.chain.from_iterable when encountering 14120 long runs of empty iterables. 14121 14122- bpo-27863: Fixed multiple crashes in ElementTree caused by race conditions 14123 and wrong types. 14124 14125- bpo-28699: Fixed a bug in pools in multiprocessing.pool that raising an 14126 exception at the very first of an iterable may swallow the exception or 14127 make the program hang. Patch by Davin Potts and Xiang Zhang. 14128 14129- bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True) when 14130 the OS gives priority to errors such as EACCES over EEXIST. 14131 14132- bpo-29861: Release references to tasks, their arguments and their results 14133 as soon as they are finished in multiprocessing.Pool. 14134 14135- bpo-29884: faulthandler: Restore the old sigaltstack during teardown. 14136 Patch by Christophe Zeitouny. 14137 14138- bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. 14139 14140- bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords 14141 are not strings. Patch by Michael Seifert. 14142 14143- bpo-29742: get_extra_info() raises exception if get called on closed ssl 14144 transport. Patch by Nikolay Kim. 14145 14146- bpo-8256: Fixed possible failing or crashing input() if attributes 14147 "encoding" or "errors" of sys.stdin or sys.stdout are not set or are not 14148 strings. 14149 14150- bpo-28298: Fix a bug that prevented array 'Q', 'L' and 'I' from accepting 14151 big intables (objects that have __int__) as elements. Patch by Oren 14152 Milman. 14153 14154- bpo-29615: SimpleXMLRPCDispatcher no longer chains KeyError (or any other 14155 exception) to exception(s) raised in the dispatched methods. Patch by Petr 14156 Motejlek. 14157 14158- bpo-29704: asyncio.subprocess.SubprocessStreamProtocol no longer closes 14159 before all pipes are closed. 14160 14161- bpo-29703: Fix asyncio to support instantiation of new event loops in 14162 child processes. 14163 14164- bpo-29376: Fix assertion error in threading._DummyThread.is_alive(). 14165 14166- bpo-29110: Fix file object leak in aifc.open() when file is given as a 14167 filesystem path and is not in valid AIFF format. Patch by Anthony Zhang. 14168 14169- bpo-28961: Fix unittest.mock._Call helper: don't ignore the name parameter 14170 anymore. Patch written by Jiajun Huang. 14171 14172- bpo-29532: Altering a kwarg dictionary passed to functools.partial() no 14173 longer affects a partial object after creation. 14174 14175- bpo-28556: Various updates to typing module: typing.Counter, 14176 typing.ChainMap, improved ABC caching, etc. Original PRs by Jelle 14177 Zijlstra, Ivan Levkivskyi, Manuel Krebber, and Łukasz Langa. 14178 14179- bpo-29100: Fix datetime.fromtimestamp() regression introduced in Python 14180 3.6.0: check minimum and maximum years. 14181 14182- bpo-29519: Fix weakref spewing exceptions during interpreter shutdown when 14183 used with a rare combination of multiprocessing and custom codecs. 14184 14185- bpo-29416: Prevent infinite loop in pathlib.Path.mkdir 14186 14187- bpo-29444: Fixed out-of-bounds buffer access in the group() method of the 14188 match object. Based on patch by WGH. 14189 14190- bpo-29335: Fix subprocess.Popen.wait() when the child process has exited 14191 to a stopped instead of terminated state (ex: when under ptrace). 14192 14193- bpo-29290: Fix a regression in argparse that help messages would wrap at 14194 non-breaking spaces. 14195 14196- bpo-28735: Fixed the comparison of mock.MagickMock with mock.ANY. 14197 14198- bpo-29011: Fix an important omission by adding Deque to the typing module. 14199 14200- bpo-29219: Fixed infinite recursion in the repr of uninitialized 14201 ctypes.CDLL instances. 14202 14203- bpo-28969: Fixed race condition in C implementation of 14204 functools.lru_cache. KeyError could be raised when cached function with 14205 full cache was simultaneously called from differen threads with the same 14206 uncached arguments. 14207 14208- bpo-29142: In urllib.request, suffixes in no_proxy environment variable 14209 with leading dots could match related hostnames again (e.g. .b.c matches 14210 a.b.c). Patch by Milan Oberkirch. 14211 14212Documentation 14213------------- 14214 14215- bpo-30176: Add missing attribute related constants in curses 14216 documentation. 14217 14218- bpo-26985: Add missing info of code object in inspect documentation. 14219 14220- bpo-28929: Link the documentation to its source file on GitHub. 14221 14222- bpo-25008: Document smtpd.py as effectively deprecated and add a pointer 14223 to aiosmtpd, a third-party asyncio-based replacement. 14224 14225- bpo-26355: Add canonical header link on each page to corresponding major 14226 version of the documentation. Patch by Matthias Bussonnier. 14227 14228- bpo-29349: Fix Python 2 syntax in code for building the documentation. 14229 14230Tests 14231----- 14232 14233- bpo-30822: Fix regrtest command line parser to allow passing -u 14234 extralargefile to run test_zipfile64. 14235 14236- bpo-30383: regrtest: Enhance regrtest and backport features from the 14237 master branch. 14238 14239 Add options: --coverage, --testdir, --list-tests (list test files, don't 14240 run them), --list-cases (list test identifiers, don't run them, 14241 :issue:`30523`), --matchfile (load a list of test filters from a text 14242 file, :issue:`30540`), --slowest (alias to --slow). 14243 14244 Enhance output: add timestamp, test result, currently running tests, 14245 "Tests result: xxx" summary with total duration, etc. 14246 14247 Fix reference leak hunting in regrtest, --huntrleaks: regrtest now warms 14248 up caches, create explicitly all internal singletons which are created on 14249 demand to prevent false positives when checking for reference leaks. 14250 (:issue:`30675`). 14251 14252- bpo-30357: test_thread: setUp() now uses support.threading_setup() and 14253 support.threading_cleanup() to wait until threads complete to avoid random 14254 side effects on following tests. Initial patch written by Grzegorz 14255 Grzywacz. 14256 14257- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. Skip 14258 some tests of select.poll when running on macOS due to unresolved issues 14259 with the underlying system poll function on some macOS versions. 14260 14261- bpo-30197: Enhanced functions swap_attr() and swap_item() in the 14262 test.support module. They now work when delete replaced attribute or item 14263 inside the with statement. The old value of the attribute or item (or 14264 None if it doesn't exist) now will be assigned to the target of the "as" 14265 clause, if there is one. 14266 14267- bpo-29571: to match the behaviour of the ``re.LOCALE`` flag, 14268 test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` 14269 to determine the candidate encoding for the test regex (allowing it to 14270 correctly skip the test when the default locale encoding is a multi-byte 14271 encoding) 14272 14273Build 14274----- 14275 14276- bpo-29243: Prevent unnecessary rebuilding of Python during ``make test``, 14277 ``make install`` and some other make targets when configured with 14278 ``--enable-optimizations``. 14279 14280- bpo-23404: Don't regenerate generated files based on file modification 14281 time anymore: the action is now explicit. Replace ``make touch`` with 14282 ``make regen-all``. 14283 14284- bpo-29643: Fix ``--enable-optimization`` didn't work. 14285 14286Windows 14287------- 14288 14289- bpo-30687: Locate msbuild.exe on Windows when building rather than 14290 vcvarsall.bat 14291 14292- bpo-29392: Prevent crash when passing invalid arguments into msvcrt 14293 module. 14294 14295C API 14296----- 14297 14298- bpo-27867: Function PySlice_GetIndicesEx() is replaced with a macro if 14299 Py_LIMITED_API is set to the value between 0x03050400 and 0x03060000 (not 14300 including) or 0x03060100 or higher. 14301 14302- bpo-29083: Fixed the declaration of some public API functions. 14303 PyArg_VaParse() and PyArg_VaParseTupleAndKeywords() were not available in 14304 limited API. PyArg_ValidateKeywordArguments(), PyArg_UnpackTuple() and 14305 Py_BuildValue() were not available in limited API of version < 3.3 when 14306 PY_SSIZE_T_CLEAN is defined. 14307 14308 14309What's New in Python 3.5.3 final? 14310================================= 14311 14312*Release date: 2017-01-17* 14313 14314There were no code changes between 3.5.3rc1 and 3.5.3 final. 14315 14316 14317 14318What's New in Python 3.5.3 release candidate 1? 14319=============================================== 14320 14321*Release date: 2017-01-02* 14322 14323Core and Builtins 14324----------------- 14325 14326- bpo-29073: bytearray formatting no longer truncates on first null byte. 14327 14328- bpo-28932: Do not include <sys/random.h> if it does not exist. 14329 14330- bpo-28147: Fix a memory leak in split-table dictionaries: setattr() must 14331 not convert combined table into split table. 14332 14333- bpo-25677: Correct the positioning of the syntax error caret for indented 14334 blocks. Based on patch by Michael Layzell. 14335 14336- bpo-29000: Fixed bytes formatting of octals with zero padding in alternate 14337 form. 14338 14339- bpo-28512: Fixed setting the offset attribute of SyntaxError by 14340 PyErr_SyntaxLocationEx() and PyErr_SyntaxLocationObject(). 14341 14342- bpo-28991: functools.lru_cache() was susceptible to an obscure reentrancy 14343 bug caused by a monkey-patched len() function. 14344 14345- bpo-28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X 14346 when decode astral characters. Patch by Xiang Zhang. 14347 14348- bpo-19398: Extra slash no longer added to sys.path components in case of 14349 empty compile-time PYTHONPATH components. 14350 14351- bpo-28426: Fixed potential crash in PyUnicode_AsDecodedObject() in debug 14352 build. 14353 14354- bpo-23782: Fixed possible memory leak in _PyTraceback_Add() and exception 14355 loss in PyTraceBack_Here(). 14356 14357- bpo-28379: Added sanity checks and tests for PyUnicode_CopyCharacters(). 14358 Patch by Xiang Zhang. 14359 14360- bpo-28376: The type of long range iterator is now registered as Iterator. 14361 Patch by Oren Milman. 14362 14363- bpo-28376: The constructor of range_iterator now checks that step is not 14364 0. Patch by Oren Milman. 14365 14366- bpo-26906: Resolving special methods of uninitialized type now causes 14367 implicit initialization of the type instead of a fail. 14368 14369- bpo-18287: PyType_Ready() now checks that tp_name is not NULL. Original 14370 patch by Niklas Koep. 14371 14372- bpo-24098: Fixed possible crash when AST is changed in process of 14373 compiling it. 14374 14375- bpo-28350: String constants with null character no longer interned. 14376 14377- bpo-26617: Fix crash when GC runs during weakref callbacks. 14378 14379- bpo-27942: String constants now interned recursively in tuples and 14380 frozensets. 14381 14382- bpo-21578: Fixed misleading error message when ImportError called with 14383 invalid keyword args. 14384 14385- bpo-28203: Fix incorrect type in error message from ``complex(1.0, 14386 {2:3})``. Patch by Soumya Sharma. 14387 14388- bpo-27955: Fallback on reading /dev/urandom device when the getrandom() 14389 syscall fails with EPERM, for example when blocked by SECCOMP. 14390 14391- bpo-28131: Fix a regression in zipimport's compile_source(). zipimport 14392 should use the same optimization level as the interpreter. 14393 14394- bpo-25221: Fix corrupted result from PyLong_FromLong(0) when Python is 14395 compiled with NSMALLPOSINTS = 0. 14396 14397- bpo-25758: Prevents zipimport from unnecessarily encoding a filename 14398 (patch by Eryk Sun) 14399 14400- bpo-28189: dictitems_contains no longer swallows compare errors. (Patch by 14401 Xiang Zhang) 14402 14403- bpo-27812: Properly clear out a generator's frame's backreference to the 14404 generator to prevent crashes in frame.clear(). 14405 14406- bpo-27811: Fix a crash when a coroutine that has not been awaited is 14407 finalized with warnings-as-errors enabled. 14408 14409- bpo-27587: Fix another issue found by PVS-Studio: Null pointer check after 14410 use of 'def' in _PyState_AddModule(). Initial patch by Christian Heimes. 14411 14412- bpo-26020: set literal evaluation order did not match documented 14413 behaviour. 14414 14415- bpo-27782: Multi-phase extension module import now correctly allows the 14416 ``m_methods`` field to be used to add module level functions to instances 14417 of non-module types returned from ``Py_create_mod``. Patch by Xiang Zhang. 14418 14419- bpo-27936: The round() function accepted a second None argument for some 14420 types but not for others. Fixed the inconsistency by accepting None for 14421 all numeric types. 14422 14423- bpo-27487: Warn if a submodule argument to "python -m" or 14424 runpy.run_module() is found in sys.modules after parent packages are 14425 imported, but before the submodule is executed. 14426 14427- bpo-27558: Fix a SystemError in the implementation of "raise" statement. 14428 In a brand new thread, raise a RuntimeError since there is no active 14429 exception to reraise. Patch written by Xiang Zhang. 14430 14431- bpo-27419: Standard __import__() no longer look up "__import__" in globals 14432 or builtins for importing submodules or "from import". Fixed handling an 14433 error of non-string package name. 14434 14435- bpo-27083: Respect the PYTHONCASEOK environment variable under Windows. 14436 14437- bpo-27514: Make having too many statically nested blocks a SyntaxError 14438 instead of SystemError. 14439 14440- bpo-27473: Fixed possible integer overflow in bytes and bytearray 14441 concatenations. Patch by Xiang Zhang. 14442 14443- bpo-27507: Add integer overflow check in bytearray.extend(). Patch by 14444 Xiang Zhang. 14445 14446- bpo-27581: Don't rely on wrapping for overflow check in 14447 PySequence_Tuple(). Patch by Xiang Zhang. 14448 14449- bpo-27443: __length_hint__() of bytearray iterators no longer return a 14450 negative integer for a resized bytearray. 14451 14452- bpo-27942: Fix memory leak in codeobject.c 14453 14454Library 14455------- 14456 14457- bpo-15812: inspect.getframeinfo() now correctly shows the first line of a 14458 context. Patch by Sam Breese. 14459 14460- bpo-29094: Offsets in a ZIP file created with extern file object and modes 14461 "w" and "x" now are relative to the start of the file. 14462 14463- bpo-13051: Fixed recursion errors in large or resized 14464 curses.textpad.Textbox. Based on patch by Tycho Andersen. 14465 14466- bpo-29119: Fix weakrefs in the pure python version of 14467 collections.OrderedDict move_to_end() method. Contributed by Andra 14468 Bogildea. 14469 14470- bpo-9770: curses.ascii predicates now work correctly with negative 14471 integers. 14472 14473- bpo-28427: old keys should not remove new values from WeakValueDictionary 14474 when collecting from another thread. 14475 14476- bpo-28923: Remove editor artifacts from Tix.py. 14477 14478- bpo-28871: Fixed a crash when deallocate deep ElementTree. 14479 14480- bpo-19542: Fix bugs in WeakValueDictionary.setdefault() and 14481 WeakValueDictionary.pop() when a GC collection happens in another thread. 14482 14483- bpo-20191: Fixed a crash in resource.prlimit() when pass a sequence that 14484 doesn't own its elements as limits. 14485 14486- bpo-28779: multiprocessing.set_forkserver_preload() would crash the 14487 forkserver process if a preloaded module instantiated some multiprocessing 14488 objects such as locks. 14489 14490- bpo-28847: dbm.dumb now supports reading read-only files and no longer 14491 writes the index file when it is not changed. 14492 14493- bpo-25659: In ctypes, prevent a crash calling the from_buffer() and 14494 from_buffer_copy() methods on abstract classes like Array. 14495 14496- bpo-28732: Fix crash in os.spawnv() with no elements in args 14497 14498- bpo-28485: Always raise ValueError for negative 14499 compileall.compile_dir(workers=...) parameter, even when multithreading is 14500 unavailable. 14501 14502- bpo-28387: Fixed possible crash in _io.TextIOWrapper deallocator when the 14503 garbage collector is invoked in other thread. Based on patch by Sebastian 14504 Cufre. 14505 14506- bpo-27517: LZMA compressor and decompressor no longer raise exceptions if 14507 given empty data twice. Patch by Benjamin Fogle. 14508 14509- bpo-28549: Fixed segfault in curses's addch() with ncurses6. 14510 14511- bpo-28449: tarfile.open() with mode "r" or "r:" now tries to open a tar 14512 file with compression before trying to open it without compression. 14513 Otherwise it had 50% chance failed with ignore_zeros=True. 14514 14515- bpo-23262: The webbrowser module now supports Firefox 36+ and derived 14516 browsers. Based on patch by Oleg Broytman. 14517 14518- bpo-27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused 14519 by representing the scale as float value internally in Tk. tkinter.IntVar 14520 now works if float value is set to underlying Tk variable. 14521 14522- bpo-28255: calendar.TextCalendar().prmonth() no longer prints a space at 14523 the start of new line after printing a month's calendar. Patch by Xiang 14524 Zhang. 14525 14526- bpo-20491: The textwrap.TextWrapper class now honors non-breaking spaces. 14527 Based on patch by Kaarle Ritvanen. 14528 14529- bpo-28353: os.fwalk() no longer fails on broken links. 14530 14531- bpo-25464: Fixed HList.header_exists() in tkinter.tix module by addin a 14532 workaround to Tix library bug. 14533 14534- bpo-28488: shutil.make_archive() no longer add entry "./" to ZIP archive. 14535 14536- bpo-24452: Make webbrowser support Chrome on Mac OS X. 14537 14538- bpo-20766: Fix references leaked by pdb in the handling of SIGINT 14539 handlers. 14540 14541- bpo-26293: Fixed writing ZIP files that starts not from the start of the 14542 file. Offsets in ZIP file now are relative to the start of the archive in 14543 conforming to the specification. 14544 14545- bpo-28321: Fixed writing non-BMP characters with binary format in 14546 plistlib. 14547 14548- bpo-28322: Fixed possible crashes when unpickle itertools objects from 14549 incorrect pickle data. Based on patch by John Leitch. 14550 14551- Fix possible integer overflows and crashes in the mmap module with unusual 14552 usage patterns. 14553 14554- bpo-1703178: Fix the ability to pass the --link-objects option to the 14555 distutils build_ext command. 14556 14557- bpo-28253: Fixed calendar functions for extreme months: 0001-01 and 14558 9999-12. 14559 14560 Methods itermonthdays() and itermonthdays2() are reimplemented so that 14561 they don't call itermonthdates() which can cause datetime.date 14562 under/overflow. 14563 14564- bpo-28275: Fixed possible use after free in the decompress() methods of 14565 the LZMADecompressor and BZ2Decompressor classes. Original patch by John 14566 Leitch. 14567 14568- bpo-27897: Fixed possible crash in sqlite3.Connection.create_collation() 14569 if pass invalid string-like object as a name. Patch by Xiang Zhang. 14570 14571- bpo-18893: Fix invalid exception handling in Lib/ctypes/macholib/dyld.py. 14572 Patch by Madison May. 14573 14574- bpo-27611: Fixed support of default root window in the tkinter.tix module. 14575 14576- bpo-27348: In the traceback module, restore the formatting of exception 14577 messages like "Exception: None". This fixes a regression introduced in 14578 3.5a2. 14579 14580- bpo-25651: Allow falsy values to be used for msg parameter of subTest(). 14581 14582- bpo-27932: Prevent memory leak in win32_ver(). 14583 14584- Fix UnboundLocalError in socket._sendfile_use_sendfile. 14585 14586- bpo-28075: Check for ERROR_ACCESS_DENIED in Windows implementation of 14587 os.stat(). Patch by Eryk Sun. 14588 14589- bpo-25270: Prevent codecs.escape_encode() from raising SystemError when an 14590 empty bytestring is passed. 14591 14592- bpo-28181: Get antigravity over HTTPS. Patch by Kaartic Sivaraam. 14593 14594- bpo-25895: Enable WebSocket URL schemes in urllib.parse.urljoin. Patch by 14595 Gergely Imreh and Markus Holtermann. 14596 14597- bpo-27599: Fixed buffer overrun in binascii.b2a_qp() and 14598 binascii.a2b_qp(). 14599 14600- bpo-19003: m email.generator now replaces only ``\r`` and/or ``\n`` line 14601 endings, per the RFC, instead of all unicode line endings. 14602 14603- bpo-28019: itertools.count() no longer rounds non-integer step in range 14604 between 1.0 and 2.0 to 1. 14605 14606- bpo-25969: Update the lib2to3 grammar to handle the unpacking 14607 generalizations added in 3.5. 14608 14609- bpo-14977: mailcap now respects the order of the lines in the mailcap 14610 files ("first match"), as required by RFC 1542. Patch by Michael Lazar. 14611 14612- bpo-24594: Validates persist parameter when opening MSI database 14613 14614- bpo-17582: xml.etree.ElementTree nows preserves whitespaces in attributes 14615 (Patch by Duane Griffin. Reviewed and approved by Stefan Behnel.) 14616 14617- bpo-28047: Fixed calculation of line length used for the base64 CTE in the 14618 new email policies. 14619 14620- bpo-27445: Don't pass str(_charset) to MIMEText.set_payload(). Patch by 14621 Claude Paroz. 14622 14623- bpo-22450: urllib now includes an ``Accept: */*`` header among the default 14624 headers. This makes the results of REST API requests more consistent and 14625 predictable especially when proxy servers are involved. 14626 14627- lib2to3.pgen3.driver.load_grammar() now creates a stable cache file 14628 between runs given the same Grammar.txt input regardless of the hash 14629 randomization setting. 14630 14631- bpo-27570: Avoid zero-length memcpy() etc calls with null source pointers 14632 in the "ctypes" and "array" modules. 14633 14634- bpo-22233: Break email header lines *only* on the RFC specified CR and LF 14635 characters, not on arbitrary unicode line breaks. This also fixes a bug 14636 in HTTP header parsing. 14637 14638- bpo-27988: Fix email iter_attachments incorrect mutation of payload list. 14639 14640- bpo-27691: Fix ssl module's parsing of GEN_RID subject alternative name 14641 fields in X.509 certs. 14642 14643- bpo-27850: Remove 3DES from ssl module's default cipher list to counter 14644 measure sweet32 attack (CVE-2016-2183). 14645 14646- bpo-27766: Add ChaCha20 Poly1305 to ssl module's default cipher list. 14647 (Required OpenSSL 1.1.0 or LibreSSL). 14648 14649- bpo-26470: Port ssl and hashlib module to OpenSSL 1.1.0. 14650 14651- Remove support for passing a file descriptor to os.access. It never worked 14652 but previously didn't raise. 14653 14654- bpo-12885: Fix error when distutils encounters symlink. 14655 14656- bpo-27881: Fixed possible bugs when setting 14657 sqlite3.Connection.isolation_level. Based on patch by Xiang Zhang. 14658 14659- bpo-27861: Fixed a crash in sqlite3.Connection.cursor() when a factory 14660 creates not a cursor. Patch by Xiang Zhang. 14661 14662- bpo-19884: Avoid spurious output on OS X with Gnu Readline. 14663 14664- bpo-27706: Restore deterministic behavior of random.Random().seed() for 14665 string seeds using seeding version 1. Allows sequences of calls to 14666 random() to exactly match those obtained in Python 2. Patch by Nofar 14667 Schnider. 14668 14669- bpo-10513: Fix a regression in Connection.commit(). Statements should not 14670 be reset after a commit. 14671 14672- A new version of typing.py from https://github.com/python/typing: 14673 Collection (only for 3.6) (Issue #27598). Add FrozenSet to __all__ 14674 (upstream #261). Fix crash in _get_type_vars() (upstream #259). Remove the 14675 dict constraint in ForwardRef._eval_type (upstream #252). 14676 14677- bpo-27539: Fix unnormalised ``Fraction.__pow__`` result in the case of 14678 negative exponent and negative base. 14679 14680- bpo-21718: cursor.description is now available for queries using CTEs. 14681 14682- bpo-2466: posixpath.ismount now correctly recognizes mount points which 14683 the user does not have permission to access. 14684 14685- bpo-27773: Correct some memory management errors server_hostname in 14686 _ssl.wrap_socket(). 14687 14688- bpo-26750: unittest.mock.create_autospec() now works properly for 14689 subclasses of property() and other data descriptors. 14690 14691- In the curses module, raise an error if window.getstr() or window.instr() 14692 is passed a negative value. 14693 14694- bpo-27783: Fix possible usage of uninitialized memory in 14695 operator.methodcaller. 14696 14697- bpo-27774: Fix possible Py_DECREF on unowned object in _sre. 14698 14699- bpo-27760: Fix possible integer overflow in binascii.b2a_qp. 14700 14701- bpo-27758: Fix possible integer overflow in the _csv module for large 14702 record lengths. 14703 14704- bpo-27568: Prevent HTTPoxy attack (CVE-2016-1000110). Ignore the 14705 HTTP_PROXY variable when REQUEST_METHOD environment is set, which 14706 indicates that the script is in CGI mode. 14707 14708- bpo-27656: Do not assume sched.h defines any SCHED_* constants. 14709 14710- bpo-27130: In the "zlib" module, fix handling of large buffers (typically 14711 4 GiB) when compressing and decompressing. Previously, inputs were 14712 limited to 4 GiB, and compression and decompression operations did not 14713 properly handle results of 4 GiB. 14714 14715- bpo-27533: Release GIL in nt._isdir 14716 14717- bpo-17711: Fixed unpickling by the persistent ID with protocol 0. Original 14718 patch by Alexandre Vassalotti. 14719 14720- bpo-27522: Avoid an unintentional reference cycle in email.feedparser. 14721 14722- bpo-26844: Fix error message for imp.find_module() to refer to 'path' 14723 instead of 'name'. Patch by Lev Maximov. 14724 14725- bpo-23804: Fix SSL zero-length recv() calls to not block and not raise an 14726 error about unclean EOF. 14727 14728- bpo-27466: Change time format returned by http.cookie.time2netscape, 14729 confirming the netscape cookie format and making it consistent with 14730 documentation. 14731 14732- bpo-26664: Fix activate.fish by removing mis-use of ``$``. 14733 14734- bpo-22115: Fixed tracing Tkinter variables: trace_vdelete() with wrong 14735 mode no longer break tracing, trace_vinfo() now always returns a list of 14736 pairs of strings, tracing in the "u" mode now works. 14737 14738- Fix a scoping issue in importlib.util.LazyLoader which triggered an 14739 UnboundLocalError when lazy-loading a module that was already put into 14740 sys.modules. 14741 14742- bpo-27079: Fixed curses.ascii functions isblank(), iscntrl() and 14743 ispunct(). 14744 14745- bpo-26754: Some functions (compile() etc) accepted a filename argument 14746 encoded as an iterable of integers. Now only strings and byte-like objects 14747 are accepted. 14748 14749- bpo-27048: Prevents distutils failing on Windows when environment 14750 variables contain non-ASCII characters 14751 14752- bpo-27330: Fixed possible leaks in the ctypes module. 14753 14754- bpo-27238: Got rid of bare excepts in the turtle module. Original patch 14755 by Jelle Zijlstra. 14756 14757- bpo-27122: When an exception is raised within the context being managed by 14758 a contextlib.ExitStack() and one of the exit stack generators catches and 14759 raises it in a chain, do not re-raise the original exception when exiting, 14760 let the new chained one through. This avoids the PEP 479 bug described in 14761 issue25782. 14762 14763Security 14764-------- 14765 14766- bpo-27278: Fix os.urandom() implementation using getrandom() on Linux. 14767 Truncate size to INT_MAX and loop until we collected enough random bytes, 14768 instead of casting a directly Py_ssize_t to int. 14769 14770Library 14771------- 14772 14773- bpo-26386: Fixed ttk.TreeView selection operations with item id's 14774 containing spaces. 14775 14776Security 14777-------- 14778 14779- bpo-22636: Avoid shell injection problems with ctypes.util.find_library(). 14780 14781Library 14782------- 14783 14784- bpo-16182: Fix various functions in the "readline" module to use the 14785 locale encoding, and fix get_begidx() and get_endidx() to return code 14786 point indexes. 14787 14788- bpo-27392: Add loop.connect_accepted_socket(). Patch by Jim Fulton. 14789 14790- bpo-27930: Improved behaviour of logging.handlers.QueueListener. Thanks to 14791 Paulo Andrade and Petr Viktorin for the analysis and patch. 14792 14793- bpo-21201: Improves readability of multiprocessing error message. Thanks 14794 to Wojciech Walczak for patch. 14795 14796- bpo-27456: asyncio: Set TCP_NODELAY by default. 14797 14798- bpo-27906: Fix socket accept exhaustion during high TCP traffic. Patch by 14799 Kevin Conway. 14800 14801- bpo-28174: Handle when SO_REUSEPORT isn't properly supported. Patch by 14802 Seth Michael Larson. 14803 14804- bpo-26654: Inspect functools.partial in asyncio.Handle.__repr__. Patch by 14805 iceboy. 14806 14807- bpo-26909: Fix slow pipes IO in asyncio. Patch by INADA Naoki. 14808 14809- bpo-28176: Fix callbacks race in asyncio.SelectorLoop.sock_connect. 14810 14811- bpo-27759: Fix selectors incorrectly retain invalid file descriptors. 14812 Patch by Mark Williams. 14813 14814- bpo-28368: Refuse monitoring processes if the child watcher has no loop 14815 attached. Patch by Vincent Michel. 14816 14817- bpo-28369: Raise RuntimeError when transport's FD is used with add_reader, 14818 add_writer, etc. 14819 14820- bpo-28370: Speedup asyncio.StreamReader.readexactly. Patch by Коренберг 14821 Марк. 14822 14823- bpo-28371: Deprecate passing asyncio.Handles to run_in_executor. 14824 14825- bpo-28372: Fix asyncio to support formatting of non-python coroutines. 14826 14827- bpo-28399: Remove UNIX socket from FS before binding. Patch by Коренберг 14828 Марк. 14829 14830- bpo-27972: Prohibit Tasks to await on themselves. 14831 14832- bpo-26923: Fix asyncio.Gather to refuse being cancelled once all children 14833 are done. Patch by Johannes Ebke. 14834 14835- bpo-26796: Don't configure the number of workers for default threadpool 14836 executor. Initial patch by Hans Lawrenz. 14837 14838- bpo-28600: Optimize loop.call_soon(). 14839 14840- bpo-28613: Fix get_event_loop() return the current loop if called from 14841 coroutines/callbacks. 14842 14843- bpo-28639: Fix inspect.isawaitable to always return bool Patch by Justin 14844 Mayfield. 14845 14846- bpo-28652: Make loop methods reject socket kinds they do not support. 14847 14848- bpo-28653: Fix a refleak in functools.lru_cache. 14849 14850- bpo-28703: Fix asyncio.iscoroutinefunction to handle Mock objects. 14851 14852- bpo-24142: Reading a corrupt config file left the parser in an invalid 14853 state. Original patch by Florian Höch. 14854 14855- bpo-28990: Fix SSL hanging if connection is closed before handshake 14856 completed. (Patch by HoHo-Ho) 14857 14858IDLE 14859---- 14860 14861- bpo-15308: Add 'interrupt execution' (^C) to Shell menu. Patch by Roger 14862 Serwy, updated by Bayard Randel. 14863 14864- bpo-27922: Stop IDLE tests from 'flashing' gui widgets on the screen. 14865 14866- Add version to title of IDLE help window. 14867 14868- bpo-25564: In section on IDLE -- console differences, mention that using 14869 exec means that __builtins__ is defined for each statement. 14870 14871- bpo-27714: text_textview and test_autocomplete now pass when re-run in the 14872 same process. This occurs when test_idle fails when run with the -w 14873 option but without -jn. Fix warning from test_config. 14874 14875- bpo-25507: IDLE no longer runs buggy code because of its tkinter imports. 14876 Users must include the same imports required to run directly in Python. 14877 14878- bpo-27452: add line counter and crc to IDLE configHandler test dump. 14879 14880- bpo-27365: Allow non-ascii chars in IDLE NEWS.txt, for contributor names. 14881 14882- bpo-27245: IDLE: Cleanly delete custom themes and key bindings. 14883 Previously, when IDLE was started from a console or by import, a cascade 14884 of warnings was emitted. Patch by Serhiy Storchaka. 14885 14886C API 14887----- 14888 14889- bpo-28808: PyUnicode_CompareWithASCIIString() now never raises exceptions. 14890 14891- bpo-26754: PyUnicode_FSDecoder() accepted a filename argument encoded as 14892 an iterable of integers. Now only strings and bytes-like objects are 14893 accepted. 14894 14895Documentation 14896------------- 14897 14898- bpo-28513: Documented command-line interface of zipfile. 14899 14900Tests 14901----- 14902 14903- bpo-28950: Disallow -j0 to be combined with -T/-l/-M in regrtest command 14904 line arguments. 14905 14906- bpo-28666: Now test.support.rmtree is able to remove unwritable or 14907 unreadable directories. 14908 14909- bpo-23839: Various caches now are cleared before running every test file. 14910 14911- bpo-28409: regrtest: fix the parser of command line arguments. 14912 14913- bpo-27787: Call gc.collect() before checking each test for "dangling 14914 threads", since the dangling threads are weak references. 14915 14916- bpo-27369: In test_pyexpat, avoid testing an error message detail that 14917 changed in Expat 2.2.0. 14918 14919Tools/Demos 14920----------- 14921 14922- bpo-27952: Get Tools/scripts/fixcid.py working with Python 3 and the 14923 current "re" module, avoid invalid Python backslash escapes, and fix a bug 14924 parsing escaped C quote signs. 14925 14926- bpo-27332: Fixed the type of the first argument of module-level functions 14927 generated by Argument Clinic. Patch by Petr Viktorin. 14928 14929- bpo-27418: Fixed Tools/importbench/importbench.py. 14930 14931Windows 14932------- 14933 14934- bpo-28251: Improvements to help manuals on Windows. 14935 14936- bpo-28110: launcher.msi has different product codes between 32-bit and 14937 64-bit 14938 14939- bpo-25144: Ensures TargetDir is set before continuing with custom install. 14940 14941- bpo-27469: Adds a shell extension to the launcher so that drag and drop 14942 works correctly. 14943 14944- bpo-27309: Enabled proper Windows styles in python[w].exe manifest. 14945 14946Build 14947----- 14948 14949- bpo-29080: Removes hard dependency on hg.exe from PCBuild/build.bat 14950 14951- bpo-23903: Added missed names to PC/python3.def. 14952 14953- bpo-10656: Fix out-of-tree building on AIX. Patch by Tristan Carel and 14954 Michael Haubenwallner. 14955 14956- bpo-26359: Rename --with-optimiations to --enable-optimizations. 14957 14958- bpo-28444: Fix missing extensions modules when cross compiling. 14959 14960- bpo-28248: Update Windows build and OS X installers to use OpenSSL 1.0.2j. 14961 14962- bpo-28258: Fixed build with Estonian locale (python-config and distclean 14963 targets in Makefile). Patch by Arfrever Frehtes Taifersar Arahesis. 14964 14965- bpo-26661: setup.py now detects system libffi with multiarch wrapper. 14966 14967- bpo-28066: Fix the logic that searches build directories for generated 14968 include files when building outside the source tree. 14969 14970- bpo-15819: Remove redundant include search directory option for building 14971 outside the source tree. 14972 14973- bpo-27566: Fix clean target in freeze makefile (patch by Lisa Roach) 14974 14975- bpo-27705: Update message in validate_ucrtbase.py 14976 14977- bpo-27983: Cause lack of llvm-profdata tool when using clang as required 14978 for PGO linking to be a configure time error rather than make time when 14979 --with-optimizations is enabled. Also improve our ability to find the 14980 llvm-profdata tool on MacOS and some Linuxes. 14981 14982- bpo-26307: The profile-opt build now applies PGO to the built-in modules. 14983 14984- bpo-26359: Add the --with-optimizations configure flag. 14985 14986- bpo-27713: Suppress spurious build warnings when updating importlib's 14987 bootstrap files. Patch by Xiang Zhang 14988 14989- bpo-25825: Correct the references to Modules/python.exp and ld_so_aix, 14990 which are required on AIX. This updates references to an installation 14991 path that was changed in 3.2a4, and undoes changed references to the build 14992 tree that were made in 3.5.0a1. 14993 14994- bpo-27453: CPP invocation in configure must use CPPFLAGS. Patch by Chi 14995 Hsuan Yen. 14996 14997- bpo-27641: The configure script now inserts comments into the makefile to 14998 prevent the pgen and _freeze_importlib executables from being 14999 cross-compiled. 15000 15001- bpo-26662: Set PYTHON_FOR_GEN in configure as the Python program to be 15002 used for file generation during the build. 15003 15004- bpo-10910: Avoid C++ compilation errors on FreeBSD and OS X. Also update 15005 FreedBSD version checks for the original ctype UTF-8 workaround. 15006 15007- bpo-28676: Prevent missing 'getentropy' declaration warning on macOS. 15008 Patch by Gareth Rees. 15009 15010 15011What's New in Python 3.5.2 final? 15012================================= 15013 15014*Release date: 2016-06-26* 15015 15016Core and Builtins 15017----------------- 15018 15019- bpo-26930: Update Windows builds to use OpenSSL 1.0.2h. 15020 15021Tests 15022----- 15023 15024- bpo-26867: Ubuntu's openssl OP_NO_SSLv3 is forced on by default; fix test. 15025 15026IDLE 15027---- 15028 15029- bpo-27365: Allow non-ascii in idlelib/NEWS.txt - minimal part for 3.5.2. 15030 15031 15032What's New in Python 3.5.2 release candidate 1? 15033=============================================== 15034 15035*Release date: 2016-06-12* 15036 15037Core and Builtins 15038----------------- 15039 15040- bpo-27066: Fixed SystemError if a custom opener (for open()) returns a 15041 negative number without setting an exception. 15042 15043- bpo-20041: Fixed TypeError when frame.f_trace is set to None. Patch by 15044 Xavier de Gaye. 15045 15046- bpo-26168: Fixed possible refleaks in failing Py_BuildValue() with the "N" 15047 format unit. 15048 15049- bpo-26991: Fix possible refleak when creating a function with annotations. 15050 15051- bpo-27039: Fixed bytearray.remove() for values greater than 127. Patch by 15052 Joe Jevnik. 15053 15054- bpo-23640: int.from_bytes() no longer bypasses constructors for 15055 subclasses. 15056 15057- bpo-26811: gc.get_objects() no longer contains a broken tuple with NULL 15058 pointer. 15059 15060- bpo-20120: Use RawConfigParser for .pypirc parsing, removing support for 15061 interpolation unintentionally added with move to Python 3. Behavior no 15062 longer does any interpolation in .pypirc files, matching behavior in 15063 Python 2.7 and Setuptools 19.0. 15064 15065- bpo-26659: Make the builtin slice type support cycle collection. 15066 15067- bpo-26718: super.__init__ no longer leaks memory if called multiple times. 15068 NOTE: A direct call of super.__init__ is not endorsed! 15069 15070- bpo-25339: PYTHONIOENCODING now has priority over locale in setting the 15071 error handler for stdin and stdout. 15072 15073- bpo-26494: Fixed crash on iterating exhausting iterators. Affected classes 15074 are generic sequence iterators, iterators of str, bytes, bytearray, list, 15075 tuple, set, frozenset, dict, OrderedDict, corresponding views and 15076 os.scandir() iterator. 15077 15078- bpo-26581: If coding cookie is specified multiple times on a line in 15079 Python source code file, only the first one is taken to account. 15080 15081- bpo-26464: Fix str.translate() when string is ASCII and first replacements 15082 removes character, but next replacement uses a non-ASCII character or a 15083 string longer than 1 character. Regression introduced in Python 3.5.0. 15084 15085- bpo-22836: Ensure exception reports from PyErr_Display() and 15086 PyErr_WriteUnraisable() are sensible even when formatting them produces 15087 secondary errors. This affects the reports produced by 15088 sys.__excepthook__() and when __del__() raises an exception. 15089 15090- bpo-26302: Correct behavior to reject comma as a legal character for 15091 cookie names. 15092 15093- bpo-4806: Avoid masking the original TypeError exception when using star 15094 (``*``) unpacking in function calls. Based on patch by Hagen Fürstenau 15095 and Daniel Urban. 15096 15097- bpo-27138: Fix the doc comment for FileFinder.find_spec(). 15098 15099- bpo-26154: Add a new private _PyThreadState_UncheckedGet() function to get 15100 the current Python thread state, but don't issue a fatal error if it is 15101 NULL. This new function must be used instead of accessing directly the 15102 _PyThreadState_Current variable. The variable is no more exposed since 15103 Python 3.5.1 to hide the exact implementation of atomic C types, to avoid 15104 compiler issues. 15105 15106- bpo-26194: Deque.insert() gave odd results for bounded deques that had 15107 reached their maximum size. Now an IndexError will be raised when 15108 attempting to insert into a full deque. 15109 15110- bpo-25843: When compiling code, don't merge constants if they are equal 15111 but have a different types. For example, ``f1, f2 = lambda: 1, lambda: 15112 1.0`` is now correctly compiled to two different functions: ``f1()`` 15113 returns ``1`` (``int``) and ``f2()`` returns ``1.0`` (``int``), even if 15114 ``1`` and ``1.0`` are equal. 15115 15116- bpo-22995: [UPDATE] Comment out the one of the pickleability tests in 15117 _PyObject_GetState() due to regressions observed in Cython-based projects. 15118 15119- bpo-25961: Disallowed null characters in the type name. 15120 15121- bpo-25973: Fix segfault when an invalid nonlocal statement binds a name 15122 starting with two underscores. 15123 15124- bpo-22995: Instances of extension types with a state that aren't 15125 subclasses of list or dict and haven't implemented any pickle-related 15126 methods (__reduce__, __reduce_ex__, __getnewargs__, __getnewargs_ex__, or 15127 __getstate__), can no longer be pickled. Including memoryview. 15128 15129- bpo-20440: Massive replacing unsafe attribute setting code with special 15130 macro Py_SETREF. 15131 15132- bpo-25766: Special method __bytes__() now works in str subclasses. 15133 15134- bpo-25421: __sizeof__ methods of builtin types now use dynamic basic size. 15135 This allows sys.getsize() to work correctly with their subclasses with 15136 __slots__ defined. 15137 15138- bpo-25709: Fixed problem with in-place string concatenation and utf-8 15139 cache. 15140 15141- bpo-27147: Mention PEP 420 in the importlib docs. 15142 15143- bpo-24097: Fixed crash in object.__reduce__() if slot name is freed inside 15144 __getattr__. 15145 15146- bpo-24731: Fixed crash on converting objects with special methods 15147 __bytes__, __trunc__, and __float__ returning instances of subclasses of 15148 bytes, int, and float to subclasses of bytes, int, and float 15149 correspondingly. 15150 15151- bpo-26478: Fix semantic bugs when using binary operators with dictionary 15152 views and tuples. 15153 15154- bpo-26171: Fix possible integer overflow and heap corruption in 15155 zipimporter.get_data(). 15156 15157- bpo-25660: Fix TAB key behaviour in REPL with readline. 15158 15159- bpo-25887: Raise a RuntimeError when a coroutine object is awaited more 15160 than once. 15161 15162- bpo-27243: Update the __aiter__ protocol: instead of returning an 15163 awaitable that resolves to an asynchronous iterator, the asynchronous 15164 iterator should be returned directly. Doing the former will trigger a 15165 PendingDeprecationWarning. 15166 15167Security 15168-------- 15169 15170- bpo-26556: Update expat to 2.1.1, fixes CVE-2015-1283. 15171 15172- Fix TLS stripping vulnerability in smtplib, CVE-2016-0772. Reported by 15173 Team Oststrom 15174 15175Library 15176------- 15177 15178- bpo-21386: Implement missing IPv4Address.is_global property. It was 15179 documented since 07a5610bae9d. Initial patch by Roger Luethi. 15180 15181- bpo-20900: distutils register command now decodes HTTP responses 15182 correctly. Initial patch by ingrid. 15183 15184- A new version of typing.py provides several new classes and features: 15185 @overload outside stubs, Reversible, DefaultDict, Text, ContextManager, 15186 Type[], NewType(), TYPE_CHECKING, and numerous bug fixes (note that some 15187 of the new features are not yet implemented in mypy or other static 15188 analyzers). Also classes for PEP 492 (Awaitable, AsyncIterable, 15189 AsyncIterator) have been added (in fact they made it into 3.5.1 but were 15190 never mentioned). 15191 15192- bpo-25738: Stop http.server.BaseHTTPRequestHandler.send_error() from 15193 sending a message body for 205 Reset Content. Also, don't send Content 15194 header fields in responses that don't have a body. Patch by Susumu 15195 Koshiba. 15196 15197- bpo-21313: Fix the "platform" module to tolerate when sys.version contains 15198 truncated build information. 15199 15200Security 15201-------- 15202 15203- bpo-26839: On Linux, :func:`os.urandom` now calls ``getrandom()`` with 15204 ``GRND_NONBLOCK`` to fall back on reading ``/dev/urandom`` if the urandom 15205 entropy pool is not initialized yet. Patch written by Colm Buckley. 15206 15207Library 15208------- 15209 15210- bpo-27164: In the zlib module, allow decompressing raw Deflate streams 15211 with a predefined zdict. Based on patch by Xiang Zhang. 15212 15213- bpo-24291: Fix wsgiref.simple_server.WSGIRequestHandler to completely 15214 write data to the client. Previously it could do partial writes and 15215 truncate data. Also, wsgiref.handler.ServerHandler can now handle stdout 15216 doing partial writes, but this is deprecated. 15217 15218- bpo-26809: Add ``__all__`` to :mod:`string`. Patch by Emanuel Barry. 15219 15220- bpo-26373: subprocess.Popen.communicate now correctly ignores 15221 BrokenPipeError when the child process dies before .communicate() is 15222 called in more/all circumstances. 15223 15224- bpo-21776: distutils.upload now correctly handles HTTPError. Initial patch 15225 by Claudiu Popa. 15226 15227- bpo-27114: Fix SSLContext._load_windows_store_certs fails with 15228 PermissionError 15229 15230- bpo-18383: Avoid creating duplicate filters when using filterwarnings and 15231 simplefilter. Based on patch by Alex Shkop. 15232 15233- bpo-27057: Fix os.set_inheritable() on Android, ioctl() is blocked by 15234 SELinux and fails with EACCESS. The function now falls back to fcntl(). 15235 Patch written by Michał Bednarski. 15236 15237- bpo-27014: Fix infinite recursion using typing.py. Thanks to Kalle Tuure! 15238 15239- bpo-14132: Fix urllib.request redirect handling when the target only has a 15240 query string. Original fix by Ján Janech. 15241 15242- bpo-17214: The "urllib.request" module now percent-encodes non-ASCII bytes 15243 found in redirect target URLs. Some servers send Location header fields 15244 with non-ASCII bytes, but "http.client" requires the request target to be 15245 ASCII-encodable, otherwise a UnicodeEncodeError is raised. Based on patch 15246 by Christian Heimes. 15247 15248- bpo-26892: Honor debuglevel flag in urllib.request.HTTPHandler. Patch 15249 contributed by Chi Hsuan Yen. 15250 15251- bpo-22274: In the subprocess module, allow stderr to be redirected to 15252 stdout even when stdout is not redirected. Patch by Akira Li. 15253 15254- bpo-26807: mock_open 'files' no longer error on readline at end of file. 15255 Patch from Yolanda Robla. 15256 15257- bpo-25745: Fixed leaking a userptr in curses panel destructor. 15258 15259- bpo-26977: Removed unnecessary, and ignored, call to sum of squares helper 15260 in statistics.pvariance. 15261 15262- bpo-26881: The modulefinder module now supports extended opcode arguments. 15263 15264- bpo-23815: Fixed crashes related to directly created instances of types in 15265 _tkinter and curses.panel modules. 15266 15267- bpo-17765: weakref.ref() no longer silently ignores keyword arguments. 15268 Patch by Georg Brandl. 15269 15270- bpo-26873: xmlrpc now raises ResponseError on unsupported type tags 15271 instead of silently return incorrect result. 15272 15273- bpo-26711: Fixed the comparison of plistlib.Data with other types. 15274 15275- bpo-24114: Fix an uninitialized variable in `ctypes.util`. 15276 15277 The bug only occurs on SunOS when the ctypes implementation searches for 15278 the `crle` program. Patch by Xiang Zhang. Tested on SunOS by Kees Bos. 15279 15280- bpo-26864: In urllib.request, change the proxy bypass host checking 15281 against no_proxy to be case-insensitive, and to not match unrelated host 15282 names that happen to have a bypassed hostname as a suffix. Patch by Xiang 15283 Zhang. 15284 15285- bpo-26634: recursive_repr() now sets __qualname__ of wrapper. Patch by 15286 Xiang Zhang. 15287 15288- bpo-26804: urllib.request will prefer lower_case proxy environment 15289 variables over UPPER_CASE or Mixed_Case ones. Patch contributed by 15290 Hans-Peter Jansen. 15291 15292- bpo-26837: assertSequenceEqual() now correctly outputs non-stringified 15293 differing items (like bytes in the -b mode). This affects 15294 assertListEqual() and assertTupleEqual(). 15295 15296- bpo-26041: Remove "will be removed in Python 3.7" from deprecation 15297 messages of platform.dist() and platform.linux_distribution(). Patch by 15298 Kumaripaba Miyurusara Athukorala. 15299 15300- bpo-26822: itemgetter, attrgetter and methodcaller objects no longer 15301 silently ignore keyword arguments. 15302 15303- bpo-26733: Disassembling a class now disassembles class and static 15304 methods. Patch by Xiang Zhang. 15305 15306- bpo-26801: Fix error handling in :func:`shutil.get_terminal_size`, catch 15307 :exc:`AttributeError` instead of :exc:`NameError`. Patch written by 15308 Emanuel Barry. 15309 15310- bpo-24838: tarfile's ustar and gnu formats now correctly calculate name 15311 and link field limits for multibyte character encodings like utf-8. 15312 15313Security 15314-------- 15315 15316- bpo-26657: Fix directory traversal vulnerability with http.server on 15317 Windows. This fixes a regression that was introduced in 3.3.4rc1 and 15318 3.4.0rc1. Based on patch by Philipp Hagemeister. 15319 15320Library 15321------- 15322 15323- bpo-26717: Stop encoding Latin-1-ized WSGI paths with UTF-8. Patch by 15324 Anthony Sottile. 15325 15326- bpo-26735: Fix :func:`os.urandom` on Solaris 11.3 and newer when reading 15327 more than 1,024 bytes: call ``getrandom()`` multiple times with a limit of 15328 1024 bytes per call. 15329 15330- bpo-16329: Add .webm to mimetypes.types_map. Patch by Giampaolo Rodola'. 15331 15332- bpo-13952: Add .csv to mimetypes.types_map. Patch by Geoff Wilson. 15333 15334- bpo-26709: Fixed Y2038 problem in loading binary PLists. 15335 15336- bpo-23735: Handle terminal resizing with Readline 6.3+ by installing our 15337 own SIGWINCH handler. Patch by Eric Price. 15338 15339- bpo-26586: In http.server, respond with "413 Request header fields too 15340 large" if there are too many header fields to parse, rather than killing 15341 the connection and raising an unhandled exception. Patch by Xiang Zhang. 15342 15343- bpo-22854: Change BufferedReader.writable() and BufferedWriter.readable() 15344 to always return False. 15345 15346- bpo-25195: Fix a regression in mock.MagicMock. _Call is a subclass of 15347 tuple (changeset 3603bae63c13 only works for classes) so we need to 15348 implement __ne__ ourselves. Patch by Andrew Plummer. 15349 15350- bpo-26644: Raise ValueError rather than SystemError when a negative length 15351 is passed to SSLSocket.recv() or read(). 15352 15353- bpo-23804: Fix SSL recv(0) and read(0) methods to return zero bytes 15354 instead of up to 1024. 15355 15356- bpo-26616: Fixed a bug in datetime.astimezone() method. 15357 15358- bpo-21925: :func:`warnings.formatwarning` now catches exceptions on 15359 ``linecache.getline(...)`` to be able to log :exc:`ResourceWarning` 15360 emitted late during the Python shutdown process. 15361 15362- bpo-24266: Ctrl+C during Readline history search now cancels the search 15363 mode when compiled with Readline 7. 15364 15365- bpo-26560: Avoid potential ValueError in BaseHandler.start_response. 15366 Initial patch by Peter Inglesby. 15367 15368Security 15369-------- 15370 15371- bpo-26313: ssl.py _load_windows_store_certs fails if windows cert store is 15372 empty. Patch by Baji. 15373 15374Library 15375------- 15376 15377- bpo-26569: Fix :func:`pyclbr.readmodule` and :func:`pyclbr.readmodule_ex` 15378 to support importing packages. 15379 15380- bpo-26499: Account for remaining Content-Length in HTTPResponse.readline() 15381 and read1(). Based on patch by Silent Ghost. Also document that 15382 HTTPResponse now supports these methods. 15383 15384- bpo-25320: Handle sockets in directories unittest discovery is scanning. 15385 Patch from Victor van den Elzen. 15386 15387- bpo-16181: cookiejar.http2time() now returns None if year is higher than 15388 datetime.MAXYEAR. 15389 15390- bpo-26513: Fixes platform module detection of Windows Server 15391 15392- bpo-23718: Fixed parsing time in week 0 before Jan 1. Original patch by 15393 Tamás Bence Gedai. 15394 15395- bpo-20589: Invoking Path.owner() and Path.group() on Windows now raise 15396 NotImplementedError instead of ImportError. 15397 15398- bpo-26177: Fixed the keys() method for Canvas and Scrollbar widgets. 15399 15400- bpo-15068: Got rid of excessive buffering in the fileinput module. The 15401 bufsize parameter is no longer used. 15402 15403- bpo-2202: Fix UnboundLocalError in 15404 AbstractDigestAuthHandler.get_algorithm_impls. Initial patch by Mathieu 15405 Dupuy. 15406 15407- bpo-25718: Fixed pickling and copying the accumulate() iterator with total 15408 is None. 15409 15410- bpo-26475: Fixed debugging output for regular expressions with the (?x) 15411 flag. 15412 15413- bpo-26457: Fixed the subnets() methods in IP network classes for the case 15414 when resulting prefix length is equal to maximal prefix length. Based on 15415 patch by Xiang Zhang. 15416 15417- bpo-26385: Remove the file if the internal open() call in 15418 NamedTemporaryFile() fails. Patch by Silent Ghost. 15419 15420- bpo-26402: Fix XML-RPC client to retry when the server shuts down a 15421 persistent connection. This was a regression related to the new 15422 http.client.RemoteDisconnected exception in 3.5.0a4. 15423 15424- bpo-25913: Leading ``<~`` is optional now in base64.a85decode() with 15425 adobe=True. Patch by Swati Jaiswal. 15426 15427- bpo-26186: Remove an invalid type check in importlib.util.LazyLoader. 15428 15429- bpo-26367: importlib.__import__() raises SystemError like 15430 builtins.__import__() when ``level`` is specified but without an 15431 accompanying package specified. 15432 15433- bpo-26309: In the "socketserver" module, shut down the request (closing 15434 the connected socket) when verify_request() returns false. Patch by Aviv 15435 Palivoda. 15436 15437Security 15438-------- 15439 15440- bpo-25939: On Windows open the cert store readonly in 15441 ssl.enum_certificates. 15442 15443Library 15444------- 15445 15446- bpo-25995: os.walk() no longer uses FDs proportional to the tree depth. 15447 15448- bpo-26117: The os.scandir() iterator now closes file descriptor not only 15449 when the iteration is finished, but when it was failed with error. 15450 15451- bpo-25911: Restored support of bytes paths in os.walk() on Windows. 15452 15453- bpo-26045: Add UTF-8 suggestion to error message when posting a 15454 non-Latin-1 string with http.client. 15455 15456- bpo-12923: Reset FancyURLopener's redirect counter even if there is an 15457 exception. Based on patches by Brian Brazil and Daniel Rocco. 15458 15459- bpo-25945: Fixed a crash when unpickle the functools.partial object with 15460 wrong state. Fixed a leak in failed functools.partial constructor. "args" 15461 and "keywords" attributes of functools.partial have now always types tuple 15462 and dict correspondingly. 15463 15464- bpo-26202: copy.deepcopy() now correctly copies range() objects with 15465 non-atomic attributes. 15466 15467- bpo-23076: Path.glob() now raises a ValueError if it's called with an 15468 invalid pattern. Patch by Thomas Nyberg. 15469 15470- bpo-19883: Fixed possible integer overflows in zipimport. 15471 15472- bpo-26227: On Windows, getnameinfo(), gethostbyaddr() and 15473 gethostbyname_ex() functions of the socket module now decode the hostname 15474 from the ANSI code page rather than UTF-8. 15475 15476- bpo-26147: xmlrpc now works with strings not encodable with used non-UTF-8 15477 encoding. 15478 15479- bpo-25935: Garbage collector now breaks reference loops with OrderedDict. 15480 15481- bpo-16620: Fixed AttributeError in msilib.Directory.glob(). 15482 15483- bpo-26013: Added compatibility with broken protocol 2 pickles created in 15484 old Python 3 versions (3.4.3 and lower). 15485 15486- bpo-25850: Use cross-compilation by default for 64-bit Windows. 15487 15488- bpo-17633: Improve zipimport's support for namespace packages. 15489 15490- bpo-24705: Fix sysconfig._parse_makefile not expanding ${} vars appearing 15491 before $() vars. 15492 15493- bpo-22138: Fix mock.patch behavior when patching descriptors. Restore 15494 original values after patching. Patch contributed by Sean McCully. 15495 15496- bpo-25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode 15497 option if it is safe to do so. 15498 15499- bpo-26012: Don't traverse into symlinks for ``**`` pattern in 15500 pathlib.Path.[r]glob(). 15501 15502- bpo-24120: Ignore PermissionError when traversing a tree with 15503 pathlib.Path.[r]glob(). Patch by Ulrich Petri. 15504 15505- bpo-25447: fileinput now uses sys.stdin as-is if it does not have a buffer 15506 attribute (restores backward compatibility). 15507 15508- bpo-25447: Copying the lru_cache() wrapper object now always works, 15509 independently from the type of the wrapped object (by returning the 15510 original object unchanged). 15511 15512- bpo-24103: Fixed possible use after free in ElementTree.XMLPullParser. 15513 15514- bpo-25860: os.fwalk() no longer skips remaining directories when error 15515 occurs. Original patch by Samson Lee. 15516 15517- bpo-25914: Fixed and simplified OrderedDict.__sizeof__. 15518 15519- bpo-25902: Fixed various refcount issues in ElementTree iteration. 15520 15521- bpo-25717: Restore the previous behaviour of tolerating most fstat() 15522 errors when opening files. This was a regression in 3.5a1, and stopped 15523 anonymous temporary files from working in special cases. 15524 15525- bpo-24903: Fix regression in number of arguments compileall accepts when 15526 '-d' is specified. The check on the number of arguments has been dropped 15527 completely as it never worked correctly anyway. 15528 15529- bpo-25764: In the subprocess module, preserve any exception caused by 15530 fork() failure when preexec_fn is used. 15531 15532- bpo-6478: _strptime's regexp cache now is reset after changing timezone 15533 with time.tzset(). 15534 15535- bpo-14285: When executing a package with the "python -m package" option, 15536 and package initialization fails, a proper traceback is now reported. The 15537 "runpy" module now lets exceptions from package initialization pass back 15538 to the caller, rather than raising ImportError. 15539 15540- bpo-19771: Also in runpy and the "-m" option, omit the irrelevant message 15541 ". . . is a package and cannot be directly executed" if the package could 15542 not even be initialized (e.g. due to a bad ``*.pyc`` file). 15543 15544- bpo-25177: Fixed problem with the mean of very small and very large 15545 numbers. As a side effect, statistics.mean and statistics.variance should 15546 be significantly faster. 15547 15548- bpo-25718: Fixed copying object with state with boolean value is false. 15549 15550- bpo-10131: Fixed deep copying of minidom documents. Based on patch by 15551 Marian Ganisin. 15552 15553- bpo-25725: Fixed a reference leak in pickle.loads() when unpickling 15554 invalid data including tuple instructions. 15555 15556- bpo-25663: In the Readline completer, avoid listing duplicate global 15557 names, and search the global namespace before searching builtins. 15558 15559- bpo-25688: Fixed file leak in ElementTree.iterparse() raising an error. 15560 15561- bpo-23914: Fixed SystemError raised by unpickler on broken pickle data. 15562 15563- bpo-25691: Fixed crash on deleting ElementTree.Element attributes. 15564 15565- bpo-25624: ZipFile now always writes a ZIP_STORED header for directory 15566 entries. Patch by Dingyuan Wang. 15567 15568- Skip getaddrinfo if host is already resolved. Patch by A. Jesse Jiryu 15569 Davis. 15570 15571- bpo-26050: Add asyncio.StreamReader.readuntil() method. Patch by Марк 15572 Коренберг. 15573 15574- bpo-25924: Avoid unnecessary serialization of getaddrinfo(3) calls on OS X 15575 versions 10.5 or higher. Original patch by A. Jesse Jiryu Davis. 15576 15577- bpo-26406: Avoid unnecessary serialization of getaddrinfo(3) calls on 15578 current versions of OpenBSD and NetBSD. Patch by A. Jesse Jiryu Davis. 15579 15580- bpo-26848: Fix asyncio/subprocess.communicate() to handle empty input. 15581 Patch by Jack O'Connor. 15582 15583- bpo-27040: Add loop.get_exception_handler method 15584 15585- bpo-27041: asyncio: Add loop.create_future method 15586 15587- bpo-27223: asyncio: Fix _read_ready and _write_ready to respect 15588 _conn_lost. Patch by Łukasz Langa. 15589 15590- bpo-22970: asyncio: Fix inconsistency cancelling Condition.wait. Patch by 15591 David Coles. 15592 15593IDLE 15594---- 15595 15596- bpo-5124: Paste with text selected now replaces the selection on X11. This 15597 matches how paste works on Windows, Mac, most modern Linux apps, and ttk 15598 widgets. Original patch by Serhiy Storchaka. 15599 15600- bpo-24759: Make clear in idlelib.idle_test.__init__ that the directory is 15601 a private implementation of test.test_idle and tool for maintainers. 15602 15603- bpo-27196: Stop 'ThemeChanged' warnings when running IDLE tests. These 15604 persisted after other warnings were suppressed in #20567. Apply Serhiy 15605 Storchaka's update_idletasks solution to four test files. Record this 15606 additional advice in idle_test/README.txt 15607 15608- bpo-20567: Revise idle_test/README.txt with advice about avoiding tk 15609 warning messages from tests. Apply advice to several IDLE tests. 15610 15611- bpo-27117: Make colorizer htest and turtledemo work with dark themes. Move 15612 code for configuring text widget colors to a new function. 15613 15614- bpo-26673: When tk reports font size as 0, change to size 10. Such fonts 15615 on Linux prevented the configuration dialog from opening. 15616 15617- bpo-21939: Add test for IDLE's percolator. Original patch by Saimadhav 15618 Heblikar. 15619 15620- bpo-21676: Add test for IDLE's replace dialog. Original patch by Saimadhav 15621 Heblikar. 15622 15623- bpo-18410: Add test for IDLE's search dialog. Original patch by Westley 15624 Martínez. 15625 15626- bpo-21703: Add test for IDLE's undo delegator. Original patch by Saimadhav 15627 Heblikar . 15628 15629- bpo-27044: Add ConfigDialog.remove_var_callbacks to stop memory leaks. 15630 15631- bpo-23977: Add more asserts to test_delegator. 15632 15633- bpo-20640: Add tests for idlelib.configHelpSourceEdit. Patch by Saimadhav 15634 Heblikar. 15635 15636- In the 'IDLE-console differences' section of the IDLE doc, clarify how 15637 running with IDLE affects sys.modules and the standard streams. 15638 15639- bpo-25507: fix incorrect change in IOBinding that prevented printing. 15640 Augment IOBinding htest to include all major IOBinding functions. 15641 15642- bpo-25905: Revert unwanted conversion of ' to ’ RIGHT SINGLE QUOTATION 15643 MARK in README.txt and open this and NEWS.txt with 'ascii'. Re-encode 15644 CREDITS.txt to utf-8 and open it with 'utf-8'. 15645 15646Documentation 15647------------- 15648 15649- bpo-19489: Moved the search box from the sidebar to the header and footer 15650 of each page. Patch by Ammar Askar. 15651 15652- bpo-24136: Document the new PEP 448 unpacking syntax of 3.5. 15653 15654- bpo-26736: Used HTTPS for external links in the documentation if possible. 15655 15656- bpo-6953: Rework the Readline module documentation to group related 15657 functions together, and add more details such as what underlying Readline 15658 functions and variables are accessed. 15659 15660- bpo-23606: Adds note to ctypes documentation regarding cdll.msvcrt. 15661 15662- bpo-25500: Fix documentation to not claim that __import__ is searched for 15663 in the global scope. 15664 15665- bpo-26014: Update 3.x packaging documentation: * "See also" links to the 15666 new docs are now provided in the legacy pages * links to setuptools 15667 documentation have been updated 15668 15669Tests 15670----- 15671 15672- bpo-21916: Added tests for the turtle module. Patch by ingrid, Gregory 15673 Loyse and Jelle Zijlstra. 15674 15675- bpo-26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) 15676 was untested. 15677 15678- bpo-26015: Added new tests for pickling iterators of mutable sequences. 15679 15680- bpo-26325: Added test.support.check_no_resource_warning() to check that no 15681 ResourceWarning is emitted. 15682 15683- bpo-25940: Changed test_ssl to use self-signed.pythontest.net. This 15684 avoids relying on svn.python.org, which recently changed root certificate. 15685 15686- bpo-25616: Tests for OrderedDict are extracted from test_collections into 15687 separate file test_ordered_dict. 15688 15689- bpo-26583: Skip test_timestamp_overflow in test_import if bytecode files 15690 cannot be written. 15691 15692Build 15693----- 15694 15695- bpo-26884: Fix linking extension modules for cross builds. Patch by Xavier 15696 de Gaye. 15697 15698- bpo-22359: Disable the rules for running _freeze_importlib and pgen when 15699 cross-compiling. The output of these programs is normally saved with the 15700 source code anyway, and is still regenerated when doing a native build. 15701 Patch by Xavier de Gaye. 15702 15703- bpo-27229: Fix the cross-compiling pgen rule for in-tree builds. Patch by 15704 Xavier de Gaye. 15705 15706- bpo-21668: Link audioop, _datetime, _ctypes_test modules to libm, except 15707 on Mac OS X. Patch written by Xavier de Gaye. 15708 15709- bpo-25702: A --with-lto configure option has been added that will enable 15710 link time optimizations at build time during a make profile-opt. Some 15711 compilers and toolchains are known to not produce stable code when using 15712 LTO, be sure to test things thoroughly before relying on it. It can 15713 provide a few % speed up over profile-opt alone. 15714 15715- bpo-26624: Adds validation of ucrtbase[d].dll version with warning for old 15716 versions. 15717 15718- bpo-17603: Avoid error about nonexistent fileblocks.o file by using a 15719 lower-level check for st_blocks in struct stat. 15720 15721- bpo-26079: Fixing the build output folder for tix-8.4.3.6. Patch by Bjoern 15722 Thiel. 15723 15724- bpo-26465: Update Windows builds to use OpenSSL 1.0.2g. 15725 15726- bpo-24421: Compile Modules/_math.c once, before building extensions. 15727 Previously it could fail to compile properly if the math and cmath builds 15728 were concurrent. 15729 15730- bpo-25348: Added ``--pgo`` and ``--pgo-job`` arguments to 15731 ``PCbuild\build.bat`` for building with Profile-Guided Optimization. The 15732 old ``PCbuild\build_pgo.bat`` script is now deprecated, and simply calls 15733 ``PCbuild\build.bat --pgo %*``. 15734 15735- bpo-25827: Add support for building with ICC to ``configure``, including a 15736 new ``--with-icc`` flag. 15737 15738- bpo-25696: Fix installation of Python on UNIX with make -j9. 15739 15740- bpo-26930: Update OS X 10.5+ 32-bit-only installer to build and link with 15741 OpenSSL 1.0.2h. 15742 15743- bpo-26268: Update Windows builds to use OpenSSL 1.0.2f. 15744 15745- bpo-25136: Support Apple Xcode 7's new textual SDK stub libraries. 15746 15747- bpo-24324: Do not enable unreachable code warnings when using gcc as the 15748 option does not work correctly in older versions of gcc and has been 15749 silently removed as of gcc-4.5. 15750 15751Windows 15752------- 15753 15754- bpo-27053: Updates make_zip.py to correctly generate library ZIP file. 15755 15756- bpo-26268: Update the prepare_ssl.py script to handle OpenSSL releases 15757 that don't include the contents of the include directory (that is, 1.0.2e 15758 and later). 15759 15760- bpo-26071: bdist_wininst created binaries fail to start and find 32bit 15761 Python 15762 15763- bpo-26073: Update the list of magic numbers in launcher 15764 15765- bpo-26065: Excludes venv from library when generating embeddable distro. 15766 15767Tools/Demos 15768----------- 15769 15770- bpo-26799: Fix python-gdb.py: don't get C types once when the Python code 15771 is loaded, but get C types on demand. The C types can change if 15772 python-gdb.py is loaded before the Python executable. Patch written by 15773 Thomas Ilsche. 15774 15775- bpo-26271: Fix the Freeze tool to properly use flags passed through 15776 configure. Patch by Daniel Shaulov. 15777 15778- bpo-26489: Add dictionary unpacking support to Tools/parser/unparse.py. 15779 Patch by Guo Ci Teo. 15780 15781- bpo-26316: Fix variable name typo in Argument Clinic. 15782 15783Windows 15784------- 15785 15786- bpo-17500: Remove unused and outdated icons. (See also: 15787 https://github.com/python/pythondotorg/issues/945) 15788 15789 15790What's New in Python 3.5.1 final? 15791================================= 15792 15793*Release date: 2015-12-06* 15794 15795Core and Builtins 15796----------------- 15797 15798- bpo-25709: Fixed problem with in-place string concatenation and utf-8 15799 cache. 15800 15801Windows 15802------- 15803 15804- bpo-25715: Python 3.5.1 installer shows wrong upgrade path and incorrect 15805 logic for launcher detection. 15806 15807 15808What's New in Python 3.5.1 release candidate 1? 15809=============================================== 15810 15811*Release date: 2015-11-22* 15812 15813Core and Builtins 15814----------------- 15815 15816- bpo-25630: Fix a possible segfault during argument parsing in functions 15817 that accept filesystem paths. 15818 15819- bpo-23564: Fixed a partially broken sanity check in the _posixsubprocess 15820 internals regarding how fds_to_pass were passed to the child. The bug had 15821 no actual impact as subprocess.py already avoided it. 15822 15823- bpo-25388: Fixed tokenizer crash when processing undecodable source code 15824 with a null byte. 15825 15826- bpo-25462: The hash of the key now is calculated only once in most 15827 operations in C implementation of OrderedDict. 15828 15829- bpo-22995: Default implementation of __reduce__ and __reduce_ex__ now 15830 rejects builtin types with not defined __new__. 15831 15832- bpo-25555: Fix parser and AST: fill lineno and col_offset of "arg" node 15833 when compiling AST from Python objects. 15834 15835- bpo-24802: Avoid buffer overreads when int(), float(), compile(), exec() 15836 and eval() are passed bytes-like objects. These objects are not 15837 necessarily terminated by a null byte, but the functions assumed they 15838 were. 15839 15840- bpo-24726: Fixed a crash and leaking NULL in repr() of OrderedDict that 15841 was mutated by direct calls of dict methods. 15842 15843- bpo-25449: Iterating OrderedDict with keys with unstable hash now raises 15844 KeyError in C implementations as well as in Python implementation. 15845 15846- bpo-25395: Fixed crash when highly nested OrderedDict structures were 15847 garbage collected. 15848 15849- bpo-25274: sys.setrecursionlimit() now raises a RecursionError if the new 15850 recursion limit is too low depending at the current recursion depth. 15851 Modify also the "lower-water mark" formula to make it monotonic. This mark 15852 is used to decide when the overflowed flag of the thread state is reset. 15853 15854- bpo-24402: Fix input() to prompt to the redirected stdout when 15855 sys.stdout.fileno() fails. 15856 15857- bpo-24806: Prevent builtin types that are not allowed to be subclassed 15858 from being subclassed through multiple inheritance. 15859 15860- bpo-24848: Fixed a number of bugs in UTF-7 decoding of misformed data. 15861 15862- bpo-25280: Import trace messages emitted in verbose (-v) mode are no 15863 longer formatted twice. 15864 15865- bpo-25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom() 15866 function instead of the getentropy() function. The getentropy() function 15867 is blocking to generate very good quality entropy, os.urandom() doesn't 15868 need such high-quality entropy. 15869 15870- bpo-25182: The stdprinter (used as sys.stderr before the io module is 15871 imported at startup) now uses the backslashreplace error handler. 15872 15873- bpo-25131: Make the line number and column offset of set/dict literals and 15874 comprehensions correspond to the opening brace. 15875 15876- bpo-25150: Hide the private _Py_atomic_xxx symbols from the public 15877 Python.h header to fix a compilation error with OpenMP. 15878 PyThreadState_GET() becomes an alias to PyThreadState_Get() to avoid ABI 15879 incompatibilities. 15880 15881Library 15882------- 15883 15884- bpo-25626: Change three zlib functions to accept sizes that fit in 15885 Py_ssize_t, but internally cap those sizes to UINT_MAX. This resolves a 15886 regression in 3.5 where GzipFile.read() failed to read chunks larger than 15887 2 or 4 GiB. The change affects the zlib.Decompress.decompress() 15888 max_length parameter, the zlib.decompress() bufsize parameter, and the 15889 zlib.Decompress.flush() length parameter. 15890 15891- bpo-25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True) 15892 when the OS gives priority to errors such as EACCES over EEXIST. 15893 15894- bpo-25593: Change semantics of EventLoop.stop() in asyncio. 15895 15896- bpo-6973: When we know a subprocess.Popen process has died, do not allow 15897 the send_signal(), terminate(), or kill() methods to do anything as they 15898 could potentially signal a different process. 15899 15900- bpo-25590: In the Readline completer, only call getattr() once per 15901 attribute. 15902 15903- bpo-25498: Fix a crash when garbage-collecting ctypes objects created by 15904 wrapping a memoryview. This was a regression made in 3.5a1. Based on 15905 patch by Eryksun. 15906 15907- bpo-25584: Added "escape" to the __all__ list in the glob module. 15908 15909- bpo-25584: Fixed recursive glob() with patterns starting with ``**``. 15910 15911- bpo-25446: Fix regression in smtplib's AUTH LOGIN support. 15912 15913- bpo-18010: Fix the pydoc web server's module search function to handle 15914 exceptions from importing packages. 15915 15916- bpo-25554: Got rid of circular references in regular expression parsing. 15917 15918- bpo-25510: fileinput.FileInput.readline() now returns b'' instead of '' at 15919 the end if the FileInput was opened with binary mode. Patch by Ryosuke 15920 Ito. 15921 15922- bpo-25503: Fixed inspect.getdoc() for inherited docstrings of properties. 15923 Original patch by John Mark Vandenberg. 15924 15925- bpo-25515: Always use os.urandom as a source of randomness in uuid.uuid4. 15926 15927- bpo-21827: Fixed textwrap.dedent() for the case when largest common 15928 whitespace is a substring of smallest leading whitespace. Based on patch 15929 by Robert Li. 15930 15931- bpo-25447: The lru_cache() wrapper objects now can be copied and pickled 15932 (by returning the original object unchanged). 15933 15934- bpo-25390: typing: Don't crash on Union[str, Pattern]. 15935 15936- bpo-25441: asyncio: Raise error from drain() when socket is closed. 15937 15938- bpo-25410: Cleaned up and fixed minor bugs in C implementation of 15939 OrderedDict. 15940 15941- bpo-25411: Improved Unicode support in SMTPHandler through better use of 15942 the email package. Thanks to user simon04 for the patch. 15943 15944- bpo-25407: Remove mentions of the formatter module being removed in Python 15945 3.6. 15946 15947- bpo-25406: Fixed a bug in C implementation of OrderedDict.move_to_end() 15948 that caused segmentation fault or hang in iterating after moving several 15949 items to the start of ordered dict. 15950 15951- bpo-25364: zipfile now works in threads disabled builds. 15952 15953- bpo-25328: smtpd's SMTPChannel now correctly raises a ValueError if both 15954 decode_data and enable_SMTPUTF8 are set to true. 15955 15956- bpo-25316: distutils raises OSError instead of DistutilsPlatformError when 15957 MSVC is not installed. 15958 15959- bpo-25380: Fixed protocol for the STACK_GLOBAL opcode in 15960 pickletools.opcodes. 15961 15962- bpo-23972: Updates asyncio datagram create method allowing reuseport and 15963 reuseaddr socket options to be set prior to binding the socket. Mirroring 15964 the existing asyncio create_server method the reuseaddr option for 15965 datagram sockets defaults to True if the O/S is 'posix' (except if the 15966 platform is Cygwin). Patch by Chris Laws. 15967 15968- bpo-25304: Add asyncio.run_coroutine_threadsafe(). This lets you submit a 15969 coroutine to a loop from another thread, returning a 15970 concurrent.futures.Future. By Vincent Michel. 15971 15972- bpo-25232: Fix CGIRequestHandler to split the query from the URL at the 15973 first question mark (?) rather than the last. Patch from Xiang Zhang. 15974 15975- bpo-24657: Prevent CGIRequestHandler from collapsing slashes in the query 15976 part of the URL as if it were a path. Patch from Xiang Zhang. 15977 15978- bpo-24483: C implementation of functools.lru_cache() now calculates key's 15979 hash only once. 15980 15981- bpo-22958: Constructor and update method of weakref.WeakValueDictionary 15982 now accept the self and the dict keyword arguments. 15983 15984- bpo-22609: Constructor of collections.UserDict now accepts the self 15985 keyword argument. 15986 15987- bpo-25111: Fixed comparison of traceback.FrameSummary. 15988 15989- bpo-25262: Added support for BINBYTES8 opcode in Python implementation of 15990 unpickler. Highest 32 bits of 64-bit size for BINUNICODE8 and BINBYTES8 15991 opcodes no longer silently ignored on 32-bit platforms in C 15992 implementation. 15993 15994- bpo-25034: Fix string.Formatter problem with auto-numbering and nested 15995 format_specs. Patch by Anthon van der Neut. 15996 15997- bpo-25233: Rewrite the guts of asyncio.Queue and asyncio.Semaphore to be 15998 more understandable and correct. 15999 16000- bpo-25203: Failed readline.set_completer_delims() no longer left the 16001 module in inconsistent state. 16002 16003- bpo-23600: Default implementation of tzinfo.fromutc() was returning wrong 16004 results in some cases. 16005 16006- bpo-23329: Allow the ssl module to be built with older versions of 16007 LibreSSL. 16008 16009- Prevent overflow in _Unpickler_Read. 16010 16011- bpo-25047: The XML encoding declaration written by Element Tree now 16012 respects the letter case given by the user. This restores the ability to 16013 write encoding names in uppercase like "UTF-8", which worked in Python 2. 16014 16015- bpo-25135: Make deque_clear() safer by emptying the deque before clearing. 16016 This helps avoid possible reentrancy issues. 16017 16018- bpo-19143: platform module now reads Windows version from kernel32.dll to 16019 avoid compatibility shims. 16020 16021- bpo-25092: Fix datetime.strftime() failure when errno was already set to 16022 EINVAL. 16023 16024- bpo-23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods 16025 of datetime.datetime: microseconds are now rounded to nearest with ties 16026 going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding 16027 towards minus infinity (ROUND_FLOOR). It's important that these methods 16028 use the same rounding mode than datetime.timedelta to keep the property: 16029 (datetime(1970,1,1) + timedelta(seconds=t)) == 16030 datetime.utcfromtimestamp(t). It also the rounding mode used by 16031 round(float) for example. 16032 16033- bpo-25155: Fix datetime.datetime.now() and datetime.datetime.utcnow() on 16034 Windows to support date after year 2038. It was a regression introduced in 16035 Python 3.5.0. 16036 16037- bpo-25108: Omitted internal frames in traceback functions print_stack(), 16038 format_stack(), and extract_stack() called without arguments. 16039 16040- bpo-25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows. 16041 16042- bpo-24684: socket.socket.getaddrinfo() now calls 16043 PyUnicode_AsEncodedString() instead of calling the encode() method of the 16044 host, to handle correctly custom string with an encode() method which 16045 doesn't return a byte string. The encoder of the IDNA codec is now called 16046 directly instead of calling the encode() method of the string. 16047 16048- bpo-25060: Correctly compute stack usage of the BUILD_MAP opcode. 16049 16050- bpo-24857: Comparing call_args to a long sequence now correctly returns a 16051 boolean result instead of raising an exception. Patch by A Kaptur. 16052 16053- bpo-23144: Make sure that HTMLParser.feed() returns all the data, even 16054 when convert_charrefs is True. 16055 16056- bpo-24982: shutil.make_archive() with the "zip" format now adds entries 16057 for directories (including empty directories) in ZIP file. 16058 16059- bpo-25019: Fixed a crash caused by setting non-string key of expat parser. 16060 Based on patch by John Leitch. 16061 16062- bpo-16180: Exit pdb if file has syntax error, instead of trapping user in 16063 an infinite loop. Patch by Xavier de Gaye. 16064 16065- bpo-24891: Fix a race condition at Python startup if the file descriptor 16066 of stdin (0), stdout (1) or stderr (2) is closed while Python is creating 16067 sys.stdin, sys.stdout and sys.stderr objects. These attributes are now set 16068 to None if the creation of the object failed, instead of raising an 16069 OSError exception. Initial patch written by Marco Paolini. 16070 16071- bpo-24992: Fix error handling and a race condition (related to garbage 16072 collection) in collections.OrderedDict constructor. 16073 16074- bpo-24881: Fixed setting binary mode in Python implementation of FileIO on 16075 Windows and Cygwin. Patch from Akira Li. 16076 16077- bpo-25578: Fix (another) memory leak in SSLSocket.getpeercer(). 16078 16079- bpo-25530: Disable the vulnerable SSLv3 protocol by default when creating 16080 ssl.SSLContext. 16081 16082- bpo-25569: Fix memory leak in SSLSocket.getpeercert(). 16083 16084- bpo-25471: Sockets returned from accept() shouldn't appear to be 16085 nonblocking. 16086 16087- bpo-25319: When threading.Event is reinitialized, the underlying condition 16088 should use a regular lock rather than a recursive lock. 16089 16090- bpo-21112: Fix regression in unittest.expectedFailure on subclasses. Patch 16091 from Berker Peksag. 16092 16093- bpo-24764: cgi.FieldStorage.read_multi() now ignores the Content-Length 16094 header in part headers. Patch written by Peter Landry and reviewed by 16095 Pierre Quentel. 16096 16097- bpo-24913: Fix overrun error in deque.index(). Found by John Leitch and 16098 Bryce Darling. 16099 16100- bpo-24774: Fix docstring in http.server.test. Patch from Chiu-Hsiang Hsu. 16101 16102- bpo-21159: Improve message in 16103 configparser.InterpolationMissingOptionError. Patch from Łukasz Langa. 16104 16105- bpo-20362: Honour TestCase.longMessage correctly in assertRegex. Patch 16106 from Ilia Kurenkov. 16107 16108- bpo-23572: Fixed functools.singledispatch on classes with falsy 16109 metaclasses. Patch by Ethan Furman. 16110 16111- asyncio: ensure_future() now accepts awaitable objects. 16112 16113IDLE 16114---- 16115 16116- bpo-15348: Stop the debugger engine (normally in a user process) before 16117 closing the debugger window (running in the IDLE process). This prevents 16118 the RuntimeErrors that were being caught and ignored. 16119 16120- bpo-24455: Prevent IDLE from hanging when a) closing the shell while the 16121 debugger is active (15347); b) closing the debugger with the [X] button 16122 (15348); and c) activating the debugger when already active (24455). The 16123 patch by Mark Roseman does this by making two changes. 1. Suspend and 16124 resume the gui.interaction method with the tcl vwait mechanism intended 16125 for this purpose (instead of root.mainloop & .quit). 2. In gui.run, allow 16126 any existing interaction to terminate first. 16127 16128- Change 'The program' to 'Your program' in an IDLE 'kill program?' message 16129 to make it clearer that the program referred to is the currently running 16130 user program, not IDLE itself. 16131 16132- bpo-24750: Improve the appearance of the IDLE editor window status bar. 16133 Patch by Mark Roseman. 16134 16135- bpo-25313: Change the handling of new built-in text color themes to better 16136 address the compatibility problem introduced by the addition of IDLE Dark. 16137 Consistently use the revised idleConf.CurrentTheme everywhere in idlelib. 16138 16139- bpo-24782: Extension configuration is now a tab in the IDLE Preferences 16140 dialog rather than a separate dialog. The former tabs are now a sorted 16141 list. Patch by Mark Roseman. 16142 16143- bpo-22726: Re-activate the config dialog help button with some content 16144 about the other buttons and the new IDLE Dark theme. 16145 16146- bpo-24820: IDLE now has an 'IDLE Dark' built-in text color theme. It is 16147 more or less IDLE Classic inverted, with a cobalt blue background. 16148 Strings, comments, keywords, ... are still green, red, orange, ... . To 16149 use it with IDLEs released before November 2015, hit the 'Save as New 16150 Custom Theme' button and enter a new name, such as 'Custom Dark'. The 16151 custom theme will work with any IDLE release, and can be modified. 16152 16153- bpo-25224: README.txt is now an idlelib index for IDLE developers and 16154 curious users. The previous user content is now in the IDLE doc chapter. 16155 'IDLE' now means 'Integrated Development and Learning Environment'. 16156 16157- bpo-24820: Users can now set breakpoint colors in Settings -> Custom 16158 Highlighting. Original patch by Mark Roseman. 16159 16160- bpo-24972: Inactive selection background now matches active selection 16161 background, as configured by users, on all systems. Found items are now 16162 always highlighted on Windows. Initial patch by Mark Roseman. 16163 16164- bpo-24570: Idle: make calltip and completion boxes appear on Macs affected 16165 by a tk regression. Initial patch by Mark Roseman. 16166 16167- bpo-24988: Idle ScrolledList context menus (used in debugger) now work on 16168 Mac Aqua. Patch by Mark Roseman. 16169 16170- bpo-24801: Make right-click for context menu work on Mac Aqua. Patch by 16171 Mark Roseman. 16172 16173- bpo-25173: Associate tkinter messageboxes with a specific widget. For Mac 16174 OSX, make them a 'sheet'. Patch by Mark Roseman. 16175 16176- bpo-25198: Enhance the initial html viewer now used for Idle Help. 16177 Properly indent fixed-pitch text (patch by Mark Roseman). Give code 16178 snippet a very Sphinx-like light blueish-gray background. Re-use initial 16179 width and height set by users for shell and editor. When the Table of 16180 Contents (TOC) menu is used, put the section header at the top of the 16181 screen. 16182 16183- bpo-25225: Condense and rewrite Idle doc section on text colors. 16184 16185- bpo-21995: Explain some differences between IDLE and console Python. 16186 16187- bpo-22820: Explain need for *print* when running file from Idle editor. 16188 16189- bpo-25224: Doc: augment Idle feature list and no-subprocess section. 16190 16191- bpo-25219: Update doc for Idle command line options. Some were missing and 16192 notes were not correct. 16193 16194- bpo-24861: Most of idlelib is private and subject to change. Use 16195 idleib.idle.* to start Idle. See idlelib.__init__.__doc__. 16196 16197- bpo-25199: Idle: add synchronization comments for future maintainers. 16198 16199- bpo-16893: Replace help.txt with help.html for Idle doc display. The new 16200 idlelib/help.html is rstripped Doc/build/html/library/idle.html. It looks 16201 better than help.txt and will better document Idle as released. The 16202 tkinter html viewer that works for this file was written by Mark Roseman. 16203 The now unused EditorWindow.HelpDialog class and helt.txt file are 16204 deprecated. 16205 16206- bpo-24199: Deprecate unused idlelib.idlever with possible removal in 3.6. 16207 16208- bpo-24790: Remove extraneous code (which also create 2 & 3 conflicts). 16209 16210Documentation 16211------------- 16212 16213- bpo-22558: Add remaining doc links to source code for Python-coded 16214 modules. Patch by Yoni Lavi. 16215 16216- bpo-12067: Rewrite Comparisons section in the Expressions chapter of the 16217 language reference. Some of the details of comparing mixed types were 16218 incorrect or ambiguous. NotImplemented is only relevant at a lower level 16219 than the Expressions chapter. Added details of comparing range() objects, 16220 and default behaviour and consistency suggestions for user-defined 16221 classes. Patch from Andy Maier. 16222 16223- bpo-24952: Clarify the default size argument of stack_size() in the 16224 "threading" and "_thread" modules. Patch from Mattip. 16225 16226- bpo-23725: Overhaul tempfile docs. Note deprecated status of mktemp. Patch 16227 from Zbigniew Jędrzejewski-Szmek. 16228 16229- bpo-24808: Update the types of some PyTypeObject fields. Patch by Joseph 16230 Weston. 16231 16232- bpo-22812: Fix unittest discovery examples. Patch from Pam McA'Nulty. 16233 16234Tests 16235----- 16236 16237- bpo-25449: Added tests for OrderedDict subclasses. 16238 16239- bpo-25099: Make test_compileall not fail when an entry on sys.path cannot 16240 be written to (commonly seen in administrative installs on Windows). 16241 16242- bpo-23919: Prevents assert dialogs appearing in the test suite. 16243 16244- ``PCbuild\rt.bat`` now accepts an unlimited number of arguments to pass 16245 along to regrtest.py. Previously there was a limit of 9. 16246 16247Build 16248----- 16249 16250- bpo-24915: Add LLVM support for PGO builds and use the test suite to 16251 generate the profile data. Initial patch by Alecsandru Patrascu of Intel. 16252 16253- bpo-24910: Windows MSIs now have unique display names. 16254 16255- bpo-24986: It is now possible to build Python on Windows without errors 16256 when external libraries are not available. 16257 16258Windows 16259------- 16260 16261- bpo-25450: Updates shortcuts to start Python in installation directory. 16262 16263- bpo-25164: Changes default all-users install directory to match per-user 16264 directory. 16265 16266- bpo-25143: Improves installer error messages for unsupported platforms. 16267 16268- bpo-25163: Display correct directory in installer when using non-default 16269 settings. 16270 16271- bpo-25361: Disables use of SSE2 instructions in Windows 32-bit build 16272 16273- bpo-25089: Adds logging to installer for case where launcher is not 16274 selected on upgrade. 16275 16276- bpo-25165: Windows uninstallation should not remove launcher if other 16277 versions remain 16278 16279- bpo-25112: py.exe launcher is missing icons 16280 16281- bpo-25102: Windows installer does not precompile for -O or -OO. 16282 16283- bpo-25081: Makes Back button in installer go back to upgrade page when 16284 upgrading. 16285 16286- bpo-25091: Increases font size of the installer. 16287 16288- bpo-25126: Clarifies that the non-web installer will download some 16289 components. 16290 16291- bpo-25213: Restores requestedExecutionLevel to manifest to disable UAC 16292 virtualization. 16293 16294- bpo-25022: Removed very outdated PC/example_nt/ directory. 16295 16296Tools/Demos 16297----------- 16298 16299- bpo-25440: Fix output of python-config --extension-suffix. 16300 16301 16302What's New in Python 3.5.0 final? 16303================================= 16304 16305*Release date: 2015-09-13* 16306 16307Build 16308----- 16309 16310- bpo-25071: Windows installer should not require TargetDir parameter when 16311 installing quietly. 16312 16313 16314What's New in Python 3.5.0 release candidate 4? 16315=============================================== 16316 16317*Release date: 2015-09-09* 16318 16319Library 16320------- 16321 16322- bpo-25029: Fixes MemoryError in test_strptime. 16323 16324Build 16325----- 16326 16327- bpo-25027: Reverts partial-static build options and adds vcruntime140.dll 16328 to Windows installation. 16329 16330 16331What's New in Python 3.5.0 release candidate 3? 16332=============================================== 16333 16334*Release date: 2015-09-07* 16335 16336Core and Builtins 16337----------------- 16338 16339- bpo-24305: Prevent import subsystem stack frames from being counted by the 16340 warnings.warn(stacklevel=) parameter. 16341 16342- bpo-24912: Prevent __class__ assignment to immutable built-in objects. 16343 16344- bpo-24975: Fix AST compilation for PEP 448 syntax. 16345 16346Library 16347------- 16348 16349- bpo-24917: time_strftime() buffer over-read. 16350 16351- bpo-24748: To resolve a compatibility problem found with py2exe and 16352 pywin32, imp.load_dynamic() once again ignores previously loaded modules 16353 to support Python modules replacing themselves with extension modules. 16354 Patch by Petr Viktorin. 16355 16356- bpo-24635: Fixed a bug in typing.py where isinstance([], typing.Iterable) 16357 would return True once, then False on subsequent calls. 16358 16359- bpo-24989: Fixed buffer overread in BytesIO.readline() if a position is 16360 set beyond size. Based on patch by John Leitch. 16361 16362- bpo-24913: Fix overrun error in deque.index(). Found by John Leitch and 16363 Bryce Darling. 16364 16365 16366What's New in Python 3.5.0 release candidate 2? 16367=============================================== 16368 16369*Release date: 2015-08-25* 16370 16371Core and Builtins 16372----------------- 16373 16374- bpo-24769: Interpreter now starts properly when dynamic loading is 16375 disabled. Patch by Petr Viktorin. 16376 16377- bpo-21167: NAN operations are now handled correctly when python is 16378 compiled with ICC even if -fp-model strict is not specified. 16379 16380- bpo-24492: A "package" lacking a __name__ attribute when trying to perform 16381 a ``from .. import ...`` statement will trigger an ImportError instead of 16382 an AttributeError. 16383 16384Library 16385------- 16386 16387- bpo-24847: Removes vcruntime140.dll dependency from Tcl/Tk. 16388 16389- bpo-24839: platform._syscmd_ver raises DeprecationWarning 16390 16391- bpo-24867: Fix Task.get_stack() for 'async def' coroutines 16392 16393 16394What's New in Python 3.5.0 release candidate 1? 16395=============================================== 16396 16397*Release date: 2015-08-09* 16398 16399Core and Builtins 16400----------------- 16401 16402- bpo-24667: Resize odict in all cases that the underlying dict resizes. 16403 16404Library 16405------- 16406 16407- bpo-24824: Signatures of codecs.encode() and codecs.decode() now are 16408 compatible with pydoc. 16409 16410- bpo-24634: Importing uuid should not try to load libc on Windows 16411 16412- bpo-24798: _msvccompiler.py doesn't properly support manifests 16413 16414- bpo-4395: Better testing and documentation of binary operators. Patch by 16415 Martin Panter. 16416 16417- bpo-23973: Update typing.py from GitHub repo. 16418 16419- bpo-23004: mock_open() now reads binary data correctly when the type of 16420 read_data is bytes. Initial patch by Aaron Hill. 16421 16422- bpo-23888: Handle fractional time in cookie expiry. Patch by ssh. 16423 16424- bpo-23652: Make it possible to compile the select module against the libc 16425 headers from the Linux Standard Base, which do not include some EPOLL 16426 macros. Patch by Matt Frank. 16427 16428- bpo-22932: Fix timezones in email.utils.formatdate. Patch from Dmitry 16429 Shachnev. 16430 16431- bpo-23779: imaplib raises TypeError if authenticator tries to abort. Patch 16432 from Craig Holmquist. 16433 16434- bpo-23319: Fix ctypes.BigEndianStructure, swap correctly bytes. Patch 16435 written by Matthieu Gautier. 16436 16437- bpo-23254: Document how to close the TCPServer listening socket. Patch 16438 from Martin Panter. 16439 16440- bpo-19450: Update Windows and OS X installer builds to use SQLite 3.8.11. 16441 16442- bpo-17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella. 16443 16444- bpo-24791: Fix grammar regression for call syntax: 'g(\*a or b)'. 16445 16446IDLE 16447---- 16448 16449- bpo-23672: Allow Idle to edit and run files with astral chars in name. 16450 Patch by Mohd Sanad Zaki Rizvi. 16451 16452- bpo-24745: Idle editor default font. Switch from Courier to 16453 platform-sensitive TkFixedFont. This should not affect current customized 16454 font selections. If there is a problem, edit 16455 $HOME/.idlerc/config-main.cfg and remove 'fontxxx' entries from [Editor 16456 Window]. Patch by Mark Roseman. 16457 16458- bpo-21192: Idle editor. When a file is run, put its name in the restart 16459 bar. Do not print false prompts. Original patch by Adnan Umer. 16460 16461- bpo-13884: Idle menus. Remove tearoff lines. Patch by Roger Serwy. 16462 16463Documentation 16464------------- 16465 16466- bpo-24129: Clarify the reference documentation for name resolution. This 16467 includes removing the assumption that readers will be familiar with the 16468 name resolution scheme Python used prior to the introduction of lexical 16469 scoping for function namespaces. Patch by Ivan Levkivskyi. 16470 16471- bpo-20769: Improve reload() docs. Patch by Dorian Pula. 16472 16473- bpo-23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan. 16474 16475- bpo-24729: Correct IO tutorial to match implementation regarding encoding 16476 parameter to open function. 16477 16478Tests 16479----- 16480 16481- bpo-24751: When running regrtest with the ``-w`` command line option, a 16482 test run is no longer marked as a failure if all tests succeed when 16483 re-run. 16484 16485 16486What's New in Python 3.5.0 beta 4? 16487================================== 16488 16489*Release date: 2015-07-26* 16490 16491Core and Builtins 16492----------------- 16493 16494- bpo-23573: Restored optimization of bytes.rfind() and bytearray.rfind() 16495 for single-byte argument on Linux. 16496 16497- bpo-24569: Make PEP 448 dictionary evaluation more consistent. 16498 16499- bpo-24583: Fix crash when set is mutated while being updated. 16500 16501- bpo-24407: Fix crash when dict is mutated while being updated. 16502 16503- bpo-24619: New approach for tokenizing async/await. As a consequence, it 16504 is now possible to have one-line 'async def foo(): await ..' functions. 16505 16506- bpo-24687: Plug refleak on SyntaxError in function parameters annotations. 16507 16508- bpo-15944: memoryview: Allow arbitrary formats when casting to bytes. 16509 Patch by Martin Panter. 16510 16511Library 16512------- 16513 16514- bpo-23441: rcompleter now prints a tab character instead of displaying 16515 possible completions for an empty word. Initial patch by Martin Sekera. 16516 16517- bpo-24683: Fixed crashes in _json functions called with arguments of 16518 inappropriate type. 16519 16520- bpo-21697: shutil.copytree() now correctly handles symbolic links that 16521 point to directories. Patch by Eduardo Seabra and Thomas Kluyver. 16522 16523- bpo-14373: Fixed segmentation fault when gc.collect() is called during 16524 constructing lru_cache (C implementation). 16525 16526- bpo-24695: Fix a regression in traceback.print_exception(). If 16527 exc_traceback is None we shouldn't print a traceback header like described 16528 in the documentation. 16529 16530- bpo-24620: Random.setstate() now validates the value of state last 16531 element. 16532 16533- bpo-22485: Fixed an issue that caused `inspect.getsource` to return 16534 incorrect results on nested functions. 16535 16536- bpo-22153: Improve unittest docs. Patch from Martin Panter and evilzero. 16537 16538- bpo-24580: Symbolic group references to open group in re patterns now are 16539 explicitly forbidden as well as numeric group references. 16540 16541- bpo-24206: Fixed __eq__ and __ne__ methods of inspect classes. 16542 16543- bpo-24631: Fixed regression in the timeit module with multiline setup. 16544 16545- bpo-18622: unittest.mock.mock_open().reset_mock would recurse infinitely. 16546 Patch from Nicola Palumbo and Laurent De Buyst. 16547 16548- bpo-23661: unittest.mock side_effects can now be exceptions again. This 16549 was a regression vs Python 3.4. Patch from Ignacio Rossi 16550 16551- bpo-24608: chunk.Chunk.read() now always returns bytes, not str. 16552 16553- bpo-18684: Fixed reading out of the buffer in the re module. 16554 16555- bpo-24259: tarfile now raises a ReadError if an archive is truncated 16556 inside a data segment. 16557 16558- bpo-15014: SMTP.auth() and SMTP.login() now support RFC 4954's optional 16559 initial-response argument to the SMTP AUTH command. 16560 16561- bpo-24669: Fix inspect.getsource() for 'async def' functions. Patch by Kai 16562 Groner. 16563 16564- bpo-24688: ast.get_docstring() for 'async def' functions. 16565 16566Build 16567----- 16568 16569- bpo-24603: Update Windows builds and OS X 10.5 installer to use OpenSSL 16570 1.0.2d. 16571 16572 16573What's New in Python 3.5.0 beta 3? 16574================================== 16575 16576*Release date: 2015-07-05* 16577 16578Core and Builtins 16579----------------- 16580 16581- bpo-24467: Fixed possible buffer over-read in bytearray. The bytearray 16582 object now always allocates place for trailing null byte and it's buffer 16583 now is always null-terminated. 16584 16585- Upgrade to Unicode 8.0.0. 16586 16587- bpo-24345: Add Py_tp_finalize slot for the stable ABI. 16588 16589- bpo-24400: Introduce a distinct type for PEP 492 coroutines; add 16590 types.CoroutineType, inspect.getcoroutinestate, 16591 inspect.getcoroutinelocals; coroutines no longer use CO_GENERATOR flag; 16592 sys.set_coroutine_wrapper works only for 'async def' coroutines; 16593 inspect.iscoroutine no longer uses collections.abc.Coroutine, it's 16594 intended to test for pure 'async def' coroutines only; add new opcode: 16595 GET_YIELD_FROM_ITER; fix generators wrapper used in types.coroutine to be 16596 instance of collections.abc.Generator; collections.abc.Awaitable and 16597 collections.abc.Coroutine can no longer be used to detect generator-based 16598 coroutines--use inspect.isawaitable instead. 16599 16600- bpo-24450: Add gi_yieldfrom to generators and cr_await to coroutines. 16601 Contributed by Benno Leslie and Yury Selivanov. 16602 16603- bpo-19235: Add new RecursionError exception. Patch by Georg Brandl. 16604 16605Library 16606------- 16607 16608- bpo-21750: mock_open.read_data can now be read from each instance, as it 16609 could in Python 3.3. 16610 16611- bpo-24552: Fix use after free in an error case of the _pickle module. 16612 16613- bpo-24514: tarfile now tolerates number fields consisting of only 16614 whitespace. 16615 16616- bpo-19176: Fixed doctype() related bugs in C implementation of 16617 ElementTree. A deprecation warning no longer issued by XMLParser subclass 16618 with default doctype() method. Direct call of doctype() now issues a 16619 warning. Parser's doctype() now is not called if target's doctype() is 16620 called. Based on patch by Martin Panter. 16621 16622- bpo-20387: Restore semantic round-trip correctness in tokenize/untokenize 16623 for tab-indented blocks. 16624 16625- bpo-24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm() 16626 functions of the audioop module. 16627 16628- bpo-24336: The contextmanager decorator now works with functions with 16629 keyword arguments called "func" and "self". Patch by Martin Panter. 16630 16631- bpo-24522: Fix possible integer overflow in json accelerator module. 16632 16633- bpo-24489: ensure a previously set C errno doesn't disturb cmath.polar(). 16634 16635- bpo-24408: Fixed AttributeError in measure() and metrics() methods of 16636 tkinter.Font. 16637 16638- bpo-14373: C implementation of functools.lru_cache() now can be used with 16639 methods. 16640 16641- bpo-24347: Set KeyError if PyDict_GetItemWithError returns NULL. 16642 16643- bpo-24348: Drop superfluous incref/decref. 16644 16645- bpo-24359: Check for changed OrderedDict size during iteration. 16646 16647- bpo-24368: Support keyword arguments in OrderedDict methods. 16648 16649- bpo-24362: Simplify the C OrderedDict fast nodes resize logic. 16650 16651- bpo-24377: Fix a ref leak in OrderedDict.__repr__. 16652 16653- bpo-24369: Defend against key-changes during iteration. 16654 16655Tests 16656----- 16657 16658- bpo-24373: _testmultiphase and xxlimited now use tp_traverse and 16659 tp_finalize to avoid reference leaks encountered when combining tp_dealloc 16660 with PyType_FromSpec (see issue #16690 for details) 16661 16662Documentation 16663------------- 16664 16665- bpo-24458: Update documentation to cover multi-phase initialization for 16666 extension modules (PEP 489). Patch by Petr Viktorin. 16667 16668- bpo-24351: Clarify what is meant by "identifier" in the context of 16669 string.Template instances. 16670 16671Build 16672----- 16673 16674- bpo-24432: Update Windows builds and OS X 10.5 installer to use OpenSSL 16675 1.0.2c. 16676 16677 16678What's New in Python 3.5.0 beta 2? 16679================================== 16680 16681*Release date: 2015-05-31* 16682 16683Core and Builtins 16684----------------- 16685 16686- bpo-24284: The startswith and endswith methods of the str class no longer 16687 return True when finding the empty string and the indexes are completely 16688 out of range. 16689 16690- bpo-24115: Update uses of PyObject_IsTrue(), PyObject_Not(), 16691 PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains() 16692 to check for and handle errors correctly. 16693 16694- bpo-24328: Fix importing one character extension modules. 16695 16696- bpo-11205: In dictionary displays, evaluate the key before the value. 16697 16698- bpo-24285: Fixed regression that prevented importing extension modules 16699 from inside packages. Patch by Petr Viktorin. 16700 16701Library 16702------- 16703 16704- bpo-23247: Fix a crash in the StreamWriter.reset() of CJK codecs. 16705 16706- bpo-24270: Add math.isclose() and cmath.isclose() functions as per PEP 16707 485. Contributed by Chris Barker and Tal Einat. 16708 16709- bpo-5633: Fixed timeit when the statement is a string and the setup is 16710 not. 16711 16712- bpo-24326: Fixed audioop.ratecv() with non-default weightB argument. 16713 Original patch by David Moore. 16714 16715- bpo-16991: Add a C implementation of OrderedDict. 16716 16717- bpo-23934: Fix inspect.signature to fail correctly for builtin types 16718 lacking signature information. Initial patch by James Powell. 16719 16720 16721What's New in Python 3.5.0 beta 1? 16722================================== 16723 16724*Release date: 2015-05-24* 16725 16726Core and Builtins 16727----------------- 16728 16729- bpo-24276: Fixed optimization of property descriptor getter. 16730 16731- bpo-24268: PEP 489: Multi-phase extension module initialization. Patch by 16732 Petr Viktorin. 16733 16734- bpo-23955: Add pyvenv.cfg option to suppress registry/environment lookup 16735 for generating sys.path on Windows. 16736 16737- bpo-24257: Fixed system error in the comparison of faked 16738 types.SimpleNamespace. 16739 16740- bpo-22939: Fixed integer overflow in iterator object. Patch by Clement 16741 Rouault. 16742 16743- bpo-23985: Fix a possible buffer overrun when deleting a slice from the 16744 front of a bytearray and then appending some other bytes data. 16745 16746- bpo-24102: Fixed exception type checking in standard error handlers. 16747 16748- bpo-15027: The UTF-32 encoder is now 3x to 7x faster. 16749 16750- bpo-23290: Optimize set_merge() for cases where the target is empty. 16751 (Contributed by Serhiy Storchaka.) 16752 16753- bpo-2292: PEP 448: Additional Unpacking Generalizations. 16754 16755- bpo-24096: Make warnings.warn_explicit more robust against mutation of the 16756 warnings.filters list. 16757 16758- bpo-23996: Avoid a crash when a delegated generator raises an unnormalized 16759 StopIteration exception. Patch by Stefan Behnel. 16760 16761- bpo-23910: Optimize property() getter calls. Patch by Joe Jevnik. 16762 16763- bpo-23911: Move path-based importlib bootstrap code to a separate frozen 16764 module. 16765 16766- bpo-24192: Fix namespace package imports. 16767 16768- bpo-24022: Fix tokenizer crash when processing undecodable source code. 16769 16770- bpo-9951: Added a hex() method to bytes, bytearray, and memoryview. 16771 16772- bpo-22906: PEP 479: Change StopIteration handling inside generators. 16773 16774- bpo-24017: PEP 492: Coroutines with async and await syntax. 16775 16776Library 16777------- 16778 16779- bpo-14373: Added C implementation of functools.lru_cache(). Based on 16780 patches by Matt Joiner and Alexey Kachayev. 16781 16782- bpo-24230: The tempfile module now accepts bytes for prefix, suffix and 16783 dir parameters and returns bytes in such situations (matching the os 16784 module APIs). 16785 16786- bpo-22189: collections.UserString now supports __getnewargs__(), 16787 __rmod__(), casefold(), format_map(), isprintable(), and maketrans(). 16788 Patch by Joe Jevnik. 16789 16790- bpo-24244: Prevents termination when an invalid format string is 16791 encountered on Windows in strftime. 16792 16793- bpo-23973: PEP 484: Add the typing module. 16794 16795- bpo-23086: The collections.abc.Sequence() abstract base class added 16796 *start* and *stop* parameters to the index() mixin. Patch by Devin 16797 Jeanpierre. 16798 16799- bpo-20035: Replaced the ``tkinter._fix`` module used for setting up the 16800 Tcl/Tk environment on Windows with a private function in the ``_tkinter`` 16801 module that makes no permanent changes to the environment. 16802 16803- bpo-24257: Fixed segmentation fault in sqlite3.Row constructor with faked 16804 cursor type. 16805 16806- bpo-15836: assertRaises(), assertRaisesRegex(), assertWarns() and 16807 assertWarnsRegex() assertments now check the type of the first argument to 16808 prevent possible user error. Based on patch by Daniel Wagner-Hall. 16809 16810- bpo-9858: Add missing method stubs to _io.RawIOBase. Patch by Laura 16811 Rupprecht. 16812 16813- bpo-22955: attrgetter, itemgetter and methodcaller objects in the operator 16814 module now support pickling. Added readable and evaluable repr for these 16815 objects. Based on patch by Josh Rosenberg. 16816 16817- bpo-22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again when 16818 a directory with the chosen name already exists on Windows as well as on 16819 Unix. tempfile.mkstemp() now fails early if parent directory is not valid 16820 (not exists or is a file) on Windows. 16821 16822- bpo-23780: Improved error message in os.path.join() with single argument. 16823 16824- bpo-6598: Increased time precision and random number range in 16825 email.utils.make_msgid() to strengthen the uniqueness of the message ID. 16826 16827- bpo-24091: Fixed various crashes in corner cases in C implementation of 16828 ElementTree. 16829 16830- bpo-21931: msilib.FCICreate() now raises TypeError in the case of a bad 16831 argument instead of a ValueError with a bogus FCI error number. Patch by 16832 Jeffrey Armstrong. 16833 16834- bpo-13866: *quote_via* argument added to urllib.parse.urlencode. 16835 16836- bpo-20098: New mangle_from policy option for email, default True for 16837 compat32, but False for all other policies. 16838 16839- bpo-24211: The email library now supports RFC 6532: it can generate 16840 headers using utf-8 instead of encoded words. 16841 16842- bpo-16314: Added support for the LZMA compression in distutils. 16843 16844- bpo-21804: poplib now supports RFC 6856 (UTF8). 16845 16846- bpo-18682: Optimized pprint functions for builtin scalar types. 16847 16848- bpo-22027: smtplib now supports RFC 6531 (SMTPUTF8). 16849 16850- bpo-23488: Random generator objects now consume 2x less memory on 64-bit. 16851 16852- bpo-1322: platform.dist() and platform.linux_distribution() functions are 16853 now deprecated. Initial patch by Vajrasky Kok. 16854 16855- bpo-22486: Added the math.gcd() function. The fractions.gcd() function 16856 now is deprecated. Based on patch by Mark Dickinson. 16857 16858- bpo-24064: Property() docstrings are now writeable. (Patch by Berker 16859 Peksag.) 16860 16861- bpo-22681: Added support for the koi8_t encoding. 16862 16863- bpo-22682: Added support for the kz1048 encoding. 16864 16865- bpo-23796: peek and read1 methods of BufferedReader now raise ValueError 16866 if they called on a closed object. Patch by John Hergenroeder. 16867 16868- bpo-21795: smtpd now supports the 8BITMIME extension whenever the new 16869 *decode_data* constructor argument is set to False. 16870 16871- bpo-24155: optimize heapq.heapify() for better cache performance when 16872 heapifying large lists. 16873 16874- bpo-21800: imaplib now supports RFC 5161 (enable), RFC 6855 16875 (utf8/internationalized email) and automatically encodes non-ASCII 16876 usernames and passwords to UTF8. 16877 16878- bpo-20274: When calling a _sqlite.Connection, it now complains if passed 16879 any keyword arguments. Previously it silently ignored them. 16880 16881- bpo-20274: Remove ignored and erroneous "kwargs" parameters from three 16882 METH_VARARGS methods on _sqlite.Connection. 16883 16884- bpo-24134: assertRaises(), assertRaisesRegex(), assertWarns() and 16885 assertWarnsRegex() checks now emits a deprecation warning when callable is 16886 None or keyword arguments except msg is passed in the context manager 16887 mode. 16888 16889- bpo-24018: Add a collections.abc.Generator abstract base class. 16890 Contributed by Stefan Behnel. 16891 16892- bpo-23880: Tkinter's getint() and getdouble() now support Tcl_Obj. 16893 Tkinter's getdouble() now supports any numbers (in particular int). 16894 16895- bpo-22619: Added negative limit support in the traceback module. Based on 16896 patch by Dmitry Kazakov. 16897 16898- bpo-24094: Fix possible crash in json.encode with poorly behaved dict 16899 subclasses. 16900 16901- bpo-9246: On POSIX, os.getcwd() now supports paths longer than 1025 bytes. 16902 Patch written by William Orr. 16903 16904- bpo-17445: add difflib.diff_bytes() to support comparison of byte strings 16905 (fixes a regression from Python 2). 16906 16907- bpo-23917: Fall back to sequential compilation when ProcessPoolExecutor 16908 doesn't exist. Patch by Claudiu Popa. 16909 16910- bpo-23008: Fixed resolving attributes with boolean value is False in 16911 pydoc. 16912 16913- Fix asyncio issue 235: LifoQueue and PriorityQueue's put didn't increment 16914 unfinished tasks (this bug was introduced when JoinableQueue was merged 16915 with Queue). 16916 16917- bpo-23908: os functions now reject paths with embedded null character on 16918 Windows instead of silently truncating them. 16919 16920- bpo-23728: binascii.crc_hqx() could return an integer outside of the range 16921 0-0xffff for empty data. 16922 16923- bpo-23887: urllib.error.HTTPError now has a proper repr() representation. 16924 Patch by Berker Peksag. 16925 16926- asyncio: New event loop APIs: set_task_factory() and get_task_factory(). 16927 16928- asyncio: async() function is deprecated in favour of ensure_future(). 16929 16930- bpo-24178: asyncio.Lock, Condition, Semaphore, and BoundedSemaphore 16931 support new 'async with' syntax. Contributed by Yury Selivanov. 16932 16933- bpo-24179: Support 'async for' for asyncio.StreamReader. Contributed by 16934 Yury Selivanov. 16935 16936- bpo-24184: Add AsyncIterator and AsyncIterable ABCs to collections.abc. 16937 Contributed by Yury Selivanov. 16938 16939- bpo-22547: Implement informative __repr__ for inspect.BoundArguments. 16940 Contributed by Yury Selivanov. 16941 16942- bpo-24190: Implement inspect.BoundArgument.apply_defaults() method. 16943 Contributed by Yury Selivanov. 16944 16945- bpo-20691: Add 'follow_wrapped' argument to 16946 inspect.Signature.from_callable() and inspect.signature(). Contributed by 16947 Yury Selivanov. 16948 16949- bpo-24248: Deprecate inspect.Signature.from_function() and 16950 inspect.Signature.from_builtin(). 16951 16952- bpo-23898: Fix inspect.classify_class_attrs() to support attributes with 16953 overloaded __eq__ and __bool__. Patch by Mike Bayer. 16954 16955- bpo-24298: Fix inspect.signature() to correctly unwrap wrappers around 16956 bound methods. 16957 16958IDLE 16959---- 16960 16961- bpo-23184: remove unused names and imports in idlelib. Initial patch by Al 16962 Sweigart. 16963 16964Tests 16965----- 16966 16967- bpo-21520: test_zipfile no longer fails if the word 'bad' appears anywhere 16968 in the name of the current directory. 16969 16970- bpo-9517: Move script_helper into the support package. Patch by Christie 16971 Wilson. 16972 16973Documentation 16974------------- 16975 16976- bpo-22155: Add File Handlers subsection with createfilehandler to tkinter 16977 doc. Remove obsolete example from FAQ. Patch by Martin Panter. 16978 16979- bpo-24029: Document the name binding behavior for submodule imports. 16980 16981- bpo-24077: Fix typo in man page for -I command option: -s, not -S 16982 16983Tools/Demos 16984----------- 16985 16986- bpo-24000: Improved Argument Clinic's mapping of converters to legacy 16987 "format units". Updated the documentation to match. 16988 16989- bpo-24001: Argument Clinic converters now use accept={type} instead of 16990 types={'type'} to specify the types the converter accepts. 16991 16992- bpo-23330: h2py now supports arbitrary filenames in #include. 16993 16994- bpo-24031: make patchcheck now supports git checkouts, too. 16995 16996 16997What's New in Python 3.5.0 alpha 4? 16998=================================== 16999 17000*Release date: 2015-04-19* 17001 17002Core and Builtins 17003----------------- 17004 17005- bpo-22980: Under Linux, GNU/KFreeBSD and the Hurd, C extensions now 17006 include the architecture triplet in the extension name, to make it easy to 17007 test builds for different ABIs in the same working tree. Under OS X, the 17008 extension name now includes PEP 3149-style information. 17009 17010- bpo-22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES. Patch 17011 courtesy of Joe Jevnik. 17012 17013- bpo-23731: Implement PEP 488: removal of .pyo files. 17014 17015- bpo-23726: Don't enable GC for user subclasses of non-GC types that don't 17016 add any new fields. Patch by Eugene Toder. 17017 17018- bpo-23309: Avoid a deadlock at shutdown if a daemon thread is aborted 17019 while it is holding a lock to a buffered I/O object, and the main thread 17020 tries to use the same I/O object (typically stdout or stderr). A fatal 17021 error is emitted instead. 17022 17023- bpo-22977: Fixed formatting Windows error messages on Wine. Patch by 17024 Martin Panter. 17025 17026- bpo-23466: %c, %o, %x, and %X in bytes formatting now raise TypeError on 17027 non-integer input. 17028 17029- bpo-24044: Fix possible null pointer dereference in list.sort in out of 17030 memory conditions. 17031 17032- bpo-21354: PyCFunction_New function is exposed by python DLL again. 17033 17034Library 17035------- 17036 17037- bpo-23840: tokenize.open() now closes the temporary binary file on error 17038 to fix a resource warning. 17039 17040- bpo-16914: new debuglevel 2 in smtplib adds timestamps to debug output. 17041 17042- bpo-7159: urllib.request now supports sending auth credentials 17043 automatically after the first 401. This enhancement is a superset of the 17044 enhancement from issue #19494 and supersedes that change. 17045 17046- bpo-23703: Fix a regression in urljoin() introduced in 901e4e52b20a. Patch 17047 by Demian Brecht. 17048 17049- bpo-4254: Adds _curses.update_lines_cols(). Patch by Arnon Yaari 17050 17051- bpo-19933: Provide default argument for ndigits in round. Patch by 17052 Vajrasky Kok. 17053 17054- bpo-23193: Add a numeric_owner parameter to tarfile.TarFile.extract and 17055 tarfile.TarFile.extractall. Patch by Michael Vogt and Eric Smith. 17056 17057- bpo-23342: Add a subprocess.run() function than returns a CalledProcess 17058 instance for a more consistent API than the existing call* functions. 17059 17060- bpo-21217: inspect.getsourcelines() now tries to compute the start and end 17061 lines from the code object, fixing an issue when a lambda function is used 17062 as decorator argument. Patch by Thomas Ballinger and Allison Kaptur. 17063 17064- bpo-24521: Fix possible integer overflows in the pickle module. 17065 17066- bpo-22931: Allow '[' and ']' in cookie values. 17067 17068- The keywords attribute of functools.partial is now always a dictionary. 17069 17070- bpo-23811: Add missing newline to the PyCompileError error message. Patch 17071 by Alex Shkop. 17072 17073- bpo-21116: Avoid blowing memory when allocating a multiprocessing shared 17074 array that's larger than 50% of the available RAM. Patch by Médéric 17075 Boquien. 17076 17077- bpo-22982: Improve BOM handling when seeking to multiple positions of a 17078 writable text file. 17079 17080- bpo-23464: Removed deprecated asyncio JoinableQueue. 17081 17082- bpo-23529: Limit the size of decompressed data when reading from GzipFile, 17083 BZ2File or LZMAFile. This defeats denial of service attacks using 17084 compressed bombs (i.e. compressed payloads which decompress to a huge 17085 size). Patch by Martin Panter and Nikolaus Rath. 17086 17087- bpo-21859: Added Python implementation of io.FileIO. 17088 17089- bpo-23865: close() methods in multiple modules now are idempotent and more 17090 robust at shutdown. If they need to release multiple resources, all are 17091 released even if errors occur. 17092 17093- bpo-23400: Raise same exception on both Python 2 and 3 if sem_open is not 17094 available. Patch by Davin Potts. 17095 17096- bpo-10838: The subprocess now module includes SubprocessError and 17097 TimeoutError in its list of exported names for the users wild enough to 17098 use ``from subprocess import *``. 17099 17100- bpo-23411: Added DefragResult, ParseResult, SplitResult, 17101 DefragResultBytes, ParseResultBytes, and SplitResultBytes to 17102 urllib.parse.__all__. Patch by Martin Panter. 17103 17104- bpo-23881: urllib.request.ftpwrapper constructor now closes the socket if 17105 the FTP connection failed to fix a ResourceWarning. 17106 17107- bpo-23853: :meth:`socket.socket.sendall` does no more reset the socket 17108 timeout each time data is sent successfully. The socket timeout is now the 17109 maximum total duration to send all data. 17110 17111- bpo-22721: An order of multiline pprint output of set or dict containing 17112 orderable and non-orderable elements no longer depends on iteration order 17113 of set or dict. 17114 17115- bpo-15133: _tkinter.tkapp.getboolean() now supports Tcl_Obj and always 17116 returns bool. tkinter.BooleanVar now validates input values (accepted 17117 bool, int, str, and Tcl_Obj). tkinter.BooleanVar.get() now always returns 17118 bool. 17119 17120- bpo-10590: xml.sax.parseString() now supports string argument. 17121 17122- bpo-23338: Fixed formatting ctypes error messages on Cygwin. Patch by 17123 Makoto Kato. 17124 17125- bpo-15582: inspect.getdoc() now follows inheritance chains. 17126 17127- bpo-2175: SAX parsers now support a character stream of InputSource 17128 object. 17129 17130- bpo-16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and 17131 arbitrary precision integers added in Tcl 8.5. 17132 17133- bpo-23834: Fix socket.sendto(), use the C Py_ssize_t type to store the 17134 result of sendto() instead of the C int type. 17135 17136- bpo-23618: :meth:`socket.socket.connect` now waits until the connection 17137 completes instead of raising :exc:`InterruptedError` if the connection is 17138 interrupted by signals, signal handlers don't raise an exception and the 17139 socket is blocking or has a timeout. :meth:`socket.socket.connect` still 17140 raise :exc:`InterruptedError` for non-blocking sockets. 17141 17142- bpo-21526: Tkinter now supports new boolean type in Tcl 8.5. 17143 17144- bpo-23836: Fix the faulthandler module to handle reentrant calls to its 17145 signal handlers. 17146 17147- bpo-23838: linecache now clears the cache and returns an empty result on 17148 MemoryError. 17149 17150- bpo-10395: Added os.path.commonpath(). Implemented in posixpath and 17151 ntpath. Based on patch by Rafik Draoui. 17152 17153- bpo-23611: Serializing more "lookupable" objects (such as unbound methods 17154 or nested classes) now are supported with pickle protocols < 4. 17155 17156- bpo-13583: sqlite3.Row now supports slice indexing. 17157 17158- bpo-18473: Fixed 2to3 and 3to2 compatible pickle mappings. Fixed 17159 ambiguous reverse mappings. Added many new mappings. Import mapping is 17160 no longer applied to modules already mapped with full name mapping. 17161 17162- bpo-23485: select.select() is now retried automatically with the 17163 recomputed timeout when interrupted by a signal, except if the signal 17164 handler raises an exception. This change is part of the PEP 475. 17165 17166- bpo-23752: When built from an existing file descriptor, io.FileIO() now 17167 only calls fstat() once. Before fstat() was called twice, which was not 17168 necessary. 17169 17170- bpo-23704: collections.deque() objects now support __add__, __mul__, and 17171 __imul__(). 17172 17173- bpo-23171: csv.Writer.writerow() now supports arbitrary iterables. 17174 17175- bpo-23745: The new email header parser now handles duplicate MIME 17176 parameter names without error, similar to how get_param behaves. 17177 17178- bpo-22117: Fix os.utime(), it now rounds the timestamp towards minus 17179 infinity (-inf) instead of rounding towards zero. 17180 17181- bpo-23310: Fix MagicMock's initializer to work with __methods__, just like 17182 configure_mock(). Patch by Kasia Jachim. 17183 17184Build 17185----- 17186 17187- bpo-23817: FreeBSD now uses "1.0" in the SOVERSION as other operating 17188 systems, instead of just "1". 17189 17190- bpo-23501: Argument Clinic now generates code into separate files by 17191 default. 17192 17193Tests 17194----- 17195 17196- bpo-23799: Added test.support.start_threads() for running and cleaning up 17197 multiple threads. 17198 17199- bpo-22390: test.regrtest now emits a warning if temporary files or 17200 directories are left after running a test. 17201 17202Tools/Demos 17203----------- 17204 17205- bpo-18128: pygettext now uses standard +NNNN format in the 17206 POT-Creation-Date header. 17207 17208- bpo-23935: Argument Clinic's understanding of format units accepting 17209 bytes, bytearrays, and buffers is now consistent with both the 17210 documentation and the implementation. 17211 17212- bpo-23944: Argument Clinic now wraps long impl prototypes at column 78. 17213 17214- bpo-20586: Argument Clinic now ensures that functions without docstrings 17215 have signatures. 17216 17217- bpo-23492: Argument Clinic now generates argument parsing code with 17218 PyArg_Parse instead of PyArg_ParseTuple if possible. 17219 17220- bpo-23500: Argument Clinic is now smarter about generating the "#ifndef" 17221 (empty) definition of the methoddef macro: it's only generated once, even 17222 if Argument Clinic processes the same symbol multiple times, and it's 17223 emitted at the end of all processing rather than immediately after the 17224 first use. 17225 17226C API 17227----- 17228 17229- bpo-23998: PyImport_ReInitLock() now checks for lock allocation error 17230 17231 17232What's New in Python 3.5.0 alpha 3? 17233=================================== 17234 17235*Release date: 2015-03-28* 17236 17237Core and Builtins 17238----------------- 17239 17240- bpo-23573: Increased performance of string search operations (str.find, 17241 str.index, str.count, the in operator, str.split, str.partition) with 17242 arguments of different kinds (UCS1, UCS2, UCS4). 17243 17244- bpo-23753: Python doesn't support anymore platforms without stat() or 17245 fstat(), these functions are always required. 17246 17247- bpo-23681: The -b option now affects comparisons of bytes with int. 17248 17249- bpo-23632: Memoryviews now allow tuple indexing (including for 17250 multi-dimensional memoryviews). 17251 17252- bpo-23192: Fixed generator lambdas. Patch by Bruno Cauet. 17253 17254- bpo-23629: Fix the default __sizeof__ implementation for variable-sized 17255 objects. 17256 17257Library 17258------- 17259 17260- bpo-14260: The groupindex attribute of regular expression pattern object 17261 now is non-modifiable mapping. 17262 17263- bpo-23792: Ignore KeyboardInterrupt when the pydoc pager is active. This 17264 mimics the behavior of the standard unix pagers, and prevents pipepager 17265 from shutting down while the pager itself is still running. 17266 17267- bpo-23775: pprint() of OrderedDict now outputs the same representation as 17268 repr(). 17269 17270- bpo-23765: Removed IsBadStringPtr calls in ctypes 17271 17272- bpo-22364: Improved some re error messages using regex for hints. 17273 17274- bpo-23742: ntpath.expandvars() no longer loses unbalanced single quotes. 17275 17276- bpo-21717: The zipfile.ZipFile.open function now supports 'x' (exclusive 17277 creation) mode. 17278 17279- bpo-21802: The reader in BufferedRWPair now is closed even when closing 17280 writer failed in BufferedRWPair.close(). 17281 17282- bpo-23622: Unknown escapes in regular expressions that consist of ``'\'`` 17283 and ASCII letter now raise a deprecation warning and will be forbidden in 17284 Python 3.6. 17285 17286- bpo-23671: string.Template now allows specifying the "self" parameter as a 17287 keyword argument. string.Formatter now allows specifying the "self" and 17288 the "format_string" parameters as keyword arguments. 17289 17290- bpo-23502: The pprint module now supports mapping proxies. 17291 17292- bpo-17530: pprint now wraps long bytes objects and bytearrays. 17293 17294- bpo-22687: Fixed some corner cases in breaking words in tetxtwrap. Got rid 17295 of quadratic complexity in breaking long words. 17296 17297- bpo-4727: The copy module now uses pickle protocol 4 (PEP 3154) and 17298 supports copying of instances of classes whose __new__ method takes 17299 keyword-only arguments. 17300 17301- bpo-23491: Added a zipapp module to support creating executable zip file 17302 archives of Python code. Registered ".pyz" and ".pyzw" extensions on 17303 Windows for these archives (PEP 441). 17304 17305- bpo-23657: Avoid explicit checks for str in zipapp, adding support for 17306 pathlib.Path objects as arguments. 17307 17308- bpo-23688: Added support of arbitrary bytes-like objects and avoided 17309 unnecessary copying of memoryview in gzip.GzipFile.write(). Original patch 17310 by Wolfgang Maier. 17311 17312- bpo-23252: Added support for writing ZIP files to unseekable streams. 17313 17314- bpo-23647: Increase imaplib's MAXLINE to accommodate modern mailbox sizes. 17315 17316- bpo-23539: If body is None, http.client.HTTPConnection.request now sets 17317 Content-Length to 0 for PUT, POST, and PATCH headers to avoid 411 errors 17318 from some web servers. 17319 17320- bpo-22351: The nntplib.NNTP constructor no longer leaves the connection 17321 and socket open until the garbage collector cleans them up. Patch by 17322 Martin Panter. 17323 17324- bpo-23704: collections.deque() objects now support methods for index(), 17325 insert(), and copy(). This allows deques to be registered as a 17326 MutableSequence and it improves their substitutability for lists. 17327 17328- bpo-23715: :func:`signal.sigwaitinfo` and :func:`signal.sigtimedwait` are 17329 now retried when interrupted by a signal not in the *sigset* parameter, if 17330 the signal handler does not raise an exception. signal.sigtimedwait() 17331 recomputes the timeout with a monotonic clock when it is retried. 17332 17333- bpo-23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and 17334 codecs, that accepted only read-only bytes-like object now accept writable 17335 bytes-like object too. 17336 17337- bpo-23646: If time.sleep() is interrupted by a signal, the sleep is now 17338 retried with the recomputed delay, except if the signal handler raises an 17339 exception (PEP 475). 17340 17341- bpo-23136: _strptime now uniformly handles all days in week 0, including 17342 Dec 30 of previous year. Based on patch by Jim Carroll. 17343 17344- bpo-23700: Iterator of NamedTemporaryFile now keeps a reference to 17345 NamedTemporaryFile instance. Patch by Bohuslav Kabrda. 17346 17347- bpo-22903: The fake test case created by unittest.loader when it fails 17348 importing a test module is now picklable. 17349 17350- bpo-22181: On Linux, os.urandom() now uses the new getrandom() syscall if 17351 available, syscall introduced in the Linux kernel 3.17. It is more 17352 reliable and more secure, because it avoids the need of a file descriptor 17353 and waits until the kernel has enough entropy. 17354 17355- bpo-2211: Updated the implementation of the http.cookies.Morsel class. 17356 Setting attributes key, value and coded_value directly now is deprecated. 17357 update() and setdefault() now transform and check keys. Comparing for 17358 equality now takes into account attributes key, value and coded_value. 17359 copy() now returns a Morsel, not a dict. repr() now contains all 17360 attributes. Optimized checking keys and quoting values. Added new tests. 17361 Original patch by Demian Brecht. 17362 17363- bpo-18983: Allow selection of output units in timeit. Patch by Julian 17364 Gindi. 17365 17366- bpo-23631: Fix traceback.format_list when a traceback has been mutated. 17367 17368- bpo-23568: Add rdivmod support to MagicMock() objects. Patch by Håkan 17369 Lövdahl. 17370 17371- bpo-2052: Add charset parameter to HtmlDiff.make_file(). 17372 17373- bpo-23668: Support os.truncate and os.ftruncate on Windows. 17374 17375- bpo-23138: Fixed parsing cookies with absent keys or values in cookiejar. 17376 Patch by Demian Brecht. 17377 17378- bpo-23051: multiprocessing.Pool methods imap() and imap_unordered() now 17379 handle exceptions raised by an iterator. Patch by Alon Diamant and Davin 17380 Potts. 17381 17382- bpo-23581: Add matmul support to MagicMock. Patch by Håkan Lövdahl. 17383 17384- bpo-23566: enable(), register(), dump_traceback() and 17385 dump_traceback_later() functions of faulthandler now accept file 17386 descriptors. Patch by Wei Wu. 17387 17388- bpo-22928: Disabled HTTP header injections in http.client. Original patch 17389 by Demian Brecht. 17390 17391- bpo-23615: Modules bz2, tarfile and tokenize now can be reloaded with 17392 imp.reload(). Patch by Thomas Kluyver. 17393 17394- bpo-23605: os.walk() now calls os.scandir() instead of os.listdir(). The 17395 usage of os.scandir() reduces the number of calls to os.stat(). Initial 17396 patch written by Ben Hoyt. 17397 17398Build 17399----- 17400 17401- bpo-23585: make patchcheck will ensure the interpreter is built. 17402 17403Tests 17404----- 17405 17406- bpo-23583: Added tests for standard IO streams in IDLE. 17407 17408- bpo-22289: Prevent test_urllib2net failures due to ftp connection timeout. 17409 17410Tools/Demos 17411----------- 17412 17413- bpo-22826: The result of open() in Tools/freeze/bkfile.py is now better 17414 compatible with regular files (in particular it now supports the context 17415 management protocol). 17416 17417 17418What's New in Python 3.5.0 alpha 2? 17419=================================== 17420 17421*Release date: 2015-03-09* 17422 17423Core and Builtins 17424----------------- 17425 17426- bpo-23571: PyObject_Call() and PyCFunction_Call() now raise a SystemError 17427 if a function returns a result and raises an exception. The SystemError is 17428 chained to the previous exception. 17429 17430Library 17431------- 17432 17433- bpo-22524: New os.scandir() function, part of the PEP 471: "os.scandir() 17434 function -- a better and faster directory iterator". Patch written by Ben 17435 Hoyt. 17436 17437- bpo-23103: Reduced the memory consumption of IPv4Address and IPv6Address. 17438 17439- bpo-21793: BaseHTTPRequestHandler again logs response code as numeric, not 17440 as stringified enum. Patch by Demian Brecht. 17441 17442- bpo-23476: In the ssl module, enable OpenSSL's X509_V_FLAG_TRUSTED_FIRST 17443 flag on certificate stores when it is available. 17444 17445- bpo-23576: Avoid stalling in SSL reads when EOF has been reached in the 17446 SSL layer but the underlying connection hasn't been closed. 17447 17448- bpo-23504: Added an __all__ to the types module. 17449 17450- bpo-23563: Optimized utility functions in urllib.parse. 17451 17452- bpo-7830: Flatten nested functools.partial. 17453 17454- bpo-20204: Added the __module__ attribute to _tkinter classes. 17455 17456- bpo-19980: Improved help() for non-recognized strings. help('') now shows 17457 the help on str. help('help') now shows the help on help(). Original 17458 patch by Mark Lawrence. 17459 17460- bpo-23521: Corrected pure python implementation of timedelta division. 17461 17462 Eliminated OverflowError from ``timedelta * float`` for some floats; 17463 Corrected rounding in timedelta true division. 17464 17465- bpo-21619: Popen objects no longer leave a zombie after exit in the with 17466 statement if the pipe was broken. Patch by Martin Panter. 17467 17468- bpo-22936: Make it possible to show local variables in tracebacks for both 17469 the traceback module and unittest. 17470 17471- bpo-15955: Add an option to limit the output size in bz2.decompress(). 17472 Patch by Nikolaus Rath. 17473 17474- bpo-6639: Module-level turtle functions no longer raise TclError after 17475 closing the window. 17476 17477- bpo-814253: Group references and conditional group references now work in 17478 lookbehind assertions in regular expressions. (See also: bpo-9179) 17479 17480- bpo-23215: Multibyte codecs with custom error handlers that ignores errors 17481 consumed too much memory and raised SystemError or MemoryError. Original 17482 patch by Aleksi Torhamo. 17483 17484- bpo-5700: io.FileIO() called flush() after closing the file. flush() was 17485 not called in close() if closefd=False. 17486 17487- bpo-23374: Fixed pydoc failure with non-ASCII files when stdout encoding 17488 differs from file system encoding (e.g. on Mac OS). 17489 17490- bpo-23481: Remove RC4 from the SSL module's default cipher list. 17491 17492- bpo-21548: Fix pydoc.synopsis() and pydoc.apropos() on modules with empty 17493 docstrings. 17494 17495- bpo-22885: Fixed arbitrary code execution vulnerability in the dbm.dumb 17496 module. Original patch by Claudiu Popa. 17497 17498- bpo-23239: ssl.match_hostname() now supports matching of IP addresses. 17499 17500- bpo-23146: Fix mishandling of absolute Windows paths with forward slashes 17501 in pathlib. 17502 17503- bpo-23096: Pickle representation of floats with protocol 0 now is the same 17504 for both Python and C implementations. 17505 17506- bpo-19105: pprint now more efficiently uses free space at the right. 17507 17508- bpo-14910: Add allow_abbrev parameter to argparse.ArgumentParser. Patch by 17509 Jonathan Paugh, Steven Bethard, paul j3 and Daniel Eriksson. 17510 17511- bpo-21717: tarfile.open() now supports 'x' (exclusive creation) mode. 17512 17513- bpo-23344: marshal.dumps() is now 20-25% faster on average. 17514 17515- bpo-20416: marshal.dumps() with protocols 3 and 4 is now 40-50% faster on 17516 average. 17517 17518- bpo-23421: Fixed compression in tarfile CLI. Patch by wdv4758h. 17519 17520- bpo-23367: Fix possible overflows in the unicodedata module. 17521 17522- bpo-23361: Fix possible overflow in Windows subprocess creation code. 17523 17524- logging.handlers.QueueListener now takes a respect_handler_level keyword 17525 argument which, if set to True, will pass messages to handlers taking 17526 handler levels into account. 17527 17528- bpo-19705: turtledemo now has a visual sorting algorithm demo. Original 17529 patch from Jason Yeo. 17530 17531- bpo-23801: Fix issue where cgi.FieldStorage did not always ignore the 17532 entire preamble to a multipart body. 17533 17534Build 17535----- 17536 17537- bpo-23445: pydebug builds now use "gcc -Og" where possible, to make the 17538 resulting executable faster. 17539 17540- bpo-23686: Update OS X 10.5 installer build to use OpenSSL 1.0.2a. 17541 17542C API 17543----- 17544 17545- bpo-20204: Deprecation warning is now raised for builtin types without the 17546 __module__ attribute. 17547 17548Windows 17549------- 17550 17551- bpo-23465: Implement PEP 486 - Make the Python Launcher aware of virtual 17552 environments. Patch by Paul Moore. 17553 17554- bpo-23437: Make user scripts directory versioned on Windows. Patch by Paul 17555 Moore. 17556 17557 17558What's New in Python 3.5.0 alpha 1? 17559=================================== 17560 17561*Release date: 2015-02-08* 17562 17563Core and Builtins 17564----------------- 17565 17566- bpo-23285: PEP 475 - EINTR handling. 17567 17568- bpo-22735: Fix many edge cases (including crashes) involving custom mro() 17569 implementations. 17570 17571- bpo-22896: Avoid using PyObject_AsCharBuffer(), PyObject_AsReadBuffer() 17572 and PyObject_AsWriteBuffer(). 17573 17574- bpo-21295: Revert some changes (issue #16795) to AST line numbers and 17575 column offsets that constituted a regression. 17576 17577- bpo-22986: Allow changing an object's __class__ between a dynamic type and 17578 static type in some cases. 17579 17580- bpo-15859: PyUnicode_EncodeFSDefault(), PyUnicode_EncodeMBCS() and 17581 PyUnicode_EncodeCodePage() now raise an exception if the object is not a 17582 Unicode object. For PyUnicode_EncodeFSDefault(), it was already the case 17583 on platforms other than Windows. Patch written by Campbell Barton. 17584 17585- bpo-21408: The default __ne__() now returns NotImplemented if __eq__() 17586 returned NotImplemented. Original patch by Martin Panter. 17587 17588- bpo-23321: Fixed a crash in str.decode() when error handler returned 17589 replacement string longer than malformed input data. 17590 17591- bpo-22286: The "backslashreplace" error handlers now works with decoding 17592 and translating. 17593 17594- bpo-23253: Delay-load ShellExecute[AW] in os.startfile for reduced startup 17595 overhead on Windows. 17596 17597- bpo-22038: pyatomic.h now uses stdatomic.h or GCC built-in functions for 17598 atomic memory access if available. Patch written by Vitor de Lima and 17599 Gustavo Temple. 17600 17601- bpo-20284: %-interpolation (aka printf) formatting added for bytes and 17602 bytearray. 17603 17604- bpo-23048: Fix jumping out of an infinite while loop in the pdb. 17605 17606- bpo-20335: bytes constructor now raises TypeError when encoding or errors 17607 is specified with non-string argument. Based on patch by Renaud Blanch. 17608 17609- bpo-22834: If the current working directory ends up being set to a 17610 non-existent directory then import will no longer raise FileNotFoundError. 17611 17612- bpo-22869: Move the interpreter startup & shutdown code to a new dedicated 17613 pylifecycle.c module 17614 17615- bpo-22847: Improve method cache efficiency. 17616 17617- bpo-22335: Fix crash when trying to enlarge a bytearray to 0x7fffffff 17618 bytes on a 32-bit platform. 17619 17620- bpo-22653: Fix an assertion failure in debug mode when doing a reentrant 17621 dict insertion in debug mode. 17622 17623- bpo-22643: Fix integer overflow in Unicode case operations (upper, lower, 17624 title, swapcase, casefold). 17625 17626- bpo-17636: Circular imports involving relative imports are now supported. 17627 17628- bpo-22604: Fix assertion error in debug mode when dividing a complex 17629 number by (nan+0j). 17630 17631- bpo-21052: Do not raise ImportWarning when sys.path_hooks or sys.meta_path 17632 are set to None. 17633 17634- bpo-16518: Use 'bytes-like object required' in error messages that 17635 previously used the far more cryptic "'x' does not support the buffer 17636 protocol. 17637 17638- bpo-22470: Fixed integer overflow issues in "backslashreplace", 17639 "xmlcharrefreplace", and "surrogatepass" error handlers. 17640 17641- bpo-22540: speed up `PyObject_IsInstance` and `PyObject_IsSubclass` in the 17642 common case that the second argument has metaclass `type`. 17643 17644- bpo-18711: Add a new `PyErr_FormatV` function, similar to `PyErr_Format` 17645 but accepting a `va_list` argument. 17646 17647- bpo-22520: Fix overflow checking when generating the repr of a unicode 17648 object. 17649 17650- bpo-22519: Fix overflow checking in PyBytes_Repr. 17651 17652- bpo-22518: Fix integer overflow issues in latin-1 encoding. 17653 17654- bpo-16324: _charset parameter of MIMEText now also accepts 17655 email.charset.Charset instances. Initial patch by Claude Paroz. 17656 17657- bpo-1764286: Fix inspect.getsource() to support decorated functions. Patch 17658 by Claudiu Popa. 17659 17660- bpo-18554: os.__all__ includes posix functions. 17661 17662- bpo-21391: Use os.path.abspath in the shutil module. 17663 17664- bpo-11471: avoid generating a JUMP_FORWARD instruction at the end of an 17665 if-block if there is no else-clause. Original patch by Eugene Toder. 17666 17667- bpo-22215: Now ValueError is raised instead of TypeError when str or bytes 17668 argument contains not permitted null character or byte. 17669 17670- bpo-22258: Fix the internal function set_inheritable() on Illumos. This 17671 platform exposes the function ``ioctl(FIOCLEX)``, but calling it fails 17672 with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable() 17673 now falls back to the slower ``fcntl()`` (``F_GETFD`` and then 17674 ``F_SETFD``). 17675 17676- bpo-21389: Displaying the __qualname__ of the underlying function in the 17677 repr of a bound method. 17678 17679- bpo-22206: Using pthread, PyThread_create_key() now sets errno to ENOMEM 17680 and returns -1 (error) on integer overflow. 17681 17682- bpo-20184: Argument Clinic based signature introspection added for 30 of 17683 the builtin functions. 17684 17685- bpo-22116: C functions and methods (of the 'builtin_function_or_method' 17686 type) can now be weakref'ed. Patch by Wei Wu. 17687 17688- bpo-22077: Improve index error messages for bytearrays, bytes, lists, and 17689 tuples by adding 'or slices'. Added ', not <typename>' for bytearrays. 17690 Original patch by Claudiu Popa. 17691 17692- bpo-20179: Apply Argument Clinic to bytes and bytearray. Patch by Tal 17693 Einat. 17694 17695- bpo-22082: Clear interned strings in slotdefs. 17696 17697- Upgrade Unicode database to Unicode 7.0.0. 17698 17699- bpo-21897: Fix a crash with the f_locals attribute with closure variables 17700 when frame.clear() has been called. 17701 17702- bpo-21205: Add a new ``__qualname__`` attribute to generator, the 17703 qualified name, and use it in the representation of a generator 17704 (``repr(gen)``). The default name of the generator (``__name__`` 17705 attribute) is now get from the function instead of the code. Use 17706 ``gen.gi_code.co_name`` to get the name of the code. 17707 17708- bpo-21669: With the aid of heuristics in SyntaxError.__init__, the parser 17709 now attempts to generate more meaningful (or at least more search engine 17710 friendly) error messages when "exec" and "print" are used as statements. 17711 17712- bpo-21642: In the conditional if-else expression, allow an integer written 17713 with no space between itself and the ``else`` keyword (e.g. ``True if 17714 42else False``) to be valid syntax. 17715 17716- bpo-21523: Fix over-pessimistic computation of the stack effect of some 17717 opcodes in the compiler. This also fixes a quadratic compilation time 17718 issue noticeable when compiling code with a large number of "and" and "or" 17719 operators. 17720 17721- bpo-21418: Fix a crash in the builtin function super() when called without 17722 argument and without current frame (ex: embedded Python). 17723 17724- bpo-21425: Fix flushing of standard streams in the interactive 17725 interpreter. 17726 17727- bpo-21435: In rare cases, when running finalizers on objects in cyclic 17728 trash a bad pointer dereference could occur due to a subtle flaw in 17729 internal iteration logic. 17730 17731- bpo-21377: PyBytes_Concat() now tries to concatenate in-place when the 17732 first argument has a reference count of 1. Patch by Nikolaus Rath. 17733 17734- bpo-20355: -W command line options now have higher priority than the 17735 PYTHONWARNINGS environment variable. Patch by Arfrever. 17736 17737- bpo-21274: Define PATH_MAX for GNU/Hurd in Python/pythonrun.c. 17738 17739- bpo-20904: Support setting FPU precision on m68k. 17740 17741- bpo-21209: Fix sending tuples to custom generator objects with the yield 17742 from syntax. 17743 17744- bpo-21193: pow(a, b, c) now raises ValueError rather than TypeError when b 17745 is negative. Patch by Josh Rosenberg. 17746 17747- bpo-21176: PEP 465: Add the '@' operator for matrix multiplication. 17748 17749- bpo-21134: Fix segfault when str is called on an uninitialized 17750 UnicodeEncodeError, UnicodeDecodeError, or UnicodeTranslateError object. 17751 17752- bpo-19537: Fix PyUnicode_DATA() alignment under m68k. Patch by Andreas 17753 Schwab. 17754 17755- bpo-20929: Add a type cast to avoid shifting a negative number. 17756 17757- bpo-20731: Properly position in source code files even if they are opened 17758 in text mode. Patch by Serhiy Storchaka. 17759 17760- bpo-20637: Key-sharing now also works for instance dictionaries of 17761 subclasses. Patch by Peter Ingebretson. 17762 17763- bpo-8297: Attributes missing from modules now include the module name in 17764 the error text. Original patch by ysj.ray. 17765 17766- bpo-19995: %c, %o, %x, and %X now raise TypeError on non-integer input. 17767 17768- bpo-19655: The ASDL parser - used by the build process to generate code 17769 for managing the Python AST in C - was rewritten. The new parser is self 17770 contained and does not require to carry long the spark.py parser-generator 17771 library; spark.py was removed from the source base. 17772 17773- bpo-12546: Allow ``\x00`` to be used as a fill character when using str, 17774 int, float, and complex __format__ methods. 17775 17776- bpo-20480: Add ipaddress.reverse_pointer. Patch by Leon Weber. 17777 17778- bpo-13598: Modify string.Formatter to support auto-numbering of 17779 replacement fields. It now matches the behavior of str.format() in this 17780 regard. Patches by Phil Elson and Ramchandra Apte. 17781 17782- bpo-8931: Make alternate formatting ('#') for type 'c' raise an exception. 17783 In versions prior to 3.5, '#' with 'c' had no effect. Now specifying it is 17784 an error. Patch by Torsten Landschoff. 17785 17786- bpo-23165: Perform overflow checks before allocating memory in the 17787 _Py_char2wchar function. 17788 17789Library 17790------- 17791 17792- bpo-23399: pyvenv creates relative symlinks where possible. 17793 17794- bpo-20289: cgi.FieldStorage() now supports the context management 17795 protocol. 17796 17797- bpo-13128: Print response headers for CONNECT requests when debuglevel > 17798 0. Patch by Demian Brecht. 17799 17800- bpo-15381: Optimized io.BytesIO to make less allocations and copyings. 17801 17802- bpo-22818: Splitting on a pattern that could match an empty string now 17803 raises a warning. Patterns that can only match empty strings are now 17804 rejected. 17805 17806- bpo-23099: Closing io.BytesIO with exported buffer is rejected now to 17807 prevent corrupting exported buffer. 17808 17809- bpo-23326: Removed __ne__ implementations. Since fixing default __ne__ 17810 implementation in issue #21408 they are redundant. 17811 17812- bpo-23363: Fix possible overflow in itertools.permutations. 17813 17814- bpo-23364: Fix possible overflow in itertools.product. 17815 17816- bpo-23366: Fixed possible integer overflow in itertools.combinations. 17817 17818- bpo-23369: Fixed possible integer overflow in 17819 _json.encode_basestring_ascii. 17820 17821- bpo-23353: Fix the exception handling of generators in 17822 PyEval_EvalFrameEx(). At entry, save or swap the exception state even if 17823 PyEval_EvalFrameEx() is called with throwflag=0. At exit, the exception 17824 state is now always restored or swapped, not only if why is WHY_YIELD or 17825 WHY_RETURN. Patch co-written with Antoine Pitrou. 17826 17827- bpo-14099: Restored support of writing ZIP files to tellable but 17828 non-seekable streams. 17829 17830- bpo-14099: Writing to ZipFile and reading multiple ZipExtFiles is 17831 threadsafe now. 17832 17833- bpo-19361: JSON decoder now raises JSONDecodeError instead of ValueError. 17834 17835- bpo-18518: timeit now rejects statements which can't be compiled outside a 17836 function or a loop (e.g. "return" or "break"). 17837 17838- bpo-23094: Fixed readline with frames in Python implementation of pickle. 17839 17840- bpo-23268: Fixed bugs in the comparison of ipaddress classes. 17841 17842- bpo-21408: Removed incorrect implementations of __ne__() which didn't 17843 returned NotImplemented if __eq__() returned NotImplemented. The default 17844 __ne__() now works correctly. 17845 17846- bpo-19996: :class:`email.feedparser.FeedParser` now handles (malformed) 17847 headers with no key rather than assuming the body has started. 17848 17849- bpo-20188: Support Application-Layer Protocol Negotiation (ALPN) in the 17850 ssl module. 17851 17852- bpo-23133: Pickling of ipaddress objects now produces more compact and 17853 portable representation. 17854 17855- bpo-23248: Update ssl error codes from latest OpenSSL git master. 17856 17857- bpo-23266: Much faster implementation of ipaddress.collapse_addresses() 17858 when there are many non-consecutive addresses. 17859 17860- bpo-23098: 64-bit dev_t is now supported in the os module. 17861 17862- bpo-21817: When an exception is raised in a task submitted to a 17863 ProcessPoolExecutor, the remote traceback is now displayed in the parent 17864 process. Patch by Claudiu Popa. 17865 17866- bpo-15955: Add an option to limit output size when decompressing LZMA 17867 data. Patch by Nikolaus Rath and Martin Panter. 17868 17869- bpo-23250: In the http.cookies module, capitalize "HttpOnly" and "Secure" 17870 as they are written in the standard. 17871 17872- bpo-23063: In the distutils' check command, fix parsing of reST with code 17873 or code-block directives. 17874 17875- bpo-23209: selectors.BaseSelector.get_key() now raises a RuntimeError if 17876 the selector is closed. And selectors.BaseSelector.close() now clears its 17877 internal reference to the selector mapping to break a reference cycle. 17878 Initial patch written by Martin Richard. (See also: bpo-23225) 17879 17880- bpo-17911: Provide a way to seed the linecache for a PEP-302 module 17881 without actually loading the code. 17882 17883- bpo-17911: Provide a new object API for traceback, including the ability 17884 to not lookup lines at all until the traceback is actually rendered, 17885 without any trace of the original objects being kept alive. 17886 17887- bpo-19777: Provide a home() classmethod on Path objects. Contributed by 17888 Victor Salgado and Mayank Tripathi. 17889 17890- bpo-23206: Make ``json.dumps(..., ensure_ascii=False)`` as fast as the 17891 default case of ``ensure_ascii=True``. Patch by Naoki Inada. 17892 17893- bpo-23185: Add math.inf and math.nan constants. 17894 17895- bpo-23186: Add ssl.SSLObject.shared_ciphers() and 17896 ssl.SSLSocket.shared_ciphers() to fetch the client's list ciphers sent at 17897 handshake. 17898 17899- bpo-23143: Remove compatibility with OpenSSLs older than 0.9.8. 17900 17901- bpo-23132: Improve performance and introspection support of comparison 17902 methods created by functool.total_ordering. 17903 17904- bpo-19776: Add an expanduser() method on Path objects. 17905 17906- bpo-23112: Fix SimpleHTTPServer to correctly carry the query string and 17907 fragment when it redirects to add a trailing slash. 17908 17909- bpo-21793: Added http.HTTPStatus enums (i.e. HTTPStatus.OK, 17910 HTTPStatus.NOT_FOUND). Patch by Demian Brecht. 17911 17912- bpo-23093: In the io, module allow more operations to work on detached 17913 streams. 17914 17915- bpo-23111: In the ftplib, make ssl.PROTOCOL_SSLv23 the default protocol 17916 version. 17917 17918- bpo-22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(), 17919 instead of reading /dev/urandom, to get pseudo-random bytes. 17920 17921- bpo-19104: pprint now produces evaluable output for wrapped strings. 17922 17923- bpo-23071: Added missing names to codecs.__all__. Patch by Martin Panter. 17924 17925- bpo-22783: Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX 17926 opcode if possible. 17927 17928- bpo-15513: Added a __sizeof__ implementation for pickle classes. 17929 17930- bpo-19858: pickletools.optimize() now aware of the MEMOIZE opcode, can 17931 produce more compact result and no longer produces invalid output if input 17932 data contains MEMOIZE opcodes together with PUT or BINPUT opcodes. 17933 17934- bpo-22095: Fixed HTTPConnection.set_tunnel with default port. The port 17935 value in the host header was set to "None". Patch by Demian Brecht. 17936 17937- bpo-23016: A warning no longer produces an AttributeError when the program 17938 is run with pythonw.exe. 17939 17940- bpo-21775: shutil.copytree(): fix crash when copying to VFAT. An exception 17941 handler assumed that OSError objects always have a 'winerror' attribute. 17942 That is not the case, so the exception handler itself raised 17943 AttributeError when run on Linux (and, presumably, any other non-Windows 17944 OS). Patch by Greg Ward. 17945 17946- bpo-1218234: Fix inspect.getsource() to load updated source of reloaded 17947 module. Initial patch by Berker Peksag. 17948 17949- bpo-21740: Support wrapped callables in doctest. Patch by Claudiu Popa. 17950 17951- bpo-23009: Make sure selectors.EpollSelecrtor.select() works when no FD is 17952 registered. 17953 17954- bpo-22959: In the constructor of http.client.HTTPSConnection, prefer the 17955 context's check_hostname attribute over the *check_hostname* parameter. 17956 17957- bpo-22696: Add function :func:`sys.is_finalizing` to know about 17958 interpreter shutdown. 17959 17960- bpo-16043: Add a default limit for the amount of data 17961 xmlrpclib.gzip_decode will return. This resolves CVE-2013-1753. 17962 17963- bpo-14099: ZipFile.open() no longer reopen the underlying file. Objects 17964 returned by ZipFile.open() can now operate independently of the ZipFile 17965 even if the ZipFile was created by passing in a file-like object as the 17966 first argument to the constructor. 17967 17968- bpo-22966: Fix __pycache__ pyc file name clobber when pyc_compile is asked 17969 to compile a source file containing multiple dots in the source file name. 17970 17971- bpo-21971: Update turtledemo doc and add module to the index. 17972 17973- bpo-21032: Fixed socket leak if HTTPConnection.getresponse() fails. 17974 Original patch by Martin Panter. 17975 17976- bpo-22407: Deprecated the use of re.LOCALE flag with str patterns or 17977 re.ASCII. It was newer worked. 17978 17979- bpo-22902: The "ip" command is now used on Linux to determine MAC address 17980 in uuid.getnode(). Pach by Bruno Cauet. 17981 17982- bpo-22960: Add a context argument to xmlrpclib.ServerProxy constructor. 17983 17984- bpo-22389: Add contextlib.redirect_stderr(). 17985 17986- bpo-21356: Make ssl.RAND_egd() optional to support LibreSSL. The 17987 availability of the function is checked during the compilation. Patch 17988 written by Bernard Spil. 17989 17990- bpo-22915: SAX parser now supports files opened with file descriptor or 17991 bytes path. 17992 17993- bpo-22609: Constructors and update methods of mapping classes in the 17994 collections module now accept the self keyword argument. 17995 17996- bpo-22940: Add readline.append_history_file. 17997 17998- bpo-19676: Added the "namereplace" error handler. 17999 18000- bpo-22788: Add *context* parameter to logging.handlers.HTTPHandler. 18001 18002- bpo-22921: Allow SSLContext to take the *hostname* parameter even if 18003 OpenSSL doesn't support SNI. 18004 18005- bpo-22894: TestCase.subTest() would cause the test suite to be stopped 18006 when in failfast mode, even in the absence of failures. 18007 18008- bpo-22796: HTTP cookie parsing is now stricter, in order to protect 18009 against potential injection attacks. 18010 18011- bpo-22370: Windows detection in pathlib is now more robust. 18012 18013- bpo-22841: Reject coroutines in asyncio add_signal_handler(). Patch by 18014 Ludovic.Gasc. 18015 18016- bpo-19494: Added urllib.request.HTTPBasicPriorAuthHandler. Patch by Matej 18017 Cepl. 18018 18019- bpo-22578: Added attributes to the re.error class. 18020 18021- bpo-22849: Fix possible double free in the io.TextIOWrapper constructor. 18022 18023- bpo-12728: Different Unicode characters having the same uppercase but 18024 different lowercase are now matched in case-insensitive regular 18025 expressions. 18026 18027- bpo-22821: Fixed fcntl() with integer argument on 64-bit big-endian 18028 platforms. 18029 18030- bpo-21650: Add an `--sort-keys` option to json.tool CLI. 18031 18032- bpo-22824: Updated reprlib output format for sets to use set literals. 18033 Patch contributed by Berker Peksag. 18034 18035- bpo-22824: Updated reprlib output format for arrays to display empty 18036 arrays without an unnecessary empty list. Suggested by Serhiy Storchaka. 18037 18038- bpo-22406: Fixed the uu_codec codec incorrectly ported to 3.x. Based on 18039 patch by Martin Panter. 18040 18041- bpo-17293: uuid.getnode() now determines MAC address on AIX using netstat. 18042 Based on patch by Aivars Kalvāns. 18043 18044- bpo-22769: Fixed ttk.Treeview.tag_has() when called without arguments. 18045 18046- bpo-22417: Verify certificates by default in httplib (PEP 476). 18047 18048- bpo-22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2 18049 and above. Patch by Tim Graham. 18050 18051- bpo-22776: Brought excluded code into the scope of a try block in 18052 SysLogHandler.emit(). 18053 18054- bpo-22665: Add missing get_terminal_size and SameFileError to 18055 shutil.__all__. 18056 18057- bpo-6623: Remove deprecated Netrc class in the ftplib module. Patch by 18058 Matt Chaput. 18059 18060- bpo-17381: Fixed handling of case-insensitive ranges in regular 18061 expressions. 18062 18063- bpo-22410: Module level functions in the re module now cache compiled 18064 locale-dependent regular expressions taking into account the locale. 18065 18066- bpo-22759: Query methods on pathlib.Path() (exists(), is_dir(), etc.) now 18067 return False when the underlying stat call raises NotADirectoryError. 18068 18069- bpo-8876: distutils now falls back to copying files when hard linking 18070 doesn't work. This allows use with special filesystems such as VirtualBox 18071 shared folders. 18072 18073- bpo-22217: Implemented reprs of classes in the zipfile module. 18074 18075- bpo-22457: Honour load_tests in the start_dir of discovery. 18076 18077- bpo-18216: gettext now raises an error when a .mo file has an unsupported 18078 major version number. Patch by Aaron Hill. 18079 18080- bpo-13918: Provide a locale.delocalize() function which can remove 18081 locale-specific number formatting from a string representing a number, 18082 without then converting it to a specific type. Patch by Cédric Krier. 18083 18084- bpo-22676: Make the pickling of global objects which don't have a 18085 __module__ attribute less slow. 18086 18087- bpo-18853: Fixed ResourceWarning in shlex.__nain__. 18088 18089- bpo-9351: Defaults set with set_defaults on an argparse subparser are no 18090 longer ignored when also set on the parent parser. 18091 18092- bpo-7559: unittest test loading ImportErrors are reported as import errors 18093 with their import exception rather than as attribute errors after the 18094 import has already failed. 18095 18096- bpo-19746: Make it possible to examine the errors from unittest discovery 18097 without executing the test suite. The new `errors` attribute on TestLoader 18098 exposes these non-fatal errors encountered during discovery. 18099 18100- bpo-21991: Make email.headerregistry's header 'params' attributes be 18101 read-only (MappingProxyType). Previously the dictionary was modifiable 18102 but a new one was created on each access of the attribute. 18103 18104- bpo-22638: SSLv3 is now disabled throughout the standard library. It can 18105 still be enabled by instantiating a SSLContext manually. 18106 18107- bpo-22641: In asyncio, the default SSL context for client connections is 18108 now created using ssl.create_default_context(), for stronger security. 18109 18110- bpo-17401: Include closefd in io.FileIO repr. 18111 18112- bpo-21338: Add silent mode for compileall. quiet parameters of 18113 compile_{dir, file, path} functions now have a multilevel value. Also, -q 18114 option of the CLI now have a multilevel value. Patch by Thomas Kluyver. 18115 18116- bpo-20152: Convert the array and cmath modules to Argument Clinic. 18117 18118- bpo-18643: Add socket.socketpair() on Windows. 18119 18120- bpo-22435: Fix a file descriptor leak when socketserver bind fails. 18121 18122- bpo-13096: Fixed segfault in CTypes POINTER handling of large values. 18123 18124- bpo-11694: Raise ConversionError in xdrlib as documented. Patch by Filip 18125 Gruszczyński and Claudiu Popa. 18126 18127- bpo-19380: Optimized parsing of regular expressions. 18128 18129- bpo-1519638: Now unmatched groups are replaced with empty strings in 18130 re.sub() and re.subn(). 18131 18132- bpo-18615: sndhdr.what/whathdr now return a namedtuple. 18133 18134- bpo-22462: Fix pyexpat's creation of a dummy frame to make it appear in 18135 exception tracebacks. 18136 18137- bpo-21965: Add support for in-memory SSL to the ssl module. Patch by 18138 Geert Jansen. 18139 18140- bpo-21173: Fix len() on a WeakKeyDictionary when .clear() was called with 18141 an iterator alive. 18142 18143- bpo-11866: Eliminated race condition in the computation of names for new 18144 threads. 18145 18146- bpo-21905: Avoid RuntimeError in pickle.whichmodule() when sys.modules is 18147 mutated while iterating. Patch by Olivier Grisel. 18148 18149- bpo-11271: concurrent.futures.Executor.map() now takes a *chunksize* 18150 argument to allow batching of tasks in child processes and improve 18151 performance of ProcessPoolExecutor. Patch by Dan O'Reilly. 18152 18153- bpo-21883: os.path.join() and os.path.relpath() now raise a TypeError with 18154 more helpful error message for unsupported or mismatched types of 18155 arguments. 18156 18157- bpo-22219: The zipfile module CLI now adds entries for directories 18158 (including empty directories) in ZIP file. 18159 18160- bpo-22449: In the ssl.SSLContext.load_default_certs, consult the 18161 environmental variables SSL_CERT_DIR and SSL_CERT_FILE on Windows. 18162 18163- bpo-22508: The email.__version__ variable has been removed; the email code 18164 is no longer shipped separately from the stdlib, and __version__ hasn't 18165 been updated in several releases. 18166 18167- bpo-20076: Added non derived UTF-8 aliases to locale aliases table. 18168 18169- bpo-20079: Added locales supported in glibc 2.18 to locale alias table. 18170 18171- bpo-20218: Added convenience methods read_text/write_text and read_bytes/ 18172 write_bytes to pathlib.Path objects. 18173 18174- bpo-22396: On 32-bit AIX platform, don't expose os.posix_fadvise() nor 18175 os.posix_fallocate() because their prototypes in system headers are wrong. 18176 18177- bpo-22517: When an io.BufferedRWPair object is deallocated, clear its 18178 weakrefs. 18179 18180- bpo-22437: Number of capturing groups in regular expression is no longer 18181 limited by 100. 18182 18183- bpo-17442: InteractiveInterpreter now displays the full chained traceback 18184 in its showtraceback method, to match the built in interactive 18185 interpreter. 18186 18187- bpo-23392: Added tests for marshal C API that works with FILE*. 18188 18189- bpo-10510: distutils register and upload methods now use HTML standards 18190 compliant CRLF line endings. 18191 18192- bpo-9850: Fixed macpath.join() for empty first component. Patch by Oleg 18193 Oshmyan. 18194 18195- bpo-5309: distutils' build and build_ext commands now accept a ``-j`` 18196 option to enable parallel building of extension modules. 18197 18198- bpo-22448: Improve canceled timer handles cleanup to prevent unbound 18199 memory usage. Patch by Joshua Moore-Oliva. 18200 18201- bpo-22427: TemporaryDirectory no longer attempts to clean up twice when 18202 used in the with statement in generator. 18203 18204- bpo-22362: Forbidden ambiguous octal escapes out of range 0-0o377 in 18205 regular expressions. 18206 18207- bpo-20912: Now directories added to ZIP file have correct Unix and MS-DOS 18208 directory attributes. 18209 18210- bpo-21866: ZipFile.close() no longer writes ZIP64 central directory 18211 records if allowZip64 is false. 18212 18213- bpo-22278: Fix urljoin problem with relative urls, a regression observed 18214 after changes to issue22118 were submitted. 18215 18216- bpo-22415: Fixed debugging output of the GROUPREF_EXISTS opcode in the re 18217 module. Removed trailing spaces in debugging output. 18218 18219- bpo-22423: Unhandled exception in thread no longer causes unhandled 18220 AttributeError when sys.stderr is None. 18221 18222- bpo-21332: Ensure that ``bufsize=1`` in subprocess.Popen() selects line 18223 buffering, rather than block buffering. Patch by Akira Li. 18224 18225- bpo-21091: Fix API bug: email.message.EmailMessage.is_attachment is now a 18226 method. 18227 18228- bpo-21079: Fix email.message.EmailMessage.is_attachment to return the 18229 correct result when the header has parameters as well as a value. 18230 18231- bpo-22247: Add NNTPError to nntplib.__all__. 18232 18233- bpo-22366: urllib.request.urlopen will accept a context object 18234 (SSLContext) as an argument which will then be used for HTTPS connection. 18235 Patch by Alex Gaynor. 18236 18237- bpo-4180: The warnings registries are now reset when the filters are 18238 modified. 18239 18240- bpo-22419: Limit the length of incoming HTTP request in wsgiref server to 18241 65536 bytes and send a 414 error code for higher lengths. Patch 18242 contributed by Devin Cook. 18243 18244- Lax cookie parsing in http.cookies could be a security issue when combined 18245 with non-standard cookie handling in some Web browsers. Reported by 18246 Sergey Bobrov. 18247 18248- bpo-20537: logging methods now accept an exception instance as well as a 18249 Boolean value or exception tuple. Thanks to Yury Selivanov for the patch. 18250 18251- bpo-22384: An exception in Tkinter callback no longer crashes the program 18252 when it is run with pythonw.exe. 18253 18254- bpo-22168: Prevent turtle AttributeError with non-default Canvas on OS X. 18255 18256- bpo-21147: sqlite3 now raises an exception if the request contains a null 18257 character instead of truncating it. Based on patch by Victor Stinner. 18258 18259- bpo-13968: The glob module now supports recursive search in subdirectories 18260 using the ``**`` pattern. 18261 18262- bpo-21951: Fixed a crash in Tkinter on AIX when called Tcl command with 18263 empty string or tuple argument. 18264 18265- bpo-21951: Tkinter now most likely raises MemoryError instead of crash if 18266 the memory allocation fails. 18267 18268- bpo-22338: Fix a crash in the json module on memory allocation failure. 18269 18270- bpo-12410: imaplib.IMAP4 now supports the context management protocol. 18271 Original patch by Tarek Ziadé. 18272 18273- bpo-21270: We now override tuple methods in mock.call objects so that they 18274 can be used as normal call attributes. 18275 18276- bpo-16662: load_tests() is now unconditionally run when it is present in a 18277 package's __init__.py. TestLoader.loadTestsFromModule() still accepts 18278 use_load_tests, but it is deprecated and ignored. A new keyword-only 18279 attribute `pattern` is added and documented. Patch given by Robert 18280 Collins, tweaked by Barry Warsaw. 18281 18282- bpo-22226: First letter no longer is stripped from the "status" key in the 18283 result of Treeview.heading(). 18284 18285- bpo-19524: Fixed resource leak in the HTTP connection when an invalid 18286 response is received. Patch by Martin Panter. 18287 18288- bpo-20421: Add a .version() method to SSL sockets exposing the actual 18289 protocol version in use. 18290 18291- bpo-19546: configparser exceptions no longer expose implementation 18292 details. Chained KeyErrors are removed, which leads to cleaner tracebacks. 18293 Patch by Claudiu Popa. 18294 18295- bpo-22051: turtledemo no longer reloads examples to re-run them. 18296 Initialization of variables and gui setup should be done in main(), which 18297 is called each time a demo is run, but not on import. 18298 18299- bpo-21933: Turtledemo users can change the code font size with a menu 18300 selection or control(command) '-' or '+' or control-mousewheel. Original 18301 patch by Lita Cho. 18302 18303- bpo-21597: The separator between the turtledemo text pane and the drawing 18304 canvas can now be grabbed and dragged with a mouse. The code text pane 18305 can be widened to easily view or copy the full width of the text. The 18306 canvas can be widened on small screens. Original patches by Jan Kanis and 18307 Lita Cho. 18308 18309- bpo-18132: Turtledemo buttons no longer disappear when the window is 18310 shrunk. Original patches by Jan Kanis and Lita Cho. 18311 18312- bpo-22043: time.monotonic() is now always available. 18313 ``threading.Lock.acquire()``, ``threading.RLock.acquire()`` and socket 18314 operations now use a monotonic clock, instead of the system clock, when a 18315 timeout is used. 18316 18317- bpo-21527: Add a default number of workers to ThreadPoolExecutor equal to 18318 5 times the number of CPUs. Patch by Claudiu Popa. 18319 18320- bpo-22216: smtplib now resets its state more completely after a quit. The 18321 most obvious consequence of the previous behavior was a STARTTLS failure 18322 during a connect/starttls/quit/connect/starttls sequence. 18323 18324- bpo-22098: ctypes' BigEndianStructure and LittleEndianStructure now define 18325 an empty __slots__ so that subclasses don't always get an instance dict. 18326 Patch by Claudiu Popa. 18327 18328- bpo-22185: Fix an occasional RuntimeError in threading.Condition.wait() 18329 caused by mutation of the waiters queue without holding the lock. Patch 18330 by Doug Zongker. 18331 18332- bpo-22287: On UNIX, _PyTime_gettimeofday() now uses 18333 clock_gettime(CLOCK_REALTIME) if available. As a side effect, Python now 18334 depends on the librt library on Solaris and on Linux (only with glibc 18335 older than 2.17). 18336 18337- bpo-22182: Use e.args to unpack exceptions correctly in 18338 distutils.file_util.move_file. Patch by Claudiu Popa. 18339 18340- The webbrowser module now uses subprocess's start_new_session=True rather 18341 than a potentially risky preexec_fn=os.setsid call. 18342 18343- bpo-22042: signal.set_wakeup_fd(fd) now raises an exception if the file 18344 descriptor is in blocking mode. 18345 18346- bpo-16808: inspect.stack() now returns a named tuple instead of a tuple. 18347 Patch by Daniel Shahaf. 18348 18349- bpo-22236: Fixed Tkinter images copying operations in NoDefaultRoot mode. 18350 18351- bpo-2527: Add a *globals* argument to timeit functions, in order to 18352 override the globals namespace in which the timed code is executed. Patch 18353 by Ben Roberts. 18354 18355- bpo-22118: Switch urllib.parse to use RFC 3986 semantics for the 18356 resolution of relative URLs, rather than RFCs 1808 and 2396. Patch by 18357 Demian Brecht. 18358 18359- bpo-21549: Added the "members" parameter to TarFile.list(). 18360 18361- bpo-19628: Allow compileall recursion depth to be specified with a -r 18362 option. 18363 18364- bpo-15696: Add a __sizeof__ implementation for mmap objects on Windows. 18365 18366- bpo-22068: Avoided reference loops with Variables and Fonts in Tkinter. 18367 18368- bpo-22165: SimpleHTTPRequestHandler now supports undecodable file names. 18369 18370- bpo-15381: Optimized line reading in io.BytesIO. 18371 18372- bpo-8797: Raise HTTPError on failed Basic Authentication immediately. 18373 Initial patch by Sam Bull. 18374 18375- bpo-20729: Restored the use of lazy iterkeys()/itervalues()/iteritems() in 18376 the mailbox module. 18377 18378- bpo-21448: Changed FeedParser feed() to avoid O(N**2) behavior when 18379 parsing long line. Original patch by Raymond Hettinger. 18380 18381- bpo-22184: The functools LRU Cache decorator factory now gives an earlier 18382 and clearer error message when the user forgets the required parameters. 18383 18384- bpo-17923: glob() patterns ending with a slash no longer match non-dirs on 18385 AIX. Based on patch by Delhallt. 18386 18387- bpo-21725: Added support for RFC 6531 (SMTPUTF8) in smtpd. 18388 18389- bpo-22176: Update the ctypes module's libffi to v3.1. This release adds 18390 support for the Linux AArch64 and POWERPC ELF ABIv2 little endian 18391 architectures. 18392 18393- bpo-5411: Added support for the "xztar" format in the shutil module. 18394 18395- bpo-21121: Don't force 3rd party C extensions to be built with 18396 -Werror=declaration-after-statement. 18397 18398- bpo-21975: Fixed crash when using uninitialized sqlite3.Row (in particular 18399 when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in 18400 the __new__() method. 18401 18402- bpo-20170: Convert posixmodule to use Argument Clinic. 18403 18404- bpo-21539: Add an *exists_ok* argument to `Pathlib.mkdir()` to mimic 18405 `mkdir -p` and `os.makedirs()` functionality. When true, ignore 18406 FileExistsErrors. Patch by Berker Peksag. 18407 18408- bpo-22127: Bypass IDNA for pure-ASCII host names in the socket module (in 18409 particular for numeric IPs). 18410 18411- bpo-21047: set the default value for the *convert_charrefs* argument of 18412 HTMLParser to True. Patch by Berker Peksag. 18413 18414- Add an __all__ to html.entities. 18415 18416- bpo-15114: the strict mode and argument of HTMLParser, HTMLParser.error, 18417 and the HTMLParserError exception have been removed. 18418 18419- bpo-22085: Dropped support of Tk 8.3 in Tkinter. 18420 18421- bpo-21580: Now Tkinter correctly handles bytes arguments passed to Tk. In 18422 particular this allows initializing images from binary data. 18423 18424- bpo-22003: When initialized from a bytes object, io.BytesIO() now defers 18425 making a copy until it is mutated, improving performance and memory use on 18426 some use cases. Patch by David Wilson. 18427 18428- bpo-22018: On Windows, signal.set_wakeup_fd() now also supports sockets. A 18429 side effect is that Python depends to the WinSock library. 18430 18431- bpo-22054: Add os.get_blocking() and os.set_blocking() functions to get 18432 and set the blocking mode of a file descriptor (False if the O_NONBLOCK 18433 flag is set, True otherwise). These functions are not available on 18434 Windows. 18435 18436- bpo-17172: Make turtledemo start as active on OS X even when run with 18437 subprocess. Patch by Lita Cho. 18438 18439- bpo-21704: Fix build error for _multiprocessing when semaphores are not 18440 available. Patch by Arfrever Frehtes Taifersar Arahesis. 18441 18442- bpo-20173: Convert sha1, sha256, sha512 and md5 to ArgumentClinic. Patch 18443 by Vajrasky Kok. 18444 18445- Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError 18446 on closed socket. repr(socket.socket) already works fine. 18447 18448- bpo-22033: Reprs of most Python implemented classes now contain actual 18449 class name instead of hardcoded one. 18450 18451- bpo-21947: The dis module can now disassemble generator-iterator objects 18452 based on their gi_code attribute. Patch by Clement Rouault. 18453 18454- bpo-16133: The asynchat.async_chat.handle_read() method now ignores 18455 BlockingIOError exceptions. 18456 18457- bpo-22044: Fixed premature DECREF in call_tzinfo_method. Patch by Tom 18458 Flanagan. 18459 18460- bpo-19884: readline: Disable the meta modifier key if stdout is not a 18461 terminal to not write the ANSI sequence ``"\033[1034h"`` into stdout. This 18462 sequence is used on some terminal (ex: TERM=xterm-256color") to enable 18463 support of 8 bit characters. 18464 18465- bpo-4350: Removed a number of out-of-dated and non-working for a long time 18466 Tkinter methods. 18467 18468- bpo-6167: Scrollbar.activate() now returns the name of active element if 18469 the argument is not specified. Scrollbar.set() now always accepts only 2 18470 arguments. 18471 18472- bpo-15275: Clean up and speed up the ntpath module. 18473 18474- bpo-21888: plistlib's load() and loads() now work if the fmt parameter is 18475 specified. 18476 18477- bpo-22032: __qualname__ instead of __name__ is now always used to format 18478 fully qualified class names of Python implemented classes. 18479 18480- bpo-22031: Reprs now always use hexadecimal format with the "0x" prefix 18481 when contain an id in form " at 0x...". 18482 18483- bpo-22018: signal.set_wakeup_fd() now raises an OSError instead of a 18484 ValueError on ``fstat()`` failure. 18485 18486- bpo-21044: tarfile.open() now handles fileobj with an integer 'name' 18487 attribute. Based on patch by Antoine Pietri. 18488 18489- bpo-21966: Respect -q command-line option when code module is ran. 18490 18491- bpo-19076: Don't pass the redundant 'file' argument to self.error(). 18492 18493- bpo-16382: Improve exception message of warnings.warn() for bad category. 18494 Initial patch by Phil Elson. 18495 18496- bpo-21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of 18497 :c:type:`int` for the size to support reading more than 2 GB at once. On 18498 Windows, the size is truncated to INT_MAX. As any call to os.read(), the 18499 OS may read less bytes than the number of requested bytes. 18500 18501- bpo-21942: Fixed source file viewing in pydoc's server mode on Windows. 18502 18503- bpo-11259: asynchat.async_chat().set_terminator() now raises a ValueError 18504 if the number of received bytes is negative. 18505 18506- bpo-12523: asynchat.async_chat.push() now raises a TypeError if it doesn't 18507 get a bytes string 18508 18509- bpo-21707: Add missing kwonlyargcount argument to 18510 ModuleFinder.replace_paths_in_code(). 18511 18512- bpo-20639: calling Path.with_suffix('') allows removing the suffix again. 18513 Patch by July Tikhonov. 18514 18515- bpo-21714: Disallow the construction of invalid paths using 18516 Path.with_name(). Original patch by Antony Lee. 18517 18518- bpo-15014: Added 'auth' method to smtplib to make implementing auth 18519 mechanisms simpler, and used it internally in the login method. 18520 18521- bpo-21151: Fixed a segfault in the winreg module when ``None`` is passed 18522 as a ``REG_BINARY`` value to SetValueEx. Patch by John Ehresman. 18523 18524- bpo-21090: io.FileIO.readall() does not ignore I/O errors anymore. Before, 18525 it ignored I/O errors if at least the first C call read() succeed. 18526 18527- bpo-5800: headers parameter of wsgiref.headers.Headers is now optional. 18528 Initial patch by Pablo Torres Navarrete and SilentGhost. 18529 18530- bpo-21781: ssl.RAND_add() now supports strings longer than 2 GB. 18531 18532- bpo-21679: Prevent extraneous fstat() calls during open(). Patch by 18533 Bohuslav Kabrda. 18534 18535- bpo-21863: cProfile now displays the module name of C extension functions, 18536 in addition to their own name. 18537 18538- bpo-11453: asyncore: emit a ResourceWarning when an unclosed file_wrapper 18539 object is destroyed. The destructor now closes the file if needed. The 18540 close() method can now be called twice: the second call does nothing. 18541 18542- bpo-21858: Better handling of Python exceptions in the sqlite3 module. 18543 18544- bpo-21476: Make sure the email.parser.BytesParser TextIOWrapper is 18545 discarded after parsing, so the input file isn't unexpectedly closed. 18546 18547- bpo-20295: imghdr now recognizes OpenEXR format images. 18548 18549- bpo-21729: Used the "with" statement in the dbm.dumb module to ensure 18550 files closing. Patch by Claudiu Popa. 18551 18552- bpo-21491: socketserver: Fix a race condition in child processes reaping. 18553 18554- bpo-21719: Added the ``st_file_attributes`` field to os.stat_result on 18555 Windows. 18556 18557- bpo-21832: Require named tuple inputs to be exact strings. 18558 18559- bpo-21722: The distutils "upload" command now exits with a non-zero return 18560 code when uploading fails. Patch by Martin Dengler. 18561 18562- bpo-21723: asyncio.Queue: support any type of number (ex: float) for the 18563 maximum size. Patch written by Vajrasky Kok. 18564 18565- bpo-21711: support for "site-python" directories has now been removed from 18566 the site module (it was deprecated in 3.4). 18567 18568- bpo-17552: new socket.sendfile() method allowing a file to be sent over a 18569 socket by using high-performance os.sendfile() on UNIX. Patch by Giampaolo 18570 Rodola'. 18571 18572- bpo-18039: dbm.dump.open() now always creates a new database when the flag 18573 has the value 'n'. Patch by Claudiu Popa. 18574 18575- bpo-21326: Add a new is_closed() method to asyncio.BaseEventLoop. 18576 run_forever() and run_until_complete() methods of asyncio.BaseEventLoop 18577 now raise an exception if the event loop was closed. 18578 18579- bpo-21766: Prevent a security hole in CGIHTTPServer by URL unquoting paths 18580 before checking for a CGI script at that path. 18581 18582- bpo-21310: Fixed possible resource leak in failed open(). 18583 18584- bpo-21256: Printout of keyword args should be in deterministic order in a 18585 mock function call. This will help to write better doctests. 18586 18587- bpo-21677: Fixed chaining nonnormalized exceptions in io close() methods. 18588 18589- bpo-11709: Fix the pydoc.help function to not fail when sys.stdin is not a 18590 valid file. 18591 18592- bpo-21515: tempfile.TemporaryFile now uses os.O_TMPFILE flag is available. 18593 18594- bpo-13223: Fix pydoc.writedoc so that the HTML documentation for methods 18595 that use 'self' in the example code is generated correctly. 18596 18597- bpo-21463: In urllib.request, fix pruning of the FTP cache. 18598 18599- bpo-21618: The subprocess module could fail to close open fds that were 18600 inherited by the calling process and already higher than POSIX resource 18601 limits would otherwise allow. On systems with a functioning /proc/self/fd 18602 or /dev/fd interface the max is now ignored and all fds are closed. 18603 18604- bpo-20383: Introduce importlib.util.module_from_spec() as the preferred 18605 way to create a new module. 18606 18607- bpo-21552: Fixed possible integer overflow of too long string lengths in 18608 the tkinter module on 64-bit platforms. 18609 18610- bpo-14315: The zipfile module now ignores extra fields in the central 18611 directory that are too short to be parsed instead of letting a 18612 struct.unpack error bubble up as this "bad data" appears in many real 18613 world zip files in the wild and is ignored by other zip tools. 18614 18615- bpo-13742: Added "key" and "reverse" parameters to heapq.merge(). (First 18616 draft of patch contributed by Simon Sapin.) 18617 18618- bpo-21402: tkinter.ttk now works when default root window is not set. 18619 18620- bpo-3015: _tkinter.create() now creates tkapp object with wantobject=1 by 18621 default. 18622 18623- bpo-10203: sqlite3.Row now truly supports sequence protocol. In 18624 particular it supports reverse() and negative indices. Original patch by 18625 Claudiu Popa. 18626 18627- bpo-18807: If copying (no symlinks) specified for a venv, then the python 18628 interpreter aliases (python, python3) are now created by copying rather 18629 than symlinking. 18630 18631- bpo-20197: Added support for the WebP image type in the imghdr module. 18632 Patch by Fabrice Aneche and Claudiu Popa. 18633 18634- bpo-21513: Speedup some properties of IP addresses (IPv4Address, 18635 IPv6Address) such as .is_private or .is_multicast. 18636 18637- bpo-21137: Improve the repr for threading.Lock() and its variants by 18638 showing the "locked" or "unlocked" status. Patch by Berker Peksag. 18639 18640- bpo-21538: The plistlib module now supports loading of binary plist files 18641 when reference or offset size is not a power of two. 18642 18643- bpo-21455: Add a default backlog to socket.listen(). 18644 18645- bpo-21525: Most Tkinter methods which accepted tuples now accept lists 18646 too. 18647 18648- bpo-22166: With the assistance of a new internal _codecs._forget_codec 18649 helping function, test_codecs now clears the encoding caches to avoid the 18650 appearance of a reference leak 18651 18652- bpo-22236: Tkinter tests now don't reuse default root window. New root 18653 window is created for every test class. 18654 18655- bpo-10744: Fix PEP 3118 format strings on ctypes objects with a nontrivial 18656 shape. 18657 18658- bpo-20826: Optimize ipaddress.collapse_addresses(). 18659 18660- bpo-21487: Optimize ipaddress.summarize_address_range() and 18661 ipaddress.{IPv4Network,IPv6Network}.subnets(). 18662 18663- bpo-21486: Optimize parsing of netmasks in ipaddress.IPv4Network and 18664 ipaddress.IPv6Network. 18665 18666- bpo-13916: Disallowed the surrogatepass error handler for non UTF-\* 18667 encodings. 18668 18669- bpo-20998: Fixed re.fullmatch() of repeated single character pattern with 18670 ignore case. Original patch by Matthew Barnett. 18671 18672- bpo-21075: fileinput.FileInput now reads bytes from standard stream if 18673 binary mode is specified. Patch by Sam Kimbrel. 18674 18675- bpo-19775: Add a samefile() method to pathlib Path objects. Initial patch 18676 by Vajrasky Kok. 18677 18678- bpo-21226: Set up modules properly in PyImport_ExecCodeModuleObject (and 18679 friends). 18680 18681- bpo-21398: Fix a unicode error in the pydoc pager when the documentation 18682 contains characters not encodable to the stdout encoding. 18683 18684- bpo-16531: ipaddress.IPv4Network and ipaddress.IPv6Network now accept an 18685 (address, netmask) tuple argument, so as to easily construct network 18686 objects from existing addresses. 18687 18688- bpo-21156: importlib.abc.InspectLoader.source_to_code() is now a 18689 staticmethod. 18690 18691- bpo-21424: Simplified and optimized heaqp.nlargest() and nmsmallest() to 18692 make fewer tuple comparisons. 18693 18694- bpo-21396: Fix TextIOWrapper(..., write_through=True) to not force a 18695 flush() on the underlying binary stream. Patch by akira. 18696 18697- bpo-18314: Unlink now removes junctions on Windows. Patch by Kim Gräsman 18698 18699- bpo-21088: Bugfix for curses.window.addch() regression in 3.4.0. In 18700 porting to Argument Clinic, the first two arguments were reversed. 18701 18702- bpo-21407: _decimal: The module now supports function signatures. 18703 18704- bpo-10650: Remove the non-standard 'watchexp' parameter from the 18705 Decimal.quantize() method in the Python version. It had never been 18706 present in the C version. 18707 18708- bpo-21469: Reduced the risk of false positives in robotparser by checking 18709 to make sure that robots.txt has been read or does not exist prior to 18710 returning True in can_fetch(). 18711 18712- bpo-19414: Have the OrderedDict mark deleted links as unusable. This gives 18713 an early failure if the link is deleted during iteration. 18714 18715- bpo-21421: Add __slots__ to the MappingViews ABC. Patch by Josh Rosenberg. 18716 18717- bpo-21101: Eliminate double hashing in the C speed-up code for 18718 collections.Counter(). 18719 18720- bpo-21321: itertools.islice() now releases the reference to the source 18721 iterator when the slice is exhausted. Patch by Anton Afanasyev. 18722 18723- bpo-21057: TextIOWrapper now allows the underlying binary stream's read() 18724 or read1() method to return an arbitrary bytes-like object (such as a 18725 memoryview). Patch by Nikolaus Rath. 18726 18727- bpo-20951: SSLSocket.send() now raises either SSLWantReadError or 18728 SSLWantWriteError on a non-blocking socket if the operation would block. 18729 Previously, it would return 0. Patch by Nikolaus Rath. 18730 18731- bpo-13248: removed previously deprecated asyncore.dispatcher __getattr__ 18732 cheap inheritance hack. 18733 18734- bpo-9815: assertRaises now tries to clear references to local variables in 18735 the exception's traceback. 18736 18737- bpo-19940: ssl.cert_time_to_seconds() now interprets the given time string 18738 in the UTC timezone (as specified in RFC 5280), not the local timezone. 18739 18740- bpo-13204: Calling sys.flags.__new__ would crash the interpreter, now it 18741 raises a TypeError. 18742 18743- bpo-19385: Make operations on a closed dbm.dumb database always raise the 18744 same exception. 18745 18746- bpo-21207: Detect when the os.urandom cached fd has been closed or 18747 replaced, and open it anew. 18748 18749- bpo-21291: subprocess's Popen.wait() is now thread safe so that multiple 18750 threads may be calling wait() or poll() on a Popen instance at the same 18751 time without losing the Popen.returncode value. 18752 18753- bpo-21127: Path objects can now be instantiated from str subclass 18754 instances (such as ``numpy.str_``). 18755 18756- bpo-15002: urllib.response object to use _TemporaryFileWrapper (and 18757 _TemporaryFileCloser) facility. Provides a better way to handle file 18758 descriptor close. Patch contributed by Christian Theune. 18759 18760- bpo-12220: mindom now raises a custom ValueError indicating it doesn't 18761 support spaces in URIs instead of letting a 'split' ValueError bubble up. 18762 18763- bpo-21068: The ssl.PROTOCOL* constants are now enum members. 18764 18765- bpo-21276: posixmodule: Don't define USE_XATTRS on KFreeBSD and the Hurd. 18766 18767- bpo-21262: New method assert_not_called for Mock. It raises AssertionError 18768 if the mock has been called. 18769 18770- bpo-21238: New keyword argument `unsafe` to Mock. It raises 18771 `AttributeError` incase of an attribute startswith assert or assret. 18772 18773- bpo-20896: ssl.get_server_certificate() now uses PROTOCOL_SSLv23, not 18774 PROTOCOL_SSLv3, for maximum compatibility. 18775 18776- bpo-21239: patch.stopall() didn't work deterministically when the same 18777 name was patched more than once. 18778 18779- bpo-21203: Updated fileConfig and dictConfig to remove inconsistencies. 18780 Thanks to Jure Koren for the patch. 18781 18782- bpo-21222: Passing name keyword argument to mock.create_autospec now 18783 works. 18784 18785- bpo-21197: Add lib64 -> lib symlink in venvs on 64-bit non-OS X POSIX. 18786 18787- bpo-17498: Some SMTP servers disconnect after certain errors, violating 18788 strict RFC conformance. Instead of losing the error code when we issue 18789 the subsequent RSET, smtplib now returns the error code and defers raising 18790 the SMTPServerDisconnected error until the next command is issued. 18791 18792- bpo-17826: setting an iterable side_effect on a mock function created by 18793 create_autospec now works. Patch by Kushal Das. 18794 18795- bpo-7776: Fix ``Host:`` header and reconnection when using 18796 http.client.HTTPConnection.set_tunnel(). Patch by Nikolaus Rath. 18797 18798- bpo-20968: unittest.mock.MagicMock now supports division. Patch by 18799 Johannes Baiter. 18800 18801- bpo-21529: Fix arbitrary memory access in JSONDecoder.raw_decode with a 18802 negative second parameter. Bug reported by Guido Vranken. (See also: 18803 CVE-2014-4616) 18804 18805- bpo-21169: getpass now handles non-ascii characters that the input stream 18806 encoding cannot encode by re-encoding using the replace error handler. 18807 18808- bpo-21171: Fixed undocumented filter API of the rot13 codec. Patch by 18809 Berker Peksag. 18810 18811- bpo-20539: Improved math.factorial error message for large positive inputs 18812 and changed exception type (OverflowError -> ValueError) for large 18813 negative inputs. 18814 18815- bpo-21172: isinstance check relaxed from dict to collections.Mapping. 18816 18817- bpo-21155: asyncio.EventLoop.create_unix_server() now raises a ValueError 18818 if path and sock are specified at the same time. 18819 18820- bpo-21136: Avoid unnecessary normalization of Fractions resulting from 18821 power and other operations. Patch by Raymond Hettinger. 18822 18823- bpo-17621: Introduce importlib.util.LazyLoader. 18824 18825- bpo-21076: signal module constants were turned into enums. Patch by 18826 Giampaolo Rodola'. 18827 18828- bpo-20636: Improved the repr of Tkinter widgets. 18829 18830- bpo-19505: The items, keys, and values views of OrderedDict now support 18831 reverse iteration using reversed(). 18832 18833- bpo-21149: Improved thread-safety in logging cleanup during interpreter 18834 shutdown. Thanks to Devin Jeanpierre for the patch. 18835 18836- bpo-21058: Fix a leak of file descriptor in 18837 :func:`tempfile.NamedTemporaryFile`, close the file descriptor if 18838 :func:`io.open` fails 18839 18840- bpo-21200: Return None from pkgutil.get_loader() when __spec__ is missing. 18841 18842- bpo-21013: Enhance ssl.create_default_context() when used for server side 18843 sockets to provide better security by default. 18844 18845- bpo-20145: `assertRaisesRegex` and `assertWarnsRegex` now raise a 18846 TypeError if the second argument is not a string or compiled regex. 18847 18848- bpo-20633: Replace relative import by absolute import. 18849 18850- bpo-20980: Stop wrapping exception when using ThreadPool. 18851 18852- bpo-21082: In os.makedirs, do not set the process-wide umask. Note this 18853 changes behavior of makedirs when exist_ok=True. 18854 18855- bpo-20990: Fix issues found by pyflakes for multiprocessing. 18856 18857- bpo-21015: SSL contexts will now automatically select an elliptic curve 18858 for ECDH key exchange on OpenSSL 1.0.2 and later, and otherwise default to 18859 "prime256v1". 18860 18861- bpo-21000: Improve the command-line interface of json.tool. 18862 18863- bpo-20995: Enhance default ciphers used by the ssl module to enable better 18864 security and prioritize perfect forward secrecy. 18865 18866- bpo-20884: Don't assume that __file__ is defined on importlib.__init__. 18867 18868- bpo-21499: Ignore __builtins__ in several test_importlib.test_api tests. 18869 18870- bpo-20627: xmlrpc.client.ServerProxy is now a context manager. 18871 18872- bpo-19165: The formatter module now raises DeprecationWarning instead of 18873 PendingDeprecationWarning. 18874 18875- bpo-13936: Remove the ability of datetime.time instances to be considered 18876 false in boolean contexts. 18877 18878- bpo-18931: selectors module now supports /dev/poll on Solaris. Patch by 18879 Giampaolo Rodola'. 18880 18881- bpo-19977: When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale), 18882 :py:data:`sys.stdin` and :py:data:`sys.stdout` are now using the 18883 ``surrogateescape`` error handler, instead of the ``strict`` error 18884 handler. 18885 18886- bpo-20574: Implement incremental decoder for cp65001 code (Windows code 18887 page 65001, Microsoft UTF-8). 18888 18889- bpo-20879: Delay the initialization of encoding and decoding tables for 18890 base32, ascii85 and base85 codecs in the base64 module, and delay the 18891 initialization of the unquote_to_bytes() table of the urllib.parse module, 18892 to not waste memory if these modules are not used. 18893 18894- bpo-19157: Include the broadcast address in the usuable hosts for IPv6 in 18895 ipaddress. 18896 18897- bpo-11599: When an external command (e.g. compiler) fails, distutils now 18898 prints out the whole command line (instead of just the command name) if 18899 the environment variable DISTUTILS_DEBUG is set. 18900 18901- bpo-4931: distutils should not produce unhelpful "error: None" messages 18902 anymore. distutils.util.grok_environment_error is kept but doc-deprecated. 18903 18904- bpo-20875: Prevent possible gzip "'read' is not defined" NameError. Patch 18905 by Claudiu Popa. 18906 18907- bpo-11558: ``email.message.Message.attach`` now returns a more useful 18908 error message if ``attach`` is called on a message for which 18909 ``is_multipart`` is False. 18910 18911- bpo-20283: RE pattern methods now accept the string keyword parameters as 18912 documented. The pattern and source keyword parameters are left as 18913 deprecated aliases. 18914 18915- bpo-20778: Fix modulefinder to work with bytecode-only modules. 18916 18917- bpo-20791: copy.copy() now doesn't make a copy when the input is a bytes 18918 object. Initial patch by Peter Otten. 18919 18920- bpo-19748: On AIX, time.mktime() now raises an OverflowError for year 18921 outsize range [1902; 2037]. 18922 18923- bpo-19573: inspect.signature: Use enum for parameter kind constants. 18924 18925- bpo-20726: inspect.signature: Make Signature and Parameter picklable. 18926 18927- bpo-17373: Add inspect.Signature.from_callable method. 18928 18929- bpo-20378: Improve repr of inspect.Signature and inspect.Parameter. 18930 18931- bpo-20816: Fix inspect.getcallargs() to raise correct TypeError for 18932 missing keyword-only arguments. Patch by Jeremiah Lowin. 18933 18934- bpo-20817: Fix inspect.getcallargs() to fail correctly if more than 3 18935 arguments are missing. Patch by Jeremiah Lowin. 18936 18937- bpo-6676: Ensure a meaningful exception is raised when attempting to parse 18938 more than one XML document per pyexpat xmlparser instance. (Original 18939 patches by Hirokazu Yamamoto and Amaury Forgeot d'Arc, with suggested 18940 wording by David Gutteridge) 18941 18942- bpo-21117: Fix inspect.signature to better support functools.partial. Due 18943 to the specifics of functools.partial implementation, 18944 positional-or-keyword arguments passed as keyword arguments become 18945 keyword-only. 18946 18947- bpo-20334: inspect.Signature and inspect.Parameter are now hashable. 18948 Thanks to Antony Lee for bug reports and suggestions. 18949 18950- bpo-15916: doctest.DocTestSuite returns an empty unittest.TestSuite 18951 instead of raising ValueError if it finds no tests 18952 18953- bpo-21209: Fix asyncio.tasks.CoroWrapper to workaround a bug in yield-from 18954 implementation in CPythons prior to 3.4.1. 18955 18956- asyncio: Add gi_{frame,running,code} properties to CoroWrapper (upstream 18957 issue #163). 18958 18959- bpo-21311: Avoid exception in _osx_support with non-standard compiler 18960 configurations. Patch by John Szakmeister. 18961 18962- bpo-11571: Ensure that the turtle window becomes the topmost window when 18963 launched on OS X. 18964 18965- bpo-21801: Validate that __signature__ is None or an instance of 18966 Signature. 18967 18968- bpo-21923: Prevent AttributeError in 18969 distutils.sysconfig.customize_compiler due to possible uninitialized 18970 _config_vars. 18971 18972- bpo-21323: Fix http.server to again handle scripts in CGI subdirectories, 18973 broken by the fix for security issue #19435. Patch by Zach Byrne. 18974 18975- bpo-22733: Fix ffi_prep_args not zero-extending argument values correctly 18976 on 64-bit Windows. 18977 18978- bpo-23302: Default to TCP_NODELAY=1 upon establishing an HTTPConnection. 18979 Removed use of hard-coded MSS as it's an optimization that's no longer 18980 needed with Nagle disabled. 18981 18982IDLE 18983---- 18984 18985- bpo-20577: Configuration of the max line length for the FormatParagraph 18986 extension has been moved from the General tab of the Idle preferences 18987 dialog to the FormatParagraph tab of the Config Extensions dialog. Patch 18988 by Tal Einat. 18989 18990- bpo-16893: Update Idle doc chapter to match current Idle and add new 18991 information. 18992 18993- bpo-3068: Add Idle extension configuration dialog to Options menu. Changes 18994 are written to HOME/.idlerc/config-extensions.cfg. Original patch by Tal 18995 Einat. 18996 18997- bpo-16233: A module browser (File : Class Browser, Alt+C) requires an 18998 editor window with a filename. When Class Browser is requested otherwise, 18999 from a shell, output window, or 'Untitled' editor, Idle no longer displays 19000 an error box. It now pops up an Open Module box (Alt+M). If a valid name 19001 is entered and a module is opened, a corresponding browser is also opened. 19002 19003- bpo-4832: Save As to type Python files automatically adds .py to the name 19004 you enter (even if your system does not display it). Some systems 19005 automatically add .txt when type is Text files. 19006 19007- bpo-21986: Code objects are not normally pickled by the pickle module. To 19008 match this, they are no longer pickled when running under Idle. 19009 19010- bpo-17390: Adjust Editor window title; remove 'Python', move version to 19011 end. 19012 19013- bpo-14105: Idle debugger breakpoints no longer disappear when inserting or 19014 deleting lines. 19015 19016- bpo-17172: Turtledemo can now be run from Idle. Currently, the entry is on 19017 the Help menu, but it may move to Run. Patch by Ramchandra Apt and Lita 19018 Cho. 19019 19020- bpo-21765: Add support for non-ascii identifiers to HyperParser. 19021 19022- bpo-21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav 19023 Heblikar. 19024 19025- bpo-18592: Add unittest for SearchDialogBase. Patch by Phil Webster. 19026 19027- bpo-21694: Add unittest for ParenMatch. Patch by Saimadhav Heblikar. 19028 19029- bpo-21686: add unittest for HyperParser. Original patch by Saimadhav 19030 Heblikar. 19031 19032- bpo-12387: Add missing upper(lower)case versions of default Windows key 19033 bindings for Idle so Caps Lock does not disable them. Patch by Roger 19034 Serwy. 19035 19036- bpo-21695: Closing a Find-in-files output window while the search is still 19037 in progress no longer closes Idle. 19038 19039- bpo-18910: Add unittest for textView. Patch by Phil Webster. 19040 19041- bpo-18292: Add unittest for AutoExpand. Patch by Saihadhav Heblikar. 19042 19043- bpo-18409: Add unittest for AutoComplete. Patch by Phil Webster. 19044 19045- bpo-21477: htest.py - Improve framework, complete set of tests. Patches by 19046 Saimadhav Heblikar 19047 19048- bpo-18104: Add idlelib/idle_test/htest.py with a few sample tests to begin 19049 consolidating and improving human-validated tests of Idle. Change other 19050 files as needed to work with htest. Running the module as __main__ runs 19051 all tests. 19052 19053- bpo-21139: Change default paragraph width to 72, the PEP 8 recommendation. 19054 19055- bpo-21284: Paragraph reformat test passes after user changes reformat 19056 width. 19057 19058- bpo-17654: Ensure IDLE menus are customized properly on OS X for 19059 non-framework builds and for all variants of Tk. 19060 19061- bpo-23180: Rename IDLE "Windows" menu item to "Window". Patch by Al 19062 Sweigart. 19063 19064Build 19065----- 19066 19067- bpo-15506: Use standard PKG_PROG_PKG_CONFIG autoconf macro in the 19068 configure script. 19069 19070- bpo-22935: Allow the ssl module to be compiled if openssl doesn't support 19071 SSL 3. 19072 19073- bpo-22592: Drop support of the Borland C compiler to build Python. The 19074 distutils module still supports it to build extensions. 19075 19076- bpo-22591: Drop support of MS-DOS, especially of the DJGPP compiler 19077 (MS-DOS port of GCC). 19078 19079- bpo-16537: Check whether self.extensions is empty in setup.py. Patch by 19080 Jonathan Hosmer. 19081 19082- bpo-22359: Remove incorrect uses of recursive make. Patch by Jonas 19083 Wagner. 19084 19085- bpo-21958: Define HAVE_ROUND when building with Visual Studio 2013 and 19086 above. Patch by Zachary Turner. 19087 19088- bpo-18093: the programs that embed the CPython runtime are now in a 19089 separate "Programs" directory, rather than being kept in the Modules 19090 directory. 19091 19092- bpo-15759: "make suspicious", "make linkcheck" and "make doctest" in Doc/ 19093 now display special message when and only when there are failures. 19094 19095- bpo-21141: The Windows build process no longer attempts to find Perl, 19096 instead relying on OpenSSL source being configured and ready to build. 19097 The ``PCbuild\build_ssl.py`` script has been re-written and re-named to 19098 ``PCbuild\prepare_ssl.py``, and takes care of configuring OpenSSL source 19099 for both 32 and 64 bit platforms. OpenSSL sources obtained from 19100 svn.python.org will always be pre-configured and ready to build. 19101 19102- bpo-21037: Add a build option to enable AddressSanitizer support. 19103 19104- bpo-19962: The Windows build process now creates "python.bat" in the root 19105 of the source tree, which passes all arguments through to the most 19106 recently built interpreter. 19107 19108- bpo-21285: Refactor and fix curses configure check to always search in a 19109 ncursesw directory. 19110 19111- bpo-15234: For BerkelyDB and Sqlite, only add the found library and 19112 include directories if they aren't already being searched. This avoids an 19113 explicit runtime library dependency. 19114 19115- bpo-17861: Tools/scripts/generate_opcode_h.py automatically regenerates 19116 Include/opcode.h from Lib/opcode.py if the latter gets any change. 19117 19118- bpo-20644: OS X installer build support for documentation build changes in 19119 3.4.1: assume externally supplied sphinx-build is available in /usr/bin. 19120 19121- bpo-20022: Eliminate use of deprecated bundlebuilder in OS X builds. 19122 19123- bpo-15968: Incorporated Tcl, Tk, and Tix builds into the Windows build 19124 solution. 19125 19126- bpo-17095: Fix Modules/Setup *shared* support. 19127 19128- bpo-21811: Anticipated fixes to support OS X versions > 10.9. 19129 19130- bpo-21166: Prevent possible segfaults and other random failures of python 19131 --generate-posix-vars in pybuilddir.txt build target. 19132 19133- bpo-18096: Fix library order returned by python-config. 19134 19135- bpo-17219: Add library build dir for Python extension cross-builds. 19136 19137- bpo-22919: Windows build updated to support VC 14.0 (Visual Studio 2015), 19138 which will be used for the official release. 19139 19140- bpo-21236: Build _msi.pyd with cabinet.lib instead of fci.lib 19141 19142- bpo-17128: Use private version of OpenSSL for OS X 10.5+ installer. 19143 19144C API 19145----- 19146 19147- bpo-14203: Remove obsolete support for view==NULL in PyBuffer_FillInfo(), 19148 bytearray_getbuffer(), bytesiobuf_getbuffer() and array_buffer_getbuf(). 19149 All functions now raise BufferError in that case. 19150 19151- bpo-22445: PyBuffer_IsContiguous() now implements precise contiguity 19152 tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation 19153 flag. Previously the function reported false negatives for corner cases. 19154 19155- bpo-22079: PyType_Ready() now checks that statically allocated type has no 19156 dynamically allocated bases. 19157 19158- bpo-22453: Removed non-documented macro PyObject_REPR(). 19159 19160- bpo-18395: Rename ``_Py_char2wchar()`` to :c:func:`Py_DecodeLocale`, 19161 rename ``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document 19162 these functions. 19163 19164- bpo-21233: Add new C functions: PyMem_RawCalloc(), PyMem_Calloc(), 19165 PyObject_Calloc(), _PyObject_GC_Calloc(). bytes(int) is now using 19166 ``calloc()`` instead of ``malloc()`` for large objects which is faster and 19167 use less memory. 19168 19169- bpo-20942: PyImport_ImportFrozenModuleObject() no longer sets __file__ to 19170 match what importlib does; this affects _frozen_importlib as well as any 19171 module loaded using imp.init_frozen(). 19172 19173Documentation 19174------------- 19175 19176- bpo-19548: Update the codecs module documentation to better cover the 19177 distinction between text encodings and other codecs, together with other 19178 clarifications. Patch by Martin Panter. 19179 19180- bpo-22394: Doc/Makefile now supports ``make venv PYTHON=../python`` to 19181 create a venv for generating the documentation, e.g., ``make html 19182 PYTHON=venv/bin/python3``. 19183 19184- bpo-21514: The documentation of the json module now refers to new JSON RFC 19185 7159 instead of obsoleted RFC 4627. 19186 19187- bpo-21777: The binary sequence methods on bytes and bytearray are now 19188 documented explicitly, rather than assuming users will be able to derive 19189 the expected behaviour from the behaviour of the corresponding str 19190 methods. 19191 19192- bpo-6916: undocument deprecated asynchat.fifo class. 19193 19194- bpo-17386: Expanded functionality of the ``Doc/make.bat`` script to make 19195 it much more comparable to ``Doc/Makefile``. 19196 19197- bpo-21312: Update the thread_foobar.h template file to include newer 19198 threading APIs. Patch by Jack McCracken. 19199 19200- bpo-21043: Remove the recommendation for specific CA organizations and to 19201 mention the ability to load the OS certificates. 19202 19203- bpo-20765: Add missing documentation for PurePath.with_name() and 19204 PurePath.with_suffix(). 19205 19206- bpo-19407: New package installation and distribution guides based on the 19207 Python Packaging Authority tools. Existing guides have been retained as 19208 legacy links from the distutils docs, as they still contain some required 19209 reference material for tool developers that isn't recorded anywhere else. 19210 19211- bpo-19697: Document cases where __main__.__spec__ is None. 19212 19213Tests 19214----- 19215 19216- bpo-18982: Add tests for CLI of the calendar module. 19217 19218- bpo-19548: Added some additional checks to test_codecs to ensure that 19219 statements in the updated documentation remain accurate. Patch by Martin 19220 Panter. 19221 19222- bpo-22838: All test_re tests now work with unittest test discovery. 19223 19224- bpo-22173: Update lib2to3 tests to use unittest test discovery. 19225 19226- bpo-16000: Convert test_curses to use unittest. 19227 19228- bpo-21456: Skip two tests in test_urllib2net.py if _ssl module not 19229 present. Patch by Remi Pointel. 19230 19231- bpo-20746: Fix test_pdb to run in refleak mode (-R). Patch by Xavier de 19232 Gaye. 19233 19234- bpo-22060: test_ctypes has been somewhat cleaned up and simplified; it now 19235 uses unittest test discovery to find its tests. 19236 19237- bpo-22104: regrtest.py no longer holds a reference to the suite of tests 19238 loaded from test modules that don't define test_main(). 19239 19240- bpo-22111: Assorted cleanups in test_imaplib. Patch by Milan Oberkirch. 19241 19242- bpo-22002: Added ``load_package_tests`` function to test.support and used 19243 it to implement/augment test discovery in test_asyncio, test_email, 19244 test_importlib, test_json, and test_tools. 19245 19246- bpo-21976: Fix test_ssl to accept LibreSSL version strings. Thanks to 19247 William Orr. 19248 19249- bpo-21918: Converted test_tools from a module to a package containing 19250 separate test files for each tested script. 19251 19252- bpo-9554: Use modern unittest features in test_argparse. Initial patch by 19253 Denver Coneybeare and Radu Voicilas. 19254 19255- bpo-20155: Changed HTTP method names in failing tests in test_httpservers 19256 so that packet filtering software (specifically Windows Base Filtering 19257 Engine) does not interfere with the transaction semantics expected by the 19258 tests. 19259 19260- bpo-19493: Refactored the ctypes test package to skip tests explicitly 19261 rather than silently. 19262 19263- bpo-18492: All resources are now allowed when tests are not run by 19264 regrtest.py. 19265 19266- bpo-21634: Fix pystone micro-benchmark: use floor division instead of true 19267 division to benchmark integers instead of floating point numbers. Set 19268 pystone version to 1.2. Patch written by Lennart Regebro. 19269 19270- bpo-21605: Added tests for Tkinter images. 19271 19272- bpo-21493: Added test for ntpath.expanduser(). Original patch by Claudiu 19273 Popa. 19274 19275- bpo-19925: Added tests for the spwd module. Original patch by Vajrasky 19276 Kok. 19277 19278- bpo-21522: Added Tkinter tests for Listbox.itemconfigure(), 19279 PanedWindow.paneconfigure(), and Menu.entryconfigure(). 19280 19281- bpo-17756: Fix test_code test when run from the installed location. 19282 19283- bpo-17752: Fix distutils tests when run from the installed location. 19284 19285- bpo-18604: Consolidated checks for GUI availability. All platforms now at 19286 least check whether Tk can be instantiated when the GUI resource is 19287 requested. 19288 19289- bpo-21275: Fix a socket test on KFreeBSD. 19290 19291- bpo-21223: Pass test_site/test_startup_imports when some of the extensions 19292 are built as builtins. 19293 19294- bpo-20635: Added tests for Tk geometry managers. 19295 19296- Add test case for freeze. 19297 19298- bpo-20743: Fix a reference leak in test_tcl. 19299 19300- bpo-21097: Move test_namespace_pkgs into test_importlib. 19301 19302- bpo-21503: Use test_both() consistently in test_importlib. 19303 19304- bpo-20939: Avoid various network test failures due to new redirect of 19305 http://www.python.org/ to https://www.python.org: use 19306 http://www.example.com instead. 19307 19308- bpo-20668: asyncio tests no longer rely on tests.txt file. (Patch by 19309 Vajrasky Kok) 19310 19311- bpo-21093: Prevent failures of ctypes test_macholib on OS X if a copy of 19312 libz exists in $HOME/lib or /usr/local/lib. 19313 19314- bpo-22770: Prevent some Tk segfaults on OS X when running gui tests. 19315 19316- bpo-23211: Workaround test_logging failure on some OS X 10.6 systems. 19317 19318- bpo-23345: Prevent test_ssl failures with large OpenSSL patch level values 19319 (like 0.9.8zc). 19320 19321Tools/Demos 19322----------- 19323 19324- bpo-22314: pydoc now works when the LINES environment variable is set. 19325 19326- bpo-22615: Argument Clinic now supports the "type" argument for the int 19327 converter. This permits using the int converter with enums and typedefs. 19328 19329- bpo-20076: The makelocalealias.py script no longer ignores UTF-8 mapping. 19330 19331- bpo-20079: The makelocalealias.py script now can parse the SUPPORTED file 19332 from glibc sources and supports command line options for source paths. 19333 19334- bpo-22201: Command-line interface of the zipfile module now correctly 19335 extracts ZIP files with directory entries. Patch by Ryan Wilson. 19336 19337- bpo-22120: For functions using an unsigned integer return converter, 19338 Argument Clinic now generates a cast to that type for the comparison to -1 19339 in the generated code. (This suppresses a compilation warning.) 19340 19341- bpo-18974: Tools/scripts/diff.py now uses argparse instead of optparse. 19342 19343- bpo-21906: Make Tools/scripts/md5sum.py work in Python 3. Patch by Zachary 19344 Ware. 19345 19346- bpo-21629: Fix Argument Clinic's "--converters" feature. 19347 19348- Add support for ``yield from`` to 2to3. 19349 19350- Add support for the PEP 465 matrix multiplication operator to 2to3. 19351 19352- bpo-16047: Fix module exception list and __file__ handling in freeze. 19353 Patch by Meador Inge. 19354 19355- bpo-11824: Consider ABI tags in freeze. Patch by Meador Inge. 19356 19357- bpo-20535: PYTHONWARNING no longer affects the run_tests.py script. Patch 19358 by Arfrever Frehtes Taifersar Arahesis. 19359 19360Windows 19361------- 19362 19363- bpo-23260: Update Windows installer 19364 19365- The bundled version of Tcl/Tk has been updated to 8.6.3. The most visible 19366 result of this change is the addition of new native file dialogs when 19367 running on Windows Vista or newer. See Tcl/Tk's TIP 432 for more 19368 information. Also, this version of Tcl/Tk includes support for Windows 19369 10. 19370 19371- bpo-17896: The Windows build scripts now expect external library sources 19372 to be in ``PCbuild\..\externals`` rather than ``PCbuild\..\..``. 19373 19374- bpo-17717: The Windows build scripts now use a copy of NASM pulled from 19375 svn.python.org to build OpenSSL. 19376 19377- bpo-21907: Improved the batch scripts provided for building Python. 19378 19379- bpo-22644: The bundled version of OpenSSL has been updated to 1.0.1j. 19380 19381- bpo-10747: Use versioned labels in the Windows start menu. Patch by Olive 19382 Kilburn. 19383 19384- bpo-22980: .pyd files with a version and platform tag (for example, 19385 ".cp35-win32.pyd") will now be loaded in preference to those without tags. 19386 19387 19388**(For information about older versions, consult the HISTORY file.)** 19389