Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.5k
bpo-34014: Added support of contextvars for BaseEventLoop.run_in_executor#9688
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
1st1 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
[Blocking this to prevent accidental merge.]
As per the bpo discussion: our goal is to provide a new API for working with threadpools and processpools. If we end up having their design ready in a few months we might want to revisit this PR. If not, we'll likely merge this PR as is.
bedevere-bot commentedOct 4, 2018
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
hellysmile commentedOct 4, 2018
@1st1 thanks for the update! Is there any PEP/API spec/ideas available? |
hellysmile commentedOct 20, 2019
master was just merged |
hellysmile commentedOct 20, 2019
I have made the requested changes; please review again. |
bedevere-bot commentedOct 20, 2019
Thanks for making the requested changes! @1st1: please review the changes made to this pull request. |
1st1 commentedOct 20, 2019
I'm still not sure about this -- we can't make contextvars work with process pools. :( Need to design a new API for 3.9. You can champion that; first we need to start a discussion. We'll need to assess the current situation, what are the alternatives (curio, trio, twisted), and what's the best possible api we can design for asyncio given its constraints. |
hellysmile commentedOct 21, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@1st1 seems using something rather than https://github.com/python/cpython/blob/master/Lib/asyncio/base_events.py#L811 what about to restrict same way using not and silently apply propagation of then we can point this changes to |
1st1 commentedOct 21, 2019
Yeah, that's another problem, as we didn't do so in 3.7/3.8. @asvetlov what do you think? |
asvetlov commentedOct 21, 2019
process pool executor is forbidden asdefault because things like DNS resolving doesn't work with it IIRC. Sorry, I don't follow what the proposal is? Please elaboratesilently apply propagation of contextvars part |
Helps with setting the current client in worker while deserializing. Implementation referenced frompython/cpython#9688
Helps with setting the current client in worker while deserializing. Implementation referenced frompython/cpython#9688
NargiT commentedFeb 16, 2022
any news about this ? |
NargiT commentedMar 24, 2022
@asvetlov is there an alternative to this ? |
asvetlov commentedMar 30, 2022
Take a look at |
Uh oh!
There was an error while loading.Please reload this page.
An updated version of#8035
according to latest discussion onhttps://bugs.python.org/issue34014
If proposed solution looks good I'll start updating related docs changes
https://bugs.python.org/issue34014