|
e._reason is an enum from cryptography.exceptions._Reasons so "is"
should be the correct comparison, but it doesn't always work. This is
apparently triggered by _Reasons moving to the part of cryptography
that is implemented in rust, which doesn't yet implement enums as
singletons.
https://github.com/pyca/cryptography/issues/11332
https://github.com/PyO3/pyo3/issues/3059
|