-
Notifications
You must be signed in to change notification settings - Fork 265
Comparing changes
Open a pull request
base repository: python-greenlet/greenlet
base: 3.3.1
head repository: python-greenlet/greenlet
compare: 3.3.2
- 10 commits
- 7 files changed
- 4 contributors
Commits on Jan 23, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 74a11b8 - Browse repository at this point
Copy the full SHA 74a11b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for d4606ef - Browse repository at this point
Copy the full SHA d4606efView commit details
Commits on Feb 9, 2026
-
Fix SPDX license identifier: Python-2.0 → PSF-2.0
The LICENSE.PSF file corresponds to PSF-2.0, not Python-2.0. PSF-2.0 is GPL-compatible while Python-2.0 is not, so this distinction matters for downstream license compliance checks. Fixes #492
Configuration menu - View commit details
-
Copy full SHA for 77e65f0 - Browse repository at this point
Copy the full SHA 77e65f0View commit details
Commits on Feb 11, 2026
-
Fix SIGSEGV/SIGABRT during interpreter shutdown on Python < 3.11
During interpreter finalization (Py_FinalizeEx), active greenlets being deallocated would trigger g_switch() to throw GreenletExit. This performs a stack switch and executes Python code in a partially-torn-down interpreter, causing: - SIGSEGV (signal 11) on greenlet 3.x - SIGABRT (signal 6 / "Accessing state after destruction") on greenlet 2.x On Python >= 3.11, CPython's restructured finalization internals (frame representation, data stack management, recursion tracking) make g_switch() during finalization safe. On Python < 3.11, this was not the case. This commit adds two guards, compiled only on Python < 3.11 (!GREENLET_PY311): 1. In _green_dealloc_kill_started_non_main_greenlet (PyGreenlet.cpp): When the interpreter is finalizing, call murder_in_place() directly instead of attempting g_switch(). This marks the greenlet as dead without throwing GreenletExit, avoiding the crash at the cost of not running cleanup code inside the greenlet. 2. In ~ThreadState (TThreadState.hpp): When the interpreter is finalizing, skip the GC-based leak detection that calls PyImport_ImportModule("gc"), which is unsafe when the import machinery is partially torn down. Only perform minimal safe cleanup (clearing strong references). On Python >= 3.11, no changes are made — the existing behavior (throwing GreenletExit via g_switch, running cleanup code) continues to work correctly during finalization. Also adds test_interpreter_shutdown.py with 9 subprocess-based tests covering: - Single/multiple/nested/threaded/deeply-nested active greenlets at shutdown (no-crash safety on all Python versions) - Version-aware behavioral tests verifying that GreenletExit cleanup code runs on Python >= 3.11 but is correctly skipped on < 3.11 - Edge cases: active exception context, stress test with 50 greenlets Fixes #411 See also #351, #376 Co-authored-by: Cursor <cursoragent@cursor.com>Configuration menu - View commit details
-
Copy full SHA for 292e126 - Browse repository at this point
Copy the full SHA 292e126View commit details
Commits on Feb 20, 2026
-
Merge pull request #494 from daniel7an/fix/issue-492-spdx-license
Fix SPDX license identifier: Python-2.0 → PSF-2.0
Configuration menu - View commit details
-
Copy full SHA for e0625d7 - Browse repository at this point
Copy the full SHA e0625d7View commit details -
Merge pull request #495 from nbouvrette/fix/safe-finalization-py310
Fix SIGSEGV/SIGABRT during interpreter shutdown on Python < 3.11
Configuration menu - View commit details
-
Copy full SHA for d5b8515 - Browse repository at this point
Copy the full SHA d5b8515View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53ac405 - Browse repository at this point
Copy the full SHA 53ac405View commit details -
test_untracked_memory_doesnt_increase_unfinished_thread_dealloc_in_ma…
…in: A change in the GHA Runner Image version caused this test to break ONLY on Windows 3.14t; skip it. It's unclear exactly what they changed that broke it, the operating system version is reported to be the same.
Configuration menu - View commit details
-
Copy full SHA for 4eb47c8 - Browse repository at this point
Copy the full SHA 4eb47c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c73a2c6 - Browse repository at this point
Copy the full SHA c73a2c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a62f331 - Browse repository at this point
Copy the full SHA a62f331View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 3.3.1...3.3.2