Skip to content
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

bpo-28814: Undeprecate inadvertantly deprecated inspect function. #122

Merged
merged 1 commit into from
Feb 22, 2017

Conversation

Carreau
Copy link
Contributor

@Carreau Carreau commented Feb 15, 2017

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

So un-deprecate in the doc, and leave a note to ignore previous
deprecation notice.

@Carreau
Copy link
Contributor Author

Carreau commented Feb 15, 2017

The documentation and implementation
layout is confusing though, as they're interleaved with the callable
introspection operation

I did not touch the code but I'll be happy to move these 2 functions into the "stack frame extraction" section of inspect.py

.. note::

Function :func:`~inspect.getargvalues` and :func:`~inspect.formatargvalues`
where inadvertantly marked as deprecated with with the release of Python 3.5.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Accidentally doubled word here: s/with with/with/

@ncoghlan
Copy link
Contributor

Thanks! This mostly looks good to me, just one accidentally doubled word to fix before it can be merged.

:ref:`Signature Object <inspect-signature-object>`, which provide a
better introspecting API for callables.
.. note::
This function was inadvertantly marked as deprecated in Python 3.5. Ignore
Copy link
Member

Choose a reason for hiding this comment

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

typo: inadvertently

Copy link
Member

Choose a reason for hiding this comment

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

"Ignore previous deprecation notice." is superfluous and can be deleted in my opinion.


.. note::

Function :func:`~inspect.getargvalues` and :func:`~inspect.formatargvalues`
Copy link
Member

Choose a reason for hiding this comment

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

Function -> Functions

Copy link
Member

Choose a reason for hiding this comment

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

Indentation should use 3 or 4 spaces:

.. note::
   Functions [...]

Copy link
Member

Choose a reason for hiding this comment

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

Or start with:

:func:`~inspect.getargvalues` and :func:`~inspect.formatargvalues` functions were inadvertently [...]

I'm not a native speaker so I hope @ncoghlan will chime in here :)

.. note::

Function :func:`~inspect.getargvalues` and :func:`~inspect.formatargvalues`
where inadvertantly marked as deprecated with with the release of Python 3.5.0
Copy link
Member

Choose a reason for hiding this comment

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

typo: inadvertantly -> inadvertently

Copy link
Member

Choose a reason for hiding this comment

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

Please add a dot at the end of the sentence.

@Carreau
Copy link
Contributor Author

Carreau commented Feb 20, 2017

Thanks ! Comments addressed.

Copy link
Member

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me, just left two minor comments :)

.. note::

:func:`~inspect.getargvalues` and :func:`~inspect.formatargvalues` functions
were inadvertently marked as deprecated with the release of Python 3.5.0
Copy link
Member

Choose a reason for hiding this comment

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

You forgot to end the sentence with a full stop :)

deprecated in favor of the :func:`inspect.signature` API. (Contributed by Yury
Selivanov in :issue:`20438`.)

.. note::
Copy link
Member

Choose a reason for hiding this comment

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

Looking at this again, I think using a note directive is not needed in 3.5 whatsnew page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean removing the .. note:: altogether along with the text, or just demote the text to a plain paragraph ?

Copy link
Member

Choose a reason for hiding this comment

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

Sorry, I wasn't clear in my earlier comment. I meant the latter one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, Done. And full stop added at the end.

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

So un-deprecate in the doc, and leave a note to ignore previous
deprecation notice.
@berkerpeksag berkerpeksag merged commit 0899b98 into python:master Feb 22, 2017
@berkerpeksag
Copy link
Member

Thanks!

@Carreau
Copy link
Contributor Author

Carreau commented Feb 22, 2017

Thanks!

Thanks as well.

@Carreau Carreau deleted the undeprecate branch February 22, 2017 18:23
berkerpeksag pushed a commit to berkerpeksag/cpython that referenced this pull request Feb 22, 2017
…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 pushed a commit to berkerpeksag/cpython that referenced this pull request Feb 22, 2017
…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)
@ncoghlan
Copy link
Contributor

@berkerpeksag Thanks, you picked up several things I missed :)

ncoghlan pushed a commit that referenced this pull request Feb 23, 2017
) (#243)

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)
ncoghlan pushed a commit that referenced this pull request Feb 23, 2017
) (#244)

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)
akruis pushed a commit to akruis/cpython that referenced this pull request Sep 9, 2017
The cache caused false block leak errors from test suite --huntrleaks / -R runs. The performance penalty is irrelevant in debug builds.

https://bitbucket.org/stackless-dev/stackless/issues/122
akruis pushed a commit to akruis/cpython that referenced this pull request Sep 9, 2017
jaraco pushed a commit that referenced this pull request Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants