Mode

Latest version: v4.4.0

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

Scan your dependencies

Page 9 of 15

1.17.1

======
:release-date: 2018-09-13 6:27 P.M PDT
:release-by: Ask Solem (:github_user:`ask`)

- Fixes several bugs related to unwrapping ``Optional[List[..]]``
in :func:`mode.utils.objects.annotations`.

This functionality is not really related to mode at all, so
should be moved out of this library. Faust uses it for models.

.. _version-1.17.0:

1.17.0

======
:release-date: 2018-09-12 5:39 P.M PDT
:release-by: Ask Solem (:github_user:`ask`)

- New async iterator utility: :class:`~mode.utils.aiter.arange`

Like :class:`range` but returns an async iterator::

async for n in arange(0, 10, 2):
...

- New async iterator utility: :func:`~mode.utils.aiter.aslice`

Like :class:`itertools.islice` but works on asynchronous iterators.

- New async iterator utility: :func:`~mode.utils.aiter.chunks`

:class:`~mode.utils.aiter.chunks` takes an async iterable and divides
it up into chunks of size n::

Split range of 100 numbers into chunks of 10 each.
async for chunk in chunks(arange(100), 10):
yield chunk

This gives chunks like this::

[
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[10, 11, 12, 13, 14, 15, 16, 17, 18, 19],
...,
]

.. _version-1.16.0:

1.16.0

======
:release-date: 2018-09-11 1:37 P.M PDT
:release-by: Ask Solem

- **Distribution**: Installing mode no longer installs the ``t`` directory
containing tests as a Python package.

Contributed by Michael Seifert

- **Testing**: New :class:`~mode.utils.mocks.AsyncContextManagerMock`

You can use this to mock asynchronous context managers.

Please see :class:`~mode.utils.mocks.AsyncContextManagerMock` for
an example.

- **CI**: Python 3.7.0 and 3.6.0 was added to the build matrix.

.. _version-1.15.1:

1.15.1

======
:release-date: 2018-08-15 11:17 A.M PDT
:release-by: Ask Solem

- Tests now passing on CPython 3.7.0

- **Utils**: Adds ``remove_optional`` function in :mod:`mode.utils.objects`

This can be used to extract the concrete type from ``Optional[Foo]``.

- **Utils**: Adds ``humanize_seconds`` function to :mod:`mode.utils.times`

.. _version-1.15.0:

1.15.0

======
:release-date: 2018-06-27 1:39 P.M PDT
:release-by: Ask Solem

- Worker: Logging can now be set up using dictionary config, by passing
the ``logging_config`` argument to :class:`mode.Worker`.

Contributed by Allison Wang.

- Worker: No longer supports the ``logformat`` argument.

To set up custom log format you must now pass in dict configuration
via the ``logging_config`` argument.

- Service: ``start()`` accidentally silenced :exc:`asyncio.CancelledError`.

- Service: Invalid assert caused :class:`~mode.CrashingSupervisor` to
crash with strange error

.. _version-1.14.1:

1.14.1

======
:release-date: 2018-06-06 1:26 P.M PDT
:release-by: Ask Solem

- Service: Fixed "coroutine x was never awaited" for background
tasks (``Service.task`` decorator) when service is started and stopped
in quick succession.

.. _version-1.14.0:

Page 9 of 15

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.