This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients christian.heimes, felipecruz, giampaolo.rodola, gvanrossum, meador.inge, neologix, pitrou, rosslagerwall, sbt
Date 2013-01-08.00:45:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357605947.45.0.866793125965.issue16853@psf.upfronthosting.co.za>
In-reply-to
Content
There's a bug in the kqueue selector.  The following code in your patch has 'fd' instead of 'key.fd', twice:

            if events & SELECT_IN:
                kev = kevent(key.fd, KQ_FILTER_READ, KQ_EV_ADD)
                self._kqueue.control([kev], 0, 0)
            if events & SELECT_OUT:
                kev = kevent(key.fd, KQ_FILTER_WRITE, KQ_EV_ADD)
		self._kqueue.control([kev], 0, 0)

One kqueue test fails on OSX:

ERROR: test_sock_client_ops (tulip.events_test.KqueueEventLoopTests)
----------------------------------------------------------------------
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: 11

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/guido/tulip/tulip/events_test.py", line 167, in test_sock_client_ops
    el.run_until_complete(el.sock_sendall(sock, b'GET / HTTP/1.0\r\n\r\n'))
  File "/Users/guido/tulip/tulip/unix_events.py", line 146, in run_until_complete
    self.run()
  File "/Users/guido/tulip/tulip/unix_events.py", line 110, in run
    self._run_once()
  File "/Users/guido/tulip/tulip/unix_events.py", line 582, in _run_once
    event_list = self._selector.select(timeout)
  File "/Users/guido/tulip/tulip/selectors.py", line 329, 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 11
History
Date User Action Args
2013-01-08 00:45:47gvanrossumsetrecipients: + gvanrossum, pitrou, giampaolo.rodola, christian.heimes, meador.inge, neologix, rosslagerwall, sbt, felipecruz
2013-01-08 00:45:47gvanrossumsetmessageid: <1357605947.45.0.866793125965.issue16853@psf.upfronthosting.co.za>
2013-01-08 00:45:47gvanrossumlinkissue16853 messages
2013-01-08 00:45:47gvanrossumcreate