fabfuel / ecs-deploy

Powerful CLI tool to simplify Amazon ECS deployments, rollbacks & scaling
Other
854 stars 148 forks source link

Drop support for EOL Python 2.7 #208

Closed hugovk closed 1 year ago

hugovk commented 2 years ago

Fixes https://github.com/fabfuel/ecs-deploy/issues/198.

fabfuel commented 2 years ago

Thanks a lot for the nice PR Hugo! 👍

I'm hesitant to merge, just because I'm unsure how many people still rely on python 2.7 in there pipelines. I only now, that eco-deploy is used in many different setups and teams.

Please help me understand your motivation for creating this a bit better. Is there another reason for dropping support, except for clean up and dropping the unsupported Python version? I'm just wondering, if it made issues for you, too?

Thanks a lot & best wishes from Berlin Fabian

hugovk commented 2 years ago

Hi!

My main motivation is to help the Python community to fully move on to Python 3, which makes maintenance easier and allows to use newer syntax and features. Python 2 is no longer supported (2.5 years EOL by now) and for security we should encourage users to upgrade too -- there's been no security updates in Python many libraries have dropped it too, meaning no security updates there too.

There's a bit of a network effect too: "I can't drop support yet because package X is depending on me and they still want 2.7". It's better for Python as a whole to move on.

More concretely: issue #198 requested dropping 2.7 because they ran into an error deploying on 2.7 due to a boto3 issue.

If you want to keep supporting 2.7, that's totally fine! Feel free to close this PR.

I'm hesitant to merge, just because I'm unsure how many people still rely on python 2.7 in there pipelines. I only now, that eco-deploy is used in many different setups and teams.

For what it's worth, here's the pip installs for ecs-deploy from PyPI for June 2022, showing low numbers for 2.7:

category percent downloads
3.8 42.12% 11,094
3.10 22.97% 6,049
3.9 14.75% 3,884
2.7 7.56% 1,991
3.7 7.10% 1,870
3.6 4.46% 1,174
null 0.55% 144
3.5 0.49% 130
3.4 0.00% 1
Total 26,337

Source: pip install -U pypistats && pypistats python_minor ecs-deploy --last-month

fabfuel commented 2 years ago

Good morning Hugo,

thanks a lot for your detailed answer and please apologize my late response. I totally support the effort to help the community to fully move on to Python 3 and appreciate your effort in your PR 🙌 I will definitely merge it, I'm just thinking of giving a quick deprecation notice before, for those 2.7er's who do not pin to a version and potentially run into a broken build pipeline 😉

I did not know about pypistats yet and I love it, it's super helpful, thanks for sharing!

Best Fabian

hugovk commented 2 years ago

Morning! No need to apologise, we're nearly all volunteers! This isn't urgent so take your time :)

Deprecation sounds reasonable, although I should also mention the python_requires='>=3.5 line.

With modern pip, it will only install a package with that line when using Python 3.5+.

For anyone using 2.7, pip will find the next oldest version. So this people still on 2.7 install a compatible package.

fabfuel commented 2 years ago

That's very good to know (pip) - learning a lot in this PR 🙂

hugovk commented 1 year ago

I'm going to close this because by now there are 30 conflicts, and it will be easier to start again from scratch. If you like, I'm happy to re-do it when you're ready, shouldn't be too hard. 👍