Browse code

We've decided that python-3.5 is the minimum python version (#17270)

Toshio Kuratomi authored on 2016/08/30 01:12:37
Showing 5 changed files
... ...
@@ -15,8 +15,6 @@ matrix:
15 15
       python: 2.6
16 16
     - env: TARGET=sanity TOXENV=py27
17 17
       python: 2.7
18
-    - env: TARGET=sanity TOXENV=py34
19
-      python: 3.4
20 18
     - env: TARGET=sanity TOXENV=py35
21 19
       python: 3.5
22 20
     - env: TARGET=sanity TOXENV=py24
... ...
@@ -93,7 +93,7 @@ MOCK_CFG ?=
93 93
 
94 94
 NOSETESTS ?= nosetests
95 95
 
96
-NOSETESTS3 ?= nosetests-3.4
96
+NOSETESTS3 ?= nosetests-3.5
97 97
 
98 98
 ########################################################
99 99
 
... ...
@@ -13,42 +13,41 @@ factors that make it harder to port them than most code:
13 13
 Which version of Python-3.x and which version of Python-2.x are our minimums?
14 14
 =============================================================================
15 15
 
16
-The short answer is Python-3.4 and Python-2.4 but please read on for more
16
+The short answer is Python-3.5 and Python-2.4 but please read on for more
17 17
 information.
18 18
 
19
-For Python-3 we are currently using Python-3.4 as a minimum.  However, no long
20
-term supported Linux distributions currently ship with Python-3.  When that
21
-occurs, we will probably take that as our minimum Python-3 version rather than
22
-Python-3.4.  Thus far, Python-3 has been adding small changes that make it
23
-more compatible with Python-2 in its newer versions (For instance, Python-3.5
24
-added the ability to use percent-formatted byte strings.) so it should be more
25
-pleasant to use a newer version of Python-3 if it's available.  At some point
26
-this will change but we'll just have to cross that bridge when we get to it.
27
-
28
-For Python-2 the default is for modules to run on Python-2.4.  This allows
29
-users with older distributions that are stuck on Python-2.4 to manage their
30
-machines.  Modules are allowed to drop support for Python-2.4 when one of
31
-their dependent libraries require a higher version of python.  This is not an
32
-invitation to add unnecessary dependent libraries in order to force your
33
-module to be usable only with a newer version of Python.  Instead it is an
34
-acknowledgment that some libraries (for instance, boto3 and docker-py) will
35
-only function with newer Python.
19
+For Python-3 we are currently using Python-3.5 as a minimum on both the
20
+controller and the managed nodes.  This was chosen as it's the version of
21
+Python3 in Ubuntu-16.04, the first long-term support (LTS) distribution to
22
+ship with Python3 and not Python2.  Much of our code would still work with
23
+Python-3.4 but there are always bugfixes and new features in any new upstream
24
+release.  Taking advantage of this relatively new version allows us not to
25
+worry about workarounds for problems and missing features in that older
26
+version.
27
+
28
+For Python-2, the default is for the controller to run on Python-2.6 and
29
+modules to run on Python-2.4.  This allows users with older distributions that
30
+are stuck on Python-2.4 to manage their machines.  Modules are allowed to drop
31
+support for Python-2.4 when one of their dependent libraries require a higher
32
+version of python.  This is not an invitation to add unnecessary dependent
33
+libraries in order to force your module to be usable only with a newer version
34
+of Python.  Instead it is an acknowledgment that some libraries (for instance,
35
+boto3 and docker-py) will only function with newer Python.
36 36
 
37 37
 .. note:: When will we drop support for Python-2.4?
38 38
 
39 39
     The only long term supported distro that we know of with Python-2.4 is
40
-    RHEL5 (and its rebuilds like CentOS5)  which is supported until April of
41
-    2017.  We will likely end our support for Python-2.4 in modules in an
42
-    Ansible release around that time.  We know of no long term supported
43
-    distributions with Python-2.5 so the new minimum Python-2 version will
44
-    likely be Python-2.6.  This will let us take advantage of the
45
-    forwards-compat features of Python-2.6 so porting and maintainance of
46
-    Python-2/Python-3 code will be easier after that.
40
+    RHEL5 (and its rebuilds like CentOS5) which is supported until April of
41
+    2017.  Whatever major release we make in or after April of 2017 (probably
42
+    2.4.0) will no longer have support for Python-2.4 on the managed machines.
43
+    Previous major release series's that we support (2.3.x)  will continue to
44
+    support Python-2.4 on the managed nodes.
47 45
 
48
-.. note:: Ubuntu 16 LTS ships with Python 3.5
46
+    We know of no long term supported distributions with Python-2.5 so the new
47
+    minimum Python-2 version will be Python-2.6.  This will let us take
48
+    advantage of the forwards-compat features of Python-2.6 so porting and
49
+    maintainance of Python-2/Python-3 code will be easier after that.
49 50
 
50
-    We have ongoing discussions now about taking Python3-3.5 as our minimum
51
-    Python3 version.
52 51
 
53 52
 Supporting only Python-2 or only Python-3
54 53
 =========================================
... ...
@@ -152,7 +151,7 @@ dealing with file permissions.  (With file permissions a user may be feeding
152 152
 the mode into another program or to another module which doesn't understand
153 153
 the python syntax for octal numbers.  ``[zero][digit][digit][digit]`` is
154 154
 understood by most everything and therefore the right way to express octals in
155
-these cisrcumstances.
155
+these circumstances.
156 156
 
157 157
 Bundled six
158 158
 -----------
... ...
@@ -51,8 +51,6 @@ matrix:
51 51
       python: 2.6
52 52
     - env: TEST=sanity INSTALL_DEPS=1 TOXENV=py27
53 53
       python: 2.7
54
-    - env: TEST=sanity INSTALL_DEPS=1 TOXENV=py34
55
-      python: 3.4
56 54
     - env: TEST=sanity INSTALL_DEPS=1 TOXENV=py35
57 55
       python: 3.5
58 56
 
... ...
@@ -1,8 +1,5 @@
1 1
 [tox]
2
-envlist = py26,py27,py34,py35
3
-
4
-[testenv:py34]
5
-deps = -r{toxinidir}/test/utils/tox/requirements-py3.txt
2
+envlist = py26,py27,py35
6 3
 
7 4
 [testenv:py35]
8 5
 deps = -r{toxinidir}/test/utils/tox/requirements-py3.txt
... ...
@@ -14,7 +11,6 @@ commands =
14 14
     python --version
15 15
     py26: python -m compileall -fq -x 'test/samples|contrib/inventory/vagrant.py' lib test contrib
16 16
     py27: python -m compileall -fq -x 'test/samples' lib test contrib
17
-    py34: python -m compileall -fq -x 'test/samples|lib/ansible/modules' lib test contrib
18 17
     py35: python -m compileall -fq -x 'test/samples|lib/ansible/modules' lib test contrib
19 18
     make tests
20 19