gh-407: Mark optional platform tags in online aliases - #408
Open
Punisheroot wants to merge 2 commits into
Open
Conversation
Each online feed entry lists both the bare alias and its platform variant, but format_table only shows the first occurrence of each name. The -32 install claims python3.exe first, leaving the default -64 install with lone suffixed names shown as plain python3-64.exe while the Tag column correctly shows 3.15-dev[-64]. Forward the default platform to get_install_alias_names so a lone default-platform suffix still renders as optional ([-64]), mirroring the Tag column.
Punisheroot
marked this pull request as ready for review
September 6, 2026 09:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
py list --onlinenow renders the default platform suffix as optional in the Alias column (python[w]3[-64].exe), matching the Tag column (3.15-dev[-64]).python3-64.exewhile the-32install correctly showedpython3[-32].exe.Context
Each online feed entry lists both the bare alias (
python3.exe) and itsplatform variant (
python3-64.exe), butformat_tableonly displays thefirst occurrence of each name. The
-32entry comes first in the feed andclaims the bare names, leaving the default
-64entry with lone suffixednames that were rendered without brackets.
Fixes #407
Changes
src/manage/list_command.py:_format_aliasnow receives the command and forwardsdefault_platformtoget_install_alias_names.src/manage/installs.py:get_install_alias_namesacceptsdefault_platform=None(default preserves existing behavior for the install-command callers); a lone suffix equal to the default platform renders as[<plat>].tests/test_list.py: addedtest_format_table_aliases_default_platform, reproducing the exact table from Inconsistent optional platform tags in list --online #407 with real feed alias shapes.Validation
pytest tests/test_list.py tests/test_installs.py: PASS (30 passed; new test fails without the fix with the exact output from the issue)pytest tests/test_list.py tests/test_installs.py tests/test_install_command.py tests/test_commands.py: PASS (63 passed)git diff --check: PASSWinError -2145386386, network-restricted sandbox; plustest_get_current_packageandtest_IdleCommand, environment-dependent). Unrelated to this change.Compatibility and risk
tableformatter; CSV/JSON/id/exe formats untouched.-32,-arm64) render exactly as before;cmd=Nonecallers keep the old behavior.