forked from pool/python-rich
Compare commits
4 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| c799801cb1 | |||
| dddff21be6 | |||
| 582f8ba6fa | |||
| 9a99182c9a |
@@ -1,44 +0,0 @@
|
||||
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
|
||||
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
||||
@@ -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 <mardnh@gmx.de>
|
||||
#
|
||||
# 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.2.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}
|
||||
|
||||
BIN
rich-14.0.0.tar.gz
(Stored with Git LFS)
BIN
rich-14.0.0.tar.gz
(Stored with Git LFS)
Binary file not shown.
3
rich-14.2.0.tar.gz
Normal file
3
rich-14.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:589ddd6a66adbffb9d0e406da9d529a886d2c040177da4b72fad4a8563ff5afc
|
||||
size 15072049
|
||||
Reference in New Issue
Block a user