Test tokio with other libraries
- https://github.com/aio-libs/aiorwlock/pull/35 passes
- https://github.com/aio-libs/aiomonitor/pull/41 fails
Awesome! Thanks!
Will check aiomonitor.
On May 10, 2017, at 1:29 PM, Nikolay Novik [email protected] wrote:
aio-libs/aiorwlock#35 https://github.com/aio-libs/aiorwlock/pull/35 passes aio-libs/aiomonitor#41 https://github.com/aio-libs/aiomonitor/pull/41 fails — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PyO3/tokio/issues/34, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkjzmV0pbWDiXZ2SoXrmNlalxlZJv2jks5r4h5CgaJpZM4NXLr-.
With tokio loop I am getting bunch of errors RuntimeError: Timeout context manager should be used inside a task when using loop.run_until_complete(coro) as result tests does not have a chance to start since such idiom ofter used in test fixtures. (asyncio and uvloop works as expected)
@pytest.fixture
def bucket_name(region, create_bucket, s3_client, loop):
> name = loop.run_until_complete(create_bucket(region))
E RuntimeError: Timeout context manager should be used inside a task
This is because Task.current_task() does not work with tokio loop. Yury Selivanov will will info loop.current_task() to asyncio pep. I added “loop.current_task()” to latest async_timeout and to aiohttp master.
On May 10, 2017, at 1:56 PM, Nikolay Novik [email protected] wrote:
With tokio loop I am getting bunch of errors RuntimeError: Timeout context manager should be used inside a task when using loop.run_until_complete(coro) as result tests does not have a chance to start since such idiom ofter used in test fixtures. (asyncio and uvloop works as expected)
@pytest.fixture def bucket_name(region, create_bucket, s3_client, loop):name = loop.run_until_complete(create_bucket(region))E RuntimeError: Timeout context manager should be used inside a task — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PyO3/tokio/issues/34#issuecomment-300610027, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkjzlQGfoNZ_WGTl_3U7Nt1FiB0kblaks5r4iSNgaJpZM4NXLr-.
Does tokio create its own rust Tasks? Why not Futures instead?
@jettify aiomonitor passes tests with aiohttp master
- https://github.com/aio-libs/aioredis - tests pass. some xfail tests pass as well, which is not good
I will merge those PRs soon, so tokio/uvloop can be tested on each PR continuously.
@jettify I think we need separate package for various asyncio related fixtures.
every library that test different event loops implements loop fixture
@fafhrd91 agreed there are few libraries, but not sure I like them (https://pypi.python.org/pypi/pytest-asyncio)
But we have enough fixters in aiohttp and other aio libs, we just need to extract those to separate package