Thriftpy / thriftpy

Thriftpy has been deprecated, please migrate to https://github.com/Thriftpy/thriftpy2
MIT License
1.15k stars 286 forks source link

Asyncio Support #299

Open wvonnegut-zz opened 7 years ago

wvonnegut-zz commented 7 years ago

Implement simple client/server for asyncio-based applications. Only TFramedTransport is supported, but both client and server will work with any protocol (both cython and pure python implementations).

Largely inspired by https://github.com/ryanwang520/aiothrift

wvonnegut-zz commented 7 years ago

I'm a bit stumped on the right way to fix my failing tests, which are only compatible with python>=3.5.

I wasn't able to find a clean way to enforce this in tox.ini, so I added conftest.py to check the current interpreter version and update collect_ignore accordingly.

This works for tox -e py35 - additional dependencies are installed, and tests pass both locally and in travis.

The failures come up when running tox -e py - test_asyncio.py still gets run (python version is python-3.5.1), but the py35 dependencies aren't installed.

Any thoughts on an idiomatic way to solve this?

julioasotodv commented 7 years ago

I really think that this should be reviewed, given that it would be a major improvement to the library.

Obviously, it doesn't make sense to test anything <= py3.4 in this case.