fix(cuda.core): preserve adjacency set semantics - #2893
Merged
mdboom merged 4 commits intoSep 18, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
mdboom
approved these changes
Sep 17, 2026
mdboom
self-requested a review
September 17, 2026 16:19
mdboom
requested changes
Sep 17, 2026
mdboom
left a comment
Contributor
There was a problem hiding this comment.
Just came back to say: This needs a release note mention (since it's technically a behavioral change). I think it's one we can live with, but we still need to note it.
Other than that, I still think this is good-to-go.
…rd-annotation-typing # Conflicts: # cuda_core/docs/source/release/1.3.0-notes.rst
Contributor
Author
|
Thanks @mdboom. I've added a release note for this change. |
Contributor
|
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.
Description
This is found when adding coverage test cases.
AdjacencySetProxy.discard()is intended to followMutableSetsemantics and silently ignore values that are not present.Because
GraphNodeis a Cython extension type, Cython interprets thevalue: GraphNodeannotation as a runtime argument check. Non-GraphNodevalues therefore raiseTypeErrorbefore the method body can reach its membership check.This change disables Cython annotation typing for
discard()only. The annotation remains available to static tooling and generated stubs, while runtime values can reach the existingvalue not in selfcheck and return without modifying the graph.add()remains unchanged and continues to reject non-GraphNodevalues withTypeError.A regression test verifies that discarding
strandintvalues is a no-op and preserves the existing adjacency set.Checklist