@devries-cameron20 / composio Mirror · read-only / commits / 54949b27b
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 04:45 UTC

fix(python): exclude tests from Claude Agent SDK wheels (#5344)

## Summary Installing the Claude Agent SDK provider no longer shadows a consuming project's `tests` package. Fixes #5331. ## Changes - Exclude `tests` and its subpackages from package discovery. - Apply the same exclusion in the provider generator. - Add the Python SDK patch changeset. ## Type of change - [x] Bug fix ## How Has This Been Tested? - Reproduced the consumer import failure with the original wheel containing `tests/__init__.py` and `tests/test_provider.py`. - Built the fixed sdist and its wheel with `python -m build --no-isolation` (Python 3.12, build 1.5.0, setuptools 84.0.0). Verified the wheel excludes `tests/` and keeps all provider files, including `py.typed`, byte-identical. - Installed the wheel with `pip install --no-deps --target` in a temporary directory; `tests.helpers` resolves from a consumer placed after that directory on `sys.path`. - `ruff check python/providers/claude_agent_sdk/setup.py` and `ruff format --check python/providers/claude_agent_sdk/setup.py` pass; `twine check` passes for the wheel and sdist. - Generated both regular and agentic providers, added `tests/__init__.py` and `tests/nested/__init__.py`, and built their sdists and wheels. Both exclude tests and retain provider files and `py.typed`; the unmodified generator leaked both test packages. `bash -n python/scripts/create-provider.sh` passes. - No unit test added: this is package-discovery configuration, verified against built and installed distributions. ## Screenshots (if applicable) N/A ## Checklist - [ ] I have read the Code of Conduct and this PR adheres to it - [x] I have read and understand every line of this diff, including any LLM-generated code - [x] Any third-party docs links or promotional content follow the third-party links policy - [x] I ran linters/tests locally and they passed - [x] I updated documentation as needed - [x] I added tests or explain why not applicable - [x] I added a changeset if this change affects published packages ## Additional context Code review completed with no findings.

Alberto Schiabel committed Nov 13, 2026 at 11:44 UTC 54949b27b01739461599a644bf41bcfc7f523f9e
3 files changed +7 -2
.changeset/claude-agent-sdk-wheel-tests.md new
+5
@@ -0,0 +1,5 @@
1 +---
2 +'@composio/python-sdk': patch
3 +---
4 +
5 +Exclude the Claude Agent SDK provider's tests package from its wheel to avoid shadowing consuming projects' tests.
python/providers/claude_agent_sdk/setup.py
+1 -1
@@ -21,7 +21,7 @@ setup(
21 "Operating System :: OS Independent",
22 ],
23 python_requires=">=3.11,<3.16",
24 - packages=find_packages(),
24 + packages=find_packages(exclude=["tests", "tests.*"]),
25 install_requires=["claude-agent-sdk>=0.2.128,<1", "composio"],
26 include_package_data=True,
27 )
python/scripts/create-provider.sh
+1 -1
@@ -78,7 +78,7 @@ from setuptools import setup, find_packages
78 setup(
79 name="$PACKAGE_NAME",
80 version="0.1.0",
81 - packages=find_packages(),
81 + packages=find_packages(exclude=["tests", "tests.*"]),
82 install_requires=[
83 "composio>=0.1.0",
84 ],