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

Python version support tracking #151

Open
jorisroovers opened this issue Sep 25, 2020 · 8 comments
Open

Python version support tracking #151

jorisroovers opened this issue Sep 25, 2020 · 8 comments
Assignees
Labels
development Issues that are not user-facing but related to gitlint development
Milestone

Comments

@jorisroovers
Copy link
Owner

jorisroovers commented Sep 25, 2020

Edit: Initially this issue was used to track work related to dropping support for Python 2.7 and 3.5, but we're now using it to track the python versions used by gitlint users over time.

Both Python 2.7 and Python 3.5 are EOL. As a result, the upcoming gitlint 0.14.x release will be the last version to support them.

This is mainly because many of gitlint's dependencies have dropped support for Python 2.7 and 3.5 or are planning to do so very soon - this makes it impossible to keep them up-to-date while still supporting Python 2.7 and 3.5. In addition, not having to support both Python 2 and 3 should make maintaining gitlint significantly easier. Today a lot of development time is spend on maintaining this compatibility.

While the act of "dropping support" is easy (we just don't advertise and test for it anymore), we should also remove any code that's no longer required. Dropping support for Python 2.7 in particular will allow us to remove quite a bit of code.

This issue can be used to discuss and track any related work.

@jorisroovers jorisroovers added enhancement User-facing feature enhancements help wanted and removed enhancement User-facing feature enhancements labels Sep 25, 2020
@jorisroovers
Copy link
Owner Author

So since I've put in the work to make all latest changes compatible with both 3.5 and 2.7, I think it makes sense to keep compatibility with those version for the upcoming 0.14.0 release. I do have some other things I want to get in that release, hoping to release it over the next few weeks.

I'm thinking that we can do a quick follow-up 0.15.0 release after 0.14.0, that just drops support for Python 2.7 and 3.5 and bumps dependency versions.

@jorisroovers
Copy link
Owner Author

Some data points from pypi downloads.

Last 3 months

pip install -U pypistats
pypistats python_minor gitlint -sd 2020-06-25 -ed 2020-09-25
category percent downloads
3.6 33.74% 32,270
3.7 28.71% 27,465
3.8 21.01% 20,095
2.7 8.05% 7,696
3.5 7.77% 7,434
null 0.70% 667
3.9 0.02% 17
3.4 0.01% 12
Total 95,656

Date range: 2020-06-25 - 2020-09-25

Take-away: 15% still on Python 2.7 or 3.5

Last Month

pypistats python_minor gitlint --last-month
category percent downloads
3.6 33.09% 10,451
3.7 29.36% 9,273
3.8 18.18% 5,740
3.5 10.11% 3,193
2.7 8.66% 2,735
null 0.56% 178
3.4 0.03% 9
3.9 0.00% 1
Total 31,580

Date range: 2020-08-01 - 2020-08-31

Take-away: 18% still on Python 2.7 or 3.5

Overall take-away: probably a good decision to keep 2.7 and 3.5 for one more release (0.14.0) with a clear warning during install and in the docs.

@sigmavirus24
Copy link
Collaborator

Overall take-away: probably a good decision to keep 2.7 and 3.5 for one more release (0.14.0) with a clear warning during install and in the docs.

👍 Makes good sense

jorisroovers added a commit that referenced this issue Sep 26, 2020
The upcoming 0.14.x release will be the last one to support these python
versions.

Relates to #151
@jorisroovers jorisroovers added this to the 0.15.0 milestone Oct 6, 2020
jorisroovers added a commit that referenced this issue Oct 28, 2020
Removed all references to Python 2.7 and 3.5 from the documentation and
tools. Tests will no longer run in CI against these versions.

Relates to #151.
jorisroovers added a commit that referenced this issue Oct 30, 2020
Removes all cases where there's an explicit code path to support
Python2.

Relates to #151
jorisroovers added a commit that referenced this issue Oct 30, 2020
The sstr utility method was used explicitly encode strings to unicode in
python2.

Relates to #151
jorisroovers added a commit that referenced this issue Oct 30, 2020
No longer needed in Python 3.

Relates to #151
jorisroovers added a commit that referenced this issue Oct 30, 2020
Was used to explicitely get the string representation of a given object
and decode it in Python2. Replaced with built-in str() function in
Python 3.

Relates to #151
jorisroovers added a commit that referenced this issue Oct 30, 2020
Was used to explicitely get the string representation of a given object
and decode it in Python2. Replaced with built-in str() function in
Python 3.

Relates to #151
jorisroovers added a commit that referenced this issue Oct 30, 2020
Was used to explicitely get the string representation of a given object
and decode it in Python2. Replaced with built-in str() function in
Python 3.

Relates to #151
jorisroovers added a commit that referenced this issue Oct 31, 2020
ConfigParser.readfp() is deprecated in Python 3, replaced it with
ConfigParser.read_file().

Relates to #151
jorisroovers added a commit that referenced this issue Oct 31, 2020
Python 3 allows for more elegant access to parent function variables
using the 'nonlocal' keyword, which allows for cleanup of the caching
decorator.

Relates to #151
jorisroovers added a commit that referenced this issue Oct 31, 2020
Replaces most occurences for format() with f-strings (supported since
Python 3.6) - this makes for more readable code in most cases.

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
The __unicode__ method is ignored in Python 3, so we can replace with
with __str__.

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
Removed all references to Python 2.7 and 3.5 from the documentation and
tools. Tests will no longer run in CI against these versions.

Relates to #151.
jorisroovers added a commit that referenced this issue Nov 1, 2020
Removes all cases where there's an explicit code path to support
Python2.

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
The sstr utility method was used explicitly encode strings to unicode in
python2.

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
No longer needed in Python 3.

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
Was used to explicitely get the string representation of a given object
and decode it in Python2. Replaced with built-in str() function in
Python 3.

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
ConfigParser.readfp() is deprecated in Python 3, replaced it with
ConfigParser.read_file().

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
Python 3 allows for more elegant access to parent function variables
using the 'nonlocal' keyword, which allows for cleanup of the caching
decorator.

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
Replaces most occurences for format() with f-strings (supported since
Python 3.6) - this makes for more readable code in most cases.

Relates to #151
jorisroovers added a commit that referenced this issue Nov 1, 2020
The __unicode__ method is ignored in Python 3, so we can replace with
with __str__.

Relates to #151
@jorisroovers
Copy link
Owner Author

All work has been completed, this marks the end of gitlint support for Python 2.7 and Python 3.5 (and a lot of related suffering on my end 🎉). Will keep this ticket open for a bit in case there's any follow-up discussion.

For reference, here's the latest stats at the time of writing.

3 Month Average

category percent downloads
3.6 31.40% 28,368
3.7 28.80% 26,020
3.8 16.26% 14,695
3.5 12.28% 11,092
2.7 6.89% 6,229
3.9 2.63% 2,377
null 1.73% 1,566
3.4 0.01% 10
Total 90,357

Date range: 2020-08-22 - 2020-11-22

1 Month Average

category percent downloads
3.6 32.42% 9,575
3.7 26.41% 7,798
3.8 15.86% 4,683
3.5 12.84% 3,792
2.7 7.78% 2,296
3.9 3.32% 981
null 1.37% 404
3.4 0.00% 1
Total 29,530

Date range: 2020-10-01 - 2020-10-31

Take-away is the same as before. About ~20% of users is still using Python 3.5 or 2.7.

Given that there are no functional differences between gitlint 0.15.0 (Python 3.6+ only) and gitlint 0.14.0, users on older versions of python should pin their version like so:

pip install "gitlint>=0.14.0,<0.15.0"

@jorisroovers
Copy link
Owner Author

Just because it's fun to keep tracking this, today's numbers below.

Last Month

pypistats python_minor gitlint --last-month
category percent downloads
3.6 28.08% 5,138
3.8 27.34% 5,003
3.7 17.65% 3,230
3.5 9.46% 1,731
3.9 7.99% 1,462
2.7 5.36% 980
null 4.12% 753
Total 18,297

Date range: 2021-02-01 - 2021-02-28

Python 2.7 + 3.5 share = 14.82%

Last 3 Months

pypistats python_minor gitlint -sd 2020-12-07 -ed 2021-03-07
category percent downloads
3.8 36.74% 27,904
3.6 22.69% 17,238
3.7 17.82% 13,536
3.5 8.61% 6,542
3.9 6.50% 4,940
2.7 4.26% 3,237
null 3.37% 2,558
3.4 0.00% 2
Total 75,957

Date range: 2020-12-07 - 2021-03-07

Python 2.7 + 3.5 share = 12.87%

So overall there's a slow but steady decline.


Reminder, users on older versions of python should pin their version like so

pip install "gitlint>=0.14.0,<0.15.0"

@jorisroovers jorisroovers added the development Issues that are not user-facing but related to gitlint development label Mar 7, 2021
@jorisroovers jorisroovers changed the title Dropping support for python 2.7 and 3.5 Dropping support for python 2.7 and 3.5 (Update: done since gitlint 0.15.0) Mar 11, 2021
@jorisroovers
Copy link
Owner Author

New Numbers! Interestingly, number of overall downloads is increasing :-)

