Nathaniel J. Smith
Nathaniel J. Smith
Some existing popular mock libraries that might be useful for inspiration (or at least narrowing down use cases): * https://github.com/spulec/moto * https://github.com/gabrielfalcao/HTTPretty * https://github.com/jamielennox/requests-mock * http://wiremock.org/ For these kinds of...
Note: as soon as this is working, the next thing people will run into is how to get TLS working over the virtual network. [`trustme`](https://github.com/python-trio/trustme) gives a lot of the...
Here's a fake network crate for tokio; might have ideas we can steal: https://docs.rs/turmoil/
One issue with this as currently written is that it uses `outcome.unwrap()` multiple times, which of course [doesn't work](https://github.com/python-trio/outcome/issues/7). We could mess around somehow trying to copy exceptions, but maybe...
.....I'm not super keen. If you want to call between Trio threads, then it would be better to have an async way to do that? Intentionally doing blocking calls from...
I don't think there's any problem necessarily with calculating the deadline at the last moment, though I can imagine someone being confused the other way as well. ("I created the...
There's also an open issue at #275, which has a bit more discussion of the subtleties here. This works in simple cases, but it forces a choice of IPv4/IPv6 (whichever...
Here's another case where `accept_nowait` would be useful: with unix domain sockets, it's possible to do no-downtime upgrades by binding the new listening socket to a temporary name, then atomically...
Ah-hah, I thought of a case where batched accept makes a difference: Say we have a mixed workload, involving a CPU-bound "background task" that regularly `sleep(0)`s to let other stuff...
It looks like #636 will solve the API parts of this issue, by moving the `Listener` abstraction layer higher. So that will mean that `SocketListener` can do batched accept or...