PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 454 - Missing PYSIDE_VERSION and PYSIDE_VERSION_STR constants
: Missing PYSIDE_VERSION and PYSIDE_VERSION_STR constants
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtCore
: HEAD
: All All
: P3 normal
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-11-03 11:49 EET by Matti Airas
Modified: 2010-11-25 17:48 EET (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matti Airas 2010-11-03 11:49:11 EET
QtCore currently doesn't have PYSIDE_VERSION and PYSIDE_VERSION_STR constants,
a la PYQT_VERSION and PYQT_VERSION_STR (or QT_VERSION and QT_VERSION_STR). I
guess they might come handy from time to time?
Comment 1 Chris Morgan 2010-11-12 08:50:09 EET
The normal Python style - and the way I'd vastly prefer - would be to put it as
__version__ instead of as PYSIDE_VERSION_STR.

As for PYSIDE_VERSION, __version_info__ is used often, but as a tuple;
PYSIDE_VERSION would be of the style 0x000403, I presume, seeing as
PYQT_VERSION is 0x040704. Putting it as a tuple is better in every way, though
- (0, 4, 3) is much neater and is more normal Python style than 0x000403 - and
tuple comparison works fine, in precisely the way the int comparison would
work, so you you can do something like PySide.QtCore.__version_info__ >= (0, 4,
5) to require 0.4.5 or later, in just the same way as you'd do
PySide.QtCore.PYSIDE_VERSION >= 0x000405.
Comment 2 Matti Airas 2010-11-12 12:20:45 EET
+1 to Chris's proposal. :-D We can just document the difference to PyQt.
Comment 3 renato filho 2010-11-12 14:27:32 EET
fixed on commit:

commit 178f81aa70711876fe492431ae32afa3538cf460
Author: renatofilho <renato.filho@openbossa.org>
Date:   Fri Nov 12 08:52:09 2010 -0300


Now you use

PySide.__version__ and PySide.__version_info__ for pyside version
PySide.QtCore.__version__ and PySide.QtCore.__version_info__ for Qt version
Comment 4 renato filho 2010-11-25 17:48:21 EET
released on 1.0.0~beta1