Skip to content

Commit 4320c21

Browse files
committed
Remove outdated py3.10 code
1 parent fe9bb74 commit 4320c21

4 files changed

Lines changed: 5 additions & 12 deletions

File tree

‎cuda_core/cuda/core/_cpp/rt/py.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern "C" int _Py_IsFinalizing(void);
2222
// call.
2323
//
2424
// If that race is lost on a non-finalizer thread, CPython's behavior is
25-
// version-dependent: on older supported versions (3.10-3.13) it may abruptly
25+
// version-dependent: on older supported versions (3.11-3.13) it may abruptly
2626
// terminate the current thread (historically via PyThread_exit_thread(),
2727
// without normal C++ unwinding), while on newer versions (3.14+) it may hang
2828
// the thread until process exit.

‎cuda_core/cuda/core/_cpp/rt/py_report.cpp‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ namespace {
7171
bool
7272
add_note_to_handled_exception(const char *message) noexcept
7373
{
74-
#if PY_VERSION_HEX >= 0x030B0000
7574
if (!Py_IsInitialized() || py_is_finalizing()) {
7675
return false;
7776
}
@@ -91,10 +90,6 @@ add_note_to_handled_exception(const char *message) noexcept
9190
}
9291
Py_DECREF(result);
9392
return true;
94-
#else
95-
(void)message;
96-
return false;
97-
#endif
9893
}
9994
} // namespace
10095

‎cuda_core/docs/source/release/1.3.0-notes.rst‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ Fixes and enhancements
296296

297297
- When a :class:`Device` method has to run in the device's context and the
298298
caller's context cannot be restored afterwards, the created resource is
299-
destroyed and the raised ``CUDAError`` now carries a note (Python 3.11+;
300-
appended to the message on 3.10) stating that the caller's context could not
299+
destroyed and the raised ``CUDAError`` now carries a note stating that the caller's context could not
301300
be restored and which context is current. Previously the error named only
302301
the driver status of the failed ``cuCtxSetCurrent`` call. If the call itself
303302
failed as well, its error is raised and the restoration failure is the note.
@@ -315,8 +314,7 @@ Fixes and enhancements
315314
context is current, returning ``None``.
316315

317316
- A failed rollback of a partially embedded child graph node is now attached
318-
as a note to the exception that triggered the rollback (reported as
319-
:class:`CUDAWarning` on Python 3.10), and a failed ``cuStreamEndCapture``
317+
as a note to the exception that triggered the rollback, and a failed ``cuStreamEndCapture``
320318
made when a still-building :class:`~graph.GraphBuilder` is garbage collected
321319
is now reported as :class:`CUDAWarning`; both were silent.
322320

‎cuda_core/tests/memory_ipc/test_vmm_ipc.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ def _settled_open_fds():
108108

109109

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

114114

115115
def _forge(desc, **fields):

0 commit comments

Comments
 (0)