Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IPython 0.13.1] The check of PyQt version is wrong #3006

Closed
marco-buttu opened this issue Mar 10, 2013 · 8 comments
Closed

[IPython 0.13.1] The check of PyQt version is wrong #3006

marco-buttu opened this issue Mar 10, 2013 · 8 comments
Milestone

Comments

@marco-buttu
Copy link

In IPython/external/qt.py, at line 43 and 55 there are the checks QtCore.PYQT_VERSION_STR < '4.7'. This is wrong:

Python 3.3.0 (default, Sep 29 2012, 17:14:58)
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.

from PyQt4 import QtCore
QtCore.PYQT_VERSION_STR
'4.10'
QtCore.PYQT_VERSION_STR < '4.7'
True

Due to this bug I have an ImportError running ipython qtconsole:

ImportError: Cannot import PySide >= 1.0.3 or PyQt4 >= 4.7
@takluyver
Copy link
Member

No, that wouldn't work either, because '4.6' > '4.07'.

It's already fixed in master, in any case.

@juliantaylor
Copy link
Contributor

the fix should be backported to 0.13.2 else qtconsole won't run on newer distributions and it also breaks dependencies like spyder

@takluyver takluyver reopened this Mar 10, 2013
@takluyver
Copy link
Member

Ok, that makes sense. @minrk, what's the syntax to backport a commit?

@minrk
Copy link
Member

minrk commented Mar 10, 2013

should be python tools/backport_pr.py 0.13.x 2831

@minrk
Copy link
Member

minrk commented Mar 10, 2013

backport applied

@minrk minrk closed this as completed Mar 10, 2013
@juliantaylor
Copy link
Contributor

IPython.utils.version was forgotten in the backport

@minrk
Copy link
Member

minrk commented Mar 12, 2013

@juliantaylor thanks - I don't know how that happened, but it's fixed now.

@thebne
Copy link

thebne commented Aug 2, 2013

Hotfix:

Replace
if QtCore.PYQT_VERSION_STR < '4.7':
with
if not all(map(lambda x: int(x[0]) >= int(x[1]), zip(QtCore.PYQT_VERSION_STR.split("."), '4.7'.split(".")))):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants