-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
APPDATA location in Microsoft Store version #84557
Comments
In Microsoft Store apps, access to %APPDATA% and %LOCALAPPDATA% gets transparently redirected to an app specific location (such as %LOCALAPPDATA%\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache). This is perfect for saving settings etc. of Python scripts and packages, however that doesn't work, when the unredirected paths are returned by a sandboxed Python script and consumed by a 3rd party tool. Besides, I want to thank everyone involved in the Microsoft Store version of Python! |
You're welcome! We're all involved - apart from a little bit of startup code, it's exactly the same as the regular install. Right now, I'd say you have a case that needs the regular installer, in order to avoid the appdata redirection. As for changing it, it seems that thing have been updated again in last year's 1903 update to make AppData redirection even more transparent (ref: https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes#file-system ). So the intent is really clear that these file locations are not supposed to be shared (e.g. by printing out the directory backing the app-local modifications). What's the best option here? Probably for Jupyter to move the files elsewhere, or provide a way to output the relevant contents of the file on the console rather than just printing the path. Either of those would work fine on Python 3.8 and earlier as well. I'm not even sure that those UWP APIs are guaranteed to give a path to the redirected folder - that would break reading of unredirected files, as the docs are clear that User\Name\AppData is redirected, not the other way around. So I don't know that it's an option. I'm also not aware of any way to disable the redirection within the app, like there is for WOW64 redirections. Having thought some more, I really do think the best option is for Jupyter to be able to print out the required information. That means its stored files can be safely backed up/restored (or transferred, if put in Roaming) and other applications can "python -m jupyter kernelspec <some new command>" to get all of the info they need. Even if we added a new API here, they'd still have to make a change, so making a change that works well for all runtime versions is probably preferable for them as well. |
Thanks, I didn't think of that option, that is probably the best way to deal with it. I'll file a bug to jupyter and vscode-python (which in my case relied on that data). Because returning paths which include ApplicationData.Current.LocalFolder (and having 3rd party apps accessing files in there) is also suboptimal, I'm closing this issue.
I know, I only mentioned it, since I don't take it for granted to offer a Microsoft Store package and deal with such specific issues, if there exists already another package for Windows 😉 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: