STINNER Victor added the comment:
Note: Python 2.7 is not affected, I cannot find winerror in shutil.py.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21775
___
Roundup Robot added the comment:
New changeset 50517a4d7cce by Berker Peksag in branch '3.4':
Issue #21775: shutil.copytree(): fix crash when copying to VFAT
https://hg.python.org/cpython/rev/50517a4d7cce
New changeset 7d5754af95a9 by Berker Peksag in branch 'default':
Issue #21775:
Berker Peksag added the comment:
Committed the patch with a NEWS entry. Thanks Greg.
(You can send your SSH key to hgaccou...@python.org. See also
https://docs.python.org/devguide/coredev.html#ssh)
--
nosy: +berker.peksag
resolution: - fixed
stage: commit review - resolved
status:
Greg Ward added the comment:
Would it be possible to write a unit test, maybe using unittest.mock to
mock most parts?
Good idea! Turns out this was quite straightforward. The test patch is:
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -1,6 +1,7 @@
# Copyright (C) 2003
Greg Ward added the comment:
I'll commit on branch 3.4 and merge to default.
Whoops, never mind. Looks like I don't have push permission to hg.python.org
after all. It's been 8 years since my last commit, so I shouldn't complain.
So... can someone with commit privs please
hg pull -r
Changes by Serhiy Storchaka storch...@gmail.com:
--
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21775
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
LGTM. Go ahead Greg.
--
assignee: - gward
nosy: +serhiy.storchaka
stage: - commit review
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21775
STINNER Victor added the comment:
Would it be possible to write a unit test, maybe using unittest.mock to mock
most parts?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21775
New submission from Greg Ward:
When using shutil.copytree() on Linux to copy to a VFAT filesystem, it crashes
like this:
Traceback (most recent call last):
File /data/src/cpython/3.4/Lib/shutil.py, line 336, in copytree
copystat(src, dst)
File /data/src/cpython/3.4/Lib/shutil.py, line
Greg Ward added the comment:
In 3.3 and earlier, copytree() crashes roughly as described in issue1545, with
shutil.Error that wraps the underlying Operation not permitted error from
trying to chmod() something in a VFAT filesystem. Since this appears to
accurately reflect what's coming from
Greg Ward added the comment:
Bad news: because reproducing this requires sudo (to mount an arbitrary
filesystem), I'm not sure it's possible/desirable to add test code for it.
Good news: the fix is trivial, and it passes my manual test. Here's a patch:
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
11 matches
Mail list logo