Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Bump fastapi from 0.68.0 to 0.80.0 #110

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

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

Bumps fastapi from 0.68.0 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.68.0 to 0.80.0.
- [Release notes](https://github.com/tiangolo/fastapi/releases)
- [Commits](tiangolo/fastapi@0.68.0...0.80.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels Aug 24, 2022
@dependabot dependabot bot requested a review from Defelo August 24, 2022 09:17
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.

None yet

0 participants