-
Notifications
You must be signed in to change notification settings - Fork 257
chore: Enforce Python 3.8+ requirement and add multi-version CI testing #441
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
chore: Enforce Python 3.8+ requirement and add multi-version CI testing #441
Conversation
- Add python_requires=">=3.8" to setup.py to enforce minimum version at install time - Update README to explicitly document Python 3.8+ requirement - Add CI matrix to test lint/build on Python 3.8-3.14 (7 versions) - Aligns with actual usage patterns (~99% of downloads on Python 3.8+) - Prevents future PRs from inadvertently using incompatible syntax This change protects users by preventing installation on unsupported Python versions and ensures contributors can see version requirements clearly.
|
Just a question, are you using AI to write these PRs? |
|
Looks like 3.8 and 3.9 fail, and those also aren't supported Python versions anyways. Can you drop those in a separate PR and update this one to only include the passing ones? |
Yes for research, language and summarisation. Well aware of hallucinations and false facts so I check everything diligently. Aim is clarity over expediency. Worked at Amazon for many years so experienced at crafting documents fur such things. The AI is good if it has a good instructor, otherwise its like the intern you never want near anything. :) For example analysis of existing python usage was much faster than doing it myself, but I had to litmus test it plus I had a second AI validate the first. |
3.8 and 3.9 are failing because the pinned dependencies don't support them: - autopep8==2.3.2 needs Python 3.9+ - bleach==6.3.0 needs Python 3.10+ Both are EOL now anyway (3.8 in Oct 2024, 3.9 in Oct 2025). Just fixing CI to test 3.10-3.14 for now. Will do a separate PR to formally drop 3.8/3.9 support with python_requires and README updates.
|
Removed 3.8 and 3.9 from the CI matrix. As you rightly pick up they too are EOL now (3.9 just last week). The pinned dependencies don't support them anyway. This should make the CI pass. I will do a follow-up PR to drop 3.8 and 3.9 support with the python_requires and README. |
Done, see #442 . Thank for holding my hand, I have not done many PRs for other projects so I am learning a lot as I go. |
|
I mostly asked because the ticket description reminded me of it and made me eye-roll a bit before I read the PR itself :) |
|
Mind rebasing this onto the master branch? I think once thats sorted, I can merge this and we're good to go to review the bigger PR :) |
Done. Hopefully my cause of an eye roll does not taint the attachment feature. It was two days of hard graft, mostly in testing and tracking down corner cases (such as repo renames). Worked hard to make it fit well with the existing code and design the feature with a similar approach to the existing one. It was actually a really nice puzzle, to work with someone else's code, rather than it all being exclusively my own. As mentioned, I have not made many contributions before, this is my first decent size one. So I am learning. :) |
|
No its just I've seen a lot of AI-driven PRs that end up being very poor quality so thats kinda what I was expecting out of this and the other one. That hasn't been the case here at least. |
This PR aligns Python version requirements across documentation, packaging, and CI to prevent compatibility issues and make requirements explicit for contributors.
Changes
python_requires=">=3.8"to enforce minimum version at pip install timeRationale
This project already declares Python 3.8-3.12 support via setup.py classifiers, but this requirement was not enforced or tested. This PR makes that declaration official and enforceable.
Why Python 3.8+ specifically:
Historical context:
.format()strings and could technically support Python 3.0+The gap this fixes:
Without explicit enforcement and CI testing, contributors could easily introduce incompatible syntax:
Common Python features that require newer versions:
f"hello {name}"- Already in codebase:=(PEP 572) -if (n := len(a)) > 10:|(PEP 584) -d1 | d2[](PEP 585) -list[int]instead ofList[int]X | Y(PEP 604) -def foo(x: int | str):These features are increasingly common in modern Python code. Without CI testing on all supported versions, a PR using these features could pass code review and break users on older Python versions.
Impact
Benefits
Drawbacks
Testing
python_requiresis a standard setuptools feature used by thousands of packagesThank you for reviewing and considering this change.