Changelogs » Tri.declarative

Tri.declarative

1.2.1

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

* Improved documentation output

1.2.0

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

* Add get_members function to enable reuse of declarative attribute collection

* Add class_shortcut decorator to enable with_meta aware class shortcuts

1.1.0

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

* Added `generate_rst_docs` function.

1.0.6

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

* `Shortcut` is now a special case when merging `Namespace` objects.
When already in a Namespace, a Shortcut now get overwritten by `setitem_path()`, not merged into the written value.

1.0.5

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

* Fix broken handling of empty key

1.0.4

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

* Cleanup Namespace path logic and make sure it is symmetrical and tested.

* Added deprecation warning on string to dict promotion on namespace merge.

1.0.3

~~~~~~~~~~~~~~~~~~

* Fixed release functionality

1.0.2

~~~~~~~~~~~~~~~~~~

* Don't support `RefinableObject` in `evaluate_recursive`. This was a mistake.

1.0.1

~~~~~~~~~~~~~~~~~~

* Support `RefinableObject` in `evaluate_recursive`.

1.0.0

~~~~~~~~~~~~~~~~~~

* Cleanup deprecation warnings from inspect.getargspec

0.34.0

~~~~~~~~~~~~~~~~~~~

* Fix bug in 0.33.0 when promoting callable to `Namespace`.

0.33.0

~~~~~~~~~~~~~~~~~~~

* Fix bug when promoting callable to `Namespace`.

* Fix handling of `EMPTY` marker.

0.32.0

~~~~~~~~~~~~~~~~~~~

* Added promoting callable namespace members to `Namespace` with `call_target` in
`setdefaults_path`.

0.31.0

~~~~~~~~~~~~~~~~~~~

* Improve `sort_after` to allow more combinations of `after=...` specifications.
e.g. by name of an entry also moved by spec.

* Changed name of first parameter of `setdefaults_path` to `__target__` to avoid
collitions with namespace parameters.

* Added `RefinableObject` base for reuse by classes wanting to be able to be configured
via constructor kwarg parameters in a declarative fashion. (The namespace of possible
constructor overrides are declared with `Refinable()` for values and the decorator
`refinable` for methods.

* Added first incarnation of crawling the definitions to recursively find available
parameters on objects and their aggregates.

* Added `Shortcut` abstraction to be able to find pre-defined set of overrides of
`RefinableObject` classes.

0.30.0

~~~~~~~~~~~~~~~~~~~

* `evaluate` and `evaluate_recursive` also works for methods as well as for functions.

0.29.0

~~~~~~~~~~~~~~~~~~~

* Fixed loop detection in flatten for `Namespace`\ s. This resulted in data
corruption.

0.28.0

~~~~~~~~~~~~~~~~~~~

* Added `Namespace` subclass of `tri.struct.Struct` to explicit capture the
path splitting semantics. (And added method for flattening a `Namespace` back
to path notation.)

0.27.0

~~~~~~~~~~~~~~~~~~~

* Fix bug in `evaluate` signature detection with optional arguments.
(`lambda a, b=17: a+b` was correctly matched but `lambda b, a=17: a+b` was not)

0.26.0

~~~~~~~~~~~~~~~~~~~

* Added `EMPTY` marker to `setdefaults_path` to avoid mixup when empty dict is
provided in function defaults.

0.25.0

~~~~~~~~~~~~~~~~~~~

* Added dispatch decorator

0.24.0

~~~~~~~~~~~~~~~~~~~

* Fix bug in `setdefault_path` tripping up on key ordering.

* Dropped `namespace_factory` keyword argument to `setdefaults_path` not likely
ever beeing used.

0.23.0

~~~~~~~~~~~~~~~~~~~

* `setdefaults_path` now accepts multiple default dicts. (To simplify the pattern of
shortcuts in tri.form, tri.query and tri.table where we now will end up with:
`new_kwargs = setdefaults_path(Struct(), kwargs, dict(....))`

0.22.0

~~~~~~~~~~~~~~~~~~~

* `sort_after()` should produce an error when attempting to sort after non-existant keys

* Tweaked namespace merge in `setdefaults_path`

0.21.0

~~~~~~~~~~~~~~~~~~~

* Fix corner case in collect_namespaces where one parameter imply a value and
others imply a namespace.

* Added `setdefaults_path` helper with `__` namespace traversal.

0.20.0

~~~~~~~~~~~~~~~~~~~

* Added `assert_kwargs_not_empty` convenience function.

* Improved documentation.

0.19.0

~~~~~~~~~~~~~~~~~~~

* When making instances of a class decorated with `declarative` the declared
values are copied (shallow) before being passed to `__init__`.

* Instances will get an own copy of the declared attributes written to their
`__dict__`