[New-bugs-announce] [issue15238] shutil.copystat should copy Linux extended attributes

Larry Hastings report at bugs.python.org
Sun Jul 1 17:13:29 CEST 2012


New submission from Larry Hastings <larry at hastings.org>:

3.3 adds the *xattr() extended attribute functions on Linux.  shutil implements a new internal function(_copyxattr) which copies these extended attributes.  However, it's only used in shutil.copy2().  I assert that shutil.copystat() should also preserve this metadata.  (Which, having subsumed this functionality, means that shutil.copy2() would no longer need to explicitly call it.)

Also: it might be worth considering taking the same approach _copyxattr uses for the other conditional functionality (see "def lookup" inside copystat).  Computing platform support at import time instead of runtime looks cleaner.

Georg, how much of this (if any) do you consider a 3.3 bugfix?

----------
assignee: larry
messages: 164483
nosy: georg.brandl, larry, storchaka
priority: normal
severity: normal
stage: needs patch
status: open
title: shutil.copystat should copy Linux extended attributes
type: enhancement
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15238>
_______________________________________


More information about the New-bugs-announce mailing list