Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

chore(deps): bump fastapi from 0.79.1 to 0.80.0 in /test-engineering/contract-tests/partner #441

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Aug 26, 2022

Bumps fastapi from 0.79.1 to 0.80.0.

Release notes

Sourced from fastapi's releases.

0.80.0

Breaking Changes - Fixes

If you are using response_model with some type that doesn't include None but the function is returning None, it will now raise an internal server error, because you are returning invalid data that violates the contract in response_model. Before this release it would allow breaking that contract returning None.

For example, if you have an app like this:

from fastapi import FastAPI
from pydantic import BaseModel
class Item(BaseModel):
name: str
price: Optional[float] = None
owner_ids: Optional[List[int]] = None
app = FastAPI()
@​app.get("/items/invalidnone", response_model=Item)
def get_invalid_none():
return None

...calling the path /items/invalidnone will raise an error, because None is not a valid type for the response_model declared with Item.

You could also be implicitly returning None without realizing, for example:

from fastapi import FastAPI
from pydantic import BaseModel
class Item(BaseModel):
name: str
price: Optional[float] = None
owner_ids: Optional[List[int]] = None
app = FastAPI()
@​app.get("/items/invalidnone", response_model=Item)
def get_invalid_none():
if flag:
return {"name": "foo"}
# if flag is False, at this point the function will implicitly return None

If you have path operations using response_model that need to be allowed to return None, make it explicit in response_model using Union[Something, None]:

</tr></table> 

... (truncated)

Commits
  • 7d6e707 🔖 Release version 0.80.0
  • 18819f9 📝 Update release notes
  • ad65e72 📝 Update release notes
  • ec072d7 ⬆ Upgrade Swagger UI copy of oauth2-redirect.html to include fixes for flav...
  • 09acce4 📝 Update release notes
  • f6808e7 ♻ Strip empty whitespace from description extracted from docstrings (#2821)
  • f8f5281 📝 Update release notes
  • b993b4a 🐛 Fix cached dependencies when using a dependency in Security() and other p...
  • 982911f 📝 Update release notes
  • 634cf22 🐛 Fix response_model not invalidating None (#2725)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [fastapi](https://github.com/tiangolo/fastapi) from 0.79.1 to 0.80.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](fastapi/fastapi@0.79.1...0.80.0)

---
updated-dependencies:
- dependency-name: fastapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot requested a review from a team as a code owner August 26, 2022 05:30
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Aug 26, 2022
@Trinaa Trinaa merged commit bbbcdff into main Aug 26, 2022
@Trinaa Trinaa deleted the dependabot/pip/test-engineering/contract-tests/partner/fastapi-0.80.0 branch August 26, 2022 19:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant