-
Notifications
You must be signed in to change notification settings - Fork 48
Description
Hi again @mindflayer - thanks for your responses in sphinx-doc/sphinx#11324.
To recap (and for future readers): the improvement requested in that issue is to allow Sphinx to use session-based (pooled) HTTP requests instead of creating one TCP connection per request when it checks documentation hyperlinks. While investigating how to add tests for an implementation of that, I discovered mocket.
It turned out that mocket wasn't applicable for the implementation I attempted, because I wanted to retain both the test HTTP server and test HTTP client. In that plan, measurement of actual traffic from client to server was required, instead of what mocket generally provides: mocking of the server's responses (useful -- and in fact preferable -- in many other situations).
With that explained, the question / feature request is:
Would it be possible for mocket's recording mode to support a socket server that is in the same Python process as the socket client?
If helpful: I can provide example code that I've attempted this with, and the error output(s) that I've encountered. But I think I should ask the feasibility question first.