wait_for_read and wait_for_write no longer accepts lists of sockets
See original GitHub issueWe noticed that we could no longer send in a list of sockets to util.wait_for_read and util.wait_for_write.
The docs still show the following behaviour:
urllib3.util.wait_for_read(socks, timeout=None)
Waits for reading to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be read from immediately.
urllib3.util.wait_for_write(socks, timeout=None)
Waits for writing to be available from a list of sockets or optionally a single socket if passed in. Returns a list of sockets that can be written to immediately.
The change introduced by 9782e1f866aa6d0d176dce8678aee448aeb492dd seems to have removed the possibility of sending in a list of sockets. Is this breaking API change made by purpose? In that case the docs should probably be updated.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (10 by maintainers)

Top Related StackOverflow Question
We (same organization as @eliasbrange) uses a forked version of botocore to fix a issue were filedescriptors could get exhausted until it gets fixed upstream. In that version the select logic on line https://github.com/boto/botocore/blob/develop/botocore/awsrequest.py#L163 is replaced by something like
So we can surely adapt to the change as long as its clear how its suppose to behave @njsmith
That’s true. I guess I’m open to leaving it as single socket because we’ve only had one report and it seems like we’d actually break more people by changing it back. I guess it stays the way it is.