Avoid loading python-ecdsa when using the cryptography backend - #178
Conversation
bdraco
commented
Jul 22, 2020
The test failure is unrelated and documented here : #176 |
blag
commented
Jul 29, 2020
Thanks for this, I like it. I'm waiting on tlsfuzzer/python-ecdsa#205 to be merged, but in the meantime would you mind pinning |
blag
commented
Jul 29, 2020
I have another branch that I'm actively working on where I make the Travis tests a lot more straightforward, so this should hopefully not be an issue for very much longer, but for now the Travis configuration hands off to tox to run the actual tests. And tox "installs the current package", which seems to mean that it runs the equivalent of |
Codecov Report
@@ Coverage Diff @@## master #178 +/- ##
==========================================
- Coverage 97.18% 90.87% -6.32%
==========================================
Files 14 14 Lines 1067 1063 -4 ==========================================
- Hits 1037 966 -71 - Misses 30 97 +67
Continue to review full report at Codecov.
|
bdraco
commented
Jul 29, 2020
@blag I'm not sure what is going on with |
blag
commented
Jul 29, 2020
No worries, codecov gets confused sometimes. This looks good. Thank you for fixing the tests and dependency! |
bdraco
commented
Jul 29, 2020
Thanks @blag. Can we get a version bump so we can get this in Home Assistant release 0.114? |
blag
commented
Jul 29, 2020
Wow, you all really seem to take "release early, release often" as "release right now, release constantly". 😜 I'll bump the version and publish it to PyPI. Thank you all for Home Assistant! |
blag
commented
Jul 30, 2020
@bdraco Version 3.2.0 is now available on PyPI and GitHub. 😄 |
bdraco
commented
Jul 30, 2020
Thank you 🍾 |
In #117 dependency on
ecdsacryptography backend was removed, however it is still loaded even when not used. Sinceecdsahas a load time performance penalty whengmpy2is not installed, this can be a bit painful on embedded systems.We can avoid all this overhead and check to see if the key object hasattr
to_peminstead since we onlycare of these if
ecdsahas already been loaded by something else.