Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency fastapi to v0.109.2 - autoclosed #28

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 1, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
fastapi 0.95.2 -> 0.109.2 age adoption passing confidence

Release Notes

tiangolo/fastapi (fastapi)

v0.109.2

Compare Source

Upgrades
Translations
Internal

v0.109.1

Compare Source

Security fixes
  • ⬆️ 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.

Features
Refactors
  • ✅ Refactor tests for duplicate operation ID generation for compatibility with other tools running the FastAPI test suite. PR #​10876 by @​emmettbutler.
  • ♻️ Simplify string format with f-strings in fastapi/utils.py. PR #​10576 by @​eukub.
  • 🔧 Fix Ruff configuration unintentionally enabling and re-disabling mccabe complexity check. PR #​10893 by @​jiridanek.
  • ✅ Re-enable test in tests/test_tutorial/test_header_params/test_tutorial003.py after fix in Starlette. PR #​10904 by @​ooknimm.
Docs
Translations
Internal

v0.109.0

Compare Source

Features
Upgrades
Docs
Translations
Internal

v0.108.0

Compare Source

Upgrades
  • ⬆️ Upgrade Starlette to >=0.29.0,<0.33.0, update docs and usage of templates with new Starlette arguments. PR #​10846 by @​tiangolo.

v0.107.0

Compare Source

Upgrades
Docs

v0.106.0

Compare Source

Breaking Changes

Using resources from dependencies with yield in background tasks is no longer supported.

This change is what supports the new features, read below. 🤓

Dependencies with yield, HTTPException and Background Tasks

Dependencies with yield now can raise HTTPException and other exceptions after yield. 🎉

Read the new docs here: Dependencies with yield and HTTPException.

from fastapi import Depends, FastAPI, HTTPException
from typing_extensions import Annotated

app = FastAPI()

data = {
    "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
    "portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
}

class OwnerError(Exception):
    pass

def get_username():
    try:
        yield "Rick"
    except OwnerError as e:
        raise HTTPException(status_code=400, detail=f"Onwer error: {e}")

@&#8203;app.get("/items/{item_id}")
def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
    if item_id not in data:
        raise HTTPException(status_code=404, detail="Item not found")
    item = data[item_id]
    if item["owner"] != username:
        raise OwnerError(username)
    return item

Before FastAPI 0.106.0, raising exceptions after yield was not possible, the exit code in dependencies with yield was executed after the response was sent, so Exception Handlers would have already run.

This was designed this way mainly to allow using the same objects "yielded" by dependencies inside of background tasks, because the exit code would be executed after the background tasks were finished.

Nevertheless, as this would mean waiting for the response to travel through the network while unnecessarily holding a resource in a dependency with yield (for example a database connection), this was changed in FastAPI 0.106.0.

Additionally, a background task is normally an independent set of logic that should be handled separately, with its own resources (e.g. its own database connection).

If you used to rely on this behavior, now you should create the resources for background tasks inside the background task itself, and use internally only data that doesn't depend on the resources of dependencies with yield.

For example, instead of using the same database session, you would create a new database session inside of the background task, and you would obtain the objects from the database using this new session. And then instead of passing the object from the database as a parameter to the background task function, you would pass the ID of that object and then obtain the object again inside the background task function.

The sequence of execution before FastAPI 0.106.0 was like the diagram in the Release Notes for FastAPI 0.106.0.

The new execution flow can be found in the docs: Execution of dependencies with yield.

v0.105.0

Compare Source

Features
  • ✨ Add support for multiple Annotated annotations, e.g. Annotated[str, Field(), Query()]. PR #​10773 by @​tiangolo.
Refactors
Docs
Internal

v0.104.1

Compare Source

Fixes
  • 📌 Pin Swagger UI version to 5.9.0 temporarily to handle a bug crashing it in 5.9.1. PR #​10529 by @​alejandraklachquin.
    • This is not really a bug in FastAPI but in Swagger UI, nevertheless pinning the version will work while a solution is found on the Swagger UI side.
