-
-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpo-43118: Fix bug in inspect.signature around 'base.__text_signature…
…__' (GH-30285) (#30765) (cherry picked from commit 881a763) Co-authored-by: Weipeng Hong <hongweichen8888@sina.com> Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
- Loading branch information
1 parent
923c994
commit 83aef4d
Showing
4 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Tests class have ``__text_signature__`` | ||
|
||
from __future__ import annotations | ||
|
||
DEFAULT_BUFFER_SIZE = 8192 | ||
|
||
class BufferedReader(object): | ||
"""BufferedReader(raw, buffer_size=DEFAULT_BUFFER_SIZE)\n--\n\n | ||
Create a new buffered reader using the given readable raw IO object. | ||
""" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
Misc/NEWS.d/next/Library/2021-12-29-14-42-09.bpo-43118.BoVi_5.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Fix a bug in :func:`inspect.signature` that was causing it to fail on some | ||
subclasses of classes with a ``__text_signature__`` referencing module | ||
globals. Patch by Weipeng Hong. |