Title: Add pathlib.chown method
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cvrebert, neologix, pitrou, vajrasky
Priority: normal Keywords: patch

Created on 2014-02-26 09:51 by vajrasky, last changed 2014-08-15 22:32 by cvrebert.

File name Uploaded Description Edit
add_chown_to_pathlib.patch vajrasky, 2014-02-26 09:51 review
Messages (4)
msg212245 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2014-02-26 09:51
For pragmatic and philosophical reasons, I would argue that we should add chown to pathlib library.
msg212378 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-02-27 19:28
I don't know about philosophical reasons ;-), but I don't think chown is very often used. Do you know of a context where it is?
msg212411 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2014-02-28 07:48
Pragmatic reasons:

I use chown moderately often. Usually as root, I want to change the uid of the files after generating a bunch of files. But I almost never changed gid.

I am in two mind whether I should add lchown as well or not (just like lchmod) and make the signature of pathlib.chown same as os.chown (with third parameter, follow_symbolic_links).

If you close this as won't fix, I will not hold grudge against you, though. ;)
msg212425 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-02-28 12:34
Well, I don't know yet, but if we ever want chown() in pathlib, I think it should be higher-level and accept symbolic uids as well.
Date User Action Args
2014-08-15 22:32:16cvrebertsetnosy: + cvrebert
2014-02-28 12:34:05pitrousetnosy: + neologix
messages: + msg212425
2014-02-28 07:48:23vajraskysetmessages: + msg212411
2014-02-27 19:28:57pitrousetmessages: + msg212378
2014-02-26 09:51:50vajraskycreate