Page MenuHomeSoftware Heritage

Add typing stubs dependencies for mypy>0.900
ClosedPublic

Authored by ardumont on Jun 9 2021, 4:33 PM.

Details

Summary

Not for review...
Strange output from my local checks

tox -r -e mypy
GLOB sdist-make: /home/tony/work/inria/repo/swh/swh-environment/swh-indexer/setup.py
mypy recreate: /home/tony/work/inria/repo/swh/swh-environment/swh-indexer/.tox/mypy
mypy installdeps: mypy
mypy inst: /home/tony/work/inria/repo/swh/swh-environment/swh-indexer/.tox/.tmp/package/1/swh.indexer-0.8.1.dev0+g97c9338.d20210609.zip
mypy installed: aiohttp==3.7.4.post0,aiohttp-utils==3.1.1,amqp==5.0.6,async-timeout==3.0.1,attrs==21.2.0,attrs-strict==0.2.1,billiard==3.6.4.0,blinker==1.4,cached-property==1.5.2,cachetools==4.2.2,cassandra-driver==3.25.0,celery==5.1.0,certifi==2021.5.30,chardet==4.0.0,click==8.0.1,click-didyoumean==0.0.3,click-plugins==1.1.1,click-repl==0.2.0,confluent-kafka==1.7.0,Deprecated==1.2.12,elasticsearch==7.13.1,Flask==2.0.1,frozendict==2.0.2,geomet==0.2.1.post1,gunicorn==20.1.0,humanize==3.7.1,hypothesis==6.14.0,idna==2.10,importlib-metadata==4.5.0,iniconfig==1.1.1,iso8601==0.1.14,itsdangerous==2.0.1,Jinja2==3.0.1,kombu==5.1.0,lxml==4.6.3,MarkupSafe==2.0.1,mirakuru==2.4.1,msgpack==1.0.2,multidict==5.1.0,mypy==0.901,mypy-extensions==0.4.3,packaging==20.9,pika==1.2.0,pluggy==0.13.1,port-for==0.6.1,prompt-toolkit==3.0.18,psutil==5.8.0,psycopg2==2.8.6,py==1.10.0,PyLD==2.0.3,pyparsing==2.4.7,pytest==6.2.4,pytest-mock==3.6.1,pytest-postgresql==3.1.1,python-dateutil==2.8.1,python-magic==0.4.24,python-mimeparse==1.6.0,pytz==2021.1,PyYAML==5.4.1,requests==2.25.1,sentry-sdk==1.1.0,six==1.16.0,sortedcontainers==2.4.0,swh.core==0.14.1,swh.indexer @ file:///home/tony/work/inria/repo/swh/swh-environment/swh-indexer/.tox/.tmp/package/1/swh.indexer-0.8.1.dev0%2Bg97c9338.d20210609.zip,swh.journal==0.7.1,swh.model==2.5.1,swh.objstorage==0.2.3,swh.scheduler==0.14.2,swh.storage==0.30.1,tenacity==7.0.0,toml==0.10.2,typed-ast==1.4.3,types-click==0.1.14,types-PyYAML==0.1.5,types-requests==0.1.8,typing-extensions==3.10.0.0,urllib3==1.26.5,vine==5.0.0,wcwidth==0.2.5,Werkzeug==2.0.1,wrapt==1.12.1,xmltodict==0.12.0,yarl==1.6.3,zipp==3.4.1
mypy run-test-pre: PYTHONHASHSEED='2913377122'
mypy run-test: commands[0] | mypy swh
.tox/mypy/lib/python3.7/site-packages/hypothesis/database.py:91: error: Cannot find implementation or library stub for module named "sphinx.ext.autodoc"
.tox/mypy/lib/python3.7/site-packages/hypothesis/database.py:91: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
.tox/mypy/lib/python3.7/site-packages/hypothesis/extra/django/_impl.py:22: error: Cannot find implementation or library stub for module named "django"
.tox/mypy/lib/python3.7/site-packages/hypothesis/extra/django/_impl.py:22: error: Cannot find implementation or library stub for module named "django.forms"
.tox/mypy/lib/python3.7/site-packages/hypothesis/extra/django/_impl.py:22: error: Cannot find implementation or library stub for module named "django.test"
.tox/mypy/lib/python3.7/site-packages/hypothesis/extra/django/_impl.py:23: error: Cannot find implementation or library stub for module named "django.core.exceptions"
.tox/mypy/lib/python3.7/site-packages/hypothesis/extra/django/_impl.py:24: error: Cannot find implementation or library stub for module named "django.db"
.tox/mypy/lib/python3.7/site-packages/hypothesis/extra/django/_impl.py:24: error: Cannot find implementation or library stub for module named "django.db.models"
Found 7 errors in 2 files (checked 61 source files)
ERROR: InvocationError for command /home/tony/work/inria/repo/swh/swh-environment/swh-indexer/.tox/mypy/bin/mypy swh (exited with code 1)
___________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
ERROR:   mypy: commands failed

To ensure this fixes the build [1]

[1] https://jenkins.softwareheritage.org/view/swh-draft/job/DCIDX/job/tests/1492/console

Test Plan

tox -e mypy should be ok

Diff Detail

Repository
rDCIDX Metadata indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5840 (id=20887)

Rebasing onto 97c9338169...

Current branch diff-target is up to date.
Changes applied before test
commit 0fc063cea4230e2bfabee0db406fcfd8de88e861
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 9 16:32:04 2021 +0200

    Add typing stubs dependencies for mypy>0.900

See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/182/ for more details.

anlambert added inline comments.
requirements-test.txt
4–5

could you move that dep after confluent-kakfa for lexicographical order and put spaces around >= ?

7

I was processing the same module, types-requests is not required based on my local tests

ardumont added inline comments.
requirements-test.txt
7

agreed

ardumont marked an inline comment as done.

Adapt according to suggestions

This revision is now accepted and ready to land.Jun 9 2021, 4:43 PM

Build is green

Patch application report for D5840 (id=20888)

Rebasing onto 97c9338169...

Current branch diff-target is up to date.
Changes applied before test
commit e06853c353fc51a7e4afe2a05f9c0c065915b80e
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jun 9 16:32:04 2021 +0200

    Add typing stubs dependencies for mypy>0.900

See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/183/ for more details.

Update version boundary with spaces (as suggested)

This revision was landed with ongoing or failed builds.Jun 9 2021, 4:48 PM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D5840 (id=20889)

Rebasing onto 40a773c722...

First, rewinding head to replay your work on top of it...
Fast-forwarded diff-target to base-revision-184-D5840.
Changes applied before test

See https://jenkins.softwareheritage.org/job/DCIDX/job/tests-on-diff/184/ for more details.