Skip to content

Use the dot command in ksh activation hints - #2623

Draft
astral-automations-bot[bot] wants to merge 1 commit into
automations/reproduce-bug/22537from
automations/fix-bug/22537
Draft

astral-automations-bot[bot] wants to merge 1 commit into
automations/reproduce-bug/22537from
automations/fix-bug/22537

Conversation

@astral-automations-bot

Copy link
Copy Markdown

Use the POSIX dot command in ksh virtual-environment activation hints, retaining shell path quoting and other shells’ behavior. Update the existing regression test to require the corrected hint. Fixes astral-sh#22537

@codspeed

codspeed Bot commented Oct 14, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.75%

⚠️ 8 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

❌ 2 regressed benchmarks
✅ 52 untouched benchmarks
⏩ 35 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ ⚠️ Simulation discover_workspace_from_all_members_with_excludes 139.4 ms 159.5 ms -12.61%
❌ ⚠️ Simulation discover_workspace_from_all_members 131.1 ms 147.1 ms -10.9%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing automations/fix-bug/22537 (8fcac14) with main (06bf2e8)2

Open in CodSpeed

Footnotes

  1. 35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on automations/reproduce-bug/22537 (eac2d92) during the generation of this report, so main (06bf2e8) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@astral-automations-bot astral-automations-bot Bot added the bug Something isn't working label Oct 14, 2026
charliermarsh pushed a commit to astral-sh/uv that referenced this pull request Oct 14, 2026
- Fix venv activation command for ksh shell in
`crates/uv/src/commands/venv.rs`

- Add `create_venv_ksh` test in `crates/uv/tests/python/venv.rs` to
create venv with `ksh` shell

Code for test from 2 PRs created by astral-automations-bot:
- astral-sh/pull/2622
- astral-sh/pull/2623

Fix #22537

---
Tests OK for `venv` with `cargo nextest`:
```sh
$ cargo nextest run -E 'test(venv::create_venv_ksh)'
(...)
    Finished `test` profile [unoptimized + debuginfo] target(s) in 45.10s
  SETUP PASS [   0.009s] setup-hook-unix: scripts/nextest-setup-hook-unix.sh
        PASS [   0.992s] uv::python venv::create_venv_ksh
────────────
     Summary [   1.014s] 1 test run: 1 passed, 5413 skipped

$ cargo nextest run -E 'test(venv::)'
(...)
        PASS [   3.232s] uv::python venv::seed
        PASS [   1.408s] uv::python venv::virtual_dependency_group
        PASS [   1.336s] uv::python venv::virtual_empty
        PASS [   5.201s] uv::python venv::seed_keeps_distutils_patch_on_py39
        PASS [   5.100s] uv::python venv::seed_older_python_version
        PASS [   5.481s] uv::python venv::seed_skips_distutils_patch_on_py310
────────────
     Summary [  17.187s] 61 tests run: 61 passed, 5353 skipped
```

---

Tested on OpenBSD with `ksh` and `bash` shell for venv creation =>
output for activation command.

- bash shell
```sh
$ echo $SHELL
/usr/local/bin/bash

$ uv venv venv-bash
Using CPython 3.14.8 interpreter at: /usr/local/bin/python
Creating virtual environment at: venv-bash
Activate with: source venv-bash/bin/activate
```
- ksh shell
```sh
openbsd-dev$ echo $SHELL
/bin/ksh

openbsd-dev$ uv venv venv-ksh
Using CPython 3.14.8 interpreter at: /usr/local/bin/python
Creating virtual environment at: venv-ksh
Activate with: . venv-ksh/bin/activate
```

---------

Signed-off-by: Laurent Cheylus <[email protected]>

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants