diff --git a/pygments.patch b/pygments.patch deleted file mode 100644 index a816396..0000000 --- a/pygments.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 08be21dadfd2ce9e96e41e366ab38bd8d7cd0e39 Mon Sep 17 00:00:00 2001 -From: Dan Lazin -Date: Tue, 7 Jan 2025 16:04:56 -0500 -Subject: [PATCH] Fix test that changed with Pygments 2.19. - ---- - tests/test_markdown.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: rich-13.9.4/tests/test_markdown.py -=================================================================== ---- rich-13.9.4.orig/tests/test_markdown.py -+++ rich-13.9.4/tests/test_markdown.py -@@ -110,7 +110,7 @@ def test_inline_code(): - inline_code_theme="emacs", - ) - result = render(markdown) -- expected = "inline \x1b[1;38;2;170;34;255;48;2;248;248;248mimport\x1b[0m\x1b[38;2;0;0;0;48;2;248;248;248m \x1b[0m\x1b[1;38;2;0;0;255;48;2;248;248;248mthis\x1b[0m code \n" -+ expected = "inline \x1b[1;38;2;170;34;255;48;2;248;248;248mimport\x1b[0m\x1b[38;2;187;187;187;48;2;248;248;248m \x1b[0m\x1b[1;38;2;0;0;255;48;2;248;248;248mthis\x1b[0m code \n" - print(result) - print(repr(result)) - assert result == expected -Index: rich-13.9.4/tests/test_syntax.py -=================================================================== ---- rich-13.9.4.orig/tests/test_syntax.py -+++ rich-13.9.4/tests/test_syntax.py -@@ -53,7 +53,7 @@ def test_blank_lines(): - print(repr(result)) - assert ( - result -- == "\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m1 \x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m2 \x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m3 \x1b[0m\x1b[1;38;2;0;128;0;48;2;248;248;248mimport\x1b[0m\x1b[38;2;0;0;0;48;2;248;248;248m \x1b[0m\x1b[1;38;2;0;0;255;48;2;248;248;248mthis\x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m4 \x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m5 \x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n" -+ == "\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m1 \x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m2 \x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m3 \x1b[0m\x1b[1;38;2;0;128;0;48;2;248;248;248mimport\x1b[0m\x1b[38;2;187;187;187;48;2;248;248;248m \x1b[0m\x1b[1;38;2;0;0;255;48;2;248;248;248mthis\x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m4 \x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n\x1b[1;38;2;24;24;24;48;2;248;248;248m \x1b[0m\x1b[38;2;173;173;173;48;2;248;248;248m5 \x1b[0m\x1b[48;2;248;248;248m \x1b[0m\n" - ) - - -@@ -119,7 +119,7 @@ def test_python_render_simple_indent_gui - ) - rendered_syntax = render(syntax) - print(repr(rendered_syntax)) -- expected = '\x1b[34mdef\x1b[0m \x1b[32mloop_first_last\x1b[0m(values: Iterable[T]) -> Iterable[Tuple[\x1b[36mb\x1b[0m\n\x1b[2;37m│ \x1b[0m\x1b[33m"""Iterate and generate a tuple with a flag for first an\x1b[0m\n\x1b[2m│ \x1b[0miter_values = \x1b[36miter\x1b[0m(values)\n\x1b[2m│ \x1b[0m\x1b[34mtry\x1b[0m:\n\x1b[2m│ │ \x1b[0mprevious_value = \x1b[36mnext\x1b[0m(iter_values)\n\x1b[2m│ \x1b[0m\x1b[34mexcept\x1b[0m \x1b[36mStopIteration\x1b[0m:\n\x1b[2m│ │ \x1b[0m\x1b[34mreturn\x1b[0m\n\x1b[2m│ \x1b[0mfirst = \x1b[34mTrue\x1b[0m\n\x1b[2m│ \x1b[0m\x1b[34mfor\x1b[0m value \x1b[35min\x1b[0m iter_values:\n\x1b[2m│ │ \x1b[0m\x1b[34myield\x1b[0m first, \x1b[34mFalse\x1b[0m, previous_value\n\x1b[2m│ │ \x1b[0mfirst = \x1b[34mFalse\x1b[0m\n\x1b[2m│ │ \x1b[0mprevious_value = value\n\x1b[2m│ \x1b[0m\x1b[34myield\x1b[0m first, \x1b[34mTrue\x1b[0m, previous_value\n' -+ expected = '\x1b[34mdef\x1b[0m\x1b[37m \x1b[0m\x1b[32mloop_first_last\x1b[0m(values: Iterable[T]) -> Iterable[Tuple[\x1b[36mb\x1b[0m\n\x1b[2;37m│ \x1b[0m\x1b[33m"""Iterate and generate a tuple with a flag for first an\x1b[0m\n\x1b[2m│ \x1b[0miter_values = \x1b[36miter\x1b[0m(values)\n\x1b[2m│ \x1b[0m\x1b[34mtry\x1b[0m:\n\x1b[2m│ │ \x1b[0mprevious_value = \x1b[36mnext\x1b[0m(iter_values)\n\x1b[2m│ \x1b[0m\x1b[34mexcept\x1b[0m \x1b[36mStopIteration\x1b[0m:\n\x1b[2m│ │ \x1b[0m\x1b[34mreturn\x1b[0m\n\x1b[2m│ \x1b[0mfirst = \x1b[34mTrue\x1b[0m\n\x1b[2m│ \x1b[0m\x1b[34mfor\x1b[0m value \x1b[35min\x1b[0m iter_values:\n\x1b[2m│ │ \x1b[0m\x1b[34myield\x1b[0m first, \x1b[34mFalse\x1b[0m, previous_value\n\x1b[2m│ │ \x1b[0mfirst = \x1b[34mFalse\x1b[0m\n\x1b[2m│ │ \x1b[0mprevious_value = value\n\x1b[2m│ \x1b[0m\x1b[34myield\x1b[0m first, \x1b[34mTrue\x1b[0m, previous_value\n' - assert rendered_syntax == expected - - diff --git a/python-rich.changes b/python-rich.changes index 3b2bd76..2f4bf4e 100644 --- a/python-rich.changes +++ b/python-rich.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Sun Sep 14 20:45:10 UTC 2025 - Dirk Müller + +- update to 14.1.0: + * Removed `typing_extensions` from runtime dependencies + * Live objects (including Progress) may now be nested + * Added padding property to Syntax which returns a tuple of + four integers + * Fixed extraction of recursive exceptions + * Fixed padding applied to Syntax + * Fixed `Panel` title missing the panel background style + * Added `TTY_INTERACTIVE` environment variable to force + interactive mode off or on +- drop pygments.patch (upstream) + ------------------------------------------------------------------- Fri May 30 13:35:48 UTC 2025 - Nico Krapp diff --git a/python-rich.spec b/python-rich.spec index bfd4bf2..d8c5a8e 100644 --- a/python-rich.spec +++ b/python-rich.spec @@ -1,7 +1,7 @@ # # spec file for package python-rich # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # Copyright (c) 2020-2021, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -19,15 +19,12 @@ %{?sle15_python_module_pythons} Name: python-rich -Version: 14.0.0 +Version: 14.1.0 Release: 0 Summary: A Python library for rich text and beautiful formatting in the terminal License: MIT URL: https://github.com/Textualize/rich Source: https://github.com/Textualize/rich/archive/refs/tags/v%{version}.tar.gz#/rich-%{version}.tar.gz -# PATCH-FIX-UPSTREAM https://github.com/Textualize/rich/pull/3604 Fix test that changed with Pygments 2.19. -# and https://github.com/Textualize/rich/pull/3608 fix remaining tests with Pygments 2.19 #3604 did not fix -Patch: pygments.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module markdown-it-py >= 2.2.0} BuildRequires: %{python_module pip} diff --git a/rich-14.0.0.tar.gz b/rich-14.0.0.tar.gz deleted file mode 100644 index 8a34f7c..0000000 --- a/rich-14.0.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0a1a45eb997b6fd1b133192b9590c9de9bd7fe7e2948540b4433d4ba413f331c -size 15065886 diff --git a/rich-14.1.0.tar.gz b/rich-14.1.0.tar.gz new file mode 100644 index 0000000..bf76c89 --- /dev/null +++ b/rich-14.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f21cbcf44386ba2b306552f506dd3ede86349cafd2a8cbf1b7bb38b705a64594 +size 15070577