I didn't make a patch for this one as I don't have a firm proposal.
Currently Python policy says:
Lists of multiple individual versions (e.g. 2.4, 2.5, 2.6) work for `XS-
Python-Version' and will continue to be supported, but are not recommended and
will not be supported by `X-Python-Version' or `X-Python3-Version' after the
The dh_python3 and py3versions (I only looked for Python 3 so far) currently
in bzr will error on a list like X-Python3-Version: 3.1, 3.2, 3.3.
Based on Stefano Rivera' analysis, this affects no packages in Sid. Extending
the same error to X-Python-Version would affect no packages.
Lists of one or two versions are a bit different. The Python policy currently
has a two item list as an example, e.g. 2.6, 2.7, so it's quite reasonable for
people to expect lists of one or two items to work.
This affects no Python 3 packages, but a small number of Python packages that
use X-Python-Version (vice XS):
List of two versions:
List of one bare version:
Since the code currently supports lists, my thought it that (for Wheezy at the
very least) allowing a list of one bare python version ought to be allowed for
Python (I don't see a lot of value in changing 2.7 to >= 2.7, << 2.8).
For Python 3, since there's no packages currently affected, I think it makes
sense to eliminate lists entirely and just use ranges. If someone wants to
specify one and only one version, they could use == 3.2 (I need to check if
the code supports this).