Skip to content

Add Python startup environment hook - #3089

Open
mikemegally-ms wants to merge 1 commit into
microsoft:mainfrom
mikemegally-ms:mikemegally-microsoft-python-startup-environment-hook
Open

mikemegally-ms wants to merge 1 commit into
microsoft:mainfrom
mikemegally-ms:mikemegally-microsoft-python-startup-environment-hook

Conversation

@mikemegally-ms

Copy link
Copy Markdown

Add an optional host-supplied script as an ordering point after Python environment, package, and virtual environment setup and before existing pre-run and application commands.

Preserve generated startup behavior when the option is omitted or empty, and propagate sourced-script failures so later commands do not run.

Add unit and Linux runtime coverage for ordering, quoting, legacy compatibility, environment visibility, and failure handling, and document the public command contract.

  • The purpose of this PR is explained in this message or in an issue. If an issue please include a reference as #<issue_number>: the PR body explains the optional Python startup-environment hook, its ordering, compatibility, and failure behavior. No issue reference is required.
  • Tests are included and/or updated for code changes: added:
  • startupenvironment_test.go
  • startupenvironment_linux_test.go
    Targeted Go tests passed: GOTOOLCHAIN=local go test -count=1 ./...
  • Proper license headers are included in each file: all four changed/new Go files contain the standard Microsoft copyright and MIT license header. doc/runtimes/python.md follows the repository’s documentation convention and does not require a source-file header.

Add an optional host-supplied script as an ordering point after Python environment, package, and virtual environment setup and before existing pre-run and application commands.

Preserve generated startup behavior when the option is omitted or empty, and propagate sourced-script failures so later commands do not run.

Add unit and Linux runtime coverage for ordering, quoting, legacy compatibility, environment visibility, and failure handling, and document the public command contract.

Copilot-Session: 6da0bd9a-d445-4bc2-991d-6993c4b770e8
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mikemegally-ms
mikemegally-ms requested a review from a team as a code owner September 21, 2026 23:07
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.

1 participant