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-03-30 18:29:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-typer (Old)
 and      /work/SRC/openSUSE:Factory/.python-typer.new.1999 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-typer"

Mon Mar 30 18:29:34 2026 rev:32 rq:1343348 version:0.24.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-typer/python-typer.changes        
2026-01-07 16:01:13.726652918 +0100
+++ /work/SRC/openSUSE:Factory/.python-typer.new.1999/python-typer.changes      
2026-03-30 18:29:35.846826355 +0200
@@ -1,0 +2,13 @@
+Fri Mar  6 21:04:34 UTC 2026 - Matthias Bach <[email protected]>
+
+- Update to 0.24.1
+  * Make typer-slim a shallow wrapper around typer. Rich and
+    shellingham is now always required.
+  * When printing error tracebacks with Rich, default to not
+    showing locals, which are sometimes verbose.
+  * Fix TYPER_USE_RICH parsing to allow disabling Rich completely.
+  * Drop support for Python 3.9.
+- Add set-proper-pythonpath-for-tutorial-script-tests.patch.
+  This was carried over from python-typer-slim.
+
+-------------------------------------------------------------------

Old:
----
  python-typer-rpmlintrc
  typer-0.21.1.tar.gz

New:
----
  set-proper-pythonpath-for-tutorial-script-tests.patch
  typer-0.24.1.tar.gz

----------(New B)----------
  New:  * Drop support for Python 3.9.
- Add set-proper-pythonpath-for-tutorial-script-tests.patch.
  This was carried over from python-typer-slim.
----------(New E)----------

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

Other differences:
------------------
++++++ python-typer.spec ++++++
--- /var/tmp/diff_new_pack.x9Gz9t/_old  2026-03-30 18:29:36.770864759 +0200
+++ /var/tmp/diff_new_pack.x9Gz9t/_new  2026-03-30 18:29:36.770864759 +0200
@@ -26,31 +26,33 @@
 %endif
 %{?sle15_python_module_pythons}
 Name:           python-typer
-Version:        0.21.1
+Version:        0.24.1
 Release:        0
 Summary:        Typer, build great CLIs. Easy to code. Based on Python type 
hints
 License:        MIT
 URL:            https://github.com/tiangolo/typer
 Source:         
https://files.pythonhosted.org/packages/source/t/typer/typer-%{version}.tar.gz
-Source2:        %{name}-rpmlintrc
+Patch1:         set-proper-pythonpath-for-tutorial-script-tests.patch
+BuildRequires:  %{python_module annotated-doc}
+BuildRequires:  %{python_module click}
 BuildRequires:  %{python_module coverage}
 BuildRequires:  %{python_module pdm-backend}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module rich}
 BuildRequires:  %{python_module shellingham}
-BuildRequires:  %{python_module typer-slim >= %{version}}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 # Work around Python dependency not being auto-added as there are no modules 
provided
 Requires:       %{plainpython}(abi) = %{python_version}
+Requires:       python-annotated-doc
 Requires:       python-click
 Requires:       python-rich
 Requires:       python-shellingham
-Requires:       python-typer-slim >= %{version}
-Requires:       python-typing_extensions
 # both packages provide /usr/bin/typer
 Conflicts:      erlang
+Provides:       python-typer-slim = %{version}
+Obsoletes:      python-typer-slim < 0.22.0
 BuildArch:      noarch
 %if %{with libalternatives}
 BuildRequires:  alts
@@ -81,9 +83,6 @@
 %install
 %pyproject_install
 
-# Remove files that were already installed by typer-slim
-%python_expand rm -r %{buildroot}%{$python_sitelib}/typer
-
 %python_clone -a %{buildroot}/%{_bindir}/typer
 
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -108,5 +107,6 @@
 %doc README.md
 %license LICENSE
 %python_alternative %{_bindir}/typer
+%{python_sitelib}/typer
 %{python_sitelib}/typer-%{version}.dist-info
 

++++++ set-proper-pythonpath-for-tutorial-script-tests.patch ++++++
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
Upstream: sent

When packaging Typer for openSUSE I ran into errors because the tutorial
scripts were unable to import their colocated modules. Curiously this
only seems to be occurring when these scripts are run via coverage, as
they are in the tests. Them being run via coverage however also prevents
just changing the working directory for the script runs, as then the
coverage file would end up in the wrong directory.

Curiously, I have not been able to reproduce this issue on openSUSE Leap
but only seen it on openSUSE Tumbleweed. Thus, there might be something
weird with the Python stack or the coverage version on Tumbleweed.
However, as the same PYTHONPATH-patching is also done for the tests of
the tutorial code that run it directly and not as a subprocess, I think
it is just consistent to also do this for the script test.

For reference, this is the error that I am observing in the packaging
environment and that gets resolved by this commit:

[  123s] =================================== FAILURES 
===================================
[  123s] _________________________________ test_scripts 
_________________________________
[  123s]
[  123s] mod = <module 'docs_src.subcommands.tutorial001.main' from 
'/home/abuild/rpmbuild/BUILD/typer-0.4.1/docs_src/subcommands/tutorial001/main.py'>
[  123s]
[  123s]     def test_scripts(mod):
[  123s]         from docs_src.subcommands.tutorial001 import items, users
[  123s]
[  123s]         for module in [mod, items, users]:
[  123s]             result = subprocess.run(
[  123s]                 ["coverage", "run", module.__file__, "--help"],
[  123s]                 stdout=subprocess.PIPE,
[  123s]                 stderr=subprocess.PIPE,
[  123s]                 encoding="utf-8",
[  123s]             )
[  123s] >           assert "Usage" in result.stdout
[  123s] E           assert 'Usage' in ''
[  123s] E            +  where '' = CompletedProcess(args=['coverage', 'run', 
'/home/abuild/rpmbuild/BUILD/typer-0.4.1/docs_src/subcommands/tutorial001/main.py',
 '--help'], returncode=1, stdout='', stderr='Traceback (most recent call 
last):\n  File 
"/home/abuild/rpmbuild/BUILD/typer-0.4.1/docs_src/subcommands/tutorial001/main.py",
 line 3, in <module>\n    import items\nModuleNotFoundError: No module named 
\'items\'\n').stdout
[  123s]
[  123s] tests/test_tutorial/test_subcommands/test_tutorial001.py:94: 
AssertionError
[  123s] _________________________________ test_scripts 
_________________________________
[  123s]
[  123s] mod = <module 'docs_src.subcommands.tutorial003.main' from 
'/home/abuild/rpmbuild/BUILD/typer-0.4.1/docs_src/subcommands/tutorial003/main.py'>
[  123s]
[  123s]     def test_scripts(mod):
[  123s]         from docs_src.subcommands.tutorial003 import items, lands, 
reigns, towns, users
[  123s]
[  123s]         for module in [mod, items, lands, reigns, towns, users]:
[  123s]             result = subprocess.run(
[  123s]                 ["coverage", "run", module.__file__, "--help"],
[  123s]                 stdout=subprocess.PIPE,
[  123s]                 stderr=subprocess.PIPE,
[  123s]                 encoding="utf-8",
[  123s]             )
[  123s] >           assert "Usage" in result.stdout
[  123s] E           assert 'Usage' in ''
[  123s] E            +  where '' = CompletedProcess(args=['coverage', 'run', 
'/home/abuild/rpmbuild/BUILD/typer-0.4.1/docs_src/subcommands/tutorial003/main.py',
 '--help'], returncode=1, stdout='', stderr='Traceback (most recent call 
last):\n  File 
"/home/abuild/rpmbuild/BUILD/typer-0.4.1/docs_src/subcommands/tutorial003/main.py",
 line 3, in <module>\n    import items\nModuleNotFoundError: No module named 
\'items\'\n').stdout
[  123s]
[  123s] tests/test_tutorial/test_subcommands/test_tutorial003.py:146: 
AssertionError

---
 tests/test_tutorial/test_subcommands/test_tutorial001.py | 2 +-
 tests/test_tutorial/test_subcommands/test_tutorial003.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/test_tutorial/test_subcommands/test_tutorial001.py 
b/tests/test_tutorial/test_subcommands/test_tutorial001.py
index 4e8b23e..cbeca19 100644
--- a/tests/test_tutorial/test_subcommands/test_tutorial001.py
+++ b/tests/test_tutorial/test_subcommands/test_tutorial001.py
@@ -87,7 +87,7 @@ def test_scripts(mod):
     from docs_src.subcommands.tutorial001_py310 import items, users
 
     env = os.environ.copy()
-    env["PYTHONPATH"] = ":".join(list(tutorial001_py310.__path__))
+    env["PYTHONPATH"] = ":".join(list(tutorial001_py310.__path__) + 
[env["PYTHONPATH"]] if "PYTHONPATH" in env else [])
 
     for module in [mod, items, users]:
         result = subprocess.run(
diff --git a/tests/test_tutorial/test_subcommands/test_tutorial003.py 
b/tests/test_tutorial/test_subcommands/test_tutorial003.py
index 30b4352..6217aed 100644
--- a/tests/test_tutorial/test_subcommands/test_tutorial003.py
+++ b/tests/test_tutorial/test_subcommands/test_tutorial003.py
@@ -166,7 +166,7 @@ def test_scripts(mod):
     )
 
     env = os.environ.copy()
-    env["PYTHONPATH"] = ":".join(list(tutorial003_py310.__path__))
+    env["PYTHONPATH"] = ":".join(list(tutorial003_py310.__path__) + 
[env["PYTHONPATH"]] if "PYTHONPATH" in env else [])
 
     for module in [mod, items, lands, reigns, towns, users]:
         result = subprocess.run(
-- 
2.51.0


++++++ typer-0.21.1.tar.gz -> typer-0.24.1.tar.gz ++++++
++++ 19892 lines of diff (skipped)

Reply via email to