Skip to content

6.4.1

Compare
Choose a tag to compare
@borntyping borntyping released this 23 Aug 10:16
· 23 commits to main since this release

This is the first proper release in the v6 line!

PyPI: https://pypi.org/project/colorlog/6.4.1/

This breaks backwards compatibility in a few ways, most notably dropping support for Python versions older than 3.5. A warning will be displayed if you try to run it on an older version:

Colorlog requires Python 3.6 or above.
Pin 'colorlog<5' to your dependencies if you require compatibility with older versions of Python.

This lets colorlog drop some code that was getting very messy to maintain, which made adding and testing new features a slog. Other backwards incompatible changes have mostly been to internals, and some long requested features that have been a bit easier to add now.

Changes

Changes since v6.3.0a1.

  • Renamed colorlog.logging to colorlog.wrappers.
  • Import log levels from the logging module (#111).

Changelog

Changes since v5.0.0.

  • Dropped support for Python 2 and Python versions below Python 3.5.
  • Added type hints and added mypy to CI (#83).
  • Support 256 colour ANSI codes (#88).
  • Support "light" ANSI codes (#87).
  • Support the NO_COLOR environment variable, and a no_color option (#70).
  • Updated various examples and documentation (#85).
  • Merged TTYColoredFormatter into ColoredFormatter, and ensure no ANSI codes are printed when colors are disabled.
  • Replaced LevelFormatter with a far simpler implementation.
  • Fixed version_info check for the Formatter validate parameter.
  • Define formatMessage instead of format, so that ColoredRecord is used in fewer places.
  • Use setuptool's "normalised" format for the version number.
  • Add PEP 561 typing marker so mypy can find type annotations.
  • Renamed internal modules.
    • colorlog.colorlog is now colorlog.formatter.
    • colorlog.logging is now colorlog.wrappers.
  • Removed colorlog.escape_codes object so that the colorlog.escape_codes module can be imported and used.
  • Import log levels from the logging module (#111).