Skip to content

gh-108901: Deprecate inspect.getcallargs and slate it for removal#112236

Open
sobolevn wants to merge 6 commits intopython:mainfrom
sobolevn:issue-108901-getcallargs
Open

gh-108901: Deprecate inspect.getcallargs and slate it for removal#112236
sobolevn wants to merge 6 commits intopython:mainfrom
sobolevn:issue-108901-getcallargs

Conversation

@sobolevn
Copy link
Copy Markdown
Member

@sobolevn sobolevn commented Nov 18, 2023

Since this function already has a modern alternative and was deprecated since 3.5, I've added a runtime warning for this function and slated it for removal in two versions (3.15) from now.


📚 Documentation preview 📚: https://cpython-previews--112236.org.readthedocs.build/

Comment thread Lib/test/test_inspect/test_inspect.py Outdated
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Comment thread Misc/NEWS.d/next/Library/2023-11-18-17-01-45.gh-issue-108901.T3p5ie.rst Outdated
Comment thread Doc/whatsnew/3.13.rst Outdated
Copy link
Copy Markdown
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

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

I am not familiar with the details of code deprecation, but I improved the wording of the public announcements.

@sobolevn
Copy link
Copy Markdown
Member Author

@terryjreedy thank you!

@terryjreedy
Copy link
Copy Markdown
Member

terryjreedy commented Nov 18, 2023

The added code looks sensible but I would want someone more knowledgeable to check and a manual test of the notice.
EDIT: remove mistaken comment, and hide sobolevn's correct response thereto.

@sobolevn

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@itamaro itamaro left a comment

Choose a reason for hiding this comment

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

phrasing nits in the news and whatnew entries

Comment thread Doc/whatsnew/3.13.rst Outdated
Comment thread Misc/NEWS.d/next/Library/2023-11-18-17-01-45.gh-issue-108901.T3p5ie.rst Outdated
Co-authored-by: Itamar Oren <itamarost@gmail.com>
Comment thread Doc/library/inspect.rst Outdated
Comment thread Lib/inspect.py Outdated
Comment thread Misc/NEWS.d/next/Library/2023-11-18-17-01-45.gh-issue-108901.T3p5ie.rst Outdated
Comment thread Doc/whatsnew/3.13.rst Outdated
Comment thread Lib/test/test_inspect/test_inspect.py Outdated
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexWaygood
Copy link
Copy Markdown
Member

Ah, I see @hugovk asked for some changes in #108901 (comment) -- I'll hold off merging for now :)

@Wulian233
Copy link
Copy Markdown
Contributor

I also recently found this issue, which may have been forgotten here, and needs to be removed in the 3.16 if added in 3.14

@vstinner
Copy link
Copy Markdown
Member

@sobolevn: What's the status of your PR?

@sobolevn
Copy link
Copy Markdown
Member Author

I guess that I will have to start everything over in 3.15 :)

@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
@hugovk
Copy link
Copy Markdown
Member

hugovk commented Apr 14, 2026

I guess that I will have to start everything over in 3.15 :)

You have 3 weeks, or start over in 3.16 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants