Author gvanrossum
Recipients christian.heimes, felipecruz, giampaolo.rodola, gvanrossum, meador.inge, neologix, pitrou, rosslagerwall
Date 2013-01-07.02:46:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357526805.91.0.0874780324788.issue16853@psf.upfronthosting.co.za>
In-reply-to
Content
This seems okay.  I am attaching the changes I had to make to Tulip to support this.  However, two Tulip tests are now failing:

- tulip.events_test.PollEventLoopTests.testCreateSslTransport fails with spurious file descriptors returned by poll() that aren't in the _fd_to_key dict (but the corresponding test with Select passes)

- test_sock_client_fail() hangs completely.

Can you see why?

The first failure has this traceback:

Traceback (most recent call last):
  File "/Users/guido/tulip/tulip/selectors.py", line 178, in _key_from_fd
    return self._fd_to_key[fd]
KeyError: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/guido/tulip/tulip/events_test.py", line 216, in testCreateSslTra\
nsport
    el.run()
  File "/Users/guido/tulip/tulip/unix_events.py", line 120, in run
    self._run_once()
  File "/Users/guido/tulip/tulip/unix_events.py", line 592, in _run_once
    event_list = self._selector.select(timeout)
  File "/Users/guido/tulip/tulip/selectors.py", line 255, in select
    key = self._key_from_fd(fd)
  File "/Users/guido/tulip/tulip/selectors.py", line 180, in _key_from_fd
    raise RuntimeError("No key found for fd {}".format(fd))
RuntimeError: No key found for fd 0

(But the fd value varies -- sometimes it is -2, sometimes a large number.)

The other test busy-loops (keeps polling) and I have no useful traceback.

Also notice the need for a third constant, SELECT_CONNECT.  For details see the class WindowsPollPollster in the Tulip code.
History
Date User Action Args
2013-01-07 02:46:46gvanrossumsetrecipients: + gvanrossum, pitrou, giampaolo.rodola, christian.heimes, meador.inge, neologix, rosslagerwall, felipecruz
2013-01-07 02:46:45gvanrossumsetmessageid: <1357526805.91.0.0874780324788.issue16853@psf.upfronthosting.co.za>
2013-01-07 02:46:45gvanrossumlinkissue16853 messages
2013-01-07 02:46:45gvanrossumcreate