Skip to content

Render desc as a template again - #334

Merged
wolph merged 1 commit into
developfrom
fix/desc-template
Nov 5, 2026
Merged

wolph merged 1 commit into
developfrom
fix/desc-template

Conversation

@wolph

@wolph wolph commented Nov 5, 2026

Copy link
Copy Markdown
Owner

#330 turned desc into literal text so that a brace in a file name no
longer raised. The gate on the 4.6.0 breaks decided the other way: desc
was documented as the prefix alias all along, so a 4.6.0 user with
desc='{value}' keeps the rendered value.

  • desc is a plain prefix again: a field renders the bar's data, a
    dunder or frame walk is refused like any other template, a literal
    brace is doubled.
  • The fast formatter never rendered templates and still does not.
  • _literal_prefix and the brace escaping in _init_prefix are gone.
  • The tqdm how-to says it is a template.

Checks: pytest 3.10 with coverage 1807 passed, 100%, ruff and pyright
clean. The #330 compatibility probes for desc now print the 4.6.0
values again (desc='{value}' renders 10:, desc='{' raises
ValueError as in 4.6.0).

#330 made desc literal text, so a brace in a file name no longer
raised. That changed what every 4.6.0 user with desc='{value}' saw,
and desc was documented as the prefix alias all along. The alias is a
plain prefix again: a field renders the bar's data, a dunder walk is
refused like any other template, and a literal brace is doubled. The
fast formatter never rendered templates and still does not.
@wolph
wolph merged commit 6ee431c into develop Nov 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant