Repository navigation
Fix Deno versioning and isolate PythonInterpreter dependencies - #10186
Merged
Merged
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019fdcb0-8d3a-736a-b5fa-3626e7767d03 Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
Contributor
Greptile SummaryThis change adds a managed Deno runtime option and makes generated PythonInterpreter commands hermetic. Runtime checks confirmed that explicit custom Deno commands preserve Confidence Score: 5/5No blocking failure remains. The exercised custom-command, invalid-runtime, and ambient-resolution paths all produced the intended behavior.
What T-Rex did
Reviews (4): Last reviewed commit: "fix: support all Deno 2 runtimes" | Re-trigger Greptile |
Amp-Thread-ID: https://ampcode.com/threads/T-019fdcb0-8d3a-736a-b5fa-3626e7767d03 Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
Amp-Thread-ID: https://ampcode.com/threads/T-019fdcb0-8d3a-736a-b5fa-3626e7767d03 Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
Amp-Thread-ID: https://ampcode.com/threads/T-019fec5b-1389-7492-bda0-c089571f50d8 Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
Amp-Thread-ID: https://ampcode.com/threads/T-019fec5b-1389-7492-bda0-c089571f50d8 Co-authored-by: Isaac Miller <isaac@cmpnd.ai>
Collaborator
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dspy[deno]extra backed by Deno's official PyPI binary distribution (>=2.4.5,<3)denoand explicitdeno_commandfallbacks>=2.0.0,<3)package.json,deno.json, lockfiles, and localnode_modules0.29.4Root cause
PythonInterpreterlaunched an absoluterunner.jspath but inherited the caller's working directory and Deno project discovery. When the cwd or an ancestor containedpackage.jsonandnode_modules, Deno could resolve the unpinnednpm:pyodideimport through that project. Those files were outside DSPy's read allowlist, causing startup to fail withNotCapable, followed by an unresolved top-level await.The default invocation is now hermetic: DSPy's generated Deno subprocesses receive
DENO_NO_PACKAGE_JSON=1, and the runner is launched with--no-config,--no-lock, and--node-modules-dir=false. The same resolved executable is used for version detection,deno info, and execution.Compatibility
pip install dspycontinues to use a compatible Deno 2.x runtime onPATH.pip install "dspy[deno]"installs and locks the managed runtime from the earliest official stable PyPI package (2.4.5) through the latest 2.x release.>=2.0.0,<3.0.0is accepted; the minimum was verified against the real Deno 2.0.0 binary rather than inherited from the previous CI pin.deno_commandremains unchanged, retains its caller-controlled environment, and bypasses default version validation.setup-denoto cover the existing PATH-based installation flow.deno --versionanddeno info --jsonare bounded to 10 seconds; version results are not cached across separate process launches.Validation
uv run pytest tests/primitives/test_python_interpreter.py --deno -q— 91 passedpackage.json,package-lock.json,deno.json, corruptdeno.lock, and fakenode_modules/pyodide— passed without project-tree mutationsdenoPython package — passeduv lock --check, Ruff, andgit diff --check— passedrunner.jsand advertises the managed Deno range