Skip to content

Commit 9d6171d

Browse files
authored
bpo-23404: Update/sync What's New files for 3.6/3.5/2.7 (GH-7620)
1 parent 9d6d06e commit 9d6171d

File tree

3 files changed

+268
-0
lines changed

3 files changed

+268
-0
lines changed

Doc/whatsnew/2.7.rst

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,3 +2346,56 @@ There have been several major changes to the :term:`bytecode` in Python 3.6.
23462346
* The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`STORE_ANNOTATION` opcodes
23472347
have been added to support the new :term:`variable annotation` syntax.
23482348
(Contributed by Ivan Levkivskyi in :issue:`27985`.)
2349+
2350+
2351+
Notable changes in Python 3.6.2
2352+
===============================
2353+
2354+
New ``make regen-all`` build target
2355+
-----------------------------------
2356+
2357+
To simplify cross-compilation, and to ensure that CPython can reliably be
2358+
compiled without requiring an existing version of Python to already be
2359+
available, the autotools-based build system no longer attempts to implicitly
2360+
recompile generated files based on file modification times.
2361+
2362+
Instead, a new ``make regen-all`` command has been added to force regeneration
2363+
of these files when desired (e.g. after an initial version of Python has
2364+
already been built based on the pregenerated versions).
2365+
2366+
More selective regeneration targets are also defined - see
2367+
:source:`Makefile.pre.in` for details.
2368+
2369+
(Contributed by Victor Stinner in :issue:`23404`.)
2370+
2371+
.. versionadded:: 3.6.2
2372+
2373+
2374+
Removal of ``make touch`` build target
2375+
--------------------------------------
2376+
2377+
The ``make touch`` build target previously used to request implicit regeneration
2378+
of generated files by updating their modification times has been removed.
2379+
2380+
It has been replaced by the new ``make regen-all`` target.
2381+
2382+
(Contributed by Victor Stinner in :issue:`23404`.)
2383+
2384+
.. versionchanged:: 3.6.2
2385+
2386+
2387+
Notable changes in Python 3.6.4
2388+
===============================
2389+
2390+
The ``PyExc_RecursionErrorInst`` singleton that was part of the public API
2391+
has been removed as its members being never cleared may cause a segfault
2392+
during finalization of the interpreter.
2393+
(Contributed by Xavier de Gaye in :issue:`22898` and :issue:`30697`.)
2394+
2395+
2396+
Notable changes in Python 3.6.5
2397+
===============================
2398+
2399+
The :func:`locale.localeconv` function now sets temporarily the ``LC_CTYPE``
2400+
locale to the ``LC_NUMERIC`` locale in some cases.
2401+
(Contributed by Victor Stinner in :issue:`31900`.)

0 commit comments

Comments
 (0)