Skip to content

Dahlia 3.0.0

Latest
Compare
Choose a tag to compare
@trag1c trag1c released this 02 Jun 19:17
· 10 commits to master since this release
69fc292

This release follows the Dahlia Specification v1.0.0.

Added

  • Automatic color depth detection (as a consequence, Dahlia's depth parameter can now be None)
  • Style-specific reset codes
  • The &_ escape code
  • The clean_ansi function should now handle way more ANSI escape codes
  • The package can now be executed with python -m dahlia to show the current terminal emulator's capabilities
  • Various performance improvements:
    • String conversions are now approximately ~70% faster
    • A comprehensive benchmark showed an overall library speedup of 20%

Changed

  • The "Blink" style code was changed from &p to &k
  • The custom color syntax was changed from &[#ffaff3] to &#ffaff3; and now supports shorthand 3-digit codes
  • The Dahlia.depth property now returns a Depth | None instead of an int
  • The full reset code is now &R instead of &r
  • The "Hide" style code was changed from &k to &h
  • The no_reset parameter and property was renamed to auto_reset and now defaults to True

Fixed

  • Type checkers no longer complain about non-lowercase depth strings

Removed

  • Dahlia.reset
  • Dahlia.test
  • Dahlia's no_color parameter
  • The CLI tool
  • The &g code
  • The legacy dahlia, dprint, and dinput functions
  • The quantize_ansi utility function