From 8ae5fcc01cc9f2e35ff8c2400cb19416548df44b8612c131b8f4804649429449 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 1 May 2025 05:54:46 +0000 Subject: [PATCH 1/4] - Update to 0.115.12: * Fix convert_underscores=False for header Pydantic models. * Add docs examples and tests (support) for Annotated custom validations, like AfterValidator. * Update internal annotation usage for compatibility with Pydantic 2.11. * Ensure that HTTPDigest only raises an exception when auto_error is True. - Drop remove-classifiers.patch, no longer required. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fastapi?expand=0&rev=90 --- fastapi-0.115.12.tar.gz | 3 +++ fastapi-0.115.8.tar.gz | 3 --- python-fastapi.changes | 11 +++++++++++ python-fastapi.spec | 8 +++----- remove-classifiers.patch | 13 ------------- 5 files changed, 17 insertions(+), 21 deletions(-) create mode 100644 fastapi-0.115.12.tar.gz delete mode 100644 fastapi-0.115.8.tar.gz delete mode 100644 remove-classifiers.patch diff --git a/fastapi-0.115.12.tar.gz b/fastapi-0.115.12.tar.gz new file mode 100644 index 0000000..c1da55d --- /dev/null +++ b/fastapi-0.115.12.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e2c2a2646905f9e83d32f04a3f86aff4a286669c6c950ca95b5fd68c2602681 +size 295236 diff --git a/fastapi-0.115.8.tar.gz b/fastapi-0.115.8.tar.gz deleted file mode 100644 index 1dc6845..0000000 --- a/fastapi-0.115.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0ce9111231720190473e222cdf0f07f7206ad7e53ea02beb1d2dc36e2f0741e9 -size 295403 diff --git a/python-fastapi.changes b/python-fastapi.changes index 912e62e..45492cb 100644 --- a/python-fastapi.changes +++ b/python-fastapi.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu May 1 05:53:56 UTC 2025 - Steve Kowalik + +- Update to 0.115.12: + * Fix convert_underscores=False for header Pydantic models. + * Add docs examples and tests (support) for Annotated custom validations, + like AfterValidator. + * Update internal annotation usage for compatibility with Pydantic 2.11. + * Ensure that HTTPDigest only raises an exception when auto_error is True. +- Drop remove-classifiers.patch, no longer required. + ------------------------------------------------------------------- Fri Feb 7 11:00:37 UTC 2025 - John Paul Adrian Glaubitz diff --git a/python-fastapi.spec b/python-fastapi.spec index 67be79c..c7cb3eb 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -20,24 +20,22 @@ %bcond_with ringdisabled %{?sle15_python_module_pythons} Name: python-fastapi -Version: 0.115.8 +Version: 0.115.12 Release: 0 Summary: FastAPI framework License: MIT URL: https://github.com/tiangolo/fastapi Source: https://files.pythonhosted.org/packages/source/f/fastapi/fastapi-%{version}.tar.gz -# PATCH-FIX-OPENSUSE Remove two unknown classifiers -Patch0: remove-classifiers.patch BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} BuildRequires: %{python_module pydantic-settings >= 2.0.0} -BuildRequires: %{python_module starlette >= 0.40.0 with %python-starlette < 0.46.0} +BuildRequires: %{python_module starlette >= 0.40.0 with %python-starlette < 0.47.0} BuildRequires: %{python_module typing_extensions >= 4.8.0} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pydantic >= 1.8.2 Requires: python-typing_extensions >= 4.8.0 -Requires: (python-starlette >= 0.40.0 with python-starlette < 0.46.0) +Requires: (python-starlette >= 0.40.0 with python-starlette < 0.47.0) Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch diff --git a/remove-classifiers.patch b/remove-classifiers.patch deleted file mode 100644 index 4f4de1f..0000000 --- a/remove-classifiers.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -Nru fastapi-0.115.8.orig/pyproject.toml fastapi-0.115.8/pyproject.toml ---- fastapi-0.115.8.orig/pyproject.toml 2025-01-30 15:06:26.874525500 +0100 -+++ fastapi-0.115.8/pyproject.toml 2025-02-07 12:00:18.048128044 +0100 -@@ -29,9 +29,6 @@ - "Environment :: Web Environment", - "Framework :: AsyncIO", - "Framework :: FastAPI", -- "Framework :: Pydantic", -- "Framework :: Pydantic :: 1", -- "Framework :: Pydantic :: 2", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3 :: Only", From 546b785065d62e8b951c9896d17b545cff8390d63af3132515f480df1fa9c199 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 6 Jun 2025 05:59:31 +0000 Subject: [PATCH 2/4] - Add patch support-starlette-0.47.patch: * Allow starlette 0.47. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fastapi?expand=0&rev=91 --- python-fastapi.changes | 6 ++++++ python-fastapi.spec | 6 ++++-- support-starlette-0.47.patch | 13 +++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 support-starlette-0.47.patch diff --git a/python-fastapi.changes b/python-fastapi.changes index 45492cb..214ac6f 100644 --- a/python-fastapi.changes +++ b/python-fastapi.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jun 6 05:58:54 UTC 2025 - Steve Kowalik + +- Add patch support-starlette-0.47.patch: + * Allow starlette 0.47. + ------------------------------------------------------------------- Thu May 1 05:53:56 UTC 2025 - Steve Kowalik diff --git a/python-fastapi.spec b/python-fastapi.spec index c7cb3eb..a6d2b25 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -26,16 +26,18 @@ Summary: FastAPI framework License: MIT URL: https://github.com/tiangolo/fastapi Source: https://files.pythonhosted.org/packages/source/f/fastapi/fastapi-%{version}.tar.gz +# PATCH-FIX-OPENSUSE Support starlette 0.47 +Patch0: support-starlette-0.47.patch BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} BuildRequires: %{python_module pydantic-settings >= 2.0.0} -BuildRequires: %{python_module starlette >= 0.40.0 with %python-starlette < 0.47.0} +BuildRequires: %{python_module starlette >= 0.40.0 with %python-starlette < 0.48.0} BuildRequires: %{python_module typing_extensions >= 4.8.0} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pydantic >= 1.8.2 Requires: python-typing_extensions >= 4.8.0 -Requires: (python-starlette >= 0.40.0 with python-starlette < 0.47.0) +Requires: (python-starlette >= 0.40.0 with python-starlette < 0.48.0) Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch diff --git a/support-starlette-0.47.patch b/support-starlette-0.47.patch new file mode 100644 index 0000000..6d332c6 --- /dev/null +++ b/support-starlette-0.47.patch @@ -0,0 +1,13 @@ +Index: fastapi-0.115.12/pyproject.toml +=================================================================== +--- fastapi-0.115.12.orig/pyproject.toml ++++ fastapi-0.115.12/pyproject.toml +@@ -45,7 +45,7 @@ classifiers = [ + "Topic :: Internet :: WWW/HTTP", + ] + dependencies = [ +- "starlette>=0.40.0,<0.47.0", ++ "starlette>=0.40.0,<0.48.0", + "pydantic>=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0", + "typing-extensions>=4.8.0", + ] From 311127468d05b0f06e9d1f9e1f23f0b0ffd1c3a70f6a7846012e884193162db6 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 24 Jun 2025 01:54:42 +0000 Subject: [PATCH 3/4] - Update to 0.115.13: * Fix truncating the model's description with form feed (\f) character for Pydantic V2. - Ignore more test files with ringdisabled as inline_snapshot expands inside the testsuite. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fastapi?expand=0&rev=92 --- fastapi-0.115.12.tar.gz | 3 --- fastapi-0.115.13.tar.gz | 3 +++ python-fastapi.changes | 9 +++++++++ python-fastapi.spec | 4 +++- 4 files changed, 15 insertions(+), 4 deletions(-) delete mode 100644 fastapi-0.115.12.tar.gz create mode 100644 fastapi-0.115.13.tar.gz diff --git a/fastapi-0.115.12.tar.gz b/fastapi-0.115.12.tar.gz deleted file mode 100644 index c1da55d..0000000 --- a/fastapi-0.115.12.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e2c2a2646905f9e83d32f04a3f86aff4a286669c6c950ca95b5fd68c2602681 -size 295236 diff --git a/fastapi-0.115.13.tar.gz b/fastapi-0.115.13.tar.gz new file mode 100644 index 0000000..269afe9 --- /dev/null +++ b/fastapi-0.115.13.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:55d1d25c2e1e0a0a50aceb1c8705cd932def273c102bff0b1c1da88b3c6eb307 +size 295680 diff --git a/python-fastapi.changes b/python-fastapi.changes index 214ac6f..a64828a 100644 --- a/python-fastapi.changes +++ b/python-fastapi.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jun 24 01:53:44 UTC 2025 - Steve Kowalik + +- Update to 0.115.13: + * Fix truncating the model's description with form feed (\f) character + for Pydantic V2. +- Ignore more test files with ringdisabled as inline_snapshot expands + inside the testsuite. + ------------------------------------------------------------------- Fri Jun 6 05:58:54 UTC 2025 - Steve Kowalik diff --git a/python-fastapi.spec b/python-fastapi.spec index a6d2b25..3c9f9d2 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -20,7 +20,7 @@ %bcond_with ringdisabled %{?sle15_python_module_pythons} Name: python-fastapi -Version: 0.115.12 +Version: 0.115.13 Release: 0 Summary: FastAPI framework License: MIT @@ -114,6 +114,8 @@ ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_sql_databases/test_t ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_sql_databases_peewee" ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_response_model/test_tutorial003_01.py" ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_response_model/test_tutorial003_01_py310.py" +ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_header_param_models/test_tutorial003.py" +ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py" donttest="$donttest or test_orjson_response_class" donttest="$donttest or (test_tutorial001 and test_get_custom_response)" From 162835260eb087bf7be96f1569bd35b39a138554ca43a298272dded7ef98ecb7 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Fri, 27 Jun 2025 00:44:33 +0000 Subject: [PATCH 4/4] - Remove ringdisabled, switch to standard multibuild with a test flavor. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fastapi?expand=0&rev=93 --- _multibuild | 3 ++ python-fastapi.changes | 5 ++++ python-fastapi.spec | 68 ++++++++++++++++-------------------------- 3 files changed, 33 insertions(+), 43 deletions(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-fastapi.changes b/python-fastapi.changes index a64828a..312f1a4 100644 --- a/python-fastapi.changes +++ b/python-fastapi.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jun 27 00:44:09 UTC 2025 - Steve Kowalik + +- Remove ringdisabled, switch to standard multibuild with a test flavor. + ------------------------------------------------------------------- Tue Jun 24 01:53:44 UTC 2025 - Steve Kowalik diff --git a/python-fastapi.spec b/python-fastapi.spec index 3c9f9d2..09b9529 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -16,10 +16,16 @@ # -# Keep extra test requirements out of Ring1 -%bcond_with ringdisabled +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif %{?sle15_python_module_pythons} -Name: python-fastapi +Name: python-fastapi%{psuffix} Version: 0.115.13 Release: 0 Summary: FastAPI framework @@ -29,10 +35,8 @@ Source: https://files.pythonhosted.org/packages/source/f/fastapi/fastapi # PATCH-FIX-OPENSUSE Support starlette 0.47 Patch0: support-starlette-0.47.patch BuildRequires: %{python_module hatchling} +BuildRequires: %{python_module pdm-backend} BuildRequires: %{python_module pip} -BuildRequires: %{python_module pydantic-settings >= 2.0.0} -BuildRequires: %{python_module starlette >= 0.40.0 with %python-starlette < 0.48.0} -BuildRequires: %{python_module typing_extensions >= 4.8.0} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pydantic >= 1.8.2 @@ -42,28 +46,29 @@ Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module pdm-backend} +%if %{with test} BuildRequires: %{python_module Flask >= 1.1.2} BuildRequires: %{python_module PyJWT} BuildRequires: %{python_module PyYAML >= 5.3.1} BuildRequires: %{python_module SQLAlchemy} +BuildRequires: %{python_module aiosqlite} BuildRequires: %{python_module anyio >= 3.2.1} BuildRequires: %{python_module coverage} -BuildRequires: %{python_module dirty-equals} -BuildRequires: %{python_module httpx >= 0.23.0} -BuildRequires: %{python_module pytest} -BuildRequires: %{python_module python-multipart >= 0.0.18} -BuildRequires: %{python_module trio} -%if !%{with ringdisabled} -BuildRequires: %{python_module aiosqlite} BuildRequires: %{python_module databases >= 0.3.2} +BuildRequires: %{python_module dirty-equals} BuildRequires: %{python_module email-validator >= 1.1.1} +BuildRequires: %{python_module fastapi = %{version}} +BuildRequires: %{python_module httpx >= 0.23.0} BuildRequires: %{python_module inline-snapshot} BuildRequires: %{python_module orjson >= 3.2.1} BuildRequires: %{python_module passlib} BuildRequires: %{python_module peewee >= 3.13.0} +BuildRequires: %{python_module pydantic-settings >= 2.0.0} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-jose >= 3.3} +BuildRequires: %{python_module python-multipart >= 0.0.18} BuildRequires: %{python_module sqlmodel} +BuildRequires: %{python_module trio} BuildRequires: %{python_module ujson >= 5.6} %endif # /SECTION @@ -79,11 +84,14 @@ Python FastAPI framework. %pyproject_wheel %install +%if !%{with test} %pyproject_install %python_clone -a %{buildroot}/%{_bindir}/fastapi %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} # more warnings as expected donttest="test_warn_duplicate_operation_id" # fails because of changed (cosmetic) body format in httpx 0.28 (technically not suppoerted yet upstream) @@ -91,36 +99,8 @@ donttest+=" or test_exception_handler_body_access" # python-fastapi-cli packages doesn't exists in openSUSE donttest+=" or test_fastapi_cli" donttest+=" or test_openapi" -%if %{with ringdisabled} -ignorefiles="$ignorefiles --ignore tests/test_default_response_class.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_async_sql_databases/test_tutorial001.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_custom_response/test_tutorial009c.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_cookie_param_models/test_tutorial001.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_cookie_param_models/test_tutorial002.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_header_param_models/test_tutorial001.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_header_param_models/test_tutorial002.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_query_param_models/test_tutorial001.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_query_param_models/test_tutorial002.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_response_model/test_tutorial003.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_response_model/test_tutorial003_py310.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_security/test_tutorial005.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_security/test_tutorial005_py39.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_security/test_tutorial005_py310.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_security/test_tutorial005_an.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_security/test_tutorial005_an_py39.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_security/test_tutorial005_an_py310.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_sql_databases/test_tutorial001.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_sql_databases/test_tutorial002.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_sql_databases_peewee" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_response_model/test_tutorial003_01.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_response_model/test_tutorial003_01_py310.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_header_param_models/test_tutorial003.py" -ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_query_params_str_validations/test_tutorial015.py" - -donttest="$donttest or test_orjson_response_class" -donttest="$donttest or (test_tutorial001 and test_get_custom_response)" +%pytest -W ignore::DeprecationWarning -W ignore::PendingDeprecationWarning -W ignore::ResourceWarning -k "not ($donttest)" tests %endif -%pytest -W ignore::DeprecationWarning -W ignore::PendingDeprecationWarning -W ignore::ResourceWarning $ignorefiles -k "not ($donttest)" tests %post %python_install_alternative fastapi @@ -128,11 +108,13 @@ donttest="$donttest or (test_tutorial001 and test_get_custom_response)" %postun %python_uninstall_alternative fastapi +%if !%{with test} %files %{python_files} %doc README.md %license LICENSE %{python_sitelib}/fastapi %{python_sitelib}/fastapi-%{version}.dist-info %python_alternative %{_bindir}/fastapi +%endif %changelog