mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[PR #714] Escape generated build environment metadata #727
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepEP#727
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepEP/pull/714
Author: @Mr-Neutr0n
Created: 8/3/2026
Status: 🔄 Open
Base:
main← Head:fix/persistent-env-escaping📝 Commits (2)
91297eaEscape persistent environment build metadata76da8b2Reuse generated environment output directory📊 Changes
2 files changed (+50 additions, -6 deletions)
View changed files
📝
setup.py(+12 -6)➕
tests/utils/test_setup_helpers.py(+38 -0)📄 Description
Problem
CustomBuildPyinterpolates persistent environment values directly into single-quoted Python literals when generatingdeep_ep/envs.py. A valid cache path containing an apostrophe produces invalid Python, while backslashes can silently change the stored value.Fix
Extract the source renderer and use Python
reprfor both environment names and values. Only the existing persistent-environment allowlist is emitted.Regression coverage
The host-only tests compile and execute the generated source, then verify exact round trips for apostrophes, backslashes, and spaces. They also verify that unrelated environment values are ignored.
Validation
python -m unittest tests.utils.test_setup_helpers(2 passed)ruff check tests/utils/test_setup_helpers.pygit diff --checkPrepared with OpenAI Codex assistance; I reproduced the invalid generated source and reviewed the serialized output.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.