Public bug reported: When running `tox -e pep8` (either in CI or locally), there are mypy failures on nova/crypto.py
In CI, it looks like (from https://zuul.opendev.org/t/openstack/build/1e32efc260b84a94b6a9cfeba3c80976) pep8 start: run-test pep8 run-test: commands[0] | bash tools/mypywrap.sh setting PATH=/home/zuul/src/opendev.org/openstack/nova/.tox/shared/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin [4860] /home/zuul/src/opendev.org/openstack/nova$ /usr/bin/bash tools/mypywrap.sh nova/crypto.py:39:1: error: Library stubs not installed for "paramiko" (or incompatible with Python 3.8) nova/crypto.py:39:1: note: Hint: "python3 -m pip install types-paramiko" nova/crypto.py:39:1: note: (or run "mypy --install-types" to install all missing stub packages) nova/crypto.py:39:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports Found 1 error in 1 file (checked 23 source files) ERROR: InvocationError for command /usr/bin/bash tools/mypywrap.sh (exited with code 1) pep8 finish: run-test after 4.21 seconds pep8 start: run-test-post pep8 finish: run-test-post after 0.00 seconds Locally, it looks like this: [artom@zoe nova]$ python -m mypy nova/crypto.py nova/crypto.py:31:1: error: Library stubs not installed for "cryptography.hazmat" (or incompatible with Python 3.9) nova/crypto.py:31:1: note: Hint: "python3 -m pip install types-cryptography" nova/crypto.py:31:1: note: (or run "mypy --install-types" to install all missing stub packages) nova/crypto.py:31:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports nova/crypto.py:31:1: error: Library stubs not installed for "cryptography.hazmat.backends" (or incompatible with Python 3.9) nova/crypto.py:32:1: error: Library stubs not installed for "cryptography.hazmat.primitives.asymmetric" (or incompatible with Python 3.9) nova/crypto.py:32:1: error: Library stubs not installed for "cryptography.hazmat.primitives.asymmetric.padding" (or incompatible with Python 3.9) nova/crypto.py:33:1: error: Library stubs not installed for "cryptography.hazmat.primitives" (or incompatible with Python 3.9) nova/crypto.py:33:1: error: Library stubs not installed for "cryptography.hazmat.primitives.hashes" (or incompatible with Python 3.9) nova/crypto.py:34:1: error: Library stubs not installed for "cryptography.hazmat.primitives.serialization" (or incompatible with Python 3.9) nova/crypto.py:35:1: error: Library stubs not installed for "cryptography" (or incompatible with Python 3.9) nova/crypto.py:35:1: error: Library stubs not installed for "cryptography.x509" (or incompatible with Python 3.9) nova/crypto.py:39:1: error: Library stubs not installed for "paramiko" (or incompatible with Python 3.9) nova/crypto.py:39:1: note: Hint: "python3 -m pip install types-paramiko" Found 10 errors in 1 file (checked 1 source file) ** Affects: nova Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1931476 Title: pep8 job failing because of mypy Status in OpenStack Compute (nova): New Bug description: When running `tox -e pep8` (either in CI or locally), there are mypy failures on nova/crypto.py In CI, it looks like (from https://zuul.opendev.org/t/openstack/build/1e32efc260b84a94b6a9cfeba3c80976) pep8 start: run-test pep8 run-test: commands[0] | bash tools/mypywrap.sh setting PATH=/home/zuul/src/opendev.org/openstack/nova/.tox/shared/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin [4860] /home/zuul/src/opendev.org/openstack/nova$ /usr/bin/bash tools/mypywrap.sh nova/crypto.py:39:1: error: Library stubs not installed for "paramiko" (or incompatible with Python 3.8) nova/crypto.py:39:1: note: Hint: "python3 -m pip install types-paramiko" nova/crypto.py:39:1: note: (or run "mypy --install-types" to install all missing stub packages) nova/crypto.py:39:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports Found 1 error in 1 file (checked 23 source files) ERROR: InvocationError for command /usr/bin/bash tools/mypywrap.sh (exited with code 1) pep8 finish: run-test after 4.21 seconds pep8 start: run-test-post pep8 finish: run-test-post after 0.00 seconds Locally, it looks like this: [artom@zoe nova]$ python -m mypy nova/crypto.py nova/crypto.py:31:1: error: Library stubs not installed for "cryptography.hazmat" (or incompatible with Python 3.9) nova/crypto.py:31:1: note: Hint: "python3 -m pip install types-cryptography" nova/crypto.py:31:1: note: (or run "mypy --install-types" to install all missing stub packages) nova/crypto.py:31:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports nova/crypto.py:31:1: error: Library stubs not installed for "cryptography.hazmat.backends" (or incompatible with Python 3.9) nova/crypto.py:32:1: error: Library stubs not installed for "cryptography.hazmat.primitives.asymmetric" (or incompatible with Python 3.9) nova/crypto.py:32:1: error: Library stubs not installed for "cryptography.hazmat.primitives.asymmetric.padding" (or incompatible with Python 3.9) nova/crypto.py:33:1: error: Library stubs not installed for "cryptography.hazmat.primitives" (or incompatible with Python 3.9) nova/crypto.py:33:1: error: Library stubs not installed for "cryptography.hazmat.primitives.hashes" (or incompatible with Python 3.9) nova/crypto.py:34:1: error: Library stubs not installed for "cryptography.hazmat.primitives.serialization" (or incompatible with Python 3.9) nova/crypto.py:35:1: error: Library stubs not installed for "cryptography" (or incompatible with Python 3.9) nova/crypto.py:35:1: error: Library stubs not installed for "cryptography.x509" (or incompatible with Python 3.9) nova/crypto.py:39:1: error: Library stubs not installed for "paramiko" (or incompatible with Python 3.9) nova/crypto.py:39:1: note: Hint: "python3 -m pip install types-paramiko" Found 10 errors in 1 file (checked 1 source file) To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1931476/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

