Fix #5687: Don't pass unicode to QApplication()#5690
Fix #5687: Don't pass unicode to QApplication()#5690tacaswell merged 1 commit intomatplotlib:masterfrom
Conversation
|
Confirmed fixes segfault on Mac and Linux |
|
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 |
PySide QApplication constructor cannot handle unicode text.
|
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 😞 ) |
Fix #5687: Don't pass unicode to QApplication()
|
@pankajp Can you please follow up with upstream (pyside) on this? |
|
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:
|
Fix #5687: Don't pass unicode to QApplication()
|
Backported as 1241122 |
PySide QApplication constructor cannot handle unicode text
(segfaults), so we instead pass an empty list to the constructor.
Fixes #5687