Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python-greenlet/greenlet
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.3.1
Choose a base ref
...
head repository: python-greenlet/greenlet
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.3.2
Choose a head ref
  • 10 commits
  • 7 files changed
  • 4 contributors

Commits on Jan 23, 2026

  1. Back to development: 3.3.2

    jamadden committed Jan 23, 2026
    Configuration menu
    Copy the full SHA
    74a11b8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d4606ef View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2026

  1. 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
    daniel7an committed Feb 9, 2026
    Configuration menu
    Copy the full SHA
    77e65f0 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2026

  1. 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>
    nbouvrette and cursoragent committed Feb 11, 2026
    Configuration menu
    Copy the full SHA
    292e126 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2026

  1. Merge pull request #494 from daniel7an/fix/issue-492-spdx-license

    Fix SPDX license identifier: Python-2.0 → PSF-2.0
    jamadden authored Feb 20, 2026
    Configuration menu
    Copy the full SHA
    e0625d7 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #495 from nbouvrette/fix/safe-finalization-py310

    Fix SIGSEGV/SIGABRT during interpreter shutdown on Python < 3.11
    jamadden authored Feb 20, 2026
    Configuration menu
    Copy the full SHA
    d5b8515 View commit details
    Browse the repository at this point in the history
  3. Add change note for #495

    jamadden committed Feb 20, 2026
    Configuration menu
    Copy the full SHA
    53ac405 View commit details
    Browse the repository at this point in the history
  4. 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.
    jamadden committed Feb 20, 2026
    Configuration menu
    Copy the full SHA
    4eb47c8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c73a2c6 View commit details
    Browse the repository at this point in the history
  6. Preparing release 3.3.2

    jamadden committed Feb 20, 2026
    Configuration menu
    Copy the full SHA
    a62f331 View commit details
    Browse the repository at this point in the history
Loading