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.

classification
Title: Windows registry PythonCore key changed inconsistent with other releases
Type: behavior Stage:
Components: Installation, Windows Versions: Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: barry.scott, mhammond, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2015-09-17 09:12 by barry.scott, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (8)
msg250877 - (view) Author: Barry Scott (barry.scott) Date: 2015-09-17 09:12
I am used to looking in HKLM:\SOFTWARE\Python\PythonCore\%(py_maj)d.%(py_min)d\InstallPath
to find out where python is installed so that my installation kit can add itself to site-packages.

I just found that the registry key used for 32 bit python 3.5 on windows changed to be '3.5-32',
which I can change my installer to cope with.

However the key for the 64bit install is ‘3.5’ but not '3.5-64'.

This seems like a regression to me in the interface to Python on Windows.

Is there a reason not to use the original naming?

Barry
msg251358 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-09-22 22:26
It was changed to be consistent with the PEP 397 launcher (and the launcher was actually updated to match the registry key directly, rather than special-casing the "-32" suffix).

The original naming ("3.5") can't be used because you can't simultaneously install 32-bit and 64-bit per-user Pythons with the same key name. (Previously it would "work", but you couldn't find both of them through the registry. Now, because of other changes, it will have more serious issues.)

Changing to "3.5-64" and "3.5-32" and not use "3.5" anymore was inconsistent with the launcher, but that's a fairly weak reason. There just didn't seem to be a stronger reason to change.

(I don't consider this a bug, so I'm closing, but if Barry or someone else wants to argue that it should be changed then I'm willing to consider it for 3.6. I don't think changing it for 3.5.1 is a good move at this point.)
msg251416 - (view) Author: Barry Scott (barry.scott) Date: 2015-09-23 08:43
To clarify:

3.5 means 3.5 64 bit
3.5-32 means 3.5 32 bit

You do not add the -64 as it is the default.

However: this change should have been in the "What's New" as it breaks Windows installation code for extensions.
msg256749 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2015-12-20 05:23
> The original naming ("3.5") can't be used because you can't 
> simultaneously install 32-bit and 64-bit per-user Pythons with the same
> key name.

They will be in different nodes - the 32bit version would be under Wow6432Node. The py.exe launcher had no issues locating 64 and 32 bit versions, so I don't understand any of the justifications here. I believe this change is most certainly a bug and will break many tools that looked in the registry for Python using the sane approach used previously.
msg256750 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2015-12-20 06:22
> and the launcher was actually updated to match the registry key
> directly, rather than special-casing the "-32" suffix

It appears this has broken the launcher. A freshly-built py.exe from Python 3.5 doesn't seem to find older 32bit versions, while py.exe from older versions doesn't find the 32bit 3.5. Doesn't this break the entire reason for having the launcher in the first place?
msg256753 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-12-20 08:17
The per-user installs collide without the name change, and since those are now the default, it's important to have the change. The redirection you refer to only occurs for HKLM and not HKCU.

The launcher was updated and tested to find all versions. If there's a bug here, it's in the launcher and not the registry key. The special case for the -32 suffix is still there, but it is not invoked for 3.5. Earlier versions will still check '3.4' and reject it based on the python.exe bitness when -3.4-32 is provided.
msg256789 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2015-12-21 09:48
It appears bdist_wininst wasn't updated for this so installed created by distutils don't work in 32bit versions - is there a different bug open for that? (Or I'm doing something wrong, but the installer fails and a quick scan of the source doesn't seem to handle it)
msg256798 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-12-21 11:22
That's a possibility. I won't have a chance to check for a few days, but it should get another bug if it's wrong.
History
Date User Action Args
2022-04-11 14:58:21adminsetgithub: 69335
2015-12-21 11:22:01steve.dowersetmessages: + msg256798
2015-12-21 09:48:17mhammondsetmessages: + msg256789
2015-12-20 08:17:05steve.dowersetmessages: + msg256753
2015-12-20 06:22:56mhammondsetmessages: + msg256750
2015-12-20 05:23:28mhammondsetnosy: + mhammond
messages: + msg256749
2015-09-23 08:43:05barry.scottsetmessages: + msg251416
2015-09-22 22:26:53steve.dowersetstatus: open -> closed

nosy: + paul.moore, tim.golden, zach.ware
messages: + msg251358

components: + Windows
resolution: not a bug
2015-09-17 09:18:07ezio.melottisetnosy: + steve.dower
type: behavior
2015-09-17 09:12:31barry.scottcreate