Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@cdce8p
Copy link
Collaborator

@cdce8pcdce8p commentedMay 30, 2025
edited
Loading

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.

@cdce8pcdce8p added topic-pep-585PEP 585 (builtin generics) topic-configurationConfiguration files and flags labelsMay 30, 2025
@github-actions

This comment has been minimized.

@cdce8pcdce8p requested a review fromsobolevnMay 30, 2025 16:06
Copy link
Member

@sobolevnsobolevn left a 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.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Collaborator

@JukkaLJukkaL left a 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,
)
Copy link
Collaborator

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 thewarnings 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?

Copy link
CollaboratorAuthor

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.

@github-actions
Copy link
Contributor

Diff frommypy_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+

@JukkaLJukkaL merged commit9ded5b1 intopython:masterJun 5, 2025
20 checks passed
@cdce8pcdce8p deleted the deprecate-force-uppercase-builtins branchJune 5, 2025 13:12
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@JukkaLJukkaLJukkaL approved these changes

@sobolevnsobolevnsobolevn approved these changes

+1 more reviewer

@sterliakovsterliakovsterliakov approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

topic-configurationConfiguration files and flagstopic-pep-585PEP 585 (builtin generics)

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@cdce8p@JukkaL@sobolevn@sterliakov

[8]ページ先頭

©2009-2025 Movatter.jp