Skip to content

Conversation

@YuriiMotov
Copy link
Member

@YuriiMotov YuriiMotov commented Jun 11, 2025

Warning

This description is partially outdated after changes described in this comment.

Description

This PR is an attempt to finally solve the issue with security tools returning error responses with status code 403 instead of 401 when credentials are not provided.

Breaking changes and workaround

These changes can break projects that rely on old behavior.
In order to mitigate this, the not_authenticated_status_code is introduced. If set to 403, it will make it work the same way as it was before changes (return 403 status code).
This option should be treated as a temporary workaround to give developers more time to update Clients to follow the new behavior.

Changes and reasoning

APIKeyQuery, APIKeyHeader, APIKeyCookie

  • Standard:
    • These schemes are not covered by standards, but developers usually follow the same rules as for other standards
  • Actions:
    • The default status code for not providing API key was changed from 403 to 401.
    • Temporary not_authenticated_status_code parameter can be used to revert this behavior back to returning 403 error code without sending WWW-Authenticate.
  • Notes:
    • It’s considered to be a good practice to include in WWW-Authenticate information needed to understand how the key is supposed to be passed. I implemented default format (WWW-Authenticate: ApiKey in="...", name="..." ), but it’s possible to override the template for WWW-Authenticate by subclassing and defining the format_www_authenticate_header_value method

HTTP Basic

  • Standard:
  • Actions:
    • No needed. This scheme already acts according to the standard in terms of returning 401 status code with WWW-Authenticate header on a lack of credentials
  • Notes:
    • realm is required according to the RFC, but optional in the current implementation. Fixing this would introduce breaking changes. Considering this is not a problem for people who want to follow the standard, I suggest we leave it as it is.

