gh-101135: Windows launcher: Add backwards compatibility for older 32-bit versions#101138
gh-101135: Windows launcher: Add backwards compatibility for older 32-bit versions#101138zooba merged 11 commits intopython:mainfrom
Conversation
For 32-bit installs, these versions did not contain the "-32" in their registry name, so the 32 and 64-bit installs were treated equal. Additionally, the code to replace a node with one with a lower sort key was buggy (wrong node chosen, replace never happened since parent was always NULL, replaced node never freed, etc)
|
Most changes to Python require a NEWS entry. Please add it using the blurb_it web app or the blurb command-line tool. |
I'd prefer this fix. Ideally this would be easy to remove when we decide that we actually don't care about end-of-life versions, since apparently it's too soon for that. Use the |
|
|
|
The |
For the HKLM entries, I believe this is already covered by the Lines 1489 to 1491 in e9d5bb9 Good point on the HKCU entries though. I'll see where I can fit that in. So, to recap my next changes:
|
|
That sounds good. Also verify that a command like |
|
Did a bunch of manual testing with 3.4 (fully pre-PEP 514) and 3.5 (includes executablePath and the "-32" in the tag for 32bit installations, but not full PEP 514), plus a few tests with 3.6 (follows PEP 514). I made sure to have the following behavior, as written in PEP 397:
In all cases, if the same version+architecture exists in both HKCU and HKLM, the HKCU entry is preferred. |
|
Excellent! Thanks for the great work here. |
|
GH-101290 is a backport of this pull request to the 3.11 branch. |
…older 32-bit versions (pythonGH-101138) Python 2.x and up to 3.4 did not contain the "-32" in their registry name, so the 32 and 64-bit installs were treated equal. Since 3.5/PEP 514 this is no longer true, but we still want to detect the EOL versions correctly in case people are still using them. Additionally, the code to replace a node with one with a lower sort key was buggy (wrong node chosen, replace never happened since parent was always NULL, replaced node never freed, etc) (cherry picked from commit daec3a4) Co-authored-by: Martin Boisvert <martin.boisvert@optelgroup.com>
…32-bit versions (GH-101138) Python 2.x and up to 3.4 did not contain the "-32" in their registry name, so the 32 and 64-bit installs were treated equal. Since 3.5/PEP 514 this is no longer true, but we still want to detect the EOL versions correctly in case people are still using them. Additionally, the code to replace a node with one with a lower sort key was buggy (wrong node chosen, replace never happened since parent was always NULL, replaced node never freed, etc) (cherry picked from commit daec3a4) Co-authored-by: Martin Boisvert <martin.boisvert@optelgroup.com>
|
py -0poutput, with this fix:For 32-bit installs, these versions did not contain the "-32" in their registry name, so the 32 and 64-bit installs were treated equal.
Additionally, there were a few related bugs in the code to add nodes to the EnvironmentInfo tree:
parents were alwaysNULLfreeEnvironmentInfo()on the removed node.Finally,
_listAllEnvironmentsnow displays-32in the tag for PythonCore 32-bit versions which don't have the suffix already.An alternative fix would have been to add
-32to the tag name for PythonCore 32-bit versions which don't have it in the name. I can go back and implement it that way instead if this approach seems too complicated -- however, that would involve adding a few functions to properly update the tag without leaking.