-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-101135: Windows launcher: Add backwards compatibility for older 32-bit versions #101138
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
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 <[email protected]>
…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 <[email protected]>
|
py -0p
output, 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:
parent
s were alwaysNULL
freeEnvironmentInfo()
on the removed node.Finally,
_listAllEnvironments
now displays-32
in the tag for PythonCore 32-bit versions which don't have the suffix already.An alternative fix would have been to add
-32
to 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.