-
Notifications
You must be signed in to change notification settings - Fork 146
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
Fixed AssertionError when using nest_asyncio #841
Conversation
This stems from the incorrect placement of `nest_asyncio.apply()`, as it should be called before `asyncio.run()`. Fixes #840.
I don't know how to write a test for this, as |
you could try with:
|
I've added a test and verified that it fails without this patch. |
I can confirm that this patch fixes the problem for us |
@agronholm I just have came across this, but would be better implementing the logic for accomodating some varities of task-like objects I think. what's your opinion? |
If you find a problem not fixed by this PR, let me know. Otherwise I'm not inclined to add any more code just because. |
Hi, thank you so much for providing the fix for this issue. I wonder if we can create a release for this so I can download? |
Please take your time. I pin to 4.6.2 at the moment. |
All done now; v4.8.0 is out. |
awesome. Thank you so much. |
Changes
Refactored
TaskStateStore
to not check explicitly againstasyncio.Task
, asnest-asyncio
replaces the asyncio modules.Fixes #840.
Checklist
If this is a user-facing code change, like a bugfix or a new feature, please ensure that
you've fulfilled the following conditions (where applicable):
tests/
) added which would fail without your patchdocs/
, in case of behavior changes or newfeatures)
docs/versionhistory.rst
).If this is a trivial change, like a typo fix or a code reformatting, then you can ignore
these instructions.
Updating the changelog
If there are no entries after the last release, use
**UNRELEASED**
as the version.If, say, your patch fixes issue #123, the entry should look like this:
If there's no issue linked, just link to your pull request instead by updating the
changelog after you've created the PR.