Repository navigation
Fix Python collection reference comparisons - #218
Merged
Merged
Conversation
Compare native collection references by guarded canonical COM identity across projected and raw views, preserving ordinary Python value equality and native error propagation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed3ecfbc-fdc5-473b-aa81-2a6721f7b7b6
Mixed-language test coverageWorkflow status: ✅ Passed
|
Keep all mapping entries during canonical key normalization and require one-to-one matches, preventing distinct Python alias keys from collapsing into a falsely equal mapping. Cover both operand directions, mutable/read-only native maps, and same/different alias values. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed3ecfbc-fdc5-473b-aa81-2a6721f7b7b6
Keep the Uri dependency golden aligned with the concrete sequence containment declaration, including WwwFormUrlDecoder's class, protocol, and embedded read-only view. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed3ecfbc-fdc5-473b-aa81-2a6721f7b7b6
Shawn Yuan (shuaiyuanxx)
approved these changes
Oct 10, 2026
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.
Python collection protocols compared projection objects rather than native reference identity: a
JsonValueappended toJsonArraycould not be found or removed through its class/raw view, and Object-valued maps could compare unequal to themselves.Use one collection-only comparison helper backed by guarded canonical COM identity for sequence containment/search/count/removal, mapping equality, and value/item-view membership, including
object_value_view(). Preserve ordinary Python value equality, ranged/first-match behavior, explicit native errors, raw Object conversion policy, and lifetime/thread checks. Concrete generated collection declarations describe these comparisons without widening read types or nullability.Regression coverage exercises real generated mutable/read-only JSON and Object maps, class/interface/raw aliases, nulls, duplicates, boxed versus converted values, equal-content but distinct native identities, and released/non-agile/agile references. Global wrapper equality/hashing, ABI and collection-producer support, and bulk/default helpers remain unchanged.