[docs] [issue29349] Update old Python 2 code in Docs/tools/extensions/patchlevel.py
report at bugs.python.org
Sun Jan 29 16:33:12 EST 2017
Martin Panter added the comment:
Thanks Ned. Do you know what version of Python Sphinx uses (which runs patchlevel.py)?
According to Issue 28039, David set up Python 2.7 so that “make touch” would work. But the log also uses a python2.5 command, and apparently Python 2.3 also installed on that buildbot.
If we can rely on 2.6+, we just need to add “from __future__ import print_function”. Otherwise, we may need something like
if sys.stderr is not None:
and also do something about that “with” statement.
Python tracker <report at bugs.python.org>
More information about the docs