Mpservice

Latest version: v0.15.0

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

Scan your dependencies

Page 5 of 14

0.12.5

Added

- New method ``mpservice.streamer.Stream.parmap_async``, taking an async worker function.

Fixed

- Bug in deprecation warning in ``util`` and ``server_process``.

0.12.4

Refactor

- Refactored ``util`` to split it into modules ``mpservice.multiprocessing``,
``mpservice.threading``, ``mpservice.concurrent.futures`` to have some imports
correspond to those in the standard libs. ``util`` is deprecated.

- ``server_process`` was merged into ``mpservice.multiprocessing``.

Removed

- ``ProcessServlet`` and ``ThreadServlet`` lost parameter ``name`` to ``__init__``.
- class ``ProcessLogger``.

Changed

- The modules ``mpserver``, ``multiprocessing``, ``threading`` each defines its own ``TimeoutError``
exception class.

Added

- ``mpservice.mpserver.Worker`` got new parameter ``worker_index`` to ``__init__``, which is
automatically provided by the parent ``ProcessServlet`` or ``ThreadServlet``.
Subclasses of ``Worker`` should be sure to accept this parameter in their ``__init__``.
- function ``mpservice.multiprocessing.get_context``.
- ``mpservice.multiprocessing.Manager`` gets two init parameters ``process_name`` and ``process_cpu``.
- ``mpservice.concurrent.futures.ProcessPoolExecutor`` gets parameter ``mp_context`` to be compatible
with the standard lib, but with a different default that is ``mpservice.multiprocessing.MP_SPAWN_CTX``.

Enhanced

- ``mpservice.multiprocessing.SpawnProcess`` finetune on ``join`` and finalization cleanup.

0.12.3

Removed

- Remove dependency on ``overrides``.

Added

- ``mpservice.util.{Process, Thread}`` have customized method ``join`` that will raise the exception raised in the child process or thread.

Enhanced or changed

- ``mpservice.util.{Process, Thread}`` finetune related to exceptions.
- ``mpservice.util.{Process, Thread}``: parameter ``loud_exception`` moved from ``__init__`` to ``submit``.
- ``streamer`` finetune related to exception printout in worker threads/processes.

0.12.2

Changed

- ``SpawnProcess`` does not forward logs to the main process if the root logger has any handler configured.

Fixed

- ``SpawnProcess`` and ``Thread`` in "loud_exception" mode do not print exception info if the exception
is ``SystemExit(0)``. This is the case when a "server process" exits.

Improved

- ``mpservice.mpserver.Server.stream`` retries on enqueue timeout.
- Finetune to waiting times in `Server`.

0.12.1

Added

- ``EnsembleServlet`` gets new parameter ``fail_fast`` to control behavior when ensemble members return exceptions.
- New exception class ``EnsembleError``.
- Added ``mpservice.util.Process``, which is an alias to ``util.SpawnProcess``.
- Refinements to ``mpservice.util.SpawnProcessPoolExecutor``.
- Added ``mpservice.util.ProcessPoolExecutor``, which is an alias to ``mpservice.util.SpawnProcessPoolExecutor``.
- New class ``mpservice.util.ThreadPoolExecutor``.
- New class ``mpservice.mpserver.SwitchServlet``.

Fixed

- ``mpservice.util.{Thread, SpawnProcess}`` print out tracback upon exception, making errors in concurrent code more
discoverable. This functionality was there previously but it was buggy.
- Fixed a deadlock situation during the shutdown of streamer ``parmap``.

0.12.0

Bug fixes

- Bug in `mpservice.mpserver.EnsembleServlet`.

Page 5 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.