mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
dev-python/parameterized: Enable py3.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
7ecf8e71b9
commit
be5b82b996
@ -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")],
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user