Sync from SUSE:SLFO:Main python-fastapi revision b1ae853f2866566e715a6b87bbce8f94

This commit is contained in:
Adrian Schröter 2024-12-13 11:25:15 +01:00
parent 28a90f3383
commit 34d9065d4e
5 changed files with 47 additions and 7 deletions

13
allow-new-starlette.patch Normal file
View File

@ -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",
]

BIN
fastapi-0.114.2.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
fastapi-0.115.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Thu Nov 7 09:16:23 UTC 2024 - Nico Krapp <nico.krapp@suse.com>
- disable PendingDeprecatingWarning
-------------------------------------------------------------------
Fri Oct 18 03:23:50 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- 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 <steven.kowalik@suse.com>

View File

@ -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