Update types.SimpleNamespace for 3.13#12297
Merged
srittau merged 5 commits intopython:mainfrom Jul 9, 2024
Merged
Conversation
types.Simplenamespace for 3.13`types.Simplenamespace for 3.13
types.Simplenamespace for 3.13types.Simplenamespace for 3.13
8067865 to
303e54b
Compare
types.Simplenamespace for 3.13types.SimpleNamespace for 3.13
dfbf2bf to
a27ba0c
Compare
03de97e to
e3cf76c
Compare
This comment has been minimized.
This comment has been minimized.
srittau
reviewed
Jul 9, 2024
| tkinter.tix.Shell | ||
| types.GenericAlias.__getattr__ | ||
| types.GenericAlias.__call__ # Would be complicated to fix properly, Any could silence problems. #6392 | ||
| types.SimpleNamespace.__init__ # class doesn't accept positional arguments but has default C signature |
Collaborator
There was a problem hiding this comment.
This should be in the "Allowlist entries that cannot or should not be fixed" section here as well as the other allowlists.
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
srittau
approved these changes
Jul 9, 2024
max-muoto
added a commit
to max-muoto/typeshed
that referenced
this pull request
Sep 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See here for the cpython change.
types.SimpleNamespacenow can take in an iterable of pairs or dictionary when initializing.Note: These stubs are slightly stricter than what's actually allowed at runtime. To help reduce the chance of runtime errors I think it makes sense to simply limit pairs to tuples, but happy to walk back this decision.