Skip to content

Commit 0b88f5d

Browse files
committed
Improve compatibility with ipywidgets 8.0
Before this change pytest failed with an error: ==================================== ERRORS ==================================== __________________ ERROR collecting qgrid/tests/test_grid.py ___________________ /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) <frozen importlib._bootstrap>:1204: in _gcd_import ??? <frozen importlib._bootstrap>:1176: in _find_and_load ??? <frozen importlib._bootstrap>:1126: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:241: in _call_with_frames_removed ??? <frozen importlib._bootstrap>:1204: in _gcd_import ??? <frozen importlib._bootstrap>:1176: in _find_and_load ??? <frozen importlib._bootstrap>:1126: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:241: in _call_with_frames_removed ??? <frozen importlib._bootstrap>:1204: in _gcd_import ??? <frozen importlib._bootstrap>:1176: in _find_and_load ??? <frozen importlib._bootstrap>:1147: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:690: in _load_unlocked ??? <frozen importlib._bootstrap_external>:940: in exec_module ??? <frozen importlib._bootstrap>:241: in _call_with_frames_removed ??? qgrid/__init__.py:3: in <module> from .grid import ( qgrid/grid.py:524: in <module> @widgets.register() E TypeError: register() missing 1 required positional argument: 'widget' =============================== warnings summary =============================== qgrid/grid.py:30 qgrid/grid.py:30 /home/runner/work/qgridtrusted/qgridtrusted/qgrid/grid.py:30: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(pd.__version__) > LooseVersion('0.20.0'): -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ After this change that TypeError does not occur.
1 parent 23ebdee commit 0b88f5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qgrid/grid.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def stringify(x):
511511
return str(x)
512512

513513

514-
@widgets.register()
514+
@widgets.register
515515
class QgridWidget(widgets.DOMWidget):
516516
"""
517517
The widget class which is instantiated by the ``show_grid`` method. This

0 commit comments

Comments
 (0)