Maintaining Python 2.6 support is a pain in the butt from a CI / testing perspective for a variety of reason (unittest2, a specific version of mock, setuptools, etc.). Also, both pip and setuptools dropped support for 2.6, so installing psutil on 2.6 is becoming harder (although still possible). For these reasons I would like to drop python 2.6 for tests only.
There is an argument for not dropping 2.6 support in psutil "as a lib" (so excluding tests) yet: CentOS 6. CentOS 6 still ships 2.6 by default and AFAIK it is still in use on a non negligible number of servers (unfortunately). Being psutil a "system library" I am kind of worried about that so I think it'd be nice to keep support for a little while longer and just deprecate it by issuing a warning on import.
CentOS 6 EOL is scheduled for November 2020. I am not sure I want to maintain support 'till then, but the point is that there currently are no 2.7-only features such as set literals, set/dict comprehensions, multiple ctx managers or OrderedDict which I may want to use in psutil code, so why break it?
On the other hand, some of those 2.7-only features may be used in the test suite (e.g. replace contextlib.nexted with multiple ctx managers). As far as 2.6 goes I would still like travis to test it by installing psutil on 2.6 and import it (that's it), but the test suite will not be run.
At the same time, setup.py may print a warning telling that 2.6 is supported but not testable.
As for scripts (/scripts dir): we can also drop support (and e.g. be free to use the argparse module).
TODOs:
- drop 2.6 support in unit tests and scritps
- deprecate 2.6 support in psutil by issuing a deprecation warning
Maintaining Python 2.6 support is a pain in the butt from a CI / testing perspective for a variety of reason (unittest2, a specific version of mock, setuptools, etc.). Also, both pip and setuptools dropped support for 2.6, so installing psutil on 2.6 is becoming harder (although still possible). For these reasons I would like to drop python 2.6 for tests only.
There is an argument for not dropping 2.6 support in psutil "as a lib" (so excluding tests) yet: CentOS 6. CentOS 6 still ships 2.6 by default and AFAIK it is still in use on a non negligible number of servers (unfortunately). Being psutil a "system library" I am kind of worried about that so I think it'd be nice to keep support for a little while longer and just deprecate it by issuing a warning on import.
CentOS 6 EOL is scheduled for November 2020. I am not sure I want to maintain support 'till then, but the point is that there currently are no 2.7-only features such as set literals, set/dict comprehensions, multiple ctx managers or OrderedDict which I may want to use in psutil code, so why break it?
On the other hand, some of those 2.7-only features may be used in the test suite (e.g. replace
contextlib.nextedwith multiple ctx managers). As far as 2.6 goes I would still like travis to test it by installing psutil on 2.6 and import it (that's it), but the test suite will not be run.At the same time,
setup.pymay print a warning telling that 2.6 is supported but not testable.As for scripts (/scripts dir): we can also drop support (and e.g. be free to use the
argparsemodule).TODOs: