bpo-37027: Return a proxy socket object from transp.get_extra_info('socket')#13530
bpo-37027: Return a proxy socket object from transp.get_extra_info('socket')#13530miss-islington merged 2 commits intopython:masterfrom
Conversation
asvetlov
left a comment
There was a problem hiding this comment.
asyncio saves at least "process" and "pipe" in extra info.
Should we wrap these things too?
Should we wrap sockets from asyncio.Server()?
|
Andrew, please re-review this PR (and please hit the merge button if it's ready). I've relaxed this PR - now all socket methods can be called as they are in 3.7, but we issue a warning that we won't support that in 3.9. |
|
|
||
| def shutdown(self, how): | ||
| # asyncio doesn't currently provide a high-level transport API | ||
| # to shutdown the connection. |
There was a problem hiding this comment.
Technically there is transport.write_eof() for closing writing.
There is no API for closing reading though.
There was a problem hiding this comment.
Yes, and I know some people use sock.shutdown for that. Should we add an API to transports?
There was a problem hiding this comment.
Maybe, to make the transition to new Python smoother.
Not urgent, though. Minor thing.
|
@1st1: Status check is done, and it's a success ✅ . |
…ocket') (pythonGH-13530) Return a safe to use proxy socket object from `transport.get_extra_info('socket')` https://bugs.python.org/issue37027
Return a safe to use proxy socket object from
transport.get_extra_info('socket')https://bugs.python.org/issue37027