--- dependency_lab.py 2026-11-28 12:31:24.238621104 +0000 +++ dependency_lab_linux.py 2026-11-28 12:31:24.914091494 +0000 @@ -16,7 +16,7 @@ HERE = Path(__file__).resolve().parent -PIP_VERSION = "25.0.1" +PIP_VERSION = "25.1.1" COMMON = "c3-k00-common" LEGACY = "c3-k00-legacy" MODERN = "c3-k00-modern" @@ -213,6 +213,26 @@ must_equal("B inherits A VIRTUAL_ENV from shell", Path(explicit_b["virtual_env"]), a.parent.parent) must_equal("deactivation clears VIRTUAL_ENV", deactivated.strip(), "True") + else: + import shlex + probe = root / "probe.py" + probe.write_text(probe_command(a)[-1] + "\n", encoding="utf-8") + q = shlex.quote + commands = ( + f"set -e; . {q(str(a.parent / 'activate'))}; " + f"python -I {q(str(probe))}; " + f"{q(str(b))} -I {q(str(probe))}; " + 'deactivate; if [ -z "${VIRTUAL_ENV+x}" ]; then echo True; else echo False; fi' + ) + activated, explicit_b, deactivated = run( + "POSIX activate A / explicit B / deactivate", ["/bin/bash", "-c", commands] + ).splitlines() + activated, explicit_b = json.loads(activated), json.loads(explicit_b) + must_equal("PATH selects A after activation", Path(activated["executable"]), a) + must_equal("B full path selects B while A is activated", Path(explicit_b["executable"]), b) + must_equal("B inherits A VIRTUAL_ENV from shell", Path(explicit_b["virtual_env"]), a.parent.parent) + must_equal("deactivation clears VIRTUAL_ENV", deactivated.strip(), "True") + # One install request for the conflicting roots. Inspect the clean venv afterwards. install(clean, "joint roots conflict", ["-r", HERE / "requirements-conflict.txt"], expected=1, contains=("ResolutionImpossible", "c3-k00-common==1.0", "c3-k00-common==2.0")) @@ -285,8 +305,8 @@ return if args.report is None: parser.error("--report is required") - if platform.python_implementation() != "CPython" or sys.version_info[:3] != (3, 12, 10): - parser.error("use base CPython 3.12.10, whose ensurepip provides pip 25.0.1") + if platform.python_implementation() != "CPython" or sys.version_info[:3] != (3, 13, 5): + parser.error("use base CPython 3.13.5, whose ensurepip provides pip 25.1.1") report = { "environment": {"python": sys.version, "platform": platform.platform(), "machine": platform.machine(), "sys_platform": sys.platform,