Lines Matching +full:stretch +full:- +full:updates
36 sufficient; the e-mail address isn't necessary.
52 Summary -- Release Highlights
60 * :ref:`PEP 563 <whatsnew37-pep563>`, postponed evaluation of type annotations.
68 * :mod:`contextvars`: :ref:`PEP 567 -- Context Variables <whatsnew37-pep567>`
69 * :mod:`dataclasses`: :ref:`PEP 557 -- Data Classes <whatsnew37-pep557>`
72 New built-in features:
74 * :ref:`PEP 553 <whatsnew37-pep553>`, the new :func:`breakpoint` function.
78 * :ref:`PEP 562 <whatsnew37-pep562>`, customization of access to
81 * :ref:`PEP 560 <whatsnew37-pep560>`, core support for typing module and
84 * the insertion-order preservation nature of :ref:`dict <typesmapping>`
88 .. _has been declared: https://mail.python.org/pipermail/python-dev/2017-December/151283.html
96 :ref:`functions with nanosecond resolution <whatsnew37-pep564>`.
102 * :ref:`PEP 538 <whatsnew37-pep538>`, legacy C locale coercion
103 * :ref:`PEP 540 <whatsnew37-pep540>`, forced UTF-8 runtime mode
104 * :ref:`PEP 552 <whatsnew37-pep552>`, deterministic .pycs
105 * :ref:`New Python Development Mode <whatsnew37-devmode>`
106 * :ref:`PEP 565 <whatsnew37-pep565>`, improved :exc:`DeprecationWarning`
111 * :ref:`PEP 539 <whatsnew37-pep539>`, new C API for thread-local storage
115 * :ref:`PEP 545 <whatsnew37-pep545>`, Python documentation translations
121 The :ref:`whatsnew37-perf` section lists them in detail.
124 releases please refer to the :ref:`porting-to-python-37` section.
130 .. _whatsnew37-pep563:
133 --------------------------------------------
155 Usability-wise, annotations now support forward references, making the
160 def from_string(cls, source: str) -> C:
163 def validate_b(self, obj: B) -> bool:
170 on a per-module basis in Python 3.7 using a :mod:`__future__` import::
178 :pep:`563` -- Postponed evaluation of annotations
182 .. _whatsnew37-pep538:
185 ---------------------------------
188 default strategy for handling the "7-bit ASCII" text encoding assumption
189 currently implied by the use of the default C or POSIX locale on non-Windows
192 :pep:`538` updates the default interpreter command line interface to
193 automatically coerce that locale to an available UTF-8 based locale as
196 both the core interpreter and locale-aware C extensions (such as
197 :mod:`readline`) will assume the use of UTF-8 as the default text encoding,
201 full text handling support to suitably configured non-ASCII based locales.
205 using any of the defined coercion target locales (currently ``C.UTF-8``,
206 ``C.utf8``, and ``UTF-8``). The default error handler for :data:`~sys.stderr`
217 running non-Python applications and older versions of Python), it has the
221 :ref:`whatsnew37-pep540`.
225 :pep:`538` -- Coercing the legacy C locale to a UTF-8 based locale
229 .. _whatsnew37-pep540:
231 PEP 540: Forced UTF-8 Runtime Mode
232 -----------------------------------
234 The new :option:`-X` ``utf8`` command line option and :envvar:`PYTHONUTF8`
235 environment variable can be used to enable the :ref:`Python UTF-8 Mode
236 <utf8-mode>`.
238 When in UTF-8 mode, CPython ignores the locale settings, and uses the
239 UTF-8 encoding by default. The error handlers for :data:`sys.stdin` and
242 The forced UTF-8 mode can be used to change the text handling behavior in
246 While :pep:`540`'s UTF-8 mode has the benefit of working regardless of which
249 non-Python applications, and child processes running older versions of Python.
251 components, Python 3.7 also implements :ref:`whatsnew37-pep540`).
253 The UTF-8 mode is enabled by default when the locale is ``C`` or ``POSIX``, and
254 the :pep:`538` locale coercion feature fails to change it to a UTF-8 based
260 :pep:`540` -- Add a new UTF-8 mode
264 .. _whatsnew37-pep553:
266 PEP 553: Built-in ``breakpoint()``
267 ----------------------------------
269 Python 3.7 includes the new built-in :func:`breakpoint` function as
272 Built-in ``breakpoint()`` calls :func:`sys.breakpointhook`. By default, the
277 choice. Set ``PYTHONBREAKPOINT=0`` to completely disable built-in
282 :pep:`553` -- Built-in breakpoint()
286 .. _whatsnew37-pep539:
288 PEP 539: New C API for Thread-Local Storage
289 -------------------------------------------
291 While Python provides a C API for thread-local storage support; the existing
292 :ref:`Thread Local Storage (TLS) API <thread-local-storage-api>` has used
295 POSIX-compliant, nor portable in any practical sense.
298 API <thread-specific-storage-api>` to CPython which supersedes use of the
301 to represent TSS keys--an opaque type the definition of which may depend on
308 no-op and immediately return failure. This indicates clearly that the old API
314 :pep:`539` -- A New C-API for Thread-Local Storage in CPython
318 .. _whatsnew37-pep562:
321 -----------------------------------------------------
332 :pep:`562` -- Module ``__getattr__`` and ``__dir__``
336 .. _whatsnew37-pep564:
339 ------------------------------------------------------
342 of a floating-point number returned by the :func:`time.time` function
356 :pep:`Measurements <0564#annex-clocks-resolution-in-python>`
362 :pep:`564` -- Add new time functions with nanosecond resolution
366 .. _whatsnew37-pep565:
369 ------------------------------------------------
400 :pep:`565` -- Show DeprecationWarning in ``__main__``
404 .. _whatsnew37-pep560:
407 -------------------------------------------------------------
421 :pep:`560` -- Core support for typing module and generic types
425 .. _whatsnew37-pep552:
427 PEP 552: Hash-based .pyc Files
428 ------------------------------
430 Python has traditionally checked the up-to-dateness of bytecode cache files
431 (i.e., ``.pyc`` files) by comparing the source metadata (last-modified timestamp
434 filesystem timestamps are too coarse, Python can miss source updates, leading to
436 problematic for `build reproducibility <https://reproducible-builds.org/>`_ and
437 content-based build systems.
441 called "hash-based". By default, Python still uses timestamp-based invalidation
442 and does not generate hash-based ``.pyc`` files at runtime. Hash-based ``.pyc``
445 Hash-based ``.pyc`` files come in two variants: checked and unchecked. Python
446 validates checked hash-based ``.pyc`` files against the corresponding source
447 files at runtime but doesn't do so for unchecked hash-based pycs. Unchecked
448 hash-based ``.pyc`` files are a useful performance optimization for environments
450 keeping ``.pyc`` files up-to-date.
452 See :ref:`pyc-invalidation` for more information.
456 :pep:`552` -- Deterministic pycs
460 .. _whatsnew37-pep545:
463 ------------------------------------------
470 - Japanese: https://docs.python.org/ja/
471 - French: https://docs.python.org/fr/
472 - Korean: https://docs.python.org/ko/
476 :pep:`545` -- Python Documentation Translations
481 .. _whatsnew37-devmode:
483 Python Development Mode (-X dev)
484 --------------------------------
486 The new :option:`-X` ``dev`` command line option or the new
499 :ref:`formatted string literals <f-strings>` due to a problem with the
529 :ref:`tracebacks <traceback-objects>` is now writable.
532 * When using the :option:`-m` switch, ``sys.path[0]`` is now eagerly expanded
538 * The new :option:`-X` ``importtime`` option or the
547 .. _whatsnew37-pep567:
550 -----------
555 similar to thread-local variables. Unlike TLS, context variables
565 :pep:`567` -- Context Variables
569 .. _whatsnew37-pep557:
572 -----------
593 :pep:`557` -- Data Classes
600 -------------------
608 new API. Built-in file path loaders and zip file loaders both support this.
614 `importlib_resources <https://importlib-resources.readthedocs.io/en/latest/>`_
615 -- a PyPI backport for earlier Python versions.
623 --------
634 -------
637 :ref:`performance improvements <whatsnew37-asyncio-perf>`. Notable changes
651 have a new optional keyword-only *context* parameter.
761 :term:`path-like objects <path-like object>`.
776 :ref:`deprecated <whatsnew37-asyncio-deprecated>`.
780 --------
788 --------
796 -----------
803 ----------
807 :ref:`hash-based .pyc invalidation <whatsnew37-pep552>`. The invalidation
809 ``--invalidation-mode`` argument.
814 ------------------
827 ----------
829 The new :func:`~contextlib.nullcontext` is a simpler and faster no-op
831 (Contributed by Jesse-Bakker in :issue:`10049`.)
842 --------
844 The :mod:`cProfile` command line now accepts ``-m module_name`` as an
849 -----
859 --------
867 The :class:`tzinfo <datetime.tzinfo>` class now supports sub-minute offsets.
872 ---
874 :mod:`dbm.dumb` now supports reading read-only files and no longer writes the
879 -------
881 The :mod:`decimal` module now uses :ref:`context variables <whatsnew37-pep567>`
887 ---
898 ---------
906 ----
913 In Python 3.8, attempting to check for non-Enum objects in :class:`Enum`
915 attempting to check for non-Flag objects in a :class:`Flag` member will
922 ---------
930 --
934 This can be used before a POSIX ``fork()`` call to make the GC copy-on-write
942 ----
944 The :mod:`hmac` module now has an optimized one-shot :func:`~hmac.digest`
950 -----------
958 -----------
961 ``If-Modified-Since`` header. The server returns the 304 response status if
966 argument, in addition to the new ``--directory`` command line argument.
973 It is used when ``http.server`` is run with ``-m``.
978 ----------------
983 now displays nested functions and classes in addition to top-level
992 The font sample now includes a selection of non-Latin characters so that
1021 by double-clicking the button or into the clipboard or a separate window
1022 by right-clicking the button. (Contributed by Tal Einat in :issue:`1529353`.)
1030 They re-appear in the box for the next customized run. One can also
1044 ---------
1061 the passed source. A :ref:`hash-based .pyc file <whatsnew37-pep552>`
1066 --
1075 ---------
1084 ---------
1087 :meth:`integer-like objects <object.__index__>` as start, stop,
1093 ------
1099 The :func:`locale.getpreferredencoding` function now always returns ``'UTF-8'``
1100 on Android or when in the :ref:`forced UTF-8 mode <whatsnew37-pep540>`.
1104 -------
1119 ----
1121 The new :func:`math.remainder` function implements the IEEE 754-style remainder
1126 ---------
1128 The MIME type of .bmp has been changed from ``'image/x-ms-bmp'`` to
1134 ------
1142 ---------------
1154 Non-daemonic threads created by :class:`~multiprocessing.Process` are now
1160 --
1178 permission bits of newly created intermediate-level directories.
1191 -------
1199 ---
1201 :func:`pdb.set_trace` now takes an optional *header* keyword-only
1205 :mod:`pdb` command line now accepts ``-m module_name`` as an alternative to
1210 ----------
1212 :func:`py_compile.compile` -- and by extension, :mod:`compileall` -- now
1214 unconditionally creating ``.pyc`` files for hash-based validation.
1216 `reproducible builds <https://reproducible-builds.org/>`_ of ``.pyc``
1222 -----
1225 new ``-n`` command-line argument.
1230 -----
1237 --
1244 ``'^$'`` or ``(?=-)`` that matches an empty string.
1263 ------
1272 ------
1293 Sockets now auto-detect family, type and protocol from file descriptor
1299 ------------
1301 :meth:`socketserver.ThreadingMixIn.server_close` now waits until all non-daemon
1307 classes. Set the class attribute to ``False`` to get the pre-3.7 behaviour.
1311 -------
1318 :term:`path-like object`, instead of just a string.
1323 ---
1338 longer supported (see :ref:`37-platform-support-removals` for more details).
1350 approach rather than a hard-coded whitelist. Python no longer re-enables
1351 ciphers that have been blocked by OpenSSL security updates. Default cipher
1358 now stores the expected hostname in A-label form (``"xn--pythn-mua.org"``),
1359 rather than the U-label form (``"pythön.org"``). (Contributed by
1366 see :ref:`ssl-tlsv1_3`.
1385 post-handshake authentication.
1389 ------
1392 expression pattern for braced placeholders and non-braced placeholders
1397 ----------
1427 ---
1430 built-in :func:`breakpoint`.
1433 On Android, the new :func:`sys.getandroidapilevel` returns the build-time
1446 ----
1463 * :const:`time.CLOCK_PROF` (FreeBSD, NetBSD and OpenBSD): High-resolution
1464 per-process CPU timer.
1470 can be used to get per-thread CPU time measurements.
1474 of the thread-specific CPU-time clock.
1478 -------
1485 -----------
1497 -----
1511 -----------
1519 --------
1521 The new ``-k`` command-line option allows filtering tests by a name
1522 substring or a Unix shell-like pattern.
1523 For example, ``python -m unittest -k foo`` runs
1530 -------------
1544 ------------
1552 --
1560 ----
1564 multiprocessing-safe method.
1576 --------
1580 * warnings enabled via command line options (including those for :option:`-b`
1581 and the new CPython-specific :option:`-X` ``dev`` option) are always passed
1587 * the ``BytesWarning`` filter for :option:`-b` (or ``-bb``)
1588 * any filters specified with the :option:`-W` option
1592 for the new ``-X dev`` mode)
1595 * in :ref:`CPython debug builds <debug-build>`, all warnings are now displayed
1601 Deprecation warnings are once again shown by default in single-file scripts and
1602 at the interactive prompt. See :ref:`whatsnew37-pep565` for details.
1607 ---
1616 ---------
1618 :ref:`ElementPath <elementtree-xpath>` predicates in the :meth:`find`
1625 -------------
1633 ------
1641 ``--compress`` has also been added to support compression.
1646 -------
1660 A new API for thread-local storage has been implemented. See
1661 :ref:`whatsnew37-pep539` for an overview and
1662 :ref:`thread-specific-storage-api` for a complete reference.
1665 The new :ref:`context variables <whatsnew37-pep567>` functionality
1736 embedding applications. See the :ref:`porting-to-python-37` section in this
1737 document and the :ref:`pre-init-safe` section in the C API documentation
1744 :c:func:`Py_DecodeLocale`, :c:func:`Py_EncodeLocale` now use the UTF-8
1745 encoding when the :ref:`UTF-8 mode <whatsnew37-pep540>` is enabled.
1760 Support for building ``--without-threads`` has been removed. The
1765 :mod:`_ctypes <ctypes>` module on non-OSX UNIX platforms. An installed copy
1771 If Python 3.6 is not found on the system (via ``py -3.6``), NuGet is used to
1772 download a copy of 32-bit Python for this purpose. (Contributed by Zachary
1776 OpenSSL 1.0.1 has reached end of lifetime on 2016-12-31 and is no longer
1781 .. _whatsnew37-perf:
1801 .. _whatsnew37-asyncio-perf:
1823 As a result of :ref:`PEP 560 work <whatsnew37-pep560>`, the import time
1829 to be up to 40-75% faster.
1859 20--40% thanks to the use of the :func:`os.scandir` function.
1862 Optimized case-insensitive matching and searching of :mod:`regular
1884 start-up time by up to 10%. (Contributed by Ivan Levkivskyi and INADA Naoki
1888 :class:`datetime.date` and :class:`datetime.datetime` by using fast-path
1923 end-of-line characters to CRLF. This fixes a corruption issue with sdists
1954 ----
1961 .. _whatsnew37-asyncio-deprecated:
1964 -------
1966 Support for directly ``await``-ing instances of :class:`asyncio.Lock` and
1978 -----------
1988 ---
1990 :mod:`dbm.dumb` now supports reading read-only files and no longer writes the
1998 ----
2000 In Python 3.8, attempting to check for non-Enum objects in :class:`Enum`
2002 attempting to check for non-Flag objects in a :class:`Flag` member will
2009 -------
2011 Using non-integer value for selecting a plural form in :mod:`gettext` is
2017 ---------
2035 ------
2042 -------
2049 ---------
2058 ------
2067 ---
2075 -----
2083 ---
2094 ----
2114 .. _37-platform-support-removals:
2121 are now expected to provide at least one of ``C.UTF-8`` (full locale),
2122 ``C.utf8`` (full locale) or ``UTF-8`` (``LC_CTYPE``-only locale) as an
2123 alternative to the legacy ``ASCII``-based ``C`` locale.
2132 Debian 9 ("stretch") and Ubuntu 16.04 ("xenial"), as well as recent releases
2133 of other LTS Linux releases (e.g. RHEL/CentOS 7.5, SLES 12-SP3), use OpenSSL
2166 named tuple class. This was part of an optimization designed to speed-up
2205 default, never worked correctly on x86-64, and it changed the Python
2210 Windows-only Changes
2214 having to specify a minor version as well. So ``py -3-32`` and ``py -3-64``
2215 become valid as well as ``py -3.7-32``, also the -*m*-64 and -*m.n*-64 forms
2220 The launcher can be run as ``py -0`` to produce a list of the installed pythons,
2221 *with default marked with an asterisk*. Running ``py -0p`` will include the paths.
2227 .. _porting-to-python-37:
2237 --------------------------
2266 * When using the :option:`-m` switch, the initial working directory is now added
2276 -------------------------
2279 non-daemon threads complete. Set the new
2281 ``False`` to get the pre-3.7 behaviour.
2287 to get the pre-3.7 behaviour.
2299 is now :ref:`positional-only <positional-only_parameter>`.
2306 :class:`http.cookies.Morsel` are now read-only.
2312 permission bits of newly created intermediate-level directories.
2322 :class:`!FieldStorage`: for non-file fields, the value associated to a key
2347 character sequences ``'--'``, ``'&&'``, ``'~~'``, and ``'||'``. To
2356 did previously, but also on empty strings before all non-whitespace
2362 For patterns that match both empty and non-empty strings, the result of
2366 positions 2--3. To match only blank lines, the pattern should be rewritten
2370 non-empty match. For example ``re.sub('x*', '-', 'abxd')`` returns now
2371 ``'-a-b--d-'`` instead of ``'-a-b-d-'`` (the first minus between 'b' and
2400 * :meth:`importlib.machinery.PathFinder.invalidate_caches` -- which implicitly
2401 affects :func:`importlib.invalidate_caches` -- now deletes entries
2434 ``0001-01-01`` through ``9999-12-31`` range. To support applications that
2452 rest of the parser. Non-string keys and values in the defaults
2464 --------------------
2477 ------------------------
2486 Windows-only Changes
2487 --------------------
2490 ``<python-executable>._pth`` instead of ``'sys.path'``.
2496 ------------------------------------
2502 these updates are intended to be entirely transparent to both embedding
2531 The current exception state has been moved from the frame object to the co-routine.
2541 versions, it respected an ill-defined subset of those environment variables,
2599 forms of attacks. Following the WHATWG specification that updates RFC 3986,
2612 algorithmic complexity. This is a mitigation for :cve:`2020-10735`.