Skip to content

Remove deprecated rmm.pylibrmm.cuda_stream module#2335

Merged
bdice merged 3 commits intorapidsai:mainfrom
bdice:remove-deprecated-cuda-stream-module
Mar 31, 2026
Merged

Remove deprecated rmm.pylibrmm.cuda_stream module#2335
bdice merged 3 commits intorapidsai:mainfrom
bdice:remove-deprecated-cuda-stream-module

Conversation

@bdice
Copy link
Copy Markdown
Collaborator

@bdice bdice commented Mar 25, 2026

Summary

  • Remove the deprecated rmm.pylibrmm.cuda_stream backwards-compatibility shim module (.pyx, .pxd, .pyi)
  • Remove the associated deprecation test (test_cuda_stream_module_deprecation)
  • Remove cuda_stream.pyx from the Cython build sources in CMakeLists.txt

The module was deprecated in #2256 (closing #1782) when stream objects were moved to rmm.pylibrmm.stream. Users should use rmm.pylibrmm.stream.Stream and rmm.pylibrmm.stream.CudaStreamFlags instead.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

The rmm.pylibrmm.cuda_stream module was deprecated in PR rapidsai#2256 (closing
rapidsai#1782) when stream objects were moved to rmm.pylibrmm.stream. The
module was left as a backwards-compatibility shim re-exporting
CudaStream and CudaStreamFlags. Remove the shim module files (.pyx,
.pxd, .pyi), the associated deprecation test, and the CMake build
entry.
@bdice bdice requested review from a team as code owners March 25, 2026 15:19
@bdice bdice requested a review from harrism March 25, 2026 15:19
@bdice bdice added breaking Breaking change improvement Improvement / enhancement to an existing function labels Mar 25, 2026
@bdice bdice self-assigned this Mar 25, 2026
@bdice bdice moved this to In Progress in RMM Project Board Mar 25, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e0dbf59d-36f0-42d1-bbae-03aba4638a0e

📥 Commits

Reviewing files that changed from the base of the PR and between 5e7034b and 8124760.

📒 Files selected for processing (1)
  • docs/python/pylibrmm.md
💤 Files with no reviewable changes (1)
  • docs/python/pylibrmm.md

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Removed the cuda_stream module and associated CudaStream and CudaStreamFlags type definitions.
    • Removed related test coverage.
    • Updated copyright year to 2026.

Walkthrough

This PR removes the deprecated cuda_stream compatibility module and its type stubs, updates the CMake cython sources to omit cuda_stream.pyx and reorders remaining sources, removes the deprecation-focused test, and updates the SPDX copyright year to 2026.

Changes

Cohort / File(s) Summary
Build configuration
python/rmm/rmm/pylibrmm/CMakeLists.txt
Removed cuda_stream.pyx from the cython_sources list, reordered remaining .pyx entries, and updated SPDX copyright year to 2026.
Deprecated compatibility module
python/rmm/rmm/pylibrmm/cuda_stream.pyx, python/rmm/rmm/pylibrmm/cuda_stream.pxd, python/rmm/rmm/pylibrmm/cuda_stream.pyi
Deleted the deprecated shim that re-exported CudaStream/CudaStreamFlags (and its import-time deprecation warning); removed related pxd and pyi declarations.
Tests
python/rmm/rmm/tests/test_stream.py
Removed test_cuda_stream_module_deprecation which asserted the import emitted a DeprecationWarning.
Docs
docs/python/pylibrmm.md
Removed Sphinx automodule:: rmm.pylibrmm.cuda_stream block from CUDA Stream documentation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

3 - Ready for review

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove deprecated rmm.pylibrmm.cuda_stream module' directly and clearly summarizes the main change: removing the deprecated cuda_stream module and related components.
Description check ✅ Passed The description clearly explains the removal of the deprecated cuda_stream module, associated test, and CMakeLists.txt update, providing context about the prior deprecation and migration guidance for users.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@TomAugspurger
Copy link
Copy Markdown
Contributor

Docs failure:

WARNING: autodoc: failed to import module 'cuda_stream' from module 'rmm.pylibrmm'; the following exception was raised:

['Traceback (most recent call last):\n', '  File "/opt/conda/envs/docs/lib/python3.14/site-packages/sphinx/ext/autodoc/importer.py", line 269, in import_object\n    module = import_module(modname, try_reload=True)\n', '  File "/opt/conda/envs/docs/lib/python3.14/site-packages/sphinx/ext/autodoc/importer.py", line 172, in import_module\n    raise ModuleNotFoundError(msg, name=modname)  # NoQA: TRY301\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', "ModuleNotFoundError: No module named 'rmm.pylibrmm.cuda_stream'\n"] [autodoc.import_object]

I think this section can be removed:

### rmm.pylibrmm.cuda_stream
```{eval-rst}
.. automodule:: rmm.pylibrmm.cuda_stream
:members:
:undoc-members:
:show-inheritance:
```

Copy link
Copy Markdown
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the docs section is removed.

@bdice bdice merged commit 68ec86f into rapidsai:main Mar 31, 2026
77 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in RMM Project Board Mar 31, 2026
@bdice bdice mentioned this pull request Mar 31, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change improvement Improvement / enhancement to an existing function

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants