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 <>
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/", 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/", 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/", line 146, in run_until_complete
  File "/Users/guido/tulip/tulip/", line 110, in run
  File "/Users/guido/tulip/tulip/", line 582, in _run_once
    event_list =
  File "/Users/guido/tulip/tulip/", line 329, in select
    key = self._key_from_fd(fd)
  File "/Users/guido/tulip/tulip/", line 180, in _key_from_fd
    raise RuntimeError("No key found for fd {}".format(fd))
RuntimeError: No key found for fd 11
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: <>
2013-01-08 00:45:47gvanrossumlinkissue16853 messages
2013-01-08 00:45:47gvanrossumcreate