From: Sebastian Wagner Date: Tue, 15 Jun 2021 10:10:36 +0000 (+0200) Subject: global,tox.ini: add mypy-constrains.txt X-Git-Tag: v17.1.0~1632^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F41859%2Fhead;p=ceph.git global,tox.ini: add mypy-constrains.txt let's avoid getting new versions of those packages by accident. Unfortunately this means we have to manually update those packages regurarly. Signed-off-by: Sebastian Wagner --- diff --git a/qa/tox.ini b/qa/tox.ini index f8573a403265..083f5c3bf563 100644 --- a/qa/tox.ini +++ b/qa/tox.ini @@ -11,7 +11,7 @@ commands=flake8 --select=F,E9 --exclude=venv,.tox [testenv:mypy] basepython = python3 deps = - mypy==0.901 + mypy types-boto types-requests types-jwt @@ -19,6 +19,7 @@ deps = types-PyYAML types-cryptography types-python-dateutil + -c{toxinidir}/../src/mypy-constrains.txt commands = mypy {posargs:.} [testenv:import-tasks] diff --git a/src/cephadm/tox.ini b/src/cephadm/tox.ini index 8c9422ac4618..c4c45365a907 100644 --- a/src/cephadm/tox.ini +++ b/src/cephadm/tox.ini @@ -41,7 +41,9 @@ commands=pytest {posargs} [testenv:mypy] basepython = python3 -deps = mypy==0.901 +deps = + mypy + -c{toxinidir}/../mypy-constrains.txt commands = mypy --config-file ../mypy.ini {posargs:cephadm} [testenv:fix] diff --git a/src/mypy-constrains.txt b/src/mypy-constrains.txt new file mode 100644 index 000000000000..8851ed501b17 --- /dev/null +++ b/src/mypy-constrains.txt @@ -0,0 +1,19 @@ +# let's avoid getting new versions of those packages by accident. +# Unfortunately this means we have to manually update those +# packages regularly. + +mypy==0.901 + +# global +types-python-dateutil==0.1.3 +types-requests==0.1.11 +types-jwt==0.1.3 +types-PyYAML==5.4.0 + +# src/pybind +types-backports==0.1.2 + +# qa/ +types-boto==0.1.0 +types-cryptography==0.1.1 +types-paramiko==0.1.3 diff --git a/src/pybind/mgr/tox.ini b/src/pybind/mgr/tox.ini index d85ab66a276e..3181b6e97cb4 100644 --- a/src/pybind/mgr/tox.ini +++ b/src/pybind/mgr/tox.ini @@ -58,7 +58,8 @@ basepython = python3 deps = cython -rrequirements.txt - mypy==0.901 + -c{toxinidir}/../../mypy-constrains.txt + mypy types-backports types-python-dateutil types-requests diff --git a/src/pybind/tox.ini b/src/pybind/tox.ini index 9f06a78b40bd..f5b778f65b25 100644 --- a/src/pybind/tox.ini +++ b/src/pybind/tox.ini @@ -7,7 +7,9 @@ skipsdist = true [testenv] [testenv:mypy] -deps = mypy +deps = + mypy + -c{toxinidir}/../mypy-constrains.txt commands = python -m mypy --config-file ../mypy.ini \ -m ceph_daemon \ diff --git a/src/python-common/requirements.txt b/src/python-common/requirements.txt index c30b80147040..88b47310d678 100644 --- a/src/python-common/requirements.txt +++ b/src/python-common/requirements.txt @@ -1,8 +1,8 @@ pytest >=2.1.3,<5; python_version < '3.5' mock; python_version < '3.3' -mypy==0.901; python_version >= '3' +mypy; python_version >= '3' pytest-mypy; python_version >= '3' pytest >= 2.1.3; python_version >= '3' pyyaml typing-extensions; python_version < '3.8' -types-PyYAML \ No newline at end of file +types-PyYAML diff --git a/src/python-common/tox.ini b/src/python-common/tox.ini index ce54d5a625f6..32160a6383b8 100644 --- a/src/python-common/tox.ini +++ b/src/python-common/tox.ini @@ -5,6 +5,7 @@ skip_missing_interpreters = true [testenv:py3] deps= -rrequirements.txt + -c{toxinidir}/../mypy-constrains.txt commands= pytest --doctest-modules ceph/deployment/service_spec.py pytest {posargs}