From 83a158fd0967da9009f45b3145c8d17240bb8837 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Thu, 5 May 2022 16:53:30 +0200 Subject: [PATCH 1/2] Fix up detection of version 8 Make it work with beta and rc releases. Also test both versions. --- .github/workflows/ci.yml | 6 +++++- ipywidgets_jsonschema/__init__.py | 2 +- ipywidgets_jsonschema/form.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1658cda..ef864be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ on: jobs: testing: - name: Unit Testing (Python ${{ matrix.python }}) + name: Unit Testing (Python ${{ matrix.python }}, ipywidgets${{ matrix.ipywidgets }}) runs-on: ubuntu-20.04 strategy: matrix: @@ -23,6 +23,9 @@ jobs: - "3.8" - "3.9" - "3.10" + ipywidgets: + - "<8" + - "==8.0.0rc0" steps: - name: Checkout repository @@ -35,6 +38,7 @@ jobs: - name: Install package and development dependencies run: | + python -m pip install ipywidgets${{ matrix.ipywidgets }} python -m pip install . python -m pip install -r requirements-dev.txt diff --git a/ipywidgets_jsonschema/__init__.py b/ipywidgets_jsonschema/__init__.py index 3ebd6e0..2dbe7ee 100644 --- a/ipywidgets_jsonschema/__init__.py +++ b/ipywidgets_jsonschema/__init__.py @@ -1,3 +1,3 @@ from ipywidgets_jsonschema.form import Form -__version__ = "0.8.0" +__version__ = "0.8.1" diff --git a/ipywidgets_jsonschema/form.py b/ipywidgets_jsonschema/form.py index ee4ffb8..674f0c1 100644 --- a/ipywidgets_jsonschema/form.py +++ b/ipywidgets_jsonschema/form.py @@ -11,7 +11,7 @@ # We are providing some compatibility for ipywidgets v7 and v8 -IS_VERSION_8 = version.parse(ipywidgets.__version__) >= version.parse("8") +IS_VERSION_8 = version.parse(ipywidgets.__version__).major == 8 class FormError(Exception): From db046857532378eb4dd2792f492a149db7b4d640 Mon Sep 17 00:00:00 2001 From: Dominic Kempf Date: Thu, 5 May 2022 16:55:26 +0200 Subject: [PATCH 2/2] Quote version constraint --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef864be..4cf7345 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: - name: Install package and development dependencies run: | - python -m pip install ipywidgets${{ matrix.ipywidgets }} + python -m pip install "ipywidgets${{ matrix.ipywidgets }}" python -m pip install . python -m pip install -r requirements-dev.txt