Coloredlogs

Latest version: v15.0.1

Safety actively analyzes 626436 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 12

12.0

----------------------------

Two backwards incompatible changes prompted another major version bump:

- Merged pull request `80`_ that drops support for Python 3.4 which
has gone end-of-life and now represents less than 1% of PyPI downloads.

- Improved compatibility with the Python standard library by changing
the order of positional arguments received by the initializer of the
:class:`~coloredlogs.ColoredFormatter` class (as suggested in `64`_
and `75`_).

.. _Release 12.0: https://github.com/xolox/python-coloredlogs/compare/11.3...12.0
.. _80: https://github.com/xolox/python-coloredlogs/pull/80
.. _64: https://github.com/xolox/python-coloredlogs/issues/64
.. _75: https://github.com/xolox/python-coloredlogs/issues/75

11.3

----------------------------

- Add support for the ``%(username)s`` field (requested in `76`_) and properly
document supported custom fields.

- Consistently use ``console`` highlighting in documentation.

- Fix a broken link in the readme.

.. _Release 11.3: https://github.com/xolox/python-coloredlogs/compare/11.2...11.3
.. _76: https://github.com/xolox/python-coloredlogs/issues/76

11.2

----------------------------

Merge pull request `79`_ which adds support for Python 3.8.

.. _Release 11.2: https://github.com/xolox/python-coloredlogs/compare/11.1...11.2
.. _79: https://github.com/xolox/python-coloredlogs/pull/79

11.1

----------------------------

Starting with the previous release I've resolved to try and tackle the large
number of open issues after an unplanned hiatus from the development and
maintenance of my open source projects, so here are some more bug fixes:

- Fix support for custom log record factories and add a test to avoid
regressions (`47`_, `59`_).

- Change ``make screenshots`` to be Python 3 compatible and document
additional requirements (`65`_).

.. _Release 11.1: https://github.com/xolox/python-coloredlogs/compare/11.0...11.1
.. _59: https://github.com/xolox/python-coloredlogs/issues/59
.. _65: https://github.com/xolox/python-coloredlogs/issues/65

11.0

----------------------------

This is a maintenance release that drops Python 2.6 support, adds Python 3.7
support and merges quite a few minor pull requests. The major version number
was bumped because of the compatibility changes.

**Merged pull requests:**

- `58`_: Don't import :mod:`coloredlogs` if ``$COLOREDLOGS_AUTO_INSTALL`` is
set but empty.

- `60`_: Fix :pypi:`flake8` messages to help stabilize Travis CI builds.

- `61`_: Drop support for Python 2.6 to help stabilize Travis CI builds.

- `62`_: Use SVG badge in README for consistency.

- `69`_: Handle negative-offset timezones in tests.

- `70`_: Use :func:`subprocess.check_call()` in the test suite to ensure that
external commands succeed.

- `74`_: Fix :exc:`~exceptions.TypeError` on MacOS on Python 3 in the
:mod:`~coloredlogs.converter` module.

**Other changes:**

- Start testing on Python 3.7 (and document compatibility).
- Workaround Python 3.7 regression in test suite.
- Update ``Makefile`` to use Python 3 for local development.
- Merge MacOS on Travis CI fixes from :pypi:`humanfriendly`.

.. _Release 11.0: https://github.com/xolox/python-coloredlogs/compare/10.0...11.0
.. _58: https://github.com/xolox/python-coloredlogs/pull/58
.. _60: https://github.com/xolox/python-coloredlogs/pull/60
.. _61: https://github.com/xolox/python-coloredlogs/pull/61
.. _62: https://github.com/xolox/python-coloredlogs/pull/62
.. _69: https://github.com/xolox/python-coloredlogs/pull/69
.. _70: https://github.com/xolox/python-coloredlogs/pull/70
.. _74: https://github.com/xolox/python-coloredlogs/pull/74

10.0

----------------------------

Proper format string parsing, support for ``style='{'`` (`11`_, `17`_, `52`_).

Until now coloredlogs has required differently colored fields in logging format
strings to be delimited by whitespace, leading to various issues:

- Back in December 2015 issue `11`_ was reported by someone who had expected
to be able to style fields without whitespace in between differently.

- Until `52`_ was merged (released as 9.2 in April 2018) any whitespace would
be collapsed to a single space, simply as a side effect of splitting on
whitespace.

- This implementation was so naive that it didn't support whitespace as a
padding character in ``%()`` formatting directives, because it wasn't able to
distinguish formatting directives from surrounding text.

In order to properly fix `11`_ I'm now introducing a very different approach
that does distinguish formatting directives from their surrounding text, which
means whitespace is no longer required. However in order to reduce the
conceptual incompatibilities between the old versus new approach whitespace is
still significant, as follows:

1. First the logging format string is separated into formatting directives
versus surrounding text (which means whitespace used as a padding character
in a ``%()`` formatting directive is considered to be part of the formatting
directive, as it should).

2. Then formatting directives and surrounding text are grouped based on
whitespace delimiters (in the surrounding text).

3. For each group styling is selected as follows:

1. If the group contains a single formatting directive that has a style
defined then the whole group is styled accordingly. This is the behavior
which provides (some level of) conceptual backwards compatibility.

2. If the group contains multiple formatting directives that have styles
defined then each formatting directive is styled individually and
surrounding text isn't styled (this behavior is backwards incompatible
but arguably an improvement over the old behavior).

While I was working on the improved format string parsing I figured it was
easiest to include support for ``style='{'`` (requested in `17`_) from the
start in the new implementation, given that I was redoing the affected code
anyway.

.. _Release 10.0: https://github.com/xolox/python-coloredlogs/compare/9.3.1...10.0
.. _11: https://github.com/xolox/python-coloredlogs/issues/11
.. _17: https://github.com/xolox/python-coloredlogs/issues/17

Page 2 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.