Fix PyInstaller version data collision#2867
Open
yxshee wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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/_VERSIONand updated code paths that read it. - Corrected the PyInstaller hook data destination to target the
arcadedirectory (as required by PyInstaller’s(source, dest_dir)semantics). - Added regression tests covering case-folded collisions and the bundled
_VERSIONdestination 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
arcade/VERSIONdata file toarcade/_VERSIONand update all readers, package metadata, and contributor documentation.arcadedirectory; PyInstaller interprets the second tuple item as a destination directory, not a file path._VERSIONpath.Root cause and impact
The version data file case-folded to the same name as the
arcade.versionmodule. The hook also used./arcade/VERSIONas a filename-shaped destination, although PyInstaller treats that value as a directory. Together withcollect_all("arcade"), this caused a file/directory collision during the WindowsCOLLECTphase.The public
arcade.VERSIONandarcade.__version__APIs are unchanged.Fixes #2837
Validation
pytest tests/unit/test_version.py tests/unit/test_pyinstaller_hook.py -q— 32 passeduv build— wheel and sdist built; both containarcade/_VERSIONand noarcade/VERSION--collect-all arcade— completed; frozen executable printed4.0.0.dev5and contained_internal/arcade/_VERSIONDisclosure: this contribution was prepared with AI assistance. I reviewed the final diff and ran every check listed above.