[issue12344] Add **kwargs to get_reinitialized_command

Éric Araujo report at bugs.python.org
Mon Jul 11 15:12:57 CEST 2011


Éric Araujo <merwok at netwok.org> added the comment:

> In Distributions.get_reinitialized_command should the
> reinitialization of the subcommands also get passed the kwargs?
Yes, the kwargs need to be passed all the way.

> Unfortunately my understanding of the (sub)command flow is not rock
> solid.
Some methods on the command classes are just convenience wrappers for methods on the distribution object.  That’s why I propose here that the real work is done in Distribution.get_reinitialized_command, and that Command.get_reinitialized_command just delegates.

> What are your thoughts on an effective test for this?
Create a command obj with some options.  Call get_reinitialized_command.  Check that its options have the default values, not the values set on the first command obj.

Do the same thing a second time, this time with some kwargs.  Check they’re set on the resulting command obj.

See also three comments about style on http://bugs.python.org/review/8668/diff2/2845:3011/7845

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12344>
_______________________________________


More information about the Python-bugs-list mailing list