Skip to content

docs: update isolated env example to use DefaultIsolatedEnv - #1090

Merged
gaborbernat merged 3 commits into
pypa:mainfrom
shenxianpeng:chore/fix-api-docs-isolated-env
Jun 8, 2026
Merged

gaborbernat merged 3 commits into
pypa:mainfrom
shenxianpeng:chore/fix-api-docs-isolated-env

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Jun 6, 2026 •

Copy link
Copy Markdown
Contributor

IsolatedEnvBuilder was renamed to DefaultIsolatedEnv, and the runner=env.runner usage no longer works. Updated the third example to use the current API.

closes #1089


Assisted by Pi + DeepSeek v4

The API docs example was still using  and ,
both of which no longer exist. Updated to  and the
 classmethod.
The previous example created an isolated environment but never installed
build dependencies into it, causing BuildBackendException at build time.
Added env.install(builder.build_system_requires) and
env.install(builder.get_requires_for_build('wheel')) calls and updated
the note at the top to clarify this requirement.
@shenxianpeng
shenxianpeng force-pushed the chore/fix-api-docs-isolated-env branch from 5abad88 to 9470364 Compare June 6, 2026 16:58
@shenxianpeng
shenxianpeng marked this pull request as ready for review June 6, 2026 16:58
@gaborbernat
gaborbernat merged commit c84376f into pypa:main Jun 8, 2026
10 checks passed
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.

Incorrect docs

3 participants