[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-27 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
nosy: +giampaolo.rodola

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-26 Thread Sandro Tosi

New submission from Sandro Tosi sandro.t...@gmail.com:

Hi, following up the discussion on 
http://mail.python.org/pipermail/python-dev/2011-May/111642.html here'a patch 
to introduce shutil.chown() along with doc, tests and a change in os doc to 
link to the new function (I also took the occasion to rewrap os.chown() doc 
text). As of now only the one-file function is implemented, let's see at a 
later time what's about for a recursive one.

The patch was prepared against default, but it probably makes sense to backport 
it to 2.7?

Any comment/suggestion is welcome!

--
assignee: sandro.tosi
components: Library (Lib)
files: shutil_chown-default.patch
keywords: patch
messages: 137004
nosy: sandro.tosi
priority: low
severity: normal
stage: patch review
status: open
title: Shutil - add chown() in order to allow to use user and group name (and 
not only uid/gid)
type: feature request
Added file: http://bugs.python.org/file22132/shutil_chown-default.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-26 Thread Sandro Tosi

Changes by Sandro Tosi sandro.t...@gmail.com:


--
versions: +Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-26 Thread Eric V. Smith

Eric V. Smith e...@trueblade.com added the comment:

As a new feature, it can't be added to 2.7.

--
nosy: +eric.smith

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-26 Thread Charles-François Natali

Charles-François Natali neolo...@free.fr added the comment:

I didn't test, but after skimming through the code I think that if an invalid 
user name/group name is provided, os.chown is passed None, which will fail with 
ValueError.
It would be better to raise an explicit error like no such user / no such 
group.
That's something you could add to the tests.

Also, you could initialize _user to -1 instead of None, and replace
if user is None:
_user = -1
else:
[...]
with
if user is not None:
[...]

Same goes for _group.

--
nosy: +charles-francois.natali

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-26 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
nosy: +ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-26 Thread Petri Lehtinen

Changes by Petri Lehtinen pe...@digip.org:


--
nosy: +petri.lehtinen

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12191
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com