Fix Champion Mastery and Summoner equality for PUUID-only data#470
Open
mospira wants to merge 1 commit into
Open
Fix Champion Mastery and Summoner equality for PUUID-only data#470mospira wants to merge 1 commit into
mospira wants to merge 1 commit into
Conversation
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
Summoner identity handling PUUID-first and fixes the current Riot API response shape where Summoner-V4 no longer reliably returns legacy
id/accountIdfields. I believe this Cass should largely treat PUUID as canonical identity, in accordance with Riot's changes.Addresses:
Changes
Summoner.idandSummoner.account_idnow returnNoneafter a successful load when Riot omits those legacy fields, instead of triggering ghost loading errors.Summoner.__eq__now compares identity bypuuidfirst, then legacyid, then legacyaccountId.summoner.id.ChampionMastery.summonernow preservespuuidfrom mastery data and only falls back to legacysummonerIdwhen present.Notes on Test Strategy
The new regression tests are intentionally offline because the existing tests/examples still need more retooling around Riot’s PUUID/Riot ID migration. Many current live tests still call stale paths like
get_summoner(name=...)orSummoner(name=...), which fail before reaching this bug fix.These offline tests directly model the modern Riot response shape: PUUID is present, while legacy
id/accountIdmay be absent. That makes the regression deterministic and keeps this PR focused on the PUUID identity bug rather than the larger test-suite/API migration.Scope
This is a minimal compatibility fix. It does not attempt to modernize every deprecated summoner-name or summoner-ID path in the project.