Hi all, 2010/12/28 Hugo Parente Lima <[email protected]>: > On Tuesday 28 December 2010 00:36:46 Algis Kabaila wrote: >> On 2010-11-19 Matti Airas wrote: >> """ >> We now have (in the yet-unreleased Git head version) version >> strings as such: >> >> PySide version: PySide.__version__ and PySide.__version_info__ >> Qt version: PySide.QtCore.__version__ and >> PySide.QtCore.__version_info__ >> """ >> This version information is appreciated. However, it would be >> even more useful if it displayed the minor version information, >> perhaps "b1" for beta1 and "b2" for beta 2 so that it would be >> possible to see what version one is operating. >> >> As the little snipped of program below will show, currently for >> both b1 and b2 the above strings display the following: >> PySide.__version__ shows string "1.0.0" and >> PySide.__version_info__ shows string "(1,0,0)" > > Yes... this is an issue, we can append "~betaX" on __version__ but I don't > know how to proceed with __version_info__, because it's a tuple of ints > besides we don't want this tuple to have different sizes on different PySide > versions.
The 1.0.0 beta 1 could have a version number of 0.99.1 (beta 2 could have 0.99.2, etc..) - this would allow the version number to always be "dotted decimal" and have the versions correctly ordered by comparison. I know that we can't change this for now, but maybe this could be a consideration for the future (i.e. the "1.1" beta 1 could be "1.0.99.1" or whatever). This way, beta versions are sorted "before" the final releases, but still work fine for total ordering. Let's say the imaginary version 1.1 would have four beta releases and the final release: 1.0.99.1 1.0.99.2 1.0.99.3 1.0.99.4 1.1 Now, you write your application and depend on a feature introduced in beta 2 (i.e. "1.0.99.2") - you could now make a version check for "greater than 1.0.99.2", and it will have the correct dependency (assuming that the feature isn't removed in later betas). Oh, and due to the way tuples are compared, you could literally write "PySide.__version_info__ >= (1, 0, 99, 2)" :) Again, this does not solve the current problem, but it could help in defining a policy to follow for future (post-1.0.0) releases and beta releases :) HTH. Thomas _______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
