Skip to content

mypy version 0.790 complains on faust/models/records.py on master causing build failures #672

@forsberg

Description

@forsberg

Checklist

  • I have included information about relevant versions
  • I have verified that the issue persists when using the master branch of Faust.

Steps to reproduce

Run typechecking via tox on master:

$ git log -1
commit 01b4c0ad8390221db71751d80001b0fd879291e2 (HEAD -> master, origin/master, origin/HEAD, forsberg/master)
Merge: b5e159f1 e7b02e83
Author: Ask Solem <[email protected]>
Date:   Fri Oct 9 14:59:42 2020 +0200

    Merge pull request #542 from trauter/rhmaster2
    
    Fix some cases of hanging rebalance
$ TOXENV=typecheck tox
GLOB sdist-make: /home/forsberg/dev/faust/setup.py
typecheck inst-nodeps: /home/forsberg/dev/faust/.tox/.tmp/package/1/faust-1.11.0a1.zip
typecheck installed: aiofiles==0.5.0,aiohttp==3.6.3,aiohttp-cors==0.7.0,aredis==1.1.8,async-timeout==3.0.1,attrs==20.2.0,certifi==2020.6.20,chardet==3.0.4,click==7.1.2,codecov==2.1.10,colorclass==2.2.0,colorlog==4.4.0,coverage==5.3,croniter==0.3.35,datadog==0.39.0,decorator==4.4.2,faust @ file:///home/forsberg/dev/faust/.tox/.tmp/package/1/faust-1.11.0a1.zip,freezegun==1.0.0,hypothesis==5.37.3,idna==2.10,iniconfig==1.1.1,kafka-python==1.4.7,mode==4.4.0,multidict==4.7.6,mypy==0.790,mypy-extensions==0.4.3,natsort==7.0.1,opentracing==1.3.0,packaging==20.4,pluggy==0.13.1,prometheus-client==0.8.0,psutil==5.7.2,py==1.9.0,pyfakefs==4.1.0,pyparsing==2.4.7,pytest==6.1.1,pytest-aiofiles==0.2.0,pytest-aiohttp==0.3.0,pytest-asyncio==0.14.0,pytest-cov==2.10.1,pytest-forked==1.3.0,pytest-openfiles==0.5.0,pytest-picked==0.4.4,pytest-random-order==1.0.4,python-dateutil==2.8.1,pytz==2020.1,PyYAML==5.3.1,requests==2.24.0,robinhood-aiokafka==1.1.6,six==1.15.0,sortedcontainers==2.2.2,statsd==3.3.0,terminaltables==3.1.0,toml==0.10.1,typed-ast==1.4.1,typing-extensions==3.7.4.3,urllib3==1.25.11,venusian==1.2.0,yarl==1.6.2
typecheck run-test-pre: PYTHONHASHSEED='1735657291'
typecheck run-test: commands[0] | mypy -p faust
faust/models/record.py: note: In member "_contribute_field_descriptors" of class "Record":
faust/models/record.py:256:54: error: Argument 1 to "__call__" of "_lru_cache_wrapper" has incompatible type "Type[Any]"; expected "Hashable"
Found 1 error in 1 file (checked 164 source files)
ERROR: InvocationError for command /home/forsberg/dev/faust/.tox/typecheck/bin/mypy -p faust (exited with code 1)
___________________________________________________________________________ summary ___________________________________________________________________________
ERROR:   typecheck: commands failed

Same behaviour when running the job via travis on master: https://travis-ci.org/github/forsberg/faust/jobs/737302314

Root cause seems to be an upgrade of mypy to 0.790, compared to 0.782 when successfully run on master on 2020-10-09

  • Python version: 3.8.5
  • Faust version: commit 01b4c0a
  • Operating system: Linux
  • Kafka version: N/A
  • RocksDB version: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions