Skip to content

[3.14] gh-133893: asyncio.graph: Replace TextIO annotation with io.Writer (GH-133894) #133901

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 1 commit into from
May 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Lib/asyncio/graph.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Introspection utils for tasks call graphs."""

import dataclasses
import io
import sys
import types

Expand All @@ -16,9 +17,6 @@
'FutureCallGraph',
)

if False: # for type checkers
from typing import TextIO

# Sadly, we can't re-use the traceback module's datastructures as those
# are tailored for error reporting, whereas we need to represent an
# async call graph.
Expand Down Expand Up @@ -270,7 +268,7 @@ def print_call_graph(
future: futures.Future | None = None,
/,
*,
file: TextIO | None = None,
file: io.Writer[str] | None = None,
depth: int = 1,
limit: int | None = None,
) -> None:
Expand Down
Loading