File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff line change @@ -71,7 +71,6 @@ namespace {
7171bool
7272add_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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ def _settled_open_fds():
108108
109109
110110def _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
115115def _forge (desc , ** fields ):
You can’t perform that action at this time.
0 commit comments