Skip to content

Commit 65f5dcd

Browse files
committed
fix: ignore specific warnings in StridedMemoryView.from_* APIs
1 parent d3a4a98 commit 65f5dcd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cuda_core/cuda/core/_memoryview.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ cdef class StridedMemoryView:
139139
def from_dlpack(cls, obj: object, stream_ptr: int | None=None) -> StridedMemoryView:
140140
cdef StridedMemoryView buf
141141
with warnings.catch_warnings():
142-
warnings.simplefilter("ignore")
142+
warnings.simplefilter("ignore", DeprecationWarning)
143143
buf = cls()
144144
view_as_dlpack(obj, stream_ptr, buf)
145145
return buf
@@ -148,7 +148,7 @@ cdef class StridedMemoryView:
148148
def from_cuda_array_interface(cls, obj: object, stream_ptr: int | None=None) -> StridedMemoryView:
149149
cdef StridedMemoryView buf
150150
with warnings.catch_warnings():
151-
warnings.simplefilter("ignore")
151+
warnings.simplefilter("ignore", DeprecationWarning)
152152
buf = cls()
153153
view_as_cai(obj, stream_ptr, buf)
154154
return buf
@@ -157,7 +157,7 @@ cdef class StridedMemoryView:
157157
def from_array_interface(cls, obj: object) -> StridedMemoryView:
158158
cdef StridedMemoryView buf
159159
with warnings.catch_warnings():
160-
warnings.simplefilter("ignore")
160+
warnings.simplefilter("ignore", DeprecationWarning)
161161
buf = cls()
162162
view_as_array_interface(obj, buf)
163163
return buf

0 commit comments

Comments
 (0)