Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add modern alternatives to inspect module, deprecate old incorrect APIs #108901

Copy link
Copy link
@sobolevn

Description

@sobolevn
Issue body actions

Feature or enhancement

Proposal:

I propose to provide modern alternatives to and deprecate these inspect members:

Notice: formatargvalues should also be deprecated, because the only way to use is together with getargvalues.

There was a reverted attempt to depracate them in 3.5

It has a rich history of deprecation / undeprecation:

More history: #76371 (comment)

It is broken in a sense that it does not differentiate pos-only from pos-or-keyword parameters.

Can it be replaced with modern tooling? Partially: inspect.signature has some differences. But, getfullargspec() uses signature() internally

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/consider-deprecating-a-bunch-of-inspect-functions/31369

CC @gpshead

Linked PRs

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
No fields configured for issues without a type.

Projects

Status
No status
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.