Skip to content

The asyncio documentation is missing a landing page #124668

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
jedreky opened this issue Sep 27, 2024 · 7 comments
Closed

The asyncio documentation is missing a landing page #124668

jedreky opened this issue Sep 27, 2024 · 7 comments
Labels
docs Documentation in the Doc dir easy topic-asyncio

Comments

@jedreky
Copy link

jedreky commented Sep 27, 2024

Documentation

Hi, I have just spent about 2 days figuring out how to use asyncio in my project. I realised that the asyncio documentation is missing a landing page where a developer who's not familiar with async programming can get some basic understanding of the library and more importantly can find out which tools will be appropriate for their specific situation.

For instance in my situation the main problem was that I wanted an event loop to which I can dynamically on-the-fly add new tasks. This seems pretty standard, but nevertheless it took some browsing and I finally I found an answer here: https://stackoverflow.com/questions/34499400/how-to-add-a-coroutine-to-a-running-asyncio-loop. I think an example like this should be somewhere in the official documentation.

Also, my process is started by the multiprocessing module, so I couldn't just use asyncio.run() (I think), I had to dig a bit deeper. The explanation of how to deal with the event loop is not always that detailed.

Anyway, I think this is a great library and it would be great to get more people to use it. I would be happy to contribute to the docs, but I would need support from someone who's an active developer of asyncio.

Linked PRs

@jedreky jedreky added the docs Documentation in the Doc dir label Sep 27, 2024
@AA-Turner AA-Turner changed the title asyncio documentation The asyncio documentation is missing a landing page Sep 27, 2024
@AA-Turner
Copy link
Member

cc @kumaraditya303 @graingert

@kumaraditya303
Copy link
Contributor

I agree, the docs does need improvement of asyncio overall, PR welcome!

@xuantengh
Copy link
Contributor

xuantengh commented Oct 16, 2024

Hi, I'm wondering if I can assgin this to myself? Currently I think we should put the mostly used APIs in the landing page (https://docs.python.org/3/library/asyncio.html), including run, create_task, TaskGroup and the event loop. Besides, I think the asyncio REPL is not an key point needs to be put in the landing page.

Looking forward to your feedback.

@graingert
Copy link
Contributor

Hi, I'm wondering if I can assgin this to myself? Currently I think we should put the mostly used APIs in the landing page (https://docs.python.org/3/library/asyncio.html), including run, create_task, TaskGroup and the event loop. Besides, I think the asyncio REPL is not an key point needs to be put in the landing page.

Looking forward to your feedback.

I don't think asyncio.create_task should be documented on the landing page as it's very difficult to use correctly and so we should stear most users away from it. Instead the landing page should document creating tasks with TaskGroup only

@xuantengh
Copy link
Contributor

I don't think asyncio.create_task should be documented on the landing page as it's very difficult to use correctly and so we should stear most users away from it. Instead the landing page should document creating tasks with TaskGroup only

Sure, I can create a PR later.

@willingc
Copy link
Contributor

Hi folks,

The structure of the current asyncio landing page includes the following contents:

  • High level API (end users)
  • Low level API (targeted at library maintainers)
  • Guides and Tutorials
Screenshot 2024-10-17 at 1 47 07 AM

Examples of how to use asyncio would be best placed under the "Guides and Tutorials" section. Thanks!
cc/ @1st1

@willingc
Copy link
Contributor

Thanks @jedreky for the feedback and @xuantengh for creating a PR.

#79012 covers a broader need for more tutorial content. I recommend that we move the discussion to this duplicate issue, and close this issue.

@github-project-automation github-project-automation bot moved this from Todo to Done in asyncio Oct 17, 2024
@willingc willingc closed this as not planned Won't fix, can't repro, duplicate, stale Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir easy topic-asyncio
Projects
Status: Done
Development

No branches or pull requests

6 participants