-
Notifications
You must be signed in to change notification settings - Fork 85
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
Traits test suite failing with PySide 6.7.0 #1787
Labels
Comments
Minimal reproducer: from traits.api import HasTraits, Int
from traitsui.testing.api import UITester
class HasInt(HasTraits):
foo = Int()
obj = HasInt()
with UITester().create_ui(obj):
pass Output of the above when run: (traits) ~/traits % python -Xfaulthander bug.py (main)traits
Traceback (most recent call last):
File "shibokensupport/signature/mapping.py", line 182, in update
File "shibokensupport/signature/mapping.py", line 656, in init_PySide6_QtTest
AttributeError: type object 'PySide6.QtTest.QTest' has no attribute 'QTouchEventSequence'
Fatal Python error: seterror_argument failed to call update_mapping
Python runtime state: initialized
Current thread 0x00007ff85a6a2100 (most recent call first):
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_base.py", line 134 in __init__
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_base.py", line 252 in create_dialog
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_live.py", line 103 in init
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_base.py", line 294 in display_ui
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_live.py", line 72 in _ui_dialog
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_live.py", line 52 in ui_live
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/toolkit.py", line 168 in ui_live
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/ui.py", line 234 in ui
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/view.py", line 457 in ui
File "/Users/mdickinson/Enthought/ETS/traits/traits/has_traits.py", line 1752 in edit_traits
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/testing/tester/ui_tester.py", line 105 in create_ui
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py", line 137 in __enter__
File "/Users/mdickinson/Enthought/ETS/traits/bug.py", line 8 in <module>
Extension modules: traits.ctraits, xxsubtype, shiboken6.Shiboken, PySide6.QtCore, PySide6.QtGui, PySide6.QtWidgets, PySide6.QtPrintSupport, PySide6.QtNetwork, PySide6.QtWebChannel, PySide6.QtWebEngineCore, PySide6.QtWebEngineWidgets, PySide6.QtTest (total: 12)
zsh: abort python -Xfaulthander bug.py If I remove the UI tester involvement I get a different failure (a TypeError). The following script: from traits.api import HasTraits, Int
class HasInt(HasTraits):
foo = Int()
obj = HasInt()
obj.configure_traits() gives: (traits) ~/traits % python -Xfaulthander bug.py (main)traits
Traceback (most recent call last):
File "/Users/mdickinson/Enthought/ETS/traits/bug.py", line 7, in <module>
obj.configure_traits()
File "/Users/mdickinson/Enthought/ETS/traits/traits/has_traits.py", line 2100, in configure_traits
rc = toolkit().view_application(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/toolkit.py", line 237, in view_application
return view_application.view_application(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/view_application.py", line 92, in view_application
return ViewApplication(
^^^^^^^^^^^^^^^^
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/view_application.py", line 127, in __init__
self.ui = self.view.ui(
^^^^^^^^^^^^^
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/view.py", line 457, in ui
ui.ui(parent, kind)
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/ui.py", line 234, in ui
self.rebuild(self, parent)
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/toolkit.py", line 168, in ui_live
ui_live.ui_live(ui, parent)
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_live.py", line 52, in ui_live
_ui_dialog(ui, parent, BaseDialog.NONMODAL)
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_live.py", line 72, in _ui_dialog
BaseDialog.display_ui(ui, parent, style)
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_base.py", line 294, in display_ui
ui.owner.init(ui, parent, style)
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_live.py", line 103, in init
self.create_dialog(parent, style)
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_base.py", line 252, in create_dialog
self.control = control = _StickyDialog(self.ui, parent)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/mdickinson/.venvs/traits/lib/python3.12/site-packages/traitsui/qt/ui_base.py", line 134, in __init__
layout.addWidget(self._mw)
TypeError: 'PySide6.QtWidgets.QBoxLayout.addWidget' called with wrong argument types:
PySide6.QtWidgets.QBoxLayout.addWidget(QMainWindow)
Supported signatures:
PySide6.QtWidgets.QBoxLayout.addWidget(PySide6.QtWidgets.QWidget, int = 0, PySide6.QtCore.Qt.AlignmentFlag = Default(Qt.Alignment))
(traits) ~/traits % |
The latter failure is already reported here: enthought/traitsui#2045 |
This was referenced Apr 24, 2024
mdickinson
added a commit
that referenced
this issue
Apr 29, 2024
This PR removes a test that's using `UITester` from TraitsUI. This test exposed the Traits test suite to a class of possible issues with 3rd party GUI frameworks (in this case PySide6); historically, `UITester` has also been a particularly fragile part of TraitsUI. In its place is a test that at least executes the `Enum.create_editor` method, but doesn't attempt to create an instance of the editor. We also fix an issue with test dependencies and the latest release of Sphinx: `defusedxml` is now required to run the tests for the Traits documenter. Closes #1787
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Traits test suite appears to be crashing with a segfault with the recently released PySide 6.7.0.
Here's a traceback:
The text was updated successfully, but these errors were encountered: