Guido van Rossum added the comment:
Figured it out. KqueueSelector was missing the unregister() implementation.
Here it is:
def unregister(self, fileobj):
key = super().unregister(fileobj)
mask = 0
if key.events & SELECT_IN:
mask |= KQ_FILTER_READ
if key.events & SELECT_OUT:
mask |= KQ_FILTER_WRITE
kev = kevent(key.fd, mask, KQ_EV_DELETE)
self._kqueue.control([kev], 0, 0)
I also added a __repr__ to the _Key class:
def __repr__(self):
return '{}<fileobje={}, fd={}, events={:#x}, data={}>'.format(
self.__class__.__name__,
self.fileobj, self.fd, self.events, self.data)
Attached a new patch for tulip (but no new patch for select.py). I think I may
have left the debug logging in. I will submit this to the Tulip repo, but we
still need the changes for SELECT_CONNECT (I can't really test that, still no
Windows access).
----------
Added file: http://bugs.python.org/file28636/tulip-selectors-3.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16853>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com