Skip to content

Commit 094f77a

Browse files
Restore Python 3.9 support
Re-add Python 3.9 to requires-python and trove classifiers in pyproject.toml. No C/C++ code was removed when 3.9 support was dropped in 3.3.0 — the drop was purely a packaging metadata change. Combined with the safe finalization fix in the parent commit (PR python-greenlet#495), greenlet now works reliably on Python 3.9 during interpreter shutdown, which was the primary stability concern for older Python versions. This gives teams still running Python 3.9 in production a stable greenlet release path while they plan their Python upgrade. Also adds CHANGES.rst entries for both this change and the finalization fix. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent b7878d0 commit 094f77a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

CHANGES.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,22 @@
55
3.3.2 (unreleased)
66
==================
77

8-
- Nothing changed yet.
8+
- Restore support for Python 3.9. The ``requires-python`` metadata and
9+
trove classifiers have been updated to include Python 3.9 again. No
10+
C/C++ code was removed when 3.9 support was dropped in 3.3.0, so this
11+
is purely a packaging change. Combined with the safe finalization fix
12+
(below), greenlet now works reliably on Python 3.9 during interpreter
13+
shutdown. See `PR 496
14+
<https://github.com/python-greenlet/greenlet/pull/496>`_.
15+
- Fix SIGSEGV and SIGABRT crashes during interpreter shutdown on
16+
Python < 3.11. Active greenlets being deallocated during
17+
``Py_FinalizeEx`` would trigger ``g_switch()`` in a partially-torn-down
18+
interpreter. The fix checks ``_Py_IsFinalizing()`` and uses
19+
``murder_in_place()`` instead, avoiding the crash at the cost of not
20+
running cleanup code inside the greenlet on older Pythons. Also adds
21+
the first interpreter-shutdown tests to the test suite. See `PR 495
22+
<https://github.com/python-greenlet/greenlet/pull/495>`_.
23+
Fixes :issue:`411`.
924

1025

1126
3.3.1 (2026-01-23)

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ classifiers = [
2626
"Programming Language :: C",
2727
"Programming Language :: Python",
2828
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.9",
2930
"Programming Language :: Python :: 3.10",
3031
"Programming Language :: Python :: 3.11",
3132
"Programming Language :: Python :: 3.12",
@@ -41,7 +42,7 @@ keywords = [
4142
"threads",
4243
"cooperative",
4344
]
44-
requires-python = ">=3.10"
45+
requires-python = ">=3.9"
4546
dynamic = ["version"]
4647

4748
[project.urls]

0 commit comments

Comments
 (0)