HTTP Digest

  • Standard:
  • Actions:
    • The default status code for not providing the authorization parameter was changed from 403 to 401.
    • WWW-Authenticate is just a stub for now (just WWW-Authenticate: Digest) (see notes)
    • Temporary not_authenticated_status_code parameter can be used to revert this behavior back to returning 403 error code without sending WWW-Authenticate.
  • Notes:
    • Since the current HTTPDigest implementation is just a stub, we can’t follow standards (we don’t generate nonce's, don’t have realm, …). I suggest we just change the error status code and add a stub for WWW-Authenticate (just WWW-Authenticate: Digest). For now HTTPDigest can’t be used as it is, so, this is not a problem.
    • We can later add full implementation of Digest scheme. There have been made several attempts to implement it (Update HTTPDigest to match RFC 7616 #9825, 🔒 Match HTTP Digest specs from RFC 7616 #3071)
    • Should we add a note that HTTPDigest is just a stub?

HTTP Bearer, OAuth2 schemes, OIDC

  • Standard:
  • Actions:
    • For OAuth2PasswordBearer and OAuth2AuthorizationCodeBearer: not needed.
      • They already return a 401 error code. Implementation is probably not 100% correct (see notes), but considering nobody argued, I think we can leave it as it is for now.
    • For HTTPBearer and OpenIdConnect:
      • The default status code for not providing the authorization parameter was changed from 403 to 401. The suggested implementation will be in line with the current implementations of OAuth2PasswordBearer and OAuth2AuthorizationCodeBearer.
      • Temporary not_authenticated_status_code parameter added to HTTPBearer can be used to revert this behavior back to returning 403 error code without sending WWW-Authenticate.
  • Notes:
    • It’s recommended to return 400 error response if the parameter is missed or of an unsupported type, but this is not a strict requirement (word SHOULD is used). I suggest we ignore this and follow the approach that is consistent with other schemes.
    • The format of WWW-Authenticate is not clearly described: It’s said that the value "Bearer" MUST be followed by one or more auth-param values. At the same time, all auth-param attributes are optional. In examples they always add realm. Since we don’t have realm, I suggest we just skip it and send just WWW-Authenticate: Bearer
    • We can later improve the WWW-Authenticate format by adding realm and scope

Links

@YuriiMotov YuriiMotov added the bug Something isn't working label Jun 11, 2025
@tiangolo tiangolo changed the title 🐛 Use 401 status code in security classes when credentials missed 🐛 Use 401 status code in security classes when credentials are missing Jun 17, 2025
@bjmc
Copy link

bjmc commented Jul 15, 2025

Thank you for opening this @YuriiMotov - we've just been surprised by an API reporting 403 for a missing token when we we'd be expecting to see 401 and trigger a login flow on the client side.

We'd be glad to have this this fix merged. 🙏

(fwiw, I agree with the decision to follow other implementations and return 401 not 400)

@stg609
Copy link

stg609 commented Aug 6, 2025

Any progress?

@Cito
Copy link

Cito commented Aug 6, 2025

We have been also noticing this and are waiting for a fix for a long time.

@svlandeg svlandeg linked an issue Aug 27, 2025 that may be closed by this pull request
@cleder
Copy link

cleder commented Aug 28, 2025

I ran into this too when using schemathesis testing a route protected by HTTPBearer

  | schemathesis.core.failures.FailureGroup: Schemathesis found 2 distinct failures
  | 
  | - Missing header not rejected
  | 
  |     Missing header not rejected (got 403, expected 401)

Copy link

@cleder cleder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The if self.not_authenticated_status_code == HTTP_403_FORBIDDEN: checks look a bit clunky, but given this is of a temporary nature it is probably fine

@github-actions

This comment was marked as resolved.

@github-actions github-actions bot added the conflicts Automatically generated when a PR has a merge conflict label Sep 20, 2025
@github-actions

This comment was marked as resolved.

@github-actions github-actions bot removed the conflicts Automatically generated when a PR has a merge conflict label Oct 24, 2025
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you @YuriiMotov! 🙌

And thank you for all the investigation and notes with all the research. 🤓 ☕


I made the following updates:

  • Simplify the WWW-Authenticate challenge for API key, as this is a custom challenge we are defining, I didn't want to also define custom parameters, but leave the simplest form.
  • Refactor the implementation to not have an extra parameter for defining the status code, instead, put the creation of the error in a method of the class, this way if someone wants to use the old behavior, they can create a subclass and override only that method.
  • Refactor the HTTP classes to all return the same message for errors ("Not authenticated"), instead of some times returning "Invalid authentication credentials", this simplifies the code a bit, and in particular makes it simpler to explain to users how to use the old behavior.
  • Simplify and refactor a bit the implementation.
  • Add new docs for how to use the old behavior by subclassing, with new source examples and tests for them.
  • Add notes and warnings about stub classes, as you suggested.

I also noted that the spec says that the realm is now optional, but only in a footer note (https://datatracker.ietf.org/doc/html/rfc7235#appendix-A). 😂 Anyway, we are good with that now.


This will be available in FastAPI 0.122.0, released in the next few hours. 🎉

@github-actions
Copy link
Contributor

@tiangolo tiangolo merged commit 51ad909 into fastapi:master Nov 24, 2025
45 checks passed
nilslindemann added a commit to nilslindemann/fastapi that referenced this pull request Dec 1, 2025
YuriiMotov added a commit that referenced this pull request Dec 2, 2025
* Sync with #14217

* Sync with #14359

* Sync with #13786

* Sync with #14070

* Sync with #14120

* Sync with #14211

* Sync with #14405

* "to deploy" -> "deployen"

The LLM used that translation a lot ithis convinced me that "deployen" it is the better word. "bereitstellen" (or "ausliefern") is still used for "to serve".

---------

Co-authored-by: Motov Yurii <109919500+YuriiMotov@users.noreply.github.com>
Co-authored-by: Yurii Motov <yurii.motov.monte@gmail.com>
736-c41-2c1-e464fc974 added a commit to Swiss-Armed-Forces/Loom that referenced this pull request Jan 14, 2026
This MR contains the following updates:

| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
| [celery](https://docs.celeryq.dev/) ([source](https://github.com/celery/celery), [changelog](https://docs.celeryq.dev/en/stable/changelog.html)) | dependencies | minor | `5.5.3` → `5.6.2` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/celery/celery/badge)](https://securityscorecards.dev/viewer/?uri=github.com/celery/celery) |
| [celery-types](https://github.com/sbdchd/celery-types) | dependencies | minor | `^0.22.0` → `^0.24.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/sbdchd/celery-types/badge)](https://securityscorecards.dev/viewer/?uri=github.com/sbdchd/celery-types) |
| [fastapi](https://github.com/fastapi/fastapi) ([changelog](https://fastapi.tiangolo.com/release-notes/)) | dependencies | minor | `^0.115.12` → `^0.128.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/fastapi/fastapi/badge)](https://securityscorecards.dev/viewer/?uri=github.com/fastapi/fastapi) |
| [filelock](https://github.com/tox-dev/py-filelock) | dependencies | minor | `3.14.0` → `3.20.3` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/tox-dev/py-filelock/badge)](https://securityscorecards.dev/viewer/?uri=github.com/tox-dev/py-filelock) |
| [luqum](https://github.com/jurismarches/luqum) | dependencies | minor | `^0.13.0` → `^0.14.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/jurismarches/luqum/badge)](https://securityscorecards.dev/viewer/?uri=github.com/jurismarches/luqum) |
| [ollama](https://github.com/ollama/ollama-python) | dependencies | minor | `^0.5.1` → `^0.6.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ollama/ollama-python/badge)](https://securityscorecards.dev/viewer/?uri=github.com/ollama/ollama-python) |
| [pycryptodome](https://www.pycryptodome.org) ([source](https://github.com/Legrandin/pycryptodome), [changelog](https://www.pycryptodome.org/src/changelog)) | dependencies | minor | `3.20.0` → `3.23.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Legrandin/pycryptodome/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Legrandin/pycryptodome) |
| [pydantic-mongo](https://github.com/jefersondaniel/pydantic-mongo) | dependencies | minor | `2.3.0` → `2.4.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/jefersondaniel/pydantic-mongo/badge)](https://securityscorecards.dev/viewer/?uri=github.com/jefersondaniel/pydantic-mongo) |
| [pydantic-settings](https://github.com/pydantic/pydantic-settings) ([changelog](https://github.com/pydantic/pydantic-settings/releases)) | dependencies | minor | `2.2.1` → `2.12.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/pydantic/pydantic-settings/badge)](https://securityscorecards.dev/viewer/?uri=github.com/pydantic/pydantic-settings) |
| [pymongo](https://github.com/mongodb/mongo-python-driver) | dependencies | minor | `4.15.5` → `4.16.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/mongodb/mongo-python-driver/badge)](https://securityscorecards.dev/viewer/?uri=github.com/mongodb/mongo-python-driver) |
| [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) ([changelog](https://pytest-asyncio.readthedocs.io/en/latest/reference/changelog.html)) | dependencies | minor | `^0.23.6` → `^0.26.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/pytest-dev/pytest-asyncio/badge)](https://securityscorecards.dev/viewer/?uri=github.com/pytest-dev/pytest-asyncio) |
| [pytest-timeout](https://github.com/pytest-dev/pytest-timeout) | dependencies | minor | `2.3.1` → `2.4.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/pytest-dev/pytest-timeout/badge)](https://securityscorecards.dev/viewer/?uri=github.com/pytest-dev/pytest-timeout) |
| [scikit-learn](https://github.com/scikit-learn/scikit-learn) ([changelog](https://scikit-learn.org/stable/whats_new)) | dependencies | minor | `1.7.0` → `1.8.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/scikit-learn/scikit-learn/badge)](https://securityscorecards.dev/viewer/?uri=github.com/scikit-learn/scikit-learn) |
| [scikit-learn](https://github.com/scikit-learn/scikit-learn) ([changelog](https://scikit-learn.org/stable/whats_new)) | dependencies | minor | `1.6.1` → `1.8.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/scikit-learn/scikit-learn/badge)](https://securityscorecards.dev/viewer/?uri=github.com/scikit-learn/scikit-learn) |
| [scipy](https://github.com/scipy/scipy) | dependencies | minor | `1.15.3` → `1.17.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/scipy/scipy/badge)](https://securityscorecards.dev/viewer/?uri=github.com/scipy/scipy) |
| [uvicorn](https://github.com/Kludex/uvicorn) ([changelog](https://uvicorn.dev/release-notes)) | dependencies | minor | `^0.29.0` → `^0.40.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Kludex/uvicorn/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Kludex/uvicorn) |

---

### Release Notes

<details>
<summary>celery/celery (celery)</summary>

### [`v5.6.2`](https://github.com/celery/celery/blob/HEAD/Changelog.rst#562)

[Compare Source](https://github.com/celery/celery/compare/v5.6.1...v5.6.2)

\=====

:release-date: 2026-01-04
:release-by: Tomer Nosrati

What's Changed

```

- Fix recursive WorkController instantiation in DjangoWorkerFixup + AttributeError when pool_cls is a string (#&#8203;10045)
- Bugfix: Revoked tasks now immediately update backend status to REVOKED (#&#8203;9869)
- Prepare for release: v5.6.2 (#&#8203;10049)

.. _version-5.6.1:

5.6.1
=====

:release-date: 2025-12-29
:release-by: Tomer Nosrati

What's Changed
```

- Fix Redis Sentinel ACL authentication support ([#&#8203;10013](https://github.com/celery/celery/issues/10013))
- Fix: Broker heartbeats not sent during graceful shutdown ([#&#8203;9986](https://github.com/celery/celery/issues/9986))
- docs [#&#8203;5410](https://github.com/celery/celery/issues/5410) -- Document confirm\_publish broker transport option ([#&#8203;10016](https://github.com/celery/celery/issues/10016))
- close DB pools only in prefork mode ([#&#8203;10020](https://github.com/celery/celery/issues/10020))
- Fix: Avoid unnecessary Django database connection creation during cleanup ([#&#8203;10015](https://github.com/celery/celery/issues/10015))
- reliable prefork detection ([#&#8203;10023](https://github.com/celery/celery/issues/10023))
- better coverage ([#&#8203;10029](https://github.com/celery/celery/issues/10029))
- Docs: clarify `result_extended` vs periodic task metadata and show `headers["periodic_task_name"]` example ([#&#8203;10030](https://github.com/celery/celery/issues/10030))
- Stop importing pytest\_subtests ([#&#8203;10032](https://github.com/celery/celery/issues/10032))
- Only use exceptiongroup backport for Python < 3.11 ([#&#8203;10033](https://github.com/celery/celery/issues/10033))
- Prepare for release: v5.6.1 ([#&#8203;10037](https://github.com/celery/celery/issues/10037))

.. \_version-5.6.0:

### [`v5.6.1`](https://github.com/celery/celery/releases/tag/v5.6.1)

[Compare Source](https://github.com/celery/celery/compare/v5.6.0...v5.6.1)

#### What's Changed

- Fix Redis Sentinel ACL authentication support by [@&#8203;anthonykuzmich7](https://github.com/anthonykuzmich7) in [#&#8203;10013](https://github.com/celery/celery/pull/10013)
- Fix: Broker heartbeats not sent during graceful shutdown by [@&#8203;weetster](https://github.com/weetster) in [#&#8203;9986](https://github.com/celery/celery/pull/9986)
- docs [#&#8203;5410](https://github.com/celery/celery/issues/5410) -- Document confirm\_publish broker transport option by [@&#8203;JaeHyuckSa](https://github.com/JaeHyuckSa) in [#&#8203;10016](https://github.com/celery/celery/pull/10016)
- close DB pools only in prefork mode by [@&#8203;petrprikryl](https://github.com/petrprikryl) in [#&#8203;10020](https://github.com/celery/celery/pull/10020)
- Fix: Avoid unnecessary Django database connection creation during cleanup by [@&#8203;snopoke](https://github.com/snopoke) in [#&#8203;10015](https://github.com/celery/celery/pull/10015)
- reliable prefork detection by [@&#8203;petrprikryl](https://github.com/petrprikryl) in [#&#8203;10023](https://github.com/celery/celery/pull/10023)
- better coverage by [@&#8203;petrprikryl](https://github.com/petrprikryl) in [#&#8203;10029](https://github.com/celery/celery/pull/10029)
- Docs: clarify `result_extended` vs periodic task metadata and show `headers["periodic_task_name"]` example by [@&#8203;SpaceShaman](https://github.com/SpaceShaman) in [#&#8203;10030](https://github.com/celery/celery/pull/10030)
- Stop importing pytest\_subtests by [@&#8203;cjwatson](https://github.com/cjwatson) in [#&#8203;10032](https://github.com/celery/celery/pull/10032)
- Only use exceptiongroup backport for Python < 3.11 by [@&#8203;cjwatson](https://github.com/cjwatson) in [#&#8203;10033](https://github.com/celery/celery/pull/10033)
- Prepare for release: v5.6.1 by [@&#8203;Nusnus](https://github.com/Nusnus) in [#&#8203;10037](https://github.com/celery/celery/pull/10037)

#### New Contributors

- [@&#8203;anthonykuzmich7](https://github.com/anthonykuzmich7) made their first contribution in [#&#8203;10013](https://github.com/celery/celery/pull/10013)
- [@&#8203;weetster](https://github.com/weetster) made their first contribution in [#&#8203;9986](https://github.com/celery/celery/pull/9986)
- [@&#8203;JaeHyuckSa](https://github.com/JaeHyuckSa) made their first contribution in [#&#8203;10016](https://github.com/celery/celery/pull/10016)
- [@&#8203;snopoke](https://github.com/snopoke) made their first contribution in [#&#8203;10015](https://github.com/celery/celery/pull/10015)
- [@&#8203;SpaceShaman](https://github.com/SpaceShaman) made their first contribution in [#&#8203;10030](https://github.com/celery/celery/pull/10030)

**Full Changelog**: <https://github.com/celery/celery/compare/v5.6.0...v5.6.1>

### [`v5.6.0`](https://github.com/celery/celery/blob/HEAD/Changelog.rst#560)

[Compare Source](https://github.com/celery/celery/compare/v5.5.3...v5.6.0)

\=====

:release-date: 2025-11-30
:release-by: Tomer Nosrati

Celery v5.6.0 is now available.

Key Highlights

```

See :ref:`whatsnew-5.6` for a complete overview or read the main highlights below.

Python 3.9 Minimum Version
--------------------------

Celery 5.6.0 drops support for Python 3.8 (EOL). The minimum required Python
version is now 3.9. Users still on Python 3.8 must upgrade their Python version
before upgrading to Celery 5.6.0.

Additionally, this release includes initial support for Python 3.14.

SQS: Reverted to ``pycurl`` from ``urllib3``
--------------------------------------------

The switch from ``pycurl`` to ``urllib3`` for the SQS transport (introduced in
Celery 5.5.0 via Kombu) has been reverted due to critical issues affecting SQS
users:

- Processing throughput dropped from ~100 tasks/sec to ~3/sec in some environments
- ``UnknownOperationException`` errors causing container crash loops
- Silent message processing failures with no error logs

Users of the SQS transport must ensure ``pycurl`` is installed. If you removed
``pycurl`` after upgrading to Celery 5.5.0, you will need to reinstall it.

Contributed by `@auvipy <https://github.com/auvipy>`_ in
`#&#8203;9620 <https://github.com/celery/celery/pull/9620>`_.

Security Fix: Broker Credential Leak Prevention
------------------------------------------------

Fixed a security issue where broker URLs containing passwords were being logged
in plaintext by the delayed delivery mechanism. Broker credentials are now
properly sanitized in all log output.

Contributed by `@giancarloromeo <https://github.com/giancarloromeo>`_ in
`#&#8203;9997 <https://github.com/celery/celery/pull/9997>`_.

Memory Leak Fixes
-----------------

Two significant memory leaks have been fixed in this release:

**Exception Handling Memory Leak**: Fixed a critical memory leak in task exception
handling that was particularly severe on Python 3.11+ due to enhanced traceback
data. The fix properly breaks reference cycles in tracebacks to allow garbage
collection.

Contributed by `@jaiganeshs21 <https://github.com/jaiganeshs21>`_ in
`#&#8203;9799 <https://github.com/celery/celery/pull/9799>`_.

**Pending Result Memory Leak**: Fixed a memory leak where ``AsyncResult``
subscriptions were not being cleaned up when results were forgotten.

Contributed by `@tsoos99dev <https://github.com/tsoos99dev>`_ in
`#&#8203;9806 <https://github.com/celery/celery/pull/9806>`_.

ETA Task Memory Limit
---------------------

New configuration option :setting:`worker_eta_task_limit` to prevent out-of-memory
crashes when workers fetch large numbers of ETA or countdown tasks. Previously,
workers could exhaust available memory when the broker contained many scheduled tasks.

Example usage:

.. code-block:: python

    app.conf.worker_eta_task_limit = 1000

Contributed by `@sashu2310 <https://github.com/sashu2310>`_ in
`#&#8203;9853 <https://github.com/celery/celery/pull/9853>`_.

Queue Type Selection for Auto-created Queues
--------------------------------------------

New configuration options allow specifying the queue type and exchange type when
Celery auto-creates missing queues. This is particularly useful for RabbitMQ users
who want to use quorum queues with auto-created queues.

Configuration options:

- :setting:`task_create_missing_queue_type`: Sets the queue type for auto-created
  queues (e.g., ``quorum``, ``classic``)
- :setting:`task_create_missing_queue_exchange_type`: Sets the exchange type for
  auto-created queues

Example usage:

.. code-block:: python

    app.conf.task_create_missing_queue_type = 'quorum'

Contributed by `@ghirailghiro <https://github.com/ghirailghiro>`_ in
`#&#8203;9815 <https://github.com/celery/celery/pull/9815>`_.

What's Changed
```

- Prepare for release: v5.6.0 ([#&#8203;10010](https://github.com/celery/celery/issues/10010))

.. \_version-5.6.0rc2:

</details>

<details>
<summary>fastapi/fastapi (fastapi)</summary>

### [`v0.128.0`](https://github.com/fastapi/fastapi/releases/tag/0.128.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.127.1...0.128.0)

##### Breaking Changes

- ➖ Drop support for `pydantic.v1`. MR [#&#8203;14609](https://github.com/fastapi/fastapi/pull/14609) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ✅ Run performance tests only on Pydantic v2. MR [#&#8203;14608](https://github.com/fastapi/fastapi/pull/14608) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.127.1`](https://github.com/fastapi/fastapi/releases/tag/0.127.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.127.0...0.127.1)

##### Refactors

- 🔊 Add a custom `FastAPIDeprecationWarning`. MR [#&#8203;14605](https://github.com/fastapi/fastapi/pull/14605) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- 📝 Add documentary to website. MR [#&#8203;14600](https://github.com/fastapi/fastapi/pull/14600) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🌐 Update translations for de (update-outdated). MR [#&#8203;14602](https://github.com/fastapi/fastapi/pull/14602) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 🌐 Update translations for de (update-outdated). MR [#&#8203;14581](https://github.com/fastapi/fastapi/pull/14581) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- 🔧 Update pre-commit to use local Ruff instead of hook. MR [#&#8203;14604](https://github.com/fastapi/fastapi/pull/14604) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ✅ Add missing tests for code examples. MR [#&#8203;14569](https://github.com/fastapi/fastapi/pull/14569) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 👷 Remove `lint` job from `test` CI workflow. MR [#&#8203;14593](https://github.com/fastapi/fastapi/pull/14593) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 👷 Update secrets check. MR [#&#8203;14592](https://github.com/fastapi/fastapi/pull/14592) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Run CodSpeed tests in parallel to other tests to speed up CI. MR [#&#8203;14586](https://github.com/fastapi/fastapi/pull/14586) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔨 Update scripts and pre-commit to autofix files. MR [#&#8203;14585](https://github.com/fastapi/fastapi/pull/14585) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.127.0`](https://github.com/fastapi/fastapi/releases/tag/0.127.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.126.0...0.127.0)

##### Breaking Changes

- 🔊 Add deprecation warnings when using `pydantic.v1`. MR [#&#8203;14583](https://github.com/fastapi/fastapi/pull/14583) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🔧 Add LLM prompt file for Korean, generated from the existing translations. MR [#&#8203;14546](https://github.com/fastapi/fastapi/pull/14546) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔧 Add LLM prompt file for Japanese, generated from the existing translations. MR [#&#8203;14545](https://github.com/fastapi/fastapi/pull/14545) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ⬆️ Upgrade OpenAI model for translations to gpt-5.2. MR [#&#8203;14579](https://github.com/fastapi/fastapi/pull/14579) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.126.0`](https://github.com/fastapi/fastapi/releases/tag/0.126.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.125.0...0.126.0)

##### Upgrades

- ➖ Drop support for Pydantic v1, keeping short temporary support for Pydantic v2's `pydantic.v1`. MR [#&#8203;14575](https://github.com/fastapi/fastapi/pull/14575) by [@&#8203;tiangolo](https://github.com/tiangolo).
  - The minimum version of Pydantic installed is now `pydantic >=2.7.0`.
  - The `standard` dependencies now include `pydantic-settings >=2.0.0` and `pydantic-extra-types >=2.0.0`.

##### Docs

- 📝 Fix duplicated variable in `docs_src/python_types/tutorial005_py39.py`. MR [#&#8203;14565](https://github.com/fastapi/fastapi/pull/14565) by [@&#8203;paras-verma7454](https://github.com/paras-verma7454).

##### Translations

- 🔧 Add LLM prompt file for Ukrainian, generated from the existing translations. MR [#&#8203;14548](https://github.com/fastapi/fastapi/pull/14548) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- 🔧 Tweak pre-commit to allow committing release-notes. MR [#&#8203;14577](https://github.com/fastapi/fastapi/pull/14577) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆️ Use prek as a pre-commit alternative. MR [#&#8203;14572](https://github.com/fastapi/fastapi/pull/14572) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Add performance tests with CodSpeed. MR [#&#8203;14558](https://github.com/fastapi/fastapi/pull/14558) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.125.0`](https://github.com/fastapi/fastapi/releases/tag/0.125.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.4...0.125.0)

##### Breaking Changes

- 🔧 Drop support for Python 3.8. MR [#&#8203;14563](https://github.com/fastapi/fastapi/pull/14563) by [@&#8203;tiangolo](https://github.com/tiangolo).
  - This would actually not be a *breaking* change as no code would really break. Any Python 3.8 installer would just refuse to install the latest version of FastAPI and would only install 0.124.4. Only marking it as a "breaking change" to make it visible.

##### Refactors

- ♻️ Upgrade internal syntax to Python 3.9+ 🎉. MR [#&#8203;14564](https://github.com/fastapi/fastapi/pull/14564) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- ⚰️ Remove Python 3.8 from CI and remove Python 3.8 examples from source docs. MR [#&#8203;14559](https://github.com/fastapi/fastapi/pull/14559) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov) and [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🌐 Update translations for pt (add-missing). MR [#&#8203;14539](https://github.com/fastapi/fastapi/pull/14539) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔧 Add LLM prompt file for French, generated from the existing French docs. MR [#&#8203;14544](https://github.com/fastapi/fastapi/pull/14544) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Sync Portuguese docs (pages found with script). MR [#&#8203;14554](https://github.com/fastapi/fastapi/pull/14554) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Sync Spanish docs (outdated pages found with script). MR [#&#8203;14553](https://github.com/fastapi/fastapi/pull/14553) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Sync German docs. MR [#&#8203;14519](https://github.com/fastapi/fastapi/pull/14519) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 🔥 Remove inactive/scarce translations to Vietnamese. MR [#&#8203;14543](https://github.com/fastapi/fastapi/pull/14543) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔥 Remove inactive/scarce translations to Persian. MR [#&#8203;14542](https://github.com/fastapi/fastapi/pull/14542) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔥 Remove translation to emoji to simplify the new setup with LLM autotranslations. MR [#&#8203;14541](https://github.com/fastapi/fastapi/pull/14541) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Update translations for pt (update-outdated). MR [#&#8203;14537](https://github.com/fastapi/fastapi/pull/14537) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Update translations for es (update-outdated). MR [#&#8203;14532](https://github.com/fastapi/fastapi/pull/14532) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Update translations for es (add-missing). MR [#&#8203;14533](https://github.com/fastapi/fastapi/pull/14533) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Remove translations for removed docs. MR [#&#8203;14516](https://github.com/fastapi/fastapi/pull/14516) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ⬆ Bump `markdown-include-variants` from 0.0.7 to 0.0.8. MR [#&#8203;14556](https://github.com/fastapi/fastapi/pull/14556) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🔧 Temporarily disable translations still in progress, being migrated to the new LLM setup. MR [#&#8203;14555](https://github.com/fastapi/fastapi/pull/14555) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🔧 Update test workflow config, remove commented code. MR [#&#8203;14540](https://github.com/fastapi/fastapi/pull/14540) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Configure coverage, error on main tests, don't wait for Smokeshow. MR [#&#8203;14536](https://github.com/fastapi/fastapi/pull/14536) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Run Smokeshow always, even on test failures. MR [#&#8203;14538](https://github.com/fastapi/fastapi/pull/14538) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Make Pydantic versions customizable in CI. MR [#&#8203;14535](https://github.com/fastapi/fastapi/pull/14535) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Fix checkout GitHub Action fetch-depth for LLM translations, enable cron monthly. MR [#&#8203;14531](https://github.com/fastapi/fastapi/pull/14531) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Fix Typer command for CI LLM translations. MR [#&#8203;14530](https://github.com/fastapi/fastapi/pull/14530) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Update LLM translation CI, add language matrix and extra commands, prepare for scheduled run. MR [#&#8203;14529](https://github.com/fastapi/fastapi/pull/14529) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Update github-actions user for GitHub Actions workflows. MR [#&#8203;14528](https://github.com/fastapi/fastapi/pull/14528) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ➕ Add requirements for translations. MR [#&#8203;14515](https://github.com/fastapi/fastapi/pull/14515) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.124.4`](https://github.com/fastapi/fastapi/releases/tag/0.124.4)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.3...0.124.4)

##### Fixes

- 🐛 Fix parameter aliases. MR [#&#8203;14371](https://github.com/fastapi/fastapi/pull/14371) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.124.3`](https://github.com/fastapi/fastapi/releases/tag/0.124.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.2...0.124.3)

##### Fixes

- 🐛 Fix support for tagged union with discriminator inside of `Annotated` with `Body()`. MR [#&#8203;14512](https://github.com/fastapi/fastapi/pull/14512) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Refactors

- ✅ Add set of tests for request parameters and alias. MR [#&#8203;14358](https://github.com/fastapi/fastapi/pull/14358) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

##### Docs

- 📝 Tweak links format. MR [#&#8203;14505](https://github.com/fastapi/fastapi/pull/14505) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 📝 Update docs about re-raising validation errors, do not include string as is to not leak information. MR [#&#8203;14487](https://github.com/fastapi/fastapi/pull/14487) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔥 Remove external links section. MR [#&#8203;14486](https://github.com/fastapi/fastapi/pull/14486) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🌐 Sync Russian docs. MR [#&#8203;14509](https://github.com/fastapi/fastapi/pull/14509) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Sync German docs. MR [#&#8203;14488](https://github.com/fastapi/fastapi/pull/14488) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- 👷 Tweak coverage to not pass Smokeshow max file size limit. MR [#&#8203;14507](https://github.com/fastapi/fastapi/pull/14507) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ✅ Expand test matrix to include Windows and MacOS. MR [#&#8203;14171](https://github.com/fastapi/fastapi/pull/14171) by [@&#8203;svlandeg](https://github.com/svlandeg).

### [`v0.124.2`](https://github.com/fastapi/fastapi/releases/tag/0.124.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.1...0.124.2)

##### Fixes

- 🐛 Fix support for `if TYPE_CHECKING`,  non-evaluated stringified annotations. MR [#&#8203;14485](https://github.com/fastapi/fastapi/pull/14485) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.124.1`](https://github.com/fastapi/fastapi/releases/tag/0.124.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.0...0.124.1)

##### Fixes

- 🐛 Fix handling arbitrary types when using `arbitrary_types_allowed=True`. MR [#&#8203;14482](https://github.com/fastapi/fastapi/pull/14482) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- 📝 Add variants for code examples in "Advanced User Guide". MR [#&#8203;14413](https://github.com/fastapi/fastapi/pull/14413) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 📝 Update tech stack in project generation docs. MR [#&#8203;14472](https://github.com/fastapi/fastapi/pull/14472) by [@&#8203;alejsdev](https://github.com/alejsdev).

##### Internal

- ✅ Add test for Pydantic v2, dataclasses, UUID, and `__annotations__`. MR [#&#8203;14477](https://github.com/fastapi/fastapi/pull/14477) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.124.0`](https://github.com/fastapi/fastapi/releases/tag/0.124.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.10...0.124.0)

##### Features

- 🚸  Improve tracebacks by adding endpoint metadata. MR [#&#8203;14306](https://github.com/fastapi/fastapi/pull/14306) by [@&#8203;savannahostrowski](https://github.com/savannahostrowski).

##### Internal

- ✏️ Fix typo in `scripts/mkdocs_hooks.py`. MR [#&#8203;14457](https://github.com/fastapi/fastapi/pull/14457) by [@&#8203;yujiteshima](https://github.com/yujiteshima).

### [`v0.123.10`](https://github.com/fastapi/fastapi/releases/tag/0.123.10)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.9...0.123.10)

##### Fixes

- 🐛 Fix using class (not instance) dependency that has `__call__` method. MR [#&#8203;14458](https://github.com/fastapi/fastapi/pull/14458) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🐛 Fix `separate_input_output_schemas=False` with `computed_field`. MR [#&#8203;14453](https://github.com/fastapi/fastapi/pull/14453) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.123.9`](https://github.com/fastapi/fastapi/releases/tag/0.123.9)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.8...0.123.9)

##### Fixes

- 🐛 Fix OAuth2 scopes in OpenAPI in extra corner cases, parent dependency with scopes, sub-dependency security scheme without scopes. MR [#&#8203;14459](https://github.com/fastapi/fastapi/pull/14459) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.123.8`](https://github.com/fastapi/fastapi/releases/tag/0.123.8)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.7...0.123.8)

##### Fixes

- 🐛 Fix OpenAPI security scheme OAuth2 scopes declaration, deduplicate security schemes with different scopes. MR [#&#8203;14455](https://github.com/fastapi/fastapi/pull/14455) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.123.7`](https://github.com/fastapi/fastapi/releases/tag/0.123.7)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.6...0.123.7)

##### Fixes

- 🐛 Fix evaluating stringified annotations in Python 3.10. MR [#&#8203;11355](https://github.com/fastapi/fastapi/pull/11355) by [@&#8203;chaen](https://github.com/chaen).

### [`v0.123.6`](https://github.com/fastapi/fastapi/releases/tag/0.123.6)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.5...0.123.6)

##### Fixes

- 🐛 Fix support for functools wraps and partial combined, for async and regular functions and classes in path operations and dependencies. MR [#&#8203;14448](https://github.com/fastapi/fastapi/pull/14448) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.123.5`](https://github.com/fastapi/fastapi/releases/tag/0.123.5)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.4...0.123.5)

##### Features

- ✨ Allow using dependables with `functools.partial()`. MR [#&#8203;9753](https://github.com/fastapi/fastapi/pull/9753) by [@&#8203;lieryan](https://github.com/lieryan).
- ✨ Add support for wrapped functions (e.g. `@functools.wraps()`) used with forward references. MR [#&#8203;5077](https://github.com/fastapi/fastapi/pull/5077) by [@&#8203;lucaswiman](https://github.com/lucaswiman).
- ✨ Handle wrapped dependencies. MR [#&#8203;9555](https://github.com/fastapi/fastapi/pull/9555) by [@&#8203;phy1729](https://github.com/phy1729).

##### Fixes

- 🐛 Fix optional sequence handling with new union syntax from Python 3.10. MR [#&#8203;14430](https://github.com/fastapi/fastapi/pull/14430) by [@&#8203;Viicos](https://github.com/Viicos).

##### Refactors

- 🔥 Remove dangling extra condiitonal no longer needed. MR [#&#8203;14435](https://github.com/fastapi/fastapi/pull/14435) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ♻️ Refactor internals, update `is_coroutine` check to reuse internal supported variants (unwrap, check class). MR [#&#8203;14434](https://github.com/fastapi/fastapi/pull/14434) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🌐 Sync German docs. MR [#&#8203;14367](https://github.com/fastapi/fastapi/pull/14367) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

### [`v0.123.4`](https://github.com/fastapi/fastapi/releases/tag/0.123.4)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.3...0.123.4)

##### Fixes

- 🐛 Fix OpenAPI schema support for computed fields when using `separate_input_output_schemas=False`. MR [#&#8203;13207](https://github.com/fastapi/fastapi/pull/13207) by [@&#8203;vgrafe](https://github.com/vgrafe).

##### Docs

- 📝 Fix docstring of `servers` parameter. MR [#&#8203;14405](https://github.com/fastapi/fastapi/pull/14405) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.123.3`](https://github.com/fastapi/fastapi/releases/tag/0.123.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.2...0.123.3)

##### Fixes

- 🐛 Fix Query\Header\Cookie parameter model alias. MR [#&#8203;14360](https://github.com/fastapi/fastapi/pull/14360) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🐛 Fix optional sequence handling in `serialize sequence value` with Pydantic V2. MR [#&#8203;14297](https://github.com/fastapi/fastapi/pull/14297) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.123.2`](https://github.com/fastapi/fastapi/releases/tag/0.123.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.1...0.123.2)

##### Fixes

- 🐛 Fix unformatted `{type_}` in FastAPIError. MR [#&#8203;14416](https://github.com/fastapi/fastapi/pull/14416) by [@&#8203;Just-Helpful](https://github.com/Just-Helpful).
- 🐛 Fix parsing extra non-body parameter list. MR [#&#8203;14356](https://github.com/fastapi/fastapi/pull/14356) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🐛 Fix parsing extra `Form` parameter list. MR [#&#8203;14303](https://github.com/fastapi/fastapi/pull/14303) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🐛 Fix support for form values with empty strings interpreted as missing (`None` if that's the default), for compatibility with HTML forms. MR [#&#8203;13537](https://github.com/fastapi/fastapi/pull/13537) by [@&#8203;MarinPostma](https://github.com/MarinPostma).

##### Docs

- 📝 Add tip on how to install `pip` in case of `No module named pip` error in `virtual-environments.md`. MR [#&#8203;14211](https://github.com/fastapi/fastapi/pull/14211) by [@&#8203;zadevhub](https://github.com/zadevhub).
- 📝 Update Primary Key notes for the SQL databases tutorial to avoid confusion. MR [#&#8203;14120](https://github.com/fastapi/fastapi/pull/14120) by [@&#8203;FlaviusRaducu](https://github.com/FlaviusRaducu).
- 📝 Clarify estimation note in documentation. MR [#&#8203;14070](https://github.com/fastapi/fastapi/pull/14070) by [@&#8203;SaisakthiM](https://github.com/SaisakthiM).

### [`v0.123.1`](https://github.com/fastapi/fastapi/releases/tag/0.123.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.0...0.123.1)

##### Fixes

- 🐛 Avoid accessing non-existing "$ref" key for Pydantic v2 compat remapping. MR [#&#8203;14361](https://github.com/fastapi/fastapi/pull/14361) by [@&#8203;svlandeg](https://github.com/svlandeg).
- 🐛 Fix `TypeError` when encoding a decimal with a `NaN` or `Infinity` value. MR [#&#8203;12935](https://github.com/fastapi/fastapi/pull/12935) by [@&#8203;kentwelcome](https://github.com/kentwelcome).

##### Internal

- 🐛 Fix Windows UnicodeEncodeError in CLI test. MR [#&#8203;14295](https://github.com/fastapi/fastapi/pull/14295) by [@&#8203;hemanth-thirthahalli](https://github.com/hemanth-thirthahalli).
- 🔧 Update sponsors: add Greptile. MR [#&#8203;14429](https://github.com/fastapi/fastapi/pull/14429) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI GitHub topic repositories. MR [#&#8203;14426](https://github.com/fastapi/fastapi/pull/14426) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump markdown-include-variants from 0.0.6 to 0.0.7. MR [#&#8203;14423](https://github.com/fastapi/fastapi/pull/14423) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 👥 Update FastAPI People - Sponsors. MR [#&#8203;14422](https://github.com/fastapi/fastapi/pull/14422) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI People - Contributors and Translators. MR [#&#8203;14420](https://github.com/fastapi/fastapi/pull/14420) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.123.0`](https://github.com/fastapi/fastapi/releases/tag/0.123.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.122.1...0.123.0)

##### Fixes

- 🐛 Cache dependencies that don't use scopes and don't have sub-dependencies with scopes. MR [#&#8203;14419](https://github.com/fastapi/fastapi/pull/14419) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.122.1`](https://github.com/fastapi/fastapi/releases/tag/0.122.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.122.0...0.122.1)

##### Fixes

- 🐛 Fix hierarchical security scope propagation. MR [#&#8203;5624](https://github.com/fastapi/fastapi/pull/5624) by [@&#8203;kristjanvalur](https://github.com/kristjanvalur).

##### Docs

- 💅 Update CSS to explicitly use emoji font. MR [#&#8203;14415](https://github.com/fastapi/fastapi/pull/14415) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ⬆ Bump markdown-include-variants from 0.0.5 to 0.0.6. MR [#&#8203;14418](https://github.com/fastapi/fastapi/pull/14418) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.122.0`](https://github.com/fastapi/fastapi/releases/tag/0.122.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.121.3...0.122.0)

##### Fixes

- 🐛 Use `401` status code in security classes when credentials are missing. MR [#&#8203;13786](https://github.com/fastapi/fastapi/pull/13786) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
  - If your code depended on these classes raising the old (less correct) `403` status code, check the new docs about how to override the classes, to use the same old behavior: [Use Old 403 Authentication Error Status Codes](https://fastapi.tiangolo.com/how-to/authentication-error-status-code/).

##### Internal

- 🔧 Configure labeler to exclude files that start from underscore for `lang-all` label. MR [#&#8203;14213](https://github.com/fastapi/fastapi/pull/14213) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 👷 Add pre-commit config with local script for permalinks. MR [#&#8203;14398](https://github.com/fastapi/fastapi/pull/14398) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 💄 Use font Fira Code to fix display of Rich panels in docs in Windows. MR [#&#8203;14387](https://github.com/fastapi/fastapi/pull/14387) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Add custom pre-commit CI. MR [#&#8203;14397](https://github.com/fastapi/fastapi/pull/14397) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump actions/checkout from 5 to 6. MR [#&#8203;14381](https://github.com/fastapi/fastapi/pull/14381) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- 👷 Upgrade `latest-changes` GitHub Action and pin `actions/checkout@v5`. MR [#&#8203;14403](https://github.com/fastapi/fastapi/pull/14403) by [@&#8203;svlandeg](https://github.com/svlandeg).
- 🛠️ Add `add-permalinks` and `add-permalinks-page` to `scripts/docs.py`. MR [#&#8203;14033](https://github.com/fastapi/fastapi/pull/14033) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🔧 Upgrade Material for MkDocs and remove insiders. MR [#&#8203;14375](https://github.com/fastapi/fastapi/pull/14375) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.121.3`](https://github.com/fastapi/fastapi/releases/tag/0.121.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.121.2...0.121.3)

##### 0.121.3

##### Refactors

- ♻️ Make the result of `Depends()` and `Security()` hashable, as a workaround for other tools interacting with these internal parts. MR [#&#8203;14372](https://github.com/fastapi/fastapi/pull/14372) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Upgrades

- ⬆️ Bump Starlette to <`0.51.0`. MR [#&#8203;14282](https://github.com/fastapi/fastapi/pull/14282) by [@&#8203;musicinmybrain](https://github.com/musicinmybrain).

##### Docs

- 📝 Add missing hash part. MR [#&#8203;14369](https://github.com/fastapi/fastapi/pull/14369) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 📝 Fix typos in code comments. MR [#&#8203;14364](https://github.com/fastapi/fastapi/pull/14364) by [@&#8203;Edge-Seven](https://github.com/Edge-Seven).
- 📝 Add docs for using FastAPI Cloud. MR [#&#8203;14359](https://github.com/fastapi/fastapi/pull/14359) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.121.2`](https://github.com/fastapi/fastapi/releases/tag/0.121.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.121.1...0.121.2)

##### Fixes

- 🐛 Fix handling of JSON Schema attributes named "$ref". MR [#&#8203;14349](https://github.com/fastapi/fastapi/pull/14349) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- 📝 Add EuroPython talk & podcast episode with Sebastián Ramírez. MR [#&#8203;14260](https://github.com/fastapi/fastapi/pull/14260) by [@&#8203;clytaemnestra](https://github.com/clytaemnestra).
- ✏️ Fix links and add missing permalink in docs. MR [#&#8203;14217](https://github.com/fastapi/fastapi/pull/14217) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

##### Translations

- 🌐 Update Portuguese translations with LLM prompt. MR [#&#8203;14228](https://github.com/fastapi/fastapi/pull/14228) by [@&#8203;ceb10n](https://github.com/ceb10n).
- 🔨 Add Portuguese translations LLM prompt. MR [#&#8203;14208](https://github.com/fastapi/fastapi/pull/14208) by [@&#8203;ceb10n](https://github.com/ceb10n).
- 🌐 Sync Russian docs. MR [#&#8203;14331](https://github.com/fastapi/fastapi/pull/14331) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Sync German docs. MR [#&#8203;14317](https://github.com/fastapi/fastapi/pull/14317) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

### [`v0.121.1`](https://github.com/fastapi/fastapi/releases/tag/0.121.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.121.0...0.121.1)

##### Fixes

- 🐛 Fix `Depends(func, scope='function')` for top level (parameterless) dependencies. MR [#&#8203;14301](https://github.com/fastapi/fastapi/pull/14301) by [@&#8203;luzzodev](https://github.com/luzzodev).

##### Docs

- 📝 Upate docs for advanced dependencies with `yield`, noting the changes in 0.121.0, adding `scope`. MR [#&#8203;14287](https://github.com/fastapi/fastapi/pull/14287) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ⬆ Bump ruff from 0.13.2 to 0.14.3. MR [#&#8203;14276](https://github.com/fastapi/fastapi/pull/14276) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14289](https://github.com/fastapi/fastapi/pull/14289) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).

### [`v0.121.0`](https://github.com/fastapi/fastapi/releases/tag/0.121.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.4...0.121.0)

##### Features

- ✨ Add support for dependencies with scopes, support `scope="request"` for dependencies with `yield` that exit before the response is sent. MR [#&#8203;14262](https://github.com/fastapi/fastapi/pull/14262) by [@&#8203;tiangolo](https://github.com/tiangolo).
  - New docs: [Dependencies with `yield` - Early exit and `scope`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#early-exit-and-scope).

##### Internal

- 👥 Update FastAPI People - Contributors and Translators. MR [#&#8203;14273](https://github.com/fastapi/fastapi/pull/14273) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI People - Sponsors. MR [#&#8203;14274](https://github.com/fastapi/fastapi/pull/14274) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI GitHub topic repositories. MR [#&#8203;14280](https://github.com/fastapi/fastapi/pull/14280) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump mkdocs-macros-plugin from 1.4.0 to 1.4.1. MR [#&#8203;14277](https://github.com/fastapi/fastapi/pull/14277) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump mkdocstrings\[python] from 0.26.1 to 0.30.1. MR [#&#8203;14279](https://github.com/fastapi/fastapi/pull/14279) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).

### [`v0.120.4`](https://github.com/fastapi/fastapi/releases/tag/0.120.4)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.3...0.120.4)

##### Fixes

- 🐛 Fix security schemes in OpenAPI when added at the top level app. MR [#&#8203;14266](https://github.com/fastapi/fastapi/pull/14266) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.120.3`](https://github.com/fastapi/fastapi/releases/tag/0.120.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.2...0.120.3)

##### Refactors

- ♻️ Reduce internal cyclic recursion in dependencies, from 2 functions calling each other to 1 calling itself. MR [#&#8203;14256](https://github.com/fastapi/fastapi/pull/14256) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ♻️ Refactor internals of dependencies, simplify code and remove `get_param_sub_dependant`. MR [#&#8203;14255](https://github.com/fastapi/fastapi/pull/14255) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ♻️ Refactor internals of dependencies, simplify using dataclasses. MR [#&#8203;14254](https://github.com/fastapi/fastapi/pull/14254) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- 📝 Update note for untranslated pages. MR [#&#8203;14257](https://github.com/fastapi/fastapi/pull/14257) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.120.2`](https://github.com/fastapi/fastapi/releases/tag/0.120.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.1...0.120.2)

##### Fixes

- 🐛 Fix separation of schemas with nested models introduced in 0.119.0. MR [#&#8203;14246](https://github.com/fastapi/fastapi/pull/14246) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- 🔧 Add sponsor: SerpApi. MR [#&#8203;14248](https://github.com/fastapi/fastapi/pull/14248) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump actions/download-artifact from 5 to 6. MR [#&#8203;14236](https://github.com/fastapi/fastapi/pull/14236) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14237](https://github.com/fastapi/fastapi/pull/14237) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).
- ⬆ Bump actions/upload-artifact from 4 to 5. MR [#&#8203;14235](https://github.com/fastapi/fastapi/pull/14235) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).

### [`v0.120.1`](https://github.com/fastapi/fastapi/releases/tag/0.120.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.0...0.120.1)

##### Upgrades

- ⬆️ Bump Starlette to <`0.50.0`. MR [#&#8203;14234](https://github.com/fastapi/fastapi/pull/14234) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

##### Internal

- 🔧 Add `license` and `license-files` to `pyproject.toml`, remove `License` from `classifiers`. MR [#&#8203;14230](https://github.com/fastapi/fastapi/pull/14230) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.120.0`](https://github.com/fastapi/fastapi/releases/tag/0.120.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.119.1...0.120.0)

There are no major nor breaking changes in this release. ☕️

The internal reference documentation now uses `annotated_doc.Doc` instead of `typing_extensions.Doc`, this adds a new (very small) dependency on [`annotated-doc`](https://github.com/fastapi/annotated-doc), a package made just to provide that `Doc` documentation utility class.

I would expect `typing_extensions.Doc` to be deprecated and then removed at some point from `typing_extensions`, for that reason there's the new `annotated-doc` micro-package. If you are curious about this, you can read more in the repo for [`annotated-doc`](https://github.com/fastapi/annotated-doc).

This new version `0.120.0` only contains that transition to the new home package for that utility class `Doc`.

##### Translations

- 🌐 Sync German docs. MR [#&#8203;14188](https://github.com/fastapi/fastapi/pull/14188) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- ➕ Migrate internal reference documentation from `typing_extensions.Doc` to `annotated_doc.Doc`. MR [#&#8203;14222](https://github.com/fastapi/fastapi/pull/14222) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🛠️ Update German LLM prompt and test file. MR [#&#8203;14189](https://github.com/fastapi/fastapi/pull/14189) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14181](https://github.com/fastapi/fastapi/pull/14181) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).

### [`v0.119.1`](https://github.com/fastapi/fastapi/releases/tag/0.119.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.119.0...0.119.1)

##### Fixes

- 🐛 Fix internal Pydantic v1 compatibility (warnings) for Python 3.14 and Pydantic 2.12.1. MR [#&#8203;14186](https://github.com/fastapi/fastapi/pull/14186) by [@&#8203;svlandeg](https://github.com/svlandeg).

##### Docs

- 📝 Replace `starlette.io` by `starlette.dev` and `uvicorn.org` by `uvicorn.dev`. MR [#&#8203;14176](https://github.com/fastapi/fastapi/pull/14176) by [@&#8203;Kludex](https://github.com/Kludex).

##### Internal

- 🔧 Add sponsor Requestly. MR [#&#8203;14205](https://github.com/fastapi/fastapi/pull/14205) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔧 Configure reminder for `waiting` label in `issue-manager`. MR [#&#8203;14156](https://github.com/fastapi/fastapi/pull/14156) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.119.0`](https://github.com/fastapi/fastapi/releases/tag/0.119.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.118.3...0.119.0)

FastAPI now (temporarily) supports both Pydantic v2 models and `pydantic.v1` models at the same time in the same app, to make it easier for any FastAPI apps still using Pydantic v1 to gradually but quickly **migrate to Pydantic v2**.

```Python
from fastapi import FastAPI
from pydantic import BaseModel as BaseModelV2
from pydantic.v1 import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

class ItemV2(BaseModelV2):
    title: str
    summary: str | None = None

app = FastAPI()

@&#8203;app.post("/items/", response_model=ItemV2)
def create_item(item: Item):
    return {"title": item.name, "summary": item.description}
```

Adding this feature was a big effort with the main objective of making it easier for the few applications still stuck in Pydantic v1 to migrate to Pydantic v2.

And with this, support for **Pydantic v1 is now deprecated** and will be **removed** from FastAPI in a future version soon.

**Note**: have in mind that the Pydantic team already stopped supporting Pydantic v1 for recent versions of Python, starting with Python 3.14.

You can read in the docs more about how to [Migrate from Pydantic v1 to Pydantic v2](https://fastapi.tiangolo.com/how-to/migrate-from-pydantic-v1-to-pydantic-v2/).

##### Features

- ✨ Add support for `from pydantic.v1 import BaseModel`, mixed Pydantic v1 and v2 models in the same app. MR [#&#8203;14168](https://github.com/fastapi/fastapi/pull/14168) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.118.3`](https://github.com/fastapi/fastapi/releases/tag/0.118.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.118.2...0.118.3)

##### Upgrades

- ⬆️ Add support for Python 3.14. MR [#&#8203;14165](https://github.com/fastapi/fastapi/pull/14165) by [@&#8203;svlandeg](https://github.com/svlandeg).

### [`v0.118.2`](https://github.com/fastapi/fastapi/releases/tag/0.118.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.118.1...0.118.2)

##### Fixes

- 🐛 Fix tagged discriminated union not recognized as body field. MR [#&#8203;12942](https://github.com/fastapi/fastapi/pull/12942) by [@&#8203;frankie567](https://github.com/frankie567).

##### Internal

- ⬆ Bump astral-sh/setup-uv from 6 to 7. MR [#&#8203;14167](https://github.com/fastapi/fastapi/pull/14167) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).

### [`v0.118.1`](https://github.com/fastapi/fastapi/releases/tag/0.118.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.118.0...0.118.1)

##### Upgrades

- 👽️ Ensure compatibility with Pydantic 2.12.0. MR [#&#8203;14036](https://github.com/fastapi/fastapi/pull/14036) by [@&#8203;cjwatson](https://github.com/cjwatson).

##### Docs

- 📝 Add External Link: Getting started with logging in FastAPI. MR [#&#8203;14152](https://github.com/fastapi/fastapi/pull/14152) by [@&#8203;itssimon](https://github.com/itssimon).

##### Translations

- 🔨 Add Russian translations LLM prompt. MR [#&#8203;13936](https://github.com/fastapi/fastapi/pull/13936) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Sync German docs. MR [#&#8203;14149](https://github.com/fastapi/fastapi/pull/14149) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 🌐 Add Russian translations for missing pages (LLM-generated). MR [#&#8203;14135](https://github.com/fastapi/fastapi/pull/14135) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Update Russian translations for existing pages (LLM-generated). MR [#&#8203;14123](https://github.com/fastapi/fastapi/pull/14123) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Remove configuration files for inactive translations. MR [#&#8203;14130](https://github.com/fastapi/fastapi/pull/14130) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- 🔨 Move local coverage logic to its own script. MR [#&#8203;14166](https://github.com/fastapi/fastapi/pull/14166) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14161](https://github.com/fastapi/fastapi/pull/14161) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).
- ⬆ Bump griffe-typingdoc from 0.2.8 to 0.2.9. MR [#&#8203;14144](https://github.com/fastapi/fastapi/pull/14144) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump mkdocs-macros-plugin from 1.3.9 to 1.4.0. MR [#&#8203;14145](https://github.com/fastapi/fastapi/pull/14145) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump markdown-include-variants from 0.0.4 to 0.0.5. MR [#&#8203;14146](https://github.com/fastapi/fastapi/pull/14146) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14126](https://github.com/fastapi/fastapi/pull/14126) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).
- 👥 Update FastAPI GitHub topic repositories. MR [#&#8203;14150](https://github.com/fastapi/fastapi/pull/14150) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI People - Sponsors. MR [#&#8203;14139](https://github.com/fastapi/fastapi/pull/14139) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI People - Contributors and Translators. MR [#&#8203;14138](https://github.com/fastapi/fastapi/pull/14138) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump ruff from 0.12.7 to 0.13.2. MR [#&#8203;14147](https://github.com/fastapi/fastapi/pull/14147) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump sqlmodel from 0.0.24 to 0.0.25. MR [#&#8203;14143](https://github.com/fastapi/fastapi/pull/14143) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump tiangolo/issue-manager from 0.5.1 to 0.6.0. MR [#&#8203;14148](https://github.com/fastapi/fastapi/pull/14148) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- 👷 Update docs previews comment, single comment, add failure status. MR [#&#8203;14129](https://github.com/fastapi/fastapi/pull/14129) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔨 Modify `mkdocs_hooks.py` to add `title` to page's metadata (remove permalinks in social cards). MR [#&#8203;14125](https://github.com/fastapi/fastapi/pull/14125) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.118.0`](https://github.com/fastapi/fastapi/releases/tag/0.118.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.117.1...0.118.0)

##### 0.118.0

##### Fixes

- 🐛 Fix support for `StreamingResponse`s with dependencies with `yield` or `UploadFile`s, close after the response is done. MR [#&#8203;14099](https://github.com/fastapi/fastapi/pull/14099) by [@&#8203;tiangolo](https://github.com/tiangolo).

Before FastAPI 0.118.0, if you used a dependency with `yield`, it would run the exit code after the *path operation function* returned but right before sending the response.

This change also meant that if you returned a `StreamingResponse`, the exit code of the dependency with `yield` would have been already run.

For example, if you had a database session in a dependency with `yield`, the `StreamingResponse` would not be able to use that session while streaming data because the session would have already been closed in the exit code after `yield`.

This behavior was reverted in 0.118.0, to make the exit code after `yield` be executed after the response is sent.

You can read more about it in the docs for [Advanced Dependencies - Dependencies with `yield`, `HTTPException`, `except` and Background Tasks](https://fastapi.tiangolo.com/advanced/advanced-dependencies#dependencies-with-yield-httpexception-except-and-background-tasks). Including what you could do if you wanted to close a database session earlier, before returning the response to the client.

##### Docs

- 📝 Update `tutorial/security/oauth2-jwt/` to use `pwdlib` with Argon2 instead of `passlib`. MR [#&#8203;13917](https://github.com/fastapi/fastapi/pull/13917) by [@&#8203;Neizvestnyj](https://github.com/Neizvestnyj).
- ✏️ Fix typos in OAuth2 password request forms. MR [#&#8203;14112](https://github.com/fastapi/fastapi/pull/14112) by [@&#8203;alv2017](https://github.com/alv2017).
- 📝 Update contributing guidelines for installing requirements. MR [#&#8203;14095](https://github.com/fastapi/fastapi/pull/14095) by [@&#8203;alejsdev](https://github.com/alejsdev).

##### Translations

- 🌐 Sync German docs. MR [#&#8203;14098](https://github.com/fastapi/fastapi/pull/14098) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14103](https://github.com/fastapi/fastapi/pull/14103) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).
- ♻️ Refactor sponsor image handling. MR [#&#8203;14102](https://github.com/fastapi/fastapi/pull/14102) by [@&#8203;alejsdev](https://github.com/alejsdev).
- 🐛 Fix sponsor display issue by hiding element on image error. MR [#&#8203;14097](https://github.com/fastapi/fastapi/pull/14097) by [@&#8203;alejsdev](https://github.com/alejsdev).
- 🐛 Hide sponsor badge when sponsor image is not displayed. MR [#&#8203;14096](https://github.com/fastapi/fastapi/pull/14096) by [@&#8203;alejsdev](https://github.com/alejsdev).

### [`v0.117.1`](https://github.com/fastapi/fastapi/releases/tag/0.117.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.117.0...0.117.1)

##### Fixes

- 🐛 Fix validation error when `File` is declared after `Form` parameter. MR [#&#8203;11194](https://github.com/fastapi/fastapi/pull/11194) by [@&#8203;thomasleveil](https://github.com/thomasleveil).

### [`v0.117.0`](https://github.com/fastapi/fastapi/releases/tag/0.117.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.116.2...0.117.0)

##### Features

- ✨  Allow `None` as return type for bodiless responses. MR [#&#8203;9425](https://github.com/fastapi/fastapi/pull/9425) by [@&#8203;hofrob](https://github.com/hofrob).
- ✨ Allow array values for OpenAPI schema `type` field. MR [#&#8203;13639](https://github.com/fastapi/fastapi/pull/13639) by [@&#8203;sammasak](https://github.com/sammasak).
- ✨ Add OpenAPI `external_docs` parameter to `FastAPI`. MR [#&#8203;13713](https://github.com/fastapi/fastapi/pull/13713) by [@&#8203;cmtoro](https://github.com/cmtoro).

##### Fixes

- ⚡️ Fix `default_factory` for response model field with Pydantic V1. MR [#&#8203;9704](https://github.com/fastapi/fastapi/pull/9704) by [@&#8203;vvanglro](https://github.com/vvanglro).
- 🐛 Fix inconsistent processing of model docstring formfeed char with Pydantic V1. MR [#&#8203;6039](https://github.com/fastapi/fastapi/pull/6039) by [@&#8203;MaxwellPayne](https://github.com/MaxwellPayne).
- 🐛 Fix `jsonable_encoder` alters `json_encoders` of Pydantic v1 objects. MR [#&#8203;4972](https://github.com/fastapi/fastapi/pull/4972) by [@&#8203;aboubacs](https://github.com/aboubacs).
- 🐛 Reenable `allow_arbitrary_types` when only 1 argument is used on the API endpoint. MR [#&#8203;13694](https://github.com/fastapi/fastapi/pull/13694) by [@&#8203;rmawatson](https://github.com/rmawatson).
- 🐛 Fix `inspect.getcoroutinefunction()` can break testing with `unittest.mock.patch()`. MR [#&#8203;14022](https://github.com/fastapi/fastapi/pull/14022) by [@&#8203;secrett2633](https://github.com/secrett2633).

##### Refactors

- ♻️ Create `dependency-cache` dict in `solve_dependencies` only if `None` (don't re-create if empty). MR [#&#8203;13689](https://github.com/fastapi/fastapi/pull/13689) by [@&#8203;bokshitsky](https://github.com/bokshitsky).
- ✅ Enable test case for duplicated headers in `test_tutorial/test_header_params/test_tutorial003.py`. MR [#&#8203;13864](https://github.com/fastapi/fastapi/pull/13864) by [@&#8203;Amogha-ark](https://github.com/Amogha-ark).
- 📌 Pin `httpx` to `>=0.23.0,<1.0.0`. MR [#&#8203;14086](https://github.com/fastapi/fastapi/pull/14086) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

##### Docs

- 📝 Add note about Cookies and JavaScript on `tutorial/cookie-params.md`. MR [#&#8203;13510](https://github.com/fastapi/fastapi/pull/13510) by [@&#8203;Kludex](https://github.com/Kludex).
- 📝 Remove outdated formatting from `path-params-numeric-validations.md` for languages `en`, `es` and `uk`.. MR [#&#8203;14059](https://github.com/fastapi/fastapi/pull/14059) by [@&#8203;svlandeg](https://github.com/svlandeg).
- 📝 Fix and Improve English Documentation. MR [#&#8203;14048](https://github.com/fastapi/fastapi/pull/14048) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Translations

- 📝 Update prompts and German translation. MR [#&#8203;14015](https://github.com/fastapi/fastapi/pull/14015) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- ✅ Simplify tests for response\_model. MR [#&#8203;14062](https://github.com/fastapi/fastapi/pull/14062) by [@&#8203;dynamicy](https://github.com/dynamicy).
- 🚨 Install pydantic.mypy plugin. MR [#&#8203;14081](https://github.com/fastapi/fastapi/pull/14081) by [@&#8203;svlandeg](https://github.com/svlandeg).
- ✅ Add LLM test file. MR [#&#8203;14049](https://github.com/fastapi/fastapi/pull/14049) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 🔨 Update translations script. MR [#&#8203;13968](https://github.com/fastapi/fastapi/pull/13968) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🛠️ Update `docs.py generate-readme` command to remove permalinks from headers. MR [#&#8203;14055](https://github.com/fastapi/fastapi/pull/14055) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- ⬆️ Update mypy to 1.14.1. MR [#&#8203;12970](https://github.com/fastapi/fastapi/pull/12970) by [@&#8203;tamird](https://github.com/tamird).

### [`v0.116.2`](https://github.com/fastapi/fastapi/releases/tag/0.116.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.116.1...0.116.2)

##### Upgrades

- ⬆️ Upgrade Starlette supported version range to >=0.40.0,<0.49.0. MR [#&#8203;14077](https://github.com/fastapi/fastapi/pull/14077) by [@&#8203;musicinmybrain](https://github.com/musicinmybrain).

##### Docs

- 📝 Add documentation for Behind a Proxy - Proxy Forwarded Headers, using `--forwarded-allow-ips="*"`. MR [#&#8203;14028](https://github.com/fastapi/fastapi/pull/14028) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 📝 Add deprecation info block about `dict()` in `docs/tutorial/body.md`. MR [#&#8203;13906](https://github.com/fastapi/fastapi/pull/13906) by [@&#8203;jomkv](https://github.com/jomkv).
- 📝 Fix Twitter to be X (Twitter) everywhere in documentation. MR [#&#8203;13809](https://gith…
736-c41-2c1-e464fc974 added a commit to Swiss-Armed-Forces/Loom that referenced this pull request Jan 14, 2026
fix(deps): update backend dependencies (minor) (minor)

This MR contains the following updates:

| Package | Type | Update | Change | OpenSSF |
|---|---|---|---|---|
| [celery](https://docs.celeryq.dev/) ([source](https://github.com/celery/celery), [changelog](https://docs.celeryq.dev/en/stable/changelog.html)) | dependencies | minor | `5.5.3` → `5.6.2` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/celery/celery/badge)](https://securityscorecards.dev/viewer/?uri=github.com/celery/celery) |
| [celery-types](https://github.com/sbdchd/celery-types) | dependencies | minor | `^0.22.0` → `^0.24.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/sbdchd/celery-types/badge)](https://securityscorecards.dev/viewer/?uri=github.com/sbdchd/celery-types) |
| [fastapi](https://github.com/fastapi/fastapi) ([changelog](https://fastapi.tiangolo.com/release-notes/)) | dependencies | minor | `^0.115.12` → `^0.128.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/fastapi/fastapi/badge)](https://securityscorecards.dev/viewer/?uri=github.com/fastapi/fastapi) |
| [filelock](https://github.com/tox-dev/py-filelock) | dependencies | minor | `3.14.0` → `3.20.3` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/tox-dev/py-filelock/badge)](https://securityscorecards.dev/viewer/?uri=github.com/tox-dev/py-filelock) |
| [luqum](https://github.com/jurismarches/luqum) | dependencies | minor | `^0.13.0` → `^0.14.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/jurismarches/luqum/badge)](https://securityscorecards.dev/viewer/?uri=github.com/jurismarches/luqum) |
| [ollama](https://github.com/ollama/ollama-python) | dependencies | minor | `^0.5.1` → `^0.6.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ollama/ollama-python/badge)](https://securityscorecards.dev/viewer/?uri=github.com/ollama/ollama-python) |
| [pycryptodome](https://www.pycryptodome.org) ([source](https://github.com/Legrandin/pycryptodome), [changelog](https://www.pycryptodome.org/src/changelog)) | dependencies | minor | `3.20.0` → `3.23.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Legrandin/pycryptodome/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Legrandin/pycryptodome) |
| [pydantic-mongo](https://github.com/jefersondaniel/pydantic-mongo) | dependencies | minor | `2.3.0` → `2.4.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/jefersondaniel/pydantic-mongo/badge)](https://securityscorecards.dev/viewer/?uri=github.com/jefersondaniel/pydantic-mongo) |
| [pydantic-settings](https://github.com/pydantic/pydantic-settings) ([changelog](https://github.com/pydantic/pydantic-settings/releases)) | dependencies | minor | `2.2.1` → `2.12.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/pydantic/pydantic-settings/badge)](https://securityscorecards.dev/viewer/?uri=github.com/pydantic/pydantic-settings) |
| [pymongo](https://github.com/mongodb/mongo-python-driver) | dependencies | minor | `4.15.5` → `4.16.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/mongodb/mongo-python-driver/badge)](https://securityscorecards.dev/viewer/?uri=github.com/mongodb/mongo-python-driver) |
| [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) ([changelog](https://pytest-asyncio.readthedocs.io/en/latest/reference/changelog.html)) | dependencies | minor | `^0.23.6` → `^0.26.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/pytest-dev/pytest-asyncio/badge)](https://securityscorecards.dev/viewer/?uri=github.com/pytest-dev/pytest-asyncio) |
| [pytest-timeout](https://github.com/pytest-dev/pytest-timeout) | dependencies | minor | `2.3.1` → `2.4.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/pytest-dev/pytest-timeout/badge)](https://securityscorecards.dev/viewer/?uri=github.com/pytest-dev/pytest-timeout) |
| [scikit-learn](https://github.com/scikit-learn/scikit-learn) ([changelog](https://scikit-learn.org/stable/whats_new)) | dependencies | minor | `1.7.0` → `1.8.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/scikit-learn/scikit-learn/badge)](https://securityscorecards.dev/viewer/?uri=github.com/scikit-learn/scikit-learn) |
| [scikit-learn](https://github.com/scikit-learn/scikit-learn) ([changelog](https://scikit-learn.org/stable/whats_new)) | dependencies | minor | `1.6.1` → `1.8.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/scikit-learn/scikit-learn/badge)](https://securityscorecards.dev/viewer/?uri=github.com/scikit-learn/scikit-learn) |
| [scipy](https://github.com/scipy/scipy) | dependencies | minor | `1.15.3` → `1.17.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/scipy/scipy/badge)](https://securityscorecards.dev/viewer/?uri=github.com/scipy/scipy) |
| [uvicorn](https://github.com/Kludex/uvicorn) ([changelog](https://uvicorn.dev/release-notes)) | dependencies | minor | `^0.29.0` → `^0.40.0` | [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/Kludex/uvicorn/badge)](https://securityscorecards.dev/viewer/?uri=github.com/Kludex/uvicorn) |

---

### Release Notes

<details>
<summary>celery/celery (celery)</summary>

### [`v5.6.2`](https://github.com/celery/celery/blob/HEAD/Changelog.rst#562)

[Compare Source](https://github.com/celery/celery/compare/v5.6.1...v5.6.2)

\=====

:release-date: 2026-01-04
:release-by: Tomer Nosrati

What's Changed

```

- Fix recursive WorkController instantiation in DjangoWorkerFixup + AttributeError when pool_cls is a string (#&#8203;10045)
- Bugfix: Revoked tasks now immediately update backend status to REVOKED (#&#8203;9869)
- Prepare for release: v5.6.2 (#&#8203;10049)

.. _version-5.6.1:

5.6.1
=====

:release-date: 2025-12-29
:release-by: Tomer Nosrati

What's Changed
```

- Fix Redis Sentinel ACL authentication support ([#&#8203;10013](https://github.com/celery/celery/issues/10013))
- Fix: Broker heartbeats not sent during graceful shutdown ([#&#8203;9986](https://github.com/celery/celery/issues/9986))
- docs [#&#8203;5410](https://github.com/celery/celery/issues/5410) -- Document confirm\_publish broker transport option ([#&#8203;10016](https://github.com/celery/celery/issues/10016))
- close DB pools only in prefork mode ([#&#8203;10020](https://github.com/celery/celery/issues/10020))
- Fix: Avoid unnecessary Django database connection creation during cleanup ([#&#8203;10015](https://github.com/celery/celery/issues/10015))
- reliable prefork detection ([#&#8203;10023](https://github.com/celery/celery/issues/10023))
- better coverage ([#&#8203;10029](https://github.com/celery/celery/issues/10029))
- Docs: clarify `result_extended` vs periodic task metadata and show `headers["periodic_task_name"]` example ([#&#8203;10030](https://github.com/celery/celery/issues/10030))
- Stop importing pytest\_subtests ([#&#8203;10032](https://github.com/celery/celery/issues/10032))
- Only use exceptiongroup backport for Python < 3.11 ([#&#8203;10033](https://github.com/celery/celery/issues/10033))
- Prepare for release: v5.6.1 ([#&#8203;10037](https://github.com/celery/celery/issues/10037))

.. \_version-5.6.0:

### [`v5.6.1`](https://github.com/celery/celery/releases/tag/v5.6.1)

[Compare Source](https://github.com/celery/celery/compare/v5.6.0...v5.6.1)

#### What's Changed

- Fix Redis Sentinel ACL authentication support by [@&#8203;anthonykuzmich7](https://github.com/anthonykuzmich7) in [#&#8203;10013](https://github.com/celery/celery/pull/10013)
- Fix: Broker heartbeats not sent during graceful shutdown by [@&#8203;weetster](https://github.com/weetster) in [#&#8203;9986](https://github.com/celery/celery/pull/9986)
- docs [#&#8203;5410](https://github.com/celery/celery/issues/5410) -- Document confirm\_publish broker transport option by [@&#8203;JaeHyuckSa](https://github.com/JaeHyuckSa) in [#&#8203;10016](https://github.com/celery/celery/pull/10016)
- close DB pools only in prefork mode by [@&#8203;petrprikryl](https://github.com/petrprikryl) in [#&#8203;10020](https://github.com/celery/celery/pull/10020)
- Fix: Avoid unnecessary Django database connection creation during cleanup by [@&#8203;snopoke](https://github.com/snopoke) in [#&#8203;10015](https://github.com/celery/celery/pull/10015)
- reliable prefork detection by [@&#8203;petrprikryl](https://github.com/petrprikryl) in [#&#8203;10023](https://github.com/celery/celery/pull/10023)
- better coverage by [@&#8203;petrprikryl](https://github.com/petrprikryl) in [#&#8203;10029](https://github.com/celery/celery/pull/10029)
- Docs: clarify `result_extended` vs periodic task metadata and show `headers["periodic_task_name"]` example by [@&#8203;SpaceShaman](https://github.com/SpaceShaman) in [#&#8203;10030](https://github.com/celery/celery/pull/10030)
- Stop importing pytest\_subtests by [@&#8203;cjwatson](https://github.com/cjwatson) in [#&#8203;10032](https://github.com/celery/celery/pull/10032)
- Only use exceptiongroup backport for Python < 3.11 by [@&#8203;cjwatson](https://github.com/cjwatson) in [#&#8203;10033](https://github.com/celery/celery/pull/10033)
- Prepare for release: v5.6.1 by [@&#8203;Nusnus](https://github.com/Nusnus) in [#&#8203;10037](https://github.com/celery/celery/pull/10037)

#### New Contributors

- [@&#8203;anthonykuzmich7](https://github.com/anthonykuzmich7) made their first contribution in [#&#8203;10013](https://github.com/celery/celery/pull/10013)
- [@&#8203;weetster](https://github.com/weetster) made their first contribution in [#&#8203;9986](https://github.com/celery/celery/pull/9986)
- [@&#8203;JaeHyuckSa](https://github.com/JaeHyuckSa) made their first contribution in [#&#8203;10016](https://github.com/celery/celery/pull/10016)
- [@&#8203;snopoke](https://github.com/snopoke) made their first contribution in [#&#8203;10015](https://github.com/celery/celery/pull/10015)
- [@&#8203;SpaceShaman](https://github.com/SpaceShaman) made their first contribution in [#&#8203;10030](https://github.com/celery/celery/pull/10030)

**Full Changelog**: <https://github.com/celery/celery/compare/v5.6.0...v5.6.1>

### [`v5.6.0`](https://github.com/celery/celery/blob/HEAD/Changelog.rst#560)

[Compare Source](https://github.com/celery/celery/compare/v5.5.3...v5.6.0)

\=====

:release-date: 2025-11-30
:release-by: Tomer Nosrati

Celery v5.6.0 is now available.

Key Highlights

```

See :ref:`whatsnew-5.6` for a complete overview or read the main highlights below.

Python 3.9 Minimum Version
--------------------------

Celery 5.6.0 drops support for Python 3.8 (EOL). The minimum required Python
version is now 3.9. Users still on Python 3.8 must upgrade their Python version
before upgrading to Celery 5.6.0.

Additionally, this release includes initial support for Python 3.14.

SQS: Reverted to ``pycurl`` from ``urllib3``
--------------------------------------------

The switch from ``pycurl`` to ``urllib3`` for the SQS transport (introduced in
Celery 5.5.0 via Kombu) has been reverted due to critical issues affecting SQS
users:

- Processing throughput dropped from ~100 tasks/sec to ~3/sec in some environments
- ``UnknownOperationException`` errors causing container crash loops
- Silent message processing failures with no error logs

Users of the SQS transport must ensure ``pycurl`` is installed. If you removed
``pycurl`` after upgrading to Celery 5.5.0, you will need to reinstall it.

Contributed by `@auvipy <https://github.com/auvipy>`_ in
`#&#8203;9620 <https://github.com/celery/celery/pull/9620>`_.

Security Fix: Broker Credential Leak Prevention
------------------------------------------------

Fixed a security issue where broker URLs containing passwords were being logged
in plaintext by the delayed delivery mechanism. Broker credentials are now
properly sanitized in all log output.

Contributed by `@giancarloromeo <https://github.com/giancarloromeo>`_ in
`#&#8203;9997 <https://github.com/celery/celery/pull/9997>`_.

Memory Leak Fixes
-----------------

Two significant memory leaks have been fixed in this release:

**Exception Handling Memory Leak**: Fixed a critical memory leak in task exception
handling that was particularly severe on Python 3.11+ due to enhanced traceback
data. The fix properly breaks reference cycles in tracebacks to allow garbage
collection.

Contributed by `@jaiganeshs21 <https://github.com/jaiganeshs21>`_ in
`#&#8203;9799 <https://github.com/celery/celery/pull/9799>`_.

**Pending Result Memory Leak**: Fixed a memory leak where ``AsyncResult``
subscriptions were not being cleaned up when results were forgotten.

Contributed by `@tsoos99dev <https://github.com/tsoos99dev>`_ in
`#&#8203;9806 <https://github.com/celery/celery/pull/9806>`_.

ETA Task Memory Limit
---------------------

New configuration option :setting:`worker_eta_task_limit` to prevent out-of-memory
crashes when workers fetch large numbers of ETA or countdown tasks. Previously,
workers could exhaust available memory when the broker contained many scheduled tasks.

Example usage:

.. code-block:: python

    app.conf.worker_eta_task_limit = 1000

Contributed by `@sashu2310 <https://github.com/sashu2310>`_ in
`#&#8203;9853 <https://github.com/celery/celery/pull/9853>`_.

Queue Type Selection for Auto-created Queues
--------------------------------------------

New configuration options allow specifying the queue type and exchange type when
Celery auto-creates missing queues. This is particularly useful for RabbitMQ users
who want to use quorum queues with auto-created queues.

Configuration options:

- :setting:`task_create_missing_queue_type`: Sets the queue type for auto-created
  queues (e.g., ``quorum``, ``classic``)
- :setting:`task_create_missing_queue_exchange_type`: Sets the exchange type for
  auto-created queues

Example usage:

.. code-block:: python

    app.conf.task_create_missing_queue_type = 'quorum'

Contributed by `@ghirailghiro <https://github.com/ghirailghiro>`_ in
`#&#8203;9815 <https://github.com/celery/celery/pull/9815>`_.

What's Changed
```

- Prepare for release: v5.6.0 ([#&#8203;10010](https://github.com/celery/celery/issues/10010))

.. \_version-5.6.0rc2:

</details>

<details>
<summary>fastapi/fastapi (fastapi)</summary>

### [`v0.128.0`](https://github.com/fastapi/fastapi/releases/tag/0.128.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.127.1...0.128.0)

##### Breaking Changes

- ➖ Drop support for `pydantic.v1`. MR [#&#8203;14609](https://github.com/fastapi/fastapi/pull/14609) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ✅ Run performance tests only on Pydantic v2. MR [#&#8203;14608](https://github.com/fastapi/fastapi/pull/14608) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.127.1`](https://github.com/fastapi/fastapi/releases/tag/0.127.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.127.0...0.127.1)

##### Refactors

- 🔊 Add a custom `FastAPIDeprecationWarning`. MR [#&#8203;14605](https://github.com/fastapi/fastapi/pull/14605) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- 📝 Add documentary to website. MR [#&#8203;14600](https://github.com/fastapi/fastapi/pull/14600) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🌐 Update translations for de (update-outdated). MR [#&#8203;14602](https://github.com/fastapi/fastapi/pull/14602) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 🌐 Update translations for de (update-outdated). MR [#&#8203;14581](https://github.com/fastapi/fastapi/pull/14581) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- 🔧 Update pre-commit to use local Ruff instead of hook. MR [#&#8203;14604](https://github.com/fastapi/fastapi/pull/14604) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ✅ Add missing tests for code examples. MR [#&#8203;14569](https://github.com/fastapi/fastapi/pull/14569) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 👷 Remove `lint` job from `test` CI workflow. MR [#&#8203;14593](https://github.com/fastapi/fastapi/pull/14593) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 👷 Update secrets check. MR [#&#8203;14592](https://github.com/fastapi/fastapi/pull/14592) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Run CodSpeed tests in parallel to other tests to speed up CI. MR [#&#8203;14586](https://github.com/fastapi/fastapi/pull/14586) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔨 Update scripts and pre-commit to autofix files. MR [#&#8203;14585](https://github.com/fastapi/fastapi/pull/14585) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.127.0`](https://github.com/fastapi/fastapi/releases/tag/0.127.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.126.0...0.127.0)

##### Breaking Changes

- 🔊 Add deprecation warnings when using `pydantic.v1`. MR [#&#8203;14583](https://github.com/fastapi/fastapi/pull/14583) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🔧 Add LLM prompt file for Korean, generated from the existing translations. MR [#&#8203;14546](https://github.com/fastapi/fastapi/pull/14546) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔧 Add LLM prompt file for Japanese, generated from the existing translations. MR [#&#8203;14545](https://github.com/fastapi/fastapi/pull/14545) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ⬆️ Upgrade OpenAI model for translations to gpt-5.2. MR [#&#8203;14579](https://github.com/fastapi/fastapi/pull/14579) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.126.0`](https://github.com/fastapi/fastapi/releases/tag/0.126.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.125.0...0.126.0)

##### Upgrades

- ➖ Drop support for Pydantic v1, keeping short temporary support for Pydantic v2's `pydantic.v1`. MR [#&#8203;14575](https://github.com/fastapi/fastapi/pull/14575) by [@&#8203;tiangolo](https://github.com/tiangolo).
  - The minimum version of Pydantic installed is now `pydantic >=2.7.0`.
  - The `standard` dependencies now include `pydantic-settings >=2.0.0` and `pydantic-extra-types >=2.0.0`.

##### Docs

- 📝 Fix duplicated variable in `docs_src/python_types/tutorial005_py39.py`. MR [#&#8203;14565](https://github.com/fastapi/fastapi/pull/14565) by [@&#8203;paras-verma7454](https://github.com/paras-verma7454).

##### Translations

- 🔧 Add LLM prompt file for Ukrainian, generated from the existing translations. MR [#&#8203;14548](https://github.com/fastapi/fastapi/pull/14548) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- 🔧 Tweak pre-commit to allow committing release-notes. MR [#&#8203;14577](https://github.com/fastapi/fastapi/pull/14577) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆️ Use prek as a pre-commit alternative. MR [#&#8203;14572](https://github.com/fastapi/fastapi/pull/14572) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Add performance tests with CodSpeed. MR [#&#8203;14558](https://github.com/fastapi/fastapi/pull/14558) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.125.0`](https://github.com/fastapi/fastapi/releases/tag/0.125.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.4...0.125.0)

##### Breaking Changes

- 🔧 Drop support for Python 3.8. MR [#&#8203;14563](https://github.com/fastapi/fastapi/pull/14563) by [@&#8203;tiangolo](https://github.com/tiangolo).
  - This would actually not be a *breaking* change as no code would really break. Any Python 3.8 installer would just refuse to install the latest version of FastAPI and would only install 0.124.4. Only marking it as a "breaking change" to make it visible.

##### Refactors

- ♻️ Upgrade internal syntax to Python 3.9+ 🎉. MR [#&#8203;14564](https://github.com/fastapi/fastapi/pull/14564) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- ⚰️ Remove Python 3.8 from CI and remove Python 3.8 examples from source docs. MR [#&#8203;14559](https://github.com/fastapi/fastapi/pull/14559) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov) and [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🌐 Update translations for pt (add-missing). MR [#&#8203;14539](https://github.com/fastapi/fastapi/pull/14539) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔧 Add LLM prompt file for French, generated from the existing French docs. MR [#&#8203;14544](https://github.com/fastapi/fastapi/pull/14544) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Sync Portuguese docs (pages found with script). MR [#&#8203;14554](https://github.com/fastapi/fastapi/pull/14554) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Sync Spanish docs (outdated pages found with script). MR [#&#8203;14553](https://github.com/fastapi/fastapi/pull/14553) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Sync German docs. MR [#&#8203;14519](https://github.com/fastapi/fastapi/pull/14519) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 🔥 Remove inactive/scarce translations to Vietnamese. MR [#&#8203;14543](https://github.com/fastapi/fastapi/pull/14543) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔥 Remove inactive/scarce translations to Persian. MR [#&#8203;14542](https://github.com/fastapi/fastapi/pull/14542) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔥 Remove translation to emoji to simplify the new setup with LLM autotranslations. MR [#&#8203;14541](https://github.com/fastapi/fastapi/pull/14541) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Update translations for pt (update-outdated). MR [#&#8203;14537](https://github.com/fastapi/fastapi/pull/14537) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Update translations for es (update-outdated). MR [#&#8203;14532](https://github.com/fastapi/fastapi/pull/14532) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Update translations for es (add-missing). MR [#&#8203;14533](https://github.com/fastapi/fastapi/pull/14533) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Remove translations for removed docs. MR [#&#8203;14516](https://github.com/fastapi/fastapi/pull/14516) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ⬆ Bump `markdown-include-variants` from 0.0.7 to 0.0.8. MR [#&#8203;14556](https://github.com/fastapi/fastapi/pull/14556) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🔧 Temporarily disable translations still in progress, being migrated to the new LLM setup. MR [#&#8203;14555](https://github.com/fastapi/fastapi/pull/14555) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🔧 Update test workflow config, remove commented code. MR [#&#8203;14540](https://github.com/fastapi/fastapi/pull/14540) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Configure coverage, error on main tests, don't wait for Smokeshow. MR [#&#8203;14536](https://github.com/fastapi/fastapi/pull/14536) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Run Smokeshow always, even on test failures. MR [#&#8203;14538](https://github.com/fastapi/fastapi/pull/14538) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Make Pydantic versions customizable in CI. MR [#&#8203;14535](https://github.com/fastapi/fastapi/pull/14535) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Fix checkout GitHub Action fetch-depth for LLM translations, enable cron monthly. MR [#&#8203;14531](https://github.com/fastapi/fastapi/pull/14531) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Fix Typer command for CI LLM translations. MR [#&#8203;14530](https://github.com/fastapi/fastapi/pull/14530) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Update LLM translation CI, add language matrix and extra commands, prepare for scheduled run. MR [#&#8203;14529](https://github.com/fastapi/fastapi/pull/14529) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Update github-actions user for GitHub Actions workflows. MR [#&#8203;14528](https://github.com/fastapi/fastapi/pull/14528) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ➕ Add requirements for translations. MR [#&#8203;14515](https://github.com/fastapi/fastapi/pull/14515) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.124.4`](https://github.com/fastapi/fastapi/releases/tag/0.124.4)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.3...0.124.4)

##### Fixes

- 🐛 Fix parameter aliases. MR [#&#8203;14371](https://github.com/fastapi/fastapi/pull/14371) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.124.3`](https://github.com/fastapi/fastapi/releases/tag/0.124.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.2...0.124.3)

##### Fixes

- 🐛 Fix support for tagged union with discriminator inside of `Annotated` with `Body()`. MR [#&#8203;14512](https://github.com/fastapi/fastapi/pull/14512) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Refactors

- ✅ Add set of tests for request parameters and alias. MR [#&#8203;14358](https://github.com/fastapi/fastapi/pull/14358) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

##### Docs

- 📝 Tweak links format. MR [#&#8203;14505](https://github.com/fastapi/fastapi/pull/14505) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 📝 Update docs about re-raising validation errors, do not include string as is to not leak information. MR [#&#8203;14487](https://github.com/fastapi/fastapi/pull/14487) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔥 Remove external links section. MR [#&#8203;14486](https://github.com/fastapi/fastapi/pull/14486) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🌐 Sync Russian docs. MR [#&#8203;14509](https://github.com/fastapi/fastapi/pull/14509) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Sync German docs. MR [#&#8203;14488](https://github.com/fastapi/fastapi/pull/14488) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- 👷 Tweak coverage to not pass Smokeshow max file size limit. MR [#&#8203;14507](https://github.com/fastapi/fastapi/pull/14507) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ✅ Expand test matrix to include Windows and MacOS. MR [#&#8203;14171](https://github.com/fastapi/fastapi/pull/14171) by [@&#8203;svlandeg](https://github.com/svlandeg).

### [`v0.124.2`](https://github.com/fastapi/fastapi/releases/tag/0.124.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.1...0.124.2)

##### Fixes

- 🐛 Fix support for `if TYPE_CHECKING`,  non-evaluated stringified annotations. MR [#&#8203;14485](https://github.com/fastapi/fastapi/pull/14485) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.124.1`](https://github.com/fastapi/fastapi/releases/tag/0.124.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.124.0...0.124.1)

##### Fixes

- 🐛 Fix handling arbitrary types when using `arbitrary_types_allowed=True`. MR [#&#8203;14482](https://github.com/fastapi/fastapi/pull/14482) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- 📝 Add variants for code examples in "Advanced User Guide". MR [#&#8203;14413](https://github.com/fastapi/fastapi/pull/14413) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 📝 Update tech stack in project generation docs. MR [#&#8203;14472](https://github.com/fastapi/fastapi/pull/14472) by [@&#8203;alejsdev](https://github.com/alejsdev).

##### Internal

- ✅ Add test for Pydantic v2, dataclasses, UUID, and `__annotations__`. MR [#&#8203;14477](https://github.com/fastapi/fastapi/pull/14477) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.124.0`](https://github.com/fastapi/fastapi/releases/tag/0.124.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.10...0.124.0)

##### Features

- 🚸  Improve tracebacks by adding endpoint metadata. MR [#&#8203;14306](https://github.com/fastapi/fastapi/pull/14306) by [@&#8203;savannahostrowski](https://github.com/savannahostrowski).

##### Internal

- ✏️ Fix typo in `scripts/mkdocs_hooks.py`. MR [#&#8203;14457](https://github.com/fastapi/fastapi/pull/14457) by [@&#8203;yujiteshima](https://github.com/yujiteshima).

### [`v0.123.10`](https://github.com/fastapi/fastapi/releases/tag/0.123.10)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.9...0.123.10)

##### Fixes

- 🐛 Fix using class (not instance) dependency that has `__call__` method. MR [#&#8203;14458](https://github.com/fastapi/fastapi/pull/14458) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🐛 Fix `separate_input_output_schemas=False` with `computed_field`. MR [#&#8203;14453](https://github.com/fastapi/fastapi/pull/14453) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.123.9`](https://github.com/fastapi/fastapi/releases/tag/0.123.9)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.8...0.123.9)

##### Fixes

- 🐛 Fix OAuth2 scopes in OpenAPI in extra corner cases, parent dependency with scopes, sub-dependency security scheme without scopes. MR [#&#8203;14459](https://github.com/fastapi/fastapi/pull/14459) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.123.8`](https://github.com/fastapi/fastapi/releases/tag/0.123.8)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.7...0.123.8)

##### Fixes

- 🐛 Fix OpenAPI security scheme OAuth2 scopes declaration, deduplicate security schemes with different scopes. MR [#&#8203;14455](https://github.com/fastapi/fastapi/pull/14455) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.123.7`](https://github.com/fastapi/fastapi/releases/tag/0.123.7)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.6...0.123.7)

##### Fixes

- 🐛 Fix evaluating stringified annotations in Python 3.10. MR [#&#8203;11355](https://github.com/fastapi/fastapi/pull/11355) by [@&#8203;chaen](https://github.com/chaen).

### [`v0.123.6`](https://github.com/fastapi/fastapi/releases/tag/0.123.6)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.5...0.123.6)

##### Fixes

- 🐛 Fix support for functools wraps and partial combined, for async and regular functions and classes in path operations and dependencies. MR [#&#8203;14448](https://github.com/fastapi/fastapi/pull/14448) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.123.5`](https://github.com/fastapi/fastapi/releases/tag/0.123.5)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.4...0.123.5)

##### Features

- ✨ Allow using dependables with `functools.partial()`. MR [#&#8203;9753](https://github.com/fastapi/fastapi/pull/9753) by [@&#8203;lieryan](https://github.com/lieryan).
- ✨ Add support for wrapped functions (e.g. `@functools.wraps()`) used with forward references. MR [#&#8203;5077](https://github.com/fastapi/fastapi/pull/5077) by [@&#8203;lucaswiman](https://github.com/lucaswiman).
- ✨ Handle wrapped dependencies. MR [#&#8203;9555](https://github.com/fastapi/fastapi/pull/9555) by [@&#8203;phy1729](https://github.com/phy1729).

##### Fixes

- 🐛 Fix optional sequence handling with new union syntax from Python 3.10. MR [#&#8203;14430](https://github.com/fastapi/fastapi/pull/14430) by [@&#8203;Viicos](https://github.com/Viicos).

##### Refactors

- 🔥 Remove dangling extra condiitonal no longer needed. MR [#&#8203;14435](https://github.com/fastapi/fastapi/pull/14435) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ♻️ Refactor internals, update `is_coroutine` check to reuse internal supported variants (unwrap, check class). MR [#&#8203;14434](https://github.com/fastapi/fastapi/pull/14434) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Translations

- 🌐 Sync German docs. MR [#&#8203;14367](https://github.com/fastapi/fastapi/pull/14367) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

### [`v0.123.4`](https://github.com/fastapi/fastapi/releases/tag/0.123.4)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.3...0.123.4)

##### Fixes

- 🐛 Fix OpenAPI schema support for computed fields when using `separate_input_output_schemas=False`. MR [#&#8203;13207](https://github.com/fastapi/fastapi/pull/13207) by [@&#8203;vgrafe](https://github.com/vgrafe).

##### Docs

- 📝 Fix docstring of `servers` parameter. MR [#&#8203;14405](https://github.com/fastapi/fastapi/pull/14405) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.123.3`](https://github.com/fastapi/fastapi/releases/tag/0.123.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.2...0.123.3)

##### Fixes

- 🐛 Fix Query\Header\Cookie parameter model alias. MR [#&#8203;14360](https://github.com/fastapi/fastapi/pull/14360) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🐛 Fix optional sequence handling in `serialize sequence value` with Pydantic V2. MR [#&#8203;14297](https://github.com/fastapi/fastapi/pull/14297) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.123.2`](https://github.com/fastapi/fastapi/releases/tag/0.123.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.1...0.123.2)

##### Fixes

- 🐛 Fix unformatted `{type_}` in FastAPIError. MR [#&#8203;14416](https://github.com/fastapi/fastapi/pull/14416) by [@&#8203;Just-Helpful](https://github.com/Just-Helpful).
- 🐛 Fix parsing extra non-body parameter list. MR [#&#8203;14356](https://github.com/fastapi/fastapi/pull/14356) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🐛 Fix parsing extra `Form` parameter list. MR [#&#8203;14303](https://github.com/fastapi/fastapi/pull/14303) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🐛 Fix support for form values with empty strings interpreted as missing (`None` if that's the default), for compatibility with HTML forms. MR [#&#8203;13537](https://github.com/fastapi/fastapi/pull/13537) by [@&#8203;MarinPostma](https://github.com/MarinPostma).

##### Docs

- 📝 Add tip on how to install `pip` in case of `No module named pip` error in `virtual-environments.md`. MR [#&#8203;14211](https://github.com/fastapi/fastapi/pull/14211) by [@&#8203;zadevhub](https://github.com/zadevhub).
- 📝 Update Primary Key notes for the SQL databases tutorial to avoid confusion. MR [#&#8203;14120](https://github.com/fastapi/fastapi/pull/14120) by [@&#8203;FlaviusRaducu](https://github.com/FlaviusRaducu).
- 📝 Clarify estimation note in documentation. MR [#&#8203;14070](https://github.com/fastapi/fastapi/pull/14070) by [@&#8203;SaisakthiM](https://github.com/SaisakthiM).

### [`v0.123.1`](https://github.com/fastapi/fastapi/releases/tag/0.123.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.123.0...0.123.1)

##### Fixes

- 🐛 Avoid accessing non-existing "$ref" key for Pydantic v2 compat remapping. MR [#&#8203;14361](https://github.com/fastapi/fastapi/pull/14361) by [@&#8203;svlandeg](https://github.com/svlandeg).
- 🐛 Fix `TypeError` when encoding a decimal with a `NaN` or `Infinity` value. MR [#&#8203;12935](https://github.com/fastapi/fastapi/pull/12935) by [@&#8203;kentwelcome](https://github.com/kentwelcome).

##### Internal

- 🐛 Fix Windows UnicodeEncodeError in CLI test. MR [#&#8203;14295](https://github.com/fastapi/fastapi/pull/14295) by [@&#8203;hemanth-thirthahalli](https://github.com/hemanth-thirthahalli).
- 🔧 Update sponsors: add Greptile. MR [#&#8203;14429](https://github.com/fastapi/fastapi/pull/14429) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI GitHub topic repositories. MR [#&#8203;14426](https://github.com/fastapi/fastapi/pull/14426) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump markdown-include-variants from 0.0.6 to 0.0.7. MR [#&#8203;14423](https://github.com/fastapi/fastapi/pull/14423) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 👥 Update FastAPI People - Sponsors. MR [#&#8203;14422](https://github.com/fastapi/fastapi/pull/14422) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI People - Contributors and Translators. MR [#&#8203;14420](https://github.com/fastapi/fastapi/pull/14420) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.123.0`](https://github.com/fastapi/fastapi/releases/tag/0.123.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.122.1...0.123.0)

##### Fixes

- 🐛 Cache dependencies that don't use scopes and don't have sub-dependencies with scopes. MR [#&#8203;14419](https://github.com/fastapi/fastapi/pull/14419) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.122.1`](https://github.com/fastapi/fastapi/releases/tag/0.122.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.122.0...0.122.1)

##### Fixes

- 🐛 Fix hierarchical security scope propagation. MR [#&#8203;5624](https://github.com/fastapi/fastapi/pull/5624) by [@&#8203;kristjanvalur](https://github.com/kristjanvalur).

##### Docs

- 💅 Update CSS to explicitly use emoji font. MR [#&#8203;14415](https://github.com/fastapi/fastapi/pull/14415) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ⬆ Bump markdown-include-variants from 0.0.5 to 0.0.6. MR [#&#8203;14418](https://github.com/fastapi/fastapi/pull/14418) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.122.0`](https://github.com/fastapi/fastapi/releases/tag/0.122.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.121.3...0.122.0)

##### Fixes

- 🐛 Use `401` status code in security classes when credentials are missing. MR [#&#8203;13786](https://github.com/fastapi/fastapi/pull/13786) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
  - If your code depended on these classes raising the old (less correct) `403` status code, check the new docs about how to override the classes, to use the same old behavior: [Use Old 403 Authentication Error Status Codes](https://fastapi.tiangolo.com/how-to/authentication-error-status-code/).

##### Internal

- 🔧 Configure labeler to exclude files that start from underscore for `lang-all` label. MR [#&#8203;14213](https://github.com/fastapi/fastapi/pull/14213) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 👷 Add pre-commit config with local script for permalinks. MR [#&#8203;14398](https://github.com/fastapi/fastapi/pull/14398) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 💄 Use font Fira Code to fix display of Rich panels in docs in Windows. MR [#&#8203;14387](https://github.com/fastapi/fastapi/pull/14387) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👷 Add custom pre-commit CI. MR [#&#8203;14397](https://github.com/fastapi/fastapi/pull/14397) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump actions/checkout from 5 to 6. MR [#&#8203;14381](https://github.com/fastapi/fastapi/pull/14381) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- 👷 Upgrade `latest-changes` GitHub Action and pin `actions/checkout@v5`. MR [#&#8203;14403](https://github.com/fastapi/fastapi/pull/14403) by [@&#8203;svlandeg](https://github.com/svlandeg).
- 🛠️ Add `add-permalinks` and `add-permalinks-page` to `scripts/docs.py`. MR [#&#8203;14033](https://github.com/fastapi/fastapi/pull/14033) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🔧 Upgrade Material for MkDocs and remove insiders. MR [#&#8203;14375](https://github.com/fastapi/fastapi/pull/14375) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.121.3`](https://github.com/fastapi/fastapi/releases/tag/0.121.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.121.2...0.121.3)

##### 0.121.3

##### Refactors

- ♻️ Make the result of `Depends()` and `Security()` hashable, as a workaround for other tools interacting with these internal parts. MR [#&#8203;14372](https://github.com/fastapi/fastapi/pull/14372) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Upgrades

- ⬆️ Bump Starlette to <`0.51.0`. MR [#&#8203;14282](https://github.com/fastapi/fastapi/pull/14282) by [@&#8203;musicinmybrain](https://github.com/musicinmybrain).

##### Docs

- 📝 Add missing hash part. MR [#&#8203;14369](https://github.com/fastapi/fastapi/pull/14369) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 📝 Fix typos in code comments. MR [#&#8203;14364](https://github.com/fastapi/fastapi/pull/14364) by [@&#8203;Edge-Seven](https://github.com/Edge-Seven).
- 📝 Add docs for using FastAPI Cloud. MR [#&#8203;14359](https://github.com/fastapi/fastapi/pull/14359) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.121.2`](https://github.com/fastapi/fastapi/releases/tag/0.121.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.121.1...0.121.2)

##### Fixes

- 🐛 Fix handling of JSON Schema attributes named "$ref". MR [#&#8203;14349](https://github.com/fastapi/fastapi/pull/14349) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- 📝 Add EuroPython talk & podcast episode with Sebastián Ramírez. MR [#&#8203;14260](https://github.com/fastapi/fastapi/pull/14260) by [@&#8203;clytaemnestra](https://github.com/clytaemnestra).
- ✏️ Fix links and add missing permalink in docs. MR [#&#8203;14217](https://github.com/fastapi/fastapi/pull/14217) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

##### Translations

- 🌐 Update Portuguese translations with LLM prompt. MR [#&#8203;14228](https://github.com/fastapi/fastapi/pull/14228) by [@&#8203;ceb10n](https://github.com/ceb10n).
- 🔨 Add Portuguese translations LLM prompt. MR [#&#8203;14208](https://github.com/fastapi/fastapi/pull/14208) by [@&#8203;ceb10n](https://github.com/ceb10n).
- 🌐 Sync Russian docs. MR [#&#8203;14331](https://github.com/fastapi/fastapi/pull/14331) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Sync German docs. MR [#&#8203;14317](https://github.com/fastapi/fastapi/pull/14317) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

### [`v0.121.1`](https://github.com/fastapi/fastapi/releases/tag/0.121.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.121.0...0.121.1)

##### Fixes

- 🐛 Fix `Depends(func, scope='function')` for top level (parameterless) dependencies. MR [#&#8203;14301](https://github.com/fastapi/fastapi/pull/14301) by [@&#8203;luzzodev](https://github.com/luzzodev).

##### Docs

- 📝 Upate docs for advanced dependencies with `yield`, noting the changes in 0.121.0, adding `scope`. MR [#&#8203;14287](https://github.com/fastapi/fastapi/pull/14287) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- ⬆ Bump ruff from 0.13.2 to 0.14.3. MR [#&#8203;14276](https://github.com/fastapi/fastapi/pull/14276) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14289](https://github.com/fastapi/fastapi/pull/14289) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).

### [`v0.121.0`](https://github.com/fastapi/fastapi/releases/tag/0.121.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.4...0.121.0)

##### Features

- ✨ Add support for dependencies with scopes, support `scope="request"` for dependencies with `yield` that exit before the response is sent. MR [#&#8203;14262](https://github.com/fastapi/fastapi/pull/14262) by [@&#8203;tiangolo](https://github.com/tiangolo).
  - New docs: [Dependencies with `yield` - Early exit and `scope`](https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-with-yield/#early-exit-and-scope).

##### Internal

- 👥 Update FastAPI People - Contributors and Translators. MR [#&#8203;14273](https://github.com/fastapi/fastapi/pull/14273) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI People - Sponsors. MR [#&#8203;14274](https://github.com/fastapi/fastapi/pull/14274) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI GitHub topic repositories. MR [#&#8203;14280](https://github.com/fastapi/fastapi/pull/14280) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump mkdocs-macros-plugin from 1.4.0 to 1.4.1. MR [#&#8203;14277](https://github.com/fastapi/fastapi/pull/14277) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump mkdocstrings\[python] from 0.26.1 to 0.30.1. MR [#&#8203;14279](https://github.com/fastapi/fastapi/pull/14279) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).

### [`v0.120.4`](https://github.com/fastapi/fastapi/releases/tag/0.120.4)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.3...0.120.4)

##### Fixes

- 🐛 Fix security schemes in OpenAPI when added at the top level app. MR [#&#8203;14266](https://github.com/fastapi/fastapi/pull/14266) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.120.3`](https://github.com/fastapi/fastapi/releases/tag/0.120.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.2...0.120.3)

##### Refactors

- ♻️ Reduce internal cyclic recursion in dependencies, from 2 functions calling each other to 1 calling itself. MR [#&#8203;14256](https://github.com/fastapi/fastapi/pull/14256) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ♻️ Refactor internals of dependencies, simplify code and remove `get_param_sub_dependant`. MR [#&#8203;14255](https://github.com/fastapi/fastapi/pull/14255) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ♻️ Refactor internals of dependencies, simplify using dataclasses. MR [#&#8203;14254](https://github.com/fastapi/fastapi/pull/14254) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Docs

- 📝 Update note for untranslated pages. MR [#&#8203;14257](https://github.com/fastapi/fastapi/pull/14257) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.120.2`](https://github.com/fastapi/fastapi/releases/tag/0.120.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.1...0.120.2)

##### Fixes

- 🐛 Fix separation of schemas with nested models introduced in 0.119.0. MR [#&#8203;14246](https://github.com/fastapi/fastapi/pull/14246) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- 🔧 Add sponsor: SerpApi. MR [#&#8203;14248](https://github.com/fastapi/fastapi/pull/14248) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump actions/download-artifact from 5 to 6. MR [#&#8203;14236](https://github.com/fastapi/fastapi/pull/14236) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14237](https://github.com/fastapi/fastapi/pull/14237) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).
- ⬆ Bump actions/upload-artifact from 4 to 5. MR [#&#8203;14235](https://github.com/fastapi/fastapi/pull/14235) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).

### [`v0.120.1`](https://github.com/fastapi/fastapi/releases/tag/0.120.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.120.0...0.120.1)

##### Upgrades

- ⬆️ Bump Starlette to <`0.50.0`. MR [#&#8203;14234](https://github.com/fastapi/fastapi/pull/14234) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

##### Internal

- 🔧 Add `license` and `license-files` to `pyproject.toml`, remove `License` from `classifiers`. MR [#&#8203;14230](https://github.com/fastapi/fastapi/pull/14230) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.120.0`](https://github.com/fastapi/fastapi/releases/tag/0.120.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.119.1...0.120.0)

There are no major nor breaking changes in this release. ☕️

The internal reference documentation now uses `annotated_doc.Doc` instead of `typing_extensions.Doc`, this adds a new (very small) dependency on [`annotated-doc`](https://github.com/fastapi/annotated-doc), a package made just to provide that `Doc` documentation utility class.

I would expect `typing_extensions.Doc` to be deprecated and then removed at some point from `typing_extensions`, for that reason there's the new `annotated-doc` micro-package. If you are curious about this, you can read more in the repo for [`annotated-doc`](https://github.com/fastapi/annotated-doc).

This new version `0.120.0` only contains that transition to the new home package for that utility class `Doc`.

##### Translations

- 🌐 Sync German docs. MR [#&#8203;14188](https://github.com/fastapi/fastapi/pull/14188) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- ➕ Migrate internal reference documentation from `typing_extensions.Doc` to `annotated_doc.Doc`. MR [#&#8203;14222](https://github.com/fastapi/fastapi/pull/14222) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🛠️ Update German LLM prompt and test file. MR [#&#8203;14189](https://github.com/fastapi/fastapi/pull/14189) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14181](https://github.com/fastapi/fastapi/pull/14181) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).

### [`v0.119.1`](https://github.com/fastapi/fastapi/releases/tag/0.119.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.119.0...0.119.1)

##### Fixes

- 🐛 Fix internal Pydantic v1 compatibility (warnings) for Python 3.14 and Pydantic 2.12.1. MR [#&#8203;14186](https://github.com/fastapi/fastapi/pull/14186) by [@&#8203;svlandeg](https://github.com/svlandeg).

##### Docs

- 📝 Replace `starlette.io` by `starlette.dev` and `uvicorn.org` by `uvicorn.dev`. MR [#&#8203;14176](https://github.com/fastapi/fastapi/pull/14176) by [@&#8203;Kludex](https://github.com/Kludex).

##### Internal

- 🔧 Add sponsor Requestly. MR [#&#8203;14205](https://github.com/fastapi/fastapi/pull/14205) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔧 Configure reminder for `waiting` label in `issue-manager`. MR [#&#8203;14156](https://github.com/fastapi/fastapi/pull/14156) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.119.0`](https://github.com/fastapi/fastapi/releases/tag/0.119.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.118.3...0.119.0)

FastAPI now (temporarily) supports both Pydantic v2 models and `pydantic.v1` models at the same time in the same app, to make it easier for any FastAPI apps still using Pydantic v1 to gradually but quickly **migrate to Pydantic v2**.

```Python
from fastapi import FastAPI
from pydantic import BaseModel as BaseModelV2
from pydantic.v1 import BaseModel

class Item(BaseModel):
    name: str
    description: str | None = None

class ItemV2(BaseModelV2):
    title: str
    summary: str | None = None

app = FastAPI()

@&#8203;app.post("/items/", response_model=ItemV2)
def create_item(item: Item):
    return {"title": item.name, "summary": item.description}
```

Adding this feature was a big effort with the main objective of making it easier for the few applications still stuck in Pydantic v1 to migrate to Pydantic v2.

And with this, support for **Pydantic v1 is now deprecated** and will be **removed** from FastAPI in a future version soon.

**Note**: have in mind that the Pydantic team already stopped supporting Pydantic v1 for recent versions of Python, starting with Python 3.14.

You can read in the docs more about how to [Migrate from Pydantic v1 to Pydantic v2](https://fastapi.tiangolo.com/how-to/migrate-from-pydantic-v1-to-pydantic-v2/).

##### Features

- ✨ Add support for `from pydantic.v1 import BaseModel`, mixed Pydantic v1 and v2 models in the same app. MR [#&#8203;14168](https://github.com/fastapi/fastapi/pull/14168) by [@&#8203;tiangolo](https://github.com/tiangolo).

### [`v0.118.3`](https://github.com/fastapi/fastapi/releases/tag/0.118.3)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.118.2...0.118.3)

##### Upgrades

- ⬆️ Add support for Python 3.14. MR [#&#8203;14165](https://github.com/fastapi/fastapi/pull/14165) by [@&#8203;svlandeg](https://github.com/svlandeg).

### [`v0.118.2`](https://github.com/fastapi/fastapi/releases/tag/0.118.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.118.1...0.118.2)

##### Fixes

- 🐛 Fix tagged discriminated union not recognized as body field. MR [#&#8203;12942](https://github.com/fastapi/fastapi/pull/12942) by [@&#8203;frankie567](https://github.com/frankie567).

##### Internal

- ⬆ Bump astral-sh/setup-uv from 6 to 7. MR [#&#8203;14167](https://github.com/fastapi/fastapi/pull/14167) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).

### [`v0.118.1`](https://github.com/fastapi/fastapi/releases/tag/0.118.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.118.0...0.118.1)

##### Upgrades

- 👽️ Ensure compatibility with Pydantic 2.12.0. MR [#&#8203;14036](https://github.com/fastapi/fastapi/pull/14036) by [@&#8203;cjwatson](https://github.com/cjwatson).

##### Docs

- 📝 Add External Link: Getting started with logging in FastAPI. MR [#&#8203;14152](https://github.com/fastapi/fastapi/pull/14152) by [@&#8203;itssimon](https://github.com/itssimon).

##### Translations

- 🔨 Add Russian translations LLM prompt. MR [#&#8203;13936](https://github.com/fastapi/fastapi/pull/13936) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🌐 Sync German docs. MR [#&#8203;14149](https://github.com/fastapi/fastapi/pull/14149) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 🌐 Add Russian translations for missing pages (LLM-generated). MR [#&#8203;14135](https://github.com/fastapi/fastapi/pull/14135) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Update Russian translations for existing pages (LLM-generated). MR [#&#8203;14123](https://github.com/fastapi/fastapi/pull/14123) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🌐 Remove configuration files for inactive translations. MR [#&#8203;14130](https://github.com/fastapi/fastapi/pull/14130) by [@&#8203;tiangolo](https://github.com/tiangolo).

##### Internal

- 🔨 Move local coverage logic to its own script. MR [#&#8203;14166](https://github.com/fastapi/fastapi/pull/14166) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14161](https://github.com/fastapi/fastapi/pull/14161) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).
- ⬆ Bump griffe-typingdoc from 0.2.8 to 0.2.9. MR [#&#8203;14144](https://github.com/fastapi/fastapi/pull/14144) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump mkdocs-macros-plugin from 1.3.9 to 1.4.0. MR [#&#8203;14145](https://github.com/fastapi/fastapi/pull/14145) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump markdown-include-variants from 0.0.4 to 0.0.5. MR [#&#8203;14146](https://github.com/fastapi/fastapi/pull/14146) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14126](https://github.com/fastapi/fastapi/pull/14126) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).
- 👥 Update FastAPI GitHub topic repositories. MR [#&#8203;14150](https://github.com/fastapi/fastapi/pull/14150) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI People - Sponsors. MR [#&#8203;14139](https://github.com/fastapi/fastapi/pull/14139) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 👥 Update FastAPI People - Contributors and Translators. MR [#&#8203;14138](https://github.com/fastapi/fastapi/pull/14138) by [@&#8203;tiangolo](https://github.com/tiangolo).
- ⬆ Bump ruff from 0.12.7 to 0.13.2. MR [#&#8203;14147](https://github.com/fastapi/fastapi/pull/14147) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump sqlmodel from 0.0.24 to 0.0.25. MR [#&#8203;14143](https://github.com/fastapi/fastapi/pull/14143) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- ⬆ Bump tiangolo/issue-manager from 0.5.1 to 0.6.0. MR [#&#8203;14148](https://github.com/fastapi/fastapi/pull/14148) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot).
- 👷 Update docs previews comment, single comment, add failure status. MR [#&#8203;14129](https://github.com/fastapi/fastapi/pull/14129) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 🔨 Modify `mkdocs_hooks.py` to add `title` to page's metadata (remove permalinks in social cards). MR [#&#8203;14125](https://github.com/fastapi/fastapi/pull/14125) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

### [`v0.118.0`](https://github.com/fastapi/fastapi/releases/tag/0.118.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.117.1...0.118.0)

##### 0.118.0

##### Fixes

- 🐛 Fix support for `StreamingResponse`s with dependencies with `yield` or `UploadFile`s, close after the response is done. MR [#&#8203;14099](https://github.com/fastapi/fastapi/pull/14099) by [@&#8203;tiangolo](https://github.com/tiangolo).

Before FastAPI 0.118.0, if you used a dependency with `yield`, it would run the exit code after the *path operation function* returned but right before sending the response.

This change also meant that if you returned a `StreamingResponse`, the exit code of the dependency with `yield` would have been already run.

For example, if you had a database session in a dependency with `yield`, the `StreamingResponse` would not be able to use that session while streaming data because the session would have already been closed in the exit code after `yield`.

This behavior was reverted in 0.118.0, to make the exit code after `yield` be executed after the response is sent.

You can read more about it in the docs for [Advanced Dependencies - Dependencies with `yield`, `HTTPException`, `except` and Background Tasks](https://fastapi.tiangolo.com/advanced/advanced-dependencies#dependencies-with-yield-httpexception-except-and-background-tasks). Including what you could do if you wanted to close a database session earlier, before returning the response to the client.

##### Docs

- 📝 Update `tutorial/security/oauth2-jwt/` to use `pwdlib` with Argon2 instead of `passlib`. MR [#&#8203;13917](https://github.com/fastapi/fastapi/pull/13917) by [@&#8203;Neizvestnyj](https://github.com/Neizvestnyj).
- ✏️ Fix typos in OAuth2 password request forms. MR [#&#8203;14112](https://github.com/fastapi/fastapi/pull/14112) by [@&#8203;alv2017](https://github.com/alv2017).
- 📝 Update contributing guidelines for installing requirements. MR [#&#8203;14095](https://github.com/fastapi/fastapi/pull/14095) by [@&#8203;alejsdev](https://github.com/alejsdev).

##### Translations

- 🌐 Sync German docs. MR [#&#8203;14098](https://github.com/fastapi/fastapi/pull/14098) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- ⬆ \[pre-commit.ci] pre-commit autoupdate. MR [#&#8203;14103](https://github.com/fastapi/fastapi/pull/14103) by [@&#8203;pre-commit-ci\[bot\]](https://github.com/apps/pre-commit-ci).
- ♻️ Refactor sponsor image handling. MR [#&#8203;14102](https://github.com/fastapi/fastapi/pull/14102) by [@&#8203;alejsdev](https://github.com/alejsdev).
- 🐛 Fix sponsor display issue by hiding element on image error. MR [#&#8203;14097](https://github.com/fastapi/fastapi/pull/14097) by [@&#8203;alejsdev](https://github.com/alejsdev).
- 🐛 Hide sponsor badge when sponsor image is not displayed. MR [#&#8203;14096](https://github.com/fastapi/fastapi/pull/14096) by [@&#8203;alejsdev](https://github.com/alejsdev).

### [`v0.117.1`](https://github.com/fastapi/fastapi/releases/tag/0.117.1)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.117.0...0.117.1)

##### Fixes

- 🐛 Fix validation error when `File` is declared after `Form` parameter. MR [#&#8203;11194](https://github.com/fastapi/fastapi/pull/11194) by [@&#8203;thomasleveil](https://github.com/thomasleveil).

### [`v0.117.0`](https://github.com/fastapi/fastapi/releases/tag/0.117.0)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.116.2...0.117.0)

##### Features

- ✨  Allow `None` as return type for bodiless responses. MR [#&#8203;9425](https://github.com/fastapi/fastapi/pull/9425) by [@&#8203;hofrob](https://github.com/hofrob).
- ✨ Allow array values for OpenAPI schema `type` field. MR [#&#8203;13639](https://github.com/fastapi/fastapi/pull/13639) by [@&#8203;sammasak](https://github.com/sammasak).
- ✨ Add OpenAPI `external_docs` parameter to `FastAPI`. MR [#&#8203;13713](https://github.com/fastapi/fastapi/pull/13713) by [@&#8203;cmtoro](https://github.com/cmtoro).

##### Fixes

- ⚡️ Fix `default_factory` for response model field with Pydantic V1. MR [#&#8203;9704](https://github.com/fastapi/fastapi/pull/9704) by [@&#8203;vvanglro](https://github.com/vvanglro).
- 🐛 Fix inconsistent processing of model docstring formfeed char with Pydantic V1. MR [#&#8203;6039](https://github.com/fastapi/fastapi/pull/6039) by [@&#8203;MaxwellPayne](https://github.com/MaxwellPayne).
- 🐛 Fix `jsonable_encoder` alters `json_encoders` of Pydantic v1 objects. MR [#&#8203;4972](https://github.com/fastapi/fastapi/pull/4972) by [@&#8203;aboubacs](https://github.com/aboubacs).
- 🐛 Reenable `allow_arbitrary_types` when only 1 argument is used on the API endpoint. MR [#&#8203;13694](https://github.com/fastapi/fastapi/pull/13694) by [@&#8203;rmawatson](https://github.com/rmawatson).
- 🐛 Fix `inspect.getcoroutinefunction()` can break testing with `unittest.mock.patch()`. MR [#&#8203;14022](https://github.com/fastapi/fastapi/pull/14022) by [@&#8203;secrett2633](https://github.com/secrett2633).

##### Refactors

- ♻️ Create `dependency-cache` dict in `solve_dependencies` only if `None` (don't re-create if empty). MR [#&#8203;13689](https://github.com/fastapi/fastapi/pull/13689) by [@&#8203;bokshitsky](https://github.com/bokshitsky).
- ✅ Enable test case for duplicated headers in `test_tutorial/test_header_params/test_tutorial003.py`. MR [#&#8203;13864](https://github.com/fastapi/fastapi/pull/13864) by [@&#8203;Amogha-ark](https://github.com/Amogha-ark).
- 📌 Pin `httpx` to `>=0.23.0,<1.0.0`. MR [#&#8203;14086](https://github.com/fastapi/fastapi/pull/14086) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).

##### Docs

- 📝 Add note about Cookies and JavaScript on `tutorial/cookie-params.md`. MR [#&#8203;13510](https://github.com/fastapi/fastapi/pull/13510) by [@&#8203;Kludex](https://github.com/Kludex).
- 📝 Remove outdated formatting from `path-params-numeric-validations.md` for languages `en`, `es` and `uk`.. MR [#&#8203;14059](https://github.com/fastapi/fastapi/pull/14059) by [@&#8203;svlandeg](https://github.com/svlandeg).
- 📝 Fix and Improve English Documentation. MR [#&#8203;14048](https://github.com/fastapi/fastapi/pull/14048) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Translations

- 📝 Update prompts and German translation. MR [#&#8203;14015](https://github.com/fastapi/fastapi/pull/14015) by [@&#8203;nilslindemann](https://github.com/nilslindemann).

##### Internal

- ✅ Simplify tests for response\_model. MR [#&#8203;14062](https://github.com/fastapi/fastapi/pull/14062) by [@&#8203;dynamicy](https://github.com/dynamicy).
- 🚨 Install pydantic.mypy plugin. MR [#&#8203;14081](https://github.com/fastapi/fastapi/pull/14081) by [@&#8203;svlandeg](https://github.com/svlandeg).
- ✅ Add LLM test file. MR [#&#8203;14049](https://github.com/fastapi/fastapi/pull/14049) by [@&#8203;nilslindemann](https://github.com/nilslindemann).
- 🔨 Update translations script. MR [#&#8203;13968](https://github.com/fastapi/fastapi/pull/13968) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- 🛠️ Update `docs.py generate-readme` command to remove permalinks from headers. MR [#&#8203;14055](https://github.com/fastapi/fastapi/pull/14055) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov).
- ⬆️ Update mypy to 1.14.1. MR [#&#8203;12970](https://github.com/fastapi/fastapi/pull/12970) by [@&#8203;tamird](https://github.com/tamird).

### [`v0.116.2`](https://github.com/fastapi/fastapi/releases/tag/0.116.2)

[Compare Source](https://github.com/fastapi/fastapi/compare/0.116.1...0.116.2)

##### Upgrades

- ⬆️ Upgrade Starlette supported version range to >=0.40.0,<0.49.0. MR [#&#8203;14077](https://github.com/fastapi/fastapi/pull/14077) by [@&#8203;musicinmybrain](https://github.com/musicinmybrain).

##### Docs

- 📝 Add documentation for Behind a Proxy - Proxy Forwarded Headers, using `--forwarded-allow-ips="*"`. MR [#&#8203;14028](https://github.com/fastapi/fastapi/pull/14028) by [@&#8203;tiangolo](https://github.com/tiangolo).
- 📝 Add deprecation info block about `dict()` in `docs/tutorial/body.md`. MR [#&#8203;13906](https://github.com/fastapi/fastapi/pull/13906) by [@&#8203;jomkv](https://github.com/jomkv).
- 📝 Fix Twitter to be X (Twitter) ev…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPBearer security scheme is returning 403 instead or 401

6 participants