Visaplan.tools

Latest version: v1.3.13

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

Scan your dependencies

Page 1 of 2

2.0.0

------------------

- Breaking changes:

- Signature change (e.g. name of first argument: ``form`` --> ``dic``) for
``dicts.update_dict``.

1.3.1

------------------

Breaking changes:

- ``.lands0.list_of_strings`` now *does* split strings by default:

- like for the `str.split` method (which is used internally),
a `None` split character
causes the argument to be split using any whitespace

- to suppress splitting, you may now specify `splitfunc=False`
which will imply the value to be *stripped*, at least ...

- ... unless `splitchar=False` is given as well.

Bugfixes:

- ``.lands0.list_of_strings`` didn't split strings by default ...

(You didn't *rely* on this bug, did you?!)

New Features:

- New class `.dicts.ChangesCollector`;
allows to collect additions *to* and deletions *from* lists (see doctests).
If collections-extended_ is installed, the `setlist` class is used,
an "ordered set".

Improvements:

- ``.sequences.nonempty_lines`` now takes a function argument, default: ``string.strip``

New Features:

- new module ``sql`` which helps generating SQL statements; it doesn't try, however,
to provide any kind of object relational mapping.

The following function return a statement string with placeholders and a values dictionary:

- `insert`
- `update`
- `delete`
- `select`

(a modified copy of the `utils` module from visaplan.plone.sqlwrapper_ v1.0.2),
with the following unfinished functions removed:

- `make_grouping_wrapper` (including the helper `_groupable_spectup`)
- `make_join` (in [v1_3_x]34490)

Instead, we have new functions:

- `subdict_ne` - create a subdict of non-empty values.
This is a replacement for the `extract_dict` function which (sadly) expects -
other than the `.dicts.subdict` function - the `fields` argument first.

It is generated by the `.sql.make_dict_extractor` factory function
which allows for a few keyword options, e.g. to specify the values considered empty.

- new function ``lands0.make_default_prefixer``

[tobiasherp]

1.3.0

------------------

New Features:

- new module ``batches``, containing a `batch_tuples` function which generates (sublist, txt) tuples
- new class ``classes.StackOfDicts``
- new function ``minifuncs.check_kwargs``
- new function ``debug.has_strings``
- new function ``debug.make_debugfile_writer`` (not yet sufficiently generalized)

Requirements:

- six_ module, for Python 3 compatibility

[tobiasherp]

1.2.6

------------------

Improvements:

- Travis CI integration added.
- Test discovery configuration for nose2 (used on Travis) and nose.

Bugfixes:

- Fixed doctests for

- ``.dicts.update_dict``
- ``.dicts.make_key_injector``

- Removed now-obsolete ...tests/test_doctests.py file which caused ``nosetests`` to fail.

New Features:

- ``.times.make_defaulttime_calculator``: new keyword-only option ``utc=False``,
to make the doctests work with Travis.

[tobiasherp]

1.2.5

------------------

- New class ``classes.AliasDict``

- Added some doctests.

[tobiasherp]

1.2.4

------------------

- New function ``dicts.update_dict`` (from v1.2.3) "published" in ``__all__`` list.
We are not happy with the signature of this function, though, so it will likely change
in a future release.

- New function ``classes.connected_dicts`` which creates two connected
dictionaries with ``dic1[key] = val`` <--> ``dict2[val] = key``

- ``log_or_trace`` will print a useful info, containing the ``trace_key``,
before calling ``set_trace()``

[tobiasherp]

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.