Output changed
canonicalize_name("Ä")The docstring states that canonicalize_name should emulate `re.sub(r'[-_.]+', '-', name).lower()` from PEP 503, which lower‑cases the whole string including non‑ASCII characters. The new implementation uses `name.lower().replace(... )`, matching that specification.
Emulates ``re.sub(r'[-_.]+', '-', name).lower()`` from PEP 503# Much faster than re, and even faster than str.translateFound by: Nemotron strategy search, Ultra's planned example, hostile mutation, search sample · also caught by: Plain Hypothesis, Mutations of the PR's own test strings, Nemotron plan only
ran onlocal Docker · image bw-pair:810b943be062d4e3
No regression test: adjudicated intended: no test pins the old behaviour.
Reproduce
uv run breakwater probe --repo https://github.com/pypa/packaging --base d5398b8bc19f --head 9627a8821f09 --target packaging.utils:canonicalize_name --backend docker --input "Ä"2 near-duplicate classes same behaviour, inputs with extra traits
canonicalize_name("Á ")base value: "Á " · head value: "á "canonicalize_name("Á\u0000")base value: "Á\u0000" · head value: "á\u0000"