You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pip freeze filtering drops any line containing "rsconnect" but keeps local editable installs #899
🤖 The filtering applied to pip freeze output in rsconnect/subprocesses/inspect_environment.py both drops too much and keeps too much.
1. Over-matching: any line containing rsconnect is dropped
[lineforlineinpip_stdout.split("\n") if (("rsconnect"notinline) and ...)]
This is meant to remove rsconnect-python itself, but it is a substring match. It also drops:
unrelated packages whose name contains rsconnect (e.g. my-rsconnect-utils==0.1)
every-e /path or name @ file:///path line whose path contains rsconnect (e.g. a project under ~/src/rsconnect-python/... or ~/work/rsconnect-demo/)
These lines disappear from requirements.txt without any message.
2. Under-matching: local editable installs are kept
strip_ref only rewrites name @ file:... lines. -e /local/path lines from editable installs, and pip's # Editable install with no version control (...) comment, pass through into the bundle. Connect can't install from a local path on the publisher's machine, so the build fails.
Repro
uv venv --seed .venv
uv pip install -p .venv/bin/python -e ./localpkg six # localpkg: any local project
.venv/bin/python -m pip freeze
# -e /abs/path/localpkg <- passes through into requirements.txt (unless the path contains "rsconnect", then silently dropped)
Suggested direction
Match the rsconnect distribution by exact project name (rsconnect-python / rsconnect_python, case-insensitive, followed by ==, @, or end of line). Warn about, or drop, editable local-path requirements. Related: #857 (the same filter is applied to user-provided requirements files).
Found during live QA of #892 against Posit Connect. Reproduced on 1.32.0 and current main (0287aca3).
Activity