-
-
Notifications
You must be signed in to change notification settings - Fork 569
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 partial in enum for Python 3.13 #1993
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1993 +/- ##
=======================================
Coverage 82.26% 82.26%
=======================================
Files 197 197
Lines 19139 19144 +5
Branches 1050 1052 +2
=======================================
+ Hits 15744 15749 +5
Misses 3218 3218
Partials 177 177 ☔ View full report in Codecov by Sentry. |
607c2c3
to
a657a8d
Compare
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.
Thanks @cdce8p, looks rather straight-forward! As this is only affecting the cli tool, I'm ready to merge it even though I haven't been able to test it against a real device.
Before doing that, should the check be against >=3.13 instead of 3.11, though?
Not sure about that. It has been a while but AFAIR I first saw the DeprecationWarning in the Home Assistant test suite.
Enum.member is available since 3.11 and from what I've read on the cpython issue, it's the "correct" way to do it anyway. |
Fair enough, IIRC, this was just a hack to make the cli nicer to use, so if it doesn't work will need to revisit it (e.g., by converting away from the enum to simply use a dict for mapping). |
Fix Deprecation warning emitted by Python 3.13.1.
Ref: python/cpython#125316