chore: get rid of outdated pycryptodome ugly patch

This patch is no longer required now that the fix has been merged upstream, in
3.10.3: https://github.com/Legrandin/pycryptodome/issues/506
This commit is contained in:
Régis Behmo 2021-10-25 20:18:07 +02:00
parent a095a6fbc7
commit 78117d16f2
4 changed files with 50 additions and 107 deletions

View File

@ -1,28 +1,26 @@
#
# This file is autogenerated by pip-compile with python 3.7
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile requirements/base.in
#
appdirs==1.4.4
# via -r requirements/base.in
cachetools==4.2.2
cachetools==4.2.4
# via google-auth
certifi==2021.5.30
certifi==2021.10.8
# via
# kubernetes
# requests
charset-normalizer==2.0.6
charset-normalizer==2.0.7
# via requests
click==8.0.1
click==8.0.3
# via -r requirements/base.in
google-auth==2.1.0
google-auth==2.3.1
# via kubernetes
idna==3.2
idna==3.3
# via requests
importlib-metadata==4.8.1
# via click
jinja2==3.0.1
jinja2==3.0.2
# via -r requirements/base.in
kubernetes==18.20.0
# via -r requirements/base.in
@ -40,11 +38,11 @@ pyasn1==0.4.8
# rsa
pyasn1-modules==0.2.8
# via google-auth
pycryptodome==3.10.1
pycryptodome==3.11.0
# via -r requirements/base.in
python-dateutil==2.8.2
# via kubernetes
pyyaml==5.4.1
pyyaml==6.0
# via
# -r requirements/base.in
# kubernetes
@ -58,24 +56,19 @@ rsa==4.7.2
# via google-auth
six==1.16.0
# via
# google-auth
# kubernetes
# python-dateutil
toml==0.10.2
# via mypy
typed-ast==1.4.3
# via mypy
typing-extensions==3.10.0.2
# via
# importlib-metadata
# mypy
# via mypy
urllib3==1.26.7
# via
# kubernetes
# requests
websocket-client==1.2.1
# via kubernetes
zipp==3.6.0
# via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
# setuptools

View File

@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.7
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile requirements/dev.in
@ -8,53 +8,49 @@ altgraph==0.17.2
# via pyinstaller
appdirs==1.4.4
# via -r requirements/base.txt
astroid==2.8.0
astroid==2.8.3
# via pylint
black==21.9b0
# via -r requirements/dev.in
bleach==4.1.0
# via readme-renderer
cachetools==4.2.2
cachetools==4.2.4
# via
# -r requirements/base.txt
# google-auth
certifi==2021.5.30
certifi==2021.10.8
# via
# -r requirements/base.txt
# kubernetes
# requests
cffi==1.14.6
cffi==1.15.0
# via cryptography
charset-normalizer==2.0.6
charset-normalizer==2.0.7
# via
# -r requirements/base.txt
# requests
click==8.0.1
click==8.0.3
# via
# -r requirements/base.txt
# black
# pip-tools
colorama==0.4.4
# via twine
cryptography==3.4.8
cryptography==35.0.0
# via secretstorage
docutils==0.17.1
# via readme-renderer
google-auth==2.1.0
google-auth==2.3.1
# via
# -r requirements/base.txt
# kubernetes
idna==3.2
idna==3.3
# via
# -r requirements/base.txt
# requests
importlib-metadata==4.8.1
# via
# -r requirements/base.txt
# click
# keyring
# pep517
# pyinstaller
# twine
isort==5.9.3
# via pylint
@ -62,7 +58,7 @@ jeepney==0.7.1
# via
# keyring
# secretstorage
jinja2==3.0.1
jinja2==3.0.2
# via -r requirements/base.txt
keyring==23.2.1
# via twine
@ -91,13 +87,13 @@ packaging==21.0
# via bleach
pathspec==0.9.0
# via black
pep517==0.11.0
pep517==0.12.0
# via pip-tools
pip-tools==6.3.0
pip-tools==6.4.0
# via -r requirements/dev.in
pkginfo==1.7.1
# via twine
platformdirs==2.3.0
platformdirs==2.4.0
# via
# black
# pylint
@ -112,7 +108,7 @@ pyasn1-modules==0.2.8
# google-auth
pycparser==2.20
# via cffi
pycryptodome==3.10.1
pycryptodome==3.11.0
# via -r requirements/base.txt
pygments==2.10.0
# via readme-renderer
@ -122,19 +118,19 @@ pyinstaller-hooks-contrib==2021.3
# via pyinstaller
pylint==2.11.1
# via -r requirements/dev.in
pyparsing==2.4.7
pyparsing==3.0.1
# via packaging
python-dateutil==2.8.2
# via
# -r requirements/base.txt
# kubernetes
pyyaml==5.4.1
pyyaml==6.0
# via
# -r requirements/base.txt
# kubernetes
readme-renderer==29.0
readme-renderer==30.0
# via twine
regex==2021.8.28
regex==2021.10.23
# via black
requests==2.26.0
# via
@ -161,15 +157,15 @@ six==1.16.0
# via
# -r requirements/base.txt
# bleach
# google-auth
# kubernetes
# python-dateutil
# readme-renderer
toml==0.10.2
# via
# -r requirements/base.txt
# mypy
# pylint
tomli==1.2.1
tomli==1.2.2
# via
# black
# pep517
@ -177,22 +173,15 @@ tqdm==4.62.3
# via twine
twine==3.4.2
# via -r requirements/dev.in
typed-ast==1.4.3
# via
# -r requirements/base.txt
# astroid
# black
# mypy
types-pyyaml==5.4.10
types-pyyaml==6.0.0
# via -r requirements/dev.in
types-setuptools==57.4.0
types-setuptools==57.4.2
# via -r requirements/dev.in
typing-extensions==3.10.0.2
# via
# -r requirements/base.txt
# astroid
# black
# importlib-metadata
# mypy
# pylint
urllib3==1.26.7
@ -208,13 +197,10 @@ websocket-client==1.2.1
# kubernetes
wheel==0.37.0
# via pip-tools
wrapt==1.12.1
wrapt==1.13.2
# via astroid
zipp==3.6.0
# via
# -r requirements/base.txt
# importlib-metadata
# pep517
# via importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
# pip

