[Python-ideas] libuv based eventloop for tulip experiment

Guido van Rossum guido at python.org
Wed Jan 30 16:45:12 CET 2013


On Wed, Jan 30, 2013 at 1:55 AM, Saúl Ibarra Corretgé <saghul at gmail.com> wrote:
>
>> Yeah, so do the other polling things on Windows. (Well, mostly
>> sockets. There are some other things supported like named pipes.)
>>
>
> In pyuv there is a pecial handle for those (Pipe) which works on both unix
> and windows with the same interface.

PEP 3156 should add a new API for adding a pipe (either the read or
write end). Someone worked on that for a bit, search last week's
python-ideas archives.

>> I guess in order to support this we'd need some kind of abstraction
>> away from socket objects and file descriptors, at least for event loop
>> methods like sock_recv() and add_reader(). But those are mostly meant
>> for transports to build upon, so I think that would be fine.
>>
>
> I see, great!

The iocp branch now has all these refactorings.

>> Hm, I thought certificates were just blobs of data? We should probably
>> come up with a standard way to represent these that isn't tied to the
>> stdlib's ssl module. But I don't think this should be part of PEP 3156
>> -- it's too big already.
>>
>
> Yes, they are blobs, I meant the objects that wrap those blobs and provide
> verification functions and such. But that can indeed be left out and have
> implementation deal with it, having tulip just hand over the blobs.

Do you know how to write code like that? It would be illustrative to
take the curl.py and crawl.py examples and adjust them so that if the
protocol is https, the server's authenticity is checked and reported.
I've never dealt with this myself so I would probably do it wrong...
:-(

-- 
--Guido van Rossum (python.org/~guido)



More information about the Python-ideas mailing list