-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Deprecated --force-uppercase-builtins flag #19176
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
Deprecated --force-uppercase-builtins flag #19176
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, | 8000||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-builtins
flag and makes it a no-op. Followup to #19173.