Skip to content
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

Fix signature of argparse._VersionAction.__init__ #11715

Closed
wants to merge 1 commit into from

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented Apr 4, 2024

Closes: #11712

@@ -355,6 +355,7 @@ _?ctypes.Array._length_ # _length_ is abstract, https://github.com/python/typesh
_pydecimal.* # See comments in file
argparse.ArgumentParser.__init__ # stubtest doesn't recognise the runtime default (a class) as being compatible with a callback protocol (the stub annotation)
argparse.Namespace.__getattr__ # The whole point of this class is its attributes are dynamic
argparse._VersionAction.__init__ # "help" argument default changed in 3.11+ point releases, remove entry when dropping 3.10 support
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could instead copy this to the individual version allowlists, but considering this was changed in a point release (and not having it made yet into the Python 3.12 point release used at GitHub), I think it's safer to have it here – at least for now.

Copy link
Contributor

github-actions bot commented Apr 4, 2024

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

@srittau srittau closed this Apr 4, 2024
@srittau srittau deleted the fix-argparse branch April 4, 2024 10:24
@JelleZijlstra
Copy link
Member

Any reason this PR was closed?

@srittau
Copy link
Collaborator Author

srittau commented Apr 4, 2024

Mostly because for some reason I thought this was the only problem in the Python 3.11 update, but there are loads of others that also need to fixed.

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.

Stubtest failures with Python 3.11.9+
2 participants