@keyObject.setter @deprecated(Version('Twisted', 16, 0, 0)) def keyObject(self, value): # Lazy import to have PyCrypto as a soft dependency. from Crypto.PublicKey import DSA, RSA It's a deprecated API so I'm not sure how to proceed -- possibly we could just add the dep to packages using this API.