theelous3 / multio Goto Github PK
View Code? Open in Web Editor NEWA unifying library for curio and trio, supporting both async libs for great good.
License: MIT License
A unifying library for curio and trio, supporting both async libs for great good.
License: MIT License
the spawn semantics are "weird"
since it's using open_memory_channel, etc.
setup.py: trio>=0.2.0
Please tag the previous and future releases of this software. Sometimes the commit messages make it apparent, but sometimes they don't. Using tags makes it unambiguous, and makes things easier on distro packagers like myself.
0.2.5 is on PyPI, but there's no tag in GitHub.
I noticed that the tests for this project pass with pytest 3.6.4, but fail with 3.7.0 or higher.
https://gist.github.com/carlwgeorge/26a07a6c6b99cb6bfb3530668eafe5b9
I'm not sure what changed in 3.7.0 to cause this. Travis appears to be preinstalling pytest 3.3.0, so it's not affected yet.
Obviously a stupid error of my part, but from a user perspective I think it would be nice if, in addition to strings, multio.init()
also accepted a module.
import curio
import multio
multio.init(curio) # This throws a KeyError
See config reference here: #5
@DavidJLindley this be your domain
Possible values are <dict_keys(['curio', 'trio'])>, not <asyncio>
Any specific reason to not allow asyncio there ?
One can pass a curio.ssl.SSLContext when using multio.open_connection, but this requires using curio.
Those two are not identical:
import trio
async def main():
c = trio.Semaphore(10)
async with c:
print('one in')
async with c:
print('two in')
trio.run(main)
one in
two in
but:
import trio
async def main():
c = trio.CapacityLimiter(10)
async with c:
print('one in')
async with c:
print('two in')
trio.run(main)
one in
RuntimeError: this borrower is already holding one of this CapacityLimiter's tokens
This means that I cannot open two connections in the same task https://github.com/Fuyukai/riopg.
Why did we restrict to 3.6.x and up?
trio currently supports >=3.5.2, and curio doesn't completely shit the bed. Also, it broke my asks tests (it also broke multio's tests)
I reverted it for now.
How about multio makes multio.init
optional, and uses sniffio to initialize itself? I suppose we'd have to make curio support sniffio first.
Possibly, init could be removed completely.
trio.Queue
has been deprecated in Trio 0.9.0 and removed in Trio 0.11.0, but multio
tries to use it:
Line 466 in b6b6251
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.