bpo-37027: Return a proxy socket object from transp.get_extra_info('socket') by 1st1 · Pull Request #13530 · python/cpython
1st1
changed the title
bpo-37027: Return a proxy socket object from transp.get_extra_info('s…
bpo-37027: Return a proxy socket object from transp.get_extra_info('socket')
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
1st1
mentioned this pull request
|
|
||
| def shutdown(self, how): | ||
| # asyncio doesn't currently provide a high-level transport API | ||
| # to shutdown the connection. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically there is transport.write_eof() for closing writing.
There is no API for closing reading though.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and I know some people use sock.shutdown for that. Should we add an API to transports?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, to make the transition to new Python smoother.
Not urgent, though. Minor thing.
@1st1: Status check is done, and it's a success ✅ .
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters