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

Update Python versions #117

Merged
merged 15 commits into from
Oct 8, 2019
Merged

Update Python versions #117

merged 15 commits into from
Oct 8, 2019

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Mar 19, 2018

Python 2.6, 3.2 and 3.3 are EOL and no longer receiving security updates.

They're also little used if at all.

Here's the pip installs for ConfigArgParse from PyPI for last month:

python_version percent download_count
2.7 88.83% 150,131
3.4 5.78% 9,762
3.6 3.08% 5,203
3.5 2.00% 3,379
2.6 0.25% 417
3.7 0.04% 63
None 0.03% 44
3.3 0.01% 18

Source: pypinfo --start-date -46 --end-date -19 --percent --pip --markdown ConfigArgParse pyversion

This removes those, and updates the code to use more modern Python features. It also adds Python 3.6.

@latk
Copy link

latk commented Mar 20, 2018

Edit: Python 2.6 support is no longer an issue for gcovr. My points about breaking downstream modules still hold, but I no longer have a horse in this race.


I am currently evaluating the use of ConfigArgParse for the gcovr tool. If this PR is merged and ConfigArgParse drops support for Python 2.6, I will have to find a different way to deal with config files.

I understand the desire to move to modern Python. However, some operating systems (CentOS 6) are still stuck on Python 2.6. CentOS 6 will be EOL'ed after Nov 2020. I have no desire to break hundreds of downstream users unless continuing to support 2.6 would require excessive effort.

This PR doesn't seem to provide any substantial value that would be impossible with continued support for Python 2.6. I would therefore suggest that the PR is not merged in its current form – although some of the small fixes and enhancements are nice and can be rebased/cherry-picked independently.

@hugovk
Copy link
Contributor Author

hugovk commented Mar 20, 2018

I wouldn't say CentOS 6 is stuck on Python 2.6, I understand upgrading Python is officially supported by CentOS via the Software Collections Repository.

Enter Software Collections, also known as SCLs. As an example, SCLs allow you to run the default python that comes with CentOS (so yum and other system tools in CentOS work), while also allowing a newer version of python to be installed alongside the default python for use creating and running software with newer requirements.

https://wiki.centos.org/AdditionalResources/Repositories/SCL

And if upgrading from an old Python is unsuitable, pinning to an old release of this library is easily doable, as is already needed with other libraries for a 5-years-insecure 2.6.

Some Python libraries are already planning how to drop Python 2.7, which will be EOL on 2020-01-01.

See also:

@hugovk
Copy link
Contributor Author

hugovk commented Jul 26, 2018

Updated to add python_requires to help pip, and upgrade Python syntax using https://github.com/asottile/pyupgrade.

@bw2
Copy link
Owner

bw2 commented Jan 13, 2019

I like the changes in this PR, but it seems to me they're not necessary for any actual functionality. On the other hand, if there are 1+ users that still need python 2.6 for whatever reason, then merging it has negative value.

@bw2
Copy link
Owner

bw2 commented Jan 13, 2019

How many people still want python2.6 support?
Please reply or thumbs-up this comment if you do.

(@latk )
If no one replies during the next ~1 month, I'll merge this.

@latk
Copy link

latk commented Jan 13, 2019

@bw2 In the meanwhile I've dropped Python 2.6 support from gcovr, and have also decided to not use ConfigArgParse. As far as I am concerned, happy merging to you :)

@hugovk
Copy link
Contributor Author

hugovk commented Feb 13, 2019

Rebased on master, removed the now-redundant sudo keyword from .travis.yml, and updated Python syntax with pyupgrade.

@ronhanson
Copy link
Contributor

I'm ok to merge that. @bw2 ?

@hugovk
Copy link
Contributor Author

hugovk commented Jun 17, 2019

Here's the pip installs for ConfigArgParse from PyPI for May 2019:

category percent downloads
2.7 79.05% 778,985
3.4 11.50% 113,298
3.6 4.98% 49,039
3.7 2.65% 26,161
3.5 1.58% 15,563
null 0.16% 1,590
3.8 0.05% 498
2.6 0.02% 225
3.3 0.00% 20
3.2 0.00% 2
Total 985,381

Source: pypistats python_minor ConfigArgParse --last-month # pip install pypistats

@bw2 bw2 merged commit 527ebb6 into bw2:master Oct 8, 2019
@hugovk hugovk deleted the update-versions branch October 8, 2019 14:05
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.

4 participants