[issue2845] shutil.copy2() copies permission bits

2008-05-16 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Thanks, fixed in r63369.

--
resolution:  - fixed
status: open - closed

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2845
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2845] shutil.copy2() copies permission bits

2008-05-14 Thread Alexander Belopolsky

Alexander Belopolsky [EMAIL PROTECTED] added the comment:

This seems to be a documentation issue.


shutil.copy2(src, dst)
Similar to copy(), but last access time and last modification time are 
copied as well. This is similar to the Unix command cp -p.
 -- http://docs.python.org/dev/library/shutil.html#shutil.copy2

Does not mention permissions while


$ pydoc shutil.copy2
shutil.copy2 = copy2(src, dst)
Copy data and all stat info (cp -p src dst).


implies that the permissions should be copied.

Maybe the documentation should simply recite the implementation: copy2 
is copyfile follwed by copystat.

--
nosy: +belopolsky

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2845
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2845] shutil.copy2() copies permission bits

2008-05-13 Thread igs

New submission from igs [EMAIL PROTECTED]:

At least in Python 2.4 shutil.copy2() not only copies content and 
access times of a files like stated in the documentation but also the 
access bits.

That behaviour I would not expect because in other functions from 
shutil it is explicitly stated if the access bits are copied.

In fact I used
shutil.copy2(src, dest)
shutil.copystat(src, dest)
up to now. What does not work if the read-only attribute is set and 
what is completely nonsense after having a look into the implementation.

--
components: Windows
messages: 66803
nosy: igs
severity: normal
status: open
title: shutil.copy2() copies permission bits
type: behavior
versions: Python 2.4

__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2845
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com