Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev/drop-support-for-…
Browse files Browse the repository at this point in the history
…python-37
  • Loading branch information
mdickinson committed Mar 4, 2024
2 parents 1fff616 + a20f215 commit 61320a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-core-traits-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

runs-on: ${{ matrix.os }}

Expand Down
12 changes: 10 additions & 2 deletions traits/ctraits.c
Original file line number Diff line number Diff line change
Expand Up @@ -808,10 +808,10 @@ static void
has_traits_dealloc(has_traits_object *obj)
{
PyObject_GC_UnTrack(obj);
Py_TRASHCAN_SAFE_BEGIN(obj);
Py_TRASHCAN_BEGIN(obj, has_traits_dealloc);
has_traits_clear(obj);
Py_TYPE(obj)->tp_free((PyObject *)obj);
Py_TRASHCAN_SAFE_END(obj);
Py_TRASHCAN_END
}

/*-----------------------------------------------------------------------------
Expand Down Expand Up @@ -3006,10 +3006,18 @@ static void
trait_dealloc(trait_object *trait)
{
PyObject_GC_UnTrack(trait);
#if PY_VERSION_HEX < 0x03080000
Py_TRASHCAN_SAFE_BEGIN(trait);
#else
Py_TRASHCAN_BEGIN(trait, trait_dealloc);
#endif
trait_clear(trait);
Py_TYPE(trait)->tp_free((PyObject *)trait);
#if PY_VERSION_HEX < 0x03080000
Py_TRASHCAN_SAFE_END(trait);
#else
Py_TRASHCAN_END
#endif
}

/*-----------------------------------------------------------------------------
Expand Down

0 comments on commit 61320a7

Please sign in to comment.