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

[RFC] Drop support for older Python versions (2.7 and 3.5) #654

Closed
sscherfke opened this issue Jun 19, 2020 · 9 comments
Closed

[RFC] Drop support for older Python versions (2.7 and 3.5) #654

sscherfke opened this issue Jun 19, 2020 · 9 comments
Labels
Thinking Needs more braining.

Comments

@sscherfke
Copy link
Contributor

sscherfke commented Jun 19, 2020

I propose that we end support for Python 2.7 and Python 3.5.

Python 2.7 is already EOL and the last patch for 3.5 will be released this July (if I interpret the PEP correctly).

According to pypistats.org, the share of py27 is approx. 11% and declining. Py35 has approx. 7%.

Setting py36 as minimum version would allow us to use these features:

These features would in turn allow us to:

This would require a new major release. The next one will be v20 which is, as chance would have it, a nice round number. ;-)

@wsanchez
Copy link

wsanchez commented Jun 22, 2020

Per pypistats python_minor attrs --last-month:

category percent downloads
3.7 38.26% 9,540,224
3.6 27.61% 6,882,498
2.7 13.54% 3,376,839
3.8 12.10% 3,017,537
3.5 8.00% 1,993,390
null 0.31% 76,454
3.4 0.14% 35,484
3.9 0.04% 9,089
3.10 0.00% 295
3.3 0.00% 139
2.6 0.00% 81
3.1 0.00% 1
Total 24,932,031

Date range: 2020-05-01 - 2020-05-31

@hynek
Copy link
Member

hynek commented Jun 29, 2020

I'm afraid 2.7 support is one of our main advantages over dataclasses and I don't want to leave those users in the rain (I'd have to lie if I said, that I have zero Python 2.7 apps in prod).

We've made this statement so we won't reverse course anytime soon: https://www.attrs.org/en/stable/python-2.html

I hope that our hand is gonna get forced sooner than later.


That said, I'm intend to make the new attrs namespace 3.6+ and allow for more 3.6+-only modules.

@wsanchez wsanchez added the Thinking Needs more braining. label Aug 27, 2020
@wsanchez
Copy link

Given the above, is there any value in keeping this open?

@hynek
Copy link
Member

hynek commented Aug 28, 2020

I guess not. We should open a fresh one once our hand is forced.

@wsanchez
Copy link

wsanchez commented May 25, 2021

category percent downloads
3.7 45.25% 24,490,529
3.6 19.08% 10,326,905
3.8 17.87% 9,673,213
3.9 5.29% 2,864,858
null 4.58% 2,476,303
2.7 4.03% 2,179,034
3.5 3.82% 2,066,489
3.4 0.05% 26,575
3.10 0.03% 17,305
2.6 0.00% 53
3.3 0.00% 40
3.2 0.00% 3
3.1 0.00% 1
Total 54,121,308

Date range: 2021-04-01 - 2021-04-30

@hugovk
Copy link
Contributor

hugovk commented May 25, 2021

image

@pganssle
Copy link
Member

It's probably worth noting that the total volume of downloads between the June 2020 numbers and the April 2021 numbers more than doubled, with most of the volume going to 3.6+. In absolute terms, Python 2.7 download volume dropped by about 35%, even though it's now only 4% of the total downloads.

Or, put another way, with 2M downloads/month, attrs-on-python2 is approximately as popular as cattrs or youtube-dl, and is still within the top 400 most downloaded packages per month, according to the latest dump on https://hugovk.github.io/top-pypi-packages/

I don't really need Python 2.7 support myself nor do I especially like providing it, but just thought it was worth noting that these are not small volumes.

@sscherfke
Copy link
Contributor Author

What I do not understand is why we have to support py27 in new feature releases?

Why can’t we declare the current (or an upcoming) major versions as last version supporting 2.7 and only provide bug fixes for it?

@hynek
Copy link
Member

hynek commented May 25, 2021

Why can’t we declare the current (or an upcoming) major versions as last version supporting 2.7 and only provide bug fixes for it?

That's what we more or less do. The credo is that if it's hard/complicated in Python 2, don't bother. If it's trivial, why not? I'm sure there's grateful people out there for it.


I draw the line when CI becomes a pain and/or Tidelift goes to 0 (I'm constantly at $50.77 which is just barely above minimal payout).

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

No branches or pull requests

5 participants