diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-06-12 11:38:57 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-06-12 12:03:18 +0200 |
commit | be5b82b9963775d3f4e0da8abc39424527cc7ed1 (patch) | |
tree | fbbe397eea101c25214329b675ceb3198a09bad9 /dev-python/parameterized | |
parent | dev-vcs/mercurial: add 6.7.4, drop 6.7.3 (diff) | |
download | gentoo-be5b82b9963775d3f4e0da8abc39424527cc7ed1.tar.gz gentoo-be5b82b9963775d3f4e0da8abc39424527cc7ed1.tar.bz2 gentoo-be5b82b9963775d3f4e0da8abc39424527cc7ed1.zip |
dev-python/parameterized: Enable py3.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/parameterized')
-rw-r--r-- | dev-python/parameterized/files/parameterized-0.9.0-py313-test.patch | 26 | ||||
-rw-r--r-- | dev-python/parameterized/parameterized-0.9.0.ebuild | 6 |
2 files changed, 30 insertions, 2 deletions
diff --git a/dev-python/parameterized/files/parameterized-0.9.0-py313-test.patch b/dev-python/parameterized/files/parameterized-0.9.0-py313-test.patch new file mode 100644 index 000000000000..cad68e9b7921 --- /dev/null +++ b/dev-python/parameterized/files/parameterized-0.9.0-py313-test.patch @@ -0,0 +1,26 @@ +From 85cd1c5e0b95a75385e68972ceef3329edb7b7f0 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" <code@musicinmybrain.net> +Date: Mon, 30 Oct 2023 10:38:27 -0400 +Subject: [PATCH 1/2] Fix tests to handle Python 3.13 stripping indents from + docstrings + +https://docs.python.org/3.13/whatsnew/3.13.html#other-language-changes + +https://github.com/python/cpython/issues/81283 +--- + parameterized/test.py | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/parameterized/test.py b/parameterized/test.py +index 6419171..6d11e32 100644 +--- a/parameterized/test.py ++++ b/parameterized/test.py +@@ -385,6 +385,8 @@ def _assert_docstring(self, expected_docstring, rstrip=False): + actual_docstring = test_method.__doc__ + if rstrip: + actual_docstring = actual_docstring.rstrip() ++ if sys.version_info[:2] >= (3, 13): ++ expected_docstring = inspect.cleandoc(expected_docstring) + assert_equal(actual_docstring, expected_docstring) + + @parameterized.expand([param("foo")], diff --git a/dev-python/parameterized/parameterized-0.9.0.ebuild b/dev-python/parameterized/parameterized-0.9.0.ebuild index 5ba5013e9c36..15e0862bcdd3 100644 --- a/dev-python/parameterized/parameterized-0.9.0.ebuild +++ b/dev-python/parameterized/parameterized-0.9.0.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( pypy3 python3_{10..12} ) +PYTHON_COMPAT=( pypy3 python3_{10..13} ) inherit distutils-r1 pypi @@ -26,6 +26,8 @@ BDEPEND=" PATCHES=( "${FILESDIR}/${P}-py312-test.patch" + # https://github.com/wolever/parameterized/pull/176 + "${FILESDIR}/${P}-py313-test.patch" ) distutils_enable_tests unittest |