]> granicus.if.org Git - python/commit
Use sys.version_info instead of sys.version in packaging.
authorÉric Araujo <merwok@netwok.org>
Fri, 10 Feb 2012 04:20:53 +0000 (05:20 +0100)
committerÉric Araujo <merwok@netwok.org>
Fri, 10 Feb 2012 04:20:53 +0000 (05:20 +0100)
commit9f90a731eb9a09e9e2fc022800475ff22206ac01
tree9d026480d581f750298603d300bc053e8fce745f
parentea0b1edf45c5fa33163fa59f33849029cd58c9e1
Use sys.version_info instead of sys.version in packaging.

The contents of this attribute are an implementation detail, as
documented for #9442, so we should not parse it, to support non-CPython
VMs with distutils2 in the future.

Unfortunately, one use comes directly from PEP 345, so an edit will have
to be agreed before fixing the code (see comment in p7g.markers).

Other remaining uses are found in p7g.compiler and could be replaced by
the platform module (which also parses sys.version, but then it wouldn’t
be my fault :)
Lib/packaging/command/bdist_msi.py
Lib/packaging/command/bdist_wininst.py
Lib/packaging/command/build.py
Lib/packaging/command/install_dist.py
Lib/packaging/compiler/cygwinccompiler.py
Lib/packaging/markers.py
Lib/packaging/pypi/simple.py
Lib/packaging/tests/test_command_build.py