question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

wait_for_read and wait_for_write no longer accepts lists of sockets

See original GitHub issue

We 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:closed
  • Created 5 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Hernrupcommented, Jul 4, 2018

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

urllib3.util.wait_for_read([self.sock], 1)

So we can surely adapt to the change as long as its clear how its suppose to behave @njsmith

0reactions
sethmlarsoncommented, Oct 8, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

grpc/wait_for_ready_example.py at master - GitHub
# Wait for the channel entering TRANSIENT FAILURE state. transient_failure_event.wait(). server = create_server(server_address).
Read more >
Is it OK to use `waitForReadyRead()` instead of creating a slot ...
To your question: yes you can use QSslSocket::waitForReadyRead() but on Widows it can timeout even when the data came to the socket.
Read more >
Want to understand how Target.WaitForReady property ...
The following options are available: None - does not wait for the target to be ready; Interactive - waits until only a part...
Read more >
Problem with QTcpSocket | Qt Forum
This client (once connected, of course) sends to the server a number of messages containing names of files to be somehow processed, and, ......
Read more >
Waiting for Activity on Sockets - IBM
To wait for activity on the sockets, any or all of read, write, ... TCP/IP application to take the socket, respectively, and to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found