-
Notifications
You must be signed in to change notification settings - Fork 89
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
Fix Python 3.12.3 regression with enums #616
Conversation
Looks like there was a pretty big bug with the old types: (Pdb) t.uint16_t.deserialize(b'\x06')
(6, b'') This should not have deserialized. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #616 +/- ##
==========================================
- Coverage 99.68% 99.67% -0.01%
==========================================
Files 74 74
Lines 5014 4874 -140
==========================================
- Hits 4998 4858 -140
Misses 16 16 ☔ View full report in Codecov by Sentry. |
It looks like the integer parsing problem is pretty widespread. This branch runs for me on EZSP v13 but it needs to be runtime tested on all previous protocols too... |
Tested with protocol versions 4, 8, and 13. I think this is fine to merge. |
Python 3.12.3 recently released and (again) changed the behavior of the
enum
module: python/cpython#116040Zigpy isn't affected so I've replaced all bellows types with zigpy types to hopefully avoid these issues in the future.