[issue36726] Empty select() on windows gives error.

2019-04-25 Thread Martin Panter


Martin Panter  added the comment:

I think this is a duplicate of Issue 29256. Issue 25680 also discusses platform 
differences with no file descriptors.

--
nosy: +martin.panter
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Windows select() errors out when given no fds to select on, 
which breaks SelectSelector

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36726] Empty select() on windows gives error.

2019-04-25 Thread Ralph Loader


New submission from Ralph Loader :

The following one liner gives an error on windows but not on linux:

```
import selectors ; selectors.DefaultSelector().select(timeout=1)
```

It appears that the windows select() function with no FDs set gives an error 
but on Linux it is equivalent to a sleep.

The error on windows:
```
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python37\lib\selectors.py", line 323, in select
r, w, _ = self._select(self._readers, self._writers, [], timeout)
  File "C:\Program Files\Python37\lib\selectors.py", line 314, in _select
r, w, x = select.select(r, w, w, timeout)
OSError: [WinError 10022] An invalid argument was supplied
```

--
components: Windows
messages: 340862
nosy: Ralph Loader, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Empty select() on windows gives error.

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com