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.
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
gh-108901: Deprecate
inspect.getargs
, slate it for removal in 3.15 #112279base: main
Are you sure you want to change the base?
gh-108901: Deprecate
inspect.getargs
, slate it for removal in 3.15 #112279Changes from 3 commits
18ae539
fd81c14
6087111
4eea14c
d8cd4f2
56dbc0f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should follow our own advice and use
inspect.signature(types.FunctionType(frame.f_code, {}))
here? :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Right now
getargs
does some ugly things:cpython/Lib/inspect.py
Line 1384 in fef6fb8
pos_or_kw_args
together withkw_only_args
, but ignorespos_only_args
.I think that we can just keep it as-is and then remove all of them together in 3.15 (because
getargvalues
will also be deprecated and removed at the same time, PR is just not ready yet).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I see. Maybe we should do the
getargvalues()
deprecation first, though, in that case? It makes me a little uncomfortable adding this deprecation warning now, if we're not able to make the mandated change in our own code yet.(I'm fine suppressing
DeprecationWarning
s in a function that is itself deprecated, butgetargvalues()
isn't, yet. And I know you plan to work on deprecating it immediately after this PR, but if I had a pound for every time somebody promised me they'd work on something the next day, and then discovered it was harder than they expected, I'd be a rich man :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can open a PR about
getargvalues()
first 👍