Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b5731e

Browse files
authored
bpo-23404: Update/sync What's New files for 3.6/3.5/2.7 (GH-7622)
1 parent 4836dc9 commit 1b5731e

3 files changed

Lines changed: 233 additions & 19 deletions

File tree

Doc/whatsnew/2.7.rst

Lines changed: 183 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ changes, or look through the Subversion logs for all the details.
15451545
*ciphers* argument that's a string listing the encryption algorithms
15461546
to be allowed; the format of the string is described
15471547
`in the OpenSSL documentation
1548-
<https://www.openssl.org/docs/apps/ciphers.html#CIPHER-LIST-FORMAT>`__.
1548+
<https://www.openssl.org/docs/manmaster/man1/ciphers.html#CIPHER-LIST-FORMAT>`__.
15491549
(Added by Antoine Pitrou; :issue:`8322`.)
15501550

15511551
Another change makes the extension load all of OpenSSL's ciphers and
@@ -1809,7 +1809,7 @@ wish to read the Tcl/Tk manual page describing the
18091809
Ttk theme engine, available at
18101810
https://www.tcl.tk/man/tcl8.5/TkCmd/ttk_intro.htm. Some
18111811
screenshots of the Python/Ttk code in use are at
1812-
http://code.google.com/p/python-ttk/wiki/Screenshots.
1812+
https://code.google.com/archive/p/python-ttk/wikis/Screenshots.wiki.
18131813

18141814
The :mod:`ttk` module was written by Guilherme Polo and added in
18151815
:issue:`2983`. An alternate version called ``Tile.py``, written by
@@ -1832,8 +1832,8 @@ https://pypi.org/project/unittest2.
18321832

18331833
When used from the command line, the module can automatically discover
18341834
tests. It's not as fancy as `py.test <http://pytest.org>`__ or
1835-
`nose <http://code.google.com/p/python-nose/>`__, but provides a simple way
1836-
to run tests kept within a set of package directories. For example,
1835+
`nose <https://nose.readthedocs.io/>`__, but provides a
1836+
simple way to run tests kept within a set of package directories. For example,
18371837
the following command will search the :file:`test/` subdirectory for
18381838
any importable test files named ``test*.py``::
18391839

@@ -2367,6 +2367,18 @@ Port-Specific Changes: Mac OS X
23672367
installation and a user-installed copy of the same version.
23682368
(Changed by Ronald Oussoren; :issue:`4865`.)
23692369

2370+
.. versionchanged:: 2.7.13
2371+
2372+
As of 2.7.13, this change was removed.
2373+
``/Library/Python/2.7/site-packages``, the site-packages directory
2374+
used by the Apple-supplied system Python 2.7 is no longer appended to
2375+
``sys.path`` for user-installed Pythons such as from the python.org
2376+
installers. As of macOS 10.12, Apple changed how the system
2377+
site-packages directory is configured, which could cause installation
2378+
of pip components, like setuptools, to fail. Packages installed for
2379+
the system Python will no longer be shared with user-installed
2380+
Pythons. (:issue:`28440`)
2381+
23702382
Port-Specific Changes: FreeBSD
23712383
-----------------------------------
23722384

@@ -2558,6 +2570,21 @@ exemption allowing new ``-3`` warnings to be added in any Python 2.7
25582570
maintenance release.
25592571

25602572

2573+
Two new environment variables for debug mode
2574+
--------------------------------------------
2575+
2576+
In debug mode, the ``[xxx refs]`` statistic is not written by default, the
2577+
:envvar:`PYTHONSHOWREFCOUNT` environment variable now must also be set.
2578+
(Contributed by Victor Stinner; :issue:`31733`.)
2579+
2580+
When Python is compiled with ``COUNT_ALLOC`` defined, allocation counts are no
2581+
longer dumped by default anymore: the :envvar:`PYTHONSHOWALLOCCOUNT` environment
2582+
variable must now also be set. Moreover, allocation counts are now dumped into
2583+
stderr, rather than stdout. (Contributed by Victor Stinner; :issue:`31692`.)
2584+
2585+
.. versionadded:: 2.7.15
2586+
2587+
25612588
PEP 434: IDLE Enhancement Exception for All Branches
25622589
----------------------------------------------------
25632590

