Skip to content

Update mypy to 1.17.0 #2744

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

Merged
merged 8 commits into from
Jul 15, 2025
Merged

Update mypy to 1.17.0 #2744

merged 8 commits into from
Jul 15, 2025

Conversation

ngnpope
Copy link
Member

@ngnpope ngnpope commented Jul 15, 2025

Updates mypy to v1.17.0 and removes use of force_uppercase_builtins and force_union_syntax to align with changes in mypy.

Closes #2743

ngnpope added 8 commits July 15, 2025 15:28
Now that django-stubs targets Python 3.10+, this option serves no
purpose. Support for PEP 585 in error messages has been available since
mypy v1.4 when using Python 3.9+ and the minimum supported version in
django-stubs is now mypy v1.13.
Now that django-stubs targets Python 3.10+, this option serves no
purpose. Support for PEP 604 in error messages has been available since
mypy v1.4 when using Python 3.10+ and the minimum supported version in
django-stubs is now mypy v1.13.

Note that there are still some cases where `Union[...]` is used, but
these are due to be changed to PEP 604 syntax in mypy v1.17.
@ngnpope
Copy link
Member Author

ngnpope commented Jul 15, 2025

Here it is @sobolevn!

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.

Image

😱

This job is massive! Thanks a lot!
Can you please share how did you achieve this? Any scripts / regexs / etc? It might be useful for others!

@sobolevn sobolevn merged commit 22e7e91 into typeddjango:master Jul 15, 2025
37 checks passed
@adamchainz
Copy link
Contributor

I bet Nick is just a machine ! 💪 👏 👏

@ngnpope ngnpope deleted the mypy-1.17 branch July 16, 2025 06:30
@ngnpope
Copy link
Member Author

ngnpope commented Jul 16, 2025

Can you please share how did you achieve this?

I bet Nick is just a machine

An evening of forgotten sed commands, recorded macros in vim — blood, sweat, and tears 😅

@sobolevn
Copy link
Member

sobolevn commented Jul 16, 2025

@ngnpope I have an even bigger project to convert, wish me luck 😅 😭
https://github.com/dry-python/returns/tree/master/typesafety

@sobolevn
Copy link
Member

@ngnpope btw, maybe you are interested in joining TypedDjango core team? Your work is very valuable, I would be happy to have you as a team member 🙏

@adamchainz
Copy link
Contributor

I thought we added him already !!

@sobolevn
Copy link
Member

Invite sent :)
If you want to join - you can accept it. If you don't have time / energy for it - this is fine too! 😊

@ngnpope
Copy link
Member Author

ngnpope commented Jul 16, 2025

I have an even bigger project to convert, wish me luck 😅 😭

Good luck! 🍀

maybe you are interested in joining TypedDjango core team?

Thanks! Yes, am happy to join and keep helping out 😊

intgr added a commit to intgr/djangorestframework-stubs that referenced this pull request Jul 17, 2025
Mypy version was bumped in django-stubs:

* typeddjango/django-stubs#2744

The `force_uppercase_builtins` setting was deprecated in mypy 1.17. Caused test failures due to new logging.

https://mypy.readthedocs.io/en/stable/changelog.html#deprecated-flag-force-uppercase-builtins
intgr added a commit to intgr/djangorestframework-stubs that referenced this pull request Jul 17, 2025
Mypy version was bumped in django-stubs:

* typeddjango/django-stubs#2744

The `force_uppercase_builtins` setting was deprecated in mypy 1.17. Caused test failures due to new logging.

https://mypy.readthedocs.io/en/stable/changelog.html#deprecated-flag-force-uppercase-builtins
intgr added a commit to intgr/djangorestframework-stubs that referenced this pull request Jul 17, 2025
Mypy version was bumped in django-stubs:

* typeddjango/django-stubs#2744

The `force_uppercase_builtins` setting was deprecated in mypy 1.17. Caused test failures due to new logging.

https://mypy.readthedocs.io/en/stable/changelog.html#deprecated-flag-force-uppercase-builtins
intgr added a commit to typeddjango/djangorestframework-stubs that referenced this pull request Jul 17, 2025
)

Mypy version was bumped in django-stubs:

* typeddjango/django-stubs#2744

The `force_uppercase_builtins` setting was deprecated in mypy 1.17. Caused test failures due to new logging.

https://mypy.readthedocs.io/en/stable/changelog.html#deprecated-flag-force-uppercase-builtins
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