Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-typer for openSUSE:Factory 
checked in at 2026-06-30 15:11:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-typer (Old)
 and      /work/SRC/openSUSE:Factory/.python-typer.new.11887 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-typer"

Tue Jun 30 15:11:05 2026 rev:36 rq:1362320 version:0.26.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-typer/python-typer.changes        
2026-06-05 14:56:21.342518757 +0200
+++ /work/SRC/openSUSE:Factory/.python-typer.new.11887/python-typer.changes     
2026-06-30 15:11:10.091439224 +0200
@@ -1,0 +2,8 @@
+Sun Jun 28 17:49:26 UTC 2026 - Matthias Bach <[email protected]>
+
+- Update to 0.27.8
+  * Make second column of Rich help output reflect the type
+    consistently, even when using metavar.
+  * Fix formatting in NoSuchOption.format_message().
+
+-------------------------------------------------------------------

Old:
----
  typer-0.26.7.tar.gz

New:
----
  typer-0.26.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-typer.spec ++++++
--- /var/tmp/diff_new_pack.F5P6vY/_old  2026-06-30 15:11:10.927467631 +0200
+++ /var/tmp/diff_new_pack.F5P6vY/_new  2026-06-30 15:11:10.931467767 +0200
@@ -25,7 +25,7 @@
 %endif
 %{?sle15_python_module_pythons}
 Name:           python-typer
-Version:        0.26.7
+Version:        0.26.8
 Release:        0
 Summary:        Typer, build great CLIs. Easy to code. Based on Python type 
hints
 License:        MIT

++++++ set-proper-pythonpath-for-file-argument-tests.patch ++++++
--- /var/tmp/diff_new_pack.F5P6vY/_old  2026-06-30 15:11:10.971469126 +0200
+++ /var/tmp/diff_new_pack.F5P6vY/_new  2026-06-30 15:11:10.979469398 +0200
@@ -1,15 +1,15 @@
 From: Matthias Bach <[email protected]>
 Date: Wed, 3 Jun 2026 21:27:26 +0200
 Subject: [PATCH] Ensure PYTHONPATH is passed in file argument tests
-References: https://github.com/tiangolo/typer/pull/407
-Upstream: tbd
+References: https://github.com/tiangolo/typer/pull/1827
+Upstream: sent
 
 ---
- tests/test_types_file.py | 9 +++++++++
- 1 file changed, 9 insertions(+)
+ tests/test_types_file.py | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
 
 diff --git a/tests/test_types_file.py b/tests/test_types_file.py
-index 3fb7d82..298d4f1 100644
+index 3fb7d82..734867d 100644
 --- a/tests/test_types_file.py
 +++ b/tests/test_types_file.py
 @@ -1,3 +1,4 @@
@@ -25,20 +25,25 @@
  from tests.utils import needs_linux, needs_windows
  
  app = typer.Typer()
-@@ -136,6 +138,12 @@ def test_binary_dash() -> None:
+@@ -136,6 +138,17 @@ def test_binary_dash() -> None:
  
  
  def test_binary_stderr() -> None:
 +    env = os.environ.copy()
-+    if "PYTHONPATH" in env:
-+        env["PYTHONPATH"] = ":".join(
-+            [str(Path(tests.__path__[0]).parent)] + [env["PYTHONPATH"]]
-+        )
++    env.update(
++        {
++            "PYTHONPATH": ":".join(
++                [str(Path(tests.__path__[0]).parent)] + [env["PYTHONPATH"]]
++            )
++        }
++        if "PYTHONPATH" in env
++        else {}
++    )
 +
      result = subprocess.run(
          [
              sys.executable,
-@@ -146,6 +154,7 @@ def test_binary_stderr() -> None:
+@@ -146,6 +159,7 @@ def test_binary_stderr() -> None:
              "write-binary-stderr",
          ],
          capture_output=True,

++++++ set-proper-pythonpath-for-tutorial-script-tests.patch ++++++
--- /var/tmp/diff_new_pack.F5P6vY/_old  2026-06-30 15:11:10.991469805 +0200
+++ /var/tmp/diff_new_pack.F5P6vY/_new  2026-06-30 15:11:10.995469941 +0200
@@ -1,7 +1,7 @@
 From: Matthias Bach <[email protected]>
 Date: Fri, 24 Jun 2022 19:54:06 +0200
 Subject: [PATCH] Ensure the PYTHONPATH is set properly when testing the 
tutorial scripts
-References: https://github.com/tiangolo/typer/pull/407
+References: https://github.com/tiangolo/typer/pull/1827
 Upstream: sent
 
 When packaging Typer for openSUSE I ran into errors because the tutorial

++++++ typer-0.26.7.tar.gz -> typer-0.26.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typer-0.26.7/PKG-INFO new/typer-0.26.8/PKG-INFO
--- old/typer-0.26.7/PKG-INFO   1970-01-01 01:00:00.000000000 +0100
+++ new/typer-0.26.8/PKG-INFO   1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.4
 Name: typer
-Version: 0.26.7
+Version: 0.26.8
 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]>
 License-Expression: MIT
