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

Commit 2197eac

Browse filesBrowse files
berkerpeksagncoghlan
authored andcommitted
bpo-28814: Undeprecate inadvertently deprecated inspect functions. (#122) (#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)
1 parent 55b82e1 commit 2197eac
Copy full SHA for 2197eac

File tree

2 files changed

+10
-13
lines changed
Filter options

2 files changed

+10
-13
lines changed

‎Doc/library/inspect.rst

Copy file name to clipboardExpand all lines: Doc/library/inspect.rst
+4-8Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -905,10 +905,8 @@ Classes and functions
905905
are the names of the ``*`` and ``**`` arguments or ``None``. *locals* is the
906906
locals dictionary of the given frame.
907907

908-
.. deprecated:: 3.5
909-
Use :func:`signature` and
910-
:ref:`Signature Object <inspect-signature-object>`, which provide a
911-
better introspecting API for callables.
908+
.. note::
909+
This function was inadvertently marked as deprecated in Python 3.5.
912910

913911

914912
.. function:: formatargspec(args[, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations[, formatarg, formatvarargs, formatvarkw, formatvalue, formatreturns, formatannotations]])
@@ -944,10 +942,8 @@ Classes and functions
944942
:func:`getargvalues`. The format\* arguments are the corresponding optional
945943
formatting functions that are called to turn names and values into strings.
946944

947-
.. deprecated:: 3.5
948-
Use :func:`signature` and
949-
:ref:`Signature Object <inspect-signature-object>`, which provide a
950-
better introspecting API for callables.
945+
.. note::
946+
This function was inadvertently marked as deprecated in Python 3.5.
951947

952948

953949
.. function:: getmro(cls)

‎Doc/whatsnew/3.5.rst

Copy file name to clipboardExpand all lines: Doc/whatsnew/3.5.rst
+6-5Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,11 +2327,12 @@ The :func:`inspect.getargspec` function is deprecated and scheduled to be
23272327
removed in Python 3.6. (See :issue:`20438` for details.)
23282328

23292329
The :mod:`inspect` :func:`~inspect.getfullargspec`,
2330-
:func:`~inspect.getargvalues`, :func:`~inspect.getcallargs`,
2331-
:func:`~inspect.getargvalues`, :func:`~inspect.formatargspec`, and
2332-
:func:`~inspect.formatargvalues` functions are deprecated in favor of
2333-
the :func:`inspect.signature` API.
2334-
(Contributed by Yury Selivanov in :issue:`20438`.)
2330+
:func:`~inspect.getcallargs`, and :func:`~inspect.formatargspec` functions are
2331+
deprecated in favor of the :func:`inspect.signature` API. (Contributed by Yury
2332+
Selivanov in :issue:`20438`.)
2333+
2334+
:func:`~inspect.getargvalues` and :func:`~inspect.formatargvalues` functions
2335+
were inadvertently marked as deprecated with the release of Python 3.5.0.
23352336

23362337
Use of :const:`re.LOCALE` flag with str patterns or :const:`re.ASCII` is now
23372338
deprecated. (Contributed by Serhiy Storchaka in :issue:`22407`.)

0 commit comments

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