Bug 2267090

Summary: [abrt] python3-qtconsole: show_items(): completion_html.py:315:show_items:TypeError: compute_item_matrix() got an unexpected keyword argument 'displaywidth'
Product: [Fedora] Fedora Reporter: kapsh
Component: python-qtconsoleAssignee: Lumír Balhar <lbalhar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: kapsh, lbalhar, mhroncok, python-packagers-sig
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/2043cdbce6af0fa82aa36b289f99fd656ffa49a
Whiteboard: abrt_hash:fd4fddffdd36e5adb0419d4deda0a83d0a437e30;VARIANT_ID=kde;
Fixed In Version: python-qtconsole-5.5.1-1.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-22 01:15:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: cpuinfo
none
File: os_info
none
File: backtrace none

Description kapsh 2024-02-29 16:57:48 UTC
Description of problem:
Tab completion crashes qtconsole. 
Should be fixed in 5.5.1 by https://github.com/jupyter/qtconsole/commit/5bf935cd9effb6a5e90326a6ef8c1f1bcdd48f21

Version-Release number of selected component:
python3-qtconsole-5.5.0-1.fc39

Additional info:
reporter:       libreport-2.17.11
kernel:         6.7.5-200.fc39.x86_64
cgroup:         0::/user.slice/user-2222.slice/user/app.slice/app-jupyter\x2dqtconsole-4042e8b00005436696674a0be9a044a8.scope
reason:         completion_html.py:315:show_items:TypeError: compute_item_matrix() got an unexpected keyword argument 'displaywidth'
interpreter:    python3-3.12.1-2.fc39.x86_64
uid:            2222
cmdline:        /usr/bin/python3 /usr/bin/jupyter-qtconsole
package:        python3-qtconsole-5.5.0-1.fc39
crash_function: show_items
exception_type: TypeError
runlevel:       N 5
executable:     /usr/bin/jupyter-qtconsole
type:           Python3

Truncated backtrace:
completion_html.py:315:show_items:TypeError: compute_item_matrix() got an unexpected keyword argument 'displaywidth'

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/qtconsole/base_frontend_mixin.py", line 138, in _dispatch
    handler(msg)
  File "/usr/lib/python3.12/site-packages/qtconsole/jupyter_widget.py", line 176, in _handle_complete_reply
    self._complete_with_items(cursor, matches)
  File "/usr/lib/python3.12/site-packages/qtconsole/console_widget.py", line 1090, in _complete_with_items
    self._completion_widget.show_items(cursor, items,
  File "/usr/lib/python3.12/site-packages/qtconsole/completion_html.py", line 315, in show_items
    items_m, ci = compute_item_matrix(items, empty=" ", displaywidth=displaywidth)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: compute_item_matrix() got an unexpected keyword argument 'displaywidth'

Local variables in innermost frame:
self: <qtconsole.completion_html.CompletionHtml object at 0x7fc82380b380>
cursor: <PyQt5.QtGui.QTextCursor object at 0x7fc81bfadfd0>
items: ['abs', 'all', 'any', 'ascii', 'assert', 'async', 'await', '%alias', '%alias_magic', '%autoawait', '%autocall', '%automagic', '%autosave']
prefix_length: 0
width: 664.0
char_width: 8
displaywidth: 82

Comment 1 kapsh 2024-02-29 16:57:52 UTC
Created attachment 2019448 [details]
File: cpuinfo

Comment 2 kapsh 2024-02-29 16:57:53 UTC
Created attachment 2019449 [details]
File: os_info

Comment 3 kapsh 2024-02-29 16:57:55 UTC
Created attachment 2019450 [details]
File: backtrace

Comment 4 Miro Hrončok 2024-03-13 13:29:42 UTC
The linked commit is included in 5.5.1. We have already updated to 5.5.1 in Fedora 40+. Perhaps we can do that on Fedora 39 as well.

Comment 5 Fedora Update System 2024-03-13 16:40:50 UTC
FEDORA-2024-909a06aba9 (python-qtconsole-5.5.1-1.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-909a06aba9

Comment 6 Fedora Update System 2024-03-14 01:59:14 UTC
FEDORA-2024-909a06aba9 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-909a06aba9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-909a06aba9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2024-03-22 01:15:30 UTC
FEDORA-2024-909a06aba9 (python-qtconsole-5.5.1-1.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.