This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Version number handling
Type: Stage:
Components: Distutils Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, jhylton, rhettinger
Priority: normal Keywords:

Created on 2002-04-29 20:28 by akuchling, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch.version akuchling, 2002-04-29 20:28 Add sysconfig.get_python_version()
Messages (6)
msg10617 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2002-04-29 20:28
A while ago, Tim Peters mentioned in a check-in message:

"Change the version string from "2.2+" to "2.3a0".  distutils 
peels off
the first 3 characters of this string in several places, so for as 
long
as they remain "2.2" it confuses the heck out of attempts to 
build 2.3 stuff using distutils."

It's true; distutils does sys.version[:3] in a few places.
The attached patch factors this out so it'll be easier to 
change.  

(There's also a Python development issue here, namely when
the version number gets bumped in the CVS tree.)


 
msg10618 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2002-05-14 10:51
Logged In: YES 
user_id=80475

Nice factoring.

Would it be more bulletproof to use sys.version_info 
instead of sys.version[:3]?  Perhaps, wrap it in try/except 
to catch versions before Py2.0.
msg10619 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2002-05-15 20:54
Logged In: YES 
user_id=11375

Maybe.  But I don't know if I still care about 1.5.2.  If 
I don't, then the code can just always use sys.version_info.

msg10620 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2002-07-25 16:12
Logged In: YES 
user_id=31392

Do we still care about this patch?
msg10621 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2002-09-05 13:53
Logged In: YES 
user_id=11375

Probably we can just use sys.version_info, since we don't care about 
1.5.2 any more.
msg10622 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2002-11-14 01:45
Logged In: YES 
user_id=11375

Checked in, since MAL argued convincingly for maintaining
1.5.2 support.
History
Date User Action Args
2022-04-10 16:05:16adminsetgithub: 36521
2002-04-29 20:28:54akuchlingcreate