KEMBAR78
Bump mypy 0.950 by DamianZaremba · Pull Request #939 · typeddjango/django-stubs · GitHub
Skip to content

Conversation

DamianZaremba
Copy link
Contributor

I have made things!

This change bumps the dependencies specifier to enable support for mypy 0.950.

The test cases have also been updated to reflect the expected revealed types change post python/mypy#12459.

Related issues

Closes #938

There was an upstream change (python/mypy#12459)
to remove * from inferred types in the reveal_type output.

As we are asserting the * to exist, all the test cases are now failing
on the 0.950 release. Removing the expected * to mirror the upstream
behaviour change should resolve the test failures.
@intgr
Copy link
Collaborator

intgr commented Apr 29, 2022

@sobolevn Looking forward to this getting merged and released 🙏

@sobolevn sobolevn merged commit 2ef7ff3 into typeddjango:master Apr 29, 2022
@sobolevn
Copy link
Member

Thank you!

andersk added a commit to andersk/django-stubs that referenced this pull request Jun 3, 2022
Due to a bug in mypy 0.940 (typeddjango#870), we made two changes in typeddjango#871:

• pinned mypy==0.931 in requirements.txt (for running our tests);
• bounded mypy<0.940 in setup.py (for downstream users).

After the mypy bug was quickly fixed upstream in 0.941, our setup.py
bound has been repeatedly raised but not removed (typeddjango#886, typeddjango#939, typeddjango#973).
The only changes in those commits have been to the precise wording of
error messages expected in our tests.  Those wording changes don’t
impact compatibility for downstream users, so it should be safe to go
back to allowing them to upgrade mypy independently.

Since mypy doesn’t yet guarantee backwards compatibility in the plugin
API (although in practice it has rarely been an issue), add a
django-stubs[compatible-mypy] extra for users who prefer a known-good
version of mypy even if it’s a little out of date.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
sobolevn added a commit that referenced this pull request Jun 4, 2022
* Move mypy version upper bound to a [compatible-mypy] extra

Due to a bug in mypy 0.940 (#870), we made two changes in #871:

• pinned mypy==0.931 in requirements.txt (for running our tests);
• bounded mypy<0.940 in setup.py (for downstream users).

After the mypy bug was quickly fixed upstream in 0.941, our setup.py
bound has been repeatedly raised but not removed (#886, #939, #973).
The only changes in those commits have been to the precise wording of
error messages expected in our tests.  Those wording changes don’t
impact compatibility for downstream users, so it should be safe to go
back to allowing them to upgrade mypy independently.

Since mypy doesn’t yet guarantee backwards compatibility in the plugin
API (although in practice it has rarely been an issue), add a
django-stubs[compatible-mypy] extra for users who prefer a known-good
version of mypy even if it’s a little out of date.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>

* Update setup.py

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Support mypy 0.950

3 participants