Commit Graph

14 Commits

Author SHA1 Message Date
Hynek Schlawack 1fada3d374 Be consistent in calling slotted classes slotted 2019-02-25 16:09:57 +01:00
Kyle Altendorf 7fe111cbe2 T325 weakref with slots (#420)
* 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
2018-08-25 09:01:02 +02:00
Hynek Schlawack a372d51b7b
Fade to Black (#392) 2018-06-10 19:40:07 +02:00
Hynek Schlawack ef9a062022
Use isort so we can stop thinking about imports (#297) 2017-11-26 22:18:07 +01:00
Hynek Schlawack 1e6627c9ad
Make ctypes optional (#286) 2017-11-10 17:23:53 +01:00
Hynek Schlawack 3040bdabbc Refactor class creation (#272)
Instead of adding and possibly later deleting attributes, the class creation is delegated into a cleaner building pattern.
2017-10-26 12:55:34 +02:00
Tin Tvrtković 47583a9459 Bugfix/slot super (#226) 2017-08-03 17:04:48 +02:00
Hynek Schlawack f560500886 Fix hashing behavior (#142) 2017-02-19 09:51:43 +01:00
Hynek Schlawack c7842b8cb6 CHANGELOG & small nits
Fixes #35, #31
2016-03-31 13:12:36 +02:00
Tin Tvrtkovic c50d5aaa20 Flipped a bunch of asserts in test_slots. 2016-03-21 22:32:23 +01:00
Tin Tvrtkovic 37bc4b878c Rename class_ to cls.
Fix docstrings.
Fix missing parens in a test.
2016-03-17 19:40:11 +01:00
Tin Tvrtkovic 1d21609c14 Fix reprs. 2016-03-16 22:28:43 +01:00
Tin Tvrtkovic 26b7bff084 Handle some edge cases for slots.
Many more slot tests.
2016-03-16 03:10:28 +01:00
Tin Tvrtkovic 7b201eb199 Initial slots implementation. 2016-03-14 03:02:13 +01:00