Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could uvloop be implemented using CFFI? #32

Open
OOPMan opened this issue Jun 18, 2016 · 15 comments
Open

Could uvloop be implemented using CFFI? #32

OOPMan opened this issue Jun 18, 2016 · 15 comments
Labels

Comments

@OOPMan
Copy link

OOPMan commented Jun 18, 2016

Could uvloop be implemented using CFFI? How hard would it be to do so?

I ask because at some point in the future PyPy3 will reach compatibility with Python 3.5 (It could be a while, but PyPy3 3.3 is in alpha right now so there is hope :-) and it would be really great if uvloop were usable on it :-)

@1st1
Copy link
Member

1st1 commented Jun 21, 2016

Once PyPy implements Python 3.5 and is stable, we'll look into this. Theoretically, it's not that difficult to rewrite uvloop with pure Python + CFFI.

@1st1 1st1 added the question label Jun 21, 2016
@OOPMan
Copy link
Author

OOPMan commented Jun 21, 2016

That's good to know. Thanks for answering my question!

@OOPMan OOPMan closed this as completed Jun 21, 2016
@1st1
Copy link
Member

1st1 commented Jun 21, 2016

NP. Let's keep this issue open, as this question periodically comes up.

@1st1 1st1 reopened this Jun 21, 2016
@ghost
Copy link

ghost commented Oct 17, 2016

@1st1 by the way, you can already play around PyPy3.5, there's nightly builds:
http://buildbot.pypy.org/nightly/py3.5/
It's not stable thought

@ghost
Copy link

ghost commented Mar 21, 2017

@1st1 the time has come!
First public release of PyPy3.5

@1st1
Copy link
Member

1st1 commented Mar 21, 2017

I'll take a look soon :)

@1st1
Copy link
Member

1st1 commented Mar 28, 2017

Referencing another discussion: #82

@thedrow
Copy link

thedrow commented Jun 11, 2017

https://github.com/saghul/pyuv already implements a CFFI extension that works on PyPy3 beta.
It's just a matter of providing the necessary Python API that wraps it.

@ghost
Copy link

ghost commented Jun 11, 2017

@thedrow
Where is CFFI in pyuv?
I see no CFFI here, only usual Python C extension.
If uvloop would use pyuv, PyPy3.5 would be slower, because Python C Extensions are slower than CFFI extensions (in PyPy).
Uvloop wants to be fast, so if it wants to be fast on PyPy it should use CFFI

@ghost
Copy link

ghost commented Jun 11, 2017

@thedrow , @1st1, I found this uvloop CFFI extension - https://github.com/koehlma/uv/

@thedrow
Copy link

thedrow commented Oct 26, 2017

Seems like the CFFI extension is no longer maintained :(

@jakirkham
Copy link
Contributor

Maybe it is worth seeing what is necessary to make the existing Cython code work on PyPy. Cython supports cpyext for PyPy and PyPy has done some recent work to improve cpyext speed. Have people explored this path? If so, what are the known issues today?

@cirospaciari
Copy link

I'm writting an PyPy binding using CFFI for and webserver, and i really need an CFFI version, so i think i will start to write an CFFI extension for PyPy using uvloop as reference, is that ok?
The project: https://github.com/cirospaciari/socketify.py

@thedrow
Copy link

thedrow commented Jun 6, 2022

@cirospaciari We're hoping Cython could emit HPy extension code in the future which will allow uvloop to run on multiple platforms easily.

@jakirkham
Copy link
Contributor

Related issue ( cython/cython#4197 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants