python3-jupyter_ipywidgets: update to 8.1.3.

This commit is contained in:
Gonzalo Tornaría 2024-08-03 16:48:57 -03:00 committed by Andrew J. Hesford
parent 66e4e1bd71
commit 96019e445b
2 changed files with 98 additions and 2 deletions

View File

@ -0,0 +1,93 @@
See: https://github.com/jupyter-widgets/ipywidgets/pull/3903
From bbc6c064aa797eb21bd5a9b441dbbc76925a72db Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Thu, 11 Apr 2024 11:40:15 +0200
Subject: [PATCH] Fix compatibility with pytest 8
Resolves: https://github.com/jupyter-widgets/ipywidgets/issues/3883
---
.../ipywidgets/ipywidgets/widgets/tests/test_interaction.py | 2 --
python/ipywidgets/ipywidgets/widgets/tests/test_link.py | 1 -
.../ipywidgets/ipywidgets/widgets/tests/test_send_state.py | 2 +-
.../ipywidgets/ipywidgets/widgets/tests/test_set_state.py | 2 +-
python/ipywidgets/ipywidgets/widgets/tests/utils.py | 6 +++---
5 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py b/python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py
index 0dc7e5fcfc..feb1afe50c 100644
--- a/python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py
+++ b/python/ipywidgets/ipywidgets/widgets/tests/test_interaction.py
@@ -19,8 +19,6 @@
# Utility stuff
#-----------------------------------------------------------------------------
-from .utils import setup, teardown
-
def f(**kwargs):
pass
diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_link.py b/python/ipywidgets/ipywidgets/widgets/tests/test_link.py
index 0c92dfdcb2..9301764d40 100644
--- a/python/ipywidgets/ipywidgets/widgets/tests/test_link.py
+++ b/python/ipywidgets/ipywidgets/widgets/tests/test_link.py
@@ -4,7 +4,6 @@
import pytest
from .. import jslink, jsdlink, ToggleButton
-from .utils import setup, teardown
def test_jslink_args():
with pytest.raises(TypeError):
diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_send_state.py b/python/ipywidgets/ipywidgets/widgets/tests/test_send_state.py
index ec18ae4af1..98465b9b7d 100644
--- a/python/ipywidgets/ipywidgets/widgets/tests/test_send_state.py
+++ b/python/ipywidgets/ipywidgets/widgets/tests/test_send_state.py
@@ -3,7 +3,7 @@
from traitlets import Bool, Tuple, List
-from .utils import setup, teardown, DummyComm
+from .utils import setup
from ..widget import Widget
diff --git a/python/ipywidgets/ipywidgets/widgets/tests/test_set_state.py b/python/ipywidgets/ipywidgets/widgets/tests/test_set_state.py
index 82ecbd9311..22ec54d90f 100644
--- a/python/ipywidgets/ipywidgets/widgets/tests/test_set_state.py
+++ b/python/ipywidgets/ipywidgets/widgets/tests/test_set_state.py
@@ -6,7 +6,7 @@
from traitlets import Bool, Tuple, List, Instance, CFloat, CInt, Float, Int, TraitError, observe
-from .utils import setup, teardown
+from .utils import setup
import ipywidgets
from ipywidgets import Widget
diff --git a/python/ipywidgets/ipywidgets/widgets/tests/utils.py b/python/ipywidgets/ipywidgets/widgets/tests/utils.py
index 260485e3f8..8dbbcb355b 100644
--- a/python/ipywidgets/ipywidgets/widgets/tests/utils.py
+++ b/python/ipywidgets/ipywidgets/widgets/tests/utils.py
@@ -12,7 +12,7 @@
NEW_COMM_PACKAGE = False
import ipykernel.comm
-
+import pytest
class DummyComm():
comm_id = 'a-b-c-d'
@@ -87,10 +87,10 @@ def teardown_test_comm():
setattr(Widget, attr, value)
_widget_attrs.clear()
+@pytest.fixture(autouse=True)
def setup():
setup_test_comm()
-
-def teardown():
+ yield
teardown_test_comm()
def call_method(method, *args, **kwargs):

View File

@ -1,6 +1,6 @@
# Template file for 'python3-jupyter_ipywidgets'
pkgname=python3-jupyter_ipywidgets
version=8.1.2
version=8.1.3
revision=1
build_style=python3-pep517
hostmakedepends="python3-wheel"
@ -12,7 +12,10 @@ license="BSD-3-Clause"
homepage="https://github.com/jupyter-widgets/ipywidgets"
changelog="https://raw.githubusercontent.com/jupyter-widgets/ipywidgets/main/docs/source/changelog.md"
distfiles="${PYPI_SITE}/i/ipywidgets/ipywidgets-${version}.tar.gz"
checksum=d0b9b41e49bae926a866e613a39b0f0097745d2b9f1f3dd406641b4a57ec42c9
checksum=f5f9eeaae082b1823ce9eac2575272952f40d748893972956dc09700a6392d9c
# main repo `.../python/ipywidgets/ipywidgets/` is `.../ipywidgets/` here
patch_args=-Np3
post_install() {
vlicense LICENSE