[issue14082] shutil doesn't copy extended attributes

2012-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hynek's patch (communicated over IRC, committed in 8d85f9920878) seems to have fixed the failure. -- status: open -> closed ___ Python tracker ___

[issue14082] shutil doesn't copy extended attributes

2012-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks like we have our first buildbot failure: == FAIL: test_copyxattr (test.test_shutil.TestShutil) -- Traceback (most rece

[issue14082] shutil doesn't copy extended attributes

2012-05-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Pushed now. Hopefully the buildbots won't moan. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

[issue14082] shutil doesn't copy extended attributes

2012-05-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 85824b819bcb by Antoine Pitrou in branch 'default': Issue #14082: shutil.copy2() now copies extended attributes, if possible. http://hg.python.org/cpython/rev/85824b819bcb -- nosy: +python-dev ___ Python

[issue14082] shutil doesn't copy extended attributes

2012-05-10 Thread Hynek Schlawack
Hynek Schlawack added the comment: I did. The only error I got was ERROR: test_idna (test.test_socket.GeneralModuleTests) -- Traceback (most recent call last): File "/home/vagrant/p2/Lib/test/test_socket.py", line 1182, in te

[issue14082] shutil doesn't copy extended attributes

2012-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks ok, but it would be nice if someone with non-broken xattr support could test it. Although I suppose you did run the test suite, Hynek? -- ___ Python tracker _

[issue14082] shutil doesn't copy extended attributes

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: Ok, I've extracted the xattr checker from test_os.py and transformed it into a caching decorator like skip_unless_symlinks. _copyxattr rename is also done. -- Added file: http://bugs.python.org/file25477/copy2-xattr-with-better-protection.diff

[issue14082] shutil doesn't copy extended attributes

2012-05-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Looks like your file system Python uses for tmp files doesn't support > xattr. That's bad because you can't verify. How should I cope with that? > try/catch on the first setxattr() and skip the test if it fails? Is the > an official way to do that? Well, appa

[issue14082] shutil doesn't copy extended attributes

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: > The copyxattr() function should be private (_copyxattr()). Ok. I presumed that not adding it to __all__ is "private enough". > For some reason the tests are failing here: > > == > ERROR: t

[issue14082] shutil doesn't copy extended attributes

2012-05-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: The copyxattr() function should be private (_copyxattr()). For some reason the tests are failing here: == ERROR: test_copy2_xattr (test.test_shutil.TestShutil) -

[issue14082] shutil doesn't copy extended attributes

2012-05-05 Thread Hynek Schlawack
Hynek Schlawack added the comment: So here's an updated patch. I've stripped everything away we don't need for copy2 integration. It catches EPERM, ENOTSUP and ENODATA (for race conditions). Happy reviewing. :) -- Added file: http://bugs.python.org/file25462/copy2-xattr.diff

[issue14082] shutil doesn't copy extended attributes

2012-05-02 Thread Hynek Schlawack
Hynek Schlawack added the comment: > I really like the idea of adding extended attributes copy to shutil.cop2(). > However, I'm not convinced that exposing the raw copyxattr() is > necessary (I can't really come up with a use case for this). > > So I'd suggest make copyxattr() private, and wait

[issue14082] shutil doesn't copy extended attributes

2012-05-02 Thread Charles-François Natali
Charles-François Natali added the comment: I really like the idea of adding extended attributes copy to shutil.cop2(). However, I'm not convinced that exposing the raw copyxattr() is necessary (I can't really come up with a use case for this). So I'd suggest make copyxattr() private, and wait u

[issue14082] shutil doesn't copy extended attributes

2012-05-01 Thread Hynek Schlawack
Hynek Schlawack added the comment: I have answered to the (two weeks old :-/) review. There are three open questions in there we'll have to figure out before I fix the patch: - should copyxattr() remove xattrs in dst that aren't present in src? Make it an option like `remove_missing_xattr`?

[issue14082] shutil doesn't copy extended attributes

2012-04-30 Thread Hynek Schlawack
Hynek Schlawack added the comment: I didn't. :/ I'll look into it tomorrow. -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue14082] shutil doesn't copy extended attributes

2012-04-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hynek, did you get a notification of my review on Rietveld? -- ___ Python tracker ___ ___ Python-bu

[issue14082] shutil doesn't copy extended attributes

2012-04-29 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue14082] shutil doesn't copy extended attributes

2012-04-12 Thread Hynek Schlawack
Hynek Schlawack added the comment: Ok, so I’ve added a function `copyxattr()` and `copy2()` tries to copy all possible namespaces. Tests pass on Linux and Mac OS X. -- keywords: +patch Added file: http://bugs.python.org/file25194/xattr.diff ___ Pyt

[issue14082] shutil doesn't copy extended attributes

2012-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I’m writing a shutil.copyxattr() first which could simple get another > argument for the namespaces that should be copied. Sounds good to me :-) > However what to do inside copy2()? > > I’m tending to either: > > 1. copy only user.* > 2. ignore errors in a

[issue14082] shutil doesn't copy extended attributes

2012-04-06 Thread Hynek Schlawack
Hynek Schlawack added the comment: This ticket has a small catch: There are several namespaces. According to http://en.wikipedia.org/wiki/Xattr#Linux : - user: can be set by anyone - trusted: root only - security: root only - system: even root can’t do that, at least not in my vm I’m writing

[issue14082] shutil doesn't copy extended attributes

2012-02-26 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14082] shutil doesn't copy extended attributes

2012-02-25 Thread Éric Araujo
Éric Araujo added the comment: Sounds good. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue14082] shutil doesn't copy extended attributes

2012-02-25 Thread Hynek Schlawack
Hynek Schlawack added the comment: If nobody objects, I'd cook up a patch. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue14082] shutil doesn't copy extended attributes

2012-02-25 Thread Charles-François Natali
Charles-François Natali added the comment: I'm also in favor of adding extended attributes to copy2: """ Similar to shutil.copy(), but metadata is copied as well """ extended attributes are metadata. And there are already too many copy functions... -- ___

[issue14082] shutil doesn't copy extended attributes

2012-02-25 Thread Hynek Schlawack
Hynek Schlawack added the comment: I'd tend to always copy xattrs – it seems that's what the user would expect to happen. A new parameter to _forbid_ it might make sense. However, I feel that there are already enough parameters in place. :-/ -- ___

[issue14082] shutil doesn't copy extended attributes

2012-02-24 Thread Éric Araujo
Éric Araujo added the comment: > copy2() claims to work like "cp -p" It probably does, for a behavior of “cp -p” that predates extended attributes . Do you think the best way is to always copy xattrs, add a new parameter, add a new copy function? -- nosy: +eric.araujo title: shutil d