This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2013年05月31日 13:09 by cjwatson, last changed 2022年04月11日 14:57 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue18108.diff | berker.peksag, 2014年06月14日 15:13 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 15811 | open | ta1hia, 2019年09月09日 18:06 | |
| Messages (7) | |||
|---|---|---|---|
| msg190404 - (view) | Author: Colin Watson (cjwatson) * | Date: 2013年05月31日 13:09 | |
Python 3.3 added the dir_fd and follow_symlinks keyword arguments to os.chown; it also added the shutil.chown function. Unfortunately the latter, while useful, does not support these new keyword arguments. It would be helpful if it did. |
|||
| msg220430 - (view) | Author: PCManticore (Claudiu.Popa) * (Python triager) | Date: 2014年06月13日 11:12 | |
Hi. Would you like to provide a patch? |
|||
| msg220564 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2014年06月14日 15:13 | |
Here's a patch. |
|||
| msg220565 - (view) | Author: PCManticore (Claudiu.Popa) * (Python triager) | Date: 2014年06月14日 15:16 | |
Looks good to me. But aren't the last two lines skipped if an error is raised by the first line from the with block?
+ with self.assertRaises(FileNotFoundError):
+ shutil.chown('invalid-file', user=uid, dir_fd=dirfd)
+ shutil.chown('invalid-file', group=gid, dir_fd=dirfd)
+ shutil.chown('invalid-file', user=uid, group=gid, dir_fd=dirfd)
|
|||
| msg221675 - (view) | Author: PCManticore (Claudiu.Popa) * (Python triager) | Date: 2014年06月27日 06:08 | |
I got a failure on FreeBSD: [1/1] test_shutil test test_shutil failed -- Traceback (most recent call last): File "/tank/libs/cpython/Lib/test/test_shutil.py", line 1258, in test_chown shutil.chown(os.path.basename(filename), dir_fd=dirfd) File "/tank/libs/cpython/Lib/shutil.py", line 983, in chown raise ValueError("user and/or group must be set") ValueError: user and/or group must be set It seems that either user or group argument must be passed along with dir_fd. |
|||
| msg346893 - (view) | Author: Avinash Sajjanshetty (avi) * | Date: 2019年06月29日 18:08 | |
I was looking for an easy patch to submit. I can take an attempt at this? |
|||
| msg351543 - (view) | Author: Tahia K (ta1hia) * | Date: 2019年09月09日 18:21 | |
Hi everybody, I just submitted a PR for this issue. It's my first contribution to the cPython project so please let me know if I need to change anything. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:46 | admin | set | github: 62308 |
| 2019年10月28日 20:48:21 | pconnell | set | nosy:
+ pconnell |
| 2019年09月09日 18:21:09 | ta1hia | set | messages: + msg351543 |
| 2019年09月09日 18:06:54 | ta1hia | set | pull_requests: + pull_request15461 |
| 2019年09月09日 15:20:32 | ta1hia | set | nosy:
+ ta1hia |
| 2019年06月29日 18:08:16 | avi | set | nosy:
+ avi messages: + msg346893 |
| 2014年06月27日 06:08:14 | Claudiu.Popa | set | messages: + msg221675 |
| 2014年06月14日 15:16:38 | Claudiu.Popa | set | messages: + msg220565 |
| 2014年06月14日 15:13:35 | berker.peksag | set | files:
+ issue18108.diff nosy: + berker.peksag messages: + msg220564 keywords: + patch stage: needs patch -> patch review |
| 2014年06月13日 11:12:33 | Claudiu.Popa | set | type: enhancement versions: + Python 3.5, - Python 3.4 keywords: + easy nosy: + Claudiu.Popa messages: + msg220430 stage: needs patch |
| 2013年05月31日 16:28:16 | hynek | set | nosy:
+ hynek versions: + Python 3.4, - Python 3.3 |
| 2013年05月31日 13:09:57 | cjwatson | create | |