@@ -2602,10 +2629,162 @@ with the first of those changes appearing in the Python 2.7.7 release.
26022629
certificate store, the :class:`~ssl.SSLContext` class, and other
26032630
features. (Contributed by Alex Gaynor and David Reid; :issue:`21308`.)
26042631

2632+
Refer to the "Version added: 2.7.9" notes in the module documentation for
2633+
specific details.
2634+
26052635
* :func:`os.urandom` was changed to cache a file descriptor to ``/dev/urandom``
26062636
instead of reopening ``/dev/urandom`` on every call. (Contributed by Alex
26072637
Gaynor; :issue:`21305`.)
26082638

2639+
* :data:`hashlib.algorithms_guaranteed` and
2640+
:data:`hashlib.algorithms_available` were backported from Python 3 to make
2641+
it easier for Python 2 applications to select the strongest available hash
2642+
algorithm. (Contributed by Alex Gaynor in :issue:`21307`)
2643+
2644+
2645+
PEP 477: Backport ensurepip (PEP 453) to Python 2.7
2646+
---------------------------------------------------
2647+
2648+
:pep:`477` approves the inclusion of the :pep:`453` ensurepip module and the
2649+
improved documentation that was enabled by it in the Python 2.7 maintenance
2650+
releases, appearing first in the Python 2.7.9 release.
2651+
2652+
2653+
Bootstrapping pip By Default
2654+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2655+
2656+
The new :mod:`ensurepip` module (defined in :pep:`453`) provides a standard
2657+
cross-platform mechanism to bootstrap the pip installer into Python
2658+
installations. The version of ``pip`` included with Python 2.7.9 is ``pip``
2659+
1.5.6, and future 2.7.x maintenance releases will update the bundled version to
2660+
the latest version of ``pip`` that is available at the time of creating the
2661+
release candidate.
2662+
2663+
By default, the commands ``pip``, ``pipX`` and ``pipX.Y`` will be installed on
2664+
all platforms (where X.Y stands for the version of the Python installation),
2665+
along with the ``pip`` Python package and its dependencies.
2666+
2667+
For CPython :ref:`source builds on POSIX systems <building-python-on-unix>`,
2668+
the ``make install`` and ``make altinstall`` commands do not bootstrap ``pip``
2669+
by default. This behaviour can be controlled through configure options, and
2670+
overridden through Makefile options.
2671+
2672+
On Windows and Mac OS X, the CPython installers now default to installing
2673+
``pip`` along with CPython itself (users may opt out of installing it
2674+
during the installation process). Window users will need to opt in to the
2675+
automatic ``PATH`` modifications to have ``pip`` available from the command
2676+
line by default, otherwise it can still be accessed through the Python
2677+
launcher for Windows as ``py -m pip``.
2678+
2679+
As `discussed in the PEP`__, platform packagers may choose not to install
2680+
these commands by default, as long as, when invoked, they provide clear and
2681+
simple directions on how to install them on that platform (usually using
2682+
the system package manager).
2683+
2684+
__ https://www.python.org/dev/peps/pep-0477/#disabling-ensurepip-by-downstream-distributors
2685+
2686+
2687+
Documentation Changes
2688+
~~~~~~~~~~~~~~~~~~~~~
2689+
2690+
As part of this change, the :ref:`installing-index` and
2691+
:ref:`distributing-index` sections of the documentation have been
2692+
completely redesigned as short getting started and FAQ documents. Most
2693+
packaging documentation has now been moved out to the Python Packaging
2694+
Authority maintained `Python Packaging User Guide
2695+
<http://packaging.python.org>`__ and the documentation of the individual
2696+
projects.
2697+
2698+
However, as this migration is currently still incomplete, the legacy
2699+
versions of those guides remaining available as :ref:`install-index`
2700+
and :ref:`distutils-index`.
2701+
2702+
.. seealso::
2703+
2704+
:pep:`453` -- Explicit bootstrapping of pip in Python installations
2705+
PEP written by Donald Stufft and Nick Coghlan, implemented by
2706+
Donald Stufft, Nick Coghlan, Martin von Löwis and Ned Deily.
2707+
2708+
PEP 476: Enabling certificate verification by default for stdlib http clients
2709+
-----------------------------------------------------------------------------
2710+
2711+
:pep:`476` updated :mod:`httplib` and modules which use it, such as
2712+
:mod:`urllib2` and :mod:`xmlrpclib`, to now verify that the server
2713+
presents a certificate which is signed by a Certificate Authority in the
2714+
platform trust store and whose hostname matches the hostname being requested
2715+
by default, significantly improving security for many applications. This
2716+
change was made in the Python 2.7.9 release.
2717+
2718+
For applications which require the old previous behavior, they can pass an
2719+
alternate context::
2720+
2721+
import urllib2
2722+
import ssl
2723+
2724+
# This disables all verification
2725+
context = ssl._create_unverified_context()
2726+
2727+
# This allows using a specific certificate for the host, which doesn't need
2728+
# to be in the trust store
2729+
context = ssl.create_default_context(cafile="/path/to/file.crt")
2730+
2731+
urllib2.urlopen("https://invalid-cert", context=context)
2732+
2733+
2734+
PEP 493: HTTPS verification migration tools for Python 2.7
2735+
----------------------------------------------------------
2736+
2737+
:pep:`493` provides additional migration tools to support a more incremental
2738+
infrastructure upgrade process for environments containing applications and
2739+
services relying on the historically permissive processing of server
2740+
certificates when establishing client HTTPS connections. These additions were
2741+
made in the Python 2.7.12 release.
2742+
2743+
These tools are intended for use in cases where affected applications and
2744+
services can't be modified to explicitly pass a more permissive SSL context
2745+
when establishing the connection.
2746+
2747+
For applications and services which can't be modified at all, the new
2748+
``PYTHONHTTPSVERIFY`` environment variable may be set to ``0`` to revert an
2749+
entire Python process back to the default permissive behaviour of Python 2.7.8
2750+
and earlier.
2751+
2752+
For cases where the connection establishment code can't be modified, but the
2753+
overall application can be, the new :func:`ssl._https_verify_certificates`
2754+
function can be used to adjust the default behaviour at runtime.
2755+
2756+
2757+
New ``make regen-all`` build target
2758+
-----------------------------------
2759+
2760+
To simplify cross-compilation, and to ensure that CPython can reliably be
2761+
compiled without requiring an existing version of Python to already be
2762+
available, the autotools-based build system no longer attempts to implicitly
2763+
recompile generated files based on file modification times.
2764+
2765+
Instead, a new ``make regen-all`` command has been added to force regeneration
2766+
of these files when desired (e.g. after an initial version of Python has
2767+
already been built based on the pregenerated versions).
2768+
2769+
More selective regeneration targets are also defined - see
2770+
:source:`Makefile.pre.in` for details.
2771+
2772+
(Contributed by Victor Stinner in :issue:`23404`.)
2773+
2774+
.. versionadded:: 2.7.14
2775+
2776+
2777+
Removal of ``make touch`` build target
2778+
--------------------------------------
2779+
2780+
The ``make touch`` build target previously used to request implicit regeneration
2781+
of generated files by updating their modification times has been removed.
2782+
2783+
It has been replaced by the new ``make regen-all`` target.
2784+
2785+
(Contributed by Victor Stinner in :issue:`23404`.)
2786+
2787+
.. versionchanged:: 2.7.14
26092788

