Skip to content

Commit fc9082c

Browse files
mitchh456claude
andauthored
Verify Starlette 1.0.0 compatibility (#846)
* Use Job.id property instead of removed get_id() method rq v2.7 refactored Job.id from `id = property(get_id, set_id)` to a `@property` decorator, removing get_id() as a callable method. Job.id has been available since rq v0.5.0 so this is backwards compatible. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Support FastMCP 3.x while maintaining 2.x backwards compatibility FastMCP 3.0 replaced private _call_tool_mcp()/_list_tools_mcp() with public call_tool()/list_tools() methods, and changed get_tool() to return None instead of raising when a tool is not found. - Update instrumentation to handle get_tool() returning None - Update tests with compat helpers that use the correct API based on the installed fastmcp version - Remove the fastmcp<3 version pin from tox.ini (no longer needed) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add explicit Starlette 1.0 test matrix and update classifiers 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> * Fix starlette tox envs for isolated testing - 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> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4591d64 commit fc9082c

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
"Framework :: Django :: 4.0",
7474
"Framework :: Django :: 4.1",
7575
"Framework :: Django :: 4.2",
76+
"Framework :: Django :: 5.0",
77+
"Framework :: Django :: 5.1",
78+
"Framework :: Django :: 5.2",
7679
"Framework :: Flask",
7780
"Intended Audience :: Developers",
7881
"Topic :: System :: Monitoring",

tox.ini

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ envlist =
44
{py310,py311,py312,py313}-django{40,41,42},
55
{py310,py311,py312,py313}-django{50a,51,52},
66
py314-django52,
7+
{py310,py311,py312,py313}-starlette10,
78
[testenv]
89
passenv =
910
ELASTICSEARCH_URL
@@ -51,7 +52,9 @@ deps =
5152
rq
5253
six
5354
sqlalchemy
54-
starlette
55+
!starlette10: starlette
56+
starlette10: starlette>=1.0,<1.1
57+
starlette10: asgiref
5558
webtest
5659
commands =
5760
pytest {posargs}
@@ -60,3 +63,7 @@ commands =
6063
[testenv:py{38,310,311,312,313,314}-django{40,41,42,50a,51,52}]
6164
commands =
6265
pytest {posargs} --asyncio-mode=auto
66+
67+
[testenv:py{310,311,312,313}-starlette10]
68+
commands =
69+
pytest tests/integration/test_starlette.py {posargs} --asyncio-mode=auto

0 commit comments

Comments
 (0)