Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
CIBW_ENVIRONMENT_WINDOWS: >
CMAKE_GENERATOR="${{ matrix.cmake_generator }}"
CMAKE_GENERATOR_PLATFORM="${{ matrix.cmake_generator_platform }}"
CIBW_SKIP: cp38-* cp314* *-musllinux_*
CIBW_SKIP: cp38-* *-musllinux_*
CIBW_ARCHS: ${{ matrix.arch }}
run: |
python -m cibuildwheel --output-dir wheelhouse python/
Expand Down
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Libraries",
Expand Down
8 changes: 7 additions & 1 deletion python/segyio/trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,14 @@ def flush(self):
be useful in certain contexts to provide stronger guarantees.
"""
garbage = []
# If there are no external references to the data (so only internal
# references remain), the reference count is
# - 2 (Python >= 3.14)
# - 3 (Python < 3.14)
garbage_threshold = 3 if sys.version_info < (3, 14) else 2

for i, (x, signature) in self.refs.items():
if sys.getrefcount(x) == 3:
if sys.getrefcount(x) == garbage_threshold:
garbage.append(i)

if fingerprint(x) == signature: continue
Expand Down