Skip to content

gh-407: Mark optional platform tags in online aliases - #408

Open
Punisheroot wants to merge 2 commits into
python:mainfrom
Punisheroot:fix/js/optional-platform-tags-aliases
Open

gh-407: Mark optional platform tags in online aliases#408
Punisheroot wants to merge 2 commits into
python:mainfrom
Punisheroot:fix/js/optional-platform-tags-aliases

Conversation

@Punisheroot

Copy link
Copy Markdown
Contributor

Summary

  • py list --online now renders the default platform suffix as optional in the Alias column (python[w]3[-64].exe), matching the Tag column (3.15-dev[-64]).
  • Before, the default install showed plain python3-64.exe while the -32 install correctly showed python3[-32].exe.

Context

Each online feed entry lists both the bare alias (python3.exe) and its
platform variant (python3-64.exe), but format_table only displays the
first occurrence of each name. The -32 entry comes first in the feed and
claims the bare names, leaving the default -64 entry with lone suffixed
names that were rendered without brackets.

Fixes #407

Changes

  • src/manage/list_command.py: _format_alias now receives the command and forwards default_platform to get_install_alias_names.
  • src/manage/installs.py: get_install_alias_names accepts default_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: added test_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: PASS
  • Full suite: 450 passed, 7 failed — all 7 reproduce on the clean tree (5x BITS download WinError -2145386386, network-restricted sandbox; plus test_get_current_package and test_IdleCommand, environment-dependent). Unrelated to this change.

Compatibility and risk

  • Display-only change to the table formatter; CSV/JSON/id/exe formats untouched.
  • Non-default single suffixes (-32, -arm64) render exactly as before; cmd=None callers keep the old behavior.
  • No dependency, config, or lockfile changes.

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
Punisheroot marked this pull request as ready for review September 6, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent optional platform tags in list --online

1 participant