open-contracting / credere-backend

A tool that facilitates the participation of Micro, Small, and Medium businesses (MSMEs) in the Colombian public procurement market.
https://credere.readthedocs.io
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

build(deps): bump fastapi from 0.104.1 to 0.109.1 #260

Closed dependabot[bot] closed 6 months ago

dependabot[bot] commented 6 months ago

Bumps fastapi from 0.104.1 to 0.109.1.

Release notes

Sourced from fastapi's releases.

0.109.1

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

  • 🌐 Add Spanish translation for docs/es/docs/external-links.md. PR #10933 by @​pablocm83.
  • 🌐 Update Korean translation for docs/ko/docs/tutorial/first-steps.md, docs/ko/docs/tutorial/index.md, docs/ko/docs/tutorial/path-params.md, and docs/ko/docs/tutorial/query-params.md. PR #4218 by @​SnowSuno.

... (truncated)

Commits
  • 7633d15 🔖 Release version 0.109.1
  • a4de147 📝 Update release notes
  • 9d34ad0 Merge pull request from GHSA-qf9m-vfgh-m389
  • ebf9723 📝 Update release notes
  • 8590d0c 👥 Update FastAPI People (#11074)
  • 063d7ff 📝 Update release notes
  • 3c81e62 🌐 Add Spanish translation for docs/es/docs/external-links.md (#10933)
  • 6c4a143 📝 Update release notes
  • d254e2f 🌐 Update Korean translation for docs/ko/docs/tutorial/first-steps.md, `docs...
  • 6f6e786 📝 Update release notes
  • 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 show ignore conditions` will show all of the ignore conditions of the specified dependency - `@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) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/open-contracting/credere-backend/network/alerts).
jpmckinney commented 6 months ago

There's a breaking change in 0.106: https://fastapi.tiangolo.com/release-notes/#01060

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

New background tasks docs: https://fastapi.tiangolo.com/tutorial/background-tasks/

jpmckinney commented 6 months ago

@yolile I added a commit to address the changelog entries quoted above.

yolile commented 6 months ago

@jpmckinney, thank you! I assume I still need to resolve some things as per the failing tests, right?

jpmckinney commented 6 months ago

Hmm, that's a new error - the old error you fixed must have been shadowing this new one.

coveralls commented 6 months ago

Pull Request Test Coverage Report for Build 7821404672


Changes Missing Coverage Covered Lines Changed/Added Lines %
app/routers/downloads.py 3 5 60.0%
<!-- Total: 11 13 84.62% -->
Files with Coverage Reduction New Missed Lines %
app/sources/colombia.py 2 74.16%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 7820759433: 0.2%
Covered Lines: 1966
Relevant Lines: 2250

💛 - Coveralls
jpmckinney commented 6 months ago

@yolile Tests pass now. Please have a look at the changes.