2013/12/19 Marc Schlaich <[email protected]>:
> - selectors module would be better in the package (as it is in tulip:
> https://code.google.com/p/tulip/source/browse/#hg%2Fasyncio)

I discussed with the author of the selector module, Charles-François
Natali, to ask him if he would like to maintain a backport on PyPI.
He's not interested. I can maintain the backport, but we agreed that
using selectors alone is not really interesting. The selectors is
useful when used with asyncio.

> - patching the exceptions via builtins does not work on OSX, that's the
> reason for various errors in test_events, e.g.:
>
>      kev_list = self._kqueue.control(None, max_ev, timeout)
>
>   OSError: [Errno 4] Interrupted system call

I only tried tulip_py2 on Linux. You may retry with this commit:

changeset:   77:383ef5a06958
tag:         tip
user:        Victor Stinner <[email protected]>
date:        Fri Dec 20 09:37:37 2013 +0100
files:       selectors.py
description:
Fix kqueue selector: use wrap_error() to catch InterruptedError

> - test_subprocess_close_client_stream hangs forever. Any idea?

No idea. You may try to setup the logging module to get more information:

import logging; logging.basicConfig()

> The rest of test_events is fine after replacing InterruptedError with OSError.

Right now, I prefer to limit differences with Tulip and so I used an
hack in asyncio.backport to get InterruptedError. If the failures are
not related to kqueue, is there other places where wrap_error() is
missing?

Later, I may drop these hacks and catch OSError and check the errno
attribute instead.

Victor

Reply via email to