Éric Araujo mer...@netwok.org added the comment:
Thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14772
___
___
Python-bugs-list mailing
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset e8ea27ab9fa6 by Brian Curtin in branch 'default':
Add versionchanged tags for #14772 changes
http://hg.python.org/cpython/rev/e8ea27ab9fa6
--
___
Python tracker
Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 8281233ec648 by Brian Curtin in branch 'default':
Fix #14772: Return the destination from some shutil functions.
http://hg.python.org/cpython/rev/8281233ec648
--
nosy: +python-dev
Changes by Brian Curtin br...@python.org:
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14772
___
Hynek Schlawack h...@ox.cx added the comment:
Brian, are you going to update that patch so we can close this? :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14772
___
Éric Araujo mer...@netwok.org added the comment:
In distutils, both copy_file and copy_tree return the destination path(s),
which is needed by many commands. In packaging there is code to compute and
return those paths, as shutil functions return None; I’d love to remove that
code.
The bug
New submission from Brian Curtin br...@python.org:
Attached is a patch to return the final destination of files or directories
sent through shutil's copy, copy2, and move functions. This removes the need to
construct the destination path on your own.
This is especially useful for copy/copy2
Changes by Hynek Schlawack h...@ox.cx:
--
nosy: +hynek
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14772
___
___
Python-bugs-list mailing list
Brian Curtin br...@python.org added the comment:
Here's a patch that fixes the trailing whitespace Hynek noticed as well as adds
an additional test case for copy/copy2.
--
Added file: http://bugs.python.org/file25526/issue14772.diff
___
Python
Brian Curtin br...@python.org added the comment:
Added another test using move as renaming the destination file.
--
Added file: http://bugs.python.org/file25527/issue14772_v2.diff
___
Python tracker rep...@bugs.python.org
Hynek Schlawack h...@ox.cx added the comment:
Code LGTM, a deeper discussion happened on IRC. :)
I'd still suggest for the sake of consistency to return the destination from
copytree() too, but that can be done separately.
--
stage: patch review - commit review
Éric Araujo mer...@netwok.org added the comment:
packaging/distutils2 definitely needs that; the similar functions in
distutils.file_util used to return the file paths, this was lost in the
conversion to shutil, and there is at least one open bug that needs it back.
--
nosy:
Brian Curtin br...@python.org added the comment:
When you say needs that, do you mean the patch as-is, or Hynek's suggestion
to return consistently?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14772
Éric Araujo mer...@netwok.org added the comment:
I meant that packaging needs some shutil functions to return the destination,
but haven’t checked to see if that includes copytree.
--
___
Python tracker rep...@bugs.python.org
14 matches
Mail list logo