Add support for t-strings
Python 3.14 introduces t-strings, a generalisation of f-strings which yields a processable Template object instead of reifying a string. The safety assumption around t-strings is that the literal parts of the template are considered "safe" and the interpolations are considered unsafe. So for markupsafe the literal parts are Markup-ed while the interpolations are escape-ed.
This commit adds support for t-strings to both Markup and escape, essentially matching the handling of __html__.
It does not add support for t-strings to:
Markup.__add__/Markup.__radd__, the semantics seem a bit dubious and it should be easy enough toMarkuporescapethe t-string / template object in that case.EscapeFormatteras I'm not entirely sure whether / how a template object should interact with format specs.
Fixes #511
@aleks0099 We do not speak/understand Ukrainian/Russian. Please edit your commends and translate them to English.
@aleks0099 please do not use an "AI" to "review" PRs. It is not helpful.