Skip to content

bpo-33649: Add a high-level section about Futures; few quick fixes#9403

Merged
1st1 merged 10 commits into
python:masterfrom
1st1:fix
Sep 18, 2018
Merged

bpo-33649: Add a high-level section about Futures; few quick fixes#9403
1st1 merged 10 commits into
python:masterfrom
1st1:fix

Conversation

@1st1

@1st1 1st1 commented Sep 18, 2018

Copy link
Copy Markdown
Member

@1st1

1st1 commented Sep 18, 2018

Copy link
Copy Markdown
Member Author

@willingc @elprans please take a look.

@1st1
1st1 requested a review from willingc September 18, 2018 18:26

@willingc willingc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @1st1. A few small suggestions.

Comment thread Doc/library/asyncio-task.rst Outdated
Comment thread Doc/library/asyncio-task.rst Outdated
with regards to cancellation and introspection.

Many asyncio APIs are documented to accept coroutines, Tasks, or
Futures. What it means is that they are ready to accept anything

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

By doing so, the async APIs are ready to accept anything which you can await on.

Comment thread Doc/library/asyncio-task.rst Outdated

Return a Future aggregating results from the given coroutine objects,
Tasks, or Futures.
Return a :class:`Future` aggregating results from the given

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

*fs is used in this section without any prior mention on the page. We should have a brief verbal description here.

Comment thread Doc/library/asyncio-task.rst
@1st1

1st1 commented Sep 18, 2018

Copy link
Copy Markdown
Member Author

@willingc Carol, I decided to introduce awaitables and use them to simplify (hopefully!) the docs. Please take another look.

@willingc willingc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I love it! I think awaitables will simplify understanding a bit. Then, we can work toward high level guidance on what is Task, Future, Coroutine are and when to consider using. :shipit:

@willingc

Copy link
Copy Markdown
Contributor

Great suggestion @elprans re: *fs sequence 👍

@1st1
1st1 merged commit 4715039 into python:master Sep 18, 2018
@miss-islington

Copy link
Copy Markdown
Contributor

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

@1st1
1st1 deleted the fix branch September 18, 2018 21:55
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 18, 2018
…ythonGH-9403)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
(cherry picked from commit 4715039)

Co-authored-by: Yury Selivanov <yury@magic.io>
@bedevere-bot

Copy link
Copy Markdown

GH-9409 is a backport of this pull request to the 3.7 branch.

miss-islington added a commit that referenced this pull request Sep 18, 2018
…H-9403)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
(cherry picked from commit 4715039)

Co-authored-by: Yury Selivanov <yury@magic.io>
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 skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants