So I guess what I am after is "six for asyncio/Twisted" ;)

Isn't "six for asyncio/Twisted" covered by the fact that you can
implement one event loop in terms of another?  Idiomatic asyncio code

Yep, wrapping a network library for some protocol written for network framework X for users to run under framework Y would be another approach. We took a different one (below) ..

and idiomatic Twisted code can coexist on the same event loop without
any single component being written to a lowest common denominator that
supports both simultaneously without being idiomatic in either.  There
is a little work to be done at the boundaries to convert a Deferred into
something that can be yielded in an asyncio coroutine or vice versa, but
that seems to me to be preferable to trying to support multiple async
frameworks in one package.

For Autobahn, since it's a library, it would put one user community at a disadvantage by adding an additional dependency and run-time requirement on the other framework.

But it's not an issue. The dual support is already there for some time and I'm quite happy with it. It's about extending this dual support to unit tests.

Well, probably my situation is quite specific.

/Tobias

Reply via email to