← Back to issue list

chore: remove unused set_legacy_env

View original Github issue

Metadata

Project
snapcraft
Number
#6476
Type
pull request
State
open
Author
lengau
Labels
—
Created
Updated
Closed
—

Current evaluation

Removes unused set_legacy_env from snapcraft/store/_legacy_account.py; legacy credential conversion now handled by get_client() and LegacyUbuntuOne.__init__. Clean diff, CI green except pending integration tests.

Suggested action: needs review

Reason: Dead-code removal with no behavior change: grep confirms set_legacy_env has no callers, and get_client() plus LegacyUbuntuOne.__init__ already perform the legacy credential conversion. Diff is small (+0/-23), CI is passing with only integration tests pending, so it is ready for review/merge.

Evaluated by: mr-cal-bot

Impact: 10 Quick Win: 8 Complexity: 5 Confidence: 92 Actionability: 85

Issue body

`set_legacy_env` in `snapcraft/store/_legacy_account.py` has no callers. It rewrote `ENVIRONMENT_STORE_CREDENTIALS` from the legacy configparser format into a base64 auth header at startup. That responsibility now lives in `get_client()` in `snapcraft/store/client.py`, which builds a `LegacyUbuntuOne` client when `has_legacy_credentials()` or `env_has_legacy_credentials()` is true. Both helper methods stay, since `get_client()` and `LegacyUbuntuOne.__init__` still use them. No behaviour change.

Evaluation history

Date Model Scores Action Summary
~deepseek/deepseek-pro-latest
Impact: 10
Quick Win: 8
Complexity: 5
Confidence: 92
Actionability: 85
needs review Removes unused set_legacy_env from snapcraft/store/_legacy_account.py; legacy credential conversion now handled by get_client() and LegacyUbuntuOne.__init__. Clean diff, CI green except pending integration tests.
~deepseek/deepseek-pro-latest
Impact: 10
Quick Win: 8
Complexity: 5
Confidence: 90
Actionability: 80
needs review Removes unused set_legacy_env from snapcraft/store/_legacy_account.py; legacy credential handling now lives in get_client() and LegacyUbuntuOne.__init__. No behaviour change.

Update history

Date Change
updated
created

Related issues

Issue Project State Summary Similarity
#6472 chore: remove unused set_legacy_env snapcraft closed Closed unmerged; author superseded it by reworking branch layout to work/refactor/* and pushing directly to canonical/snapcraft.
78%
#6241 chore: remove snapcraft_legacy snapcraft merged Merged #6241 via commits ffb164b7a and 995f0a3bc, deleting snapcraft_legacy, obsolete specs, and legacy-only dependencies after its entry points were removed.
73%
#5777 chore(legacy-cli): remove unused help and version commands snapcraft closed Merged #5777, removing unused legacy CLI help/version commands after confirming snapcraft_legacy was not exposed in official releases; it combined #5731 and #5773.
71%
#6473 chore: remove unused _read_config snapcraft merged Merged PR removing dead _read_config helper and unused pathlib import from snapcraft/commands/account.py; no behaviour change.
71%