Skip to content

📝 docs(windows): document Store Python sandbox path behavior#423

Merged
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:90
Feb 13, 2026
Merged

📝 docs(windows): document Store Python sandbox path behavior#423
gaborbernat merged 1 commit intotox-dev:mainfrom
gaborbernat:90

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

@gaborbernat gaborbernat commented Feb 13, 2026

Windows Store Python (MSIX) uses kernel-level AppContainer filesystem virtualization that silently redirects AppData writes to a per-package sandbox location. This has been a source of confusion (issue #90) when paths returned by platformdirs are passed to external processes running outside the sandbox — they resolve to a different physical location.

After investigating the CPython docs and Microsoft's MSIX internals, the returned logical paths are the correct answer for the calling process. The redirection is not done via symlinks or reparse points (which os.path.realpath resolves on 3.8+), but via OS-level write virtualization. This means platformdirs cannot and should not try to resolve these paths — doing so would break the standard non-Store case and has no reliable API.

A note was added to the Windows section of the platforms documentation explaining the behavior and providing the os.path.realpath() workaround for users who need to share paths with external processes.

Closes #90.

Windows Store Python (MSIX) uses kernel-level filesystem virtualization
that redirects AppData writes to a per-package sandbox location. This
causes confusion when paths returned by platformdirs are passed to
external processes that run outside the sandbox.

The returned logical paths are correct for the calling process, so this
is not something platformdirs should resolve. Added a note explaining
the behavior and the os.path.realpath() workaround for cross-process
path sharing.

Closes tox-dev#90
@gaborbernat gaborbernat requested a review from ofek as a code owner February 13, 2026 21:50
@gaborbernat gaborbernat enabled auto-merge (squash) February 13, 2026 21:52
@gaborbernat gaborbernat disabled auto-merge February 13, 2026 21:53
@gaborbernat gaborbernat merged commit 9c5b18d into tox-dev:main Feb 13, 2026
29 checks passed
@gaborbernat gaborbernat changed the title 📝 docs(windows): document Store Python sandbox path behavior ✨ feat(api): add site_log_dir and document Store Python sandbox Feb 13, 2026
@gaborbernat gaborbernat changed the title ✨ feat(api): add site_log_dir and document Store Python sandbox 📝 docs(windows): document Store Python sandbox path behavior Feb 13, 2026
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.

Python from the Windows store alias paths

1 participant