26102789
.. ======================================================================
26112790

Doc/whatsnew/3.5.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,3 +2536,39 @@ Changes in the C API
25362536
:c:member:`tp_as_async` slot. Refer to :ref:`coro-objects` for
25372537
new types, structures and functions.
25382538

2539+
2540+
Notable changes in Python 3.5.4
2541+
===============================
2542+
2543+
New ``make regen-all`` build target
2544+
-----------------------------------
2545+
2546+
To simplify cross-compilation, and to ensure that CPython can reliably be
2547+
compiled without requiring an existing version of Python to already be
2548+
available, the autotools-based build system no longer attempts to implicitly
2549+
recompile generated files based on file modification times.
2550+
2551+
Instead, a new ``make regen-all`` command has been added to force regeneration
2552+
of these files when desired (e.g. after an initial version of Python has
2553+
already been built based on the pregenerated versions).
2554+
2555+
More selective regeneration targets are also defined - see
2556+
:source:`Makefile.pre.in` for details.
2557+
2558+
(Contributed by Victor Stinner in :issue:`23404`.)
2559+
2560+
.. versionadded:: 3.5.4
2561+
2562+
2563+
Removal of ``make touch`` build target
2564+
--------------------------------------
2565+
2566+
The ``make touch`` build target previously used to request implicit regeneration
2567+
of generated files by updating their modification times has been removed.
2568+
2569+
It has been replaced by the new ``make regen-all`` target.
2570+
2571+
(Contributed by Victor Stinner in :issue:`23404`.)
2572+
2573+
.. versionchanged:: 3.5.4
2574+

