This is because in Python 2.6, an index was required inside the
.format() field's brace placeholder:
% python2.6 -c "'{}'.format('foo')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError: zero length field name in format
Python 2.7 relaxed that constraint so that its .format() syntax is
compatible with Python 3.
Our virtualenv hack to use unvendored wheels requires the relaxed
syntax.
What doesn't make sense though is why Python 2.6 is trying to execute
code out of /usr/lib/python3/dist-packages/virtualenv.py. IIRC,
virtualenv supports alternative Python's by re-execing itself using the
other Python. This is borderline crazy and has caused other problems in
the past. I also believe that upstream virtualenv was recently (or will
recently be) rewritten to avoid this error-prone re-exec.
The fix of course would be simple, but it's questionable whether it's
worth the effort given that Python 2.6 isn't supported on Ubuntu since
Lucid, and we'd probably have to make the change first in Debian, which
doesn't support Python 2.6 in Wheezy. Then there are the issues of
SRU'ing those changes into the relevant Ubuntu releases.
Maybe a more tractable solution is to add a tweaked virtualenv to the
PPA? Since you're getting Python 2.6 out of there, it wouldn't be much
additional effort to put a compatible virtualenv in there too.
** Changed in: python-virtualenv (Ubuntu)
Status: New => Opinion
** Changed in: python-virtualenv (Ubuntu)
Importance: Undecided => Low
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1398059
Title:
virtualenv -p python2.6 fails with ValueError: zero length field name
in format
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/1398059/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs