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.

classification
Title: [Patch] selectmodule: Make kqueue()'s event filters optional
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: EdSchouten, berker.peksag, python-dev
Priority: normal Keywords:

Created on 2016-09-14 15:00 by EdSchouten, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch-kqueue-EVFILT EdSchouten, 2016-09-14 15:00 review
Messages (3)
msg276459 - (view) Author: Ed Schouten (EdSchouten) * Date: 2016-09-14 15:00
Just like the BSDs and Mac OS X, CloudABI (https://mail.python.org/pipermail/python-dev/2016-July/145708.html) provides support for kqueue(). Its implementation, however, is far more limited. It can only be used for polling on descriptors (EVFILT_READ/EVFILT_WRITE) and waiting on timers (EVFILT_TIMER).

The existing selectmodule already allows some filters to be present optionally (e.g., EVFILT_NETDEV). The attached patch extends this work by only defining the filter and corresponding filter flags when available.

I've also added guards around EV_SYSFLAGS and EV_FLAG1. EV_SYSFLAGS is a flag that's typically only used by the kernel to trim off flags that are only used internally. EV_FLAG1 is an example of such a flag, which seems to be used by FreeBSD to mark incoming AIO events as validated. I would even go as far as to remove these two flags from the module entirely, but let's not take the risk.
msg276462 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-14 15:16
New changeset 57ff729e923f by Berker Peksag in branch '3.6':
Issue #28153: Make kqueue()'s event filters optional
https://hg.python.org/cpython/rev/57ff729e923f

New changeset 6c5f9c6c25ea by Berker Peksag in branch 'default':
Issue #28153: Merge from 3.6
https://hg.python.org/cpython/rev/6c5f9c6c25ea
msg276463 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-09-14 15:17
Thanks!
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72340
2016-09-14 15:17:19berker.peksagsetstatus: open -> closed

type: behavior
versions: + Python 3.7
nosy: + berker.peksag

messages: + msg276463
resolution: fixed
stage: resolved
2016-09-14 15:16:50python-devsetnosy: + python-dev
messages: + msg276462
2016-09-14 15:00:32EdSchoutencreate