Skip to content

PEP Provider - VirtualEnv Recommendation - #93

Closed
DEKHTIARJonathan wants to merge 1 commit into
pep-providersfrom
pep-provider-venv
Closed

DEKHTIARJonathan wants to merge 1 commit into
pep-providersfrom
pep-provider-venv

Conversation

@DEKHTIARJonathan

Copy link
Copy Markdown
Member

Adjustments to follow better: https://peps.python.org/pep-0517/#recommendations-for-build-frontends-non-normative

We could almost copy/paste the entire section to be fair. But at the very minimum we need this

@warsaw @emmatyping : I guess quoting PEP 517 inside the PEP is not really something people appreciate. Do you think it would be more appropriate to quote/copy the entire paragraph (with reference) from 517 here ?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Environment identity must account for complete provider requirements and plugin API, not only package/version.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates PEP 9999 to recommend isolated virtual environments for provider plugins.

Changes:

  • Recommends separate environments for provider package/version combinations.
  • Clarifies provider environment isolation.
File Description
peps/​pep-9999.rst Updates provider installation recommendations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread peps/pep-9999.rst
Comment on lines +147 to +149
virtual environment per unique (variant provider package name, version)
pair. Different provider packages use separate environments; two versions
of the same provider package also use two separate environments.

@mgorny mgorny left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a valid requirement, and it's poorly justified (in fact, no justification is given in the PEP in this change). The security story says we avoid dependencies with few exceptions, so conflicts are unlikely. Even if that wasn't the case, we require this to work without venv (or more precisely, in the single venv that tools create when building packages), hence people can't introduce conflicting dependencies.

@rgommers rgommers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong indeed. What if you have a whole stack like torch <- vllm <- etc <- etc. that all need the same provider? An installer can know beforehand what provider version is needed; this requirement would force it to create four isolated envs with the same copy of the provider.

This is better left up to the tools.

@mgorny mgorny closed this Sep 28, 2026
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.

4 participants