Docs
Internal

v0.104.0

Compare Source

Features

Upgrades

Internal

v0.103.2

Compare Source

Refactors
  • ⬆️ Upgrade compatibility with Pydantic v2.4, new renamed functions and JSON Schema input/output models with default values. PR #​10344 by @​tiangolo.
Translations
  • 🌐 Add Ukrainian translation for docs/uk/docs/tutorial/extra-data-types.md. PR #​10132 by @​ArtemKhymenko.
  • 🌐 Fix typos in French translations for docs/fr/docs/advanced/path-operation-advanced-configuration.md, docs/fr/docs/alternatives.md, docs/fr/docs/async.md, docs/fr/docs/features.md, docs/fr/docs/help-fastapi.md, docs/fr/docs/index.md, docs/fr/docs/python-types.md, docs/fr/docs/tutorial/body.md, docs/fr/docs/tutorial/first-steps.md, docs/fr/docs/tutorial/query-params.md. PR #​10154 by @​s-rigaud.
  • 🌐 Add Chinese translation for docs/zh/docs/async.md. PR #​5591 by @​mkdir700.
  • 🌐 Update Chinese translation for docs/tutorial/security/simple-oauth2.md. PR #​3844 by @​jaystone776.
  • 🌐 Add Korean translation for docs/ko/docs/deployment/cloud.md. PR #​10191 by @​Sion99.
  • 🌐 Add Japanese translation for docs/ja/docs/deployment/https.md. PR #​10298 by @​tamtam-fitness.
  • 🌐 Fix typo in Russian translation for docs/ru/docs/tutorial/body-fields.md. PR #​10224 by @​AlertRED.
  • 🌐 Add Polish translation for docs/pl/docs/help-fastapi.md. PR #​10121 by @​romabozhanovgithub.
  • 🌐 Add Russian translation for docs/ru/docs/tutorial/header-params.md. PR #​10226 by @​AlertRED.
  • 🌐 Add Chinese translation for docs/zh/docs/deployment/versions.md. PR #​10276 by @​xzmeng.
Internal

v0.103.1

Compare Source

Fixes
  • 📌 Pin AnyIO to < 4.0.0 to handle an incompatibility while upgrading to Starlette 0.31.1. PR #​10194 by @​tiangolo.
