Bug report
unfortunately having a really hard time tracking this down -- I've seen #1684 already however this is a concrete model and not an abstract one
What's wrong
I haven't been able to narrow this to a minimal case so I suspect it's something wrong with our setup -- here's at least a maximal reproduction:
set -euxo pipefail
rm -rf sentry
git clone -qq --depth=1 https://github.com/getsentry/sentry -b 23.9.1 >& /dev/null
cd sentry
python3.8 -m venv venv >& /dev/null
# cheaty editable install so you don't need node
echo "$PWD/src" > venv/lib/python3.8/site-packages/easy-install.pth
venv/bin/pip install -qq --no-deps -r requirements-dev-frozen.txt
venv/bin/pip install -qq --upgrade mypy django-stubs django-stubs-ext
venv/bin/mypy tests/sentry/db/models/fields/test_jsonfield.py
output:
$ bash t.sh
+ rm -rf sentry
+ git clone -qq --depth=1 https://github.com/getsentry/sentry -b 23.9.1
+ cd sentry
+ python3.8 -m venv venv
+ echo /tmp/y/sentry/src
+ venv/bin/pip install -qq --no-deps -r requirements-dev-frozen.txt
+ venv/bin/pip install -qq --upgrade mypy django-stubs django-stubs-ext
+ venv/bin/mypy tests/sentry/db/models/fields/test_jsonfield.py
tests/sentry/db/models/fields/test_jsonfield.py:58: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:64: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:68: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:69: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:119: error: "Type[JSONFieldWithDefaultTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:120: error: "Type[JSONFieldWithDefaultTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:124: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:125: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:126: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:127: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:128: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:129: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:131: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:133: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:135: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:139: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:142: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:146: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:147: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:148: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:150: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:151: error: "Type[JSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:154: error: "Type[BlankJSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:155: error: "Type[BlankJSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:159: error: "Type[BlankJSONFieldTestModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:164: error: "Type[CallableDefaultModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:165: error: "Type[CallableDefaultModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:169: error: "Type[CallableDefaultModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:170: error: "Type[CallableDefaultModel]" has no attribute "objects" [attr-defined]
tests/sentry/db/models/fields/test_jsonfield.py:194: error: "Type[BlankJSONFieldTestModel]" has no attribute "objects" [attr-defined]
Found 30 errors in 1 file (checked 1 source file)
will try and narrow it down to a minimal case but I've failed to do that so far
How is that should be
I expect no errors in that file
System information
- OS:
python version: 3.8.16
django version: 3.2.20
mypy version: 1.5.1
django-stubs version: 4.2.4
django-stubs-ext version: 4.2.2
Bug report
unfortunately having a really hard time tracking this down -- I've seen #1684 already however this is a concrete model and not an abstract one
What's wrong
I haven't been able to narrow this to a minimal case so I suspect it's something wrong with our setup -- here's at least a maximal reproduction:
output:
will try and narrow it down to a minimal case but I've failed to do that so far
How is that should be
I expect no errors in that file
System information
pythonversion: 3.8.16djangoversion: 3.2.20mypyversion: 1.5.1django-stubsversion: 4.2.4django-stubs-extversion: 4.2.2