Hi,

I want to try to help PyPy 3, especially to run AsyncIO on PyPy 3.

For now, I've tried to compile PyPy from 3.3 branch, and install AsyncIO.
I'd an issue with time.monotonic() and time.get_clock_info() in AsyncIO,
because it isn't implemented in PyPy 3.

I've replaced that by time.time() and hardcoded value of
time.get_clock_info() return, only to see until AsyncIO should work on PyPy
3.

I've launched several examples from AsyncIO documentation, it works, except
when I launch a TCP client:
https://docs.python.org/3/library/asyncio-protocol.html#tcp-echo-client-protocol
I've the same issue with aiotest: https://bitbucket.org/haypo/aiotest All
tests pass, except:
$ ./pypy-c -Wd ../tulip/run_aiotest.py
Run tests in debug mode
...............E
======================================================================
ERROR: test_tcp_hello (aiotest.test_network.NetworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/lg/Documents/IDEA/pypy/site-packages/aiotest/test_network.py", line
78, in test_tcp_hello
    self.loop.run_until_complete(coro)
  File "/home/lg/Documents/IDEA/pypy/site-packages/asyncio/base_events.py",
line 317, in run_until_complete
    return future.result()
  File "/home/lg/Documents/IDEA/pypy/site-packages/asyncio/futures.py",
line 275, in result
    raise self._exception
  File "/home/lg/Documents/IDEA/pypy/site-packages/asyncio/tasks.py", line
238, in _step
    result = next(coro)
  File "/home/lg/Documents/IDEA/pypy/site-packages/asyncio/coroutines.py",
line 79, in __next__
    return next(self.gen)
  File "/home/lg/Documents/IDEA/pypy/site-packages/asyncio/base_events.py",
line 644, in create_connection
    sock, protocol_factory, ssl, server_hostname)
TypeError: '_SelectorSocketTransport' object is not iterable

----------------------------------------------------------------------
Ran 16 tests in 0.337s

FAILED (errors=1)

Finally, I've tested to launch the aiohttp server example:
https://github.com/KeepSafe/aiohttp/blob/master/examples/srv.py
The servers starts, but when I launch a HTTP request, I've a strange
stackstrace:
Error handling request
Traceback (most recent call last):
  File "/home/lg/Documents/IDEA/pypy/site-packages/aiohttp/server.py", line
240, in start
    yield from handler
  File "/home/lg/tmp/asyncio_examples/7_aiohttp_server.py", line 25, in
handle_request
    message.method, message.path, message.version))
AttributeError: 'str' object has no attribute 'method'
Traceback (most recent call last):
  File "/home/lg/Documents/IDEA/pypy/site-packages/aiohttp/server.py", line
240, in start
    yield from handler
  File "/home/lg/tmp/asyncio_examples/7_aiohttp_server.py", line 25, in
handle_request
    message.method, message.path, message.version))
AttributeError: 'str' object has no attribute 'method'

After debugging a little bit with pdb, I see that aiohttp.HttpRequestParser
parses correctly the request, but "message = yield from httpstream.read()"
in aiohttp.server at line 226 returns "GET" string instead of a
RawRequestMessage object.

I'm a total newbie about PyPy internals, implement a monotonic timer seems
to be over-complicated to me.
But, I should maybe help with tests and fix small issues like with
aiohttp.server if I've a clue to fix that.
Are you interested if I create issues on PyPy project for each problem, or
I will add only noise in PyPy project ?

BTW, to help PyPy project not only with my brain time, I've did a small
recurring donation for PyPy 3.

Regards.
--
Ludovic Gasc (GMLudo)
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to