Skip to content

Fix PyInstaller version data collision#2867

Open
yxshee wants to merge 2 commits into
pythonarcade:developmentfrom
yxshee:agent/fix-version-file-collision
Open

Fix PyInstaller version data collision#2867
yxshee wants to merge 2 commits into
pythonarcade:developmentfrom
yxshee:agent/fix-version-file-collision

Conversation

@yxshee

@yxshee yxshee commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • Rename the packaged arcade/VERSION data file to arcade/_VERSION and update all readers, package metadata, and contributor documentation.
  • Correct the PyInstaller hook's data destination to the arcade directory; PyInstaller interprets the second tuple item as a destination directory, not a file path.
  • Add regression coverage for case-insensitive package-name collisions and the hook's final bundled _VERSION path.

Root cause and impact

The version data file case-folded to the same name as the arcade.version module. The hook also used ./arcade/VERSION as a filename-shaped destination, although PyInstaller treats that value as a directory. Together with collect_all("arcade"), this caused a file/directory collision during the Windows COLLECT phase.

The public arcade.VERSION and arcade.__version__ APIs are unchanged.

Fixes #2837

Validation

  • pytest tests/unit/test_version.py tests/unit/test_pyinstaller_hook.py -q — 32 passed
  • Ruff formatting, import sorting, and lint checks on changed Python files — passed
  • mypy and repository-pinned pyright on changed source files — passed
  • uv build — wheel and sdist built; both contain arcade/_VERSION and no arcade/VERSION
  • PyInstaller 6.21 smoke build with --collect-all arcade — completed; frozen executable printed 4.0.0.dev5 and contained _internal/arcade/_VERSION

Disclosure: this contribution was prepared with AI assistance. I reviewed the final diff and ran every check listed above.

Copilot AI review requested due to automatic review settings July 20, 2026 22:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR resolves a Windows PyInstaller collect_all("arcade") collision by renaming the packaged version data file from arcade/VERSION to arcade/_VERSION, updating readers and packaging inputs, and adding regression tests to prevent future case-insensitive path conflicts.

Changes:

  • Renamed the packaged version data file to arcade/_VERSION and updated code paths that read it.
  • Corrected the PyInstaller hook data destination to target the arcade directory (as required by PyInstaller’s (source, dest_dir) semantics).
  • Added regression tests covering case-folded collisions and the bundled _VERSION destination path.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
webplayground/server.py Updates local web playground version-file read path to _VERSION.
tests/unit/test_version.py Adds tests to ensure _VERSION is loaded and data/module names don’t collide when case-folded.
tests/unit/test_pyinstaller_hook.py Adds regression test asserting _VERSION is bundled to arcade/_VERSION.
RELEASE_CHECKLIST.md Updates release instructions to point to arcade/_VERSION.
MANIFEST.in Updates sdist inclusion rule from VERSION to _VERSION.
doc/conf.py Updates commented-out version read path to _VERSION.
CHANGELOG.md Documents the PyInstaller collision fix.
arcade/version.py Switches default version file path and updates docstrings to _VERSION.
arcade/_VERSION Adds the new version data file.
arcade/__pyinstaller/hook-arcade.py Updates hook to collect _VERSION and fixes the destination directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/unit/test_pyinstaller_hook.py
Comment thread arcade/version.py Outdated
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.

PyInstaller collect_all fails on Windows: VERSION file collides with arcade.version submodule

2 participants