Skip to content

Windows py launcher: older 32-bit versions not supported in some cases #101135

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

Closed
boimart1 opened this issue Jan 18, 2023 · 1 comment
Closed
Labels
OS-windows type-bug An unexpected behavior, bug, or error

Comments

@boimart1
Copy link
Contributor

boimart1 commented Jan 18, 2023

Bug report

On 64-bit Windows, if both Python 2.7 32-bit and Python 2.7 64-bit are installed, these two installs are considered equivalent and only the 64-bit version is considered, both when running py -2-32 (which fails) and py -0 (which only displays the 64-bit version).

This is also the case for Python 3.4 and lower, as the "-32" suffix is only part of the tag in the registry in 3.5+.

Under C:\:
image

py -0p output:
image

While these versions are no longer officially supported since 2020, PEP-514 does have a section on backwards compatibility, mentioning:

To ensure backwards compatibility, applications should treat environments listed under the following two registry keys as distinct, even when the Tag matches:

HKEY_LOCAL_MACHINE\Software\Python\PythonCore\<Tag>
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore\<Tag>

Your environment

  • CPython versions tested on: 3.11.1
  • Operating system and architecture: Windows 10 x64

Linked PRs

@boimart1 boimart1 added the type-bug An unexpected behavior, bug, or error label Jan 18, 2023
@boimart1
Copy link
Contributor Author

Note that I currently have a fix on the way, which also fixes some related issues in the way the EnvironmentInfo tree is handled.

boimart1 added a commit to boimart1/cpython that referenced this issue Jan 18, 2023
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)
zooba pushed a commit that referenced this issue Jan 24, 2023
…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)
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jan 24, 2023
…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]>
@zooba zooba closed this as completed Jan 24, 2023
miss-islington added a commit that referenced this issue Jan 24, 2023
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants