# languages: Support terminal auto-activation for \`poetry\` managed Python environment \(\#46900\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/e1f73a61fe04efc4df1d4a60ed2d0925eac21995)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: e1f73a61fe04efc4df1d4a60ed2d0925eac21995

Requested commit: e1f73a61fe04efc4df1d4a60ed2d0925eac21995

Commit: e1f73a61fe04efc4df1d4a60ed2d0925eac21995

Tree: a8e21080d5b83a8b8c1d9a4d9731958e8d49ad72

Author: Xin Zhao

Committer: GitHub

## Message

```
languages: Support terminal auto-activation for `poetry` managed Python environment (#46900)

Although `poetry` may store virtual environments in a global cache
directory (unlike the standard project-local `.venv`), the internal
directory structure of these environments remains consistent with
standard `venv` or `uv` environments.

Since our existing activation logic for `venv` environments relies on
relative paths within the environment root, it is naturally compatible
with `poetry` environments. Once the toolchain locates the environment's
root directory, the activation scripts can be applied without further
modification.

Testing:
- Verified on Windows: Confirmed working across `PowerShell`, `Pwsh`,
and `Cmd` for global poetry environments.
- Observation: When using an in-project `.venv` directory, the toolchain
may categorize the environment as `venv`-managed instead of
`poetry`-managed. While this behavior relates to the toolchain's
discovery logic, the activation itself remains fully functional as the
underlying structure is compatible.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

- [d139c5e6d20e293cd5977918db7a1a83f1dc90e9](https://git.cafe/gitcafe/zed/commit/d139c5e6d20e293cd5977918db7a1a83f1dc90e9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/e1f73a61fe04efc4df1d4a60ed2d0925eac21995?format=markdown)
