-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add asyncio.graph
, updates to asyncio.futures
(3.14)
#14003
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
302358a
Asyncio future/graph updates
max-muoto 278728a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 0627365
Update __all__
max-muoto dc7e99b
Tweak
max-muoto 57c02a9
Fix
max-muoto ab2917d
Merge branch 'main' into asyncio-future-graph
max-muoto 6725d39
Fix
max-muoto b0004f9
Fix
max-muoto 8bfa488
Use Generic
max-muoto b139531
Address comments
max-muoto 4928caa
Switch to `SupportsWrite`
max-muoto 2ff3b9f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d518601
Address comment
max-muoto 510b52f
Merge branch 'main' into asyncio-future-graph
max-muoto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,26 @@ | ||
from _typeshed import SupportsWrite | ||
from asyncio import Future | ||
from dataclasses import dataclass | ||
from types import FrameType | ||
from typing import Any, overload | ||
|
||
__all__ = ("capture_call_graph", "format_call_graph", "print_call_graph", "FrameCallGraphEntry", "FutureCallGraph") | ||
|
||
@dataclass(frozen=True) | ||
class FrameCallGraphEntry: | ||
frame: FrameType | ||
|
||
@dataclass(frozen=True) | ||
class FutureCallGraph: | ||
future: Future[Any] | ||
call_stack: tuple[FrameCallGraphEntry, ...] | ||
awaited_by: tuple[FutureCallGraph, ...] | ||
|
||
@overload | ||
def capture_call_graph(future: None = None, /, *, depth: int = 1, limit: int | None = None) -> FutureCallGraph | None: ... | ||
@overload | ||
def capture_call_graph(future: Future[Any], /, *, depth: int = 1, limit: int | None = None) -> FutureCallGraph | None: ... | ||
def format_call_graph(future: Future[Any] | None = None, /, *, depth: int = 1, limit: int | None = None) -> str: ... | ||
def print_call_graph( | ||
future: Future[Any] | None = None, /, *, file: SupportsWrite[str] | None = None, depth: int = 1, limit: int | None = None | ||
) -> None: ... |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.