11 Commits

Author SHA256 Message Date
b08eb3c349 Accepting request 1281448 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1281448
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rich?expand=0&rev=34
2025-06-02 19:58:53 +00:00
3917c3803b - Update to 14.0.0
* Added
    - Added env var TTY_COMPATIBLE to override auto-detection of TTY
      support (See console.rst for details). #3675
  * Changed
    - An empty NO_COLOR env var is now considered disabled. #3675
    - An empty FORCE_COLOR env var is now considered disabled. #3675
    - Rich tracebacks will now render notes on Python 3.11 onwards
      (added with Exception.add_note) #3676
    - Indentation in exceptions won't be underlined #3678
    - Rich tracebacks will now render Exception Groups #3677

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rich?expand=0&rev=70
2025-05-30 14:45:46 +00:00
c3f763deb5 Accepting request 1271914 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1271914
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rich?expand=0&rev=33
2025-04-23 13:18:21 +00:00
9f7eb23d2e - Add test dependency on attrs
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rich?expand=0&rev=68
2025-04-22 15:01:45 +00:00
445ce6e3e2 Accepting request 1238863 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1238863
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rich?expand=0&rev=32
2025-01-23 16:57:02 +00:00
0ddf25aa4d Accepting request 1238540 from home:mcalabkova:branches:devel:languages:python
- Add pygments.patch to fix tests with Pygments 2.19

OBS-URL: https://build.opensuse.org/request/show/1238540
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rich?expand=0&rev=66
2025-01-20 01:14:21 +00:00
5dd31bfa16 Accepting request 1228407 from devel:languages:python
- Switch to GitHub tarball so we can run the testsuite.
- Correct version guard for typing_extensions Requires.
- Drop Python 3.7 sections.

OBS-URL: https://build.opensuse.org/request/show/1228407
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rich?expand=0&rev=31
2024-12-06 13:25:02 +00:00
303cb1baf1 - Switch to GitHub tarball so we can run the testsuite.
- Correct version guard for typing_extensions Requires.
- Drop Python 3.7 sections.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rich?expand=0&rev=64
2024-12-05 01:45:59 +00:00
d894e20b2c Accepting request 1225564 from devel:languages:python
- update to 13.9.4:
  * Optimizations to cell_len which may speed up Rich / Textual
    output https://github.com/Textualize/rich/pull/3546
- update to 13.9.3:
  * Fix a broken regex that resulted in the slow path being
    chosen for some operations. This fix should result in notable
    speedups for some operations, such as wrapping text.
  * Fixed broken regex that may have resulted in poor
    performance. https://github.com/Textualize/rich/pull/3535
- update to 13.9.2:
  * A hotfix for highlighting in the table, and a fix for
    `Segment.split_cells`
  * Fixed `Table` columns not highlighting when added by
    `add_row` https://github.com/Textualize/rich/issues/3517
  * Fixed an issue with Segment.split_cells reported in Textual
    https://github.com/Textualize/textual/issues/5090
- update to 13.9.1:
  * Fixed typing_extensions dependency
- update to 13.9.0:
  * Dropped support for Python3.7
  * Rich will display tracebacks with finely grained error
    locations on python 3.11+
  * Fixed issue with Segment._split_cells
  * Fix auto detection of terminal size on Windows
  * `Text.style` now respected in Panel title/subtitle
- update to 13.8.1:
  * Added support for Python 3.13
  * Fixed infinite loop when appending Text to same instance
- update to 13.8.0:
  * Fixed `Table` rendering of box elements so "footer" elements

OBS-URL: https://build.opensuse.org/request/show/1225564
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-rich?expand=0&rev=30
2024-11-21 14:13:37 +00:00
3adbeafa9a sequences
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rich?expand=0&rev=62
2024-11-21 10:15:54 +00:00
764f0ef825 - update to 13.9.4:
* Optimizations to cell_len which may speed up Rich / Textual
    output https://github.com/Textualize/rich/pull/3546
- update to 13.9.3:
  * Fix a broken regex that resulted in the slow path being
    chosen for some operations. This fix should result in notable
    speedups for some operations, such as wrapping text.
  * Fixed broken regex that may have resulted in poor
    performance. https://github.com/Textualize/rich/pull/3535
- update to 13.9.2:
  * A hotfix for highlighting in the table, and a fix for
    `Segment.split_cells`
  * Fixed `Table` columns not highlighting when added by
    `add_row` https://github.com/Textualize/rich/issues/3517
  * Fixed an issue with Segment.split_cells reported in Textual
    https://github.com/Textualize/textual/issues/5090
- update to 13.9.1:
  * Fixed typing_extensions dependency
- update to 13.9.0:
  * Dropped support for Python3.7
  * Rich will display tracebacks with finely grained error
    locations on python 3.11+
  * Fixed issue with Segment._split_cells
  * Fix auto detection of terminal size on Windows
  * `Text.style` now respected in Panel title/subtitle
- update to 13.8.1:
  * Added support for Python 3.13
  * Fixed infinite loop when appending Text to same instance
- update to 13.8.0:
  * Fixed `Table` rendering of box elements so "footer" elements

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rich?expand=0&rev=61
2024-11-20 17:46:42 +00:00
5 changed files with 52 additions and 26 deletions

44
pygments.patch Normal file
View File

@@ -0,0 +1,44 @@
From 08be21dadfd2ce9e96e41e366ab38bd8d7cd0e39 Mon Sep 17 00:00:00 2001
From: Dan Lazin <dlazin@users.noreply.github.com>
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

View File

@@ -1,24 +1,3 @@
-------------------------------------------------------------------
Mon Oct 20 08:17:48 UTC 2025 - Markéta Machová <mmachova@suse.com>
- update to 14.2.0
* Python3.14 compatibility
-------------------------------------------------------------------
Sun Sep 14 20:45:10 UTC 2025 - Dirk Müller <dmueller@suse.com>
- 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 <nico.krapp@suse.com> Fri May 30 13:35:48 UTC 2025 - Nico Krapp <nico.krapp@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-rich # spec file for package python-rich
# #
# Copyright (c) 2025 SUSE LLC and contributors # Copyright (c) 2025 SUSE LLC
# Copyright (c) 2020-2021, Martin Hauke <mardnh@gmx.de> # Copyright (c) 2020-2021, Martin Hauke <mardnh@gmx.de>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
@@ -19,12 +19,15 @@
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-rich Name: python-rich
Version: 14.2.0 Version: 14.0.0
Release: 0 Release: 0
Summary: A Python library for rich text and beautiful formatting in the terminal Summary: A Python library for rich text and beautiful formatting in the terminal
License: MIT License: MIT
URL: https://github.com/Textualize/rich URL: https://github.com/Textualize/rich
Source: https://github.com/Textualize/rich/archive/refs/tags/v%{version}.tar.gz#/rich-%{version}.tar.gz 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 base >= 3.8}
BuildRequires: %{python_module markdown-it-py >= 2.2.0} BuildRequires: %{python_module markdown-it-py >= 2.2.0}
BuildRequires: %{python_module pip} BuildRequires: %{python_module pip}

BIN
rich-14.0.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:589ddd6a66adbffb9d0e406da9d529a886d2c040177da4b72fad4a8563ff5afc
size 15072049