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

bpo-32309: Add support for contextvars in asyncio.to_thread() #20278

Merged
merged 2 commits into from May 21, 2020

Conversation

aeros
Copy link
Member

@aeros aeros commented May 21, 2020

Allows contextvars from the main thread to be accessed in the separate thread used in asyncio.to_thread(). See the discussion in GH-20143 for context.

https://bugs.python.org/issue32309

Automerge-Triggered-By: @aeros

* Also, adds missing versionadded in the documentation

Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
@aeros
Copy link
Member Author

aeros commented May 21, 2020

Skipping the news entry since this is effectively just a small revision to GH-20143.

/cc @1st1

Doc/library/asyncio-task.rst Outdated Show resolved Hide resolved
1st1
1st1 approved these changes May 21, 2020
Copy link
Member

@1st1 1st1 left a comment

lgtm, don't forget to backport to 3.9

Co-authored-by: Yury Selivanov <yury@edgedb.com>
@aeros aeros added the 🤖 automerge PR will be merged once it's been approved and all CI passed label May 21, 2020
@miss-islington
Copy link
Contributor

miss-islington commented May 21, 2020

@aeros: Status check is done, and it's a success .

@miss-islington miss-islington merged commit 0f56263 into python:master May 21, 2020
4 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented May 21, 2020

Thanks @aeros for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 21, 2020
…GH-20278)

Allows contextvars from the main thread to be accessed in the separate thread used in `asyncio.to_thread()`. See the [discussion](https://github.com/python/cpython/pull/20143GH-discussion_r427808225) in pythonGH-20143 for context.

Automerge-Triggered-By: @aeros
(cherry picked from commit 0f56263)

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

bedevere-bot commented May 21, 2020

GH-20279 is a backport of this pull request to the 3.9 branch.

miss-islington added a commit that referenced this pull request May 21, 2020
Allows contextvars from the main thread to be accessed in the separate thread used in `asyncio.to_thread()`. See the [discussion](https://github.com/python/cpython/pull/20143GH-discussion_r427808225) in GH-20143 for context.

Automerge-Triggered-By: @aeros
(cherry picked from commit 0f56263)

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
arturoescaip pushed a commit to arturoescaip/cpython that referenced this pull request May 24, 2020
…GH-20278)

Allows contextvars from the main thread to be accessed in the separate thread used in `asyncio.to_thread()`. See the [discussion](python#20143 (comment)) in pythonGH-20143 for context.

Automerge-Triggered-By: @aeros
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expert-asyncio 🤖 automerge PR will be merged once it's been approved and all CI passed skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants