Closed fundthmcalculus closed 2 years ago
Looks like a bug in Python because set_npn_protocols
method still exists and is documented in Python 3.10.2: SSLContext.set_npn_protocols. NotImplementedError
should be raised instead of AttributeError
.
Instead of catching AttributeError
(and NotImplementedError
), which looks not very specific to me, I propose to check ssl.HAS_NPN constant and to call set_npn_protocols
only if ssl.HAS_NPN == True
.
That would be a better solution, since this is a bug in Python. Let me make those changes.
@vmagamedov updated with your requested change.
Thanks! Will make a release candidate shortly.
closes #150 @vmagamedov this fix allows
grpclib
to run on Python 3.10, by trapping the additional attribute error due tonpn
protocol being removed. Getting this integrated into the next RC would be ideal.