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: selectors.KqueueSelector hangs on EOF, unlike other selectors
Type: Stage:
Components: asyncio, IO, Library (Lib) Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, russelldavis, yselivanov
Priority: normal Keywords:

Created on 2020-04-10 23:13 by russelldavis, last changed 2022-04-11 14:59 by admin.

Messages (2)
msg366167 - (view) Author: Russell Davis (russelldavis) * Date: 2020-04-10 23:13
Repro (on macOS):

    from selectors import KqueueSelector, EVENT_READ
    with open('/tmp/foo', 'w') as f:
        f.write("bar")
        sel = KqueueSelector()
        sel.register(f, EVENT_READ)
        sel.select()

The above code will hang on the last line. If you change KqueueSelector to PollSelector or SelectSelector, it will not hang.

Per msg255116, the different selectors should behave consistently.
msg415006 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2022-03-12 19:26
Using selectors with blocked files looks weird at least. Should we care?
History
Date User Action Args
2022-04-11 14:59:29adminsetgithub: 84432
2022-03-12 19:26:41asvetlovsetmessages: + msg415006
2020-04-10 23:13:44russelldaviscreate