v5.23.0 new features + bugfixes + (- dependencies)#
Added#
Added
--generate-parseroption to theclingCLI tool.Added
tatsu.util.barz— self-contained progress bar rendering (replacesrich.progress).Added
tatsu.util.treez— self-contained dependency tree rendering (replacesrich.tree).Added
tests/tree_test.py.Added
g2e,bench, andidepssubcommands toclingCLI — all tools now invocable throughcling.Added
add_argparse_options(parser)pattern tobench.py,ideps.py,g2etool.pyfor uniform CLI interface.Added
tatsu.ztyle.markup— Rich-style markup parser ([bold]text[/],[red]...[/all]). Parse withmarkup()→ returnsStyleZ(astrsubclass wrappinglist[Style]; styles via.styleproperty). Optionally pass acolorpolicy.Added
Style.from_raw()— reconstruct aStylefrom an ANSI escape string (e.g."\e[31mhello\e[0m") for roundtrip support.Added
Style.apply_style()— applies ANSI rendering to an arbitrary string directly.Added
tatsu.util.tty— shared TTY/ANSI utilities (ANSI_RE,SGR_RE,tty_escape,tty_unescape,descape,visual_len, cursor hide/show,pushup,blankpad).Added
etc/RICH_MARKUP.md— specification for the Rich-style markup syntax.Added
Style.__json__()protocol —Stylenow serializes throughasjson/fromjson(any object with__json__method is supported).Added
tatsu/packetz/— inter-task communication via filesystem-based message passing queues that work across threading and multiprocessing.Added
tatsu/barz/— self-contained progress bar rendering withztylecoloring support and a single background rendering thread.Added
richdependency removed from core:pygmentsoptional for coloredclingoutput;graphvizoptional for graphical diagrams (text-based railroad diagrams remain default).
Changed#
No more
colorama: All mentions ofcoloramaremoved. The project consistently uses its ownztylelibrary.No more
richdependency:clingCLI no longer pulls inrich. Progress bars usetatsu.util.barz. Dependency trees usetatsu.util.treez. Summaries useztyle.colorizemodule renamed toztyleto avoid confusion with thecolorizepackage on PyPI.tatsu.grammarsrenamed totatsu.peg(keptgrammars.pyshim).tatsu.apimoved into its owntatsu.apipackage.ideps.pyrefactored to use ownTree+Styleinstead ofrich.tree.bench.py,ideps.py,g2etool.pymigrated from ad-hoc argument parsing toadd_argparse_options(parser)+main(parser) -> int.Bar metrics refactored:
Metricsclass with lazy@cached_propertyper column;BarRowDatabase class extracted to break circular dependency;Colenum moved to own module.tatsu/util/escapes.pyrenamed totatsu/util/tty.pywith expanded API (cursor controls,pushup,blankpad, etc.).Style.__repr__now uses\enotation consistently and encodesfmtspecs for roundtrip viaf{...:...}.Style.__len__usesvisual_len()fromutil.tty(ignores ANSI escapes in length).packetzserialization simplified: removed hash validation;__class__compressed to@in JSON.barz.BarRowswitched from private accessors to public attributes;stop_on_complete→selfstop.parproc.taskusesPacketzQueuedirectly instead ofinit_queue()helper.
Fixed#
Fixed:
Groupno longer optimized away ifGroup.expcontains non-leaf nodes. The optimization made EBNF representation semantically incorrect. Re-introducing a group for--prettyhad several special cases (group if part ofSequence,Named, …).Fixed: Exporting
clingCLI no longer pulls inrichas a dependency.Fixed: ANSI escape utilities no longer duplicated across
ztyle.styleandpacketz.packet; consolidated inutil.tty.