View File

@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.7
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile requirements/docs.in
@ -10,20 +10,20 @@ appdirs==1.4.4
# via -r requirements/base.txt
babel==2.9.1
# via sphinx
cachetools==4.2.2
cachetools==4.2.4
# via
# -r requirements/base.txt
# google-auth
certifi==2021.5.30
certifi==2021.10.8
# via
# -r requirements/base.txt
# kubernetes
# requests
charset-normalizer==2.0.6
charset-normalizer==2.0.7
# via
# -r requirements/base.txt
# requests
click==8.0.1
click==8.0.3
# via
# -r requirements/base.txt
# sphinx-click
@ -32,21 +32,17 @@ docutils==0.17.1
# sphinx
# sphinx-click
# sphinx-rtd-theme
google-auth==2.1.0
google-auth==2.3.1
# via
# -r requirements/base.txt
# kubernetes
idna==3.2
idna==3.3
# via
# -r requirements/base.txt
# requests
imagesize==1.2.0
# via sphinx
importlib-metadata==4.8.1
# via
# -r requirements/base.txt
# click
jinja2==3.0.1
jinja2==3.0.2
# via
# -r requirements/base.txt
# sphinx
@ -77,19 +73,19 @@ pyasn1-modules==0.2.8
# via
# -r requirements/base.txt
# google-auth
pycryptodome==3.10.1
pycryptodome==3.11.0
# via -r requirements/base.txt
pygments==2.10.0
# via sphinx
pyparsing==2.4.7
pyparsing==3.0.1
# via packaging
python-dateutil==2.8.2
# via
# -r requirements/base.txt
# kubernetes
pytz==2021.1
pytz==2021.3
# via babel
pyyaml==5.4.1
pyyaml==6.0
# via
# -r requirements/base.txt
# kubernetes
@ -110,6 +106,7 @@ rsa==4.7.2
six==1.16.0
# via
# -r requirements/base.txt
# google-auth
# kubernetes
# python-dateutil
snowballstemmer==2.1.0
@ -139,14 +136,9 @@ toml==0.10.2
# via
# -r requirements/base.txt
# mypy
typed-ast==1.4.3
# via
# -r requirements/base.txt
# mypy
typing-extensions==3.10.0.2
# via
# -r requirements/base.txt
# importlib-metadata
# mypy
urllib3==1.26.7
# via
@ -157,10 +149,6 @@ websocket-client==1.2.1
# via
# -r requirements/base.txt
# kubernetes
zipp==3.6.0
# via
# -r requirements/base.txt
# importlib-metadata
# The following packages are considered to be unsafe in a requirements file:
# setuptools

View File

@ -11,30 +11,6 @@ from typing import List, Tuple
import click
# We monkey-patch the pycryptodome library to address a segmentation fault issue
# that affects a specific architecture
# We can get rid of this ugly patch when the following issue is resolved:
# https://github.com/Legrandin/pycryptodome/issues/506
# When running Mac OS ...
if sys.platform == "darwin":
import platform
# ... with ARM processor (M1)...
if platform.machine() == "arm64":
# ... if the GMP module is installed...
try:
import Crypto.Math._IntegerGMP
# ... monkey-patch the library to not use GMP
import Crypto.Math.Numbers
import Crypto.Math._IntegerNative
Crypto.Math.Numbers.Integer = Crypto.Math._IntegerNative.IntegerNative
Crypto.Math.Numbers._implementation = {}
except (ImportError, OSError, AttributeError):
pass
from Crypto.Protocol.KDF import bcrypt, bcrypt_check
from Crypto.PublicKey import RSA
from Crypto.PublicKey.RSA import RsaKey