Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-typer-slim for
openSUSE:Factory checked in at 2025-09-08 09:56:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-typer-slim (Old)
and /work/SRC/openSUSE:Factory/.python-typer-slim.new.1977 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-typer-slim"
Mon Sep 8 09:56:25 2025 rev:16 rq:1303003 version:0.17.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-typer-slim/python-typer-slim.changes
2025-09-01 17:16:45.963322729 +0200
+++
/work/SRC/openSUSE:Factory/.python-typer-slim.new.1977/python-typer-slim.changes
2025-09-08 09:56:31.615906190 +0200
@@ -2 +2,7 @@
-Sat Aug 30 14:18:00 UTC 2025 - Matthias Bach <[email protected]>
+Sat Sep 6 08:48:36 UTC 2025 - Matthias Bach <[email protected]> - 0.17.4
+
+- Update to 0.17.4
+ * Make sure rich.markup is imported when rendering help text.
+
+-------------------------------------------------------------------
+Sat Aug 30 14:18:00 UTC 2025 - Matthias Bach <[email protected]> - 0.17.3
Old:
----
typer_slim-0.17.3.tar.gz
New:
----
typer_slim-0.17.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-typer-slim.spec ++++++
--- /var/tmp/diff_new_pack.Pgu3wh/_old 2025-09-08 09:56:32.523943930 +0200
+++ /var/tmp/diff_new_pack.Pgu3wh/_new 2025-09-08 09:56:32.527944097 +0200
@@ -20,7 +20,7 @@
%{?sle15_python_module_pythons}
Name: python-typer-slim
-Version: 0.17.3
+Version: 0.17.4
Release: 0
Summary: Typer, build great CLIs. Easy to code. Based on Python type
hints
License: MIT
++++++ typer_slim-0.17.3.tar.gz -> typer_slim-0.17.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/typer_slim-0.17.3/PKG-INFO
new/typer_slim-0.17.4/PKG-INFO
--- old/typer_slim-0.17.3/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
+++ new/typer_slim-0.17.4/PKG-INFO 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: typer-slim
-Version: 0.17.3
+Version: 0.17.4
Summary: Typer, build great CLIs. Easy to code. Based on Python type hints.
Author-Email: =?utf-8?q?Sebasti=C3=A1n_Ram=C3=ADrez?= <[email protected]>
Classifier: Intended Audience :: Information Technology
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/typer_slim-0.17.3/pyproject.toml
new/typer_slim-0.17.4/pyproject.toml
--- old/typer_slim-0.17.3/pyproject.toml 2025-08-30 14:34:53.167327600
+0200
+++ new/typer_slim-0.17.4/pyproject.toml 2025-09-05 20:14:25.710039400
+0200
@@ -40,7 +40,7 @@
"typing-extensions >= 3.7.4.3",
]
readme = "README.md"
-version = "0.17.3"
+version = "0.17.4"
[project.urls]
Homepage = "https://github.com/fastapi/typer"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/typer_slim-0.17.3/requirements-tests.txt
new/typer_slim-0.17.4/requirements-tests.txt
--- old/typer_slim-0.17.3/requirements-tests.txt 2025-08-30
14:34:50.144306000 +0200
+++ new/typer_slim-0.17.4/requirements-tests.txt 2025-09-05
20:14:23.157924200 +0200
@@ -6,7 +6,7 @@
pytest-xdist >=1.32.0,<4.0.0
pytest-sugar >=0.9.4,<1.2.0
mypy ==1.4.1
-ruff ==0.12.10
+ruff ==0.12.11
# Needed explicitly by typer-slim
rich >=10.11.0
shellingham >=1.3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/typer_slim-0.17.3/tests/test_rich_utils.py
new/typer_slim-0.17.4/tests/test_rich_utils.py
--- old/typer_slim-0.17.3/tests/test_rich_utils.py 2025-08-30
14:34:50.147306000 +0200
+++ new/typer_slim-0.17.4/tests/test_rich_utils.py 2025-09-05
20:14:23.160924400 +0200
@@ -1,3 +1,5 @@
+import sys
+
import typer
import typer.completion
from typer.testing import CliRunner
@@ -79,3 +81,21 @@
assert "Hello Rick" in result.stdout
assert "First: option_1_default" in result.stdout
assert "Second: Morty" in result.stdout
+
+
+def test_rich_markup_import_regression():
+ # Remove rich.markup if it was imported by other tests
+ if "rich" in sys.modules:
+ rich_module = sys.modules["rich"]
+ if hasattr(rich_module, "markup"):
+ delattr(rich_module, "markup")
+
+ app = typer.Typer(rich_markup_mode=None)
+
+ @app.command()
+ def main(bar: str):
+ pass # pragma: no cover
+
+ result = runner.invoke(app, ["--help"])
+ assert "Usage" in result.stdout
+ assert "BAR" in result.stdout
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/typer_slim-0.17.3/typer/__init__.py
new/typer_slim-0.17.4/typer/__init__.py
--- old/typer_slim-0.17.3/typer/__init__.py 2025-08-30 14:34:50.155305900
+0200
+++ new/typer_slim-0.17.4/typer/__init__.py 2025-09-05 20:14:23.168924800
+0200
@@ -1,6 +1,6 @@
"""Typer, build great CLIs. Easy to code. Based on Python type hints."""
-__version__ = "0.17.3"
+__version__ = "0.17.4"
from shutil import get_terminal_size as get_terminal_size
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/typer_slim-0.17.3/typer/core.py
new/typer_slim-0.17.4/typer/core.py
--- old/typer_slim-0.17.3/typer/core.py 2025-08-30 14:34:50.155305900 +0200
+++ new/typer_slim-0.17.4/typer/core.py 2025-09-05 20:14:23.168924800 +0200
@@ -372,7 +372,9 @@
extra_str = f"[{extra_str}]"
if rich is not None:
# This is needed for when we want to export to HTML
- extra_str = rich.markup.escape(extra_str).strip()
+ from . import rich_utils
+
+ extra_str = rich_utils.escape_before_html_export(extra_str)
help = f"{help} {extra_str}" if help else f"{extra_str}"
return name, help
@@ -583,7 +585,9 @@
extra_str = f"[{extra_str}]"
if rich is not None:
# This is needed for when we want to export to HTML
- extra_str = rich.markup.escape(extra_str).strip()
+ from . import rich_utils
+
+ extra_str = rich_utils.escape_before_html_export(extra_str)
help = f"{help} {extra_str}" if help else f"{extra_str}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/typer_slim-0.17.3/typer/main.py
new/typer_slim-0.17.4/typer/main.py
--- old/typer_slim-0.17.3/typer/main.py 2025-08-30 14:34:50.155305900 +0200
+++ new/typer_slim-0.17.4/typer/main.py 2025-09-05 20:14:23.168924800 +0200
@@ -75,28 +75,19 @@
return
typer_path = os.path.dirname(__file__)
click_path = os.path.dirname(click.__file__)
- supress_internal_dir_names = [typer_path, click_path]
+ internal_dir_names = [typer_path, click_path]
exc = exc_value
if rich:
- from rich.traceback import Traceback
-
from . import rich_utils
- rich_tb = Traceback.from_exception(
- type(exc),
- exc,
- exc.__traceback__,
- show_locals=exception_config.pretty_exceptions_show_locals,
- suppress=supress_internal_dir_names,
- width=rich_utils.MAX_WIDTH,
- )
+ rich_tb = rich_utils.get_traceback(exc, exception_config,
internal_dir_names)
console_stderr = rich_utils._get_rich_console(stderr=True)
console_stderr.print(rich_tb)
return
tb_exc = traceback.TracebackException.from_exception(exc)
stack: List[FrameSummary] = []
for frame in tb_exc.stack:
- if any(frame.filename.startswith(path) for path in
supress_internal_dir_names):
+ if any(frame.filename.startswith(path) for path in internal_dir_names):
if not exception_config.pretty_exceptions_short:
# Hide the line for internal libraries, Typer and Click
stack.append(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/typer_slim-0.17.3/typer/rich_utils.py
new/typer_slim-0.17.4/typer/rich_utils.py
--- old/typer_slim-0.17.3/typer/rich_utils.py 2025-08-30 14:34:50.156306000
+0200
+++ new/typer_slim-0.17.4/typer/rich_utils.py 2025-09-05 20:14:23.169924700
+0200
@@ -16,11 +16,14 @@
from rich.emoji import Emoji
from rich.highlighter import RegexHighlighter
from rich.markdown import Markdown
+from rich.markup import escape
from rich.padding import Padding
from rich.panel import Panel
from rich.table import Table
from rich.text import Text
from rich.theme import Theme
+from rich.traceback import Traceback
+from typer.models import DeveloperExceptionConfig
if sys.version_info >= (3, 9):
from typing import Literal
@@ -727,6 +730,11 @@
console.print(ABORTED_TEXT, style=STYLE_ABORTED)
+def escape_before_html_export(input_text: str) -> str:
+ """Ensure that the input string can be used for HTML export."""
+ return escape(input_text).strip()
+
+
def rich_to_html(input_text: str) -> str:
"""Print the HTML version of a rich-formatted input string.
@@ -744,3 +752,19 @@
"""Remove rich tags and render a pure text representation"""
console = _get_rich_console()
return "".join(segment.text for segment in
console.render(text)).rstrip("\n")
+
+
+def get_traceback(
+ exc: BaseException,
+ exception_config: DeveloperExceptionConfig,
+ internal_dir_names: List[str],
+) -> Traceback:
+ rich_tb = Traceback.from_exception(
+ type(exc),
+ exc,
+ exc.__traceback__,
+ show_locals=exception_config.pretty_exceptions_show_locals,
+ suppress=internal_dir_names,
+ width=MAX_WIDTH,
+ )
+ return rich_tb