@@ -46,9 +46,6 @@
 <a 
href="https://github.com/fastapi/typer/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster";>
     <img 
src="https://github.com/fastapi/typer/actions/workflows/test.yml/badge.svg?event=push&branch=master";
 alt="Test">
 </a>
-<a href="https://github.com/fastapi/typer/actions?query=workflow%3APublish";>
-    <img src="https://github.com/fastapi/typer/workflows/Publish/badge.svg"; 
alt="Publish">
-</a>
 <a 
href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/typer";>
     <img 
src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/typer.svg"; 
alt="Coverage">
 <a href="https://pypi.org/project/typer";>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typer-0.26.7/README.md new/typer-0.26.8/README.md
--- old/typer-0.26.7/README.md  2026-06-03 09:18:02.298297400 +0200
+++ new/typer-0.26.8/README.md  2026-06-26 11:22:40.261824400 +0200
@@ -9,9 +9,6 @@
 <a 
href="https://github.com/fastapi/typer/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster";>
     <img 
src="https://github.com/fastapi/typer/actions/workflows/test.yml/badge.svg?event=push&branch=master";
 alt="Test">
 </a>
-<a href="https://github.com/fastapi/typer/actions?query=workflow%3APublish";>
-    <img src="https://github.com/fastapi/typer/workflows/Publish/badge.svg"; 
alt="Publish">
-</a>
 <a 
href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/typer";>
     <img 
src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/typer.svg"; 
alt="Coverage">
 <a href="https://pypi.org/project/typer";>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typer-0.26.7/pyproject.toml 
new/typer-0.26.8/pyproject.toml
--- old/typer-0.26.7/pyproject.toml     2026-06-03 09:18:04.491969300 +0200
+++ new/typer-0.26.8/pyproject.toml     2026-06-26 11:22:43.564250500 +0200
@@ -43,7 +43,7 @@
     "colorama; platform_system == 'Windows'",
 ]
 readme = "README.md"
-version = "0.26.7"
+version = "0.26.8"
 
 [project.urls]
 Homepage = "https://github.com/fastapi/typer";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typer-0.26.7/tests/test_rich_utils.py 
new/typer-0.26.8/tests/test_rich_utils.py
--- old/typer-0.26.7/tests/test_rich_utils.py   2026-06-03 09:18:02.319093200 
+0200
+++ new/typer-0.26.8/tests/test_rich_utils.py   2026-06-26 11:22:40.273391500 
+0200
@@ -108,31 +108,31 @@
 @pytest.mark.parametrize("input_text", ["[ARGS]", "[ARGS]..."])
 def test_metavar_highlighter(input_text: str):
     """
-    Test that the MetavarHighlighter works correctly.
+    Test that the TypesHighlighter (used to be the MetavarHighlighter) works 
correctly.
     cf PR 1508
     """
     from typer.rich_utils import (
-        STYLE_METAVAR_SEPARATOR,
+        STYLE_TYPES_SEPARATOR,
         Text,
         _get_rich_console,
-        metavar_highlighter,
+        types_highlighter,
     )
 
     console = _get_rich_console()
 
     text = Text(input_text)
