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:
Serhiy Storchaka 2019-10-13 11:59:31 +03:00 committed by GitHub
parent 46113e0cf3
commit 140a7d1f35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 39 additions and 34 deletions

View file

@ -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