[PR #77] [MERGED] Update dependency fastapi to ^0.95.0 #74
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TheLovinator/twitter-image-collage-maker#74
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/TheLovinator1/twitter-image-collage-maker/pull/77
Author: @renovate[bot]
Created: 3/18/2023
Status: ✅ Merged
Merged: 3/18/2023
Merged by: @renovate[bot]
Base:
master← Head:renovate/fastapi-0.x📝 Commits (1)
3490d56Update dependency fastapi to ^0.95.0📊 Changes
2 files changed (+5 additions, -5 deletions)
View changed files
📝
poetry.lock(+4 -4)📝
pyproject.toml(+1 -1)📄 Description
This PR contains the following updates:
^0.94.0->^0.95.0Release Notes
tiangolo/fastapi
v0.95.0Compare Source
Highlights
This release adds support for dependencies and parameters using
Annotatedand recommends its usage. ✨This has several benefits, one of the main ones is that now the parameters of your functions with
Annotatedwould not be affected at all.If you call those functions in other places in your code, the actual default values will be kept, your editor will help you notice missing required arguments, Python will require you to pass required arguments at runtime, you will be able to use the same functions for different things and with different libraries (e.g. Typer will soon support
Annotatedtoo, then you could use the same function for an API and a CLI), etc.Because
Annotatedis standard Python, you still get all the benefits from editors and tools, like autocompletion, inline errors, etc.One of the biggest benefits is that now you can create
Annotateddependencies that are then shared by multiple path operation functions, this will allow you to reduce a lot of code duplication in your codebase, while keeping all the support from editors and tools.For example, you could have code like this:
There's a bit of code duplication for the dependency:
...the bigger the codebase, the more noticeable it is.
Now you can create an annotated dependency once, like this:
And then you can reuse this
Annotateddependency:...and
CurrentUserhas all the typing information asUser, so your editor will work as expected (autocompletion and everything), and FastAPI will be able to understand the dependency defined inAnnotated. 😎Roughly all the docs have been rewritten to use
Annotatedas the main way to declare parameters and dependencies. All the examples in the docs now include a version withAnnotatedand a version without it, for each of the specific Python versions (when there are small differences/improvements in more recent versions). There were around 23K new lines added between docs, examples, and tests. 🚀The key updated docs are:
AnnotatedAnnotatedAnnotateddependenciesSpecial thanks to @nzig for the core implementation and to @adriangb for the inspiration and idea with Xpresso! 🚀
Features
Annotatedfor specifying dependencies and parameters. PR #4871 by @nzig.Docs
Annotatedin docs. PR #9270 by @tiangolo.Annotatedas the main recommendation, with new examples and tests. PR #9268 by @tiangolo.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.
This PR has been generated by Mend Renovate. View repository job log here.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.