* Fixed slots inheritance
* Added changelog
* Added a separate test
* Restored backwards-compatibility and added a test for it
Co-authored-by: Hynek Schlawack <hs@ox.cx>
* Add control to generate __[sg]etstate__
Pass *getstate_setstate* to attr.s to control the generation. Mostly
interesting for disabling it in slotted classes.
Fixes #512,#513
* Update glossary.rst
* from parsyfiles development (https://github.com/smarie/python-simple-file-collection-parsing-framework):
* added new 'chain' validator to allow users to chain their custom validators with, for example, 'instance_of'
* added utility methods to get the declared attribute type (by inspecting its validators) and to check if it is optional
* from parsyfiles development (https://github.com/smarie/python-simple-file-collection-parsing-framework):
* added tests
* fixed bug with optional validator to pass tests :)
* from parsyfiles development (https://github.com/smarie/python-simple-file-collection-parsing-framework):
* completed doc api.rst
* small mod in tests
* Fixed issue with empty cell in closure when slots are used. Fixed#589
* Removed api.rst mods erroneously injected from another branch.
* Removed api.rst mods erroneously injected from another branch.
* noqa so that flake8 is happy
* Fixed lint error
* Added towncrier changelog entry
* Attempt to fix linter error
* Update tests/test_slots.py
* Last lint fix
* Update changelog.d/590.change.rst
Co-Authored-By: Hynek Schlawack <hs@ox.cx>
* Added extensive doc in the new test
* Update tests/test_slots.py
* last lint error
Co-authored-by: Sylvain MARIE <sylvain.marie@se.com>
Co-authored-by: Hynek Schlawack <hs@ox.cx>
* Split cmp into eq and order
Fixes#170
* Fix tests on old pypy3 versions
Old as in: currently on AP.
* Fix issue number and clarify newsfragment
* Clarify behavior and interaction between cmp/eq/order
* This sounds better
* Address Julian's review comments
* Missed a cmp
* Test the behavior of Attribute.cmp
* Make test more idiomatic
* Explain assumptions
* Clarify comment
* Grammar
* One more cmp!
* Revert "Don't use CodeType.replace() -- it was added in 3.8.0b1, but CI still uses 3.8.0a4"
Our CI now supports CodeType.replace(), and the only 3.8 versions that don't support it are alpha releases so we don't need to maintain support for them. Using replace() is more forward compatible.
This reverts commit 52097ce321.
* Disable forced-failure test on 3.8+ -- there's no longer enough surface area for a monkeypatch to do anything
* Pure-Python approach to closure cell rewriting
* Re-add mistakenly removed @skipif(PYPY)
* no-cover the 'should be impossible' lines and the functions that are only defined for their side effects on closure cells
* Add weakref parameter to attr.s()
#325
* Add weakref to simple_classes() strategy
* Rename changelog file with actual PR (420.change.rst)
* Add test_weakref_does_not_add_a_field()
* Add docstrings to new weakref tests
* Add missing blank line
* Correct weakref handling of __weakref__ attributes or an inherrited slot
* Correct typos and terms
* Rename to weakref_slot
* Parametrize more tests against weakref_slot True/False to expose trouble
* Check if __weakref__ has been inherited via a __dict__
* Correct copy/pasted comment
* Change weakref_slot default to True
* Tidy and correct weakref -> weakref_slot