diff --git a/allow-starlette-0.38.patch b/allow-starlette-0.38.patch new file mode 100644 index 0000000..9a74dcc --- /dev/null +++ b/allow-starlette-0.38.patch @@ -0,0 +1,22 @@ +From a03ad2aa8bc9bc974ebf340146bf8d9a8afc0dbb Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +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", + ] diff --git a/fastapi-0.112.0.tar.gz b/fastapi-0.112.0.tar.gz new file mode 100644 index 0000000..7cf8399 --- /dev/null +++ b/fastapi-0.112.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d262bc56b7d101d1f4e8fc0ad2ac75bb9935fec504d2b7117686cec50710cf05 +size 289904 diff --git a/fastapi-0.95.1.tar.gz b/fastapi-0.95.1.tar.gz deleted file mode 100644 index 5d257b3..0000000 --- a/fastapi-0.95.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9569f0a381f8a457ec479d90fa01005cfddaae07546eb1f3fa035bc4797ae7d5 -size 10045151 diff --git a/python-fastapi.changes b/python-fastapi.changes index cf2459d..0f8678d 100644 --- a/python-fastapi.changes +++ b/python-fastapi.changes @@ -1,7 +1,261 @@ +------------------------------------------------------------------- +Wed Aug 14 02:13:46 UTC 2024 - Steve Kowalik + +- Add patch allow-starlette-0.38.patch: + * Allow starlette 0.38. + +------------------------------------------------------------------- +Thu Aug 8 09:01:36 UTC 2024 - Daniel Garcia + +- update to 0.112.0: + * Add support for pip install "fastapi[standard]" with standard + dependencies and python -m fastapi +- version 0.111.1: + * Remove orjson and ujson from default dependencies. These + dependencies are still installed when you install with pip install + "fastapi[all]" + * Restored Swagger-UI links to use the latest version possible +- version 0.111.0: + * Add FastAPI CLI, the new fastapi command + * Add configs and setup for fastapi-slim including optional extras + fastapi-slim[standard], and fastapi including by default the same + standard extras + +------------------------------------------------------------------- +Sat Apr 20 20:50:12 UTC 2024 - Dirk Müller + +- update to 0.110.2: + * Fix support for query parameters with list types, handle + JSON encoding Pydantic `UndefinedType` + * Simplify Pydantic configs in OpenAPI models in + `fastapi/openapi/models.py`. + * Add support for Pydantic's 2.7 new deprecated Field + parameter, remove URL from validation errors response. +- update to 0.110.1: + * Fix parameterless `Depends()` with generics. + * Update mypy. + * Simplify string format with f-strings in + `fastapi/applications.py`. + * Upgrade Starlette to >=0.37.2,<0.38.0, remove Starlette + filterwarning for internal tests. PR #11266 by @nothielf. + +------------------------------------------------------------------- +Mon Mar 11 03:28:17 UTC 2024 - Steve Kowalik + +- Update to 0.110.0: + * Fix unhandled growing memory for internal server errors, refactor + dependencies with yield and except to require raising again as in + regular Python. +- Switch to pydantic version 2 by pulling in pydantic-settings. + +------------------------------------------------------------------- +Tue Feb 6 14:19:32 UTC 2024 - Dirk Müller + +- update to 0.109.1 [bsc#1219610] CVE-2024-24762: + * Upgrade minimum version of `python-multipart` to `>=0.0.7` + to fix a vulnerability when using form data with a ReDos + attack. You can also simply upgrade `python-multipart`. + * Read more in the advisory: Content-Type Header ReDoS. + * Include HTTP 205 in status codes with no body. + * Fix broken link in `docs/tutorial/sql-databases.md` in + several languages. + * Remove broken links from `external_links.yml`. + * Update template docs with more info about `url_for`. PR + #5937 by @EzzEddin. + * Update usage of Token model in security docs. + * Update highlighted line in `docs/en/docs/tutorial/bigger- + applications.md`. + * Add External Link: Explore How to Effectively Use JWT With + FastAPI. + * Add hyperlink to `docs/en/docs/tutorial/static-files.md`. + * Add External Link: Instrument a FastAPI service adding + tracing with OpenTelemetry and send/show traces in Grafana + Tempo. + * Review and rewording of `en/docs/contributing.md`. + * Add External Link: ML serving and monitoring with FastAPI + and Evidently. + * Reword in docs, from "have in mind" to "keep in mind". + * Add External Link: Talk by Jeny Sadadia. + * Add location info to `tutorial/bigger-applications.md`. + +------------------------------------------------------------------- +Sat Jan 13 20:37:39 UTC 2024 - Ben Greiner + +- Update to 0.109.0 + * Add support for Python 3.12. PR #10666 by @Jamim. + * Upgrade Starlette to >=0.35.0,<0.36.0. PR #10938 by @tiangolo. + * Translation updates + +------------------------------------------------------------------- +Wed Dec 27 09:43:26 UTC 2023 - Dirk Müller + +- update to 0.108.0: + * Upgrade Starlette to `>=0.29.0,<0.33.0`, update docs and + usage of templates with new Starlette arguments. + +------------------------------------------------------------------- +Thu Dec 14 10:14:31 UTC 2023 - Dirk Müller + +- update to 0.105.0: + * Add support for multiple Annotated annotations, e.g. + `Annotated[str, Field(), Query()]`. + * Remove unused NoneType. + * Tweak default suggested configs for generating clients. + +------------------------------------------------------------------- +Tue Nov 7 14:13:47 UTC 2023 - Dirk Müller + +- update to 0.104.1: + * Pin Swagger UI version to 5.9.0 temporarily to handle a bug + crashing it in 5.9.1. + * Update data structure and render for external-links. + * Fix link to SPDX license identifier in + `docs/en/docs/tutorial/metadata.md`. + * Update example validation error from Pydantic v1 to match + Pydantic v2 in `docs/en/docs/tutorial/path-params.md`. + * Fix typos in emoji docs and in some source examples. + * Fix typo in `docs/en/docs/reference/dependencies.md`. + * Fix typos and rewordings in `docs/en/docs/tutorial/body- + nested-models.md`. + * Update docs, remove references to removed + `pydantic.Required` in `docs/en/docs/tutorial/query-params- + str-validations.md`. + * Fix typo in `docs/en/docs/reference/index.md`. + * Update Pydantic links to dotenv support. + * Update links in `docs/en/docs/async.md` and + `docs/zh/docs/async.md` to make them relative. + * Fix links in `docs/em/docs/async.md`. + * Fix typo in `docs/em/docs/index.md` + +------------------------------------------------------------------- +Thu Oct 19 11:21:33 UTC 2023 - Ondřej Súkup + +- update to 0.104.0 + * Add reference (code API) docs with PEP 727, add subclass + with custom docstrings for BackgroundTasks, refactor docs structure. +- disable test_dependency_gets_exception -> https://github.com/tiangolo/fastapi/discussions/9934 + +------------------------------------------------------------------- +Sun Oct 1 15:35:20 UTC 2023 - Ondřej Súkup + +- update to 0.103.2 + * support Pydantic2 2.4 + +------------------------------------------------------------------- +Tue Sep 26 07:23:15 UTC 2023 - Ondřej Súkup + +- update to 0.103.1 + * dd support for openapi_examples in all FastAPI parameters. + * Refactor tests for new Pydantic 2.2.1 + * Add ResponseValidationError printable details, to show up in server error logs. + * Replace MultHostUrl to AnyUrl for compatibility with older versions of Pydantic v1. + * Support for Pydantic v2 + +------------------------------------------------------------------- +Sun Jun 25 17:54:32 UTC 2023 - Dirk Müller + +- update to 0.98.0: + * Allow disabling `redirect_slashes` at the FastAPI app + level. + * Update `Annotated` notes in `docs/en/docs/tutorial/schema- + extra-example.md`. PR #9620 by @Alexandrhub. + * Fix typo `Annotation` -> `Annotated` in + `docs/en/docs/tutorial/query-params-str-validations.md`. + * Use in memory database for testing SQL in docs. + * Add Russian translation for + `docs/ru/docs/tutorial/metadata.md`. + * Fix typo in Spanish translation for + `docs/es/docs/tutorial/first-steps.md`. + * Add Russian translation for `docs/tutorial/path-operation- + configuration.md`. + * Add Chinese translation for + `docs/zh/docs/advanced/security/index.md`. + * Add Chinese translations for + `docs/zh/docs/advanced/settings.md`. + * Add Chinese translations for + `docs/zh/docs/advanced/websockets.md`. + * Add Chinese translation for + `docs/zh/docs/tutorial/testing.md`. + * Add Russian translation for `docs/tutorial/extra- + models.md`. + * Add Russian translation for `docs/tutorial/cors.md`. + * Add Polish translation for `docs/pl/docs/features.md`. + * Add Russian translation for `docs/ru/docs/tutorial/body- + nested-models.md`. + +------------------------------------------------------------------- +Tue Jun 20 10:11:51 UTC 2023 - David Anes + +- update to 0.97.0: + * Features + - Add support for dependencies in WebSocket routes. + - Add exception handler for WebSocketRequestValidationError + (which also allows to override it). + * Refactors + - Upgrade and fully migrate to Ruff, remove isort, includes a + couple of tweaks suggested by the new version of Ruff. + - Update internal type annotations and upgrade mypy. + - Simplify AsyncExitStackMiddleware as without Python 3.6 + AsyncExitStack is always available. + * Upgrades + - Upgrade Black. + +------------------------------------------------------------------- +Sun Jun 11 11:52:48 UTC 2023 - Dirk Müller + +- update to 0.96.1: + * Fix `HTTPException` header type annotations. + * Fix OpenAPI model fields int validations, `gte` to `ge`. + * Update minimum version of Pydantic to >=1.7.4. + +------------------------------------------------------------------- +Mon Jun 5 13:26:32 UTC 2023 - David Anes + +- Update to version 0.96.0: + * Features + - Update create_cloned_field to use a global cache and improve + startup performance. + + * Docs + - Update Deta deployment tutorial for compatibility with Deta + Space. + - Fix typo in Deta deployment tutorial. + + * Translations + - Add Russian translation for docs/tutorial/body.md. + - Add Russian translation for docs/ru/docs/tutorial/static-files.md. + - Add Russian translation for docs/ru/docs/tutorial/query-params.md. + - Add Russian translation for docs/ru/docs/tutorial/first-steps.md. + - Add Russian translation for docs/ru/docs/tutorial/debugging.md. + - Add Russian translation for docs/ru/docs/tutorial/path-params.md. + - Add Chinese translation for docs/zh/docs/tutorial/static-files.md. + - Update Spanish translation including new illustrations in docs/es/docs/async.md. + - Add Russian translation for docs/ru/docs/tutorial/path-params-numeric-validations.md. + - Add Russian translation for docs/ru/docs/deployment/concepts.md. + - Add Russian translation for docs/ru/docs/tutorial/body-multiple-params.md. + +------------------------------------------------------------------- +Wed May 17 07:38:30 UTC 2023 - David Anes + +- Update to version 0.95.2: + * Upgrade Starlette version to >=0.27.0 for a security release. + +- Translations + * Add Portuguese translation for docs/pt/docs/advanced/events.md + * Add Russian translation for docs/ru/docs/deployment/manually.md + * Add setup for translations to Lao + * Add Russian translation for docs/ru/docs/tutorial/testing.md + * Add Russian translation for docs/ru/docs/deployment/https.md + * Fix command to install requirements in Windows. + * Add French translation for docs/fr/docs/advanced/response-directly.m*. + * Initiate Czech translation setup. + * Fix typo in Portuguese docs for docs/pt/docs/index.md + * Add Russian translation for docs/ru/docs/tutorial/response-status-co*.md + ------------------------------------------------------------------- Sat May 6 15:45:38 UTC 2023 - Dirk Müller -- test against sqlalchemy 1.x +- test against sqlalchemy 1.x ------------------------------------------------------------------- Fri Apr 14 04:20:29 UTC 2023 - Steve Kowalik @@ -10,7 +264,7 @@ Fri Apr 14 04:20:29 UTC 2023 - Steve Kowalik * Fix using Annotated in routers or path operations decorated multiple times. - Add patch remove-classifiers.patch: - * Remove unknown classifiers. + * Remove unknown classifiers. ------------------------------------------------------------------- Mon Mar 20 11:52:11 UTC 2023 - David Anes @@ -19,17 +273,17 @@ Mon Mar 20 11:52:11 UTC 2023 - David Anes - Update to 0.95.0: * Highlights - - This release adds support for dependencies and parameters - using Annotated and recommends its usage. + - This release adds support for dependencies and parameters + using Annotated and recommends its usage. * Features - - Add support for PEP-593 Annotated for specifying dependencies + - Add support for PEP-593 Annotated for specifying dependencies and parameters. PR #4871 by @nzig. * Docs - - Tweak tip recommending Annotated in docs. + - Tweak tip recommending Annotated in docs. PR #9270 by @tiangolo. - - Update order of examples, latest Python version first, and + - Update order of examples, latest Python version first, and simplify version tab names. PR #9269 by @tiangolo. - - Update all docs to use Annotated as the main recommendation, + - Update all docs to use Annotated as the main recommendation, with new examples and tests. PR #9268 by @tiangolo. ------------------------------------------------------------------- @@ -37,28 +291,28 @@ Tue Mar 14 09:28:08 UTC 2023 - David Anes - Update to 0.94.1: * Fixes: - - Fix types for lifespan, upgrade Starlette to 0.26.1. + - Fix types for lifespan, upgrade Starlette to 0.26.1. PR #9245 by @tiangolo. -- Update to 0.94.0: +- Update to 0.94.0: * Upgrades - - Upgrade python-multipart to support 0.0.6. + - Upgrade python-multipart to support 0.0.6. PR #9212 by @musicinmybrain. - - Upgrade Starlette version, support new lifespan with state. + - Upgrade Starlette version, support new lifespan with state. PR #9239 by @tiangolo. * Docs - Update Sentry link in docs. PR #9218 by @smeubank. * Translations - - Add Russian translation for docs/ru/docs/history-design-future.md. + - Add Russian translation for docs/ru/docs/history-design-future.md. PR #5986 by @Xewus. * Internal - Add pydantic to PyPI classifiers. PR #5914 by @yezz123. - Bump black from 22.10.0 to 23.1.0. PR #5953 by @dependabot[bot]. - - Bump types-ujson from 5.6.0.0 to 5.7.0.1. + - Bump types-ujson from 5.6.0.0 to 5.7.0.1. PR #6027 by @dependabot[bot]. - - Bump dawidd6/action-download-artifact from 2.24.3 to 2.26.0. + - Bump dawidd6/action-download-artifact from 2.24.3 to 2.26.0. PR #6034 by @dependabot[bot]. - - [pre-commit.ci] pre-commit autoupdate. + - [pre-commit.ci] pre-commit autoupdate. PR #5709 by @pre-commit-ci[bot]. ------------------------------------------------------------------- @@ -66,19 +320,19 @@ Fri Mar 10 11:38:38 UTC 2023 - David Anes - Update to 0.93.0: * Features - - Add support for lifespan async context managers (superseding + - Add support for lifespan async context managers (superseding startup and shutdown events). Initial PR #2944 by @uSpike. * Docs - - Fix formatting in docs/en/docs/tutorial/metadata.md for ReDoc. + - Fix formatting in docs/en/docs/tutorial/metadata.md for ReDoc. PR #6005 by @eykamp. * Translations - Tamil translations - initial setup. PR #5564 by @gusty1g. - - Add French translation for docs/fr/docs/advanced/path-operation-advanced-configuration.md. + - Add French translation for docs/fr/docs/advanced/path-operation-advanced-configuration.md. PR #9221 by @axel584. - - Add French translation for docs/tutorial/debugging.md. + - Add French translation for docs/tutorial/debugging.md. PR #9175 by @frabc. - Initiate Armenian translation setup. PR #5844 by @har8. - - Add French translation for deployment/manually.md. + - Add French translation for deployment/manually.md. PR #3693 by @rjNemo. * Internal - Update translation bot messages. PR #9206 by @tiangolo. @@ -88,12 +342,12 @@ Fri Mar 10 11:38:38 UTC 2023 - David Anes - Update FastAPI People. PR #9181 by @github-actions[bot]. - Log GraphQL errors in FastAPI People, because it returns 200, with a payload with an error. PR #9171 by @tiangolo. - - Fix/workaround GitHub Actions in Docker with git for FastAPI + - Fix/workaround GitHub Actions in Docker with git for FastAPI People. PR #9169 by @tiangolo. - - Refactor FastAPI Experts to use only discussions now that + - Refactor FastAPI Experts to use only discussions now that questions are migrated. PR #9165 by @tiangolo. - Upgrade analytics. PR #6025 by @tiangolo. - - Upgrade and re-enable installing Typer-CLI. + - Upgrade and re-enable installing Typer-CLI. PR #6008 by @tiangolo. ------------------------------------------------------------------- @@ -102,10 +356,10 @@ Thu Feb 16 16:19:51 UTC 2023 - David Anes - Update to 0.92.0: * Upgrades - Upgrade Starlette to 0.25.0. This solves a vulnerability that - could allow denial of service attacks by using many small + could allow denial of service attacks by using many small multipart fields/files (parts), consuming high CPU and memory. - Only applications using forms (e.g. file uploads) could be - affected. For most cases, upgrading won't have any breaking + Only applications using forms (e.g. file uploads) could be + affected. For most cases, upgrading won't have any breaking changes. ------------------------------------------------------------------- @@ -114,14 +368,14 @@ Fri Feb 10 18:09:02 UTC 2023 - David Anes - Update to 0.91.0: * Upgrades - Upgrade Starlette version to 0.24.0 and refactor internals for - compatibility. This can solve nuanced errors when using + compatibility. This can solve nuanced errors when using middlewares. Before Starlette 0.24.0, a new instance of each middleware class would be created when a new middleware was added. That normally was not a problem, unless the middleware - class expected to be created only once, with only one - instance, that happened in some cases. This upgrade would - solve those cases. Now the middleware class instances are - created once, right before the first request (the first time + class expected to be created only once, with only one + instance, that happened in some cases. This upgrade would + solve those cases. Now the middleware class instances are + created once, right before the first request (the first time the app is called). If you depended on that previous behavior, you might need to update your code. As always, make sure your tests pass before merging the upgrade. @@ -132,7 +386,7 @@ Fri Feb 10 18:09:02 UTC 2023 - David Anes * Docs - Tweak wording to clarify docs/en/docs/project-generation.md. - Update Pydantic GitHub URLs. - - Add opinion from Cisco. + - Add opinion from Cisco. * Translations - Add Russian translation for docs/ru/docs/tutorial/cookie-params.md @@ -140,8 +394,8 @@ Fri Feb 10 18:09:02 UTC 2023 - David Anes * Upgrades - Bump Starlette from 0.22.0 to 0.23.0. * Docs - - Add article "Tortoise ORM / FastAPI 整合快速筆記" to External - Links. + - Add article "Tortoise ORM / FastAPI 整合快速筆記" to External + Links. - Update FastAPI People. - Micro-tweak help docs. - Update new issue chooser to direct to GitHub Discussions. @@ -166,16 +420,16 @@ Thu Jan 12 09:52:02 UTC 2023 - David Anes * Fixes - Ignore Response classes on return annotation. * Docs - - Update docs and examples for Response Model with Return Type - Annotations, and update runtime error. - - New docs at Response Model - Return Type: Other Return Type + - Update docs and examples for Response Model with Return Type + Annotations, and update runtime error. + - New docs at Response Model - Return Type: Other Return Type Annotations. - - Add External Link: FastAPI lambda container: serverless + - Add External Link: FastAPI lambda container: serverless simplified. * Translations - Add Turkish translation for docs/tr/docs/tutorial/first_steps.md. -- Update to 0.89.0: +- Update to 0.89.0: * Features - Add support for function return type annotations to declare the response_model. * Docs @@ -233,31 +487,31 @@ Mon Nov 14 09:12:12 UTC 2022 - David Anes * Docs - Fix typo in docs for docs/en/docs/advanced/middleware.md. * Translations - - Add Portuguese translation for + - Add Portuguese translation for docs/pt/docs/deployment/docker.md. - Update to 0.87.0 * Highlights of this release: - Upgraded Starlette + Now the TestClient is based on HTTPX instead of Requests. - + There are some possible breaking changes in the TestClient - usage, but @Kludex built bump-testclient to help you + + There are some possible breaking changes in the TestClient + usage, but @Kludex built bump-testclient to help you automatize migrating your tests. Make sure you are using Git - and that you can undo any unnecessary changes (false + and that you can undo any unnecessary changes (false positive changes, etc) before using bump-testclient. - New WebSocketException (and docs), re-exported from Starlette. - - Upgraded and relaxed dependencies for package extras all - (including new Uvicorn version), when you install + - Upgraded and relaxed dependencies for package extras all + (including new Uvicorn version), when you install "fastapi[all]". - New docs about how to Help Maintain FastAPI. * Features: - Upgrade and relax dependencies for extras "all". - - Re-export Starlette's WebSocketException and add it + - Re-export Starlette's WebSocketException and add it to docs. - Update references to Requests for tests to HTTPX, and add HTTPX to extras. - - Upgrade Starlette to 0.21.0, including the new + - Upgrade Starlette to 0.21.0, including the new TestClient based on HTTPX. PR #5471 by @pawelrubin. * Docs: @@ -266,13 +520,13 @@ Mon Nov 14 09:12:12 UTC 2022 - David Anes - Update Help FastAPI: Help Maintain FastAPI. * Translations: - - Fix highlight lines for Japanese - translation for docs/tutorial/query-params.md. - - Add French translation for + - Fix highlight lines for Japanese + translation for docs/tutorial/query-params.md. + - Add French translation for docs/fr/docs/advanced/additional-status-code.md. - - Add Portuguese translation for + - Add Portuguese translation for docs/pt/docs/tutorial/request-forms-and-files.md. - - Add Japanese translation for + - Add Japanese translation for docs/ja/docs/advanced/websockets.md. * Internal: @@ -293,17 +547,17 @@ Fri Nov 4 11:06:39 UTC 2022 - Michael Ströder - Close FormData (uploaded files) after the request is done. PR #5465 * Docs: - Fix typo in docs/en/docs/tutorial/security/oauth2-jwt.md. PR #5584 - + ------------------------------------------------------------------- Wed Nov 2 10:35:31 UTC 2022 - David Anes - Update to 0.85.2 * Docs: - Fix grammar and add helpful links to dependencies in docs/en/docs/async.md. - - Fix broken link in alternatives.md. - - Fix typo in docs about contributing, for compatibility with pip in Zsh. + - Fix broken link in alternatives.md. + - Fix typo in docs about contributing, for compatibility with pip in Zsh. - Fix typo in docs with examples for Python 3.10 instead of 3.9. - + * Translations: - Add Portuguese translation for docs/pt/docs/tutorial/request-forms.md. - Add Chinese translation for docs/zh/docs/tutorial/dependencies/classes-as-dependencies.md. @@ -323,7 +577,7 @@ Wed Nov 2 10:35:31 UTC 2022 - David Anes Mon Oct 31 08:45:35 UTC 2022 - David Anes - Update to 0.85.1 - * Fix support for strings in OpenAPI status codes: default, 1XX, + * Fix support for strings in OpenAPI status codes: default, 1XX, 2XX, 3XX, 4XX, 5XX. * Docs: Add WayScript x FastAPI Tutorial to External Links section @@ -348,12 +602,12 @@ Thu Sep 15 14:24:19 UTC 2022 - Michael Ströder - Fix RuntimeError raised when HTTPException has a status code with no content. PR #5365 by @iudeen. - Fix empty reponse body when default status_code is empty but the a Response parameter with response.status_code is set. PR #5360 by @tmeckel. * Docs - - Update SECURITY.md. PR #5377 + - Update SECURITY.md. PR #5377 ------------------------------------------------------------------- Thu Sep 8 07:30:26 UTC 2022 - Steve Kowalik -- Use email-validator package instead of email_validator. +- Use email-validator package instead of email_validator. ------------------------------------------------------------------- Sun Sep 4 20:34:02 UTC 2022 - Michael Ströder @@ -375,7 +629,7 @@ Sun Sep 4 20:34:02 UTC 2022 - Michael Ströder * Docs - Update Hypercorn link, now pointing to GitHub. PR #5346 - Tweak wording in docs/en/docs/advanced/dataclasses.md. PR #3698 - - Add note about Python 3.10 X | Y operator in explanation about + - Add note about Python 3.10 X | Y operator in explanation about Response Models. PR #5307 - Add link to New Relic article: "How to monitor FastAPI application performance using Python agent". PR #5260 @@ -414,7 +668,7 @@ Tue Aug 23 15:37:25 UTC 2022 - Michael Ströder fixes for flavors of authorization code flows in Swagger UI. PR #3439 - Strip empty whitespace from description extracted from docstrings. PR #2821 - - Fix cached dependencies when using a dependency in Security() and + - Fix cached dependencies when using a dependency in Security() and other places (e.g. Depends()) with different OAuth2 scopes. PR #2945 - Update type annotations for response_model, allow things like Union[str, None]. PR #5294 diff --git a/python-fastapi.spec b/python-fastapi.spec index 17a3d0c..08808d0 100644 --- a/python-fastapi.spec +++ b/python-fastapi.spec @@ -1,7 +1,7 @@ # # spec file for package python-fastapi # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,8 +18,9 @@ # Keep extra test requirements out of Ring1 %bcond_with ringdisabled +%{?sle15_python_module_pythons} Name: python-fastapi -Version: 0.95.1 +Version: 0.112.0 Release: 0 Summary: FastAPI framework License: MIT @@ -27,23 +28,33 @@ 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-UPSTREAM gh#fastapi/fastapi#11876 +Patch1: allow-starlette-0.38.patch BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} -BuildRequires: %{python_module pydantic >= 1.8.2} -BuildRequires: %{python_module starlette >= 0.22.0} +BuildRequires: %{python_module pydantic-settings >= 2.0.0} +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-starlette >= 0.24.0 +Requires: python-typing_extensions >= 4.8.0 +Requires: (python-starlette >= 0.37.2 with python-starlette < 0.39) +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module pytest} +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 anyio >= 3.2.1} +BuildRequires: %{python_module coverage} +BuildRequires: %{python_module dirty-equals} BuildRequires: %{python_module httpx >= 0.23.0} -BuildRequires: %{python_module python-multipart >= 0.0.5} -BuildRequires: %{python_module sqlalchemy >= 1.3.18 with %python-sqlalchemy < 2.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} @@ -69,11 +80,17 @@ Python FastAPI framework. %install %pyproject_install +%python_clone -a %{buildroot}/%{_bindir}/fastapi %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # more warnings as expected donttest="test_warn_duplicate_operation_id" +# https://github.com/tiangolo/fastapi/discussions/9934 +donttest+=" or test_dependency_gets_exception" +# 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" @@ -93,12 +110,19 @@ 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 $ignorefiles -k "not ($donttest)" tests +%pytest -W ignore::DeprecationWarning -W ignore::ResourceWarning $ignorefiles -k "not ($donttest)" tests + +%post +%python_install_alternative fastapi + +%postun +%python_uninstall_alternative fastapi %files %{python_files} %doc README.md %license LICENSE %{python_sitelib}/fastapi %{python_sitelib}/fastapi-%{version}.dist-info +%python_alternative %{_bindir}/fastapi %changelog