Skip to content
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

Fix a code snippet typo in asyncio docs #108427

Merged
merged 1 commit into from Aug 24, 2023
Merged

Conversation

Dumeng
Copy link
Contributor

@Dumeng Dumeng commented Aug 24, 2023

Fix a code snippet typo in asyncio-task docs. The coroutine in the sample code should be protected by the shield.


📚 Documentation preview 📚: https://cpython-previews--108427.org.readthedocs.build/

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting review labels Aug 24, 2023
@kumaraditya303 kumaraditya303 enabled auto-merge (squash) August 24, 2023 16:27
@kumaraditya303 kumaraditya303 merged commit 7f31676 into python:main Aug 24, 2023
25 checks passed
@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Oct 24, 2023
@miss-islington-app
Copy link

Thanks @Dumeng for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @Dumeng for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 24, 2023
(cherry picked from commit 7f31676)

Co-authored-by: A <5249513+Dumeng@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 24, 2023

GH-111244 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 24, 2023
(cherry picked from commit 7f31676)

Co-authored-by: A <5249513+Dumeng@users.noreply.github.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Oct 24, 2023
@bedevere-app
Copy link

bedevere-app bot commented Oct 24, 2023

GH-111245 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Oct 24, 2023
hugovk pushed a commit that referenced this pull request Oct 24, 2023
Co-authored-by: A <5249513+Dumeng@users.noreply.github.com>
hugovk pushed a commit that referenced this pull request Oct 24, 2023
Co-authored-by: A <5249513+Dumeng@users.noreply.github.com>
@gvanrossum
Copy link
Member

Whoa. Did anyone actually review this? The example was part of an explanation of what shield() does in terms of other operations, with a careful explanation of what differs below the snippet. This PR changed the equivalence to a tautology. Please revert.

@zware
Copy link
Member

zware commented Oct 24, 2023

I'm rather late to the party here, but I don't agree with this change. The point of the original example was that, in the absence of cancellation, await shield(create_task(coro())) behaves the same as await coro() for all practical purposes. The point of the new example is that...await shield(coro()) is the same as await shield(coro()), which seems self-evident.

And as I was typing this, Guido posted his comment as well. I'll start the revert.

zware added a commit to zware/cpython that referenced this pull request Oct 24, 2023
This reverts commit 7f31676.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

Ref: python#108427 (comment)
zware added a commit that referenced this pull request Oct 24, 2023
This reverts commit 7f31676.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

Ref: #108427 (comment)
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 24, 2023
…ythonGH-111271)

This reverts commit 7f31676.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

(cherry picked from commit c7d68f9)

Co-authored-by: Zachary Ware <zach@python.org>
Ref: https://github.com/python/cpython/pull/108427GH-issuecomment-1777525740
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 24, 2023
…ythonGH-111271)

This reverts commit 7f31676.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

(cherry picked from commit c7d68f9)

Co-authored-by: Zachary Ware <zach@python.org>
Ref: https://github.com/python/cpython/pull/108427GH-issuecomment-1777525740
@Dumeng
Copy link
Contributor Author

Dumeng commented Oct 24, 2023

Sorry for the inappropriate change. I, maybe the reviewers also, thought the snippet is for explaining the statement above. I didn't realize it's for explaining the equivalence. Maybe we can add a statement before the snippet to explicitly point out the equivalence.

@zware
Copy link
Member

zware commented Oct 24, 2023

I opened gh-111274 for discussing whether there should actually be a change here.

zware added a commit that referenced this pull request Oct 24, 2023
…H-111271) (GH-111272)

Revert "Fix a code snippet typo in asyncio docs (GH-108427)" (GH-111271)

This reverts commit 7f31676.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

(cherry picked from commit c7d68f9)


Ref: #108427 (comment)

Co-authored-by: Zachary Ware <zach@python.org>
zware added a commit that referenced this pull request Oct 24, 2023
…H-111271) (GH-111273)

Revert "Fix a code snippet typo in asyncio docs (GH-108427)" (GH-111271)

This reverts commit 7f31676.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

(cherry picked from commit c7d68f9)


Ref: #108427 (comment)

Co-authored-by: Zachary Ware <zach@python.org>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…honGH-111271)

This reverts commit 7f31676.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

Ref: python#108427 (comment)
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 issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants