diff -r fef11a65a5e5 Doc/whatsnew/2.7.rst --- a/Doc/whatsnew/2.7.rst Fri May 23 21:28:02 2014 -0700 +++ b/Doc/whatsnew/2.7.rst Sat May 24 20:15:53 2014 +1000 @@ -79,45 +79,107 @@ The Future for Python 2.x ========================= -Python 2.7 is intended to be the last major release in the 2.x series. -The Python maintainers are planning to focus their future efforts on -the Python 3.x series. - -This means that 2.7 will remain in place for a long time, running -production systems that have not been ported to Python 3.x. -Two consequences of the long-term significance of 2.7 are: - -* It's very likely the 2.7 release will have a longer period of - maintenance compared to earlier 2.x versions. Python 2.7 will - continue to be maintained while the transition to 3.x continues, and - the developers are planning to support Python 2.7 with bug-fix - releases beyond the typical two years. - -* A policy decision was made to silence warnings only of interest to - developers. :exc:`DeprecationWarning` and its - descendants are now ignored unless otherwise requested, preventing - users from seeing warnings triggered by an application. This change - was also made in the branch that will become Python 3.2. (Discussed - on stdlib-sig and carried out in :issue:`7319`.) - - In previous releases, :exc:`DeprecationWarning` messages were - enabled by default, providing Python developers with a clear - indication of where their code may break in a future major version - of Python. - - However, there are increasingly many users of Python-based - applications who are not directly involved in the development of - those applications. :exc:`DeprecationWarning` messages are - irrelevant to such users, making them worry about an application - that's actually working correctly and burdening application developers - with responding to these concerns. - - You can re-enable display of :exc:`DeprecationWarning` messages by - running Python with the :option:`-Wdefault <-W>` (short form: - :option:`-Wd <-W>`) switch, or by setting the :envvar:`PYTHONWARNINGS` - environment variable to ``"default"`` (or ``"d"``) before running - Python. Python code can also re-enable them - by calling ``warnings.simplefilter('default')``. +Python 2.7 is the last major release in the 2.x series, as the Python +maintainers have shifted the focus of their new feature development efforts +to the Python 3.x series. However, while there is a large common subset +between Python 2.7 and Python 3.x, and many of the changes involved in +migrating to that common subset, or directly to Python 3, can be safely +automated, some other changes (notably those associated with Unicode +handling) often require careful attention, and preferably robust automated +regression test suites, to migrate effectively. + +This means that Python 2.7 will remain in place for a long time, providing a +stable and supported base platform for production systems that have not yet +been ported to Python 3.x. The full expected lifecycle of the Python 2.7 +series is detailed in :pep:`373`. + +Some key consequences of the long-term significance of 2.7 are: + +* The 2.7 release has a much longer period of maintenance compared to + earlier 2.x versions. Python 2.7 is currently expected to + remain supported by the core development team (receiving security updates + and other bug fixes) until at least 2020. + +* As the Python 2.7 standard library ages, the surrounding software ecosystem + continues to evolve. Previously, Python 2 users could gain access to key + aspects of that evolution (in the form of standard library updates) just by + upgrading to new Python feature releases as they became available. With new + feature development moving to the Python 3 line, that approach no longer + works for the Python 2 series. Instead, new Python 2 libraries, and even + enhanced versions of standard library modules, are made available via the + Python Package Index (PyPI). In many cases, this also includes backports of + new modules and features from the Python 3 standard library. The `Python + Packaging User Guide `__ provides guidance + on making effective use of the Python Package Index. + +* While the preferred approach to enhancing Python 2 is now the publication + of new packages on the Python Package Index, this approach doesn't + necessarily work in all cases, especially those related to network + security. In exceptional cases that cannot be handled adequately by + publishing new or updated packages on PyPI, the Python Enhancement + Proposal process may be used to make the case for the addition of new + features directly to the Python 2 standard library. Any such additions, + and the maintenance releases where they were added, will be noted in the + :ref:`py27-maintenance-enhancements` section below. + +* For projects wishing to migrate from Python 2 to Python 3, or for library + and framework developers wishing to support users on both Python 2 and + Python 3, there are a variety of tools and guides available to help decide + on a suitable approach and manage some of the technical details involved. + The recommended starting point is the :ref:`pyporting-howto` HOWTO guide. + + +.. _py27-maintenance-enhancements: + +New Features Added to Python 2.7 Maintenance Releases +===================================================== + +As noted above, new features may be added to Python 2.7 maintenance releases +when the situation genuinely calls for it. Any such additions must go through +the Python Enhancement Proposal process, and make a compelling case for why +they can't be adequately addressed by either adding the new feature solely to +Python 3, or else by publishing it on the Python Package Index. + +:pep:`466` describes a number of network security enhancement proposals +that have been approved for inclusion in Python 2.7 maintenance releases, +with the first of those changes appearing in the Python 2.7.7 release. + +New features added in Python 2.7.7: + +* :func:`hmac.compare_digest` was added to make a timing attack resistant + comparison operation broadly available to Python 2 applications + (backported by Alex Gaynor in :issue:`21306` as part of :pep:`466`) + + + +Changes to the Handling of Deprecation Warnings +=============================================== + +For Python 2.7, a policy decision was made to silence warnings only of +interest to developers by default. :exc:`DeprecationWarning` and its +descendants are now ignored unless otherwise requested, preventing +users from seeing warnings triggered by an application. This change +was also made in the branch that became Python 3.2. (Discussed +on stdlib-sig and carried out in :issue:`7319`.) + +In previous releases, :exc:`DeprecationWarning` messages were +enabled by default, providing Python developers with a clear +indication of where their code may break in a future major version +of Python. + +However, there are increasingly many users of Python-based +applications who are not directly involved in the development of +those applications. :exc:`DeprecationWarning` messages are +irrelevant to such users, making them worry about an application +that's actually working correctly and burdening application developers +with responding to these concerns. + +You can re-enable display of :exc:`DeprecationWarning` messages by +running Python with the :option:`-Wdefault <-W>` (short form: +:option:`-Wd <-W>`) switch, or by setting the :envvar:`PYTHONWARNINGS` +environment variable to ``"default"`` (or ``"d"``) before running +Python. Python code can also re-enable them +by calling ``warnings.simplefilter('default')``. Python 3.1 Features