Skip to content

setup_env.sh: report the venv's Python when reusing a venv (#53) - #113

Merged
Jiahuic merged 2 commits into
mainfrom
fix/53-setup-env-venv-python
Nov 17, 2026
Merged

Jiahuic merged 2 commits into
mainfrom
fix/53-setup-env-venv-python

Conversation

@Jiahuic

@Jiahuic Jiahuic commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

Closes #53.

When reusing an existing .venv, setup_env.sh printed the interpreter its discovery loop picked, not the one actually in the venv. So its output could claim the tests ran on 3.10 when they ran on 3.11.

  • Reusing a venv now prints the venv's own version: reusing .venv (Python 3.11.5).
  • If that differs from the discovered interpreter, it warns on stderr: note: differs from discovered Python 3.12.7; delete .venv to rebuild with it.
  • The test step prints the interpreter pytest runs on, so run notes record the real version (pitfall M5: deterministic evidence gathering #19).

The issue's second point, the README's "3.11 or newer" claim, is already fixed on main.

Verification: bash -n passes. I ran the venv block against a 3.11 venv with 3.12 and 3.11 as the discovered interpreter: the warning appears only for the mismatch.

🤖 Generated with Claude Code

Jiahuic and others added 2 commits November 17, 2026 12:20
The script printed the interpreter discovery picked, then reused an
existing .venv built by a different one, so 'python: 3.10' could sit above
a test run on 3.11. Reusing a venv now names the venv's own version and
warns when it differs, and the test step names the interpreter it runs on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jiahuic
Jiahuic merged commit ff5e715 into main Nov 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup_env.sh reports the interpreter it picked, not the venv's, when reusing a venv

1 participant