trio-asyncio
trio-asyncio copied to clipboard
a re-implementation of the asyncio mainloop on top of Trio
I feel like trio-asyncio's core functionality is been pretty solid for a while, but we're still flailing a bit trying to find the most usable way to expose it to...
I was having a hard time figuring out why my program suddenly stopped working without any errors and without keyboard interrupts working. After a lot of digging, I found that...
Fixes DeprecationWarning in Py3.10 Closes #112
Some tests are failing with Python 3.10 while they are passing with Python 3.9 due to a `DeprecationWarning`. ```bash ============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-6.2.5,...
currently @aio_as_trio runs `__aenter__` and `__aexit__` in two different tasks, whereas some asyncio context managers are sensitive to being run in the same task so I've got a little util...
Many asyncio objects (such as asyncio.Lock) call `asyncio.get_event_loop()` in their constructor, if no loop was passed. Much asyncio-using code seems to assume that such objects can be created when no...
The following deadlocks: ```python @pytest.mark.trio async def test_raise_sleeping(self, loop): def raise_exc(): raise Exception() async def raise_sleeping(): loop.call_later(0.1, raise_exc) await asyncio.sleep(0.2) await trio_asyncio.aio_as_trio(raise_sleeping, loop=loop)() ``` It gets stuck in `run_aio_future` on...
`trio-asyncio` use [private `asyncio.BaseEventLoop._check_closed()`][0] method everywhere. We may want to switch to public [`.is_closed()`][1] instead. It was [introduced in Python 3.5][2]. See also: https://github.com/python-trio/trio-asyncio/pull/96#discussion_r551806302 [0]: https://github.com/python/cpython/blob/e4fe303b8cca525e97d44e80c7e53bdab9dd9187/Lib/asyncio/base_events.py#L508-L510 [1]: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.is_closed [2]: https://docs.python.org/3/whatsnew/3.5.html#asyncio
I'm having `NotImplementedError` trying to run an `asyncio`-based library ([chess](https://github.com/niklasf/python-chess)) that run an external process with `trio-asyncio`. It seems that `subprocess_exec` is not working as intended. Minimal example that shows...