Skip to content

Fix VIRTUAL_ENV_PROMPT value in activator/activate#13501

Merged
charliermarsh merged 1 commit intoastral-sh:mainfrom
ericbn:fix_virtual_env_prompt_in_activate
May 17, 2025
Merged

Fix VIRTUAL_ENV_PROMPT value in activator/activate#13501
charliermarsh merged 1 commit intoastral-sh:mainfrom
ericbn:fix_virtual_env_prompt_in_activate

Conversation

@ericbn
Copy link
Contributor

@ericbn ericbn commented May 17, 2025

Summary

I've compared all the activator scripts here with the original ones in https://github.com/pypa/virtualenv/tree/main/src/virtualenv/activation and only the bash/POSIX script here was yielding a VIRTUAL_ENV_PROMPT value with parenthesis and a trailing space, which should be part of the shell prompt (PS1 for bash/POSIX) but not of the VIRTUAL_ENV_PROMPT value itself. This fixes that small inconsistency. Fixes #13456

This reverts commit 0ec2d4e

Test Plan

I didn't test this locally.

I've compared all the activator scripts here with the original ones in
https://github.com/pypa/virtualenv/tree/main/src/virtualenv/activation
and only the bash/POSIX script here was yielding a VIRTUAL_ENV_PROMPT
value with parenthesis and a trailing space, which should be part of the
shell prompt (PS1 for bash/POSIX) but not of the VIRTUAL_ENV_PROMPT
value itself. This fixes that small inconsistency. Fixes #13456

This reverts commit 0ec2d4e
@charliermarsh
Copy link
Member

I tend to agree with this change.

@charliermarsh charliermarsh enabled auto-merge (squash) May 17, 2025 11:47
@charliermarsh charliermarsh added the compatibility Compatibility with a specification or another tool label May 17, 2025
@charliermarsh charliermarsh disabled auto-merge May 17, 2025 11:48
@charliermarsh charliermarsh merged commit be1404d into astral-sh:main May 17, 2025
85 of 86 checks passed
@ericbn ericbn deleted the fix_virtual_env_prompt_in_activate branch May 17, 2025 16:08
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 20, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.7.5` -> `0.7.6` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.7.6`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#076)

[Compare Source](astral-sh/uv@0.7.5...0.7.6)

##### Python

-   Add Python 3.14 on musl
-   Add free-threaded Python on musl
-   Add Python 3.14.0a7
-   Statically link `libpython` into the interpreter on Linux for a significant performance boost

See the
[`python-build-standalone` release notes](https://github.com/astral-sh/python-build-standalone/releases/tag/20250517)
for more details.

##### Enhancements

-   Improve compatibility of `VIRTUAL_ENV_PROMPT` value ([#&#8203;13501](astral-sh/uv#13501))
-   Bump MSRV to 1.85 and Edition 2024 ([#&#8203;13516](astral-sh/uv#13516))

##### Bug fixes

-   Respect default extras in uv remove ([#&#8203;13380](astral-sh/uv#13380))

##### Documentation

-   Fix PowerShell code blocks ([#&#8203;13511](astral-sh/uv#13511))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4xNS4wIiwidXBkYXRlZEluVmVyIjoiNDAuMTUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
ericbn added a commit to zimfw/eriner that referenced this pull request May 21, 2025
ericbn added a commit to zimfw/agnoster that referenced this pull request May 21, 2025
ericbn added a commit to zimfw/agnoster that referenced this pull request May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility Compatibility with a specification or another tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VIRTUAL_ENV_PROMPT format in uv differs from venv or virtualenv

2 participants