mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-38378: Rename parameters "out" and "in" of os.sendfile(). (GH-16742)
They conflicted with keyword "in". Also rename positional-only parameters of private os._fcopyfile() for consistency.
This commit is contained in:
parent
46113e0cf3
commit
140a7d1f35
5 changed files with 39 additions and 34 deletions
|
@ -3110,11 +3110,12 @@ class TestSendfile(unittest.TestCase):
|
|||
|
||||
def test_keywords(self):
|
||||
# Keyword arguments should be supported
|
||||
os.sendfile(out=self.sockno, offset=0, count=4096,
|
||||
**{'in': self.fileno})
|
||||
os.sendfile(out_fd=self.sockno, in_fd=self.fileno,
|
||||
offset=0, count=4096)
|
||||
if self.SUPPORT_HEADERS_TRAILERS:
|
||||
os.sendfile(self.sockno, self.fileno, offset=0, count=4096,
|
||||
headers=(), trailers=(), flags=0)
|
||||
os.sendfile(out_fd=self.sockno, in_fd=self.fileno,
|
||||
offset=0, count=4096,
|
||||
headers=(), trailers=(), flags=0)
|
||||
|
||||
# --- headers / trailers tests
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue