Uvloop: Error installing uvloop via pip for PyPy3.5 v5.7.0

Created on 28 Mar 2017  路  6Comments  路  Source: MagicStack/uvloop

  • uvloop version: 0.8.0
  • python version: PyPy3.5 v5.7.0
  • platform: Ubuntu 16.04 x86_64

I recently downloaded a standalone Linux 64-bit binary of the new PyPy3.5 v5.7.0 and after installing the latest version of pip via the get-pip.py script, I immediately went to install uvloop 0.8 as the next package directly from pip.

I'm not 100% sure if uvloop is meant to run in PyPy3, but I attached a text file with my complete output. I am running Ubuntu 16.04 64-bit and I have installed uvloop directly and as part of Sanic on my system's Python 3.5 and 3.6.

uvloop_pypy35.txt

Most helpful comment

All 6 comments

PyPy isn't yet supported, sorry.

Is this something PyPy needs to work out or is this an issue the uvloop team will investigate?

We'll likely have to rewrite most of the code to use cffi (not cython), so it's not a quick fix. You should be able to use vanilla asyncio on PyPy, which should be quite a bit faster than vanilla asyncio on CPython.

So what would the solution be down the road? Converting uvloop away from Cython to cffi or to have a fork of uvloop that is cffi that can be run by PyPy3?

First, I would want to write some benchmarks to see if uvloop even needs to be ported to PyPy. Maybe vanilla asyncio is fast enough on it. That means that I'll need a basic trimmed down version of CFFI-ed uvloop enough to run an echo server benchmark.

Second, if it does make sense to port uvloop to PyPy, then most likely we can convert 60-90% of the code to use CFFI for both CPython and PyPy (without performance degradation for the former). Remaining performance critical parts can be written in both CFFI & Cython. I definitely don't want to fork uvloop or copy/paste huge chunks of code.

Was this page helpful?
0 / 5 - 0 ratings