Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix #5687: Don't pass unicode to QApplication() #5690
Conversation
tacaswell
added the
needs_review
label
Dec 17, 2015
jdmarch
commented
Dec 17, 2015
|
Confirmed fixes segfault on Mac and Linux |
tacaswell
added this to the
Critical bugfix release (1.5.1)
milestone
Dec 17, 2015
tacaswell
added the
GUI/Qt
label
Dec 17, 2015
|
tracking down what is going on here: http://doc.qt.io/qt-5/qapplication.html#QApplication is underlying c++, says must be at least one as does http://pyqt.sourceforge.net/Docs/PyQt4/qapplication.html#QApplication where as pyside does not explicitly note this https://srinikom.github.io/pyside-docs/PySide/QtGui/QApplication.html#PySide.QtGui.QApplication |
|
@tacaswell Thanks for pointing to the documentation which states there must be atleast one string in the list. I was not aware of that. In fact i tested using a empty list and it works fine in all combinations of PySide/PyQt4/PyQt5 X python2/python3 |
|
I have reverted the QApplication() args to the way it was before commit 378e37d broke it. |
|
If an empty list works, I would assume the documentation is wrong Is this only a pyside + LPy issue? I think it would be better to have conditional code to special case that rather than have incorrect unicode handling. |
|
I don't think passing string (in py2) is incorrect behavior because the underlying C++ method accepts char**, and also because passing unicode segfaults pyside. It was changed to unicode in a misguided attempt to unify text type. Using unicode here has no correctness benefit simply because we are passing in a constant, and not text which can be set by user and/or the OS. |
|
Can you also file a bug/is there a bug upstream with pyside? I guess this is ok. The path to dropping py2 is going to include a Test failures look un-related (and my fault |
tacaswell
closed this
Dec 21, 2015
tacaswell
reopened this
Dec 21, 2015
tacaswell
added needs_review and removed needs_review
labels
Dec 21, 2015
tacaswell
self-assigned this
Dec 22, 2015
tacaswell
added a commit
that referenced
this pull request
Dec 22, 2015
|
|
tacaswell |
fd83789
|
tacaswell
merged commit fd83789
into matplotlib:master
Dec 22, 2015
tacaswell
removed the
needs_review
label
Dec 22, 2015
|
@pankajp Can you please follow up with upstream (pyside) on this? |
pankajp
deleted the
pankajp:patch-1 branch
Dec 22, 2015
|
Reported upstream: https://bugreports.qt.io/browse/PYSIDE-306. Should be easy to fix if someone gets the time. |
|
Thanks ! On Tue, Dec 22, 2015, 00:11 Pankaj Pandey notifications@github.com wrote:
|
tacaswell
added a commit
that referenced
this pull request
Jan 1, 2016
|
|
tacaswell |
1241122
|
|
Backported as 1241122 |
pankajp commentedDec 17, 2015
PySide QApplication constructor cannot handle unicode text
(segfaults), so we instead pass an empty list to the constructor.
Fixes #5687