[New-bugs-announce] [issue5747] knowing the parent command

Tarek Ziadé <report@bugs.python.org> at psf.upfronthosting.co.za Tarek Ziadé <report@bugs.python.org> at psf.upfronthosting.co.za
Mon Apr 13 17:16:41 CEST 2009


New submission from Tarek Ziadé <ziade.tarek at gmail.com>:

Right now there's no way in a command to know that it was launched as a
subcommand from another command.

For instance every install_* command knows explicitely that it is
launched as a subcommand of 'install' and takes back its options in
finalize_options() using set_undefined_options().

For commands that might be used as subcommands of several commands, we
need to pass the name of the parent command to finalize_options() so 
we can call set_undefined_options() without knowing explicitely the name
of the parent command.

This will be done by adding an optional parameter called
'parent_command', to run_command(), then to ensure_finalized() and to
finalized_options().

The first use case of this will be the check command, that will be used
by "register" and "sdist".

This change will be backward compatible with the existing commands and
ths new parameter optional

----------
assignee: tarek
components: Distutils
messages: 85950
nosy: tarek
priority: normal
severity: normal
status: open
title: knowing the parent command
type: feature request
versions: Python 2.7, Python 3.1

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


More information about the New-bugs-announce mailing list