Last Month

pypistats python_minor gitlint --last-month
category percent downloads
3.8 46.08% 28,132
3.6 13.09% 7,991
3.7 12.53% 7,650
3.9 9.93% 6,065
null 7.98% 4,871
3.5 7.00% 4,275
2.7 3.25% 1,986
3.4 0.14% 84
3.10 0.00% 1
Total 61,055

Date range: 2021-09-01 - 2021-09-30

Python 2.7 + 3.5 share = 10.25%

Last 3 Months

pypistats python_minor gitlint -sd 2021-07-04  -ed 2021-10-04
category percent downloads
3.8 43.90% 78,129
3.6 14.19% 25,261
3.7 12.60% 22,435
3.9 9.54% 16,976
null 7.77% 13,835
3.5 7.64% 13,594
2.7 4.31% 7,671
3.4 0.05% 85
3.10 0.00% 4
Total 177,990

Date range: 2021-07-04 - 2021-10-04

Python 2.7 + 3.5 share = 11.95%

The decline of older python versions in use continues.


Reminder, users on older versions of python should pin their version like so

pip install "gitlint>=0.14.0,<0.15.0"

@jorisroovers jorisroovers unpinned this issue Oct 11, 2021
@jorisroovers
Copy link
Owner Author

New Numbers!

