-
Notifications
You must be signed in to change notification settings - Fork 342
EOL: Drop support for Python 3.9 and below #518
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
EOL: Drop support for Python 3.9 and below #518
Conversation
|
pysolr/.github/workflows/tox.yml Lines 11 to 13 in 2a8ec8d
Please remove the |
|
Historically we haven't rapidly dropped support for Python versions when there are still Linux distributions which have years of support for those versions (e.g. Red Hat / Amazon Linux / etc. are multiple years away, Debian Bullseye is a year) but it's not unreasonable to say that people using those with the default versions are probably not tracking the latest Pysolr either. Let's plan to tag this as 3.11 or perhaps 4.0 so it's easy to backport something like a security update. |
So the future flow is:
Is this the plan you have in mind? |
|
Yes - that way anyone who needs to maintain Python 3.9 support (e.g. another project which itself supports multiple version of Python) can pin |
That is paid support. So if users are paying Red Hat or Amazon, then those organizations can provide the required support. Python has fallen into a nice rhythm of having five supported versions over five years, rotating each October. If you count Python 3.13t and 3.14t, that is 7 versions that need to be supported, plus optionally PyPy 3.11. I think that supporting up to 8 different versions is enough work for open source teams that receive no remuneration. It is not a good idea for people to build systems on software that contains carefully documented security flaws but no longer receives security updates. A lot of recent work has gone into making Python faster. Those who remain on EOL versions see none of that progress, and so they might consider porting rather than upgrading. |
I strongly recommend that we bump the major version, e.g. Here are my points to support this statement:
|
|
At this point, a major release should also include improvements like: |
It's not necessarily paid support – only one of the examples I mentioned requires payment – but to your larger point, yes, I think we should drop support following the upstream CPython support lifecycle. I just want to do it in a way which leaves an easy pinning option for anyone depending on pysolr in a project which still supports users on those long-term stable Linux distributions.
Was some of this written with the help of an LLM? Some of the hypotheticals or the way My vote would be using a minor release (3.11). That's not a strong argument against a major release because the cost of either is low, but this isn't really changing the actual public API and as long as the package is correctly tagged people can't easily install new releases on Python 3.9. Historically we haven't had problems caused by dropping support for old Python versions in minor releases. |
No. I asked this in the official Django Discord server, and that's where I got my some supporting points. |
Not hypothetical - actually, I have quite a few years of experience working with Apache Solr. I know how Solr releases new featurres along with endpoints API (v1, v2) modifications every year. |
|
Strange! |
I believe we get hit by the quota mechanism since we don't have paid capacity. |
Ah, cool, I just wasn't sure where the idea of things like back porting features came from since Pysolr is unlike a lot of other projects in that it's really just a wrapper for upstream functionality so there's much more limited scope for that kind of thing. Django Haystack might have a little more of that since there are people who might be stuck with other dependencies blocking, say, a major Django or Python upgrade but this project is mostly a shim. |
- Remove all '__future__' imports since Python3.x behavior is now default - Remove Python2.x shims and conditionals - Simplify standard library imports - Remove 'mock' dependency as it is now included by default in unittest
|
This is looking like a very nice cleanup PR. I'm enjoying removal of all of the Python 2 checks, thank you! |
acdha
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could go with this immediately. If we want to adjust the requests minimum version that can happen later.
Welcome 🤓 |
Ok, but we also need to update the README file. I can see that some code blocks in the README mention |
Final SummaryVirtual Environment Graph after Dropping Python 3.9 and Below Support$ uv pip tree
kazoo v2.10.0
pysolr v0.1.dev630+g08588afdd.d20251113
├── requests v2.32.5
│ ├── certifi v2025.11.12
│ ├── charset-normalizer v3.4.4
│ ├── idna v3.11
│ └── urllib3 v2.5.0
└── setuptools v80.9.0 |
Summary
As of 2025-10, Python 3.9 is end of life and does not get upstream support from python.org anymore.
This PR drops support for Python 3.9 and below to align with the current Python ecosystem and simplify code maintenance.
Python 3.9 reached end of life: https://devguide.python.org/versions/
Changes
python_requires=">=3.10"insetup.pyPipenvwith Python 3.10+Notes
Users on Python versions earlier than 3.10 will now receive a version restriction error when trying to install Pysolr version 3.11 or higher via pip.