-    highlighted = metavar_highlighter(text)
+    highlighted = types_highlighter(text)
     console.print(highlighted)
 
     # Get the style for each bracket
     opening_bracket_style = highlighted.get_style_at_offset(console, 0)
     closing_bracket_style = highlighted.get_style_at_offset(console, 5)
 
-    # The opening bracket should have metavar_sep style
-    assert str(opening_bracket_style) == STYLE_METAVAR_SEPARATOR
+    # The opening bracket should have types_sep style
+    assert str(opening_bracket_style) == STYLE_TYPES_SEPARATOR
 
-    # The closing bracket should have metavar_sep style (fails before PR 1508 
when there are 3 dots)
-    assert str(closing_bracket_style) == STYLE_METAVAR_SEPARATOR
+    # The closing bracket should have types_sep style (fails before PR 1508 
when there are 3 dots)
+    assert str(closing_bracket_style) == STYLE_TYPES_SEPARATOR
 
 
 def test_make_rich_text_with_ansi_escape_sequences():
@@ -222,3 +222,44 @@
     assert pos_a == pos_b == pos_c, (
         f"Right boundaries not aligned: A={pos_a}, B={pos_b}, C={pos_c}"
     )
+
+
+def test_rich_help_metavar():
+    app = typer.Typer(rich_markup_mode="rich")
+
+    @app.command()
+    def main(
+        *,
+        arg1: int,
+        arg2: int = 42,
+        arg3: int = typer.Argument(...),
+        arg4: int = typer.Argument(42),
+        arg5: int = typer.Option(...),
+        arg6: int = typer.Option(42),
+        arg7: int = typer.Argument(42, metavar="meta7"),
+        arg8: int = typer.Argument(metavar="ARG8"),
+        arg9: int = typer.Argument(metavar="arg9"),
+    ):
+        pass  # pragma: no cover
+
+    result = runner.invoke(app, ["--help"])
+    assert "Usage: main [OPTIONS] ARG1 ARG3 [ARG4] [meta7] ARG8 arg9" in 
result.stdout
+
+    out_nospace = result.stdout.replace(" ", "")
+
+    # arguments
+    assert "arg1INTEGER" in out_nospace
+    assert "arg3INTEGER" in out_nospace
+    assert "[arg4]INTEGER" in out_nospace
+    assert "[meta7]INTEGER" in out_nospace
+    assert "ARG8INTEGER" in out_nospace
+    assert "arg9INTEGER" in out_nospace
+
+    assert "arg7" not in result.stdout.lower()
+    assert "arg8" not in result.stdout
+    assert "ARG9" not in result.stdout
+
+    # options
+    assert "arg2INTEGER" in out_nospace
+    assert "arg5INTEGER" in out_nospace
+    assert "arg6INTEGER" in out_nospace
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/typer-0.26.7/tests/test_tutorial/test_arguments/test_help/test_tutorial006.py
 
new/typer-0.26.8/tests/test_tutorial/test_arguments/test_help/test_tutorial006.py
--- 
old/typer-0.26.7/tests/test_tutorial/test_arguments/test_help/test_tutorial006.py
   2026-06-03 09:18:02.320710200 +0200
+++ 
new/typer-0.26.8/tests/test_tutorial/test_arguments/test_help/test_tutorial006.py
   2026-06-26 11:22:40.274712000 +0200
@@ -4,6 +4,7 @@
 from types import ModuleType
 
 import pytest
+import typer
 from typer.testing import CliRunner
 
 runner = CliRunner()
@@ -22,16 +23,31 @@
     return mod
 
 
-def test_help(mod: ModuleType):
-    result = runner.invoke(mod.app, ["--help"])
[email protected](
+    name="app",
+    params=[
+        pytest.param(None),
+        pytest.param("rich"),
+    ],
+)
+def get_app(mod: ModuleType, request: pytest.FixtureRequest) -> typer.Typer:
+    rich_markup_mode = request.param
+    app = typer.Typer(rich_markup_mode=rich_markup_mode)
+    app.command()(mod.main)
+    return app
+
+
+def test_help(app):
+    result = runner.invoke(app, ["--help"])
     assert result.exit_code == 0
     assert "Usage: main [OPTIONS] [✨username✨]" in result.output
