Repository navigation
Conversation
- Pass --python through to deploy quarto. - Run the inspector and pip with -E instead of -I so user site-packages are still visible, from the inspector's directory so a stray pip.py in the working directory is not imported. - Resolve ".." in the project path before searching parents for .venv. - Fall back to uv on PATH when the bundled uv binary can't be found. - Report pyproject.toml parse errors with their details. - Make preflight check the selected interpreter's Python version and accept --python, matching deploy. - Isolate interpreter-lookup and preflight tests from the shell's VIRTUAL_ENV, CONDA_PREFIX, and working directory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The inspector runs under rsconnect's own interpreter and imports its dependencies (packaging, toml). Starting it with -I hid user site-packages and PYTHONPATH, so `pip install --user` and PYTHONPATH installs failed with "No module named 'packaging'". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without the flush, Python 3.8 left nbconvert's diagnostics buffered when the error was raised, failing test_deploy_static_notebook_render_failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
|
|
||
| project = pathlib.Path(os.path.abspath(directory or os.curdir)) | ||
| project_environment = os.environ.get("UV_PROJECT_ENVIRONMENT") or ".venv" | ||
| for parent in (project, *project.parents): |
There was a problem hiding this comment.
🤖 The .venv search keeps going up to the filesystem root, so it can pick up an unrelated environment. The test test_project_environment_lookup_ignores_non_ancestors covers sibling directories, but no test covers an ancestor that is outside the project.
There was a problem hiding this comment.
🤖 The requested lookup explicitly includes the deployment directory’s ancestors without a project-root boundary, so this search intentionally continues to the filesystem root. A boundary would change the specified precedence and exclude legitimate parent environments. An explicit --python overrides discovery; I’ll add coverage documenting the ancestor behavior.
There was a problem hiding this comment.
I haven't programmed jokes into it.
|
|
||
| try: | ||
| proc = subprocess.Popen( | ||
| command = ( |
There was a problem hiding this comment.
🤖 The two branches don't produce equivalent output:
- Line 199–207: pip freeze silently skips pip, setuptools, wheel, and distribute. That's built-in pip behavior, not something this code asks for.
- Line 209: uv pip freeze lists every installed distribution, including those four.
Summary
Resolve uv once for export and pip-free or old-pip environments. Preserve pip's bootstrap exclusions and validate editable dependencies for both freeze paths.
Evidence
Merge Danger
Door: Two-way
Blast Radius: Deployment environment discovery and generated requirements.
Closes #889