[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin
joseph.h.garvin added the comment: Sorry I wasn't terribly clear explaining the problem with mkdtemp. Say you create your temporary folder, /tmp/foo. Now you have a regular folder bar laid out like so: bar/ blarg1.ext blarg2.ext subdir/ blarg3.ext blarg4.ext I'd like this to be

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread Brian Curtin
Brian Curtin added the comment: Also, keep in mind that shutil.copytree is more of an example than the be-all-end-all directory copy function, as stated in both the documentation and source code. -- nosy: +brian.curtin ___ Python tracker

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > 1. It's inconsistent with copyfile I think it's ok. When using copyfile you can easily check that the destination file doesn't exist, while with copytree it's harder to do the same for *all* destination files. Therefore it makes sense for copytree to raise

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin
Changes by joseph.h.garvin : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue8125] shutil.copytree behavior is inconsistent with copyfile

2010-03-12 Thread joseph.h.garvin
New submission from joseph.h.garvin : shutil.copyfile's behavior is to replace the dst file if it already exists. shutil.copytree requires that the destination not already exist, and throws an OSError if it does. I see 3 problems with this behavior: 1. It's inconsistent with copyfile 2. It's