-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support Trollius #9
Conversation
Updated pull request for Trollius. |
It seems that some unittests are failing, no? |
* Add GreenTrolliusTask, GreenTrolliusUnixSelectorLoop, GreenTrolliusEventLoopPolicy * Use backported TestCase of Trollius on Python 2 to get assertRaises() * Use exec() in test_tass.py because "yield from" raises a SyntaxError on Python 2 * New test_trollius.py testing the interoperability of Trollis and asyncio coroutines. greenio should support executing asyncio coroutines in a trollius event loop.
Correct, test_task_yield_from_invalid() was still failing on Python 3 with tulip. It should now be fixed. |
The exact error message depends on the version of Trollius and Tulip, if they have the new create_task() function. The check may be removed later when Trollius and Tulip with create_task() will be widely deployed.
The tests now pass, can you please merge my pull request Yury? |
Hi Victor, Can we avoid using |
* Add a new test_asyncio_trollius.py file to test asyncio and trollius interoperability * Move task tests for trollius into test_tasks_trollius.py * Remove unused "import socket" in test_socket.py
I reorganized tests to keep existing tests almost unchanged, but add new tests specific to Trollius. I also added the new file test_asyncio_trollius.py which I forgot when I created this new pull request. I tested the patch with:
I found a bug in Trollius during these tests! I already fixed it in Trollius. When this pull request will be merged, I will release a new version of Trollius to get a release with create_task(). It will be the minimum version to use greenio with trollius. |
Sorry, I reverted "add loop parameter to task() and yield_from()". It was not (directly) related to the Trollius pull request. I will propose again the loop parameter later. |
FYI I just release Trollius 1.0 which includes the new create_task() function. You need at least Trollius 1.0 to use greenio with Trollius. Thanks for the merge! |
GreenTrolliusEventLoopPolicy
on Python 2
asyncio coroutines. greenio should support executing asyncio
coroutines in a trollius event loop.