@@ -8,7 +8,7 @@ license-files = ["LICENSE.txt"]
88requires-python = " >=3.10,<3.14"
99# Managed by python-semantic-release (see [tool.semantic_release]). Do not
1010# edit by hand; it is bumped automatically on merge to main.
11- version = " 2.0.0 "
11+ version = " 2.0.2 "
1212classifiers = [
1313 " Development Status :: 3 - Alpha" ,
1414 " Intended Audience :: Developers" ,
@@ -83,16 +83,15 @@ workflow = [
8383 " prefect>=2.20.25,<3.0" ,
8484 # prefect 2.20.25 is the final 2.x release (no backports). Its
8585 # GatherTaskGroup subclasses anyio's TaskGroup but doesn't implement
86- # create_task, which newer anyio 4.x made abstract (broken on 4.14,
87- # verified good on 4.6.2); hold anyio to the last verified-good 4.6 line
88- # so the prefect-2.x flow engine can still instantiate task groups.
89- " anyio>=4.4.0,<4.7" ,
86+ # create_task, which anyio 4.14.0 promoted to an abstract method
87+ # (start_soon stopped being the abstract one). 4.13.x is the last line
88+ # where the prefect-2.x flow engine can still instantiate task groups.
89+ # The floor is 4.9 so this stays compatible with mcp>=2, see
90+ # https://github.com/OpenSemanticLab/osw-python/issues/139
91+ " anyio>=4.9,<4.14" ,
9092]
9193tutorial = [" osw[dataimport]" ]
92- # mcp is deliberately excluded here: it requires anyio>=4.9, which conflicts
93- # with the workflow extra's anyio cap. Install it explicitly with osw[mcp].
94- # See https://github.com/OpenSemanticLab/osw-python/issues/139
95- all = [" osw[dataimport,DB,UI,S3,wikitext]" ]
94+ all = [" osw[dataimport,DB,UI,S3,wikitext,mcp]" ]
9695
9796[project .scripts ]
9897# command-line access to a live OSL instance, built from the same
@@ -106,31 +105,17 @@ requires = ["hatchling"]
106105build-backend = " hatchling.build"
107106
108107[dependency-groups ]
109- # pytest stack in its own group so it can be installed alongside the mcp
110- # extra, which conflicts with the dev group (see [tool.uv] below).
111- # tests/test_service_*.py run in a plain `uv sync` dev env (no mcp extra
112- # needed). Run the MCP-extra tests (tests/test_mcp_*.py) with:
113- # uv sync --extra mcp --group test --no-dev
114- # uv run --extra mcp --group test --no-dev --no-sync python -m pytest tests/test_mcp_*.py
115- test = [
108+ dev = [
109+ # test stack
116110 " pytest" ,
117111 " pytest-cov" ,
118112 " pytest-mock" ,
119113 " pytest-asyncio" ,
120- # not part of the mcp conflict set, so the shared service layer (which reads
121- # .env lazily) stays importable and testable in a plain `uv sync` env.
122- " python-dotenv>=1.0" ,
123- ]
124- dev = [
125- { include-group = " test" },
126- # prefect/anyio are listed directly rather than via osw[workflow]: the
127- # workflow extra is in a uv conflict set (see [tool.uv] below), so a
128- # self-referential osw[workflow] entry here would only activate when
129- # --extra workflow is passed, leaving a bare `uv sync` on the anyio that
130- # breaks prefect 2.20. Keep these pins in sync with the workflow extra.
131- # Tracked in https://github.com/OpenSemanticLab/osw-python/issues/139
132- " prefect>=2.20.25,<3.0" ,
133- " anyio>=4.4.0,<4.7" ,
114+ # inherit the capped prefect pin (<3.0); a bare "prefect" here resolved to
115+ # 3.x in CI, whose server API breaks the prefect-2.20-targeted tests.
116+ # mcp is included so the MCP server and its tests run in the same
117+ # environment as everything else.
118+ " osw[workflow,mcp]" ,
134119 " geopy" ,
135120 " deepl" ,
136121 " sqlalchemy" ,
@@ -327,19 +312,6 @@ insertion_flag = "<!-- version list -->"
327312[tool .semantic_release .changelog .default_templates ]
328313changelog_file = " CHANGELOG.md"
329314
330- [tool .uv ]
331- # mcp 2.x needs anyio>=4.9; the workflow extra caps anyio<4.7 for prefect 2.20
332- # (see the workflow extra above). They cannot share one resolution, so uv is
333- # told to resolve them in separate splits. Install the MCP server standalone:
334- # pip install "osw[mcp]".
335- # The dev group is included too since it carries the same anyio cap directly
336- # (see the dev group above). Tracked in
337- # https://github.com/OpenSemanticLab/osw-python/issues/139
338- conflicts = [
339- [{ extra = " mcp" }, { extra = " workflow" }],
340- [{ extra = " mcp" }, { group = " dev" }],
341- ]
342-
343315[tool .ty .environment ]
344316python = " ./.venv"
345317python-version = " 3.10"
@@ -350,10 +322,8 @@ python-version = "3.10"
350322# - examples, scripts: illustrative/maintenance code, not part of the package
351323# - tests: not yet type-clean, tightened in a follow-up
352324#
353- # src/osw/mcp is no longer excluded. The mcp extra still cannot be installed
354- # alongside the dev group (issue #139), so the two SDK imports in server.py
355- # carry an inline `ty: ignore[unresolved-import]`; everything else there, and
356- # all of src/osw/service and src/osw/cli, is checked.
325+ # src/osw/mcp, src/osw/service and src/osw/cli are checked: the mcp extra is
326+ # part of the dev group, so the SDK imports resolve.
357327exclude = [
358328 " src/osw/model/entity.py" ,
359329 " examples" ,
0 commit comments