Skip to content
Draft
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/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: ['macos-13', 'macos-latest', 'ubuntu-latest', 'windows-latest']
python-version: ['3.10', '3.11', '3.12', '3.13']
python-version: ['3.12', '3.13', '3.14.0-rc.3']
steps:
- name: Set up the repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ signals and errors) in Cython code.
Requirements
------------

- Python >= 3.9
- Python >= 3.12
- Cython >= 0.28
- Sphinx >= 1.6 (for building the documentation)

Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ classifiers = [
"Programming Language :: C",
"Programming Language :: Cython",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: System",
"Topic :: Software Development :: Debuggers",
]
urls = { Homepage = "https://github.com/sagemath/cysignals" }
requires-python = ">=3.9,<3.14"
requires-python = ">=3.12"

[project.entry-points.pkg_config]
cysignals = 'cysignals'
Expand Down
2 changes: 1 addition & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ version: 2
conda:
file: readthedocs-conda.yml
python:
version: "3.11"
version: "3.12"
pip_install: true

6 changes: 3 additions & 3 deletions src/cysignals/signals.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ See ``tests.pyx`` for extensive tests.

from libc.signal cimport *
from libc.stdio cimport freopen, stdin
from cpython.ref cimport Py_XINCREF, Py_CLEAR
from cpython.ref cimport Py_XINCREF, Py_CLEAR, _Py_REFCNT
from cpython.exc cimport (PyErr_Occurred, PyErr_NormalizeException,
PyErr_Fetch, PyErr_Restore)
from cpython.version cimport PY_MAJOR_VERSION
Expand Down Expand Up @@ -360,7 +360,7 @@ cdef void verify_exc_value() noexcept:
Check that ``cysigs.exc_value`` is still the exception being raised.
Clear ``cysigs.exc_value`` if not.
"""
if cysigs.exc_value.ob_refcnt == 1:
if cysigs.exc_value != NULL and _Py_REFCNT(cysigs.exc_value) == 1:
# No other references => exception is certainly gone
Py_CLEAR(cysigs.exc_value)
return
Expand Down Expand Up @@ -408,5 +408,5 @@ cdef void verify_exc_value() noexcept:
# Make sure we still have cysigs.exc_value at all; if this function was
# called again during garbage collection it might have already been set
# to NULL; see https://github.com/sagemath/cysignals/issues/126
if cysigs.exc_value != NULL and cysigs.exc_value.ob_refcnt == 1:
if cysigs.exc_value != NULL and _Py_REFCNT(cysigs.exc_value) == 1:
Py_CLEAR(cysigs.exc_value)
Loading
Loading