Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cpython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sip
Cpython
Commits
8f30267a
Unverified
Commit
8f30267a
authored
2 years ago
by
C.A.M. Gerlach
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
gh-95913: Copyedit & xref FrameInfo in Whatsnew inspect section (#98304)
parent
62bf5d8d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Doc/library/inspect.rst
+15
-7
15 additions, 7 deletions
Doc/library/inspect.rst
Doc/whatsnew/3.11.rst
+20
-9
20 additions, 9 deletions
Doc/whatsnew/3.11.rst
with
35 additions
and
16 deletions
Doc/library/inspect.rst
+
15
−
7
View file @
8f30267a
...
...
@@ -434,8 +434,10 @@ attributes:
Return ``True`` if the type of object is a :class:`~types.MethodWrapperType`.
These are instances of :class:`~types.MethodWrapperType`, such as :meth:`~object().__str__`,
:meth:`~object().__eq__` and :meth:`~object().__repr__`
These are instances of :class:`~types.MethodWrapperType`, such as :meth:`~object.__str__`,
:meth:`~object.__eq__` and :meth:`~object.__repr__`.
.. versionadded:: 3.11
.. function:: isroutine(object)
...
...
@@ -1206,12 +1208,13 @@ is considered deprecated and may be removed in the future.
number, start column offset, and end column offset associated with the
instruction being executed by the frame this record corresponds to.
.. versionchanged:: 3.5
Return a named tuple instead of a tuple.
.. versionchanged:: 3.5
Return a :term:`named tuple` instead of a :class:`tuple`.
.. versionchanged:: 3.11
:class:`!FrameInfo` is now a class instance
(that is backwards compatible with the previous :term:`named tuple`).
.. versionchanged:: 3.11
Changed the return object from a named tuple to a regular object (that is
backwards compatible with the previous named tuple).
.. class:: Traceback
...
...
@@ -1245,6 +1248,11 @@ is considered deprecated and may be removed in the future.
the instruction being executed by the frame this traceback corresponds
to.
.. versionchanged:: 3.11
:class:`!Traceback` is now a class instance
(that is backwards compatible with the previous :term:`named tuple`).
.. note::
Keeping references to frame objects, as found in the first element of the frame
...
...
This diff is collapsed.
Click to expand it.
Doc/whatsnew/3.11.rst
+
20
−
9
View file @
8f30267a
...
...
@@ -775,22 +775,33 @@ IDLE and idlelib
* Include prompts when saving Shell with inputs and outputs.
(Contributed by Terry Jan Reedy in :gh:`95191`.)
.. _whatsnew311-inspect:
inspect
-------
* Add :func:`inspect.getmembers_static`: return all members without
* Add :func:`~inspect.getmembers_static` to return all members without
triggering dynamic lookup via the descriptor protocol. (Contributed by
Weipeng Hong in :issue:`30533`.)
* Add :func:`inspect.ismethodwrapper` for checking if the type of an object is a
:class:`~types.MethodWrapperType`. (Contributed by Hakan Çelik in :issue:`29418`.)
* Add :func:`~inspect.ismethodwrapper`
for checking if the type of an object is a :class:`~types.MethodWrapperType`.
(Contributed by Hakan Çelik in :issue:`29418`.)
* Change the frame-related functions in the :mod:`inspect` module to return a
regular object (that is backwards compatible with the old tuple-like
interface) that include the extended :pep:`657` position information (end
* Change the frame-related functions in the :mod:`inspect` module to return new
:class:`~inspect.FrameInfo` and :class:`~inspect.Traceback` class instances
(backwards compatible with the previous :term:`named tuple`-like interfaces)
that includes the extended :pep:`657` position information (end
line number, column and end column). The affected functions are:
:func:`inspect.getframeinfo`, :func:`inspect.getouterframes`, :func:`inspect.getinnerframes`,
:func:`inspect.stack` and :func:`inspect.trace`. (Contributed by Pablo Galindo in
:gh:`88116`.)
* :func:`inspect.getframeinfo`
* :func:`inspect.getouterframes`
* :func:`inspect.getinnerframes`,
* :func:`inspect.stack`
* :func:`inspect.trace`
(Contributed by Pablo Galindo in :gh:`88116`.)
locale
------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment