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 2025-09-26 22:24:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-typer (Old) and /work/SRC/openSUSE:Factory/.python-typer.new.11973 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-typer" Fri Sep 26 22:24:19 2025 rev:28 rq:1307199 version:0.19.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-typer/python-typer.changes 2025-09-22 16:38:44.099026115 +0200 +++ /work/SRC/openSUSE:Factory/.python-typer.new.11973/python-typer.changes 2025-09-26 22:25:12.015724264 +0200 @@ -1,0 +2,6 @@ +Wed Sep 24 19:25:40 UTC 2025 - Matthias Bach <[email protected]> - 0.19.2 + +- Update to 0.19.2 + * Fix list convertor with an empty list default factory. + +------------------------------------------------------------------- Old: ---- typer-0.19.1.tar.gz New: ---- typer-0.19.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-typer.spec ++++++ --- /var/tmp/diff_new_pack.7b95R0/_old 2025-09-26 22:25:12.995765596 +0200 +++ /var/tmp/diff_new_pack.7b95R0/_new 2025-09-26 22:25:12.995765596 +0200 @@ -26,7 +26,7 @@ %endif %{?sle15_python_module_pythons} Name: python-typer -Version: 0.19.1 +Version: 0.19.2 Release: 0 Summary: Typer, build great CLIs. Easy to code. Based on Python type hints License: MIT ++++++ typer-0.19.1.tar.gz -> typer-0.19.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typer-0.19.1/PKG-INFO new/typer-0.19.2/PKG-INFO --- old/typer-0.19.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/typer-0.19.2/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: typer -Version: 0.19.1 +Version: 0.19.2 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 @@ -16,7 +16,6 @@ Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 @@ -29,7 +28,7 @@ Project-URL: Repository, https://github.com/fastapi/typer Project-URL: Issues, https://github.com/fastapi/typer/issues Project-URL: Changelog, https://typer.tiangolo.com/release-notes/ -Requires-Python: >=3.7 +Requires-Python: >=3.8 Requires-Dist: click>=8.0.0 Requires-Dist: typing-extensions>=3.7.4.3 Requires-Dist: shellingham>=1.3.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typer-0.19.1/pyproject.toml new/typer-0.19.2/pyproject.toml --- old/typer-0.19.1/pyproject.toml 2025-09-20 10:59:10.818696000 +0200 +++ new/typer-0.19.2/pyproject.toml 2025-09-23 11:47:34.290775300 +0200 @@ -11,7 +11,7 @@ authors = [ { name = "Sebastián RamÃrez", email = "[email protected]" }, ] -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", @@ -26,7 +26,6 @@ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -42,7 +41,7 @@ "rich >=10.11.0", ] readme = "README.md" -version = "0.19.1" +version = "0.19.2" [project.urls] Homepage = "https://github.com/fastapi/typer" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typer-0.19.1/requirements-docs.txt new/typer-0.19.2/requirements-docs.txt --- old/typer-0.19.1/requirements-docs.txt 2025-09-20 10:59:04.714656600 +0200 +++ new/typer-0.19.2/requirements-docs.txt 2025-09-23 11:47:25.373587600 +0200 @@ -16,4 +16,4 @@ # For griffe, it formats with black # black==24.3.0 mkdocs-macros-plugin==1.3.9 -markdown-include-variants==0.0.4 +markdown-include-variants==0.0.5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typer-0.19.1/requirements-tests.txt new/typer-0.19.2/requirements-tests.txt --- old/typer-0.19.1/requirements-tests.txt 2025-09-20 10:59:04.714656600 +0200 +++ new/typer-0.19.2/requirements-tests.txt 2025-09-23 11:47:25.373587600 +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.13.0 +ruff ==0.13.1 # 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-0.19.1/tests/test_others.py new/typer-0.19.2/tests/test_others.py --- old/typer-0.19.1/tests/test_others.py 2025-09-20 10:59:04.717656600 +0200 +++ new/typer-0.19.2/tests/test_others.py 2025-09-23 11:47:25.376587600 +0200 @@ -14,6 +14,7 @@ from typer.main import solve_typer_info_defaults, solve_typer_info_help from typer.models import ParameterInfo, TyperInfo from typer.testing import CliRunner +from typing_extensions import Annotated from .utils import requires_completion_permission @@ -170,6 +171,22 @@ assert "Hello World" in result.stdout +def test_empty_list_default_generator(): + def empty_list() -> typing.List[str]: + return [] + + app = typer.Typer() + + @app.command() + def main( + names: Annotated[typing.List[str], typer.Option(default_factory=empty_list)], + ): + print(names) + + result = runner.invoke(app) + assert "[]" in result.output + + def test_completion_argument(): file_path = Path(__file__).parent / "assets/completion_argument.py" result = subprocess.run( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typer-0.19.1/typer/__init__.py new/typer-0.19.2/typer/__init__.py --- old/typer-0.19.1/typer/__init__.py 2025-09-20 10:59:04.726656700 +0200 +++ new/typer-0.19.2/typer/__init__.py 2025-09-23 11:47:25.385587700 +0200 @@ -1,6 +1,6 @@ """Typer, build great CLIs. Easy to code. Based on Python type hints.""" -__version__ = "0.19.1" +__version__ = "0.19.2" from shutil import get_terminal_size as get_terminal_size diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typer-0.19.1/typer/_typing.py new/typer-0.19.2/typer/_typing.py --- old/typer-0.19.1/typer/_typing.py 2025-09-20 10:59:04.726656700 +0200 +++ new/typer-0.19.2/typer/_typing.py 2025-09-23 11:47:25.385587700 +0200 @@ -1,6 +1,6 @@ # Copied from pydantic 1.9.2 (the latest version to support python 3.6.) # https://github.com/pydantic/pydantic/blob/v1.9.2/pydantic/typing.py -# Reduced drastically to only include Typer-specific 3.7+ functionality +# Reduced drastically to only include Typer-specific 3.8+ functionality # mypy: ignore-errors import sys @@ -57,17 +57,7 @@ NONE_TYPES: Tuple[Any, Any, Any] = (None, NoneType, Literal[None]) -if sys.version_info < (3, 8): - # Even though this implementation is slower, we need it for python 3.7: - # In python 3.7 "Literal" is not a builtin type and uses a different - # mechanism. - # for this reason `Literal[None] is Literal[None]` evaluates to `False`, - # breaking the faster implementation used for the other python versions. - - def is_none_type(type_: Any) -> bool: - return type_ in NONE_TYPES - -elif sys.version_info[:2] == (3, 8): +if sys.version_info[:2] == (3, 8): # We can use the fast implementation for 3.8 but there is a very weird bug # where it can fail for `Literal[None]`. # We just need to redefine a useless `Literal[None]` inside the function body to fix this diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/typer-0.19.1/typer/main.py new/typer-0.19.2/typer/main.py --- old/typer-0.19.1/typer/main.py 2025-09-20 10:59:04.726656700 +0200 +++ new/typer-0.19.2/typer/main.py 2025-09-23 11:47:25.386587900 +0200 @@ -629,8 +629,8 @@ convertor: Optional[Callable[[Any], Any]], default_value: Optional[Any] ) -> Callable[[Optional[Sequence[Any]]], Optional[List[Any]]]: def internal_convertor(value: Optional[Sequence[Any]]) -> Optional[List[Any]]: - if value is None or len(value) == 0: - return default_value + if (value is None) or (default_value is None and len(value) == 0): + return None return [convertor(v) if convertor else v for v in value] return internal_convertor
