Mpservice

Latest version: v0.15.0

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

Scan your dependencies

Page 6 of 14

0.11.9

Removed

- Deprecated context manager on `Streamer`. Instead, use the object directly.
- Deprecated function `mpservice.util.is_exception`.

Changed

- `Streamer.peek` parameter `interval`: default changed to 1 from 1000.
- Class `Streamer` is renamed `Stream`; the old class `Stream` was removed.

Added or enhanced

- `mpservice.streamer.Parmapper.__init__` takes two new arguments `executor_initializer`
and `executor_init_args`.
- Simplifications to the implementation of `streamer.py`, making use of `GeneratorExit` and removing class `Stream`.
- New utility functions `mpservice.util.get_shared_thread_pool`, `mpservice.util.get_shared_process_pool`.

0.11.8

The two largest efforts of this release are documentation and "streamer" refactor.

Removed

- `mpservice.streamer.Streamer.{drop_first_n, peek_random, drop_if, keep_if}`, and corresponding classes
`Dropper`.
- `mpservice.streamer.Streamer.drop_exceptions`.

Changed

- `mpservice.streamer.Streamer.transform`: parameter `concurrency` used to default to 1 (i.e. no concurrency), now defaults to higher numbers (i.e. with concurrency).
- `mpservice.mpserver.{Sequential, Ensemble}` were renamed to `SequentialServlet` and `EnsembleServlet` respectively.
- `mpservice.streamer.Streamer.drain`: return count of elements processed, instead of the tuple of element count and exception count.
- `mpservice.streamer.Streamer.peek` was refactored.
- `mpservice.streamer.Streamer.transform` was renamed to `parmap`.
- Relaxed the requirement for using context manager with `Streamer`.
- `Streamer.parmap` uses processes by default, instead of threads.

Added or enhanced

- Enhanced documentation. Started to host generated doc on Read the Docs.
- New class `mpservice.mpserver.CpuAffinity`.
- New method on `mpservice.streamer.Streamer` and corresponding classes:
`filter` and `Filter`, `tail` and `Tailor`, `map` and `Mapper`, `groupby` and `Grouper`.
- New method `mpservice.streamer.Streamer.filter_exceptions`, `mpservice.streamer.Streamer.accumulate`.

0.11.7.post1

- Upgrade for a breaking change in `uvicorn` 0.19.0.

0.11.7

- `Streamer` implementation finetune, mainly about worker thread/process finalization.
- `Streamer` removes methods that are trivial (so user can implement them if needed) and unnecessary or not very needed: `collect`, `drop_nones`, `keep_every_nth`, `keep_random`, `log_every_nth`.
- `Streamer.log_exceptions` was renamed `peek_exceptions` with minor changes.
- Parameter `shed_load` to `mpservice.mpserver.Server.async_call` is renamed to `backpressure`.

0.11.6

- `mpserver` wait-time fine tunning.
- `mpservice.mpserver.Server.async_call` gets new parameter `shed_load` with default `True`.
- New exception class `PipelineFull` in `mpserver`.

0.11.5

- `RemoteException` is re-written with much simplifications; the class is moved from `remote_exception` to `util`; the module `remote_exception` is removed.
- Enhancements to `SpawnProcess`.
- Improvements to util.ProcessLogger`.
- The new constant `mpservice.util.MP_SPAWN_CTX` is a customization to the standard spawn
context that uses `SpawnProcess` instead of `Process`.
- Use spawn method or `SpawnProcess` exclusively or by default in various places in the code.
- `Streamer.transform` gets new parameter `executor` to support multiprocessing for CPU-bound operators.
- The module `server_process` is re-written.
- The module `named_pipe` is renamed `pipe`.

Page 6 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.