-
-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes for the API change of construct v2.9.30 #220
Fixes for the API change of construct v2.9.30 #220
Conversation
construct==2.9.30 pinned.
@rytilahti If you ACK this PR I will prepare a bugfix release as soon as possible. |
miio/chuangmi_ir.py
Outdated
@@ -130,10 +130,10 @@ def play(self, command: str): | |||
|
|||
|
|||
class ProntoPulseAdapter(Adapter): | |||
def _decode(self, obj, context): | |||
def _decode(self, obj, context, path): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the code doesn't use the new path arg, wouldn't it be better to add here (and in other methods) *args, **kwargs
to just ignore any extra arguments? It would make it backward compatible with earlier Construct versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice approach! I updated the PR.
Ok, let's merge this and get a new release out. I'll start looking into Kaitai to see if we can replace construct for good, it is getting out of control if our simple protocol handling gets broken this often. |
See #222 . I will help you with getting miio uptodate with construct. |
Using *args **kwargs is not recommended, because if those methods change in the future, it might fail in some silent way. You should undo the 2nd commit. |
Pinning (construct==2.9.30) must be the consequence for the present. As long as construct hasn't a stable api no pinning will be brinkmanship. 😡
Fixes #217.