Deprecated --force-uppercase-builtins flag#19176
Conversation
This comment has been minimized.
This comment has been minimized.
sobolevn
left a comment
There was a problem hiding this comment.
I like this! Thanks! I will have to adapt a lot of tests, but this should be done at some point anyway.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
JukkaL
left a comment
There was a problem hiding this comment.
Thanks for the PR! Left a few comments, otherwise looks good.
| "options.use_lowercase_names() is deprecated and will be removed in a future version", | ||
| DeprecationWarning, | ||
| stacklevel=2, | ||
| ) |
There was a problem hiding this comment.
Hmm we don't use the warnings module much since mypy is usually used on the command line. This seems a bit inconsistent with existing behavior, so maybe this should reverted. What do you think?
There was a problem hiding this comment.
Not sure about it. I've removed all calls to this method from the mypy codebase itself. So we could even think about just removing it completely. My intention with the DeprecationWarning was to help plugin developers which might be using it. Then again, I don't know if any plugins actually use it.
|
Diff from mypy_primer, showing the effect of this PR on open source code: django-stubs (https://github.com/typeddjango/django-stubs)
+ Warning: --force-uppercase-builtins is deprecated; mypy only supports Python 3.9+
|
Use lowercase builtins for error messages, Mypy only supports 3.9+. This PR deprecates the
--force-uppercase-builtinsflag and makes it a no-op. Followup to #19173.