diff --git a/sdk_container/src/third_party/portage-stable/dev-python/rich/files/rich-14.0.0-py314.patch b/sdk_container/src/third_party/portage-stable/dev-python/rich/files/rich-14.0.0-py314.patch new file mode 100644 index 0000000000..4684f2b469 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/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 +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 = ( + "╭──────────────── ─────────────────╮\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 = ( + "╭──────────────── ─────────────────╮\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/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-14.0.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-14.0.0.ebuild index 3fb0c38348..5cf4037f03 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/rich/rich-14.0.0.ebuild +++ b/sdk_container/src/third_party/portage-stable/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 @@ -26,9 +26,6 @@ RDEPEND=" dev-python/colorama[${PYTHON_USEDEP}] >=dev-python/markdown-it-py-2.2.0[${PYTHON_USEDEP}] >=dev-python/pygments-2.13.0[${PYTHON_USEDEP}] - $(python_gen_cond_dep ' - >=dev-python/typing-extensions-4.0.0[${PYTHON_USEDEP}] - ' 3.10) " BDEPEND=" test? ( @@ -36,6 +33,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 +64,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