Skip to content

Verify Starlette 1.0.0 compatibility#846

Open
mitchh456 wants to merge 2 commits intofix/fastmcp-3-compatibilityfrom
fix/836-starlette-1.0-compatibility
Open

Verify Starlette 1.0.0 compatibility#846
mitchh456 wants to merge 2 commits intofix/fastmcp-3-compatibilityfrom
fix/836-starlette-1.0-compatibility

Conversation

@mitchh456
Copy link
Copy Markdown
Contributor

Summary

  • Added explicit tox test environments for Starlette 0.36.x and 1.0.x to verify compatibility
  • Scout's ScoutMiddleware uses pure ASGI3 interfaces (__call__(self, scope, receive, send)) which are stable across Starlette versions
  • Updated setup.py classifiers to reflect tested Django 5.0/5.1/5.2 and Python 3.13/3.14 support

Compatibility audit

Scout's ScoutMiddleware in src/scout_apm/async_/starlette.py:

  • Uses standard ASGI3 callable interface -- no Starlette-specific middleware base class
  • starlette.background.BackgroundTask import is stable core API
  • Accesses only standard ASGI scope keys (scope["endpoint"], scope["type"], scope["user"])
  • BackgroundTask instrumentation wraps __call__ via wrapt.decorator -- public interface

Test plan

  • CI passes Starlette 1.0.x tox environments across Python 3.10-3.14
  • CI passes Starlette 0.36.x tox environments (regression check)
  • Existing integration tests in tests/integration/test_starlette.py cover middleware injection, background tasks, error handling, and authentication

Closes #836

Generated with Claude Code

@mitchh456 mitchh456 force-pushed the fix/836-starlette-1.0-compatibility branch from 6b8eb10 to 1e57d8b Compare April 1, 2026 15:24
@mitchh456 mitchh456 changed the base branch from master to fix/fastmcp-3-compatibility April 1, 2026 15:24
@mitchh456 mitchh456 force-pushed the fix/fastmcp-3-compatibility branch from b490695 to ec800d2 Compare April 1, 2026 15:34
mitchh456 and others added 2 commits April 1, 2026 15:35
Add dedicated tox environments to test against both Starlette 0.36.x
and 1.0.x, verifying compatibility of Scout's ASGI middleware with
the Starlette 1.0 stable release. Also update setup.py classifiers
to reflect tested Django 5.x and Python 3.13/3.14 support.

Closes #836

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove starlette 0.36 envs (not relevant to 1.0 compat verification)
- Run only starlette tests in starlette envs (avoids collection errors
  from Django tests when Django is not installed)
- Add asgiref dep (needed by test, normally a Django transitive dep)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mitchh456 mitchh456 force-pushed the fix/836-starlette-1.0-compatibility branch from 1e57d8b to 10af94d Compare April 1, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify Scout Python agent compatibility with Starlette 1.0.0

1 participant