This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author DataGhost
Recipients DataGhost, paul.moore, steve.dower, tim.golden, zach.ware
Date 2020-07-01.00:40:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1593564023.02.0.36011703999.issue41178@roundup.psfhosted.org>
In-reply-to
Content
I just installed the Windows Store version of Python (v3.8.3:6f8c832) on Windows 10.0.18362.900 (1903, old VM) and quickly ran into the issue that registry writes aren't visible system-wide. I later found a remark about this in the Known Issues section of the Using Python on Windows page. Real-world scenario: running "python -m pip install --user pipx" and subsequently "python -m pipx ensurepath" says it changed the PATH variable, but it does not take effect even after a reboot. I'd say this is one of the cases where a user might not know about what's going on and why it fails, even after reading the known issues, and the developer might not have thought of the existence or incompatibility of the Windows Store version of Python at all.

I have found a workaround to do this, though, and I figured the best place to do that is in the actual winreg module so that users and developers don't need to worry about this. Calling reg.exe allows registry variables to be written in the "normal" registry, and these changes are system-wide rather than in the private copy Store apps use. Some functions could be changed to use the reg.exe binary instead of the system calls on Windows Store builds. Other functions, such as for querying, don't need any changes.

I realise this is an ugly workaround so I'm just suggesting it in hopes of improving compatibility, so that users and developers don't need to worry about these issues anymore. I did some basic tests on this, by executing reg.exe through the subprocess module, and testing for a Windows Store instance by checking sys.base_exec_prefix. There are probably better ways but at least this shows that it should be possible in just Python.
History
Date User Action Args
2020-07-01 00:40:23DataGhostsetrecipients: + DataGhost, paul.moore, tim.golden, zach.ware, steve.dower
2020-07-01 00:40:23DataGhostsetmessageid: <1593564023.02.0.36011703999.issue41178@roundup.psfhosted.org>
2020-07-01 00:40:22DataGhostlinkissue41178 messages
2020-07-01 00:40:22DataGhostcreate