enthought / enthought/pyface

Bug report: 8.0.0 pyqt6 test_add_to_menu fails

Open
#1,250 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
115
Forks
54
PR merge metrics
No merged PRs in 30d

Description

## Environment

OS: Linux
Python version: 3.11
Toolkit: Qt
Qt API: PyQt6

## Description

```
ERROR: test_add_to_menu (pyface.action.tests.test_action_item.TestActionItem.test_add_to_menu)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/orion/BUILDROOT/python-pyface-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/pyface/action/tests/test_action_item.py", line 100, in test_add_to_menu
action_item.add_to_menu(window.control, menu, None)
File "/home/orion/BUILDROOT/python-pyface-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/pyface/action/action_item.py", line 100, in add_to_menu
wrapper = _MenuItem(parent, menu, self, controller)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/orion/BUILDROOT/python-pyface-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/pyface/ui/qt/action/action_item.py", line 82, in __init__
self.control = menu.addAction(
^^^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
addAction(self, icon: QIcon, text: str): argument 1 has unexpected type 'str'
addAction(self, icon: QIcon, text: str, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection): argument 1 has unexpected type 'str'
addAction(self, icon: QIcon, text: str, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int]): argument 1 has unexpected type 'str'
addAction(self, icon: QIcon, text: str, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int], slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection): argument 1 has unexpected type 'str'
addAction(self, text: str): too many arguments
addAction(self, text: str, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int]): argument 2 has unexpected type 'method'
addAction(self, text: str, slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection): argument 3 has unexpected type 'str'
addAction(self, text: str, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int], slot: PYQT_SLOT, type: Qt.ConnectionType = Qt.AutoConnection): argument 2 has unexpected type 'method'
addAction(self, action: QAction): argument 1 has unexpected type 'str'
```

## Steps to Reproduce
```
+ QT_API=pyqt6
+ case $toolkit in
+ export ETS_TOOLKIT=qt
+ ETS_TOOLKIT=qt
+ export EXCLUDE_TESTS=wx
+ EXCLUDE_TESTS=wx
+ fail=0
+ xvfb-run /usr/bin/python3 -Xfaulthandler -s -m unittest discover -v -f pyface
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.