Repository navigation
Conversation
Also necessary for `get_client` to work with uvloop
|
FYI this custom eventloop policy is one of the things why we currently have to pin pytest-asyncio |
|
cc @minrk
…On Mon, Sep 13, 2021 at 4:10 AM Florian Jetter ***@***.***> wrote:
FYI this custom eventloop policy is one of the things why we currently
have to pin pytest-asyncio
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5312 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACKZTFZLEUZKD63JQECB2LUBW5Z7ANCNFSM5D2JPRUA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
minrk
left a comment
There was a problem hiding this comment.
👍 to removing the policy. You can generally ensure a loop would exist in background threads yourself, without enforcing it via a policy, via the same logic applied in the policy.
try:
loop = asyncio.get_event_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)Then your code always behaves as desired, regardless of the configured policy.
| @property | ||
| def asynchronous(self): | ||
| return self.loop is IOLoop.current() | ||
| return self.loop is IOLoop.current(instance=False) |
There was a problem hiding this comment.
instance arg is deprecated in tornado 5, and minimum supported tornado is 6.0.3.
|
I've run into an issue that would be best fixed by this getting in. We currently rely on What would it take to get this PR in? The |
Oop, just noticed that this is apparently a known issue. Spent too long debugging weird failures for no reason then :/. |
|
Done in #5531 |
Just curious to see what fails so far.
With #5310 and #5311, closes #5309 (and ensures
uvloopwill work with everything)black distributed/flake8 distributed/isort distributed