GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.6] bpo-28814: Undeprecate inadvertently deprecated inspect functions. (#122) by berkerpeksag · Pull Request #243 · python/cpython

Conversation

@berkerpeksag

@berkerpeksag berkerpeksag commented Feb 22, 2017

Copy link
Copy Markdown
Member

Nick Coghlan said on bpo-28814:

inspect.getargvalues() and inspect.formatargvalues() were deprecated
in Python 3.5 as part of implementing bpo-20438

This is incorrect, as these are frame introspection related functions,
not callable introspection ones. The documentation and implementation
layout is confusing though, as they're interleaved with the callable
introspection operation

This commit undeprecates these functions and adds a note to ignore
previous deprecation notices.

(cherry picked from commit 0899b98)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Carreau @berkerpeksag
bpo-28814: Undeprecate inadvertently deprecated inspect functions. (p…
4861158
…ython#122)

Nick Coghlan said on bpo-28814:

> inspect.getargvalues() and inspect.formatargvalues() were deprecated
> in Python 3.5 as part of implementing bpo-20438

> This is incorrect, as these are *frame* introspection related functions,
> not callable introspection ones. The documentation and implementation
> layout is confusing though, as they're interleaved with the callable
> introspection operation

This commit undeprecates these functions and adds a note to ignore
previous deprecation notices.

(cherry picked from commit 0899b98)
@berkerpeksag berkerpeksag added the cherry-pick for 3.6 label Feb 22, 2017
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Feb 22, 2017
@1st1

1st1 commented Feb 22, 2017

Copy link
Copy Markdown
Member

I'd like to keep a note that inspect.signature API is superior and is recommended to use instead of inspect.getargspec.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@berkerpeksag

berkerpeksag commented Feb 22, 2017

Copy link
Copy Markdown
Member Author

Hi @1st1, I agree but can we add it in a separate pull request? This is a backport PR and I'd like to keep this commit as a cherry-pick of 0899b98 :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@1st1

1st1 commented Feb 22, 2017

Copy link
Copy Markdown
Member

Sure. Would you be able to create a new PR for that? Or I can do it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@berkerpeksag

berkerpeksag commented Feb 22, 2017

Copy link
Copy Markdown
Member Author

If you have some spare time this week, that would be great! Otherwise, I will do it next week and ping you to get a review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Carreau

Carreau commented Feb 23, 2017

Copy link
Copy Markdown
Contributor

I'd like to keep a note that inspect.signature API is superior and is recommended to use instead of inspect.getargspec.

I'm confused, I did not remove such statement and it is already in inspect.rst:

.. deprecated:: 3.0
      Use :func:`getfullargspec` for an updated API that is usually a drop-in
      replacement, but also correctly handles function annotations and
      keyword-only parameters.

      Alternatively, use :func:`signature` and
      :ref:`Signature Object <inspect-signature-object>`, which provide a
      more structured introspection API for callables.

getargspec also emit a deprecation warning that point to signature() I can try to do a PR if I better understand what you meant.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Mariatta
Mariatta approved these changes Feb 23, 2017
View reviewed changes
@ncoghlan
ncoghlan merged commit 2197eac into python:3.6 Feb 23, 2017
@ncoghlan

ncoghlan commented Feb 23, 2017

Copy link
Copy Markdown
Contributor

@1st1 As @Carreau notes, these PRs aren't about the function introspection APIs (which are covered by http://bugs.python.org/issue27172 ). Rather, they're about http://bugs.python.org/issue28814, which covers a couple of frame introspection APIs that were inadvertently caught up in those deprecations because they're mixed in with the function introspection ones.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@berkerpeksag
berkerpeksag deleted the 122-backport-3.6 branch February 23, 2017 23:02
jaraco added a commit to jaraco/cpython that referenced this pull request Feb 17, 2023
@jaraco
ValueError is the exception that needs suppressing. Fixes python#243.
b0968d5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Mariatta Mariatta Mariatta approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@berkerpeksag @1st1 @Carreau @ncoghlan @Mariatta @the-knights-who-say-ni
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.