Mercurial > cpython-lru_cache-weakref
diff Lib/packaging/command/cmd.py @ 73569:fff38970e4e3
Remove obsolete verbose arguments from packaging.
Logging replaces verbose arguments. I haven’t fixed the example in
Doc/install/install.rst because I have major fixes and changes to the
oc under way and will fix or remove that example as part of that task.
| author | Éric Araujo <merwok@netwok.org> |
|---|---|
| date | Tue, 15 Nov 2011 11:43:20 +0100 |
| parents | c10946a17420 |
| children |
line wrap: on
line diff
--- a/Lib/packaging/command/cmd.py Tue Nov 15 10:48:36 2011 +0100 +++ b/Lib/packaging/command/cmd.py Tue Nov 15 11:43:20 2011 +0100 @@ -351,7 +351,7 @@ def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) - def mkpath(self, name, mode=0o777, dry_run=None, verbose=0): + def mkpath(self, name, mode=0o777, dry_run=None): if dry_run is None: dry_run = self.dry_run name = os.path.normpath(name) @@ -367,9 +367,11 @@ def copy_file(self, infile, outfile, preserve_mode=True, preserve_times=True, link=None, level=1): - """Copy a file respecting verbose, dry-run and force flags. (The - former two default to whatever is in the Distribution object, and - the latter defaults to false for commands that don't define it.)""" + """Copy a file respecting dry-run and force flags. + + (dry-run defaults to whatever is in the Distribution object, and + force to false for commands that don't define it.) + """ if self.dry_run: # XXX add a comment return @@ -380,11 +382,13 @@ def copy_tree(self, infile, outfile, preserve_mode=True, preserve_times=True, preserve_symlinks=False, level=1): - """Copy an entire directory tree respecting verbose, dry-run, + """Copy an entire directory tree respecting dry-run and force flags. """ if self.dry_run: - return # see if we want to display something + # XXX should not return but let copy_tree log and decide to execute + # or not based on its dry_run argument + return return util.copy_tree(infile, outfile, preserve_mode, preserve_times, preserve_symlinks, not self.force, dry_run=self.dry_run) @@ -392,7 +396,7 @@ def move_file(self, src, dst, level=1): """Move a file respecting the dry-run flag.""" if self.dry_run: - return # XXX log ? + return # XXX same thing return move(src, dst) def spawn(self, cmd, search_path=True, level=1):
