Skip to content

Run different version of mypy in ci #2671

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

Conversation

UnknownPlatypus
Copy link
Contributor

@UnknownPlatypus UnknownPlatypus commented May 9, 2025

I have made things!

Run ci with supported mypy version ie 1.13, 1.14, 1.15, 1.16 and master branch on github.

@UnknownPlatypus UnknownPlatypus force-pushed the test-minimal-supported-mypy-version branch from 843be52 to 5ade464 Compare June 1, 2025 15:05
@UnknownPlatypus UnknownPlatypus force-pushed the test-minimal-supported-mypy-version branch from a5c9dec to f328c33 Compare June 7, 2025 12:54
@UnknownPlatypus
Copy link
Contributor Author

@sobolevn This is ready for review, was much easier now that we have uv.
I had to use type: ignore[unused-ignore] for type ignores that were required on old versions but not required in newer ones.
We should aim at removing them when we drop older mypy/python version support

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not quite sure about that :(
It brings several new quirks for maintenance, not sure if it really helps though...

@UnknownPlatypus
Copy link
Contributor Author

I am not quite sure about that :(
It brings several new quirks for maintenance, not sure if it really helps though...

Yeah I'm also not completely sure, but it would have caught #2665 earlier and would have probably also help with #2724 (comment) were a mypy version bump introduced a regression in our plugin.

I feel like the kind of bugs related to mypy versions are the complicated ones, often related to the plugin.

Maybe others core maintainer of django-stubs have an opinion on the subject ?

@ngnpope
Copy link
Member

ngnpope commented Jul 14, 2025

I fear this is about to become even more non-viable. In mypy 1.17 or 1.18 various options related to the formatting of types in errors are going to be obsolete. This means that we'll need to fix our tests - I have a branch ready with some of those changes which I'll open a PR for when the next release comes along... But, yeah, testing across versions will be nigh on impossible.

@UnknownPlatypus
Copy link
Contributor Author

That's sad but yeah, I suppose it would add too much of a burden

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.

3 participants