From b5649922c49d7f24fbffde70a793c1af9afd3f8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Fri, 12 Jul 2024 12:12:49 +0200 Subject: [PATCH] dev-python/ipywidgets: Enable py3.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- .../files/ipywidgets-8.1.3-py313.patch | 30 +++++++++++++++++++ dev-python/ipywidgets/ipywidgets-8.1.3.ebuild | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 dev-python/ipywidgets/files/ipywidgets-8.1.3-py313.patch diff --git a/dev-python/ipywidgets/files/ipywidgets-8.1.3-py313.patch b/dev-python/ipywidgets/files/ipywidgets-8.1.3-py313.patch new file mode 100644 index 0000000000000..c8bd3e22a8a6a --- /dev/null +++ b/dev-python/ipywidgets/files/ipywidgets-8.1.3-py313.patch @@ -0,0 +1,30 @@ +From acfa9a3539648a04b11331ad07cab4393069f87f Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Tue, 18 Jun 2024 11:58:07 +0200 +Subject: [PATCH] Make tests compatible with Python 3.13 + +Python compiler newly removes indent from docstrings +https://github.com/python/cpython/issues/81283 +--- + python/ipywidgets/ipywidgets/widgets/tests/test_docutils.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ipywidgets/widgets/tests/test_docutils.py b/ipywidgets/widgets/tests/test_docutils.py +index 1f8b09aa34..462293326c 100644 +--- a/ipywidgets/widgets/tests/test_docutils.py ++++ b/ipywidgets/widgets/tests/test_docutils.py +@@ -15,7 +15,7 @@ def test_substitution(self): + def f(): + """ Docstring with value {key} """ + +- assert f.__doc__ == " Docstring with value 62 " ++ assert "Docstring with value 62" in f.__doc__ + + def test_unused_keys(self): + snippets = {'key': '62', 'other-key': 'unused'} +@@ -24,4 +24,4 @@ def test_unused_keys(self): + def f(): + """ Docstring with value {key} """ + +- assert f.__doc__ == " Docstring with value 62 " ++ assert "Docstring with value 62" in f.__doc__ diff --git a/dev-python/ipywidgets/ipywidgets-8.1.3.ebuild b/dev-python/ipywidgets/ipywidgets-8.1.3.ebuild index fc8deb46de9ba..2d8b2a1677c23 100644 --- a/dev-python/ipywidgets/ipywidgets-8.1.3.ebuild +++ b/dev-python/ipywidgets/ipywidgets-8.1.3.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( pypy3 python3_{10..12} ) +PYTHON_COMPAT=( pypy3 python3_{10..13} ) PYTHON_REQ_USE="threads(+)" inherit distutils-r1 pypi @@ -43,6 +43,8 @@ distutils_enable_tests pytest PATCHES=( # https://github.com/jupyter-widgets/ipywidgets/pull/3903 "${FILESDIR}/${P}-pytest-8.patch" + # https://github.com/jupyter-widgets/ipywidgets/pull/3924 + "${FILESDIR}/${P}-py313.patch" ) python_test() {