Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR restores Python 3.9 support that was dropped in greenlet 3.3.0.
Context
When Python 3.9 was dropped in 3.3.0, no C/C++ code was actually removed — the change was purely in packaging metadata (
requires-pythonand trove classifiers inpyproject.toml) and CI configuration. Thetox.initest matrix already includespy39. This means restoring 3.9 is a minimal, low-risk change.Why Restore 3.9?
Python 3.9 remains widely deployed in production environments. Many teams (including ours) run mission-critical services on Python 3.9 with greenlet-dependent stacks (uWSGI, gevent, SQLAlchemy) and cannot immediately upgrade Python.
With the safe finalization fix in PR #495, the primary stability concern for Python 3.9 (SIGSEGV/SIGABRT during interpreter shutdown) is now resolved. Restoring 3.9 support gives these teams a stable greenlet release path while they plan their Python version upgrade.
Changes
pyproject.toml:requires-python:">=3.10"→">=3.9""Programming Language :: Python :: 3.9"trove classifier.github/workflows/tests.yml:"3.9"to the CI test matrixwindows-11-armexclusion for 3.9 (not available on that platform)CHANGES.rst: Added entries for both this change and the finalization fix from PR Fix SIGSEGV/SIGABRT during interpreter shutdown on Python < 3.11 #495.Dependencies
This PR builds on top of PR #495 (safe finalization fix). Without that fix, Python 3.9 would still crash during interpreter shutdown when active greenlets exist. With both PRs merged, Python 3.9 is fully stable.
Test Plan
tox -e py39passes (already in the tox config)