pypi / markupsafe
markupsafe
What changed in markupsafe 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
3 breaking1 deprecations2 performance
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initmarkupsafe 36 changes
Breaking changes 3
Method signatures now match str signatures and use positional-only arguments.
Several str methods no longer escape their arguments, and replace only escapes its new argument.
Support Python 3.13 and its experimental free-threaded build, and drop support for Python 3.7 and 3.8.
Deprecations 1
The attribute is deprecated; use feature detection or importlib.metadata.version("markupsafe") instead.
Performance 2
Improves the performance of striptags.
Escaping plain strings is 40% faster.