Skip to content

Conversation

@max-muoto
Copy link
Contributor

@max-muoto max-muoto commented Jul 9, 2024

See here for the cpython change. types.SimpleNamespace now 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.

@max-muoto max-muoto changed the title Simplenamespace Update types.Simplenamespace for 3.13` Jul 9, 2024
@max-muoto max-muoto changed the title Update types.Simplenamespace for 3.13` Update types.Simplenamespace for 3.13 Jul 9, 2024
@max-muoto max-muoto marked this pull request as ready for review July 9, 2024 02:25
@max-muoto max-muoto changed the title Update types.Simplenamespace for 3.13 Update `types.Simplenamespace for 3.13 Jul 9, 2024
@max-muoto max-muoto changed the title Update `types.Simplenamespace for 3.13 Update types.Simplenamespace for 3.13 Jul 9, 2024
@max-muoto max-muoto changed the title Update types.Simplenamespace for 3.13 Update types.SimpleNamespace for 3.13 Jul 9, 2024
@max-muoto max-muoto marked this pull request as draft July 9, 2024 02:29
@max-muoto max-muoto marked this pull request as ready for review July 9, 2024 02:31
@github-actions

This comment has been minimized.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in the "Allowlist entries that cannot or should not be fixed" section here as well as the other allowlists.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2024

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

@srittau srittau merged commit 23fd30f into python:main Jul 9, 2024
max-muoto added a commit to max-muoto/typeshed that referenced this pull request Sep 8, 2024
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.

2 participants