Update dependency fastapi to v0.114.0 #35

Merged
renovate merged 1 commits from renovate/fastapi-0.x into main 2024-09-08 00:17:32 +00:00
Member

This PR contains the following updates:

Package Update Change
fastapi (changelog) minor ==0.112.2 -> ==0.114.0

Release Notes

fastapi/fastapi (fastapi)

v0.114.0

Compare Source

You can restrict form fields to only include those declared in a Pydantic model and forbid any extra field sent in the request using Pydantic's model_config = {"extra": "forbid"}:

from typing import Annotated

from fastapi import FastAPI, Form
from pydantic import BaseModel

app = FastAPI()

class FormData(BaseModel):
    username: str
    password: str
    model_config = {"extra": "forbid"}

@​app.post("/login/")
async def login(data: Annotated[FormData, Form()]):
    return data

Read the new docs: Form Models - Forbid Extra Form Fields.

Features
Docs
Internal
  • Update internal tests for latest Pydantic, including CI tweaks to install the latest Pydantic. PR #​12147 by @​tiangolo.

v0.113.0

Compare Source

Now you can declare form fields with Pydantic models:

from typing import Annotated

from fastapi import FastAPI, Form
from pydantic import BaseModel

app = FastAPI()

class FormData(BaseModel):
    username: str
    password: str

@​app.post("/login/")
async def login(data: Annotated[FormData, Form()]):
    return data

Read the new docs: Form Models.

Features
Internal

v0.112.4

Compare Source

This release is mainly a big internal refactor to enable adding support for Pydantic models for Form fields, but that feature comes in the next release.

This release shouldn't affect apps using FastAPI in any way. You don't even have to upgrade to this version yet. It's just a checkpoint. 🤓

Refactors
  • ♻️ Refactor deciding if embed body fields, do not overwrite fields, compute once per router, refactor internals in preparation for Pydantic models in Form, Query and others. PR #​12117 by @​tiangolo.
Internal
  • ️ Temporarily revert " Add support for Pydantic models in Form parameters" to make a checkpoint release. PR #​12128 by @​tiangolo.
  • Add support for Pydantic models in Form parameters. PR #​12127 by @​tiangolo. Reverted to make a checkpoint release with only refactors.

v0.112.3

Compare Source

This release is mainly internal refactors, it shouldn't affect apps using FastAPI in any way. You don't even have to upgrade to this version yet. There are a few bigger releases coming right after. 🚀

Refactors
  • ♻️ Refactor internal check_file_field(), rename to ensure_multipart_is_installed() to clarify its purpose. PR #​12106 by @​tiangolo.
  • ♻️ Rename internal create_response_field() to create_model_field() as it's used for more than response models. PR #​12103 by @​tiangolo.
  • ♻️ Refactor and simplify internal data from solve_dependencies() using dataclasses. PR #​12100 by @​tiangolo.
  • ♻️ Refactor and simplify internal analyze_param() to structure data with dataclasses instead of tuple. PR #​12099 by @​tiangolo.
  • ♻️ Refactor and simplify dependencies data structures with dataclasses. PR #​12098 by @​tiangolo.
