[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
Roundup Robot added the comment: New changeset 35542a32cd54 by R David Murray in branch '3.4': #11973: add test for previously fixed kevent signed/unsigned bug. https://hg.python.org/cpython/rev/35542a32cd54 New changeset a028299c9bc2 by R David Murray in branch 'default': Merge: #11973: add test for previously fixed kevent signed/unsigned bug. https://hg.python.org/cpython/rev/a028299c9bc2 New changeset 38fe09772b4f by R David Murray in branch '2.7': #11973: add test for previously fixed kevent signed/unsigned bug. https://hg.python.org/cpython/rev/38fe09772b4f -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
R. David Murray added the comment: Committed the test finally. Thanks, David. -- nosy: +r.david.murray stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- keywords: +patch Added file: http://bugs.python.org/file34330/test_kqueue.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34331/test_kqueue.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34333/test_kqueue.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34332/test_kqueue.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34335/test_kqueue.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
David Naylor added the comment: As requested, please find attached the unit tests that check `flags' can handle a u_short and `fflags' can handle a u_int. -- Added file: http://bugs.python.org/file34334/test_kqueue.py.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
Changes by koobs koobs.free...@gmail.com: -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
Christian Heimes added the comment: The patch looks good to me. -- nosy: +christian.heimes versions: +Python 3.4 -Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
Roundup Robot added the comment: New changeset d5334d8907dc by Christian Heimes in branch '3.3': Issue #11973: Fix a problem in kevent. The flags and fflags fields are now http://hg.python.org/cpython/rev/d5334d8907dc New changeset 8345fb616cbd by Christian Heimes in branch 'default': Issue #11973: Fix a problem in kevent. The flags and fflags fields are now http://hg.python.org/cpython/rev/8345fb616cbd New changeset 8eac75276e5b by Christian Heimes in branch '2.7': Issue #11973: Fix a problem in kevent. The flags and fflags fields are now http://hg.python.org/cpython/rev/8eac75276e5b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
Christian Heimes added the comment: Does somebody want to write a test for the issue, too? -- resolution: - fixed stage: patch review - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
New submission from David Naylor naylor.b.da...@gmail.com: kevent does not accept all legitimate parameters, such as KQ_NOTE_EXIT. For example: from select import * kevent(0, KQ_FILTER_PROC, KQ_EV_ADD | KQ_EV_ENABLE, KQ_NOTE_EXIT) OverflowError: signed integer is greater than maximum While the following C code compiles (under -Wall -pedantic) without error, or warning: #include sys/types.h #include sys/event.h #include sys/time.h int main(int argc, char **argv) { struct kevent ke; EV_SET(ke, 0, EVFILT_PROC, EV_ADD | EV_ENABLE, NOTE_EXIT, 0, 0); return (0); } Looking at the Modules/selectmodule.c file it is clear that the fields flags and fflags are defined as T_USHORT and T_UINT however the flags passed to PyArg_ParseTupleAndKeywords are 'h' and 'i' respectively (implying signed numbers). A workaround exists where values X (2**31 - 1) are passed as (X - 2**32). Also the attached patch fixes the error. -- components: Extension Modules files: patch-Modules-selectmodule.c messages: 134918 nosy: DragonSA priority: normal severity: normal status: open title: kevent does not accept KQ_NOTE_EXIT (and other (f)flags) type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file21847/patch-Modules-selectmodule.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ned.deily, ronaldoussoren stage: - patch review versions: -Python 2.5, Python 2.6, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11973 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com