Last Month

pypistats python_minor gitlint --last-month
category percent downloads
3.8 40.19% 33,760
null 12.40% 10,413
3.9 12.20% 10,250
3.7 9.89% 8,303
3.10 9.17% 7,702
3.6 8.20% 6,889
3.5 5.68% 4,771
2.7 2.27% 1,905
Total 83,993

Date range: 2022-03-01 - 2022-03-31

Python 2.7 + 3.5 share = 7.95%

Last 3 Months

pypistats python_minor gitlint -sd 2022-01-16  -ed 2022-04-16
category percent downloads
3.8 44.39% 113,217
null 12.13% 30,933
3.9 11.61% 29,625
3.10 8.28% 21,127
3.6 8.22% 20,963
3.7 8.13% 20,727
3.5 5.12% 13,059
2.7 2.12% 5,408
3.11 0.00% 2
Total 255,061

Date range: 2022-01-16 - 2022-04-16

Python 2.7 + 3.5 share = 7.24%

The decline of older python versions in use continues.


Reminder, users on older versions of python should pin their version like so

pip install "gitlint>=0.14.0,<0.15.0"

@jorisroovers jorisroovers changed the title Dropping support for python 2.7 and 3.5 (Update: done since gitlint 0.15.0) Python version support tracking Oct 27, 2022
@jorisroovers
Copy link
Owner Author

New Numbers!

Last Month

pypistats python_minor gitlint --last-month
category percent downloads
3.8 52.53% 64,890
3.9 12.40% 15,319
3.10 11.61% 14,345
null 7.93% 9,795
3.7 5.90% 7,289
3.6 5.45% 6,731
3.5 3.77% 4,654
2.7 0.41% 503
3.11 0.01% 8
3.4 0.00% 6
3.12 0.00% 1
Total 123,541

Date range: 2022-09-01 - 2022-09-30

Python 2.7 + 3.5 share = 4.18%
Python 2.7 + 3.5 + 3.6 share = 9.63%

Last 3 Months

pypistats python_minor gitlint -sd 2022-07-27  -ed 2022-10-27
category percent downloads
3.8 53.09% 187,448
3.10 12.27% 43,338
3.9 11.20% 39,555
null 7.98% 28,160
3.7 5.78% 20,415
3.6 5.27% 18,621
3.5 3.93% 13,869
2.7 0.44% 1,570
3.11 0.03% 92
3.4 0.00% 12
3.12 0.00% 1
Total 353,081

Date range: 2022-07-27 - 2022-10-27

Python 2.7 + 3.5 share = 4.37%
Python 2.7 + 3.5 + 3.6 share = 9.64%


The upcoming 0.18.0 release will be the last one to support Python 3.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Issues that are not user-facing but related to gitlint development
Projects
None yet
Development

No branches or pull requests

2 participants