Docs
Translations
Internal

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Update | Change | |---|---|---| | [fastapi](https://github.com/fastapi/fastapi) ([changelog](https://fastapi.tiangolo.com/release-notes/)) | minor | `==0.112.2` -> `==0.114.0` | --- ### Release Notes <details> <summary>fastapi/fastapi (fastapi)</summary> ### [`v0.114.0`](https://github.com/fastapi/fastapi/releases/tag/0.114.0) [Compare Source](https://github.com/fastapi/fastapi/compare/0.113.0...0.114.0) You can restrict form fields to only include those declared in a Pydantic model and forbid any extra field sent in the request using Pydantic's `model_config = {"extra": "forbid"}`: ```python from typing import Annotated from fastapi import FastAPI, Form from pydantic import BaseModel app = FastAPI() class FormData(BaseModel): username: str password: str model_config = {"extra": "forbid"} @&#8203;app.post("/login/") async def login(data: Annotated[FormData, Form()]): return data ``` Read the new docs: [Form Models - Forbid Extra Form Fields](https://fastapi.tiangolo.com/tutorial/request-form-models/#forbid-extra-form-fields). ##### Features - ✨ Add support for forbidding extra form fields with Pydantic models. PR [#&#8203;12134](https://github.com/fastapi/fastapi/pull/12134) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - 📝 Update docs, Form Models section title, to match config name. PR [#&#8203;12152](https://github.com/fastapi/fastapi/pull/12152) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - ✅ Update internal tests for latest Pydantic, including CI tweaks to install the latest Pydantic. PR [#&#8203;12147](https://github.com/fastapi/fastapi/pull/12147) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.113.0`](https://github.com/fastapi/fastapi/releases/tag/0.113.0) [Compare Source](https://github.com/fastapi/fastapi/compare/0.112.4...0.113.0) Now you can declare form fields with Pydantic models: ```python from typing import Annotated from fastapi import FastAPI, Form from pydantic import BaseModel app = FastAPI() class FormData(BaseModel): username: str password: str @&#8203;app.post("/login/") async def login(data: Annotated[FormData, Form()]): return data ``` Read the new docs: [Form Models](https://fastapi.tiangolo.com/tutorial/request-form-models/). ##### Features - ✨ Add support for Pydantic models in `Form` parameters. PR [#&#8203;12129](https://github.com/fastapi/fastapi/pull/12129) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - 🔧 Update sponsors: Coherence link. PR [#&#8203;12130](https://github.com/fastapi/fastapi/pull/12130) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.112.4`](https://github.com/fastapi/fastapi/releases/tag/0.112.4) [Compare Source](https://github.com/fastapi/fastapi/compare/0.112.3...0.112.4) This release is mainly a big internal refactor to enable adding support for Pydantic models for `Form` fields, but that feature comes in the next release. This release shouldn't affect apps using FastAPI in any way. You don't even have to upgrade to this version yet. It's just a checkpoint. 🤓 ##### Refactors - ♻️ Refactor deciding if `embed` body fields, do not overwrite fields, compute once per router, refactor internals in preparation for Pydantic models in `Form`, `Query` and others. PR [#&#8203;12117](https://github.com/fastapi/fastapi/pull/12117) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - ⏪️ Temporarily revert "✨ Add support for Pydantic models in `Form` parameters" to make a checkpoint release. PR [#&#8203;12128](https://github.com/fastapi/fastapi/pull/12128) by [@&#8203;tiangolo](https://github.com/tiangolo). - ✨ Add support for Pydantic models in `Form` parameters. PR [#&#8203;12127](https://github.com/fastapi/fastapi/pull/12127) by [@&#8203;tiangolo](https://github.com/tiangolo). Reverted to make a checkpoint release with only refactors. ### [`v0.112.3`](https://github.com/fastapi/fastapi/releases/tag/0.112.3) [Compare Source](https://github.com/fastapi/fastapi/compare/0.112.2...0.112.3) This release is mainly internal refactors, it shouldn't affect apps using FastAPI in any way. You don't even have to upgrade to this version yet. There are a few bigger releases coming right after. 🚀 ##### Refactors - ♻️ Refactor internal `check_file_field()`, rename to `ensure_multipart_is_installed()` to clarify its purpose. PR [#&#8203;12106](https://github.com/fastapi/fastapi/pull/12106) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Rename internal `create_response_field()` to `create_model_field()` as it's used for more than response models. PR [#&#8203;12103](https://github.com/fastapi/fastapi/pull/12103) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Refactor and simplify internal data from `solve_dependencies()` using dataclasses. PR [#&#8203;12100](https://github.com/fastapi/fastapi/pull/12100) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Refactor and simplify internal `analyze_param()` to structure data with dataclasses instead of tuple. PR [#&#8203;12099](https://github.com/fastapi/fastapi/pull/12099) by [@&#8203;tiangolo](https://github.com/tiangolo). - ♻️ Refactor and simplify dependencies data structures with dataclasses. PR [#&#8203;12098](https://github.com/fastapi/fastapi/pull/12098) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Docs - 📝 Add External Link: Techniques and applications of SQLAlchemy global filters in FastAPI. PR [#&#8203;12109](https://github.com/fastapi/fastapi/pull/12109) by [@&#8203;TheShubhendra](https://github.com/TheShubhendra). - 📝 Add note about `time.perf_counter()` in middlewares. PR [#&#8203;12095](https://github.com/fastapi/fastapi/pull/12095) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Tweak middleware code sample `time.time()` to `time.perf_counter()`. PR [#&#8203;11957](https://github.com/fastapi/fastapi/pull/11957) by [@&#8203;domdent](https://github.com/domdent). - 🔧 Update sponsors: Coherence. PR [#&#8203;12093](https://github.com/fastapi/fastapi/pull/12093) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Fix async test example not to trigger DeprecationWarning. PR [#&#8203;12084](https://github.com/fastapi/fastapi/pull/12084) by [@&#8203;marcinsulikowski](https://github.com/marcinsulikowski). - 📝 Update `docs_src/path_params_numeric_validations/tutorial006.py`. PR [#&#8203;11478](https://github.com/fastapi/fastapi/pull/11478) by [@&#8203;MuhammadAshiqAmeer](https://github.com/MuhammadAshiqAmeer). - 📝 Update comma in `docs/en/docs/async.md`. PR [#&#8203;12062](https://github.com/fastapi/fastapi/pull/12062) by [@&#8203;Alec-Gillis](https://github.com/Alec-Gillis). - 📝 Update docs about serving FastAPI: ASGI servers, Docker containers, etc.. PR [#&#8203;12069](https://github.com/fastapi/fastapi/pull/12069) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Clarify `response_class` parameter, validations, and returning a response directly. PR [#&#8203;12067](https://github.com/fastapi/fastapi/pull/12067) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Fix minor typos and issues in the documentation. PR [#&#8203;12063](https://github.com/fastapi/fastapi/pull/12063) by [@&#8203;svlandeg](https://github.com/svlandeg). - 📝 Add note in Docker docs about ensuring graceful shutdowns and lifespan events with `CMD` exec form. PR [#&#8203;11960](https://github.com/fastapi/fastapi/pull/11960) by [@&#8203;GPla](https://github.com/GPla). ##### Translations - 🌐 Add Dutch translation for `docs/nl/docs/features.md`. PR [#&#8203;12101](https://github.com/fastapi/fastapi/pull/12101) by [@&#8203;maxscheijen](https://github.com/maxscheijen). - 🌐 Add Portuguese translation for `docs/pt/docs/advanced/testing-events.md`. PR [#&#8203;12108](https://github.com/fastapi/fastapi/pull/12108) by [@&#8203;ceb10n](https://github.com/ceb10n). - 🌐 Add Portuguese translation for `docs/pt/docs/advanced/security/index.md`. PR [#&#8203;12114](https://github.com/fastapi/fastapi/pull/12114) by [@&#8203;ceb10n](https://github.com/ceb10n). - 🌐 Add Dutch translation for `docs/nl/docs/index.md`. PR [#&#8203;12042](https://github.com/fastapi/fastapi/pull/12042) by [@&#8203;svlandeg](https://github.com/svlandeg). - 🌐 Update Chinese translation for `docs/zh/docs/how-to/index.md`. PR [#&#8203;12070](https://github.com/fastapi/fastapi/pull/12070) by [@&#8203;synthpop123](https://github.com/synthpop123). ##### Internal - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;12115](https://github.com/fastapi/fastapi/pull/12115) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - ⬆ Bump pypa/gh-action-pypi-publish from 1.10.0 to 1.10.1. PR [#&#8203;12120](https://github.com/fastapi/fastapi/pull/12120) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump pillow from 10.3.0 to 10.4.0. PR [#&#8203;12105](https://github.com/fastapi/fastapi/pull/12105) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 💚 Set `include-hidden-files` to `True` when using the `upload-artifact` GH action. PR [#&#8203;12118](https://github.com/fastapi/fastapi/pull/12118) by [@&#8203;svlandeg](https://github.com/svlandeg). - ⬆ Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.0. PR [#&#8203;12112](https://github.com/fastapi/fastapi/pull/12112) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 🔧 Update sponsors link: Coherence. PR [#&#8203;12097](https://github.com/fastapi/fastapi/pull/12097) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update labeler config to handle sponsorships data. PR [#&#8203;12096](https://github.com/fastapi/fastapi/pull/12096) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors, remove Kong. PR [#&#8203;12085](https://github.com/fastapi/fastapi/pull/12085) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ \[pre-commit.ci] pre-commit autoupdate. PR [#&#8203;12076](https://github.com/fastapi/fastapi/pull/12076) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci). - 👷 Update `latest-changes` GitHub Action. PR [#&#8203;12073](https://github.com/fastapi/fastapi/pull/12073) by [@&#8203;tiangolo](https://github.com/tiangolo). </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC40NS4wIiwidXBkYXRlZEluVmVyIjoiMzguNDUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
renovate added 1 commit 2024-09-08 00:17:30 +00:00
Update dependency fastapi to v0.114.0
Some checks failed
build / image-build (push) Failing after 2s
renovate / renovate (push) Failing after 2s
12bfcb7a4e
renovate scheduled this pull request to auto merge when all checks succeed 2024-09-08 00:17:30 +00:00
renovate merged commit 12bfcb7a4e into main 2024-09-08 00:17:32 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: training/docker-build-exercise#35