fix(pika): use ObjectProxy for ReadyMessagesDequeProxy to restore iterability with wrapt 2.x#4461
Merged
Merged
Conversation
wrapt 2.x BaseObjectProxy does not proxy __iter__, breaking iteration over the wrapped deque. Switch to ObjectProxy which proxies all dunder methods including __iter__. Assisted-by: Claude Opus 4.6
Assisted-by: Claude Opus 4.6
4 tasks
xrmx
approved these changes
Apr 17, 2026
Contributor
|
@MikeGoldsmith could you please check what's wrong with precommit? |
Assisted-by: Claude Opus 4.6
herin049
approved these changes
Apr 19, 2026
xrmx
added a commit
that referenced
this pull request
Apr 24, 2026
…rability with wrapt 2.x (#4461) (#4485) * use ObjectProxy for pika ReadyMessagesDequeProxy to restore iterability wrapt 2.x BaseObjectProxy does not proxy __iter__, breaking iteration over the wrapped deque. Switch to ObjectProxy which proxies all dunder methods including __iter__. Assisted-by: Claude Opus 4.6 * update changelog with PR number Assisted-by: Claude Opus 4.6 * fix lint: import ordering and formatting Assisted-by: Claude Opus 4.6 Co-authored-by: Mike Goldsmith <[email protected]>
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
The wrapt 2.x migration (PR #4203) switched
ReadyMessagesDequeProxyfromObjectProxytoBaseObjectProxy. In wrapt 2.x,BaseObjectProxyno longer proxies__iter__(), which breaks iteration over the wrappeddeque.This switches
ReadyMessagesDequeProxyto useObjectProxywhich proxies all dunder methods including__iter__, restoring full deque behavior through the proxy.ObjectProxyexists in both wrapt 1.x and 2.x so the compatibility shim is no longer needed.Contributes to #4462
Type of change
How Has This Been Tested?
test_deque_proxy_is_iterabletest that verifies iteration over the proxied dequeDoes This PR Require a Core Repo Change?
Checklist: