Compare commits

1 Commits
main ... 1.1

6 changed files with 32 additions and 61 deletions

View File

@@ -1,13 +0,0 @@
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",
]

View File

@@ -0,0 +1,22 @@
From a03ad2aa8bc9bc974ebf340146bf8d9a8afc0dbb Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Tue, 23 Jul 2024 16:45:07 -0400
Subject: [PATCH] Allow Starlette 0.38
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index dbaa42149897a..e231f330165fc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -41,7 +41,7 @@ classifiers = [
"Topic :: Internet :: WWW/HTTP",
]
dependencies = [
- "starlette>=0.37.2,<0.38.0",
+ "starlette>=0.37.2,<0.39.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",
]

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

Binary file not shown.

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

Binary file not shown.

View File

@@ -1,31 +1,3 @@
-------------------------------------------------------------------
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>
- Update to 0.114.2:
* Fix form field regression with alias.
* Improve performance in request body parsing with a cache for internal
model fields.
* Add support for Pydantic models in Form parameters.
* Fix allow_inf_nan option for Param and Body classes.
* Ensure that app.include_router merges nested lifespans.
* Allow Starlette 0.38.x, update the pin to >=0.37.2,<0.39.0
- Drop patch allow-starlette-0.38.patch, included upstream.
-------------------------------------------------------------------
Wed Aug 14 02:13:46 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.115.2
Version: 0.112.0
Release: 0
Summary: FastAPI framework
License: MIT
@@ -28,18 +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
# PATCH-FIX-UPSTREAM gh#fastapi/fastapi#11876
Patch1: allow-starlette-0.38.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.41.1}
BuildRequires: %{python_module starlette >= 0.37.2 with %python-starlette < 0.39}
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.41.1)
Requires: (python-starlette >= 0.37.2 with python-starlette < 0.39)
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
@@ -48,24 +48,22 @@ BuildRequires: %{python_module pdm-backend}
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 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.7}
BuildRequires: %{python_module sqlalchemy < 2.0}
BuildRequires: %{python_module trio}
%if !%{with ringdisabled}
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
@@ -97,12 +95,6 @@ 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"
@@ -111,8 +103,6 @@ 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"
@@ -120,7 +110,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::PendingDeprecationWarning -W ignore::ResourceWarning $ignorefiles -k "not ($donttest)" tests
%pytest -W ignore::DeprecationWarning -W ignore::ResourceWarning $ignorefiles -k "not ($donttest)" tests
%post
%python_install_alternative fastapi