Closed dependabot[bot] closed 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/
@yolile I added a commit to address the changelog entries quoted above.
@jpmckinney, thank you! I assume I still need to resolve some things as per the failing tests, right?
Hmm, that's a new error - the old error you fixed must have been shadowing this new one.
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 | |
---|---|
Change from base Build 7820759433: | 0.2% |
Covered Lines: | 1966 |
Relevant Lines: | 2250 |
@yolile Tests pass now. Please have a look at the changes.
Bumps fastapi from 0.104.1 to 0.109.1.
Release notes
Sourced from fastapi's releases.
... (truncated)
Commits
7633d15
🔖 Release version 0.109.1a4de147
📝 Update release notes9d34ad0
Merge pull request from GHSA-qf9m-vfgh-m389ebf9723
📝 Update release notes8590d0c
👥 Update FastAPI People (#11074)063d7ff
📝 Update release notes3c81e62
🌐 Add Spanish translation fordocs/es/docs/external-links.md
(#10933)6c4a143
📝 Update release notesd254e2f
🌐 Update Korean translation fordocs/ko/docs/tutorial/first-steps.md
, `docs...6f6e786
📝 Update release notesDependabot 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