On 2021-01-05 12:53:10 +0100, Thomas Goirand wrote: > On 12/30/20 11:21 AM, Sebastian Ramacher wrote: > > Hi Thomas > > > > FYI: you need to CC the submitter otherwise I don't see the mail. > > > > On 2020-11-22 12:41:29 +0100, Thomas Goirand wrote: > >> Hi Sebastian, > >> > >> Thanks for your bug report, and sorry it took that long to address. > >> > >> In many of the OpenStack team packages, I was able to simply remove > >> python3-crypto, and it built fine. But in that one, when I remove it, or > >> replace it by python3-pycryptodome (as you suggested), the package fails > >> to build. So I don't think python3-pycryptodome is a "drop-in" > >> replacement as you wrote. > >> > >> Any suggestion for that particular package? > > > > Any concrete error message? In some cases you might need to adopt > > setup.py (change crypto in install_requires to the corresponding name > > from python3-pycryptodome) or slightly adopt the imports. > > > > Cheers > > Hi Sebastian, > > Here is the dump of unit testing that fails if I switch to cryptodome. > Any hint?
The attached patch should be enough. Cheers -- Sebastian Ramacher
--- python-oauth2client-4.1.2.orig/oauth2client/_pycrypto_crypt.py +++ python-oauth2client-4.1.2/oauth2client/_pycrypto_crypt.py @@ -13,10 +13,10 @@ # limitations under the License. """pyCrypto Crypto-related routines for oauth2client.""" -from Crypto.Hash import SHA256 -from Crypto.PublicKey import RSA -from Crypto.Signature import PKCS1_v1_5 -from Crypto.Util.asn1 import DerSequence +from Cryptodome.Hash import SHA256 +from Cryptodome.PublicKey import RSA +from Cryptodome.Signature import PKCS1_v1_5 +from Cryptodome.Util.asn1 import DerSequence from oauth2client import _helpers
signature.asc
Description: PGP signature