Skip to content

Make Mapping/MutableMapping params positional-only #5772

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 7 commits into from
Nov 18, 2021

Conversation

JelleZijlstra
Copy link
Member

These are positional-only on dict, so it makes sense to mark them as positional-only in these base classes too.

Fixes #5771

These are positional-only on dict, so it makes sense to mark them as positional-only in these base classes too.

Fixes #5771
@JelleZijlstra
Copy link
Member Author

Lots of stubtest complaints about incompatible overrides and runtime inconsistencies. Marking as draft until I resolve those.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@JelleZijlstra JelleZijlstra marked this pull request as ready for review November 18, 2021 06:21
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit 0d7064c into master Nov 18, 2021
@srittau srittau deleted the JelleZijlstra-patch-1 branch November 18, 2021 06:54
@sobolevn
Copy link
Member

sobolevn commented Dec 26, 2021

@JelleZijlstra this caused this regression: python/mypy#11831

Maybe we can do it other way around? Restore named args in MutableMapping and create incompatible overrides for dict with pos-only args?

@JelleZijlstra
Copy link
Member Author

#6694 does that but I think it's the wrong solution; we can discuss there. (Though note that I'll have limited availability for the next two weeks.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TypeError on built-ins when using keyword arguments is not found
3 participants