1st1/greenio — pull request #7 by haypo (2014-07-10 16:18:06+00:00)
Title: Patch to prepare Python 2 support with Trollius

- Exception class has no __traceback__ attribute on Python 2: use
sys.exc_info() instead. I'm not sure that sys.exc_info() contains the
right traceback. I'm also using sys.exc_info() in Trollius in
Future.set_exception(), method usually called in an "except" block.
- "nonlocal" keyword is not supported in Python 2: use a mutable
dictionary instead
- socket.socket.recv has no docstring on Python 2
- Python 2 doesn't support function annotation: drop the single
annotation
- Port runtests.py to Python 2: the patch comes from Trollius
- Python 2 doesn't support "(self, *args, _from_sock=None, **kwargs)"
function prototype: use "(self, *args, **kwargs)" and pop manually
_from_sock from kwargs
- greenio.socket: add "from __future__ import absolute_import" to import
the socket module of the standard library, not greenio/socket.py