You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(pathfinder): remove library tables that the package never reads - #3610
supported_nvidia_libs.py defined 39 module-level names. This removes 20 that nothing in the package reads (139 -> 83 lines). #3613 removes the rest of the test-only data. Nothing is rewritten: the kept statements are unchanged and their values are identical.
Tests:
Tests that only compared a removed table with the catalog field it was derived from are removed.
Two tests stated real catalog rules through a removed table. They now read the catalog directly and check the same rule.
The two flag tables implied "a platform load flag needs that platform's filenames". That rule is now an explicit catalog test.
Risk: these are private names (cuda.pathfinder._dynamic_libs). No project on public GitHub imports them, but code outside public GitHub could.
Removed on purpose: names the 1.6.1 release notes mention.
The 1.6.1 notes say the unsuffixed SUPPORTED_LIBNAMES_WINDOWS* and SITE_PACKAGES_LIBDIRS_WINDOWS* names "remain x64 aliases for backward compatibility". This PR withdraws that. It removes the four aliases: SUPPORTED_LIBNAMES_WINDOWS, SITE_PACKAGES_LIBDIRS_WINDOWS, SITE_PACKAGES_LIBDIRS_WINDOWS_CTK and SITE_PACKAGES_LIBDIRS_WINDOWS_OTHER. It also removes the six SITE_PACKAGES_LIBDIRS_WINDOWS*_X64 and *_ARM64 tables those notes introduced. SUPPORTED_LIBNAMES_WINDOWS_X64 and SUPPORTED_LIBNAMES_WINDOWS_ARM64 stay.
Why: the names are in a private module and nothing in this repository reads them. A search of public GitHub finds no import of them outside copies of this package. Code outside public GitHub that imports one would get an ImportError.
Release note, to add once the next version's notes file exists: "Remove unused internal tables from cuda.pathfinder._dynamic_libs.supported_nvidia_libs, including the unsuffixed SUPPORTED_LIBNAMES_WINDOWS and SITE_PACKAGES_LIBDIRS_WINDOWS* aliases that the 1.6.1 notes said would remain."
For the reviewer:
test_supported_libnames_windows_site_packages_libdirs_ctk_consistency was rewritten to read the catalog, so its marker moved from human_reviewed to agent_authored.
Testing
Full cuda_pathfinder test suite at this commit: 1399 passed, 6 skipped (Linux, Python 3.14).
pre-commit clean, including mypy-pathfinder.
Not run on Windows. Windows rules are exercised by tests that simulate Windows on Linux.
PLC Local Security Evidence (Advisory)
Local advisory checks only, run over the whole stack. Not release-gate results.
Check
Status
Tool
Details
Secrets
SKIP
Pulse Secret Scanner
scanner image not available locally (registry login); the repo trufflehog pre-commit hook passed
SAST
WARN
Semgrep
1 finding, not from this stack: the existing subprocess.run call in the canary probe in load_nvidia_dynamic_lib.py
Dependencies
WARN
pip-audit / osv-scanner
no manifest or lockfile in scope, so the local scan could not run; this stack changes no dependencies
Reviewing files that changed from the base of the PR and between 678b653 and 5fde05e.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Changes
Removed legacy NVIDIA library metadata exports, including platform-specific filename, dependency, loader-requirement, and package-directory tables. Consumers relying on these exports may need to adjust; supported-library selection remains available.
Documentation
Updated package guidance to describe the catalog as the source of library information.
Tests
Updated consistency checks to validate library support against catalog-derived information.
The package removes legacy library projections from supported_nvidia_libs.py. Tests check descriptor requirements and derive platform library names from LIB_DESCRIPTORS.
The module removes legacy library-name sets, dependency maps, loader-flag lists, and site-package maps. The architecture description and module docstring describe package-read projections.
Align tests with descriptors cuda_pathfinder/tests/test_descriptor_catalog.py, cuda_pathfinder/tests/test_lib_descriptor.py, cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py
Catalog tests check descriptor filename and soname requirements. Tests remove comparisons with legacy tables and derive Linux and Windows site-package names from descriptors.
Possibly related PRs
NVIDIA/cuda-python#3613: Removes related test-only tables from supported_nvidia_libs.py and moves tests toward catalog data.
NVIDIA/cuda-python#3619: Derives loader flags from descriptor fields, which are also used by the catalog tests in this PR.
Suggested reviewers:cpcloud, isvoid
Change: Refactor
Merge Risk: Moderate · previous review 678b6
This refactor removes internal library tables and is meant to change no behavior. It also removes Windows alias names that the 1.6.1 release notes said would stay for backward compatibility. Only code that imports this private module directly would break. Before merging, either keep the aliases or withdraw the promise and add a release note.
Security architecture risk: Low · up to b5964
Code that still imports the documented Windows aliases can fail to start after upgrading. The package's own loader continues to use the same library-name and filename tables, so the risk is limited to consumers of the removed names.
Retained concerns
Low · architecture · observed: The PR removes SUPPORTED_LIBNAMES_WINDOWS and the unsuffixed SITE_PACKAGES_LIBDIRS_WINDOWS aliases that the 1.6.1 release notes retained for x64 compatibility. A downstream module that imports one of these names will fail at import time after upgrading.
Security review details
Security Blast Radius
inferred — The inspected change does not expand access to native-library loading: the loader still imports the same platform-filtered name set, and the subprocess still uses the same filename maps. The changed exposure is to callers of removed imports, not to a new loading path.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 4 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Major · Data Integrity & Integration · Quick win
important: Keep the documented Windows aliases or revise the 1.6.1 promise.
The 1.6.1 release notes state that the unsuffixed SUPPORTED_LIBNAMES_WINDOWS* and SITE_PACKAGES_LIBDIRS_WINDOWS* names "remain x64 aliases for backward compatibility." This change removes those names. An import of any of them from cuda.pathfinder._dynamic_libs.supported_nvidia_libs now fails with ImportError.
The impact is limited to code that imports this private module directly. No code in this repository imports the removed unsuffixed names, and the public cuda.pathfinder API is unchanged. The suffixed SUPPORTED_LIBNAMES_WINDOWS_X64 and SUPPORTED_LIBNAMES_WINDOWS_ARM64 names remain.
Before merging, choose one of the following:
Keep the unsuffixed names, so they resolve to their x64 values.
Withdraw the compatibility promise in the 1.6.1 release notes, and document the removal in the next version's notes.
The reason will be displayed to describe this comment to others. Learn more.
Taking the second option: this withdraws the 1.6.1 promise.
The removal is intended. The names live in a private module and nothing in this repository reads them. The PR description now says this up front and lists the four aliases removed.
The release-note line is drafted in the description. It goes into the notes file once the next version has one.
`supported_nvidia_libs.py` derived about 30 tables from the catalog. The
package reads five names from it. This removes the other 20 tables
(139 -> 83 lines). Nothing is rewritten: the kept statements are
unchanged and their values are identical.
Tests:
- Tests that only compared a removed table with the catalog field it
was derived from are removed.
- Two tests stated real catalog rules through a removed table. They now
read the catalog directly and check the same rule.
- The two flag tables implied "a platform load flag needs that
platform's filenames". That rule is now an explicit catalog test.
Risk: these are private names (`cuda.pathfinder._dynamic_libs`). No
project on public GitHub imports them, but code outside public GitHub
could.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Rob Parolin <rparolin@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
— codex on behalf of Ralf —
Description
Part 10 of 23 of a readability stack for
cuda.pathfinder(stack: #3623 → #3602 → #3603 → #3604 → #3605 → #3606 → #3607 → #3608 → #3609 → #3610 → #3611 → #3613 → #3618 → #3619 → #3620 → #3621 → #3622 → #3627 → #3628 → #3629 → #3630 → #3631 → #3632). No change to the public API or to what the package does. This PR removes private names on purpose, including four that the 1.6.1 release notes said would remain. Details below.supported_nvidia_libs.pydefined 39 module-level names. This removes 20 that nothing in the package reads (139 -> 83 lines). #3613 removes the rest of the test-only data. Nothing is rewritten: the kept statements are unchanged and their values are identical.Tests:
Risk: these are private names (
cuda.pathfinder._dynamic_libs). No project on public GitHub imports them, but code outside public GitHub could.Removed on purpose: names the 1.6.1 release notes mention.
The 1.6.1 notes say the unsuffixed
SUPPORTED_LIBNAMES_WINDOWS*andSITE_PACKAGES_LIBDIRS_WINDOWS*names "remain x64 aliases for backward compatibility". This PR withdraws that. It removes the four aliases:SUPPORTED_LIBNAMES_WINDOWS,SITE_PACKAGES_LIBDIRS_WINDOWS,SITE_PACKAGES_LIBDIRS_WINDOWS_CTKandSITE_PACKAGES_LIBDIRS_WINDOWS_OTHER. It also removes the sixSITE_PACKAGES_LIBDIRS_WINDOWS*_X64and*_ARM64tables those notes introduced.SUPPORTED_LIBNAMES_WINDOWS_X64andSUPPORTED_LIBNAMES_WINDOWS_ARM64stay.Why: the names are in a private module and nothing in this repository reads them. A search of public GitHub finds no import of them outside copies of this package. Code outside public GitHub that imports one would get an
ImportError.Release note, to add once the next version's notes file exists: "Remove unused internal tables from
cuda.pathfinder._dynamic_libs.supported_nvidia_libs, including the unsuffixedSUPPORTED_LIBNAMES_WINDOWSandSITE_PACKAGES_LIBDIRS_WINDOWS*aliases that the 1.6.1 notes said would remain."For the reviewer:
test_supported_libnames_windows_site_packages_libdirs_ctk_consistencywas rewritten to read the catalog, so its marker moved fromhuman_reviewedtoagent_authored.Testing
cuda_pathfindertest suite at this commit: 1399 passed, 6 skipped (Linux, Python 3.14).mypy-pathfinder.PLC Local Security Evidence (Advisory)
Local advisory checks only, run over the whole stack. Not release-gate results.
subprocess.runcall in the canary probe inload_nvidia_dynamic_lib.pyChecklist
🤖 Generated with Claude Code