Mode

Latest version: v4.4.0

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

Scan your dependencies

Page 1 of 15

4.4.0

=====
:release-date: 2020-09-28 11:00 A.M PST
:release-by: Ask Solem (:github_user:`ask`)

- Supervisors now raises :exc:`SystemExit` on max restarts exceeded.

- Queue: Now includes high pressure and pressure drop conditions.

This means you can now add callbacks when the queue is under high
pressure, and for when the pressure drops again.

- Service: Added ``human_tracebacks()`` method.


.. _version-4.3.2:

4.3.2

=====
:release-date: 2020-02-13 3:21 P.M PST
:release-by: Ask Solem (:github_user:`ask`)

- Tracebacks: Added support for async generators.

Also added new functions:

+ :func:`~mode.utils.tracebacks.format_agen_stack`
+ :func:`~mode.utils.tracebacks.print_agen_stack`

- Logging: New version of log argument formatters.

The existing log argument formatter callbacks did
not have access to the original log record, so could
not make decisions based on matching the log message string
for example.

A new :func:`~mode.utils.logging.formatter2` decorator
has been added that registers callbacks taking two arguments.

Example:

.. sourcecode:: python

from mode.utils.logging import formatter2

formatter2
def format_log_argument(arg: Any, record: logging.LogRecord):
improve aiokafka logging to sort the list
of topics logged when subscribing to topics
and make it more human readable
if record.msg.startswith('Subscribing to topics'):
if isinstance(arg, frozenset):
return ', '.join(sorted(arg))

.. _version-4.3.1:

4.3.1

=====
:release-date: 2020-02-10 2:40 P.M PST
:release-by: Ask Solem (:github_user:`ask`)

- Added :func:`mode.utils.times.humanize_seconds_ago`

This formats seconds float to text "n seconds ago",
or "just now" if less than one second.

- Added :func:`mode.utils.text.enumeration`

This formats a list of strings to a enumerated list,
for example:

.. sourcecode:: pycon

>>> text.enumeration(['x', 'y', '...'])
"1) x\n2) y\n3) ..."

.. _version-4.3.0:

4.3.0

=====
:release-date: 2020-01-22 2:25 P.M PST
:release-by: Ask Solem (:github_user:`ask`)

- Threads: Now runs with :envvar:`PYTHONASYNCIODEBUG`.

- Threads: Fixed race condition where pending methods are lost

- utils.tracebacks: Adds ``print_coro_stack`` and
``format_coro_stack`` for debugging coroutines.

- Timers: Adds sleeptime and runtime to logs for more info.

- Threads: Threads now do two-way keepalive (thread -> parent, parent -> thread)

- Service: ``add_future`` now sets task name

- Worker: ``SIGUSR2`` now starts :mod:`pdb` session.

.. _version-4.2.0:

4.2.0

=====
:release-date: 2020-01-15 5:00 P.M PST
:release-by: Ask Solem (:github_user:`ask`)

- Timers: Exclude timer callback time in drift calculation

- Service: `maybe_start()` now returns bool, and :const:`True`
if the service was started.

.. _version-4.1.9:

4.1.9

=====
:release-date: 2020-01-13 11:18 P.M PST
:release-by: Ask Solem (:github_user:`ask`)

- QueueServiceThread: Stop method queue before stopping child services.

- Small fixes to render graph images correctly.

.. _version-4.1.8:

Page 1 of 15

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.