[Python-Dev] Python environment registration in the Windows Registry (original) (raw)

Paul Moore p.f.moore at gmail.com
Wed Feb 3 06:21:48 EST 2016


On 3 February 2016 at 09:50, Glenn Linderman <v+python at g.nevcal.com> wrote:

On 2/3/2016 12:15 AM, Alexander Walters wrote:

On a very personal note (like the rest of this wasn't my personal issues with possibly making my life slightly more difficult), I would much rather see python stop touching the registry all together - but I have no strong argument for that. Me too. My opinions follow, some might call them arguments, strong or weak, some might call them foolishness.

I also would prefer that Python not use/need the registry. As far as I know, in practical terms Python works just fine without the registry entries being present, but I'd like it if that were formally supported as an option for users. Obviously it means that tools that want to see what Python versions are installed won't see such unregistered copies, I'm fine with that (and I don't have a problem with leaving it up to said tools as to whether they want to include ways to support using a Python installation that's not in the registry).

Some issues with this proposal:

  1. I don't like the way it states that Python distributions "must" set keys. I'd rather that it were explicitly stated that a distribution which sets no registry keys is entirely valid (with the obvious implication that tools which scan the registry looking for installed Python distributions won't be able to see such an installation).
  2. It's not clear to me how alternative distributions will specify their registry keys (or the fact that they don't use them). The registry keys are built into the Python interpreter - this proposal seems to imply that distributions that simply repackage the python.org build will no longer be valid or supported, and instead anyone who wants to produce a custom Python distribution (even private in-house repackagings) will need to change the Python source and rebuild. That's a pretty major change, and if that is the intent, then as a minimum I'd say we need to provide compiler flags to let redistributors specify their Company/Tag values (or say that they want to omit registry use). And I'm still not happy that "repackage the python.org binaries" has been removed as an option.

It's possible that the reason the above two points have been missed is because the proposal focuses purely on "informational" registry data. But Python also modifies sys.path based on the registry entries - and possibly has other behavioural changes as well. The pywin32 package, in particular, makes use of this (it's a feature of pywin32 that I disagree with and I wish it didn't do that, but it does, and it's a very widely used package on Windows). So ignoring this aspect of Python's behaviour is a big problem. (Also, what changes will pywin32 need to make to correctly support being installed into non-python.org distributions when this proposal is implemented?)

Paul



More information about the Python-Dev mailing list