◐ Shell
clean mode source ↗

fix(starlette/fastapi): Use `inspect.iscoroutinefunction` when Starlette does by alexander-alderman-webb · Pull Request #6134 · getsentry/sentry-python

@alexander-alderman-webb alexander-alderman-webb changed the title fix(starlette/fastapi): Use inspect.iscoroutinefunction when Starlette does fix(starlette/fastapi): Use inspect.iscoroutinefunction when Starlette does

Apr 24, 2026

@github-actions

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 10.11s

All tests are passing successfully.

❌ Patch coverage is 40.00%. Project has 14787 uncovered lines.

Files with missing lines (2)
File Patch % Lines
starlette.py 5.28% ⚠️ 341 Missing
fastapi.py 15.91% ⚠️ 74 Missing

Generated by Codecov Action

ericapisani

cooperoptigrid



# Vendored: https://github.com/Kludex/starlette/blob/0a29b5ccdcbd1285c75c4fdb5d62ae1d244a21b0/starlette/_utils.py#L11-L17
if sys.version_info >= (3, 13): # pragma: no cover

Choose a reason for hiding this comment

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

This will be true with Python version 4.0 and higher too, right? Using the _compat.py PY313 keeps its to Python 3.x.

Not sure if you care about that distinction

This was referenced

May 4, 2026