Skip to content

asyncio.graph.format_call_graph() should use io.Writer instead of typing.TextIO #133893

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

Closed
srittau opened this issue May 11, 2025 · 0 comments
Closed
Labels
stdlib Python modules in the Lib dir topic-asyncio type-feature A feature request or enhancement

Comments

@srittau
Copy link
Contributor

srittau commented May 11, 2025

Feature or enhancement

Proposal:

The file argument to format_call_graph() gets forwarded to print(file), which is annotated as _typeshed.SupportsWrite[str] in typeshed. SupportsWrite is typeshed's legacy variant of io.Writer.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@srittau srittau added the type-feature A feature request or enhancement label May 11, 2025
@picnixz picnixz added topic-asyncio stdlib Python modules in the Lib dir labels May 11, 2025
@github-project-automation github-project-automation bot moved this to Todo in asyncio May 11, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 11, 2025
…ter (pythonGH-133894)

(cherry picked from commit 1d3eace)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
sobolevn pushed a commit that referenced this issue May 11, 2025
…iter (GH-133894) (#133901)

gh-133893: asyncio.graph: Replace TextIO annotation with io.Writer (GH-133894)
(cherry picked from commit 1d3eace)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
@github-project-automation github-project-automation bot moved this from Todo to Done in asyncio May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir topic-asyncio type-feature A feature request or enhancement
Projects
Status: Done
Development

No branches or pull requests

3 participants