* Add support for cached_properties to slotted attrs classes.
* Remove locking from implementation
* Add test for multiple cached properties and fix bug
* Add changelog file
* Document slotted cached properties
* Add cached_property hypothesis check.
* Only run cached_property imports on python 3.8+
* Use cached _obj_setattr instead of `object.__setattr__`
* Correctly resolve mro for __getattr__ in cached properties
* Use _get_annotations rather than branching on class dict entry
* Optimise __getattr__ code by front loading branching, and injecting locasl variables
* Remove unnecessary `__attrs_original_getattr__` from class dictionary.
---------
Co-authored-by: Hynek Schlawack <hs@ox.cx>
* Pass args from `__init__` to `__attrs_pre_init__` if requested
Detect if `__attrs_pre_init__` has arguments besides `self`
using `inspect.signature`. If so, pass `__attrs_pre_init__`
the same arguments that `__init__` (or `__attrs_init__`)
expects.
* Add changelog entry for `__attrs_pre_init__` args changes
* Don't use monkeypatch in new code
* Clarify docs
* Missed one monkeypatching
---------
Co-authored-by: Hynek Schlawack <hs@ox.cx>
* Add literal string support to includer and exclude filters
* Add docs and changelog for new feature
* Fix typo in `typing_example`
* Add a note to document typo issues while using literal name strings as filter args
* Add more docs
* Add code mark for `AttributeError`
* Fix grammar error and upgrade `versionchanged` info
* Improve docs and examples from
hynek's comments
* Keep example cases the same
* More examples
* Apply suggestions from code review
Co-authored-by: chrysle <fritzihab@posteo.de>
---------
Co-authored-by: Hynek Schlawack <hs@ox.cx>
Co-authored-by: chrysle <fritzihab@posteo.de>
* Added `type` parameter to `attrs.field` and test
* Added notice in examples.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added changelog entry
* Fixed docs
* Apply suggestions from code review
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Hynek Schlawack <hs@ox.cx>
* Fix object index in API docs
* Refactor API docs, prefer new namespace in examples
* Missed one
* Technically optional, practically confusing
* Simplify / clarify intro to API
* No need to make this clickable