Some small fixes to the new options implementation.
Review Request #1236 - Created Oct. 29, 2014 and submitted - Latest diff uploaded
|johanoskarsson, patricklaw, zundel|
These all relate to options whose action is 'append', and address rare corner cases.
Switch some invocations of copy() to deepcopy(), to ensure e.g., that
default values of list type are not shared between the
parser we use to generate help and the parser we use to actually
Distinguish between an empty list value in config, and no value at all.
This ensures that "no value" doesn't trump a hard-coded default because
we mistake it for an explicit config value.
Don't special-case appends to RankedValue. Instead make copy()
return the underlying value. argparse is the only thing that calls copy()
on a RankedValue, and this will ensure that argparse always works with
raw values, both in the list case and (as before) in the single value case.
Nits: Remove an unused import, break up an overlong line.
Various manual tests of corner cases that could trigger these issues. CI running.