commit: 22e17af1232f678edaf3cd24f2669e1addd625b9
Author: Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Fri Jan 26 10:00:40 2024 +0000
Commit: David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri Jan 26 10:01:53 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=22e17af1
dev-python/decopatch: enable py3.12
Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>
dev-python/decopatch/decopatch-1.4.10.ebuild | 6 ++-
.../files/decopatch-1.4.10-python12.patch | 61 ++++++++++++++++++++++
2 files changed, 65 insertions(+), 2 deletions(-)
diff --git a/dev-python/decopatch/decopatch-1.4.10.ebuild
b/dev-python/decopatch/decopatch-1.4.10.ebuild
index e4e7446c82..cda3b4998c 100644
--- a/dev-python/decopatch/decopatch-1.4.10.ebuild
+++ b/dev-python/decopatch/decopatch-1.4.10.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_USE_PEP517=setuptools
DOCS_BUILDER="mkdocs"
@@ -26,6 +26,8 @@ BDEPEND="
test? ( dev-python/pytest-cases[${PYTHON_USEDEP}] )
"
+PATCHES=( "${FILESDIR}/${P}-python12.patch" )
+
distutils_enable_tests pytest
python_prepare_all() {
diff --git a/dev-python/decopatch/files/decopatch-1.4.10-python12.patch
b/dev-python/decopatch/files/decopatch-1.4.10-python12.patch
new file mode 100644
index 0000000000..24ca2082e9
--- /dev/null
+++ b/dev-python/decopatch/files/decopatch-1.4.10-python12.patch
@@ -0,0 +1,61 @@
+https://github.com/smarie/python-decopatch/pull/34
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <[email protected]>
+Date: Tue, 25 Jul 2023 13:31:12 +0200
+Subject: [PATCH] Adjust for whitespace changes with python 3.12
+
+Tests would fail with python3-3.12.0~b4-1.fc39.x86_64.
+--- a/tests/test_doc.py
++++ b/tests/test_doc.py
+@@ -1,5 +1,5 @@
+ from __future__ import print_function
+-
++import re
+
+ import pytest
+ from makefun import wraps
+@@ -182,7 +182,8 @@ def add_ints(a, b):
+ with capsys.disabled():
+ print(captured.out)
+
+- assert captured.out == """hello, world !
++ out = re.sub(r'[ \t]+\n', '\n', captured.out)
++ assert out == """hello, world !
+ <executing foo>
+ hello, world !
+ <executing bar>
+@@ -195,7 +196,7 @@ def add_ints(a, b):
+ say_hello(person='world')
+ This decorator wraps the decorated function so that a nice hello
+ message is printed before each call.
+-
++
+ :param person: the person name in the print message. Default = "world"
+
+ Signature: (person='world')
+--- a/tests/test_doc_advanced.py
++++ b/tests/test_doc_advanced.py
+@@ -1,4 +1,5 @@
+ from __future__ import print_function
++import re
+ import sys
+
+ import pytest
+@@ -200,7 +201,8 @@ def custom(a, b):
+ with capsys.disabled():
+ print(captured.out)
+
+- assert captured.out == """hello, world !
++ out = re.sub(r'[ \t]+\n', '\n', captured.out)
++ assert out == """hello, world !
+ hello, world !
+ hello, you !
+ Help on function say_hello in module tests.test_doc_advanced:
+@@ -208,7 +210,7 @@ def custom(a, b):
+ say_hello(person='world')
+ This decorator modifies the decorated function so that a nice hello
+ message is printed before the call.
+-
++
+ :param person: the person name in the print message. Default = "world"
+ :param f: represents the decorated item. Automatically injected.
+ :return: a modified version of `f` that will print a hello message before
executing