Doc/whatsnew/3.6.rst

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ and the ``__annotations__`` attribute.
237237
and Guido van Rossum. Implemented by Ivan Levkivskyi.
238238

239239
Tools that use or will use the new syntax:
240-
`mypy <http://github.com/python/mypy>`_,
241-
`pytype <http://github.com/google/pytype>`_, PyCharm, etc.
240+
`mypy <http://www.mypy-lang.org/>`_,
241+
`pytype <https://github.com/google/pytype>`_, PyCharm, etc.
242242

243243

244244
.. _whatsnew36-pep515:
@@ -907,7 +907,7 @@ return value.
907907
cmath
908908
-----
909909

910-
The new :const:`cmath.tau` (τ) constant has been added.
910+
The new :const:`cmath.tau` (*τ*) constant has been added.
911911
(Contributed by Lisa Roach in :issue:`12345`, see :pep:`628` for details.)
912912

913913
New constants: :const:`cmath.inf` and :const:`cmath.nan` to
@@ -1016,11 +1016,6 @@ attribute defaults to ``['gztar']``. Although not anticipated,
10161016
any code relying on the presence of ``default_format`` may
10171017
need to be adapted. See :issue:`27819` for more details.
10181018

1019-
The ``upload`` command now longer tries to change CR end-of-line characters
1020-
to CRLF. This fixes a corruption issue with sdists that ended with a byte
1021-
equivalent to CR.
1022-
(Contributed by Bo Bayles in :issue:`32304`.)
1023-
10241019

10251020
email
10261021
-----
@@ -1240,7 +1235,7 @@ be reopened.
12401235
math
12411236
----
12421237

1243-
The tau (τ) constant has been added to the :mod:`math` and :mod:`cmath`
1238+
The tau (*τ*) constant has been added to the :mod:`math` and :mod:`cmath`
12441239
modules.
12451240
(Contributed by Lisa Roach in :issue:`12345`, see :pep:`628` for details.)
12461241

@@ -1609,7 +1604,7 @@ mark class variables. As introduced in :pep:`526`, a variable annotation
16091604
wrapped in ClassVar indicates that a given attribute is intended to be used as
16101605
a class variable and should not be set on instances of that class.
16111606
(Contributed by Ivan Levkivskyi in `Github #280
1612-
<https://github.com/python/typing/issues/280>`_.)
1607+
<https://github.com/python/typing/pull/280>`_.)
16131608

16141609
A new :const:`~typing.TYPE_CHECKING` constant that is assumed to be
16151610
``True`` by the static type chekers, but is ``False`` at runtime.
@@ -1894,11 +1889,6 @@ Build and C API Changes
18941889
* The :c:func:`PyUnicode_FSConverter` and :c:func:`PyUnicode_FSDecoder`
18951890
functions will now accept :term:`path-like objects <path-like object>`.
18961891

1897-
* The ``PyExc_RecursionErrorInst`` singleton that was part of the public API
1898-
has been removed as its members being never cleared may cause a segfault
1899-
during finalization of the interpreter. Contributed by Xavier de Gaye in
1900-
:issue:`22898` and :issue:`30697`.
1901-
19021892

19031893
Other Improvements
19041894
==================
@@ -2393,6 +2383,15 @@ It has been replaced by the new ``make regen-all`` target.
23932383
.. versionchanged:: 3.6.2
23942384

23952385

2386+
Notable changes in Python 3.6.4
2387+
===============================
2388+
2389+
The ``PyExc_RecursionErrorInst`` singleton that was part of the public API
2390+
has been removed as its members being never cleared may cause a segfault
2391+
during finalization of the interpreter.
2392+
(Contributed by Xavier de Gaye in :issue:`22898` and :issue:`30697`.)
2393+
2394+
23962395
Notable changes in Python 3.6.5
23972396
===============================
23982397

0 commit comments

Comments
 (0)