Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(community): Bump pyodide dev version and allow peer installs up to current latest #6680

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

benjamincburns
Copy link
Contributor

@benjamincburns benjamincburns commented Sep 2, 2024

Prior to this change, the langchain package's peer dependency on pyodide was restricted to ^0.24.1. Because this is an unstable release, this causes peer dependency conflict warnings in user code that depends on the latest version (0.26.2).

This change updates the range in the peer dependency to allow peer versions from the previously-defined version until the current latest minor version (allowing for patch updates), and sets the dev dependency version to the caretted latest version, to ensure that tests still pass with this version.

I also audited the Pyodide Changelog for breaking changes that might affect the PythonInterpreterTool (the only direct use of pyodide that I can find). While there weren't any logic changes that would break the direct use of pyodide in LangChain code, there was one breaking change to the input params object of the loadPyodide function in 0.25.0.

With respect to whether these changes cause any breakages in the LangChain API, I think that's a bit open to interpretation, and it would depend on how you classify breaking changes to experimental tools, and whether you regard interface structures that are "forwarded" from a peer dependency to be part of the LangChain public API.

I mention this because PythonInterpreterToolParams is defined as a type intersection with the loadPyodide params object, meaning that breaking changes to that type do effectively cause breaking changes to PythonInterpreterToolParams. That said, even setting aside that PythonInterperterTool is an experimental tool and this likely doesn't matter for that reason, I'd argue that by setting the version range to continue to allow versions that matched the old range, these changes aren't actually breaking, as the consumer of LangChain can decide whether or not they want a version of pyodide from before or after these breakages.

For good measure I also checked comments for links to pyodide docs (e.g. in examples/src/tools/pyinterpreter.ts) and those are still valid and live.

Finally, sorry for closing & reopening this - my original PR & branch mentioned "pydantic" in a bunch of places when I meant "pyodiode." 😊

Copy link

vercel bot commented Sep 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Sep 4, 2024 8:27pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Sep 4, 2024 8:27pm

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Sep 2, 2024
Copy link

vercel bot commented Sep 2, 2024

@benjamincburns is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Sep 2, 2024
@jacoblee93
Copy link
Collaborator

Thank you very much!

I'll merge this for now, we could also just use a tilde if we think the maintainers won't make any heavily breaking changes until 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants