Markus

Latest version: v5.1.0

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

Scan your dependencies

Page 1 of 3

5.1.0

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

**Features**

* Add support for Python 3.13 (159)

**Backwards incompatible changes**

* Dropped support for Python 3.8 (160)

* Changed timestamp field in ``LoggingMetrics``. The ``LoggingMetrics`` now
defaults to not emitting a timestamp at all. If you would like a timestamp,
you can provide the ``"timestamp_mode"`` option with either ``"utc"`` for UTC
timestamps or ``"local"`` for local timezone timestamps.

No timestamp example::

LoggingMetrics()

emits lines like::

METRICS|histogram|foo|4321|key1:val

``"utc"`` timestamp mode example::

LoggingMetrics(options={"timestamp_mode": "utc"})

emits lines like::

METRICS|2017-03-06T11:30:00+00:00:00|histogram|foo|4321|key1:val

``"local"`` timestamp mode example::

LoggingMetrics(options={"timestamp_mode": "local"})

emits lines like::

METRICS|2017-03-06T11:30:00|histogram|foo|4321|key1:val

If you want the original behavior, add set ``timestamp_mode`` to ``local``.
(11)

5.0.0

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

**Features**

* Add support for Python 3.12 (122)

* Add ``AnyTagValue`` for asserting that metrics are emitted with certain tags,
but ignoring the tag values in tests. (141)

Example::

def test_somekey_emitted():
with metricsmock() as mm:
emit some metrics

mm.assert_incr("somekey", value=1, tags=[AnyTagValue("host")])

* Add ``MetricsInterface.extend_prefix()`` to iteratively hone a metrics
interface prefix. (142)

Example::

metrics = markus.get_metrics("project")

module_metrics = metrics.extend_prefix("somemodule")

module_metrics.incr("key1") prefix is project.somemodule.key1

* Add ``metricsmock`` pytest fixture. (118)

* Add ``RegisteredMetricsFilter`` metrics filter making it easier to enforce
metrics can only be emitted if documented. (15)

**Backwards incompatible changes**

* Dropped support for Python 3.7 (121)

4.2.0

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

**Bug fixes**

* Add support for setting ``origin_detection_enabled`` in Datadog backend.
(108)

* Switch from Flake8 to Ruff. (109)

4.1.0

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

**Features**

* Add support for Python 3.11 (100)

**Bug fixes**

* Redo how dev environment works so it's no longer installed via an extras but
is now in a separate requirements-dev.txt file.

* Split flake8 tou a separate requirements-flake8.txt and tox environment to
handle conflicts with installing other things.

4.0.1

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

**Bug fixes**

* Move pytest import to a pytest plugin so it's easier to determine when pytest
is running. (95) Thank you, John!

4.0.0

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

**Features**

* Added support for Python 3.10 (88)

**Backwards incompatibel changes**

* Dropped support for Python 3.6 (89)

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.