Atomic-lines

Latest version: v0.1.1rc6

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

Scan your dependencies

Page 1 of 2

0.1.1rc6

LineProcessingFuncBase no longer takes a `processor` argument (nor does it proviede `_processor`).
To migrate your code change `super().__init__(processor)` to `super().__init__(); self._processor=processor` if you need to keep the `processor` argument.

New

- Fast linting using Ruff

Changed

- LineProcessingFuncBase no longer takes a `processor` argument (nor does it proviede `_processor`)

0.1.1rc5

LineProcessor.add_processor no longer accepts non async functions. Use `LineProcessor.add_processor(wrap_as_async(lambda x: True))` if synchronous functions need to be used as processors.

New

- The processors module provides processor helpers. Currently only a ProcessUntil helper is defined, which
processes until the line meets a predicate. (Name might be changed to `process_until` for consistency.)
- See `LineProcessingFuncBase` if you want to write processors which interact with the parent LineProcessor instance.

Fixed

- LineProcessor no longer skips processors if other processors are removed during processing

Changed

- LineProcessor.add_processor no longer wraps non async functions into async functions,
use wrap_as_async explicitly to add non async function to add_processor

0.1.1rc4

LineProcessor.add_processor now returns the function actually added as a line processor.
Since sync functions are wrapped into an async function, you have to use this return value for
LineProcessor.remove_processor.
It is now possible to temporarily add lineprocessors with LineProcessor.temporary_processor
Changed
- LineProcessor.add_processor wraps non async functions into async functions, returns the
function added.

New
- LineProcessor.temporary_processor is a context manager to temporarily inject a processor using a with statement

0.1.1rc3

Allow async callbacks for lineprocessor

Added
- support for async lineprocessor methods

0.1.1rc2

Fix issue with hangs.

Added
- support an EOF exception to shut down reader

Fixed
- LineReader hangs at EOF of networkstream/when read() returns 0 bytes

Changed
- AtomicLineReader.readline now reraises the background read processes exceptions if no further lines are in the buffer
(i.e. if readline is bound to fail because no data is available and the backgroundprocess has crashed)

0.1.1rc1

Added mkdocs documentation, allow to import classes directly from root module

Added
- mkdocs documentation

Changed
- made important classes available from root module

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.