[issue38378] os.sendfile() has improperly named parameter

2020-08-24 Thread STINNER Victor


STINNER Victor  added the comment:

Well, since os.sendfile(in=fd) raises a syntax error, I don't think that it's 
really a backward incompatible change in practice.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38378] os.sendfile() has improperly named parameter

2020-08-24 Thread STINNER Victor


STINNER Victor  added the comment:

I would prefer "2. Make "out" and "in" positional-only parameters". It would be 
a minor incompatible change, but it would make os.sendfile() more consistent 
with other functions like os.write() which only has positional-only parameters.

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38378] os.sendfile() has improperly named parameter

2019-10-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38378] os.sendfile() has improperly named parameter

2019-10-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 140a7d1f3579e778656a6b6bfad72489e9870a4d by Serhiy Storchaka in 
branch 'master':
bpo-38378: Rename parameters "out" and "in" of os.sendfile(). (GH-16742)
https://github.com/python/cpython/commit/140a7d1f3579e778656a6b6bfad72489e9870a4d


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38378] os.sendfile() has improperly named parameter

2019-10-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +16319
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16742

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38378] os.sendfile() has improperly named parameter

2019-10-11 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

I’m for renaming both. Since the function is about transmitting or copying (on 
Linux) files src_fd and dst_fd could also be good candidates.

--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38378] os.sendfile() has improperly named parameter

2019-10-05 Thread Zackery Spytz


Zackery Spytz  added the comment:

See also bpo-15078.

--
nosy: +ZackerySpytz

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38378] os.sendfile() has improperly named parameter

2019-10-05 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

os.sendfile() has a keyword-or-positional parameter named "in". Since it is a 
keyword in Python, it is not possible to pass it as a keyword argument. You can 
only pass it as a positional argument or using a var-keyword argument (unlikely 
anybody uses the latter). The preceding parameter, "out", also can not be 
passed by keyword because of this.

It is weird, but usually does not cause a problem. You cannot use a keyword 
argument, period. But it prevents os.sendfile() from converting to Argument 
Clinic, because Argument Clinic does not allow using Python keywords as 
parameter names (I already created a patch for conversion, but in needs to 
solve this issue first).

There are two ways to solve this issue.

1. Rename parameter "in" (and maybe "out" for consistency). "out_fd" and 
"in_fd" look good names (they are use in Linux manpage).

2. Make "out" and "in" positional-only parameters.

--
components: Extension Modules
messages: 354012
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: os.sendfile() has improperly named parameter
type: behavior
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com