◐ Shell
reader mode source ↗
Skip to content

gh-108901: Deprecate inspect.getargs, slate it for removal in 3.15#112279

Closed
sobolevn wants to merge 6 commits into
python:mainfrom
sobolevn:issue-108901-getargs-deprecation
Closed

gh-108901: Deprecate inspect.getargs, slate it for removal in 3.15#112279
sobolevn wants to merge 6 commits into
python:mainfrom
sobolevn:issue-108901-getargs-deprecation

Conversation

@sobolevn

@sobolevn sobolevn commented Nov 20, 2023

Copy link
Copy Markdown
Member

Following the discussion of #108902, I documented that getargs is deprecated (since it is not documented anywhere, I just modified its docstring) and that inspect.signature(types.FunctionType(co, {})) is the modern alternative. I think that it is safe to remove this function in two versions, because it does not work anyway (pos-only, kw-only params are incorrect).

I also don't think that modernizing getargvalues is valuable, because it will also be deprecated in 3.13 and hopefully removed in 3.15 as well.

CC @AlexWaygood @merwok @vstinner who reviewed the first PR.

sobolevn and others added 2 commits November 22, 2023 16:28
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

LGTM, thanks! As discussed in https://github.com/python/cpython/pull/112279/files#r1402002908, however, let's deprecate getargvalues() first 👍

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 14, 2026
@vstinner

Copy link
Copy Markdown
Member

@sobolevn: This change has been approved but was never merged. It's now outdated since it mentions Python 3.13. Do you still plan to work on this PR? If not, I suggest closing it.

@sobolevn sobolevn closed this May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge DO-NOT-MERGE stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants