Skip to content

v3: SourceShell.fetch set_type() makes Collection identity locale-dependent #6942

Description

@markvp

Found while reviewing the release/3.0.0 branch. Severity: medium.

Collection._identity_key (collection.py:178-198) is deliberately built on WasteType.id, not the display name, to keep equality and hashing locale-independent. But SourceShell.fetch calls set_type(e.type.strip()) on every entry (source_shell.py:208), so _type_override holds the localised display string and _identity_key then returns it. Any set or dedup keyed on Collection identity becomes locale-sensitive. Low blast radius today (the hot-path dedup uses (date, e.type) directly), but it defeats the design.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.0.0 feedbackFeedback from trialling the v3 (3.0.0) beta

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions