[issue6856] allow setting uid and gid when creating tar files
report at bugs.python.org
Mon Sep 7 14:25:25 CEST 2009
Tarek Ziadé <ziade.tarek at gmail.com> added the comment:
> TarInfo does not need set_uid() or set_gid() methods,
> both can be set using the uid and gid attributes.
I was thinking about the set_ methods to be able to use
"root" (str) instead of "0" (int) for example, like
what the tar command seems to allow with --uid and --gid.
> I am not against adding a new option. Although, it's too bad that
> I added the exclude option in 2.6 not long ago, which does
> something very similar and would again be replaced by this
> more general "include" option. BTW, I think calling
> the option "filter" would be more suitable for what it's doing.
Maybe we could add the "filter" option for 2.7/3.2 together with the
exclude option? And add a deprecation warning for "exclude" when it's
used, since it would then become *one* use case for "filter".
We could also add an exclude callable in the module, as an example
usage of the filter option, exactly like I did for shutil.copytree
(look for ignore_patterns).
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list