pypi python-slugify 9.1.0

4 hours ago

Modern-algorithm improvements and fixes. Legacy output is unchanged and remains the permanent default.

  • Modern mode only: decode uppercase &#X..; hexadecimal references as HTML allows, in addition to lowercase &#x..; (Rupayon Haldar, #195).
  • Modern mode only: preserve post-replacement output when the whole slug already fits max_length, so intentional repeated/trailing delimiters are not collapsed at the length limit. Public smart_truncate is unchanged (emme1t, #193).
  • Fix add_uppercase_char to apply insertions atomically, leaving the input list unchanged if iteration fails. Built-in transliteration tables are unaffected (Cristian Ramirez, #194).
  • Modern mode only: validate argument types up front, raising TypeError for a bool/non-int max_length or a non-str separator. Legacy behavior is unchanged (Jon Bailey, #196).

Internal: the legacy pipeline is now frozen in slugify/_legacy.py with the public slugify() dispatching by algorithm; tests reorganized under tests/.

Full Changelog: v9.0.0...v9.1.0

🚀 Generated with Dojo â›Šī¸

Don't miss a new python-slugify release

NewReleases is sending notifications on new releases.