Skip to content

stubtest contribution guide comes out non successful #1627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
flaeppe opened this issue Jul 12, 2023 · 7 comments · Fixed by #1667
Closed

stubtest contribution guide comes out non successful #1627

flaeppe opened this issue Jul 12, 2023 · 7 comments · Fixed by #1667
Labels
bug Something isn't working

Comments

@flaeppe
Copy link
Member

flaeppe commented Jul 12, 2023

Bug report

I tried to follow the stubtest contribution guide but I can't manage to get a successful run. Not sure how to hunt down the problem either..

What's wrong

Running the stubtest script via the suggested command bash ./scripts/stubtest.sh yields

➤ bash ./scripts/stubtest.sh
error: not checking stubs due to mypy build errors:
django-stubs/db/models/manager.pyi:10: error: Module "django_stubs_ext" has no attribute "ValuesQuerySet"

How is that should be

There should be no error, CI passed on 2b1a4cd

System information

python version: 3.11.4

@flaeppe flaeppe added the bug Something isn't working label Jul 12, 2023
@sobolevn
Copy link
Member

pip install -r requirements.txt?

@flaeppe
Copy link
Member Author

flaeppe commented Jul 12, 2023

I've tried that a couple of times, also recreated env. Also tried non-editable installs of django-stubs and django-stubs-ext, which resulted in other strange errors.

Something is weird, not sure what though..

@sobolevn
Copy link
Member

Please, share repro steps :)

@flaeppe
Copy link
Member Author

flaeppe commented Jul 12, 2023

No idea really..

I made a clean clone to try to reproduce, only left me with missing gis/GDAL library errors..

I wonder what I've managed to break in my sibling directory 🙂

@UnknownPlatypus
Copy link
Contributor

Had the same issue, I don't remember how I fixed it tho. I think it was clearing mypy cache.

@abdulaev-sh-m
Copy link
Contributor

abdulaev-sh-m commented Jul 14, 2023

Here is a fix that should be made to prevent this problem from occurring again (I will add PR now):
In the test_aliases.py file, change the import to this from django_stubs_ext.django_stubs_ext import ValuesQuerySet.

But this is not the main problem with the tests, since the result of running the pytest command is like this:
74 failed, 306 passed in 575.26s (0:09:35).
I guess I'll be fixing the tests in the near future)

P.S. I ran the tests on Huawei MateBoot D 15 (Windows 11 Home), Python version 3.11.4.

@flaeppe
Copy link
Member Author

flaeppe commented Aug 31, 2023

Closed via #1667

@flaeppe flaeppe closed this as completed Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

4 participants