+    assert "NAME" not in result.output
     assert "Arguments" in result.output
     assert "[default: World]" in result.output
 
 
-def test_call_arg(mod: ModuleType):
-    result = runner.invoke(mod.app, ["Camila"])
+def test_call_arg(app):
+    result = runner.invoke(app, ["Camila"])
     assert result.exit_code == 0
     assert "Hello Camila" in result.output
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/typer-0.26.7/tests/test_tutorial/test_commands/test_help/test_tutorial007.py
 
new/typer-0.26.8/tests/test_tutorial/test_commands/test_help/test_tutorial007.py
--- 
old/typer-0.26.7/tests/test_tutorial/test_commands/test_help/test_tutorial007.py
    2026-06-03 09:18:02.321883400 +0200
+++ 
new/typer-0.26.8/tests/test_tutorial/test_commands/test_help/test_tutorial007.py
    2026-06-26 11:22:40.275252600 +0200
@@ -36,6 +36,7 @@
 def test_create_help(mod: ModuleType):
     result = runner.invoke(mod.app, ["create", "--help"])
     assert result.exit_code == 0
+    assert "create [OPTIONS] USERNAME [LASTNAME]" in result.output
     assert "username" in result.output
     assert "The username to create" in result.output
     assert "Secondary Arguments" in result.output
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typer-0.26.7/typer/__init__.py 
new/typer-0.26.8/typer/__init__.py
--- old/typer-0.26.7/typer/__init__.py  2026-06-03 09:18:02.328448300 +0200
+++ new/typer-0.26.8/typer/__init__.py  2026-06-26 11:22:40.278658900 +0200
@@ -1,6 +1,6 @@
 """Typer, build great CLIs. Easy to code. Based on Python type hints."""
 
-__version__ = "0.26.7"
+__version__ = "0.26.8"
 
 from shutil import get_terminal_size as get_terminal_size
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typer-0.26.7/typer/_click/exceptions.py 
new/typer-0.26.8/typer/_click/exceptions.py
--- old/typer-0.26.7/typer/_click/exceptions.py 2026-06-03 09:18:02.328666200 
+0200
+++ new/typer-0.26.8/typer/_click/exceptions.py 2026-06-26 11:22:40.278789300 
+0200
@@ -197,7 +197,7 @@
             return self.message
 
         possibility_str = ", ".join(sorted(self.possibilities))
-        suggest = (f"(Possible options: {possibility_str})",)
+        suggest = f"(Possible options: {possibility_str})"
         return f"{self.message} {suggest}"
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typer-0.26.7/typer/rich_utils.py 
new/typer-0.26.8/typer/rich_utils.py
--- old/typer-0.26.7/typer/rich_utils.py        2026-06-03 09:18:02.330093400 
+0200
+++ new/typer-0.26.8/typer/rich_utils.py        2026-06-26 11:22:40.279534300 
+0200
@@ -33,8 +33,8 @@
 STYLE_SWITCH = "bold green"
 STYLE_NEGATIVE_OPTION = "bold magenta"
 STYLE_NEGATIVE_SWITCH = "bold red"
-STYLE_METAVAR = "bold yellow"
-STYLE_METAVAR_SEPARATOR = "dim"
+STYLE_TYPES = "bold yellow"
+STYLE_TYPES_SEPARATOR = "dim"
 STYLE_USAGE = "yellow"
 STYLE_USAGE_COMMAND = "bold"
 STYLE_DEPRECATED = "red"
@@ -112,7 +112,7 @@
     highlights = [
         r"(^|\W)(?P<switch>\-\w+)(?![a-zA-Z0-9])",
         r"(^|\W)(?P<option>\-\-[\w\-]+)(?![a-zA-Z0-9])",
-        r"(?P<metavar>\<[^\>]+\>)",
+        r"(?P<types>\<[^\>]+\>)",
         r"(?P<usage>Usage: )",
     ]
 
@@ -125,17 +125,17 @@
 
 
 # Highlighter to make [ | ] and <> dim
