64e217f885
Convert to use idioms that work for both python 3 and python 2.6+ and ensure that a suitable version of dependencies is included for python 3 compatibility. Update python-jenkins to 0.3.4 as the earliest version that supports python 3 without any known regressions. Add an extra parser check for missing 'command' due to changes in how argparse works under python 3. To access the first element of a dict in both python 2 and 3, 'next(iter(dict.items()))' is used as the standard idiom to replace 'dict.items()[0]' as 'items()' returns an iterator in python 3 which cannot be indexed. Using 'next(iter(..))' allows for both lists and iterators to be passed in without unnecessary conversion of iterators to lists which would be true of 'list(dict.items())[0]'. Original change which was reverted due to breaking use of job-groups is If4b35e2ceee8239379700e22eb79a3eaa04d6f0f. This replaces the previous conversion of 'dict.items()[0]' to 'dict.popitem()', which would result in removing a job-group when first called, thus defeating the benefit of being able to reference the group mulitple times. This usage has been replaced with 'next(iter(dict.items()))' as a non-modifying alternative that still avoids creating unnecessary copies of data while working for all supported versions of python. Change-Id: I37e3b67c043dadddb54e16ee584bde3f79e6a770 |
||
---|---|---|
.. | ||
add_managed_to_desc.xml | ||
add_managed_to_desc.yaml | ||
complete001.xml | ||
complete001.yaml | ||
custom_distri.xml | ||
custom_distri.yaml | ||
dont_overwrite_desc.conf | ||
dont_overwrite_desc.xml | ||
dont_overwrite_desc.yaml | ||
include001.xml | ||
include001.yaml | ||
include001.yaml.inc | ||
include-raw001.xml | ||
include-raw001.yaml | ||
include-raw002-cool.sh | ||
include-raw002-cool.zsh | ||
include-raw002.xml | ||
include-raw002.yaml | ||
include-raw-escape001-echo-vars.sh | ||
include-raw-escape001.conf | ||
include-raw-escape001.xml | ||
include-raw-escape001.yaml | ||
include-rawunicode001-cool.sh | ||
include-rawunicode001.xml | ||
include-rawunicode001.yaml | ||
jobgroups_multi_use.xml | ||
jobgroups_multi_use.yaml | ||
scm_remote_deep_bug.xml | ||
scm_remote_deep_bug.yaml | ||
template_honor_defaults.xml | ||
template_honor_defaults.yaml | ||
templates001.xml | ||
templates001.yaml | ||
templates002.xml | ||
templates002.yaml | ||
unicode001.xml | ||
unicode001.yaml | ||
var_applied_in_defaults.xml | ||
var_applied_in_defaults.yaml |