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 cuda_core/cuda/core/_cpp/rt/py.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extern "C" int _Py_IsFinalizing(void);
// call.
//
// If that race is lost on a non-finalizer thread, CPython's behavior is
// version-dependent: on older supported versions (3.10-3.13) it may abruptly
// version-dependent: on older supported versions (3.11-3.13) it may abruptly
// terminate the current thread (historically via PyThread_exit_thread(),
// without normal C++ unwinding), while on newer versions (3.14+) it may hang
// the thread until process exit.
Expand Down
5 changes: 0 additions & 5 deletions cuda_core/cuda/core/_cpp/rt/py_report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ namespace {
bool
add_note_to_handled_exception(const char *message) noexcept
{
#if PY_VERSION_HEX >= 0x030B0000
if (!Py_IsInitialized() || py_is_finalizing()) {
return false;
}
Expand All @@ -91,10 +90,6 @@ add_note_to_handled_exception(const char *message) noexcept
}
Py_DECREF(result);
return true;
#else
(void)message;
return false;
#endif
}
} // namespace

Expand Down
4 changes: 2 additions & 2 deletions cuda_core/tests/memory_ipc/test_vmm_ipc.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ def _settled_open_fds():


def _has_note(exc, text):
"""Whether ``text`` is in one of the exception's notes, or in its message on Python 3.10."""
return any(text in note for note in getattr(exc, "__notes__", ())) or text in str(exc)
"""Whether ``text`` is in one of the exception's notes"""
return any(text in note for note in getattr(exc, "__notes__", ()))


def _forge(desc, **fields):
Expand Down
Loading