-class MetavarHighlighter(RegexHighlighter):
+class TypesHighlighter(RegexHighlighter):
     highlights = [
-        r"^(?P<metavar_sep>(\[|<))",
-        r"(?P<metavar_sep>\|)",
-        r"(?P<metavar_sep>(\]|>))(\.\.\.)?$",
+        r"^(?P<types_sep>(\[|<))",
+        r"(?P<types_sep>\|)",
+        r"(?P<types_sep>(\]|>))(\.\.\.)?$",
     ]
 
 
 highlighter = OptionHighlighter()
 negative_highlighter = NegativeOptionHighlighter()
-metavar_highlighter = MetavarHighlighter()
+types_highlighter = TypesHighlighter()
 
 
 def _has_ansi_character(text: str) -> bool:
@@ -150,8 +150,8 @@
                 "switch": STYLE_SWITCH,
                 "negative_option": STYLE_NEGATIVE_OPTION,
                 "negative_switch": STYLE_NEGATIVE_SWITCH,
-                "metavar": STYLE_METAVAR,
-                "metavar_sep": STYLE_METAVAR_SEPARATOR,
+                "types": STYLE_TYPES,
+                "types_sep": STYLE_TYPES_SEPARATOR,
                 "usage": STYLE_USAGE,
             },
         ),
@@ -364,31 +364,45 @@
         opt_short_strs = []
         secondary_opt_long_strs = []
         secondary_opt_short_strs = []
+
+        # check whether argument has a metavar name or type set
+        metavar_name = None
+        metavar_type = None
+        metavar_str = param.make_metavar(ctx=ctx)
+        if isinstance(param, TyperArgument):
+            # TODO: revise this legacy behaviour of keeping argument names 
lowercased for Rich formatting
+            if param.metavar is None and param.name:
+                metavar_name = metavar_str.replace(param.name.upper(), 
param.name)
+            else:
+                metavar_name = metavar_str
+        if isinstance(param, TyperOption):
+            metavar_type = metavar_str
+
         for opt_str in param.opts:
             if "--" in opt_str:
                 opt_long_strs.append(opt_str)
+            elif metavar_name:
+                opt_short_strs.append(metavar_name)
             else:
                 opt_short_strs.append(opt_str)
         for opt_str in param.secondary_opts:
             if "--" in opt_str:
                 secondary_opt_long_strs.append(opt_str)
+            elif metavar_name:  # pragma: no cover
+                secondary_opt_short_strs.append(metavar_name)
             else:
                 secondary_opt_short_strs.append(opt_str)
 
-        # Column for a metavar, if we have one
-        metavar = Text(style=STYLE_METAVAR, overflow="fold")
-        metavar_str = param.make_metavar(ctx=ctx)
-        # Do it ourselves if this is a positional argument
-        if (
-            isinstance(param, TyperArgument)
-            and param.name
-            and metavar_str == param.name.upper()
-        ):
-            metavar_str = param.type.name.upper()
+        # Column for recording the type
+        types_data = Text(style=STYLE_TYPES, overflow="fold")
 
-        # Skip booleans and choices (handled above)
-        if metavar_str != "BOOLEAN":
-            metavar.append(metavar_str)
+        # Fetch type
+        if metavar_type and metavar_type != "BOOLEAN":
+            types_data.append(metavar_type)
+        else:
+            type_str = param.type.name.upper()
+            if type_str != "BOOLEAN":
+                types_data.append(type_str)
 
         # Range - from
         # 
https://github.com/pallets/click/blob/c63c70dabd3f86ca68678b4f00951f78f52d0270/src/click/core.py#L2698-L2706
  # noqa: E501
@@ -400,7 +414,7 @@
         ):
             range_str = param.type._describe_range()
             if range_str:
-                metavar.append(RANGE_STRING.format(range_str))
+                types_data.append(RANGE_STRING.format(range_str))
 
         # Required asterisk
         required: str | Text = ""
@@ -414,7 +428,7 @@
                 highlighter(",".join(opt_short_strs)),
                 negative_highlighter(",".join(secondary_opt_long_strs)),
                 negative_highlighter(",".join(secondary_opt_short_strs)),
-                metavar_highlighter(metavar),
+                types_highlighter(types_data),
                 _get_parameter_help(
                     param=param,
                     ctx=ctx,

Reply via email to