Docs

Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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 Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 670ab4d to 49a41c9 Compare July 14, 2022 21:59
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.78.0,<0.79.0 fix(deps): update dependency fastapi to >=0.79.0,<0.80.0 Jul 14, 2022
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 49a41c9 to 6eae3a9 Compare August 18, 2022 21:55
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.79.0,<0.80.0 fix(deps): update dependency fastapi to >=0.79.1,<0.80.0 Aug 18, 2022
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 6eae3a9 to 1976987 Compare August 23, 2022 15:59
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.79.1,<0.80.0 fix(deps): update dependency fastapi to >=0.80.0,<0.81.0 Aug 23, 2022
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 1976987 to 07b7e5d Compare August 26, 2022 15:40
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.80.0,<0.81.0 fix(deps): update dependency fastapi to >=0.81.0,<0.82.0 Aug 26, 2022
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 07b7e5d to 07e13de Compare September 4, 2022 22:12
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.81.0,<0.82.0 fix(deps): update dependency fastapi to >=0.82.0,<0.83.0 Sep 4, 2022
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 07e13de to 106f3cd Compare September 25, 2022 17:59
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.82.0,<0.83.0 fix(deps): update dependency fastapi to >=0.85.0,<0.86.0 Sep 25, 2022
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 106f3cd to c960bff Compare January 19, 2023 18:50
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.85.0,<0.86.0 fix(deps): update dependency fastapi to >=0.89.1,<0.90.0 Jan 19, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from c960bff to fb70a62 Compare February 8, 2023 12:17
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.89.1,<0.90.0 fix(deps): update dependency fastapi to >=0.90.0,<0.91.0 Feb 8, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from fb70a62 to b72847e Compare February 9, 2023 21:47
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.90.0,<0.91.0 fix(deps): update dependency fastapi to >=0.90.1,<0.91.0 Feb 9, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from b72847e to ba61fe7 Compare February 10, 2023 17:07
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.90.1,<0.91.0 fix(deps): update dependency fastapi to >=0.91.0,<0.92.0 Feb 10, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from ba61fe7 to b34a819 Compare February 14, 2023 10:43
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.91.0,<0.92.0 fix(deps): update dependency fastapi to >=0.92.0,<0.93.0 Feb 14, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from b34a819 to 1d92578 Compare March 7, 2023 17:00
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.92.0,<0.93.0 fix(deps): update dependency fastapi to >=0.93.0,<0.94.0 Mar 7, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 1d92578 to bb73bfb Compare March 10, 2023 20:44
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.93.0,<0.94.0 fix(deps): update dependency fastapi to >=0.94.0,<0.95.0 Mar 10, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from bb73bfb to 6cbfe39 Compare March 14, 2023 02:40
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.94.0,<0.95.0 fix(deps): update dependency fastapi to >=0.94.1,<0.95.0 Mar 14, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 6cbfe39 to ccf723c Compare March 18, 2023 20:32
@renovate renovate bot changed the title fix(deps): update dependency fastapi to >=0.94.1,<0.95.0 fix(deps): update dependency fastapi to >=0.95.0,<0.96.0 Mar 18, 2023
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.101.0 fix(deps): update dependency fastapi to v0.101.1 Aug 15, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 6339024 to 26b4816 Compare August 15, 2023 02:49
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.101.1 fix(deps): update dependency fastapi to v0.102.0 Aug 25, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch 2 times, most recently from 6aec4e2 to 8c660ed Compare August 27, 2023 02:52
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.102.0 fix(deps): update dependency fastapi to v0.103.0 Aug 27, 2023
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.103.0 fix(deps): update dependency fastapi to v0.103.1 Sep 3, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 8c660ed to e41110b Compare September 3, 2023 02:55
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.103.1 fix(deps): update dependency fastapi to v0.103.2 Sep 29, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from e41110b to 46a4ac7 Compare September 29, 2023 20:18
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 46a4ac7 to 4d1b06d Compare October 19, 2023 05:57
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.103.2 fix(deps): update dependency fastapi to v0.104.0 Oct 19, 2023
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.104.0 fix(deps): update dependency fastapi to v0.104.1 Oct 31, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 4d1b06d to c78d2fd Compare October 31, 2023 09:02
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from c78d2fd to 3bf7a68 Compare December 12, 2023 02:38
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.104.1 fix(deps): update dependency fastapi to v0.105.0 Dec 12, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 3bf7a68 to 9c68a94 Compare December 26, 2023 11:19
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.105.0 fix(deps): update dependency fastapi to v0.106.0 Dec 26, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 9c68a94 to 62f1f20 Compare December 27, 2023 08:43
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.106.0 fix(deps): update dependency fastapi to v0.108.0 Dec 27, 2023
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 62f1f20 to 961d7b0 Compare January 12, 2024 08:46
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.108.0 fix(deps): update dependency fastapi to v0.109.0 Jan 12, 2024
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 961d7b0 to 4ff21f8 Compare February 4, 2024 14:42
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.109.0 fix(deps): update dependency fastapi to v0.109.1 Feb 4, 2024
@renovate renovate bot force-pushed the renovate/fastapi-0.x branch from 4ff21f8 to f80b11d Compare February 5, 2024 02:15
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.109.1 fix(deps): update dependency fastapi to v0.109.2 Feb 5, 2024
@renovate renovate bot changed the title fix(deps): update dependency fastapi to v0.109.2 fix(deps): update dependency fastapi to v0.109.2 - autoclosed Feb 6, 2024
@renovate renovate bot closed this Feb 6, 2024
@renovate renovate bot deleted the renovate/fastapi-0.x branch February 6, 2024 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants