🐛 fix(pyproject-fmt): bump the newest Python the default names - #463
Conversation
72dea0d to
f1eb206
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
f1eb206 to
38a0962
Compare
38a0962 to
0c55fbc
Compare
0c55fbc to
84a0c93
Compare
84a0c93 to
543c7e4
Compare
543c7e4 to
289373a
Compare
d2499d4 to
7336496
Compare
The default named 3.14, so a project writing `requires-python = ">=3.12,<3.16"` lost the classifier for 3.15: the setting caps what the requirement admits, and it capped it below what the file said it supports. Both ends are written down, and a run each day sets them from what is true that day. The newest has to satisfy two things at once, since either alone says too little: PyPI publishes a classifier naming it, and Python has published a release candidate. 3.16 has the first and not the second, so it names nothing yet. The oldest is the release still carrying fixes, which 3.10 stops doing at the end of October. No date published ahead of time is written down or compared against, so a release that slips arrives when it arrives. Anyone naming `max_supported_python` themselves keeps what they set. Fixes tox-dev#460
7336496 to
c94b2f8
Compare
|
@gaborbernat Thank you so much for the quick fix. Tested and it worked. I wasn't expecting it to be so complicated - does the underlying mechanism applies different logic for |
|
Well, we're trying to have reasonable defaults here and support user expectations. This turned out to be a minor bug, but we used the opportunity to improve, stabilize, and automate much of this as part of this pull request, hence why it became a bit more complicated. |
A project writing
requires-python = ">=3.12,<3.16"says it runs on 3.15, and since 2.29.0 the formatter drops the classifier naming that release, as #460 reports. 🐛 Settingmax_supported_pythonby hand puts it back, which is the workaround the reporter found.Classifier generation reads the floor from
requires-pythonand caps the result atmax_supported_python, as the configuration docs describe. That cap named 3.14 while 3.15 sits at its release candidate, so it fell below what these files say they support and took the classifier with it. Whether a release exists is the question the cap answers, and a requirement cannot answer it, since<3.30would otherwise name a dozen releases that have no classifier for PyPI to accept.What let a stale number sit there is that nothing watched it, so both ends now move on their own. ✨ They stay written down in the source, and a run each day sets them from what is true that day. The newest has to satisfy two things at once, since either alone says too little: PyPI publishes a classifier naming it, and Python has published a release candidate. 3.16 has the first and not the second, so it names nothing yet, while a release still in alpha carries a classifier long before its behavior settles. The oldest is the release still carrying fixes, which 3.10 stops doing at the end of October.
Neither run writes down a date published ahead of time, nor compares against one, so a release that slips arrives when it arrives rather than on the day someone predicted. ✨ The seven places that spell either number move together, documentation included, and anyone naming
max_supported_pythonthemselves keeps what they set.Bumping either end changes what the formatter writes, so the daily run opens a pull request rather than pushing, and whoever reviews it updates the expectations that name a release.
Fixes #460