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

💡 Re-think Python2 management #867

Open
Tracked by #899
jefftriplett opened this issue Nov 2, 2022 · 7 comments
Open
Tracked by #899

💡 Re-think Python2 management #867

jefftriplett opened this issue Nov 2, 2022 · 7 comments

Comments

@jefftriplett
Copy link
Contributor

When the project was created a decade+ ago, getting people to Python 3 was a huge emphasis because more Python code worked on 2 than 3. Skip forward to 2022 the bulk of projects work on Python 3.x. This means there is room for removing some of the explicit python3 work and trying to support more ranges of Python versions numbers including stable/supported/maintained versions of Python. This might be better as a discussion, but I thought I'd kick off a feature request to start noodling on it.

See Python 3 stats here: https://djangopackages.org/open/

See also https://endoflife.date/python which could help feed data via a nightly cron job to collect the latest version info on python, django, and any other related projects.

@jefftriplett jefftriplett changed the title Re-think Python2 management 💡 Re-think Python2 management Nov 2, 2022
@ryancheley ryancheley mentioned this issue Jan 7, 2023
8 tasks
@boxed
Copy link

boxed commented Feb 17, 2023

I noticed that my own package Urd is listed as not having python 3 support on https://djangopackages.org/grids/g/workers-queues-tasks/ but in fact it has never had python 2 support! And if you click on it you get to a page https://djangopackages.org/packages/p/urd/ that clearly says it DOES have python 3 support.

Something is clearly fishy here...

@jefftriplett
Copy link
Contributor Author

I appreciate the comment.

From both the backend and the frontend, I'm seeing that it support Python 3 (see screenshot). I'm also seeing that it was refreshed ~30 minutes ago in case you hit refresh, and that caused it to refresh from PyPI, see the trove classifiers, and then mark it.

Xnapper-2023-02-17-08 41 05

I think I'm going to work on dropping the whole highlighting Python 3 support and see if I can add some better scoring around more current version support like 3.11 / 3.10. I'd rather this be more transparent as a bonus for supporting newer Python than a penalty for something that's harder to measure. 🤔

@boxed
Copy link

boxed commented Feb 17, 2023

Hmm. Yea it now shows correctly. But it has always been the same versions so it's a bit worrying :)

@jefftriplett
Copy link
Contributor Author

I'll give it another look then.

@boxed
Copy link

boxed commented Feb 17, 2023

Maybe it's a default value and it was cached somehow?

@jefftriplett
Copy link
Contributor Author

This logic goes back a decade+, but it was originally assumed that a new package was a Python2 package unless the trove classifiers proved otherwise. See this default: https://github.com/djangopackages/djangopackages/blob/main/package/models.py#L96-L98

Then we have multiple paths for verifying that a package works with Python 3. https://github.com/djangopackages/djangopackages/blob/main/package/models.py#L292-L335

We can change these Python2 (isms) and assume that everything new works with Python 3.

@jefftriplett
Copy link
Contributor Author

Making a note for packages like (channels_redis)[https://djangopackages.org/packages/p/channels_redis/], which leans on python_requires (python_requires=">=3.7") to denote which version of Python is supported.

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

No branches or pull requests

2 participants