Martin Panter added the comment: Python’s select() call operates at a minimal OS level. I don’t completely understand your __preselect__() etc proposal, but it does sound like you are trying to invent another higher-level “asynchronous” framework like asyncio.
I think you are wrong about the proxy connection being made in the socksocket() constructor. In general, there could be both write and read events depending on the stage of the proxy connection setup. E.g. with a HTTP proxy, there would be write events to establish the underlying TCP connection, and also to send the CONNECT request, and then a read event to receive the proxy’s response. Perhaps the SSL socket wrapper objects face a similar situation to your problem. In non-blocking mode, SSLWantRead/WriteError exceptions are raised that indicate which select() event is required. ---------- nosy: +martin.panter _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26666> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com