Lightning-Universe / lightning-flash

Your PyTorch AI Factory - Flash enables you to easily configure and run complex AI recipes for over 15 tasks across 7 data domains
https://lightning-flash.readthedocs.io
Apache License 2.0
1.74k stars 212 forks source link

build(deps): update fastapi requirement from <=0.98.0,>0.65 to >0.65,<=0.100.0 in /requirements #1643

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Updates the requirements on fastapi to permit the latest version.

Release notes

Sourced from fastapi's releases.

0.100.0

✨ Support for Pydantic v2 ✨

Pydantic version 2 has the core re-written in Rust and includes a lot of improvements and features, for example:

  • Improved correctness in corner cases.
  • Safer types.
  • Better performance and less energy consumption.
  • Better extensibility.
  • etc.

...all this while keeping the same Python API. In most of the cases, for simple models, you can simply upgrade the Pydantic version and get all the benefits. πŸš€

In some cases, for pure data validation and processing, you can get performance improvements of 20x or more. This means 2,000% or more. 🀯

When you use FastAPI, there's a lot more going on, processing the request and response, handling dependencies, executing your own code, and particularly, waiting for the network. But you will probably still get some nice performance improvements just from the upgrade.

The focus of this release is compatibility with Pydantic v1 and v2, to make sure your current apps keep working. Later there will be more focus on refactors, correctness, code improvements, and then performance improvements. Some third-party early beta testers that ran benchmarks on the beta releases of FastAPI reported improvements of 2x - 3x. Which is not bad for just doing pip install --upgrade fastapi pydantic. This was not an official benchmark and I didn't check it myself, but it's a good sign.

Migration

Check out the Pydantic migration guide.

For the things that need changes in your Pydantic models, the Pydantic team built bump-pydantic.

A command line tool that will process your code and update most of the things automatically for you. Make sure you have your code in git first, and review each of the changes to make sure everything is correct before committing the changes.

Pydantic v1

This version of FastAPI still supports Pydantic v1. And although Pydantic v1 will be deprecated at some point, ti will still be supported for a while.

This means that you can install the new Pydantic v2, and if something fails, you can install Pydantic v1 while you fix any problems you might have, but having the latest FastAPI.

There are tests for both Pydantic v1 and v2, and test coverage is kept at 100%.

Changes

  • There are new parameter fields supported by Pydantic Field() for:

    • Path()
    • Query()
    • Header()
    • Cookie()
    • Body()
    • Form()
    • File()
  • The new parameter fields are:

    • default_factory

... (truncated)

Commits
  • f8356d9 πŸ”– Release version 0.100.0
  • 179e409 πŸ“ Update release notes
  • bb7e5b7 πŸ“ Update release notes
  • 0976185 ✨ Add support for Pydantic v2 (#9816)
  • dd4e78c πŸ”– Release version 0.99.1
  • 8a198fc πŸ“ Update release notes
  • 6bd4f53 πŸ“ Update release notes
  • 07e1dea πŸ› Fix JSON Schema accepting bools as valid JSON Schemas, e.g. `additionalProp...
  • 0f105d9 πŸ“ Update release notes
  • 4d83f98 πŸ“ Update source examples to use new JSON Schema examples field (#9776)
  • Additional commits viewable in compare view


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)
codecov[bot] commented 1 year ago

Codecov Report

Merging #1643 (0dc9f79) into master (fc05d4e) will decrease coverage by 23%. The diff coverage is n/a.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1643 +/- ## ======================================== - Coverage 84% 61% -23% ======================================== Files 291 291 Lines 12852 12852 ======================================== - Hits 10766 7857 -2909 - Misses 2086 4995 +2909 ```