Skip to content

Fix generated Python package long-path installs - #216

Merged
leileizhang (lei9444) merged 3 commits into
mainfrom
lei9444-python-package-paths
Oct 9, 2026
Merged

leileizhang (lei9444) merged 3 commits into
mainfrom
lei9444-python-package-paths

Conversation

@lei9444

Copy link
Copy Markdown
Contributor

Generated Python packages can fail source or wheel installation on Windows with long paths disabled even when their generated source paths fit the legacy limit.

  • Selectively shorten over-budget module paths using complete type identities and UTF-16 budgets that account for namespaces, bytecode caches, and atomic-write temporary names. Compact both setuptools build and wheel staging directories while retaining layout/package cache isolation.
  • Record the complete generator_version, including preview suffixes. Reject mismatched, downgraded, unstamped legacy, or corrupt producer metadata before changing existing output; require manual cleanup and full regeneration. Same-version incremental generation remains supported.

Public type names, namespace APIs, and ordinary short entrypoints remain compatible. Direct imports of shortened long modules must migrate; no long-filename shims or automatic migration are added. Arbitrary checkout, package-name, or venv depths are not guaranteed.

Regression coverage includes real source/wheel installs with long paths disabled, installed imports and Windows calls, strict stub and inline consumers, optimized bytecode, --no-pyi, Unicode output roots, version refusal/rollback, and incremental-versus-fresh parity.

Selectively shorten Python module paths with UTF-16, namespace, bytecode and atomic-write headroom. Compact layout-scoped setuptools build and wheel staging directories. Record the complete producer version and reject incompatible or unstamped generated output before mutation, preserving same-version incremental generation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2016e084-e482-4076-abde-eb8c13baf510
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Mixed-language test coverage

Workflow status: ✅ Passed

Layer Lines Functions Branches/regions
Rust, including native .pyd/.node 87.09% 82.66% 86.82% regions
Python aggregate 70.59% n/a 36.93% branches
Python runtime 98.17% n/a 94.57% branches
Generated Python WinRT projections 68.89% n/a 30.47% branches
Generated Python WinRT implementations 71.97% n/a 46.3% branches
JavaScript aggregate 18.5% 24.91% 56.05% branches
JavaScript runtime 44.27% 45.76% 78.99% branches
Generated WinRT projections 17.36% 19.38% 52.59% branches
Generated WinRT implementations 45.99% 59.19% 60.97% branches
Generated Classic COM projections 11.52% 23.97% 53.4% branches

View workflow run and download full HTML/LCOV/XML reports

leileizhang (lei9444) and others added 2 commits October 9, 2026 15:19
Migrate formatter interfaces, nested struct helpers and delegate constants away from long implementation filenames. Preserve all scenario assertions and verify the complete 56-case Python E2E matrix against the compact layout.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2016e084-e482-4076-abde-eb8c13baf510
Replace deprecated build-base/bdist-dir options with build_base/bdist_dir while retaining compact hash-scoped paths. Update renderer assertions and packaging E2E cache checks; verify both deprecation warnings are gone and source/wheel installation still passes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2016e084-e482-4076-abde-eb8c13baf510
@lei9444
leileizhang (lei9444) merged commit c49377e into main Oct 9, 2026
33 checks passed
@lei9444
leileizhang (lei9444) deleted the lei9444-python-package-paths branch October 9, 2026 08:42
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.

2 participants