diff --git a/cuda_core/cuda/core/_stream.pyx b/cuda_core/cuda/core/_stream.pyx index 4f40cdb9eda..6397b079ca8 100644 --- a/cuda_core/cuda/core/_stream.pyx +++ b/cuda_core/cuda/core/_stream.pyx @@ -618,7 +618,7 @@ cpdef Stream Stream_accept(arg, bint allow_stream_protocol=False): warnings.warn( "Passing foreign stream objects to this function via the " "stream protocol is deprecated. Convert the object explicitly " - "using Stream(obj) instead.", + "using device.create_stream(obj) instead.", stacklevel=2, category=DeprecationWarning, ) diff --git a/cuda_core/tests/test_launcher.py b/cuda_core/tests/test_launcher.py index c01bf9103f1..fc8bc837f40 100644 --- a/cuda_core/tests/test_launcher.py +++ b/cuda_core/tests/test_launcher.py @@ -528,7 +528,7 @@ def test_launch_invalid_values(init_cuda): msg = ( r"Passing foreign stream objects to this function via the stream " r"protocol is deprecated\. Convert the object explicitly using " - r"Stream\(obj\) instead\." + r"device\.create_stream\(obj\) instead\." ) with pytest.warns(DeprecationWarning, match=msg): launch(StreamWrapper(stream), config, ker)