Georg Brandl [EMAIL PROTECTED] added the comment:
Committed in r64722. Thanks everyone!
--
resolution: - fixed
status: open - closed
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
___
Changes by Giampaolo Rodola' [EMAIL PROTECTED]:
--
nosy: +giampaolo.rodola
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
___
___
Python-bugs-list
Georg Brandl [EMAIL PROTECTED] added the comment:
Hi Tarek,
here's a review:
* The new docs are not very clear about ignore_patterns being a function
factory. E.g.:
The callable must return a list of folder and file names relative to
the path, that will be ignored in the copy process.
Tarek Ziadé [EMAIL PROTECTED] added the comment:
Thanks Georg, I have changed the patch accordingly.
There's one issue left: the name of the parameter (ignore)
I have renamed it like this on Alexander suggestion, for consistency
with filecmp.dircmp which uses ignore.
By the way, I was
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10392/copytree2.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Tarek Ziadé [EMAIL PROTECTED] added the comment:
patch with the new trunk
Added file: http://bugs.python.org/file10392/copytree2.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10179/copytree.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Tarek Ziadé [EMAIL PROTECTED] added the comment:
Right, thanks.
I have corrected the doc, and pushed some examples at the bottom of the
module documentation.
Added file: http://bugs.python.org/file10177/copytree.patch
__
Tracker [EMAIL PROTECTED]
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10127/shutil.copytree.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Added file: http://bugs.python.org/file10178/copytree.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10177/copytree.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Added file: http://bugs.python.org/file10179/copytree.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10178/copytree.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Raghuram Devarakonda [EMAIL PROTECTED] added the comment:
My update with email failed so I am just copying my response here:
while working on the patch to add the same feature in rmtree, I realized
this is a non sense since the root folder itself is removed at the end
of the function when
Raghuram Devarakonda [EMAIL PROTECTED] added the comment:
The patch looks good to me.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Python-bugs-list mailing list
Raghuram Devarakonda [EMAIL PROTECTED] added the comment:
I forgot to add that the example provided in rst doc is incorrect. The
copytree() in that example should be given destination path as well. In
addition, the docstring for copytree mentions which is a directory
list. directory list is a
Tarek Ziadé [EMAIL PROTECTED] added the comment:
Agreed, rmtree should have it as well. I'll add that in the patch as well,
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
Tarek Ziadé [EMAIL PROTECTED] added the comment:
while working on the patch to add the same feature in rmtree, I realized
this is a non sense since the root folder itself is removed at the end
of the function when all its content is removed.
So, unless we change this behavior, which I doubt it
Tarek Ziadé [EMAIL PROTECTED] added the comment:
I have thaught of various ways to write this new API for the deletion
use case, but I think nothing makes it easier and shorter than a simple
os.walk call.
__
Tracker [EMAIL PROTECTED]
Tarek Ziadé [EMAIL PROTECTED] added the comment:
This patch includes the documentation for shutils.rst as well. (I
removed the older patches)
Added file: http://bugs.python.org/file10127/shutil.copytree.patch
__
Tracker [EMAIL PROTECTED]
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10066/shutil.copytree.filtering.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
Changes by Tarek Ziadé [EMAIL PROTECTED]:
Removed file: http://bugs.python.org/file10073/shutil.copytree.filtering.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
Tarek Ziadé [EMAIL PROTECTED] added the comment:
I changed the patch based on all remarks. For the absolute path, I was
wondering if it would be useful since calls are recursive, relative to
the visited directory.
Added file: http://bugs.python.org/file10073/shutil.copytree.filtering.patch
Raghuram Devarakonda [EMAIL PROTECTED] added the comment:
Is there any reason for rmtree also to not support this exclusion
feature? Both copytree and rmtree explicitly iterate over list of names
and as I see it, this exclusion is really about which names to ignore.
Already, copytree and rmtree
Changes by Raghuram Devarakonda [EMAIL PROTECTED]:
--
nosy: +draghuram
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Python-bugs-list mailing list
Alexander Belopolsky [EMAIL PROTECTED] added the comment:
On the interface, I would suggest renaming 'exclude' to 'ignore' for
consistency with filecmp.dircmp. Also consider detecting file separator
in the patterns and interpreting them as an absolute (if
pattern.startswith(pathsep)) or
New submission from Tarek Ziadé [EMAIL PROTECTED]:
Here's a first draft of a small addon to shutil.copytree.
This patch allows excluding some folders or files from the copy, given
glob-style patterns. A callable can also be provided instead of the
patterns, for a more complex filtering.
I
Changes by Gustavo J. A. M. Carneiro [EMAIL PROTECTED]:
--
nosy: +gustavo
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2663
__
___
Python-bugs-list mailing list
28 matches
Mail list logo