Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch crypto requirements to pycryptodomex on all platforms #56625

Merged
merged 2 commits into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .ci/kitchen-centos7-py3-pycryptodome
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@Library('[email protected]') _

runTestSuite(
concurrent_builds: 1,
distro_name: 'centos',
distro_version: '7',
env: env,
golden_images_branch: 'master',
jenkins_slave_label: 'kitchen-slave',
nox_env_name: 'runtests-zeromq-pycryptodome',
nox_passthrough_opts: '--ssh-tests',
python_version: 'py3',
testrun_timeout: 6,
use_spot_instances: true)

// vim: ft=groovy
2 changes: 1 addition & 1 deletion .ci/kitchen-centos7-py3-pycryptodomex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runTestSuite(
env: env,
golden_images_branch: 'master',
jenkins_slave_label: 'kitchen-slave',
nox_env_name: 'runtests-zeromq-pycryptodomex',
nox_env_name: 'runtests-zeromq-pycryptodome',
nox_passthrough_opts: '--ssh-tests',
python_version: 'py3',
testrun_timeout: 6,
Expand Down
16 changes: 16 additions & 0 deletions .ci/kitchen-ubuntu1604-py3-pycryptodome
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@Library('[email protected]') _

runTestSuite(
concurrent_builds: 1,
distro_name: 'ubuntu',
distro_version: '1604',
env: env,
golden_images_branch: 'master',
jenkins_slave_label: 'kitchen-slave',
nox_env_name: 'runtests-zeromq-pycryptodome',
nox_passthrough_opts: '--ssh-tests',
python_version: 'py3',
testrun_timeout: 6,
use_spot_instances: true)

// vim: ft=groovy
2 changes: 1 addition & 1 deletion .ci/kitchen-ubuntu1604-py3-pycryptodomex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runTestSuite(
env: env,
golden_images_branch: 'master',
jenkins_slave_label: 'kitchen-slave',
nox_env_name: 'runtests-zeromq-pycryptodomex',
nox_env_name: 'runtests-zeromq-pycryptodome',
nox_passthrough_opts: '--ssh-tests',
python_version: 'py3',
testrun_timeout: 6,
Expand Down
96 changes: 46 additions & 50 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,24 +489,22 @@ def _runtests(session, coverage, cmd_args):
@nox.session(python=_PYTHON_VERSIONS, name="runtests-parametrized")
@nox.parametrize("coverage", [False, True])
@nox.parametrize("transport", ["zeromq", "tcp"])
@nox.parametrize("crypto", [None, "m2crypto", "pycryptodomex"])
@nox.parametrize("crypto", [None, "m2crypto", "pycryptodome"])
def runtests_parametrized(session, coverage, transport, crypto):
# Install requirements
_install_requirements(session, transport, "unittest-xml-reporting==2.5.2")

if crypto:
if crypto == "m2crypto":
session.run(
"pip",
"uninstall",
"-y",
"pycrypto",
"pycryptodome",
"pycryptodomex",
silent=True,
)
else:
session.run("pip", "uninstall", "-y", "m2crypto", silent=True)
session.run(
"pip",
"uninstall",
"-y",
"m2crypto",
"pycrypto",
"pycryptodome",
"pycryptodomex",
silent=True,
)
distro_constraints = _get_distro_pip_constraints(session, transport)
install_command = [
"--progress-bar=off",
Expand Down Expand Up @@ -601,40 +599,40 @@ def runtests_zeromq_m2crypto(session, coverage):
)


@nox.session(python=_PYTHON_VERSIONS, name="runtests-pycryptodomex")
@nox.session(python=_PYTHON_VERSIONS, name="runtests-pycryptodome")
@nox.parametrize("coverage", [False, True])
def runtests_pycryptodomex(session, coverage):
def runtests_pycryptodome(session, coverage):
"""
runtests.py session with zeromq transport and pycryptodomex
runtests.py session with zeromq transport and pycryptodome
"""
session.notify(
"runtests-parametrized-{}(coverage={}, crypto='pycryptodomex', transport='zeromq')".format(
"runtests-parametrized-{}(coverage={}, crypto='pycryptodome', transport='zeromq')".format(
session.python, coverage
)
)


@nox.session(python=_PYTHON_VERSIONS, name="runtests-tcp-pycryptodomex")
@nox.session(python=_PYTHON_VERSIONS, name="runtests-tcp-pycryptodome")
@nox.parametrize("coverage", [False, True])
def runtests_tcp_pycryptodomex(session, coverage):
def runtests_tcp_pycryptodome(session, coverage):
"""
runtests.py session with TCP transport and pycryptodomex
runtests.py session with TCP transport and pycryptodome
"""
session.notify(
"runtests-parametrized-{}(coverage={}, crypto='pycryptodomex', transport='tcp')".format(
"runtests-parametrized-{}(coverage={}, crypto='pycryptodome', transport='tcp')".format(
session.python, coverage
)
)


@nox.session(python=_PYTHON_VERSIONS, name="runtests-zeromq-pycryptodomex")
@nox.session(python=_PYTHON_VERSIONS, name="runtests-zeromq-pycryptodome")
@nox.parametrize("coverage", [False, True])
def runtests_zeromq_pycryptodomex(session, coverage):
def runtests_zeromq_pycryptodome(session, coverage):
"""
runtests.py session with zeromq transport and pycryptodomex
runtests.py session with zeromq transport and pycryptodome
"""
session.notify(
"runtests-parametrized-{}(coverage={}, crypto='pycryptodomex', transport='zeromq')".format(
"runtests-parametrized-{}(coverage={}, crypto='pycryptodome', transport='zeromq')".format(
session.python, coverage
)
)
Expand Down Expand Up @@ -675,24 +673,22 @@ def runtests_tornado(session, coverage):
@nox.session(python=_PYTHON_VERSIONS, name="pytest-parametrized")
@nox.parametrize("coverage", [False, True])
@nox.parametrize("transport", ["zeromq", "tcp"])
@nox.parametrize("crypto", [None, "m2crypto", "pycryptodomex"])
@nox.parametrize("crypto", [None, "m2crypto", "pycryptodome"])
def pytest_parametrized(session, coverage, transport, crypto):
# Install requirements
_install_requirements(session, transport)

if crypto:
if crypto == "m2crypto":
session.run(
"pip",
"uninstall",
"-y",
"pycrypto",
"pycryptodome",
"pycryptodomex",
silent=True,
)
else:
session.run("pip", "uninstall", "-y", "m2crypto", silent=True)
session.run(
"pip",
"uninstall",
"-y",
"m2crypto",
"pycrypto",
"pycryptodome",
"pycryptodomex",
silent=True,
)
distro_constraints = _get_distro_pip_constraints(session, transport)
install_command = [
"--progress-bar=off",
Expand Down Expand Up @@ -793,40 +789,40 @@ def pytest_zeromq_m2crypto(session, coverage):
)


@nox.session(python=_PYTHON_VERSIONS, name="pytest-pycryptodomex")
@nox.session(python=_PYTHON_VERSIONS, name="pytest-pycryptodome")
@nox.parametrize("coverage", [False, True])
def pytest_pycryptodomex(session, coverage):
def pytest_pycryptodome(session, coverage):
"""
pytest session with zeromq transport and pycryptodomex
pytest session with zeromq transport and pycryptodome
"""
session.notify(
"pytest-parametrized-{}(coverage={}, crypto='pycryptodomex', transport='zeromq')".format(
"pytest-parametrized-{}(coverage={}, crypto='pycryptodome', transport='zeromq')".format(
session.python, coverage
)
)


@nox.session(python=_PYTHON_VERSIONS, name="pytest-tcp-pycryptodomex")
@nox.session(python=_PYTHON_VERSIONS, name="pytest-tcp-pycryptodome")
@nox.parametrize("coverage", [False, True])
def pytest_tcp_pycryptodomex(session, coverage):
def pytest_tcp_pycryptodome(session, coverage):
"""
pytest session with TCP transport and pycryptodomex
pytest session with TCP transport and pycryptodome
"""
session.notify(
"pytest-parametrized-{}(coverage={}, crypto='pycryptodomex', transport='tcp')".format(
"pytest-parametrized-{}(coverage={}, crypto='pycryptodome', transport='tcp')".format(
session.python, coverage
)
)


@nox.session(python=_PYTHON_VERSIONS, name="pytest-zeromq-pycryptodomex")
@nox.session(python=_PYTHON_VERSIONS, name="pytest-zeromq-pycryptodome")
@nox.parametrize("coverage", [False, True])
def pytest_zeromq_pycryptodomex(session, coverage):
def pytest_zeromq_pycryptodome(session, coverage):
"""
pytest session with zeromq transport and pycryptodomex
pytest session with zeromq transport and pycryptodome
"""
session.notify(
"pytest-parametrized-{}(coverage={}, crypto='pycryptodomex', transport='zeromq')".format(
"pytest-parametrized-{}(coverage={}, crypto='pycryptodome', transport='zeromq')".format(
session.python, coverage
)
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/osx/req.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ msgpack-python==0.5.6
psutil==5.6.6
pyasn1==0.4.5
pycparser==2.19
pycryptodome==3.8.1
pycryptodomex==3.9.7
python-dateutil==2.8.0
python-gnupg==0.4.4
pyyaml==5.1.2
Expand Down
2 changes: 1 addition & 1 deletion pkg/smartos/esky/zeromq_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Need to set a specific version of pyzmq, so can't use the main project's requirements file... have to copy it in and modify...
#-r ../../../requirements/zeromq.txt
-r ../../../requirements/base.txt
pycrypto>=2.6.1
pycryptodomex==3.9.7
pyzmq
-r requirements.txt
4 changes: 2 additions & 2 deletions pkg/suse/salt.spec
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ BuildRequires: python-ioflo >= 1.1.7
BuildRequires: python-raet >= 0.6.0
%endif
# requirements/zeromq.txt
BuildRequires: python-pycrypto >= 2.6.1
BuildRequires: pycryptodomex >= 3.9.7
BuildRequires: python-pyzmq >= 2.2.0
%if %{with test}
# requirements/dev_python27.txt
Expand Down Expand Up @@ -121,7 +121,7 @@ Recommends: python-gnupg
# Recommends: salt-raet
# requirements/zeromq.txt
%endif
Requires: python-pycrypto >= 2.6.1
Requires: pycryptodomex >= 3.9.7
Requires: python-pyzmq >= 2.2.0
#
%if 0%{?suse_version}
Expand Down
2 changes: 1 addition & 1 deletion pkg/windows/req.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ msgpack-python==0.5.6
psutil==5.6.6
pyasn1==0.4.5
pycparser==2.19
pycryptodomex==3.8.1
pycryptodomex==3.9.7
pycurl==7.43.0.5
pymssql==2.1.4
PyMySQL==0.9.3
Expand Down
3 changes: 1 addition & 2 deletions requirements/crypto.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pycrypto>=2.6.1; sys.platform not in 'win32,darwin'
pycryptodomex; sys.platform == 'win32'
pycryptodomex>=3.9.7
2 changes: 1 addition & 1 deletion requirements/static/crypto.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m2crypto
pycryptodomex
pycryptodome
2 changes: 1 addition & 1 deletion requirements/static/py3.5/darwin-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# pip-compile -o requirements/static/py3.5/darwin-crypto.txt -v requirements/static/crypto.in
#
m2crypto==0.35.2
pycryptodomex==3.9.0
pycryptodome==3.9.7
3 changes: 2 additions & 1 deletion requirements/static/py3.5/darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ pyaml==19.4.1 # via moto
pyasn1-modules==0.2.4 # via google-auth
pyasn1==0.4.5
pycparser==2.19
pycryptodome==3.8.1
pycryptodome==3.8.1 # via python-jose
pycryptodomex==3.9.7
pynacl==1.3.0 # via paramiko
pyopenssl==19.0.0
pyparsing==2.4.5 # via packaging
Expand Down
2 changes: 1 addition & 1 deletion requirements/static/py3.5/linux-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# pip-compile -o requirements/static/py3.5/linux-crypto.txt -v requirements/static/crypto.in
#
m2crypto==0.35.2
pycryptodomex==3.9.3
pycryptodome==3.9.7
2 changes: 1 addition & 1 deletion requirements/static/py3.5/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ pyaml==19.4.1 # via moto
pyasn1-modules==0.2.4 # via google-auth
pyasn1==0.4.5 # via paramiko, pyasn1-modules, rsa
pycparser==2.19 # via cffi
pycrypto==2.6.1 ; sys_platform not in "win32,darwin"
pycryptodome==3.8.1 # via python-jose
pycryptodomex==3.9.7
pygit2==0.28.2
pyinotify==0.9.6
pynacl==1.3.0 # via paramiko
Expand Down
2 changes: 1 addition & 1 deletion requirements/static/py3.5/windows-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# pip-compile -o requirements/static/py3.5/windows-crypto.txt -v requirements/static/crypto.in
#
m2crypto==0.35.2
pycryptodomex==3.9.0
pycryptodome==3.9.7
2 changes: 1 addition & 1 deletion requirements/static/py3.5/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pyasn1-modules==0.2.4 # via google-auth
pyasn1==0.4.5
pycparser==2.19
pycryptodome==3.8.1 # via python-jose
pycryptodomex==3.8.1 ; sys_platform == "win32"
pycryptodomex==3.9.7
pycurl==7.43.0.5
pygit2==0.28.2
pymssql==2.1.4
Expand Down
2 changes: 1 addition & 1 deletion requirements/static/py3.6/darwin-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# pip-compile -o requirements/static/py3.6/darwin-crypto.txt -v requirements/static/crypto.in
#
m2crypto==0.35.2
pycryptodomex==3.9.0
pycryptodome==3.9.7
3 changes: 2 additions & 1 deletion requirements/static/py3.6/darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ pyaml==19.4.1 # via moto
pyasn1-modules==0.2.4 # via google-auth
pyasn1==0.4.5
pycparser==2.19
pycryptodome==3.8.1
pycryptodome==3.8.1 # via python-jose
pycryptodomex==3.9.7
pynacl==1.3.0 # via paramiko
pyopenssl==19.0.0
pyparsing==2.4.5 # via packaging
Expand Down
2 changes: 1 addition & 1 deletion requirements/static/py3.6/linux-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# pip-compile -o requirements/static/py3.6/linux-crypto.txt -v requirements/static/crypto.in
#
m2crypto==0.35.2
pycryptodomex==3.9.3
pycryptodome==3.9.7
2 changes: 1 addition & 1 deletion requirements/static/py3.6/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ pyaml==19.4.1 # via moto
pyasn1-modules==0.2.4 # via google-auth
pyasn1==0.4.5 # via paramiko, pyasn1-modules, rsa
pycparser==2.19 # via cffi
pycrypto==2.6.1 ; sys_platform not in "win32,darwin"
pycryptodome==3.8.1 # via python-jose
pycryptodomex==3.9.7
pygit2==0.28.2
pyinotify==0.9.6
pynacl==1.3.0 # via paramiko
Expand Down
2 changes: 1 addition & 1 deletion requirements/static/py3.6/windows-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# pip-compile -o requirements/static/py3.6/windows-crypto.txt -v requirements/static/crypto.in
#
m2crypto==0.35.2
pycryptodomex==3.9.0
pycryptodome==3.9.7
2 changes: 1 addition & 1 deletion requirements/static/py3.6/windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pyasn1-modules==0.2.4 # via google-auth
pyasn1==0.4.5
pycparser==2.19
pycryptodome==3.8.1 # via python-jose
pycryptodomex==3.8.1 ; sys_platform == "win32"
pycryptodomex==3.9.7
pycurl==7.43.0.5
pygit2==0.28.2
pymssql==2.1.4
Expand Down
2 changes: 1 addition & 1 deletion requirements/static/py3.7/darwin-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# pip-compile -o requirements/static/py3.7/darwin-crypto.txt -v requirements/static/crypto.in
#
m2crypto==0.35.2
pycryptodomex==3.9.0
pycryptodome==3.9.7
3 changes: 2 additions & 1 deletion requirements/static/py3.7/darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ pyaml==19.4.1 # via moto
pyasn1-modules==0.2.4 # via google-auth
pyasn1==0.4.5
pycparser==2.19
pycryptodome==3.8.1
pycryptodome==3.8.1 # via python-jose
pycryptodomex==3.9.7
pynacl==1.3.0 # via paramiko
pyopenssl==19.0.0
pyparsing==2.4.5 # via packaging
Expand Down
2 changes: 1 addition & 1 deletion requirements/static/py3.7/linux-crypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# pip-compile -o requirements/static/py3.7/linux-crypto.txt -v requirements/static/crypto.in
#
m2crypto==0.35.2
pycryptodomex==3.9.3
pycryptodome==3.9.7
Loading