Fixes for the API change of construct v2.9.30#220
Fixes for the API change of construct v2.9.30#220rytilahti merged 3 commits intorytilahti:masterfrom
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
|
|
||
| class ProntoPulseAdapter(Adapter): | ||
| def _decode(self, obj, context): | ||
| def _decode(self, obj, context, path): |
There was a problem hiding this comment.
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.
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.