This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients joseph.h.garvin, pitrou
Date 2010-03-12.16:36:03
SpamBayes Score 7.327472e-15
Marked as misclassified No
Message-id <1268411765.7.0.433244460427.issue8125@psf.upfronthosting.co.za>
In-reply-to
Content
> 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 an error in this case.

> Given shutil's namesake I assume it's supposed to help make python a viable shell script replacement.

It doesn't mean the semantics have to be exactly the same. Actually, many Python users are under Windows where semantics will be different.

> It makes it difficult to use copytree with tempfile.mkdtemp(). If I want to make a temporary directory and copy a folder into it, I need to copytree to a nonexist subfolder then move all the files down a level or resort to other unpythonic hacks.

I actually don't understand your problem. If you are creating a temporary directory, it is empty so there isn't any risk of hitting an already existing file.

In any case, I don't think your arguments are good enough to warrant breaking compatibility with older versions.
History
Date User Action Args
2010-03-12 16:36:05pitrousetrecipients: + pitrou, joseph.h.garvin
2010-03-12 16:36:05pitrousetmessageid: <1268411765.7.0.433244460427.issue8125@psf.upfronthosting.co.za>
2010-03-12 16:36:03pitroulinkissue8125 messages
2010-03-12 16:36:03pitroucreate