GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — bpo-40007: Make asyncio.transport.writelines on selector use sendmsg by tzickel · Pull Request #19062 · python/cpython Conversation
|
|
Also, the current CI failures will have to be addressed of course. My comments above were just concerns that I noticed at a glance. I suspect that some of the failures may have been occurring as a result of the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@aeros Thanks for your comments, I've hopefully fixed the code / logic mistakes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I wasn't referring to repeating the Current: sendmsg = getattr(socket.socket, "sendmsg", False) # [snip] def writelines(self, lines): if not sendmsg: return self.write(b''.join(lines)) # [snip] Recommended: # Used to determine if platform supports sendmsg to sockets # [_NAME is our typical convention for internal globals, to differentiate it] _SENDMSG = None class _SelectorSocketTransport(_SelectorTransport): # [snip] def __init__(self, loop, sock, protocol, waiter=None, extra=None, server=None): global _SENDMSG # [ensures the `getattr()` is only done once, but doesn't create extra # overhead when select_events is imported] if _SENDMSG is None: _SENDMSG = getattr(socket.socket, "sendmsg", False) self._sendmsg = _SENDMSG # [snip] def writelines(self, lines): if not self._sendmsg: return self.write(b''.join(lines)) # [snip] Does that make it more clear? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Also, as a side note, there's typically no need to force push over old commits for PR branches in the CPython repo since we squash prior to merging. It can occasionally help if it the history becomes muddled over time, but it can also make changes made to the PR harder to follow for review purposes. See https://discuss.python.org/t/pep-601-forbid-return-break-continue-breaking-out-of-finally/2239/42. It's also mentioned at the end of https://devguide.python.org/pullrequest/#submitting. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
#31871 is the newer resurrection of the idea. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.