build(deps): pin langchain family to 0.3.x/0.1.x lines to fix broken installs - #10
Conversation
…n installs The langchain, langchain-openai, langchain-community, and langchain-mcp-adapters dependencies had lower bounds but no upper bounds. A fresh resolve therefore pulls langchain 1.x, which removed langchain.chains, langchain.schema, and langchain.llms - modules this codebase imports throughout. That breaks every import of connectchain and makes the entire test suite uncollectable on a clean install. Pin these packages to the 0.3.x / 0.1.x lines the code actually targets: langchain>=0.3.26,<0.4.0 langchain-openai>=0.3.24,<0.4.0 langchain-community>=0.3.26,<0.4.0 langchain-mcp-adapters>=0.1.0,<0.2.0 Co-authored-by: Claude <noreply@anthropic.com>
Runtime verification — PASS ✅Verified by runtime observation (dependency resolution + package import), not by test suite. Two fully separate fresh venvs (Python 3.11.14), forced fresh resolves (isolated cache). With the pin (this branch): resolves Counterfactual (parent commit, unpinned, fresh resolve): resolves langchain 1.3.11 and explodes on the first line of the package: All three removed module families ( Worth knowing: the unpinned |
|
Preetam,Excellent. I’m glad to see my PR’s are being merged.I also did testing and analysis of the amex jest-image-snapshot repo. After forking and testing the code, my analysis found a number of bugs. Can you help me escalate these PR’s to package maintainers for review?Secondly, have you reviewed my follow up PR’s in the connect chain repo? Jest-image-snapshot PR’s for review: fix: surface the real error when the diff child process fails by wilsonhj · Pull Request #406 · americanexpress/jest-image-snapshotgithub.com fix: store received image for new snapshots in CI when storeReceivedOnFailure is set by wilsonhj · Pull Request #405 · americanexpress/jest-image-snapshotgithub.comfeat: warn when a 'percent' failureThreshold is set above 1 by wilsonhj · Pull Request #404 · americanexpress/jest-image-snapshotgithub.comConnectChain Fix PR’s: fix: model init, session cache, retry semantics; config accessors raise AttributeError for missing keys by wilsonhj · Pull Request #11 · americanexpress/connectchaingithub.comfix: MCP loader/agent — empty-list semantics, collision warning, kwargs forwarding, concurrent execution by wilsonhj · Pull Request #12 · americanexpress/connectchaingithub.comDocumentation PR:docs: add architecture guide, developer guide, and roadmap by wilsonhj · Pull Request #13 · americanexpress/connectchaingithub.comDo you have any questions?Best,Hiro JamesFounder @ Shiba_Software_Consulting / A.I. SWESent from my iPadOn Jul 16, 2026, at 14:34, Preetam Matta ***@***.***> wrote:
Merged #10 into main.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Why this PR exists
pyproject.tomlcurrently has no upper bound on thelangchainfamily. A freshpip install connectchain/uv synctoday resolves langchain 1.x, which removedlangchain.chains,langchain.schema, andlangchain.llms— modules this codebase imports throughout. Result: every import ofconnectchainfails (ModuleNotFoundError) and the test suite is uncollectable on a clean environment.What it does
Adds upper bounds pinning to the lines the code actually targets — a 4-line diff, nothing else:
Verification
uv sync --devresolves langchain==0.3.30 (0.3.x line) andpython -c "import connectchain"succeeds on a clean env.test_model_with_unsupported_provider) is pre-existing onmainand unrelated to dependency resolution (it asserts an outdated error message; a separate PR addresses it).Sequencing
This is the first of a small series of focused PRs (dependency pin → sanitizer/orchestrator fixes → model/session/config fixes → MCP fixes → docs). The later PRs each include this pin so they build standalone; those hunks rebase away once this merges.
Co-authored-by: Claude noreply@anthropic.com