From 5711c6d0d95e503fb8464fc6f5f16346768c5c79 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 8 Jun 2022 09:55:47 +0200 Subject: [PATCH 1/2] Use `dict` instead of `print` to test callable without signature In Python 3.11, `inspect.signature(print)` no longer raises ValueError. Fixes: https://github.com/jupyter-widgets/ipywidgets/issues/3459 --- python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py b/python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py index 5002009b4f..7038bb44ad 100644 --- a/python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py +++ b/python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py @@ -578,7 +578,7 @@ def test_multiple_selection(): def test_interact_noinspect(): a = 'hello' - c = interactive(print, a=a) + c = interactive(dict, a=a) w = c.children[0] check_widget(w, cls=widgets.Text, From 35b97148c882502a4fc16b056029509895e3c574 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Thu, 9 Jun 2022 19:39:25 +0200 Subject: [PATCH 2/2] Add Python 3.11 to CI and metadata --- .github/workflows/tests.yml | 4 ++-- python/ipywidgets/setup.cfg | 1 + python/jupyterlab_widgets/setup.cfg | 1 + python/widgetsnbextension/setup.cfg | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a518bbe9ca..3aa46a0b24 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -88,12 +88,12 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11-dev'] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - uses: actions/cache@v1 diff --git a/python/ipywidgets/setup.cfg b/python/ipywidgets/setup.cfg index 33aa4ac992..cdfe2bacfc 100644 --- a/python/ipywidgets/setup.cfg +++ b/python/ipywidgets/setup.cfg @@ -22,6 +22,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Programming Language :: Python :: 3 :: Only Framework :: Jupyter diff --git a/python/jupyterlab_widgets/setup.cfg b/python/jupyterlab_widgets/setup.cfg index e8f12e2ea8..cc19bfadd6 100644 --- a/python/jupyterlab_widgets/setup.cfg +++ b/python/jupyterlab_widgets/setup.cfg @@ -22,6 +22,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Programming Language :: Python :: 3 :: Only Framework :: Jupyter Framework :: Jupyter :: JupyterLab diff --git a/python/widgetsnbextension/setup.cfg b/python/widgetsnbextension/setup.cfg index c009dc4884..3fb79aa7e8 100644 --- a/python/widgetsnbextension/setup.cfg +++ b/python/widgetsnbextension/setup.cfg @@ -22,6 +22,7 @@ classifiers = Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Programming Language :: Python :: 3 :: Only Framework :: Jupyter