Fix get_nested_resource_ptr to accept both str and bytes inputs#1665
Merged
rparolin merged 4 commits intoNVIDIA:mainfrom Feb 27, 2026
Merged
Fix get_nested_resource_ptr to accept both str and bytes inputs#1665rparolin merged 4 commits intoNVIDIA:mainfrom
rparolin merged 4 commits intoNVIDIA:mainfrom
Conversation
The char resource path in get_nested_resource_ptr previously only handled str inputs via a Cython <str?> cast, which would reject bytes objects. This updates the logic to explicitly handle str, bytes, and raise a clear TypeError for other types, enabling users to pass bytes-encoded options to APIs like nvjitlink and nvvm. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Collaborator
Author
|
/ok to test |
|
mdboom
requested changes
Feb 20, 2026
Collaborator
Author
|
/ok to test |
Andy-Jost
reviewed
Feb 24, 2026
Contributor
Andy-Jost
left a comment
There was a problem hiding this comment.
LGTM!
The only thing I see is a type(obj) == str check rather than isinstance, but I don't think that's that big issue.
Andy-Jost
approved these changes
Feb 24, 2026
github-actions bot
pushed a commit
that referenced
this pull request
Feb 27, 2026
Removed preview folders for the following PRs: - PR #1665
cpcloud
pushed a commit
to cpcloud/cuda-python
that referenced
this pull request
Mar 3, 2026
…IA#1665) * Fix get_nested_resource_ptr to accept both str and bytes inputs The char resource path in get_nested_resource_ptr previously only handled str inputs via a Cython <str?> cast, which would reject bytes objects. This updates the logic to explicitly handle str, bytes, and raise a clear TypeError for other types, enabling users to pass bytes-encoded options to APIs like nvjitlink and nvvm. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * format * Adding utf-8 as the byte encoding --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
cpcloud
pushed a commit
to cpcloud/cuda-python
that referenced
this pull request
Mar 3, 2026
…ts (NVIDIA#1665)" (NVIDIA#1697) This reverts commit 658bfb2.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
get_nested_resource_ptrinutils.pyxto accept bothstrandbytesinputs for char resources, instead of onlystrvia a Cython<str?>castTypeErrorwhen neitherstrnorbytesis providedCloses #1354
🤖 Generated with Claude Code