Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for EOL Python 2.6 #149

Merged
merged 6 commits into from
Nov 26, 2018
Merged

Drop support for EOL Python 2.6 #149

merged 6 commits into from
Nov 26, 2018

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Nov 24, 2018

Summary: yamllint used to support Python 2.6 because it's a dependency of Ansible, which supported Python 2.6. Ansible has now dropped 2.6, so yamllint may also drop it.


Python 2.6 is EOL since 2013-10-29 and no longer receiving security updates (or any updates) from the core Python team.

Source: https://en.wikipedia.org/wiki/CPython#Version_history

Ansible 2.7.0 was released in October 2018 which drops Python 2.6.

  • Support for running an Ansible controller with Python-2.6 has been dropped. You can still manage machines which use Python-2.6 but you will have to manage them from a machine which has Python-2.7 or Python-3.5 or greater installed. See the porting guide if you need more information.

https://github.com/ansible/ansible/blob/stable-2.7/changelogs/CHANGELOG-v2.7.rst#v2-7-0

The decision to drop Python-2.6 support on the controller was made because many dependent libraries are becoming unavailable there. In particular, python-cryptography is no longer available for Python-2.6 and the last release of pycrypto (the alternative to python-cryptography) has known security bugs which will never be fixed.

https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.7.html#python-compatibility

Yamllint's support of Python 2.6 is also preventing its dependencies from dropping it too, for example pathspec: cpburnz/python-pathspec#16.


This PR drops support for 2.6.

It adds python_requires to help pip install the right version for people still running old Python versions, plus Trove version classifiers for PyPI.

It also upgrades unit tests to use more useful asserts, and upgrades to modern Python syntax using pyupgrade.

@coveralls
Copy link

coveralls commented Nov 24, 2018

Coverage Status

Coverage remained the same at 98.185% when pulling d0ac862 on hugovk:rm-2.6 into 8bdddf6 on adrienverge:master.

@adrienverge
Copy link
Owner

Ansible has now dropped 2.6, so yamllint may also drop it.

yamllint is not only used by Ansible. What makes you say that Python 2.6 support can be dropped like that, without impacting any other project?

@hugovk
Copy link
Contributor Author

hugovk commented Nov 25, 2018

I understand if you wish to retain 2.6, and the decision is of course ultimately yours.

However, at some point it's good to draw a line and stop supporting EOL versions, to reduce maintenance burden, to allow newer features of Python to be used, to reduce resource usage, and also free other dependencies from supporting old versions.

Two CPython core developers talk about the network effect here and here.

I think now is a good time to drop 2.6. People still using 2.6 are advised to upgrade to 3.x (or 2.7). Those still using 2.6 are already using an insecure Python runtime and already have to pin many dependencies which have dropped 2.6.

I agree completely that Ansible isn't the only thing using yamllint. And there's no way to know what proprietary/in-house/closed-source code might still be using yamllint with Python 2.6 (or 3.3!).

Ansible was cited as the reason to maintain 2.6 support in, for example, #55 (comment) and cpburnz/python-pathspec#16.

The latter also says yamllint is used by OpenStack, however that has also dropped 2.6: https://wiki.openstack.org/wiki/Python3#Python_2:_Python_2.6_support_dropped.2C_Python_2.7_only.

Looking at the first 10 projects under "Used by" at https://libraries.io/pypi/yamllint, I don't see any supporting Python 2.6:

Project GitHub stars Support 2.6?
ansible/ansible 33764 No
ansible/molecule 1628 No
Neo23x0/sigma 768 No
ansible/galaxy 424 No
coala/coala-bears 221 No
markstory/lint-review 177 No
IBM/Kubernetes-container-service-GitLab-sample 148 No
mangaki/mangaki 79 No
bosondata/badwolf 64 No
redhat-openstack/infrared 42 No

Finally, with Python 2's EOL approaching, many projects have pledged to drop support for Python 2 on or before 2020-01-01

@adrienverge
Copy link
Owner

Thanks a lot for this comprehensive review of dependent Python projects. You convinced me.

I'll do a slight reword of your last commit then merge.

@adrienverge adrienverge merged commit f4c56b8 into adrienverge:master Nov 26, 2018
@hugovk hugovk deleted the rm-2.6 branch November 26, 2018 20:32
@hugovk
Copy link
Contributor Author

hugovk commented Nov 26, 2018

You're welcome, and thanks for your work on yamllint!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants