From 34d9065d4e882d5c8375eebaeac61272c1b532b33aa0736696f5efa7921c12e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 13 Dec 2024 11:25:15 +0100 Subject: [PATCH] Sync from SUSE:SLFO:Main python-fastapi revision b1ae853f2866566e715a6b87bbce8f94 --- allow-new-starlette.patch | 13 +++++++++++++ fastapi-0.114.2.tar.gz | 3 --- fastapi-0.115.2.tar.gz | 3 +++ python-fastapi.changes | 15 +++++++++++++++ python-fastapi.spec | 20 ++++++++++++++++---- 5 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 allow-new-starlette.patch delete mode 100644 fastapi-0.114.2.tar.gz create mode 100644 fastapi-0.115.2.tar.gz diff --git a/allow-new-starlette.patch b/allow-new-starlette.patch new file mode 100644 index 0000000..c5da5f3 --- /dev/null +++ b/allow-new-starlette.patch @@ -0,0 +1,13 @@ +Index: fastapi-0.115.2/pyproject.toml +=================================================================== +--- fastapi-0.115.2.orig/pyproject.toml ++++ fastapi-0.115.2/pyproject.toml +@@ -43,7 +43,7 @@ classifiers = [ + "Topic :: Internet :: WWW/HTTP", + ] + dependencies = [ +- "starlette>=0.37.2,<0.41.0", ++ "starlette>=0.37.2,<0.41.1", + "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", + ] diff --git a/fastapi-0.114.2.tar.gz b/fastapi-0.114.2.tar.gz deleted file mode 100644 index 5d21941..0000000 --- a/fastapi-0.114.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0adb148b62edb09e8c6eeefa3ea934e8f276dabc038c5a82989ea6346050c3da -size 295481 diff --git a/fastapi-0.115.2.tar.gz b/fastapi-0.115.2.tar.gz new file mode 100644 index 0000000..f4f3eec --- /dev/null +++ b/fastapi-0.115.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3995739e0b09fa12f984bce8fa9ae197b35d433750d3d312422d846e283697ee +size 299968 diff --git a/python-fastapi.changes b/python-fastapi.changes index d11768f..e7ba0d9 100644 --- a/python-fastapi.changes +++ b/python-fastapi.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Nov 7 09:16:23 UTC 2024 - Nico Krapp + +- disable PendingDeprecatingWarning + +------------------------------------------------------------------- +Fri Oct 18 03:23:50 UTC 2024 - Steve Kowalik + +- Update to 0.115.2: + * Upgrade Starlette to >=0.37.2,<0.41.0. + * Fix openapi generation with responses kwarg. + * Remove Required shadowing from fastapi using Pydantic v2. + * Add support for Pydantic models for parameters using Query, Cookie, Header +- Add patch allow-new-starlette.patch. + ------------------------------------------------------------------- Fri Sep 20 08:05:32 UTC 2024 - Steve Kowalik diff --git a/python-fastapi.spec b/python-fastapi.spec index 6a7421d..cdcc42d 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.114.2 +Version: 0.115.2 Release: 0 Summary: FastAPI framework License: MIT @@ -28,16 +28,18 @@ 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 +# PATCH-FIX-OPENSUSE Allow new starlette +Patch1: allow-new-starlette.patch BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} BuildRequires: %{python_module pydantic-settings >= 2.0.0} -BuildRequires: %{python_module starlette >= 0.37.2 with %python-starlette < 0.39} +BuildRequires: %{python_module starlette >= 0.37.2 with %python-starlette < 0.41.1} 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.37.2 with python-starlette < 0.39) +Requires: (python-starlette >= 0.37.2 with python-starlette < 0.41.1) Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch @@ -58,10 +60,12 @@ BuildRequires: %{python_module trio} BuildRequires: %{python_module aiosqlite} BuildRequires: %{python_module databases >= 0.3.2} BuildRequires: %{python_module email-validator >= 1.1.1} +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 python-jose >= 3.3} +BuildRequires: %{python_module sqlmodel} BuildRequires: %{python_module ujson >= 5.6} %endif # /SECTION @@ -93,6 +97,12 @@ donttest+=" or test_openapi" 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" @@ -101,6 +111,8 @@ ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_security/test_tutori 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" @@ -108,7 +120,7 @@ ignorefiles="$ignorefiles --ignore tests/test_tutorial/test_response_model/test_ donttest="$donttest or test_orjson_response_class" donttest="$donttest or (test_tutorial001 and test_get_custom_response)" %endif -%pytest -W ignore::DeprecationWarning -W ignore::ResourceWarning $ignorefiles -k "not ($donttest)" tests +%pytest -W ignore::DeprecationWarning -W ignore::PendingDeprecationWarning -W ignore::ResourceWarning $ignorefiles -k "not ($donttest)" tests %post %python_install_alternative fastapi