Skip to content

Commit

Permalink
Ready to be reviewed
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Mar 9, 2024
1 parent 2d8fb97 commit 1c47526
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Doc/library/inspect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,8 @@ Classes and functions

.. deprecated-removed:: 3.13 3.15
Use :meth:`Signature.from_frame` instead.
For Python version older than 3.13 use ``inspect313`` PyPI package.
For Python version older than 3.13 use
`inspect313 <https://pypi.org/project/inspect313/>`_ PyPI package.

.. note::
This function was inadvertently marked as deprecated in Python 3.5.
Expand All @@ -1129,7 +1130,8 @@ Classes and functions

.. deprecated-removed:: 3.13 3.15
Use :meth:`Signature.from_frame` instead.
For Python version older than 3.13 use ``inspect313`` PyPI package.
For Python version older than 3.13 use
`inspect313 <https://pypi.org/project/inspect313/>`_ PyPI package.

.. note::
This function was inadvertently marked as deprecated in Python 3.5.
Expand Down
7 changes: 5 additions & 2 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1405,8 +1405,11 @@ CPython bytecode changes
Porting to Python 3.13
======================

This section lists previously described changes and other bugfixes
that may require changes to your code.
* :func:`inspect.getargvalues` and :func:`inspect.formatargvalues`
are deprecated. For Python 3.13+ use
new :meth:`inspect.Signature.from_frame` API.
For older versions, use `inspect313 <https://pypi.org/project/inspect313/>`_
PyPI package which is a backport of this API for Pythons from 3.8 to 3.12.

Changes in the Python API
-------------------------
Expand Down
1 change: 1 addition & 0 deletions Lib/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2258,6 +2258,7 @@ def _signature_strip_non_python_syntax(signature):
clean_signature = ''.join(text).strip().replace("\n", "")
return clean_signature, self_parameter


def _signature_fromstr(cls, obj, s, skip_bound_arg=True):
"""Private helper to parse content of '__text_signature__'
and return a Signature based on it.
Expand Down

0 comments on commit 1c47526

Please sign in to comment.