Convtools

Latest version: v1.14.4

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

Scan your dependencies

Page 10 of 19

0.24.0

**Features**

- introduced ``convtools.contrib.fs`` helpers: ``split_buffer`` and
``split_buffer_n_decode`` to close the gap in Python's ``open``
functionality, related to "newlines" (it doesn't support custom ones in text
mode and doesn't support any in binary one).

**Misc**

- reworked and improved the way function args are collected during code
generation, now it better understands which variables need to be passed
- reworked aggregates so they don't generate code twice (one for aggregation
phase, another for result collection phase)
- improved pipes to better understand when they can inline the code and when
it's beneficial to pass a complex input to a function and then use it
multiple times without recalculations
- now pipes use estimated conversion weights (which correlate with computation
costs), inferred for every Python version supported
- optimized dependency tracking to omit trivial ones, while still collecting
content types as a bitmask
- reduced number of function calls, when using magic methods
- improved ``GetItem`` conversion so it can use hardcoded versions of functions
in trivial cases and cache converters in almost-trivial ones; stopped
catching ``AttributeError`` when run with default
- improved ``GetAttr`` conversion to inline attr lookups instead of ``getattr``
calls where possible; stopped catching ``(TypeError, KeyError, IndexError)``

0.23.3

**Bugfix**

- fixed long existing bug in aggregations in cases where multiple reducers get
initialized at different moments, e.g. the first reducer collects min values
of column "a", while the second reducer collects max values of column "b",
"min a" may get initialized earlier than "max b" and then this would raise
``Exception``

0.23.2

**Bugfix**

- fixed ``c.attr("a", default=None).attr("b", default=None)`` (preferred
``c.attr("a", "b", default=None)`` was working though)
- fixed too-many-parenthesis error for long chains of ``and_``, ``or_`` and
``==``

0.23.1

**Misc**

- allowed passing callables to ``and_then`` so they are called with input as an
argument
- made ``and_then`` handle the default case as ``a and conv(a)`` not ``if``

0.23.0

**Features**

- added ``c.and_then`` and ``(...).and_then`` shortcut to pipe if condition is
true, otherwise leave untouched. Supports overriding default ``bool``
condition.

0.22.0

[16](https://github.com/westandskif/convtools/pull/16)

**Features**

- added ``c.ReduceFuncs.ArraySorted`` reducer
- reworked ``GetItem`` and ``GetAttr`` to cache ``get_or_default`` methods
based on number of indexes and args
- added support for single column tables (headers are always str still)

**Misc**

- updated internals of arg def handling, made naive and labels optional
- removed ``NamedConversion`` and ``ConversionWrapper`` in favor of new
``LazyEscapedString``, ``Namespace`` and ``NamespaceCtx``. This lays better
groundwork for future use of conversions which generate code around another
named ones.

Page 10 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.