[Python-checkins] cpython (3.4): Make the case to only support Python 2.7 when supporting 2/3 simultaneously

brett.cannon python-checkins at python.org
Fri Mar 13 17:50:22 CET 2015


https://hg.python.org/cpython/rev/cde032ab4e17
changeset:   94982:cde032ab4e17
branch:      3.4
parent:      94975:c1abcbcfefab
user:        Brett Cannon <brett at python.org>
date:        Fri Mar 13 12:49:44 2015 -0400
summary:
  Make the case to only support Python 2.7 when supporting 2/3 simultaneously

files:
  Doc/howto/pyporting.rst |  26 +++++++++++++-------------
  1 files changed, 13 insertions(+), 13 deletions(-)


diff --git a/Doc/howto/pyporting.rst b/Doc/howto/pyporting.rst
--- a/Doc/howto/pyporting.rst
+++ b/Doc/howto/pyporting.rst
@@ -28,15 +28,14 @@
 To make your project be single-source Python 2/3 compatible, the basic steps
 are:
 
-#. Update your code to drop support for Python 2.5 or older (supporting only
-   Python 2.7 is ideal)
+#. Only worry about supporting Python 2.7
 #. Make sure you have good test coverage (coverage.py_ can help;
    ``pip install coverage``)
 #. Learn the differences between Python 2 & 3
 #. Use Modernize_ or Futurize_ to update your code (``pip install modernize`` or
    ``pip install future``, respectively)
 #. Use Pylint_ to help make sure you don't regress on your Python 3 support
-   (if only supporting Python 2.7/3.4 or newer; ``pip install pylint``)
+   (``pip install pylint``)
 #. Use caniusepython3_ to find out which of your dependencies are blocking your
    use of Python 3 (``pip install caniusepython3``)
 #. Once your dependencies are no longer blocking you, use continuous integration
@@ -67,26 +66,27 @@
 your code to support Python 2 & 3 simultaneously.
 
 
-Drop support for Python 2.5 and older (at least)
-------------------------------------------------
+Drop support for Python 2.6 and older
+-------------------------------------
 
 While you can make Python 2.5 work with Python 3, it is **much** easier if you
-only have to work with Python 2.6 or newer (and easier still if you only have
-to work with Python 2.7). If dropping Python 2.5 is not an option then the six_
-project can help you support Python 2.5 & 3 simultaneously
+only have to work with Python 2.7. If dropping Python 2.5 is not an
+option then the six_ project can help you support Python 2.5 & 3 simultaneously
 (``pip install six``). Do realize, though, that nearly all the projects listed
 in this HOWTO will not be available to you.
 
-If you are able to only support Python 2.6 or newer, then the required changes
+If you are able to skip Python 2.5 and older, then the required changes
 to your code should continue to look and feel like idiomatic Python code. At
 worst you will have to use a function instead of a method in some instances or
 have to import a function instead of using a built-in one, but otherwise the
 overall transformation should not feel foreign to you.
 
-But please aim for Python 2.7. Bugfixes for that version of Python will continue
-until 2020 while Python 2.6 is no longer supported. There are also some tools
-mentioned in this HOWTO which do not support Python 2.6 (e.g., Pylint_), and
-this will become more commonplace as time goes on.
+But you should aim for only supporting Python 2.7. Python 2.6 is no longer
+supported and thus is not receiving bugfixes. This means **you** will have to
+work around any issues you come across with Python 2.6. There are also some
+tools mentioned in this HOWTO which do not support Python 2.6 (e.g., Pylint_),
+and this will become more commonplace as time goes on. It will simply be easier
+for you if you only support the versions of Python that you have to support.
 
 Make sure you specify the proper version support in your ``setup.py`` file
 --------------------------------------------------------------------------

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list