Skip to content

Docs: Add asyncio source code links #16640

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 7 commits into from
Oct 10, 2019
Merged

Conversation

aeros
Copy link
Contributor

@aeros aeros commented Oct 8, 2019

Many of the other stdlib modules link to the source code in the documentation pages. Asyncio currently does not.

This PR adds source code links to the documentation pages for asyncio. It also fixes the location of a reference point in asyncio-eventloop.rst (which fixes a link in asyncio.rst), adds a Sphinx term (link to glossary) for "coroutine" in asyncio-task.rst, and fixes a minor grammar typo.

Comment on lines +21 to +23
:term:`Coroutines <coroutine>` declared with the async/await syntax is the
preferred way of writing asyncio applications. For example, the following
snippet of code (requires Python 3.7+) prints "hello", waits 1 second,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to adjust the word wrapping here after adding the Sphinx role and grammar fix.

@aeros
Copy link
Contributor Author

aeros commented Oct 8, 2019

Yury had approved of the idea to add source code links to the asyncio docs.

/cc @1st1

@aeros aeros requested a review from 1st1 October 8, 2019 18:48
@aeros aeros requested a review from 1st1 October 10, 2019 21:47
@1st1
Copy link
Member

1st1 commented Oct 10, 2019

Alright, let's merge this! Thank you, Kyle!

@1st1 1st1 merged commit f900064 into python:master Oct 10, 2019
@miss-islington
Copy link
Contributor

Thanks @aeros for the PR, and @1st1 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 10, 2019
(cherry picked from commit f900064)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
@bedevere-bot
Copy link

GH-16711 is a backport of this pull request to the 3.8 branch.

@miss-islington
Copy link
Contributor

Sorry, @aeros and @1st1, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker f900064ac4b35226caad7502abc8a7e64f1c0e9d 3.7

@1st1
Copy link
Member

1st1 commented Oct 10, 2019

@aeros You'll need to manually create a PR towards 3.7 (although I suggest not too, as the site will soon switch to rendering 3.8 branch)

miss-islington added a commit that referenced this pull request Oct 10, 2019
(cherry picked from commit f900064)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
@aeros
Copy link
Contributor Author

aeros commented Oct 10, 2019

@1st1

although I suggest not too, as the site will soon switch to rendering 3.8 branch

Oh okay, we can just skip the 3.7 backport then. I'm mostly concerned with the source links being present in the latest stable version of the docs and for 3.9.

@aeros
Copy link
Contributor Author

aeros commented Oct 10, 2019

Also, thanks for the great feedback and discussions as usual Yury. (:

jacobneiltaylor pushed a commit to jacobneiltaylor/cpython that referenced this pull request Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants