Fix ZNPCoordinator.request() rejecting new zigpy kwargs#272
Merged
TheJulianJES merged 1 commit intoMay 30, 2026
Merged
Conversation
zigpy 1.5.0 (#1824) moved request retries into Device.request and ZDO.request now forwards retries/retry_delay. ZNPCoordinator.request hardcoded its kwargs and didn't accept them, raising "TypeError: ZNPCoordinator.request() got an unexpected keyword argument 'retries'" during coordinator initialization. Use *args/**kwargs passthrough so future signature additions don't break the override, keeping only the longer default timeout. Fixes zigpy/zigpy#1828
There was a problem hiding this comment.
Pull request overview
Forwards arbitrary args/kwargs through ZNPCoordinator.request() so newly-added zigpy parameters (e.g. retries, retry_delay introduced in zigpy 1.5.0) don't raise TypeError. The override now only customizes the default timeout.
Changes:
- Replace hardcoded parameter list with
*args, **kwargspassthrough - Remove now-unused
zigpy.typesimport - Fix docstring reference (
Device:request→Device.request)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merged
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.
zigpy 1.5.0 (zigpy/zigpy#1824) moved request retries into
Device.request, andZDO.requestnow forwardsretries/retry_delay.ZNPCoordinator.requesthardcoded its kwargs and didn't accept them, raising"TypeError: ZNPCoordinator.request() got an unexpected keyword argument 'retries'"during coordinator initialization.Use
*args/**kwargspassthrough so future signature additions don't break the override, keeping only the longer default timeout.Fixes zigpy/zigpy#1828. Requires #274 and #273 for tests to pass.