commit:     78449268c7400ff63436d2d5f4a0a3313b7d2f7b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun May 11 21:56:35 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun May 11 22:19:06 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78449268

dev-python/rich: enable py3.14

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-python/rich/files/rich-14.0.0-py314.patch | 84 +++++++++++++++++++++++++++
 dev-python/rich/rich-14.0.0.ebuild            | 12 +++-
 2 files changed, 95 insertions(+), 1 deletion(-)

diff --git a/dev-python/rich/files/rich-14.0.0-py314.patch 
b/dev-python/rich/files/rich-14.0.0-py314.patch
new file mode 100644
index 000000000000..4684f2b469e4
--- /dev/null
+++ b/dev-python/rich/files/rich-14.0.0-py314.patch
@@ -0,0 +1,84 @@
+https://github.com/Textualize/rich/pull/3622
+
+From 91bbeac3ec8b87790865be974260d44adc8def61 Mon Sep 17 00:00:00 2001
+From: Karolina Surma <[email protected]>
+Date: Tue, 28 Jan 2025 10:03:26 +0100
+Subject: [PATCH] Skip tests which are expected to fail with Python 3.14
+
+---
+ tests/test_inspect.py | 9 +++++++++
+ tests/test_pretty.py  | 5 +++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/tests/test_inspect.py b/tests/test_inspect.py
+index 130e8df12..fd1d26e2c 100644
+--- a/tests/test_inspect.py
++++ b/tests/test_inspect.py
+@@ -43,6 +43,11 @@
+     reason="rendered differently on py3.13",
+ )
+ 
++skip_py314 = pytest.mark.skipif(
++    sys.version_info.minor == 14 and sys.version_info.major == 3,
++    reason="rendered differently on py3.14",
++)
++
+ skip_pypy3 = pytest.mark.skipif(
+     hasattr(sys, "pypy_version_info"),
+     reason="rendered differently on pypy3",
+@@ -139,6 +144,7 @@ def test_inspect_empty_dict():
+     assert render({}).startswith(expected)
+ 
+ 
++@skip_py314
+ @skip_py313
+ @skip_py312
+ @skip_py311
+@@ -219,6 +225,7 @@ def test_inspect_integer_with_value():
+ @skip_py311
+ @skip_py312
+ @skip_py313
++@skip_py314
+ def test_inspect_integer_with_methods_python38_and_python39():
+     expected = (
+         "╭──────────────── <class 'int'> ─────────────────╮\n"
+@@ -257,6 +264,7 @@ def 
test_inspect_integer_with_methods_python38_and_python39():
+ @skip_py311
+ @skip_py312
+ @skip_py313
++@skip_py314
+ def test_inspect_integer_with_methods_python310only():
+     expected = (
+         "╭──────────────── <class 'int'> ─────────────────╮\n"
+@@ -299,6 +307,7 @@ def test_inspect_integer_with_methods_python310only():
+ @skip_py310
+ @skip_py312
+ @skip_py313
++@skip_py314
+ def test_inspect_integer_with_methods_python311():
+     # to_bytes and from_bytes methods on int had minor signature change -
+     # they now, as of 3.11, have default values for all of their parameters
+diff --git a/tests/test_pretty.py b/tests/test_pretty.py
+index 90be42f87..29331d9d5 100644
+--- a/tests/test_pretty.py
++++ b/tests/test_pretty.py
+@@ -38,6 +38,10 @@
+     sys.version_info.minor == 13 and sys.version_info.major == 3,
+     reason="rendered differently on py3.13",
+ )
++skip_py314 = pytest.mark.skipif(
++    sys.version_info.minor == 14 and sys.version_info.major == 3,
++    reason="rendered differently on py3.14",
++)
+ 
+ 
+ def test_install() -> None:
+@@ -639,6 +643,7 @@ class Nada:
+ @skip_py311
+ @skip_py312
+ @skip_py313
++@skip_py314
+ def test_attrs_broken() -> None:
+     @attr.define
+     class Foo:
+

diff --git a/dev-python/rich/rich-14.0.0.ebuild 
b/dev-python/rich/rich-14.0.0.ebuild
index 3fb0c38348f8..e61e6af7d292 100644
--- a/dev-python/rich/rich-14.0.0.ebuild
+++ b/dev-python/rich/rich-14.0.0.ebuild
@@ -4,7 +4,7 @@
 EAPI=8
 
 DISTUTILS_USE_PEP517=poetry
-PYTHON_COMPAT=( python3_{10..13} pypy3 pypy3_11 )
+PYTHON_COMPAT=( python3_{11..14} pypy3_11 )
 
 inherit distutils-r1 optfeature
 
@@ -36,6 +36,11 @@ BDEPEND="
        )
 "
 
+PATCHES=(
+       # https://github.com/Textualize/rich/pull/3622
+       "${FILESDIR}"/${PN}-14.0.0-py314.patch
+)
+
 distutils_enable_tests pytest
 
 python_test() {
@@ -62,6 +67,11 @@ python_test() {
                                
tests/test_inspect.py::test_inspect_integer_with_methods_python311
                        )
                        ;;
+               python3.14*)
+                       EPYTEST_DESELECT+=(
+                               # Span vs Style
+                               tests/test_text.py::test_assemble_meta
+                       )
        esac
 
        local -x COLUMNS=80

Reply via email to