Skip to content

Add: text on which python version(s) to support to the packaging guide #17

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

Open
lwasser opened this issue Dec 21, 2022 · 9 comments
Open
Labels
help wanted We welcome a contributor to work on this issue! thank you in advance! new-content New feature or request sprintable

Comments

@lwasser
Copy link
Member

lwasser commented Dec 21, 2022

make sure in the maintainer section that we include discussions of what versions of python to support. the scientific python spec 00 is what we want to ideally promote here. see comment thread below:

https://github.com/pyOpenSci/peer-review-guide/pull/148/files#r1049888878

@ucodery
Copy link
Collaborator

ucodery commented Apr 7, 2024

What I'm getting from the earlier thread is that we do want to put forward Python's official EOL timeline (recommend supporting the latest stable version, and no further back than versions still getting security fixes) and we don't want to support NEP-29 (because it's not a community decision, and possibly too specific to recommend generally). I'm confused if we want to recommend SPEC 00 as it is a community guide (and now appears to be accepted) but is also specific to certain requirements graphs. Do we want to recommend this iff the project used one of those deps?

@willingc
Copy link
Collaborator

willingc commented Apr 7, 2024

@ucodery As for Python itself, I would recommend latest stable and versions that are still getting bug fixes. If you are on a security fixes only version, then you should consider migrating to a more recent version.

I'm not sure that we want to recommend SPEC 00 beyond making folks aware that it exists.

@lwasser
Copy link
Member Author

lwasser commented Apr 9, 2024

thank you both. i'm looking at some of these old issues too - to see if we can close or mark them help-wanted!

i agree with you both -

  1. we could (optionally) add a small breakout about the scientific python spec just so people know about it.
  2. we could link to that awesome graphic that shows the planned release cycle
  3. i think we also would want to explain how someone would look at that graphic and understand which versions are getting updates? i look at it and assume that 3.8-3.11 are ONLY getting security updates? but not bug fixes? 3.12 is actively being worked on for bugs and 3.13 is getting updates/ features. is this correct? even if it isn't i think linking to the graphic via a image link and explaining how to understand it would be valuable!
Screenshot 2024-04-09 at 3 29 40 PM

What do you both think? i'll mark this help wanted and clarify the title

@lwasser lwasser added help wanted We welcome a contributor to work on this issue! thank you in advance! sprintable labels Apr 9, 2024
@lwasser
Copy link
Member Author

lwasser commented Apr 9, 2024

btw i created this little github project board automation that adds any issues with help-wanted to our project board. it's working so well!!

@lwasser lwasser moved this to Python Packaging in pyOpenSci Help Wanted Project Board Apr 9, 2024
@lwasser lwasser changed the title eol versions of python Add: text on which python version(s) to support to the packaging guide Apr 9, 2024
@lwasser
Copy link
Member Author

lwasser commented Apr 9, 2024

@ucodery
Copy link
Collaborator

ucodery commented Apr 9, 2024

I believe you read that diagram exactly right Leah.

Hmm, I don't think this rises to the level of new page (maybe we'll see when it's written). I think it should go in declare-dependencies but it will need a new section. We currently don't mention the requires-python metadata in there at all (it gets a single mention in the pyproject-toml-python-package-metadata page, and is described during the tutorial).

IMHO we should clarify that it is an optional field, that it doesn't need to be set unless you know there are problems using an older version, and that some maximum supported python version should never be set (no <). Maybe a callout saying if you absolutely must and can confirm that the upper limit does in fact break your project.

This might also be a good place to remind authors that classifiers do not in any way influence dependencies and that they are not a replacement for using python-requires. Also that it can nonetheless be very confusing to let python-requires and chosen classifiers get out-of-sync.

Coming back to the question of concretely which versions a project should support (and support is different than python-requires. IMO support is an include-list - these are known to work, probably even tested. If the python version fails a python-requires check it is on an exclude-list - its known to be bad. There can be a lot of grey in between). I think there has already been a mis-communication here. When I first posted

recommend supporting the latest stable version, and no further back than versions still getting security fixes

I was thinking about supporting a library. I think it is reasonable that a library author support all versions also currently supported by CPython - although authors are free to do what they want and can just support bug-fix releases. And certainly if the library only makes sense coupled with newer Python features, that could also exclude otherwise fine-to-use versions.

For an application developer it probably makes more sense to try and stay on the latest version all the time and it is also okay so support a smaller version range; maybe no range, only a single version. If you have got behind enough that you are on a security release then maybe upgrading should be a high priority, but no harm yet, not until the version goes EOL, IMO.

Supporting the beta version of Python is good for the community overall, but can be a lot of extra effort for a maintainer, with maybe little to no benefit to the current work.

@lwasser
Copy link
Member Author

lwasser commented Jul 12, 2024

@ucodery i'm going through old issues. I agree - it would be PERFECT in the requires-python section of the guide / metadata etc. We could also use a target in myst to allow for a link that we surface on the home page

(python-version)=
## Python versions

How about this takeaway here:

  1. Add a small breakout on the scientific python spec so people are aware of it. And tell them that is a option if they want to follow
  2. Use @willingc language which aligns with the core Python ecosystem more closely:

I would recommend latest stable and versions that are still getting bug fixes. If you are on a security fixes only version, then you should consider migrating to a more recent version.

Note: i'm always slow to upgrade to a new version. stravalib just dropped python 3.9. I'm still using 3.10 throughout. So i like the idea of providing options but suggestions they consider supporting versions that are getting bug fixes. but also that users may still be on the versions that are getting security fixes.

Do you both agree with that approach? then someone could work on this if we agree.

@ucodery
Copy link
Collaborator

ucodery commented Jul 15, 2024

I think this is the best summary of PyOS recommendations

@lwasser
Copy link
Member Author

lwasser commented May 12, 2025

Ok fantastic - i'm following on this as we could sprint on it at PyCON US next week. @ucodery will you be attending this year?

@lwasser lwasser added the new-content New feature or request label May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted We welcome a contributor to work on this issue! thank you in advance! new-content New feature or request sprintable
Projects
Status: Python Package Guide
Development

No branches or pull requests

3 participants